@patterkit/cli 0.14.1 → 0.14.3
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/dist/cli.js +7 -6
- package/package.json +3 -3
package/dist/cli.js
CHANGED
|
@@ -42,6 +42,7 @@ import {
|
|
|
42
42
|
poToCatalog,
|
|
43
43
|
catalogToXlsx,
|
|
44
44
|
xlsxToCatalog,
|
|
45
|
+
sceneFolderPaths,
|
|
45
46
|
runVoiceScript,
|
|
46
47
|
voiceScriptToXlsx,
|
|
47
48
|
runScriptDoc,
|
|
@@ -69,7 +70,7 @@ import { runMergetool } from "@wildwinter/toolkit/vcs";
|
|
|
69
70
|
// package.json
|
|
70
71
|
var package_default = {
|
|
71
72
|
name: "@patterkit/cli",
|
|
72
|
-
version: "0.14.
|
|
73
|
+
version: "0.14.3",
|
|
73
74
|
description: "The `patter` CLI: validate, format, export, play, test coverage, localise, and merge Patter projects.",
|
|
74
75
|
type: "module",
|
|
75
76
|
license: "MIT",
|
|
@@ -98,8 +99,8 @@ var package_default = {
|
|
|
98
99
|
"build:standalone:others": "node scripts/build-standalone.mjs --targets=linux-x64,linux-arm64,windows-x64"
|
|
99
100
|
},
|
|
100
101
|
dependencies: {
|
|
101
|
-
"@patterkit/core": "0.
|
|
102
|
-
"@patterkit/ops": "0.
|
|
102
|
+
"@patterkit/core": "0.11.0",
|
|
103
|
+
"@patterkit/ops": "0.26.0",
|
|
103
104
|
"@wildwinter/simple-vc-lib": "^0.5.2",
|
|
104
105
|
"@wildwinter/toolkit": "^0.4.0"
|
|
105
106
|
}
|
|
@@ -481,7 +482,7 @@ async function run(cmd, positionals, flags) {
|
|
|
481
482
|
const loaded = loadProject(positionals[0] ?? ".");
|
|
482
483
|
const { structural, conditions, interpolation, hygiene, staleBundles, unresolvedMerges, orphans, reachability, gameScopes, localisation, extensions, ok } = runValidate(loaded);
|
|
483
484
|
const warn = (i) => i.severity === "warning" ? "warning: " : "";
|
|
484
|
-
for (const i of structural) console.error(` [${i.code}] ${i.severity === "
|
|
485
|
+
for (const i of structural) console.error(` [${i.code}] ${i.severity ? `${i.severity === "info" ? "note" : "warning"}: ` : ""}${i.message}`);
|
|
485
486
|
for (const i of conditions) console.error(` [${i.field}] ${i.nodeId}: ${warn(i)}${i.message} (${i.src})`);
|
|
486
487
|
for (const i of interpolation) console.error(` [${i.field}] ${i.nodeId}: ${warn(i)}${i.message} (${i.src})`);
|
|
487
488
|
for (const i of hygiene) console.error(` [hygiene] ${i.file}: ${i.message}`);
|
|
@@ -495,7 +496,7 @@ async function run(cmd, positionals, flags) {
|
|
|
495
496
|
const isError = (i) => i.severity === "error";
|
|
496
497
|
const structuralWarnings = structural.filter((i) => i.severity === "warning").length;
|
|
497
498
|
const warnings = reachability.length + structuralWarnings + [...conditions, ...interpolation, ...gameScopes, ...localisation, ...extensions].filter((i) => !isError(i)).length;
|
|
498
|
-
const count = structural.
|
|
499
|
+
const count = structural.filter((i) => i.severity === void 0).length + [...conditions, ...interpolation, ...gameScopes, ...localisation, ...extensions].filter(isError).length + hygiene.length + staleBundles.length + unresolvedMerges.length + orphans.length;
|
|
499
500
|
const advisory = warnings ? `, ${warnings} warning(s) above` : "";
|
|
500
501
|
if (ok) console.log(`ok - ${loaded.scenes.length} scene(s), no issues${advisory}`);
|
|
501
502
|
else console.error(`
|
|
@@ -623,7 +624,7 @@ ${count} issue(s)${advisory}`);
|
|
|
623
624
|
const changes = describeLocExport(loaded, { locale });
|
|
624
625
|
if (format === "xlsx") {
|
|
625
626
|
if (flags.o === "-") return usage("loc-export", "-o - is not supported for --format xlsx: a spreadsheet is not text");
|
|
626
|
-
if (!commitBinary(flags.o, await catalogToXlsx(catalog))) return 1;
|
|
627
|
+
if (!commitBinary(flags.o, await catalogToXlsx(catalog, { folders: sceneFolderPaths(loaded) }))) return 1;
|
|
627
628
|
} else {
|
|
628
629
|
const content = format === "json" ? catalogToJson(catalog) : catalogToPo(catalog);
|
|
629
630
|
if (flags.o === "-") {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@patterkit/cli",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.3",
|
|
4
4
|
"description": "The `patter` CLI: validate, format, export, play, test coverage, localise, and merge Patter projects.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"build:standalone:others": "node scripts/build-standalone.mjs --targets=linux-x64,linux-arm64,windows-x64"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@patterkit/core": "0.
|
|
33
|
-
"@patterkit/ops": "0.
|
|
32
|
+
"@patterkit/core": "0.11.0",
|
|
33
|
+
"@patterkit/ops": "0.26.0",
|
|
34
34
|
"@wildwinter/simple-vc-lib": "^0.5.2",
|
|
35
35
|
"@wildwinter/toolkit": "^0.4.0"
|
|
36
36
|
}
|