@voxgig/sdkgen 4.45.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 +73 -4
- 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 +26 -2
- package/dist/action/doctor.js +208 -11
- package/dist/action/doctor.js.map +1 -1
- package/dist/action/package.d.ts +1 -1
- package/dist/action/package.js +15 -16
- package/dist/action/package.js.map +1 -1
- package/dist/action/remove.js +16 -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/action/target.d.ts +2 -1
- package/dist/action/target.js +50 -11
- package/dist/action/target.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 +46 -23
- package/dist/cmp/AgentGuide.js.map +1 -1
- package/dist/cmp/AgentGuideContent.d.ts +9 -7
- package/dist/cmp/AgentGuideContent.js +73 -43
- package/dist/cmp/AgentGuideContent.js.map +1 -1
- package/dist/cmp/AgentGuideFeature.js +19 -9
- package/dist/cmp/AgentGuideFeature.js.map +1 -1
- package/dist/cmp/AgentGuideTop.js +95 -49
- package/dist/cmp/AgentGuideTop.js.map +1 -1
- package/dist/cmp/Changelog.js +45 -4
- package/dist/cmp/Changelog.js.map +1 -1
- package/dist/cmp/Deploy.js +73 -35
- 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 +10 -5
- package/dist/cmp/ExternalTarget.js.map +1 -1
- package/dist/cmp/Feature.js +12 -5
- 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/Main.js +1 -1
- package/dist/cmp/Main.js.map +1 -1
- package/dist/cmp/PublishWorkflow.js +89 -55
- 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 +4 -3
- 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/ReadmeRefFeatures.js +34 -24
- package/dist/cmp/ReadmeRefFeatures.js.map +1 -1
- package/dist/cmp/ReadmeStation.js +12 -9
- package/dist/cmp/ReadmeStation.js.map +1 -1
- package/dist/cmp/ReadmeTop.js +479 -382
- 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/Registered.js +1 -1
- package/dist/cmp/Registered.js.map +1 -1
- package/dist/cmp/Security.js +26 -5
- 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 +3 -1
- package/dist/helpers/applicability.js +40 -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/copymerge.d.ts +3 -0
- package/dist/helpers/copymerge.js +43 -10
- package/dist/helpers/copymerge.js.map +1 -1
- package/dist/helpers/definitionPlan.js +0 -1
- package/dist/helpers/definitionPlan.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 +85 -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 +210 -5
- 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/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 +29 -17
- package/dist/helpers/opShape.js.map +1 -1
- package/dist/helpers/packageMeta.d.ts +6 -4
- package/dist/helpers/packageMeta.js +88 -53
- 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 +3 -1
- package/dist/helpers/semver.js +28 -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 +72 -63
- package/dist/sdkgen.js.map +1 -1
- package/dist/testkit.d.ts +7 -2
- package/dist/testkit.js +27 -20
- 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 +150 -0
- package/model/sdkgen.aontu +15 -3
- package/package.json +3 -1
- package/project/.sdk/src/cmp/c/ReadmeQuick_c.ts +2 -2
- 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/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/scala/ReadmeRef_scala.ts +4 -1
- package/project/.sdk/src/cmp/swift/ReadmeQuick_swift.ts +2 -1
- 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/ts/ReadmeQuick_ts.ts +1 -1
- package/project/.sdk/src/cmp/ts/TestDefinition_ts.ts +3 -1
- package/project/.sdk/src/cmp/zig/ReadmeOptions_zig.ts +1 -1
- package/project/.sdk/src/cmp/zig/ReadmeQuick_zig.ts +3 -3
- package/project/.sdk/src/cmp/zig/ReadmeTopQuick_zig.ts +2 -2
- 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 +99 -4
- package/src/action/copies.ts +2 -0
- package/src/action/doctor.ts +304 -15
- package/src/action/package.ts +11 -13
- package/src/action/remove.ts +20 -5
- package/src/action/resolve.ts +11 -4
- package/src/action/target.ts +66 -15
- package/src/admin/status.ts +25 -5
- package/src/cmp/AgentGuide.ts +52 -25
- package/src/cmp/AgentGuideContent.ts +75 -43
- package/src/cmp/AgentGuideFeature.ts +21 -10
- package/src/cmp/AgentGuideTop.ts +119 -49
- package/src/cmp/Changelog.ts +56 -5
- package/src/cmp/Deploy.ts +81 -40
- package/src/cmp/Entity.ts +1 -1
- package/src/cmp/ExternalTarget.ts +12 -6
- package/src/cmp/Feature.ts +13 -6
- package/src/cmp/FeatureDocs.ts +21 -40
- package/src/cmp/FeatureHook.ts +38 -1
- package/src/cmp/Main.ts +1 -1
- package/src/cmp/PublishWorkflow.ts +94 -60
- 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 +4 -3
- package/src/cmp/ReadmeModel.ts +2 -2
- package/src/cmp/ReadmeRefFeatures.ts +39 -27
- package/src/cmp/ReadmeStation.ts +13 -16
- package/src/cmp/ReadmeTop.ts +538 -397
- package/src/cmp/ReadmeUnions.ts +10 -2
- package/src/cmp/Registered.ts +1 -1
- package/src/cmp/Security.ts +35 -7
- package/src/cmp/Test.ts +1 -1
- package/src/helpers/alongside.ts +16 -19
- package/src/helpers/applicability.ts +44 -1
- package/src/helpers/component.ts +11 -1
- package/src/helpers/copymerge.ts +58 -10
- package/src/helpers/definitionPlan.ts +0 -1
- package/src/helpers/doccheck.ts +174 -0
- package/src/helpers/doctext.ts +115 -0
- package/src/helpers/exampleCall.ts +415 -0
- package/src/helpers/exportnames.ts +47 -0
- package/src/helpers/facts.ts +259 -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/modelcheck.ts +16 -0
- package/src/helpers/opExample.ts +34 -2
- package/src/helpers/opShape.ts +29 -16
- package/src/helpers/packageMeta.ts +89 -52
- package/src/helpers/placement.ts +114 -0
- package/src/helpers/semver.ts +35 -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 +82 -78
- package/src/testkit.ts +42 -20
- package/src/utility.ts +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExternalTarget.js","sourceRoot":"","sources":["../../src/cmp/ExternalTarget.ts"],"names":[],"mappings":";;;AACA,uCAAsC;AACtC,oDAA0C;AAE1C,uCAAkC;AAElC,2CAAoC;AAEpC,iCAA6B;AAC7B,qCAAiC;AACjC,uCAAmC;AACnC,qCAAiC;AACjC,iCAA6B;AAC7B,6CAAyC;AAGzC,MAAM,cAAc,GAAG,IAAA,eAAG,EAAC,SAAS,cAAc,CAAC,KAAU;IAC3D,MAAM,EAAE,KA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WAAW,CAAC,SAAS,CAAC,EAAE,CAAC;YAC3B,IAAA,eAAI,EAAC,OAAO,CAAC;iBACV,MAAM,CAAC,CAAC,OAAY,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC;iBACxC,GAAG,CAAC,CAAC,OAAY,EAAE,EAAE;gBACpB,IAAA,gBAAK,EAAC,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,CAAA;gBAC5B,IAAA,iBAAO,EAAC,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAA;YAC9B,CAAC,CAAC,CAAA;QACN,CAAC;QAED,IAAA,WAAI,EAAC,EAAE,MAAM,EAAE,CAAC,CAAA;QAEhB,IAAI,WAAW,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC1B,IAAA,eAAM,EAAC,EAAE,MAAM,EAAE,CAAC,CAAA;QACpB,CAAC;QAED,IAAI,WAAW,CAAC,YAAY,CAAC,EAAE,CAAC;YAC9B,IAAA,uBAAU,EAAC,EAAE,MAAM,EAAE,CAAC,CAAA;QACxB,CAAC;QAED,IAAI,WAAW,CAAC,MAAM,CAAC,EAAE,CAAC;YACxB,IAAA,WAAI,EAAC,EAAE,MAAM,EAAE,CAAC,CAAA;QAClB,CAAC;IACH,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA;QAIA,cAAc"}
|
package/dist/cmp/Feature.js
CHANGED
|
@@ -6,6 +6,8 @@ const component_1 = require("../helpers/component");
|
|
|
6
6
|
const stdrep_1 = require("../helpers/stdrep");
|
|
7
7
|
const applicability_1 = require("../helpers/applicability");
|
|
8
8
|
const featureSource_1 = require("../helpers/featureSource");
|
|
9
|
+
const packageMeta_1 = require("../helpers/packageMeta");
|
|
10
|
+
const resolve_1 = require("../action/resolve");
|
|
9
11
|
const Feature = (0, component_1.cmp)(function Feature(props) {
|
|
10
12
|
const { target, feature, ctx$ } = props;
|
|
11
13
|
const { log } = ctx$;
|
|
@@ -15,13 +17,18 @@ const Feature = (0, component_1.cmp)(function Feature(props) {
|
|
|
15
17
|
// missing template folder and abort the whole run, taking every other
|
|
16
18
|
// target with it. See helpers/applicability and docs/design/feature-tags.
|
|
17
19
|
if (!(0, applicability_1.featureApplies)(feature, target)) {
|
|
18
|
-
const provided = (0, applicability_1.
|
|
20
|
+
const provided = (0, applicability_1.providedBy)(target);
|
|
19
21
|
const unmet = (0, applicability_1.featureTags)(feature.needs).filter((n) => !provided.includes(n));
|
|
20
|
-
|
|
22
|
+
const origin = (0, packageMeta_1.originName)(ctx$.model, target.name);
|
|
23
|
+
const stale = (0, resolve_1.resolvesBundled)(target, target.name) &&
|
|
24
|
+
unmet.every((n) => (0, applicability_1.shippedProvides)(origin).includes(n));
|
|
25
|
+
log.warn({
|
|
21
26
|
point: 'feature-not-applicable', target: target.name, feature: feature.name,
|
|
22
27
|
needs: feature.needs, provides: target.provides, unmet,
|
|
23
|
-
note: feature.name + '
|
|
24
|
-
' does not provide ' + unmet.join(', ')
|
|
28
|
+
note: feature.name + ' is active but not generated for ' + target.name +
|
|
29
|
+
', which does not provide ' + unmet.join(', ') + (stale ? '; the installed ' +
|
|
30
|
+
origin + ' target does: `voxgig-sdkgen package update @voxgig/sdkgen --no-fetch`' +
|
|
31
|
+
' or `voxgig-sdkgen target add ' + target.name + '` refreshes the copy' : ''),
|
|
25
32
|
});
|
|
26
33
|
return;
|
|
27
34
|
}
|
|
@@ -34,7 +41,7 @@ const Feature = (0, component_1.cmp)(function Feature(props) {
|
|
|
34
41
|
// files, because this Copy has already written them.
|
|
35
42
|
exclude: (0, featureSource_1.pluginExcludesFor)(ctx$.model, feature.name),
|
|
36
43
|
replace: {
|
|
37
|
-
...(0, stdrep_1.ensureStdrep)(ctx
|
|
44
|
+
...(0, stdrep_1.ensureStdrep)(ctx$, target),
|
|
38
45
|
FEATURE_VERSION: feature.version,
|
|
39
46
|
FEATURE_Name: feature.Name,
|
|
40
47
|
}
|
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,IAAA,+BAAe,EAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA;QAEzD,GAAG,CAAC,IAAI,CAAC;YACP,KAAK,E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AAI;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"}
|
|
@@ -2,20 +2,22 @@ type FeatureDoc = {
|
|
|
2
2
|
name: string;
|
|
3
3
|
Name: string;
|
|
4
4
|
title: string;
|
|
5
|
+
titleCell: string;
|
|
5
6
|
transport: string;
|
|
6
7
|
wraps: boolean;
|
|
8
|
+
on: boolean;
|
|
9
|
+
hooks: string[];
|
|
7
10
|
options: Array<{
|
|
8
11
|
name: string;
|
|
9
|
-
|
|
12
|
+
code: string;
|
|
10
13
|
}>;
|
|
11
14
|
extras: Array<{
|
|
12
15
|
name: string;
|
|
13
16
|
type: string;
|
|
14
17
|
}>;
|
|
15
18
|
};
|
|
16
|
-
declare function sentinelName(v: any): string;
|
|
17
|
-
declare function renderValue(v: any): string;
|
|
18
19
|
declare function featureDocs(model: any, target?: any): FeatureDoc[];
|
|
20
|
+
declare function codeList(names: string[]): string;
|
|
19
21
|
declare function honoursActivationOrder(target: any): boolean;
|
|
20
|
-
export { featureDocs,
|
|
22
|
+
export { featureDocs, codeList, honoursActivationOrder, };
|
|
21
23
|
export type { FeatureDoc };
|
package/dist/cmp/FeatureDocs.js
CHANGED
|
@@ -1,49 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.featureDocs = featureDocs;
|
|
4
|
-
exports.
|
|
5
|
-
exports.sentinelName = sentinelName;
|
|
4
|
+
exports.codeList = codeList;
|
|
6
5
|
exports.honoursActivationOrder = honoursActivationOrder;
|
|
7
6
|
const applicability_1 = require("../helpers/applicability");
|
|
7
|
+
const facts_1 = require("../helpers/facts");
|
|
8
8
|
const jostraca_1 = require("jostraca");
|
|
9
9
|
const types_1 = require("../types");
|
|
10
10
|
function isWrapping(feat) {
|
|
11
11
|
return 'wrap' === feat.transport;
|
|
12
12
|
}
|
|
13
|
-
// A struct.validate sentinel as a reader's word for it: '`$FUNCTION`' ->
|
|
14
|
-
// 'function'. A union renders its members, so netsim's latency reads
|
|
15
|
-
// 'number | map'. Anything unrecognised renders verbatim rather than being
|
|
16
|
-
// dropped — a doc table that silently omits an option is the failure this
|
|
17
|
-
// whole path exists to fix.
|
|
18
|
-
function sentinelName(v) {
|
|
19
|
-
if (Array.isArray(v)) {
|
|
20
|
-
const members = v.slice(1).map((m) => sentinelName(m))
|
|
21
|
-
.filter((m) => 'one' !== m);
|
|
22
|
-
return 0 === members.length ? 'any' : members.join(' | ');
|
|
23
|
-
}
|
|
24
|
-
if ('string' !== typeof v) {
|
|
25
|
-
return 'any';
|
|
26
|
-
}
|
|
27
|
-
const bare = v.replace(/[`$]/g, '').trim().toLowerCase();
|
|
28
|
-
return '' === bare ? 'any' : bare;
|
|
29
|
-
}
|
|
30
|
-
function renderValue(v) {
|
|
31
|
-
if (null == v) {
|
|
32
|
-
return '';
|
|
33
|
-
}
|
|
34
|
-
if (Array.isArray(v)) {
|
|
35
|
-
return '[' + v.map((x) => renderValue(x)).join(', ') + ']';
|
|
36
|
-
}
|
|
37
|
-
if ('object' === typeof v) {
|
|
38
|
-
const keys = Object.keys(v);
|
|
39
|
-
return 0 === keys.length ? '{}' :
|
|
40
|
-
'{' + keys.map((k) => k + ': ' + renderValue(v[k])).join(', ') + '}';
|
|
41
|
-
}
|
|
42
|
-
if ('string' === typeof v) {
|
|
43
|
-
return `'${v}'`;
|
|
44
|
-
}
|
|
45
|
-
return String(v);
|
|
46
|
-
}
|
|
47
13
|
function featureDocs(model, target) {
|
|
48
14
|
const feature = (0, types_1.getModelPath)(model, `main.${types_1.KIT}.feature`);
|
|
49
15
|
return (0, jostraca_1.each)(feature)
|
|
@@ -53,25 +19,34 @@ function featureDocs(model, target) {
|
|
|
53
19
|
const opts = (f.config && f.config.options) || {};
|
|
54
20
|
const options = Object.keys(opts).sort().map((k) => ({
|
|
55
21
|
name: k,
|
|
56
|
-
|
|
22
|
+
code: (0, facts_1.fact)(f, 'option')[k].value.codecell,
|
|
57
23
|
}));
|
|
58
24
|
const extra = (f.config && f.config.optspec) || {};
|
|
59
25
|
const extras = Object.keys(extra)
|
|
60
26
|
.filter((k) => null == opts[k])
|
|
61
27
|
.sort()
|
|
62
|
-
.map((k) => ({ name: k, type:
|
|
28
|
+
.map((k) => ({ name: k, type: (0, facts_1.fact)(f, 'option')[k].type.cell }));
|
|
63
29
|
return {
|
|
64
30
|
name: f.name,
|
|
65
31
|
Name: f.Name || f.name,
|
|
66
|
-
title: f
|
|
32
|
+
title: (0, facts_1.fact)(f, 'title').inline,
|
|
33
|
+
titleCell: (0, facts_1.fact)(f, 'title').cell,
|
|
67
34
|
transport: f.transport || 'none',
|
|
68
35
|
wraps: isWrapping(f),
|
|
36
|
+
on: true === (0, facts_1.fact)(f, 'on'),
|
|
37
|
+
hooks: Object.keys(f.hook || {}).filter((h) => true === f.hook[h]?.active).sort(),
|
|
69
38
|
options,
|
|
70
39
|
extras,
|
|
71
40
|
};
|
|
72
41
|
})
|
|
73
42
|
.sort((a, b) => a.name.localeCompare(b.name));
|
|
74
43
|
}
|
|
44
|
+
// `a`, `a` and `b`, `a`, `b` and `c`.
|
|
45
|
+
function codeList(names) {
|
|
46
|
+
const code = names.map((n) => '`' + n + '`');
|
|
47
|
+
return code.length < 2 ? code.join('') :
|
|
48
|
+
code.slice(0, -1).join(', ') + ' and ' + code[code.length - 1];
|
|
49
|
+
}
|
|
75
50
|
const FIXED_ORDER_TARGETS = ['lean'];
|
|
76
51
|
function honoursActivationOrder(target) {
|
|
77
52
|
return !FIXED_ORDER_TARGETS.includes(target?.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":["../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CAAC,GAAG,CAAC,CAAC,CAAS,EAAE,EAAE,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC,CAAA;IACpD,OAAO,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;QACtC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;AAClE,CAAC;AAGD,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"}
|
|
@@ -1,2 +1,8 @@
|
|
|
1
1
|
declare const FeatureHook: import("jostraca").Component<any, never, never>;
|
|
2
|
-
|
|
2
|
+
declare const PIPELINE_STAGES: {
|
|
3
|
+
name: string;
|
|
4
|
+
hook: string;
|
|
5
|
+
purpose: string;
|
|
6
|
+
}[];
|
|
7
|
+
declare function pipelineLength(): string;
|
|
8
|
+
export { FeatureHook, PIPELINE_STAGES, pipelineLength, };
|
package/dist/cmp/FeatureHook.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FeatureHook = void 0;
|
|
3
|
+
exports.PIPELINE_STAGES = exports.FeatureHook = void 0;
|
|
4
|
+
exports.pipelineLength = pipelineLength;
|
|
4
5
|
const jostraca_1 = require("jostraca");
|
|
5
6
|
const component_1 = require("../helpers/component");
|
|
6
7
|
const types_1 = require("../types");
|
|
@@ -15,4 +16,36 @@ const FeatureHook = (0, component_1.cmp)(function FeatureHook(props, children) {
|
|
|
15
16
|
.forEach(feature => (0, jostraca_1.each)(children, { call: true, args: feature }));
|
|
16
17
|
});
|
|
17
18
|
exports.FeatureHook = FeatureHook;
|
|
19
|
+
// The stages every entity operation runs, in order; each fires its hook first.
|
|
20
|
+
const PIPELINE_STAGES = [
|
|
21
|
+
{
|
|
22
|
+
name: 'Point', hook: 'PrePoint',
|
|
23
|
+
purpose: 'Resolves which API endpoint to call based on the operation name and entity configuration.',
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: 'Spec', hook: 'PreSpec',
|
|
27
|
+
purpose: 'Builds the HTTP spec — URL, method, headers, body — from the resolved point and the caller\'s parameters.',
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: 'Request', hook: 'PreRequest',
|
|
31
|
+
purpose: 'Sends the HTTP request. Features can intercept here to replace the transport.',
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: 'Response', hook: 'PreResponse',
|
|
35
|
+
purpose: 'Parses the raw HTTP response.',
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: 'Result', hook: 'PreResult',
|
|
39
|
+
purpose: 'Extracts the business data from the parsed response.',
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: 'Done', hook: 'PreDone',
|
|
43
|
+
purpose: 'Final stage before returning to the caller. Entity state (match, data) is updated here.',
|
|
44
|
+
},
|
|
45
|
+
];
|
|
46
|
+
exports.PIPELINE_STAGES = PIPELINE_STAGES;
|
|
47
|
+
const COUNT_WORDS = ['no', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine'];
|
|
48
|
+
function pipelineLength() {
|
|
49
|
+
return COUNT_WORDS[PIPELINE_STAGES.length] ?? String(PIPELINE_STAGES.length);
|
|
50
|
+
}
|
|
18
51
|
//# sourceMappingURL=FeatureHook.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeatureHook.js","sourceRoot":"","sources":["../../src/cmp/FeatureHook.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":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D;KAChE;IACD;QACE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS;QAC7B,OAAO,EAAE,yFAAyF;KACnG;CACF,CAAA;QAWC,eAAe;AATjB,MAAM,WAAW,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,CAAA;AAElG,SAAS,cAAc;IACrB,OAAO,WAAW,CAAC,eAAe,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,eAAe,CAAC,MAAM,CAAC,CAAA;AAC9E,CAAC"}
|
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,15 +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
|
-
npmTargets.push(t);
|
|
25
|
-
}
|
|
26
|
-
});
|
|
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));
|
|
27
23
|
if (0 === npmTargets.length) {
|
|
28
24
|
return;
|
|
29
25
|
}
|
|
@@ -58,19 +54,12 @@ exports.PublishWorkflow = PublishWorkflow;
|
|
|
58
54
|
function workflowFile(target) {
|
|
59
55
|
return `publish-${target.name}.yml`;
|
|
60
56
|
}
|
|
61
|
-
function isPrimaryNpm(model, target, npmTargets) {
|
|
62
|
-
if (1 === npmTargets.length) {
|
|
63
|
-
return true;
|
|
64
|
-
}
|
|
65
|
-
return (0, packageMeta_1.packageName)(model, target.name) === (0, packageMeta_1.packageName)(model, 'npm');
|
|
66
|
-
}
|
|
67
|
-
function releaseTag(model, target, npmTargets) {
|
|
68
|
-
return isPrimaryNpm(model, target, npmTargets) ?
|
|
69
|
-
'v$VERSION' : `${target.name}/v$VERSION`;
|
|
70
|
-
}
|
|
71
57
|
function publishWorkflow(model, target, npmTargets, repository) {
|
|
72
58
|
const name = target.name;
|
|
73
|
-
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);
|
|
74
63
|
const pkg = (0, packageMeta_1.packageName)(model, name);
|
|
75
64
|
const setup = null == repository ? '' : `
|
|
76
65
|
# .sdk/admin/setup-npm-trust.sh registers exactly this, and with --check
|
|
@@ -78,7 +67,7 @@ function publishWorkflow(model, target, npmTargets, repository) {
|
|
|
78
67
|
#`;
|
|
79
68
|
return `# Generated by @voxgig/sdkgen. Do not edit.
|
|
80
69
|
#
|
|
81
|
-
# Publishes ${pkg} (the \`${
|
|
70
|
+
# Publishes ${pkg} (the \`${dir}/\` target) to npm, via GitHub OIDC Trusted
|
|
82
71
|
# Publishing — no NPM_TOKEN. npm exchanges a short-lived OIDC token minted
|
|
83
72
|
# for THIS job in THIS repository for a publish credential, and attaches SLSA
|
|
84
73
|
# provenance automatically.
|
|
@@ -93,12 +82,15 @@ function publishWorkflow(model, target, npmTargets, repository) {
|
|
|
93
82
|
# THE FILENAME IS PART OF THAT CONFIGURATION. Renaming this file breaks
|
|
94
83
|
# publishing until the npm side is updated to match.
|
|
95
84
|
#
|
|
96
|
-
|
|
85
|
+
${'active' === (0, packageMeta_1.registryState)(model, name) ? `# BY DISPATCH, deliberately. The deploy Makefile publishes with a
|
|
97
86
|
# vault-injected token; a tag-triggered workflow racing it would publish one
|
|
98
|
-
# version by two mechanisms.
|
|
87
|
+
# version by two mechanisms.` : tagged ? `# BY DISPATCH, deliberately. While the registry is pending, the deploy
|
|
88
|
+
# Makefile only cuts the git tag, and a tag-triggered workflow would turn
|
|
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
|
|
99
91
|
# watches.
|
|
100
92
|
#
|
|
101
|
-
# THREE JOBS, BECAUSE THEY NEED DIFFERENT PRIVILEGES. A dependency lifecycle
|
|
93
|
+
# ${tagged ? 'THREE' : 'TWO'} JOBS, BECAUSE THEY NEED DIFFERENT PRIVILEGES. A dependency lifecycle
|
|
102
94
|
# script can ask the runner for any OIDC token its job is permitted to mint,
|
|
103
95
|
# so a job that both installs dependencies and holds \`id-token: write\` can be
|
|
104
96
|
# made to publish before its own gates finish. The same reasoning keeps
|
|
@@ -107,7 +99,7 @@ function publishWorkflow(model, target, npmTargets, repository) {
|
|
|
107
99
|
#
|
|
108
100
|
# verify contents: read, nothing else. Installs, builds and tests.
|
|
109
101
|
# publish id-token: write. Installs no dependencies and runs no project
|
|
110
|
-
# code; it packs what is already in the tree
|
|
102
|
+
# code; it packs what is already in the tree.${tagged ? `
|
|
111
103
|
# tag contents: write. Runs git and nothing else.
|
|
112
104
|
#
|
|
113
105
|
# THE TAG IS CUT HERE BECAUSE IT CANNOT BE CUT ANYWHERE ELSE. npm binds the
|
|
@@ -116,7 +108,11 @@ function publishWorkflow(model, target, npmTargets, repository) {
|
|
|
116
108
|
# workflow run, so "tag, and let a tag-triggered publisher fire" does not
|
|
117
109
|
# work. A release that publishes but leaves no ref cannot be answered later:
|
|
118
110
|
# nothing in git says which tree the tarball came from, and nothing
|
|
119
|
-
# 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.`}
|
|
120
116
|
|
|
121
117
|
name: publish-${name}
|
|
122
118
|
|
|
@@ -124,7 +120,7 @@ on:
|
|
|
124
120
|
workflow_dispatch:
|
|
125
121
|
inputs:
|
|
126
122
|
expect_sha:
|
|
127
|
-
description: 'Optional: refuse unless
|
|
123
|
+
description: 'Optional: refuse unless ${branch} is still at this commit'
|
|
128
124
|
type: string
|
|
129
125
|
default: ''
|
|
130
126
|
|
|
@@ -148,40 +144,40 @@ jobs:
|
|
|
148
144
|
with:
|
|
149
145
|
node-version: 24.x
|
|
150
146
|
|
|
151
|
-
# RELEASES COME FROM
|
|
147
|
+
# RELEASES COME FROM ${branch}, INCLUDING FROM THE BUTTON. workflow_dispatch
|
|
152
148
|
# accepts any ref, so without this the Actions UI can release a branch.
|
|
153
|
-
- name: This ref is
|
|
149
|
+
- name: This ref is ${branch}, and is where the caller thinks it is
|
|
154
150
|
env:
|
|
155
151
|
EXPECT: \${{ inputs.expect_sha }}
|
|
156
152
|
run: |
|
|
157
153
|
set -euo pipefail
|
|
158
|
-
if [ "\${GITHUB_REF_NAME}" != "
|
|
159
|
-
echo "::error::releases come from
|
|
154
|
+
if [ "\${GITHUB_REF_NAME}" != "${branch}" ]; then
|
|
155
|
+
echo "::error::releases come from ${branch}, not \${GITHUB_REF_NAME}"
|
|
160
156
|
exit 1
|
|
161
157
|
fi
|
|
162
158
|
if [ -n "\$EXPECT" ] && [ "\$EXPECT" != "\$GITHUB_SHA" ]; then
|
|
163
|
-
echo "::error
|
|
159
|
+
echo "::error::${branch} is at \$GITHUB_SHA, not \$EXPECT"
|
|
164
160
|
exit 1
|
|
165
161
|
fi
|
|
166
162
|
|
|
167
163
|
- name: Resolve the version
|
|
168
164
|
id: version
|
|
169
|
-
working-directory: ${
|
|
165
|
+
working-directory: ${dir}
|
|
170
166
|
run: |
|
|
171
167
|
set -euo pipefail
|
|
172
168
|
VERSION="\$(node -p "require('./package.json').version")"
|
|
173
|
-
test -n "\$VERSION" || { echo "::error::no version in ${
|
|
169
|
+
test -n "\$VERSION" || { echo "::error::no version in ${dir}/package.json"; exit 1; }
|
|
174
170
|
echo "version=\$VERSION" >> "\$GITHUB_OUTPUT"
|
|
175
171
|
echo "${pkg} \$VERSION"
|
|
176
172
|
|
|
177
173
|
- run: npm install
|
|
178
|
-
working-directory: ${
|
|
174
|
+
working-directory: ${dir}
|
|
179
175
|
|
|
180
176
|
- run: npm run build
|
|
181
|
-
working-directory: ${
|
|
177
|
+
working-directory: ${dir}
|
|
182
178
|
|
|
183
179
|
- run: npm test
|
|
184
|
-
working-directory: ${
|
|
180
|
+
working-directory: ${dir}
|
|
185
181
|
|
|
186
182
|
publish:
|
|
187
183
|
name: npm publish
|
|
@@ -226,9 +222,13 @@ jobs:
|
|
|
226
222
|
|
|
227
223
|
- name: Publish to npm
|
|
228
224
|
if: steps.registry.outputs.published == 'false'
|
|
229
|
-
working-directory: ${
|
|
225
|
+
working-directory: ${dir}
|
|
230
226
|
run: npm publish --access public
|
|
231
|
-
|
|
227
|
+
` + (tagged ? tagJob(tag) : '');
|
|
228
|
+
}
|
|
229
|
+
// The job that cuts the release tag, once the package is published.
|
|
230
|
+
function tagJob(tag) {
|
|
231
|
+
return `
|
|
232
232
|
# Runs git and nothing else. No install, no project code — so the
|
|
233
233
|
# repository-write credential is never in scope while third-party code runs.
|
|
234
234
|
#
|
|
@@ -280,6 +280,7 @@ jobs:
|
|
|
280
280
|
`;
|
|
281
281
|
}
|
|
282
282
|
function publishingDoc(model, targets, repository) {
|
|
283
|
+
const branch = (0, packageMeta_1.releaseBranch)(model);
|
|
283
284
|
const pkg = (0, packageMeta_1.packageName)(model, targets[0].name);
|
|
284
285
|
const first = workflowFile(targets[0]);
|
|
285
286
|
const setupHow = null == repository ? 'run:' :
|
|
@@ -299,9 +300,11 @@ An npm with no \`npm trust\` command is bypassed for \`npx npm@latest\`.
|
|
|
299
300
|
// WHICH TAG EACH TARGET CUTS. Worth a table rather than a sentence: the
|
|
300
301
|
// primary npm target owns the bare `v<version>` and every other one is
|
|
301
302
|
// prefixed, so with more than one npm target the answer differs per row.
|
|
302
|
-
const tagRows = '| target | tag |\n|---|---|\n' + targets.map((t) => `| \`${t.name}/\` |
|
|
303
|
-
|
|
304
|
-
'
|
|
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;
|
|
305
308
|
return `# Publishing
|
|
306
309
|
|
|
307
310
|
GENERATED by @voxgig/sdkgen — regenerated on every \`npm run generate\`.
|
|
@@ -327,26 +330,27 @@ publish credential, and attaches SLSA provenance as it goes.
|
|
|
327
330
|
|
|
328
331
|
main: kit: target: ${targets[0].name}: publish: version: '<x.y.z>'
|
|
329
332
|
|
|
330
|
-
2. Commit and push to
|
|
333
|
+
2. Commit and push to \`${branch}\`, and let CI go green.
|
|
331
334
|
3. Run the workflow from the Actions tab, or:
|
|
332
335
|
|
|
333
|
-
gh workflow run ${first} --ref
|
|
336
|
+
gh workflow run ${first} --ref ${branch} -f expect_sha=$(git rev-parse HEAD)
|
|
334
337
|
|
|
335
|
-
\`expect_sha\` is optional and worth using: it refuses if \`
|
|
338
|
+
\`expect_sha\` is optional and worth using: it refuses if \`${branch}\` moved between
|
|
336
339
|
the commit you checked and the run resolving.
|
|
337
340
|
|
|
338
|
-
|
|
339
|
-
publishes, with a vault-injected token. A tag-triggered workflow racing it
|
|
340
|
-
would publish one version by two mechanisms.
|
|
341
|
+
${dispatchReason(model, targets)}
|
|
341
342
|
|
|
342
|
-
|
|
343
|
+
${tagged ? `## The release is tagged for you
|
|
343
344
|
|
|
344
345
|
The workflow cuts the git tag itself, after a successful publish, so a
|
|
345
346
|
released version always has a ref naming the tree it came from. Nothing to
|
|
346
347
|
do by hand.
|
|
347
348
|
|
|
348
349
|
${tagRows}
|
|
349
|
-
|
|
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
|
+
` : ''}
|
|
350
354
|
Re-dispatching a version that is already on the registry skips the publish
|
|
351
355
|
and still cuts a missing tag, so a partial release is finished by running it
|
|
352
356
|
again rather than repaired by hand. If the tag already exists on a DIFFERENT
|
|
@@ -357,7 +361,13 @@ which is wrong.
|
|
|
357
361
|
The tag job is the only one that may write to the repository, and it runs
|
|
358
362
|
git and nothing else. \`contents: write\` never shares a job with project
|
|
359
363
|
code, for the same reason \`id-token: write\` does not — \`checkout\` persists
|
|
360
|
-
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}`}
|
|
361
371
|
|
|
362
372
|
## One-time set-up
|
|
363
373
|
|
|
@@ -380,11 +390,11 @@ ${setupCheck}
|
|
|
380
390
|
trusted-publisher settings once a version exists, so the FIRST release of a
|
|
381
391
|
package goes out by hand from an authenticated machine:
|
|
382
392
|
|
|
383
|
-
cd
|
|
393
|
+
${'.' === (0, facts_1.fact)(targets[0], 'dir') ? '' : 'cd ' + (0, facts_1.fact)(targets[0], 'dir') + ' && '}npm publish --access public
|
|
384
394
|
|
|
385
395
|
After that, register the publisher and every later release is a dispatch.
|
|
386
396
|
|
|
387
|
-
## Why the workflow has three jobs
|
|
397
|
+
## Why the workflow has ${tagged ? 'three' : 'two'} jobs
|
|
388
398
|
|
|
389
399
|
A dependency lifecycle script can ask the runner for any OIDC token the job
|
|
390
400
|
it runs in is permitted to mint. A job that both installs dependencies and
|
|
@@ -392,14 +402,38 @@ holds \`id-token: write\` can therefore be made to publish as this package
|
|
|
392
402
|
before its own gates finish.
|
|
393
403
|
|
|
394
404
|
So \`verify\` installs, builds and tests under \`contents: read\` and holds no
|
|
395
|
-
credential
|
|
405
|
+
credential${tagged ? `; \`publish\` holds \`id-token: write\` while installing nothing and
|
|
396
406
|
running no project code; and \`tag\` holds \`contents: write\` while running
|
|
397
407
|
git and nothing else.
|
|
398
408
|
|
|
399
409
|
The tag cannot be moved out into its own workflow: npm binds the trusted
|
|
400
410
|
publisher to ONE workflow filename, so anything that must accompany a publish
|
|
401
411
|
has to live inside this file. Nor can it be left to a tag-triggered
|
|
402
|
-
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.`}
|
|
403
414
|
`;
|
|
404
415
|
}
|
|
416
|
+
// The root Makefile publishes an active registry and only tags a pending one,
|
|
417
|
+
// so the reason a tag trigger is wrong differs between them.
|
|
418
|
+
function dispatchReason(model, targets) {
|
|
419
|
+
const states = targets.map((t) => (0, packageMeta_1.registryState)(model, t.name));
|
|
420
|
+
const active = states.includes('active');
|
|
421
|
+
const pending = states.some((s) => 'active' !== s);
|
|
422
|
+
if (active && !pending) {
|
|
423
|
+
return 'It is a DISPATCH rather than a tag push because the root `Makefile` also\n' +
|
|
424
|
+
'publishes, with a vault-injected token. A tag-triggered workflow racing it\n' +
|
|
425
|
+
'would publish one version by two mechanisms.';
|
|
426
|
+
}
|
|
427
|
+
if (!active) {
|
|
428
|
+
return 'It is a DISPATCH rather than a tag push. While the registry is pending, the\n' +
|
|
429
|
+
'root `Makefile` only cuts the git tag, and a tag-triggered workflow would\n' +
|
|
430
|
+
'turn every tag it cuts into a publish.';
|
|
431
|
+
}
|
|
432
|
+
return 'It is a DISPATCH rather than a tag push. Where a registry is active, the\n' +
|
|
433
|
+
'root `Makefile` also publishes, with a vault-injected token, and a\n' +
|
|
434
|
+
'tag-triggered workflow racing it would publish one version by two\n' +
|
|
435
|
+
'mechanisms. Where one is pending, the root `Makefile` only cuts the git\n' +
|
|
436
|
+
'tag, and a tag-triggered workflow would turn every tag it cuts into a\n' +
|
|
437
|
+
'publish.';
|
|
438
|
+
}
|
|
405
439
|
//# sourceMappingURL=PublishWorkflow.js.map
|
|
@@ -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,EAAC,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC;QAC9F,UAAU,KAAK,IAAA,2BAAa,EAAC,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAA;IAEhD,IAAI,CAAC,KAAK,UAAU,CAAC,MAAM,EAAE,CAAC;QAC5B,OAAM;IACR,CAAC;IAED,iEAAiE;IACjE,MAA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