@norskvideo/ctl-dev-kit 0.1.3 → 0.1.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/build/flake.nix CHANGED
@@ -1,14 +1,16 @@
1
1
  # Product build + dev shell — single-sourced in @norskvideo/ctl-dev-kit and
2
2
  # copied verbatim into each split product repo (nix needs a flake.nix at the repo
3
3
  # root for `nix develop`; it can't pull one from an npm package at CI bootstrap).
4
- # The copy is drift-gated (Workstream I), same model as the fenced CLAUDE.md core.
4
+ # The copy is to be drift-gated (Workstream I; not yet enforced), same model as
5
+ # the fenced CLAUDE.md core.
5
6
  #
6
- # Two shells:
7
- # nix develop -> build tools only (bun, cargo/rustc, git). This is what
8
- # CI (build-image) uses; it must stay lean and must NOT
9
- # depend on fetching the ctl binary.
10
- # nix develop .#dev -> the above PLUS the pinned `norsk-ctl` daemon on PATH,
11
- # for the local product dev loop (serve + product add).
7
+ # Three shells:
8
+ # nix develop -> build tools (bun, cargo/rustc, git) + the pinned
9
+ # nix develop .#dev `norsk-ctl` daemon on PATH. The everyday product dev
10
+ # shell; the two are equivalent.
11
+ # nix develop .#build -> build tools only, no ctl. What CI (build-image /
12
+ # integration) uses, so image builds never depend on the
13
+ # ctl binary channel.
12
14
  #
13
15
  # `norsk-ctl` is the released daemon binary pulled from the S3 channel and pinned
14
16
  # by version+hash (reproducible). It is NOT built from source here — a product
@@ -77,14 +79,19 @@
77
79
  pkgs.git
78
80
  ];
79
81
  in {
80
- # CI (build-image) uses this lean, no ctl fetch.
82
+ # Everyday dev shell — build tools + the pinned norsk-ctl daemon.
83
+ # `nix develop` and `nix develop .#dev` are equivalent.
81
84
  default = pkgs.mkShell {
82
- buildInputs = buildTools;
85
+ buildInputs = buildTools ++ [ (mkCtl system) ];
83
86
  };
84
- # Local product dev loop — build tools + the pinned daemon on PATH.
85
87
  dev = pkgs.mkShell {
86
88
  buildInputs = buildTools ++ [ (mkCtl system) ];
87
89
  };
90
+ # Lean shell for CI (build-image / integration) — no ctl fetch, so
91
+ # image builds never depend on the ctl binary channel.
92
+ build = pkgs.mkShell {
93
+ buildInputs = buildTools;
94
+ };
88
95
  });
89
96
  };
90
97
  }
@@ -2,11 +2,11 @@
2
2
  <!--
3
3
  This block is the SHARED conventions core, single-sourced in
4
4
  @norskvideo/ctl-dev-kit (conventions/CLAUDE.core.md). It is copied verbatim
5
- into each product repo's CLAUDE.md between these fenced markers, and a
6
- drift-check gate (Workstream I) fails CI if a copy diverges from the dev-kit's
7
- version. Do NOT hand-edit a copy edit the dev-kit source and re-sync. The
8
- per-product tail (this product's build, iterate loop, gotchas) lives OUTSIDE
9
- the markers and is yours to own.
5
+ into each product repo's CLAUDE.md between these fenced markers. A drift-check
6
+ gate is planned (Workstream I) to fail CI if a copy diverges from the dev-kit's
7
+ version until it lands, do NOT hand-edit a copy: edit the dev-kit source and
8
+ re-sync. The per-product tail (this product's build, iterate loop, gotchas)
9
+ lives OUTSIDE the markers and is yours to own.
10
10
 
11
11
  It is copied (not `@import`ed) on purpose: CLAUDE.md's value is being read
12
12
  verbatim by a human on GitHub with no tooling, and an @import shows a human a
@@ -13,8 +13,9 @@ dependency; it is the released binary, pinned by version+hash in the repo's
13
13
  it on `PATH`:
14
14
 
15
15
  ```sh
16
- nix develop .#dev # build tools (bun, cargo/rustc, git) + the pinned norsk-ctl
17
- # nix develop # build-only shell — no ctl (this is what CI build-image uses)
16
+ nix develop # build tools (bun, cargo/rustc, git) + the pinned norsk-ctl
17
+ # nix develop .#dev # equivalent alias
18
+ # nix develop .#build # lean shell, no ctl — what CI (build-image/integration) uses
18
19
 
19
20
  norsk-ctl serve # daemon on :8333, oauth2 proxy on :9443
20
21
  norsk-ctl --version # confirm the pinned build
@@ -102,9 +103,9 @@ Leave the hooks unset to launch the pinned tags the product declares.
102
103
  Use this when you are changing the **daemon itself** (packages/norsk-ctl) and
103
104
  want the product to launch through your build instead of the pinned binary. The
104
105
  daemon is a single process on `:8333` — where you start it from is irrelevant, so
105
- just run it out of your checkout and drive it with the same checkout's CLI. Skip
106
- `nix develop .#dev` (its pinned `norsk-ctl` would shadow yours); the plain
107
- `nix develop` shell is enough on the product side.
106
+ just run it out of your checkout and drive it with the same checkout's CLI. Use
107
+ `nix develop .#build` on the product side so the flake's pinned `norsk-ctl`
108
+ doesn't shadow the one you're running from source.
108
109
 
109
110
  ```sh
110
111
  # 1. daemon, from your ctl checkout (root `cli` script -> packages/norsk-ctl cli)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@norskvideo/ctl-dev-kit",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./package.json": "./package.json"