wp-typia 0.22.7 → 0.22.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/dist-bunli/.bunli/commands.gen.js +1790 -1445
- package/dist-bunli/{cli-8snabymq.js → cli-2pnk64h0.js} +350 -3986
- package/dist-bunli/cli-8reep89s.js +3680 -0
- package/dist-bunli/{cli-add-8jpdnz1r.js → cli-add-6dn9h94t.js} +158 -119
- package/dist-bunli/{cli-27v2qpjg.js → cli-ag722tzm.js} +1 -1
- package/dist-bunli/{cli-2hsp17nd.js → cli-arz4rcye.js} +13 -4
- package/dist-bunli/cli-cvxvcw7c.js +46 -0
- package/dist-bunli/{cli-doctor-h5tq4ztr.js → cli-doctor-564c43ay.js} +5 -4
- package/dist-bunli/{cli-init-w9p558th.js → cli-init-znhqp8tr.js} +5 -4
- package/dist-bunli/{cli-tke8twkn.js → cli-qse6myha.js} +4 -6
- package/dist-bunli/{cli-ta3y0hp2.js → cli-regw5384.js} +203 -90
- package/dist-bunli/{cli-scaffold-qve8rqja.js → cli-scaffold-6trxyyk6.js} +15 -11
- package/dist-bunli/{cli-templates-9t2a7zqd.js → cli-templates-hc71dfc2.js} +1 -1
- package/dist-bunli/{cli-10pe4mf8.js → cli-xw1wbxf3.js} +15 -10
- package/dist-bunli/{cli-cjygr56g.js → cli-y934dq2k.js} +3 -3
- package/dist-bunli/cli.js +11 -8
- package/dist-bunli/{command-list-6zr1tj96.js → command-list-g3qhb3y4.js} +699 -607
- package/dist-bunli/create-template-validation-rtec5sng.js +15 -0
- package/dist-bunli/{migrations-v0avgyg6.js → migrations-qc1r0yqe.js} +5 -3
- package/dist-bunli/node-cli.js +1027 -923
- package/package.json +2 -2
|
@@ -8,13 +8,15 @@ import {
|
|
|
8
8
|
SHARED_REST_HELPER_TEMPLATE_ROOT,
|
|
9
9
|
SHARED_WORKSPACE_TEMPLATE_ROOT,
|
|
10
10
|
getTemplateById
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-qse6myha.js";
|
|
12
|
+
import {
|
|
13
|
+
pathExists
|
|
14
|
+
} from "./cli-regw5384.js";
|
|
12
15
|
import {
|
|
13
16
|
createManagedTempRoot
|
|
14
17
|
} from "./cli-t73q5aqz.js";
|
|
15
18
|
|
|
16
19
|
// ../wp-typia-project-tools/src/runtime/template-builtins.ts
|
|
17
|
-
import fs from "fs";
|
|
18
20
|
import path from "path";
|
|
19
21
|
import { promises as fsp } from "fs";
|
|
20
22
|
var BUILT_IN_SHARED_TEMPLATE_LAYERS = Object.freeze([
|
|
@@ -136,20 +138,23 @@ function getBuiltInTemplateLayerDirs(templateId, options = {}) {
|
|
|
136
138
|
function isOmittableBuiltInTemplateLayerDir(templateId, layerDir) {
|
|
137
139
|
return OMITTABLE_BUILT_IN_OVERLAY_TEMPLATE_IDS.has(templateId) && layerDir === getTemplateById(templateId).templateDir;
|
|
138
140
|
}
|
|
139
|
-
function resolveMaterializedTemplateLayerDirs(templateId, layerDirs) {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
141
|
+
async function resolveMaterializedTemplateLayerDirs(templateId, layerDirs) {
|
|
142
|
+
const materializedLayerDirs = [];
|
|
143
|
+
for (const layerDir of layerDirs) {
|
|
144
|
+
if (await pathExists(layerDir)) {
|
|
145
|
+
materializedLayerDirs.push(layerDir);
|
|
146
|
+
continue;
|
|
143
147
|
}
|
|
144
148
|
if (isOmittableBuiltInTemplateLayerDir(templateId, layerDir)) {
|
|
145
|
-
|
|
149
|
+
continue;
|
|
146
150
|
}
|
|
147
151
|
throw new Error(`Built-in template layer is missing: ${layerDir}`);
|
|
148
|
-
}
|
|
152
|
+
}
|
|
153
|
+
return materializedLayerDirs;
|
|
149
154
|
}
|
|
150
155
|
async function materializeBuiltInTemplateSource(templateId, layerDirs) {
|
|
151
156
|
const template = getTemplateById(templateId);
|
|
152
|
-
const materializedLayerDirs = resolveMaterializedTemplateLayerDirs(templateId, layerDirs);
|
|
157
|
+
const materializedLayerDirs = await resolveMaterializedTemplateLayerDirs(templateId, layerDirs);
|
|
153
158
|
const { path: tempRoot, cleanup } = await createManagedTempRoot("wp-typia-template-");
|
|
154
159
|
const templateDir = path.join(tempRoot, templateId);
|
|
155
160
|
try {
|
|
@@ -183,4 +188,4 @@ async function resolveBuiltInTemplateSource(templateId, options = {}) {
|
|
|
183
188
|
|
|
184
189
|
export { isBuiltInSharedTemplateLayerId, getBuiltInSharedTemplateLayerDir, getBuiltInTemplateOverlayDir, getBuiltInTemplateSharedLayerDirs, getBuiltInTemplateLayerDirs, isOmittableBuiltInTemplateLayerDir, resolveBuiltInTemplateSourceFromLayerDirs, resolveBuiltInTemplateSource };
|
|
185
190
|
|
|
186
|
-
//# debugId=
|
|
191
|
+
//# debugId=ABC45C8693C7267064756E2164756E21
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
// package.json
|
|
15
15
|
var package_default = {
|
|
16
16
|
name: "wp-typia",
|
|
17
|
-
version: "0.22.
|
|
17
|
+
version: "0.22.9",
|
|
18
18
|
description: "Canonical CLI package for wp-typia scaffolding and project workflows",
|
|
19
19
|
packageManager: "bun@1.3.11",
|
|
20
20
|
type: "module",
|
|
@@ -84,7 +84,7 @@ var package_default = {
|
|
|
84
84
|
"@bunli/tui": "0.6.0",
|
|
85
85
|
"@bunli/utils": "0.6.0",
|
|
86
86
|
"@wp-typia/api-client": "^0.4.5",
|
|
87
|
-
"@wp-typia/project-tools": "0.22.
|
|
87
|
+
"@wp-typia/project-tools": "0.22.9",
|
|
88
88
|
"better-result": "^2.7.0",
|
|
89
89
|
react: "^19.2.5",
|
|
90
90
|
"react-dom": "^19.2.5",
|
|
@@ -1006,4 +1006,4 @@ function createPlugin(input) {
|
|
|
1006
1006
|
}
|
|
1007
1007
|
export { createPlugin, package_default, collectPositionalIndexes, findFirstPositionalIndex, CREATE_OPTION_METADATA, ADD_OPTION_METADATA, INIT_OPTION_METADATA, MIGRATE_OPTION_METADATA, MCP_OPTION_METADATA, SYNC_OPTION_METADATA, DOCTOR_OPTION_METADATA, TEMPLATES_OPTION_METADATA, GLOBAL_OPTION_METADATA, COMMAND_OPTION_METADATA_BY_GROUP, ALL_COMMAND_OPTION_METADATA, buildCommandOptions, collectOptionNamesByType, buildCommandOptionParser, COMMAND_ROUTING_METADATA, createMissingOptionValueError, extractKnownOptionValuesFromArgv, resolveCommandOptionValues, normalizeCliOutputFormatArgv, validateCliOutputFormatArgv, prefersStructuredCliOutput, emitCliDiagnosticFailure, writeStructuredCliDiagnosticError, WP_TYPIA_CANONICAL_CREATE_USAGE, WP_TYPIA_RESERVED_TOP_LEVEL_COMMAND_NAMES, WP_TYPIA_TOP_LEVEL_COMMAND_NAMES, WP_TYPIA_COMMAND_OPTION_GROUP_NAMES_BY_TOP_LEVEL_COMMAND, WP_TYPIA_CONFIG_SOURCES, mergeWpTypiaUserConfig, loadWpTypiaUserConfigFromSource, loadWpTypiaUserConfig, getCreateDefaults, getAddBlockDefaults, getMcpSchemaSources };
|
|
1008
1008
|
|
|
1009
|
-
//# debugId=
|
|
1009
|
+
//# debugId=F6927CCEB588B12864756E2164756E21
|
package/dist-bunli/cli.js
CHANGED
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
package_default,
|
|
23
23
|
validateCliOutputFormatArgv,
|
|
24
24
|
writeStructuredCliDiagnosticError
|
|
25
|
-
} from "./cli-
|
|
25
|
+
} from "./cli-y934dq2k.js";
|
|
26
26
|
import"./cli-03j0axbt.js";
|
|
27
27
|
import {
|
|
28
28
|
GLOBAL_FLAGS,
|
|
@@ -38,7 +38,10 @@ import {
|
|
|
38
38
|
import"./cli-ac2ebaf8.js";
|
|
39
39
|
import"./cli-6v0pcxw6.js";
|
|
40
40
|
import"./cli-fys8vm2t.js";
|
|
41
|
-
import
|
|
41
|
+
import {
|
|
42
|
+
CLI_DIAGNOSTIC_CODES,
|
|
43
|
+
createCliDiagnosticCodeError
|
|
44
|
+
} from "./cli-p95wr1q8.js";
|
|
42
45
|
import {
|
|
43
46
|
__require
|
|
44
47
|
} from "./cli-xnn9xjcy.js";
|
|
@@ -2337,10 +2340,10 @@ function looksLikeStructuredProjectInput(value) {
|
|
|
2337
2340
|
function assertPositionalAliasProjectDir(projectDir) {
|
|
2338
2341
|
const normalizedProjectDir = path.normalize(projectDir).replace(/[\\/]+$/u, "") || path.normalize(projectDir);
|
|
2339
2342
|
if (normalizedProjectDir === "." || normalizedProjectDir === "..") {
|
|
2340
|
-
throw
|
|
2343
|
+
throw createCliDiagnosticCodeError(CLI_DIAGNOSTIC_CODES.INVALID_ARGUMENT, `The positional alias does not scaffold into \`${projectDir}\`. Use \`${WP_TYPIA_CANONICAL_CREATE_USAGE}\` with an explicit child directory instead.`);
|
|
2341
2344
|
}
|
|
2342
2345
|
if (looksLikeStructuredProjectInput(projectDir)) {
|
|
2343
|
-
throw
|
|
2346
|
+
throw createCliDiagnosticCodeError(CLI_DIAGNOSTIC_CODES.INVALID_ARGUMENT, `The positional alias only accepts unambiguous local project directories. Use \`${WP_TYPIA_CANONICAL_CREATE_USAGE}\` for \`${projectDir}\`.`);
|
|
2344
2347
|
}
|
|
2345
2348
|
}
|
|
2346
2349
|
function normalizeWpTypiaArgv(argv) {
|
|
@@ -2354,7 +2357,7 @@ function normalizeWpTypiaArgv(argv) {
|
|
|
2354
2357
|
return argv;
|
|
2355
2358
|
}
|
|
2356
2359
|
if (firstPositional === "migrations") {
|
|
2357
|
-
throw
|
|
2360
|
+
throw createCliDiagnosticCodeError(CLI_DIAGNOSTIC_CODES.INVALID_ARGUMENT, "`wp-typia migrations` was removed in favor of `wp-typia migrate`. Use `wp-typia migrate <subcommand>` instead.");
|
|
2358
2361
|
}
|
|
2359
2362
|
if (isReservedTopLevelCommandName(firstPositional)) {
|
|
2360
2363
|
assertStringOptionValues(argv);
|
|
@@ -2362,7 +2365,7 @@ function normalizeWpTypiaArgv(argv) {
|
|
|
2362
2365
|
}
|
|
2363
2366
|
if (positionalIndexes.length > 1) {
|
|
2364
2367
|
const extraPositionals = positionalIndexes.slice(1).map((index) => argv[index]).filter((value) => typeof value === "string" && value.length > 0);
|
|
2365
|
-
throw
|
|
2368
|
+
throw createCliDiagnosticCodeError(CLI_DIAGNOSTIC_CODES.INVALID_ARGUMENT, `The positional alias only accepts a single project directory. Use \`${WP_TYPIA_CANONICAL_CREATE_USAGE}\` for scaffold invocations with additional positional arguments, or check the command spelling if you meant another top-level command. Extra positional arguments: ${extraPositionals.map((value) => `\`${value}\``).join(", ")}.`);
|
|
2366
2369
|
}
|
|
2367
2370
|
assertPositionalAliasProjectDir(firstPositional);
|
|
2368
2371
|
const normalizedArgv = [
|
|
@@ -2457,7 +2460,7 @@ async function formatCliError(error) {
|
|
|
2457
2460
|
}
|
|
2458
2461
|
async function createWpTypiaCli(options = {}) {
|
|
2459
2462
|
applyStandaloneSupportLayoutEnv();
|
|
2460
|
-
const { wpTypiaCommands } = await import("./command-list-
|
|
2463
|
+
const { wpTypiaCommands } = await import("./command-list-g3qhb3y4.js");
|
|
2461
2464
|
const cli = await createCLI({
|
|
2462
2465
|
...bunliConfig,
|
|
2463
2466
|
description: package_default.description,
|
|
@@ -2517,4 +2520,4 @@ export {
|
|
|
2517
2520
|
createWpTypiaCli
|
|
2518
2521
|
};
|
|
2519
2522
|
|
|
2520
|
-
//# debugId=
|
|
2523
|
+
//# debugId=C2A72BC9D07456AF64756E2164756E21
|