@voxgig/sdkgen 4.46.0 → 4.47.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 +58 -4
- package/dist/action/check.js.map +1 -1
- package/dist/action/doctor.d.ts +5 -0
- package/dist/action/doctor.js +44 -4
- package/dist/action/doctor.js.map +1 -1
- package/dist/action/package.d.ts +1 -1
- package/dist/action/package.js +6 -16
- package/dist/action/package.js.map +1 -1
- package/dist/action/remove.js +15 -4
- package/dist/action/remove.js.map +1 -1
- package/dist/action/resolve.d.ts +1 -0
- package/dist/action/resolve.js +10 -4
- package/dist/action/resolve.js.map +1 -1
- package/dist/admin/status.d.ts +7 -1
- package/dist/admin/status.js +34 -5
- package/dist/admin/status.js.map +1 -1
- package/dist/cmp/AgentGuide.js +27 -15
- package/dist/cmp/AgentGuide.js.map +1 -1
- package/dist/cmp/AgentGuideContent.d.ts +3 -3
- package/dist/cmp/AgentGuideContent.js +22 -11
- package/dist/cmp/AgentGuideContent.js.map +1 -1
- package/dist/cmp/AgentGuideFeature.js +14 -6
- package/dist/cmp/AgentGuideFeature.js.map +1 -1
- package/dist/cmp/AgentGuideTop.js +16 -8
- package/dist/cmp/AgentGuideTop.js.map +1 -1
- package/dist/cmp/Changelog.js +37 -7
- package/dist/cmp/Changelog.js.map +1 -1
- package/dist/cmp/Deploy.js +52 -16
- package/dist/cmp/Deploy.js.map +1 -1
- package/dist/cmp/Entity.js +1 -1
- package/dist/cmp/Entity.js.map +1 -1
- package/dist/cmp/ExternalTarget.js +5 -0
- package/dist/cmp/ExternalTarget.js.map +1 -1
- package/dist/cmp/Feature.js +2 -2
- package/dist/cmp/Feature.js.map +1 -1
- package/dist/cmp/Main.js +1 -1
- package/dist/cmp/Main.js.map +1 -1
- package/dist/cmp/PublishWorkflow.js +63 -53
- package/dist/cmp/PublishWorkflow.js.map +1 -1
- package/dist/cmp/ReadmeIntro.js +1 -1
- package/dist/cmp/ReadmeIntro.js.map +1 -1
- package/dist/cmp/ReadmeModel.js +2 -2
- package/dist/cmp/ReadmeModel.js.map +1 -1
- package/dist/cmp/ReadmeStation.js +3 -3
- package/dist/cmp/ReadmeStation.js.map +1 -1
- package/dist/cmp/ReadmeTop.js +57 -59
- package/dist/cmp/ReadmeTop.js.map +1 -1
- package/dist/cmp/Registered.js +1 -1
- package/dist/cmp/Registered.js.map +1 -1
- package/dist/cmp/Security.js +23 -3
- package/dist/cmp/Security.js.map +1 -1
- package/dist/cmp/Test.js +1 -1
- package/dist/cmp/Test.js.map +1 -1
- package/dist/helpers/alongside.d.ts +2 -3
- package/dist/helpers/alongside.js +16 -15
- package/dist/helpers/alongside.js.map +1 -1
- package/dist/helpers/applicability.d.ts +2 -1
- package/dist/helpers/applicability.js +14 -1
- package/dist/helpers/applicability.js.map +1 -1
- package/dist/helpers/component.js +9 -1
- package/dist/helpers/component.js.map +1 -1
- package/dist/helpers/definitionPlan.js +0 -1
- package/dist/helpers/definitionPlan.js.map +1 -1
- package/dist/helpers/doctext.js +1 -0
- package/dist/helpers/doctext.js.map +1 -1
- package/dist/helpers/facts.js +174 -4
- package/dist/helpers/facts.js.map +1 -1
- package/dist/helpers/flowGuard.d.ts +1 -1
- package/dist/helpers/flowGuard.js +20 -7
- package/dist/helpers/flowGuard.js.map +1 -1
- package/dist/helpers/generated.d.ts +1 -0
- package/dist/helpers/generated.js +1 -1
- package/dist/helpers/generated.js.map +1 -1
- package/dist/helpers/graphqlPoint.d.ts +2 -1
- package/dist/helpers/graphqlPoint.js +17 -0
- package/dist/helpers/graphqlPoint.js.map +1 -1
- package/dist/helpers/guardModel.d.ts +2 -0
- package/dist/helpers/guardModel.js +41 -0
- package/dist/helpers/guardModel.js.map +1 -0
- package/dist/helpers/manifest.d.ts +2 -1
- package/dist/helpers/manifest.js +16 -0
- package/dist/helpers/manifest.js.map +1 -1
- package/dist/helpers/mcpTools.d.ts +2 -1
- package/dist/helpers/mcpTools.js +8 -1
- package/dist/helpers/mcpTools.js.map +1 -1
- package/dist/helpers/opShape.js +17 -17
- package/dist/helpers/opShape.js.map +1 -1
- package/dist/helpers/packageMeta.d.ts +6 -4
- package/dist/helpers/packageMeta.js +68 -46
- package/dist/helpers/packageMeta.js.map +1 -1
- package/dist/helpers/placement.d.ts +15 -0
- package/dist/helpers/placement.js +76 -0
- package/dist/helpers/placement.js.map +1 -0
- package/dist/helpers/semver.d.ts +2 -1
- package/dist/helpers/semver.js +21 -0
- package/dist/helpers/semver.js.map +1 -1
- package/dist/helpers/serverVars.js +3 -2
- package/dist/helpers/serverVars.js.map +1 -1
- package/dist/helpers/shipped.d.ts +2 -1
- package/dist/helpers/shipped.js +12 -0
- package/dist/helpers/shipped.js.map +1 -1
- package/dist/helpers/sourcestring.d.ts +3 -0
- package/dist/helpers/sourcestring.js +43 -0
- package/dist/helpers/sourcestring.js.map +1 -0
- package/dist/helpers/stdrep.d.ts +1 -1
- package/dist/helpers/stdrep.js +5 -1
- package/dist/helpers/stdrep.js.map +1 -1
- package/dist/helpers/surface.d.ts +7 -0
- package/dist/helpers/surface.js +69 -0
- package/dist/helpers/surface.js.map +1 -0
- package/dist/helpers/targetguard.d.ts +13 -0
- package/dist/helpers/targetguard.js +65 -0
- package/dist/helpers/targetguard.js.map +1 -0
- package/dist/helpers/text.d.ts +3 -1
- package/dist/helpers/text.js +16 -0
- package/dist/helpers/text.js.map +1 -1
- package/dist/helpers/textguard.d.ts +31 -0
- package/dist/helpers/textguard.js +157 -0
- package/dist/helpers/textguard.js.map +1 -0
- package/dist/helpers/title.d.ts +4 -0
- package/dist/helpers/title.js +52 -0
- package/dist/helpers/title.js.map +1 -0
- package/dist/sdkgen.d.ts +4 -6
- package/dist/sdkgen.js +59 -69
- package/dist/sdkgen.js.map +1 -1
- package/dist/testkit.d.ts +6 -2
- package/dist/testkit.js +4 -1
- package/dist/testkit.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/model/fact.aontu +106 -0
- package/model/sdkgen.aontu +9 -1
- package/package.json +1 -1
- package/project/.sdk/src/cmp/c/ReadmeQuick_c.ts +1 -1
- package/project/.sdk/src/cmp/clojure/ReadmeQuick_clojure.ts +1 -1
- package/project/.sdk/src/cmp/cpp/ReadmeQuick_cpp.ts +1 -1
- package/project/.sdk/src/cmp/csharp/ReadmeQuick_csharp.ts +1 -1
- package/project/.sdk/src/cmp/elixir/ReadmeQuick_elixir.ts +1 -1
- package/project/.sdk/src/cmp/go/ReadmeQuick_go.ts +1 -1
- package/project/.sdk/src/cmp/java/ReadmeQuick_java.ts +1 -1
- package/project/.sdk/src/cmp/js/ReadmeQuick_js.ts +1 -1
- package/project/.sdk/src/cmp/kotlin/ReadmeQuick_kotlin.ts +1 -1
- package/project/.sdk/src/cmp/lua/ReadmeQuick_lua.ts +1 -1
- package/project/.sdk/src/cmp/ocaml/ReadmeQuick_ocaml.ts +1 -1
- package/project/.sdk/src/cmp/perl/ReadmeQuick_perl.ts +1 -1
- package/project/.sdk/src/cmp/php/ReadmeQuick_php.ts +1 -1
- package/project/.sdk/src/cmp/py/ReadmeQuick_py.ts +1 -1
- package/project/.sdk/src/cmp/rb/ReadmeQuick_rb.ts +1 -1
- package/project/.sdk/src/cmp/rust/ReadmeQuick_rust.ts +1 -1
- package/project/.sdk/src/cmp/scala/ReadmeQuick_scala.ts +1 -1
- package/project/.sdk/src/cmp/swift/ReadmeQuick_swift.ts +1 -1
- package/project/.sdk/src/cmp/ts/ReadmeQuick_ts.ts +1 -1
- package/project/.sdk/src/cmp/ts/TestDefinition_ts.ts +3 -1
- package/project/.sdk/src/cmp/zig/ReadmeQuick_zig.ts +1 -1
- package/project/.sdk/tm/ocaml/test/feature/secrets/t_secrets.ml +3 -1
- package/project/.sdk/tm/php/test/feature/secrets/SecretsTest.php +2 -1
- package/project/.sdk/tm/zig/test/feature/secrets/secrets_test.zig +11 -2
- package/project/sdkgen-package.json +1 -1
- package/src/action/check.ts +78 -4
- package/src/action/doctor.ts +62 -4
- package/src/action/package.ts +1 -13
- package/src/action/remove.ts +19 -5
- package/src/action/resolve.ts +11 -4
- package/src/admin/status.ts +25 -5
- package/src/cmp/AgentGuide.ts +28 -15
- package/src/cmp/AgentGuideContent.ts +22 -11
- package/src/cmp/AgentGuideFeature.ts +15 -6
- package/src/cmp/AgentGuideTop.ts +17 -8
- package/src/cmp/Changelog.ts +46 -6
- package/src/cmp/Deploy.ts +59 -20
- package/src/cmp/Entity.ts +1 -1
- package/src/cmp/ExternalTarget.ts +6 -0
- package/src/cmp/Feature.ts +3 -3
- package/src/cmp/Main.ts +1 -1
- package/src/cmp/PublishWorkflow.ts +66 -58
- package/src/cmp/ReadmeIntro.ts +1 -1
- package/src/cmp/ReadmeModel.ts +2 -2
- package/src/cmp/ReadmeStation.ts +4 -5
- package/src/cmp/ReadmeTop.ts +60 -60
- package/src/cmp/Registered.ts +1 -1
- package/src/cmp/Security.ts +32 -5
- package/src/cmp/Test.ts +1 -1
- package/src/helpers/alongside.ts +16 -19
- package/src/helpers/applicability.ts +16 -1
- package/src/helpers/component.ts +11 -1
- package/src/helpers/definitionPlan.ts +0 -1
- package/src/helpers/doctext.ts +3 -1
- package/src/helpers/facts.ts +214 -5
- package/src/helpers/flowGuard.ts +22 -7
- package/src/helpers/generated.ts +3 -1
- package/src/helpers/graphqlPoint.ts +20 -1
- package/src/helpers/guardModel.ts +50 -0
- package/src/helpers/manifest.ts +19 -0
- package/src/helpers/mcpTools.ts +11 -1
- package/src/helpers/opShape.ts +16 -16
- package/src/helpers/packageMeta.ts +67 -43
- package/src/helpers/placement.ts +114 -0
- package/src/helpers/semver.ts +26 -0
- package/src/helpers/serverVars.ts +4 -2
- package/src/helpers/shipped.ts +13 -0
- package/src/helpers/sourcestring.ts +47 -0
- package/src/helpers/stdrep.ts +6 -1
- package/src/helpers/surface.ts +82 -0
- package/src/helpers/targetguard.ts +91 -0
- package/src/helpers/text.ts +22 -0
- package/src/helpers/textguard.ts +208 -0
- package/src/helpers/title.ts +59 -0
- package/src/sdkgen.ts +65 -85
- package/src/testkit.ts +12 -0
package/dist/cmp/Feature.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Feature.js","sourceRoot":"","sources":["../../src/cmp/Feature.ts"],"names":[],"mappings":";;;AACA,uCAAuC;AACvC,oDAA0C;AAE1C,8CAAgD;AAChD,
|
|
1
|
+
{"version":3,"file":"Feature.js","sourceRoot":"","sources":["../../src/cmp/Feature.ts"],"names":[],"mappings":";;;AACA,uCAAuC;AACvC,oDAA0C;AAE1C,8CAAgD;AAChD,4DAAmG;AACnG,4DAA4D;AAC5D,wDAAmD;AACnD,+CAAmD;AAEnD,MAAM,OAAO,GAAG,IAAA,eAAG,EAAC,SAAS,OAAO,CAAC,KAAU;IAC7C,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,KAAK,CAAA;IACvC,MAAM,EAAE,GAAG,EAAE,GAAG,IAAI,CAAA;IAEpB,sEAAsE;IACtE,yEAAyE;IACzE,yEAAyE;IACzE,sEAAsE;IACtE,0EAA0E;IAC1E,IAAI,CAAC,IAAA,8BAAc,EAAC,OAAO,EAAE,MAAM,CAAC,EAAE,CAAC;QACrC,MAAM,QAAQ,GAAG,IAAA,0BAAU,EAAC,MAAM,CAAC,CAAA;QACnC,MAAM,KAAK,GAAG,IAAA,2BAAW,EAAC,OAAO,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA;QAC7E,MAAM,MAAM,GAAG,IAAA,wBAAU,EAAC,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,CAAA;QAClD,MAAM,KAAK,GAAG,IAAA,yBAAe,EAAC,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC;YAChD,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,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,GAAG,CAAC,IAAI,CAAC;QACP,KAAK,EAAE,kBAAkB,EAAE,MAAM,EAAE,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,IAAI;QACrE,IAAI,EAAE,SAAS,GAAG,MAAM,CAAC,IAAI,GAAG,IAAI,GAAG,WAAW,GAAG,OAAO,CAAC,IAAI;KAClE,CAAC,CAAA;AAEJ,CAAC,CAAC,CAAA;QAIA,OAAO"}
|
package/dist/cmp/Main.js
CHANGED
|
@@ -10,7 +10,7 @@ const Main = (0, component_1.cmp)(function Main(props) {
|
|
|
10
10
|
const { model, log } = ctx$;
|
|
11
11
|
// Generator-owned placeholders (PROJECTENV) that the project's frozen
|
|
12
12
|
// Root.ts cannot know about.
|
|
13
|
-
const stdrep = (0, stdrep_1.ensureStdrep)(ctx
|
|
13
|
+
const stdrep = (0, stdrep_1.ensureStdrep)(ctx$, target);
|
|
14
14
|
// Per target, as `plain` names the target's own release; each Main_<lang>
|
|
15
15
|
// copies its templates with this map before the next target sets it.
|
|
16
16
|
stdrep.PROJECTUSERAGENT = (0, useragent_1.userAgent)(model, target.name);
|
package/dist/cmp/Main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Main.js","sourceRoot":"","sources":["../../src/cmp/Main.ts"],"names":[],"mappings":";;;AAEA,oDAA0C;AAE1C,wCAAwC;AAExC,8CAAgD;AAChD,oDAAgD;AAOhD,MAAM,IAAI,GAAG,IAAA,eAAG,EAAC,SAAS,IAAI,CAAC,KAAU;IACvC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,CAAA;IAC9B,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,IAAI,CAAA;IAE3B,sEAAsE;IACtE,6BAA6B;IAC7B,MAAM,MAAM,GAAG,IAAA,qBAAY,EAAC,IAAI,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"Main.js","sourceRoot":"","sources":["../../src/cmp/Main.ts"],"names":[],"mappings":";;;AAEA,oDAA0C;AAE1C,wCAAwC;AAExC,8CAAgD;AAChD,oDAAgD;AAOhD,MAAM,IAAI,GAAG,IAAA,eAAG,EAAC,SAAS,IAAI,CAAC,KAAU;IACvC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,CAAA;IAC9B,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,IAAI,CAAA;IAE3B,sEAAsE;IACtE,6BAA6B;IAC7B,MAAM,MAAM,GAAG,IAAA,qBAAY,EAAC,IAAI,EAAE,MAAM,CAAC,CAAA;IAEzC,0EAA0E;IAC1E,qEAAqE;IACrE,MAAM,CAAC,gBAAgB,GAAG,IAAA,qBAAS,EAAC,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,CAAA;IAEvD,MAAM,QAAQ,GAAG,IAAA,qBAAW,EAAC,IAAI,EAAE,OAAO,MAAM,CAAC,IAAI,SAAS,MAAM,CAAC,IAAI,EAAE,CAAC,CAAA;IAE5E,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAA;IAE3C,GAAG,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC,CAAA;AAC7E,CAAC,CAAC,CAAA;QAIA,IAAI"}
|
|
@@ -7,6 +7,7 @@ const component_1 = require("../helpers/component");
|
|
|
7
7
|
const types_1 = require("../types");
|
|
8
8
|
const packageMeta_1 = require("../helpers/packageMeta");
|
|
9
9
|
const npm_trust_1 = require("../admin/npm-trust");
|
|
10
|
+
const facts_1 = require("../helpers/facts");
|
|
10
11
|
const PublishWorkflow = (0, component_1.cmp)(function PublishWorkflow(props) {
|
|
11
12
|
const { ctx$ } = props;
|
|
12
13
|
const { model } = ctx$;
|
|
@@ -15,16 +16,10 @@ const PublishWorkflow = (0, component_1.cmp)(function PublishWorkflow(props) {
|
|
|
15
16
|
// npm's OIDC exchange — and a PyPI or RubyGems target needs a different
|
|
16
17
|
// workflow rather than this one with a word changed. Emitting nothing for
|
|
17
18
|
// them is the honest answer until those exist.
|
|
18
|
-
const npmTargets = []
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
if ('npm' === (t.publish?.registry?.name || '') && (0, packageMeta_1.hasPackageName)(model, t.name) &&
|
|
24
|
-
'inactive' !== (0, packageMeta_1.registryState)(model, t.name)) {
|
|
25
|
-
npmTargets.push(t);
|
|
26
|
-
}
|
|
27
|
-
});
|
|
19
|
+
const npmTargets = (0, facts_1.fact)(model.main[types_1.KIT], 'active')
|
|
20
|
+
.map((name) => targetMap[name])
|
|
21
|
+
.filter((t) => 'npm' === (t.publish?.registry?.name || '') && (0, packageMeta_1.hasPackageName)(model, t.name) &&
|
|
22
|
+
'inactive' !== (0, packageMeta_1.registryState)(model, t.name));
|
|
28
23
|
if (0 === npmTargets.length) {
|
|
29
24
|
return;
|
|
30
25
|
}
|
|
@@ -59,19 +54,12 @@ exports.PublishWorkflow = PublishWorkflow;
|
|
|
59
54
|
function workflowFile(target) {
|
|
60
55
|
return `publish-${target.name}.yml`;
|
|
61
56
|
}
|
|
62
|
-
function isPrimaryNpm(model, target, npmTargets) {
|
|
63
|
-
if (1 === npmTargets.length) {
|
|
64
|
-
return true;
|
|
65
|
-
}
|
|
66
|
-
return (0, packageMeta_1.packageName)(model, target.name) === (0, packageMeta_1.packageName)(model, 'npm');
|
|
67
|
-
}
|
|
68
|
-
function releaseTag(model, target, npmTargets) {
|
|
69
|
-
return isPrimaryNpm(model, target, npmTargets) ?
|
|
70
|
-
'v$VERSION' : `${target.name}/v$VERSION`;
|
|
71
|
-
}
|
|
72
57
|
function publishWorkflow(model, target, npmTargets, repository) {
|
|
73
58
|
const name = target.name;
|
|
74
|
-
const
|
|
59
|
+
const dir = (0, facts_1.fact)(target, 'dir');
|
|
60
|
+
const tag = (0, facts_1.fact)(target, 'tag') + '$VERSION';
|
|
61
|
+
const tagged = '' !== (0, facts_1.fact)(target, 'tag');
|
|
62
|
+
const branch = (0, packageMeta_1.releaseBranch)(model);
|
|
75
63
|
const pkg = (0, packageMeta_1.packageName)(model, name);
|
|
76
64
|
const setup = null == repository ? '' : `
|
|
77
65
|
# .sdk/admin/setup-npm-trust.sh registers exactly this, and with --check
|
|
@@ -79,7 +67,7 @@ function publishWorkflow(model, target, npmTargets, repository) {
|
|
|
79
67
|
#`;
|
|
80
68
|
return `# Generated by @voxgig/sdkgen. Do not edit.
|
|
81
69
|
#
|
|
82
|
-
# Publishes ${pkg} (the \`${
|
|
70
|
+
# Publishes ${pkg} (the \`${dir}/\` target) to npm, via GitHub OIDC Trusted
|
|
83
71
|
# Publishing — no NPM_TOKEN. npm exchanges a short-lived OIDC token minted
|
|
84
72
|
# for THIS job in THIS repository for a publish credential, and attaches SLSA
|
|
85
73
|
# provenance automatically.
|
|
@@ -96,12 +84,13 @@ function publishWorkflow(model, target, npmTargets, repository) {
|
|
|
96
84
|
#
|
|
97
85
|
${'active' === (0, packageMeta_1.registryState)(model, name) ? `# BY DISPATCH, deliberately. The deploy Makefile publishes with a
|
|
98
86
|
# vault-injected token; a tag-triggered workflow racing it would publish one
|
|
99
|
-
# version by two mechanisms.` : `# BY DISPATCH, deliberately. While the registry is pending, the deploy
|
|
87
|
+
# version by two mechanisms.` : tagged ? `# BY DISPATCH, deliberately. While the registry is pending, the deploy
|
|
100
88
|
# Makefile only cuts the git tag, and a tag-triggered workflow would turn
|
|
101
|
-
# every tag it cuts into a publish.`
|
|
89
|
+
# every tag it cuts into a publish.` : `# BY DISPATCH, deliberately. While the registry is pending, the deploy
|
|
90
|
+
# Makefile publishes nothing.`} Releasing is an act someone performs and
|
|
102
91
|
# watches.
|
|
103
92
|
#
|
|
104
|
-
# THREE JOBS, BECAUSE THEY NEED DIFFERENT PRIVILEGES. A dependency lifecycle
|
|
93
|
+
# ${tagged ? 'THREE' : 'TWO'} JOBS, BECAUSE THEY NEED DIFFERENT PRIVILEGES. A dependency lifecycle
|
|
105
94
|
# script can ask the runner for any OIDC token its job is permitted to mint,
|
|
106
95
|
# so a job that both installs dependencies and holds \`id-token: write\` can be
|
|
107
96
|
# made to publish before its own gates finish. The same reasoning keeps
|
|
@@ -110,7 +99,7 @@ ${'active' === (0, packageMeta_1.registryState)(model, name) ? `# BY DISPATCH, d
|
|
|
110
99
|
#
|
|
111
100
|
# verify contents: read, nothing else. Installs, builds and tests.
|
|
112
101
|
# publish id-token: write. Installs no dependencies and runs no project
|
|
113
|
-
# code; it packs what is already in the tree
|
|
102
|
+
# code; it packs what is already in the tree.${tagged ? `
|
|
114
103
|
# tag contents: write. Runs git and nothing else.
|
|
115
104
|
#
|
|
116
105
|
# THE TAG IS CUT HERE BECAUSE IT CANNOT BE CUT ANYWHERE ELSE. npm binds the
|
|
@@ -119,7 +108,11 @@ ${'active' === (0, packageMeta_1.registryState)(model, name) ? `# BY DISPATCH, d
|
|
|
119
108
|
# workflow run, so "tag, and let a tag-triggered publisher fire" does not
|
|
120
109
|
# work. A release that publishes but leaves no ref cannot be answered later:
|
|
121
110
|
# nothing in git says which tree the tarball came from, and nothing
|
|
122
|
-
# downstream can pin this SDK by tag
|
|
111
|
+
# downstream can pin this SDK by tag.` : `
|
|
112
|
+
#
|
|
113
|
+
# NO TAG IS CUT. The model switches this target's release tag off
|
|
114
|
+
# (publish.tag.active is false), so nothing in git names the tree a
|
|
115
|
+
# version was published from.`}
|
|
123
116
|
|
|
124
117
|
name: publish-${name}
|
|
125
118
|
|
|
@@ -127,7 +120,7 @@ on:
|
|
|
127
120
|
workflow_dispatch:
|
|
128
121
|
inputs:
|
|
129
122
|
expect_sha:
|
|
130
|
-
description: 'Optional: refuse unless
|
|
123
|
+
description: 'Optional: refuse unless ${branch} is still at this commit'
|
|
131
124
|
type: string
|
|
132
125
|
default: ''
|
|
133
126
|
|
|
@@ -151,40 +144,40 @@ jobs:
|
|
|
151
144
|
with:
|
|
152
145
|
node-version: 24.x
|
|
153
146
|
|
|
154
|
-
# RELEASES COME FROM
|
|
147
|
+
# RELEASES COME FROM ${branch}, INCLUDING FROM THE BUTTON. workflow_dispatch
|
|
155
148
|
# accepts any ref, so without this the Actions UI can release a branch.
|
|
156
|
-
- name: This ref is
|
|
149
|
+
- name: This ref is ${branch}, and is where the caller thinks it is
|
|
157
150
|
env:
|
|
158
151
|
EXPECT: \${{ inputs.expect_sha }}
|
|
159
152
|
run: |
|
|
160
153
|
set -euo pipefail
|
|
161
|
-
if [ "\${GITHUB_REF_NAME}" != "
|
|
162
|
-
echo "::error::releases come from
|
|
154
|
+
if [ "\${GITHUB_REF_NAME}" != "${branch}" ]; then
|
|
155
|
+
echo "::error::releases come from ${branch}, not \${GITHUB_REF_NAME}"
|
|
163
156
|
exit 1
|
|
164
157
|
fi
|
|
165
158
|
if [ -n "\$EXPECT" ] && [ "\$EXPECT" != "\$GITHUB_SHA" ]; then
|
|
166
|
-
echo "::error
|
|
159
|
+
echo "::error::${branch} is at \$GITHUB_SHA, not \$EXPECT"
|
|
167
160
|
exit 1
|
|
168
161
|
fi
|
|
169
162
|
|
|
170
163
|
- name: Resolve the version
|
|
171
164
|
id: version
|
|
172
|
-
working-directory: ${
|
|
165
|
+
working-directory: ${dir}
|
|
173
166
|
run: |
|
|
174
167
|
set -euo pipefail
|
|
175
168
|
VERSION="\$(node -p "require('./package.json').version")"
|
|
176
|
-
test -n "\$VERSION" || { echo "::error::no version in ${
|
|
169
|
+
test -n "\$VERSION" || { echo "::error::no version in ${dir}/package.json"; exit 1; }
|
|
177
170
|
echo "version=\$VERSION" >> "\$GITHUB_OUTPUT"
|
|
178
171
|
echo "${pkg} \$VERSION"
|
|
179
172
|
|
|
180
173
|
- run: npm install
|
|
181
|
-
working-directory: ${
|
|
174
|
+
working-directory: ${dir}
|
|
182
175
|
|
|
183
176
|
- run: npm run build
|
|
184
|
-
working-directory: ${
|
|
177
|
+
working-directory: ${dir}
|
|
185
178
|
|
|
186
179
|
- run: npm test
|
|
187
|
-
working-directory: ${
|
|
180
|
+
working-directory: ${dir}
|
|
188
181
|
|
|
189
182
|
publish:
|
|
190
183
|
name: npm publish
|
|
@@ -229,9 +222,13 @@ jobs:
|
|
|
229
222
|
|
|
230
223
|
- name: Publish to npm
|
|
231
224
|
if: steps.registry.outputs.published == 'false'
|
|
232
|
-
working-directory: ${
|
|
225
|
+
working-directory: ${dir}
|
|
233
226
|
run: npm publish --access public
|
|
234
|
-
|
|
227
|
+
` + (tagged ? tagJob(tag) : '');
|
|
228
|
+
}
|
|
229
|
+
// The job that cuts the release tag, once the package is published.
|
|
230
|
+
function tagJob(tag) {
|
|
231
|
+
return `
|
|
235
232
|
# Runs git and nothing else. No install, no project code — so the
|
|
236
233
|
# repository-write credential is never in scope while third-party code runs.
|
|
237
234
|
#
|
|
@@ -283,6 +280,7 @@ jobs:
|
|
|
283
280
|
`;
|
|
284
281
|
}
|
|
285
282
|
function publishingDoc(model, targets, repository) {
|
|
283
|
+
const branch = (0, packageMeta_1.releaseBranch)(model);
|
|
286
284
|
const pkg = (0, packageMeta_1.packageName)(model, targets[0].name);
|
|
287
285
|
const first = workflowFile(targets[0]);
|
|
288
286
|
const setupHow = null == repository ? 'run:' :
|
|
@@ -302,9 +300,11 @@ An npm with no \`npm trust\` command is bypassed for \`npx npm@latest\`.
|
|
|
302
300
|
// WHICH TAG EACH TARGET CUTS. Worth a table rather than a sentence: the
|
|
303
301
|
// primary npm target owns the bare `v<version>` and every other one is
|
|
304
302
|
// prefixed, so with more than one npm target the answer differs per row.
|
|
305
|
-
const tagRows = '| target | tag |\n|---|---|\n' + targets.map((t) => `| \`${t.name}/\` |
|
|
306
|
-
|
|
307
|
-
'
|
|
303
|
+
const tagRows = '| target | tag |\n|---|---|\n' + targets.map((t) => `| \`${t.name}/\` | ` +
|
|
304
|
+
('' === (0, facts_1.fact)(t, 'tag') ? 'none' : '`' + (0, facts_1.fact)(t, 'tag') + '<version>`') +
|
|
305
|
+
' |').join('\n');
|
|
306
|
+
const untagged = targets.filter((t) => '' === (0, facts_1.fact)(t, 'tag')).length;
|
|
307
|
+
const tagged = untagged < targets.length;
|
|
308
308
|
return `# Publishing
|
|
309
309
|
|
|
310
310
|
GENERATED by @voxgig/sdkgen — regenerated on every \`npm run generate\`.
|
|
@@ -330,24 +330,27 @@ publish credential, and attaches SLSA provenance as it goes.
|
|
|
330
330
|
|
|
331
331
|
main: kit: target: ${targets[0].name}: publish: version: '<x.y.z>'
|
|
332
332
|
|
|
333
|
-
2. Commit and push to
|
|
333
|
+
2. Commit and push to \`${branch}\`, and let CI go green.
|
|
334
334
|
3. Run the workflow from the Actions tab, or:
|
|
335
335
|
|
|
336
|
-
gh workflow run ${first} --ref
|
|
336
|
+
gh workflow run ${first} --ref ${branch} -f expect_sha=$(git rev-parse HEAD)
|
|
337
337
|
|
|
338
|
-
\`expect_sha\` is optional and worth using: it refuses if \`
|
|
338
|
+
\`expect_sha\` is optional and worth using: it refuses if \`${branch}\` moved between
|
|
339
339
|
the commit you checked and the run resolving.
|
|
340
340
|
|
|
341
341
|
${dispatchReason(model, targets)}
|
|
342
342
|
|
|
343
|
-
|
|
343
|
+
${tagged ? `## The release is tagged for you
|
|
344
344
|
|
|
345
345
|
The workflow cuts the git tag itself, after a successful publish, so a
|
|
346
346
|
released version always has a ref naming the tree it came from. Nothing to
|
|
347
347
|
do by hand.
|
|
348
348
|
|
|
349
349
|
${tagRows}
|
|
350
|
-
|
|
350
|
+
${0 < untagged ? `
|
|
351
|
+
A target whose tag reads none cuts no tag: its model sets
|
|
352
|
+
\`publish.tag.active: false\`, so its workflow has no tag job.
|
|
353
|
+
` : ''}
|
|
351
354
|
Re-dispatching a version that is already on the registry skips the publish
|
|
352
355
|
and still cuts a missing tag, so a partial release is finished by running it
|
|
353
356
|
again rather than repaired by hand. If the tag already exists on a DIFFERENT
|
|
@@ -358,7 +361,13 @@ which is wrong.
|
|
|
358
361
|
The tag job is the only one that may write to the repository, and it runs
|
|
359
362
|
git and nothing else. \`contents: write\` never shares a job with project
|
|
360
363
|
code, for the same reason \`id-token: write\` does not — \`checkout\` persists
|
|
361
|
-
its token into the git config for the whole job
|
|
364
|
+
its token into the git config for the whole job.` : `## No release tag
|
|
365
|
+
|
|
366
|
+
The model switches the release tag off (\`publish.tag.active: false\`), so
|
|
367
|
+
the workflow publishes without cutting a git tag, and nothing in git names
|
|
368
|
+
the tree a version came from.
|
|
369
|
+
|
|
370
|
+
${tagRows}`}
|
|
362
371
|
|
|
363
372
|
## One-time set-up
|
|
364
373
|
|
|
@@ -381,11 +390,11 @@ ${setupCheck}
|
|
|
381
390
|
trusted-publisher settings once a version exists, so the FIRST release of a
|
|
382
391
|
package goes out by hand from an authenticated machine:
|
|
383
392
|
|
|
384
|
-
cd
|
|
393
|
+
${'.' === (0, facts_1.fact)(targets[0], 'dir') ? '' : 'cd ' + (0, facts_1.fact)(targets[0], 'dir') + ' && '}npm publish --access public
|
|
385
394
|
|
|
386
395
|
After that, register the publisher and every later release is a dispatch.
|
|
387
396
|
|
|
388
|
-
## Why the workflow has three jobs
|
|
397
|
+
## Why the workflow has ${tagged ? 'three' : 'two'} jobs
|
|
389
398
|
|
|
390
399
|
A dependency lifecycle script can ask the runner for any OIDC token the job
|
|
391
400
|
it runs in is permitted to mint. A job that both installs dependencies and
|
|
@@ -393,14 +402,15 @@ holds \`id-token: write\` can therefore be made to publish as this package
|
|
|
393
402
|
before its own gates finish.
|
|
394
403
|
|
|
395
404
|
So \`verify\` installs, builds and tests under \`contents: read\` and holds no
|
|
396
|
-
credential
|
|
405
|
+
credential${tagged ? `; \`publish\` holds \`id-token: write\` while installing nothing and
|
|
397
406
|
running no project code; and \`tag\` holds \`contents: write\` while running
|
|
398
407
|
git and nothing else.
|
|
399
408
|
|
|
400
409
|
The tag cannot be moved out into its own workflow: npm binds the trusted
|
|
401
410
|
publisher to ONE workflow filename, so anything that must accompany a publish
|
|
402
411
|
has to live inside this file. Nor can it be left to a tag-triggered
|
|
403
|
-
publisher — a ref pushed with \`GITHUB_TOKEN\` starts no further workflow run
|
|
412
|
+
publisher — a ref pushed with \`GITHUB_TOKEN\` starts no further workflow run.` : `, and \`publish\` holds \`id-token: write\` while installing nothing and
|
|
413
|
+
running no project code.`}
|
|
404
414
|
`;
|
|
405
415
|
}
|
|
406
416
|
// The root Makefile publishes an active registry and only tags a pending one,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PublishWorkflow.js","sourceRoot":"","sources":["../../src/cmp/PublishWorkflow.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;AAErD,
|
|
1
|
+
{"version":3,"file":"PublishWorkflow.js","sourceRoot":"","sources":["../../src/cmp/PublishWorkflow.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;AAErD,uCAAgD;AAChD,oDAA0C;AAE1C,oCAGiB;AAEjB,wDAA4H;AAE5H,kDAAmD;AACnD,4CAAuC;AAGvC,MAAM,eAAe,GAAG,IAAA,eAAG,EAAC,SAAS,eAAe,CAAC,KAAU;IAC7D,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,CAAA;IACtB,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAA;IAEtB,MAAM,SAAS,GAAG,IAAA,oBAAY,EAAC,KAAK,EAAE,QAAQ,WAAG,SAAS,CAAC,IAAI,EAAE,CAAA;IAEjE,uEAAuE;IACvE,wEAAwE;IACxE,0EAA0E;IAC1E,+CAA+C;IAC/C,MAAM,UAAU,GAAU,IAAA,YAAI,EAAC,KAAK,CAAC,IAAI,CAAC,WAAG,CAAC,EAAE,QAAQ,CAAC;SACtD,GAAG,CAAC,CAAC,IAAY,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;SACtC,MAAM,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,IAAI,EAAE,CAAC,IAAI,IAAA,4BAAc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,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,IAAA,2BAAa,EAAC,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAA;IACpE,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAA;IACxC,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAS,EAAE,EAAE,CAAC,QAAQ,KAAK,CAAC,CAAC,CAAA;IAC1D,IAAI,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC;QACvB,OAAO,4EAA4E;YACjF,8EAA8E;YAC9E,8CAA8C,CAAA;IAClD,CAAC;IACD,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO,+EAA+E;YACpF,6EAA6E;YAC7E,wCAAwC,CAAA;IAC5C,CAAC;IACD,OAAO,4EAA4E;QACjF,sEAAsE;QACtE,qEAAqE;QACrE,2EAA2E;QAC3E,yEAAyE;QACzE,UAAU,CAAA;AACd,CAAC"}
|
package/dist/cmp/ReadmeIntro.js
CHANGED
|
@@ -21,7 +21,7 @@ const ReadmeIntro = (0, component_1.cmp)(function ReadmeIntro(props) {
|
|
|
21
21
|
intro.ReadmeIntro({ target });
|
|
22
22
|
return;
|
|
23
23
|
}
|
|
24
|
-
(0, jostraca_1.Content)(`# ${model.Name} ${target
|
|
24
|
+
(0, jostraca_1.Content)(`# ${model.Name} ${(0, facts_1.fact)(target, 'title')} SDK
|
|
25
25
|
|
|
26
26
|
${(0, facts_1.fact)(model.main[types_1.KIT], 'text').tagline.inline}
|
|
27
27
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReadmeIntro.js","sourceRoot":"","sources":["../../src/cmp/ReadmeIntro.ts"],"names":[],"mappings":";;;AACA,uCAAkC;AAElC,oDAA0C;AAC1C,kDAAuD;AACvD,4CAAuC;AACvC,oCAA8B;AAC9B,oDAAoD;AAGpD,uEAAuE;AACvE,8EAA8E;AAC9E,+EAA+E;AAC/E,2EA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,KAAK,KAAK,CAAC,IAAI,IAAI,IAAA,YAAI,EAAC,MAAM,EAAE,OAAO,CAAC;;EAEhD,IAAA,YAAI,EAAC,KAAK,CAAC,IAAI,CAAC,WAAG,CAAC,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,MAAM;;CAE7C,CAAC,CAAA;IACA,KAAK,CAAC,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC,CAAA;IACjC,IAAA,kBAAO,EAAC,IAAA,yBAAa,EAAC,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAA;AAC5C,CAAC,CAAC,CAAA;QAIA,WAAW"}
|
package/dist/cmp/ReadmeModel.js
CHANGED
|
@@ -4,7 +4,7 @@ exports.ReadmeModel = void 0;
|
|
|
4
4
|
const jostraca_1 = require("jostraca");
|
|
5
5
|
const component_1 = require("../helpers/component");
|
|
6
6
|
const types_1 = require("../types");
|
|
7
|
-
const
|
|
7
|
+
const facts_1 = require("../helpers/facts");
|
|
8
8
|
const optional_1 = require("../helpers/optional");
|
|
9
9
|
const ReadmeModel = (0, component_1.cmp)(function ReadmeModel(props) {
|
|
10
10
|
const { target, ctx$ } = props;
|
|
@@ -26,7 +26,7 @@ const ReadmeModel = (0, component_1.cmp)(function ReadmeModel(props) {
|
|
|
26
26
|
}
|
|
27
27
|
else {
|
|
28
28
|
// Fallback: generic reference summary
|
|
29
|
-
ReadmeModelGeneric({ target, model, entityList, authActive: (0,
|
|
29
|
+
ReadmeModelGeneric({ target, model, entityList, authActive: (0, facts_1.fact)(model.main[types_1.KIT], 'auth').apikey });
|
|
30
30
|
}
|
|
31
31
|
});
|
|
32
32
|
exports.ReadmeModel = ReadmeModel;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReadmeModel.js","sourceRoot":"","sources":["../../src/cmp/ReadmeModel.ts"],"names":[],"mappings":";;;AACA,uCAA+C;AAC/C,oDAA0C;AAE1C,oCAGiB;AAEjB,
|
|
1
|
+
{"version":3,"file":"Re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AkB,GAAG,IAAA,eAAG,EAAC,SAAS,kBAAkB,CAAC,KAAU;IACnE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,GAAG,KAAK,CAAA;IACvD,MAAM,SAAS,GAAG,UAAU;QAC1B,CAAC,CAAC,yDAAyD;QAC3D,CAAC,CAAC,EAAE,CAAA;IAEN,IAAA,kBAAO,EAAC,OAAO,KAAK,CAAC,IAAI;;;;;;EAMzB,SAAS;;;;;;;;;;CAUV,CAAC,CAAA;IAEA,IAAA,eAAI,EAAC,UAAU,EAAE,CAAC,GAAQ,EAAE,EAAE;QAC5B,MAAM,OAAO,GAAG,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAA;QACvD,IAAA,kBAAO,EAAC,OAAO,GAAG,CAAC,IAAI,iBAAiB,GAAG,CAAC,IAAI,qBAAqB,OAAO,IAAI,GAAG,CAAC,IAAI;CAC3F,CAAC,CAAA;IACA,CAAC,CAAC,CAAA;IAEF,IAAA,kBAAO,EAAC;;;;wCAI8B,KAAK,CAAC,IAAI;;;;;;MAM5C,KAAK,CAAC,IAAI,uCAAuC,KAAK,CAAC,IAAI;;;;;;;;;;;;;;;;;;;;CAoBhE,CAAC,CAAA;AACF,CAAC,CAAC,CAAA"}
|
|
@@ -6,7 +6,7 @@ const component_1 = require("../helpers/component");
|
|
|
6
6
|
const packageMeta_1 = require("../helpers/packageMeta");
|
|
7
7
|
const applicability_1 = require("../helpers/applicability");
|
|
8
8
|
const facts_1 = require("../helpers/facts");
|
|
9
|
-
const
|
|
9
|
+
const types_1 = require("../types");
|
|
10
10
|
// Targets where station.connect(SDK) is the idiomatic binding; everything
|
|
11
11
|
// else uses inverted binding through the SDK's own constructor.
|
|
12
12
|
const CONNECT_TARGETS = ['ts', 'js', 'py', 'rb', 'php', 'lua', 'perl'];
|
|
@@ -24,7 +24,7 @@ const ReadmeStation = (0, component_1.cmp)(function ReadmeStation(props) {
|
|
|
24
24
|
// main.slug in the embedded config); an untagged instance ref IS the
|
|
25
25
|
// slug, so this is also the default instance name.
|
|
26
26
|
const slug = model.name;
|
|
27
|
-
const env = (0,
|
|
27
|
+
const env = (0, facts_1.fact)(model.main[types_1.KIT], 'env').prefix;
|
|
28
28
|
const secretbase = env.toLowerCase();
|
|
29
29
|
const secretname = secretbase + '.apikey';
|
|
30
30
|
const origin = (0, packageMeta_1.originName)(model, target.name);
|
|
@@ -76,7 +76,7 @@ SDK features are configured in the same file too: fleet-wide, per api,
|
|
|
76
76
|
or per instance. \`station.check()\` resolves and constructs every
|
|
77
77
|
active instance without sending a request — run it in CI.
|
|
78
78
|
|
|
79
|
-
${(0,
|
|
79
|
+
${(0, facts_1.fact)(model.main[types_1.KIT], 'auth').apikey ? `### The secret name derives from the instance
|
|
80
80
|
|
|
81
81
|
The credential comes from [sekreto](https://github.com/voxgig/sekreto)
|
|
82
82
|
under a name derived from the **instance** name — the instance token
|
|
@@ -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,wDAAgE;AAChE,4DAAyD;AACzD,4CAAuC;AACvC,oCAA8B;AAG9B,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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