@cookiemunch/cli 0.5.0 → 0.6.0

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/CHANGELOG.md CHANGED
@@ -2,6 +2,19 @@
2
2
 
3
3
  Every published release, newest first. Dates are the day the version was cut.
4
4
 
5
+ ## 0.6.0 (2026-10-24)
6
+
7
+ - Added: `cookiemunch executors conformance <baseUrl> --secret-env NAME` — checks any system against the open cm-standard-v2 executor contract, no Cookie Munch key needed with `--canary-email`; `--connection <id>` runs it from Cookie Munch.
8
+ - Added: `cookiemunch executors roll-completion-secret <id>`.
9
+ - Added: `--version` and `version [--json]` (`{ cli, api }`).
10
+ - Added: `cookies diff|push <file>`, `executors pull|diff|push <file> [--secret-env NAME]` (files never carry a secret), `dsar test [--types …] [--with-cbid] [--without-cbid] [--cleanup]` (deletes only what it filed), `doctor`.
11
+ - Added: `plan` / `apply` over one `cookiemunch.json` bundle, and the `plan-action` GitHub Action that comments the plan on a pull request.
12
+ - Added: `keys vend --scopes … --ttl 1h`, `keys self`, `keys rotate-self`; `keys report` lists revoked keys.
13
+ - Added: `--json` on every command; `--idempotency-key`; `COOKIEMUNCH_SECRET_RECIPIENT` for sealed secrets; `provision` takes a forgedeck (v2) body and `--from-step`.
14
+ - Changed: `partners link --partner` takes any partner the deployment knows.
15
+ - Added: `cookiemunch csp --merge <vendors|urls> [--framework next|express|nginx]` (needs no key), `cookies suggestions` / `declare-suggestions` / `import-manifest`, `site brand`, `health --fail-on`.
16
+ - Changed: built on `@cookiemunch/sdk` 0.6.0.
17
+
5
18
  ## 0.5.0 (2026-10-23)
6
19
 
7
20
  - Added: `consent-sync status|rotate|remove --site <cbid>` manages the site's hosted consent-sync secret. `rotate` prints it once.
package/dist/bin.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  run
4
- } from "./chunk-2ADK3C47.js";
4
+ } from "./chunk-LJ433UVC.js";
5
5
 
6
6
  // src/bin.ts
7
7
  import { readFile, writeFile } from "fs/promises";
@@ -38,7 +38,7 @@ run(process.argv.slice(2), {
38
38
  stdout: (t) => process.stdout.write(t),
39
39
  stderr: (t) => process.stderr.write(t),
40
40
  readFile: (p) => readFile(p, "utf8"),
41
- writeFile: (p, d) => writeFile(p, d, "utf8"),
41
+ writeFile: (p, d, mode) => writeFile(p, d, { encoding: "utf8", ...mode !== void 0 ? { mode } : {} }),
42
42
  openUrl,
43
43
  ...process.stdin.isTTY && process.stderr.isTTY ? { confirm } : {}
44
44
  }).then(
package/dist/bin.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/bin.ts"],"sourcesContent":["#!/usr/bin/env node\n/** The `cookiemunch` executable: real I/O around run() (see cli.ts). */\n\nimport { readFile, writeFile } from 'node:fs/promises';\nimport { spawn } from 'node:child_process';\nimport { createInterface } from 'node:readline/promises';\nimport { run } from './cli.js';\n\n/** A y/N question on the terminal; only offered when both ends are a TTY. */\nasync function confirm(question: string): Promise<boolean> {\n const rl = createInterface({ input: process.stdin, output: process.stderr });\n try {\n return /^y(es)?$/i.test((await rl.question(question)).trim());\n } finally {\n rl.close();\n }\n}\n\nfunction openUrl(url: string): Promise<void> {\n const [cmd, args] =\n process.platform === 'darwin'\n ? ['open', [url]]\n : process.platform === 'win32'\n ? ['cmd', ['/c', 'start', '', url]]\n : ['xdg-open', [url]];\n return new Promise((resolve) => {\n try {\n const child = spawn(cmd as string, args as string[], { stdio: 'ignore', detached: true });\n child.on('error', () => {\n process.stderr.write(`Could not open a browser; open the link above yourself.\\n`);\n resolve();\n });\n child.unref();\n resolve();\n } catch {\n resolve();\n }\n });\n}\n\nrun(process.argv.slice(2), {\n env: process.env,\n fetch: globalThis.fetch,\n stdout: (t) => process.stdout.write(t),\n stderr: (t) => process.stderr.write(t),\n readFile: (p) => readFile(p, 'utf8'),\n writeFile: (p, d) => writeFile(p, d, 'utf8'),\n openUrl,\n ...(process.stdin.isTTY && process.stderr.isTTY ? { confirm } : {}),\n}).then(\n (code) => {\n process.exitCode = code;\n },\n (err) => {\n process.stderr.write(`cookiemunch: ${(err as Error).message ?? String(err)}\\n`);\n process.exitCode = 1;\n },\n);\n"],"mappings":";;;;;;AAGA,SAAS,UAAU,iBAAiB;AACpC,SAAS,aAAa;AACtB,SAAS,uBAAuB;AAIhC,eAAe,QAAQ,UAAoC;AACzD,QAAM,KAAK,gBAAgB,EAAE,OAAO,QAAQ,OAAO,QAAQ,QAAQ,OAAO,CAAC;AAC3E,MAAI;AACF,WAAO,YAAY,MAAM,MAAM,GAAG,SAAS,QAAQ,GAAG,KAAK,CAAC;AAAA,EAC9D,UAAE;AACA,OAAG,MAAM;AAAA,EACX;AACF;AAEA,SAAS,QAAQ,KAA4B;AAC3C,QAAM,CAAC,KAAK,IAAI,IACd,QAAQ,aAAa,WACjB,CAAC,QAAQ,CAAC,GAAG,CAAC,IACd,QAAQ,aAAa,UACnB,CAAC,OAAO,CAAC,MAAM,SAAS,IAAI,GAAG,CAAC,IAChC,CAAC,YAAY,CAAC,GAAG,CAAC;AAC1B,SAAO,IAAI,QAAQ,CAAC,YAAY;AAC9B,QAAI;AACF,YAAM,QAAQ,MAAM,KAAe,MAAkB,EAAE,OAAO,UAAU,UAAU,KAAK,CAAC;AACxF,YAAM,GAAG,SAAS,MAAM;AACtB,gBAAQ,OAAO,MAAM;AAAA,CAA2D;AAChF,gBAAQ;AAAA,MACV,CAAC;AACD,YAAM,MAAM;AACZ,cAAQ;AAAA,IACV,QAAQ;AACN,cAAQ;AAAA,IACV;AAAA,EACF,CAAC;AACH;AAEA,IAAI,QAAQ,KAAK,MAAM,CAAC,GAAG;AAAA,EACzB,KAAK,QAAQ;AAAA,EACb,OAAO,WAAW;AAAA,EAClB,QAAQ,CAAC,MAAM,QAAQ,OAAO,MAAM,CAAC;AAAA,EACrC,QAAQ,CAAC,MAAM,QAAQ,OAAO,MAAM,CAAC;AAAA,EACrC,UAAU,CAAC,MAAM,SAAS,GAAG,MAAM;AAAA,EACnC,WAAW,CAAC,GAAG,MAAM,UAAU,GAAG,GAAG,MAAM;AAAA,EAC3C;AAAA,EACA,GAAI,QAAQ,MAAM,SAAS,QAAQ,OAAO,QAAQ,EAAE,QAAQ,IAAI,CAAC;AACnE,CAAC,EAAE;AAAA,EACD,CAAC,SAAS;AACR,YAAQ,WAAW;AAAA,EACrB;AAAA,EACA,CAAC,QAAQ;AACP,YAAQ,OAAO,MAAM,gBAAiB,IAAc,WAAW,OAAO,GAAG,CAAC;AAAA,CAAI;AAC9E,YAAQ,WAAW;AAAA,EACrB;AACF;","names":[]}
1
+ {"version":3,"sources":["../src/bin.ts"],"sourcesContent":["#!/usr/bin/env node\n/** The `cookiemunch` executable: real I/O around run() (see cli.ts). */\n\nimport { readFile, writeFile } from 'node:fs/promises';\nimport { spawn } from 'node:child_process';\nimport { createInterface } from 'node:readline/promises';\nimport { run } from './cli.js';\n\n/** A y/N question on the terminal; only offered when both ends are a TTY. */\nasync function confirm(question: string): Promise<boolean> {\n const rl = createInterface({ input: process.stdin, output: process.stderr });\n try {\n return /^y(es)?$/i.test((await rl.question(question)).trim());\n } finally {\n rl.close();\n }\n}\n\nfunction openUrl(url: string): Promise<void> {\n const [cmd, args] =\n process.platform === 'darwin'\n ? ['open', [url]]\n : process.platform === 'win32'\n ? ['cmd', ['/c', 'start', '', url]]\n : ['xdg-open', [url]];\n return new Promise((resolve) => {\n try {\n const child = spawn(cmd as string, args as string[], { stdio: 'ignore', detached: true });\n child.on('error', () => {\n process.stderr.write(`Could not open a browser; open the link above yourself.\\n`);\n resolve();\n });\n child.unref();\n resolve();\n } catch {\n resolve();\n }\n });\n}\n\nrun(process.argv.slice(2), {\n env: process.env,\n fetch: globalThis.fetch,\n stdout: (t) => process.stdout.write(t),\n stderr: (t) => process.stderr.write(t),\n readFile: (p) => readFile(p, 'utf8'),\n writeFile: (p, d, mode) => writeFile(p, d, { encoding: 'utf8', ...(mode !== undefined ? { mode } : {}) }),\n openUrl,\n ...(process.stdin.isTTY && process.stderr.isTTY ? { confirm } : {}),\n}).then(\n (code) => {\n process.exitCode = code;\n },\n (err) => {\n process.stderr.write(`cookiemunch: ${(err as Error).message ?? String(err)}\\n`);\n process.exitCode = 1;\n },\n);\n"],"mappings":";;;;;;AAGA,SAAS,UAAU,iBAAiB;AACpC,SAAS,aAAa;AACtB,SAAS,uBAAuB;AAIhC,eAAe,QAAQ,UAAoC;AACzD,QAAM,KAAK,gBAAgB,EAAE,OAAO,QAAQ,OAAO,QAAQ,QAAQ,OAAO,CAAC;AAC3E,MAAI;AACF,WAAO,YAAY,MAAM,MAAM,GAAG,SAAS,QAAQ,GAAG,KAAK,CAAC;AAAA,EAC9D,UAAE;AACA,OAAG,MAAM;AAAA,EACX;AACF;AAEA,SAAS,QAAQ,KAA4B;AAC3C,QAAM,CAAC,KAAK,IAAI,IACd,QAAQ,aAAa,WACjB,CAAC,QAAQ,CAAC,GAAG,CAAC,IACd,QAAQ,aAAa,UACnB,CAAC,OAAO,CAAC,MAAM,SAAS,IAAI,GAAG,CAAC,IAChC,CAAC,YAAY,CAAC,GAAG,CAAC;AAC1B,SAAO,IAAI,QAAQ,CAAC,YAAY;AAC9B,QAAI;AACF,YAAM,QAAQ,MAAM,KAAe,MAAkB,EAAE,OAAO,UAAU,UAAU,KAAK,CAAC;AACxF,YAAM,GAAG,SAAS,MAAM;AACtB,gBAAQ,OAAO,MAAM;AAAA,CAA2D;AAChF,gBAAQ;AAAA,MACV,CAAC;AACD,YAAM,MAAM;AACZ,cAAQ;AAAA,IACV,QAAQ;AACN,cAAQ;AAAA,IACV;AAAA,EACF,CAAC;AACH;AAEA,IAAI,QAAQ,KAAK,MAAM,CAAC,GAAG;AAAA,EACzB,KAAK,QAAQ;AAAA,EACb,OAAO,WAAW;AAAA,EAClB,QAAQ,CAAC,MAAM,QAAQ,OAAO,MAAM,CAAC;AAAA,EACrC,QAAQ,CAAC,MAAM,QAAQ,OAAO,MAAM,CAAC;AAAA,EACrC,UAAU,CAAC,MAAM,SAAS,GAAG,MAAM;AAAA,EACnC,WAAW,CAAC,GAAG,GAAG,SAAS,UAAU,GAAG,GAAG,EAAE,UAAU,QAAQ,GAAI,SAAS,SAAY,EAAE,KAAK,IAAI,CAAC,EAAG,CAAC;AAAA,EACxG;AAAA,EACA,GAAI,QAAQ,MAAM,SAAS,QAAQ,OAAO,QAAQ,EAAE,QAAQ,IAAI,CAAC;AACnE,CAAC,EAAE;AAAA,EACD,CAAC,SAAS;AACR,YAAQ,WAAW;AAAA,EACrB;AAAA,EACA,CAAC,QAAQ;AACP,YAAQ,OAAO,MAAM,gBAAiB,IAAc,WAAW,OAAO,GAAG,CAAC;AAAA,CAAI;AAC9E,YAAQ,WAAW;AAAA,EACrB;AACF;","names":[]}