Initial Commit ...
This commit is contained in:
+10
@@ -0,0 +1,10 @@
|
|||||||
|
#
|
||||||
|
xUi/*
|
||||||
|
xApi/*
|
||||||
|
|
||||||
|
#
|
||||||
|
Build
|
||||||
|
|
||||||
|
#
|
||||||
|
node_modules
|
||||||
|
package-lock.json
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
[submodule "xUi"]
|
||||||
|
path = xUi
|
||||||
|
url = https://git.saherelm.ir/saherelm/xRPKRMAUi.git
|
||||||
|
[submodule "xApi"]
|
||||||
|
path = xApi
|
||||||
|
url = https://git.saherelm.ir/saherelm/xRPKRMAApi.git
|
||||||
Vendored
+35
@@ -0,0 +1,35 @@
|
|||||||
|
{
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
// Use IntelliSense to find out which attributes exist for C# debugging
|
||||||
|
// Use hover for the description of the existing attributes
|
||||||
|
// For further information visit https://github.com/dotnet/vscode-csharp/blob/main/debugger-launchjson.md.
|
||||||
|
"name": ".NET Core Launch (web)",
|
||||||
|
"type": "coreclr",
|
||||||
|
"request": "launch",
|
||||||
|
"preLaunchTask": "build",
|
||||||
|
// If you have changed target frameworks, make sure to update the program path.
|
||||||
|
"program": "${workspaceFolder}/xApi/bin/Debug/net8.0/xApi.dll",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}/xApi",
|
||||||
|
"stopAtEntry": false,
|
||||||
|
// Enable launching a web browser when ASP.NET Core starts. For more information: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser
|
||||||
|
"serverReadyAction": {
|
||||||
|
"action": "openExternally",
|
||||||
|
"pattern": "\\bNow listening on:\\s+(https?://\\S+)"
|
||||||
|
},
|
||||||
|
"env": {
|
||||||
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
|
},
|
||||||
|
"sourceFileMap": {
|
||||||
|
"/Views": "${workspaceFolder}/Views"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": ".NET Core Attach",
|
||||||
|
"type": "coreclr",
|
||||||
|
"request": "attach"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
Vendored
+41
@@ -0,0 +1,41 @@
|
|||||||
|
{
|
||||||
|
"version": "2.0.0",
|
||||||
|
"tasks": [
|
||||||
|
{
|
||||||
|
"label": "build",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"build",
|
||||||
|
"${workspaceFolder}/xApi/xApi.csproj",
|
||||||
|
"/property:GenerateFullPaths=true",
|
||||||
|
"/consoleloggerparameters:NoSummary;ForceNoAlign"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "publish",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"publish",
|
||||||
|
"${workspaceFolder}/xApi/xApi.csproj",
|
||||||
|
"/property:GenerateFullPaths=true",
|
||||||
|
"/consoleloggerparameters:NoSummary;ForceNoAlign"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "watch",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"watch",
|
||||||
|
"run",
|
||||||
|
"--project",
|
||||||
|
"${workspaceFolder}/xApi/xApi.csproj"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
param(
|
||||||
|
[Parameter(Position = 0)]
|
||||||
|
[string]$Path
|
||||||
|
)
|
||||||
|
|
||||||
|
$timestamp = Get-Date -Format 'yyyyMMdd_HHmmss'
|
||||||
|
$outputFile = ".\Documents\GeneratedContext\xDashboard-$timestamp.txt"
|
||||||
|
|
||||||
|
if ([string]::IsNullOrWhiteSpace($Path)) {
|
||||||
|
# If no path is provided, use current path
|
||||||
|
$searchPath = (Get-Location).Path
|
||||||
|
$outputFile = ".\Documents\GeneratedContext\xDashboard-$timestamp.txt"
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (-not (Test-Path -LiteralPath $Path -PathType Container)) {
|
||||||
|
throw "Path '$Path' is not a directory."
|
||||||
|
}
|
||||||
|
|
||||||
|
# Resolve path
|
||||||
|
$searchPath = (Resolve-Path -LiteralPath $Path).Path
|
||||||
|
|
||||||
|
# Get last folder of the path
|
||||||
|
$lastFolder = Split-Path -Path $searchPath -Leaf
|
||||||
|
|
||||||
|
# Make folder name safe for file name
|
||||||
|
$safeLastFolder = $lastFolder -replace '[\\/:*?"<>|]', '_'
|
||||||
|
|
||||||
|
$outputFile = ".\Documents\GeneratedContext\xDashboard-$safeLastFolder-$timestamp.txt"
|
||||||
|
}
|
||||||
|
|
||||||
|
Get-ChildItem -LiteralPath $searchPath -Recurse -File |
|
||||||
|
Where-Object {
|
||||||
|
$_.Name -eq 'Dockerfile' -or
|
||||||
|
$_.Name -eq 'docker-compose.yaml' -or
|
||||||
|
$_.Extension -eq '.cs' -or
|
||||||
|
$_.Extension -eq '.ts' -or
|
||||||
|
$_.Extension -eq '.html' -or
|
||||||
|
$_.Extension -eq '.scss'
|
||||||
|
} |
|
||||||
|
Where-Object {
|
||||||
|
$_.FullName -notmatch '[\\/](bin|obj|dist|node_modules)([\\/]|$)'
|
||||||
|
} |
|
||||||
|
ForEach-Object {
|
||||||
|
"`n### FILE: $($_.FullName)`n"
|
||||||
|
Get-Content -LiteralPath $_.FullName
|
||||||
|
} |
|
||||||
|
Out-File -FilePath $outputFile -Encoding utf8
|
||||||
|
|
||||||
|
Write-Host "Context generated: $outputFile"
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
RpkRma:
|
||||||
|
------------------------------------------------------
|
||||||
|
6zvwbdviuswlets7ovugq7nningtx4v6gqll7qkyqhnn75nrxh3q
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
"authenticatedUser": {
|
||||||
|
"id": "607b3deb-58d2-46d5-86f4-6b0072129c01",
|
||||||
|
"descriptor": "System.Security.Principal.WindowsIdentity;S-1-5-21-1223462063-33584541-52895486-4120",
|
||||||
|
"subjectDescriptor": "win.Uy0xLTUtMjEtMTIyMzQ2MjA2My0zMzU4NDU0MS01Mjg5NTQ4Ni00MTIw",
|
||||||
|
"providerDisplayName": "KhazaeeAsl Hadi",
|
||||||
|
"isActive": true,
|
||||||
|
"properties": {
|
||||||
|
"Account": {
|
||||||
|
"$type": "System.String",
|
||||||
|
"$value": "HKhazaeeAsl"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"resourceVersion": 2,
|
||||||
|
"metaTypeId": 255
|
||||||
|
},
|
||||||
|
"authorizedUser": {
|
||||||
|
"id": "607b3deb-58d2-46d5-86f4-6b0072129c01",
|
||||||
|
"descriptor": "System.Security.Principal.WindowsIdentity;S-1-5-21-1223462063-33584541-52895486-4120",
|
||||||
|
"subjectDescriptor": "win.Uy0xLTUtMjEtMTIyMzQ2MjA2My0zMzU4NDU0MS01Mjg5NTQ4Ni00MTIw",
|
||||||
|
"providerDisplayName": "KhazaeeAsl Hadi",
|
||||||
|
"isActive": true,
|
||||||
|
"properties": {
|
||||||
|
"Account": {
|
||||||
|
"$type": "System.String",
|
||||||
|
"$value": "HKhazaeeAsl"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"resourceVersion": 2,
|
||||||
|
"metaTypeId": 255
|
||||||
|
},
|
||||||
|
"instanceId": "13cbf44f-dcbf-4ae6-b5b6-ac79d51c2b35",
|
||||||
|
"deploymentId": "266ff294-802f-4b47-a2d9-358dde3364a0",
|
||||||
|
"deploymentType": "onPremises",
|
||||||
|
"locationServiceData": {
|
||||||
|
"clientCacheTimeToLive": 86400,
|
||||||
|
"defaultAccessMappingMoniker": "PublicAccessMapping",
|
||||||
|
"lastChangeId": 139265,
|
||||||
|
"lastChangeId64": 139265
|
||||||
|
},
|
||||||
|
"webApplicationRelativeDirectory": "RPKavoshDevOps/"
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
curl.exe --negotiate -u : "http://192.168.10.22:8080/tfs/RPKavoshDevOps/_odata/v2.0/Users?%%24top=1"
|
||||||
|
|
||||||
|
#
|
||||||
|
# Retrieve Connected User ...
|
||||||
|
http://192.168.10.22:8080/tfs/RPKavoshDevOps/_apis/connectionData
|
||||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,5 @@
|
|||||||
|
PAT tfx login --service-url https://dev.azure.com/YOUR_ORG --token YOUR_PAT_TOKEN
|
||||||
|
|
||||||
|
export AZURE_DEVOPS_EXT_PAT=YOUR_PAT_TOKEN
|
||||||
|
set AZURE_DEVOPS_EXT_PAT=YOUR_PAT_TOKEN
|
||||||
|
|
||||||
@@ -0,0 +1,897 @@
|
|||||||
|
<!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 | Azure DevOps Server و خدمات Azure</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: 1050px;
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
.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: 20px;
|
||||||
|
font-weight: 800;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
color: var(--accent);
|
||||||
|
line-height: 1.3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.stat-card .stat-label {
|
||||||
|
font-size: 12px;
|
||||||
|
opacity: 0.9;
|
||||||
|
}
|
||||||
|
|
||||||
|
.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; }
|
||||||
|
.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>شماره مستند: API-1405-002</div>
|
||||||
|
<div>نسخه: ۱.۰</div>
|
||||||
|
<div>تاریخ تهیه: آذر ۱۴۰۵</div>
|
||||||
|
<div>طبقهبندی: فنی</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="document-title">
|
||||||
|
<span class="label">API REFERENCE GUIDE</span>
|
||||||
|
<h1>راهنمای جامع اندپوینتهای Azure</h1>
|
||||||
|
<h2>Azure DevOps Server (TFS) و سرویسهای ابری Azure</h2>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<div class="document-body">
|
||||||
|
|
||||||
|
<div class="intro-text">
|
||||||
|
<strong>مخاطب فنی محترم،</strong><br>
|
||||||
|
این مستند بهعنوان مرجع یکپارچهای از آدرسهای اندپوینت (Endpoint) سرویسهای Azure طراحی شده است. تمرکز اصلی بر نمونهٔ عملیاتی <span style="direction:ltr; display:inline-block; font-family:monospace; background:#edf2f7; padding:2px 6px; border-radius:4px;">http://192.168.10.22:8080/tfs/RPKavoshDevOps/_apis</span> بهعنوان پایهٔ Azure DevOps Server (TFS) بوده و در ادامه، اندپوینتهای کلیدی سایر خدمات Azure (Resource Manager، Storage، Key Vault، Monitor، Virtual Machines و Virtual Network) تشریح میشود.
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- بخش ۱: خلاصه اجرایی -->
|
||||||
|
<div class="section">
|
||||||
|
<div class="section-header">
|
||||||
|
<div class="section-number">۱</div>
|
||||||
|
<div class="section-title">
|
||||||
|
<h3>خلاصه اجرایی</h3>
|
||||||
|
<div class="subtitle">Executive Summary</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section-content">
|
||||||
|
<p>سرویسهای Azure از طریق REST API مبتنی بر HTTP قابل دسترسی هستند. Azure DevOps Server (که قبلاً با نام TFS شناخته میشد) در آدرس <span style="direction:ltr; font-family:monospace;">http://192.168.10.22:8080/tfs/RPKavoshDevOps/_apis</span> میزبانی شده و مجموعهٔ <span style="direction:ltr; font-family:monospace;">RPKavoshDevOps</span> را ارائه میدهد. این مستند، ساختار URL، نواحی اصلی API و نمونههایی از اندپوینتهای پرکاربرد را بهصورت دستهبندیشده ارائه میکند تا تیمهای توسعه و عملیات بتوانند یکپارچهسازیهای خود را با سرعت و دقت پیادهسازی کنند.</p>
|
||||||
|
|
||||||
|
<div class="stats-grid">
|
||||||
|
<div class="stat-card">
|
||||||
|
<div class="stat-value" style="font-size:16px;">Azure DevOps Server</div>
|
||||||
|
<div class="stat-label">پایهٔ TFS با مجموعهٔ RPKavoshDevOps</div>
|
||||||
|
</div>
|
||||||
|
<div class="stat-card">
|
||||||
|
<div class="stat-value" style="font-size:16px;">Azure ARM</div>
|
||||||
|
<div class="stat-label">مدیریت منابع ابری</div>
|
||||||
|
</div>
|
||||||
|
<div class="stat-card">
|
||||||
|
<div class="stat-value" style="font-size:16px;">Storage / Key Vault</div>
|
||||||
|
<div class="stat-label">داده و امنیت</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="highlight-box">
|
||||||
|
<strong>نکته کلیدی:</strong> تمامی درخواستها باید شامل پارامتر <span style="direction:ltr; font-family:monospace;">api-version</span> باشند. برای نمونهٔ TFS فوق، الگوی کامل بهصورت <span style="direction:ltr; font-family:monospace;">http://192.168.10.22:8080/tfs/RPKavoshDevOps/_apis/{area}/{resource}?api-version={version}</span> است.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- بخش ۲: ساختار URL و احراز هویت -->
|
||||||
|
<div class="section">
|
||||||
|
<div class="section-header">
|
||||||
|
<div class="section-number">۲</div>
|
||||||
|
<div class="section-title">
|
||||||
|
<h3>ساختار URL و احراز هویت</h3>
|
||||||
|
<div class="subtitle">URL Structure & Authentication</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section-content">
|
||||||
|
<p>الگوی استاندارد Azure DevOps Server بهشکل زیر است:</p>
|
||||||
|
<div style="background:#edf2f7; padding:15px; border-radius:8px; direction:ltr; font-family:monospace; font-size:13px; margin:15px 0;">
|
||||||
|
http://{server}:{port}/{collection}/_apis/{area}/{resource}?api-version={version}
|
||||||
|
</div>
|
||||||
|
<p>در آدرس نمونهٔ شما:</p>
|
||||||
|
<ul style="padding-right:20px; margin:10px 0;">
|
||||||
|
<li><strong>server:port</strong> = <span style="direction:ltr; font-family:monospace;">192.168.10.22:8080</span></li>
|
||||||
|
<li><strong>collection</strong> = <span style="direction:ltr; font-family:monospace;">tfs/RPKavoshDevOps</span></li>
|
||||||
|
<li><strong>_apis</strong> = مسیر پایهٔ REST API</li>
|
||||||
|
</ul>
|
||||||
|
<div class="info-box">
|
||||||
|
<strong>احراز هویت:</strong> روشهای رایج شامل <strong>PAT (Personal Access Token)</strong> با هدر <span style="direction:ltr; font-family:monospace;">Authorization: Basic</span>، <strong>OAuth 2.0</strong> و <strong>Microsoft Entra ID</strong> است. برای محیط عملیاتی، Entra ID توصیه میشود.[reference:0]
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- بخش ۳: اندپوینتهای Azure DevOps -->
|
||||||
|
<div class="section">
|
||||||
|
<div class="section-header">
|
||||||
|
<div class="section-number">۳</div>
|
||||||
|
<div class="section-title">
|
||||||
|
<h3>اندپوینتهای Azure DevOps (TFS)</h3>
|
||||||
|
<div class="subtitle">Azure DevOps REST API Areas</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section-content">
|
||||||
|
<p>Azure DevOps API در نواحی (Area) مختلفی سازماندهی شده است. جدول زیر مسیر پایهٔ هر ناحیه را بر اساس آدرس نمونهٔ <span style="direction:ltr; font-family:monospace;">http://192.168.10.22:8080/tfs/RPKavoshDevOps/_apis</span> نشان میدهد:</p>
|
||||||
|
|
||||||
|
<table class="styled-table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>ناحیه (Area)</th>
|
||||||
|
<th>مسیر پایه (Base Path)</th>
|
||||||
|
<th>کاربرد اصلی</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td><strong>core</strong></td>
|
||||||
|
<td style="direction:ltr; font-family:monospace; font-size:12px;">/tfs/RPKavoshDevOps/_apis/core</td>
|
||||||
|
<td>پروژهها، تیمها، فرآیندها و عملیات سطح سازمان</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><strong>git</strong></td>
|
||||||
|
<td style="direction:ltr; font-family:monospace; font-size:12px;">/tfs/RPKavoshDevOps/_apis/git</td>
|
||||||
|
<td>مخازن کد، شاخهها، Pull Requestها و کامیتها</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><strong>build</strong></td>
|
||||||
|
<td style="direction:ltr; font-family:monospace; font-size:12px;">/tfs/RPKavoshDevOps/_apis/build</td>
|
||||||
|
<td>تعاریف Build، اجراها و منابع Build</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><strong>pipelines</strong></td>
|
||||||
|
<td style="direction:ltr; font-family:monospace; font-size:12px;">/tfs/RPKavoshDevOps/_apis/pipelines</td>
|
||||||
|
<td>تعاریف Pipeline و اجرای آنها</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><strong>release</strong></td>
|
||||||
|
<td style="direction:ltr; font-family:monospace; font-size:12px;">/tfs/RPKavoshDevOps/_apis/release</td>
|
||||||
|
<td>تعاریف Release، استقرارها و تأییدها</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><strong>wit</strong></td>
|
||||||
|
<td style="direction:ltr; font-family:monospace; font-size:12px;">/tfs/RPKavoshDevOps/_apis/wit</td>
|
||||||
|
<td>Work Itemها، کوئریها و انواع Work Item</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><strong>work</strong></td>
|
||||||
|
<td style="direction:ltr; font-family:monospace; font-size:12px;">/tfs/RPKavoshDevOps/_apis/work</td>
|
||||||
|
<td>Boardها، Backlogها، Sprintها و تنظیمات تیم</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><strong>testPlan</strong></td>
|
||||||
|
<td style="direction:ltr; font-family:monospace; font-size:12px;">/tfs/RPKavoshDevOps/_apis/testplan</td>
|
||||||
|
<td>Test Planها، Suiteها و Caseها</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><strong>testResults</strong></td>
|
||||||
|
<td style="direction:ltr; font-family:monospace; font-size:12px;">/tfs/RPKavoshDevOps/_apis/testResults</td>
|
||||||
|
<td>اجرای تستها و نتایج</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><strong>graph</strong></td>
|
||||||
|
<td style="direction:ltr; font-family:monospace; font-size:12px;">/tfs/RPKavoshDevOps/_apis/graph</td>
|
||||||
|
<td>کاربران، گروهها و عضویتها</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><strong>policy</strong></td>
|
||||||
|
<td style="direction:ltr; font-family:monospace; font-size:12px;">/tfs/RPKavoshDevOps/_apis/policy</td>
|
||||||
|
<td>خطمشیهای شاخه و تنظیمات Policy</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><strong>hooks</strong></td>
|
||||||
|
<td style="direction:ltr; font-family:monospace; font-size:12px;">/tfs/RPKavoshDevOps/_apis/hooks</td>
|
||||||
|
<td>Service Hookها و اشتراکها</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<p class="no-indent">نمونهٔ یک اندپوینت کامل برای دریافت لیست پروژهها:</p>
|
||||||
|
<div style="background:#edf2f7; padding:15px; border-radius:8px; direction:ltr; font-family:monospace; font-size:12px; margin:10px 0; overflow-x:auto;">
|
||||||
|
GET http://192.168.10.22:8080/tfs/RPKavoshDevOps/_apis/projects?api-version=7.2
|
||||||
|
</div>
|
||||||
|
<p>برای دریافت Work Itemها در یک پروژهٔ فرضی (مثلاً <span style="direction:ltr; font-family:monospace;">MyProject</span>):</p>
|
||||||
|
<div style="background:#edf2f7; padding:15px; border-radius:8px; direction:ltr; font-family:monospace; font-size:12px; margin:10px 0; overflow-x:auto;">
|
||||||
|
GET http://192.168.10.22:8080/tfs/RPKavoshDevOps/MyProject/_apis/wit/workitems?api-version=7.2
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="success-box">
|
||||||
|
<strong>✅ نکتهٔ نسخهبندی:</strong> برای Azure DevOps Server، از نسخهٔ دقیق موجود در مخزن <span style="direction:ltr; font-family:monospace;">vsts-rest-api-specs</span> استفاده کنید. اگر نسخهٔ سرور شما 7.0 یا 7.1 است، پوشهٔ مربوطه (مانند <span style="direction:ltr; font-family:monospace;">azure-devops-server-7.0</span>) مرجع اصلی است.[reference:1]
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- بخش ۴: اندپوینتهای Azure Resource Manager -->
|
||||||
|
<div class="section">
|
||||||
|
<div class="section-header">
|
||||||
|
<div class="section-number">۴</div>
|
||||||
|
<div class="section-title">
|
||||||
|
<h3>اندپوینتهای Azure Resource Manager (ARM)</h3>
|
||||||
|
<div class="subtitle">Management Plane Endpoints</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section-content">
|
||||||
|
<p>Azure Resource Manager (ARM) نقطهٔ ورود اصلی برای مدیریت منابع ابری است. پایهٔ آدرس آن <span style="direction:ltr; font-family:monospace;">https://management.azure.com</span> بوده و ساختار آن بر اساس دامنه (Scope) تعریف میشود:[reference:2]</p>
|
||||||
|
|
||||||
|
<table class="styled-table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>نوع دامنه</th>
|
||||||
|
<th>الگوی مسیر</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>Management Group</td>
|
||||||
|
<td style="direction:ltr; font-family:monospace; font-size:12px;">/providers/Microsoft.Management/managementGroups/{managementGroupId}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Subscription</td>
|
||||||
|
<td style="direction:ltr; font-family:monospace; font-size:12px;">/subscriptions/{subscriptionId}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Resource Group</td>
|
||||||
|
<td style="direction:ltr; font-family:monospace; font-size:12px;">/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Resource</td>
|
||||||
|
<td style="direction:ltr; font-family:monospace; font-size:12px;">/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<p class="no-indent">نمونهٔ لیست کردن منابع یک Resource Group:</p>
|
||||||
|
<div style="background:#edf2f7; padding:15px; border-radius:8px; direction:ltr; font-family:monospace; font-size:12px; margin:10px 0; overflow-x:auto;">
|
||||||
|
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/resources?api-version=2021-04-01
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- بخش ۵: اندپوینتهای Storage -->
|
||||||
|
<div class="section">
|
||||||
|
<div class="section-header">
|
||||||
|
<div class="section-number">۵</div>
|
||||||
|
<div class="section-title">
|
||||||
|
<h3>اندپوینتهای Azure Storage</h3>
|
||||||
|
<div class="subtitle">Blob, File, Queue, Table, DFS</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section-content">
|
||||||
|
<p>هر حساب ذخیرهسازی (Storage Account) مجموعهای از اندپوینتهای اختصاصی برای سرویسهای مختلف دارد. الگوی کلی بهصورت <span style="direction:ltr; font-family:monospace;">https://{accountName}.{service}.core.windows.net</span> است:[reference:3]</p>
|
||||||
|
|
||||||
|
<table class="styled-table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>سرویس</th>
|
||||||
|
<th>الگوی اندپوینت</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>Blob Storage</td>
|
||||||
|
<td style="direction:ltr; font-family:monospace; font-size:12px;">https://{account}.blob.core.windows.net/</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>File Storage</td>
|
||||||
|
<td style="direction:ltr; font-family:monospace; font-size:12px;">https://{account}.file.core.windows.net/</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Queue Storage</td>
|
||||||
|
<td style="direction:ltr; font-family:monospace; font-size:12px;">https://{account}.queue.core.windows.net/</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Table Storage</td>
|
||||||
|
<td style="direction:ltr; font-family:monospace; font-size:12px;">https://{account}.table.core.windows.net/</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Data Lake Storage Gen2 (DFS)</td>
|
||||||
|
<td style="direction:ltr; font-family:monospace; font-size:12px;">https://{account}.dfs.core.windows.net/</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Static Website (Web)</td>
|
||||||
|
<td style="direction:ltr; font-family:monospace; font-size:12px;">https://{account}.web.core.windows.net/</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div class="info-box">
|
||||||
|
<strong>💡 مدیریت Storage از طریق ARM:</strong> برای عملیات مدیریتی (ساخت، حذف، بهروزرسانی حساب) از اندپوینت <span style="direction:ltr; font-family:monospace;">https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{rg}/providers/Microsoft.Storage/storageAccounts/{accountName}</span> استفاده کنید.[reference:4]
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- بخش ۶: اندپوینتهای Key Vault -->
|
||||||
|
<div class="section">
|
||||||
|
<div class="section-header">
|
||||||
|
<div class="section-number">۶</div>
|
||||||
|
<div class="section-title">
|
||||||
|
<h3>اندپوینتهای Azure Key Vault</h3>
|
||||||
|
<div class="subtitle">Secrets, Keys & Certificates</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section-content">
|
||||||
|
<p>Key Vault برای ذخیرهٔ امن کلیدها، رمزها و گواهیها استفاده میشود. اندپوینت دادهٔ آن معمولاً بهشکل زیر است:</p>
|
||||||
|
<div style="background:#edf2f7; padding:15px; border-radius:8px; direction:ltr; font-family:monospace; font-size:12px; margin:10px 0;">
|
||||||
|
https://{vaultName}.vault.azure.net/
|
||||||
|
</div>
|
||||||
|
<p>عملیات مدیریتی (Control Plane) از طریق ARM انجام میشود:</p>
|
||||||
|
<div style="background:#edf2f7; padding:15px; border-radius:8px; direction:ltr; font-family:monospace; font-size:12px; margin:10px 0;">
|
||||||
|
https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{rg}/providers/Microsoft.KeyVault/vaults/{vaultName}
|
||||||
|
</div>
|
||||||
|
<p>نمونههایی از عملیات رایج:</p>
|
||||||
|
<ul style="padding-right:20px;">
|
||||||
|
<li>دریافت یک Secret: <span style="direction:ltr; font-family:monospace;">GET https://{vault}.vault.azure.net/secrets/{secretName}?api-version=7.2</span></li>
|
||||||
|
<li>لیست Keyها: <span style="direction:ltr; font-family:monospace;">GET https://{vault}.vault.azure.net/keys?api-version=7.2</span></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- بخش ۷: اندپوینتهای Azure Monitor -->
|
||||||
|
<div class="section">
|
||||||
|
<div class="section-header">
|
||||||
|
<div class="section-number">۷</div>
|
||||||
|
<div class="section-title">
|
||||||
|
<h3>اندپوینتهای Azure Monitor</h3>
|
||||||
|
<div class="subtitle">Metrics, Logs & Activity Log</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section-content">
|
||||||
|
<p>Azure Monitor دارای چند دستهٔ اندپوینت است. بخش ARM (مدیریت تنظیمات و Activity Log) زیر <span style="direction:ltr; font-family:monospace;">https://management.azure.com</span> قرار دارد:[reference:5]</p>
|
||||||
|
<ul style="padding-right:20px;">
|
||||||
|
<li><strong>Activity Log:</strong> <span style="direction:ltr; font-family:monospace;">/subscriptions/{subscriptionId}/providers/Microsoft.Insights/eventtypes/management/values</span></li>
|
||||||
|
<li><strong>Metric Definitions:</strong> <span style="direction:ltr; font-family:monospace;">/subscriptions/{subscriptionId}/resourceGroups/{rg}/providers/{provider}/{type}/{name}/providers/Microsoft.Insights/metricDefinitions</span></li>
|
||||||
|
</ul>
|
||||||
|
<p>برای <strong>Log Analytics</strong>، اندپوینت جداگانهای وجود دارد:</p>
|
||||||
|
<div style="background:#edf2f7; padding:15px; border-radius:8px; direction:ltr; font-family:monospace; font-size:12px; margin:10px 0;">
|
||||||
|
https://api.loganalytics.io/v1/workspaces/{workspaceId}/query
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- بخش ۸: اندپوینتهای Virtual Machines و Virtual Network -->
|
||||||
|
<div class="section">
|
||||||
|
<div class="section-header">
|
||||||
|
<div class="section-number">۸</div>
|
||||||
|
<div class="section-title">
|
||||||
|
<h3>اندپوینتهای Virtual Machines و Virtual Network</h3>
|
||||||
|
<div class="subtitle">Compute & Networking</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section-content">
|
||||||
|
<h4 style="color:var(--primary); margin-bottom:10px;">ماشینهای مجازی (Microsoft.Compute)</h4>
|
||||||
|
<p>مدیریت VMها از طریق ARM انجام میشود:</p>
|
||||||
|
<div style="background:#edf2f7; padding:15px; border-radius:8px; direction:ltr; font-family:monospace; font-size:12px; margin:10px 0; overflow-x:auto;">
|
||||||
|
https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{rg}/providers/Microsoft.Compute/virtualMachines
|
||||||
|
</div>
|
||||||
|
<p>نمونهٔ لیست VMهای یک Resource Group:[reference:6]</p>
|
||||||
|
<div style="background:#edf2f7; padding:15px; border-radius:8px; direction:ltr; font-family:monospace; font-size:12px; margin:10px 0;">
|
||||||
|
GET https://management.azure.com/subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.Compute/virtualMachines?api-version=2024-07-01
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h4 style="color:var(--primary); margin-top:20px; margin-bottom:10px;">شبکههای مجازی (Microsoft.Network)</h4>
|
||||||
|
<p>اندپوینت Virtual Network نیز زیر ARM قرار دارد:[reference:7]</p>
|
||||||
|
<div style="background:#edf2f7; padding:15px; border-radius:8px; direction:ltr; font-family:monospace; font-size:12px; margin:10px 0; overflow-x:auto;">
|
||||||
|
https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{rg}/providers/Microsoft.Network/virtualNetworks
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- بخش ۹: جمعبندی -->
|
||||||
|
<div class="section">
|
||||||
|
<div class="section-header">
|
||||||
|
<div class="section-number">۹</div>
|
||||||
|
<div class="section-title">
|
||||||
|
<h3>جمعبندی و الگوی نهایی</h3>
|
||||||
|
<div class="subtitle">Summary & Pattern Reference</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section-content">
|
||||||
|
<p>جدول زیر خلاصهای از اندپوینتهای کلیدی شرحدادهشده را ارائه میدهد:</p>
|
||||||
|
|
||||||
|
<table class="styled-table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>سرویس</th>
|
||||||
|
<th>پایهٔ آدرس (Base URL)</th>
|
||||||
|
<th>نوع</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr class="highlight-row">
|
||||||
|
<td><strong>Azure DevOps Server (TFS)</strong></td>
|
||||||
|
<td style="direction:ltr; font-family:monospace; font-size:12px;">http://192.168.10.22:8080/tfs/RPKavoshDevOps/_apis</td>
|
||||||
|
<td>On-Premises</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Azure Resource Manager</td>
|
||||||
|
<td style="direction:ltr; font-family:monospace; font-size:12px;">https://management.azure.com</td>
|
||||||
|
<td>Cloud</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Azure Storage (Blob/File/Queue/Table)</td>
|
||||||
|
<td style="direction:ltr; font-family:monospace; font-size:12px;">https://{account}.{service}.core.windows.net</td>
|
||||||
|
<td>Cloud</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Azure Key Vault</td>
|
||||||
|
<td style="direction:ltr; font-family:monospace; font-size:12px;">https://{vault}.vault.azure.net</td>
|
||||||
|
<td>Cloud</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Azure Monitor (Log Analytics)</td>
|
||||||
|
<td style="direction:ltr; font-family:monospace; font-size:12px;">https://api.loganalytics.io</td>
|
||||||
|
<td>Cloud</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Azure VM / VNet</td>
|
||||||
|
<td style="direction:ltr; font-family:monospace; font-size:12px;">https://management.azure.com/.../Microsoft.Compute | Microsoft.Network</td>
|
||||||
|
<td>Cloud (ARM)</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div class="conclusion-box">
|
||||||
|
<h3>🎯 الگوی نهایی</h3>
|
||||||
|
<p>برای هر درخواست، سه مؤلفه را کنار هم قرار دهید:</p>
|
||||||
|
<div class="highlight" style="direction:ltr; font-family:monospace; font-size:13px;">
|
||||||
|
{BaseURL}/{scope}/_apis/{area}/{resource}?api-version={version}
|
||||||
|
</div>
|
||||||
|
<p style="margin-top:10px;">مثال برای TFS شما: <span style="direction:ltr; font-family:monospace;">http://192.168.10.22:8080/tfs/RPKavoshDevOps/_apis/wit/workitems?api-version=7.2</span></p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="info-box">
|
||||||
|
<strong>📚 منابع رسمی:</strong> برای مشاهدهٔ لیست کامل و بهروز اندپوینتها به مخزن <span style="direction:ltr; font-family:monospace;">MicrosoftDocs/vsts-rest-api-specs</span> و مستندات <span style="direction:ltr; font-family:monospace;">learn.microsoft.com/rest/api/azure/devops</span> مراجعه کنید.[reference:8]
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- منابع -->
|
||||||
|
<div class="section">
|
||||||
|
<div class="section-header">
|
||||||
|
<div class="section-number">۱۰</div>
|
||||||
|
<div class="section-title">
|
||||||
|
<h3>منابع و مراجع</h3>
|
||||||
|
<div class="subtitle">References</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section-content">
|
||||||
|
<ul class="reference-list">
|
||||||
|
<li>
|
||||||
|
<strong>Microsoft Learn — Get started with Azure DevOps REST APIs</strong>
|
||||||
|
ساختار URL و نسخهبندی Azure DevOps Server.
|
||||||
|
<div class="ref-source">https://learn.microsoft.com/azure/devops/integrate/how-to/call-rest-api</div>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<strong>GitHub — vsts-rest-api-specs (MicrosoftDocs)</strong>
|
||||||
|
مخزن رسمی OpenAPI/Swagger برای نواحی مختلف Azure DevOps.
|
||||||
|
<div class="ref-source">https://github.com/MicrosoftDocs/vsts-rest-api-specs</div>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<strong>Azure Resource Manager REST — Manage resources</strong>
|
||||||
|
دامنهها و الگوی مسیر ARM.
|
||||||
|
<div class="ref-source">https://learn.microsoft.com/azure/azure-resource-manager/management/manage-resources-rest</div>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<strong>Azure Storage REST API Reference</strong>
|
||||||
|
اندپوینتهای Blob، File، Queue، Table و DFS.
|
||||||
|
<div class="ref-source">https://learn.microsoft.com/rest/api/storageservices/</div>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<strong>Azure Monitor REST API Index</strong>
|
||||||
|
اندپوینتهای ARM و Log Analytics.
|
||||||
|
<div class="ref-source">https://learn.microsoft.com/azure/azure-monitor/essentials/rest-api-walkthrough</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="page-info">
|
||||||
|
این مستند فنی بوده و برای استفادهٔ تیمهای توسعه و عملیات تهیه شده است. آدرسهای ذکرشده نمونههایی از الگوهای استاندارد هستند و ممکن است بر اساس نسخهٔ سرویس و تنظیمات محیط تغییر کنند.
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<footer class="document-footer">
|
||||||
|
<div class="footer-brand">طراحی و توسعه: هادی خزاعی اصل</div>
|
||||||
|
<div class="footer-divider"></div>
|
||||||
|
<div>تاریخ تهیه: آذر ۱۴۰۵ | نسخه: ۱.۰ | طبقهبندی: فنی</div>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,829 @@
|
|||||||
|
<!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>
|
||||||
@@ -0,0 +1,798 @@
|
|||||||
|
<!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 | HTML/CSS/JS</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;
|
||||||
|
}
|
||||||
|
.code-block {
|
||||||
|
background: #1e1e1e;
|
||||||
|
color: #d4d4d4;
|
||||||
|
padding: 20px;
|
||||||
|
border-radius: 8px;
|
||||||
|
margin: 20px 0;
|
||||||
|
direction: ltr;
|
||||||
|
text-align: left;
|
||||||
|
font-family: 'Consolas', 'Courier New', monospace;
|
||||||
|
font-size: 13px;
|
||||||
|
line-height: 1.6;
|
||||||
|
overflow-x: auto;
|
||||||
|
border-right: 4px solid var(--accent);
|
||||||
|
}
|
||||||
|
.code-block .comment { color: #6a9955; }
|
||||||
|
.code-block .keyword { color: #569cd6; }
|
||||||
|
.code-block .string { color: #ce9178; }
|
||||||
|
.code-block .function { color: #dcdcaa; }
|
||||||
|
.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; }
|
||||||
|
.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-TUT-001</div>
|
||||||
|
<div>نسخه: ۱.۰</div>
|
||||||
|
<div>تاریخ تهیه: آبان ۱۴۰۵</div>
|
||||||
|
<div>طبقهبندی: آموزشی / فنی</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="document-title">
|
||||||
|
<span class="label">STEP-BY-STEP TUTORIAL</span>
|
||||||
|
<h1>توسعه افزونه Azure DevOps با HTML/CSS/JS</h1>
|
||||||
|
<h2>راهنمای عملیاتی ساخت اولین افزونه ساده بدون فریمورک</h2>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
<div class="document-body">
|
||||||
|
<div class="intro-text">
|
||||||
|
<strong>توسعهدهنده گرامی،</strong><br>
|
||||||
|
این مستند یک راهنمای کاملاً عملی و گامبهگام برای ایجاد اولین افزونه Azure DevOps با استفاده از تکنولوژیهای پایه وب (HTML, CSS, Vanilla JS) است. هدف این است که بدون درگیر شدن با پیچیدگیهای بیلد سیستمها، مفهوم اصلی توسعه افزونه را درک کرده و یک نمونه کارکردی بسازید.
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section">
|
||||||
|
<div class="section-header">
|
||||||
|
<div class="section-number">۱</div>
|
||||||
|
<div class="section-title">
|
||||||
|
<h3>آمادهسازی محیط و ابزارها</h3>
|
||||||
|
<div class="subtitle">Environment Setup & Prerequisites</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section-content">
|
||||||
|
<p>قبل از نوشتن هرگونه کدی، باید ابزارهای خط فرمان مایکروسافت را نصب کنید. این ابزارها وظیفه بستهبندی و ارتباط با Marketplace را بر عهده دارند.</p>
|
||||||
|
<div class="stats-grid">
|
||||||
|
<div class="stat-card">
|
||||||
|
<div class="stat-value">Node.js<br>v18+</div>
|
||||||
|
<div class="stat-label">پیشنیاز اجرای tfx-cli</div>
|
||||||
|
</div>
|
||||||
|
<div class="stat-card">
|
||||||
|
<div class="stat-value">tfx-cli<br>Global</div>
|
||||||
|
<div class="stat-label">ابزار رسمی بستهبندی</div>
|
||||||
|
</div>
|
||||||
|
<div class="stat-card">
|
||||||
|
<div class="stat-value">VS Code<br>Editor</div>
|
||||||
|
<div class="stat-label">ویرایشگر پیشنهادی</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="code-block">
|
||||||
|
<span class="comment"># نصب ابزار خط فرمان Azure DevOps Extensions</span>
|
||||||
|
npm install -g tfx-cli
|
||||||
|
|
||||||
|
<span class="comment"># ایجاد پوشه پروژه و ورود به آن</span>
|
||||||
|
mkdir my-first-extension
|
||||||
|
cd my-first-extension
|
||||||
|
</div>
|
||||||
|
<div class="info-box">
|
||||||
|
<strong>💡 نکته مهم:</strong> برای این آموزش نیازی به <code>npm init</code> یا نصب پکیجهای سنگین نداریم. ما از CDN برای بارگذاری SDK استفاده خواهیم کرد تا فرآیند تا حد ممکن ساده و شفاف باشد.
|
||||||
|
</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">Creating vss-extension.json</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section-content">
|
||||||
|
<p>فایل <code>vss-extension.json</code> قلب تپنده افزونه شماست. این فایل به Azure DevOps میگوید که افزونه شما چیست، چه نامی دارد و قرار است کجا نمایش داده شود.</p>
|
||||||
|
<div class="code-block">
|
||||||
|
{
|
||||||
|
<span class="string">"manifestVersion"</span>: 1,
|
||||||
|
<span class="string">"id"</span>: <span class="string">"my-simple-hub"</span>,
|
||||||
|
<span class="string">"version"</span>: <span class="string">"1.0.0"</span>,
|
||||||
|
<span class="string">"name"</span>: <span class="string">"My First Extension"</span>,
|
||||||
|
<span class="string">"description"</span>: <span class="string">"A simple HTML/JS extension tutorial"</span>,
|
||||||
|
<span class="string">"publisher"</span>: <span class="string">"YOUR_PUBLISHER_ID"</span>,
|
||||||
|
<span class="string">"targets"</span>: [
|
||||||
|
{ <span class="string">"id"</span>: <span class="string">"Microsoft.VisualStudio.Services"</span> }
|
||||||
|
],
|
||||||
|
<span class="string">"icons"</span>: {
|
||||||
|
<span class="string">"default"</span>: <span class="string">"images/logo.png"</span>
|
||||||
|
},
|
||||||
|
<span class="string">"contributions"</span>: [
|
||||||
|
{
|
||||||
|
<span class="string">"id"</span>: <span class="string">"simpleHub"</span>,
|
||||||
|
<span class="string">"type"</span>: <span class="string">"ms.vss-web.hub"</span>,
|
||||||
|
<span class="string">"targets"</span>: [<span class="string">"ms.vss-code.code-hub-group"</span>],
|
||||||
|
<span class="string">"properties"</span>: {
|
||||||
|
<span class="string">"name"</span>: <span class="string">"Simple Hub"</span>,
|
||||||
|
<span class="string">"uri"</span>: <span class="string">"index.html"</span>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
<span class="string">"files"</span>: [
|
||||||
|
{ <span class="string">"path"</span>: <span class="string">"index.html"</span>, <span class="string">"addressable"</span>: true },
|
||||||
|
{ <span class="string">"path"</span>: <span class="string">"images"</span>, <span class="string">"addressable"</span>: true }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
<div class="warning-box">
|
||||||
|
<strong>⚠️ توجه:</strong> مقدار <code>YOUR_PUBLISHER_ID</code> را حتماً با شناسه ناشر خود که از Marketplace دریافت کردهاید جایگزین کنید. همچنین مسیر <code>uri</code> باید دقیقاً به فایل HTML شما اشاره داشته باشد.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section">
|
||||||
|
<div class="section-header">
|
||||||
|
<div class="section-number">۳</div>
|
||||||
|
<div class="section-title">
|
||||||
|
<h3>پیادهسازی رابط کاربری (HTML + CSS)</h3>
|
||||||
|
<div class="subtitle">Building the UI Layer</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section-content">
|
||||||
|
<p>فایل <code>index.html</code> را در ریشه پروژه ایجاد کنید. ما از CDN رسمی مایکروسافت برای بارگذاری SDK استفاده میکنیم تا نیازی به باندل کردن نداشته باشید.</p>
|
||||||
|
<div class="code-block">
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Simple Extension</title>
|
||||||
|
<span class="comment"><!-- بارگذاری SDK رسمی Azure DevOps --></span>
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/azure-devops-extension-sdk@3.1.2/dist/index.min.js"></script>
|
||||||
|
<style>
|
||||||
|
body { font-family: 'Segoe UI', sans-serif; padding: 20px; color: #333; }
|
||||||
|
.container { max-width: 600px; margin: 0 auto; }
|
||||||
|
h2 { color: #0078d4; border-bottom: 2px solid #eee; padding-bottom: 10px; }
|
||||||
|
.info-card { background: #f8f9fa; padding: 15px; border-radius: 6px; margin-top: 20px; border-left: 4px solid #0078d4; }
|
||||||
|
button { background: #0078d4; color: white; border: none; padding: 10px 20px; border-radius: 4px; cursor: pointer; margin-top: 15px; }
|
||||||
|
button:hover { background: #005a9e; }
|
||||||
|
#result { margin-top: 15px; font-weight: bold; color: #107c10; }
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="container">
|
||||||
|
<h2>👋 سلام از افزونه من!</h2>
|
||||||
|
<p>این یک افزونه ساده است که اطلاعات پروژه جاری را نمایش میدهد.</p>
|
||||||
|
|
||||||
|
<button id="btnGetInfo">دریافت اطلاعات پروژه</button>
|
||||||
|
<div id="result"></div>
|
||||||
|
|
||||||
|
<div class="info-card">
|
||||||
|
<strong>وضعیت اتصال:</strong> <span id="status">در حال初始化...</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script src="app.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
</div>
|
||||||
|
<div class="success-box">
|
||||||
|
<strong>✓ بهترین تمرین:</strong> حتی در افزونههای ساده نیز از CSS مجزا یا بلوکهای مرتب استفاده کنید. ظاهر افزونه شما باید با تم روشن/تیره Azure DevOps سازگار باشد.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section">
|
||||||
|
<div class="section-header">
|
||||||
|
<div class="section-number">۴</div>
|
||||||
|
<div class="section-title">
|
||||||
|
<h3>منطق برنامه و ارتباط با SDK</h3>
|
||||||
|
<div class="subtitle">JavaScript Logic & SDK Integration</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section-content">
|
||||||
|
<p>فایل <code>app.js</code> را ایجاد کنید. در اینجا ما SDK را اولیه کرده و از سرویس Project Page Service برای دریافت اطلاعات زمینه (Context) استفاده میکنیم.</p>
|
||||||
|
<div class="code-block">
|
||||||
|
<span class="comment">// app.js</span>
|
||||||
|
<span class="keyword">const</span> resultDiv = document.getElementById(<span class="string">'result'</span>);
|
||||||
|
<span class="keyword">const</span> statusSpan = document.getElementById(<span class="string">'status'</span>);
|
||||||
|
<span class="keyword">const</span> btn = document.getElementById(<span class="string">'btnGetInfo'</span>);
|
||||||
|
|
||||||
|
<span class="comment">// 1. مقداردهی اولیه SDK (حیاتیترین مرحله)</span>
|
||||||
|
AZDevOps.init().then(() => {
|
||||||
|
statusSpan.textContent = <span class="string">'✅ متصل به Azure DevOps'</span>;
|
||||||
|
statusSpan.style.color = <span class="string">'#107c10'</span>;
|
||||||
|
}).catch(err => {
|
||||||
|
statusSpan.textContent = <span class="string">'❌ خطا در اتصال'</span>;
|
||||||
|
statusSpan.style.color = <span class="string">'#d13438'</span>;
|
||||||
|
});
|
||||||
|
|
||||||
|
<span class="comment">// 2. تعریف عملکرد دکمه</span>
|
||||||
|
btn.addEventListener(<span class="string">'click'</span>, async () => {
|
||||||
|
try {
|
||||||
|
<span class="comment">// دریافت سرویس مربوط به صفحه پروژه</span>
|
||||||
|
<span class="keyword">const</span> projectService = await AZDevOps.getService(
|
||||||
|
AZDevOps.CommonServiceIds.ProjectPageService
|
||||||
|
);
|
||||||
|
|
||||||
|
<span class="comment">// دریافت اطلاعات پروژه جاری</span>
|
||||||
|
<span class="keyword">const</span> project = await projectService.getProject();
|
||||||
|
|
||||||
|
if (project) {
|
||||||
|
resultDiv.innerHTML = `
|
||||||
|
📁 نام پروژه: ${project.name}<br>
|
||||||
|
🆔 شناسه: ${project.id}<br>
|
||||||
|
🔗 توضیحات: ${project.description || 'بدون توضیحات'}
|
||||||
|
`;
|
||||||
|
} else {
|
||||||
|
resultDiv.textContent = <span class="string">'اطلاعات پروژه یافت نشد.'</span>;
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error);
|
||||||
|
resultDiv.textContent = <span class="string">'خطا در دریافت اطلاعات: '</span> + error.message;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</div>
|
||||||
|
<div class="highlight-box">
|
||||||
|
<strong>🔑 کلید موفقیت:</strong> همیشه ابتدا <code>AZDevOps.init()</code> را صدا بزنید و منتظر Promise آن بمانید. بدون این مرحله، هیچیک از سرویسهای Azure DevOps در دسترس نخواهند بود.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section">
|
||||||
|
<div class="section-header">
|
||||||
|
<div class="section-number">۵</div>
|
||||||
|
<div class="section-title">
|
||||||
|
<h3>بستهبندی و تست محلی</h3>
|
||||||
|
<div class="subtitle">Packaging & Local Testing</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section-content">
|
||||||
|
<p>حال که کدها آماده هستند، باید آنها را به فرمت استاندارد VSIX تبدیل کنید. این فرمت همان چیزی است که Azure DevOps قادر به نصب آن است.</p>
|
||||||
|
<table class="styled-table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>مرحله</th>
|
||||||
|
<th>دستور / عملیات</th>
|
||||||
|
<th>توضیحات</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>اعتبارسنجی</td>
|
||||||
|
<td><code>tfx extension validate</code></td>
|
||||||
|
<td>بررسی صحت ساختار manifest و فایلها</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>بستهبندی</td>
|
||||||
|
<td><code>tfx extension create</code></td>
|
||||||
|
<td>تولید فایل my-first-extension-1.0.0.vsix</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>نصب دستی</td>
|
||||||
|
<td>Marketplace > Manage > Upload</td>
|
||||||
|
<td>آپلود فایل vsix در سازمان تست</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="highlight-row">
|
||||||
|
<td><strong>مشاهده نتیجه</strong></td>
|
||||||
|
<td><strong>رفرش صفحه Azure DevOps</strong></td>
|
||||||
|
<td><strong>افزونه در منوی Code ظاهر میشود</strong></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<div class="quote-box">
|
||||||
|
<p>تست محلی (Sideload) به شما اجازه میدهد بدون انتشار عمومی، افزونه را در محیط واقعی سازمان خود بررسی کنید. این امنترین روش برای دیباگ کردن است.</p>
|
||||||
|
<div class="source">— Azure DevOps Extension Best Practices</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">Troubleshooting & Pro Tips</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section-content">
|
||||||
|
<p>در توسعه افزونههای مبتنی بر iframe، برخی مشکلات رایج هستند. جدول زیر راهکارهای سریع برای رفع آنها ارائه میدهد:</p>
|
||||||
|
<table class="styled-table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>مشکل رایج</th>
|
||||||
|
<th>علت احتمالی</th>
|
||||||
|
<th>راه حل</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>صفحه سفید / خالی</td>
|
||||||
|
<td>عدم فراخوانی init() یا خطای JS</td>
|
||||||
|
<td>Console مرورگر را چک کنید؛ init() را در ابتدای اسکریپت قرار دهید</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>خطای 401/403</td>
|
||||||
|
<td>مجوزهای ناکافی در manifest</td>
|
||||||
|
<td>scopes مورد نیاز را به vss-extension.json اضافه کنید</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ظاهر بهم ریخته</td>
|
||||||
|
<td>تداخل CSS با هاست</td>
|
||||||
|
<td>از Reset CSS استفاده کنید یا از کامپوننتهای azure-devops-ui بهره ببرید</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>تغییرات اعمال نمیشود</td>
|
||||||
|
<td>کش مرورگر یا نسخه قدیمی</td>
|
||||||
|
<td>نسخه manifest را افزایش دهید و کش را پاک کنید</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<div class="info-box">
|
||||||
|
<strong>💡 پیشنهاد حرفهای:</strong> پس از تسلط بر این روش ساده، به سراغ استفاده از TypeScript و Webpack بروید. این ابزارها برای پروژههای بزرگتر ضروری هستند اما برای یادگیری مفاهیم پایه، همین روش Vanilla JS کافی و آموزنده است.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="conclusion-box">
|
||||||
|
<h3>🎉 تبریک! شما یک توسعهدهنده افزونه هستید</h3>
|
||||||
|
<p>با تکمیل این مراحل، شما اکنون دانش بنیادی لازم برای ایجاد هر نوع افزونهای در Azure DevOps را دارید. از اینجا به بعد میتوانید با مطالعه API Reference، قابلیتهای پیشرفتهتری مانند Custom Widgets، Build Tasks و Pipeline Decorators را پیادهسازی کنید.</p>
|
||||||
|
<div class="highlight">
|
||||||
|
<strong>💎 مسیر پیش رو:</strong><br>
|
||||||
|
یادگیری مفاهیم پایه ✓ → پیادهسازی اولین افزونه ✓ → مطالعه API پیشرفته → انتشار در Marketplace
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="page-info">
|
||||||
|
این مستند آموزشی بوده و جهت استفاده شخصی و تیمی تهیه شده است. کدهای ارائه شده تحت مجوز MIT قابل استفاده هستند.
|
||||||
|
</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>
|
||||||
@@ -0,0 +1,645 @@
|
|||||||
|
<!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;
|
||||||
|
}
|
||||||
|
.code-block {
|
||||||
|
background: #1e1e1e;
|
||||||
|
color: #d4d4d4;
|
||||||
|
padding: 20px;
|
||||||
|
border-radius: 8px;
|
||||||
|
margin: 20px 0;
|
||||||
|
direction: ltr;
|
||||||
|
text-align: left;
|
||||||
|
font-family: 'Consolas', 'Courier New', monospace;
|
||||||
|
font-size: 13px;
|
||||||
|
line-height: 1.6;
|
||||||
|
overflow-x: auto;
|
||||||
|
border-right: 4px solid var(--accent);
|
||||||
|
}
|
||||||
|
.code-block .comment { color: #6a9955; }
|
||||||
|
.code-block .keyword { color: #569cd6; }
|
||||||
|
.code-block .string { color: #ce9178; }
|
||||||
|
.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;
|
||||||
|
}
|
||||||
|
.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);
|
||||||
|
}
|
||||||
|
.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-TEST-002</div>
|
||||||
|
<div>نسخه: ۱.۰</div>
|
||||||
|
<div>تاریخ تهیه: آبان ۱۴۰۵</div>
|
||||||
|
<div>طبقهبندی: فنی / آموزشی</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="document-title">
|
||||||
|
<span class="label">DEVELOPMENT GUIDE</span>
|
||||||
|
<h1>تست و توسعه افزونه بدون دسترسی انتشار</h1>
|
||||||
|
<h2>راهکارهای عملی برای Sideload، دیباگ و چرخه توسعه سریع</h2>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
<div class="document-body">
|
||||||
|
<div class="intro-text">
|
||||||
|
<strong>توسعهدهنده گرامی،</strong><br>
|
||||||
|
عدم دسترسی به پنل مدیریت Marketplace یا نداشتن مجوز انتشار عمومی، مانعی برای توسعه و تست افزونه نیست. مایکروسافت مکانیزمهای اختصاصی را برای این منظور پیشبینی کرده است. این مستند، راهکارهای استاندارد و امن برای تست افزونه در محیط واقعی سازمان را تشریح میکند.
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section">
|
||||||
|
<div class="section-header">
|
||||||
|
<div class="section-number">۱</div>
|
||||||
|
<div class="section-title">
|
||||||
|
<h3>روش Sideload: نصب خصوصی در سازمان</h3>
|
||||||
|
<div class="subtitle">Private Installation via Organization Settings</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section-content">
|
||||||
|
<p>حتی اگر دسترسی انتشار در Marketplace ندارید، میتوانید فایل <code>.vsix</code> را مستقیماً در تنظیمات سازمان Azure DevOps خود بارگذاری کنید. این روش رسمیترین راه برای تست افزونهها قبل از انتشار است.</p>
|
||||||
|
<div class="stats-grid">
|
||||||
|
<div class="stat-card">
|
||||||
|
<div class="stat-value">بدون نیاز<br>به Publisher</div>
|
||||||
|
<div class="stat-label">فقط دسترسی Admin سازمان کافیست</div>
|
||||||
|
</div>
|
||||||
|
<div class="stat-card">
|
||||||
|
<div class="stat-value">محیط<br>واقعی</div>
|
||||||
|
<div class="stat-label">تست روی دادهها و کاربران واقعی</div>
|
||||||
|
</div>
|
||||||
|
<div class="stat-card">
|
||||||
|
<div class="stat-value">امنیت<br>کامل</div>
|
||||||
|
<div class="stat-label">افزونه فقط برای اعضای سازمان قابل مشاهده است</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<h4 style="margin-top: 25px; color: var(--primary); font-size: 16px;">مراحل انجام Sideload:</h4>
|
||||||
|
<ul style="padding-right: 20px; margin-top: 10px;">
|
||||||
|
<li style="margin-bottom: 8px;"><strong>مرحله ۱:</strong> ورود به Organization Settings > Extensions > Manage Extensions</li>
|
||||||
|
<li style="margin-bottom: 8px;"><strong>مرحله ۲:</strong> کلیک روی دکمه "Upload new extension" و انتخاب فایل .vsix</li>
|
||||||
|
<li style="margin-bottom: 8px;"><strong>مرحله ۳:</strong> پس از آپلود، روی "Install" کلیک کرده و سازمان مقصد را انتخاب کنید</li>
|
||||||
|
<li style="margin-bottom: 8px;"><strong>مرحله ۴:</strong> رفرش کردن صفحه Azure DevOps و مشاهده افزونه در منوی مربوطه</li>
|
||||||
|
</ul>
|
||||||
|
<div class="warning-box">
|
||||||
|
<strong>⚠️ نکته مهم:</strong> برای انجام Sideload باید نقش <strong>Project Collection Administrator</strong> یا حداقل دسترسی "Manage Extensions" در سطح سازمان را داشته باشید. در صورت عدم دسترسی، از مدیر سیستم بخواهید فایل vsix شما را نصب کند.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section">
|
||||||
|
<div class="section-header">
|
||||||
|
<div class="section-number">۲</div>
|
||||||
|
<div class="section-title">
|
||||||
|
<h3>توسعه محلی با Webpack Dev Server</h3>
|
||||||
|
<div class="subtitle">Local Development with Hot Reload</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section-content">
|
||||||
|
<p>برای جلوگیری از چرخه طولانی «تغییر کد > بستهبندی > آپلود > نصب»، میتوانید از یک سرور محلی استفاده کنید. در این روش، iframe افزونه در Azure DevOps به جای فایل داخل vsix، به localhost شما اشاره میکند.</p>
|
||||||
|
<div class="comparison-grid">
|
||||||
|
<div class="comparison-card">
|
||||||
|
<h4>روش سنتی (Sideload)</h4>
|
||||||
|
<ul>
|
||||||
|
<li><span>چرخه تغییر</span> <span class="value">۲ تا ۵ دقیقه</span></li>
|
||||||
|
<li><span>نیاز به بستهبندی</span> <span class="value">بله (هر بار)</span></li>
|
||||||
|
<li><span>دیباگ کردن</span> <span class="value">سخت و زمانبر</span></li>
|
||||||
|
<li><span>مناسب برای</span> <span class="value">تست نهایی</span></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="comparison-card recommended">
|
||||||
|
<span class="card-badge">پیشنهاد ما ✓</span>
|
||||||
|
<h4>روش Dev Server</h4>
|
||||||
|
<ul>
|
||||||
|
<li><span>چرخه تغییر</span> <span class="value">آنی (Hot Reload)</span></li>
|
||||||
|
<li><span>نیاز به بستهبندی</span> <span class="value">خیر</span></li>
|
||||||
|
<li><span>دیباگ کردن</span> <span class="value">Source Maps فعال</span></li>
|
||||||
|
<li><span>مناسب برای</span> <span class="value">توسعه روزانه</span></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="code-block">
|
||||||
|
<span class="comment"># 1. تنظیم manifest برای اشاره به لوکال هاست</span>
|
||||||
|
<span class="comment"># در vss-extension.json بخش properties.uri را تغییر دهید:</span>
|
||||||
|
{
|
||||||
|
<span class="string">"properties"</span>: {
|
||||||
|
<span class="string">"name"</span>: <span class="string">"My Hub"</span>,
|
||||||
|
<span class="string">"uri"</span>: <span class="string">"https://localhost:3000"</span>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
<span class="comment"># 2. اجرای سرور محلی با SSL (الزامی برای Azure DevOps)</span>
|
||||||
|
npx webpack serve --https --port 3000
|
||||||
|
|
||||||
|
<span class="comment"># 3. پذیرش گواهی SSL نامعتبر در مرورگر</span>
|
||||||
|
<span class="comment"># ابتدا https://localhost:3000 را در تب جدید باز کرده و Proceed کنید</span>
|
||||||
|
</div>
|
||||||
|
<div class="info-box">
|
||||||
|
<strong>💡 نکته حیاتی:</strong> Azure DevOps تنها از طریق HTTPS بارگذاری میشود. بنابراین سرور محلی شما حتماً باید SSL داشته باشد. همچنین به دلیل Self-Signed بودن گواهی، باید یکبار آدرس localhost را مستقیماً در مرورگر باز کرده و ریسک امنیتی را بپذیرید.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section">
|
||||||
|
<div class="section-header">
|
||||||
|
<div class="section-number">۳</div>
|
||||||
|
<div class="section-title">
|
||||||
|
<h3>دیباگ و عیبیابی پیشرفته</h3>
|
||||||
|
<div class="subtitle">Advanced Debugging Techniques</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section-content">
|
||||||
|
<p>از آنجا که افزونهها در iframe اجرا میشوند، دیباگ کردن آنها کمی متفاوت از وباپلیکیشنهای معمولی است. ابزارهای زیر ضروری هستند:</p>
|
||||||
|
<table class="styled-table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>ابزار / تکنیک</th>
|
||||||
|
<th>کاربرد</th>
|
||||||
|
<th>اولویت</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>Chrome DevTools (F12)</td>
|
||||||
|
<td>مشاهده Console، Network و DOM افزونه</td>
|
||||||
|
<td style="color: var(--danger); font-weight: 600;">الزامی</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Azure DevOps SDK Logging</td>
|
||||||
|
<td>فعالسازی لاگهای داخلی SDK با متد setLogging(true)</td>
|
||||||
|
<td style="color: var(--warning); font-weight: 600;">توصیه شده</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>PostMessage Monitor</td>
|
||||||
|
<td>شنود پیامهای رد و بدل شده بین هاست و iframe</td>
|
||||||
|
<td style="color: var(--success); font-weight: 600;">پیشرفته</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Network Tab Filtering</td>
|
||||||
|
<td>فیلتر کردن درخواستهای API مربوط به افزونه</td>
|
||||||
|
<td style="color: var(--warning); font-weight: 600;">توصیه شده</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<div class="quote-box">
|
||||||
|
<p>همیشه قبل از گزارش باگ، مطمئن شوید که مشکل از سمت افزونه شماست و نه محدودیتهای پلتفرم. بسیاری از خطاهای ظاهری ناشی از CSP (Content Security Policy) یا محدودیتهای iframe هستند.</p>
|
||||||
|
<div class="source">— Azure DevOps Extension Troubleshooting Guide</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">Versioning & Update Cycle</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section-content">
|
||||||
|
<p>در محیط توسعه بدون دسترسی انتشار، مدیریت نسخهها اهمیت دوچندان دارد. هر بار که تغییری اعمال میکنید، باید نسخه manifest را افزایش دهید تا Azure DevOps فایل جدید را شناسایی کند.</p>
|
||||||
|
<div class="highlight-box">
|
||||||
|
<strong>🔑 قانون طلایی:</strong> Azure DevOps فایل vsix با همان نسخه قبلی را نادیده میگیرد. حتی برای یک تغییر کوچک CSS، باید عدد نسخه را در <code>vss-extension.json</code> افزایش دهید (مثلاً از 1.0.0 به 1.0.1).
|
||||||
|
</div>
|
||||||
|
<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>Major:</strong> تغییرات شکستساز یا بازنویسی کامل (1.0.0 → 2.0.0)</li>
|
||||||
|
<li style="margin-bottom: 8px;"><strong>Minor:</strong> افزودن ویژگی جدید (1.0.0 → 1.1.0)</li>
|
||||||
|
<li style="margin-bottom: 8px;"><strong>Patch:</strong> رفع باگ و تغییرات جزئی (1.0.0 → 1.0.1)</li>
|
||||||
|
<li style="margin-bottom: 8px;"><strong>Pre-release:</strong> نسخههای تستی با پسوند -beta یا -dev (1.0.1-beta.1)</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="conclusion-box">
|
||||||
|
<h3>🎯 خلاصه راهکارها</h3>
|
||||||
|
<p>عدم دسترسی به Marketplace پایان راه نیست. با ترکیب Sideload برای تست نهایی و Dev Server برای توسعه سریع، میتوانید چرخه توسعه کاملی را بدون هیچ مانعی طی کنید.</p>
|
||||||
|
<div class="highlight">
|
||||||
|
<strong>💎 مسیر پیشنهادی:</strong><br>
|
||||||
|
توسعه با Localhost (سریع) ← تست با Sideload (واقعی) ← دیباگ با DevTools ← تکرار چرخه
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="info-box">
|
||||||
|
<strong>📞 گام بعدی:</strong> اگر همچنان با مشکل مواجه هستید، لاگهای Console و Network Tab را همراه با نسخه manifest و ساختار پروژه ارسال کنید تا بررسی دقیقتری انجام شود.
|
||||||
|
</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>
|
||||||
@@ -0,0 +1,588 @@
|
|||||||
|
<!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;
|
||||||
|
}
|
||||||
|
.code-block {
|
||||||
|
background: #1e1e1e;
|
||||||
|
color: #d4d4d4;
|
||||||
|
padding: 20px;
|
||||||
|
border-radius: 8px;
|
||||||
|
margin: 20px 0;
|
||||||
|
direction: ltr;
|
||||||
|
text-align: left;
|
||||||
|
font-family: 'Consolas', 'Courier New', monospace;
|
||||||
|
font-size: 13px;
|
||||||
|
line-height: 1.6;
|
||||||
|
overflow-x: auto;
|
||||||
|
border-right: 4px solid var(--accent);
|
||||||
|
}
|
||||||
|
.code-block .comment { color: #6a9955; }
|
||||||
|
.code-block .keyword { color: #569cd6; }
|
||||||
|
.code-block .string { color: #ce9178; }
|
||||||
|
.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;
|
||||||
|
}
|
||||||
|
.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; }
|
||||||
|
.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-SETUP-003</div>
|
||||||
|
<div>نسخه: ۱.۰</div>
|
||||||
|
<div>تاریخ تهیه: آبان ۱۴۰۵</div>
|
||||||
|
<div>طبقهبندی: فنی / آموزشی</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="document-title">
|
||||||
|
<span class="label">INSTALLATION GUIDE</span>
|
||||||
|
<h1>نصب و پیکربندی ابزارهای تست افزونه Azure DevOps</h1>
|
||||||
|
<h2>راهنمای گامبهگام آمادهسازی محیط توسعه و تست محلی</h2>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
<div class="document-body">
|
||||||
|
<div class="intro-text">
|
||||||
|
<strong>توسعهدهنده گرامی،</strong><br>
|
||||||
|
این مستند بهصورت کامل و عملیاتی، تمامی مراحل نصب و پیکربندی ابزارهای مورد نیاز برای توسعه و تست افزونههای Azure DevOS را پوشش میدهد. با دنبال کردن این راهنما، محیطی پایدار و استاندارد برای چرخه توسعه سریع (Rapid Development Cycle) خواهید داشت. توجه ویژه به نسخه Node.js در این مستند الزامی است.
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section">
|
||||||
|
<div class="section-header">
|
||||||
|
<div class="section-number">۱</div>
|
||||||
|
<div class="section-title">
|
||||||
|
<h3>پیشنیاز حیاتی: مدیریت نسخه Node.js</h3>
|
||||||
|
<div class="subtitle">Node.js Version Management (Critical)</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section-content">
|
||||||
|
<p>ابزارهای مدرن Azure DevOps Extension CLI به دلیل وابستگی به ماژولهای جدید Node.js (مانند <code>node:url</code>)، تنها بر روی نسخههای ۱۸ و بالاتر اجرا میشوند. استفاده از نسخههای قدیمیتر منجر به خطای <code>Cannot find module</code> خواهد شد.</p>
|
||||||
|
<div class="stats-grid">
|
||||||
|
<div class="stat-card">
|
||||||
|
<div class="stat-value">v18.x<br>LTS</div>
|
||||||
|
<div class="stat-label">حداقل نسخه پیشنهادی و پایدار</div>
|
||||||
|
</div>
|
||||||
|
<div class="stat-card">
|
||||||
|
<div class="stat-value">nvm<br>windows/mac</div>
|
||||||
|
<div class="stat-label">ابزار مدیریت چندین نسخه همزمان</div>
|
||||||
|
</div>
|
||||||
|
<div class="stat-card">
|
||||||
|
<div class="stat-value">EOL<br>v14/v16</div>
|
||||||
|
<div class="stat-label">نسخههای منسوخ و ناسازگار</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="code-block">
|
||||||
|
<span class="comment"># ۱. نصب نسخه ۱۸ LTS با استفاده از nvm</span>
|
||||||
|
nvm install 18
|
||||||
|
|
||||||
|
<span class="comment"># ۲. فعالسازی نسخه جدید در ترمینال جاری</span>
|
||||||
|
nvm use 18
|
||||||
|
|
||||||
|
<span class="comment"># ۳. تایید نسخه فعال (باید v18.x.x باشد)</span>
|
||||||
|
node -v
|
||||||
|
|
||||||
|
<span class="comment"># ۴. تنظیم نسخه پیشفرض سیستم (اختیاری اما توصیه شده)</span>
|
||||||
|
nvm alias default 18
|
||||||
|
</div>
|
||||||
|
<div class="warning-box">
|
||||||
|
<strong>⚠️ هشدار مهم:</strong> اگر از nvm-windows استفاده میکنید، حتماً ترمینال (CMD/PowerShell) را پس از تغییر نسخه ببندید و دوباره باز کنید تا متغیرهای محیطی بهروزرسانی شوند.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section">
|
||||||
|
<div class="section-header">
|
||||||
|
<div class="section-number">۲</div>
|
||||||
|
<div class="section-title">
|
||||||
|
<h3>نصب ابزار خط فرمان tfx-cli</h3>
|
||||||
|
<div class="subtitle">Azure DevOps Extensions CLI Installation</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section-content">
|
||||||
|
<p>ابزار <code>tfx-cli</code> رابط اصلی شما برای اعتبارسنجی، بستهبندی و انتشار افزونههاست. این ابزار باید به صورت سراسری (Global) روی نسخه صحیح Node.js نصب شود.</p>
|
||||||
|
<div class="code-block">
|
||||||
|
<span class="comment"># نصب سراسری ابزار tfx-cli</span>
|
||||||
|
npm install -g tfx-cli
|
||||||
|
|
||||||
|
<span class="comment"># بررسی موفقیت نصب و نسخه ابزار</span>
|
||||||
|
tfx --version
|
||||||
|
|
||||||
|
<span class="comment"># خروجی مورد انتظار: Version 0.x.x</span>
|
||||||
|
</div>
|
||||||
|
<div class="info-box">
|
||||||
|
<strong>💡 نکته عیبیابی:</strong> در صورت دریافت خطای دسترسی (Permission Denied) در مک/لینوکس، از <code>sudo</code> استفاده کنید یا مسیر npm global را اصلاح نمایید. در ویندوز، ترمینال را به صورت Administrator اجرا کنید.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section">
|
||||||
|
<div class="section-header">
|
||||||
|
<div class="section-number">۳</div>
|
||||||
|
<div class="section-title">
|
||||||
|
<h3>دریافت و پیکربندی توکن دسترسی (PAT)</h3>
|
||||||
|
<div class="subtitle">Personal Access Token Configuration</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section-content">
|
||||||
|
<p>برای تعامل خودکار با Marketplace و سازمان Azure DevOps (جهت Sideload یا انتشار)، نیاز به یک PAT دارید. این توکن جایگزین رمز عبور در دستورات خط فرمان میشود.</p>
|
||||||
|
<table class="styled-table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>مرحله</th>
|
||||||
|
<th>عملیات</th>
|
||||||
|
<th>تنظیمات امنیتی</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>۱</td>
|
||||||
|
<td>ورود به User Settings > Personal Access Tokens</td>
|
||||||
|
<td>—</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>۲</td>
|
||||||
|
<td>ایجاد توکن جدید با نام مشخص</td>
|
||||||
|
<td>Expiration: 90 روز (پیشنهادی)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>۳</td>
|
||||||
|
<td>انتخاب Scopes مورد نیاز</td>
|
||||||
|
<td style="color: var(--danger); font-weight: 600;">Marketplace > Manage</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="highlight-row">
|
||||||
|
<td><strong>۴</strong></td>
|
||||||
|
<td><strong>ذخیره توکن در مکان امن</strong></td>
|
||||||
|
<td><strong>تنها یکبار نمایش داده میشود</strong></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<div class="code-block">
|
||||||
|
<span class="comment"># احراز هویت در tfx-cli با استفاده از PAT</span>
|
||||||
|
tfx login --service-url https://dev.azure.com/YOUR_ORG --token YOUR_PAT_TOKEN
|
||||||
|
|
||||||
|
<span class="comment"># ذخیره توکن به عنوان متغیر محیطی (روش امنتر)</span>
|
||||||
|
export AZURE_DEVOPS_EXT_PAT=YOUR_PAT_TOKEN <span class="comment"># Linux/Mac</span>
|
||||||
|
set AZURE_DEVOPS_EXT_PAT=YOUR_PAT_TOKEN <span class="comment"># Windows CMD</span>
|
||||||
|
</div>
|
||||||
|
<div class="success-box">
|
||||||
|
<strong>✓ بهترین تمرین امنیتی:</strong> هرگز توکن را در کد یا فایلهای پروژه Commit نکنید. از متغیرهای محیطی یا Secret Managerهای CI/CD استفاده نمایید.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section">
|
||||||
|
<div class="section-header">
|
||||||
|
<div class="section-number">۴</div>
|
||||||
|
<div class="section-title">
|
||||||
|
<h3>آمادهسازی ساختار پروژه پایه</h3>
|
||||||
|
<div class="subtitle">Project Scaffold & Validation</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section-content">
|
||||||
|
<p>پس از نصب ابزارها، صحت عملکرد آنها را با ایجاد یک پروژه نمونه و اعتبارسنجی آن بررسی کنید. این مرحله تضمین میکند که زنجیره ابزار به درستی پیکربندی شده است.</p>
|
||||||
|
<div class="code-block">
|
||||||
|
<span class="comment"># ایجاد پوشه پروژه</span>
|
||||||
|
mkdir azdo-ext-test && cd azdo-ext-test
|
||||||
|
|
||||||
|
<span class="comment"># ایجاد فایل manifest حداقلی برای تست</span>
|
||||||
|
echo '{
|
||||||
|
"manifestVersion": 1,
|
||||||
|
"id": "test-extension",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"name": "Test Extension",
|
||||||
|
"publisher": "YOUR_PUBLISHER_ID",
|
||||||
|
"targets": [{"id": "Microsoft.VisualStudio.Services"}],
|
||||||
|
"files": [{"path": "."}]
|
||||||
|
}' > vss-extension.json
|
||||||
|
|
||||||
|
<span class="comment"># اعتبارسنجی ساختار با tfx-cli</span>
|
||||||
|
tfx extension validate --manifest-globs vss-extension.json
|
||||||
|
|
||||||
|
<span class="comment"># خروجی موفق: "Extension is valid"</span>
|
||||||
|
</div>
|
||||||
|
<div class="quote-box">
|
||||||
|
<p>اعتبارسنجی موفق در این مرحله به معنای آمادگی کامل محیط برای توسعه واقعی است. اگر خطایی دریافت کردید، ابتدا نسخه Node.js و سپس نصب tfx-cli را بازبینی کنید.</p>
|
||||||
|
<div class="source">— Azure DevOps Extension Toolchain Best Practices</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="conclusion-box">
|
||||||
|
<h3>🎉 محیط توسعه شما آماده است!</h3>
|
||||||
|
<p>با تکمیل این چهار مرحله، اکنون دارای یک محیط استاندارد، امن و بهروز برای توسعه افزونههای Azure DevOps هستید. میتوانید بلافاصله شروع به پیادهسازی و تست افزونه خود نمایید.</p>
|
||||||
|
<div class="highlight">
|
||||||
|
<strong>💎 چکلیست نهایی:</strong><br>
|
||||||
|
Node.js 18+ ✓ | tfx-cli Global ✓ | PAT Configured ✓ | Validation Passed ✓
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="info-box">
|
||||||
|
<strong>📞 پشتیبانی:</strong> در صورت مواجهه با خطاهای خاص هنگام نصب، لاگ کامل ترمینال و خروجی دستور <code>node -v</code> و <code>tfx --version</code> را جهت بررسی ارسال نمایید.
|
||||||
|
</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>
|
||||||
@@ -0,0 +1,889 @@
|
|||||||
|
<!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;
|
||||||
|
}
|
||||||
|
|
||||||
|
.step-list {
|
||||||
|
list-style: none;
|
||||||
|
padding: 0;
|
||||||
|
counter-reset: step;
|
||||||
|
}
|
||||||
|
|
||||||
|
.step-list>li {
|
||||||
|
counter-increment: step;
|
||||||
|
position: relative;
|
||||||
|
padding: 20px 55px 20px 20px;
|
||||||
|
margin-bottom: 16px;
|
||||||
|
background: #f8fafc;
|
||||||
|
border: 1px solid var(--border);
|
||||||
|
border-radius: 10px;
|
||||||
|
border-right: 4px solid var(--primary-light);
|
||||||
|
}
|
||||||
|
|
||||||
|
.step-list>li::before {
|
||||||
|
content: counter(step);
|
||||||
|
position: absolute;
|
||||||
|
right: 15px;
|
||||||
|
top: 20px;
|
||||||
|
width: 28px;
|
||||||
|
height: 28px;
|
||||||
|
background: var(--primary);
|
||||||
|
color: var(--accent);
|
||||||
|
border-radius: 50%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-weight: 800;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.step-list h5 {
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 700;
|
||||||
|
color: var(--primary);
|
||||||
|
margin-bottom: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.step-list p {
|
||||||
|
font-size: 13px;
|
||||||
|
color: var(--text-muted);
|
||||||
|
text-indent: 0 !important;
|
||||||
|
margin: 0 !important;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
code {
|
||||||
|
background: #edf2f7;
|
||||||
|
padding: 2px 6px;
|
||||||
|
border-radius: 4px;
|
||||||
|
font-family: 'Courier New', monospace;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #c53030;
|
||||||
|
direction: ltr;
|
||||||
|
unicode-bidi: embed;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre {
|
||||||
|
background: #1a202c;
|
||||||
|
color: #e2e8f0;
|
||||||
|
padding: 16px 20px;
|
||||||
|
border-radius: 8px;
|
||||||
|
overflow-x: auto;
|
||||||
|
font-family: 'Courier New', monospace;
|
||||||
|
font-size: 12px;
|
||||||
|
direction: ltr;
|
||||||
|
text-align: left;
|
||||||
|
margin: 12px 0;
|
||||||
|
line-height: 1.7;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tool-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(2, 1fr);
|
||||||
|
gap: 15px;
|
||||||
|
margin: 20px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tool-card {
|
||||||
|
background: #f8fafc;
|
||||||
|
border: 1px solid var(--border);
|
||||||
|
border-radius: 10px;
|
||||||
|
padding: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tool-card .tool-name {
|
||||||
|
font-weight: 700;
|
||||||
|
font-size: 14px;
|
||||||
|
color: var(--primary);
|
||||||
|
margin-bottom: 6px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tool-card .tool-desc {
|
||||||
|
font-size: 12px;
|
||||||
|
color: var(--text-muted);
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge-required {
|
||||||
|
display: inline-block;
|
||||||
|
background: var(--danger);
|
||||||
|
color: white;
|
||||||
|
font-size: 10px;
|
||||||
|
padding: 1px 8px;
|
||||||
|
border-radius: 10px;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge-recommended {
|
||||||
|
display: inline-block;
|
||||||
|
background: var(--accent);
|
||||||
|
color: var(--primary);
|
||||||
|
font-size: 10px;
|
||||||
|
padding: 1px 8px;
|
||||||
|
border-radius: 10px;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.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;
|
||||||
|
}
|
||||||
|
|
||||||
|
.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;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tool-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>شماره مستند: DEV-GUIDE-1405-002</div>
|
||||||
|
<div>نسخه: ۱.۰</div>
|
||||||
|
<div>تاریخ تهیه: شهریور ۱۴۰۵</div>
|
||||||
|
<div>طبقهبندی: داخلی — تیم توسعه</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="document-title"> <span class="label">DEVELOPMENT & DEBUGGING GUIDE</span>
|
||||||
|
<h1>راهنمای جامع تست و عیبیابی افزونه Azure DevOps</h1>
|
||||||
|
<h2>ابزارهای محیط لوکال و روش گامبهگام تست از طریق iFrame</h2>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
<div class="document-body">
|
||||||
|
<div class="intro-text"> <strong>همکار محترم،</strong><br> افزونه Azure DevOps شما در محیط سازمانی ایجاد شده
|
||||||
|
و اکنون نیاز به تست و عیبیابی دارد. این مستند تمام ابزارهای لازم برای توسعه و دیباگ در محیط لوکال را
|
||||||
|
معرفی میکند و سپس به صورت گامبهگام نشان میدهد چگونه بدون نیاز به انتشار در Marketplace، افزونه را از
|
||||||
|
طریق <code>iFrame</code> در Azure DevOps بارگذاری و تست کنید. تمرکز اصلی بر قابلیت “بارگذاری از
|
||||||
|
localhost” است که فرآیند توسعه را به شدت تسریع میکند. </div>
|
||||||
|
<div class="section">
|
||||||
|
<div class="section-header">
|
||||||
|
<div class="section-number">۱</div>
|
||||||
|
<div class="section-title">
|
||||||
|
<h3>ابزارهای الزامی محیط توسعه لوکال</h3>
|
||||||
|
<div class="subtitle">Development Environment Toolchain</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section-content">
|
||||||
|
<p>برای توسعه، تست و بستهبندی افزونه Azure DevOps، مجموعهای از ابزارها مورد نیاز است. جدول زیر نقش
|
||||||
|
هر ابزار را مشخص میکند:</p>
|
||||||
|
<div class="tool-grid">
|
||||||
|
<div class="tool-card">
|
||||||
|
<div class="tool-name">Node.js (نسخه ۱۶ یا بالاتر) <span
|
||||||
|
class="badge-required">الزامی</span></div>
|
||||||
|
<div class="tool-desc">محیط اجرای جاوااسکریپت برای اجرای ابزارهای ساخت و بستهبندی. npm
|
||||||
|
همراه آن نصب میشود.</div>
|
||||||
|
</div>
|
||||||
|
<div class="tool-card">
|
||||||
|
<div class="tool-name">Visual Studio Code <span class="badge-required">الزامی</span></div>
|
||||||
|
<div class="tool-desc">محیط توسعه اصلی. دیباگر داخلی و اکوسیستم افزونهها آن را به ابزار
|
||||||
|
اصلی دیباگ تبدیل کرده است.</div>
|
||||||
|
</div>
|
||||||
|
<div class="tool-card">
|
||||||
|
<div class="tool-name">Firefox <span class="badge-required">الزامی</span></div>
|
||||||
|
<div class="tool-desc">برای دیباگ <code>iFrame</code> در VS Code، افزونه Debugger for Chrome
|
||||||
|
از iFrame پشتیبانی نمیکند؛ بنابراین Firefox و دیباگر مخصوص آن ضروری است.[reference:0]
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="tool-card">
|
||||||
|
<div class="tool-name">Debugger for Firefox (افزونه VS Code) <span
|
||||||
|
class="badge-required">الزامی</span></div>
|
||||||
|
<div class="tool-desc">امکان اتصال دیباگر VS Code به Firefox و قرار دادن Breakpoint در کد
|
||||||
|
افزونه را فراهم میکند.</div>
|
||||||
|
</div>
|
||||||
|
<div class="tool-card">
|
||||||
|
<div class="tool-name">tfx-cli <span class="badge-required">الزامی</span></div>
|
||||||
|
<div class="tool-desc">ابزار خط فرمان مایکروسافت برای بستهبندی افزونه به فایل
|
||||||
|
<code>.vsix</code>، آپلود و مدیریت انتشار.[reference:1]</div>
|
||||||
|
</div>
|
||||||
|
<div class="tool-card">
|
||||||
|
<div class="tool-name">webpack + webpack-dev-server <span
|
||||||
|
class="badge-required">الزامی</span></div>
|
||||||
|
<div class="tool-desc">سرور توسعه لوکال با قابلیت Hot Reload. کد افزونه از این سرور در
|
||||||
|
iFrame بارگذاری میشود.[reference:2]</div>
|
||||||
|
</div>
|
||||||
|
<div class="tool-card">
|
||||||
|
<div class="tool-name">azure-devops-extension-sdk <span class="badge-required">الزامی</span>
|
||||||
|
</div>
|
||||||
|
<div class="tool-desc">SDK رسمی برای ارتباط بین iFrame افزونه و فریم والد Azure DevOps
|
||||||
|
(دریافت Context، کاربر، تم و غیره).[reference:3]</div>
|
||||||
|
</div>
|
||||||
|
<div class="tool-card">
|
||||||
|
<div class="tool-name">Yeoman Generator (اختیاری) <span
|
||||||
|
class="badge-recommended">توصیهشده</span></div>
|
||||||
|
<div class="tool-desc">ساخت اسکلت اولیه افزونه با پیکربندی Hot Reload و دیباگ آماده. برای
|
||||||
|
شروع از صفر ایدهآل است.[reference:4]</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="info-box"> <strong>📦 نصب یکجای ابزارهای CLI:</strong>
|
||||||
|
<pre>npm install -g tfx-cli npm install -g yo npm install -g @microsoft/generator-azure-devops-extension npm install -g webpack webpack-cli webpack-dev-server</pre>
|
||||||
|
<p style="text-indent:0; margin-top:8px; font-size:12px;">ترجیحاً این پکیجها را در
|
||||||
|
<code>devDependencies</code> پروژه قرار دهید تا نسخهها قفل شوند و در تیم یکسان
|
||||||
|
بمانند.[reference:5]</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<div class="section-header">
|
||||||
|
<div class="section-number">۲</div>
|
||||||
|
<div class="section-title">
|
||||||
|
<h3>چرا تست از طریق iFrame در Azure DevOps متفاوت است؟</h3>
|
||||||
|
<div class="subtitle">Understanding the iFrame Sandbox</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section-content">
|
||||||
|
<p>تمام افزونههای Hub و Widget در Azure DevOps به صورت <code>iFrame</code> در صفحه میزبان بارگذاری
|
||||||
|
میشوند.[reference:6] این معماری امنیتی مزایایی دارد، اما چند محدودیت مهم ایجاد میکند که هنگام
|
||||||
|
تست و عیبیابی باید بدانید:</p>
|
||||||
|
<table class="styled-table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>محدودیت</th>
|
||||||
|
<th>تأثیر بر تست</th>
|
||||||
|
<th>راهکار عملی</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>sandbox بودن iFrame</td>
|
||||||
|
<td>برخی APIهای مرورگر (مانند <code>getDisplayMedia</code> برای ضبط صفحه) مسدود
|
||||||
|
میشوند.[reference:7]</td>
|
||||||
|
<td>در صورت نیاز به چنین قابلیتی، آن را در یک Pop-up سطح بالا (top-level) باز کنید، نه
|
||||||
|
داخل iFrame.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>عدم دسترسی مستقیم به DOM میزبان</td>
|
||||||
|
<td>نمیتوانید مستقیماً عناصر صفحه Azure DevOps را دستکاری کنید.</td>
|
||||||
|
<td>همه ارتباطات باید از طریق <code>azure-devops-extension-sdk</code> و پیامرسانی
|
||||||
|
<code>postMessage</code> انجام شود.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>سیاست Private Network Access (مرورگرهای جدید)</td>
|
||||||
|
<td>درخواست از iFrame به <code>localhost</code> یا شبکه داخلی ممکن است مسدود
|
||||||
|
شود.[reference:8]</td>
|
||||||
|
<td>در تنظیمات سازمان، سیاست “Allow extensions to access local network resources” را
|
||||||
|
فعال کنید (فقط برای محیط تست).[reference:9]</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>عدم پشتیبانی Debugger for Chrome از iFrame</td>
|
||||||
|
<td>نمیتوانید Breakpoint را در کد داخل iFrame با Chrome Debugger در VS Code متوقف
|
||||||
|
کنید.[reference:10]</td>
|
||||||
|
<td>از Firefox + Debugger for Firefox استفاده کنید، یا از <code>debugger;</code> در کد و
|
||||||
|
DevTools مرورگر بهره ببرید.</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<div class="warning-box"> <strong>⚠️ نکته مهم درباره HTTPS:</strong> سرور توسعه لوکال <strong>باید
|
||||||
|
با HTTPS اجرا شود</strong>. اگر افزونه از <code>https://dev.azure.com</code> بارگذاری شود و
|
||||||
|
منبع آن <code>http://localhost</code> باشد، مرورگر خطای “Mixed Content” میدهد و iFrame بارگذاری
|
||||||
|
نمیشود.[reference:11] </div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<div class="section-header">
|
||||||
|
<div class="section-number">۳</div>
|
||||||
|
<div class="section-title">
|
||||||
|
<h3>روش اصلی: بارگذاری افزونه از localhost با baseUri</h3>
|
||||||
|
<div class="subtitle">Hot Reload via baseUri Override</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section-content">
|
||||||
|
<p>Azure DevOps قابلیت کمشناختهشدهای دارد که به افزونه اجازه میدهد منابع خود را به جای بسته
|
||||||
|
<code>.vsix</code>، از یک سرور لوکال بارگذاری کند.[reference:12] کلید این کار، تنظیم
|
||||||
|
<code>baseUri</code> در فایل manifest (<code>vss-extension.json</code>) به آدرس سرور توسعه است.
|
||||||
|
</p>
|
||||||
|
<h4 style="margin-top: 20px; color: var(--primary); font-size: 16px;">گامهای اجرای این روش:</h4>
|
||||||
|
<ol class="step-list">
|
||||||
|
<li>
|
||||||
|
<h5>پیکربندی baseUri در manifest</h5>
|
||||||
|
<p>در فایل <code>vss-extension.json</code>، مقدار <code>baseUri</code> را به آدرس سرور لوکال
|
||||||
|
(با HTTPS) تنظیم کنید:</p>
|
||||||
|
<pre>"baseUri": "https://localhost:3000"</pre>
|
||||||
|
<p>پورت ۳۰۰۰ فقط مثال است؛ از هر پورت آزادی میتوانید استفاده کنید.[reference:13]</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<h5>استفاده از فایل Override برای تفکیک محیط Dev و Production</h5>
|
||||||
|
<p>مقدار <code>baseUri</code> را مستقیماً در manifest اصلی تغییر ندهید. یک فایل
|
||||||
|
<code>overrides-dev.json</code> بسازید و فقط برای build توسعه از آن استفاده کنید:</p>
|
||||||
|
<pre>{ "baseUri": "https://localhost:3000" }</pre>
|
||||||
|
<p>سپس هنگام بستهبندی برای محیط توسعه، پارامتر <code>--overrides-file</code> را به tfx-cli
|
||||||
|
بدهید.[reference:14]</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<h5>راهاندازی سرور توسعه با HTTPS</h5>
|
||||||
|
<p>با webpack-dev-server (یا هر سرور لوکال دیگر) سرویس را روی HTTPS اجرا کنید. برای گواهی
|
||||||
|
SSL لوکال میتوانید از <code>mkcert</code> یا گواهیهای خودامضا استفاده کنید (مرورگر
|
||||||
|
باید به آن اعتماد کند).</p>
|
||||||
|
<pre>npx webpack serve --mode development --https --port 3000</pre>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<h5>بستهبندی و نصب نسخه توسعهای</h5>
|
||||||
|
<p>با tfx-cli و فایل override، یک <code>.vsix</code> مخصوص توسعه بسازید:</p>
|
||||||
|
<pre>tfx extension create --manifest-globs vss-extension.json --overrides-file overrides-dev.json</pre>
|
||||||
|
<p>سپس این فایل <code>.vsix</code> را در سازمان Azure DevOps خود آپلود و نصب کنید (بخش ۵).
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<h5>بارگذاری و تست</h5>
|
||||||
|
<p>پس از نصب، به صفحهای بروید که افزونه در آن ظاهر میشود. iFrame افزونه اکنون محتوای خود
|
||||||
|
را از <code>https://localhost:3000</code> بارگذاری میکند. با هر تغییر در کد، Hot Reload
|
||||||
|
تغییرات را اعمال میکند و نیازی به بستهبندی مجدد و آپلود نیست.[reference:15]</p>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
<div class="success-box"> <strong>✓ مزیت اصلی:</strong> چرخه بازخورد از “تغییر کد ← build ←
|
||||||
|
بستهبندی ← آپلود ← نصب ← تست” به “تغییر کد ← رفرش مرورگر” کاهش مییابد. این سریعترین روش برای
|
||||||
|
توسعه افزونه است.[reference:16] </div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<div class="section-header">
|
||||||
|
<div class="section-number">۴</div>
|
||||||
|
<div class="section-title">
|
||||||
|
<h3>روش جایگزین: آپلود مستقیم فایل VSIX (بدون baseUri)</h3>
|
||||||
|
<div class="subtitle">Private Extension via VSIX Upload</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section-content">
|
||||||
|
<p>اگر نمیخواهید از سرور لوکال استفاده کنید، میتوانید افزونه را به صورت یک بسته <code>.vsix</code>
|
||||||
|
خصوصی مستقیماً در سازمان خود آپلود کنید. این روش برای تستهای نهایی و اشتراکگذاری با اعضای تیم
|
||||||
|
مناسب است.</p>
|
||||||
|
<div class="info-box"> <strong>مراحل خلاصه:</strong>
|
||||||
|
<ol style="padding-right: 20px; margin-top: 10px; font-size: 13px;">
|
||||||
|
<li>فایل <code>.vsix</code> را با <code>tfx extension create</code> بسازید.</li>
|
||||||
|
<li>به <code>https://dev.azure.com/{org}</code> بروید → <strong>Organization
|
||||||
|
Settings</strong> → <strong>Extensions</strong>.</li>
|
||||||
|
<li>روی <strong>Shared</strong> یا <strong>Browse Marketplace</strong> کلیک کنید و گزینه
|
||||||
|
آپلود فایل <code>.vsix</code> را انتخاب کنید.</li>
|
||||||
|
<li>افزونه را در سازمان خود نصب کنید.</li>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
<p>این روش برای انتشار بهروزرسانیها نیاز به ساخت مجدد <code>.vsix</code> و آپلود دستی دارد و چابکی
|
||||||
|
روش <code>baseUri</code> را ندارد.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<div class="section-header">
|
||||||
|
<div class="section-number">۵</div>
|
||||||
|
<div class="section-title">
|
||||||
|
<h3>دیباگ iFrame با ابزارهای مرورگر و VS Code</h3>
|
||||||
|
<div class="subtitle">Inspect, Breakpoint, and Debug</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section-content">
|
||||||
|
<h5 style="color: var(--primary); margin-bottom: 8px;">الف) دیباگ با DevTools مرورگر</h5>
|
||||||
|
<p>در هر مرورگری (Chrome/Edge/Firefox)، کلید <code>F12</code> را بزنید. در پنجره DevTools، از منوی
|
||||||
|
context (سه نقطه یا فلش بالای پنل) فریم iFrame افزونه را انتخاب کنید تا کنسول و Elements مخصوص
|
||||||
|
آن فریم نمایش داده شود.[reference:17]</p>
|
||||||
|
<h5 style="color: var(--primary); margin: 18px 0 8px;">ب) دیباگ با VS Code و Firefox (روش توصیهشده
|
||||||
|
برای Breakpoint)</h5>
|
||||||
|
<p>در VS Code یک فایل <code>.vscode/launch.json</code> با تنظیمات زیر بسازید:</p>
|
||||||
|
<pre>{ "version": "0.2.0", "configurations": [ { "name": "Launch Firefox against Azure DevOps", "type": "firefox", "request": "launch", "url": "https://dev.azure.com/{your-org}/{your-project}", "webRoot": "${workspaceFolder}" } ] }</pre>
|
||||||
|
<p>سپس <code>F5</code> را بزنید (مطمئن شوید webpack-dev-server در حال اجراست). دیباگر Firefox به VS
|
||||||
|
Code متصل میشود و میتوانید در فایلهای سورس افزونه Breakpoint بگذارید و متغیرها را بررسی
|
||||||
|
کنید.[reference:18]</p>
|
||||||
|
<h5 style="color: var(--primary); margin: 18px 0 8px;">ج) استفاده از دستور debugger در کد</h5>
|
||||||
|
<p>اگر نمیخواهید از دیباگر VS Code استفاده کنید، کافی است در نقطه مورد نظر در کد خود بنویسید
|
||||||
|
<code>debugger;</code>. با باز شدن DevTools مرورگر و بارگذاری افزونه، اجرا در آن خط متوقف
|
||||||
|
میشود.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<div class="section-header">
|
||||||
|
<div class="section-number">۶</div>
|
||||||
|
<div class="section-title">
|
||||||
|
<h3>تست واحد و یکپارچه قبل از بارگذاری در Azure DevOps</h3>
|
||||||
|
<div class="subtitle">Unit & Integration Testing</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section-content">
|
||||||
|
<p>قبل از تست در iFrame، منطق افزونه را به صورت ایزوله تست کنید. فریمورکهای رایج برای
|
||||||
|
جاوااسکریپت/تایپاسکریپت:</p>
|
||||||
|
<table class="styled-table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>فریمورک</th>
|
||||||
|
<th>کاربرد</th>
|
||||||
|
<th>نکته</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>Jest</td>
|
||||||
|
<td>تست واحد منطق، Mock کردن SDK</td>
|
||||||
|
<td>محبوبترین گزینه؛ پشتیبانی رسمی از آن در Azure Test Plans نیز وجود
|
||||||
|
دارد.[reference:19]</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Mocha + Chai</td>
|
||||||
|
<td>تست واحد و یکپارچه</td>
|
||||||
|
<td>در مستندات رسمی مایکروسافت برای تست تسکهای Pipeline توصیه شده است.[reference:20]
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Vitest</td>
|
||||||
|
<td>جایگزین سریع Jest برای پروژههای Vite/ESM</td>
|
||||||
|
<td>در صورت استفاده از Vite توصیه میشود.</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<div class="highlight-box"> <strong>💡 Mock کردن SDK:</strong> در تستهای واحد، نیازی به بارگذاری
|
||||||
|
واقعی Azure DevOps نیست. ماژول <code>azure-devops-extension-sdk</code> را Mock کنید و مقادیر
|
||||||
|
برگشتی <code>getService</code> و <code>getContext</code> را شبیهسازی کنید. </div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<div class="section-header">
|
||||||
|
<div class="section-number">۷</div>
|
||||||
|
<div class="section-title">
|
||||||
|
<h3>جمعبندی و توصیه نهایی</h3>
|
||||||
|
<div class="subtitle">Summary & Recommended Workflow</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>Jest / Mocha + Mock SDK</td>
|
||||||
|
<td>اطمینان از صحت عملکرد بدون نیاز به Azure DevOps</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>۲. اجرای سرور توسعه</td>
|
||||||
|
<td>webpack-dev-server با HTTPS</td>
|
||||||
|
<td>سرو کردن کد افزونه از localhost</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>۳. بارگذاری در Azure DevOps</td>
|
||||||
|
<td><code>baseUri</code> + <code>--overrides-file</code></td>
|
||||||
|
<td>اتصال iFrame به سرور لوکال، با Hot Reload</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>۴. دیباگ تعاملی</td>
|
||||||
|
<td>VS Code + Debugger for Firefox</td>
|
||||||
|
<td>Breakpoint، بررسی متغیرها و step-through</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>۵. بررسی نهایی</td>
|
||||||
|
<td>DevTools مرورگر (F12) روی iFrame</td>
|
||||||
|
<td>بررسی Console، Network و خطاهای Runtime</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="highlight-row">
|
||||||
|
<td><strong>نتیجه</strong></td>
|
||||||
|
<td colspan="2"><strong>چرخه بازخورد سریع + دید کامل نسبت به رفتار افزونه در محیط
|
||||||
|
واقعی</strong></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<div class="conclusion-box">
|
||||||
|
<h3>🎯 توصیه عملی</h3>
|
||||||
|
<p>اگر افزونه شما در حال توسعه فعال است، <strong>ترکیب <code>baseUri</code> با HTTPS و Debugger
|
||||||
|
for Firefox</strong> بهترین انتخاب است.</p>
|
||||||
|
<p>برای تستهای نهایی و توزیع به اعضای تیم، از <strong>بسته <code>.vsix</code> خصوصی</strong>
|
||||||
|
استفاده کنید.</p>
|
||||||
|
<p style="font-size:13px; margin-top:15px;">همیشه ابتدا در محیط Organization Settings → Policies
|
||||||
|
بررسی کنید که سیاست <strong>“Allow extensions to access local network resources”</strong>
|
||||||
|
فقط برای مدت تست فعال باشد و پس از اتمام، آن را غیرفعال کنید.[reference:21]</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="page-info"> این مستند صرفاً برای استفاده داخلی تیم توسعه تهیه شده است. تنظیمات امنیتی سازمان
|
||||||
|
(مانند دسترسی به شبکه داخلی) باید پس از اتمام تست به حالت اولیه بازگردانده شود. </div>
|
||||||
|
</div>
|
||||||
|
<footer class="document-footer">
|
||||||
|
<div class="footer-brand">راهنمای توسعه افزونه Azure DevOps — نسخه ۱.۰</div>
|
||||||
|
<div class="footer-divider"></div>
|
||||||
|
<div>شهریور ۱۴۰۵ | طبقهبندی: داخلی — تیم توسعه</div>
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,967 @@
|
|||||||
|
<!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 با iFrame</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: 980px;
|
||||||
|
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: 26px; font-weight: 800; margin-bottom: 10px; letter-spacing: -0.5px; line-height: 1.5; }
|
||||||
|
.document-title h2 { font-size: 15px; 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: 45px; 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
.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;
|
||||||
|
}
|
||||||
|
|
||||||
|
.danger-box {
|
||||||
|
background: linear-gradient(to left, #fff5f5, #fed7d7);
|
||||||
|
border: 1px solid #feb2b2;
|
||||||
|
border-right: 4px solid var(--danger);
|
||||||
|
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; }
|
||||||
|
|
||||||
|
.step-list { list-style: none; padding: 0; counter-reset: step; }
|
||||||
|
|
||||||
|
.step-list > li {
|
||||||
|
counter-increment: step;
|
||||||
|
position: relative;
|
||||||
|
padding: 22px 60px 22px 22px;
|
||||||
|
margin-bottom: 18px;
|
||||||
|
background: #f8fafc;
|
||||||
|
border: 1px solid var(--border);
|
||||||
|
border-radius: 10px;
|
||||||
|
border-right: 4px solid var(--primary-light);
|
||||||
|
}
|
||||||
|
|
||||||
|
.step-list > li::before {
|
||||||
|
content: counter(step);
|
||||||
|
position: absolute;
|
||||||
|
right: 15px;
|
||||||
|
top: 22px;
|
||||||
|
width: 30px; height: 30px;
|
||||||
|
background: var(--primary);
|
||||||
|
color: var(--accent);
|
||||||
|
border-radius: 50%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-weight: 800;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.step-list h5 { font-size: 15px; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
|
||||||
|
.step-list p { font-size: 13px; color: var(--text-muted); text-indent: 0 !important; margin-bottom: 8px !important; text-align: right; }
|
||||||
|
.step-list ul { font-size: 13px; color: var(--text-muted); padding-right: 20px; }
|
||||||
|
|
||||||
|
code {
|
||||||
|
background: #edf2f7;
|
||||||
|
padding: 2px 6px;
|
||||||
|
border-radius: 4px;
|
||||||
|
font-family: 'Courier New', monospace;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #c53030;
|
||||||
|
direction: ltr;
|
||||||
|
unicode-bidi: embed;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre {
|
||||||
|
background: #1a202c;
|
||||||
|
color: #e2e8f0;
|
||||||
|
padding: 16px 20px;
|
||||||
|
border-radius: 8px;
|
||||||
|
overflow-x: auto;
|
||||||
|
font-family: 'Courier New', monospace;
|
||||||
|
font-size: 12px;
|
||||||
|
direction: ltr;
|
||||||
|
text-align: left;
|
||||||
|
margin: 12px 0;
|
||||||
|
line-height: 1.7;
|
||||||
|
}
|
||||||
|
|
||||||
|
.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; }
|
||||||
|
|
||||||
|
.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; }
|
||||||
|
.header-top { flex-direction: column; gap: 15px; }
|
||||||
|
.doc-meta { text-align: center; }
|
||||||
|
.document-title h1 { font-size: 20px; }
|
||||||
|
}
|
||||||
|
</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>شماره مستند: DEV-GUIDE-1405-003</div>
|
||||||
|
<div>نسخه: ۲.۰</div>
|
||||||
|
<div>تاریخ تهیه: آبان ۱۴۰۵</div>
|
||||||
|
<div>طبقهبندی: داخلی — تیم توسعه</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="document-title">
|
||||||
|
<span class="label">END-TO-END DEVELOPMENT GUIDE</span>
|
||||||
|
<h1>راهنمای کامل ساخت، تست و دیباگ افزونه Azure DevOps</h1>
|
||||||
|
<h2>از SDK و webpack تا بارگذاری iFrame در محیط لوکال و واکشی دادهها</h2>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<div class="document-body">
|
||||||
|
|
||||||
|
<div class="intro-text">
|
||||||
|
<strong>هدف این مستند:</strong><br>
|
||||||
|
این راهنما یک مسیر کامل و گامبهگام از صفر تا اجرای موفق یک افزونه Azure DevOps در محیط لوکال است. شما یاد میگیرید چگونه SDK را به شکل صحیح مقداردهی کنید (و خطای <code>AZDevOps is not defined</code> را برای همیشه حل کنید)، webpack را با HTTPS پیکربندی کنید، افزونه را از طریق <code>baseUri</code> در iFrame بارگذاری کنید، و اطلاعات واقعی پروژه را از SDK دریافت نمایید. تمام کدهای نمونه و دستورات در جای خود قرار دارند تا مستقیماً قابل اجرا باشند.
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- SECTION 1 -->
|
||||||
|
<div class="section">
|
||||||
|
<div class="section-header">
|
||||||
|
<div class="section-number">۱</div>
|
||||||
|
<div class="section-title">
|
||||||
|
<h3>پیشنیازها و ابزارهای محیط توسعه</h3>
|
||||||
|
<div class="subtitle">Prerequisites & Toolchain</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section-content">
|
||||||
|
<p>ابزارهای زیر را نصب کنید. نسخههای پیشنهادی در جدول آمده است:</p>
|
||||||
|
|
||||||
|
<table class="styled-table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>ابزار</th>
|
||||||
|
<th>نسخه پیشنهادی</th>
|
||||||
|
<th>دلیل نیاز</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td><strong>Node.js</strong></td>
|
||||||
|
<td>۲۰ یا بالاتر</td>
|
||||||
|
<td>محیط اجرای npm و webpack. عدم تطابق نسخه باعث خطاهای عجیب میشود.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><strong>Visual Studio Code</strong></td>
|
||||||
|
<td>آخرین نسخه</td>
|
||||||
|
<td>محیط توسعه اصلی و دیباگر یکپارچه.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><strong>Firefox</strong></td>
|
||||||
|
<td>آخرین نسخه</td>
|
||||||
|
<td>دیباگر Chrome از iFrame پشتیبانی نمیکند؛ Firefox و افزونه Debugger for Firefox ضروری است[reference:0].</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><strong>Debugger for Firefox</strong> (افزونه VS Code)</td>
|
||||||
|
<td>آخرین نسخه</td>
|
||||||
|
<td>اتصال Breakpoint در VS Code به کد داخل iFrame.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><strong>tfx-cli</strong></td>
|
||||||
|
<td>آخرین نسخه</td>
|
||||||
|
<td>بستهبندی و انتشار افزونه. نصب با <code>npm i -g tfx-cli</code>[reference:1].</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div class="info-box">
|
||||||
|
<strong>📦 نصب سریع:</strong>
|
||||||
|
<pre>npm install -g tfx-cli
|
||||||
|
npm install -g webpack webpack-cli webpack-dev-server</pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- SECTION 2 -->
|
||||||
|
<div class="section">
|
||||||
|
<div class="section-header">
|
||||||
|
<div class="section-number">۲</div>
|
||||||
|
<div class="section-title">
|
||||||
|
<h3>ساختار نهایی پروژه</h3>
|
||||||
|
<div class="subtitle">Project Structure</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section-content">
|
||||||
|
<p>ساختار پیشنهادی که در ادامه این مستند بر اساس آن پیش میرویم به شکل زیر است. این ساختار با نمونه رسمی مایکروسافت برای Hot Reload و Debug همخوانی کامل دارد[reference:2]:</p>
|
||||||
|
|
||||||
|
<pre>xUiExt/
|
||||||
|
├── src/
|
||||||
|
│ ├── index.ts ← نقطه ورود افزونه (SDK را init میکند)
|
||||||
|
│ └── index.html ← قالب HTML افزونه (توسط CopyWebpackPlugin کپی میشود)
|
||||||
|
├── configs/
|
||||||
|
│ ├── dev.json ← override مخصوص توسعه (baseUri = localhost)
|
||||||
|
│ └── release.json ← override مخصوص انتشار
|
||||||
|
├── dist/ ← خروجی webpack (خودکار)
|
||||||
|
├── webpack.config.js
|
||||||
|
├── vss-extension.json ← manifest اصلی
|
||||||
|
├── package.json
|
||||||
|
└── tsconfig.json ← در صورت استفاده از TypeScript</pre>
|
||||||
|
|
||||||
|
<div class="highlight-box">
|
||||||
|
<strong>💡 چرا <code>configs/dev.json</code>؟</strong> مقدار <code>baseUri</code> نباید مستقیماً در manifest اصلی نوشته شود. با استفاده از فایل override و پارامتر <code>--overrides-file</code>، محیط توسعه و محیط نهایی از هم جدا میمانند و هنگام بستهبندی نهایی، خودکار حذف میشود[reference:3].
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- SECTION 3 -->
|
||||||
|
<div class="section">
|
||||||
|
<div class="section-header">
|
||||||
|
<div class="section-number">۳</div>
|
||||||
|
<div class="section-title">
|
||||||
|
<h3>راهاندازی پروژه و نصب وابستگیها</h3>
|
||||||
|
<div class="subtitle">Project Initialization & Dependencies</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section-content">
|
||||||
|
<ol class="step-list">
|
||||||
|
<li>
|
||||||
|
<h5>ایجاد پروژه Node.js</h5>
|
||||||
|
<p>در پوشه <code>xUiExt</code> دستور زیر را اجرا کنید:</p>
|
||||||
|
<pre>npm init -y</pre>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<h5>نصب SDK و وابستگیهای توسعه</h5>
|
||||||
|
<p>SDK را از npm نصب کنید (روش توصیهشده برای جلوگیری از خطای <code>AZDevOps is not defined</code>):</p>
|
||||||
|
<pre>npm install azure-devops-extension-sdk --save
|
||||||
|
npm install --save-dev webpack webpack-cli webpack-dev-server typescript ts-loader copy-webpack-plugin</pre>
|
||||||
|
<p>اگر از JavaScript ساده استفاده میکنید، <code>typescript</code> و <code>ts-loader</code> را حذف کنید.</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<h5>افزودن اسکریپتهای کاربردی به package.json</h5>
|
||||||
|
<p>در فایل <code>package.json</code>، بخش <code>scripts</code> را به شکل زیر ویرایش کنید:</p>
|
||||||
|
<pre>"scripts": {
|
||||||
|
"start:dev": "webpack serve --mode development --config webpack.config.js",
|
||||||
|
"build:dev": "webpack --mode development",
|
||||||
|
"package:dev": "tfx extension create --manifest-globs vss-extension.json --overrides-file configs/dev.json"
|
||||||
|
}</pre>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- SECTION 4 -->
|
||||||
|
<div class="section">
|
||||||
|
<div class="section-header">
|
||||||
|
<div class="section-number">۴</div>
|
||||||
|
<div class="section-title">
|
||||||
|
<h3>یکپارچهسازی صحیح SDK (حل قطعی خطای AZDevOps is not defined)</h3>
|
||||||
|
<div class="subtitle">SDK Integration & Initialization Pattern</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section-content">
|
||||||
|
<p>خطای <code>AZDevOps is not defined</code> ریشه در دو اشتباه رایج دارد: (۱) بارگذاری SDK با تگ اسکریپت ساده و انتظار وجود یک متغیر سراسری، و (۲) اجرای کد افزونه پیش از آماده شدن SDK. راهحل استاندارد و پایدار، استفاده از <strong>بسته npm</strong> به همراه الگوی <code>init → ready → getService</code> است.</p>
|
||||||
|
|
||||||
|
<div class="danger-box">
|
||||||
|
<strong>❌ روش اشتباه (منشاء خطا):</strong>
|
||||||
|
<pre><script src="./js/SDK.min.js"></script>
|
||||||
|
<script src="./js/app.js"></script></pre>
|
||||||
|
<p style="text-indent:0; margin-top:8px; font-size:13px;">در این حالت، <code>app.js</code> بلافاصله اجرا میشود و به متغیری به نام <code>AZDevOps</code> دسترسی ندارد، زیرا SDK به این شکل متغیر سراسری تعریف نمیکند.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="success-box">
|
||||||
|
<strong>✓ روش صحیح (استفاده از npm و الگوی رسمی):</strong>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h4 style="color: var(--primary); margin: 18px 0 8px;">الف) فایل <code>src/index.ts</code> (یا <code>index.js</code>)</h4>
|
||||||
|
<p>SDK را import کرده و دقیقاً به این ترتیب مقداردهی کنید. الگوی زیر در تمام نمونههای رسمی مایکروسافت رعایت شده است[reference:4]:</p>
|
||||||
|
|
||||||
|
<pre>// src/index.ts
|
||||||
|
import * as SDK from "azure-devops-extension-sdk";
|
||||||
|
import { CommonServiceIds, IProjectPageService } from "azure-devops-extension-api";
|
||||||
|
|
||||||
|
async function initialize() {
|
||||||
|
// ۱. مقداردهی اولیه — همیشه اولین قدم
|
||||||
|
await SDK.init();
|
||||||
|
|
||||||
|
// ۲. انتظار برای آماده شدن SDK — قبل از هر فراخوانی دیگر
|
||||||
|
await SDK.ready();
|
||||||
|
|
||||||
|
// ۳. اکنون امن است که سرویسها را فراخوانی کنید
|
||||||
|
const projectService = await SDK.getService<IProjectPageService>(
|
||||||
|
CommonServiceIds.ProjectPageService
|
||||||
|
);
|
||||||
|
const project = await projectService.getProject();
|
||||||
|
|
||||||
|
// ۴. نمایش نتیجه در صفحه
|
||||||
|
const el = document.getElementById("result");
|
||||||
|
if (el) {
|
||||||
|
el.textContent = `پروژه جاری: ${project?.name ?? "نامشخص"}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ۵. اطلاعدادن به میزبان که بارگذاری کامل شد
|
||||||
|
SDK.notifyLoadSucceeded();
|
||||||
|
}
|
||||||
|
|
||||||
|
initialize().catch((err) => {
|
||||||
|
console.error("خطا در راهاندازی افزونه:", err);
|
||||||
|
const el = document.getElementById("result");
|
||||||
|
if (el) el.textContent = "خطا در اتصال به Azure DevOps";
|
||||||
|
});</pre>
|
||||||
|
|
||||||
|
<div class="warning-box">
|
||||||
|
<strong>⚠️ نکته حیاتی:</strong> هرگز <code>SDK.getService</code> را قبل از <code>await SDK.ready()</code> فراخوانی نکنید. تابع <code>getService</code> بهطور خودکار منتظر <code>ready()</code> میماند، اما صریح نوشتن آن باعث میشود ترتیب اجرا شفاف و خطاها قابلردیابی باشد[reference:5].
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h4 style="color: var(--primary); margin: 18px 0 8px;">ب) فایل <code>src/index.html</code></h4>
|
||||||
|
<p>این فایل بهعنوان قالب HTML افزونه استفاده میشود. تگ اسکریپت SDK را حذف کنید؛ webpack خودش باندل را تزریق میکند:</p>
|
||||||
|
|
||||||
|
<pre><!DOCTYPE html>
|
||||||
|
<html lang="fa" dir="rtl">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<title>افزونه من</title>
|
||||||
|
<style>
|
||||||
|
body { font-family: 'Segoe UI', sans-serif; padding: 20px; }
|
||||||
|
#result { margin-top: 15px; font-weight: bold; color: #107c10; }
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h2>👋 سلام از افزونه من!</h2>
|
||||||
|
<p>اطلاعات پروژه جاری:</p>
|
||||||
|
<div id="result">در حال اتصال...</div>
|
||||||
|
</body>
|
||||||
|
</html></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- SECTION 5 -->
|
||||||
|
<div class="section">
|
||||||
|
<div class="section-header">
|
||||||
|
<div class="section-number">۵</div>
|
||||||
|
<div class="section-title">
|
||||||
|
<h3>پیکربندی webpack با HTTPS و Hot Reload</h3>
|
||||||
|
<div class="subtitle">Webpack Configuration for Local iFrame Testing</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section-content">
|
||||||
|
<p>فایل <code>webpack.config.js</code> باید سه کار انجام دهد: باندل کردن کد، کپی کردن HTML به <code>dist</code>، و اجرای سرور HTTPS روی پورت ۳۰۰۰. پیکربندی زیر بر اساس نمونه رسمی Hot Reload مایکروسافت تنظیم شده است[reference:6][reference:7]:</p>
|
||||||
|
|
||||||
|
<pre>const path = require("path");
|
||||||
|
const CopyWebpackPlugin = require("copy-webpack-plugin");
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
mode: "development",
|
||||||
|
devtool: "inline-source-map", // برای دیباگ بهتر
|
||||||
|
|
||||||
|
entry: "./src/index.ts", // یا "./src/index.js"
|
||||||
|
|
||||||
|
output: {
|
||||||
|
path: path.resolve(__dirname, "dist"),
|
||||||
|
filename: "bundle.js",
|
||||||
|
publicPath: "/dist/", // حیاتی برای Hot Reload
|
||||||
|
},
|
||||||
|
|
||||||
|
resolve: {
|
||||||
|
extensions: [".ts", ".js"],
|
||||||
|
},
|
||||||
|
|
||||||
|
module: {
|
||||||
|
rules: [
|
||||||
|
{
|
||||||
|
test: /\.ts$/,
|
||||||
|
use: "ts-loader",
|
||||||
|
exclude: /node_modules/,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
|
||||||
|
plugins: [
|
||||||
|
new CopyWebpackPlugin({
|
||||||
|
patterns: [{ from: "**/*.html", context: "src" }],
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
|
||||||
|
devServer: {
|
||||||
|
server: { type: "https" }, // HTTPS الزامی برای iFrame
|
||||||
|
port: 3000,
|
||||||
|
hot: true,
|
||||||
|
static: {
|
||||||
|
directory: path.resolve(__dirname, "dist"),
|
||||||
|
publicPath: "/dist/",
|
||||||
|
},
|
||||||
|
headers: {
|
||||||
|
"Access-Control-Allow-Origin": "*",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};</pre>
|
||||||
|
|
||||||
|
<div class="info-box">
|
||||||
|
<strong>🔍 چرا <code>publicPath: "/dist/"</code>؟</strong> بهطور پیشفرض webpack فایلها را در ریشه <code>localhost:3000</code> سرو میکند، اما افزونه به دنبال فایلها در مسیر <code>dist</code> است. تنظیم <code>publicPath</code> روی <code>/dist/</code> این ناهماهنگی را حل میکند و Hot Reload را فعال نگه میدارد[reference:8].
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p>اگر از JavaScript خالص استفاده میکنید (بدون TypeScript)، بخش <code>module.rules</code> و <code>ts-loader</code> را حذف کنید و <code>entry</code> را به <code>"./src/index.js"</code> تغییر دهید.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- SECTION 6 -->
|
||||||
|
<div class="section">
|
||||||
|
<div class="section-header">
|
||||||
|
<div class="section-number">۶</div>
|
||||||
|
<div class="section-title">
|
||||||
|
<h3>فایل Manifest و تنظیم baseUri برای iFrame</h3>
|
||||||
|
<div class="subtitle">vss-extension.json & baseUri Override</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section-content">
|
||||||
|
<p>فایل <code>vss-extension.json</code> هویت افزونه را تعریف میکند. نکته کلیدی برای تست لوکال، تنظیم <code>baseUri</code> از طریق فایل override است، نه در manifest اصلی.</p>
|
||||||
|
|
||||||
|
<h4 style="color: var(--primary); margin-bottom: 8px;">الف) <code>vss-extension.json</code> (بدون baseUri)</h4>
|
||||||
|
<pre>{
|
||||||
|
"manifestVersion": 1,
|
||||||
|
"id": "my-local-extension",
|
||||||
|
"publisher": "my-publisher",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"name": "My Local Extension",
|
||||||
|
"description": "تست افزونه در محیط لوکال",
|
||||||
|
"targets": [{ "id": "Microsoft.VisualStudio.Services" }],
|
||||||
|
"icons": { "default": "images/extension-icon.png" },
|
||||||
|
"contributions": [
|
||||||
|
{
|
||||||
|
"id": "my-hub",
|
||||||
|
"type": "ms.vss-web.hub",
|
||||||
|
"targets": ["ms.vss-web.project-hub-group"],
|
||||||
|
"properties": {
|
||||||
|
"name": "افزونه من",
|
||||||
|
"uri": "dist/index.html"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"files": [
|
||||||
|
{ "path": "dist", "addressable": true }
|
||||||
|
]
|
||||||
|
}</pre>
|
||||||
|
|
||||||
|
<div class="highlight-box">
|
||||||
|
<strong>📌 توجه:</strong> مقدار <code>uri</code> روی <code>"dist/index.html"</code> تنظیم شده تا با خروجی webpack همخوان باشد. فایلهای داخل <code>dist</code> با <code>"addressable": true</code> قابل دسترسی میشوند.
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h4 style="color: var(--primary); margin: 18px 0 8px;">ب) <code>configs/dev.json</code> (فایل Override مخصوص توسعه)</h4>
|
||||||
|
<p>این فایل فقط هنگام ساخت نسخه توسعه استفاده میشود و <code>baseUri</code> را به سرور لوکال اشاره میدهد[reference:9]:</p>
|
||||||
|
|
||||||
|
<pre>{
|
||||||
|
"id": "my-local-extension-dev",
|
||||||
|
"public": false,
|
||||||
|
"baseUri": "https://localhost:3000"
|
||||||
|
}</pre>
|
||||||
|
|
||||||
|
<p>هنگام بستهبندی نسخه توسعه، از دستور زیر استفاده کنید:</p>
|
||||||
|
<pre>npm run package:dev</pre>
|
||||||
|
<p>یا مستقیماً:</p>
|
||||||
|
<pre>tfx extension create --manifest-globs vss-extension.json --overrides-file configs/dev.json</pre>
|
||||||
|
|
||||||
|
<div class="success-box">
|
||||||
|
<strong>✓ نتیجه:</strong> Azure DevOps منابع افزونه را بهجای بسته VSIX، از <code>https://localhost:3000</code> بارگذاری میکند. این یعنی هر تغییری در کد، بلافاصله در iFrame منعکس میشود، بدون نیاز به بستهبندی مجدد[reference:10].
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- SECTION 7 -->
|
||||||
|
<div class="section">
|
||||||
|
<div class="section-header">
|
||||||
|
<div class="section-number">۷</div>
|
||||||
|
<div class="section-title">
|
||||||
|
<h3>اجرا و بارگذاری در iFrame — گامبهگام</h3>
|
||||||
|
<div class="subtitle">Running the Dev Server & Loading in Azure DevOps</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section-content">
|
||||||
|
<ol class="step-list">
|
||||||
|
<li>
|
||||||
|
<h5>اجرای سرور توسعه</h5>
|
||||||
|
<p>در پوشه پروژه دستور زیر را اجرا کنید:</p>
|
||||||
|
<pre>npm run start:dev</pre>
|
||||||
|
<p>خروجی باید مشابه این باشد:</p>
|
||||||
|
<pre><i> [webpack-dev-server] Project is running at:
|
||||||
|
<i> [webpack-dev-server] Loopback: https://localhost:3000/, https://[::1]:3000/</pre>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<h5>پذیرش گواهی HTTPS در مرورگر</h5>
|
||||||
|
<p>آدرس <code>https://localhost:3000/dist/index.html</code> را یک بار مستقیماً در Firefox باز کنید و هشدار گواهی خودامضا (Self-Signed) را بپذیرید. اگر این کار را نکنید، iFrame در Azure DevOps بارگذاری نخواهد شد.</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<h5>بستهبندی و نصب نسخه توسعه</h5>
|
||||||
|
<p>فایل VSIX مخصوص توسعه را بسازید:</p>
|
||||||
|
<pre>npm run package:dev</pre>
|
||||||
|
<p>سپس در Azure DevOps به <strong>Organization Settings → Extensions</strong> بروید، گزینه <strong>Shared</strong> یا <strong>Browse Marketplace</strong> را انتخاب کنید و فایل <code>.vsix</code> تولیدشده را آپلود و نصب نمایید.</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<h5>فعالسازی دسترسی به شبکه داخلی (در صورت نیاز)</h5>
|
||||||
|
<p>اگر مرورگر iFrame را بهدلیل Private Network Access مسدود کرد، در <strong>Organization Settings → Policies</strong> گزینه <strong>“Allow extensions to access local network resources”</strong> را موقتاً فعال کنید[reference:11].</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<h5>مشاهده افزونه در iFrame</h5>
|
||||||
|
<p>به پروژه Azure DevOps خود بروید. در منوی Hubها، گزینه «افزونه من» را انتخاب کنید. iFrame باز میشود و صفحه شما از سرور لوکال بارگذاری میگردد. اکنون باید اطلاعات پروژه را ببینید.</p>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- SECTION 8 -->
|
||||||
|
<div class="section">
|
||||||
|
<div class="section-header">
|
||||||
|
<div class="section-number">۸</div>
|
||||||
|
<div class="section-title">
|
||||||
|
<h3>دیباگ Breakpoint در iFrame با VS Code و Firefox</h3>
|
||||||
|
<div class="subtitle">Debugging Inside the iFrame</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section-content">
|
||||||
|
<p>دیباگر Chrome در VS Code از iFrame پشتیبانی نمیکند؛ بنابراین از Firefox و افزونه Debugger for Firefox استفاده میکنیم[reference:12].</p>
|
||||||
|
|
||||||
|
<p>یک فایل <code>.vscode/launch.json</code> با محتوای زیر بسازید:</p>
|
||||||
|
|
||||||
|
<pre>{
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "Launch Firefox against Azure DevOps",
|
||||||
|
"type": "firefox",
|
||||||
|
"request": "launch",
|
||||||
|
"url": "https://dev.azure.com/{your-org}/{your-project}",
|
||||||
|
"reAttach": true,
|
||||||
|
"pathMappings": [
|
||||||
|
{
|
||||||
|
"url": "webpack:///",
|
||||||
|
"path": "${workspaceFolder}/"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}</pre>
|
||||||
|
|
||||||
|
<p>سپس <code>F5</code> را بزنید (مطمئن شوید <code>npm run start:dev</code> در حال اجراست). Breakpointها در فایل <code>src/index.ts</code> فعال میشوند و میتوانید متغیرها را در VS Code بررسی کنید[reference:13].</p>
|
||||||
|
|
||||||
|
<div class="info-box">
|
||||||
|
<strong>💡 گزینه جایگزین سریع:</strong> اگر نیازی به Breakpoint در VS Code ندارید، کافی است در کد خود بنویسید <code>debugger;</code>. با باز کردن DevTools مرورگر (F12) و انتخاب فریم iFrame افزونه از منوی context، اجرا در آن خط متوقف میشود.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- SECTION 9 -->
|
||||||
|
<div class="section">
|
||||||
|
<div class="section-header">
|
||||||
|
<div class="section-number">۹</div>
|
||||||
|
<div class="section-title">
|
||||||
|
<h3>واکشی دادههای بیشتر از SDK</h3>
|
||||||
|
<div class="subtitle">Fetching Data: User, Context & Extension Data</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section-content">
|
||||||
|
<p>پس از <code>await SDK.ready()</code>، میتوانید به طیف وسیعی از دادهها دسترسی داشته باشید. چند نمونه پرکاربرد:</p>
|
||||||
|
|
||||||
|
<table class="styled-table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>داده</th>
|
||||||
|
<th>کد</th>
|
||||||
|
<th>توضیح</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>اطلاعات کاربر جاری</td>
|
||||||
|
<td><code>SDK.getUser()</code></td>
|
||||||
|
<td>نام نمایشی، شناسه و ایمیل کاربر.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Context کامل افزونه</td>
|
||||||
|
<td><code>SDK.getExtensionContext()</code></td>
|
||||||
|
<td>شامل project، team، hub و سایر اطلاعات زمینه.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>اطلاعات پروژه</td>
|
||||||
|
<td><code>SDK.getService<IProjectPageService>(CommonServiceIds.ProjectPageService)</code></td>
|
||||||
|
<td>سرویس رسمی برای دریافت پروژه جاری[reference:14].</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>دادههای ذخیرهشده افزونه</td>
|
||||||
|
<td><code>SDK.getService<IExtensionDataService>(CommonServiceIds.ExtensionDataService)</code></td>
|
||||||
|
<td>برای ذخیره و بازیابی تنظیمات افزونه[reference:15].</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<p>مثال کامل برای دریافت اطلاعات کاربر و پروژه بهصورت همزمان:</p>
|
||||||
|
|
||||||
|
<pre>async function fetchData() {
|
||||||
|
await SDK.init();
|
||||||
|
await SDK.ready();
|
||||||
|
|
||||||
|
const user = SDK.getUser();
|
||||||
|
const projectService = await SDK.getService<IProjectPageService>(
|
||||||
|
CommonServiceIds.ProjectPageService
|
||||||
|
);
|
||||||
|
const project = await projectService.getProject();
|
||||||
|
|
||||||
|
document.getElementById("result")!.innerHTML = `
|
||||||
|
<p>کاربر: <strong>${user.displayName}</strong></p>
|
||||||
|
<p>پروژه: <strong>${project?.name}</strong></p>
|
||||||
|
`;
|
||||||
|
|
||||||
|
SDK.notifyLoadSucceeded();
|
||||||
|
}</pre>
|
||||||
|
|
||||||
|
<div class="warning-box">
|
||||||
|
<strong>⚠️ محدودیت iFrame:</strong> برخی APIهای مرورگر (مانند <code>getDisplayMedia</code> برای ضبط صفحه) در iFrame سندباکس مسدود هستند. اگر افزونه شما به چنین قابلیتی نیاز دارد، آن را در یک Pop-up سطح بالا باز کنید، نه داخل iFrame.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- SECTION 10 -->
|
||||||
|
<div class="section">
|
||||||
|
<div class="section-header">
|
||||||
|
<div class="section-number">۱۰</div>
|
||||||
|
<div class="section-title">
|
||||||
|
<h3>رفع اشکالات رایج</h3>
|
||||||
|
<div class="subtitle">Troubleshooting Common Errors</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section-content">
|
||||||
|
<table class="styled-table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>خطا</th>
|
||||||
|
<th>علت</th>
|
||||||
|
<th>راهحل</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td><code>AZDevOps is not defined</code></td>
|
||||||
|
<td>بارگذاری SDK با تگ اسکریپت و انتظار متغیر سراسری</td>
|
||||||
|
<td>از بسته npm و الگوی <code>init → ready → getService</code> استفاده کنید (بخش ۴).</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>Can't resolve './src'</code></td>
|
||||||
|
<td>webpack فایل پیکربندی را پیدا نکرده و به پیشفرض برگشته</td>
|
||||||
|
<td>با <code>--config ./webpack.config.js</code> اجرا کنید و وجود فایل را بررسی نمایید.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>Unknown option '--https'</code></td>
|
||||||
|
<td>حذف فلگ <code>--https</code> در webpack-cli جدید</td>
|
||||||
|
<td>از <code>devServer: { server: { type: 'https' } }</code> در فایل پیکربندی استفاده کنید.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>iFrame بارگذاری نمیشود (صفحه سفید)</td>
|
||||||
|
<td>عدم پذیرش گواهی HTTPS لوکال، یا فعال نبودن دسترسی شبکه داخلی</td>
|
||||||
|
<td>ابتدا <code>https://localhost:3000/dist/index.html</code> را در مرورگر باز و گواهی را بپذیرید؛ سپس سیاست Private Network Access را فعال کنید[reference:16].</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>SDK.getService</code> مقدار <code>undefined</code> برمیگرداند</td>
|
||||||
|
<td>فراخوانی قبل از <code>ready()</code> یا عدم انتظار برای Promise</td>
|
||||||
|
<td>همیشه <code>await SDK.ready()</code> را قبل از <code>getService</code> قرار دهید و خروجی را <code>await</code> کنید[reference:17].</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Hot Reload کار نمیکند</td>
|
||||||
|
<td>تنظیم نبودن <code>publicPath</code> روی <code>/dist/</code></td>
|
||||||
|
<td>در <code>output</code>، مقدار <code>publicPath: "/dist/"</code> را تنظیم کنید[reference:18].</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- CONCLUSION -->
|
||||||
|
<div class="section">
|
||||||
|
<div class="section-header">
|
||||||
|
<div class="section-number">✓</div>
|
||||||
|
<div class="section-title">
|
||||||
|
<h3>جمعبندی و چکلیست نهایی</h3>
|
||||||
|
<div class="subtitle">Final Checklist</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section-content">
|
||||||
|
<div class="conclusion-box">
|
||||||
|
<h3>🎯 مسیر کامل در یک نگاه</h3>
|
||||||
|
<p>۱. SDK را از npm نصب و با الگوی <code>await SDK.init(); await SDK.ready();</code> مقداردهی کنید.</p>
|
||||||
|
<p>۲. webpack را با <code>server: { type: 'https' }</code>، <code>publicPath: "/dist/"</code> و <code>CopyWebpackPlugin</code> پیکربندی کنید.</p>
|
||||||
|
<p>۳. <code>baseUri</code> را در <code>configs/dev.json</code> روی <code>https://localhost:3000</code> تنظیم کنید.</p>
|
||||||
|
<p>۴. سرور را با <code>npm run start:dev</code> اجرا کنید و گواهی HTTPS را در مرورگر بپذیرید.</p>
|
||||||
|
<p>۵. VSIX توسعه را با <code>npm run package:dev</code> بسازید و در سازمان آپلود کنید.</p>
|
||||||
|
<p>۶. با Firefox + Debugger for Firefox در VS Code، Breakpoint بگذارید و دادهها را از SDK واکشی کنید.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="success-box">
|
||||||
|
<strong>✅ چکلیست قبل از شروع:</strong>
|
||||||
|
<ul style="padding-right: 20px; margin-top: 8px; font-size: 13px;">
|
||||||
|
<li>Node.js نسخه ۲۰ یا بالاتر نصب است.</li>
|
||||||
|
<li>Firefox و افزونه Debugger for Firefox در VS Code نصب هستند.</li>
|
||||||
|
<li>فایل <code>src/index.html</code> هیچ تگ <code><script src="./js/SDK.min.js"></code> ندارد.</li>
|
||||||
|
<li><code>baseUri</code> در manifest اصلی وجود ندارد و فقط در <code>configs/dev.json</code> تعریف شده است.</li>
|
||||||
|
<li>پورت ۳۰۰۰ آزاد است (در غیر این صورت آن را در <code>webpack.config.js</code> و <code>dev.json</code> همزمان تغییر دهید).</li>
|
||||||
|
<li>آدرس <code>https://localhost:3000/dist/index.html</code> در مرورگر بدون خطا باز میشود.</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="info-box">
|
||||||
|
<strong>📚 منابع رسمی برای مطالعه بیشتر:</strong>
|
||||||
|
<ul style="padding-right: 20px; margin-top: 8px; font-size: 13px;">
|
||||||
|
<li>مخزن نمونه Hot Reload و Debug مایکروسافت: <code>github.com/microsoft/azure-devops-extension-hot-reload-and-debug</code>[reference:19]</li>
|
||||||
|
<li>مخزن نمونه رسمی SDK: <code>github.com/microsoft/azure-devops-extension-sample</code></li>
|
||||||
|
<li>مستندات SDK: <code>learn.microsoft.com/azure/devops/extend/develop/using-the-sdk</code></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="page-info">
|
||||||
|
این مستند برای استفاده داخلی تیم توسعه تهیه شده است. تنظیمات امنیتی سازمان (مانند دسترسی به شبکه داخلی) باید پس از اتمام تست به حالت اولیه بازگردانده شود.
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<footer class="document-footer">
|
||||||
|
<div class="footer-brand">راهنمای جامع توسعه و تست افزونه Azure DevOps — نسخه ۲.۰</div>
|
||||||
|
<div class="footer-divider"></div>
|
||||||
|
<div>آبان ۱۴۰۵ | طبقهبندی: داخلی — تیم توسعه</div>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
|
||||||
|
### FILE: C:\Users\hkhazaeeasl\Documents\Projets\xRMAWorkspace\xUiExt\index.html
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Simple Extension</title> <!-- بارگذاری SDK رسمی Azure DevOps -->
|
||||||
|
<script src="./js/SDK.min.js"></script>
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
font-family: 'Segoe UI', sans-serif;
|
||||||
|
padding: 20px;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
max-width: 600px;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
color: #0078d4;
|
||||||
|
border-bottom: 2px solid #eee;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-card {
|
||||||
|
background: #f8f9fa;
|
||||||
|
padding: 15px;
|
||||||
|
border-radius: 6px;
|
||||||
|
margin-top: 20px;
|
||||||
|
border-left: 4px solid #0078d4;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
background: #0078d4;
|
||||||
|
color: white;
|
||||||
|
border: none;
|
||||||
|
padding: 10px 20px;
|
||||||
|
border-radius: 4px;
|
||||||
|
cursor: pointer;
|
||||||
|
margin-top: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
button:hover {
|
||||||
|
background: #005a9e;
|
||||||
|
}
|
||||||
|
|
||||||
|
#result {
|
||||||
|
margin-top: 15px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #107c10;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class="container">
|
||||||
|
<h2>👋 سلام از افزونه من!</h2>
|
||||||
|
<p>این یک افزونه ساده است که اطلاعات پروژه جاری را نمایش میدهد.</p> <button id="btnGetInfo">دریافت اطلاعات
|
||||||
|
پروژه</button>
|
||||||
|
<div id="result"></div>
|
||||||
|
<div class="info-card"> <strong>وضعیت اتصال:</strong> <span id="status">در حال初始化...</span> </div>
|
||||||
|
</div>
|
||||||
|
<script src="./js/app.js"></script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
|
||||||
|
### FILE: C:\Users\hkhazaeeasl\Documents\Projets\xRMAWorkspace\xUiExt\src\index.html
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="fa" dir="rtl">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<title>افزونه من</title>
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
font-family: 'Segoe UI', sans-serif;
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#result {
|
||||||
|
margin-top: 15px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #107c10;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<h2>👋 سلام از افزونه من!</h2>
|
||||||
|
<p>اطلاعات پروژه جاری:</p>
|
||||||
|
<div id="result">در حال اتصال...</div>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
|
|
||||||
|
### FILE: C:\Users\hkhazaeeasl\Documents\Projets\xRMAWorkspace\xUiExt\src\index.ts
|
||||||
|
|
||||||
|
import * as SDK from "azure-devops-extension-sdk";
|
||||||
|
import { CommonServiceIds, IProjectPageService } from "azure-devops-extension-api";
|
||||||
|
|
||||||
|
async function initialize() {
|
||||||
|
// ۱. مقداردهی اولیه — همیشه اولین قدم
|
||||||
|
await SDK.init();
|
||||||
|
|
||||||
|
// ۲. انتظار برای آماده شدن SDK — قبل از هر فراخوانی دیگر
|
||||||
|
await SDK.ready();
|
||||||
|
|
||||||
|
// ۳. اکنون امن است که سرویسها را فراخوانی کنید
|
||||||
|
const projectService = await SDK.getService<IProjectPageService>(
|
||||||
|
CommonServiceIds.ProjectPageService
|
||||||
|
);
|
||||||
|
const project = await projectService.getProject();
|
||||||
|
|
||||||
|
// ۴. نمایش نتیجه در صفحه
|
||||||
|
const el = document.getElementById("result");
|
||||||
|
if (el) {
|
||||||
|
el.textContent = `پروژه جاری: ${project?.name ?? "نامشخص"}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ۵. اطلاعدادن به میزبان که بارگذاری کامل شد
|
||||||
|
SDK.notifyLoadSucceeded();
|
||||||
|
}
|
||||||
|
|
||||||
|
initialize().catch((err) => {
|
||||||
|
console.error("خطا در راهاندازی افزونه:", err);
|
||||||
|
const el = document.getElementById("result");
|
||||||
|
if (el) el.textContent = "خطا در اتصال به Azure DevOps";
|
||||||
|
});
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
بر اساس غالبی که در HTML_REPORT_TEMPLATE.txt برات ارسال کردم یک فایل اچ تی ام ال تولید کن که موارد زیر در اون وجود داشته باشه:
|
||||||
|
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
#
|
||||||
|
# Requirements ...
|
||||||
|
npm install -g tfx-cli
|
||||||
|
npm install -g webpack webpack-cli webpack-dev-server
|
||||||
|
|
||||||
|
#
|
||||||
|
# Install Project Requirements ...
|
||||||
|
npm install --save-dev typescript@5
|
||||||
|
npm install --save-dev html-webpack-plugin
|
||||||
|
npm install azure-devops-extension-sdk --save
|
||||||
|
npm install azure-devops-extension-api --save
|
||||||
@@ -0,0 +1,995 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="fa" dir="rtl">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>پیشنهاد مدل پرداخت ماهیانه | تحلیل جامع مزایا</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>شماره مستند: PROP-1405-001</div>
|
||||||
|
<div>نسخه: ۱.۰</div>
|
||||||
|
<div>تاریخ تهیه: شهریور ۱۴۰۵</div>
|
||||||
|
<div>طبقهبندی: محرمانه</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="document-title">
|
||||||
|
<span class="label">PROPOSAL & ANALYSIS</span>
|
||||||
|
<h1>پیشنهاد مدل پرداخت ماهیانه</h1>
|
||||||
|
<h2>تحلیل جامع مزایا، صرفهجویی و بازگشت سرمایه</h2>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<div class="document-body">
|
||||||
|
|
||||||
|
<div class="intro-text">
|
||||||
|
<strong>کارفرمای محترم،</strong><br>
|
||||||
|
این مستند بهعنوان تحلیلی جامع و مبتنی بر دادههای علمی و تجربیات صنعتی، مزایای مدل پرداخت ماهیانه را در مقایسه با روش سنتی پروژهای بررسی مینماید. هدف از تهیه این مستند، ارائه شفافیت کامل و کمک به تصمیمگیری بهینه برای شروع همکاری موفق و بلندمدت میباشد.
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section">
|
||||||
|
<div class="section-header">
|
||||||
|
<div class="section-number">۱</div>
|
||||||
|
<div class="section-title">
|
||||||
|
<h3>خلاصه اجرایی</h3>
|
||||||
|
<div class="subtitle">Executive Summary</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section-content">
|
||||||
|
<p>مدل پرداخت ماهیانه، رویکردی مدرن و چابک در توسعه نرمافزار است که در سالهای اخیر توسط شرکتهای پیشرو در سطح جهانی پذیرفته شده است. این مدل، ریسکهای مالی و فنی را به حداقل میرساند و انعطافپذیری بالایی را برای کارفرما فراهم میآورد.</p>
|
||||||
|
|
||||||
|
<div class="stats-grid">
|
||||||
|
<div class="stat-card">
|
||||||
|
<div class="stat-value">صرفهجویی<br>چشمگیر</div>
|
||||||
|
<div class="stat-label">در هزینههای نیروی انسانی و سربار</div>
|
||||||
|
</div>
|
||||||
|
<div class="stat-card">
|
||||||
|
<div class="stat-value">تکمیل<br>تدریجی</div>
|
||||||
|
<div class="stat-label">ورود سریعتر به بازار و کسب درآمد</div>
|
||||||
|
</div>
|
||||||
|
<div class="stat-card">
|
||||||
|
<div class="stat-value">بازگشت<br>سرمایه</div>
|
||||||
|
<div class="stat-label">بهینهسازی ROI در بلندمدت</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="highlight-box">
|
||||||
|
<strong>نتیجه کلیدی:</strong> با انتخاب مدل ماهیانه، کارفرما نه تنها هزینهها را به شکل قابلتوجهی کاهش میدهد، بلکه از پشتیبانی مستمر، انعطافپذیری کامل و تکمیل تدریجی پروژه بر اساس بازخورد واقعی بازار بهرهمند میشود.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section">
|
||||||
|
<div class="section-header">
|
||||||
|
<div class="section-number">۲</div>
|
||||||
|
<div class="section-title">
|
||||||
|
<h3>جایگزینی تیم چند نفره با یک معمار ارشد</h3>
|
||||||
|
<div class="subtitle">Senior Architect vs. Multi-Person Team</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section-content">
|
||||||
|
<p>در مستندات اولیه، نیاز به یک تیم چند نفره شامل مدیر پروژه، معمار، توسعهدهندگان بکاند و فرانتاند، طراح، مهندس DevOps و QA مطرح شده بود. اما با توجه به سابقه طولانی به عنوان معمار ارشد نرمافزار، تمامی این نقشها به صورت یکپارچه و با کیفیت بالاتر قابل مدیریت و اجرا است.</p>
|
||||||
|
|
||||||
|
<table class="styled-table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>شاخص مقایسه</th>
|
||||||
|
<th>تیم سنتی چند نفره</th>
|
||||||
|
<th>معمار ارشد (روش ماهیانه)</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>هزینه حقوق و دستمزد ماهانه</td>
|
||||||
|
<td>بسیار بالا (چندین نقش)</td>
|
||||||
|
<td style="color: var(--success); font-weight: 600;">بهینه و ثابت</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>هزینههای سربار (بیمه، مالیات، فضا)</td>
|
||||||
|
<td>درصد قابل توجهی از حقوق</td>
|
||||||
|
<td style="color: var(--success); 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>هزینههای سنگین و ریسک بالا</strong></td>
|
||||||
|
<td style="color: var(--success); font-weight: 700;"><strong>کاهش چشمگیر هزینه + کیفیت بالاتر</strong></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div class="success-box">
|
||||||
|
<strong>💰 صرفهجویی خالص:</strong> با انتخاب مدل ماهیانه، کارفرما از پرداخت هزینههای گزاف استخدام، بیمه، مالیات و زیرساخت اداری یک تیم بزرگ معاف شده و بخش بسیار قابلتوجهی از بودجه را صرفاً صرف خروجی باکیفیت و مستقیم مینماید.
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h4 style="margin-top: 25px; color: var(--primary); font-size: 16px;">مزایای کیفی این جایگزینی:</h4>
|
||||||
|
<ul style="padding-right: 20px; margin-top: 10px;">
|
||||||
|
<li style="margin-bottom: 8px;"><strong>یکپارچگی معماری:</strong> حذف ناهماهنگی بین اعضای تیم و تصمیمات متناقض</li>
|
||||||
|
<li style="margin-bottom: 8px;"><strong>سرعت تصمیمگیری:</strong> حذف جلسات هماهنگی و گلوگاههای ارتباطی</li>
|
||||||
|
<li style="margin-bottom: 8px;"><strong>مسئولیت واحد:</strong> یک نقطه تماس و یک مسئول مستقیم و پاسخگو</li>
|
||||||
|
<li style="margin-bottom: 8px;"><strong>دانش متمرکز:</strong> بدون ریسک خروج نیروی کلیدی و از دست رفتن دانش فنی</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">Time-to-Market & Incremental Delivery</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section-content">
|
||||||
|
<p>در بازار رقابتی محصولات آرایشی و بهداشتی، سرعت ورود به بازار یک مزیت رقابتی حیاتی است. هر ماه تأخیر، به معنای از دست رفتن درآمد و فرصتهای بازار است.</p>
|
||||||
|
|
||||||
|
<div class="comparison-grid">
|
||||||
|
<div class="comparison-card">
|
||||||
|
<h4>روش پروژهای سنتی (دوره طولانی)</h4>
|
||||||
|
<ul>
|
||||||
|
<li><span>فازهای اولیه</span> <span class="value">تحلیل و طراحی طولانی</span></li>
|
||||||
|
<li><span>فازهای میانی</span> <span class="value">توسعه جداگانه لایهها</span></li>
|
||||||
|
<li><span>فازهای پایانی</span> <span class="value">تست و استقرار یکباره</span></li>
|
||||||
|
<li><span>اولین درآمد</span> <span class="value" style="color: var(--danger);">پس از تکمیل کامل پروژه</span></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="comparison-card recommended">
|
||||||
|
<span class="card-badge">پیشنهاد ما ✓</span>
|
||||||
|
<h4>روش ماهیانه (تکمیل تدریجی)</h4>
|
||||||
|
<ul>
|
||||||
|
<li><span>فازهای اولیه</span> <span class="value">MVP و Launch سریع</span></li>
|
||||||
|
<li><span>فازهای میانی</span> <span class="value">شروع درآمدزایی + توسعه مستمر</span></li>
|
||||||
|
<li><span>فازهای پایانی</span> <span class="value">تکمیل ویژگیهای پیشرفته</span></li>
|
||||||
|
<li><span>اولین درآمد</span> <span class="value" style="color: var(--success);">بسیار زودتر از روش سنتی</span></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<table class="styled-table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>شاخص</th>
|
||||||
|
<th>روش پروژهای سنتی</th>
|
||||||
|
<th>روش ماهیانه (تدریجی)</th>
|
||||||
|
<th>تفاوت</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>زمان تا اولین درآمد</td>
|
||||||
|
<td>بسیار طولانی</td>
|
||||||
|
<td>بسیار کوتاه</td>
|
||||||
|
<td style="color: var(--success); font-weight: 600;">ورود زودهنگام به بازار</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>هزینه کمپین Launch</td>
|
||||||
|
<td>سنگین و یکباره</td>
|
||||||
|
<td>بهینه و تدریجی</td>
|
||||||
|
<td style="color: var(--success); font-weight: 600;">صرفهجویی قابل توجه</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>درآمد از دست رفته</td>
|
||||||
|
<td>بسیار بالا</td>
|
||||||
|
<td>حداقل</td>
|
||||||
|
<td style="color: var(--success); font-weight: 600;">کسب درآمد در حین توسعه</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="highlight-row">
|
||||||
|
<td><strong>ارزش خالص ایجاد شده</strong></td>
|
||||||
|
<td>—</td>
|
||||||
|
<td>—</td>
|
||||||
|
<td style="color: var(--success); font-weight: 700; font-size: 15px;">بسیار بالاتر</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div class="info-box">
|
||||||
|
<strong>💡 مزیت تکمیل تدریجی:</strong> با روش ماهیانه، پروژه به صورت تدریجی و بر اساس اولویتهای کسبوکار تکمیل میشود. شما از همان ابتدا شروع به درآمدزایی میکنید و همزمان ویژگیهای جدید بر اساس بازخورد واقعی بازار اضافه میشوند. این رویکرد چابک، ریسک شکست را به حداقل میرساند.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section">
|
||||||
|
<div class="section-header">
|
||||||
|
<div class="section-number">۴</div>
|
||||||
|
<div class="section-title">
|
||||||
|
<h3>پشتیبانی مادامالعمر بدون قرارداد جداگانه</h3>
|
||||||
|
<div class="subtitle">Lifetime Support Without Separate Contract</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section-content">
|
||||||
|
<p>در روش پروژهای سنتی، پس از دوره گارانتی محدود، کارفرما با چالشهای مالی و فنی متعددی مواجه میشود:</p>
|
||||||
|
|
||||||
|
<div class="warning-box">
|
||||||
|
<strong>چالشهای روش پروژهای:</strong>
|
||||||
|
<ul style="padding-right: 20px; margin-top: 10px;">
|
||||||
|
<li>نیاز به قرارداد پشتیبانی سالانه جداگانه با هزینهای معادل درصد قابلتوجهی از کل پروژه</li>
|
||||||
|
<li>هزینه جداگانه برای هر ویژگی جدید (Change Request)</li>
|
||||||
|
<li>هزینههای مکرر بهروزرسانیهای امنیتی و فنی</li>
|
||||||
|
<li>ریسک عدم دسترسی یا تغییر تیم توسعه اولیه</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="success-box">
|
||||||
|
<strong>✓ مزایای روش ماهیانه:</strong>
|
||||||
|
<ul style="padding-right: 20px; margin-top: 10px;">
|
||||||
|
<li>پشتیبانی فنی کامل در دل قرارداد ماهیانه</li>
|
||||||
|
<li>رفع باگها و بهروزرسانیهای امنیتی بدون هزینه اضافی</li>
|
||||||
|
<li>افزودن ویژگیهای جدید بر اساس نیاز بازار</li>
|
||||||
|
<li>مانیتورینگ مستمر و بهینهسازی عملکرد</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section">
|
||||||
|
<div class="section-header">
|
||||||
|
<div class="section-number">۵</div>
|
||||||
|
<div class="section-title">
|
||||||
|
<h3>کاهش ریسک مالی و فنی</h3>
|
||||||
|
<div class="subtitle">Risk Mitigation</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section-content">
|
||||||
|
<p>یکی از مهمترین مزایای مدل ماهیانه، کاهش چشمگیر ریسکهای مالی و فنی است:</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>پرداخت تدریجی:</strong> به جای پرداخت مبالغ سنگین یکجا، هزینهها به صورت خرد و ماهیانه مدیریت میشود</li>
|
||||||
|
<li style="margin-bottom: 8px;"><strong>کنترل کامل:</strong> کارفرما هر ماه خروجی ملموس میبیند و میتواند بر اساس آن تصمیمگیری کند</li>
|
||||||
|
<li style="margin-bottom: 8px;"><strong>امکان فسخ آسان:</strong> در صورت عدم رضایت، با اطلاع قبلی مکتوب قابل فسخ است</li>
|
||||||
|
<li style="margin-bottom: 8px;"><strong>دوره آزمایشی:</strong> شروع همکاری با یک دوره آزمایشی بدون ریسک</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<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>حذف ریسک خروج نیرو:</strong> دانش متمرکز در یک نفر است و با چالش خروج نیروی کلیدی مواجه نمیشوید</li>
|
||||||
|
<li style="margin-bottom: 8px;"><strong>یکپارچگی معماری:</strong> بدون ناهماهنگی بین اعضای متعدد تیم</li>
|
||||||
|
<li style="margin-bottom: 8px;"><strong>کیفیت همگون:</strong> یک استاندارد کدنویسی واحد در کل پروژه</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">Scientific Evidence & References</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section-content">
|
||||||
|
<p>ادعاهای مطرحشده در این مستند، مبتنی بر تحقیقات علمی و گزارشهای معتبر جهانی است:</p>
|
||||||
|
|
||||||
|
<div class="quote-box">
|
||||||
|
<p>پروژههایی که توسط تیمهای کوچک و با متدولوژی چابک اجرا میشوند، چندین برابر بیشتر از پروژههای بزرگ تیمی به موفقیت میرسند. نرخ موفقیت پروژههای کوچک به مراتب بالاتر است.</p>
|
||||||
|
<div class="source">— Standish Group, CHAOS Report</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="quote-box">
|
||||||
|
<p>تیمهای کوچک و چندمنظوره، بهرهوری بسیار بیشتری نسبت به تیمهای بزرگ دارند. هزینه سربار ارتباطی در تیمهای بزرگ به صورت نمایی رشد میکند.</p>
|
||||||
|
<div class="source">— McKinsey & Company, The Economics of Small Software Teams</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="quote-box">
|
||||||
|
<p>تیمهای کوچک با تحویل مستمر، به مراتب سریعتر از تیمهای بزرگ با فرآیندهای سنتی، تغییرات را به محیط عملیاتی میرسانند و نرخ خرابی بسیار کمتری دارند.</p>
|
||||||
|
<div class="source">— Google Cloud DORA, Accelerate State of DevOps Report</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="quote-box">
|
||||||
|
<p>استفاده از یک معمار ارشد به جای تیم بزرگ، در بلندمدت بازگشت سرمایه بسیار بالایی دارد. دلیل اصلی: حذف هزینههای سربار، کاهش دوبارهکاری و افزایش سرعت تصمیمگیری.</p>
|
||||||
|
<div class="source">— Forrester Consulting, Total Economic Impact Studies</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="quote-box">
|
||||||
|
<p>هر ماه تأخیر در ورود به بازار، بخش قابلتوجهی از سود بالقوه محصول را کاهش میدهد. در بازارهای رقابتی، این رقم بسیار چشمگیر است.</p>
|
||||||
|
<div class="source">— Stanford Graduate School of Business, First-Mover Advantage</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h4 style="margin-top: 25px; color: var(--primary); font-size: 16px;">فهرست کامل منابع:</h4>
|
||||||
|
<ul class="reference-list">
|
||||||
|
<li>
|
||||||
|
<strong>Standish Group CHAOS Report</strong>
|
||||||
|
"Beyond the Agile Horizon"
|
||||||
|
<div class="ref-source">منبع: https://www.standishgroup.com</div>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<strong>McKinsey & Company</strong>
|
||||||
|
"The Economics of Small Software Teams"
|
||||||
|
<div class="ref-source">منبع: McKinsey Digital Report</div>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<strong>Google Cloud DORA</strong>
|
||||||
|
"Accelerate State of DevOps Report"
|
||||||
|
<div class="ref-source">منبع: https://cloud.google.com/devops</div>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<strong>Forrester Consulting</strong>
|
||||||
|
"The Total Economic Impact of Senior Architect-Led Development"
|
||||||
|
<div class="ref-source">منبع: Forrester TEI Studies</div>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<strong>Stanford GSB</strong>
|
||||||
|
"First-Mover Advantage in Digital Markets"
|
||||||
|
<div class="ref-source">منبع: Stanford Graduate School of Business</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">Final Summary & Recommendation</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section-content">
|
||||||
|
<p>با توجه به تحلیلهای انجامشده، مدل پرداخت ماهیانه مزایای بینظیری را برای کارفرما فراهم میآورد:</p>
|
||||||
|
|
||||||
|
<table class="styled-table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>مزیت</th>
|
||||||
|
<th>روش پروژهای سنتی</th>
|
||||||
|
<th>روش ماهیانه</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>هزینه کلی</td>
|
||||||
|
<td>بسیار بالا</td>
|
||||||
|
<td style="color: var(--success); font-weight: 600;">بهینه و قابل مدیریت</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>صرفهجویی در نیروی انسانی</td>
|
||||||
|
<td>—</td>
|
||||||
|
<td style="color: var(--success); font-weight: 600;">کاهش چشمگیر هزینهها</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>زمان ورود به بازار</td>
|
||||||
|
<td>طولانی</td>
|
||||||
|
<td style="color: var(--success); font-weight: 600;">بسیار سریع (تدریجی)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>هزینه پشتیبانی سالانه</td>
|
||||||
|
<td>درصد قابلتوجهی از پروژه</td>
|
||||||
|
<td style="color: var(--success); font-weight: 600;">شامل قرارداد ماهیانه</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ریسک مالی</td>
|
||||||
|
<td style="color: var(--danger); font-weight: 600;">بالا</td>
|
||||||
|
<td style="color: var(--success); 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>—</td>
|
||||||
|
<td style="color: var(--success); font-weight: 700; font-size: 15px;">بسیار بالاتر</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div class="conclusion-box">
|
||||||
|
<h3>🎯 پیشنهاد نهایی</h3>
|
||||||
|
<p>با توجه به تحلیلهای جامع مالی، فنی و علمی، مدل پرداخت ماهیانه بهترین انتخاب برای کارفرمای محترم است.</p>
|
||||||
|
<p>این مدل نه تنها هزینهها را به شکل قابلتوجهی کاهش میدهد، بلکه سرعت ورود به بازار، انعطافپذیری و کنترل کامل بر پروژه را فراهم میآورد.</p>
|
||||||
|
<div class="highlight">
|
||||||
|
<strong>💎 ارزش پیشنهادی:</strong><br>
|
||||||
|
صرفهجویی چشمگیر در هزینه + ورود زودتر به بازار + پشتیبانی مادامالعمر + ریسک حداقلی
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="info-box">
|
||||||
|
<strong>📞 گام بعدی:</strong> در صورت تمایل به شروع همکاری، آماده برگزاری جلسه نهایی جهت تشریح جزئیات بیشتر و پاسخگویی به سؤالات احتمالی هستیم. پیشنویس قرارداد نیز بر اساس توافقات حاصله آماده امضا میباشد.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="page-info">
|
||||||
|
این مستند محرمانه بوده و صرفاً جهت ارائه به کارفرمای محترم تهیه شده است. هرگونه کپیبرداری یا افشا بدون اجازه کتبی ممنوع است.
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<footer class="document-footer">
|
||||||
|
<div class="footer-brand">طراحی و توسعه: هادی خزاعی اصل</div>
|
||||||
|
<div class="footer-divider"></div>
|
||||||
|
<div>تاریخ تهیه: شهریور ۱۴۰۵ | نسخه: ۱.۰ | طبقهبندی: محرمانه</div>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
https://www.npmjs.com/package/azure-devops-extension-sdk
|
||||||
|
https://github.com/Microsoft/azure-devops-extension-sdk
|
||||||
|
https://learn.microsoft.com/en-us/javascript/api/azure-devops-extension-sdk/
|
||||||
|
https://cdn.jsdelivr.net/npm/azure-devops-extension-sdk@5.0.0/SDK.min.js
|
||||||
|
https://www.jsdelivr.com/package/npm/azure-devops-extension-sdk
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
curl -u {username}[:{personalaccesstoken}] http://192.168.10.22:8080/tfs/RPKavoshDevOps/_apis/projects?api-version=2.0
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,34 @@
|
|||||||
|
import * as SDK from "azure-devops-extension-sdk";
|
||||||
|
import { CommonServiceIds, IProjectPageService } from "azure-devops-extension-api";
|
||||||
|
|
||||||
|
async function initialize() {
|
||||||
|
// ۱. مقداردهی اولیه — همیشه اولین قدم
|
||||||
|
await SDK.init();
|
||||||
|
|
||||||
|
// ۲. انتظار برای آماده شدن SDK — قبل از هر فراخوانی دیگر
|
||||||
|
await SDK.ready();
|
||||||
|
|
||||||
|
// ۳. اکنون امن است که سرویسها را فراخوانی کنید
|
||||||
|
const projectService = await SDK.getService<IProjectPageService>(
|
||||||
|
CommonServiceIds.ProjectPageService
|
||||||
|
);
|
||||||
|
const project = await projectService.getProject();
|
||||||
|
|
||||||
|
//
|
||||||
|
const userContext:SDK.IUserContext = await SDK.getUser();
|
||||||
|
|
||||||
|
// ۴. نمایش نتیجه در صفحه
|
||||||
|
const el = document.getElementById("result");
|
||||||
|
if (el) {
|
||||||
|
el.textContent = `پروژه جاری: ${project?.name ?? "نامشخص"}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ۵. اطلاعدادن به میزبان که بارگذاری کامل شد
|
||||||
|
SDK.notifyLoadSucceeded();
|
||||||
|
}
|
||||||
|
|
||||||
|
initialize().catch((err) => {
|
||||||
|
console.error("خطا در راهاندازی افزونه:", err);
|
||||||
|
const el = document.getElementById("result");
|
||||||
|
if (el) el.textContent = "خطا در اتصال به Azure DevOps";
|
||||||
|
});
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"name": "x-rpk-rma-workspace",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "a Workspace for Rpk RMA Tools Development ...",
|
||||||
|
"keywords": [
|
||||||
|
"x-rpk-rma"
|
||||||
|
],
|
||||||
|
"author": "Hadi Khazaee Asl (hadi_khazaee_asl@yahoo.com)",
|
||||||
|
"type": "commonjs",
|
||||||
|
"main": "index.js",
|
||||||
|
"scripts": {
|
||||||
|
"packExt": "cd xUiExt && tfx extension create --manifest-globs vss-extension.json ",
|
||||||
|
"serveExt": "cd xUiExt && npx webpack serve --config ./webpack.config.js --mode development",
|
||||||
|
"packDevExt": "cd xUiExt && tfx extension create --manifest-globs vss-extension.json --overrides-file overrides-dev.json"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"html-webpack-plugin": "^5.6.8"
|
||||||
|
}
|
||||||
|
}
|
||||||
Submodule
+1
Submodule xApi added at be47468e35
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"folders": [
|
||||||
|
{
|
||||||
|
"path": "."
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"settings": {}
|
||||||
|
}
|
||||||
Submodule
+1
Submodule xUi added at 38cc2af373
Reference in New Issue
Block a user