@norskvideo/ctl-dev-kit 0.1.99 → 0.1.101

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.
@@ -10,7 +10,7 @@
10
10
  // screen) added by FEATURE, not by a second copy of the skeleton.
11
11
  //
12
12
  // The convention layer is shared verbatim across every shape.
13
- import { mkdirSync, writeFileSync } from "node:fs";
13
+ import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
14
14
  import { dirname, join } from "node:path";
15
15
  import { type Canon, loadAsset, loadCanon, PRODUCT_SENTINEL } from "./canon.ts";
16
16
  import { turnkey } from "./turnkey.ts";
@@ -101,13 +101,28 @@ const SHAPES: Record<ProductShape, ShapeModule> = {
101
101
  turnkey,
102
102
  };
103
103
 
104
- // Same known-good coherent set the dev-kit's own package.json pins. A fresh
105
- // repo's first upgrade-latest.yml run advances every one of these in lockstep.
106
- const DEFAULT_MEDIA_IMAGE = "norskvideo/norsk:1.2.1-2026-09-15-a41445b4";
104
+ /** A pin from the dev-kit's own package.json — the coherent set set-sdk-source.ts
105
+ * moves as one line, and the only copy that travels with the published package. */
106
+ export function devKitPin(pkg: { devDependencies?: Record<string, string> }, name: string): string {
107
+ const pin = pkg.devDependencies?.[name];
108
+ if (pin === undefined) {
109
+ throw new Error(`the dev-kit's package.json pins no ${name}; a generated product would carry no version`);
110
+ }
111
+ return pin;
112
+ }
113
+
114
+ const devKitPackageJson = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8")) as {
115
+ devDependencies?: Record<string, string>;
116
+ };
117
+
118
+ // Derived, never a second copy of the tag: a hardcoded default silently missed
119
+ // every nightly sdk-bump, which moves the package.json line and nothing else.
120
+ // Media's npm packages and image are built from one commit, so they share a tag.
121
+ const DEFAULT_MEDIA_IMAGE = `norskvideo/norsk:${devKitPin(devKitPackageJson, "@norskvideo/norsk-sdk")}`;
122
+ // Studio's npm packages and image ship from different commits, so its image tag
123
+ // cannot be derived; it only has to sit on the lib pin's version line.
107
124
  const DEFAULT_STUDIO_IMAGE = "norskvideo/norsk-studio:1.29.0-2026-09-10-dcf40e7c";
108
- // Studio's npm packages and image ship from different commits, so the default
109
- // lib pin can't be derived from the default image's tag.
110
- const DEFAULT_STUDIO_LIB = "1.29.0-2026-09-10-b21d9013";
125
+ const DEFAULT_STUDIO_LIB = devKitPin(devKitPackageJson, "@norskvideo/norsk-studio");
111
126
 
112
127
  const bareTag = (ref: string) => ref.slice(ref.lastIndexOf(":") + 1);
113
128
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@norskvideo/ctl-dev-kit",
3
- "version": "0.1.99",
3
+ "version": "0.1.101",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./create-product": "./create-product/create-product.ts",