@voxgig/create-sdkgen 0.24.0 → 0.26.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/dist/create-sdkgen.js +0 -20
- package/dist/create-sdkgen.js.map +1 -1
- package/dist/project/standard/CreateRoot.js +1 -103
- package/dist/project/standard/CreateRoot.js.map +1 -1
- package/package.json +3 -3
- package/project/standard/.sdk/model/config.aon +0 -5
- package/project/standard/.sdk/model/sdk.fragment.aon +1 -6
- package/project/standard/.sdk/package.json +4 -4
- package/project/standard/.sdk/src/BuildSDK.ts +23 -40
- package/project/standard/.sdk/src/Root.ts +0 -22
- package/project/standard/.sdk/src/Top.ts +0 -8
- package/project/standard/.sdk/test/feature/cost.aon +0 -43
- package/project/standard/.sdk/test/primary/clean.aon +0 -7
- package/project/standard/.sdk/test/primary/featureAdd.aon +0 -11
- package/project/standard/.sdk/test/primary/featureHook.aon +0 -10
- package/project/standard/.sdk/test/primary/featureInit.aon +0 -10
- package/project/standard/.sdk/test/primary/fetcher.aon +0 -10
- package/project/standard/.sdk/test/primary/makeFetchDef.aon +0 -10
- package/project/standard/.sdk/test/primary/makePoint.aon +0 -22
- package/project/standard/.sdk/test/primary/makeResult.aon +0 -14
- package/project/standard/.sdk/test/primary/prepareAuth.aon +0 -5
- package/project/standard/.sdk/test/primary/preparePath.aon +0 -7
- package/project/standard/.sdk/test/struct/nullsem.aon +2 -95
- package/project/standard/.sdk/test/struct/select.aon +79 -96
- package/src/create-sdkgen.ts +0 -35
- package/src/project/standard/CreateRoot.ts +1 -103
package/dist/create-sdkgen.js
CHANGED
|
@@ -47,8 +47,6 @@ const util_1 = require("@voxgig/util");
|
|
|
47
47
|
const package_json_1 = __importDefault(require("../package.json"));
|
|
48
48
|
const { names, Jostraca } = JostracaModule;
|
|
49
49
|
const SDK_FOLDER = '.sdk';
|
|
50
|
-
// TODO: CreateSdkGen opts and generate opts should be mostly the same, and
|
|
51
|
-
// generate should override
|
|
52
50
|
function CreateSdkGen(opts) {
|
|
53
51
|
const fs = opts.fs || Fs;
|
|
54
52
|
const debug = opts.debug;
|
|
@@ -94,12 +92,6 @@ function CreateSdkGen(opts) {
|
|
|
94
92
|
folder,
|
|
95
93
|
log: log.child({ cmp: 'jostraca' }),
|
|
96
94
|
meta: { spec },
|
|
97
|
-
// Overwrite the scaffolded project (.sdk components, templates, build
|
|
98
|
-
// config) rather than 3-way merge. The scaffold is toolchain-derived and
|
|
99
|
-
// not hand-edited; merging against a drifting .jostraca base keeps STALE
|
|
100
|
-
// components/templates on a toolchain bump (so a fix never propagates) and
|
|
101
|
-
// can inject <<<<<<< markers. See @voxgig/sdkgen
|
|
102
|
-
// docs/explanation/regeneration-overwrite.md.
|
|
103
95
|
existing: {
|
|
104
96
|
txt: {
|
|
105
97
|
write: true,
|
|
@@ -140,7 +132,6 @@ function CreateSdkGen(opts) {
|
|
|
140
132
|
return projectFolder;
|
|
141
133
|
}
|
|
142
134
|
projectFolder = node_path_1.default.resolve(node_path_1.default.join(__dirname, 'project', spec.project));
|
|
143
|
-
// TODO: support auto install project npm package (specific version) in a special cache folder
|
|
144
135
|
if (!fs.existsSync(projectFolder)) {
|
|
145
136
|
projectFolder = spec.project;
|
|
146
137
|
}
|
|
@@ -220,17 +211,6 @@ async function installNpm(spec, opts, model) {
|
|
|
220
211
|
log.info({ point: 'generate-install', note: 'running npm install in ' + cwd });
|
|
221
212
|
await runNpm(['install'], spawn_opts);
|
|
222
213
|
}
|
|
223
|
-
// `-t` / `-f` are INDEPENDENT of `--no-install`: the documented contract is
|
|
224
|
-
// that --no-install skips `npm install`, not that it drops the requested
|
|
225
|
-
// targets and features. Adding them is still valid without an install when
|
|
226
|
-
// the project already has its toolchain (re-scaffolding an existing folder
|
|
227
|
-
// is a supported flow — "if run against an existing folder generated files
|
|
228
|
-
// will be overwritten").
|
|
229
|
-
//
|
|
230
|
-
// They ARE npm run scripts that resolve @voxgig/sdkgen from node_modules, so
|
|
231
|
-
// without one they cannot work. Fail with an actionable message rather than
|
|
232
|
-
// the raw module-resolution error — and rather than silently skipping, which
|
|
233
|
-
// reports success while leaving config.aon without the requested entries.
|
|
234
214
|
const wanted = [
|
|
235
215
|
(spec.target ?? []).length ? '--target' : '',
|
|
236
216
|
(spec.feature ?? []).length ? '--feature' : '',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-sdkgen.js","sourceRoot":"","sources":["../src/create-sdkgen.ts"],"names":[],"mappings":";AAAA,yDAAyD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"create-sdkgen.js","sourceRoot":"","sources":["../src/create-sdkgen.ts"],"names":[],"mappings":";AAAA,yDAAyD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QA4UvD,YAAY;AA1Ud,MAAY,EAAE,oCAAe;AAC7B,MAAY,EAAE,oCAAe;AAC7B,0DAA4B;AAC5B,iDAAqC;AAErC,MAAY,cAAc,qCAAgB;AAE1C,uCAA4D;AAE5D,mEAAiC;AA8BjC,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,cAAc,CAAA;AAG1C,MAAM,UAAU,GAAG,MAAM,CAAA;AAGzB,SAAS,YAAY,CAAC,IAA6B;IACjD,MAAM,EAAE,GAAG,IAAI,CAAC,EAAE,IAAI,EAAE,CAAA;IAExB,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;IACxB,MAAM,IAAI,GAAG,IAAA,iBAAU,EAAC,QAAQ,EAAE,IAAI,CAAC,CAAA;IACvC,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAA;IAEzC,MAAM,QAAQ,GAAG,QAAQ,EAAE,CAAA;IAE3B,KAAK,UAAU,QAAQ,CAAC,IAAkB;QACxC,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;QAExB,IAAI,MAAM,GAAG,CA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G,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IAEnC,GAAG,CAAC,IAAI,CAAC;QACP,KAAK,EAAE,iBAAiB,EAAE,MAAM,EAAE,UAAU;QAC5C,IAAI,EAAE,kBAAkB,GAAG,UAAU;KACtC,CAAC,CAAA;IAEF,MAAM,MAAM,CAAC,CAAC,KAAK,EAAE,YAAY,EAAE,UAAU,CAAC,EAAE,UAAU,CAAC,CAAA;AAC7D,CAAC;AAGD,KAAK,UAAU,eAAe,CAAC,IAAkB,EAAE,IAAS,EAAE,KAAU,EAAE,UAAe;IACvF,MAAM,OAAO,GAAI,IAAI,CAAC,OAAoB,CAAA;IAE1C,IAAI,IAAI,IAAI,OAAO,IAAI,CAAC,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC;QAC5C,OAAM;IACR,CAAC;IAED,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAA;IACpB,MAAM,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IAErC,GAAG,CAAC,IAAI,CAAC;QACP,KAAK,EAAE,kBAAkB,EAAE,OAAO,EAAE,WAAW;QAC/C,IAAI,EAAE,mBAAmB,GAAG,WAAW;KACxC,CAAC,CAAA;IAEF,MAAM,MAAM,CAAC,CAAC,KAAK,EAAE,aAAa,EAAE,WAAW,CAAC,EAAE,UAAU,CAAC,CAAA;AAC/D,CAAC"}
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.CreateRoot = void 0;
|
|
7
7
|
exports.sanitizeDefName = sanitizeDefName;
|
|
8
8
|
const node_path_1 = __importDefault(require("node:path"));
|
|
9
|
-
// import * as Fs from 'node:fs'
|
|
10
9
|
const jostraca_1 = require("jostraca");
|
|
11
10
|
const ModelSdk_1 = require("./ModelSdk");
|
|
12
11
|
const GITIGNORE_TOP = `# Local config / secrets
|
|
@@ -48,39 +47,6 @@ log/
|
|
|
48
47
|
# OS
|
|
49
48
|
.DS_Store
|
|
50
49
|
`;
|
|
51
|
-
// The guide overlay is the ONE model file the user owns.
|
|
52
|
-
//
|
|
53
|
-
// Everything else the scaffold writes is toolchain-derived and is deliberately
|
|
54
|
-
// OVERWRITTEN (see the `existing.txt.write` rationale in create-sdkgen.ts) so a
|
|
55
|
-
// toolchain fix propagates. `model/guide/guide.aon` is the exception: apidef
|
|
56
|
-
// unifies it OVER the heuristic classification, and it is where every
|
|
57
|
-
// documented customization lives — entity rename, hide, move, activate,
|
|
58
|
-
// per-path deactivation, method override, param rename, response transform.
|
|
59
|
-
// Copying the stub over it destroyed that work on every re-scaffold, and
|
|
60
|
-
// cedar-regen.sh re-scaffolds on every regen, so the loss was silent and
|
|
61
|
-
// repeated.
|
|
62
|
-
//
|
|
63
|
-
// It is excluded from the bulk Copy and merged instead (see mergeGuide).
|
|
64
|
-
// The PROJECT overlay: the second model file the user owns.
|
|
65
|
-
//
|
|
66
|
-
// `guide.aon` owns what the API looks like. This owns what the PROJECT is —
|
|
67
|
-
// publication values above all. The sdkgen schema tells you to declare those
|
|
68
|
-
// in `model/sdk.aon` "where they survive a resync", and that was simply not
|
|
69
|
-
// true: ModelSdk rewrites sdk.aon from its template on every scaffold, so a
|
|
70
|
-
// version or package name declared there vanished before the model was built,
|
|
71
|
-
// with no error. The cedar fleet ran for months with every manifest pinned at
|
|
72
|
-
// the schema default 0.0.1 while its git tags climbed past 0.1.1, and this is
|
|
73
|
-
// why.
|
|
74
|
-
//
|
|
75
|
-
// sdk.aon cannot simply be merged the way guide.aon is. Its template owns
|
|
76
|
-
// `name`, `origin` and especially `def` — the OpenAPI filename, which really
|
|
77
|
-
// does change (three cedar specs were renamed in one week). A "keep the user's
|
|
78
|
-
// file" merge would freeze `def` at a spec that no longer exists and break
|
|
79
|
-
// regeneration. So the template keeps sole ownership of sdk.aon, and the
|
|
80
|
-
// user gets a file of their own that sdk.aon includes.
|
|
81
|
-
//
|
|
82
|
-
// Written ONCE. If it exists, it is re-emitted byte-for-byte, so a
|
|
83
|
-
// re-scaffold is a no-op on it.
|
|
84
50
|
const PROJECT_FILE = 'project.aon';
|
|
85
51
|
const PROJECT_STUB = `# Project overlay — YOURS. The scaffold creates this file once and never
|
|
86
52
|
# overwrites it, unlike every other file it writes.
|
|
@@ -109,17 +75,6 @@ const PROJECT_STUB = `# Project overlay — YOURS. The scaffold creates this fil
|
|
|
109
75
|
`;
|
|
110
76
|
const GUIDE_FILE = 'guide.aon';
|
|
111
77
|
const GUIDE_REL = ['model', 'guide', GUIDE_FILE];
|
|
112
|
-
// Rename a user-owned overlay from its pre-2026-08 `.aontu` name to `.aon`.
|
|
113
|
-
//
|
|
114
|
-
// Both overlays are read-if-present and written-if-absent, which is exactly
|
|
115
|
-
// the shape that turns an extension rename into DATA LOSS rather than a
|
|
116
|
-
// rename: look for `guide.aon`, find nothing, write a fresh template over the
|
|
117
|
-
// top, and the user's entity renames, hides and overrides are still sitting
|
|
118
|
-
// in `guide.aontu` being ignored. 660 generated repos carry one.
|
|
119
|
-
//
|
|
120
|
-
// So the legacy file is moved to the new name BEFORE anything reads or writes
|
|
121
|
-
// it. Contents are untouched; only the name changes. Idempotent — once the
|
|
122
|
-
// `.aon` exists this does nothing, so a re-scaffold stays a no-op.
|
|
123
78
|
function migrateOverlay(fs, dir, name) {
|
|
124
79
|
const next = node_path_1.default.join(dir, name + '.aon');
|
|
125
80
|
const prev = node_path_1.default.join(dir, name + '.aontu');
|
|
@@ -127,15 +82,6 @@ function migrateOverlay(fs, dir, name) {
|
|
|
127
82
|
return;
|
|
128
83
|
}
|
|
129
84
|
try {
|
|
130
|
-
// RENAME THE FILE *AND* ITS INCLUDES. An overlay written before the
|
|
131
|
-
// rename includes the toolchain schemas by their old names —
|
|
132
|
-
// `@"@voxgig/apidef/model/guide.aontu"` — and apidef 8 no longer ships
|
|
133
|
-
// that file, so a migration that moved the file but kept its contents
|
|
134
|
-
// verbatim produced a project that could not resolve its own guide.
|
|
135
|
-
// mergeGuide cannot repair this either: it keeps the user's lines and
|
|
136
|
-
// only ADDS missing template includes, so the dead one would survive
|
|
137
|
-
// beside the new one. Only `@`-include extensions are touched; nothing
|
|
138
|
-
// else in the user's file is rewritten.
|
|
139
85
|
const src = String(fs.readFileSync(prev))
|
|
140
86
|
.replace(/(@['"][^'"]+)\.aontu(['"])/g, '$1.aon$2');
|
|
141
87
|
fs.writeFileSync(next, src);
|
|
@@ -146,34 +92,11 @@ function migrateOverlay(fs, dir, name) {
|
|
|
146
92
|
// template being written fresh, which is what would have happened anyway.
|
|
147
93
|
}
|
|
148
94
|
}
|
|
149
|
-
// Merge the guide template into an existing guide overlay.
|
|
150
|
-
//
|
|
151
|
-
// A guide is the template's `@`-includes plus whatever the user added. The
|
|
152
|
-
// includes are the only part the template OWNS, so the merge is: keep the
|
|
153
|
-
// user's file verbatim, and restore any include it is missing. When nothing
|
|
154
|
-
// is missing — the normal case — the file is returned byte-identical, so a
|
|
155
|
-
// re-scaffold is a no-op on it.
|
|
156
|
-
//
|
|
157
|
-
// Missing includes are restored at the TOP, not appended: `base-guide.aon`
|
|
158
|
-
// carries the heuristic classification that the user's overrides unify over,
|
|
159
|
-
// and the overlay reads correctly only when the includes precede it.
|
|
160
95
|
function mergeGuide(existing, template) {
|
|
161
96
|
if (null == existing) {
|
|
162
97
|
return template;
|
|
163
98
|
}
|
|
164
99
|
const isInclude = (line) => line.trim().startsWith('@');
|
|
165
|
-
// AN INCLUDE IS THE FILE IT NAMES, whichever way the `./` falls.
|
|
166
|
-
//
|
|
167
|
-
// The template gained a `./` when aontu 0.65 made a bare single-segment
|
|
168
|
-
// include name a PACKAGE (ADR-039). Every guide written before that says
|
|
169
|
-
// `@"base-guide.aon"`, and `guide.aon` is project-owned: the scaffold
|
|
170
|
-
// writes it once and never again, so those files stay as they are until
|
|
171
|
-
// something migrates them.
|
|
172
|
-
//
|
|
173
|
-
// Comparing the raw lines read the old spelling as a DIFFERENT include, so
|
|
174
|
-
// a re-scaffold restored one the file already had — leaving the guide
|
|
175
|
-
// including `base-guide.aon` twice, under two spellings, which is the one
|
|
176
|
-
// thing this merge exists to avoid.
|
|
177
100
|
const key = (line) => line.trim().replace(/^@"\.\//, '@"');
|
|
178
101
|
const have = new Set(existing.split('\n').map(key));
|
|
179
102
|
const missing = template.split('\n')
|
|
@@ -185,26 +108,10 @@ function mergeGuide(existing, template) {
|
|
|
185
108
|
}
|
|
186
109
|
return missing.join('\n') + '\n\n' + existing;
|
|
187
110
|
}
|
|
188
|
-
// The OpenAPI filename is inherited from the upstream API slug, and upstream
|
|
189
|
-
// slugs are not constrained: the freepublicapis corpus contains apostrophes
|
|
190
|
-
// (catherine-shulman's-quotes), accents (dólar-y-monedas, kölner-adressen),
|
|
191
|
-
// and '!' / '>' / '_'. That name is copied into .sdk/def/ AND written verbatim
|
|
192
|
-
// into a single-quoted aontu string in sdk.aon:
|
|
193
|
-
//
|
|
194
|
-
// def: 'catherine-shulman's-quotes_0.1.0.json'
|
|
195
|
-
// ^ terminates the string -> AontuError, no SDK
|
|
196
|
-
//
|
|
197
|
-
// Slugs are [a-z0-9-]; a filename additionally needs '.' and '_' for the
|
|
198
|
-
// version segment and extension, so those are kept — which also means every
|
|
199
|
-
// already-conforming name (including cedar's dotted gitlab-v4-swagger-2.0.yaml)
|
|
200
|
-
// is untouched and no repo churns. Everything else is folded to '-'.
|
|
201
111
|
function sanitizeDefName(filename) {
|
|
202
112
|
const clean = filename
|
|
203
|
-
.normalize('NFKD').replace(/[\u0300-\u036f]/g, '')
|
|
113
|
+
.normalize('NFKD').replace(/[\u0300-\u036f]/g, '')
|
|
204
114
|
.toLowerCase()
|
|
205
|
-
// Quotes are ELIDED, not folded to '-', so the filename agrees with the
|
|
206
|
-
// repo name apidef's sanitizeSlug derives from the same slug:
|
|
207
|
-
// catherine-shulman's-quotes -> catherine-shulmans-quotes(-sdk).
|
|
208
115
|
.replace(/['’"]/g, '')
|
|
209
116
|
.replace(/[^a-z0-9._-]+/g, '-')
|
|
210
117
|
.replace(/-+/g, '-')
|
|
@@ -215,24 +122,16 @@ function sanitizeDefName(filename) {
|
|
|
215
122
|
.replace(/^-|-$/g, '');
|
|
216
123
|
return '' === clean ? 'openapi.yml' : clean;
|
|
217
124
|
}
|
|
218
|
-
// TODO: rename to RootSdk
|
|
219
125
|
const CreateRoot = (0, jostraca_1.cmp)(function CreateRoot(props) {
|
|
220
126
|
const { ctx$, ctx$: { folder }, spec, model } = props;
|
|
221
127
|
const fs = ctx$.fs();
|
|
222
|
-
// TODO: move to @voxgig/util as duplicated
|
|
223
128
|
model.const = { name: model.name };
|
|
224
129
|
(0, jostraca_1.names)(model.const, model.name);
|
|
225
130
|
model.const.year = new Date().getFullYear();
|
|
226
|
-
// Scaffold is MIT-licensed (matches the emitted LICENSE and tm/LICENSE);
|
|
227
|
-
// set directly rather than via names() so the value stays 'MIT', not 'Mit'.
|
|
228
131
|
model.const.License = 'MIT';
|
|
229
132
|
ctx$.model = model;
|
|
230
133
|
(0, jostraca_1.Project)({ folder }, () => {
|
|
231
134
|
const from = node_path_1.default.resolve(node_path_1.default.join(__dirname, '..', '..', '..', 'project', 'standard'));
|
|
232
|
-
// console.log('FROM', from)
|
|
233
|
-
// Copy `exclude` matches the SOURCE-RELATIVE path exactly, so this names
|
|
234
|
-
// the one guide under the scaffold and nothing else. It is re-emitted,
|
|
235
|
-
// merged, in the model folder below.
|
|
236
135
|
const guideExclude = [spec.sdk_folder, ...GUIDE_REL].join('/');
|
|
237
136
|
(0, jostraca_1.Copy)({
|
|
238
137
|
from,
|
|
@@ -255,7 +154,6 @@ const CreateRoot = (0, jostraca_1.cmp)(function CreateRoot(props) {
|
|
|
255
154
|
(0, jostraca_1.Content)(GITIGNORE_SDK);
|
|
256
155
|
});
|
|
257
156
|
(0, jostraca_1.Folder)({ name: 'def' }, () => {
|
|
258
|
-
// TODO: file existence check should be jostraca util
|
|
259
157
|
if (fs.existsSync(origdef)) {
|
|
260
158
|
(0, jostraca_1.Copy)({ from: origdef, to: projdef });
|
|
261
159
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreateRoot.js","sourceRoot":"","sources":["../../../src/project/standard/CreateRoot.ts"],"names":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"CreateRoot.js","sourceRoot":"","sources":["../../../src/project/standard/CreateRoot.ts"],"names":[],"mappings":";;;;;;QA8PE,eAAe;AA5PjB,0DAA4B;AAE5B,uCAUiB;AAGjB,yCAAqC;AAGrC,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;CAkBrB,CAAA;AAGD,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;;CAmBrB,CAAA;AAGD,MAAM,YAAY,GAAG,aAAa,CAAA;AAClC,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;CAwBpB,CAAA;AAGD,MAAM,UAAU,GAAG,WAAW,CAAA;AAC9B,MAAM,SAAS,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC,CAAA;AAGhD,SAAS,cAAc,CAAC,EAAO,EAAE,GAAW,EAAE,IAAY;IACxD,MAAM,IAAI,GAAG,mBAAI,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,GAAG,MAAM,CAAC,CAAA;IAC1C,MAAM,IAAI,GAAG,mBAAI,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,GAAG,QAAQ,CAAC,CAAA;IAC5C,IAAI,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QAChD,OAAM;IACR,CAAC;IACD,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;aACtC,OAAO,CAAC,6BAA6B,EAAE,UAAU,CAAC,CAAA;QACrD,EAAE,CAAC,aAAa,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;QAC3B,EAAE,CAAC,UAAU,CAAC,IAAI,CAA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
"main": "dist/create-sdkgen.js",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"types": "dist/create-sdkgen.d.ts",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"scripts": {
|
|
23
23
|
"pretest": "node build/check-tests.js",
|
|
24
|
-
"test": "node --enable-source-maps --test dist-test/**/*.test.js",
|
|
24
|
+
"test": "node tools/comment-gate.cjs && node --enable-source-maps --test dist-test/**/*.test.js",
|
|
25
25
|
"pretest-some": "node build/check-tests.js",
|
|
26
26
|
"test-some": "node --enable-source-maps --test-name-pattern=\"$npm_config_pattern\" --test dist-test/**/*.test.js",
|
|
27
27
|
"watch": "tsc --build src test -w",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"@voxgig/util": "0.5.4",
|
|
59
|
-
"aontu": "0.
|
|
59
|
+
"aontu": ">=0.68",
|
|
60
60
|
"chokidar": "5.0.0",
|
|
61
61
|
"jostraca": "0.31.2",
|
|
62
62
|
"shape": ">=10"
|
|
@@ -2,11 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
main: kit: config: {
|
|
4
4
|
|
|
5
|
-
# The Authorization credential prefix is derived from the OpenAPI
|
|
6
|
-
# security scheme (see api/api-info.aon: main.kit.info.security,
|
|
7
|
-
# set by apidef) and defaults to 'Bearer' when the spec gives no
|
|
8
|
-
# signal. Uncomment to override per-SDK:
|
|
9
|
-
# auth: prefix: 'Bearer'
|
|
10
5
|
|
|
11
6
|
|
|
12
7
|
headers: {
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
@"@voxgig/sdkgen/model/sdkgen.aon"
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
# SDK Details.
|
|
8
7
|
name: 'NAME'
|
|
9
8
|
origin: 'voxgig-sdk'
|
|
10
9
|
def: 'DEF'
|
|
@@ -24,7 +23,7 @@ def: 'DEF'
|
|
|
24
23
|
|
|
25
24
|
# SDK Features.
|
|
26
25
|
@"feature/feature-index.aon"
|
|
27
|
-
|
|
26
|
+
|
|
28
27
|
|
|
29
28
|
# SDK Targets.
|
|
30
29
|
@"target/target-index.aon"
|
|
@@ -34,10 +33,6 @@ def: 'DEF'
|
|
|
34
33
|
@"flow/flow-index.aon"
|
|
35
34
|
|
|
36
35
|
|
|
37
|
-
# Project overlay — user-owned, created once and never overwritten.
|
|
38
|
-
#
|
|
39
|
-
# LAST, deliberately: it may refine main.kit.target.<t>, and a target can only
|
|
40
|
-
# be refined after target-index.aon has defined it.
|
|
41
36
|
@"./project.aon"
|
|
42
37
|
|
|
43
38
|
# Documentation editions. Settings belong in project.aon.
|
|
@@ -29,13 +29,13 @@
|
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@types/node": ">=25.6",
|
|
31
31
|
"typescript": ">=6.0",
|
|
32
|
-
"@voxgig/apidef": ">=8.
|
|
32
|
+
"@voxgig/apidef": ">=8.12.1",
|
|
33
33
|
"@voxgig/model": ">=10.0",
|
|
34
|
-
"@voxgig/sdkgen": ">=4.
|
|
34
|
+
"@voxgig/sdkgen": ">=4.22.0",
|
|
35
35
|
"@voxgig/util": ">=0.5",
|
|
36
36
|
"@voxgig/struct": ">=0.2",
|
|
37
37
|
"jostraca": ">=0.33.1",
|
|
38
|
-
"aontu": ">=0.
|
|
39
|
-
"@voxgig/docgen": ">=0.
|
|
38
|
+
"aontu": ">=0.68",
|
|
39
|
+
"@voxgig/docgen": ">=0.23.0"
|
|
40
40
|
}
|
|
41
41
|
}
|
|
@@ -31,7 +31,6 @@ const BuildSDK = cmp(function BuildSDK(props: any) {
|
|
|
31
31
|
const ctx$ = props.ctx$
|
|
32
32
|
const model: Model = ctx$.model
|
|
33
33
|
|
|
34
|
-
// TODO: should come from ctx$ options
|
|
35
34
|
const sdkBuildFolder = '.sdk'
|
|
36
35
|
|
|
37
36
|
const entityMap: ModelEntity = getModelPath(model, `main.${KIT}.entity`)
|
|
@@ -77,13 +76,6 @@ function makeEntityTestData(_model: Model, entity: ModelEntity) {
|
|
|
77
76
|
const pathParams = collectEntityPathParams(entity)
|
|
78
77
|
|
|
79
78
|
const hasEntId = null != (entity as any).id
|
|
80
|
-
// Some entities don't declare a top-level `id` field but still need an
|
|
81
|
-
// `id` value in their fixture: any entity that has a non-list op (remove,
|
|
82
|
-
// update, load) will hit `data["id"]` in the generated test code. The
|
|
83
|
-
// test mock is lenient about extra/missing path params, so synthesising
|
|
84
|
-
// an `id` here keeps tests green for entities like
|
|
85
|
-
// `/{namespace}/{key}` (no `id` in URL) or `/{resource}/{id}`
|
|
86
|
-
// alongside the simple `{id}`-only case.
|
|
87
79
|
const needsFixtureId = hasEntId || entityHasMutatingOp(entity)
|
|
88
80
|
|
|
89
81
|
let i = 1
|
|
@@ -113,23 +105,20 @@ function makeEntityTestData(_model: Model, entity: ModelEntity) {
|
|
|
113
105
|
makeEntityTestFields(entity, i++, ent)
|
|
114
106
|
delete ent.id
|
|
115
107
|
|
|
116
|
-
//
|
|
108
|
+
// WHICH operations this entity exposes, not what the specification says
|
|
109
|
+
// about them. The facts are apidef's resolved definition, and copying them
|
|
110
|
+
// here made the test data a second copy of the model's own copy of them.
|
|
117
111
|
data.requests = {}
|
|
118
112
|
for (const op of Object.values(entity.op || {}) as any[]) for (const point of op.points || []) {
|
|
119
|
-
if (point.
|
|
120
|
-
provenance: 'operation-contract',
|
|
113
|
+
if (point.co) data.requests[point.co.id] = {
|
|
114
|
+
provenance: 'operation-contract', version: point.co.version,
|
|
115
|
+
source: point.co.source,
|
|
121
116
|
}
|
|
122
117
|
}
|
|
123
118
|
return data
|
|
124
119
|
}
|
|
125
120
|
|
|
126
121
|
|
|
127
|
-
// Detect whether the entity has any op other than `list` (which doesn't
|
|
128
|
-
// take a per-item id). Used to decide whether the fixture needs a
|
|
129
|
-
// synthesised `id` — the test code for load/update/remove ops references
|
|
130
|
-
// `data["id"]` unconditionally in Python (and similarly in other strict
|
|
131
|
-
// languages), so the fixture must provide one even when the URL path
|
|
132
|
-
// params are named differently (e.g. `/{namespace}/{key}`).
|
|
133
122
|
function entityHasMutatingOp(entity: any): boolean {
|
|
134
123
|
const ops = entity?.op || {}
|
|
135
124
|
for (const opname of Object.keys(ops)) {
|
|
@@ -139,12 +128,6 @@ function entityHasMutatingOp(entity: any): boolean {
|
|
|
139
128
|
}
|
|
140
129
|
|
|
141
130
|
|
|
142
|
-
// Walk every op point on the entity, collect the names of path params, and
|
|
143
|
-
// pair each with its canonical idmap value. The canonical value mirrors the
|
|
144
|
-
// flow generator's path-param defaulting in apidef:
|
|
145
|
-
// `step.match[name] = name.replace(/_id$/,'') + '01'`
|
|
146
|
-
// Then setup.idmap maps that lower ref to upper: `company01 → COMPANY01`.
|
|
147
|
-
// So the value seeded into existing test data is the upper form: `COMPANY01`.
|
|
148
131
|
function collectEntityPathParams(entity: any): [string, string][] {
|
|
149
132
|
const out = new Map<string, string>()
|
|
150
133
|
const ops = entity?.op || {}
|
|
@@ -152,17 +135,17 @@ function collectEntityPathParams(entity: any): [string, string][] {
|
|
|
152
135
|
const op = ops[opname]
|
|
153
136
|
const points = op?.points || []
|
|
154
137
|
for (const point of points) {
|
|
155
|
-
const params = point?.
|
|
156
|
-
const renameMap: Record<string, string> = point?.
|
|
138
|
+
const params = point?.g?.params || []
|
|
139
|
+
const renameMap: Record<string, string> = point?.r?.param || {}
|
|
157
140
|
for (const param of params) {
|
|
158
|
-
if (!param?.
|
|
159
|
-
if ('id' === param.
|
|
141
|
+
if (!param?.n) continue
|
|
142
|
+
if ('id' === param.n) continue
|
|
160
143
|
// Skip params that ARE the entity's own id under URL rename.
|
|
161
|
-
const camel = lcf(camelify(param.
|
|
144
|
+
const camel = lcf(camelify(param.n))
|
|
162
145
|
if ('id' === renameMap[camel]) continue
|
|
163
|
-
if (out.has(param.
|
|
164
|
-
const baseName = param.
|
|
165
|
-
out.set(param.
|
|
146
|
+
if (out.has(param.n)) continue
|
|
147
|
+
const baseName = param.n.replace(/_id$/, '')
|
|
148
|
+
out.set(param.n, baseName.toUpperCase() + '01')
|
|
166
149
|
}
|
|
167
150
|
}
|
|
168
151
|
}
|
|
@@ -174,15 +157,15 @@ function makeEntityTestFields(entity: ModelEntity, start: number, entdata: Recor
|
|
|
174
157
|
entdata = entdata ?? {}
|
|
175
158
|
let num = (start * size(entity.fields) * 10)
|
|
176
159
|
each(entity.fields, (field: ModelField) => {
|
|
177
|
-
entdata[field.
|
|
178
|
-
field.
|
|
179
|
-
field.
|
|
180
|
-
['`$NUMBER`', '`$INTEGER`'].includes(field.
|
|
181
|
-
'`$BOOLEAN`' === field.
|
|
182
|
-
'`$OBJECT`' === field.
|
|
183
|
-
'`$MAP`' === field.
|
|
184
|
-
'`$ARRAY`' === field.
|
|
185
|
-
'`$LIST`' === field.
|
|
160
|
+
entdata[field.n] =
|
|
161
|
+
field.n.endsWith('_id') ?
|
|
162
|
+
field.n.substring(0, field.n.length - 3).toUpperCase() + '01' :
|
|
163
|
+
['`$NUMBER`', '`$INTEGER`'].includes(field.t) ? num :
|
|
164
|
+
'`$BOOLEAN`' === field.t ? 0 === num % 2 :
|
|
165
|
+
'`$OBJECT`' === field.t ? {} :
|
|
166
|
+
'`$MAP`' === field.t ? {} :
|
|
167
|
+
'`$ARRAY`' === field.t ? [] :
|
|
168
|
+
'`$LIST`' === field.t ? [] :
|
|
186
169
|
's' + (num.toString(16))
|
|
187
170
|
num++
|
|
188
171
|
})
|
|
@@ -45,7 +45,6 @@ const Root = cmp(function Root(props: any) {
|
|
|
45
45
|
ctx$.util = ctx$.util || {}
|
|
46
46
|
ctx$.util.makeFlow = makeFlow
|
|
47
47
|
|
|
48
|
-
// TODO: move to @voxgig/util as duplicated
|
|
49
48
|
model.const = { name: model.name }
|
|
50
49
|
names(model.const, model.name)
|
|
51
50
|
model.const.year = new Date().getFullYear()
|
|
@@ -65,16 +64,13 @@ const Root = cmp(function Root(props: any) {
|
|
|
65
64
|
})
|
|
66
65
|
|
|
67
66
|
names(model, model.name)
|
|
68
|
-
// console.log('MODEL name', model.name, model.Name)
|
|
69
67
|
|
|
70
68
|
// Standard Replacements
|
|
71
69
|
ctx$.stdrep = {}
|
|
72
70
|
names(ctx$.stdrep, model.Name, 'Project' + 'Name')
|
|
73
|
-
// console.log('STDREP', stdrep)
|
|
74
71
|
|
|
75
72
|
Project({}, () => {
|
|
76
73
|
|
|
77
|
-
// TODO: jostraca should accept no props
|
|
78
74
|
Top({})
|
|
79
75
|
|
|
80
76
|
BuildSDK({})
|
|
@@ -84,22 +80,6 @@ const Root = cmp(function Root(props: any) {
|
|
|
84
80
|
|
|
85
81
|
Folder({ name: target.name }, () => {
|
|
86
82
|
|
|
87
|
-
// Per-generation-phase activation. A target's aontu model carries
|
|
88
|
-
// a `phase` map mirroring the feature pattern:
|
|
89
|
-
//
|
|
90
|
-
// phase: {
|
|
91
|
-
// entity: { active: false }
|
|
92
|
-
// feature: { active: false }
|
|
93
|
-
// readme: { active: false }
|
|
94
|
-
// agentguide: { active: false }
|
|
95
|
-
// test: { active: false }
|
|
96
|
-
// }
|
|
97
|
-
//
|
|
98
|
-
// Defaults are inclusive — when a phase entry is absent (or
|
|
99
|
-
// active is not explicitly false), the phase runs. Existing
|
|
100
|
-
// standard targets don't declare `phase` and keep current
|
|
101
|
-
// behaviour. A CLI-style target switches all five off and
|
|
102
|
-
// only emits Main.
|
|
103
83
|
const phase = target.phase || {}
|
|
104
84
|
const phaseActive = (name: string): boolean =>
|
|
105
85
|
false !== (phase[name] && phase[name].active)
|
|
@@ -145,7 +125,6 @@ function makeFlow(def: any, data: any, stepMakers: Record<string, any>) {
|
|
|
145
125
|
|
|
146
126
|
const steps: any = {}
|
|
147
127
|
each(stepMakers, (n: any) => {
|
|
148
|
-
// TODO: support after?
|
|
149
128
|
if ('function' === typeof n.val$) {
|
|
150
129
|
steps[n.key$] = (id: any, pdef: any) => makeFlowStep(id(), pdef, n.val$)
|
|
151
130
|
}
|
|
@@ -210,7 +189,6 @@ function makeFlow(def: any, data: any, stepMakers: Record<string, any>) {
|
|
|
210
189
|
names(step, step.entity, 'entity')
|
|
211
190
|
})
|
|
212
191
|
|
|
213
|
-
// console.log('STEPS', stepMakers, steps, def)
|
|
214
192
|
|
|
215
193
|
const spec = transform(def, {
|
|
216
194
|
p: ['`$EACH`', 'step', {
|
|
@@ -20,9 +20,6 @@ const Top = cmp(function Top(props: any) {
|
|
|
20
20
|
// any target Folder (same placement rule as ReadmeTop / Deploy).
|
|
21
21
|
AgentGuideTop({})
|
|
22
22
|
|
|
23
|
-
// Root governance files for a publishable, unofficial generated SDK:
|
|
24
|
-
// an MIT LICENSE (held by Voxgig), a SECURITY.md disclosure policy, and a
|
|
25
|
-
// seed CHANGELOG. Emitted at repo root, before the per-target folders.
|
|
26
23
|
License({})
|
|
27
24
|
Security({})
|
|
28
25
|
Changelog({})
|
|
@@ -32,11 +29,6 @@ const Top = cmp(function Top(props: any) {
|
|
|
32
29
|
// `make deploy-dry` rehearsal.
|
|
33
30
|
Deploy({})
|
|
34
31
|
|
|
35
|
-
// Publishing an npm target from CI with no token: a dispatch workflow per
|
|
36
|
-
// npm target using GitHub OIDC trusted publishing, and the one-time
|
|
37
|
-
// set-up a maintainer must do, written to `.sdk/PUBLISHING.md` — beside
|
|
38
|
-
// the generator rather than into the target's own docs, which describe
|
|
39
|
-
// the SDK to the people who install it.
|
|
40
32
|
PublishWorkflow({})
|
|
41
33
|
})
|
|
42
34
|
|
|
@@ -1,38 +1,3 @@
|
|
|
1
|
-
# Cost feature behaviour, as language-neutral cases.
|
|
2
|
-
#
|
|
3
|
-
# Every case is DATA: features are activated by name through the generated
|
|
4
|
-
# config, the options are plain JSON, the transport is scripted by `res`, and
|
|
5
|
-
# the assertion is a subset of the client's cost record. Nothing here needs a
|
|
6
|
-
# function, which is what makes it corpus-expressible where featureAdd /
|
|
7
|
-
# featureHook / featureInit are not (see their PENDING notes).
|
|
8
|
-
#
|
|
9
|
-
# CASE SHAPE
|
|
10
|
-
# name label for the runner
|
|
11
|
-
# feature activation list, IN ORDER. The array form is the one that fixes
|
|
12
|
-
# nesting: each transport feature wraps whatever is already
|
|
13
|
-
# installed, so position IS order. Entries are flat -
|
|
14
|
-
# { name, active, ...options } - as makeOptions expects.
|
|
15
|
-
# res scripted transport responses, consumed in order; the last is
|
|
16
|
-
# reused once exhausted. `throw: true` makes that attempt reject
|
|
17
|
-
# at the transport rather than return a response.
|
|
18
|
-
# op operations to run, in order. `err` marks an op that must FAIL:
|
|
19
|
-
# `true` for any failure, a string to pin the error code.
|
|
20
|
-
# out expected SUBSET of client._cost - runners match partially, so a
|
|
21
|
-
# case asserts only what it is about
|
|
22
|
-
#
|
|
23
|
-
# OPERATION TOKENS
|
|
24
|
-
# The corpus is shared by every generated SDK, and each has its own
|
|
25
|
-
# entities and operations, so no case may name one. `#OP1` and `#OP2` stand
|
|
26
|
-
# for two DISTINCT operations this SDK can actually perform; the runner
|
|
27
|
-
# discovers them from the generated client and substitutes them throughout
|
|
28
|
-
# the case, keys included. They resolve to the '<entity>.<op>' key the cost
|
|
29
|
-
# record attributes spend under, which is why a rate table can be keyed on
|
|
30
|
-
# one. A SDK that offers fewer operations than a case needs skips that case
|
|
31
|
-
# rather than failing it.
|
|
32
|
-
#
|
|
33
|
-
# Determinism comes from data alone: netsim is counter-driven, and retry runs
|
|
34
|
-
# with `minDelay: 1`, which leaves no room for jitter (it is drawn from
|
|
35
|
-
# [0, minDelay)) and costs no real time.
|
|
36
1
|
|
|
37
2
|
basic: set: [
|
|
38
3
|
|
|
@@ -171,10 +136,6 @@ basic: set: [
|
|
|
171
136
|
out: { total: { calls: 5, amount: 5 } }
|
|
172
137
|
}
|
|
173
138
|
|
|
174
|
-
# The case above supplies `budget: 0`; this one omits it. They are separate
|
|
175
|
-
# cases on purpose. An implementation that reads the option into a
|
|
176
|
-
# nullable, or treats "supplied" as "set a ceiling", passes one and fails
|
|
177
|
-
# the other, and a single case cannot tell which path it took.
|
|
178
139
|
{
|
|
179
140
|
name: 'an omitted budget means no ceiling either'
|
|
180
141
|
feature: [ { name: 'cost', active: true, unit: 1, onBudget: 'deny' } ]
|
|
@@ -183,8 +144,4 @@ basic: set: [
|
|
|
183
144
|
}
|
|
184
145
|
]
|
|
185
146
|
|
|
186
|
-
# NOT EXPRESSIBLE HERE, and deliberately left to the per-language suites.
|
|
187
|
-
# `partial`, not `basic: pending`: the section RUNS, so the deferral marker
|
|
188
|
-
# that means "this whole section is a hole" would be a lie here (and the
|
|
189
|
-
# corpus guard promotes any deferred section that has gained cases).
|
|
190
147
|
partial: 'the sink callback takes a function, which a JSON fixture cannot carry; covered per-language.'
|