@vttforge/cli 0.18.8 → 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 +6 -0
- package/dist/bin.mjs +16 -29
- package/dist/bin.mjs.map +1 -1
- package/dist/index.d.mts +23 -28
- package/dist/index.mjs +1 -2
- package/dist/{src-CezN6cK3.mjs → src-BXQZFdDl.mjs} +29 -55
- package/dist/{src-CezN6cK3.mjs.map → src-BXQZFdDl.mjs.map} +1 -1
- package/package.json +5 -6
- package/templates/system-js/templates/actor/character-sheet.hbs +1 -1
- package/templates/system-ts/templates/actor/character-sheet.hbs +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
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
|
+
|
|
3
9
|
## 0.18.8
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/bin.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|