impel-cli 0.20.63-canary.3 → 0.20.63-canary.5
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/package.json
CHANGED
|
@@ -4,9 +4,10 @@
|
|
|
4
4
|
// `publish-canary.yml` runs this in the working tree immediately before
|
|
5
5
|
// `pnpm pack`, after the test suite has run on the unmodified tree. It
|
|
6
6
|
// rewrites the brand DEFAULT in `src/runtimeBrand.js` in place: the channel
|
|
7
|
-
// literal becomes `canary
|
|
8
|
-
// become the canary row of CHANNEL_ORIGINS
|
|
9
|
-
// baked so the row has one source of truth
|
|
7
|
+
// literal becomes `canary`, the three production `defaultOrigin` literals
|
|
8
|
+
// become the canary row of CHANNEL_ORIGINS (read from the very module being
|
|
9
|
+
// baked so the row has one source of truth), and the CLI config namespace
|
|
10
|
+
// becomes `impel-canary` so stable and canary state never share files.
|
|
10
11
|
//
|
|
11
12
|
// It is a one-shot publish step, not a formatter: every literal it replaces
|
|
12
13
|
// must occur exactly once in its shipped form, a file that is already baked
|
|
@@ -51,6 +52,7 @@ async function main() {
|
|
|
51
52
|
const { CHANNEL_ORIGINS } = await importBrandModule(target, "before");
|
|
52
53
|
const rows = [
|
|
53
54
|
['channel: "stable",', CANARY_MARKER],
|
|
55
|
+
['configNamespace: "impel",', 'configNamespace: "impel-canary",'],
|
|
54
56
|
...["gateway", "sessions", "controlPlane"].map((column) => [
|
|
55
57
|
`defaultOrigin: ${JSON.stringify(CHANNEL_ORIGINS.stable[column])}`,
|
|
56
58
|
`defaultOrigin: ${JSON.stringify(CHANNEL_ORIGINS.canary[column])}`,
|
|
@@ -73,10 +75,13 @@ async function main() {
|
|
|
73
75
|
if (RUNTIME_BRAND.channel !== "canary" || mismatch) {
|
|
74
76
|
throw new Error(`baked DEFAULT is not the canary row (${mismatch || "channel"})`);
|
|
75
77
|
}
|
|
78
|
+
if (RUNTIME_BRAND.cli.configNamespace !== "impel-canary") {
|
|
79
|
+
throw new Error(`baked CLI config namespace is not isolated (${RUNTIME_BRAND.cli.configNamespace})`);
|
|
80
|
+
}
|
|
76
81
|
process.stdout.write(
|
|
77
82
|
`bake-canary-brand: ${target} now carries channel canary `
|
|
78
83
|
+ `(gateway ${RUNTIME_BRAND.gateway.defaultOrigin}, sessions ${RUNTIME_BRAND.sessions.defaultOrigin}, `
|
|
79
|
-
+ `controlPlane ${RUNTIME_BRAND.controlPlane.defaultOrigin})\n`,
|
|
84
|
+
+ `controlPlane ${RUNTIME_BRAND.controlPlane.defaultOrigin}, config ${RUNTIME_BRAND.cli.configNamespace})\n`,
|
|
80
85
|
);
|
|
81
86
|
} catch (error) {
|
|
82
87
|
fs.writeFileSync(target, original);
|
package/src/runtimeBrand.js
CHANGED