wp-typia 0.24.0 → 0.24.1
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/routing-metadata.generated.js +2 -0
- package/dist-bunli/.bunli/commands.gen.js +241 -104
- package/dist-bunli/{cli-cwjdzq6n.js → cli-1xt99e09.js} +44 -8
- package/dist-bunli/{cli-74y6z3yx.js → cli-4ah8dawy.js} +11 -7
- package/dist-bunli/{cli-add-nmdraf20.js → cli-add-mr731xtv.js} +113 -34
- package/dist-bunli/{cli-doctor-pcss6ecx.js → cli-doctor-kf9gwdhh.js} +2 -2
- package/dist-bunli/{cli-0v407aag.js → cli-fzhkqzc7.js} +1 -1
- package/dist-bunli/{cli-sw06c521.js → cli-gaq29kzp.js} +1 -1
- package/dist-bunli/{cli-v0nnagb3.js → cli-h2v72j8q.js} +62 -55
- package/dist-bunli/{cli-init-he7vm7kc.js → cli-init-557vq109.js} +2 -2
- package/dist-bunli/{cli-scaffold-an2k0fnm.js → cli-scaffold-bt1ttnkg.js} +5 -5
- package/dist-bunli/{cli-y0a8nztv.js → cli-zjw3eqfj.js} +9 -7
- package/dist-bunli/cli.js +2 -2
- package/dist-bunli/{command-list-xaw5agks.js → command-list-bd2582k1.js} +37 -10
- package/dist-bunli/{migrations-z7f4kxba.js → migrations-ky53fj2h.js} +2 -2
- package/dist-bunli/node-cli.js +86 -12
- 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.1",
|
|
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.1",
|
|
88
88
|
"better-result": "^2.7.0",
|
|
89
89
|
react: "^19.2.5",
|
|
90
90
|
"react-dom": "^19.2.5",
|
|
@@ -173,6 +173,10 @@ var ADD_OPTION_METADATA = {
|
|
|
173
173
|
description: "Target block slug/name for variation, core-variation, style, and end-to-end binding-source workflows.",
|
|
174
174
|
type: "string"
|
|
175
175
|
},
|
|
176
|
+
"catalog-title": {
|
|
177
|
+
description: "Human-readable title for typed pattern catalog entries; defaults to the pattern slug title.",
|
|
178
|
+
type: "string"
|
|
179
|
+
},
|
|
176
180
|
"controller-class": {
|
|
177
181
|
description: "REST resource controller class used for generated route callbacks or declared manual/provider route ownership.",
|
|
178
182
|
type: "string"
|
|
@@ -330,7 +334,13 @@ var ADD_OPTION_METADATA = {
|
|
|
330
334
|
type: "string"
|
|
331
335
|
},
|
|
332
336
|
tags: {
|
|
333
|
-
description: "Comma-separated tags for typed pattern catalog entries.",
|
|
337
|
+
description: "Comma-separated tags for typed pattern catalog entries; may be repeated.",
|
|
338
|
+
repeatable: true,
|
|
339
|
+
type: "string"
|
|
340
|
+
},
|
|
341
|
+
tag: {
|
|
342
|
+
description: "Repeatable singular tag for typed pattern catalog entries.",
|
|
343
|
+
repeatable: true,
|
|
334
344
|
type: "string"
|
|
335
345
|
},
|
|
336
346
|
type: {
|
|
@@ -580,7 +590,8 @@ function buildCommandOptions(metadata) {
|
|
|
580
590
|
{
|
|
581
591
|
...option.argumentKind ? { argumentKind: option.argumentKind } : {},
|
|
582
592
|
description: option.description,
|
|
583
|
-
|
|
593
|
+
...option.repeatable ? { repeatable: true } : {},
|
|
594
|
+
schema: option.type === "boolean" ? exports_external.boolean().default(false) : option.repeatable ? exports_external.union([exports_external.string(), exports_external.array(exports_external.string())]).optional() : exports_external.string().optional(),
|
|
584
595
|
...option.short ? { short: option.short } : {}
|
|
585
596
|
}
|
|
586
597
|
]));
|
|
@@ -600,10 +611,19 @@ function buildCommandOptionParser(...metadataMaps) {
|
|
|
600
611
|
}
|
|
601
612
|
return {
|
|
602
613
|
booleanOptionNames: new Set(collectOptionNamesByType(metadata, "boolean")),
|
|
614
|
+
repeatableOptionNames: new Set(Object.entries(metadata).filter(([, option]) => option.repeatable).map(([name]) => name)),
|
|
603
615
|
shortFlagMap: new Map(Object.entries(metadata).flatMap(([name, option]) => option.short ? [[option.short, { name, type: option.type }]] : [])),
|
|
604
616
|
stringOptionNames: new Set(collectOptionNamesByType(metadata, "string"))
|
|
605
617
|
};
|
|
606
618
|
}
|
|
619
|
+
function assignParsedOptionValue(flags, options) {
|
|
620
|
+
if (!options.parser.repeatableOptionNames.has(options.name)) {
|
|
621
|
+
flags[options.name] = options.value;
|
|
622
|
+
return;
|
|
623
|
+
}
|
|
624
|
+
const current = flags[options.name];
|
|
625
|
+
flags[options.name] = Array.isArray(current) ? [...current, options.value] : current === undefined ? [options.value] : [current, options.value];
|
|
626
|
+
}
|
|
607
627
|
function buildArgvWalkerRoutingMetadata(...metadataMaps) {
|
|
608
628
|
const parser = buildCommandOptionParser(...metadataMaps);
|
|
609
629
|
return {
|
|
@@ -642,7 +662,11 @@ function extractKnownOptionValuesFromArgv(argv, options) {
|
|
|
642
662
|
if (!next || next.startsWith("-")) {
|
|
643
663
|
throw createMissingOptionValueError(arg);
|
|
644
664
|
}
|
|
645
|
-
flags
|
|
665
|
+
assignParsedOptionValue(flags, {
|
|
666
|
+
name: shortFlag.name,
|
|
667
|
+
parser: options.parser,
|
|
668
|
+
value: next
|
|
669
|
+
});
|
|
646
670
|
index += 1;
|
|
647
671
|
continue;
|
|
648
672
|
}
|
|
@@ -667,14 +691,22 @@ function extractKnownOptionValuesFromArgv(argv, options) {
|
|
|
667
691
|
if (!inlineValue) {
|
|
668
692
|
throw createMissingOptionValueError(`--${rawName}`);
|
|
669
693
|
}
|
|
670
|
-
flags
|
|
694
|
+
assignParsedOptionValue(flags, {
|
|
695
|
+
name: rawName,
|
|
696
|
+
parser: options.parser,
|
|
697
|
+
value: inlineValue
|
|
698
|
+
});
|
|
671
699
|
continue;
|
|
672
700
|
}
|
|
673
701
|
const next = argv[index + 1];
|
|
674
702
|
if (!next || next.startsWith("-")) {
|
|
675
703
|
throw createMissingOptionValueError(`--${rawName}`);
|
|
676
704
|
}
|
|
677
|
-
flags
|
|
705
|
+
assignParsedOptionValue(flags, {
|
|
706
|
+
name: rawName,
|
|
707
|
+
parser: options.parser,
|
|
708
|
+
value: next
|
|
709
|
+
});
|
|
678
710
|
index += 1;
|
|
679
711
|
continue;
|
|
680
712
|
}
|
|
@@ -699,6 +731,10 @@ function resolveCommandOptionValues(metadata, options) {
|
|
|
699
731
|
resolved[name] = Boolean(value ?? false);
|
|
700
732
|
continue;
|
|
701
733
|
}
|
|
734
|
+
if (descriptor.repeatable && Array.isArray(value)) {
|
|
735
|
+
resolved[name] = value.every((item) => typeof item === "string") ? value.join(",") : undefined;
|
|
736
|
+
continue;
|
|
737
|
+
}
|
|
702
738
|
resolved[name] = typeof value === "string" ? value : undefined;
|
|
703
739
|
}
|
|
704
740
|
return resolved;
|
|
@@ -1169,4 +1205,4 @@ function createPlugin(input) {
|
|
|
1169
1205
|
}
|
|
1170
1206
|
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 };
|
|
1171
1207
|
|
|
1172
|
-
//# debugId=
|
|
1208
|
+
//# debugId=C72B79CCBF0C2E7664756E2164756E21
|
|
@@ -14,11 +14,11 @@ import {
|
|
|
14
14
|
isOmittableBuiltInTemplateLayerDir,
|
|
15
15
|
resolveBuiltInTemplateSource,
|
|
16
16
|
resolveBuiltInTemplateSourceFromLayerDirs
|
|
17
|
-
} from "./cli-
|
|
17
|
+
} from "./cli-gaq29kzp.js";
|
|
18
18
|
import {
|
|
19
19
|
DEFAULT_WORDPRESS_ENV_VERSION,
|
|
20
20
|
getPackageVersions
|
|
21
|
-
} from "./cli-
|
|
21
|
+
} from "./cli-zjw3eqfj.js";
|
|
22
22
|
import {
|
|
23
23
|
BUILTIN_BLOCK_METADATA_VERSION,
|
|
24
24
|
COMPOUND_CHILD_BLOCK_METADATA_DEFAULTS,
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
} from "./cli-8hxf9qw6.js";
|
|
37
37
|
import {
|
|
38
38
|
seedProjectMigrations
|
|
39
|
-
} from "./cli-
|
|
39
|
+
} from "./cli-fzhkqzc7.js";
|
|
40
40
|
import {
|
|
41
41
|
ensureMigrationDirectories,
|
|
42
42
|
isPlainObject,
|
|
@@ -63,7 +63,7 @@ import {
|
|
|
63
63
|
toTitleCase,
|
|
64
64
|
validateBlockSlug,
|
|
65
65
|
validateNamespace
|
|
66
|
-
} from "./cli-
|
|
66
|
+
} from "./cli-h2v72j8q.js";
|
|
67
67
|
import {
|
|
68
68
|
createManagedTempRoot
|
|
69
69
|
} from "./cli-t73q5aqz.js";
|
|
@@ -8079,7 +8079,9 @@ function sanitizeExternalTemplateCacheMetadata(metadata) {
|
|
|
8079
8079
|
function parseExternalTemplateCacheEntryMarker(markerText) {
|
|
8080
8080
|
let marker;
|
|
8081
8081
|
try {
|
|
8082
|
-
marker =
|
|
8082
|
+
marker = safeJsonParse(markerText, {
|
|
8083
|
+
context: "external template cache entry marker"
|
|
8084
|
+
});
|
|
8083
8085
|
} catch {
|
|
8084
8086
|
return null;
|
|
8085
8087
|
}
|
|
@@ -8113,7 +8115,9 @@ function isExternalTemplateCacheEntryFreshForTtl(createdAtMs, nowMs, ttlMs) {
|
|
|
8113
8115
|
function parseExternalTemplateCachePruneMarker(markerText) {
|
|
8114
8116
|
let marker;
|
|
8115
8117
|
try {
|
|
8116
|
-
marker =
|
|
8118
|
+
marker = safeJsonParse(markerText, {
|
|
8119
|
+
context: "external template cache prune marker"
|
|
8120
|
+
});
|
|
8117
8121
|
} catch {
|
|
8118
8122
|
return null;
|
|
8119
8123
|
}
|
|
@@ -14674,4 +14678,4 @@ async function resolveOptionalInteractiveExternalLayerId({
|
|
|
14674
14678
|
|
|
14675
14679
|
export { syncPersistenceRestArtifacts, copyInterpolatedDirectory, listInterpolatedDirectoryOutputs, getPrimaryDevelopmentScript, getOptionalOnboardingSteps, getOptionalOnboardingNote, getOptionalOnboardingShortNote, isCompoundPersistenceEnabled, formatNonEmptyTargetDirectoryError, executeWorkspaceMutationPlan, insertPhpSnippetBeforeWorkspaceAnchors, appendPhpSnippetBeforeClosingTag, runAddIntegrationEnvCommand, resolveExternalTemplateLayers, resolveTemplateSeed, normalizeOptionalCliString, resolveLocalCliPathOption, assertExternalLayerCompositionOptions, assertBuiltInTemplateVariantAllowed, parseAlternateRenderTargets, parseCompoundInnerBlocksPreset, OPTIONAL_WORDPRESS_AI_CLIENT_COMPATIBILITY, REQUIRED_WORKSPACE_ABILITY_COMPATIBILITY, resolveScaffoldCompatibilityPolicy, createScaffoldCompatibilityConfig, renderScaffoldCompatibilityConfig, updatePluginHeaderCompatibility, getDefaultAnswers, resolveTemplateId, resolvePackageManagerId, collectScaffoldAnswers, DATA_STORAGE_MODES, PERSISTENCE_POLICIES, isDataStorageMode, isPersistencePolicy, resolveCreateProfileId, scaffoldProject, resolveOptionalInteractiveExternalLayerId };
|
|
14676
14680
|
|
|
14677
|
-
//# debugId=
|
|
14681
|
+
//# debugId=F4E5CC39251E69C964756E2164756E21
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
scaffoldProject,
|
|
25
25
|
syncPersistenceRestArtifacts,
|
|
26
26
|
updatePluginHeaderCompatibility
|
|
27
|
-
} from "./cli-
|
|
27
|
+
} from "./cli-4ah8dawy.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-gaq29kzp.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-zjw3eqfj.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-fzhkqzc7.js";
|
|
73
73
|
import {
|
|
74
74
|
ensureMigrationDirectories,
|
|
75
75
|
parseMigrationConfig,
|
|
@@ -144,7 +144,7 @@ import {
|
|
|
144
144
|
toPascalCase,
|
|
145
145
|
toSnakeCase,
|
|
146
146
|
toTitleCase
|
|
147
|
-
} from "./cli-
|
|
147
|
+
} from "./cli-h2v72j8q.js";
|
|
148
148
|
import"./cli-cvxvcw7c.js";
|
|
149
149
|
import {
|
|
150
150
|
createManagedTempRoot
|
|
@@ -4289,11 +4289,6 @@ main().catch( ( error ) => {
|
|
|
4289
4289
|
}
|
|
4290
4290
|
|
|
4291
4291
|
// ../wp-typia-project-tools/src/runtime/cli-add-workspace-ai-source-emitters.ts
|
|
4292
|
-
function indentMultiline2(source, prefix) {
|
|
4293
|
-
return source.split(`
|
|
4294
|
-
`).map((line) => `${prefix}${line}`).join(`
|
|
4295
|
-
`);
|
|
4296
|
-
}
|
|
4297
4292
|
function buildAiFeatureConfigEntry(aiFeatureSlug, namespace) {
|
|
4298
4293
|
const pascalCase = toPascalCase(aiFeatureSlug);
|
|
4299
4294
|
const title = toTitleCase(aiFeatureSlug);
|
|
@@ -4315,7 +4310,7 @@ function buildAiFeatureConfigEntry(aiFeatureSlug, namespace) {
|
|
|
4315
4310
|
` openApiFile: ${quoteTsString(`src/ai-features/${aiFeatureSlug}/api.openapi.json`)},`,
|
|
4316
4311
|
` phpFile: ${quoteTsString(`inc/ai-features/${aiFeatureSlug}.php`)},`,
|
|
4317
4312
|
"\t\trestManifest: defineEndpointManifest(",
|
|
4318
|
-
|
|
4313
|
+
indentMultiline(JSON.stringify(manifest, null, "\t"), "\t\t\t"),
|
|
4319
4314
|
"\t\t),",
|
|
4320
4315
|
` slug: ${quoteTsString(aiFeatureSlug)},`,
|
|
4321
4316
|
` typesFile: ${quoteTsString(`src/ai-features/${aiFeatureSlug}/api-types.ts`)},`,
|
|
@@ -4449,26 +4444,7 @@ import {
|
|
|
4449
4444
|
run${pascalCase}AiFeatureEndpoint,
|
|
4450
4445
|
} from './api-client';
|
|
4451
4446
|
|
|
4452
|
-
|
|
4453
|
-
if ( typeof fallback === 'string' && fallback.length > 0 ) {
|
|
4454
|
-
return fallback;
|
|
4455
|
-
}
|
|
4456
|
-
|
|
4457
|
-
if ( typeof window === 'undefined' ) {
|
|
4458
|
-
return undefined;
|
|
4459
|
-
}
|
|
4460
|
-
|
|
4461
|
-
const wpApiSettings = (
|
|
4462
|
-
window as typeof window & {
|
|
4463
|
-
wpApiSettings?: { nonce?: string };
|
|
4464
|
-
}
|
|
4465
|
-
).wpApiSettings;
|
|
4466
|
-
|
|
4467
|
-
return typeof wpApiSettings?.nonce === 'string' &&
|
|
4468
|
-
wpApiSettings.nonce.length > 0
|
|
4469
|
-
? wpApiSettings.nonce
|
|
4470
|
-
: undefined;
|
|
4471
|
-
}
|
|
4447
|
+
${formatResolveRestNonceSource("spaced")}
|
|
4472
4448
|
|
|
4473
4449
|
function isPlainObject( value: unknown ): value is Record< string, unknown > {
|
|
4474
4450
|
return (
|
|
@@ -6965,7 +6941,7 @@ function normalizeOptionalSlug(label, value, usage) {
|
|
|
6965
6941
|
return assertValidGeneratedSlug(label, normalizeBlockSlug(value), usage);
|
|
6966
6942
|
}
|
|
6967
6943
|
function normalizePatternTags(tags) {
|
|
6968
|
-
const rawTags = typeof tags === "string" ? tags.split(",") : Array.isArray(tags) ?
|
|
6944
|
+
const rawTags = typeof tags === "string" ? tags.split(",") : Array.isArray(tags) ? tags.flatMap((tag) => tag.split(",")) : [];
|
|
6969
6945
|
const normalizedTags = rawTags.map((tag) => normalizeBlockSlug(tag)).filter((tag) => tag.length > 0);
|
|
6970
6946
|
for (const tag of normalizedTags) {
|
|
6971
6947
|
if (!PATTERN_TAG_PATTERN.test(tag)) {
|
|
@@ -7903,6 +7879,101 @@ import fs2, { promises as fsp17 } from "fs";
|
|
|
7903
7879
|
import path27 from "path";
|
|
7904
7880
|
var CORE_VARIATIONS_EDITOR_PLUGIN_SLUG = "core-variations";
|
|
7905
7881
|
var CORE_VARIATION_USAGE = "wp-typia add core-variation <block-name> <name> or wp-typia add core-variation <name> --block <namespace/block>";
|
|
7882
|
+
var KNOWN_CORE_VARIATION_TARGETS = new Set([
|
|
7883
|
+
"core/archives",
|
|
7884
|
+
"core/audio",
|
|
7885
|
+
"core/avatar",
|
|
7886
|
+
"core/block",
|
|
7887
|
+
"core/button",
|
|
7888
|
+
"core/buttons",
|
|
7889
|
+
"core/calendar",
|
|
7890
|
+
"core/categories",
|
|
7891
|
+
"core/code",
|
|
7892
|
+
"core/column",
|
|
7893
|
+
"core/columns",
|
|
7894
|
+
"core/comment-author-name",
|
|
7895
|
+
"core/comment-content",
|
|
7896
|
+
"core/comment-date",
|
|
7897
|
+
"core/comment-edit-link",
|
|
7898
|
+
"core/comment-reply-link",
|
|
7899
|
+
"core/comment-template",
|
|
7900
|
+
"core/comments",
|
|
7901
|
+
"core/comments-pagination",
|
|
7902
|
+
"core/comments-pagination-next",
|
|
7903
|
+
"core/comments-pagination-numbers",
|
|
7904
|
+
"core/comments-pagination-previous",
|
|
7905
|
+
"core/comments-title",
|
|
7906
|
+
"core/cover",
|
|
7907
|
+
"core/details",
|
|
7908
|
+
"core/embed",
|
|
7909
|
+
"core/file",
|
|
7910
|
+
"core/footnotes",
|
|
7911
|
+
"core/freeform",
|
|
7912
|
+
"core/gallery",
|
|
7913
|
+
"core/group",
|
|
7914
|
+
"core/heading",
|
|
7915
|
+
"core/home-link",
|
|
7916
|
+
"core/html",
|
|
7917
|
+
"core/image",
|
|
7918
|
+
"core/latest-comments",
|
|
7919
|
+
"core/latest-posts",
|
|
7920
|
+
"core/legacy-widget",
|
|
7921
|
+
"core/list",
|
|
7922
|
+
"core/list-item",
|
|
7923
|
+
"core/loginout",
|
|
7924
|
+
"core/media-text",
|
|
7925
|
+
"core/missing",
|
|
7926
|
+
"core/more",
|
|
7927
|
+
"core/navigation",
|
|
7928
|
+
"core/navigation-link",
|
|
7929
|
+
"core/navigation-submenu",
|
|
7930
|
+
"core/nextpage",
|
|
7931
|
+
"core/page-list",
|
|
7932
|
+
"core/paragraph",
|
|
7933
|
+
"core/pattern",
|
|
7934
|
+
"core/post-author",
|
|
7935
|
+
"core/post-author-biography",
|
|
7936
|
+
"core/post-author-name",
|
|
7937
|
+
"core/post-comments",
|
|
7938
|
+
"core/post-comments-form",
|
|
7939
|
+
"core/post-content",
|
|
7940
|
+
"core/post-date",
|
|
7941
|
+
"core/post-excerpt",
|
|
7942
|
+
"core/post-featured-image",
|
|
7943
|
+
"core/post-navigation-link",
|
|
7944
|
+
"core/post-terms",
|
|
7945
|
+
"core/post-template",
|
|
7946
|
+
"core/post-title",
|
|
7947
|
+
"core/preformatted",
|
|
7948
|
+
"core/pullquote",
|
|
7949
|
+
"core/query",
|
|
7950
|
+
"core/query-no-results",
|
|
7951
|
+
"core/query-pagination",
|
|
7952
|
+
"core/query-pagination-next",
|
|
7953
|
+
"core/query-pagination-numbers",
|
|
7954
|
+
"core/query-pagination-previous",
|
|
7955
|
+
"core/query-title",
|
|
7956
|
+
"core/quote",
|
|
7957
|
+
"core/read-more",
|
|
7958
|
+
"core/rss",
|
|
7959
|
+
"core/search",
|
|
7960
|
+
"core/separator",
|
|
7961
|
+
"core/shortcode",
|
|
7962
|
+
"core/site-logo",
|
|
7963
|
+
"core/site-tagline",
|
|
7964
|
+
"core/site-title",
|
|
7965
|
+
"core/social-link",
|
|
7966
|
+
"core/social-links",
|
|
7967
|
+
"core/spacer",
|
|
7968
|
+
"core/table",
|
|
7969
|
+
"core/table-of-contents",
|
|
7970
|
+
"core/tag-cloud",
|
|
7971
|
+
"core/template-part",
|
|
7972
|
+
"core/term-description",
|
|
7973
|
+
"core/text-columns",
|
|
7974
|
+
"core/verse",
|
|
7975
|
+
"core/video"
|
|
7976
|
+
]);
|
|
7906
7977
|
var CORE_VARIATION_SIMPLE_CONTAINER_BLOCKS = new Set([
|
|
7907
7978
|
"core/column",
|
|
7908
7979
|
"core/cover",
|
|
@@ -7946,6 +8017,12 @@ function buildCoreVariationImportPath(ref) {
|
|
|
7946
8017
|
function formatCoreVariationTitle(variationSlug) {
|
|
7947
8018
|
return toTitleCase(variationSlug);
|
|
7948
8019
|
}
|
|
8020
|
+
function getUnknownCoreVariationTargetWarning(targetBlockName) {
|
|
8021
|
+
if (!targetBlockName.startsWith("core/") || KNOWN_CORE_VARIATION_TARGETS.has(targetBlockName)) {
|
|
8022
|
+
return;
|
|
8023
|
+
}
|
|
8024
|
+
return `Target block "${targetBlockName}" uses the WordPress core namespace but is not in wp-typia's known core block list. The variation was generated for forward compatibility; verify the block name or update wp-typia if this is a newer core block.`;
|
|
8025
|
+
}
|
|
7949
8026
|
function assertCoreVariationDoesNotExist(projectDir, targetBlockName, variationSlug) {
|
|
7950
8027
|
const variationFilePath = getCoreVariationFilePath(projectDir, targetBlockName, variationSlug);
|
|
7951
8028
|
if (fs2.existsSync(variationFilePath)) {
|
|
@@ -8153,6 +8230,7 @@ async function runAddCoreVariationCommand({
|
|
|
8153
8230
|
const workspace = resolveWorkspaceProject(cwd);
|
|
8154
8231
|
const resolvedTargetBlockName = assertFullBlockName(targetBlockName, "core-variation target");
|
|
8155
8232
|
const variationSlug = assertValidGeneratedSlug("Core variation name", normalizeBlockSlug(variationName), CORE_VARIATION_USAGE);
|
|
8233
|
+
const unknownCoreTargetWarning = getUnknownCoreVariationTargetWarning(resolvedTargetBlockName);
|
|
8156
8234
|
assertCoreVariationSlugIsNotRegistryIndex(variationSlug);
|
|
8157
8235
|
assertCoreVariationDoesNotExist(workspace.projectDir, resolvedTargetBlockName, variationSlug);
|
|
8158
8236
|
const bootstrapPath = path27.join(workspace.projectDir, `${workspace.packageName.split("/").pop() ?? workspace.packageName}.php`);
|
|
@@ -8193,7 +8271,8 @@ async function runAddCoreVariationCommand({
|
|
|
8193
8271
|
projectDir: workspace.projectDir,
|
|
8194
8272
|
targetBlockName: resolvedTargetBlockName,
|
|
8195
8273
|
variationFile: path27.relative(workspace.projectDir, variationFilePath),
|
|
8196
|
-
variationSlug
|
|
8274
|
+
variationSlug,
|
|
8275
|
+
...unknownCoreTargetWarning ? { warnings: [unknownCoreTargetWarning] } : {}
|
|
8197
8276
|
};
|
|
8198
8277
|
} catch (error) {
|
|
8199
8278
|
await rollbackWorkspaceMutation(mutationSnapshot);
|
|
@@ -10570,4 +10649,4 @@ export {
|
|
|
10570
10649
|
ADD_BLOCK_TEMPLATE_IDS
|
|
10571
10650
|
};
|
|
10572
10651
|
|
|
10573
|
-
//# debugId=
|
|
10652
|
+
//# debugId=FE26DE542557245464756E2164756E21
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
import {
|
|
12
12
|
getBuiltInTemplateLayerDirs,
|
|
13
13
|
isOmittableBuiltInTemplateLayerDir
|
|
14
|
-
} from "./cli-
|
|
14
|
+
} from "./cli-gaq29kzp.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-h2v72j8q.js";
|
|
37
37
|
import"./cli-cvxvcw7c.js";
|
|
38
38
|
import"./cli-t73q5aqz.js";
|
|
39
39
|
import"./cli-bajwv85z.js";
|