wp-typia 0.23.0 → 0.24.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/README.md +3 -1
- package/bin/routing-metadata.generated.js +11 -0
- package/dist-bunli/.bunli/commands.gen.js +11884 -9017
- package/dist-bunli/{cli-9npd9was.js → cli-0v407aag.js} +12 -10
- package/dist-bunli/{cli-hhp1d348.js → cli-1170yyve.js} +8 -7
- package/dist-bunli/{cli-1meywwsy.js → cli-74y6z3yx.js} +1455 -819
- package/dist-bunli/{cli-qse6myha.js → cli-8hxf9qw6.js} +11 -3
- package/dist-bunli/{cli-8reep89s.js → cli-9fx0qgb7.js} +2 -2
- package/dist-bunli/{cli-add-21bvpfgw.js → cli-add-nmdraf20.js} +8542 -7667
- package/dist-bunli/{cli-52ke0ptp.js → cli-am5x7tb4.js} +8 -2
- package/dist-bunli/{cli-43mx1vfb.js → cli-bajwv85z.js} +2 -1
- package/dist-bunli/cli-ccax7s0s.js +34 -0
- package/dist-bunli/{cli-z5qkx2pn.js → cli-cwjdzq6n.js} +79 -13
- package/dist-bunli/{cli-diagnostics-5dvztm7q.js → cli-diagnostics-10drxh34.js} +1 -1
- package/dist-bunli/{cli-doctor-wy2yjsge.js → cli-doctor-pcss6ecx.js} +688 -459
- package/dist-bunli/{cli-2rqf6t0b.js → cli-e4bwd81c.js} +8 -11
- package/dist-bunli/{cli-init-xnsbxncv.js → cli-init-he7vm7kc.js} +15 -11
- package/dist-bunli/{cli-prompt-614tq57c.js → cli-prompt-ncyg68rn.js} +1 -1
- package/dist-bunli/{cli-bq2v559b.js → cli-rdcga1bd.js} +31 -13
- package/dist-bunli/{cli-scaffold-zhp2ym8z.js → cli-scaffold-an2k0fnm.js} +28 -16
- package/dist-bunli/{cli-c2acv5dv.js → cli-sw06c521.js} +2 -2
- package/dist-bunli/{cli-templates-hc71dfc2.js → cli-templates-g8t4fm11.js} +3 -2
- package/dist-bunli/{cli-p95wr1q8.js → cli-tq730sqt.js} +6 -3
- package/dist-bunli/{cli-ts9thts5.js → cli-v0nnagb3.js} +1513 -1053
- package/dist-bunli/{cli-agywa5n6.js → cli-y0a8nztv.js} +15 -6
- package/dist-bunli/cli-z48frc8t.js +229 -0
- package/dist-bunli/cli.js +5 -5
- package/dist-bunli/{command-list-aqrkx021.js → command-list-xaw5agks.js} +241 -64
- package/dist-bunli/{create-template-validation-rtec5sng.js → create-template-validation-4fr851vg.js} +5 -4
- package/dist-bunli/{migrations-bx0yvc2v.js → migrations-z7f4kxba.js} +10 -9
- package/dist-bunli/node-cli.js +661 -389
- package/dist-bunli/{workspace-project-csnnggz6.js → workspace-project-gmv2a71z.js} +4 -3
- package/package.json +2 -2
- package/dist-bunli/cli-j8et6jvr.js +0 -123
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
formatRunScript,
|
|
4
4
|
inferPackageManagerId,
|
|
5
5
|
parsePackageManagerField
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-am5x7tb4.js";
|
|
7
7
|
import {
|
|
8
|
-
|
|
9
|
-
} from "./cli-
|
|
8
|
+
readJsonFileSync
|
|
9
|
+
} from "./cli-ccax7s0s.js";
|
|
10
10
|
|
|
11
11
|
// ../wp-typia-project-tools/src/runtime/migration-utils.ts
|
|
12
12
|
import fs from "fs";
|
|
@@ -31,11 +31,6 @@ function stableJsonStringify(value) {
|
|
|
31
31
|
return JSON.stringify(toStableJsonValue(value));
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
// ../wp-typia-project-tools/src/runtime/json-utils.ts
|
|
35
|
-
var exports_json_utils = {};
|
|
36
|
-
__reExport(exports_json_utils, json_utils);
|
|
37
|
-
import"@wp-typia/block-runtime/json-utils";
|
|
38
|
-
|
|
39
34
|
// ../wp-typia-project-tools/src/runtime/migration-utils.ts
|
|
40
35
|
var MIGRATION_VERSION_LABEL_PATTERN = /^v([1-9]\d*)$/;
|
|
41
36
|
var LEGACY_SEMVER_MIGRATION_VERSION_PATTERN = /^\d+\.\d+\.\d+$/;
|
|
@@ -97,7 +92,9 @@ function createTransformFixtureValue(attribute, pathLabel) {
|
|
|
97
92
|
}
|
|
98
93
|
}
|
|
99
94
|
function readJson(filePath) {
|
|
100
|
-
return
|
|
95
|
+
return readJsonFileSync(filePath, {
|
|
96
|
+
context: "migration JSON file"
|
|
97
|
+
});
|
|
101
98
|
}
|
|
102
99
|
function renderPhpValue(value, indentLevel) {
|
|
103
100
|
const indent = "\t".repeat(indentLevel);
|
|
@@ -1258,6 +1255,6 @@ ${blocksSource}
|
|
|
1258
1255
|
export default migrationConfig;
|
|
1259
1256
|
`, "utf8");
|
|
1260
1257
|
}
|
|
1261
|
-
export { isPlainObject, stableJsonStringify,
|
|
1258
|
+
export { isPlainObject, stableJsonStringify, getValueAtPath, setValueAtPath, deleteValueAtPath, createFixtureScalarValue, createTransformFixtureValue, readJson, renderPhpValue, copyFile, sanitizeSaveSnapshotSource, sanitizeSnapshotBlockJson, runProjectScriptIfPresent, detectPackageManagerId, getLocalTsxBinary, isInteractiveTerminal, resolveTargetMigrationVersion, assertMigrationVersionLabel, compareMigrationVersionLabels, formatLegacyMigrationWorkspaceResetGuidance, escapeForCode, renderObjectKey, isNumber, parseMigrationConfig, ROOT_PHP_MIGRATION_REGISTRY, SNAPSHOT_DIR, MIGRATION_TODO_PREFIX, ensureAdvancedMigrationProject, discoverMigrationInitLayout, getProjectPaths, getSnapshotRoot, getSnapshotBlockJsonPath, getSnapshotManifestPath, getAvailableSnapshotVersionsForBlock, createMissingBlockSnapshotMessage, getSnapshotSavePath, getGeneratedDirForBlock, getRuleFilePath, getFixtureFilePath, ensureMigrationDirectories, discoverMigrationEntries, assertRuleHasNoTodos, readRuleMetadata, writeInitialMigrationScaffold, assertNoLegacySemverMigrationWorkspace, loadMigrationProject, writeMigrationConfig };
|
|
1262
1259
|
|
|
1263
|
-
//# debugId=
|
|
1260
|
+
//# debugId=595C3CACBE984E6464756E2164756E21
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
getPackageVersions
|
|
4
|
-
} from "./cli-
|
|
5
|
-
import"./cli-
|
|
4
|
+
} from "./cli-y0a8nztv.js";
|
|
5
|
+
import"./cli-8hxf9qw6.js";
|
|
6
6
|
import {
|
|
7
7
|
discoverMigrationInitLayout
|
|
8
|
-
} from "./cli-
|
|
8
|
+
} from "./cli-e4bwd81c.js";
|
|
9
9
|
import {
|
|
10
10
|
quoteTsString,
|
|
11
11
|
require_typescript,
|
|
@@ -13,24 +13,27 @@ import {
|
|
|
13
13
|
snapshotWorkspaceFiles,
|
|
14
14
|
toPascalCase,
|
|
15
15
|
updateWorkspaceInventorySource
|
|
16
|
-
} from "./cli-
|
|
16
|
+
} from "./cli-v0nnagb3.js";
|
|
17
17
|
import"./cli-cvxvcw7c.js";
|
|
18
|
-
import"./cli-
|
|
18
|
+
import"./cli-bajwv85z.js";
|
|
19
19
|
import {
|
|
20
20
|
CLI_DIAGNOSTIC_CODES,
|
|
21
21
|
createCliDiagnosticCodeError
|
|
22
|
-
} from "./cli-
|
|
22
|
+
} from "./cli-tq730sqt.js";
|
|
23
23
|
import {
|
|
24
24
|
parseWorkspacePackageManagerId,
|
|
25
25
|
tryResolveWorkspaceProject
|
|
26
|
-
} from "./cli-
|
|
26
|
+
} from "./cli-1170yyve.js";
|
|
27
27
|
import {
|
|
28
28
|
formatAddDevDependenciesCommand,
|
|
29
29
|
formatPackageExecCommand,
|
|
30
30
|
formatRunScript,
|
|
31
31
|
getPackageManager,
|
|
32
32
|
transformPackageManagerText
|
|
33
|
-
} from "./cli-
|
|
33
|
+
} from "./cli-am5x7tb4.js";
|
|
34
|
+
import {
|
|
35
|
+
readJsonFileSync
|
|
36
|
+
} from "./cli-ccax7s0s.js";
|
|
34
37
|
import {
|
|
35
38
|
__toESM
|
|
36
39
|
} from "./cli-xnn9xjcy.js";
|
|
@@ -61,9 +64,10 @@ function readProjectPackageJson(projectDir) {
|
|
|
61
64
|
if (!fs.existsSync(packageJsonPath)) {
|
|
62
65
|
return null;
|
|
63
66
|
}
|
|
64
|
-
const source = fs.readFileSync(packageJsonPath, "utf8");
|
|
65
67
|
try {
|
|
66
|
-
return
|
|
68
|
+
return readJsonFileSync(packageJsonPath, {
|
|
69
|
+
context: "project package manifest"
|
|
70
|
+
});
|
|
67
71
|
} catch (error) {
|
|
68
72
|
const message = error instanceof Error ? error.message : String(error);
|
|
69
73
|
throw createCliDiagnosticCodeError(CLI_DIAGNOSTIC_CODES.INVALID_ARGUMENT, `Unable to parse ${packageJsonPath}: ${message}`, error instanceof Error ? { cause: error } : undefined);
|
|
@@ -873,4 +877,4 @@ export {
|
|
|
873
877
|
applyInitPlan
|
|
874
878
|
};
|
|
875
879
|
|
|
876
|
-
//# debugId=
|
|
880
|
+
//# debugId=DC4EACE5C620361164756E2164756E21
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
// ../wp-typia-project-tools/src/runtime/cli-prompt.ts
|
|
3
3
|
import readline from "readline";
|
|
4
|
-
function createReadlinePrompt() {
|
|
4
|
+
function createReadlinePrompt(output = {}) {
|
|
5
5
|
const rl = readline.createInterface({
|
|
6
6
|
input: process.stdin,
|
|
7
7
|
output: process.stdout
|
|
8
8
|
});
|
|
9
|
-
return createReadlinePromptWithInterface(rl);
|
|
9
|
+
return createReadlinePromptWithInterface(rl, output);
|
|
10
10
|
}
|
|
11
|
-
function createReadlinePromptWithInterface(rl) {
|
|
11
|
+
function createReadlinePromptWithInterface(rl, output = {}) {
|
|
12
|
+
const { errorLine, printLine } = resolveReadlinePromptOutput(output);
|
|
12
13
|
const askQuestion = (query) => new Promise((resolve) => {
|
|
13
14
|
rl.question(query, resolve);
|
|
14
15
|
});
|
|
@@ -19,7 +20,7 @@ function createReadlinePromptWithInterface(rl) {
|
|
|
19
20
|
if (validate) {
|
|
20
21
|
const result = validate(value);
|
|
21
22
|
if (result !== true) {
|
|
22
|
-
|
|
23
|
+
errorLine(formatValidationError(message, result, defaultValue));
|
|
23
24
|
continue;
|
|
24
25
|
}
|
|
25
26
|
}
|
|
@@ -31,7 +32,7 @@ function createReadlinePromptWithInterface(rl) {
|
|
|
31
32
|
throw new Error(`select() requires at least one option for prompt: ${message}`);
|
|
32
33
|
}
|
|
33
34
|
const resolvedDefaultIndex = getResolvedDefaultIndex(options, defaultValue);
|
|
34
|
-
renderSelectPrompt(message, options, resolvedDefaultIndex);
|
|
35
|
+
renderSelectPrompt(message, options, resolvedDefaultIndex, printLine);
|
|
35
36
|
while (true) {
|
|
36
37
|
const answer = normalizePromptAnswer(await askQuestion(formatChoicePrompt(resolvedDefaultIndex)));
|
|
37
38
|
if (answer.length === 0) {
|
|
@@ -42,10 +43,10 @@ function createReadlinePromptWithInterface(rl) {
|
|
|
42
43
|
return selection.value;
|
|
43
44
|
}
|
|
44
45
|
if (isPromptHelpToken(answer)) {
|
|
45
|
-
renderSelectPrompt(message, options, resolvedDefaultIndex);
|
|
46
|
+
renderSelectPrompt(message, options, resolvedDefaultIndex, printLine);
|
|
46
47
|
continue;
|
|
47
48
|
}
|
|
48
|
-
|
|
49
|
+
errorLine(formatInvalidSelectionError(answer, options, resolvedDefaultIndex));
|
|
49
50
|
}
|
|
50
51
|
},
|
|
51
52
|
close() {
|
|
@@ -53,6 +54,23 @@ function createReadlinePromptWithInterface(rl) {
|
|
|
53
54
|
}
|
|
54
55
|
};
|
|
55
56
|
}
|
|
57
|
+
function resolveReadlinePromptOutput({
|
|
58
|
+
errorLine,
|
|
59
|
+
printLine
|
|
60
|
+
}) {
|
|
61
|
+
return {
|
|
62
|
+
errorLine: errorLine ?? writePromptErrorLine,
|
|
63
|
+
printLine: printLine ?? writePromptLine
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
function writePromptLine(line) {
|
|
67
|
+
process.stdout.write(`${line}
|
|
68
|
+
`);
|
|
69
|
+
}
|
|
70
|
+
function writePromptErrorLine(line) {
|
|
71
|
+
process.stderr.write(`${line}
|
|
72
|
+
`);
|
|
73
|
+
}
|
|
56
74
|
function normalizePromptAnswer(value) {
|
|
57
75
|
return String(value).trim();
|
|
58
76
|
}
|
|
@@ -75,15 +93,15 @@ function formatValidationError(message, result, defaultValue) {
|
|
|
75
93
|
function formatChoicePrompt(defaultIndex) {
|
|
76
94
|
return `Choice [default: ${defaultIndex + 1}, ? for options]: `;
|
|
77
95
|
}
|
|
78
|
-
function renderSelectPrompt(message, options, defaultIndex) {
|
|
79
|
-
|
|
80
|
-
|
|
96
|
+
function renderSelectPrompt(message, options, defaultIndex, printLine) {
|
|
97
|
+
printLine(message);
|
|
98
|
+
printLine(" Enter a number, option label, or option value. Press Enter to keep the default, or type ? to list choices again.");
|
|
81
99
|
options.forEach((option, index) => {
|
|
82
100
|
const defaultMarker = index === defaultIndex ? " (default)" : "";
|
|
83
101
|
const valueHint = normalizePromptToken(option.label) === normalizePromptToken(option.value) ? "" : ` [${option.value}]`;
|
|
84
|
-
|
|
102
|
+
printLine(` ${index + 1}. ${option.label}${valueHint}${defaultMarker}`);
|
|
85
103
|
if (option.hint) {
|
|
86
|
-
|
|
104
|
+
printLine(` ${option.hint}`);
|
|
87
105
|
}
|
|
88
106
|
});
|
|
89
107
|
}
|
|
@@ -114,4 +132,4 @@ function formatInvalidSelectionError(answer, options, defaultIndex) {
|
|
|
114
132
|
|
|
115
133
|
export { createReadlinePrompt, createReadlinePromptWithInterface };
|
|
116
134
|
|
|
117
|
-
//# debugId=
|
|
135
|
+
//# debugId=44CDFE1F16A2DE6E64756E2164756E21
|
|
@@ -15,36 +15,40 @@ import {
|
|
|
15
15
|
normalizeOptionalCliString,
|
|
16
16
|
parseAlternateRenderTargets,
|
|
17
17
|
parseCompoundInnerBlocksPreset,
|
|
18
|
+
resolveCreateProfileId,
|
|
18
19
|
resolveLocalCliPathOption,
|
|
19
20
|
resolveOptionalInteractiveExternalLayerId,
|
|
20
21
|
resolvePackageManagerId,
|
|
21
22
|
resolveTemplateId,
|
|
22
23
|
scaffoldProject
|
|
23
|
-
} from "./cli-
|
|
24
|
-
import"./cli-
|
|
25
|
-
import"./cli-
|
|
26
|
-
import"./cli-
|
|
24
|
+
} from "./cli-74y6z3yx.js";
|
|
25
|
+
import"./cli-9fx0qgb7.js";
|
|
26
|
+
import"./cli-sw06c521.js";
|
|
27
|
+
import"./cli-y0a8nztv.js";
|
|
27
28
|
import {
|
|
28
29
|
OFFICIAL_WORKSPACE_TEMPLATE_PACKAGE,
|
|
29
30
|
isBuiltInTemplateId
|
|
30
|
-
} from "./cli-
|
|
31
|
-
import"./cli-
|
|
32
|
-
import"./cli-
|
|
31
|
+
} from "./cli-8hxf9qw6.js";
|
|
32
|
+
import"./cli-0v407aag.js";
|
|
33
|
+
import"./cli-e4bwd81c.js";
|
|
33
34
|
import {
|
|
34
35
|
pathExists
|
|
35
|
-
} from "./cli-
|
|
36
|
+
} from "./cli-v0nnagb3.js";
|
|
36
37
|
import"./cli-cvxvcw7c.js";
|
|
37
38
|
import {
|
|
38
39
|
createManagedTempRoot
|
|
39
40
|
} from "./cli-t73q5aqz.js";
|
|
40
|
-
import"./cli-
|
|
41
|
-
import"./cli-
|
|
42
|
-
import"./cli-
|
|
41
|
+
import"./cli-bajwv85z.js";
|
|
42
|
+
import"./cli-tq730sqt.js";
|
|
43
|
+
import"./cli-1170yyve.js";
|
|
43
44
|
import {
|
|
44
45
|
formatInstallCommand,
|
|
45
46
|
formatRunScript
|
|
46
|
-
} from "./cli-
|
|
47
|
-
import
|
|
47
|
+
} from "./cli-am5x7tb4.js";
|
|
48
|
+
import {
|
|
49
|
+
readJsonFile
|
|
50
|
+
} from "./cli-ccax7s0s.js";
|
|
51
|
+
import"./cli-rdcga1bd.js";
|
|
48
52
|
import"./cli-xnn9xjcy.js";
|
|
49
53
|
|
|
50
54
|
// ../wp-typia-project-tools/src/runtime/cli-scaffold.ts
|
|
@@ -89,6 +93,7 @@ async function buildScaffoldDryRunPlan({
|
|
|
89
93
|
onProgress,
|
|
90
94
|
packageManager,
|
|
91
95
|
persistencePolicy,
|
|
96
|
+
profile,
|
|
92
97
|
projectDir,
|
|
93
98
|
templateId,
|
|
94
99
|
variant,
|
|
@@ -114,6 +119,7 @@ async function buildScaffoldDryRunPlan({
|
|
|
114
119
|
onProgress,
|
|
115
120
|
packageManager,
|
|
116
121
|
persistencePolicy,
|
|
122
|
+
profile,
|
|
117
123
|
projectDir: previewProjectDir,
|
|
118
124
|
templateId,
|
|
119
125
|
variant,
|
|
@@ -342,6 +348,7 @@ async function runScaffoldFlow({
|
|
|
342
348
|
persistencePolicy,
|
|
343
349
|
packageManager,
|
|
344
350
|
namespace,
|
|
351
|
+
profile,
|
|
345
352
|
textDomain,
|
|
346
353
|
phpPrefix,
|
|
347
354
|
queryPostType,
|
|
@@ -378,6 +385,7 @@ async function runScaffoldFlow({
|
|
|
378
385
|
isInteractive,
|
|
379
386
|
selectTemplate
|
|
380
387
|
});
|
|
388
|
+
const resolvedProfile = resolveCreateProfileId(profile);
|
|
381
389
|
validateCreateFlagContract({
|
|
382
390
|
alternateRenderTargets,
|
|
383
391
|
dataStorageMode,
|
|
@@ -429,7 +437,7 @@ async function runScaffoldFlow({
|
|
|
429
437
|
isInteractive,
|
|
430
438
|
selectPackageManager
|
|
431
439
|
});
|
|
432
|
-
const resolvedWithWpEnv = await resolveOptionalBooleanFlag({
|
|
440
|
+
const resolvedWithWpEnv = resolvedProfile === "plugin-qa" ? true : await resolveOptionalBooleanFlag({
|
|
433
441
|
explicitValue: withWpEnv,
|
|
434
442
|
isInteractive,
|
|
435
443
|
select: selectWithWpEnv,
|
|
@@ -479,6 +487,7 @@ async function runScaffoldFlow({
|
|
|
479
487
|
onProgress,
|
|
480
488
|
packageManager: resolvedPackageManager,
|
|
481
489
|
persistencePolicy: resolvedPersistencePolicy,
|
|
490
|
+
profile: resolvedProfile,
|
|
482
491
|
projectDir,
|
|
483
492
|
templateId: resolvedTemplateId,
|
|
484
493
|
variant,
|
|
@@ -501,6 +510,7 @@ async function runScaffoldFlow({
|
|
|
501
510
|
onProgress,
|
|
502
511
|
packageManager: resolvedPackageManager,
|
|
503
512
|
persistencePolicy: resolvedPersistencePolicy,
|
|
513
|
+
profile: resolvedProfile,
|
|
504
514
|
projectDir,
|
|
505
515
|
templateId: resolvedTemplateId,
|
|
506
516
|
variant,
|
|
@@ -512,7 +522,9 @@ async function runScaffoldFlow({
|
|
|
512
522
|
let availableScripts;
|
|
513
523
|
if (!dryRun) {
|
|
514
524
|
try {
|
|
515
|
-
const parsedPackageJson =
|
|
525
|
+
const parsedPackageJson = await readJsonFile(path.join(projectDir, "package.json"), {
|
|
526
|
+
context: "generated package manifest"
|
|
527
|
+
});
|
|
516
528
|
const scripts = parsedPackageJson.scripts && typeof parsedPackageJson.scripts === "object" && !Array.isArray(parsedPackageJson.scripts) ? parsedPackageJson.scripts : {};
|
|
517
529
|
availableScripts = Object.entries(scripts).filter(([, value]) => typeof value === "string").map(([scriptName]) => scriptName);
|
|
518
530
|
} catch {
|
|
@@ -561,4 +573,4 @@ export {
|
|
|
561
573
|
getNextSteps
|
|
562
574
|
};
|
|
563
575
|
|
|
564
|
-
//# debugId=
|
|
576
|
+
//# debugId=A4E8245E23045A1864756E2164756E21
|
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
SHARED_REST_HELPER_TEMPLATE_ROOT,
|
|
9
9
|
SHARED_WORKSPACE_TEMPLATE_ROOT,
|
|
10
10
|
getTemplateById
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-8hxf9qw6.js";
|
|
12
12
|
import {
|
|
13
13
|
pathExists
|
|
14
|
-
} from "./cli-
|
|
14
|
+
} from "./cli-v0nnagb3.js";
|
|
15
15
|
import {
|
|
16
16
|
createManagedTempRoot
|
|
17
17
|
} from "./cli-t73q5aqz.js";
|
|
@@ -7,7 +7,8 @@ import {
|
|
|
7
7
|
getUserFacingTemplateId,
|
|
8
8
|
isBuiltInTemplateId,
|
|
9
9
|
listTemplates
|
|
10
|
-
} from "./cli-
|
|
10
|
+
} from "./cli-8hxf9qw6.js";
|
|
11
|
+
import"./cli-ccax7s0s.js";
|
|
11
12
|
import"./cli-xnn9xjcy.js";
|
|
12
13
|
|
|
13
14
|
// ../wp-typia-project-tools/src/runtime/cli-templates.ts
|
|
@@ -163,4 +164,4 @@ export {
|
|
|
163
164
|
formatTemplateDetails
|
|
164
165
|
};
|
|
165
166
|
|
|
166
|
-
//# debugId=
|
|
167
|
+
//# debugId=F036FFC923A55DB664756E2164756E21
|
|
@@ -322,12 +322,15 @@ function formatDoctorCheckLine(check) {
|
|
|
322
322
|
function getFailingDoctorChecks(checks) {
|
|
323
323
|
return checks.filter((check) => check.status === "fail");
|
|
324
324
|
}
|
|
325
|
-
function formatDoctorSummaryLine(checks) {
|
|
325
|
+
function formatDoctorSummaryLine(checks, options = {}) {
|
|
326
326
|
const failedChecks = getFailingDoctorChecks(checks);
|
|
327
|
+
const exitFailureChecks = options.exitFailureChecks ?? failedChecks;
|
|
328
|
+
const advisoryFailureCount = failedChecks.length - exitFailureChecks.length;
|
|
327
329
|
const warningCount = checks.filter((check) => check.status === "warn").length;
|
|
328
|
-
const summaryStatus =
|
|
330
|
+
const summaryStatus = exitFailureChecks.length > 0 ? "FAIL" : advisoryFailureCount > 0 || warningCount > 0 ? "WARN" : "PASS";
|
|
329
331
|
return formatWrappedPrefixedLine(`${summaryStatus} wp-typia doctor summary: `, [
|
|
330
332
|
`${checks.length - failedChecks.length - warningCount}/${checks.length} checks passed`,
|
|
333
|
+
advisoryFailureCount > 0 ? `${advisoryFailureCount} advisory failure(s)` : null,
|
|
331
334
|
warningCount > 0 ? `${warningCount} warning(s)` : null
|
|
332
335
|
].filter((detail) => detail !== null).join(", "), resolveCliWrapColumns(process.stdout.columns)).join(`
|
|
333
336
|
`);
|
|
@@ -338,4 +341,4 @@ function getDoctorFailureDetailLines(checks) {
|
|
|
338
341
|
|
|
339
342
|
export { CLI_DIAGNOSTIC_CODES, CLI_DIAGNOSTIC_CODE_METADATA, CliDiagnosticError, isCliDiagnosticError, getCliDiagnosticCodeMetadata, createCliDiagnosticCodeError, createCliCommandError, formatCliDiagnosticError, serializeCliDiagnosticError, formatDoctorCheckLine, getFailingDoctorChecks, formatDoctorSummaryLine, getDoctorFailureDetailLines };
|
|
340
343
|
|
|
341
|
-
//# debugId=
|
|
344
|
+
//# debugId=65A9D8947CD0E24564756E2164756E21
|