@peterhauge/apiops-cli 0.1.7-alpha.0 → 0.2.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (207) hide show
  1. package/LICENSE.md +22 -22
  2. package/README.md +169 -169
  3. package/dist/cli/extract-command.d.ts +0 -0
  4. package/dist/cli/extract-command.d.ts.map +0 -0
  5. package/dist/cli/extract-command.js +0 -0
  6. package/dist/cli/extract-command.js.map +0 -0
  7. package/dist/cli/index.d.ts +0 -0
  8. package/dist/cli/index.d.ts.map +0 -0
  9. package/dist/cli/index.js +0 -0
  10. package/dist/cli/index.js.map +0 -0
  11. package/dist/cli/init-command.d.ts +0 -0
  12. package/dist/cli/init-command.d.ts.map +1 -1
  13. package/dist/cli/init-command.js +2 -1
  14. package/dist/cli/init-command.js.map +1 -1
  15. package/dist/cli/publish-command.d.ts +0 -0
  16. package/dist/cli/publish-command.d.ts.map +0 -0
  17. package/dist/cli/publish-command.js +0 -0
  18. package/dist/cli/publish-command.js.map +0 -0
  19. package/dist/clients/apim-client.d.ts +25 -1
  20. package/dist/clients/apim-client.d.ts.map +1 -1
  21. package/dist/clients/apim-client.js +173 -9
  22. package/dist/clients/apim-client.js.map +1 -1
  23. package/dist/clients/artifact-store.d.ts +0 -0
  24. package/dist/clients/artifact-store.d.ts.map +0 -0
  25. package/dist/clients/artifact-store.js +0 -0
  26. package/dist/clients/artifact-store.js.map +0 -0
  27. package/dist/clients/iapim-client.d.ts +6 -0
  28. package/dist/clients/iapim-client.d.ts.map +1 -1
  29. package/dist/clients/iapim-client.js +0 -0
  30. package/dist/clients/iapim-client.js.map +0 -0
  31. package/dist/clients/iartifact-store.d.ts +0 -0
  32. package/dist/clients/iartifact-store.d.ts.map +0 -0
  33. package/dist/clients/iartifact-store.js +0 -0
  34. package/dist/clients/iartifact-store.js.map +0 -0
  35. package/dist/lib/auto-generated.d.ts +0 -0
  36. package/dist/lib/auto-generated.d.ts.map +0 -0
  37. package/dist/lib/auto-generated.js +0 -0
  38. package/dist/lib/auto-generated.js.map +0 -0
  39. package/dist/lib/cloud-config.d.ts +0 -0
  40. package/dist/lib/cloud-config.d.ts.map +0 -0
  41. package/dist/lib/cloud-config.js +0 -0
  42. package/dist/lib/cloud-config.js.map +0 -0
  43. package/dist/lib/config-loader.d.ts +0 -4
  44. package/dist/lib/config-loader.d.ts.map +1 -1
  45. package/dist/lib/config-loader.js +290 -51
  46. package/dist/lib/config-loader.js.map +1 -1
  47. package/dist/lib/dependency-graph.d.ts +0 -0
  48. package/dist/lib/dependency-graph.d.ts.map +0 -0
  49. package/dist/lib/dependency-graph.js +0 -0
  50. package/dist/lib/dependency-graph.js.map +0 -0
  51. package/dist/lib/exit-codes.d.ts +0 -0
  52. package/dist/lib/exit-codes.d.ts.map +0 -0
  53. package/dist/lib/exit-codes.js +0 -0
  54. package/dist/lib/exit-codes.js.map +0 -0
  55. package/dist/lib/logger.d.ts +0 -0
  56. package/dist/lib/logger.d.ts.map +0 -0
  57. package/dist/lib/logger.js +0 -0
  58. package/dist/lib/logger.js.map +0 -0
  59. package/dist/lib/parallel-runner.d.ts +0 -0
  60. package/dist/lib/parallel-runner.d.ts.map +0 -0
  61. package/dist/lib/parallel-runner.js +0 -0
  62. package/dist/lib/parallel-runner.js.map +0 -0
  63. package/dist/lib/resource-path.d.ts +0 -0
  64. package/dist/lib/resource-path.d.ts.map +1 -1
  65. package/dist/lib/resource-path.js +20 -2
  66. package/dist/lib/resource-path.js.map +1 -1
  67. package/dist/lib/resource-uri.d.ts +0 -0
  68. package/dist/lib/resource-uri.d.ts.map +1 -1
  69. package/dist/lib/resource-uri.js +24 -4
  70. package/dist/lib/resource-uri.js.map +1 -1
  71. package/dist/lib/user-agent.d.ts +0 -0
  72. package/dist/lib/user-agent.d.ts.map +0 -0
  73. package/dist/lib/user-agent.js +0 -0
  74. package/dist/lib/user-agent.js.map +0 -0
  75. package/dist/lib/workspace-link.d.ts +46 -0
  76. package/dist/lib/workspace-link.d.ts.map +1 -0
  77. package/dist/lib/workspace-link.js +93 -0
  78. package/dist/lib/workspace-link.js.map +1 -0
  79. package/dist/models/config.d.ts +80 -44
  80. package/dist/models/config.d.ts.map +1 -1
  81. package/dist/models/config.js +0 -0
  82. package/dist/models/config.js.map +0 -0
  83. package/dist/models/resource-types.d.ts +14 -1
  84. package/dist/models/resource-types.d.ts.map +1 -1
  85. package/dist/models/resource-types.js +11 -3
  86. package/dist/models/resource-types.js.map +1 -1
  87. package/dist/models/types.d.ts +0 -0
  88. package/dist/models/types.d.ts.map +0 -0
  89. package/dist/models/types.js +0 -0
  90. package/dist/models/types.js.map +0 -0
  91. package/dist/services/api-extractor.d.ts +19 -0
  92. package/dist/services/api-extractor.d.ts.map +1 -1
  93. package/dist/services/api-extractor.js +87 -6
  94. package/dist/services/api-extractor.js.map +1 -1
  95. package/dist/services/api-publisher.d.ts +0 -0
  96. package/dist/services/api-publisher.d.ts.map +1 -1
  97. package/dist/services/api-publisher.js +242 -62
  98. package/dist/services/api-publisher.js.map +1 -1
  99. package/dist/services/delete-unmatched-service.d.ts +0 -0
  100. package/dist/services/delete-unmatched-service.d.ts.map +0 -0
  101. package/dist/services/delete-unmatched-service.js +0 -0
  102. package/dist/services/delete-unmatched-service.js.map +0 -0
  103. package/dist/services/dry-run-reporter.d.ts +0 -0
  104. package/dist/services/dry-run-reporter.d.ts.map +0 -0
  105. package/dist/services/dry-run-reporter.js +0 -0
  106. package/dist/services/dry-run-reporter.js.map +0 -0
  107. package/dist/services/extract-service.d.ts +0 -0
  108. package/dist/services/extract-service.d.ts.map +0 -0
  109. package/dist/services/extract-service.js +0 -0
  110. package/dist/services/extract-service.js.map +0 -0
  111. package/dist/services/filter-service.d.ts +1 -0
  112. package/dist/services/filter-service.d.ts.map +1 -1
  113. package/dist/services/filter-service.js +101 -40
  114. package/dist/services/filter-service.js.map +1 -1
  115. package/dist/services/git-diff-service.d.ts +0 -0
  116. package/dist/services/git-diff-service.d.ts.map +0 -0
  117. package/dist/services/git-diff-service.js +0 -0
  118. package/dist/services/git-diff-service.js.map +0 -0
  119. package/dist/services/identity-guide-service.d.ts +1 -1
  120. package/dist/services/identity-guide-service.d.ts.map +1 -1
  121. package/dist/services/identity-guide-service.js +37 -518
  122. package/dist/services/identity-guide-service.js.map +1 -1
  123. package/dist/services/init-service.d.ts +0 -0
  124. package/dist/services/init-service.d.ts.map +1 -1
  125. package/dist/services/init-service.js +51 -19
  126. package/dist/services/init-service.js.map +1 -1
  127. package/dist/services/keyvault-checker.d.ts +0 -0
  128. package/dist/services/keyvault-checker.d.ts.map +0 -0
  129. package/dist/services/keyvault-checker.js +0 -0
  130. package/dist/services/keyvault-checker.js.map +0 -0
  131. package/dist/services/override-merger.d.ts +3 -7
  132. package/dist/services/override-merger.d.ts.map +1 -1
  133. package/dist/services/override-merger.js +198 -47
  134. package/dist/services/override-merger.js.map +1 -1
  135. package/dist/services/product-extractor.d.ts +20 -0
  136. package/dist/services/product-extractor.d.ts.map +1 -1
  137. package/dist/services/product-extractor.js +101 -5
  138. package/dist/services/product-extractor.js.map +1 -1
  139. package/dist/services/product-publisher.d.ts +0 -0
  140. package/dist/services/product-publisher.d.ts.map +1 -1
  141. package/dist/services/product-publisher.js +23 -6
  142. package/dist/services/product-publisher.js.map +1 -1
  143. package/dist/services/prompt-service.d.ts +0 -0
  144. package/dist/services/prompt-service.d.ts.map +0 -0
  145. package/dist/services/prompt-service.js +0 -0
  146. package/dist/services/prompt-service.js.map +0 -0
  147. package/dist/services/publish-service.d.ts +0 -0
  148. package/dist/services/publish-service.d.ts.map +0 -0
  149. package/dist/services/publish-service.js +38 -2
  150. package/dist/services/publish-service.js.map +1 -1
  151. package/dist/services/resource-extractor.d.ts +0 -0
  152. package/dist/services/resource-extractor.d.ts.map +0 -0
  153. package/dist/services/resource-extractor.js +0 -0
  154. package/dist/services/resource-extractor.js.map +0 -0
  155. package/dist/services/resource-publisher.d.ts +0 -0
  156. package/dist/services/resource-publisher.d.ts.map +1 -1
  157. package/dist/services/resource-publisher.js +64 -2
  158. package/dist/services/resource-publisher.js.map +1 -1
  159. package/dist/services/secret-redactor.d.ts +0 -0
  160. package/dist/services/secret-redactor.d.ts.map +0 -0
  161. package/dist/services/secret-redactor.js +0 -0
  162. package/dist/services/secret-redactor.js.map +0 -0
  163. package/dist/services/transitive-resolver.d.ts +0 -0
  164. package/dist/services/transitive-resolver.d.ts.map +1 -1
  165. package/dist/services/transitive-resolver.js +4 -4
  166. package/dist/services/transitive-resolver.js.map +1 -1
  167. package/dist/services/workspace-extractor.d.ts +0 -0
  168. package/dist/services/workspace-extractor.d.ts.map +1 -1
  169. package/dist/services/workspace-extractor.js +50 -7
  170. package/dist/services/workspace-extractor.js.map +1 -1
  171. package/dist/templates/azure-devops/extract-pipeline.d.ts +2 -1
  172. package/dist/templates/azure-devops/extract-pipeline.d.ts.map +1 -1
  173. package/dist/templates/azure-devops/extract-pipeline.js +147 -88
  174. package/dist/templates/azure-devops/extract-pipeline.js.map +1 -1
  175. package/dist/templates/azure-devops/publish-pipeline.d.ts +0 -0
  176. package/dist/templates/azure-devops/publish-pipeline.d.ts.map +1 -1
  177. package/dist/templates/azure-devops/publish-pipeline.js +116 -89
  178. package/dist/templates/azure-devops/publish-pipeline.js.map +1 -1
  179. package/dist/templates/configs/filter-config.d.ts +1 -1
  180. package/dist/templates/configs/filter-config.d.ts.map +1 -1
  181. package/dist/templates/configs/filter-config.js +109 -44
  182. package/dist/templates/configs/filter-config.js.map +1 -1
  183. package/dist/templates/configs/override-config.d.ts +0 -0
  184. package/dist/templates/configs/override-config.d.ts.map +1 -1
  185. package/dist/templates/configs/override-config.js +88 -37
  186. package/dist/templates/configs/override-config.js.map +1 -1
  187. package/dist/templates/configs/package-json.d.ts +0 -0
  188. package/dist/templates/configs/package-json.d.ts.map +0 -0
  189. package/dist/templates/configs/package-json.js +0 -0
  190. package/dist/templates/configs/package-json.js.map +0 -0
  191. package/dist/templates/copilot/identity-setup-prompt.d.ts +4 -3
  192. package/dist/templates/copilot/identity-setup-prompt.d.ts.map +1 -1
  193. package/dist/templates/copilot/identity-setup-prompt.js +59 -269
  194. package/dist/templates/copilot/identity-setup-prompt.js.map +1 -1
  195. package/dist/templates/generated/embedded-markdown.d.ts +12 -0
  196. package/dist/templates/generated/embedded-markdown.d.ts.map +1 -0
  197. package/dist/templates/generated/embedded-markdown.js +14 -0
  198. package/dist/templates/generated/embedded-markdown.js.map +1 -0
  199. package/dist/templates/github-actions/extract-workflow.d.ts +0 -0
  200. package/dist/templates/github-actions/extract-workflow.d.ts.map +0 -0
  201. package/dist/templates/github-actions/extract-workflow.js +118 -118
  202. package/dist/templates/github-actions/extract-workflow.js.map +0 -0
  203. package/dist/templates/github-actions/publish-workflow.d.ts +0 -0
  204. package/dist/templates/github-actions/publish-workflow.d.ts.map +1 -1
  205. package/dist/templates/github-actions/publish-workflow.js +104 -90
  206. package/dist/templates/github-actions/publish-workflow.js.map +1 -1
  207. package/package.json +69 -66
@@ -5,98 +5,125 @@
5
5
  * Multi-stage pipeline with commit ID choice, environment selection, and variable groups
6
6
  */
7
7
  export function generatePublishPipeline(config) {
8
+ const defaultEnvironment = config.environments[0] ?? 'dev';
8
9
  const envValues = config.environments.map((env) => ` - '${env}'`).join('\n');
9
- const stages = config.environments.map((env, idx) => {
10
- const dependsOn = idx === 0 ? '' : ` dependsOn: Publish_${config.environments[idx - 1]}\n`;
11
- return `${dependsOn}- stage: Publish_${env}
12
- displayName: 'Publish to ${env}'
13
- condition: or(eq('\${{ parameters.ENVIRONMENT }}', '${env}'), eq('\${{ parameters.ENVIRONMENT }}', 'all'))
14
- variables:
15
- - group: apim-${env}
16
- jobs:
17
- - deployment: Deploy
18
- displayName: 'Deploy to ${env}'
19
- environment: ${env}
20
- pool:
21
- vmImage: 'ubuntu-latest'
22
- strategy:
23
- runOnce:
24
- deploy:
25
- steps:
26
- - checkout: self
27
- fetchDepth: 2
28
-
29
- - task: NodeTool@0
30
- displayName: 'Setup Node.js'
31
- inputs:
32
- versionSpec: '22.x'
33
-
34
- - script: npm ci
35
- displayName: 'Install dependencies'
36
-
37
- - task: AzureCLI@2
38
- displayName: 'Publish to ${env} (incremental - last commit only)'
39
- condition: ne('\${{ parameters.COMMIT_ID_CHOICE }}', 'publish-all-artifacts-in-repo')
40
- inputs:
41
- azureSubscription: '$(AZURE_SERVICE_CONNECTION_${env.toUpperCase()})'
42
- scriptType: 'bash'
43
- scriptLocation: 'inlineScript'
44
- inlineScript: |
45
- npx apiops publish \\
46
- --resource-group $(APIM_RESOURCE_GROUP_${env.toUpperCase()}) \\
47
- --service-name $(APIM_SERVICE_NAME_${env.toUpperCase()}) \\
48
- --source ${config.artifactDir} \\
49
- --overrides configuration.${env}.yaml \\
50
- --commit-id $(Build.SourceVersion) \\
51
- --subscription-id $(AZURE_SUBSCRIPTION_ID)
52
-
53
- - task: AzureCLI@2
54
- displayName: 'Publish to ${env} (all artifacts)'
55
- condition: eq('\${{ parameters.COMMIT_ID_CHOICE }}', 'publish-all-artifacts-in-repo')
56
- inputs:
57
- azureSubscription: '$(AZURE_SERVICE_CONNECTION_${env.toUpperCase()})'
58
- scriptType: 'bash'
59
- scriptLocation: 'inlineScript'
60
- inlineScript: |
61
- npx apiops publish \\
62
- --resource-group $(APIM_RESOURCE_GROUP_${env.toUpperCase()}) \\
63
- --service-name $(APIM_SERVICE_NAME_${env.toUpperCase()}) \\
64
- --source ${config.artifactDir} \\
65
- --overrides configuration.${env}.yaml \\
66
- --subscription-id $(AZURE_SUBSCRIPTION_ID)
10
+ const stages = config.environments.map((env) => {
11
+ const envUpper = env.toUpperCase();
12
+ return `- stage: Publish_${env}
13
+ displayName: 'Publish to ${env}'
14
+ condition: eq('\${{ parameters.ENVIRONMENT }}', '${env}')
15
+ variables:
16
+ - group: apim-${env}
17
+ jobs:
18
+ - deployment: Deploy
19
+ displayName: 'Deploy to ${env}'
20
+ environment: ${env}
21
+ pool:
22
+ vmImage: 'ubuntu-latest'
23
+ strategy:
24
+ runOnce:
25
+ deploy:
26
+ steps:
27
+ - checkout: self
28
+ fetchDepth: 2
29
+
30
+ - task: UseNode@1
31
+ displayName: 'Setup Node.js'
32
+ inputs:
33
+ version: '22.x'
34
+
35
+ - script: |
36
+ node -v
37
+ npm -v
38
+ displayName: 'Verify Node.js version'
39
+
40
+ - script: |
41
+ if [[ -f package-lock.json || -f npm-shrinkwrap.json ]]; then
42
+ npm ci
43
+ else
44
+ npm install
45
+ fi
46
+ displayName: 'Install dependencies'
47
+
48
+ - task: replacetokens@6
49
+ displayName: 'Substitute tokens in configuration.${env}.yaml'
50
+ inputs:
51
+ sources: 'configuration.${env}.yaml'
52
+ tokenPattern: 'custom'
53
+ tokenPrefix: '{#['
54
+ tokenSuffix: ']#}'
55
+ missingVarAction: 'keep'
56
+
57
+ - script: |
58
+ if grep -q '{#\\[' configuration.${env}.yaml; then
59
+ echo "Unresolved tokens remain in configuration.${env}.yaml"
60
+ grep -o '{#\\[[^]]*\\]#}' configuration.${env}.yaml | sort -u
61
+ exit 1
62
+ fi
63
+ displayName: 'Validate token substitution (${env})'
64
+
65
+ - task: AzureCLI@2
66
+ displayName: 'Publish to ${env} (incremental - last commit only)'
67
+ condition: ne('\${{ parameters.COMMIT_ID_CHOICE }}', 'publish-all-artifacts-in-repo')
68
+ inputs:
69
+ azureSubscription: 'AZURE_SERVICE_CONNECTION_${envUpper}'
70
+ scriptType: 'bash'
71
+ scriptLocation: 'inlineScript'
72
+ inlineScript: |
73
+ npx apiops publish \\
74
+ --resource-group $(APIM_RESOURCE_GROUP_${envUpper}) \\
75
+ --service-name $(APIM_SERVICE_NAME_${envUpper}) \\
76
+ --source ${config.artifactDir} \\
77
+ --overrides configuration.${env}.yaml \\
78
+ --commit-id $(Build.SourceVersion) \\
79
+ --subscription-id $(AZURE_SUBSCRIPTION_ID)
80
+
81
+ - task: AzureCLI@2
82
+ displayName: 'Publish to ${env} (all artifacts)'
83
+ condition: eq('\${{ parameters.COMMIT_ID_CHOICE }}', 'publish-all-artifacts-in-repo')
84
+ inputs:
85
+ azureSubscription: 'AZURE_SERVICE_CONNECTION_${envUpper}'
86
+ scriptType: 'bash'
87
+ scriptLocation: 'inlineScript'
88
+ inlineScript: |
89
+ npx apiops publish \\
90
+ --resource-group $(APIM_RESOURCE_GROUP_${envUpper}) \\
91
+ --service-name $(APIM_SERVICE_NAME_${envUpper}) \\
92
+ --source ${config.artifactDir} \\
93
+ --overrides configuration.${env}.yaml \\
94
+ --subscription-id $(AZURE_SUBSCRIPTION_ID)
67
95
  `;
68
96
  }).join('\n');
69
- return `# Azure DevOps Pipeline: Run APIM Publisher
70
-
71
- trigger:
72
- branches:
73
- include:
74
- - main
75
- paths:
76
- include:
77
- - '${config.artifactDir}/**'
78
- - 'configuration.*.yaml'
79
-
80
- pr: none
81
-
82
- parameters:
83
- - name: COMMIT_ID_CHOICE
84
- type: string
85
- displayName: 'Choose "publish-all-artifacts-in-repo" only when you want to force republishing all artifacts (e.g. after build failure). Otherwise stick with the default behavior of "publish-artifacts-in-last-commit"'
86
- default: 'publish-artifacts-in-last-commit'
87
- values:
88
- - 'publish-artifacts-in-last-commit'
89
- - 'publish-all-artifacts-in-repo'
90
- - name: ENVIRONMENT
91
- type: string
92
- displayName: 'Choose which environment to publish to'
93
- default: 'all'
94
- values:
95
- - 'all'
96
- ${envValues}
97
-
98
- stages:
99
- ${stages}
97
+ return `# Azure DevOps Pipeline: Run APIM Publisher
98
+
99
+ trigger:
100
+ branches:
101
+ include:
102
+ - main
103
+ paths:
104
+ include:
105
+ - '${config.artifactDir}/**'
106
+ - 'configuration.*.yaml'
107
+
108
+ pr: none
109
+
110
+ parameters:
111
+ - name: COMMIT_ID_CHOICE
112
+ type: string
113
+ displayName: 'Choose "publish-all-artifacts-in-repo" only when you want to force republishing all artifacts (e.g. after build failure). Otherwise stick with the default behavior of "publish-artifacts-in-last-commit"'
114
+ default: 'publish-artifacts-in-last-commit'
115
+ values:
116
+ - 'publish-artifacts-in-last-commit'
117
+ - 'publish-all-artifacts-in-repo'
118
+ - name: ENVIRONMENT
119
+ type: string
120
+ displayName: 'Choose which environment to publish to'
121
+ default: '${defaultEnvironment}'
122
+ values:
123
+ ${envValues}
124
+
125
+ stages:
126
+ ${stages}
100
127
  `;
101
128
  }
102
129
  //# sourceMappingURL=publish-pipeline.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"publish-pipeline.js","sourceRoot":"","sources":["../../../src/templates/azure-devops/publish-pipeline.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC;;;GAGG;AAOH,MAAM,UAAU,uBAAuB,CAAC,MAA6B;IACnE,MAAM,SAAS,GAAG,MAAM,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,YAAY,GAAG,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAElF,MAAM,MAAM,GAAG,MAAM,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;QAClD,MAAM,SAAS,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,wBAAwB,MAAM,CAAC,YAAY,CAAC,GAAG,GAAG,CAAC,CAAC,IAAI,CAAC;QAE5F,OAAO,GAAG,SAAS,oBAAoB,GAAG;6BACjB,GAAG;wDACwB,GAAG;;oBAEvC,GAAG;;;gCAGS,GAAG;qBACd,GAAG;;;;;;;;;;;;;;;;;;;2CAmBmB,GAAG;;;mEAGqB,GAAG,CAAC,WAAW,EAAE;;;;;+DAKrB,GAAG,CAAC,WAAW,EAAE;2DACrB,GAAG,CAAC,WAAW,EAAE;iCAC3C,MAAM,CAAC,WAAW;kDACD,GAAG;;;;;2CAKV,GAAG;;;mEAGqB,GAAG,CAAC,WAAW,EAAE;;;;;+DAKrB,GAAG,CAAC,WAAW,EAAE;2DACrB,GAAG,CAAC,WAAW,EAAE;iCAC3C,MAAM,CAAC,WAAW;kDACD,GAAG;;CAEpD,CAAC;IACA,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAEd,OAAO;;;;;;;;WAQE,MAAM,CAAC,WAAW;;;;;;;;;;;;;;;;;;;EAmB3B,SAAS;;;EAGT,MAAM;CACP,CAAC;AACF,CAAC"}
1
+ {"version":3,"file":"publish-pipeline.js","sourceRoot":"","sources":["../../../src/templates/azure-devops/publish-pipeline.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC;;;GAGG;AAOH,MAAM,UAAU,uBAAuB,CAAC,MAA6B;IACnE,MAAM,kBAAkB,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC;IAC3D,MAAM,SAAS,GAAG,MAAM,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,YAAY,GAAG,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAElF,MAAM,MAAM,GAAG,MAAM,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;QAC7C,MAAM,QAAQ,GAAG,GAAG,CAAC,WAAW,EAAE,CAAC;QAEnC,OAAO,oBAAoB,GAAG;6BACL,GAAG;qDACqB,GAAG;;oBAEpC,GAAG;;;gCAGS,GAAG;qBACd,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mEA6B2C,GAAG;;4CAE1B,GAAG;;;;;;;qDAOM,GAAG;sEACc,GAAG;8DACX,GAAG;;;6DAGJ,GAAG;;;2CAGrB,GAAG;;;iEAGmB,QAAQ;;;;;+DAKV,QAAQ;2DACZ,QAAQ;iCAClC,MAAM,CAAC,WAAW;kDACD,GAAG;;;;;2CAKV,GAAG;;;iEAGmB,QAAQ;;;;;+DAKV,QAAQ;2DACZ,QAAQ;iCAClC,MAAM,CAAC,WAAW;kDACD,GAAG;;CAEpD,CAAC;IACA,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAEd,OAAO;;;;;;;;WAQE,MAAM,CAAC,WAAW;;;;;;;;;;;;;;;;gBAgBb,kBAAkB;;EAEhC,SAAS;;;EAGT,MAAM;CACP,CAAC;AACF,CAAC"}
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * T047: Sample filter configuration template
3
- * Generates a sample configuration.extract.yaml file
3
+ * Generates a sample configuration.extractor.yaml file
4
4
  */
5
5
  export declare function generateFilterConfig(): string;
6
6
  //# sourceMappingURL=filter-config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"filter-config.d.ts","sourceRoot":"","sources":["../../../src/templates/configs/filter-config.ts"],"names":[],"mappings":"AAEA;;;GAGG;AAEH,wBAAgB,oBAAoB,IAAI,MAAM,CA6C7C"}
1
+ {"version":3,"file":"filter-config.d.ts","sourceRoot":"","sources":["../../../src/templates/configs/filter-config.ts"],"names":[],"mappings":"AAEA;;;GAGG;AAEH,wBAAgB,oBAAoB,IAAI,MAAM,CA8G7C"}
@@ -2,52 +2,117 @@
2
2
  // Licensed under the MIT license.
3
3
  /**
4
4
  * T047: Sample filter configuration template
5
- * Generates a sample configuration.extract.yaml file
5
+ * Generates a sample configuration.extractor.yaml file
6
6
  */
7
7
  export function generateFilterConfig() {
8
- return `# APIM Extract Filter Configuration
9
- # Customize this file to control which resources are extracted
10
-
11
- # Extract only specific APIs by name
12
- # apiNames:
13
- # - echo-api
14
- # - petstore-api
15
-
16
- # Extract only specific products
17
- # productNames:
18
- # - starter
19
- # - unlimited
20
-
21
- # Extract only specific backends
22
- # backendNames:
23
- # - backend-api
24
- # - legacy-backend
25
-
26
- # Extract only specific named values
27
- # namedValueNames:
28
- # - api-key
29
- # - connection-string
30
-
31
- # Extract only specific loggers
32
- # loggerNames:
33
- # - appinsights-logger
34
-
35
- # Extract only specific diagnostics
36
- # diagnosticNames:
37
- # - applicationinsights
38
-
39
- # Extract only specific tags
40
- # tagNames:
41
- # - production
42
- # - external
43
-
44
- # Extract only specific policy fragments
45
- # policyFragmentNames:
46
- # - rate-limit-fragment
47
- # - cors-fragment
48
-
49
- # Uncomment to extract ALL resources (default behavior if no filters specified)
50
- # Leave all sections commented to extract everything
8
+ return `# APIM Extract Filter Configuration
9
+ # Customize this file to control which resources are extracted
10
+
11
+ # Extract only specific APIs by name
12
+ # apis:
13
+ # - echo-api
14
+ # - petstore-api
15
+
16
+ # Advanced: Filter API sub-resources (operations, diagnostics, schemas, releases)
17
+ # apis:
18
+ # - echo-api # Include all sub-resources
19
+ # - petstore-api: # Control sub-resources
20
+ # operations:
21
+ # - get-pets
22
+ # - create-pet
23
+ # diagnostics:
24
+ # - applicationinsights
25
+ # schemas: [] # Exclude all schemas
26
+ # releases:
27
+ # - v1
28
+
29
+ # Extract only specific products
30
+ # products:
31
+ # - starter
32
+ # - unlimited
33
+
34
+ # Extract only specific backends
35
+ # backends:
36
+ # - backend-api
37
+ # - legacy-backend
38
+
39
+ # Extract only specific named values
40
+ # namedValues:
41
+ # - api-key
42
+ # - connection-string
43
+
44
+ # Extract only specific loggers
45
+ # loggers:
46
+ # - appinsights-logger
47
+
48
+ # Extract only specific diagnostics
49
+ # diagnostics:
50
+ # - applicationinsights
51
+
52
+ # Extract only specific tags
53
+ # tags:
54
+ # - production
55
+ # - external
56
+
57
+ # Extract only specific policy fragments
58
+ # policyFragments:
59
+ # - rate-limit-fragment
60
+ # - cors-fragment
61
+
62
+ # Extract only specific gateways
63
+ # gateways:
64
+ # - default
65
+ # - internal-gateway
66
+
67
+ # Extract only specific version sets
68
+ # versionSets:
69
+ # - payments-v1
70
+
71
+ # Extract only specific groups
72
+ # groups:
73
+ # - administrators
74
+
75
+ # Extract only specific subscriptions
76
+ # subscriptions:
77
+ # - starter-subscription
78
+
79
+ # Extract only specific schemas
80
+ # schemas:
81
+ # - pet-schema
82
+
83
+ # Filter service-level policies
84
+ # policies:
85
+ # - policy
86
+
87
+ # Extract only specific policy restrictions
88
+ # policyRestrictions:
89
+ # - global-policy-restriction
90
+
91
+ # Extract only specific documentations
92
+ # documentations:
93
+ # - getting-started
94
+
95
+ # Extract only specific workspaces
96
+ # workspaces:
97
+ # - dev-workspace
98
+
99
+ # Advanced: Filter workspace sub-resources
100
+ # workspaces:
101
+ # - team-workspace:
102
+ # apis:
103
+ # - team-api-1
104
+ # - team-api-2
105
+ # backends:
106
+ # - team-backend
107
+ # namedValues:
108
+ # - team-api-key
109
+
110
+ # Filter behavior:
111
+ # - Leave a section commented out to include ALL resources of that type
112
+ # - Set a section to an empty array ([]) to exclude ALL resources of that type
113
+ # Example:
114
+ # gateways: []
115
+ # subscriptions: []
51
116
  `;
52
117
  }
53
118
  //# sourceMappingURL=filter-config.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"filter-config.js","sourceRoot":"","sources":["../../../src/templates/configs/filter-config.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC;;;GAGG;AAEH,MAAM,UAAU,oBAAoB;IAClC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2CR,CAAC;AACF,CAAC"}
1
+ {"version":3,"file":"filter-config.js","sourceRoot":"","sources":["../../../src/templates/configs/filter-config.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC;;;GAGG;AAEH,MAAM,UAAU,oBAAoB;IAClC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4GR,CAAC;AACF,CAAC"}
File without changes
@@ -1 +1 @@
1
- {"version":3,"file":"override-config.d.ts","sourceRoot":"","sources":["../../../src/templates/configs/override-config.ts"],"names":[],"mappings":"AAEA;;;GAGG;AAEH,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAuClE"}
1
+ {"version":3,"file":"override-config.d.ts","sourceRoot":"","sources":["../../../src/templates/configs/override-config.ts"],"names":[],"mappings":"AAEA;;;GAGG;AAEH,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CA0FlE"}
@@ -5,43 +5,94 @@
5
5
  * Generates environment-specific configuration.{env}.yaml files
6
6
  */
7
7
  export function generateOverrideConfig(environment) {
8
- return `# APIM Override Configuration for ${environment} environment
9
- # Customize resource properties for this specific environment
10
-
11
- # Override named values (e.g., API keys, connection strings)
12
- # namedValues:
13
- # api-key:
14
- # value: "${environment}-api-key-value"
15
- # connection-string:
16
- # value: "Server=${environment}-db.example.com;Database=mydb"
17
- # secret-from-keyvault:
18
- # keyVault:
19
- # secretIdentifier: "https://${environment}-kv.vault.azure.net/secrets/my-secret"
20
- # identityClientId: "00000000-0000-0000-0000-000000000000"
21
-
22
- # Override backend URLs per environment
23
- # backends:
24
- # backend-api:
25
- # url: "https://${environment}-api.example.com"
26
- # legacy-backend:
27
- # url: "https://${environment}-legacy.example.com"
28
-
29
- # Override API service URLs
30
- # apis:
31
- # echo-api:
32
- # serviceUrl: "https://${environment}-echo.example.com"
33
- # petstore-api:
34
- # serviceUrl: "https://${environment}-petstore.example.com"
35
-
36
- # Override diagnostic logger references
37
- # diagnostics:
38
- # applicationinsights:
39
- # loggerId: "appinsights-logger-${environment}"
40
-
41
- # Override logger credentials or resource IDs
42
- # loggers:
43
- # appinsights-logger:
44
- # resourceId: "/subscriptions/xxxxx/resourceGroups/${environment}-rg/providers/microsoft.insights/components/${environment}-appinsights"
8
+ return `# APIM Override Configuration for ${environment} environment
9
+ # Customize resource properties for this specific environment
10
+ # All APIOps Toolkit override sections are supported.
11
+
12
+ # Override named values (e.g., API keys, connection strings)
13
+ # namedValues:
14
+ # - name: api-key
15
+ # properties:
16
+ # value: "${environment}-api-key-value"
17
+ # - name: connection-string
18
+ # properties:
19
+ # value: "Server=${environment}-db.example.com;Database=mydb"
20
+ # - name: secret-from-keyvault
21
+ # properties:
22
+ # keyVault:
23
+ # secretIdentifier: "https://${environment}-kv.vault.azure.net/secrets/my-secret"
24
+ # identityClientId: "00000000-0000-0000-0000-000000000000"
25
+
26
+ # Override backend URLs per environment
27
+ # backends:
28
+ # - name: backend-api
29
+ # properties:
30
+ # url: "https://${environment}-api.example.com"
31
+ # - name: legacy-backend
32
+ # properties:
33
+ # url: "https://${environment}-legacy.example.com"
34
+ # resourceId: "/subscriptions/.../sites/${environment}-backend"
35
+
36
+ # Override API service URLs (with optional nested sub-resource overrides)
37
+ # apis:
38
+ # - name: echo-api
39
+ # properties:
40
+ # serviceUrl: "https://${environment}-echo.example.com"
41
+ # - name: petstore-api
42
+ # properties:
43
+ # serviceUrl: "https://${environment}-petstore.example.com"
44
+ # displayName: "Petstore API (${environment})"
45
+ # diagnostics:
46
+ # - name: applicationinsights
47
+ # properties:
48
+ # loggerId: "appinsights-logger-${environment}"
49
+ # verbosity: Error
50
+ # policies:
51
+ # - name: policy
52
+ # properties:
53
+ # format: rawxml
54
+
55
+ # Override diagnostic logger references
56
+ # diagnostics:
57
+ # - name: applicationinsights
58
+ # properties:
59
+ # loggerId: "appinsights-logger-${environment}"
60
+ # verbosity: Error
61
+
62
+ # Override logger credentials or resource IDs
63
+ # loggers:
64
+ # - name: appinsights-logger
65
+ # properties:
66
+ # loggerType: applicationInsights
67
+ # resourceId: "/subscriptions/xxxxx/resourceGroups/${environment}-rg/providers/microsoft.insights/components/${environment}-appinsights"
68
+ # isBuffered: true
69
+
70
+ # Override service-level policies
71
+ # policies:
72
+ # - name: policy
73
+ # properties:
74
+ # format: rawxml
75
+
76
+ # Override gateway properties
77
+ # gateways:
78
+ # - name: on-prem-gateway
79
+ # properties:
80
+ # locationData:
81
+ # name: "${environment} datacenter"
82
+
83
+ # Override version sets, groups, subscriptions, products, tags, policy fragments
84
+ # versionSets:
85
+ # - name: my-version-set
86
+ # properties:
87
+ # displayName: "My Version Set (${environment})"
88
+ # products:
89
+ # - name: starter
90
+ # properties:
91
+ # displayName: "Starter Plan (${environment})"
92
+ # tags:
93
+ # - name: env-tag
94
+ # properties:
95
+ # displayName: "${environment}"
45
96
  `;
46
97
  }
47
98
  //# sourceMappingURL=override-config.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"override-config.js","sourceRoot":"","sources":["../../../src/templates/configs/override-config.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC;;;GAGG;AAEH,MAAM,UAAU,sBAAsB,CAAC,WAAmB;IACxD,OAAO,qCAAqC,WAAW;;;;;;gBAMzC,WAAW;;uBAEJ,WAAW;;;qCAGG,WAAW;;;;;;sBAM1B,WAAW;;sBAEX,WAAW;;;;;6BAKJ,WAAW;;6BAEX,WAAW;;;;;sCAKF,WAAW;;;;;yDAKQ,WAAW,+CAA+C,WAAW;CAC7H,CAAC;AACF,CAAC"}
1
+ {"version":3,"file":"override-config.js","sourceRoot":"","sources":["../../../src/templates/configs/override-config.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC;;;GAGG;AAEH,MAAM,UAAU,sBAAsB,CAAC,WAAmB;IACxD,OAAO,qCAAqC,WAAW;;;;;;;;kBAQvC,WAAW;;;yBAGJ,WAAW;;;;uCAIG,WAAW;;;;;;;wBAO1B,WAAW;;;wBAGX,WAAW;gDACa,WAAW;;;;;;+BAM5B,WAAW;;;+BAGX,WAAW;sCACJ,WAAW;;;;4CAIL,WAAW;;;;;;;;;;;wCAWf,WAAW;;;;;;;;2DAQQ,WAAW,+CAA+C,WAAW;;;;;;;;;;;;;;mBAc7G,WAAW;;;;;;wCAMU,WAAW;;;;sCAIb,WAAW;;;;wBAIzB,WAAW;CAClC,CAAC;AACF,CAAC"}
File without changes
File without changes
File without changes
File without changes
@@ -1,13 +1,14 @@
1
1
  /**
2
2
  * GitHub Copilot prompt template for automating identity setup.
3
3
  * Generates a .prompt.md file that guides Copilot through:
4
- * 1. Gathering Azure & GitHub info from the user
5
- * 2. Creating Azure AD app registration + federated credentials
4
+ * 1. Gathering environment and identity information
5
+ * 2. Creating identity configuration for the selected CI provider
6
6
  * 3. Assigning RBAC roles
7
- * 4. Setting GitHub repository secrets
7
+ * 4. Completing provider-specific setup tasks
8
8
  */
9
9
  export interface IdentitySetupPromptConfig {
10
10
  environments: string[];
11
+ ciProvider?: 'github-actions' | 'azure-devops';
11
12
  }
12
13
  export declare function generateIdentitySetupPrompt(config: IdentitySetupPromptConfig): string;
13
14
  //# sourceMappingURL=identity-setup-prompt.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"identity-setup-prompt.d.ts","sourceRoot":"","sources":["../../../src/templates/copilot/identity-setup-prompt.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,MAAM,WAAW,yBAAyB;IACxC,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAED,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,yBAAyB,GAAG,MAAM,CAgSrF"}
1
+ {"version":3,"file":"identity-setup-prompt.d.ts","sourceRoot":"","sources":["../../../src/templates/copilot/identity-setup-prompt.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAUH,MAAM,WAAW,yBAAyB;IACxC,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,UAAU,CAAC,EAAE,gBAAgB,GAAG,cAAc,CAAC;CAChD;AASD,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,yBAAyB,GAAG,MAAM,CAkFrF"}