wp-typia 0.22.2 → 0.22.4
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/bin/wp-typia.js +15 -1
- package/dist-bunli/.bunli/commands.gen.js +2574 -2213
- package/dist-bunli/{cli-6hcbjvym.js → cli-2mt6bvcj.js} +7 -7
- package/dist-bunli/{cli-sj5mtyzj.js → cli-6bhfzq5e.js} +41 -2
- package/dist-bunli/{cli-kww2sraq.js → cli-6ymn63t4.js} +142 -14
- package/dist-bunli/{cli-add-s0p4w1wz.js → cli-add-6s6kzf7x.js} +323 -355
- package/dist-bunli/{cli-pd5pqgre.js → cli-btbpt84c.js} +6 -11
- package/dist-bunli/{cli-doctor-6dchxz12.js → cli-doctor-70zd5m3b.js} +470 -474
- package/dist-bunli/{cli-n6hgvysz.js → cli-gsj6vyn5.js} +59 -9
- package/dist-bunli/{cli-gcbre1zs.js → cli-hb9vpsev.js} +6 -13
- package/dist-bunli/{cli-init-r6h1xchq.js → cli-init-kjjyky1y.js} +11 -11
- package/dist-bunli/{cli-smzkbfna.js → cli-qr2ek735.js} +1310 -1140
- package/dist-bunli/cli-rwjkqjhs.js +88 -0
- package/dist-bunli/{cli-scaffold-f023yxc5.js → cli-scaffold-f57ccf5v.js} +10 -10
- package/dist-bunli/cli.js +5 -3
- package/dist-bunli/{command-list-d3dcvzg2.js → command-list-wsaa4t2p.js} +144 -215
- package/dist-bunli/{migrations-pg5b9fh4.js → migrations-vw502qf9.js} +5 -5
- package/dist-bunli/node-cli.js +232 -226
- package/dist-bunli/{workspace-project-gxb499cp.js → workspace-project-7826tewa.js} +3 -2
- package/package.json +2 -2
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
// ../wp-typia-project-tools/src/runtime/ts-source-masking.ts
|
|
3
|
+
function maskSourceSegment(segment) {
|
|
4
|
+
return segment.replace(/[^\n\r]/gu, " ");
|
|
5
|
+
}
|
|
6
|
+
function testPattern(source, pattern) {
|
|
7
|
+
pattern.lastIndex = 0;
|
|
8
|
+
const matched = pattern.test(source);
|
|
9
|
+
pattern.lastIndex = 0;
|
|
10
|
+
return matched;
|
|
11
|
+
}
|
|
12
|
+
function maskTypeScriptComments(source) {
|
|
13
|
+
return source.replace(/\/\*[\s\S]*?\*\//gu, maskSourceSegment).replace(/\/\/[^\n\r]*/gu, maskSourceSegment);
|
|
14
|
+
}
|
|
15
|
+
function maskTypeScriptCommentsAndLiterals(source) {
|
|
16
|
+
let maskedSource = "";
|
|
17
|
+
let index = 0;
|
|
18
|
+
while (index < source.length) {
|
|
19
|
+
const current = source[index];
|
|
20
|
+
const next = source[index + 1];
|
|
21
|
+
if (current === "/" && next === "/") {
|
|
22
|
+
const start = index;
|
|
23
|
+
index += 2;
|
|
24
|
+
while (index < source.length && source[index] !== `
|
|
25
|
+
` && source[index] !== "\r") {
|
|
26
|
+
index += 1;
|
|
27
|
+
}
|
|
28
|
+
maskedSource += maskSourceSegment(source.slice(start, index));
|
|
29
|
+
continue;
|
|
30
|
+
}
|
|
31
|
+
if (current === "/" && next === "*") {
|
|
32
|
+
const start = index;
|
|
33
|
+
index += 2;
|
|
34
|
+
while (index < source.length && !(source[index] === "*" && source[index + 1] === "/")) {
|
|
35
|
+
index += 1;
|
|
36
|
+
}
|
|
37
|
+
index = Math.min(index + 2, source.length);
|
|
38
|
+
maskedSource += maskSourceSegment(source.slice(start, index));
|
|
39
|
+
continue;
|
|
40
|
+
}
|
|
41
|
+
if (current === "'" || current === '"' || current === "`") {
|
|
42
|
+
const start = index;
|
|
43
|
+
const quote = current;
|
|
44
|
+
index += 1;
|
|
45
|
+
while (index < source.length) {
|
|
46
|
+
const char = source[index];
|
|
47
|
+
if (char === "\\") {
|
|
48
|
+
index += 2;
|
|
49
|
+
continue;
|
|
50
|
+
}
|
|
51
|
+
index += 1;
|
|
52
|
+
if (char === quote) {
|
|
53
|
+
break;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
maskedSource += maskSourceSegment(source.slice(start, index));
|
|
57
|
+
continue;
|
|
58
|
+
}
|
|
59
|
+
maskedSource += current;
|
|
60
|
+
index += 1;
|
|
61
|
+
}
|
|
62
|
+
return maskedSource;
|
|
63
|
+
}
|
|
64
|
+
function hasExecutablePattern(source, pattern) {
|
|
65
|
+
return testPattern(maskTypeScriptCommentsAndLiterals(source), pattern);
|
|
66
|
+
}
|
|
67
|
+
function hasUncommentedPattern(source, pattern) {
|
|
68
|
+
return testPattern(maskTypeScriptComments(source), pattern);
|
|
69
|
+
}
|
|
70
|
+
function findExecutablePatternMatch(source, patterns) {
|
|
71
|
+
const maskedSource = maskTypeScriptCommentsAndLiterals(source);
|
|
72
|
+
for (const pattern of patterns) {
|
|
73
|
+
pattern.lastIndex = 0;
|
|
74
|
+
const match = pattern.exec(maskedSource);
|
|
75
|
+
pattern.lastIndex = 0;
|
|
76
|
+
if (match && match.index !== undefined) {
|
|
77
|
+
return {
|
|
78
|
+
end: match.index + match[0].length,
|
|
79
|
+
start: match.index
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export { maskTypeScriptCommentsAndLiterals, hasExecutablePattern, hasUncommentedPattern, findExecutablePatternMatch };
|
|
87
|
+
|
|
88
|
+
//# debugId=752C0F7611E9866D64756E2164756E21
|
|
@@ -19,26 +19,26 @@ import {
|
|
|
19
19
|
resolvePackageManagerId,
|
|
20
20
|
resolveTemplateId,
|
|
21
21
|
scaffoldProject
|
|
22
|
-
} from "./cli-
|
|
22
|
+
} from "./cli-6ymn63t4.js";
|
|
23
23
|
import"./cli-1sm60g1z.js";
|
|
24
|
-
import"./cli-
|
|
25
|
-
import"./cli-
|
|
24
|
+
import"./cli-2mt6bvcj.js";
|
|
25
|
+
import"./cli-hb9vpsev.js";
|
|
26
26
|
import"./cli-bq2v559b.js";
|
|
27
|
-
import {
|
|
28
|
-
formatInstallCommand,
|
|
29
|
-
formatRunScript
|
|
30
|
-
} from "./cli-sj5mtyzj.js";
|
|
31
27
|
import"./cli-10pe4mf8.js";
|
|
32
28
|
import {
|
|
33
29
|
OFFICIAL_WORKSPACE_TEMPLATE_PACKAGE,
|
|
34
30
|
isBuiltInTemplateId
|
|
35
31
|
} from "./cli-tke8twkn.js";
|
|
36
|
-
import"./cli-
|
|
32
|
+
import"./cli-qr2ek735.js";
|
|
37
33
|
import {
|
|
38
34
|
createManagedTempRoot
|
|
39
35
|
} from "./cli-t73q5aqz.js";
|
|
40
36
|
import"./cli-p95wr1q8.js";
|
|
41
|
-
import"./cli-
|
|
37
|
+
import"./cli-btbpt84c.js";
|
|
38
|
+
import {
|
|
39
|
+
formatInstallCommand,
|
|
40
|
+
formatRunScript
|
|
41
|
+
} from "./cli-6bhfzq5e.js";
|
|
42
42
|
import"./cli-xnn9xjcy.js";
|
|
43
43
|
|
|
44
44
|
// ../wp-typia-project-tools/src/runtime/cli-scaffold.ts
|
|
@@ -556,4 +556,4 @@ export {
|
|
|
556
556
|
getNextSteps
|
|
557
557
|
};
|
|
558
558
|
|
|
559
|
-
//# debugId=
|
|
559
|
+
//# debugId=C9BCDEC89787F16964756E2164756E21
|
package/dist-bunli/cli.js
CHANGED
|
@@ -18,8 +18,9 @@ import {
|
|
|
18
18
|
loadWpTypiaUserConfigFromSource,
|
|
19
19
|
mergeWpTypiaUserConfig,
|
|
20
20
|
package_default,
|
|
21
|
+
validateCliOutputFormatArgv,
|
|
21
22
|
writeStructuredCliDiagnosticError
|
|
22
|
-
} from "./cli-
|
|
23
|
+
} from "./cli-gsj6vyn5.js";
|
|
23
24
|
import"./cli-03j0axbt.js";
|
|
24
25
|
import {
|
|
25
26
|
GLOBAL_FLAGS,
|
|
@@ -2453,7 +2454,7 @@ async function formatCliError(error) {
|
|
|
2453
2454
|
}
|
|
2454
2455
|
async function createWpTypiaCli(options = {}) {
|
|
2455
2456
|
applyStandaloneSupportLayoutEnv();
|
|
2456
|
-
const { wpTypiaCommands } = await import("./command-list-
|
|
2457
|
+
const { wpTypiaCommands } = await import("./command-list-wsaa4t2p.js");
|
|
2457
2458
|
const cli = await createCLI({
|
|
2458
2459
|
...bunliConfig,
|
|
2459
2460
|
description: package_default.description,
|
|
@@ -2487,6 +2488,7 @@ async function createWpTypiaCli(options = {}) {
|
|
|
2487
2488
|
async function main(argv = process.argv.slice(2)) {
|
|
2488
2489
|
const normalizedArgv = normalizeWpTypiaArgv(argv);
|
|
2489
2490
|
const { argv: cliArgv, configOverridePath } = extractWpTypiaConfigOverride(normalizedArgv);
|
|
2491
|
+
validateCliOutputFormatArgv(cliArgv);
|
|
2490
2492
|
const cli = await createWpTypiaCli({ configOverridePath });
|
|
2491
2493
|
await cli.run(cliArgv);
|
|
2492
2494
|
}
|
|
@@ -2512,4 +2514,4 @@ export {
|
|
|
2512
2514
|
createWpTypiaCli
|
|
2513
2515
|
};
|
|
2514
2516
|
|
|
2515
|
-
//# debugId=
|
|
2517
|
+
//# debugId=CF070B64D3FCE30F64756E2164756E21
|