wp-typia 0.24.2 → 0.24.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/dist-bunli/.bunli/commands.gen.js +382 -296
- package/dist-bunli/{cli-6mr6vja7.js → cli-368d4cgy.js} +8 -4
- package/dist-bunli/{cli-vxd8eyax.js → cli-377p86mf.js} +1 -1
- package/dist-bunli/{cli-wfvf3tv1.js → cli-84c7wff4.js} +1 -1
- package/dist-bunli/{cli-add-r4c15g7g.js → cli-add-qjd3ba8j.js} +21 -10
- package/dist-bunli/{cli-doctor-fd6mfx0f.js → cli-doctor-6fyxq940.js} +2 -2
- package/dist-bunli/{cli-kbqztfkt.js → cli-fv4h3ydt.js} +33 -31
- package/dist-bunli/{cli-init-kmredfj7.js → cli-init-7avk42dh.js} +2 -2
- package/dist-bunli/{cli-4eqznv15.js → cli-kfm9mm68.js} +3130 -3132
- package/dist-bunli/{cli-scaffold-b49zc1rw.js → cli-scaffold-0bb6pr3w.js} +95 -133
- package/dist-bunli/{cli-6ys6d16y.js → cli-tj7ajdvf.js} +1 -1
- package/dist-bunli/cli.js +2 -2
- package/dist-bunli/{command-list-rqt03qqy.js → command-list-y3g7e9rb.js} +110 -15
- package/dist-bunli/{migrations-zhd03hvy.js → migrations-3vngdy51.js} +2 -2
- package/dist-bunli/node-cli.js +110 -11
- package/package.json +2 -2
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
// package.json
|
|
15
15
|
var package_default = {
|
|
16
16
|
name: "wp-typia",
|
|
17
|
-
version: "0.24.
|
|
17
|
+
version: "0.24.4",
|
|
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.24.
|
|
87
|
+
"@wp-typia/project-tools": "0.24.4",
|
|
88
88
|
"better-result": "^2.7.0",
|
|
89
89
|
react: "^19.2.5",
|
|
90
90
|
"react-dom": "^19.2.5",
|
|
@@ -755,7 +755,11 @@ function resolveCommandOptionValues(metadata, options) {
|
|
|
755
755
|
continue;
|
|
756
756
|
}
|
|
757
757
|
if (descriptor.repeatable && Array.isArray(value)) {
|
|
758
|
-
|
|
758
|
+
if (!value.every((item) => typeof item === "string")) {
|
|
759
|
+
resolved[name] = undefined;
|
|
760
|
+
continue;
|
|
761
|
+
}
|
|
762
|
+
resolved[name] = options.preserveArrays ? [...value] : value.join(",");
|
|
759
763
|
continue;
|
|
760
764
|
}
|
|
761
765
|
resolved[name] = typeof value === "string" ? value : undefined;
|
|
@@ -1228,4 +1232,4 @@ function createPlugin(input) {
|
|
|
1228
1232
|
}
|
|
1229
1233
|
export { createPlugin, package_default, collectPositionalIndexes, findFirstPositionalIndex, ADD_OPTION_METADATA, CREATE_OPTION_METADATA, DOCTOR_OPTION_METADATA, GLOBAL_OPTION_METADATA, INIT_OPTION_METADATA, MCP_OPTION_METADATA, MIGRATE_OPTION_METADATA, SYNC_OPTION_METADATA, TEMPLATES_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, formatAddKindList, formatAddKindUsagePlaceholder, 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 };
|
|
1230
1234
|
|
|
1231
|
-
//# debugId=
|
|
1235
|
+
//# debugId=213462D0D4B1919364756E2164756E21
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
scaffoldProject,
|
|
25
25
|
syncPersistenceRestArtifacts,
|
|
26
26
|
updatePluginHeaderCompatibility
|
|
27
|
-
} from "./cli-
|
|
27
|
+
} from "./cli-kfm9mm68.js";
|
|
28
28
|
import {
|
|
29
29
|
parseTemplateLocator,
|
|
30
30
|
require_semver
|
|
@@ -53,7 +53,7 @@ import {
|
|
|
53
53
|
loadPostMetaBindingFields,
|
|
54
54
|
maskTypeScriptCommentsAndLiterals
|
|
55
55
|
} from "./cli-z48frc8t.js";
|
|
56
|
-
import"./cli-
|
|
56
|
+
import"./cli-377p86mf.js";
|
|
57
57
|
import {
|
|
58
58
|
DEFAULT_WORDPRESS_ABILITIES_VERSION,
|
|
59
59
|
DEFAULT_WORDPRESS_CORE_ABILITIES_VERSION,
|
|
@@ -63,13 +63,13 @@ import {
|
|
|
63
63
|
DEFAULT_WP_TYPIA_DATAVIEWS_VERSION,
|
|
64
64
|
getPackageVersions,
|
|
65
65
|
resolveManagedPackageVersionRange
|
|
66
|
-
} from "./cli-
|
|
66
|
+
} from "./cli-84c7wff4.js";
|
|
67
67
|
import {
|
|
68
68
|
SHARED_WORKSPACE_TEMPLATE_ROOT
|
|
69
69
|
} from "./cli-8hxf9qw6.js";
|
|
70
70
|
import {
|
|
71
71
|
snapshotProjectVersion
|
|
72
|
-
} from "./cli-
|
|
72
|
+
} from "./cli-tj7ajdvf.js";
|
|
73
73
|
import {
|
|
74
74
|
ensureMigrationDirectories,
|
|
75
75
|
parseMigrationConfig,
|
|
@@ -146,7 +146,7 @@ import {
|
|
|
146
146
|
toPascalCase,
|
|
147
147
|
toSnakeCase,
|
|
148
148
|
toTitleCase
|
|
149
|
-
} from "./cli-
|
|
149
|
+
} from "./cli-fv4h3ydt.js";
|
|
150
150
|
import"./cli-cvxvcw7c.js";
|
|
151
151
|
import {
|
|
152
152
|
createManagedTempRoot
|
|
@@ -6124,13 +6124,23 @@ registerBlockBindingsSource( {
|
|
|
6124
6124
|
|
|
6125
6125
|
// ../wp-typia-project-tools/src/runtime/block-targets.ts
|
|
6126
6126
|
var FULL_BLOCK_NAME_PATTERN = /^[a-z0-9-]+\/[a-z0-9-]+$/u;
|
|
6127
|
-
function
|
|
6127
|
+
function resolveFullBlockNameDiagnostics(diagnostics) {
|
|
6128
|
+
if (typeof diagnostics !== "string") {
|
|
6129
|
+
return diagnostics;
|
|
6130
|
+
}
|
|
6131
|
+
return {
|
|
6132
|
+
empty: () => `\`${diagnostics}\` requires a block name.`,
|
|
6133
|
+
invalidFormat: () => `\`${diagnostics}\` must use <namespace/block-slug> format.`
|
|
6134
|
+
};
|
|
6135
|
+
}
|
|
6136
|
+
function assertFullBlockName(blockName, diagnostics) {
|
|
6137
|
+
const messages = resolveFullBlockNameDiagnostics(diagnostics);
|
|
6128
6138
|
const trimmed = blockName.trim();
|
|
6129
6139
|
if (!trimmed) {
|
|
6130
|
-
throw new Error(
|
|
6140
|
+
throw new Error(messages.empty());
|
|
6131
6141
|
}
|
|
6132
6142
|
if (!FULL_BLOCK_NAME_PATTERN.test(trimmed)) {
|
|
6133
|
-
throw new Error(
|
|
6143
|
+
throw new Error(messages.invalidFormat());
|
|
6134
6144
|
}
|
|
6135
6145
|
return trimmed;
|
|
6136
6146
|
}
|
|
@@ -8230,10 +8240,11 @@ async function writeCoreVariationRegistry(projectDir, targetBlockName, textDomai
|
|
|
8230
8240
|
async function runAddCoreVariationCommand({
|
|
8231
8241
|
cwd = process.cwd(),
|
|
8232
8242
|
targetBlockName,
|
|
8243
|
+
targetBlockNameDiagnostics = "core-variation target",
|
|
8233
8244
|
variationName
|
|
8234
8245
|
}) {
|
|
8235
8246
|
const workspace = resolveWorkspaceProject(cwd);
|
|
8236
|
-
const resolvedTargetBlockName = assertFullBlockName(targetBlockName,
|
|
8247
|
+
const resolvedTargetBlockName = assertFullBlockName(targetBlockName, targetBlockNameDiagnostics);
|
|
8237
8248
|
const variationSlug = assertValidGeneratedSlug("Core variation name", normalizeBlockSlug(variationName), CORE_VARIATION_USAGE);
|
|
8238
8249
|
const unknownCoreTargetWarning = getUnknownCoreVariationTargetWarning(resolvedTargetBlockName);
|
|
8239
8250
|
assertCoreVariationSlugIsNotRegistryIndex(variationSlug);
|
|
@@ -10657,4 +10668,4 @@ export {
|
|
|
10657
10668
|
ADD_BLOCK_TEMPLATE_IDS
|
|
10658
10669
|
};
|
|
10659
10670
|
|
|
10660
|
-
//# debugId=
|
|
10671
|
+
//# debugId=8D1F1CF635D9D28D64756E2164756E21
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
import {
|
|
12
12
|
getBuiltInTemplateLayerDirs,
|
|
13
13
|
isOmittableBuiltInTemplateLayerDir
|
|
14
|
-
} from "./cli-
|
|
14
|
+
} from "./cli-377p86mf.js";
|
|
15
15
|
import {
|
|
16
16
|
isBuiltInTemplateId,
|
|
17
17
|
listTemplates
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
resolveEditorPluginSlotAlias,
|
|
34
34
|
resolvePatternCatalogContentFile,
|
|
35
35
|
validatePatternCatalog
|
|
36
|
-
} from "./cli-
|
|
36
|
+
} from "./cli-fv4h3ydt.js";
|
|
37
37
|
import"./cli-cvxvcw7c.js";
|
|
38
38
|
import"./cli-t73q5aqz.js";
|
|
39
39
|
import"./cli-bajwv85z.js";
|
|
@@ -171831,36 +171831,6 @@ function assertValidIntegrationEnvService(service = "none") {
|
|
|
171831
171831
|
throw new Error(`Integration environment service must be one of: ${INTEGRATION_ENV_SERVICE_IDS.join(", ")}.`);
|
|
171832
171832
|
}
|
|
171833
171833
|
|
|
171834
|
-
// ../wp-typia-project-tools/src/runtime/fs-async.ts
|
|
171835
|
-
import { promises as fsp } from "fs";
|
|
171836
|
-
async function pathExists(filePath) {
|
|
171837
|
-
try {
|
|
171838
|
-
await fsp.access(filePath);
|
|
171839
|
-
return true;
|
|
171840
|
-
} catch {
|
|
171841
|
-
return false;
|
|
171842
|
-
}
|
|
171843
|
-
}
|
|
171844
|
-
async function readOptionalUtf8File(filePath) {
|
|
171845
|
-
try {
|
|
171846
|
-
return await fsp.readFile(filePath, "utf8");
|
|
171847
|
-
} catch (error) {
|
|
171848
|
-
if (isFileNotFoundError(error)) {
|
|
171849
|
-
return null;
|
|
171850
|
-
}
|
|
171851
|
-
throw error;
|
|
171852
|
-
}
|
|
171853
|
-
}
|
|
171854
|
-
function getNodeErrorCode(error) {
|
|
171855
|
-
return getOptionalNodeErrorCode(error) ?? "";
|
|
171856
|
-
}
|
|
171857
|
-
function getOptionalNodeErrorCode(error) {
|
|
171858
|
-
return typeof error === "object" && error !== null && "code" in error ? String(error.code) : undefined;
|
|
171859
|
-
}
|
|
171860
|
-
function isFileNotFoundError(error) {
|
|
171861
|
-
return getOptionalNodeErrorCode(error) === "ENOENT";
|
|
171862
|
-
}
|
|
171863
|
-
|
|
171864
171834
|
// ../wp-typia-project-tools/src/runtime/cli-add-help.ts
|
|
171865
171835
|
function formatAddHelpText() {
|
|
171866
171836
|
return `Usage:
|
|
@@ -171914,6 +171884,38 @@ Notes:
|
|
|
171914
171884
|
// ../wp-typia-project-tools/src/runtime/cli-add-filesystem.ts
|
|
171915
171885
|
import { promises as fsp2 } from "fs";
|
|
171916
171886
|
import path2 from "path";
|
|
171887
|
+
|
|
171888
|
+
// ../wp-typia-project-tools/src/runtime/fs-async.ts
|
|
171889
|
+
import { promises as fsp } from "fs";
|
|
171890
|
+
async function pathExists(filePath) {
|
|
171891
|
+
try {
|
|
171892
|
+
await fsp.access(filePath);
|
|
171893
|
+
return true;
|
|
171894
|
+
} catch {
|
|
171895
|
+
return false;
|
|
171896
|
+
}
|
|
171897
|
+
}
|
|
171898
|
+
async function readOptionalUtf8File(filePath) {
|
|
171899
|
+
try {
|
|
171900
|
+
return await fsp.readFile(filePath, "utf8");
|
|
171901
|
+
} catch (error) {
|
|
171902
|
+
if (isFileNotFoundError(error)) {
|
|
171903
|
+
return null;
|
|
171904
|
+
}
|
|
171905
|
+
throw error;
|
|
171906
|
+
}
|
|
171907
|
+
}
|
|
171908
|
+
function getNodeErrorCode(error) {
|
|
171909
|
+
return getOptionalNodeErrorCode(error) ?? "";
|
|
171910
|
+
}
|
|
171911
|
+
function getOptionalNodeErrorCode(error) {
|
|
171912
|
+
return typeof error === "object" && error !== null && "code" in error ? String(error.code) : undefined;
|
|
171913
|
+
}
|
|
171914
|
+
function isFileNotFoundError(error) {
|
|
171915
|
+
return getOptionalNodeErrorCode(error) === "ENOENT";
|
|
171916
|
+
}
|
|
171917
|
+
|
|
171918
|
+
// ../wp-typia-project-tools/src/runtime/cli-add-filesystem.ts
|
|
171917
171919
|
function getWorkspaceBootstrapPath(workspace) {
|
|
171918
171920
|
const workspaceBaseName = workspace.packageName.split("/").pop() ?? workspace.packageName;
|
|
171919
171921
|
return path2.join(workspace.projectDir, `${workspaceBaseName}.php`);
|
|
@@ -173818,4 +173820,4 @@ async function appendWorkspaceInventoryEntries(projectDir, options) {
|
|
|
173818
173820
|
}
|
|
173819
173821
|
export { toKebabCase, toSnakeCase, toPascalCase, toCamelCase, toSegmentPascalCase, toTitleCase, validateBlockSlug, validateNamespace, normalizeBlockSlug, resolveNonEmptyNormalizedBlockSlug, buildBlockCssClassName, buildFrontendCssClassName, resolveScaffoldIdentifiers, PATTERN_SECTION_ROLE_PATTERN, PATTERN_CATALOG_SCOPE_IDS, PATTERN_TAG_PATTERN, isValidPatternThumbnailUrl, resolvePatternCatalogContentFile, validatePatternCatalog, formatPatternCatalogDiagnostics, REST_RESOURCE_METHOD_IDS, MANUAL_REST_CONTRACT_HTTP_METHOD_IDS, MANUAL_REST_CONTRACT_AUTH_IDS, EDITOR_PLUGIN_SLOT_IDS, resolveEditorPluginSlotAlias, ADD_BLOCK_TEMPLATE_IDS, suggestAddBlockTemplateId, HOOKED_BLOCK_POSITION_SET, HOOKED_BLOCK_ANCHOR_PATTERN, REST_RESOURCE_NAMESPACE_PATTERN, assertValidGeneratedSlug, assertValidTypeScriptIdentifier, resolveRestResourceNamespace, assertValidPostMetaPostType, resolvePostMetaKey, assertValidRestResourceMethods, resolveOptionalPhpCallbackReference, resolveOptionalPhpClassReference, assertValidManualRestContractHttpMethod, assertValidManualRestContractAuth, isGeneratedRestResourceRoutePatternCompatible, collectRestRouteNamedCaptureNames, resolveManualRestContractPathPattern, resolveGeneratedRestResourceRoutePattern, assertValidHookedBlockPosition, buildWorkspacePhpPrefix, isAddBlockTemplateId, quoteTsString, assertValidHookAnchor, assertValidEditorPluginSlot, assertValidIntegrationEnvService, pathExists, readOptionalUtf8File, getNodeErrorCode, getOptionalNodeErrorCode, isFileNotFoundError, getWorkspaceBootstrapPath, patchFile, readOptionalFile, snapshotWorkspaceFiles, rollbackWorkspaceMutation, resolveWorkspaceBlock, readWorkspaceBlockJson, getMutableBlockHooks, assertVariationDoesNotExist, assertBlockStyleDoesNotExist, assertBlockTransformDoesNotExist, assertPatternDoesNotExist, assertBindingSourceDoesNotExist, assertRestResourceDoesNotExist, assertPostMetaDoesNotExist, assertContractDoesNotExist, assertAdminViewDoesNotExist, assertAbilityDoesNotExist, assertAiFeatureDoesNotExist, assertEditorPluginDoesNotExist, formatAddHelpText, require_typescript, getPropertyNameText, readWorkspaceInventory, readWorkspaceInventoryAsync, getWorkspaceBlockSelectOptions, getWorkspaceBlockSelectOptionsAsync, escapeRegex, quotePhpString, hasPhpFunctionDefinition, hasPhpFunctionCall, findPhpFunctionRange, replacePhpFunctionDefinition, updateWorkspaceInventorySource, appendWorkspaceInventoryEntries };
|
|
173820
173822
|
|
|
173821
|
-
//# debugId=
|
|
173823
|
+
//# debugId=ECEDE0CAF67562F064756E2164756E21
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
getPackageVersions
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-84c7wff4.js";
|
|
5
5
|
import"./cli-8hxf9qw6.js";
|
|
6
6
|
import {
|
|
7
7
|
discoverMigrationInitLayout
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
snapshotWorkspaceFiles,
|
|
14
14
|
toPascalCase,
|
|
15
15
|
updateWorkspaceInventorySource
|
|
16
|
-
} from "./cli-
|
|
16
|
+
} from "./cli-fv4h3ydt.js";
|
|
17
17
|
import"./cli-cvxvcw7c.js";
|
|
18
18
|
import"./cli-bajwv85z.js";
|
|
19
19
|
import {
|