829 lines
25 KiB
HTML
829 lines
25 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="fa" dir="rtl">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<title>راهنمای جامع توسعه افزونه Azure DevOps | معماری و پیادهسازی</title>
|
||
<style>
|
||
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800&display=swap');
|
||
:root {
|
||
--primary: #1a365d;
|
||
--primary-light: #2c5282;
|
||
--accent: #c9a961;
|
||
--accent-dark: #a8893f;
|
||
--bg: #faf9f6;
|
||
--card-bg: #ffffff;
|
||
--text: #1a202c;
|
||
--text-muted: #4a5568;
|
||
--border: #e2e8f0;
|
||
--success: #38a169;
|
||
--danger: #e53e3e;
|
||
--warning: #dd6b20;
|
||
--shadow: 0 4px 6px rgba(0,0,0,0.05), 0 10px 30px rgba(26,54,93,0.08);
|
||
}
|
||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||
body {
|
||
font-family: 'Vazirmatn', Tahoma, sans-serif;
|
||
background: var(--bg);
|
||
color: var(--text);
|
||
line-height: 1.9;
|
||
font-size: 15px;
|
||
padding: 30px 15px;
|
||
}
|
||
.document-container {
|
||
max-width: 950px;
|
||
margin: 0 auto;
|
||
background: var(--card-bg);
|
||
box-shadow: var(--shadow);
|
||
border-radius: 12px;
|
||
overflow: hidden;
|
||
}
|
||
.document-header {
|
||
background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
|
||
color: white;
|
||
padding: 50px 40px 40px;
|
||
position: relative;
|
||
border-bottom: 4px solid var(--accent);
|
||
}
|
||
.document-header::before {
|
||
content: '';
|
||
position: absolute;
|
||
top: 0; right: 0;
|
||
width: 200px; height: 200px;
|
||
background: radial-gradient(circle, rgba(201,169,97,0.15) 0%, transparent 70%);
|
||
border-radius: 50%;
|
||
transform: translate(50%, -50%);
|
||
}
|
||
.header-top {
|
||
display: flex;
|
||
justify-content: space-between;
|
||
align-items: center;
|
||
margin-bottom: 30px;
|
||
position: relative;
|
||
z-index: 1;
|
||
}
|
||
.company-badge {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 12px;
|
||
}
|
||
.company-logo {
|
||
width: 60px; height: 60px;
|
||
background: var(--accent);
|
||
border-radius: 12px;
|
||
box-shadow: 0 4px 12px rgba(0,0,0,0.2);
|
||
}
|
||
.doc-meta {
|
||
text-align: left;
|
||
font-size: 12px;
|
||
opacity: 0.9;
|
||
}
|
||
.doc-meta div { margin-bottom: 3px; }
|
||
.document-title {
|
||
text-align: center;
|
||
position: relative;
|
||
z-index: 1;
|
||
padding: 20px 0;
|
||
}
|
||
.document-title .label {
|
||
display: inline-block;
|
||
background: rgba(201,169,97,0.2);
|
||
color: var(--accent);
|
||
padding: 4px 16px;
|
||
border-radius: 20px;
|
||
font-size: 12px;
|
||
font-weight: 600;
|
||
margin-bottom: 15px;
|
||
border: 1px solid rgba(201,169,97,0.4);
|
||
}
|
||
.document-title h1 {
|
||
font-size: 28px;
|
||
font-weight: 800;
|
||
margin-bottom: 10px;
|
||
letter-spacing: -0.5px;
|
||
}
|
||
.document-title h2 {
|
||
font-size: 16px;
|
||
font-weight: 400;
|
||
opacity: 0.9;
|
||
}
|
||
.document-body {
|
||
padding: 40px;
|
||
}
|
||
.intro-text {
|
||
background: linear-gradient(to left, #f7fafc, #edf2f7);
|
||
border-right: 4px solid var(--accent);
|
||
padding: 20px 25px;
|
||
border-radius: 8px;
|
||
margin-bottom: 35px;
|
||
font-size: 14px;
|
||
color: var(--text-muted);
|
||
}
|
||
.section {
|
||
margin-bottom: 40px;
|
||
page-break-inside: avoid;
|
||
}
|
||
.section-header {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 15px;
|
||
padding-bottom: 12px;
|
||
border-bottom: 2px solid var(--border);
|
||
margin-bottom: 20px;
|
||
}
|
||
.section-number {
|
||
width: 50px; height: 50px;
|
||
background: linear-gradient(135deg, var(--primary), var(--primary-light));
|
||
color: white;
|
||
border-radius: 12px;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
font-weight: 800;
|
||
font-size: 20px;
|
||
flex-shrink: 0;
|
||
box-shadow: 0 4px 10px rgba(26,54,93,0.2);
|
||
}
|
||
.section-title { flex: 1; }
|
||
.section-title h3 {
|
||
font-size: 19px;
|
||
font-weight: 700;
|
||
color: var(--primary);
|
||
margin-bottom: 2px;
|
||
}
|
||
.section-title .subtitle {
|
||
font-size: 12px;
|
||
color: var(--text-muted);
|
||
}
|
||
.section-content {
|
||
padding-right: 10px;
|
||
}
|
||
.section-content p {
|
||
margin-bottom: 12px;
|
||
text-align: justify;
|
||
text-indent: 20px;
|
||
}
|
||
.section-content p.no-indent { text-indent: 0; }
|
||
.highlight-box {
|
||
background: linear-gradient(to left, #fffaf0, #fef5e7);
|
||
border: 1px solid #f6e05e;
|
||
border-right: 4px solid var(--accent);
|
||
padding: 18px 22px;
|
||
border-radius: 8px;
|
||
margin: 20px 0;
|
||
font-size: 14px;
|
||
}
|
||
.highlight-box strong {
|
||
color: var(--accent-dark);
|
||
}
|
||
.info-box {
|
||
background: linear-gradient(to left, #ebf8ff, #e6f6ff);
|
||
border: 1px solid #90cdf4;
|
||
border-right: 4px solid var(--primary-light);
|
||
padding: 18px 22px;
|
||
border-radius: 8px;
|
||
margin: 20px 0;
|
||
font-size: 14px;
|
||
}
|
||
.success-box {
|
||
background: linear-gradient(to left, #f0fff4, #e6fffa);
|
||
border: 1px solid #9ae6b4;
|
||
border-right: 4px solid var(--success);
|
||
padding: 18px 22px;
|
||
border-radius: 8px;
|
||
margin: 20px 0;
|
||
font-size: 14px;
|
||
}
|
||
.warning-box {
|
||
background: linear-gradient(to left, #fffaf0, #fef5e7);
|
||
border: 1px solid #fbd38d;
|
||
border-right: 4px solid var(--warning);
|
||
padding: 18px 22px;
|
||
border-radius: 8px;
|
||
margin: 20px 0;
|
||
font-size: 14px;
|
||
}
|
||
.styled-table {
|
||
width: 100%;
|
||
border-collapse: collapse;
|
||
margin: 20px 0;
|
||
background: white;
|
||
border-radius: 8px;
|
||
overflow: hidden;
|
||
box-shadow: 0 2px 8px rgba(0,0,0,0.05);
|
||
}
|
||
.styled-table thead {
|
||
background: linear-gradient(135deg, var(--primary), var(--primary-light));
|
||
color: white;
|
||
}
|
||
.styled-table th {
|
||
padding: 14px 16px;
|
||
text-align: right;
|
||
font-weight: 600;
|
||
font-size: 13px;
|
||
}
|
||
.styled-table td {
|
||
padding: 13px 16px;
|
||
border-bottom: 1px solid var(--border);
|
||
font-size: 13px;
|
||
}
|
||
.styled-table tbody tr:last-child td { border-bottom: none; }
|
||
.styled-table tbody tr:nth-child(even) { background: #f8fafc; }
|
||
.styled-table .highlight-row {
|
||
background: #fffaf0 !important;
|
||
font-weight: 600;
|
||
}
|
||
.comparison-grid {
|
||
display: grid;
|
||
grid-template-columns: 1fr 1fr;
|
||
gap: 20px;
|
||
margin: 25px 0;
|
||
}
|
||
.comparison-card {
|
||
background: #f8fafc;
|
||
border: 2px solid var(--border);
|
||
border-radius: 10px;
|
||
padding: 20px;
|
||
position: relative;
|
||
}
|
||
.comparison-card.recommended {
|
||
border-color: var(--success);
|
||
background: linear-gradient(to left, #f0fff4, #e6fffa);
|
||
}
|
||
.comparison-card .card-badge {
|
||
position: absolute;
|
||
top: -10px;
|
||
right: 20px;
|
||
background: var(--success);
|
||
color: white;
|
||
padding: 3px 12px;
|
||
border-radius: 15px;
|
||
font-size: 11px;
|
||
font-weight: 600;
|
||
}
|
||
.comparison-card h4 {
|
||
font-size: 16px;
|
||
font-weight: 700;
|
||
color: var(--primary);
|
||
margin-bottom: 15px;
|
||
padding-bottom: 10px;
|
||
border-bottom: 2px solid var(--border);
|
||
}
|
||
.comparison-card.recommended h4 {
|
||
border-bottom-color: var(--success);
|
||
}
|
||
.comparison-card ul {
|
||
list-style: none;
|
||
padding: 0;
|
||
}
|
||
.comparison-card ul li {
|
||
padding: 8px 0;
|
||
border-bottom: 1px solid var(--border);
|
||
font-size: 13px;
|
||
display: flex;
|
||
justify-content: space-between;
|
||
}
|
||
.comparison-card ul li:last-child { border-bottom: none; }
|
||
.comparison-card ul li .value {
|
||
font-weight: 600;
|
||
color: var(--primary);
|
||
}
|
||
.quote-box {
|
||
background: linear-gradient(135deg, #f7fafc, #edf2f7);
|
||
border-right: 4px solid var(--accent);
|
||
padding: 20px 25px;
|
||
border-radius: 8px;
|
||
margin: 20px 0;
|
||
position: relative;
|
||
}
|
||
.quote-box::before {
|
||
content: '"';
|
||
position: absolute;
|
||
top: -10px;
|
||
right: 15px;
|
||
font-size: 60px;
|
||
color: var(--accent);
|
||
opacity: 0.3;
|
||
font-family: Georgia, serif;
|
||
}
|
||
.quote-box p {
|
||
font-style: italic;
|
||
color: var(--text-muted);
|
||
margin-bottom: 10px;
|
||
text-indent: 0 !important;
|
||
}
|
||
.quote-box .source {
|
||
font-size: 12px;
|
||
color: var(--text-muted);
|
||
text-align: left;
|
||
font-style: normal;
|
||
}
|
||
.stats-grid {
|
||
display: grid;
|
||
grid-template-columns: repeat(3, 1fr);
|
||
gap: 15px;
|
||
margin: 25px 0;
|
||
}
|
||
.stat-card {
|
||
background: linear-gradient(135deg, var(--primary), var(--primary-light));
|
||
color: white;
|
||
padding: 20px;
|
||
border-radius: 10px;
|
||
text-align: center;
|
||
box-shadow: 0 4px 12px rgba(26,54,93,0.2);
|
||
}
|
||
.stat-card .stat-value {
|
||
font-size: 24px;
|
||
font-weight: 800;
|
||
margin-bottom: 5px;
|
||
color: var(--accent);
|
||
line-height: 1.3;
|
||
}
|
||
.stat-card .stat-label {
|
||
font-size: 12px;
|
||
opacity: 0.9;
|
||
}
|
||
.timeline {
|
||
position: relative;
|
||
padding: 20px 0;
|
||
margin: 25px 0;
|
||
}
|
||
.timeline::before {
|
||
content: '';
|
||
position: absolute;
|
||
right: 50%;
|
||
top: 0;
|
||
bottom: 0;
|
||
width: 3px;
|
||
background: var(--border);
|
||
transform: translateX(50%);
|
||
}
|
||
.timeline-item {
|
||
display: flex;
|
||
margin-bottom: 20px;
|
||
position: relative;
|
||
}
|
||
.timeline-item:nth-child(odd) {
|
||
flex-direction: row-reverse;
|
||
}
|
||
.timeline-content {
|
||
width: 45%;
|
||
background: #f8fafc;
|
||
border: 1px solid var(--border);
|
||
border-radius: 8px;
|
||
padding: 15px;
|
||
position: relative;
|
||
}
|
||
.timeline-item:nth-child(odd) .timeline-content {
|
||
margin-left: 5%;
|
||
}
|
||
.timeline-item:nth-child(even) .timeline-content {
|
||
margin-right: 5%;
|
||
}
|
||
.timeline-dot {
|
||
position: absolute;
|
||
right: 50%;
|
||
top: 20px;
|
||
width: 16px;
|
||
height: 16px;
|
||
background: var(--accent);
|
||
border: 3px solid white;
|
||
border-radius: 50%;
|
||
transform: translateX(50%);
|
||
box-shadow: 0 2px 6px rgba(0,0,0,0.2);
|
||
z-index: 1;
|
||
}
|
||
.timeline-content h5 {
|
||
font-size: 14px;
|
||
font-weight: 700;
|
||
color: var(--primary);
|
||
margin-bottom: 8px;
|
||
}
|
||
.timeline-content p {
|
||
font-size: 12px;
|
||
color: var(--text-muted);
|
||
text-indent: 0 !important;
|
||
margin-bottom: 0 !important;
|
||
}
|
||
.reference-list {
|
||
list-style: none;
|
||
padding: 0;
|
||
margin: 20px 0;
|
||
}
|
||
.reference-list li {
|
||
background: #f8fafc;
|
||
border-right: 3px solid var(--primary-light);
|
||
padding: 15px 20px;
|
||
margin-bottom: 10px;
|
||
border-radius: 6px;
|
||
font-size: 13px;
|
||
}
|
||
.reference-list li strong {
|
||
color: var(--primary);
|
||
display: block;
|
||
margin-bottom: 5px;
|
||
}
|
||
.reference-list li .ref-source {
|
||
font-size: 11px;
|
||
color: var(--text-muted);
|
||
margin-top: 5px;
|
||
}
|
||
.conclusion-box {
|
||
background: linear-gradient(135deg, var(--primary), var(--primary-light));
|
||
color: white;
|
||
padding: 30px;
|
||
border-radius: 12px;
|
||
margin: 30px 0;
|
||
text-align: center;
|
||
box-shadow: 0 8px 20px rgba(26,54,93,0.3);
|
||
}
|
||
.conclusion-box h3 {
|
||
font-size: 22px;
|
||
font-weight: 800;
|
||
margin-bottom: 15px;
|
||
color: var(--accent);
|
||
}
|
||
.conclusion-box p {
|
||
font-size: 14px;
|
||
line-height: 1.8;
|
||
text-indent: 0 !important;
|
||
margin-bottom: 15px;
|
||
}
|
||
.conclusion-box .highlight {
|
||
background: rgba(201,169,97,0.2);
|
||
padding: 15px 20px;
|
||
border-radius: 8px;
|
||
margin-top: 20px;
|
||
border: 1px solid rgba(201,169,97,0.4);
|
||
}
|
||
.document-footer {
|
||
background: var(--primary);
|
||
color: white;
|
||
padding: 25px 40px;
|
||
text-align: center;
|
||
font-size: 12px;
|
||
margin-top: 40px;
|
||
}
|
||
.document-footer .footer-brand {
|
||
font-weight: 700;
|
||
color: var(--accent);
|
||
margin-bottom: 5px;
|
||
font-size: 14px;
|
||
}
|
||
.footer-divider {
|
||
width: 60px;
|
||
height: 2px;
|
||
background: var(--accent);
|
||
margin: 10px auto;
|
||
}
|
||
.page-info {
|
||
text-align: center;
|
||
padding: 15px;
|
||
font-size: 11px;
|
||
color: var(--text-muted);
|
||
border-top: 1px solid var(--border);
|
||
margin-top: 30px;
|
||
}
|
||
@media print {
|
||
body { background: white; padding: 0; }
|
||
.document-container { box-shadow: none; border-radius: 0; }
|
||
.section { page-break-inside: avoid; }
|
||
}
|
||
@media (max-width: 768px) {
|
||
.document-body { padding: 25px 20px; }
|
||
.document-header { padding: 30px 20px; }
|
||
.comparison-grid { grid-template-columns: 1fr; }
|
||
.stats-grid { grid-template-columns: 1fr; }
|
||
.header-top { flex-direction: column; gap: 15px; }
|
||
.doc-meta { text-align: center; }
|
||
}
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<div class="document-container">
|
||
<header class="document-header">
|
||
<div class="header-top">
|
||
<div class="company-badge">
|
||
<div class="company-logo"></div>
|
||
</div>
|
||
<div class="doc-meta">
|
||
<div>شماره مستند: AZDO-EXT-2026-001</div>
|
||
<div>نسخه: ۱.۰</div>
|
||
<div>تاریخ تهیه: آبان ۱۴۰۵</div>
|
||
<div>طبقهبندی: فنی / معماری</div>
|
||
</div>
|
||
</div>
|
||
<div class="document-title">
|
||
<span class="label">TECHNICAL GUIDE</span>
|
||
<h1>توسعه افزونه اختصاصی Azure DevOps</h1>
|
||
<h2>معماری، پیادهسازی و انتشار برنامههای کاربردی در اکوسیستم Azure</h2>
|
||
</div>
|
||
</header>
|
||
<div class="document-body">
|
||
<div class="intro-text">
|
||
<strong>تیم محترم مهندسی،</strong><br>
|
||
این مستند بهعنوان نقشه راه جامع فنی جهت طراحی و پیادهسازی افزونههای اختصاصی در بستر Azure DevOS تهیه شده است. هدف اصلی، ایجاد قابلیتهای جدید، یکپارچهسازی سرویسها و ارتقای تجربه کاربری در محیط DevOps سازمان میباشد. رعایت استانداردهای امنیتی و معماری میکروسرویس در این سند الزامی است.
|
||
</div>
|
||
|
||
<div class="section">
|
||
<div class="section-header">
|
||
<div class="section-number">۱</div>
|
||
<div class="section-title">
|
||
<h3>مبانی معماری افزونهها</h3>
|
||
<div class="subtitle">Extension Architecture Fundamentals</div>
|
||
</div>
|
||
</div>
|
||
<div class="section-content">
|
||
<p>افزونههای Azure DevOps بر پایه معماری Micro-Frontend و ارتباط پیامرسان (PostMessage) با هاست اصلی عمل میکنند. این معماری تضمین میکند که کد شما در یک iframe ایزوله اجرا شده و امنیت پلتفرم حفظ شود.</p>
|
||
<div class="stats-grid">
|
||
<div class="stat-card">
|
||
<div class="stat-value">Isolation<br>امنیتی</div>
|
||
<div class="stat-label">اجرای کد در Sandbox اختصاصی</div>
|
||
</div>
|
||
<div class="stat-card">
|
||
<div class="stat-value">SDK<br>اختصاصی</div>
|
||
<div class="stat-label">ارتباط استاندارد با REST API</div>
|
||
</div>
|
||
<div class="stat-card">
|
||
<div class="stat-value">Manifest<br>محور</div>
|
||
<div class="stat-label">تعریف نقاط ورود در vss-extension.json</div>
|
||
</div>
|
||
</div>
|
||
<div class="highlight-box">
|
||
<strong>نکته کلیدی معماری:</strong> هرگز منطق سنگین را در سمت کلاینت (UI) پردازش نکنید. از Backend Service برای عملیات پیچیده استفاده کرده و از SDK تنها برای نمایش دادهها و دریافت رویدادهای UI بهره ببرید.
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="section">
|
||
<div class="section-header">
|
||
<div class="section-number">۲</div>
|
||
<div class="section-title">
|
||
<h3>پیشنیازها و ابزارهای توسعه</h3>
|
||
<div class="subtitle">Prerequisites & Toolchain Setup</div>
|
||
</div>
|
||
</div>
|
||
<div class="section-content">
|
||
<p>برای شروع توسعه حرفهای، نصب و پیکربندی ابزارهای زیر ضروری است. استفاده از TypeScript برای جلوگیری از خطاهای رایج در تعامل با APIهای Azure اکیداً توصیه میشود.</p>
|
||
<table class="styled-table">
|
||
<thead>
|
||
<tr>
|
||
<th>ابزار / کتابخانه</th>
|
||
<th>نقش در توسعه</th>
|
||
<th>اولویت</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td>Node.js & npm</td>
|
||
<td>مدیریت پکیجها و اسکریپتهای بیلد</td>
|
||
<td style="color: var(--danger); font-weight: 600;">الزامی</td>
|
||
</tr>
|
||
<tr>
|
||
<td>tfx-cli</td>
|
||
<td>بستهبندی، اعتبارسنجی و انتشار VSIX</td>
|
||
<td style="color: var(--danger); font-weight: 600;">الزامی</td>
|
||
</tr>
|
||
<tr>
|
||
<td>azure-devops-extension-sdk</td>
|
||
<td>پل ارتباطی امن بین افزونه و هاست Azure</td>
|
||
<td style="color: var(--danger); font-weight: 600;">الزامی</td>
|
||
</tr>
|
||
<tr>
|
||
<td>azure-devops-ui</td>
|
||
<td>کتابخانه کامپوننتهای بصری همسان با Azure</td>
|
||
<td style="color: var(--warning); font-weight: 600;">توصیه شده</td>
|
||
</tr>
|
||
<tr>
|
||
<td>TypeScript</td>
|
||
<td>تایپسیفتی و IntelliSense بهتر</td>
|
||
<td style="color: var(--success); font-weight: 600;">بهترین تمرین</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<div class="info-box">
|
||
<strong>💡 نکته نصب:</strong> پس از نصب tfx-cli، حتماً یک Personal Access Token (PAT) با دسترسی Marketplace > Manage ایجاد کنید تا بتوانید فرآیند انتشار را خودکار نمایید.
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="section">
|
||
<div class="section-header">
|
||
<div class="section-number">۳</div>
|
||
<div class="section-title">
|
||
<h3>ساختار پروژه و فایل Manifest</h3>
|
||
<div class="subtitle">Project Structure & Contribution Points</div>
|
||
</div>
|
||
</div>
|
||
<div class="section-content">
|
||
<p>قلب تپنده هر افزونه فایل <code>vss-extension.json</code> است. این فایل هویت افزونه، مجوزهای مورد نیاز و نقاط تزریق (Contributions) را مشخص میکند.</p>
|
||
<div class="comparison-grid">
|
||
<div class="comparison-card">
|
||
<h4>اجزای حیاتی Manifest</h4>
|
||
<ul>
|
||
<li><span>id & publisher</span> <span class="value">شناسه یکتا</span></li>
|
||
<li><span>contributions</span> <span class="value">نقاط ورود UI/Action</span></li>
|
||
<li><span>scopes</span> <span class="value">مجوزهای دسترسی API</span></li>
|
||
<li><span>files</span> <span class="value">فایلهای قابل دسترس</span></li>
|
||
</ul>
|
||
</div>
|
||
<div class="comparison-card recommended">
|
||
<span class="card-badge">Best Practice ✓</span>
|
||
<h4>اصول طراحی Manifest</h4>
|
||
<ul>
|
||
<li><span>Minimal Scopes</span> <span class="value">اصل کمترین مجوز</span></li>
|
||
<li><span>Versioning</span> <span class="value">رعایت SemVer</span></li>
|
||
<li><span>Targets</span> <span class="value">تعیین دقیق محیط اجرا</span></li>
|
||
<li><span>Icons</span> <span class="value">استاندارد SVG/PNG</span></li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
<div class="success-box">
|
||
<strong>✓ الگوی پیشنهادی:</strong> برای هر ویژگی جدید، یک Contribution Point جداگانه تعریف کنید. این کار باعث ماژولار شدن افزونه و امکان فعال/غیرفعال کردن بخشهای مختلف توسط مدیر سیستم میشود.
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="section">
|
||
<div class="section-header">
|
||
<div class="section-number">۴</div>
|
||
<div class="section-title">
|
||
<h3>تعامل با API و مدیریت احراز هویت</h3>
|
||
<div class="subtitle">API Integration & Authentication</div>
|
||
</div>
|
||
</div>
|
||
<div class="section-content">
|
||
<p>دسترسی به منابع Azure DevOps (مانند Work Items, Git Repos, Builds) از طریق SDK انجام میشود. احراز هویت به صورت خودکار توسط هاست مدیریت میشود و نیازی به ذخیره توکن در سمت کلاینت نیست.</p>
|
||
<h4 style="margin-top: 20px; color: var(--primary); font-size: 16px;">مراحل استاندارد فراخوانی سرویس:</h4>
|
||
<ul style="padding-right: 20px; margin-top: 10px;">
|
||
<li style="margin-bottom: 8px;"><strong>Initialization:</strong> فراخوانی <code>AZDevOps.init()</code> در ابتدای بارگذاری صفحه</li>
|
||
<li style="margin-bottom: 8px;"><strong>Get Service:</strong> دریافت نمونه سرویس مورد نظر via <code>AZDevOps.getService()</code></li>
|
||
<li style="margin-bottom: 8px;"><strong>Context Awareness:</strong> دریافت اطلاعات جاری (Project, Team, User) از Context</li>
|
||
<li style="margin-bottom: 8px;"><strong>Error Handling:</strong> پیادهسازی مکانیزم Retry و نمایش خطای کاربرپسند</li>
|
||
</ul>
|
||
<div class="warning-box">
|
||
<strong>⚠️ هشدار امنیتی:</strong> هرگز PAT یا Secret Key را در کد JavaScript سمت کلاینت قرار ندهید. اگر نیاز به دسترسی به منابع خارجی یا عملیات حساس دارید، حتماً از یک Backend Middleware استفاده کنید.
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="section">
|
||
<div class="section-header">
|
||
<div class="section-number">۵</div>
|
||
<div class="section-title">
|
||
<h3>چرخه تست، بستهبندی و انتشار</h3>
|
||
<div class="subtitle">Testing, Packaging & Deployment</div>
|
||
</div>
|
||
</div>
|
||
<div class="section-content">
|
||
<p>فرآیند تحویل افزونه باید شامل تستهای واحد، تستهای E2E و اعتبارسنجی_manifest باشد. استفاده از CI/CD Pipeline برای انتشار خودکار نسخهها توصیه میشود.</p>
|
||
<table class="styled-table">
|
||
<thead>
|
||
<tr>
|
||
<th>مرحله</th>
|
||
<th>ابزار / دستور</th>
|
||
<th>توضیحات</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td>تست محلی</td>
|
||
<td>Webpack Dev Server + Sideload</td>
|
||
<td>بارگذاری فایل vsix در سازمان تست بدون انتشار عمومی</td>
|
||
</tr>
|
||
<tr>
|
||
<td>اعتبارسنجی</td>
|
||
<td>tfx extension validate</td>
|
||
<td>بررسی ساختار manifest و فایلهای اشاره شده</td>
|
||
</tr>
|
||
<tr>
|
||
<td>بستهبندی</td>
|
||
<td>tfx extension create</td>
|
||
<td>تولید فایل نهایی .vsix آماده نصب</td>
|
||
</tr>
|
||
<tr>
|
||
<td>انتشار خصوصی</td>
|
||
<td>--share-with flag</td>
|
||
<td>اشتراکگذاری فقط با سازمانهای مشخص</td>
|
||
</tr>
|
||
<tr class="highlight-row">
|
||
<td><strong>انتشار عمومی</strong></td>
|
||
<td><strong>tfx extension publish</strong></td>
|
||
<td><strong>ارسال به Marketplace برای بررسی و تایید</strong></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<div class="quote-box">
|
||
<p>کیفیت افزونههای منتشر شده در Marketplace مستقیماً بر اعتماد کاربران تأثیر میگذارد. همیشه قبل از انتشار عمومی، حداقل دو هفته تست بتا در محیط واقعی داشته باشید.</p>
|
||
<div class="source">— Microsoft Azure DevOps Extension Guidelines</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="section">
|
||
<div class="section-header">
|
||
<div class="section-number">۶</div>
|
||
<div class="section-title">
|
||
<h3>منابع و مستندات مرجع</h3>
|
||
<div class="subtitle">Official References & Documentation</div>
|
||
</div>
|
||
</div>
|
||
<div class="section-content">
|
||
<p>برای پیادهسازی صحیح و بهروز، مراجعه مداوم به منابع رسمی زیر ضروری است:</p>
|
||
<ul class="reference-list">
|
||
<li>
|
||
<strong>Azure DevOps Extension API Reference</strong>
|
||
"Complete SDK Documentation & Samples"
|
||
<div class="ref-source">منبع: https://learn.microsoft.com/en-us/azure/devops/extend/reference</div>
|
||
</li>
|
||
<li>
|
||
<strong>Microsoft Learn: Extend Azure DevOps</strong>
|
||
"Tutorials & Learning Paths"
|
||
<div class="ref-source">منبع: https://learn.microsoft.com/en-us/training/modules/extend-azure-devops</div>
|
||
</li>
|
||
<li>
|
||
<strong>Azure DevOps UI Library</strong>
|
||
"React Components & Design System"
|
||
<div class="ref-source">منبع: https://developer.microsoft.com/en-us/azure-devops/components</div>
|
||
</li>
|
||
<li>
|
||
<strong>GitHub: azure-devops-extension-sample</strong>
|
||
"Official Sample Repository"
|
||
<div class="ref-source">منبع: https://github.com/microsoft/azure-devops-extension-sample</div>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="section">
|
||
<div class="section-header">
|
||
<div class="section-number">۷</div>
|
||
<div class="section-title">
|
||
<h3>جمعبندی و نقشه راه اجرایی</h3>
|
||
<div class="subtitle">Executive Summary & Roadmap</div>
|
||
</div>
|
||
</div>
|
||
<div class="section-content">
|
||
<p>توسعه افزونه Azure DevOps فرصتی عالی برای خودکارسازی فرآیندها و شخصیسازی محیط کار تیمی است. با رعایت اصول مطرح شده در این سند، میتوانید افزونههایی پایدار، امن و مقیاسپذیر ایجاد نمایید.</p>
|
||
<table class="styled-table">
|
||
<thead>
|
||
<tr>
|
||
<th>فاز اجرایی</th>
|
||
<th>خروجی کلیدی</th>
|
||
<th>زمان تخمینی</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td>راهاندازی محیط</td>
|
||
<td>پروژه اولیه + Hello World</td>
|
||
<td style="color: var(--success); font-weight: 600;">۱-۲ روز</td>
|
||
</tr>
|
||
<tr>
|
||
<td>پیادهسازی هسته</td>
|
||
<td>ارتباط با API + UI پایه</td>
|
||
<td style="color: var(--warning); font-weight: 600;">۱-۲ هفته</td>
|
||
</tr>
|
||
<tr>
|
||
<td>تست و بهینهسازی</td>
|
||
<td>رفع باگ + بهبود UX</td>
|
||
<td style="color: var(--warning); font-weight: 600;">۱ هفته</td>
|
||
</tr>
|
||
<tr>
|
||
<td>انتشار اولیه</td>
|
||
<td>نسخه بتا داخلی</td>
|
||
<td style="color: var(--success); font-weight: 600;">۲-۳ روز</td>
|
||
</tr>
|
||
<tr class="highlight-row">
|
||
<td><strong>انتشار نهایی</strong></td>
|
||
<td><strong>نسخه پایدار Marketplace</strong></td>
|
||
<td style="color: var(--success); font-weight: 700; font-size: 15px;">بسته به پیچیدگی</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<div class="conclusion-box">
|
||
<h3>🎯 گام بعدی</h3>
|
||
<p>پیشنهاد میشود ابتدا با پیادهسازی یک افزونه ساده (مانند نمایش اطلاعات تکمیلی Work Item) شروع کرده و پس از تسلط بر چرخه توسعه، به سراغ سناریوهای پیچیدهتر بروید.</p>
|
||
<div class="highlight">
|
||
<strong>💎 ارزش افزوده:</strong><br>
|
||
خودکارسازی فرآیندها + یکپارچگی ابزارها + افزایش بهرهوری تیم + کاهش خطاهای انسانی
|
||
</div>
|
||
</div>
|
||
<div class="info-box">
|
||
<strong>📞 پشتیبانی فنی:</strong> در صورت مواجهه با چالشهای خاص در پیادهسازی، میتوانید از تالارهای گفتگوی Microsoft Developer Community یا Stack Overflow با تگ azure-devops-extension استفاده نمایید.
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="page-info">
|
||
این مستند محرمانه بوده و صرفاً جهت استفاده تیم فنی و معماری تهیه شده است. هرگونه بازنشر بدون اجازه کتبی ممنوع است.
|
||
</div>
|
||
</div>
|
||
<footer class="document-footer">
|
||
<div class="footer-brand">واحد معماری نرمافزار | Azure DevOps Practice</div>
|
||
<div class="footer-divider"></div>
|
||
<div>تاریخ تهیه: آبان ۱۴۰۵ | نسخه: ۱.۰ | طبقهبندی: فنی</div>
|
||
</footer>
|
||
</div>
|
||
</body>
|
||
</html> |