@norskvideo/ctl-dev-kit 0.2.76 → 0.2.77
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/create-product/turnkey.ts +18 -3
- package/package.json +1 -1
|
@@ -170,11 +170,16 @@ pinned in \`flake.nix\` and put on PATH by the nix shell:
|
|
|
170
170
|
\`norsk-ctl product add --dev-url http://localhost:${ctx.devPort}\` registers the
|
|
171
171
|
running backend as a dev product.
|
|
172
172
|
|
|
173
|
+
**Licence:** commit a non-production dev licence for this product at
|
|
174
|
+
licensing/${ctx.name}-dev.json and \`bun run iterate\` uses it whenever
|
|
175
|
+
\`NORSK_LICENSE_FILE\` is unset; export it yourself for \`bun run demo\`.
|
|
176
|
+
|
|
173
177
|
**Demo:** \`bun run demo -- up\` runs \`tests/demo.spec.ts\` (the
|
|
174
178
|
@norskvideo/ctl-test-harness demo driver) from source on a private daemon —
|
|
175
179
|
dev backend, registration, launch, the camera1 sample on the ingest, ready
|
|
176
180
|
gates, URLs; Ctrl-C tears down. \`check\` is the headless form CI runs,
|
|
177
|
-
\`spec\` prints the plan. \`
|
|
181
|
+
\`spec\` prints the plan. \`DEMO_SOURCES=none\` skips the sample, for feeds
|
|
182
|
+
pushed in by hand. \`scripts/demo\` is the same entry re-exec'd under
|
|
178
183
|
\`nix develop .#dev\` when the pinned ctl is not on PATH.
|
|
179
184
|
|
|
180
185
|
**Outer loop (real image):** \`bun run iterate\` — \`bun run build:image\` (the
|
|
@@ -1817,7 +1822,8 @@ function iterateSh(ctx: ShapeContext): string {
|
|
|
1817
1822
|
# instance; your daemon and the registration stay.
|
|
1818
1823
|
#
|
|
1819
1824
|
# Needs the daemon already running (\`norsk-ctl serve\`), \`norsk-ctl\` on PATH
|
|
1820
|
-
# (\`nix develop .#dev\` provides it) and NORSK_LICENSE_FILE
|
|
1825
|
+
# (\`nix develop .#dev\` provides it) and a licence: NORSK_LICENSE_FILE, else
|
|
1826
|
+
# the committed non-production dev licence at licensing/${ctx.name}-dev.json.
|
|
1821
1827
|
#
|
|
1822
1828
|
# Usage (from the repo root):
|
|
1823
1829
|
# bun run iterate # full loop
|
|
@@ -1832,6 +1838,10 @@ repo="$(cd "$here/.." && pwd)"
|
|
|
1832
1838
|
# directly (build-image.sh honours IMAGE_TAG).
|
|
1833
1839
|
export IMAGE_TAG="\${IMAGE_TAG:-${ctx.name}:dev}"
|
|
1834
1840
|
|
|
1841
|
+
if [ -z "\${NORSK_LICENSE_FILE:-}" ] && [ -f "$repo/licensing/${ctx.name}-dev.json" ]; then
|
|
1842
|
+
export NORSK_LICENSE_FILE="$repo/licensing/${ctx.name}-dev.json"
|
|
1843
|
+
fi
|
|
1844
|
+
|
|
1835
1845
|
if [ -n "\${SKIP_BUILD:-}" ]; then
|
|
1836
1846
|
echo "=== build (skipped, SKIP_BUILD set) ==="
|
|
1837
1847
|
else
|
|
@@ -1908,7 +1918,12 @@ export default defineDemo({
|
|
|
1908
1918
|
image: process.env.IMAGE_TAG ?? "${ctx.name}:dev",
|
|
1909
1919
|
template: { name: "default" },
|
|
1910
1920
|
launch: { hardware: "none" },
|
|
1911
|
-
|
|
1921
|
+
// DEMO_SOURCES=none leaves the ingest to feeds someone pushes in by hand
|
|
1922
|
+
// (stream id input), so they can be stopped and started live.
|
|
1923
|
+
sources:
|
|
1924
|
+
process.env.DEMO_SOURCES === "none"
|
|
1925
|
+
? []
|
|
1926
|
+
: [{ name: "input", asset: { preset: "camera1" }, ingest: { param: "INGEST_PORT" }, streamId: "input" }],
|
|
1912
1927
|
ready: [{ http: { studio: "/live/api/components" }, status: 200, timeoutMs: 120_000 }],
|
|
1913
1928
|
open: [
|
|
1914
1929
|
{ name: "Studio", url: { proxy: "/instance/{id}/studio/" } },
|