@peterhauge/apiops-cli 0.2.1-alpha.0 → 0.4.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/CHANGELOG.md +166 -0
- package/README.md +173 -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 +6 -6
- package/dist/cli/init-command.js.map +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/render-template.d.ts +10 -0
- package/dist/lib/render-template.d.ts.map +1 -0
- package/dist/lib/render-template.js +14 -0
- package/dist/lib/render-template.js.map +1 -0
- 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 +39 -133
- 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.d.ts.map +1 -1
- package/dist/services/extract-service.js +5 -3
- package/dist/services/extract-service.js.map +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 +4 -5
- package/dist/services/identity-guide-service.d.ts.map +1 -1
- package/dist/services/identity-guide-service.js +7 -41
- package/dist/services/identity-guide-service.js.map +1 -1
- package/dist/services/init-service.d.ts +1 -1
- package/dist/services/init-service.d.ts.map +1 -1
- package/dist/services/init-service.js +62 -29
- package/dist/services/init-service.js.map +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 +31 -28
- 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.d.ts.map +1 -1
- package/dist/services/publish-service.js +31 -1
- package/dist/services/publish-service.js.map +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 +14 -1
- package/dist/services/resource-publisher.d.ts.map +1 -1
- package/dist/services/resource-publisher.js +45 -10
- package/dist/services/resource-publisher.js.map +1 -1
- package/dist/services/secret-redaction-guard.d.ts +40 -0
- package/dist/services/secret-redaction-guard.d.ts.map +1 -0
- package/dist/services/secret-redaction-guard.js +92 -0
- package/dist/services/secret-redaction-guard.js.map +1 -0
- package/dist/services/secret-redactor.d.ts +19 -1
- package/dist/services/secret-redactor.d.ts.map +1 -1
- package/dist/services/secret-redactor.js +173 -1
- package/dist/services/secret-redactor.js.map +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.d.ts.map +1 -1
- package/dist/templates/azure-devops/publish-pipeline.js +151 -117
- package/dist/templates/azure-devops/publish-pipeline.js.map +1 -1
- 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 +7 -110
- 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 +8 -92
- package/dist/templates/configs/override-config.js.map +1 -1
- package/dist/templates/configs/schema-ref.d.ts +18 -0
- package/dist/templates/configs/schema-ref.d.ts.map +1 -0
- package/dist/templates/configs/schema-ref.js +26 -0
- package/dist/templates/configs/schema-ref.js.map +1 -0
- package/dist/templates/copilot/configure-filter-prompt.d.ts +10 -0
- package/dist/templates/copilot/configure-filter-prompt.d.ts.map +1 -0
- package/dist/templates/copilot/configure-filter-prompt.js +14 -0
- package/dist/templates/copilot/configure-filter-prompt.js.map +1 -0
- package/dist/templates/copilot/configure-overrides-prompt.d.ts +7 -0
- package/dist/templates/copilot/configure-overrides-prompt.d.ts.map +1 -0
- package/dist/templates/copilot/configure-overrides-prompt.js +12 -0
- package/dist/templates/copilot/configure-overrides-prompt.js.map +1 -0
- package/dist/templates/copilot/identity-setup-prompt.d.ts.map +1 -1
- package/dist/templates/copilot/identity-setup-prompt.js +19 -24
- package/dist/templates/copilot/identity-setup-prompt.js.map +1 -1
- package/dist/templates/generated/embedded-markdown.d.ts +8 -5
- package/dist/templates/generated/embedded-markdown.d.ts.map +1 -1
- package/dist/templates/generated/embedded-markdown.js +8 -5
- package/dist/templates/generated/embedded-markdown.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 +3 -2
- package/dist/templates/github-actions/publish-workflow.d.ts.map +1 -1
- package/dist/templates/github-actions/publish-workflow.js +180 -112
- package/dist/templates/github-actions/publish-workflow.js.map +1 -1
- package/package.json +72 -69
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish-workflow.d.ts","sourceRoot":"","sources":["../../../src/templates/github-actions/publish-workflow.ts"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"publish-workflow.d.ts","sourceRoot":"","sources":["../../../src/templates/github-actions/publish-workflow.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH,MAAM,WAAW,qBAAqB;IACpC,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAED,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,qBAAqB,GAAG,MAAM,CAqL7E"}
|
|
@@ -1,121 +1,189 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
|
2
2
|
// Licensed under the MIT license.
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
* Push-to-main trigger with commit ID choice
|
|
4
|
+
* GitHub Actions publish workflow template
|
|
5
|
+
* Push-to-main trigger with commit ID choice and a single parameterized publish
|
|
6
|
+
* job driven by a workflow-level environment variable (TARGET_ENV)
|
|
6
7
|
*/
|
|
7
8
|
export function generatePublishWorkflow(config) {
|
|
9
|
+
const defaultEnvironment = config.environments[0] ?? 'dev';
|
|
8
10
|
const envChoices = config.environments.map((env) => ` - ${env}`).join('\n');
|
|
9
|
-
|
|
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
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
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
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
$
|
|
11
|
+
return `name: Run APIM Publisher
|
|
12
|
+
|
|
13
|
+
on:
|
|
14
|
+
push:
|
|
15
|
+
branches:
|
|
16
|
+
- main
|
|
17
|
+
paths:
|
|
18
|
+
- '${config.artifactDir}/**'
|
|
19
|
+
- 'configuration.*.yaml'
|
|
20
|
+
workflow_dispatch:
|
|
21
|
+
inputs:
|
|
22
|
+
COMMIT_ID_CHOICE:
|
|
23
|
+
description: '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"'
|
|
24
|
+
required: true
|
|
25
|
+
type: choice
|
|
26
|
+
default: publish-artifacts-in-last-commit
|
|
27
|
+
options:
|
|
28
|
+
- publish-artifacts-in-last-commit
|
|
29
|
+
- publish-all-artifacts-in-repo
|
|
30
|
+
ENVIRONMENT:
|
|
31
|
+
description: 'Choose which environment to publish to'
|
|
32
|
+
required: true
|
|
33
|
+
type: choice
|
|
34
|
+
default: ${defaultEnvironment}
|
|
35
|
+
options:
|
|
36
|
+
${envChoices}
|
|
37
|
+
|
|
38
|
+
permissions:
|
|
39
|
+
id-token: write
|
|
40
|
+
contents: read
|
|
41
|
+
|
|
42
|
+
# A single workflow-level variable selects the target environment. On manual runs
|
|
43
|
+
# it comes from the ENVIRONMENT input; on push to main it defaults to '${defaultEnvironment}'.
|
|
44
|
+
env:
|
|
45
|
+
TARGET_ENV: \${{ github.event.inputs.ENVIRONMENT || '${defaultEnvironment}' }}
|
|
46
|
+
|
|
47
|
+
jobs:
|
|
48
|
+
get-commit:
|
|
49
|
+
runs-on: ubuntu-latest
|
|
50
|
+
outputs:
|
|
51
|
+
commit_id: \${{ steps.commit.outputs.commit_id }}
|
|
52
|
+
steps:
|
|
53
|
+
- name: Set the Commit Id
|
|
54
|
+
id: commit
|
|
55
|
+
run: echo "commit_id=\${GITHUB_SHA}" >> $GITHUB_OUTPUT
|
|
56
|
+
|
|
57
|
+
publish:
|
|
58
|
+
runs-on: ubuntu-latest
|
|
59
|
+
environment: \${{ github.event.inputs.ENVIRONMENT || '${defaultEnvironment}' }}
|
|
60
|
+
needs: get-commit
|
|
61
|
+
steps:
|
|
62
|
+
- name: Checkout repository
|
|
63
|
+
uses: actions/checkout@v5
|
|
64
|
+
with:
|
|
65
|
+
fetch-depth: 2
|
|
66
|
+
|
|
67
|
+
- name: Setup Node.js
|
|
68
|
+
uses: actions/setup-node@v5
|
|
69
|
+
with:
|
|
70
|
+
node-version: '22'
|
|
71
|
+
|
|
72
|
+
- name: Install dependencies
|
|
73
|
+
run: npm install
|
|
74
|
+
|
|
75
|
+
- name: Resolve target environment
|
|
76
|
+
id: env
|
|
77
|
+
run: |
|
|
78
|
+
echo "name=\${TARGET_ENV}" >> "$GITHUB_OUTPUT"
|
|
79
|
+
echo "upper=$(echo "\${TARGET_ENV}" | tr '[:lower:]' '[:upper:]')" >> "$GITHUB_OUTPUT"
|
|
80
|
+
|
|
81
|
+
- name: Azure Login (Federated Credential)
|
|
82
|
+
uses: azure/login@v3
|
|
83
|
+
with:
|
|
84
|
+
client-id: \${{ secrets.AZURE_CLIENT_ID }}
|
|
85
|
+
tenant-id: \${{ secrets.AZURE_TENANT_ID }}
|
|
86
|
+
subscription-id: \${{ secrets.AZURE_SUBSCRIPTION_ID }}
|
|
87
|
+
|
|
88
|
+
- name: Validate token source values
|
|
89
|
+
env:
|
|
90
|
+
AVAILABLE_SECRETS_JSON: \${{ toJSON(secrets) }}
|
|
91
|
+
run: |
|
|
92
|
+
missing=0
|
|
93
|
+
config_file="configuration.\${TARGET_ENV}.yaml"
|
|
94
|
+
tokens=$(grep -o '{#\\[[^]]*\\]#}' "$config_file" | sed -E 's/^\\{#\\[([^]]+)\\]#\\}$/\\1/' | sort -u || true)
|
|
95
|
+
|
|
96
|
+
if [ -z "$tokens" ]; then
|
|
97
|
+
echo "No tokens found in $config_file"
|
|
98
|
+
exit 0
|
|
99
|
+
fi
|
|
100
|
+
|
|
101
|
+
while IFS= read -r token; do
|
|
102
|
+
if [ -z "$token" ]; then
|
|
103
|
+
continue
|
|
104
|
+
fi
|
|
105
|
+
|
|
106
|
+
if ! echo "$token" | grep -Eq '^[A-Za-z_][A-Za-z0-9_]*$'; then
|
|
107
|
+
echo "::error::Token '$token' is not a valid environment variable name. Use letters, numbers, and underscores only."
|
|
108
|
+
missing=1
|
|
109
|
+
continue
|
|
110
|
+
fi
|
|
111
|
+
|
|
112
|
+
value=$(jq -r --arg token "$token" '.[$token] // empty' <<< "$AVAILABLE_SECRETS_JSON")
|
|
113
|
+
if [ -z "$value" ]; then
|
|
114
|
+
echo "::error::Missing secret for token '$token'"
|
|
115
|
+
missing=1
|
|
116
|
+
continue
|
|
117
|
+
fi
|
|
118
|
+
|
|
119
|
+
printf '%s=%s\\n' "$token" "$value" >> "$GITHUB_ENV"
|
|
120
|
+
done <<< "$tokens"
|
|
121
|
+
|
|
122
|
+
if [ "$missing" -ne 0 ]; then
|
|
123
|
+
exit 1
|
|
124
|
+
fi
|
|
125
|
+
|
|
126
|
+
- name: Substitute tokens in configuration file
|
|
127
|
+
uses: cschleiden/replace-tokens@v1.4
|
|
128
|
+
with:
|
|
129
|
+
tokenPrefix: '{#['
|
|
130
|
+
tokenSuffix: ']#}'
|
|
131
|
+
files: '["configuration.\${{ env.TARGET_ENV }}.yaml"]'
|
|
132
|
+
# Token values are injected in the previous step based on token names.
|
|
133
|
+
# Ensure tokens in the configuration file match secret names exactly.
|
|
134
|
+
|
|
135
|
+
- name: Validate token substitution
|
|
136
|
+
run: |
|
|
137
|
+
config_file="configuration.\${TARGET_ENV}.yaml"
|
|
138
|
+
if grep -q '{#\\[' "$config_file"; then
|
|
139
|
+
echo "Unresolved tokens remain in $config_file"
|
|
140
|
+
grep -o '{#\\[[^]]*\\]#}' "$config_file" | sort -u
|
|
141
|
+
exit 1
|
|
142
|
+
fi
|
|
143
|
+
|
|
144
|
+
- name: Dry-run validation (incremental)
|
|
145
|
+
if: \${{ github.event.inputs.COMMIT_ID_CHOICE != 'publish-all-artifacts-in-repo' }}
|
|
146
|
+
run: |
|
|
147
|
+
npx apiops publish \\
|
|
148
|
+
--subscription-id \${{ secrets.AZURE_SUBSCRIPTION_ID }} \\
|
|
149
|
+
--resource-group \${{ secrets[format('APIM_RESOURCE_GROUP_{0}', steps.env.outputs.upper)] }} \\
|
|
150
|
+
--service-name \${{ secrets[format('APIM_SERVICE_NAME_{0}', steps.env.outputs.upper)] }} \\
|
|
151
|
+
--source ${config.artifactDir} \\
|
|
152
|
+
--overrides configuration.\${{ env.TARGET_ENV }}.yaml \\
|
|
153
|
+
--commit-id \${{ needs.get-commit.outputs.commit_id }} \\
|
|
154
|
+
--dry-run
|
|
155
|
+
|
|
156
|
+
- name: Dry-run validation (all artifacts)
|
|
157
|
+
if: \${{ github.event.inputs.COMMIT_ID_CHOICE == 'publish-all-artifacts-in-repo' }}
|
|
158
|
+
run: |
|
|
159
|
+
npx apiops publish \\
|
|
160
|
+
--subscription-id \${{ secrets.AZURE_SUBSCRIPTION_ID }} \\
|
|
161
|
+
--resource-group \${{ secrets[format('APIM_RESOURCE_GROUP_{0}', steps.env.outputs.upper)] }} \\
|
|
162
|
+
--service-name \${{ secrets[format('APIM_SERVICE_NAME_{0}', steps.env.outputs.upper)] }} \\
|
|
163
|
+
--source ${config.artifactDir} \\
|
|
164
|
+
--overrides configuration.\${{ env.TARGET_ENV }}.yaml \\
|
|
165
|
+
--dry-run
|
|
166
|
+
|
|
167
|
+
- name: Publish (incremental - last commit only)
|
|
168
|
+
if: \${{ github.event.inputs.COMMIT_ID_CHOICE != 'publish-all-artifacts-in-repo' }}
|
|
169
|
+
run: |
|
|
170
|
+
npx apiops publish \\
|
|
171
|
+
--subscription-id \${{ secrets.AZURE_SUBSCRIPTION_ID }} \\
|
|
172
|
+
--resource-group \${{ secrets[format('APIM_RESOURCE_GROUP_{0}', steps.env.outputs.upper)] }} \\
|
|
173
|
+
--service-name \${{ secrets[format('APIM_SERVICE_NAME_{0}', steps.env.outputs.upper)] }} \\
|
|
174
|
+
--source ${config.artifactDir} \\
|
|
175
|
+
--overrides configuration.\${{ env.TARGET_ENV }}.yaml \\
|
|
176
|
+
--commit-id \${{ needs.get-commit.outputs.commit_id }}
|
|
177
|
+
|
|
178
|
+
- name: Publish (all artifacts)
|
|
179
|
+
if: \${{ github.event.inputs.COMMIT_ID_CHOICE == 'publish-all-artifacts-in-repo' }}
|
|
180
|
+
run: |
|
|
181
|
+
npx apiops publish \\
|
|
182
|
+
--subscription-id \${{ secrets.AZURE_SUBSCRIPTION_ID }} \\
|
|
183
|
+
--resource-group \${{ secrets[format('APIM_RESOURCE_GROUP_{0}', steps.env.outputs.upper)] }} \\
|
|
184
|
+
--service-name \${{ secrets[format('APIM_SERVICE_NAME_{0}', steps.env.outputs.upper)] }} \\
|
|
185
|
+
--source ${config.artifactDir} \\
|
|
186
|
+
--overrides configuration.\${{ env.TARGET_ENV }}.yaml
|
|
119
187
|
`;
|
|
120
188
|
}
|
|
121
189
|
//# sourceMappingURL=publish-workflow.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish-workflow.js","sourceRoot":"","sources":["../../../src/templates/github-actions/publish-workflow.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC
|
|
1
|
+
{"version":3,"file":"publish-workflow.js","sourceRoot":"","sources":["../../../src/templates/github-actions/publish-workflow.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC;;;;GAIG;AAOH,MAAM,UAAU,uBAAuB,CAAC,MAA6B;IACnE,MAAM,kBAAkB,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC;IAC3D,MAAM,UAAU,GAAG,MAAM,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,eAAe,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAErF,OAAO;;;;;;;WAOE,MAAM,CAAC,WAAW;;;;;;;;;;;;;;;;mBAgBV,kBAAkB;;EAEnC,UAAU;;;;;;;yEAO6D,kBAAkB;;yDAElC,kBAAkB;;;;;;;;;;;;;;4DAcf,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBA4FvD,MAAM,CAAC,WAAW;;;;;;;;;;;;uBAYlB,MAAM,CAAC,WAAW;;;;;;;;;;;uBAWlB,MAAM,CAAC,WAAW;;;;;;;;;;;uBAWlB,MAAM,CAAC,WAAW;;CAExC,CAAC;AACF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,69 +1,72 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@peterhauge/apiops-cli",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
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
|
-
|
|
35
|
-
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
"
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
"
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
"@
|
|
60
|
-
"@
|
|
61
|
-
"@
|
|
62
|
-
"@
|
|
63
|
-
"eslint": "^
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
|
|
69
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@peterhauge/apiops-cli",
|
|
3
|
+
"version": "0.4.0-alpha.0",
|
|
4
|
+
"schemaVersion": "1",
|
|
5
|
+
"description": "CLI tool for Azure API Management configuration-as-code",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"private": false,
|
|
8
|
+
"main": "./dist/index.js",
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"bin": {
|
|
11
|
+
"apiops": "dist/cli/index.js"
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"dist",
|
|
15
|
+
"CHANGELOG.md"
|
|
16
|
+
],
|
|
17
|
+
"readme": "README.md",
|
|
18
|
+
"scripts": {
|
|
19
|
+
"prelint": "node scripts/embed-markdown-templates.mjs && node scripts/generate-schemas.mjs",
|
|
20
|
+
"prebuild": "node scripts/embed-markdown-templates.mjs && node scripts/generate-schemas.mjs",
|
|
21
|
+
"pretest": "node scripts/embed-markdown-templates.mjs && node scripts/generate-schemas.mjs",
|
|
22
|
+
"build": "tsc",
|
|
23
|
+
"test": "vitest run",
|
|
24
|
+
"test:watch": "vitest",
|
|
25
|
+
"lint": "eslint src tests",
|
|
26
|
+
"start": "tsx src/cli/index.ts"
|
|
27
|
+
},
|
|
28
|
+
"engines": {
|
|
29
|
+
"node": ">=22.0.0"
|
|
30
|
+
},
|
|
31
|
+
"repository": {
|
|
32
|
+
"type": "git",
|
|
33
|
+
"url": "git+https://github.com/Azure/apiops-cli.git"
|
|
34
|
+
},
|
|
35
|
+
"keywords": [
|
|
36
|
+
"azure",
|
|
37
|
+
"api-management",
|
|
38
|
+
"apim",
|
|
39
|
+
"cli",
|
|
40
|
+
"gitops",
|
|
41
|
+
"configuration-as-code"
|
|
42
|
+
],
|
|
43
|
+
"author": "",
|
|
44
|
+
"license": "MIT",
|
|
45
|
+
"bugs": {
|
|
46
|
+
"url": "https://github.com/Azure/apiops-cli/issues"
|
|
47
|
+
},
|
|
48
|
+
"homepage": "https://github.com/Azure/apiops-cli#readme",
|
|
49
|
+
"changelog": "https://github.com/Azure/apiops-cli/blob/main/CHANGELOG.md",
|
|
50
|
+
"dependencies": {
|
|
51
|
+
"@azure/identity": "^4.13.1",
|
|
52
|
+
"any-ascii": "^0.3.3",
|
|
53
|
+
"commander": "^14.0.3",
|
|
54
|
+
"he": "^1.2.0",
|
|
55
|
+
"js-yaml": "^4.1.1",
|
|
56
|
+
"simple-git": "^3.35.2"
|
|
57
|
+
},
|
|
58
|
+
"devDependencies": {
|
|
59
|
+
"@eslint/js": "^10.0.1",
|
|
60
|
+
"@types/he": "^1.2.3",
|
|
61
|
+
"@types/js-yaml": "^4.0.9",
|
|
62
|
+
"@types/node": "^25.5.2",
|
|
63
|
+
"@typescript-eslint/eslint-plugin": "^8.58.1",
|
|
64
|
+
"@typescript-eslint/parser": "^8.58.1",
|
|
65
|
+
"@vitest/coverage-v8": "^4.1.4",
|
|
66
|
+
"eslint": "^10.2.0",
|
|
67
|
+
"tsx": "^4.21.0",
|
|
68
|
+
"typescript": "^6.0.2",
|
|
69
|
+
"typescript-eslint": "^8.58.1",
|
|
70
|
+
"vitest": "^4.1.3"
|
|
71
|
+
}
|
|
72
|
+
}
|