@peterhauge/apiops-cli 0.2.1-alpha.0 → 0.3.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.
- package/README.md +167 -169
- package/dist/cli/extract-command.d.ts +2 -2
- package/dist/cli/extract-command.d.ts.map +1 -1
- package/dist/cli/extract-command.js +3 -5
- package/dist/cli/extract-command.js.map +1 -1
- package/dist/cli/index.js +2 -3
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/init-command.d.ts +1 -1
- package/dist/cli/init-command.js +1 -1
- package/dist/cli/publish-command.d.ts +2 -2
- package/dist/cli/publish-command.js +3 -3
- package/dist/clients/apim-client.d.ts +16 -5
- package/dist/clients/apim-client.d.ts.map +1 -1
- package/dist/clients/apim-client.js +22 -7
- package/dist/clients/apim-client.js.map +1 -1
- package/dist/clients/artifact-store.d.ts +4 -4
- package/dist/clients/artifact-store.d.ts.map +1 -1
- package/dist/clients/artifact-store.js +10 -4
- package/dist/clients/artifact-store.js.map +1 -1
- package/dist/clients/iapim-client.d.ts +14 -2
- package/dist/clients/iapim-client.d.ts.map +1 -1
- package/dist/clients/iapim-client.js +1 -1
- package/dist/clients/iartifact-store.d.ts +10 -5
- package/dist/clients/iartifact-store.d.ts.map +1 -1
- package/dist/clients/iartifact-store.js +1 -1
- package/dist/lib/cloud-config.d.ts +1 -1
- package/dist/lib/cloud-config.js +1 -1
- package/dist/lib/config-loader.d.ts +2 -7
- package/dist/lib/config-loader.d.ts.map +1 -1
- package/dist/lib/config-loader.js +3 -22
- package/dist/lib/config-loader.js.map +1 -1
- package/dist/lib/dependency-graph.d.ts +1 -1
- package/dist/lib/dependency-graph.js +1 -1
- package/dist/lib/exit-codes.d.ts +1 -1
- package/dist/lib/exit-codes.js +1 -1
- package/dist/lib/logger.js +1 -1
- package/dist/lib/parallel-runner.d.ts +2 -2
- package/dist/lib/parallel-runner.js +2 -2
- package/dist/lib/resource-path.d.ts +1 -1
- package/dist/lib/resource-path.js +1 -1
- package/dist/lib/resource-uri.d.ts +1 -1
- package/dist/lib/resource-uri.js +1 -1
- package/dist/lib/workspace-link.d.ts +31 -3
- package/dist/lib/workspace-link.d.ts.map +1 -1
- package/dist/lib/workspace-link.js +49 -3
- package/dist/lib/workspace-link.js.map +1 -1
- package/dist/models/config.d.ts +2 -4
- package/dist/models/config.d.ts.map +1 -1
- package/dist/models/config.js +1 -1
- package/dist/models/resource-types.d.ts +1 -1
- package/dist/models/resource-types.d.ts.map +1 -1
- package/dist/models/resource-types.js +5 -3
- package/dist/models/resource-types.js.map +1 -1
- package/dist/models/types.d.ts +22 -1
- package/dist/models/types.d.ts.map +1 -1
- package/dist/models/types.js +1 -1
- package/dist/services/api-extractor.d.ts +1 -1
- package/dist/services/api-extractor.d.ts.map +1 -1
- package/dist/services/api-extractor.js +29 -127
- package/dist/services/api-extractor.js.map +1 -1
- package/dist/services/api-publisher.d.ts +1 -1
- package/dist/services/api-publisher.d.ts.map +1 -1
- package/dist/services/api-publisher.js +50 -18
- package/dist/services/api-publisher.js.map +1 -1
- package/dist/services/delete-unmatched-service.d.ts +1 -1
- package/dist/services/delete-unmatched-service.js +1 -1
- package/dist/services/dry-run-reporter.d.ts +1 -1
- package/dist/services/dry-run-reporter.js +1 -1
- package/dist/services/extract-service.d.ts +1 -1
- package/dist/services/extract-service.js +1 -1
- package/dist/services/filter-service.d.ts +19 -1
- package/dist/services/filter-service.d.ts.map +1 -1
- package/dist/services/filter-service.js +40 -2
- package/dist/services/filter-service.js.map +1 -1
- package/dist/services/git-diff-service.d.ts +1 -1
- package/dist/services/git-diff-service.js +1 -1
- package/dist/services/identity-guide-service.d.ts +1 -1
- package/dist/services/identity-guide-service.js +12 -12
- package/dist/services/init-service.d.ts +1 -1
- package/dist/services/init-service.js +1 -1
- package/dist/services/override-merger.d.ts +1 -1
- package/dist/services/override-merger.js +1 -1
- package/dist/services/product-extractor.d.ts +1 -1
- package/dist/services/product-extractor.d.ts.map +1 -1
- package/dist/services/product-extractor.js +27 -26
- package/dist/services/product-extractor.js.map +1 -1
- package/dist/services/product-publisher.d.ts.map +1 -1
- package/dist/services/product-publisher.js +25 -9
- package/dist/services/product-publisher.js.map +1 -1
- package/dist/services/prompt-service.d.ts +1 -1
- package/dist/services/prompt-service.js +1 -1
- package/dist/services/publish-service.d.ts +1 -1
- package/dist/services/publish-service.js +1 -1
- package/dist/services/resource-extractor.d.ts +1 -1
- package/dist/services/resource-extractor.js +1 -1
- package/dist/services/resource-publisher.d.ts +9 -1
- package/dist/services/resource-publisher.d.ts.map +1 -1
- package/dist/services/resource-publisher.js +30 -9
- package/dist/services/resource-publisher.js.map +1 -1
- package/dist/services/secret-redactor.d.ts +1 -1
- package/dist/services/secret-redactor.js +1 -1
- package/dist/services/transitive-resolver.d.ts +1 -1
- package/dist/services/transitive-resolver.js +1 -1
- package/dist/services/workspace-extractor.d.ts +7 -1
- package/dist/services/workspace-extractor.d.ts.map +1 -1
- package/dist/services/workspace-extractor.js +75 -10
- package/dist/services/workspace-extractor.js.map +1 -1
- package/dist/templates/azure-devops/extract-pipeline.d.ts +1 -1
- package/dist/templates/azure-devops/extract-pipeline.js +142 -142
- package/dist/templates/azure-devops/publish-pipeline.d.ts +1 -1
- package/dist/templates/azure-devops/publish-pipeline.js +114 -114
- package/dist/templates/configs/filter-config.d.ts +1 -1
- package/dist/templates/configs/filter-config.d.ts.map +1 -1
- package/dist/templates/configs/filter-config.js +118 -109
- package/dist/templates/configs/filter-config.js.map +1 -1
- package/dist/templates/configs/override-config.d.ts +1 -1
- package/dist/templates/configs/override-config.d.ts.map +1 -1
- package/dist/templates/configs/override-config.js +92 -91
- package/dist/templates/configs/override-config.js.map +1 -1
- package/dist/templates/github-actions/extract-workflow.d.ts +1 -1
- package/dist/templates/github-actions/extract-workflow.js +119 -119
- package/dist/templates/github-actions/publish-workflow.d.ts +1 -1
- package/dist/templates/github-actions/publish-workflow.d.ts.map +1 -1
- package/dist/templates/github-actions/publish-workflow.js +147 -104
- package/dist/templates/github-actions/publish-workflow.js.map +1 -1
- package/package.json +69 -69
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
|
2
2
|
// Licensed under the MIT license.
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Azure DevOps publish pipeline template
|
|
5
5
|
* Multi-stage pipeline with commit ID choice, environment selection, and variable groups
|
|
6
6
|
*/
|
|
7
7
|
export function generatePublishPipeline(config) {
|
|
@@ -9,121 +9,121 @@ export function generatePublishPipeline(config) {
|
|
|
9
9
|
const envValues = config.environments.map((env) => ` - '${env}'`).join('\n');
|
|
10
10
|
const stages = config.environments.map((env) => {
|
|
11
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)
|
|
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)
|
|
95
95
|
`;
|
|
96
96
|
}).join('\n');
|
|
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}
|
|
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}
|
|
127
127
|
`;
|
|
128
128
|
}
|
|
129
129
|
//# sourceMappingURL=publish-pipeline.js.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,
|
|
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,CAuH7C"}
|
|
@@ -1,118 +1,127 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
|
2
2
|
// Licensed under the MIT license.
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Sample filter configuration template
|
|
5
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
|
-
#
|
|
12
|
-
|
|
13
|
-
#
|
|
14
|
-
#
|
|
15
|
-
|
|
16
|
-
#
|
|
17
|
-
#
|
|
18
|
-
# -
|
|
19
|
-
|
|
20
|
-
#
|
|
21
|
-
#
|
|
22
|
-
#
|
|
23
|
-
#
|
|
24
|
-
#
|
|
25
|
-
#
|
|
26
|
-
#
|
|
27
|
-
# -
|
|
28
|
-
|
|
29
|
-
#
|
|
30
|
-
#
|
|
31
|
-
#
|
|
32
|
-
#
|
|
33
|
-
|
|
34
|
-
# Extract only specific
|
|
35
|
-
#
|
|
36
|
-
# -
|
|
37
|
-
# -
|
|
38
|
-
|
|
39
|
-
# Extract only specific
|
|
40
|
-
#
|
|
41
|
-
# - api
|
|
42
|
-
# -
|
|
43
|
-
|
|
44
|
-
# Extract only specific
|
|
45
|
-
#
|
|
46
|
-
# -
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
#
|
|
50
|
-
#
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
#
|
|
54
|
-
#
|
|
55
|
-
# -
|
|
56
|
-
|
|
57
|
-
# Extract only specific
|
|
58
|
-
#
|
|
59
|
-
# -
|
|
60
|
-
# -
|
|
61
|
-
|
|
62
|
-
# Extract only specific
|
|
63
|
-
#
|
|
64
|
-
# -
|
|
65
|
-
# -
|
|
66
|
-
|
|
67
|
-
# Extract only specific
|
|
68
|
-
#
|
|
69
|
-
# -
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
#
|
|
73
|
-
#
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
#
|
|
77
|
-
#
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
#
|
|
81
|
-
#
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
#
|
|
85
|
-
#
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
#
|
|
89
|
-
#
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
#
|
|
93
|
-
#
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
#
|
|
97
|
-
#
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
# workspaces
|
|
101
|
-
#
|
|
102
|
-
#
|
|
103
|
-
|
|
104
|
-
#
|
|
105
|
-
#
|
|
106
|
-
#
|
|
107
|
-
#
|
|
108
|
-
# - team-api-
|
|
109
|
-
|
|
110
|
-
#
|
|
111
|
-
# -
|
|
112
|
-
#
|
|
113
|
-
#
|
|
114
|
-
|
|
115
|
-
#
|
|
8
|
+
return `# APIM Extract Filter Configuration
|
|
9
|
+
# Customize this file to control which resources are extracted
|
|
10
|
+
# For full format details and examples, see:
|
|
11
|
+
# https://github.com/Azure/apiops-cli/blob/main/docs/guides/filtering-resources.md
|
|
12
|
+
|
|
13
|
+
# Extract only specific APIs by name (or wildcard pattern)
|
|
14
|
+
# apis:
|
|
15
|
+
# - echo-api
|
|
16
|
+
# - petstore-api
|
|
17
|
+
# - 'prod-*' # Wildcard: all APIs starting with prod-
|
|
18
|
+
# - '*-internal-*' # Wildcard: all APIs containing -internal-
|
|
19
|
+
|
|
20
|
+
# Advanced: Filter API sub-resources (operations, diagnostics, schemas, releases)
|
|
21
|
+
# apis:
|
|
22
|
+
# - echo-api # Include all sub-resources
|
|
23
|
+
# - petstore-api: # Control sub-resources
|
|
24
|
+
# operations:
|
|
25
|
+
# - get-pets
|
|
26
|
+
# - create-pet
|
|
27
|
+
# - 'list-*' # Wildcard: all operations starting with list-
|
|
28
|
+
# diagnostics:
|
|
29
|
+
# - applicationinsights
|
|
30
|
+
# schemas: [] # Exclude all schemas
|
|
31
|
+
# releases:
|
|
32
|
+
# - v1
|
|
33
|
+
|
|
34
|
+
# Extract only specific products
|
|
35
|
+
# products:
|
|
36
|
+
# - starter
|
|
37
|
+
# - unlimited
|
|
38
|
+
|
|
39
|
+
# Extract only specific backends
|
|
40
|
+
# backends:
|
|
41
|
+
# - backend-api
|
|
42
|
+
# - legacy-backend
|
|
43
|
+
|
|
44
|
+
# Extract only specific named values
|
|
45
|
+
# namedValues:
|
|
46
|
+
# - api-key
|
|
47
|
+
# - connection-string
|
|
48
|
+
|
|
49
|
+
# Extract only specific loggers
|
|
50
|
+
# loggers:
|
|
51
|
+
# - appinsights-logger
|
|
52
|
+
|
|
53
|
+
# Extract only specific diagnostics
|
|
54
|
+
# diagnostics:
|
|
55
|
+
# - applicationinsights
|
|
56
|
+
|
|
57
|
+
# Extract only specific tags
|
|
58
|
+
# tags:
|
|
59
|
+
# - production
|
|
60
|
+
# - external
|
|
61
|
+
|
|
62
|
+
# Extract only specific policy fragments
|
|
63
|
+
# policyFragments:
|
|
64
|
+
# - rate-limit-fragment
|
|
65
|
+
# - cors-fragment
|
|
66
|
+
|
|
67
|
+
# Extract only specific gateways
|
|
68
|
+
# gateways:
|
|
69
|
+
# - default
|
|
70
|
+
# - internal-gateway
|
|
71
|
+
|
|
72
|
+
# Extract only specific version sets
|
|
73
|
+
# versionSets:
|
|
74
|
+
# - payments-v1
|
|
75
|
+
|
|
76
|
+
# Extract only specific groups
|
|
77
|
+
# groups:
|
|
78
|
+
# - administrators
|
|
79
|
+
|
|
80
|
+
# Extract only specific subscriptions
|
|
81
|
+
# subscriptions:
|
|
82
|
+
# - starter-subscription
|
|
83
|
+
|
|
84
|
+
# Extract only specific schemas
|
|
85
|
+
# schemas:
|
|
86
|
+
# - pet-schema
|
|
87
|
+
|
|
88
|
+
# Filter service-level policies
|
|
89
|
+
# policies:
|
|
90
|
+
# - policy
|
|
91
|
+
|
|
92
|
+
# Extract only specific policy restrictions
|
|
93
|
+
# policyRestrictions:
|
|
94
|
+
# - global-policy-restriction
|
|
95
|
+
|
|
96
|
+
# Extract only specific documentations
|
|
97
|
+
# documentations:
|
|
98
|
+
# - getting-started
|
|
99
|
+
|
|
100
|
+
# Extract only specific workspaces
|
|
101
|
+
# workspaces:
|
|
102
|
+
# - dev-workspace
|
|
103
|
+
|
|
104
|
+
# Advanced: Filter workspace sub-resources
|
|
105
|
+
# workspaces:
|
|
106
|
+
# - team-workspace:
|
|
107
|
+
# apis:
|
|
108
|
+
# - team-api-1
|
|
109
|
+
# - team-api-2
|
|
110
|
+
# backends:
|
|
111
|
+
# - team-backend
|
|
112
|
+
# namedValues:
|
|
113
|
+
# - team-api-key
|
|
114
|
+
|
|
115
|
+
# Filter behavior:
|
|
116
|
+
# - Leave a section commented out to include ALL resources of that type
|
|
117
|
+
# - Set a section to an empty array ([]) to exclude ALL resources of that type
|
|
118
|
+
# Example:
|
|
119
|
+
# gateways: []
|
|
120
|
+
# subscriptions: []
|
|
121
|
+
# - Use * to match any characters: prod-* matches prod-api, prod-users
|
|
122
|
+
# - Use ? to match a single character: api-v? matches api-v1, api-v2
|
|
123
|
+
# - Exact names and wildcard patterns can be mixed in the same list
|
|
124
|
+
# - All matching is case-insensitive
|
|
116
125
|
`;
|
|
117
126
|
}
|
|
118
127
|
//# 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
|
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqHR,CAAC;AACF,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Sample override configuration template per environment
|
|
3
3
|
* Generates environment-specific configuration.{env}.yaml files
|
|
4
4
|
*/
|
|
5
5
|
export declare function generateOverrideConfig(environment: string): string;
|
|
@@ -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,
|
|
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,CA6FlE"}
|