@norskvideo/ctl-dev-kit 0.1.53 → 0.1.55
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.
|
@@ -264,7 +264,11 @@ export function demoProblems(repoRoot: string, canonicalShim: string): string[]
|
|
|
264
264
|
const problems: string[] = [];
|
|
265
265
|
const hasSpec = existsSync(join(repoRoot, DEMO_SPEC));
|
|
266
266
|
const shimPath = join(repoRoot, DEMO_SHIM);
|
|
267
|
-
if (existsSync(shimPath)) {
|
|
267
|
+
if (existsSync(shimPath) && statSync(shimPath).isDirectory()) {
|
|
268
|
+
problems.push(
|
|
269
|
+
`${DEMO_SHIM} is a directory; the convention puts the executable shim at that path — move the directory (scripts/demo-tools, say) and re-run sync-drift to write the shim.`,
|
|
270
|
+
);
|
|
271
|
+
} else if (existsSync(shimPath)) {
|
|
268
272
|
const actual = readFileSync(shimPath, "utf8");
|
|
269
273
|
if (actual !== canonicalShim) {
|
|
270
274
|
problems.push(
|
package/conventions/smoke.yml
CHANGED
|
@@ -198,8 +198,10 @@ jobs:
|
|
|
198
198
|
run: |
|
|
199
199
|
set -euo pipefail
|
|
200
200
|
state=failure; [ "$RESULT" = "success" ] && state=success
|
|
201
|
+
# `tier: smoke`: the release gate tallies per tier, so this green
|
|
202
|
+
# cannot stand in for the integration tier's (docs/release-gate.md).
|
|
201
203
|
body="$(jq -nc --arg p "$product" --arg v "$VERSION" --arg r "$state" \
|
|
202
|
-
'{event_type:"ctl-candidate-result",client_payload:{product:$p,version:$v,result:$r}}')"
|
|
204
|
+
'{event_type:"ctl-candidate-result",client_payload:{product:$p,version:$v,result:$r,tier:"smoke"}}')"
|
|
203
205
|
code="$(curl -sS -o /dev/null -w '%{http_code}' -X POST \
|
|
204
206
|
-H "Authorization: Bearer $GH_TOKEN" \
|
|
205
207
|
-H "Accept: application/vnd.github+json" \
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
// cannot mechanically converge (e.g. a workflow with no product key to preserve)
|
|
19
19
|
// is left for check-drift to flag, and a convention that genuinely breaks the
|
|
20
20
|
// product surfaces as a red lint/typecheck/test — not as a silent bad copy.
|
|
21
|
-
import { chmodSync, existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
21
|
+
import { chmodSync, existsSync, mkdirSync, readFileSync, statSync, writeFileSync } from "node:fs";
|
|
22
22
|
import { dirname, join } from "node:path";
|
|
23
23
|
import {
|
|
24
24
|
BEGIN,
|
|
@@ -203,6 +203,12 @@ function syncDemoShim(repoRoot: string, canonical: string, r: SyncReport): void
|
|
|
203
203
|
const rel = "scripts/demo";
|
|
204
204
|
const path = join(repoRoot, rel);
|
|
205
205
|
if (!existsSync(join(repoRoot, "tests/demo.spec.ts")) && !existsSync(path)) return;
|
|
206
|
+
// A product's own tooling may already live at scripts/demo/ (playout did):
|
|
207
|
+
// never write over it; the gate names it and says where the shim goes.
|
|
208
|
+
if (existsSync(path) && statSync(path).isDirectory()) {
|
|
209
|
+
r.skipped.push(`${rel} (a directory; move it, the shim goes here)`);
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
206
212
|
mkdirSync(dirname(path), { recursive: true });
|
|
207
213
|
writeIfChanged(path, canonical, rel, r.written);
|
|
208
214
|
chmodSync(path, 0o755);
|