@vttforge/cli 0.12.0 → 0.15.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 +26 -0
- package/README.md +5 -5
- package/dist/bin.mjs +1584 -28
- package/dist/bin.mjs.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{src-CzzrhCN-.mjs → src-BK9BmFiZ.mjs} +197 -11
- package/dist/src-BK9BmFiZ.mjs.map +1 -0
- package/package.json +4 -2
- package/templates/module-js/README.md +10 -10
- package/templates/module-js/package.json +1 -1
- package/templates/module-ts/README.md +12 -13
- package/templates/module-ts/package.json +1 -1
- package/templates/system-js/README.md +12 -12
- package/templates/system-js/package.json +1 -1
- package/templates/system-ts/README.md +11 -12
- package/templates/system-ts/package.json +1 -1
- package/dist/src-CzzrhCN-.mjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @vttforge/cli
|
|
2
2
|
|
|
3
|
+
## 0.15.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 665c148: `vttforge migrate --strict` exits 1 when the run leaves anything that needs a decision, for CI. With `--write`, every file is now rewritten in memory before the first one is written, so a run that throws on one file leaves the tree untouched. A one-line manifest no longer breaks when `"type"` is inserted after `"id"`. The JSON report's `dataModels` and `sheets` blocks gain a `decisions` list next to `notes`: `notes` say what happened, `decisions` what still needs a hand, and only the second fails `--strict`.
|
|
8
|
+
|
|
9
|
+
## 0.14.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 66f86d3: Fixes found by running `vttforge migrate` end to end on a v13 system: `--data-models` now spreads a `base` template when the file defines one; `--sheets` awaits the `super._prepareContext` it writes for a sync `getData`, drops `{ async: false }` from `enrichHTML` and awaits the call, and moves a `new Dialog` opened from a render listener to `DialogV2` like one opened from a click. Audit rule 007 accepts a `{ value, max }` field declared in a shared schema fragment. The note about a root `<form>` now says to make it a `<div>`, since a part has to render one element.
|
|
14
|
+
- f8ecf14: Plainer wording in the READMEs, the scaffolded project READMEs and the default messages of the `VTTF-NNNN` errors. No code change.
|
|
15
|
+
|
|
16
|
+
## 0.14.0
|
|
17
|
+
|
|
18
|
+
### Minor Changes
|
|
19
|
+
|
|
20
|
+
- 669be2c: `vttforge migrate --sheets` covers the rest of Application v1: `new Dialog({...}).render(true)` becomes `DialogV2.wait({...})` with the buttons as a list and the callbacks on the `(event, button, dialog)` signature, `Dialog.prompt` becomes `DialogV2.prompt` (the `yes`, `no` and `close` callbacks of `Dialog.confirm` and `new Dialog` move to the V2 signature too, and `rejectClose` is kept when written), `enrichHTML(x, { async: true })` loses the dead option, and a `FormApplication` or `Application` class gets its `.v2` file on `HandlebarsApplicationMixin(ApplicationV2)`, with `_updateObject` turned into the static form handler. What cannot be read stays as written with a `TODO(migrate)` line: a `new Dialog` without `buttons`, a second `tabs` entry, an `_onDropItem` on an item sheet. The report reminds you to run `vttforge audit` on the generated files. `vttforge audit` rule `VTTF-AUDIT-021` (HIGH) flags a template that calls `{{select}}`, `{{#select}}` or `{{colorPicker}}`, all removed in v14; the reported line stays right past a multi-line Handlebars comment.
|
|
21
|
+
|
|
22
|
+
## 0.13.0
|
|
23
|
+
|
|
24
|
+
### Minor Changes
|
|
25
|
+
|
|
26
|
+
- de3671e: `vttforge audit` rule `VTTF-AUDIT-020` (HIGH): a release workflow that zips the checkout of a project that builds to `dist/`, or builds and then zips the source tree. The published package has no entry file and no world starts on it, and nothing says so until a player installs it. `vttforge migrate` reports the same workflow as needing a decision, since the rewrite is what moves a project onto the build.
|
|
27
|
+
- 2a8e892: `vttforge migrate --sheets`: next to each Application v1 sheet class (`ActorSheet`, `ItemSheet`), write a file with the same class on `BaseActorSheet` / `BaseItemSheet`. `defaultOptions`, `tabs`, `dragDrop` and `template` become the V2 statics, `getData` becomes `_prepareContext`, each `html.find(sel).click(handler)` becomes an `actions` entry with the handler on the `(event, target)` signature, other events move to `_onRender`, the drop handlers take the resolved document, and the jQuery idioms with a DOM equivalent are rewritten. What cannot be decided is a `// TODO(migrate)` line, listed in the report. The templates the class names get the `data-action` and tab attributes the new class reads. Preview by default; `--write` writes the new files and the template edits and never touches the original class.
|
|
28
|
+
|
|
3
29
|
## 0.12.0
|
|
4
30
|
|
|
5
31
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -15,20 +15,20 @@ vttforge dev [--foundry-data <path>] [--port <n>]
|
|
|
15
15
|
vttforge build
|
|
16
16
|
vttforge lint [dir] [--fix] [--no-audit] [--strict]
|
|
17
17
|
vttforge audit [dir] [--json] [--strict]
|
|
18
|
-
vttforge migrate [dir] [--write] [--json]
|
|
18
|
+
vttforge migrate [dir] [--write] [--strict] [--json] [--data-models] [--sheets]
|
|
19
19
|
```
|
|
20
20
|
|
|
21
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`.
|
|
22
22
|
|
|
23
|
-
**`dev`** builds once, links `dist/` into Foundry's data directory under `Data/<systems|modules>/<id>/`, installs the `@vttforge/dev-module` companion, and watches.
|
|
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
|
|
|
25
|
-
**`build`** runs the production build and writes `<id>-<version>.zip` at the project root with the manifest at the top level
|
|
25
|
+
**`build`** runs the production build and writes `<id>-<version>.zip` at the project root, with the manifest at the top level where foundryvtt.com expects it. `LICENSE`, `README.md` and `CHANGELOG.md` go in when present.
|
|
26
26
|
|
|
27
27
|
**`lint`** runs Biome, which ships with the CLI, over the project with a shipped config (a `biome.json` at the project root replaces it), then the audit. `--fix` writes the safe fixes and formats.
|
|
28
28
|
|
|
29
|
-
**`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
|
|
29
|
+
**`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, a release workflow that zips the checkout of a project that builds to `dist/`, and a template that still calls `{{#select}}` or `{{colorPicker}}`. `--json` prints the findings as JSON, and `--strict` exits non-zero on any finding rather than only on HIGH.
|
|
30
30
|
|
|
31
|
-
**`migrate`** rewrites a v13 project for v14: the removed globals, `-=` keys, `rollMode`, context-menu keys, numeric effect modes, whole-array `CONFIG.statusEffects`, `legacyTransferral`, the core-sheet unregister lines, and the manifest's `type` and `compatibility`. It reports by default
|
|
31
|
+
**`migrate`** rewrites a v13 project for v14: the removed globals, `-=` keys, `rollMode`, context-menu keys, numeric effect modes, whole-array `CONFIG.statusEffects`, `legacyTransferral`, the core-sheet unregister lines, and the manifest's `type` and `compatibility`. It reports by default, writes with `--write` (every file computed before the first write), lists the changes it will not decide for you, and with `--strict` exits 1 while any is left. `--data-models` writes a data model per `template.json` type; `--sheets` writes a V2 sheet file on the SDK bases next to each Application v1 sheet class, with the `data-action` attributes its templates need.
|
|
32
32
|
|
|
33
33
|
## As a library
|
|
34
34
|
|