@vttforge/cli 0.18.7 → 0.18.9

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,26 @@
1
1
  # @vttforge/cli
2
2
 
3
+ ## 0.18.9
4
+
5
+ ### Patch Changes
6
+
7
+ - 2609f3f: The character sheet in the system templates no longer prints a version in its footer. It said `@vttforge/styles · v0.2` whatever version the project had installed.
8
+
9
+ ## 0.18.8
10
+
11
+ ### Patch Changes
12
+
13
+ - 5ba1131: The scaffold templates pinned `packageManager: pnpm@11.25.0` and
14
+ `pnpm/action-setup@v4`, both a major version behind current pnpm (12.4.1)
15
+ and the action VTTForge's own CI already runs (`@v6`). A project scaffolded
16
+ today inherited both stale pins. Bumped all four templates
17
+ (`system-ts`, `system-js`, `module-ts`, `module-js`) to match.
18
+ - 39ca019: READMEs led with `pnpm add`/`pnpm create` even though VTTForge's own
19
+ toolchain has run on Bun since the pnpm-to-bun migration. Every install
20
+ and scaffold example now leads with `bun`; the CLI's multi-package-manager
21
+ detection stays real and unchanged, `pnpm`/`npm`/`yarn` still work and are
22
+ listed as alternatives where they were already shown that way.
23
+
3
24
  ## 0.18.7
4
25
 
5
26
  ### Patch Changes
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  Scaffold, dev loop, release build, lint and audit for Foundry VTT v14+ systems and modules.
4
4
 
5
5
  ```bash
6
- pnpm create vttforge my-system # same as: npx @vttforge/cli init my-system
6
+ bun create vttforge my-system # same as: bunx @vttforge/cli init my-system
7
7
  ```
8
8
 
9
9
  ## Commands
@@ -18,7 +18,7 @@ vttforge audit [dir] [--json] [--strict]
18
18
  vttforge migrate [dir] [--write] [--strict] [--json] [--data-models] [--sheets]
19
19
  ```
20
20
 
21
- **`init`** writes a runnable system or module into `<name>/` from one of four templates (`system-ts`, `system-js`, `module-ts`, `module-js`). It asks for what you did not pass, or takes defaults with `--yes`, so it works in CI. It detects the package manager that invoked it (`pnpm`, `npm`, `bun`, `yarn`), installs, and runs `git init`.
21
+ **`init`** writes a runnable system or module into `<name>/` from one of four templates (`system-ts`, `system-js`, `module-ts`, `module-js`). It asks for what you did not pass, or takes defaults with `--yes`, so it works in CI. It detects the package manager that invoked it (`bun`, `npm`, `pnpm`, `yarn`), installs, and runs `git init`.
22
22
 
23
23
  **`dev`** builds once, links `dist/` into Foundry's data directory under `Data/<systems|modules>/<id>/`, installs the `@vttforge/dev-module` companion, and watches. A saved template redraws the open sheet in place, and a saved stylesheet swaps the CSS. The first run asks where Foundry keeps its data and saves the answer to `.vttforge/config.json`; `--foundry-data` or `FOUNDRY_DATA_DIR` overrides it. If Foundry runs in a container it cannot follow the symlink, and the command prints the compose mount to use instead.
24
24
 
package/dist/bin.mjs CHANGED
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
- import { a as runDev, b as maskComments, g as definesName, h as bareUsePattern, i as runInit, m as LEGACY_GLOBALS, n as runLintCommand, p as REMOVED_UTILS, r as ScaffoldError, s as runBuild, t as VTTFORGE_CLI_VERSION, u as runAuditCommand, v as _internal, x as runReleaseRules } from "./src-DE_Jtt_1.mjs";
3
- import { existsSync } from "node:fs";
2
+ import { defineCittyPlugin, defineCommand, runMain } from "citty";
3
+ import { a as runDev, b as maskComments, g as definesName, h as bareUsePattern, i as runInit, m as LEGACY_GLOBALS, n as runLintCommand, p as REMOVED_UTILS, r as ScaffoldError, s as runBuild, t as VTTFORGE_CLI_VERSION, u as runAuditCommand, v as _internal, x as runReleaseRules } from "./src-BXQZFdDl.mjs";
4
4
  import { dirname, join, relative, resolve } from "node:path";
5
+ import { existsSync } from "node:fs";
5
6
  import { mkdir, readFile, stat, writeFile } from "node:fs/promises";
6
- import { defineCittyPlugin, defineCommand, runMain } from "citty";
7
7
  import { parse } from "@babel/parser";
8
- //#region src/migrate/data-models.ts
8
+ // src/migrate/data-models.ts
9
9
  const RICH_TEXT_KEYS = /^(description|biography|bio|notes|details)$/i;
10
10
  function fieldFor(key, value, path, notes, indent) {
11
11
  const next = `${indent} `;
@@ -112,8 +112,7 @@ function planDataModels(template, { style = "plain", lang = "js", dir = "scripts
112
112
  notes
113
113
  };
114
114
  }
115
- //#endregion
116
- //#region src/migrate/sheet-templates.ts
115
+ // src/migrate/sheet-templates.ts
117
116
  /**
118
117
  * One opening tag: the name, the attribute run, and the self-closing slash.
119
118
  * Exactly three capture groups — `editTemplate` reads the replacer's `offset`
@@ -234,8 +233,7 @@ function editTemplate(template, opts) {
234
233
  formRoot: /^\s*<form\b/.test(template)
235
234
  };
236
235
  }
237
- //#endregion
238
- //#region src/migrate/parse.ts
236
+ // src/migrate/parse.ts
239
237
  /**
240
238
  * The parse side of `migrate --sheets`: an AST for the class structure, and
241
239
  * the few lookups the planner needs. Bodies are never re-printed from the
@@ -343,8 +341,7 @@ function methodOf(cls, name, opts = {}) {
343
341
  }
344
342
  return null;
345
343
  }
346
- //#endregion
347
- //#region src/migrate/sheet-bodies.ts
344
+ // src/migrate/sheet-bodies.ts
348
345
  /**
349
346
  * Text rewrites applied to method bodies carried over from an Application v1
350
347
  * sheet. Each one is scoped to the slice the planner hands it, so a pattern
@@ -865,8 +862,7 @@ function rewriteDialogs(code) {
865
862
  todos
866
863
  };
867
864
  }
868
- //#endregion
869
- //#region src/migrate/sheet-listeners.ts
865
+ // src/migrate/sheet-listeners.ts
870
866
  const EVENTS = /* @__PURE__ */ new Set([
871
867
  "click",
872
868
  "dblclick",
@@ -1057,8 +1053,7 @@ function extractListeners(cls, source) {
1057
1053
  visit(method.body.body);
1058
1054
  return out;
1059
1055
  }
1060
- //#endregion
1061
- //#region src/migrate/sheet-options.ts
1056
+ // src/migrate/sheet-options.ts
1062
1057
  function keyName(p) {
1063
1058
  if (p.key.type === "Identifier") return p.key.name;
1064
1059
  if (p.key.type === "StringLiteral") return p.key.value;
@@ -1238,8 +1233,7 @@ function renderStatics(opts, tabIds, todo, kind = "sheet", className) {
1238
1233
  lines.push(" };");
1239
1234
  return lines.join("\n");
1240
1235
  }
1241
- //#endregion
1242
- //#region src/migrate/sheets.ts
1236
+ // src/migrate/sheets.ts
1243
1237
  /** v1 lifecycle methods a sheet used to override; V2 has other hooks for the same jobs. */
1244
1238
  const V1_LIFECYCLE = /* @__PURE__ */ new Set([
1245
1239
  "setPosition",
@@ -1479,8 +1473,7 @@ function planSheetFile(relPath, source, opts) {
1479
1473
  notes
1480
1474
  };
1481
1475
  }
1482
- //#endregion
1483
- //#region src/migrate/transforms.ts
1476
+ // src/migrate/transforms.ts
1484
1477
  /**
1485
1478
  * The rewrites `vttforge migrate` applies to a v13 source file.
1486
1479
  *
@@ -2186,8 +2179,7 @@ function topLevelKey(json, key) {
2186
2179
  }
2187
2180
  return null;
2188
2181
  }
2189
- //#endregion
2190
- //#region src/migrate/index.ts
2182
+ // src/migrate/index.ts
2191
2183
  /**
2192
2184
  * `vttforge migrate`: rewrite a v13 project for v14.
2193
2185
  *
@@ -2477,8 +2469,7 @@ function oneLine(text) {
2477
2469
  const flat = text.replace(/\s+/g, " ").trim();
2478
2470
  return flat.length > 100 ? `${flat.slice(0, 97)}...` : flat;
2479
2471
  }
2480
- //#endregion
2481
- //#region src/commands/migrate.ts
2472
+ // src/commands/migrate.ts
2482
2473
  /**
2483
2474
  * `vttforge migrate`: the CLI surface over the v13 → v14 rewrite.
2484
2475
  *
@@ -2513,8 +2504,7 @@ async function runMigrateCommand(options = {}) {
2513
2504
  exitCode: 0
2514
2505
  };
2515
2506
  }
2516
- //#endregion
2517
- //#region src/strict-args.ts
2507
+ // src/strict-args.ts
2518
2508
  /**
2519
2509
  * Refuse a flag the command does not define.
2520
2510
  *
@@ -2572,8 +2562,7 @@ const strictArgs = defineCittyPlugin({
2572
2562
  process.exit(1);
2573
2563
  }
2574
2564
  });
2575
- //#endregion
2576
- //#region src/cli.ts
2565
+ // src/cli.ts
2577
2566
  /**
2578
2567
  * vttforge command tree.
2579
2568
  *
@@ -2878,8 +2867,7 @@ const main = defineCommand({
2878
2867
  migrate
2879
2868
  }
2880
2869
  });
2881
- //#endregion
2882
- //#region src/bin.ts
2870
+ // src/bin.ts
2883
2871
  /**
2884
2872
  * vttforge bin: the executable entry.
2885
2873
  *
@@ -2887,7 +2875,6 @@ const main = defineCommand({
2887
2875
  * import it without running the CLI.
2888
2876
  */
2889
2877
  runMain(main);
2890
- //#endregion
2891
2878
  export {};
2892
2879
 
2893
2880
  //# sourceMappingURL=bin.mjs.map