@vttforge/cli 0.8.0 → 0.9.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
@@ -1,5 +1,22 @@
1
1
  # @vttforge/cli
2
2
 
3
+ ## 0.9.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 2224420: Target Foundry v14.
8
+
9
+ - `vttforge init` writes `"type"` into the manifest and sets `compatibility` to `{ "minimum": "14", "verified": "14" }`. The system templates no longer unregister the core sheets, because v14 registers none.
10
+ - `vttforge audit` gains six rules for the v13 code v14 broke or deprecated: bare utility globals such as `mergeObject` (`VTTF-AUDIT-011`, HIGH), `-=` / `==` update keys (012), `rollMode` (013), whole-array `CONFIG.statusEffects` assignment (014), `legacyTransferral` (015) and numeric Active Effect modes (016). `VTTF-AUDIT-002` is now HIGH: v14 dropped the shim for the flat `gridDistance` / `gridUnits` keys.
11
+
12
+ ## 0.8.1
13
+
14
+ ### Patch Changes
15
+
16
+ - 0034209: Follow the `@vttforge/core` and `@vttforge/vite-plugin` minors in the scaffold's pins, so a new project gets the decorators and the build that lowers them.
17
+
18
+ On a `0.x` version a caret pins the minor, so the old pins would have kept new projects on the releases before them. The templates ship inside this package, so the corrected pins only reach anyone when the CLI is published too.
19
+
3
20
  ## 0.8.0
4
21
 
5
22
  ### Minor Changes
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @vttforge/cli
2
2
 
3
- Scaffold, dev loop, release build and audit for Foundry VTT v13+ systems and modules.
3
+ Scaffold, dev loop, release build and audit for Foundry VTT v14+ systems and modules.
4
4
 
5
5
  ```bash
6
6
  pnpm create vttforge my-system # same as: npx @vttforge/cli init my-system
@@ -22,7 +22,7 @@ vttforge audit [dir] [--json] [--strict]
22
22
 
23
23
  **`build`** runs the production build and writes `<id>-<version>.zip` at the project root with the manifest at the top level, which is what foundryvtt.com expects. `LICENSE`, `README.md` and `CHANGELOG.md` go in when present.
24
24
 
25
- **`audit`** checks the manifest, the source and the templates against ten v13 breakages that fail quietly: the `flags.hotReload` shape, deprecated grid fields, the v12 `styles` shape, `HTMLField`/`FilePathField` paths missing from `documentTypes`, `TypeDataModel` without `prepareBaseData`, a bad `_addDataFieldMigrations` override, token attributes that do not point at a `{ value, max }` field, a sheet template that opens a `<form>` the sheet already is, a declared subtype with no name in any language file, and a `template.json` that erases the metadata `system.json` declares for the same type. `--json` for machines; `--strict` exits non-zero on any finding rather than only on HIGH.
25
+ **`audit`** checks the manifest, the source and the templates against the v14 breakages that fail quietly: the `flags.hotReload` shape, the removed grid fields, the v12 `styles` shape, `HTMLField`/`FilePathField` paths missing from `documentTypes`, `TypeDataModel` without `prepareBaseData`, a bad `_addDataFieldMigrations` override, token attributes that do not point at a `{ value, max }` field, a sheet template that opens a `<form>` the sheet already is, a declared subtype with no name in any language file, a `template.json` that erases the metadata `system.json` declares for the same type, and the v13 code v14 broke or deprecated: bare `mergeObject`-style globals, `-=` update keys, `rollMode`, whole-array `CONFIG.statusEffects` assignment, `legacyTransferral`, numeric Active Effect modes. `--json` for machines; `--strict` exits non-zero on any finding rather than only on HIGH.
26
26
 
27
27
  ## As a library
28
28
 
package/dist/bin.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { i as runDev, l as runAuditCommand, n as ScaffoldError, o as runBuild, r as runInit, t as VTTFORGE_CLI_VERSION } from "./src-uGulrZd5.mjs";
2
+ import { i as runDev, l as runAuditCommand, n as ScaffoldError, o as runBuild, r as runInit, t as VTTFORGE_CLI_VERSION } from "./src-BAHJHuJ7.mjs";
3
3
  import { defineCommand, runMain } from "citty";
4
4
  //#region src/cli.ts
5
5
  /**
@@ -140,7 +140,7 @@ const build = defineCommand({
140
140
  const audit = defineCommand({
141
141
  meta: {
142
142
  name: "audit",
143
- description: "Scan a system/module project for the seven v13 manifest + code footguns"
143
+ description: "Scan a system/module project for the v14 manifest, source and template breakages that fail quietly"
144
144
  },
145
145
  args: {
146
146
  path: {
@@ -177,7 +177,7 @@ const main = defineCommand({
177
177
  meta: {
178
178
  name: "vttforge",
179
179
  version: VTTFORGE_CLI_VERSION,
180
- description: "VTTForge CLI: scaffold, dev, build and audit for Foundry v13+ systems and modules"
180
+ description: "VTTForge CLI: scaffold, dev, build and audit for Foundry v14+ systems and modules"
181
181
  },
182
182
  subCommands: {
183
183
  init,
package/dist/bin.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"bin.mjs","names":[],"sources":["../src/cli.ts","../src/bin.ts"],"sourcesContent":["/**\n * vttforge command tree.\n *\n * Kept apart from `bin.ts`, which only runs it. Argument definitions are the\n * CLI's contract with its users (`--no-install` skipping the install, an\n * alias resolving to its canonical name) and a module that calls `runMain`\n * on import cannot be reached by a test. Exporting the commands from here\n * lets the suite parse real argv against the real definitions.\n */\nimport { defineCommand } from 'citty';\nimport { runAuditCommand } from './commands/audit.js';\nimport { runBuild } from './commands/build.js';\nimport { runDev } from './commands/dev.js';\nimport { runInit, ScaffoldError } from './commands/init.js';\nimport { VTTFORGE_CLI_VERSION } from './index.js';\n\nexport const init = defineCommand({\n meta: {\n name: 'init',\n description: 'Scaffold a new Foundry VTT system or module from a VTTForge template',\n },\n args: {\n name: {\n type: 'positional',\n description: 'Directory name for the new system/module (also the default manifest id)',\n required: false,\n },\n type: {\n type: 'string',\n description: 'Package type: system | module',\n },\n lang: {\n type: 'string',\n description: 'Language: ts | js',\n },\n id: {\n type: 'string',\n description: 'Manifest id (defaults to a slug of the directory name)',\n },\n title: {\n type: 'string',\n description: 'Human-readable title shown in Foundry setup screens',\n },\n description: {\n type: 'string',\n description: 'One-line description for the manifest',\n },\n author: {\n type: 'string',\n description: 'Author name for the manifest (defaults to the git author)',\n },\n license: {\n type: 'string',\n description: 'SPDX license id (default MIT)',\n },\n // Without a terminal there is nothing for a prompt to read, so it waits\n // forever. This flag takes the defaults instead, and the scaffolder\n // also assumes it when stdin is not a TTY, so CI need not pass it.\n yes: {\n type: 'boolean',\n alias: 'y',\n default: false,\n description: 'Accept defaults for anything not passed, without prompting',\n },\n // Citty parses `--no-X` as `args.X === false`, so define affirmative\n // flags with a true default. `--no-install` then yields `install: false`\n // which we forward as `noInstall: true`.\n install: {\n type: 'boolean',\n default: true,\n description: 'Install dependencies after scaffold (use --no-install to skip)',\n },\n git: {\n type: 'boolean',\n default: true,\n description: 'Initialize a git repository after scaffold (use --no-git to skip)',\n },\n },\n async run({ args }) {\n try {\n await runInit({\n name: typeof args.name === 'string' ? args.name : undefined,\n type: typeof args.type === 'string' ? (args.type as 'system' | 'module') : undefined,\n lang: typeof args.lang === 'string' ? (args.lang as 'ts' | 'js') : undefined,\n id: typeof args.id === 'string' ? args.id : undefined,\n title: typeof args.title === 'string' ? args.title : undefined,\n description: typeof args.description === 'string' ? args.description : undefined,\n author: typeof args.author === 'string' ? args.author : undefined,\n license: typeof args.license === 'string' ? args.license : undefined,\n yes: args.yes === true,\n noInstall: args.install === false,\n noGit: args.git === false,\n });\n } catch (err) {\n // ScaffoldError already surfaced its message via `p.cancel`; anything\n // else is a real crash worth showing. Either way the bin exits 1.\n if (!(err instanceof ScaffoldError)) {\n console.error(err instanceof Error ? err.message : String(err));\n }\n process.exit(1);\n }\n },\n});\n\nexport const dev = defineCommand({\n meta: {\n name: 'dev',\n description: 'Symlink dist/ into Foundry Data and run vite build --watch',\n },\n args: {\n 'foundry-data': {\n type: 'string',\n alias: 'data-dir',\n description:\n 'Override the Foundry user-data directory (skips env / config / first-run prompt)',\n },\n 'hmr-port': {\n type: 'string',\n description: 'Port for the hot reload bridge (default 31313)',\n },\n },\n async run({ args }) {\n // Citty surfaces aliases under the canonical name. Belt-and-suspenders:\n // accept either spelling so older docs and muscle memory keep working.\n const explicit =\n (typeof args['foundry-data'] === 'string' ? args['foundry-data'] : undefined) ??\n (typeof args['data-dir'] === 'string' ? args['data-dir'] : undefined);\n // A non-numeric port is the user's typo, not a reason to fall back to a\n // port they did not ask for. Say so and stop.\n const rawPort = typeof args['hmr-port'] === 'string' ? args['hmr-port'] : undefined;\n const hmrPort = rawPort === undefined ? undefined : Number(rawPort);\n if (hmrPort !== undefined && !Number.isInteger(hmrPort)) {\n console.error(`--hmr-port expects a whole number, got \\`${rawPort}\\`.`);\n process.exit(1);\n }\n try {\n await runDev({ dataDir: explicit, hmrPort });\n } catch (err) {\n console.error(err instanceof Error ? err.message : String(err));\n process.exit(1);\n }\n },\n});\n\nexport const build = defineCommand({\n meta: {\n name: 'build',\n description: 'Run vite build (production) and emit <id>-<version>.zip for foundryvtt.com',\n },\n async run() {\n try {\n await runBuild();\n } catch (err) {\n console.error(err instanceof Error ? err.message : String(err));\n process.exit(1);\n }\n },\n});\n\nexport const audit = defineCommand({\n meta: {\n name: 'audit',\n description: 'Scan a system/module project for the seven v13 manifest + code footguns',\n },\n args: {\n path: {\n type: 'positional',\n description: 'Project root to scan (defaults to the current directory)',\n required: false,\n },\n json: {\n type: 'boolean',\n default: false,\n description: 'Emit a machine-readable JSON report instead of markdown',\n },\n strict: {\n type: 'boolean',\n default: false,\n description: 'Exit non-zero on any finding (default: only HIGH triggers a non-zero exit)',\n },\n },\n async run({ args }) {\n try {\n const result = await runAuditCommand({\n cwd: typeof args.path === 'string' ? args.path : undefined,\n format: args.json === true ? 'json' : 'markdown',\n strict: args.strict === true,\n });\n // Set exitCode instead of calling process.exit so any pending stdout\n // writes (the JSON / markdown report) get flushed before the process\n // tears down. process.exit(1) would truncate large reports on the\n // exact runs CI needs them intact.\n if (result.exitCode !== 0) process.exitCode = result.exitCode;\n } catch (err) {\n console.error(err instanceof Error ? err.message : String(err));\n process.exitCode = 1;\n }\n },\n});\n\nexport const main = defineCommand({\n meta: {\n name: 'vttforge',\n version: VTTFORGE_CLI_VERSION,\n description:\n 'VTTForge CLI: scaffold, dev, build and audit for Foundry v13+ systems and modules',\n },\n subCommands: {\n init,\n dev,\n build,\n audit,\n },\n});\n","#!/usr/bin/env node\n/**\n * vttforge bin: the executable entry.\n *\n * Nothing but the launch. The command tree lives in `cli.ts` so tests can\n * import it without running the CLI.\n */\nimport { runMain } from 'citty';\nimport { main } from './cli.js';\n\nrunMain(main);\n"],"mappings":";;;;;;;;;;;;;AAgBA,MAAa,OAAO,cAAc;CAChC,MAAM;EACJ,MAAM;EACN,aAAa;CACf;CACA,MAAM;EACJ,MAAM;GACJ,MAAM;GACN,aAAa;GACb,UAAU;EACZ;EACA,MAAM;GACJ,MAAM;GACN,aAAa;EACf;EACA,MAAM;GACJ,MAAM;GACN,aAAa;EACf;EACA,IAAI;GACF,MAAM;GACN,aAAa;EACf;EACA,OAAO;GACL,MAAM;GACN,aAAa;EACf;EACA,aAAa;GACX,MAAM;GACN,aAAa;EACf;EACA,QAAQ;GACN,MAAM;GACN,aAAa;EACf;EACA,SAAS;GACP,MAAM;GACN,aAAa;EACf;EAIA,KAAK;GACH,MAAM;GACN,OAAO;GACP,SAAS;GACT,aAAa;EACf;EAIA,SAAS;GACP,MAAM;GACN,SAAS;GACT,aAAa;EACf;EACA,KAAK;GACH,MAAM;GACN,SAAS;GACT,aAAa;EACf;CACF;CACA,MAAM,IAAI,EAAE,QAAQ;EAClB,IAAI;GACF,MAAM,QAAQ;IACZ,MAAM,OAAO,KAAK,SAAS,WAAW,KAAK,OAAO,KAAA;IAClD,MAAM,OAAO,KAAK,SAAS,WAAY,KAAK,OAA+B,KAAA;IAC3E,MAAM,OAAO,KAAK,SAAS,WAAY,KAAK,OAAuB,KAAA;IACnE,IAAI,OAAO,KAAK,OAAO,WAAW,KAAK,KAAK,KAAA;IAC5C,OAAO,OAAO,KAAK,UAAU,WAAW,KAAK,QAAQ,KAAA;IACrD,aAAa,OAAO,KAAK,gBAAgB,WAAW,KAAK,cAAc,KAAA;IACvE,QAAQ,OAAO,KAAK,WAAW,WAAW,KAAK,SAAS,KAAA;IACxD,SAAS,OAAO,KAAK,YAAY,WAAW,KAAK,UAAU,KAAA;IAC3D,KAAK,KAAK,QAAQ;IAClB,WAAW,KAAK,YAAY;IAC5B,OAAO,KA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;CACf;CACA,MAAM;EACJ,MAAM;GACJ,MAAM;GACN,aAAa;GACb,UAAU;EACZ;EACA,MAAM;GACJ,MAAM;GACN,SAAS;GACT,aAAa;EACf;EACA,QAAQ;GACN,MAAM;GACN,SAAS;GACT,aAAa;EACf;CACF;CACA,MAAM,IAAI,EAAE,QAAQ;EAClB,IAAI;GACF,MAAM,SAAS,MAAM,gBAAgB;IACnC,KAAK,OAAO,KAAK,SAAS,WAAW,KAAK,OAAO,KAAA;IACjD,QAAQ,KAAK,SAAS,OAAO,SAAS;IACtC,QAAQ,KAAK,WAAW;GAC1B,CAAC;GAKD,IAAI,OAAO,aAAa,GAAG,QAAQ,WAAW,OAAO;EACvD,SAAS,KAAK;GACZ,QAAQ,MAAM,eAAe,QAAQ,IAAI,UAAU,OAAO,GAAG,CAAC;GAC9D,QAAQ,WAAW;EACrB;CACF;AACF,CAAC;AAED,MAAa,OAAO,cAAc;CAChC,MAAM;EACJ,MAAM;EACN,SAAS;EACT,aACE;CACJ;CACA,aAAa;EACX;EACA;EACA;EACA;CACF;AACF,CAAC;;;;;;;;;AC3MD,QAAQ,IAAI"}
1
+ {"version":3,"file":"bin.mjs","names":[],"sources":["../src/cli.ts","../src/bin.ts"],"sourcesContent":["/**\n * vttforge command tree.\n *\n * Kept apart from `bin.ts`, which only runs it. Argument definitions are the\n * CLI's contract with its users (`--no-install` skipping the install, an\n * alias resolving to its canonical name) and a module that calls `runMain`\n * on import cannot be reached by a test. Exporting the commands from here\n * lets the suite parse real argv against the real definitions.\n */\nimport { defineCommand } from 'citty';\nimport { runAuditCommand } from './commands/audit.js';\nimport { runBuild } from './commands/build.js';\nimport { runDev } from './commands/dev.js';\nimport { runInit, ScaffoldError } from './commands/init.js';\nimport { VTTFORGE_CLI_VERSION } from './index.js';\n\nexport const init = defineCommand({\n meta: {\n name: 'init',\n description: 'Scaffold a new Foundry VTT system or module from a VTTForge template',\n },\n args: {\n name: {\n type: 'positional',\n description: 'Directory name for the new system/module (also the default manifest id)',\n required: false,\n },\n type: {\n type: 'string',\n description: 'Package type: system | module',\n },\n lang: {\n type: 'string',\n description: 'Language: ts | js',\n },\n id: {\n type: 'string',\n description: 'Manifest id (defaults to a slug of the directory name)',\n },\n title: {\n type: 'string',\n description: 'Human-readable title shown in Foundry setup screens',\n },\n description: {\n type: 'string',\n description: 'One-line description for the manifest',\n },\n author: {\n type: 'string',\n description: 'Author name for the manifest (defaults to the git author)',\n },\n license: {\n type: 'string',\n description: 'SPDX license id (default MIT)',\n },\n // Without a terminal there is nothing for a prompt to read, so it waits\n // forever. This flag takes the defaults instead, and the scaffolder\n // also assumes it when stdin is not a TTY, so CI need not pass it.\n yes: {\n type: 'boolean',\n alias: 'y',\n default: false,\n description: 'Accept defaults for anything not passed, without prompting',\n },\n // Citty parses `--no-X` as `args.X === false`, so define affirmative\n // flags with a true default. `--no-install` then yields `install: false`\n // which we forward as `noInstall: true`.\n install: {\n type: 'boolean',\n default: true,\n description: 'Install dependencies after scaffold (use --no-install to skip)',\n },\n git: {\n type: 'boolean',\n default: true,\n description: 'Initialize a git repository after scaffold (use --no-git to skip)',\n },\n },\n async run({ args }) {\n try {\n await runInit({\n name: typeof args.name === 'string' ? args.name : undefined,\n type: typeof args.type === 'string' ? (args.type as 'system' | 'module') : undefined,\n lang: typeof args.lang === 'string' ? (args.lang as 'ts' | 'js') : undefined,\n id: typeof args.id === 'string' ? args.id : undefined,\n title: typeof args.title === 'string' ? args.title : undefined,\n description: typeof args.description === 'string' ? args.description : undefined,\n author: typeof args.author === 'string' ? args.author : undefined,\n license: typeof args.license === 'string' ? args.license : undefined,\n yes: args.yes === true,\n noInstall: args.install === false,\n noGit: args.git === false,\n });\n } catch (err) {\n // ScaffoldError already surfaced its message via `p.cancel`; anything\n // else is a real crash worth showing. Either way the bin exits 1.\n if (!(err instanceof ScaffoldError)) {\n console.error(err instanceof Error ? err.message : String(err));\n }\n process.exit(1);\n }\n },\n});\n\nexport const dev = defineCommand({\n meta: {\n name: 'dev',\n description: 'Symlink dist/ into Foundry Data and run vite build --watch',\n },\n args: {\n 'foundry-data': {\n type: 'string',\n alias: 'data-dir',\n description:\n 'Override the Foundry user-data directory (skips env / config / first-run prompt)',\n },\n 'hmr-port': {\n type: 'string',\n description: 'Port for the hot reload bridge (default 31313)',\n },\n },\n async run({ args }) {\n // Citty surfaces aliases under the canonical name. Belt-and-suspenders:\n // accept either spelling so older docs and muscle memory keep working.\n const explicit =\n (typeof args['foundry-data'] === 'string' ? args['foundry-data'] : undefined) ??\n (typeof args['data-dir'] === 'string' ? args['data-dir'] : undefined);\n // A non-numeric port is the user's typo, not a reason to fall back to a\n // port they did not ask for. Say so and stop.\n const rawPort = typeof args['hmr-port'] === 'string' ? args['hmr-port'] : undefined;\n const hmrPort = rawPort === undefined ? undefined : Number(rawPort);\n if (hmrPort !== undefined && !Number.isInteger(hmrPort)) {\n console.error(`--hmr-port expects a whole number, got \\`${rawPort}\\`.`);\n process.exit(1);\n }\n try {\n await runDev({ dataDir: explicit, hmrPort });\n } catch (err) {\n console.error(err instanceof Error ? err.message : String(err));\n process.exit(1);\n }\n },\n});\n\nexport const build = defineCommand({\n meta: {\n name: 'build',\n description: 'Run vite build (production) and emit <id>-<version>.zip for foundryvtt.com',\n },\n async run() {\n try {\n await runBuild();\n } catch (err) {\n console.error(err instanceof Error ? err.message : String(err));\n process.exit(1);\n }\n },\n});\n\nexport const audit = defineCommand({\n meta: {\n name: 'audit',\n description:\n 'Scan a system/module project for the v14 manifest, source and template breakages that fail quietly',\n },\n args: {\n path: {\n type: 'positional',\n description: 'Project root to scan (defaults to the current directory)',\n required: false,\n },\n json: {\n type: 'boolean',\n default: false,\n description: 'Emit a machine-readable JSON report instead of markdown',\n },\n strict: {\n type: 'boolean',\n default: false,\n description: 'Exit non-zero on any finding (default: only HIGH triggers a non-zero exit)',\n },\n },\n async run({ args }) {\n try {\n const result = await runAuditCommand({\n cwd: typeof args.path === 'string' ? args.path : undefined,\n format: args.json === true ? 'json' : 'markdown',\n strict: args.strict === true,\n });\n // Set exitCode instead of calling process.exit so any pending stdout\n // writes (the JSON / markdown report) get flushed before the process\n // tears down. process.exit(1) would truncate large reports on the\n // exact runs CI needs them intact.\n if (result.exitCode !== 0) process.exitCode = result.exitCode;\n } catch (err) {\n console.error(err instanceof Error ? err.message : String(err));\n process.exitCode = 1;\n }\n },\n});\n\nexport const main = defineCommand({\n meta: {\n name: 'vttforge',\n version: VTTFORGE_CLI_VERSION,\n description:\n 'VTTForge CLI: scaffold, dev, build and audit for Foundry v14+ systems and modules',\n },\n subCommands: {\n init,\n dev,\n build,\n audit,\n },\n});\n","#!/usr/bin/env node\n/**\n * vttforge bin: the executable entry.\n *\n * Nothing but the launch. The command tree lives in `cli.ts` so tests can\n * import it without running the CLI.\n */\nimport { runMain } from 'citty';\nimport { main } from './cli.js';\n\nrunMain(main);\n"],"mappings":";;;;;;;;;;;;;AAgBA,MAAa,OAAO,cAAc;CAChC,MAAM;EACJ,MAAM;EACN,aAAa;CACf;CACA,MAAM;EACJ,MAAM;GACJ,MAAM;GACN,aAAa;GACb,UAAU;EACZ;EACA,MAAM;GACJ,MAAM;GACN,aAAa;EACf;EACA,MAAM;GACJ,MAAM;GACN,aAAa;EACf;EACA,IAAI;GACF,MAAM;GACN,aAAa;EACf;EACA,OAAO;GACL,MAAM;GACN,aAAa;EACf;EACA,aAAa;GACX,MAAM;GACN,aAAa;EACf;EACA,QAAQ;GACN,MAAM;GACN,aAAa;EACf;EACA,SAAS;GACP,MAAM;GACN,aAAa;EACf;EAIA,KAAK;GACH,MAAM;GACN,OAAO;GACP,SAAS;GACT,aAAa;EACf;EAIA,SAAS;GACP,MAAM;GACN,SAAS;GACT,aAAa;EACf;EACA,KAAK;GACH,MAAM;GACN,SAAS;GACT,aAAa;EACf;CACF;CACA,MAAM,IAAI,EAAE,QAAQ;EAClB,IAAI;GACF,MAAM,QAAQ;IACZ,MAAM,OAAO,KAAK,SAAS,WAAW,KAAK,OAAO,KAAA;IAClD,MAAM,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
- * The audit catalog covers ten v13 footguns. Each rule produces zero or more `RuleResult` entries; the
5
+ * The audit catalog covers the breakages that fail quietly on v14. Each rule produces zero or more `RuleResult` entries; the
6
6
  * orchestrator aggregates them into an `AuditReport` which the reporter
7
7
  * renders as JSON or markdown.
8
8
  *
@@ -39,7 +39,7 @@ interface AuditReport {
39
39
  };
40
40
  }
41
41
  /** Severity rank for sorting (HIGH first). */
42
- declare const SEVERITY_RANK: Record<Severity, number>;
42
+ export declare const SEVERITY_RANK: Record<Severity, number>;
43
43
  /**
44
44
  * A rule is a plain function over the project root. Manifest rules parse
45
45
  * `system.json` / `module.json`; source rules walk `scripts/` / `src/`.
@@ -52,18 +52,18 @@ type RuleFn = (cwd: string) => Promise<RuleResult[]> | RuleResult[];
52
52
  interface RunAuditOptions {
53
53
  cwd: string;
54
54
  }
55
- declare function runAudit(options: RunAuditOptions): Promise<AuditReport>;
55
+ export declare function runAudit(options: RunAuditOptions): Promise<AuditReport>;
56
56
  //#endregion
57
57
  //#region src/audit/manifest-rules.d.ts
58
- declare function runManifestRules(cwd: string): Promise<RuleResult[]>;
58
+ export declare function runManifestRules(cwd: string): Promise<RuleResult[]>;
59
59
  //#endregion
60
60
  //#region src/audit/reporter.d.ts
61
61
  type ReportFormat = 'json' | 'markdown';
62
- declare function formatReport(report: AuditReport, format: ReportFormat): string;
62
+ export declare function formatReport(report: AuditReport, format: ReportFormat): string;
63
63
  //#endregion
64
64
  //#region src/audit/source-rules.d.ts
65
65
  /** Entry point: gather everything once, then dispatch to the per-file rules. */
66
- declare function runSourceRules(cwd: string): Promise<RuleResult[]>;
66
+ export declare function runSourceRules(cwd: string): Promise<RuleResult[]>;
67
67
  //#endregion
68
68
  //#region src/commands/audit.d.ts
69
69
  interface AuditOptions {
@@ -88,7 +88,7 @@ interface AuditResult {
88
88
  * @experimental Shape is unproven: no consumer has asked for this yet. It can
89
89
  * change in a minor.
90
90
  */
91
- declare function runAuditCommand(options?: AuditOptions): Promise<AuditResult>;
91
+ export declare function runAuditCommand(options?: AuditOptions): Promise<AuditResult>;
92
92
  //#endregion
93
93
  //#region src/manifest.d.ts
94
94
  /**
@@ -123,7 +123,7 @@ interface FoundryManifest {
123
123
  * @experimental Shape is unproven: no consumer has asked for this yet.
124
124
  * It can change in a minor.
125
125
  */
126
- declare function readManifest(distDir: string): Promise<FoundryManifest>;
126
+ export declare function readManifest(distDir: string): Promise<FoundryManifest>;
127
127
  //#endregion
128
128
  //#region src/commands/build.d.ts
129
129
  interface BuildOptions {
@@ -137,7 +137,7 @@ interface BuildOptions {
137
137
  * @experimental Shape is unproven: no consumer has asked for this yet.
138
138
  * It can change in a minor.
139
139
  */
140
- declare function emitReleaseZip(opts: {
140
+ export declare function emitReleaseZip(opts: {
141
141
  cwd: string;
142
142
  }): Promise<{
143
143
  zipFile: string;
@@ -148,7 +148,7 @@ declare function emitReleaseZip(opts: {
148
148
  * @experimental Shape is unproven: no consumer has asked for this yet. It can
149
149
  * change in a minor.
150
150
  */
151
- declare function runBuild(options?: BuildOptions): Promise<void>;
151
+ export declare function runBuild(options?: BuildOptions): Promise<void>;
152
152
  //#endregion
153
153
  //#region src/commands/dev.d.ts
154
154
  interface DevOptions {
@@ -163,7 +163,7 @@ interface DevOptions {
163
163
  * @experimental Shape is unproven: no consumer has asked for this yet. It can
164
164
  * change in a minor.
165
165
  */
166
- declare function runDev(options?: DevOptions): Promise<void>;
166
+ export declare function runDev(options?: DevOptions): Promise<void>;
167
167
  //#endregion
168
168
  //#region src/commands/init.d.ts
169
169
  /**
@@ -219,10 +219,10 @@ type TemplateVariant = 'system-ts' | 'system-js' | 'module-ts' | 'module-js';
219
219
  * catch and recover. The `vttforge` bin wraps `runInit` in a top-level
220
220
  * handler that prints the message and exits with code 1.
221
221
  */
222
- declare class ScaffoldError extends Error {
222
+ export declare class ScaffoldError extends Error {
223
223
  constructor(message: string);
224
224
  }
225
- declare function runInit(options?: InitOptions): Promise<void>;
225
+ export declare function runInit(options?: InitOptions): Promise<void>;
226
226
  //#endregion
227
227
  //#region src/zip.d.ts
228
228
  /**
@@ -255,10 +255,10 @@ interface EmitZipResult {
255
255
  * @experimental Shape is unproven: no consumer has asked for this yet. It can
256
256
  * change in a minor.
257
257
  */
258
- declare function emitZip(opts: EmitZipOptions): Promise<EmitZipResult>;
258
+ export declare function emitZip(opts: EmitZipOptions): Promise<EmitZipResult>;
259
259
  //#endregion
260
260
  //#region src/index.d.ts
261
- declare const VTTFORGE_CLI_VERSION: string;
261
+ export declare const VTTFORGE_CLI_VERSION: string;
262
262
  //#endregion
263
- export { type AuditOptions, type AuditReport, type AuditResult, type BuildOptions, type DevOptions, type EmitZipOptions, type EmitZipResult, type FoundryManifest, type InitOptions, type PackageType, type ReportFormat, type ResolvedInitOptions, type RuleFn, type RuleResult, type RunAuditOptions, SEVERITY_RANK, ScaffoldError, type Severity, type TemplateVariant, VTTFORGE_CLI_VERSION, emitReleaseZip, emitZip, formatReport, readManifest, runAudit, runAuditCommand, runBuild, runDev, runInit, runManifestRules, runSourceRules };
263
+ export type { AuditOptions, AuditReport, AuditResult, BuildOptions, DevOptions, EmitZipOptions, EmitZipResult, FoundryManifest, InitOptions, PackageType, ReportFormat, ResolvedInitOptions, RuleFn, RuleResult, RunAuditOptions, Severity, TemplateVariant };
264
264
  //# sourceMappingURL=index.d.mts.map
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { a as emitReleaseZip, c as readManifest, d as runAudit, f as SEVERITY_RANK, i as runDev, l as runAuditCommand, m as runManifestRules, n as ScaffoldError, o as runBuild, p as runSourceRules, r as runInit, s as emitZip, t as VTTFORGE_CLI_VERSION, u as formatReport } from "./src-uGulrZd5.mjs";
1
+ import { a as emitReleaseZip, c as readManifest, d as runAudit, f as SEVERITY_RANK, i as runDev, l as runAuditCommand, m as runManifestRules, n as ScaffoldError, o as runBuild, p as runSourceRules, r as runInit, s as emitZip, t as VTTFORGE_CLI_VERSION, u as formatReport } from "./src-BAHJHuJ7.mjs";
2
2
  export { SEVERITY_RANK, ScaffoldError, VTTFORGE_CLI_VERSION, emitReleaseZip, emitZip, formatReport, readManifest, runAudit, runAuditCommand, runBuild, runDev, runInit, runManifestRules, runSourceRules };