@voxgig/sdkgen 4.17.6 → 4.18.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/bin/voxgig-sdkgen +1 -1
- package/dist/cmp/AgentGuideContent.js +30 -0
- package/dist/cmp/AgentGuideContent.js.map +1 -1
- package/dist/cmp/FeatureDocs.d.ts +6 -1
- package/dist/cmp/FeatureDocs.js +27 -0
- package/dist/cmp/FeatureDocs.js.map +1 -1
- package/dist/cmp/ReadmeRefFeatures.js +23 -13
- package/dist/cmp/ReadmeRefFeatures.js.map +1 -1
- package/dist/helpers/applicability.js +7 -0
- package/dist/helpers/applicability.js.map +1 -1
- package/dist/helpers/canonSpec.d.ts +12 -0
- package/dist/helpers/canonSpec.js +259 -0
- package/dist/helpers/canonSpec.js.map +1 -0
- package/dist/helpers/optspec.d.ts +4 -0
- package/dist/helpers/optspec.js +152 -0
- package/dist/helpers/optspec.js.map +1 -0
- package/dist/sdkgen.d.ts +3 -1
- package/dist/sdkgen.js +12 -3
- package/dist/sdkgen.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/model/sdkgen.aon +125 -0
- package/package.json +1 -1
- package/project/.sdk/model/feature/audit.aon +15 -0
- package/project/.sdk/model/feature/cache.aon +13 -0
- package/project/.sdk/model/feature/clienttrack.aon +21 -0
- package/project/.sdk/model/feature/cost.aon +15 -0
- package/project/.sdk/model/feature/debug.aon +15 -0
- package/project/.sdk/model/feature/feature-index.aon +1 -0
- package/project/.sdk/model/feature/idempotency.aon +13 -0
- package/project/.sdk/model/feature/log.aon +13 -0
- package/project/.sdk/model/feature/metrics.aon +13 -0
- package/project/.sdk/model/feature/netsim.aon +14 -0
- package/project/.sdk/model/feature/paging.aon +15 -0
- package/project/.sdk/model/feature/proxy.aon +13 -0
- package/project/.sdk/model/feature/ratelimit.aon +15 -0
- package/project/.sdk/model/feature/retry.aon +15 -0
- package/project/.sdk/model/feature/streaming.aon +15 -0
- package/project/.sdk/model/feature/telemetry.aon +19 -0
- package/project/.sdk/model/feature/test.aon +13 -0
- package/project/.sdk/model/feature/timeout.aon +15 -0
- package/project/.sdk/model/feature/validate.aon +73 -0
- package/project/.sdk/model/target/js.aon +1 -1
- package/project/.sdk/model/target/ts.aon +1 -1
- package/project/.sdk/src/cmp/js/Main_js.ts +2 -0
- package/project/.sdk/src/cmp/js/Schema_js.ts +66 -0
- package/project/.sdk/src/cmp/scala/Main_scala.ts +30 -0
- package/project/.sdk/src/cmp/ts/Main_ts.ts +2 -0
- package/project/.sdk/src/cmp/ts/Schema_ts.ts +66 -0
- package/project/.sdk/tm/js/src/feature/validate/ValidateFeature.js +296 -0
- package/project/.sdk/tm/js/src/utility/MakeOptionsUtility.js +26 -61
- package/project/.sdk/tm/ts/src/feature/validate/ValidateFeature.ts +298 -0
- package/project/.sdk/tm/ts/src/utility/MakeOptionsUtility.ts +24 -61
- package/project/sdkgen-package.json +3 -2
- package/src/cmp/AgentGuideContent.ts +30 -0
- package/src/cmp/FeatureDocs.ts +39 -0
- package/src/cmp/ReadmeRefFeatures.ts +24 -13
- package/src/helpers/applicability.ts +8 -0
- package/src/helpers/canonSpec.ts +301 -0
- package/src/helpers/optspec.ts +180 -0
- package/src/sdkgen.ts +9 -0
package/bin/voxgig-sdkgen
CHANGED
|
@@ -156,6 +156,36 @@ npm run generate
|
|
|
156
156
|
Note: the \`voxgig-sdkgen\` CLI only *scaffolds* (\`target add\` /
|
|
157
157
|
\`feature add\`). Generation itself runs via \`npm run generate\` (backed by
|
|
158
158
|
\`@voxgig/model\`) — there is no \`generate\` CLI subcommand.
|
|
159
|
+
|
|
160
|
+
### Two silent failure modes
|
|
161
|
+
|
|
162
|
+
Generation has two ways of going wrong that **nothing reports**. Neither
|
|
163
|
+
breaks a build or a test, so the only symptom is a tree that disagrees with
|
|
164
|
+
the model — which is easy to commit past.
|
|
165
|
+
|
|
166
|
+
**\`voxgig-model --no-config\` writes a REDUCED model.** The
|
|
167
|
+
\`.model-config\` build is what registers the generator actions, and an SDK
|
|
168
|
+
project loads \`apidef\` and \`sdkgen\` through exactly that mechanism:
|
|
169
|
+
|
|
170
|
+
\`\`\`
|
|
171
|
+
sys: model: action: { apidef: load: 'build/apidef.js', sdkgen: load: 'build/sdkgen.js' }
|
|
172
|
+
sys: model: order: action: 'apidef,sdkgen'
|
|
173
|
+
\`\`\`
|
|
174
|
+
|
|
175
|
+
\`--no-config\` skips it, so those actions never run — and the model build
|
|
176
|
+
still *writes* the model file, now missing whatever they contribute (the
|
|
177
|
+
name case variants, and whole subtrees). A reduced model is a valid model,
|
|
178
|
+
so nothing downstream complains. To inspect the model layer **without side
|
|
179
|
+
effects**, use \`npm run dry-generate\` (\`-y\`, writes nothing). Never
|
|
180
|
+
\`--no-config\` in anything whose output might be committed.
|
|
181
|
+
|
|
182
|
+
**Regeneration never DELETES.** A file the generator has stopped emitting
|
|
183
|
+
stays in the tree, and \`git status\` is silent because it is committed and
|
|
184
|
+
unchanged. Narrowing a feature's plugin selection, or dropping a target, can
|
|
185
|
+
leave whole modules behind that nothing references and no test covers.
|
|
186
|
+
|
|
187
|
+
To find either, the target trees must be deleted and regenerated — a
|
|
188
|
+
regeneration in place cannot see stale output at all.
|
|
159
189
|
`;
|
|
160
190
|
}
|
|
161
191
|
// (b) adding a new generated feature.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentGuideContent.js","sourceRoot":"","sources":["../../src/cmp/AgentGuideContent.ts"],"names":[],"mappings":";AAAA,8EAA8E;AAC9E,8EAA8E;AAC9E,6EAA6E;AAC7E,uEAAuE;AACvE,2EAA2E;AAC3E,EAAE;AACF,gFAAgF;AAChF,gEAAgE;AAChE,gFAAgF;AAChF,sBAAsB;;;
|
|
1
|
+
{"version":3,"file":"AgentGuideContent.js","sourceRoot":"","sources":["../../src/cmp/AgentGuideContent.ts"],"names":[],"mappings":";AAAA,8EAA8E;AAC9E,8EAA8E;AAC9E,6EAA6E;AAC7E,uEAAuE;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aAAa,CAAC,KAAa;IAClC,OAAO,KAAK,KAAK;;;;;CAKlB,CAAA;AACD,CAAC"}
|
|
@@ -8,9 +8,14 @@ type FeatureDoc = {
|
|
|
8
8
|
name: string;
|
|
9
9
|
value: string;
|
|
10
10
|
}>;
|
|
11
|
+
extras: Array<{
|
|
12
|
+
name: string;
|
|
13
|
+
type: string;
|
|
14
|
+
}>;
|
|
11
15
|
};
|
|
16
|
+
declare function sentinelName(v: any): string;
|
|
12
17
|
declare function renderValue(v: any): string;
|
|
13
18
|
declare function featureDocs(model: any, target?: any): FeatureDoc[];
|
|
14
19
|
declare function honoursActivationOrder(target: any): boolean;
|
|
15
|
-
export { featureDocs, renderValue, honoursActivationOrder, };
|
|
20
|
+
export { featureDocs, renderValue, sentinelName, honoursActivationOrder, };
|
|
16
21
|
export type { FeatureDoc };
|
package/dist/cmp/FeatureDocs.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.featureDocs = featureDocs;
|
|
4
4
|
exports.renderValue = renderValue;
|
|
5
|
+
exports.sentinelName = sentinelName;
|
|
5
6
|
exports.honoursActivationOrder = honoursActivationOrder;
|
|
6
7
|
const applicability_1 = require("../helpers/applicability");
|
|
7
8
|
const jostraca_1 = require("jostraca");
|
|
@@ -14,6 +15,23 @@ const types_1 = require("../types");
|
|
|
14
15
|
function isWrapping(feat) {
|
|
15
16
|
return 'wrap' === feat.transport;
|
|
16
17
|
}
|
|
18
|
+
// A struct.validate sentinel as a reader's word for it: '`$FUNCTION`' ->
|
|
19
|
+
// 'function'. A union renders its members, so netsim's latency reads
|
|
20
|
+
// 'number | map'. Anything unrecognised renders verbatim rather than being
|
|
21
|
+
// dropped — a doc table that silently omits an option is the failure this
|
|
22
|
+
// whole path exists to fix.
|
|
23
|
+
function sentinelName(v) {
|
|
24
|
+
if (Array.isArray(v)) {
|
|
25
|
+
const members = v.slice(1).map((m) => sentinelName(m))
|
|
26
|
+
.filter((m) => 'one' !== m);
|
|
27
|
+
return 0 === members.length ? 'any' : members.join(' | ');
|
|
28
|
+
}
|
|
29
|
+
if ('string' !== typeof v) {
|
|
30
|
+
return 'any';
|
|
31
|
+
}
|
|
32
|
+
const bare = v.replace(/[`$]/g, '').trim().toLowerCase();
|
|
33
|
+
return '' === bare ? 'any' : bare;
|
|
34
|
+
}
|
|
17
35
|
function renderValue(v) {
|
|
18
36
|
if (null == v) {
|
|
19
37
|
return '';
|
|
@@ -47,6 +65,14 @@ function featureDocs(model, target) {
|
|
|
47
65
|
name: k,
|
|
48
66
|
value: renderValue(opts[k]),
|
|
49
67
|
}));
|
|
68
|
+
const extra = (f.config && f.config.optspec) || {};
|
|
69
|
+
const extras = Object.keys(extra)
|
|
70
|
+
// A name in both is documented by its DEFAULT; `config.optspec`
|
|
71
|
+
// only sharpened its type (netsim's `latency`, a number that is
|
|
72
|
+
// also a { min, max } map), and a reader wants the default.
|
|
73
|
+
.filter((k) => null == opts[k])
|
|
74
|
+
.sort()
|
|
75
|
+
.map((k) => ({ name: k, type: sentinelName(extra[k]) }));
|
|
50
76
|
return {
|
|
51
77
|
name: f.name,
|
|
52
78
|
Name: f.Name || f.name,
|
|
@@ -54,6 +80,7 @@ function featureDocs(model, target) {
|
|
|
54
80
|
transport: f.transport || 'none',
|
|
55
81
|
wraps: isWrapping(f),
|
|
56
82
|
options,
|
|
83
|
+
extras,
|
|
57
84
|
};
|
|
58
85
|
})
|
|
59
86
|
.sort((a, b) => a.name.localeCompare(b.name));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeatureDocs.js","sourceRoot":"","sources":["../../src/cmp/FeatureDocs.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"FeatureDocs.js","sourceRoot":"","sources":["../../src/cmp/FeatureDocs.ts"],"names":[],"mappings":";;QA0IE,WAAW;QACX,WAAW;QACX,YAAY;QACZ,sBAAsB;AA7IxB,4DAAyD;AAEzD,uCAA+B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C;AAKD,0EAA0E;AAC1E,+CAA+C;AAC/C,EAAE;AACF,6EAA6E;AAC7E,2EAA2E;AAC3E,2EAA2E;AAC3E,wEAAwE;AACxE,wEAAwE;AACxE,yEAAyE;AACzE,aAAa;AACb,EAAE;AACF,iDAAiD;AACjD,MAAM,mBAAmB,GAAG,CAAC,MAAM,CAAC,CAAA;AAEpC,SAAS,sBAAsB,CAAC,MAAW;IACzC,OAAO,CAAC,mBAAmB,CAAC,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;AACpD,CAAC"}
|
|
@@ -69,13 +69,14 @@ ${f.title}.
|
|
|
69
69
|
(0, jostraca_1.Content)(`**Configuration**
|
|
70
70
|
|
|
71
71
|
`);
|
|
72
|
-
// THE TABLE IS THE MODEL'S OPTIONS,
|
|
73
|
-
//
|
|
74
|
-
//
|
|
75
|
-
//
|
|
76
|
-
//
|
|
77
|
-
//
|
|
78
|
-
//
|
|
72
|
+
// THE TABLE IS THE MODEL'S OPTIONS, and the model now carries both
|
|
73
|
+
// halves of them. It used to carry one: `config.options` is a DEFAULTS
|
|
74
|
+
// map, so the options with no default — cost's `sink`, audit's `sink`,
|
|
75
|
+
// every injected clock — could not appear in it, and this table had to
|
|
76
|
+
// admit it was not exhaustive. `config.optspec` declares those with a
|
|
77
|
+
// type instead of a default, and they are listed below the defaults.
|
|
78
|
+
// Same declaration the generated option spec validates against, so a
|
|
79
|
+
// documented option and a validated option cannot be different sets.
|
|
79
80
|
if (0 < f.options.length) {
|
|
80
81
|
(0, jostraca_1.Content)(`| Option | Default |
|
|
81
82
|
|---|---|
|
|
@@ -87,17 +88,26 @@ ${f.title}.
|
|
|
87
88
|
(0, jostraca_1.Content)(`
|
|
88
89
|
`);
|
|
89
90
|
}
|
|
90
|
-
else {
|
|
91
|
+
else if (0 === f.extras.length) {
|
|
91
92
|
(0, jostraca_1.Content)(`\`active\` only — this feature takes no further options.
|
|
92
93
|
|
|
93
94
|
`);
|
|
94
95
|
}
|
|
95
|
-
(0
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
96
|
+
if (0 < f.extras.length) {
|
|
97
|
+
(0, jostraca_1.Content)(`| Option | Type |
|
|
98
|
+
|---|---|
|
|
99
|
+
`);
|
|
100
|
+
for (const o of f.extras) {
|
|
101
|
+
(0, jostraca_1.Content)(`| \`${o.name}\` | ${o.type} |
|
|
102
|
+
`);
|
|
103
|
+
}
|
|
104
|
+
(0, jostraca_1.Content)(`
|
|
105
|
+
These take no default: the feature behaves one way when you supply them and
|
|
106
|
+
another when you do not.
|
|
99
107
|
|
|
100
|
-
|
|
108
|
+
`);
|
|
109
|
+
}
|
|
110
|
+
(0, jostraca_1.Content)(`**Usage**
|
|
101
111
|
|
|
102
112
|
Set \`feature.${f.name}.active\` to true in the client options${0 < f.options.length ?
|
|
103
113
|
', and override any option above in the same entry' : ''}. Every option keeps
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReadmeRefFeatures.js","sourceRoot":"","sources":["../../src/cmp/ReadmeRefFeatures.ts"],"names":[],"mappings":";;;AAAA,uCAAuC;AAEvC,+CAAmE;AAInE,yDAAyD;AACzD,EAAE;AACF,4EAA4E;AAC5E,2EAA2E;AAC3E,yEAAyE;AACzE,8EAA8E;AAC9E,+EAA+E;AAC/E,EAAE;AACF,2EAA2E;AAC3E,6EAA6E;AAC7E,2EAA2E;AAC3E,MAAM,iBAAiB,GAAG,IAAA,cAAG,EAAC,SAAS,iBAAiB,CAAC,KAAU;IACjE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,CAAA;IAC9B,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAA;IAEtB,MAAM,QAAQ,GAAiB,IAAA,yBAAW,EAAC,KAAK,EAAE,MAAM,CAAC,CAAA;IAEzD,IAAI,CAAC,KAAK,QAAQ,CAAC,MAAM,EAAE,CAAC;QAC1B,OAAM;IACR,CAAC;IAED,2EAA2E;IAC3E,2EAA2E;IAC3E,uBAA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kBAAO,EAAC;CACb,CAAC,CAAA;QACE,CAAC;aACI,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;YAC/B,IAAA,kBAAO,EAAC;;CAEb,CAAC,CAAA;QACE,CAAC;QAED,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;YACxB,IAAA,kBAAO,EAAC;;CAEb,CAAC,CAAA;YACI,KAAK,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC;gBACzB,IAAA,kBAAO,EAAC,OAAO,CAAC,CAAC,IAAI,QAAQ,CAAC,CAAC,IAAI;CAC1C,CAAC,CAAA;YACI,CAAC;YACD,IAAA,kBAAO,EAAC;;;;CAIb,CAAC,CAAA;QACE,CAAC;QAED,IAAA,kBAAO,EAAC;;gBAEI,CAAC,CAAC,IAAI,0CACpB,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;YACpB,mDAAmD,CAAC,CAAC,CAAC,EAAE;;;;;CAK3D,CAAC,CAAA;QAEE,IAAI,CAAC,CAAC,KAAK,EAAE,CAAC;YACZ,IAAA,kBAAO,EAAC;;CAEb,CAAC,CAAA;QACE,CAAC;aACI,CAAC;YACJ,IAAA,kBAAO,EAAC;;CAEb,CAAC,CAAA;QACE,CAAC;QAED,IAAI,MAAM,KAAK,CAAC,CAAC,SAAS,EAAE,CAAC;YAC3B,IAAA,kBAAO,EAAC;;CAEb,CAAC,CAAA;QACE,CAAC;QAED,IAAA,kBAAO,EAAC;;CAEX,CAAC,CAAA;IACA,CAAC;AACH,CAAC,CAAC,CAAA;QAIA,iBAAiB"}
|
|
@@ -94,6 +94,13 @@ function targetFeatures(model, target) {
|
|
|
94
94
|
const TAGS = [
|
|
95
95
|
// A vendored sekreto port lives in this target's feature container.
|
|
96
96
|
'sekreto',
|
|
97
|
+
// The target emits the generated `Schema` module: the model's option spec
|
|
98
|
+
// and, when a feature asks for them, per-entity struct.validate specs.
|
|
99
|
+
// `validate` needs this, and the porting order is the reason it is a tag
|
|
100
|
+
// rather than an assumption — every target vendors a struct with
|
|
101
|
+
// `validate` in it, but only a target whose Main emits Schema has
|
|
102
|
+
// anything for that function to check against.
|
|
103
|
+
'schema',
|
|
97
104
|
];
|
|
98
105
|
exports.TAGS = TAGS;
|
|
99
106
|
// The tags named by `needs`/`provides` that are not in the vocabulary.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"applicability.js","sourceRoot":"","sources":["../../src/helpers/applicability.ts"],"names":[],"mappings":";AAAA,6CAA6C;AAC7C,EAAE;AACF,wEAAwE;AACxE,sEAAsE;AACtE,2EAA2E;AAC3E,+DAA+D;AAC/D,yEAAyE;AACzE,wEAAwE;AACxE,oBAAoB;AACpB,EAAE;AACF,yEAAyE;AACzE,0EAA0E;AAC1E,yEAAyE;AACzE,qEAAqE;AACrE,yEAAyE;AACzE,6BAA6B;AAC7B,EAAE;AACF,0EAA0E;AAC1E,sEAAsE;AACtE,2EAA2E;AAC3E,qEAAqE;;;
|
|
1
|
+
{"version":3,"file":"applicability.js","sourceRoot":"","sources":["../../src/helpers/applicability.ts"],"names":[],"mappings":";AAAA,6CAA6C;AAC7C,EAAE;AACF,wEAAwE;AACxE,sEAAsE;AACtE,2EAA2E;AAC3E,+DAA+D;AAC/D,yEAAyE;AACzE,wEAAwE;AACxE,oBAAoB;AACpB,EAAE;AACF,yEAAyE;AACzE,0EAA0E;AAC1E,yEAAyE;AACzE,qEAAqE;AACrE,yEAAyE;AACzE,6BAA6B;AAC7B,EAAE;AACF,0EAA0E;AAC1E,sEAAsE;AACtE,2EAA2E;AAC3E,qEAAqE;;;QAyGnE,cAAc;QACd,cAAc;QACN,WAAW;QACnB,WAAW;AA1Gb,2CAAkD;AAGlD,yEAAyE;AACzE,yEAAyE;AACzE,wEAAwE;AACxE,0EAA0E;AAC1E,0EAA0E;AAC1E,wDAAwD;AACxD,EAAE;AACF,yEAAyE;AACzE,8CAA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RING: any[];
|
|
3
|
+
declare function optionalSpec(spec: any): any;
|
|
4
|
+
declare function canonToSpec(type: unknown, optional?: boolean): any;
|
|
5
|
+
declare function entityDataSpec(ent: any): Record<string, any>;
|
|
6
|
+
declare function entityOpSpec(ent: any, opname: string): Record<string, any> | null;
|
|
7
|
+
declare function entitySpecs(ent: any): {
|
|
8
|
+
data: Record<string, any>;
|
|
9
|
+
op: Record<string, any>;
|
|
10
|
+
};
|
|
11
|
+
declare function byExampleSpec(val: any): any;
|
|
12
|
+
export { byExampleSpec, canonToSpec, optionalSpec, entityDataSpec, entityOpSpec, entitySpecs, sentinel, SPEC_STRING, };
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Canonical type-sentinel -> struct.validate SPEC mapper.
|
|
3
|
+
//
|
|
4
|
+
// The sibling of canonType: that table turns a field's canon sentinel into a
|
|
5
|
+
// language TYPE NAME (what the generated source declares); this one turns the
|
|
6
|
+
// same sentinel into a struct.validate SPEC VALUE (what the generated runtime
|
|
7
|
+
// checks a payload against). One vocabulary, two renderings, and — as with
|
|
8
|
+
// canonType — a SINGLE mapping that components must not copy locally.
|
|
9
|
+
//
|
|
10
|
+
// WHY THIS IS ALMOST NOTHING. apidef stores `$STRING`, `$INTEGER`, `$NUMBER`,
|
|
11
|
+
// `$BOOLEAN`, `$NULL`, `$ARRAY`, `$OBJECT`, `$ANY` on `fields[].type`, and
|
|
12
|
+
// struct.validate's own vocabulary is `$STRING $NUMBER $INTEGER $DECIMAL
|
|
13
|
+
// $BOOLEAN $NULL $NIL $MAP $LIST $FUNCTION $INSTANCE $ANY $CHILD $ONE $EXACT`.
|
|
14
|
+
// Six of the eight scalar names are the IDENTICAL string. Only three things
|
|
15
|
+
// have to be adapted, and each is a real difference rather than a translation:
|
|
16
|
+
//
|
|
17
|
+
// 1. CONTAINERS ARE NAMED DIFFERENTLY. apidef speaks OpenAPI ($ARRAY,
|
|
18
|
+
// $OBJECT), struct speaks its own value model ($LIST, $MAP).
|
|
19
|
+
//
|
|
20
|
+
// 2. UNIONS ARE SHAPED DIFFERENTLY. apidef nests the members —
|
|
21
|
+
// ['`$ONE`', [a, b]] — and struct wants them flat: ['`$ONE`', a, b].
|
|
22
|
+
// The nested form does not fail loudly, which is the trap: struct reads
|
|
23
|
+
// the inner LIST as a single alternative, so `['`$ONE`', ['`$STRING`',
|
|
24
|
+
// '`$INTEGER`']]` rejects the string 'x' with "expected [string,integer]".
|
|
25
|
+
//
|
|
26
|
+
// 3. STRUCT'S `$STRING` REJECTS THE EMPTY STRING. That is right for an
|
|
27
|
+
// option (an empty apikey is a missing apikey) and wrong for API data,
|
|
28
|
+
// where '' is an ordinary value a server returns. A field spec therefore
|
|
29
|
+
// widens to ['`$ONE`', '`$STRING`', ['`$EXACT`', '']].
|
|
30
|
+
//
|
|
31
|
+
// OPTIONALITY. struct requires every key its spec names, so an optional field
|
|
32
|
+
// is the union of its type with `$NIL` (which matches an ABSENT value; `$NULL`
|
|
33
|
+
// matches a stored JSON null). `req: false` on a field, and `optional: true`
|
|
34
|
+
// on an opRequestShape item, both land here.
|
|
35
|
+
//
|
|
36
|
+
// WHAT THIS CANNOT EXPRESS, because the model does not carry it (the same
|
|
37
|
+
// KNOWN GAPS canonType records): array ELEMENT types, nested object schemas,
|
|
38
|
+
// enums, string formats, and any numeric or length bound. A spec built here
|
|
39
|
+
// checks the shape the model knows about and nothing more — which is why
|
|
40
|
+
// record specs are `$OPEN` (below) rather than closed.
|
|
41
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
+
exports.SPEC_STRING = void 0;
|
|
43
|
+
exports.byExampleSpec = byExampleSpec;
|
|
44
|
+
exports.canonToSpec = canonToSpec;
|
|
45
|
+
exports.optionalSpec = optionalSpec;
|
|
46
|
+
exports.entityDataSpec = entityDataSpec;
|
|
47
|
+
exports.entityOpSpec = entityOpSpec;
|
|
48
|
+
exports.entitySpecs = entitySpecs;
|
|
49
|
+
exports.sentinel = sentinel;
|
|
50
|
+
const jostraca_1 = require("jostraca");
|
|
51
|
+
const canonType_1 = require("./canonType");
|
|
52
|
+
const opShape_1 = require("./opShape");
|
|
53
|
+
// Backtick-wrapped, the way the model and struct both write an injection.
|
|
54
|
+
// Built rather than written literally so the backticks cannot be lost to an
|
|
55
|
+
// editor, a copy-paste, or a template literal.
|
|
56
|
+
const BT = String.fromCharCode(96);
|
|
57
|
+
function sentinel(name) {
|
|
58
|
+
return BT + '$' + name + BT;
|
|
59
|
+
}
|
|
60
|
+
const S_ONE = sentinel('ONE');
|
|
61
|
+
const S_EXACT = sentinel('EXACT');
|
|
62
|
+
const S_NIL = sentinel('NIL');
|
|
63
|
+
const S_ANY = sentinel('ANY');
|
|
64
|
+
const S_STRING = sentinel('STRING');
|
|
65
|
+
const S_NULL = sentinel('NULL');
|
|
66
|
+
const S_OPEN = sentinel('OPEN');
|
|
67
|
+
// Canon sentinel key -> the struct.validate sentinel that checks it.
|
|
68
|
+
// STRING is deliberately absent: it needs the empty-string widening above and
|
|
69
|
+
// is handled in canonToSpec, so a caller cannot get the bare form by accident.
|
|
70
|
+
const CANON_STRUCT = {
|
|
71
|
+
INTEGER: sentinel('INTEGER'),
|
|
72
|
+
NUMBER: sentinel('NUMBER'),
|
|
73
|
+
BOOLEAN: sentinel('BOOLEAN'),
|
|
74
|
+
NULL: sentinel('NULL'),
|
|
75
|
+
// The container renaming (difference 1 above).
|
|
76
|
+
ARRAY: sentinel('LIST'),
|
|
77
|
+
OBJECT: sentinel('MAP'),
|
|
78
|
+
ANY: S_ANY,
|
|
79
|
+
};
|
|
80
|
+
// A string that may be empty (difference 3 above).
|
|
81
|
+
const SPEC_STRING = [S_ONE, S_STRING, [S_EXACT, '']];
|
|
82
|
+
exports.SPEC_STRING = SPEC_STRING;
|
|
83
|
+
// Flatten a spec into the alternatives of a union, so that widening a value
|
|
84
|
+
// that is ALREADY a union does not nest one `$ONE` inside another.
|
|
85
|
+
function alternatives(spec) {
|
|
86
|
+
if (Array.isArray(spec) && S_ONE === spec[0]) {
|
|
87
|
+
return spec.slice(1);
|
|
88
|
+
}
|
|
89
|
+
return [spec];
|
|
90
|
+
}
|
|
91
|
+
// A spec that also admits an ABSENT value.
|
|
92
|
+
//
|
|
93
|
+
// struct requires every key its spec names, so this is how "optional" is
|
|
94
|
+
// spelled. Flattened through `alternatives`, so widening something that is
|
|
95
|
+
// already a union (an empty-string-tolerant `$STRING`, an apidef `$ONE`)
|
|
96
|
+
// adds one member rather than nesting a union inside a union — which struct
|
|
97
|
+
// reads as a single alternative and rejects.
|
|
98
|
+
function optionalSpec(spec) {
|
|
99
|
+
// `$ANY` already admits an absent value, so widening it would only make
|
|
100
|
+
// the spec longer and its error messages worse.
|
|
101
|
+
if (S_ANY === spec) {
|
|
102
|
+
return spec;
|
|
103
|
+
}
|
|
104
|
+
return [S_ONE, ...alternatives(spec), S_NIL];
|
|
105
|
+
}
|
|
106
|
+
// Map one field/param type sentinel to a struct.validate spec value.
|
|
107
|
+
//
|
|
108
|
+
// Unknown or missing sentinel -> `$ANY`, never a throw: this mirrors
|
|
109
|
+
// canonToType's contract, and for the same reason. A sentinel this table has
|
|
110
|
+
// not met is a model the generator should still emit for, and an over-strict
|
|
111
|
+
// spec would reject live traffic at runtime rather than fail a build.
|
|
112
|
+
//
|
|
113
|
+
// `optional` widens the result with `$NIL` so an absent key passes.
|
|
114
|
+
function canonToSpec(type, optional) {
|
|
115
|
+
let spec;
|
|
116
|
+
if (Array.isArray(type)) {
|
|
117
|
+
// The union sentinel. Members are mapped individually and SPLICED IN
|
|
118
|
+
// flat (difference 2 above); a member may itself be a union.
|
|
119
|
+
if ('ONE' === (0, canonType_1.canonKey)(type[0]) && Array.isArray(type[1])) {
|
|
120
|
+
const members = [];
|
|
121
|
+
for (const member of type[1]) {
|
|
122
|
+
for (const alt of alternatives(canonToSpec(member))) {
|
|
123
|
+
if (members.indexOf(alt) < 0 || 'string' !== typeof alt) {
|
|
124
|
+
members.push(alt);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
// A NULLABLE FIELD NEEDS `$NIL`, NOT JUST `$NULL`.
|
|
129
|
+
//
|
|
130
|
+
// apidef writes a nullable field as ['`$ONE`', [<type>, '`$NULL`']],
|
|
131
|
+
// and `$NULL` on its own does match a stored null. Inside a union it
|
|
132
|
+
// does not: struct resolves each alternative through a lookup that
|
|
133
|
+
// reads a stored null as "no value", so the value that reaches the
|
|
134
|
+
// `$NULL` validator is undefined and every nullable field rejected the
|
|
135
|
+
// one value it exists to allow. `$NIL` matches that no-value, so the
|
|
136
|
+
// pair covers both readings.
|
|
137
|
+
//
|
|
138
|
+
// THE COST, stated because it is real and not an oversight: `$NIL` is
|
|
139
|
+
// also how an OPTIONAL field is spelled, and struct cannot tell a
|
|
140
|
+
// stored null from an absent key inside a union — the lookup collapses
|
|
141
|
+
// them before any alternative sees the value. So a REQUIRED nullable
|
|
142
|
+
// field (`string | null`, `req: true`) also passes when the key is
|
|
143
|
+
// missing. The alternative is worse: drop `$NIL` and a nullable field
|
|
144
|
+
// rejects null, which is the one value it is declared to hold, for
|
|
145
|
+
// EVERY such field rather than weakening presence on a subset. Closing
|
|
146
|
+
// the gap needs a presence check outside struct, i.e. a second
|
|
147
|
+
// validation mechanism beside the one this whole module exists to
|
|
148
|
+
// reuse. Revisit if struct gains a spelling that separates them.
|
|
149
|
+
if (0 <= members.indexOf(S_NULL) && members.indexOf(S_NIL) < 0) {
|
|
150
|
+
members.push(S_NIL);
|
|
151
|
+
}
|
|
152
|
+
spec = 0 === members.length ? S_ANY : [S_ONE, ...members];
|
|
153
|
+
}
|
|
154
|
+
else {
|
|
155
|
+
// An array-shaped sentinel that is not a union is a shape this mapper
|
|
156
|
+
// has not met. `$ANY` over a guess.
|
|
157
|
+
spec = S_ANY;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
else {
|
|
161
|
+
const key = (0, canonType_1.canonKey)(type);
|
|
162
|
+
spec = 'STRING' === key ? SPEC_STRING : (CANON_STRUCT[key] ?? S_ANY);
|
|
163
|
+
}
|
|
164
|
+
return optional ? optionalSpec(spec) : spec;
|
|
165
|
+
}
|
|
166
|
+
// The spec for one entity RECORD: every active field, keyed by name.
|
|
167
|
+
//
|
|
168
|
+
// OPEN, ALWAYS. apidef records the properties a spec declared, which is not a
|
|
169
|
+
// promise that a response carries nothing else — a server that adds a field is
|
|
170
|
+
// not breaking its clients, and a closed spec would turn that into a client
|
|
171
|
+
// error for every caller at once. The declared fields are type-checked; the
|
|
172
|
+
// rest pass. A caller who wants the closed reading drops `$OPEN` at runtime
|
|
173
|
+
// (the validate feature's `strict` option does exactly that).
|
|
174
|
+
function entityDataSpec(ent) {
|
|
175
|
+
const spec = { [S_OPEN]: true };
|
|
176
|
+
const fields = (ent && ent.fields) ? (0, jostraca_1.each)(ent.fields) : [];
|
|
177
|
+
for (const f of fields) {
|
|
178
|
+
if (null == f || null == f.name || false === f.active) {
|
|
179
|
+
continue;
|
|
180
|
+
}
|
|
181
|
+
spec[f.name] = canonToSpec(f.type, false === f.req);
|
|
182
|
+
}
|
|
183
|
+
return spec;
|
|
184
|
+
}
|
|
185
|
+
// The spec for one operation's REQUEST payload.
|
|
186
|
+
//
|
|
187
|
+
// The members and their optionality are opRequestShape's answer, not a second
|
|
188
|
+
// reading of the model: the partiality policy that decides what a generated
|
|
189
|
+
// `<Name>CreateData` requires is the same policy that decides what a create
|
|
190
|
+
// call must carry, and two copies of it would drift the moment one is edited.
|
|
191
|
+
function entityOpSpec(ent, opname) {
|
|
192
|
+
const { items } = (0, opShape_1.opRequestShape)(ent, opname);
|
|
193
|
+
if (0 === items.length) {
|
|
194
|
+
return null;
|
|
195
|
+
}
|
|
196
|
+
const spec = { [S_OPEN]: true };
|
|
197
|
+
for (const it of items) {
|
|
198
|
+
spec[it.name] = canonToSpec(it.type, it.optional);
|
|
199
|
+
}
|
|
200
|
+
return spec;
|
|
201
|
+
}
|
|
202
|
+
// Every spec one entity needs at runtime: its record shape, and one per op it
|
|
203
|
+
// declares. An entity with no fields and no ops yields `{ data: {$OPEN} }`,
|
|
204
|
+
// which validates everything — the honest answer for a model that says
|
|
205
|
+
// nothing, and cheaper for the runtime than a missing-key branch.
|
|
206
|
+
function entitySpecs(ent) {
|
|
207
|
+
const op = {};
|
|
208
|
+
const ops = (ent && ent.op) || {};
|
|
209
|
+
for (const opname of Object.keys(ops).sort()) {
|
|
210
|
+
const opspec = entityOpSpec(ent, opname);
|
|
211
|
+
if (null != opspec) {
|
|
212
|
+
op[opname] = opspec;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
return { data: entityDataSpec(ent), op };
|
|
216
|
+
}
|
|
217
|
+
// A DEFAULT VALUE, read as a type.
|
|
218
|
+
//
|
|
219
|
+
// A feature declares its options as defaults (`ttl: 5000`, `currency: 'USD'`,
|
|
220
|
+
// `methods: ['GET']`) — a map written to document what happens when you say
|
|
221
|
+
// nothing, not to state a type. struct.validate reads it by example, and by
|
|
222
|
+
// example is SHARPER than the author meant: `unit: 0` says "an integer", so
|
|
223
|
+
// cost's own `unit: 0.002` failed its own feature's spec; `header: ''` says
|
|
224
|
+
// "a non-empty string", which the default itself is not.
|
|
225
|
+
//
|
|
226
|
+
// So the default is kept for its KIND and widened to that kind's sentinel.
|
|
227
|
+
// Nothing is lost by dropping the value: a feature's defaults are applied by
|
|
228
|
+
// the feature's own code (`this._options.currency || 'USD'`), never by this
|
|
229
|
+
// spec — each feature entry is optional, and struct fills in nothing through
|
|
230
|
+
// an optional union.
|
|
231
|
+
//
|
|
232
|
+
// This applies to a DEFAULTS map only. `main.kit.optspec` is written as a
|
|
233
|
+
// spec, so its concrete values are the author's own choice of constraint and
|
|
234
|
+
// are passed through untouched.
|
|
235
|
+
function byExampleSpec(val) {
|
|
236
|
+
if (null == val) {
|
|
237
|
+
return S_ANY;
|
|
238
|
+
}
|
|
239
|
+
if (Array.isArray(val)) {
|
|
240
|
+
return sentinel('LIST');
|
|
241
|
+
}
|
|
242
|
+
const t = typeof val;
|
|
243
|
+
if ('string' === t) {
|
|
244
|
+
return SPEC_STRING;
|
|
245
|
+
}
|
|
246
|
+
if ('number' === t) {
|
|
247
|
+
// `$NUMBER` admits integer and decimal alike; `$INTEGER` would re-impose
|
|
248
|
+
// exactly the trap this function exists to remove.
|
|
249
|
+
return sentinel('NUMBER');
|
|
250
|
+
}
|
|
251
|
+
if ('boolean' === t) {
|
|
252
|
+
return sentinel('BOOLEAN');
|
|
253
|
+
}
|
|
254
|
+
if ('function' === t) {
|
|
255
|
+
return S_ANY;
|
|
256
|
+
}
|
|
257
|
+
return sentinel('MAP');
|
|
258
|
+
}
|
|
259
|
+
//# sourceMappingURL=canonSpec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"canonSpec.js","sourceRoot":"","sources":["../../src/helpers/canonSpec.ts"],"names":[],"mappings":";AAAA,0DAA0D;AAC1D,EAAE;AACF,6EAA6E;AAC7E,8EAA8E;AAC9E,8EAA8E;AAC9E,2EAA2E;AAC3E,sEAAsE;AACtE,EAAE;AACF,8EAA8E;AAC9E,2EAA2E;AAC3E,yEAAyE;AACzE,+EAA+E;AAC/E,4EAA4E;AAC5E,+EAA+E;AAC/E,EAAE;AACF,wEAAwE;AACxE,kEAAkE;AAClE,EAAE;AACF,iEAAiE;AACjE,0EAA0E;AAC1E,6EAA6E;AAC7E,4EAA4E;AAC5E,gFAAgF;AAChF,EAAE;AACF,yEAAyE;AACzE,4EAA4E;AAC5E,8EAA8E;AAC9E,4DAA4D;AAC5D,EAAE;AACF,8EAA8E;AAC9E,+EAA+E;AAC/E,6EAA6E;AAC7E,6CAA6C;AAC7C,EAAE;AACF,0EAA0E;AAC1E,6EAA6E;AAC7E,4EAA4E;AAC5E,yEAAyE;AACzE,uDAAuD;;;QA8PrD,aAAa;QACb,WAAW;QACX,YAAY;QACZ,cAAc;QACd,YAAY;QACZ,WAAW;QACX,QAAQ;AAlQV,uCAA+B;AAE/B,2CAAsC;AACtC,uC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EAAyE;QACzE,mDAAmD;QACnD,OAAO,QAAQ,CAAC,QAAQ,CAAC,CAAA;IAC3B,CAAC;IACD,IAAI,SAAS,KAAK,CAAC,EAAE,CAAC;QACpB,OAAO,QAAQ,CAAC,SAAS,CAAC,CAAA;IAC5B,CAAC;IACD,IAAI,UAAU,KAAK,CAAC,EAAE,CAAC;QACrB,OAAO,KAAK,CAAA;IACd,CAAC;IAED,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAA;AACxB,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
declare function featureOptionSpec(feat: any): Record<string, any>;
|
|
2
|
+
declare function optionSpec(model: any, targetname?: string): Record<string, any>;
|
|
3
|
+
declare function entitySpecMap(model: any, targetname?: string): Record<string, any> | null;
|
|
4
|
+
export { optionSpec, featureOptionSpec, entitySpecMap, };
|