@norskvideo/ctl-dev-kit 0.2.33 → 0.2.34

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.
@@ -228,12 +228,17 @@ jobs:
228
228
  # licence was never minted should say so in seconds, by name.
229
229
  #
230
230
  # The product name is the repo's own PRODUCT_NAME, not the short board key
231
- # above (`funke` vs `funke-pegasus`): the licence names the product.
231
+ # above (`funke` vs `funke-pegasus`): the licence names the product. A
232
+ # Studio product keeps it in shared/src/version.ts, an sdk-app (norsk-relay)
233
+ # in src/product/version.ts; the first that exists is read.
232
234
  - name: Check the licence entitles this product
233
235
  run: |
234
236
  set -euo pipefail
235
- product="$(sed -nE 's/.*PRODUCT_NAME[[:space:]]*=[[:space:]]*"([^"]+)".*/\1/p' shared/src/version.ts | head -1)"
236
- [ -n "$product" ] || { echo "::error::could not read PRODUCT_NAME from shared/src/version.ts"; exit 1; }
237
+ vf=""
238
+ for f in shared/src/version.ts src/product/version.ts; do [ -f "$f" ] && { vf="$f"; break; }; done
239
+ [ -n "$vf" ] || { echo "::error::no shared/src/version.ts or src/product/version.ts"; exit 1; }
240
+ product="$(sed -nE 's/.*PRODUCT_NAME[[:space:]]*=[[:space:]]*"([^"]+)".*/\1/p' "$vf" | head -1)"
241
+ [ -n "$product" ] || { echo "::error::could not read PRODUCT_NAME from $vf"; exit 1; }
237
242
  nix develop .#build --command bun \
238
243
  node_modules/@norskvideo/ctl-dev-kit/licence/check-entitlement.ts \
239
244
  "$RUNNER_TEMP/norsk-license.json" "$product"
@@ -241,14 +246,17 @@ jobs:
241
246
  # Instance launch docker-composes the media + studio images; on a cold
242
247
  # runner the first pull overruns the per-test timeout. Pre-pull them (tags
243
248
  # from manifest.seed.json), plus whatever the repo lists in the optional
244
- # scripts/smoke/prepull-extra.sh hook (a driver image, a sidecar).
249
+ # scripts/smoke/prepull-extra.sh hook (a driver image, a sidecar). An
250
+ # sdk-app has no Studio pair and no seed: its hook pulls its engine.
245
251
  - name: Pre-pull the media + studio images
246
252
  run: |
247
253
  set -euo pipefail
248
- for img in "$(jq -r '.latest.media' manifest.seed.json)" "$(jq -r '.latest.studio' manifest.seed.json)"; do
249
- echo "pre-pulling $img"
250
- docker pull "$img"
251
- done
254
+ if [ -f manifest.seed.json ]; then
255
+ for img in "$(jq -r '.latest.media' manifest.seed.json)" "$(jq -r '.latest.studio' manifest.seed.json)"; do
256
+ echo "pre-pulling $img"
257
+ docker pull "$img"
258
+ done
259
+ fi
252
260
  if [ -x scripts/smoke/prepull-extra.sh ]; then
253
261
  echo "running scripts/smoke/prepull-extra.sh"
254
262
  ./scripts/smoke/prepull-extra.sh
@@ -263,6 +271,12 @@ jobs:
263
271
  env:
264
272
  NORSK_CTL_BINARY: ${{ runner.temp }}/norsk-ctl
265
273
  NORSK_LICENSE_FILE: ${{ runner.temp }}/norsk-license.json
274
+ # A direct-SDK product's (sdk-app's) licence identity: the sdk-client
275
+ # cert + key it answers the engine's V2 handshake with, base64, as repo
276
+ # secrets. Studio carries its own baked identity, so a Studio product
277
+ # sets neither and these arrive empty.
278
+ NORSK_SDK_CLIENT_CERT_B64: ${{ secrets.NORSK_SDK_CLIENT_CERT_B64 }}
279
+ NORSK_SDK_CLIENT_KEY_B64: ${{ secrets.NORSK_SDK_CLIENT_KEY_B64 }}
266
280
  # Where the harness copies each instance's full engine logs
267
281
  # (/var/log/norsk -> debug.json, host-mounted under the store) before
268
282
  # teardown nukes them, plus — since ctl-test-harness 0.1.60 — each
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@norskvideo/ctl-dev-kit",
3
- "version": "0.2.33",
3
+ "version": "0.2.34",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./create-product": "./create-product/create-product.ts",