@postman-cse/onboarding-bootstrap 0.10.0 → 0.12.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/LICENSE +21 -0
- package/README.md +110 -10
- package/action.yml +22 -2
- package/dist/cli.cjs +34466 -2224
- package/dist/index.cjs +34358 -2195
- package/package.json +22 -3
- package/.github/actionlint.yaml +0 -2
- package/.github/workflows/ci.yml +0 -36
- package/.github/workflows/contract-smoke.yml +0 -155
- package/.github/workflows/release.yml +0 -62
- package/.omc/sessions/b36ac16d-ce26-4e94-ae7e-dd817f2430a3.json +0 -8
- package/CLAUDE.md +0 -57
- package/src/cli.ts +0 -280
- package/src/contracts.ts +0 -166
- package/src/index.ts +0 -1100
- package/src/lib/github/github-api-client.ts +0 -262
- package/src/lib/http-error.ts +0 -80
- package/src/lib/postman/internal-integration-adapter.ts +0 -272
- package/src/lib/postman/postman-assets-client.ts +0 -786
- package/src/lib/postman/workspace-selection.ts +0 -121
- package/src/lib/repo/context.ts +0 -119
- package/src/lib/retry.ts +0 -79
- package/src/lib/secrets.ts +0 -104
- package/tests/bootstrap-action.test.ts +0 -1217
- package/tests/cli.test.ts +0 -150
- package/tests/contract.test.ts +0 -123
- package/tests/github-api-client.test.ts +0 -91
- package/tests/internal-integration-adapter.test.ts +0 -244
- package/tests/postman-assets-client.test.ts +0 -268
- package/tests/retry.test.ts +0 -54
- package/tests/secrets.test.ts +0 -66
- package/tests/workspace-selection.test.ts +0 -301
- package/tmp/cli-run-result.json +0 -11
- package/tsconfig.json +0 -20
- package/vitest.config.ts +0 -8
package/src/contracts.ts
DELETED
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
export interface ActionInputContract {
|
|
2
|
-
description: string;
|
|
3
|
-
required: boolean;
|
|
4
|
-
default?: string;
|
|
5
|
-
allowedValues?: string[];
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export interface ActionOutputContract {
|
|
9
|
-
description: string;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export interface BetaActionContract {
|
|
13
|
-
name: string;
|
|
14
|
-
description: string;
|
|
15
|
-
inputs: Record<string, ActionInputContract>;
|
|
16
|
-
outputs: Record<string, ActionOutputContract>;
|
|
17
|
-
retainedBehavior: string[];
|
|
18
|
-
removedBehavior: string[];
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export const openAlphaActionContract: BetaActionContract = {
|
|
22
|
-
name: 'postman-bootstrap-action',
|
|
23
|
-
description: 'Public open-alpha contract for bootstrapping Postman assets from a registry-backed spec.',
|
|
24
|
-
inputs: {
|
|
25
|
-
|
|
26
|
-
'workspace-id': {
|
|
27
|
-
description: 'Existing Postman workspace ID.',
|
|
28
|
-
required: false
|
|
29
|
-
},
|
|
30
|
-
'spec-id': {
|
|
31
|
-
description: 'Existing Postman spec ID.',
|
|
32
|
-
required: false
|
|
33
|
-
},
|
|
34
|
-
'baseline-collection-id': {
|
|
35
|
-
description: 'Existing baseline collection ID.',
|
|
36
|
-
required: false
|
|
37
|
-
},
|
|
38
|
-
'smoke-collection-id': {
|
|
39
|
-
description: 'Existing smoke collection ID.',
|
|
40
|
-
required: false
|
|
41
|
-
},
|
|
42
|
-
'contract-collection-id': {
|
|
43
|
-
description: 'Existing contract collection ID.',
|
|
44
|
-
required: false
|
|
45
|
-
},
|
|
46
|
-
'collection-sync-mode': {
|
|
47
|
-
description:
|
|
48
|
-
'Collection lifecycle policy: reuse existing collections, refresh them from the latest spec, or version them by release label.',
|
|
49
|
-
required: false,
|
|
50
|
-
default: 'refresh',
|
|
51
|
-
allowedValues: ['reuse', 'refresh', 'version']
|
|
52
|
-
},
|
|
53
|
-
'spec-sync-mode': {
|
|
54
|
-
description:
|
|
55
|
-
'Spec lifecycle policy: update the canonical spec or create/reuse a versioned spec for the resolved release label.',
|
|
56
|
-
required: false,
|
|
57
|
-
default: 'update',
|
|
58
|
-
allowedValues: ['update', 'version']
|
|
59
|
-
},
|
|
60
|
-
'release-label': {
|
|
61
|
-
description:
|
|
62
|
-
'Optional release label. When omitted for versioned sync, the action derives one from GitHub ref metadata.',
|
|
63
|
-
required: false
|
|
64
|
-
},
|
|
65
|
-
'project-name': {
|
|
66
|
-
description: 'Service project name.',
|
|
67
|
-
required: true
|
|
68
|
-
},
|
|
69
|
-
domain: {
|
|
70
|
-
description: 'Business domain for the service.',
|
|
71
|
-
required: false
|
|
72
|
-
},
|
|
73
|
-
'domain-code': {
|
|
74
|
-
description: 'Short domain code used in workspace naming.',
|
|
75
|
-
required: false
|
|
76
|
-
},
|
|
77
|
-
'requester-email': {
|
|
78
|
-
description: 'Requester email for audit context.',
|
|
79
|
-
required: false
|
|
80
|
-
},
|
|
81
|
-
'workspace-admin-user-ids': {
|
|
82
|
-
description: 'Comma-separated workspace admin user ids.',
|
|
83
|
-
required: false
|
|
84
|
-
},
|
|
85
|
-
'workspace-team-id': {
|
|
86
|
-
description: 'Numeric sub-team ID for org-mode workspace creation.',
|
|
87
|
-
required: false
|
|
88
|
-
},
|
|
89
|
-
'spec-url': {
|
|
90
|
-
description: 'HTTPS URL to the OpenAPI document.',
|
|
91
|
-
required: true
|
|
92
|
-
},
|
|
93
|
-
'governance-mapping-json': {
|
|
94
|
-
description: 'JSON map of business domain to governance group name.',
|
|
95
|
-
required: false,
|
|
96
|
-
default: '{}'
|
|
97
|
-
},
|
|
98
|
-
'postman-api-key': {
|
|
99
|
-
description: 'Postman API key used for bootstrap operations.',
|
|
100
|
-
required: true
|
|
101
|
-
},
|
|
102
|
-
'postman-access-token': {
|
|
103
|
-
description: 'Postman access token used for governance and workspace mutations.',
|
|
104
|
-
required: false
|
|
105
|
-
},
|
|
106
|
-
'integration-backend': {
|
|
107
|
-
description: 'Integration backend for downstream workspace connectivity.',
|
|
108
|
-
required: false,
|
|
109
|
-
default: 'bifrost',
|
|
110
|
-
allowedValues: ['bifrost']
|
|
111
|
-
}
|
|
112
|
-
},
|
|
113
|
-
outputs: {
|
|
114
|
-
'workspace-id': {
|
|
115
|
-
description: 'Postman workspace ID.'
|
|
116
|
-
},
|
|
117
|
-
'workspace-url': {
|
|
118
|
-
description: 'Postman workspace URL.'
|
|
119
|
-
},
|
|
120
|
-
'workspace-name': {
|
|
121
|
-
description: 'Postman workspace name.'
|
|
122
|
-
},
|
|
123
|
-
'spec-id': {
|
|
124
|
-
description: 'Uploaded Postman spec ID.'
|
|
125
|
-
},
|
|
126
|
-
'baseline-collection-id': {
|
|
127
|
-
description: 'Baseline collection ID.'
|
|
128
|
-
},
|
|
129
|
-
'smoke-collection-id': {
|
|
130
|
-
description: 'Smoke collection ID.'
|
|
131
|
-
},
|
|
132
|
-
'contract-collection-id': {
|
|
133
|
-
description: 'Contract collection ID.'
|
|
134
|
-
},
|
|
135
|
-
'collections-json': {
|
|
136
|
-
description: 'JSON summary of generated collections.'
|
|
137
|
-
},
|
|
138
|
-
'lint-summary-json': {
|
|
139
|
-
description: 'JSON summary of lint errors and warnings.'
|
|
140
|
-
}
|
|
141
|
-
},
|
|
142
|
-
retainedBehavior: [
|
|
143
|
-
'workspace creation',
|
|
144
|
-
'governance group assignment',
|
|
145
|
-
'requester workspace invitation',
|
|
146
|
-
'workspace admin assignment',
|
|
147
|
-
'spec upload to Spec Hub',
|
|
148
|
-
'OpenAPI operation summary normalization before upload (missing or oversized summaries)',
|
|
149
|
-
'spec linting by UID',
|
|
150
|
-
'baseline, smoke, and contract collection generation',
|
|
151
|
-
'collection refresh and versioning policies',
|
|
152
|
-
'collection tagging',
|
|
153
|
-
'workspace, spec, and collection outputs'
|
|
154
|
-
],
|
|
155
|
-
removedBehavior: [
|
|
156
|
-
'snake_case input and output names',
|
|
157
|
-
'step mode',
|
|
158
|
-
'hardcoded runtime deployment assumptions',
|
|
159
|
-
'aws, docker, and infra workflow concerns',
|
|
160
|
-
'runtime-coupled workflow tuning knobs',
|
|
161
|
-
'legacy placeholder inputs such as team-id'
|
|
162
|
-
]
|
|
163
|
-
};
|
|
164
|
-
|
|
165
|
-
export const contractInputNames = Object.keys(openAlphaActionContract.inputs);
|
|
166
|
-
export const contractOutputNames = Object.keys(openAlphaActionContract.outputs);
|