@bensandee/tooling 0.65.0 → 0.66.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.
@@ -1,2 +1,2 @@
1
- import { a as composeArgs, c as composePs, d as lintComposeFiles, i as getContainerHealth, l as composeUp, n as runDockerCheck, o as composeDown, r as checkHttpHealth, s as composeLogs, t as deriveProjectName, u as createRealExecutor } from "../project-name-CnyTIy5a.mjs";
1
+ import { a as composeArgs, c as composePs, d as lintComposeFiles, i as getContainerHealth, l as composeUp, n as runDockerCheck, o as composeDown, r as checkHttpHealth, s as composeLogs, t as deriveProjectName, u as createRealExecutor } from "../project-name-CNaAmafB.mjs";
2
2
  export { checkHttpHealth, composeArgs, composeDown, composeLogs, composePs, composeUp, createRealExecutor, deriveProjectName, getContainerHealth, lintComposeFiles, runDockerCheck };
@@ -29,6 +29,32 @@ function debugExec(config, label, result) {
29
29
  debugOut(lines.join("\n"));
30
30
  }
31
31
  //#endregion
32
+ //#region src/docker-check/compose-yaml.ts
33
+ /**
34
+ * Parse a Docker Compose file as plain data.
35
+ *
36
+ * Compose defines its own merge tags — `!reset` and `!override` — which control how
37
+ * values combine across layered `-f` files, and they may tag a scalar, a map or a
38
+ * sequence (`ipam: !reset null`, `ports: !override [...]`). `yaml` doesn't know them,
39
+ * and for an unknown tag it does not throw: it calls `process.emitWarning()` with code
40
+ * `TAG_RESOLVE_FAILED` and then falls back to the default schema. That warning reached
41
+ * every `bst repo:sync --check` and `bst docker:check` run in any repo whose overlay
42
+ * used a merge tag — noise in every CI log, from a file bst went looking for itself.
43
+ *
44
+ * `logLevel: "silent"` suppresses those non-fatal warnings. It does not weaken parsing:
45
+ * genuine syntax errors still throw, and a tagged value still resolves to its underlying
46
+ * data. Callers here only read compose as data (service names, images, ports,
47
+ * healthchecks, the top-level `name:`) and never re-serialize it, so the tag semantics
48
+ * are irrelevant to them — which is why silencing beats registering the tags, whose
49
+ * scalar/map/seq forms would need a six-entry matrix to model correctly.
50
+ *
51
+ * Do not drop the option; `test/docker-check/detect.test.ts` and `compose-lint.test.ts`
52
+ * pin it by asserting no process warning is emitted.
53
+ */
54
+ function parseComposeYaml(content) {
55
+ return parse(content, { logLevel: "silent" });
56
+ }
57
+ //#endregion
32
58
  //#region src/docker-check/compose-lint.ts
33
59
  const ComposeFileShape = z.looseObject({ name: z.unknown().optional() });
34
60
  /**
@@ -160,7 +186,7 @@ function readTopLevelName(absPath) {
160
186
  }
161
187
  let yamlValue;
162
188
  try {
163
- yamlValue = parse(raw);
189
+ yamlValue = parseComposeYaml(raw);
164
190
  } catch (_error) {
165
191
  return;
166
192
  }
@@ -583,4 +609,4 @@ function sanitize(name) {
583
609
  return name.replace(/^@[^/]+\//, "").toLowerCase().replace(/[^a-z0-9_-]+/g, "-").replace(/^-+|-+$/g, "") || "repo";
584
610
  }
585
611
  //#endregion
586
- export { composeArgs as a, composePs as c, lintComposeFiles as d, debug as f, redact as h, getContainerHealth as i, composeUp as l, isEnvVerbose as m, runDockerCheck as n, composeDown as o, debugExec as p, checkHttpHealth as r, composeLogs as s, deriveProjectName as t, createRealExecutor as u };
612
+ export { composeArgs as a, composePs as c, lintComposeFiles as d, parseComposeYaml as f, redact as g, isEnvVerbose as h, getContainerHealth as i, composeUp as l, debugExec as m, runDockerCheck as n, composeDown as o, debug as p, checkHttpHealth as r, composeLogs as s, deriveProjectName as t, createRealExecutor as u };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bensandee/tooling",
3
- "version": "0.65.0",
3
+ "version": "0.66.0",
4
4
  "description": "CLI tool to bootstrap and maintain standardized TypeScript project tooling",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -56,7 +56,7 @@
56
56
  "prettier": "3.8.4",
57
57
  "release-it": "20.2.0",
58
58
  "tsdown": "0.22.3",
59
- "@bensandee/claude-hooks": "0.9.0"
59
+ "@bensandee/claude-hooks": "0.10.0"
60
60
  },
61
61
  "scripts": {
62
62
  "build": "tsdown",