@voxgig/sdkgen 4.45.0 → 4.46.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/action/check.js +15 -0
- package/dist/action/check.js.map +1 -1
- package/dist/action/copies.js +1 -0
- package/dist/action/copies.js.map +1 -1
- package/dist/action/doctor.d.ts +21 -2
- package/dist/action/doctor.js +166 -9
- package/dist/action/doctor.js.map +1 -1
- package/dist/action/package.js +9 -0
- package/dist/action/package.js.map +1 -1
- package/dist/action/remove.js +2 -1
- package/dist/action/remove.js.map +1 -1
- package/dist/action/target.d.ts +2 -1
- package/dist/action/target.js +50 -11
- package/dist/action/target.js.map +1 -1
- package/dist/cmp/AgentGuide.js +19 -8
- package/dist/cmp/AgentGuide.js.map +1 -1
- package/dist/cmp/AgentGuideContent.d.ts +6 -4
- package/dist/cmp/AgentGuideContent.js +51 -32
- package/dist/cmp/AgentGuideContent.js.map +1 -1
- package/dist/cmp/AgentGuideFeature.js +5 -3
- package/dist/cmp/AgentGuideFeature.js.map +1 -1
- package/dist/cmp/AgentGuideTop.js +84 -46
- package/dist/cmp/AgentGuideTop.js.map +1 -1
- package/dist/cmp/Changelog.js +12 -1
- package/dist/cmp/Changelog.js.map +1 -1
- package/dist/cmp/Deploy.js +22 -20
- package/dist/cmp/Deploy.js.map +1 -1
- package/dist/cmp/ExternalTarget.js +5 -5
- package/dist/cmp/ExternalTarget.js.map +1 -1
- package/dist/cmp/Feature.js +10 -3
- package/dist/cmp/Feature.js.map +1 -1
- package/dist/cmp/FeatureDocs.d.ts +6 -4
- package/dist/cmp/FeatureDocs.js +14 -39
- package/dist/cmp/FeatureDocs.js.map +1 -1
- package/dist/cmp/FeatureHook.d.ts +7 -1
- package/dist/cmp/FeatureHook.js +34 -1
- package/dist/cmp/FeatureHook.js.map +1 -1
- package/dist/cmp/PublishWorkflow.js +30 -6
- package/dist/cmp/PublishWorkflow.js.map +1 -1
- package/dist/cmp/ReadmeErrors.js +521 -18
- package/dist/cmp/ReadmeErrors.js.map +1 -1
- package/dist/cmp/ReadmeExplanation.js +280 -44
- package/dist/cmp/ReadmeExplanation.js.map +1 -1
- package/dist/cmp/ReadmeFeatures.js +16 -7
- package/dist/cmp/ReadmeFeatures.js.map +1 -1
- package/dist/cmp/ReadmeIntro.js +3 -2
- package/dist/cmp/ReadmeIntro.js.map +1 -1
- package/dist/cmp/ReadmeRefFeatures.js +34 -24
- package/dist/cmp/ReadmeRefFeatures.js.map +1 -1
- package/dist/cmp/ReadmeStation.js +11 -8
- package/dist/cmp/ReadmeStation.js.map +1 -1
- package/dist/cmp/ReadmeTop.js +472 -373
- package/dist/cmp/ReadmeTop.js.map +1 -1
- package/dist/cmp/ReadmeUnions.js +8 -2
- package/dist/cmp/ReadmeUnions.js.map +1 -1
- package/dist/cmp/Security.js +3 -2
- package/dist/cmp/Security.js.map +1 -1
- package/dist/helpers/applicability.d.ts +2 -1
- package/dist/helpers/applicability.js +26 -0
- package/dist/helpers/applicability.js.map +1 -1
- package/dist/helpers/copymerge.d.ts +3 -0
- package/dist/helpers/copymerge.js +43 -10
- package/dist/helpers/copymerge.js.map +1 -1
- package/dist/helpers/doccheck.d.ts +11 -0
- package/dist/helpers/doccheck.js +146 -0
- package/dist/helpers/doccheck.js.map +1 -0
- package/dist/helpers/doctext.d.ts +11 -0
- package/dist/helpers/doctext.js +84 -0
- package/dist/helpers/doctext.js.map +1 -0
- package/dist/helpers/exampleCall.d.ts +16 -0
- package/dist/helpers/exampleCall.js +334 -0
- package/dist/helpers/exampleCall.js.map +1 -0
- package/dist/helpers/exportnames.d.ts +4 -0
- package/dist/helpers/exportnames.js +35 -0
- package/dist/helpers/exportnames.js.map +1 -0
- package/dist/helpers/facts.d.ts +2 -1
- package/dist/helpers/facts.js +37 -2
- package/dist/helpers/facts.js.map +1 -1
- package/dist/helpers/modelcheck.d.ts +2 -1
- package/dist/helpers/modelcheck.js +13 -0
- package/dist/helpers/modelcheck.js.map +1 -1
- package/dist/helpers/opExample.d.ts +9 -2
- package/dist/helpers/opExample.js +22 -2
- package/dist/helpers/opExample.js.map +1 -1
- package/dist/helpers/opShape.d.ts +2 -1
- package/dist/helpers/opShape.js +12 -0
- package/dist/helpers/opShape.js.map +1 -1
- package/dist/helpers/packageMeta.js +21 -8
- package/dist/helpers/packageMeta.js.map +1 -1
- package/dist/helpers/semver.d.ts +2 -1
- package/dist/helpers/semver.js +7 -0
- package/dist/helpers/semver.js.map +1 -1
- package/dist/sdkgen.js +21 -2
- package/dist/sdkgen.js.map +1 -1
- package/dist/testkit.d.ts +1 -0
- package/dist/testkit.js +23 -19
- package/dist/testkit.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utility.js +2 -1
- package/dist/utility.js.map +1 -1
- package/model/fact.aontu +44 -0
- package/model/sdkgen.aontu +6 -2
- package/package.json +3 -1
- package/project/.sdk/src/cmp/c/ReadmeQuick_c.ts +1 -1
- package/project/.sdk/src/cmp/c/ReadmeTopQuick_c.ts +1 -1
- package/project/.sdk/src/cmp/clojure/ReadmeEntity_clojure.ts +12 -3
- package/project/.sdk/src/cmp/scala/ReadmeRef_scala.ts +4 -1
- package/project/.sdk/src/cmp/swift/ReadmeQuick_swift.ts +1 -0
- package/project/.sdk/src/cmp/swift/ReadmeRef_swift.ts +3 -0
- package/project/.sdk/src/cmp/swift/ReadmeTopQuick_swift.ts +2 -1
- package/project/.sdk/src/cmp/zig/ReadmeOptions_zig.ts +1 -1
- package/project/.sdk/src/cmp/zig/ReadmeQuick_zig.ts +2 -2
- package/project/.sdk/src/cmp/zig/ReadmeTopQuick_zig.ts +2 -2
- package/project/sdkgen-package.json +1 -1
- package/src/action/check.ts +21 -0
- package/src/action/copies.ts +2 -0
- package/src/action/doctor.ts +244 -13
- package/src/action/package.ts +10 -0
- package/src/action/remove.ts +2 -1
- package/src/action/target.ts +66 -15
- package/src/cmp/AgentGuide.ts +24 -10
- package/src/cmp/AgentGuideContent.ts +53 -32
- package/src/cmp/AgentGuideFeature.ts +6 -4
- package/src/cmp/AgentGuideTop.ts +108 -47
- package/src/cmp/Changelog.ts +13 -2
- package/src/cmp/Deploy.ts +23 -21
- package/src/cmp/ExternalTarget.ts +6 -6
- package/src/cmp/Feature.ts +11 -4
- package/src/cmp/FeatureDocs.ts +21 -40
- package/src/cmp/FeatureHook.ts +38 -1
- package/src/cmp/PublishWorkflow.ts +33 -7
- package/src/cmp/ReadmeErrors.ts +555 -25
- package/src/cmp/ReadmeExplanation.ts +316 -52
- package/src/cmp/ReadmeFeatures.ts +18 -8
- package/src/cmp/ReadmeIntro.ts +3 -2
- package/src/cmp/ReadmeRefFeatures.ts +39 -27
- package/src/cmp/ReadmeStation.ts +12 -14
- package/src/cmp/ReadmeTop.ts +528 -387
- package/src/cmp/ReadmeUnions.ts +10 -2
- package/src/cmp/Security.ts +3 -2
- package/src/helpers/applicability.ts +28 -0
- package/src/helpers/copymerge.ts +58 -10
- package/src/helpers/doccheck.ts +174 -0
- package/src/helpers/doctext.ts +113 -0
- package/src/helpers/exampleCall.ts +415 -0
- package/src/helpers/exportnames.ts +47 -0
- package/src/helpers/facts.ts +47 -2
- package/src/helpers/modelcheck.ts +16 -0
- package/src/helpers/opExample.ts +34 -2
- package/src/helpers/opShape.ts +13 -0
- package/src/helpers/packageMeta.ts +21 -8
- package/src/helpers/semver.ts +9 -0
- package/src/sdkgen.ts +27 -3
- package/src/testkit.ts +30 -20
- package/src/utility.ts +2 -1
|
@@ -4,6 +4,7 @@ exports.ReadmeRefFeatures = void 0;
|
|
|
4
4
|
const jostraca_1 = require("jostraca");
|
|
5
5
|
const component_1 = require("../helpers/component");
|
|
6
6
|
const FeatureDocs_1 = require("./FeatureDocs");
|
|
7
|
+
const packageMeta_1 = require("../helpers/packageMeta");
|
|
7
8
|
const ReadmeRefFeatures = (0, component_1.cmp)(function ReadmeRefFeatures(props) {
|
|
8
9
|
const { target, ctx$ } = props;
|
|
9
10
|
const { model } = ctx$;
|
|
@@ -11,28 +12,34 @@ const ReadmeRefFeatures = (0, component_1.cmp)(function ReadmeRefFeatures(props)
|
|
|
11
12
|
if (0 === features.length) {
|
|
12
13
|
return;
|
|
13
14
|
}
|
|
15
|
+
const on = features.filter((f) => f.on).map((f) => f.name);
|
|
16
|
+
const ordered = (0, FeatureDocs_1.honoursActivationOrder)({ name: (0, packageMeta_1.originName)(model, target.name) });
|
|
17
|
+
const wrapping = features.filter((f) => f.wraps);
|
|
18
|
+
const hooked = features.filter((f) => 'none' === f.transport);
|
|
19
|
+
// Order decides nothing until one wrapping feature sits inside another.
|
|
20
|
+
const nests = 1 < wrapping.length;
|
|
14
21
|
// Emitted INSIDE the per-language `## Features` section, after its summary
|
|
15
22
|
// table and activation snippet, so these are subsections of it rather than
|
|
16
23
|
// a competing heading.
|
|
17
24
|
(0, jostraca_1.Content)(`
|
|
18
25
|
### Configuring features
|
|
19
26
|
|
|
20
|
-
Each feature is inactive until switched on, and an SDK with no feature
|
|
21
|
-
configured does no feature work at all.
|
|
22
|
-
unless you name it.
|
|
23
|
-
|
|
24
|
-
${(0, FeatureDocs_1.honoursActivationOrder)(target) ?
|
|
25
|
-
'The array form of \\`feature\\` is significant: several features wrap the\ntransport, and the order you list them in is the order they nest.' :
|
|
26
|
-
'This SDK takes \\`feature\\` as a map and composes the transport-wrapping\nfeatures in a fixed catalog order, so activation order does not change\nnesting here.'}
|
|
27
|
+
${0 === on.length ? `Each feature is inactive until switched on, and an SDK with no feature
|
|
28
|
+
configured does no feature work at all.` : `${(0, FeatureDocs_1.codeList)(on)} ${1 === on.length ? 'is' : 'are'} active by default${on.length < features.length ? '; every other feature is inactive until switched on' : ''}.`}
|
|
29
|
+
Every option below keeps its default unless you name it.
|
|
27
30
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
if (
|
|
31
|
+
${!nests ? '' : (ordered ?
|
|
32
|
+
'The array form of `feature` is significant: several features wrap the\ntransport, and the order you list them in is the order they nest.' :
|
|
33
|
+
'This SDK takes `feature` as a map and composes the transport-wrapping\nfeatures in a fixed catalog order, so activation order does not change\nnesting here.') + '\n\n'}`);
|
|
34
|
+
if (nests) {
|
|
35
|
+
const hookedNames = hooked.map((f) => '`' + f.name + '`').join(', ');
|
|
36
|
+
const hookedLine = 0 === hooked.length ? '' : '\n' + hookedNames + (1 === hooked.length ?
|
|
37
|
+
' attaches to pipeline hooks\nrather than the transport, so its order does not affect what it observes.\n' :
|
|
38
|
+
' attach to pipeline hooks\nrather than the transport, so their order does not affect what they observe.\n');
|
|
32
39
|
(0, jostraca_1.Content)(`#### Ordering
|
|
33
40
|
|
|
34
41
|
${wrapping.map((f) => '`' + f.name + '`').join(', ')} wrap the transport. Each
|
|
35
|
-
wraps whatever is already installed${
|
|
42
|
+
wraps whatever is already installed${ordered ?
|
|
36
43
|
', so **activation order is nesting order**:\na feature activated later sits OUTSIDE one activated earlier, and sees the call\nfirst.' :
|
|
37
44
|
'. This SDK fixes that order in its own\ncatalog rather than taking it from the caller.'}
|
|
38
45
|
|
|
@@ -42,12 +49,9 @@ sits inside it, so a response served from the cache never reaches \\\`cost\\\` a
|
|
|
42
49
|
correctly charged nothing; reverse them and every cache hit is billed for money
|
|
43
50
|
that was never spent.
|
|
44
51
|
` : `That decides behaviour, not just sequence: a feature that short-circuits the
|
|
45
|
-
call, such as a cache serving a hit, stops every feature nested inside it from
|
|
52
|
+
call${features.some((f) => 'cache' === f.name) ? ', such as a cache serving a hit,' : ''} stops every feature nested inside it from
|
|
46
53
|
ever seeing that call.
|
|
47
|
-
`}
|
|
48
|
-
${hooked.map((f) => '`' + f.name + '`').join(', ')} attach to pipeline hooks
|
|
49
|
-
rather than the transport, so their order does not affect what they observe.
|
|
50
|
-
|
|
54
|
+
`}${hookedLine}
|
|
51
55
|
`);
|
|
52
56
|
}
|
|
53
57
|
for (const f of features) {
|
|
@@ -64,7 +68,7 @@ ${f.title}.
|
|
|
64
68
|
|---|---|
|
|
65
69
|
`);
|
|
66
70
|
for (const o of f.options) {
|
|
67
|
-
(0, jostraca_1.Content)(`| \`${o.name}\` |
|
|
71
|
+
(0, jostraca_1.Content)(`| \`${o.name}\` | ${o.code} |
|
|
68
72
|
`);
|
|
69
73
|
}
|
|
70
74
|
(0, jostraca_1.Content)(`
|
|
@@ -99,21 +103,27 @@ its default unless you name it.
|
|
|
99
103
|
|
|
100
104
|
`);
|
|
101
105
|
if (f.wraps) {
|
|
102
|
-
(0, jostraca_1.Content)(`- Wraps the transport: its place in the activation order decides what it
|
|
106
|
+
(0, jostraca_1.Content)(nests ? `- Wraps the transport: its place in the activation order decides what it
|
|
103
107
|
sees. See [Ordering](#ordering) above.
|
|
108
|
+
` : `- Wraps the transport.
|
|
104
109
|
`);
|
|
105
110
|
}
|
|
106
|
-
|
|
111
|
+
if ('base' === f.transport) {
|
|
112
|
+
(0, jostraca_1.Content)(`- Installs the BASE transport that the wrapping features wrap, so it must be
|
|
113
|
+
activated before them.
|
|
114
|
+
`);
|
|
115
|
+
}
|
|
116
|
+
if ('none' === f.transport) {
|
|
107
117
|
(0, jostraca_1.Content)(`- Attaches to pipeline hooks, not the transport, so activation order does
|
|
108
118
|
not change what it observes.
|
|
109
119
|
`);
|
|
110
120
|
}
|
|
111
|
-
if (
|
|
112
|
-
(0, jostraca_1.Content)(`-
|
|
113
|
-
activated before them.
|
|
121
|
+
else if (0 < f.hooks.length) {
|
|
122
|
+
(0, jostraca_1.Content)(`- Also attaches to pipeline hooks.
|
|
114
123
|
`);
|
|
115
124
|
}
|
|
116
|
-
(0, jostraca_1.Content)(`-
|
|
125
|
+
(0, jostraca_1.Content)(`- ${f.on ? `Active by default: set \`feature.${f.name}.active\` to false to switch it off.` :
|
|
126
|
+
'Inactive by default: leaving it out costs nothing at runtime.'}
|
|
117
127
|
|
|
118
128
|
`);
|
|
119
129
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReadmeRefFeatures.js","sourceRoot":"","sources":["../../src/c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AAC,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,KAAK,CAAC,CAAC,CAAC;;CAErB,CAAC,CAAC,CAAC;CACH,CAAC,CAAA;QACE,CAAC;QAED,IAAI,MAAM,KAAK,CAAC,CAAC,SAAS,EAAE,CAAC;YAC3B,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;aACI,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;YAC5B,IAAA,kBAAO,EAAC;CACb,CAAC,CAAA;QACE,CAAC;QAED,IAAA,kBAAO,EAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,oCAAoC,CAAC,CAAC,IAAI,sCAAsC,CAAC,CAAC;YACpG,+DAA+D;;CAEpE,CAAC,CAAA;IACA,CAAC;AACH,CAAC,CAAC,CAAA;QAIA,iBAAiB"}
|
|
@@ -3,8 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ReadmeStation = void 0;
|
|
4
4
|
const jostraca_1 = require("jostraca");
|
|
5
5
|
const component_1 = require("../helpers/component");
|
|
6
|
-
const types_1 = require("../types");
|
|
7
6
|
const packageMeta_1 = require("../helpers/packageMeta");
|
|
7
|
+
const applicability_1 = require("../helpers/applicability");
|
|
8
|
+
const facts_1 = require("../helpers/facts");
|
|
9
|
+
const utility_1 = require("../utility");
|
|
8
10
|
// Targets where station.connect(SDK) is the idiomatic binding; everything
|
|
9
11
|
// else uses inverted binding through the SDK's own constructor.
|
|
10
12
|
const CONNECT_TARGETS = ['ts', 'js', 'py', 'rb', 'php', 'lua', 'perl'];
|
|
@@ -13,8 +15,7 @@ const ERROR_CATALOG_URL = 'https://github.com/voxgig/sdkgen/blob/main/docs/refer
|
|
|
13
15
|
const ReadmeStation = (0, component_1.cmp)(function ReadmeStation(props) {
|
|
14
16
|
const { target } = props;
|
|
15
17
|
const { model } = props.ctx$;
|
|
16
|
-
const
|
|
17
|
-
const station = Object.values(features)
|
|
18
|
+
const station = Object.values((0, applicability_1.targetFeatures)(model, target))
|
|
18
19
|
.find((f) => 'station' === f?.name);
|
|
19
20
|
if (null == station) {
|
|
20
21
|
return;
|
|
@@ -26,15 +27,17 @@ const ReadmeStation = (0, component_1.cmp)(function ReadmeStation(props) {
|
|
|
26
27
|
const env = (0, packageMeta_1.envName)(model);
|
|
27
28
|
const secretbase = env.toLowerCase();
|
|
28
29
|
const secretname = secretbase + '.apikey';
|
|
29
|
-
const
|
|
30
|
-
const
|
|
30
|
+
const origin = (0, packageMeta_1.originName)(model, target.name);
|
|
31
|
+
const connect = CONNECT_TARGETS.includes(origin);
|
|
32
|
+
const selfreg = SELF_REGISTER_TARGETS.includes(origin);
|
|
31
33
|
(0, jostraca_1.Content)(`
|
|
32
34
|
## Use with Station
|
|
33
35
|
|
|
34
36
|
This SDK ships as a [voxgig/station](https://github.com/voxgig/station)
|
|
35
37
|
plugin: bind it to a local \`Station\` and outbound configuration,
|
|
36
38
|
credentials, and observability move to one place. The feature is
|
|
37
|
-
present
|
|
39
|
+
present ${(0, facts_1.fact)(station, 'on') ? 'and **on by default**.' :
|
|
40
|
+
'but **off by default** — nothing changes until you bind.'}
|
|
38
41
|
|
|
39
42
|
### Declarative: \`station.json\` + \`station.sdk()\`
|
|
40
43
|
|
|
@@ -73,7 +76,7 @@ SDK features are configured in the same file too: fleet-wide, per api,
|
|
|
73
76
|
or per instance. \`station.check()\` resolves and constructs every
|
|
74
77
|
active instance without sending a request — run it in CI.
|
|
75
78
|
|
|
76
|
-
|
|
79
|
+
${(0, utility_1.isAuthActive)(model) ? `### The secret name derives from the instance
|
|
77
80
|
|
|
78
81
|
The credential comes from [sekreto](https://github.com/voxgig/sekreto)
|
|
79
82
|
under a name derived from the **instance** name — the instance token
|
|
@@ -89,7 +92,7 @@ vault later and application code does not change; sekreto's own
|
|
|
89
92
|
documentation covers the stores. The key stays out of \`options()\` and
|
|
90
93
|
\`prepare()\` output; \`station.tap(...)\` shows live traffic.
|
|
91
94
|
|
|
92
|
-
### Imperative: ${connect ? '`connect()`' : 'inverted binding'} — the retrofit path
|
|
95
|
+
` : ''}### Imperative: ${connect ? '`connect()`' : 'inverted binding'} — the retrofit path
|
|
93
96
|
|
|
94
97
|
${connect
|
|
95
98
|
? `Bind by passing the SDK class to the station:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReadmeStation.js","sourceRoot":"","sources":["../../src/cmp/ReadmeStation.ts"],"names":[],"mappings":";;;AACA,uCAAkC;AAClC,oDAA0C;AAE1C,
|
|
1
|
+
{"version":3,"file":"ReadmeStation.js","sourceRoot":"","sources":["../../src/cmp/ReadmeStation.ts"],"names":[],"mappings":";;;AACA,uCAAkC;AAClC,oDAA0C;AAE1C,wDAAyE;AACzE,4DAAyD;AACzD,4CAAuC;AACvC,wCAAyC;AAIzC,0EAA0E;AAC1E,gEAAgE;AAChE,MAAM,eAAe,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,CAAA;AAEtE,MAAM,qBAAqB,GACzB,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,E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