@vttforge/cli 0.9.0 → 0.10.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 +10 -0
- package/README.md +3 -0
- package/dist/bin.mjs +570 -3
- package/dist/bin.mjs.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{src-BAHJHuJ7.mjs → src-CZnBIzlF.mjs} +3 -3
- package/dist/src-CZnBIzlF.mjs.map +1 -0
- package/package.json +1 -1
- package/templates/module-js/package.json +2 -2
- package/templates/module-ts/package.json +2 -2
- package/templates/system-js/package.json +2 -2
- package/templates/system-ts/package.json +2 -2
- package/dist/src-BAHJHuJ7.mjs.map +0 -1
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:\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,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,K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;CACf;CACA,MAAM,MAAM;EACV,IAAI;GACF,MAAM,SAAS;EACjB,SAAS,KAAK;GACZ,QAAQ,MAAM,eAAe,QAAQ,IAAI,UAAU,OAAO,GAAG,CAAC;GAC9D,QAAQ,KAAK,CAAC;EAChB;CACF;AACF,CAAC;AAED,MAAa,QAAQ,cAAc;CACjC,MAAM;EACJ,MAAM;EACN,aACE;CACJ;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;;;;;;;;;AC5MD,QAAQ,IAAI"}
|
|
1
|
+
{"version":3,"file":"bin.mjs","names":[],"sources":["../src/migrate/transforms.ts","../src/migrate/index.ts","../src/commands/migrate.ts","../src/cli.ts","../src/bin.ts"],"sourcesContent":["/**\n * The rewrites `vttforge migrate` applies to a v13 source file.\n *\n * Each transform is a pure function over the file's text. It returns the new\n * text, one `Change` per edit it made, and one `Note` per thing it saw and\n * would not touch: a rewrite that needs a decision (which page a `game.template`\n * read should become) is reported, not guessed.\n *\n * Text-based, like the audit rules they mirror (`VTTF-AUDIT-011` to `016`).\n * The patterns are short and mechanical, and a syntax tree would not make\n * `'-=key'` easier to find. The cost is that a match inside a string or a\n * comment is rewritten too; the preview exists so that is seen before it is\n * written.\n */\n\nimport { REMOVED_UTILS } from '../audit/v14-rules.js';\n\nexport interface Change {\n /** 1-based line of the edit, in the original text. */\n line: number;\n /** What was there. */\n before: string;\n /** What is there now. */\n after: string;\n /** Which transform made it. */\n rule: string;\n}\n\nexport interface Note {\n line: number;\n rule: string;\n /** What was seen, and what the reader has to decide. */\n message: string;\n}\n\nexport interface TransformResult {\n output: string;\n changes: Change[];\n notes: Note[];\n}\n\nexport type Transform = (source: string) => TransformResult;\n\nfunction lineAt(source: string, index: number): number {\n let line = 1;\n for (let i = 0; i < index && i < source.length; i += 1) {\n if (source[i] === '\\n') line += 1;\n }\n return line;\n}\n\n/** The whole line an index sits on, trimmed, for the report. */\nfunction lineText(source: string, index: number): string {\n const start = source.lastIndexOf('\\n', index - 1) + 1;\n const end = source.indexOf('\\n', index);\n return source.slice(start, end === -1 ? source.length : end).trim();\n}\n\n/**\n * Replace every match, recording one change per match against the original\n * text. The replacement may be a string or a function, like `String#replace`.\n */\nfunction rewrite(\n source: string,\n pattern: RegExp,\n replacement: string | ((...groups: string[]) => string),\n rule: string,\n): TransformResult {\n const changes: Change[] = [];\n const output = source.replace(pattern, (match: string, ...rest: unknown[]) => {\n const offset = rest.find((r): r is number => typeof r === 'number') ?? 0;\n const groups = rest.filter((r): r is string => typeof r === 'string');\n const after = typeof replacement === 'string' ? replacement : replacement(match, ...groups);\n if (after !== match) {\n changes.push({ line: lineAt(source, offset), before: match, after, rule });\n }\n return after;\n });\n return { output, changes, notes: [] };\n}\n\nfunction merge(...results: TransformResult[]): TransformResult {\n const last = results.at(-1);\n return {\n output: last?.output ?? '',\n changes: results.flatMap((r) => r.changes),\n notes: results.flatMap((r) => r.notes),\n };\n}\n\n/** Run transforms in sequence, each on the previous one's output. */\nfunction pipe(source: string, transforms: readonly Transform[]): TransformResult {\n const results: TransformResult[] = [];\n let current = source;\n for (const transform of transforms) {\n const result = transform(current);\n results.push(result);\n current = result.output;\n }\n return merge(...results);\n}\n\n/**\n * Bare v12 utility globals → `foundry.utils.*`; `Math.clamped` → `Math.clamp`.\n *\n * A name the file declares or imports itself is left alone, the same way\n * `VTTF-AUDIT-011` leaves it alone. `game.template` is reported, not\n * rewritten: whether it becomes `game.model` or a `documentTypes` read depends\n * on what was read from it.\n */\nexport const removedGlobals: Transform = (source) => {\n const own = new Set(\n REMOVED_UTILS.filter((name) =>\n new RegExp(\n `(?:function\\\\s+${name}\\\\b|(?:const|let|var)\\\\s+${name}\\\\b|import[^;]*\\\\b${name}\\\\b|\\\\b${name}\\\\s*\\\\([^)]*\\\\)\\\\s*\\\\{)`,\n ).test(source),\n ),\n );\n const names = REMOVED_UTILS.filter((name) => !own.has(name));\n const utils = names.length\n ? rewrite(\n source,\n new RegExp(`(?<![\\\\w$.])(${names.join('|')})\\\\s*\\\\(`, 'g'),\n (_m, name) => `foundry.utils.${name}(`,\n 'removed-globals',\n )\n : { output: source, changes: [], notes: [] };\n const clamped = rewrite(utils.output, /\\bMath\\.clamped\\s*\\(/g, 'Math.clamp(', 'removed-globals');\n const notes: Note[] = [];\n for (const match of clamped.output.matchAll(/\\bgame\\.template\\b/g)) {\n notes.push({\n line: lineAt(clamped.output, match.index ?? 0),\n rule: 'removed-globals',\n message:\n \"`game.template` is gone. Read type defaults from `game.model`, or the type list from the package's `documentTypes`.\",\n });\n }\n return { ...merge(utils, clamped), notes };\n};\n\n/**\n * `'-=key': null` → `key: _del`; `'==key': value` → `key: _replace(value)`;\n * `performDeletions` → `applyOperators`; `objectsEqual` → `equals`.\n */\nexport const dataOperators: Transform = (source) => {\n const deletions = rewrite(\n source,\n /(['\"])((?:[\\w$]+\\.)*)-=([\\w$.]+)\\1\\s*:\\s*null\\b/g,\n (_m, quote, prefix, key) => `${quote}${prefix}${key}${quote}: _del`,\n 'data-operators',\n );\n // `\"==key\": <value>` wraps a value of any shape, so the value is scanned to\n // its end rather than matched: up to the comma or brace that closes it, with\n // brackets, braces, parentheses and strings balanced along the way.\n const replacements = wrapReplacementValues(deletions.output);\n const flags = rewrite(\n replacements.output,\n /\\bperformDeletions\\s*:/g,\n 'applyOperators:',\n 'data-operators',\n );\n const equals = rewrite(\n flags.output,\n /\\bfoundry\\.utils\\.objectsEqual\\s*\\(/g,\n 'foundry.utils.equals(',\n 'data-operators',\n );\n return merge(deletions, replacements, flags, equals);\n};\n\nfunction wrapReplacementValues(source: string): TransformResult {\n const changes: Change[] = [];\n const pattern = /(['\"])((?:[\\w$]+\\.)*)==([\\w$.]+)\\1\\s*:\\s*/g;\n let out = '';\n let cursor = 0;\n for (const match of source.matchAll(pattern)) {\n const start = match.index ?? 0;\n const valueStart = start + match[0].length;\n const valueEnd = scanValueEnd(source, valueStart);\n if (valueEnd === -1) continue;\n const value = source.slice(valueStart, valueEnd).trimEnd();\n const [, quote = '\"', prefix = '', key = ''] = match;\n const after = `${quote}${prefix}${key}${quote}: _replace(${value})`;\n out += source.slice(cursor, start) + after;\n cursor = valueStart + value.length;\n changes.push({\n line: lineAt(source, start),\n before: source.slice(start, cursor),\n after,\n rule: 'data-operators',\n });\n }\n out += source.slice(cursor);\n return { output: out, changes, notes: [] };\n}\n\n/** Index just past a value that starts at `from`: the next `,` or `}` at depth zero. */\nfunction scanValueEnd(source: string, from: number): number {\n let depth = 0;\n let quote: string | null = null;\n for (let i = from; i < source.length; i += 1) {\n const ch = source[i] ?? '';\n if (quote) {\n if (ch === '\\\\') i += 1;\n else if (ch === quote) quote = null;\n continue;\n }\n if (ch === '\"' || ch === \"'\" || ch === '`') quote = ch;\n else if (ch === '{' || ch === '[' || ch === '(') depth += 1;\n else if (ch === '}' || ch === ']' || ch === ')') {\n if (depth === 0) return i;\n depth -= 1;\n } else if (ch === ',' && depth === 0) return i;\n }\n return -1;\n}\n\nconst ROLL_MODE_VALUES: Record<string, string> = {\n publicroll: 'public',\n gmroll: 'gm',\n blindroll: 'blind',\n selfroll: 'self',\n};\n\nconst ROLL_MODE_CONSTANTS: Record<string, string> = {\n PUBLIC: 'public',\n PRIVATE: 'gm',\n BLIND: 'blind',\n SELF: 'self',\n};\n\n/**\n * `rollMode` → `messageMode`, with the value mapped when it is a literal.\n *\n * `\"roll\"` meant \"whatever the user's chat dropdown says\", which is what an\n * absent `messageMode` means now, so it becomes `undefined`. A value that is\n * an expression is left for the reader, with a note.\n */\nexport const rollMode: Transform = (source) => {\n const notes: Note[] = [];\n const option = rewrite(\n source,\n /\\brollMode\\s*:\\s*(['\"])(publicroll|gmroll|blindroll|selfroll|roll)\\1/g,\n (_m, quote, value) =>\n value === 'roll'\n ? 'messageMode: undefined'\n : `messageMode: ${quote}${ROLL_MODE_VALUES[value]}${quote}`,\n 'roll-mode',\n );\n const key = rewrite(\n option.output,\n /\\brollMode\\s*:/g,\n (m) => m.replace('rollMode', 'messageMode'),\n 'roll-mode',\n );\n for (const change of key.changes) {\n notes.push({\n line: change.line,\n rule: 'roll-mode',\n message:\n 'The value is an expression. If it can be a v13 mode name, wrap it: `Roll._mapLegacyRollMode(value)`.',\n });\n }\n const setting = rewrite(\n key.output,\n /(['\"])core\\1\\s*,\\s*(['\"])rollMode\\2/g,\n (_m, q1, q2) => `${q1}core${q1}, ${q2}messageMode${q2}`,\n 'roll-mode',\n );\n const modes = rewrite(\n setting.output,\n /\\bCONFIG\\.Dice\\.rollModes\\b/g,\n 'CONFIG.ChatMessage.modes',\n 'roll-mode',\n );\n const constants = rewrite(\n modes.output,\n /\\bCONST\\.DICE_ROLL_MODES\\.(PUBLIC|PRIVATE|BLIND|SELF)\\b/g,\n (_m, name) => `\"${ROLL_MODE_CONSTANTS[name]}\"`,\n 'roll-mode',\n );\n return { ...merge(option, key, setting, modes, constants), notes };\n};\n\n/**\n * Context-menu entries and header controls: `name` → `label`, `condition` →\n * `visible`, `callback` → `onClick`. Only inside an object literal that has a\n * `callback` and an `icon` or `condition`, so an unrelated `name:` elsewhere\n * is not renamed. The callback's parameters change too, from `(li)` to\n * `(event, target)`, and that is noted rather than rewritten.\n */\nexport const contextMenuKeys: Transform = (source) => {\n const changes: Change[] = [];\n const notes: Note[] = [];\n let output = source;\n // Walk object literals from the innermost out: find `{`, balance to its `}`,\n // and rewrite the keys of that literal when it looks like a menu entry.\n const literals = objectLiterals(source);\n for (const { start, end } of literals.reverse()) {\n const body = output.slice(start, end);\n if (!/\\bcallback\\s*:/.test(body) || !/\\b(?:icon|condition)\\s*:/.test(body)) continue;\n const renamed = body\n .replace(/(^|[{,\\s])name\\s*:/g, '$1label:')\n .replace(/(^|[{,\\s])condition\\s*:/g, '$1visible:')\n .replace(/(^|[{,\\s])callback\\s*:/g, '$1onClick:');\n if (renamed === body) continue;\n changes.push({\n line: lineAt(source, start),\n before: lineText(source, start),\n after: 'label / visible / onClick keys',\n rule: 'context-menu-keys',\n });\n notes.push({\n line: lineAt(source, start),\n rule: 'context-menu-keys',\n message:\n '`onClick` receives `(event, target)` where `callback` received the element. Check the parameter list.',\n });\n output = output.slice(0, start) + renamed + output.slice(end);\n }\n return { output, changes, notes };\n};\n\n/** Every `{ ... }` span in the text, outermost first, strings and comments skipped. */\nfunction objectLiterals(source: string): Array<{ start: number; end: number }> {\n const spans: Array<{ start: number; end: number }> = [];\n const stack: number[] = [];\n let quote: string | null = null;\n for (let i = 0; i < source.length; i += 1) {\n const ch = source[i] ?? '';\n const next = source[i + 1] ?? '';\n if (quote) {\n if (ch === '\\\\') i += 1;\n else if (ch === quote) quote = null;\n continue;\n }\n if (ch === '/' && next === '/') {\n i = source.indexOf('\\n', i);\n if (i === -1) break;\n continue;\n }\n if (ch === '/' && next === '*') {\n const close = source.indexOf('*/', i + 2);\n i = close === -1 ? source.length : close + 1;\n continue;\n }\n if (ch === '\"' || ch === \"'\" || ch === '`') quote = ch;\n else if (ch === '{') stack.push(i);\n else if (ch === '}') {\n const start = stack.pop();\n if (start !== undefined) spans.push({ start, end: i + 1 });\n }\n }\n return spans.sort((a, b) => a.start - b.start);\n}\n\n/**\n * `legacyTransferral` is gone: the assignment, and the `activeEffect`\n * option `registerSystem` used to take for it.\n */\nexport const legacyTransferral: Transform = (source) => {\n const statement = rewrite(\n source,\n /^[ \\t]*CONFIG\\.ActiveEffect\\.legacyTransferral\\s*=[^\\n]*\\n?/gm,\n '',\n 'legacy-transferral',\n );\n const option = rewrite(\n statement.output,\n /^[ \\t]*activeEffect\\s*:\\s*\\{\\s*legacyTransferral\\s*:\\s*(?:true|false)\\s*,?\\s*\\}\\s*,?[ \\t]*\\n?/gm,\n '',\n 'legacy-transferral',\n );\n const key = rewrite(\n option.output,\n /^[ \\t]*legacyTransferral\\s*:\\s*(?:true|false)\\s*,?[ \\t]*\\n?/gm,\n '',\n 'legacy-transferral',\n );\n return merge(statement, option, key);\n};\n\n/** v14 registers no core Actor or Item sheet, so there is nothing to unregister. */\nexport const unregisterCoreSheets: Transform = (source) =>\n rewrite(\n source,\n /^[ \\t]*(?:foundry\\.documents\\.collections\\.)?(?:Actors|Items)\\.unregisterSheet\\(\\s*['\"]core['\"][^\\n]*\\n?/gm,\n '',\n 'unregister-core-sheets',\n );\n\n/**\n * `CONFIG.statusEffects = list;` → add each entry by id. The setter empties\n * the collection first, which wipes what other packages added.\n */\nexport const statusEffectsAssignment: Transform = (source) => {\n const changes: Change[] = [];\n let output = '';\n let cursor = 0;\n const pattern = /\\bCONFIG\\.statusEffects\\s*=(?!=)\\s*/g;\n for (const match of source.matchAll(pattern)) {\n const start = match.index ?? 0;\n const valueStart = start + match[0].length;\n const end = scanStatementEnd(source, valueStart);\n if (end === -1) continue;\n const value = source.slice(valueStart, end).trim();\n const after = `for (const effect of ${value}) CONFIG.statusEffects[effect.id] = effect;`;\n output += source.slice(cursor, start) + after;\n cursor = end + 1;\n changes.push({\n line: lineAt(source, start),\n before: source.slice(start, cursor).trim(),\n after,\n rule: 'status-effects',\n });\n }\n output += source.slice(cursor);\n return { output, changes, notes: [] };\n};\n\n/** Index of the `;` that ends a statement starting at `from`, brackets balanced. */\nfunction scanStatementEnd(source: string, from: number): number {\n let depth = 0;\n let quote: string | null = null;\n for (let i = from; i < source.length; i += 1) {\n const ch = source[i] ?? '';\n if (quote) {\n if (ch === '\\\\') i += 1;\n else if (ch === quote) quote = null;\n continue;\n }\n if (ch === '\"' || ch === \"'\" || ch === '`') quote = ch;\n else if (ch === '{' || ch === '[' || ch === '(') depth += 1;\n else if (ch === '}' || ch === ']' || ch === ')') depth -= 1;\n else if (ch === ';' && depth === 0) return i;\n }\n return -1;\n}\n\nconst EFFECT_MODES: Record<string, string> = {\n CUSTOM: 'custom',\n MULTIPLY: 'multiply',\n ADD: 'add',\n DOWNGRADE: 'downgrade',\n UPGRADE: 'upgrade',\n OVERRIDE: 'override',\n};\n\n/**\n * `mode: CONST.ACTIVE_EFFECT_MODES.ADD` → `type: \"add\"`. A root-level\n * `changes` array on an effect now lives under `system.changes`; that move\n * depends on where the data is built, so it is noted.\n */\nexport const activeEffectModes: Transform = (source) => {\n const typed = rewrite(\n source,\n /\\bmode\\s*:\\s*CONST\\.ACTIVE_EFFECT_MODES\\.(CUSTOM|MULTIPLY|ADD|DOWNGRADE|UPGRADE|OVERRIDE)\\b/g,\n (_m, name) => `type: \"${EFFECT_MODES[name]}\"`,\n 'active-effect-modes',\n );\n const bare = rewrite(\n typed.output,\n /\\bCONST\\.ACTIVE_EFFECT_MODES\\.(CUSTOM|MULTIPLY|ADD|DOWNGRADE|UPGRADE|OVERRIDE)\\b/g,\n (_m, name) => `\"${EFFECT_MODES[name]}\"`,\n 'active-effect-modes',\n );\n const notes: Note[] = typed.changes.map((c) => ({\n line: c.line,\n rule: 'active-effect-modes',\n message: 'The change now belongs under `system.changes`, not a root-level `changes` array.',\n }));\n return { ...merge(typed, bare), notes };\n};\n\n/** The transforms, in the order they run. */\nconst SOURCE_TRANSFORMS: ReadonlyArray<readonly [string, Transform]> = [\n ['removed-globals', removedGlobals],\n ['data-operators', dataOperators],\n ['roll-mode', rollMode],\n ['context-menu-keys', contextMenuKeys],\n ['legacy-transferral', legacyTransferral],\n ['unregister-core-sheets', unregisterCoreSheets],\n ['status-effects', statusEffectsAssignment],\n ['active-effect-modes', activeEffectModes],\n];\n\nexport function transformSource(source: string): TransformResult {\n return pipe(\n source,\n SOURCE_TRANSFORMS.map(([, t]) => t),\n );\n}\n\n/**\n * The manifest: `type` declared, `compatibility` raised to 14 where it is\n * lower. Returns `null` when nothing needed to change.\n */\nexport function transformManifest(\n raw: string,\n kind: 'system' | 'module',\n): { output: string; changes: Change[]; notes: Note[] } | null {\n const parsed = JSON.parse(raw) as Record<string, unknown>;\n const changes: Change[] = [];\n const notes: Note[] = [];\n if (parsed.type !== kind) {\n parsed.type = kind;\n changes.push({ line: 1, before: '(no \"type\")', after: `\"type\": \"${kind}\"`, rule: 'manifest' });\n }\n const compatibility = (parsed.compatibility ?? {}) as Record<string, unknown>;\n for (const field of ['minimum', 'verified'] as const) {\n const current = compatibility[field];\n const major = Number.parseInt(String(current ?? '0'), 10);\n if (!Number.isFinite(major) || major < 14) {\n compatibility[field] = '14';\n changes.push({\n line: 1,\n before: `compatibility.${field}: ${JSON.stringify(current ?? null)}`,\n after: `compatibility.${field}: \"14\"`,\n rule: 'manifest',\n });\n }\n }\n const maximum = compatibility.maximum;\n if (maximum !== undefined && Number.parseInt(String(maximum), 10) < 14) {\n notes.push({\n line: 1,\n rule: 'manifest',\n message: `compatibility.maximum is ${JSON.stringify(maximum)}, which keeps the package off v14. Raise it or remove it.`,\n });\n }\n if ('gridDistance' in parsed || 'gridUnits' in parsed) {\n notes.push({\n line: 1,\n rule: 'manifest',\n message:\n 'gridDistance / gridUnits are ignored on v14. Move them into `\"grid\": { \"type\", \"distance\", \"units\", \"diagonals\" }`.',\n });\n }\n parsed.compatibility = compatibility;\n if (changes.length === 0) return notes.length ? { output: raw, changes, notes } : null;\n // Keep `type` next to `id`, where the v14 manifests put it.\n const ordered: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(parsed)) {\n if (key === 'type') continue;\n ordered[key] = value;\n if (key === 'id') ordered.type = parsed.type;\n }\n if (!('type' in ordered)) ordered.type = parsed.type;\n return { output: `${JSON.stringify(ordered, null, 2)}\\n`, changes, notes };\n}\n","/**\n * `vttforge migrate`: rewrite a v13 project for v14.\n *\n * Walks the same files the audit walks, applies the transforms, and reports\n * every edit and every thing it saw and would not decide for you. Nothing is\n * written unless asked: the preview is the default, because a text rewrite\n * that touched a string literal is something to see before it lands.\n */\n\nimport { existsSync } from 'node:fs';\nimport { readFile, stat, writeFile } from 'node:fs/promises';\nimport { join, relative } from 'node:path';\nimport { _internal } from '../audit/source-rules.js';\nimport { type Change, type Note, transformManifest, transformSource } from './transforms.js';\n\ninterface FileResult {\n /** Project-relative path. */\n file: string;\n changes: Change[];\n notes: Note[];\n}\n\nexport interface MigrateReport {\n cwd: string;\n /** Files with at least one change or note. */\n files: FileResult[];\n /** Whether the edits were written to disk. */\n written: boolean;\n counts: { files: number; changes: number; notes: number };\n}\n\nexport interface MigrateOptions {\n cwd: string;\n /** Write the edits. Default false: report only. */\n write?: boolean;\n}\n\nexport async function runMigrate(options: MigrateOptions): Promise<MigrateReport> {\n const { cwd } = options;\n const write = options.write === true;\n if (!existsSync(cwd) || !(await stat(cwd)).isDirectory()) {\n throw new Error(`Migrate target is not a directory: ${cwd}`);\n }\n\n const files: FileResult[] = [];\n\n for (const [name, kind] of [\n ['system.json', 'system'],\n ['module.json', 'module'],\n ] as const) {\n const path = join(cwd, name);\n if (!existsSync(path)) continue;\n let raw: string;\n try {\n raw = await readFile(path, 'utf8');\n JSON.parse(raw);\n } catch {\n continue;\n }\n const result = transformManifest(raw, kind);\n if (result === null) continue;\n files.push({ file: name, changes: result.changes, notes: result.notes });\n if (write && result.changes.length > 0) await writeFile(path, result.output, 'utf8');\n }\n\n for await (const path of _internal.walkSourceFiles(cwd)) {\n let source: string;\n try {\n source = await readFile(path, 'utf8');\n } catch {\n continue;\n }\n const result = transformSource(source);\n if (result.changes.length === 0 && result.notes.length === 0) continue;\n files.push({ file: relative(cwd, path), changes: result.changes, notes: result.notes });\n if (write && result.output !== source) await writeFile(path, result.output, 'utf8');\n }\n\n files.sort((a, b) => a.file.localeCompare(b.file));\n return {\n cwd,\n files,\n written: write,\n counts: {\n files: files.length,\n changes: files.reduce((n, f) => n + f.changes.length, 0),\n notes: files.reduce((n, f) => n + f.notes.length, 0),\n },\n };\n}\n\n/** The report as text: one block per file, edits then notes. */\nexport function formatMigrateReport(report: MigrateReport): string {\n const lines: string[] = [];\n if (report.files.length === 0) {\n lines.push('Nothing to migrate. The project already reads as v14.');\n return `${lines.join('\\n')}\\n`;\n }\n lines.push(\n report.written\n ? `Rewrote ${report.counts.changes} place(s) in ${report.counts.files} file(s).`\n : `Would rewrite ${report.counts.changes} place(s) in ${report.counts.files} file(s). Run again with --write to apply.`,\n );\n for (const file of report.files) {\n lines.push('', `${file.file}`);\n for (const change of file.changes) {\n lines.push(\n ` ${change.line}: ${oneLine(change.before)}`,\n ` ${' '.repeat(String(change.line).length)} → ${oneLine(change.after)}`,\n );\n }\n for (const note of file.notes) {\n lines.push(` ${note.line}: needs a decision: ${note.message}`);\n }\n }\n if (report.counts.notes > 0) {\n lines.push(\n '',\n `${report.counts.notes} place(s) need a decision. Run \\`vttforge audit\\` after editing them.`,\n );\n }\n return `${lines.join('\\n')}\\n`;\n}\n\nfunction oneLine(text: string): string {\n const flat = text.replace(/\\s+/g, ' ').trim();\n return flat.length > 100 ? `${flat.slice(0, 97)}...` : flat;\n}\n","/**\n * `vttforge migrate`: the CLI surface over the v13 → v14 rewrite.\n *\n * Exit codes:\n * 0: ran, whether or not anything changed\n * 1: the target is not a directory\n */\n\nimport { resolve } from 'node:path';\nimport { formatMigrateReport, type MigrateReport, runMigrate } from '../migrate/index.js';\n\nexport interface MigrateCommandOptions {\n cwd?: string;\n write?: boolean;\n json?: boolean;\n /** Custom writer (tests). Defaults to process.stdout.write. */\n out?: (chunk: string) => void;\n}\n\nexport async function runMigrateCommand(\n options: MigrateCommandOptions = {},\n): Promise<{ report: MigrateReport; exitCode: 0 | 1 }> {\n const cwd = resolve(options.cwd ?? process.cwd());\n const out =\n options.out ??\n ((chunk: string) => {\n process.stdout.write(chunk);\n });\n const report = await runMigrate({ cwd, write: options.write === true });\n out(options.json ? `${JSON.stringify(report, null, 2)}\\n` : formatMigrateReport(report));\n return { report, exitCode: 0 };\n}\n","/**\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 { runMigrateCommand } from './commands/migrate.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 migrate = defineCommand({\n meta: {\n name: 'migrate',\n description: 'Rewrite a v13 system or module for Foundry v14 (preview by default)',\n },\n args: {\n path: {\n type: 'positional',\n description: 'Project root to rewrite (defaults to the current directory)',\n required: false,\n },\n write: {\n type: 'boolean',\n default: false,\n description: 'Write the edits. Without it, the command only reports what it would change',\n },\n json: {\n type: 'boolean',\n default: false,\n description: 'Emit the report as JSON',\n },\n },\n async run({ args }) {\n try {\n const { exitCode } = await runMigrateCommand({\n cwd: args.path ? String(args.path) : undefined,\n write: Boolean(args.write),\n json: Boolean(args.json),\n });\n process.exitCode = exitCode;\n } catch (error) {\n process.stderr.write(`${error instanceof Error ? error.message : String(error)}\\n`);\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, audit and migrate for Foundry v14+ systems and modules',\n },\n subCommands: {\n init,\n dev,\n build,\n audit,\n migrate,\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":";;;;;;;;;;;;;;;;;;;;;AA2CA,SAAS,OAAO,QAAgB,OAAuB;CACrD,IAAI,OAAO;CACX,KAAK,IAAI,IAAI,GAAG,IAAI,SAAS,IAAI,OAAO,QAAQ,KAAK,GACnD,IAAI,OAAO,OAAO,MAAM,QAAQ;CAElC,OAAO;AACT;;AAGA,SAAS,SAAS,QAAgB,OAAuB;CACvD,MAAM,QAAQ,OAAO,YAAY,MAAM,QAAQ,CAAC,IAAI;CACpD,MAAM,MAAM,OAAO,QAAQ,MAAM,KAAK;CACtC,OAAO,OAAO,MAAM,OAAO,QAAQ,KAAK,OAAO,SAAS,GAAG,CAAC,CAAC,KAAK;AACpE;;;;;AAMA,SAAS,QACP,QACA,SACA,aACA,MACiB;CACjB,MAAM,UAAoB,CAAC;CAU3B,OAAO;EAAE,QATM,OAAO,QAAQ,UAAU,OAAe,GAAG,SAAoB;GAC5E,MAAM,SAAS,KAAK,MAAM,MAAmB,OAAO,MAAM,QAAQ,KAAK;GACvE,MAAM,SAAS,KAAK,QAAQ,MAAmB,OAAO,MAAM,QAAQ;GACpE,MAAM,QAAQ,OAA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;CACf;CACA,MAAM;EACJ,MAAM;GACJ,MAAM;GACN,aAAa;GACb,UAAU;EACZ;EACA,OAAO;GACL,MAAM;GACN,SAAS;GACT,aAAa;EACf;EACA,MAAM;GACJ,MAAM;GACN,SAAS;GACT,aAAa;EACf;CACF;CACA,MAAM,IAAI,EAAE,QAAQ;EAClB,IAAI;GACF,MAAM,EAAE,aAAa,MAAM,kBAAkB;IAC3C,KAAK,KAAK,OAAO,OAAO,KAAK,IAAI,IAAI,KAAA;IACrC,OAAO,QAAQ,KAAK,KAAK;IACzB,MAAM,QAAQ,KAAK,IAAI;GACzB,CAAC;GACD,QAAQ,WAAW;EACrB,SAAS,OAAO;GACd,QAAQ,OAAO,MAAM,GAAG,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,EAAE,GAAG;GAClF,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;EACA;CACF;AACF,CAAC;;;;;;;;;ACnPD,QAAQ,IAAI"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as emitReleaseZip, c as readManifest, d as runAudit,
|
|
1
|
+
import { a as emitReleaseZip, c as readManifest, d as runAudit, g as runManifestRules, h as runSourceRules, i as runDev, l as runAuditCommand, n as ScaffoldError, o as runBuild, p as SEVERITY_RANK, r as runInit, s as emitZip, t as VTTFORGE_CLI_VERSION, u as formatReport } from "./src-CZnBIzlF.mjs";
|
|
2
2
|
export { SEVERITY_RANK, ScaffoldError, VTTFORGE_CLI_VERSION, emitReleaseZip, emitZip, formatReport, readManifest, runAudit, runAuditCommand, runBuild, runDev, runInit, runManifestRules, runSourceRules };
|
|
@@ -10,7 +10,7 @@ import { createServer } from "node:http";
|
|
|
10
10
|
import { homedir } from "node:os";
|
|
11
11
|
import { promisify } from "node:util";
|
|
12
12
|
//#region package.json
|
|
13
|
-
var version = "0.
|
|
13
|
+
var version = "0.10.0";
|
|
14
14
|
//#endregion
|
|
15
15
|
//#region src/audit/manifest-rules.ts
|
|
16
16
|
/**
|
|
@@ -3087,6 +3087,6 @@ function runInstall(pm, cwd) {
|
|
|
3087
3087
|
*/
|
|
3088
3088
|
const VTTFORGE_CLI_VERSION = version;
|
|
3089
3089
|
//#endregion
|
|
3090
|
-
export { emitReleaseZip as a, readManifest as c, runAudit as d,
|
|
3090
|
+
export { emitReleaseZip as a, readManifest as c, runAudit as d, REMOVED_UTILS as f, runManifestRules as g, runSourceRules as h, runDev as i, runAuditCommand as l, _internal as m, ScaffoldError as n, runBuild as o, SEVERITY_RANK as p, runInit as r, emitZip as s, VTTFORGE_CLI_VERSION as t, formatReport as u };
|
|
3091
3091
|
|
|
3092
|
-
//# sourceMappingURL=src-
|
|
3092
|
+
//# sourceMappingURL=src-CZnBIzlF.mjs.map
|