@wp-typia/project-tools 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/dist/runtime/ai-feature-artifacts.js +4 -1
- package/dist/runtime/block-generator-service-spec.js +2 -1
- package/dist/runtime/built-in-block-non-ts-basic-artifacts.d.ts +9 -0
- package/dist/runtime/built-in-block-non-ts-basic-artifacts.js +84 -0
- package/dist/runtime/built-in-block-non-ts-compound-artifacts.d.ts +9 -0
- package/dist/runtime/built-in-block-non-ts-compound-artifacts.js +36 -0
- package/dist/runtime/built-in-block-non-ts-compound-templates.d.ts +23 -0
- package/dist/runtime/built-in-block-non-ts-compound-templates.js +453 -0
- package/dist/runtime/built-in-block-non-ts-family-artifacts.d.ts +8 -26
- package/dist/runtime/built-in-block-non-ts-family-artifacts.js +8 -1034
- package/dist/runtime/built-in-block-non-ts-interactivity-artifacts.d.ts +9 -0
- package/dist/runtime/built-in-block-non-ts-interactivity-artifacts.js +83 -0
- package/dist/runtime/built-in-block-non-ts-persistence-artifacts.d.ts +9 -0
- package/dist/runtime/built-in-block-non-ts-persistence-artifacts.js +33 -0
- package/dist/runtime/built-in-block-non-ts-persistence-templates.d.ts +23 -0
- package/dist/runtime/built-in-block-non-ts-persistence-templates.js +395 -0
- package/dist/runtime/cli-add-block-json.js +5 -1
- package/dist/runtime/cli-add-collision.js +8 -0
- package/dist/runtime/cli-add-help.js +14 -10
- package/dist/runtime/cli-add-kind-ids.d.ts +1 -1
- package/dist/runtime/cli-add-kind-ids.js +1 -0
- package/dist/runtime/cli-add-types.d.ts +45 -6
- package/dist/runtime/cli-add-types.js +2 -0
- package/dist/runtime/cli-add-validation.d.ts +7 -0
- package/dist/runtime/cli-add-validation.js +9 -0
- package/dist/runtime/cli-add-workspace-ability-anchors.d.ts +24 -0
- package/dist/runtime/cli-add-workspace-ability-anchors.js +294 -0
- package/dist/runtime/cli-add-workspace-ability-registry.d.ts +10 -0
- package/dist/runtime/cli-add-workspace-ability-registry.js +51 -0
- package/dist/runtime/cli-add-workspace-ability-scaffold.d.ts +1 -1
- package/dist/runtime/cli-add-workspace-ability-scaffold.js +5 -308
- package/dist/runtime/cli-add-workspace-admin-view-scaffold.js +6 -2
- package/dist/runtime/cli-add-workspace-admin-view-templates-core-data.d.ts +34 -0
- package/dist/runtime/cli-add-workspace-admin-view-templates-core-data.js +483 -0
- package/dist/runtime/cli-add-workspace-admin-view-templates-default.d.ts +30 -0
- package/dist/runtime/cli-add-workspace-admin-view-templates-default.js +310 -0
- package/dist/runtime/cli-add-workspace-admin-view-templates-rest.d.ts +25 -0
- package/dist/runtime/cli-add-workspace-admin-view-templates-rest.js +124 -0
- package/dist/runtime/cli-add-workspace-admin-view-templates-settings.d.ts +34 -0
- package/dist/runtime/cli-add-workspace-admin-view-templates-settings.js +370 -0
- package/dist/runtime/cli-add-workspace-admin-view-templates-shared.d.ts +49 -0
- package/dist/runtime/cli-add-workspace-admin-view-templates-shared.js +259 -0
- package/dist/runtime/cli-add-workspace-admin-view-templates.d.ts +18 -27
- package/dist/runtime/cli-add-workspace-admin-view-templates.js +30 -1326
- package/dist/runtime/cli-add-workspace-ai-anchors.d.ts +4 -4
- package/dist/runtime/cli-add-workspace-ai-anchors.js +8 -233
- package/dist/runtime/cli-add-workspace-ai-scaffold.js +4 -2
- package/dist/runtime/cli-add-workspace-ai-source-emitters.d.ts +1 -4
- package/dist/runtime/cli-add-workspace-ai-source-emitters.js +1 -129
- package/dist/runtime/cli-add-workspace-ai-sync-rest-anchors.d.ts +5 -0
- package/dist/runtime/cli-add-workspace-ai-sync-rest-anchors.js +236 -0
- package/dist/runtime/cli-add-workspace-ai-sync-script-source.d.ts +4 -0
- package/dist/runtime/cli-add-workspace-ai-sync-script-source.js +145 -0
- package/dist/runtime/cli-add-workspace-assets.d.ts +6 -63
- package/dist/runtime/cli-add-workspace-assets.js +6 -950
- package/dist/runtime/cli-add-workspace-binding-source-anchors.d.ts +23 -0
- package/dist/runtime/cli-add-workspace-binding-source-anchors.js +112 -0
- package/dist/runtime/cli-add-workspace-binding-source-source-emitters.d.ts +33 -0
- package/dist/runtime/cli-add-workspace-binding-source-source-emitters.js +436 -0
- package/dist/runtime/cli-add-workspace-binding-source-types.d.ts +20 -0
- package/dist/runtime/cli-add-workspace-binding-source-types.js +1 -0
- package/dist/runtime/cli-add-workspace-binding-source.d.ts +40 -0
- package/dist/runtime/cli-add-workspace-binding-source.js +275 -0
- package/dist/runtime/cli-add-workspace-block-style.d.ts +22 -0
- package/dist/runtime/cli-add-workspace-block-style.js +148 -0
- package/dist/runtime/cli-add-workspace-block-transform.d.ts +32 -0
- package/dist/runtime/cli-add-workspace-block-transform.js +197 -0
- package/dist/runtime/cli-add-workspace-contract.js +1 -1
- package/dist/runtime/cli-add-workspace-core-variation.d.ts +20 -0
- package/dist/runtime/cli-add-workspace-core-variation.js +322 -0
- package/dist/runtime/cli-add-workspace-editor-plugin-anchors.d.ts +37 -0
- package/dist/runtime/cli-add-workspace-editor-plugin-anchors.js +206 -0
- package/dist/runtime/cli-add-workspace-editor-plugin-source-emitters.d.ts +47 -0
- package/dist/runtime/cli-add-workspace-editor-plugin-source-emitters.js +219 -0
- package/dist/runtime/cli-add-workspace-editor-plugin.d.ts +22 -0
- package/dist/runtime/cli-add-workspace-editor-plugin.js +78 -0
- package/dist/runtime/cli-add-workspace-hooked-block.d.ts +23 -0
- package/dist/runtime/cli-add-workspace-hooked-block.js +57 -0
- package/dist/runtime/cli-add-workspace-integration-env-files.d.ts +33 -0
- package/dist/runtime/cli-add-workspace-integration-env-files.js +65 -0
- package/dist/runtime/cli-add-workspace-integration-env-package-json.d.ts +38 -0
- package/dist/runtime/cli-add-workspace-integration-env-package-json.js +122 -0
- package/dist/runtime/cli-add-workspace-integration-env-source-emitters.d.ts +44 -0
- package/dist/runtime/cli-add-workspace-integration-env-source-emitters.js +262 -0
- package/dist/runtime/cli-add-workspace-integration-env.d.ts +3 -1
- package/dist/runtime/cli-add-workspace-integration-env.js +10 -313
- package/dist/runtime/cli-add-workspace-pattern-anchors.d.ts +10 -0
- package/dist/runtime/cli-add-workspace-pattern-anchors.js +95 -0
- package/dist/runtime/cli-add-workspace-pattern-options.d.ts +20 -0
- package/dist/runtime/cli-add-workspace-pattern-options.js +113 -0
- package/dist/runtime/cli-add-workspace-pattern-source-emitters.d.ts +20 -0
- package/dist/runtime/cli-add-workspace-pattern-source-emitters.js +57 -0
- package/dist/runtime/cli-add-workspace-pattern.d.ts +42 -0
- package/dist/runtime/cli-add-workspace-pattern.js +99 -0
- package/dist/runtime/cli-add-workspace-post-meta.js +1 -1
- package/dist/runtime/cli-add-workspace-registration-hooks.d.ts +50 -0
- package/dist/runtime/cli-add-workspace-registration-hooks.js +162 -0
- package/dist/runtime/cli-add-workspace-rest-anchors.d.ts +9 -4
- package/dist/runtime/cli-add-workspace-rest-anchors.js +9 -428
- package/dist/runtime/cli-add-workspace-rest-bootstrap-anchors.d.ts +17 -0
- package/dist/runtime/cli-add-workspace-rest-bootstrap-anchors.js +108 -0
- package/dist/runtime/cli-add-workspace-rest-contract-sync-anchors.d.ts +9 -0
- package/dist/runtime/cli-add-workspace-rest-contract-sync-anchors.js +142 -0
- package/dist/runtime/cli-add-workspace-rest-generated-source-emitters.d.ts +51 -0
- package/dist/runtime/cli-add-workspace-rest-generated-source-emitters.js +415 -0
- package/dist/runtime/cli-add-workspace-rest-generated.d.ts +9 -0
- package/dist/runtime/cli-add-workspace-rest-generated.js +160 -0
- package/dist/runtime/cli-add-workspace-rest-manual-source-emitters.d.ts +80 -0
- package/dist/runtime/cli-add-workspace-rest-manual-source-emitters.js +238 -0
- package/dist/runtime/cli-add-workspace-rest-manual.d.ts +8 -0
- package/dist/runtime/cli-add-workspace-rest-manual.js +266 -0
- package/dist/runtime/cli-add-workspace-rest-php-templates.d.ts +18 -0
- package/dist/runtime/cli-add-workspace-rest-php-templates.js +359 -0
- package/dist/runtime/cli-add-workspace-rest-resource-php-routing-template.d.ts +33 -0
- package/dist/runtime/cli-add-workspace-rest-resource-php-routing-template.js +145 -0
- package/dist/runtime/cli-add-workspace-rest-resource-sync-anchors.d.ts +9 -0
- package/dist/runtime/cli-add-workspace-rest-resource-sync-anchors.js +162 -0
- package/dist/runtime/cli-add-workspace-rest-schema-helper-php-template.d.ts +7 -0
- package/dist/runtime/cli-add-workspace-rest-schema-helper-php-template.js +193 -0
- package/dist/runtime/cli-add-workspace-rest-source-emitters.d.ts +5 -91
- package/dist/runtime/cli-add-workspace-rest-source-emitters.js +5 -642
- package/dist/runtime/cli-add-workspace-rest-source-utils.d.ts +17 -0
- package/dist/runtime/cli-add-workspace-rest-source-utils.js +50 -0
- package/dist/runtime/cli-add-workspace-rest-sync-script-shared.d.ts +56 -0
- package/dist/runtime/cli-add-workspace-rest-sync-script-shared.js +122 -0
- package/dist/runtime/cli-add-workspace-rest-types.d.ts +108 -0
- package/dist/runtime/cli-add-workspace-rest-types.js +1 -0
- package/dist/runtime/cli-add-workspace-rest.d.ts +3 -20
- package/dist/runtime/cli-add-workspace-rest.js +33 -788
- package/dist/runtime/cli-add-workspace-variation.d.ts +22 -0
- package/dist/runtime/cli-add-workspace-variation.js +162 -0
- package/dist/runtime/cli-add-workspace.d.ts +42 -107
- package/dist/runtime/cli-add-workspace.js +42 -674
- package/dist/runtime/cli-add.d.ts +3 -3
- package/dist/runtime/cli-add.js +2 -2
- package/dist/runtime/cli-core.d.ts +3 -2
- package/dist/runtime/cli-core.js +2 -2
- package/dist/runtime/cli-diagnostics.d.ts +3 -1
- package/dist/runtime/cli-diagnostics.js +17 -5
- package/dist/runtime/cli-doctor-workspace-bindings.js +63 -1
- package/dist/runtime/cli-doctor-workspace-block-addons.d.ts +12 -0
- package/dist/runtime/cli-doctor-workspace-block-addons.js +162 -0
- package/dist/runtime/cli-doctor-workspace-block-iframe.d.ts +9 -0
- package/dist/runtime/cli-doctor-workspace-block-iframe.js +228 -0
- package/dist/runtime/cli-doctor-workspace-block-metadata.d.ts +11 -0
- package/dist/runtime/cli-doctor-workspace-block-metadata.js +111 -0
- package/dist/runtime/cli-doctor-workspace-blocks.js +6 -424
- package/dist/runtime/cli-doctor-workspace-features-abilities.d.ts +11 -0
- package/dist/runtime/cli-doctor-workspace-features-abilities.js +112 -0
- package/dist/runtime/cli-doctor-workspace-features-admin-views.d.ts +11 -0
- package/dist/runtime/cli-doctor-workspace-features-admin-views.js +128 -0
- package/dist/runtime/cli-doctor-workspace-features-ai.d.ts +11 -0
- package/dist/runtime/cli-doctor-workspace-features-ai.js +57 -0
- package/dist/runtime/cli-doctor-workspace-features-editor-plugins.d.ts +11 -0
- package/dist/runtime/cli-doctor-workspace-features-editor-plugins.js +80 -0
- package/dist/runtime/cli-doctor-workspace-features-post-meta.d.ts +11 -0
- package/dist/runtime/cli-doctor-workspace-features-post-meta.js +77 -0
- package/dist/runtime/cli-doctor-workspace-features-rest.d.ts +11 -0
- package/dist/runtime/cli-doctor-workspace-features-rest.js +120 -0
- package/dist/runtime/cli-doctor-workspace-features.js +14 -487
- package/dist/runtime/cli-doctor.d.ts +54 -3
- package/dist/runtime/cli-doctor.js +92 -10
- package/dist/runtime/cli-help.js +12 -7
- package/dist/runtime/cli-init-package-json.js +4 -2
- package/dist/runtime/cli-prompt.d.ts +16 -2
- package/dist/runtime/cli-prompt.js +29 -12
- package/dist/runtime/cli-scaffold.d.ts +2 -1
- package/dist/runtime/cli-scaffold.js +19 -10
- package/dist/runtime/external-template-guards.js +4 -6
- package/dist/runtime/index.d.ts +6 -3
- package/dist/runtime/index.js +4 -2
- package/dist/runtime/json-utils.d.ts +62 -4
- package/dist/runtime/json-utils.js +78 -4
- package/dist/runtime/local-dev-presets.js +6 -2
- package/dist/runtime/migration-ui-capability.js +4 -1
- package/dist/runtime/migration-utils.js +4 -1
- package/dist/runtime/package-managers.js +6 -1
- package/dist/runtime/package-versions.d.ts +1 -0
- package/dist/runtime/package-versions.js +16 -3
- package/dist/runtime/pattern-catalog.d.ts +122 -0
- package/dist/runtime/pattern-catalog.js +471 -0
- package/dist/runtime/post-meta-binding-fields.d.ts +46 -0
- package/dist/runtime/post-meta-binding-fields.js +135 -0
- package/dist/runtime/scaffold-bootstrap.js +7 -2
- package/dist/runtime/scaffold-package-manager-files.js +5 -1
- package/dist/runtime/scaffold-repository-reference.js +4 -2
- package/dist/runtime/scaffold-template-variables.js +2 -1
- package/dist/runtime/scaffold.d.ts +18 -1
- package/dist/runtime/scaffold.js +55 -2
- package/dist/runtime/temp-roots.js +4 -1
- package/dist/runtime/template-layers.js +4 -1
- package/dist/runtime/template-registry.js +9 -3
- package/dist/runtime/template-source-contracts.d.ts +2 -0
- package/dist/runtime/template-source-normalization.js +2 -1
- package/dist/runtime/template-source-remote.js +18 -5
- package/dist/runtime/template-source-seeds.js +10 -3
- package/dist/runtime/typia-llm-json-schema.d.ts +24 -0
- package/dist/runtime/typia-llm-json-schema.js +33 -0
- package/dist/runtime/typia-llm-openapi-constraints.d.ts +20 -0
- package/dist/runtime/typia-llm-openapi-constraints.js +254 -0
- package/dist/runtime/typia-llm-projection.d.ts +25 -0
- package/dist/runtime/typia-llm-projection.js +58 -0
- package/dist/runtime/typia-llm-render.d.ts +21 -0
- package/dist/runtime/typia-llm-render.js +252 -0
- package/dist/runtime/typia-llm-sync.d.ts +10 -0
- package/dist/runtime/typia-llm-sync.js +63 -0
- package/dist/runtime/typia-llm-types.d.ts +197 -0
- package/dist/runtime/typia-llm-types.js +1 -0
- package/dist/runtime/typia-llm.d.ts +9 -255
- package/dist/runtime/typia-llm.js +5 -634
- package/dist/runtime/workspace-inventory-mutations.js +15 -1
- package/dist/runtime/workspace-inventory-parser-entries.d.ts +17 -0
- package/dist/runtime/workspace-inventory-parser-entries.js +157 -0
- package/dist/runtime/workspace-inventory-parser-validation.d.ts +104 -0
- package/dist/runtime/workspace-inventory-parser-validation.js +34 -0
- package/dist/runtime/workspace-inventory-parser.d.ts +3 -45
- package/dist/runtime/workspace-inventory-parser.js +3 -581
- package/dist/runtime/workspace-inventory-section-descriptors.d.ts +19 -0
- package/dist/runtime/workspace-inventory-section-descriptors.js +443 -0
- package/dist/runtime/workspace-inventory-templates.d.ts +3 -3
- package/dist/runtime/workspace-inventory-templates.js +10 -1
- package/dist/runtime/workspace-inventory-types.d.ts +10 -1
- package/dist/runtime/workspace-project.js +4 -6
- package/package.json +8 -3
- package/templates/_shared/compound/core/scripts/block-config.ts.mustache +22 -0
- package/templates/_shared/compound/core/scripts/sync-types-to-block-json.ts.mustache +103 -2
- package/templates/_shared/compound/core/src/inner-blocks-templates.ts.mustache +13 -0
- package/templates/_shared/compound/persistence/scripts/block-config.ts.mustache +22 -1
|
@@ -0,0 +1,443 @@
|
|
|
1
|
+
import { MANUAL_REST_CONTRACT_AUTH_IDS, MANUAL_REST_CONTRACT_HTTP_METHOD_IDS, REST_RESOURCE_METHOD_IDS, } from "./cli-add-shared.js";
|
|
2
|
+
import { ABILITY_CONFIG_ENTRY_MARKER, ABILITIES_CONST_SECTION, ABILITIES_INTERFACE_SECTION, ADMIN_VIEW_CONFIG_ENTRY_MARKER, ADMIN_VIEWS_CONST_SECTION, ADMIN_VIEWS_INTERFACE_SECTION, AI_FEATURES_CONST_SECTION, AI_FEATURES_INTERFACE_SECTION, AI_FEATURE_CONFIG_ENTRY_MARKER, BINDING_SOURCES_CONST_SECTION, BINDING_SOURCES_INTERFACE_SECTION, BINDING_SOURCE_CONFIG_ENTRY_MARKER, BLOCK_CONFIG_ENTRY_MARKER, BLOCK_STYLES_CONST_SECTION, BLOCK_STYLES_INTERFACE_SECTION, BLOCK_STYLE_CONFIG_ENTRY_MARKER, BLOCK_TRANSFORMS_CONST_SECTION, BLOCK_TRANSFORMS_INTERFACE_SECTION, BLOCK_TRANSFORM_CONFIG_ENTRY_MARKER, CONTRACTS_CONST_SECTION, CONTRACTS_INTERFACE_SECTION, CONTRACT_CONFIG_ENTRY_MARKER, EDITOR_PLUGINS_CONST_SECTION, EDITOR_PLUGINS_INTERFACE_SECTION, EDITOR_PLUGIN_CONFIG_ENTRY_MARKER, PATTERNS_CONST_SECTION, PATTERNS_INTERFACE_SECTION, PATTERN_CONFIG_ENTRY_MARKER, POST_META_CONFIG_ENTRY_MARKER, POST_META_CONST_SECTION, POST_META_INTERFACE_SECTION, REST_RESOURCES_CONST_SECTION, REST_RESOURCES_INTERFACE_SECTION, REST_RESOURCE_CONFIG_ENTRY_MARKER, VARIATIONS_CONST_SECTION, VARIATIONS_INTERFACE_SECTION, VARIATION_CONFIG_ENTRY_MARKER, } from "./workspace-inventory-templates.js";
|
|
3
|
+
import { defineInventoryEntryParser, } from "./workspace-inventory-parser-validation.js";
|
|
4
|
+
/**
|
|
5
|
+
* Descriptor for the required `BLOCKS` inventory section.
|
|
6
|
+
*
|
|
7
|
+
* Runtime readers use its `parse` contract to require the exported `BLOCKS`
|
|
8
|
+
* array and validate required block entry fields; mutation helpers use its
|
|
9
|
+
* `append` marker to insert generated block entries without duplicating section
|
|
10
|
+
* knowledge.
|
|
11
|
+
*/
|
|
12
|
+
export const BLOCK_INVENTORY_SECTION = {
|
|
13
|
+
append: {
|
|
14
|
+
marker: BLOCK_CONFIG_ENTRY_MARKER,
|
|
15
|
+
optionKey: "blockEntries",
|
|
16
|
+
},
|
|
17
|
+
parse: {
|
|
18
|
+
entriesKey: "blocks",
|
|
19
|
+
entry: defineInventoryEntryParser()({
|
|
20
|
+
entryName: "BLOCKS",
|
|
21
|
+
fields: [
|
|
22
|
+
{ key: "apiTypesFile" },
|
|
23
|
+
{ key: "attributeTypeName" },
|
|
24
|
+
{ key: "openApiFile" },
|
|
25
|
+
{ key: "slug", required: true },
|
|
26
|
+
{ key: "typesFile", required: true },
|
|
27
|
+
],
|
|
28
|
+
}),
|
|
29
|
+
exportName: "BLOCKS",
|
|
30
|
+
required: true,
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Descriptors for optional workspace inventory sections beyond `BLOCKS`.
|
|
35
|
+
*
|
|
36
|
+
* Each descriptor centralizes append markers, exported interface/value repair
|
|
37
|
+
* sections, parser entry metadata such as `entriesKey` and `entryName`, and
|
|
38
|
+
* optional section flags so add, doctor, read, and mutation flows share one
|
|
39
|
+
* runtime contract when adding new inventory domains.
|
|
40
|
+
*/
|
|
41
|
+
export const INVENTORY_SECTIONS = [
|
|
42
|
+
{
|
|
43
|
+
append: {
|
|
44
|
+
marker: VARIATION_CONFIG_ENTRY_MARKER,
|
|
45
|
+
optionKey: "variationEntries",
|
|
46
|
+
},
|
|
47
|
+
interface: {
|
|
48
|
+
name: "WorkspaceVariationConfig",
|
|
49
|
+
section: VARIATIONS_INTERFACE_SECTION,
|
|
50
|
+
},
|
|
51
|
+
parse: {
|
|
52
|
+
entriesKey: "variations",
|
|
53
|
+
entry: defineInventoryEntryParser()({
|
|
54
|
+
entryName: "VARIATIONS",
|
|
55
|
+
fields: [
|
|
56
|
+
{ key: "block", required: true },
|
|
57
|
+
{ key: "file", required: true },
|
|
58
|
+
{ key: "slug", required: true },
|
|
59
|
+
],
|
|
60
|
+
}),
|
|
61
|
+
hasSectionKey: "hasVariationsSection",
|
|
62
|
+
},
|
|
63
|
+
value: {
|
|
64
|
+
name: "VARIATIONS",
|
|
65
|
+
section: VARIATIONS_CONST_SECTION,
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
append: {
|
|
70
|
+
marker: BLOCK_STYLE_CONFIG_ENTRY_MARKER,
|
|
71
|
+
optionKey: "blockStyleEntries",
|
|
72
|
+
},
|
|
73
|
+
interface: {
|
|
74
|
+
name: "WorkspaceBlockStyleConfig",
|
|
75
|
+
section: BLOCK_STYLES_INTERFACE_SECTION,
|
|
76
|
+
},
|
|
77
|
+
parse: {
|
|
78
|
+
entriesKey: "blockStyles",
|
|
79
|
+
entry: defineInventoryEntryParser()({
|
|
80
|
+
entryName: "BLOCK_STYLES",
|
|
81
|
+
fields: [
|
|
82
|
+
{ key: "block", required: true },
|
|
83
|
+
{ key: "file", required: true },
|
|
84
|
+
{ key: "slug", required: true },
|
|
85
|
+
],
|
|
86
|
+
}),
|
|
87
|
+
hasSectionKey: "hasBlockStylesSection",
|
|
88
|
+
},
|
|
89
|
+
value: {
|
|
90
|
+
name: "BLOCK_STYLES",
|
|
91
|
+
section: BLOCK_STYLES_CONST_SECTION,
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
append: {
|
|
96
|
+
marker: BLOCK_TRANSFORM_CONFIG_ENTRY_MARKER,
|
|
97
|
+
optionKey: "blockTransformEntries",
|
|
98
|
+
},
|
|
99
|
+
interface: {
|
|
100
|
+
name: "WorkspaceBlockTransformConfig",
|
|
101
|
+
section: BLOCK_TRANSFORMS_INTERFACE_SECTION,
|
|
102
|
+
},
|
|
103
|
+
parse: {
|
|
104
|
+
entriesKey: "blockTransforms",
|
|
105
|
+
entry: defineInventoryEntryParser()({
|
|
106
|
+
entryName: "BLOCK_TRANSFORMS",
|
|
107
|
+
fields: [
|
|
108
|
+
{ key: "block", required: true },
|
|
109
|
+
{ key: "file", required: true },
|
|
110
|
+
{ key: "from", required: true },
|
|
111
|
+
{ key: "slug", required: true },
|
|
112
|
+
{ key: "to", required: true },
|
|
113
|
+
],
|
|
114
|
+
}),
|
|
115
|
+
hasSectionKey: "hasBlockTransformsSection",
|
|
116
|
+
},
|
|
117
|
+
value: {
|
|
118
|
+
name: "BLOCK_TRANSFORMS",
|
|
119
|
+
section: BLOCK_TRANSFORMS_CONST_SECTION,
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
append: {
|
|
124
|
+
marker: PATTERN_CONFIG_ENTRY_MARKER,
|
|
125
|
+
optionKey: "patternEntries",
|
|
126
|
+
},
|
|
127
|
+
interface: {
|
|
128
|
+
name: "WorkspacePatternConfig",
|
|
129
|
+
section: PATTERNS_INTERFACE_SECTION,
|
|
130
|
+
},
|
|
131
|
+
parse: {
|
|
132
|
+
entriesKey: "patterns",
|
|
133
|
+
entry: defineInventoryEntryParser()({
|
|
134
|
+
entryName: "PATTERNS",
|
|
135
|
+
fields: [
|
|
136
|
+
{ key: "contentFile" },
|
|
137
|
+
{ key: "file" },
|
|
138
|
+
{ key: "scope" },
|
|
139
|
+
{ key: "sectionRole" },
|
|
140
|
+
{ key: "slug", required: true },
|
|
141
|
+
{ key: "tags", kind: "stringArray" },
|
|
142
|
+
{ key: "thumbnailUrl" },
|
|
143
|
+
{ key: "title" },
|
|
144
|
+
],
|
|
145
|
+
}),
|
|
146
|
+
hasSectionKey: "hasPatternsSection",
|
|
147
|
+
},
|
|
148
|
+
value: {
|
|
149
|
+
name: "PATTERNS",
|
|
150
|
+
section: PATTERNS_CONST_SECTION,
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
append: {
|
|
155
|
+
marker: BINDING_SOURCE_CONFIG_ENTRY_MARKER,
|
|
156
|
+
optionKey: "bindingSourceEntries",
|
|
157
|
+
},
|
|
158
|
+
interface: {
|
|
159
|
+
name: "WorkspaceBindingSourceConfig",
|
|
160
|
+
section: BINDING_SOURCES_INTERFACE_SECTION,
|
|
161
|
+
},
|
|
162
|
+
parse: {
|
|
163
|
+
entriesKey: "bindingSources",
|
|
164
|
+
entry: defineInventoryEntryParser()({
|
|
165
|
+
entryName: "BINDING_SOURCES",
|
|
166
|
+
fields: [
|
|
167
|
+
{ key: "attribute" },
|
|
168
|
+
{ key: "block" },
|
|
169
|
+
{ key: "editorFile", required: true },
|
|
170
|
+
{ key: "metaPath" },
|
|
171
|
+
{ key: "postMeta" },
|
|
172
|
+
{ key: "serverFile", required: true },
|
|
173
|
+
{ key: "slug", required: true },
|
|
174
|
+
],
|
|
175
|
+
}),
|
|
176
|
+
hasSectionKey: "hasBindingSourcesSection",
|
|
177
|
+
},
|
|
178
|
+
value: {
|
|
179
|
+
name: "BINDING_SOURCES",
|
|
180
|
+
section: BINDING_SOURCES_CONST_SECTION,
|
|
181
|
+
},
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
append: {
|
|
185
|
+
marker: CONTRACT_CONFIG_ENTRY_MARKER,
|
|
186
|
+
optionKey: "contractEntries",
|
|
187
|
+
},
|
|
188
|
+
interface: {
|
|
189
|
+
name: "WorkspaceContractConfig",
|
|
190
|
+
section: CONTRACTS_INTERFACE_SECTION,
|
|
191
|
+
},
|
|
192
|
+
parse: {
|
|
193
|
+
entriesKey: "contracts",
|
|
194
|
+
entry: defineInventoryEntryParser()({
|
|
195
|
+
entryName: "CONTRACTS",
|
|
196
|
+
fields: [
|
|
197
|
+
{ key: "schemaFile", required: true },
|
|
198
|
+
{ key: "slug", required: true },
|
|
199
|
+
{ key: "sourceTypeName", required: true },
|
|
200
|
+
{ key: "typesFile", required: true },
|
|
201
|
+
],
|
|
202
|
+
}),
|
|
203
|
+
hasSectionKey: "hasContractsSection",
|
|
204
|
+
},
|
|
205
|
+
value: {
|
|
206
|
+
name: "CONTRACTS",
|
|
207
|
+
section: CONTRACTS_CONST_SECTION,
|
|
208
|
+
},
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
append: {
|
|
212
|
+
marker: REST_RESOURCE_CONFIG_ENTRY_MARKER,
|
|
213
|
+
optionKey: "restResourceEntries",
|
|
214
|
+
},
|
|
215
|
+
interface: {
|
|
216
|
+
name: "WorkspaceRestResourceConfig",
|
|
217
|
+
section: REST_RESOURCES_INTERFACE_SECTION,
|
|
218
|
+
},
|
|
219
|
+
parse: {
|
|
220
|
+
entriesKey: "restResources",
|
|
221
|
+
entry: defineInventoryEntryParser()({
|
|
222
|
+
entryName: "REST_RESOURCES",
|
|
223
|
+
fields: [
|
|
224
|
+
{ key: "apiFile", required: true },
|
|
225
|
+
{
|
|
226
|
+
key: "auth",
|
|
227
|
+
validate: (value, context) => {
|
|
228
|
+
if (typeof value === "string" &&
|
|
229
|
+
!MANUAL_REST_CONTRACT_AUTH_IDS.includes(value)) {
|
|
230
|
+
throw new Error(`${context.entryName}[${context.elementIndex}].${context.key} must be one of: ${MANUAL_REST_CONTRACT_AUTH_IDS.join(", ")}.`);
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
},
|
|
234
|
+
{ key: "bodyTypeName" },
|
|
235
|
+
{ key: "clientFile", required: true },
|
|
236
|
+
{ key: "controllerClass" },
|
|
237
|
+
{ key: "controllerExtends" },
|
|
238
|
+
{ key: "dataFile" },
|
|
239
|
+
{
|
|
240
|
+
key: "method",
|
|
241
|
+
validate: (value, context) => {
|
|
242
|
+
if (typeof value === "string" &&
|
|
243
|
+
!MANUAL_REST_CONTRACT_HTTP_METHOD_IDS.includes(value)) {
|
|
244
|
+
throw new Error(`${context.entryName}[${context.elementIndex}].${context.key} must be one of: ${MANUAL_REST_CONTRACT_HTTP_METHOD_IDS.join(", ")}.`);
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
key: "methods",
|
|
250
|
+
kind: "stringArray",
|
|
251
|
+
required: true,
|
|
252
|
+
validate: (value, context) => {
|
|
253
|
+
const methods = Array.isArray(value) ? value : [];
|
|
254
|
+
const invalidMethods = methods.filter((method) => !REST_RESOURCE_METHOD_IDS.includes(method));
|
|
255
|
+
if (invalidMethods.length > 0) {
|
|
256
|
+
throw new Error(`${context.entryName}[${context.elementIndex}].${context.key} includes unsupported values: ${invalidMethods.join(", ")}.`);
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
key: "mode",
|
|
262
|
+
validate: (value, context) => {
|
|
263
|
+
if (typeof value === "string" &&
|
|
264
|
+
value !== "generated" &&
|
|
265
|
+
value !== "manual") {
|
|
266
|
+
throw new Error(`${context.entryName}[${context.elementIndex}].${context.key} must be generated or manual.`);
|
|
267
|
+
}
|
|
268
|
+
},
|
|
269
|
+
},
|
|
270
|
+
{ key: "namespace", required: true },
|
|
271
|
+
{ key: "openApiFile", required: true },
|
|
272
|
+
{ key: "pathPattern" },
|
|
273
|
+
{ key: "permissionCallback" },
|
|
274
|
+
{ key: "phpFile" },
|
|
275
|
+
{ key: "queryTypeName" },
|
|
276
|
+
{ key: "responseTypeName" },
|
|
277
|
+
{ key: "routePattern" },
|
|
278
|
+
{ key: "secretFieldName" },
|
|
279
|
+
{ key: "secretPreserveOnEmpty", kind: "boolean" },
|
|
280
|
+
{ key: "secretStateFieldName" },
|
|
281
|
+
{ key: "slug", required: true },
|
|
282
|
+
{ key: "typesFile", required: true },
|
|
283
|
+
{ key: "validatorsFile", required: true },
|
|
284
|
+
],
|
|
285
|
+
}),
|
|
286
|
+
hasSectionKey: "hasRestResourcesSection",
|
|
287
|
+
},
|
|
288
|
+
value: {
|
|
289
|
+
name: "REST_RESOURCES",
|
|
290
|
+
section: REST_RESOURCES_CONST_SECTION,
|
|
291
|
+
},
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
append: {
|
|
295
|
+
marker: POST_META_CONFIG_ENTRY_MARKER,
|
|
296
|
+
optionKey: "postMetaEntries",
|
|
297
|
+
},
|
|
298
|
+
interface: {
|
|
299
|
+
name: "WorkspacePostMetaConfig",
|
|
300
|
+
section: POST_META_INTERFACE_SECTION,
|
|
301
|
+
},
|
|
302
|
+
parse: {
|
|
303
|
+
entriesKey: "postMeta",
|
|
304
|
+
entry: defineInventoryEntryParser()({
|
|
305
|
+
entryName: "POST_META",
|
|
306
|
+
fields: [
|
|
307
|
+
{ key: "metaKey", required: true },
|
|
308
|
+
{ key: "phpFile", required: true },
|
|
309
|
+
{ key: "postType", required: true },
|
|
310
|
+
{ key: "schemaFile", required: true },
|
|
311
|
+
{ key: "showInRest", kind: "boolean", required: true },
|
|
312
|
+
{ key: "slug", required: true },
|
|
313
|
+
{ key: "sourceTypeName", required: true },
|
|
314
|
+
{ key: "typesFile", required: true },
|
|
315
|
+
],
|
|
316
|
+
}),
|
|
317
|
+
hasSectionKey: "hasPostMetaSection",
|
|
318
|
+
},
|
|
319
|
+
value: {
|
|
320
|
+
name: "POST_META",
|
|
321
|
+
section: POST_META_CONST_SECTION,
|
|
322
|
+
},
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
append: {
|
|
326
|
+
marker: ABILITY_CONFIG_ENTRY_MARKER,
|
|
327
|
+
optionKey: "abilityEntries",
|
|
328
|
+
},
|
|
329
|
+
interface: {
|
|
330
|
+
name: "WorkspaceAbilityConfig",
|
|
331
|
+
section: ABILITIES_INTERFACE_SECTION,
|
|
332
|
+
},
|
|
333
|
+
parse: {
|
|
334
|
+
entriesKey: "abilities",
|
|
335
|
+
entry: defineInventoryEntryParser()({
|
|
336
|
+
entryName: "ABILITIES",
|
|
337
|
+
fields: [
|
|
338
|
+
{ key: "clientFile", required: true },
|
|
339
|
+
{ key: "configFile", required: true },
|
|
340
|
+
{ key: "dataFile", required: true },
|
|
341
|
+
{ key: "inputSchemaFile", required: true },
|
|
342
|
+
{ key: "inputTypeName", required: true },
|
|
343
|
+
{ key: "outputSchemaFile", required: true },
|
|
344
|
+
{ key: "outputTypeName", required: true },
|
|
345
|
+
{ key: "phpFile", required: true },
|
|
346
|
+
{ key: "slug", required: true },
|
|
347
|
+
{ key: "typesFile", required: true },
|
|
348
|
+
],
|
|
349
|
+
}),
|
|
350
|
+
hasSectionKey: "hasAbilitiesSection",
|
|
351
|
+
},
|
|
352
|
+
value: {
|
|
353
|
+
name: "ABILITIES",
|
|
354
|
+
section: ABILITIES_CONST_SECTION,
|
|
355
|
+
},
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
append: {
|
|
359
|
+
marker: AI_FEATURE_CONFIG_ENTRY_MARKER,
|
|
360
|
+
optionKey: "aiFeatureEntries",
|
|
361
|
+
},
|
|
362
|
+
interface: {
|
|
363
|
+
name: "WorkspaceAiFeatureConfig",
|
|
364
|
+
section: AI_FEATURES_INTERFACE_SECTION,
|
|
365
|
+
},
|
|
366
|
+
parse: {
|
|
367
|
+
entriesKey: "aiFeatures",
|
|
368
|
+
entry: defineInventoryEntryParser()({
|
|
369
|
+
entryName: "AI_FEATURES",
|
|
370
|
+
fields: [
|
|
371
|
+
{ key: "aiSchemaFile", required: true },
|
|
372
|
+
{ key: "apiFile", required: true },
|
|
373
|
+
{ key: "clientFile", required: true },
|
|
374
|
+
{ key: "dataFile", required: true },
|
|
375
|
+
{ key: "namespace", required: true },
|
|
376
|
+
{ key: "openApiFile", required: true },
|
|
377
|
+
{ key: "phpFile", required: true },
|
|
378
|
+
{ key: "slug", required: true },
|
|
379
|
+
{ key: "typesFile", required: true },
|
|
380
|
+
{ key: "validatorsFile", required: true },
|
|
381
|
+
],
|
|
382
|
+
}),
|
|
383
|
+
hasSectionKey: "hasAiFeaturesSection",
|
|
384
|
+
},
|
|
385
|
+
value: {
|
|
386
|
+
name: "AI_FEATURES",
|
|
387
|
+
section: AI_FEATURES_CONST_SECTION,
|
|
388
|
+
},
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
append: {
|
|
392
|
+
marker: ADMIN_VIEW_CONFIG_ENTRY_MARKER,
|
|
393
|
+
optionKey: "adminViewEntries",
|
|
394
|
+
},
|
|
395
|
+
interface: {
|
|
396
|
+
name: "WorkspaceAdminViewConfig",
|
|
397
|
+
section: ADMIN_VIEWS_INTERFACE_SECTION,
|
|
398
|
+
},
|
|
399
|
+
parse: {
|
|
400
|
+
entriesKey: "adminViews",
|
|
401
|
+
entry: defineInventoryEntryParser()({
|
|
402
|
+
entryName: "ADMIN_VIEWS",
|
|
403
|
+
fields: [
|
|
404
|
+
{ key: "file", required: true },
|
|
405
|
+
{ key: "phpFile", required: true },
|
|
406
|
+
{ key: "slug", required: true },
|
|
407
|
+
{ key: "source" },
|
|
408
|
+
],
|
|
409
|
+
}),
|
|
410
|
+
hasSectionKey: "hasAdminViewsSection",
|
|
411
|
+
},
|
|
412
|
+
value: {
|
|
413
|
+
name: "ADMIN_VIEWS",
|
|
414
|
+
section: ADMIN_VIEWS_CONST_SECTION,
|
|
415
|
+
},
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
append: {
|
|
419
|
+
marker: EDITOR_PLUGIN_CONFIG_ENTRY_MARKER,
|
|
420
|
+
optionKey: "editorPluginEntries",
|
|
421
|
+
},
|
|
422
|
+
interface: {
|
|
423
|
+
name: "WorkspaceEditorPluginConfig",
|
|
424
|
+
section: EDITOR_PLUGINS_INTERFACE_SECTION,
|
|
425
|
+
},
|
|
426
|
+
parse: {
|
|
427
|
+
entriesKey: "editorPlugins",
|
|
428
|
+
entry: defineInventoryEntryParser()({
|
|
429
|
+
entryName: "EDITOR_PLUGINS",
|
|
430
|
+
fields: [
|
|
431
|
+
{ key: "file", required: true },
|
|
432
|
+
{ key: "slug", required: true },
|
|
433
|
+
{ key: "slot", required: true },
|
|
434
|
+
],
|
|
435
|
+
}),
|
|
436
|
+
hasSectionKey: "hasEditorPluginsSection",
|
|
437
|
+
},
|
|
438
|
+
value: {
|
|
439
|
+
name: "EDITOR_PLUGINS",
|
|
440
|
+
section: EDITOR_PLUGINS_CONST_SECTION,
|
|
441
|
+
},
|
|
442
|
+
},
|
|
443
|
+
];
|
|
@@ -23,13 +23,13 @@ export declare const BLOCK_STYLES_INTERFACE_SECTION = "\n\nexport interface Work
|
|
|
23
23
|
export declare const BLOCK_STYLES_CONST_SECTION = "\n\nexport const BLOCK_STYLES: WorkspaceBlockStyleConfig[] = [\n\t// wp-typia add style entries\n];\n";
|
|
24
24
|
export declare const BLOCK_TRANSFORMS_INTERFACE_SECTION = "\n\nexport interface WorkspaceBlockTransformConfig {\n\tblock: string;\n\tfile: string;\n\tfrom: string;\n\tslug: string;\n\tto: string;\n}\n";
|
|
25
25
|
export declare const BLOCK_TRANSFORMS_CONST_SECTION = "\n\nexport const BLOCK_TRANSFORMS: WorkspaceBlockTransformConfig[] = [\n\t// wp-typia add transform entries\n];\n";
|
|
26
|
-
export declare const PATTERNS_INTERFACE_SECTION = "\n\nexport interface WorkspacePatternConfig {\n\tfile
|
|
26
|
+
export declare const PATTERNS_INTERFACE_SECTION = "\n\nexport interface WorkspacePatternConfig {\n\tcontentFile?: string;\n\tfile?: string;\n\tscope?: 'full' | 'section';\n\tsectionRole?: string;\n\tslug: string;\n\ttags?: string[];\n\tthumbnailUrl?: string;\n\ttitle?: string;\n}\n";
|
|
27
27
|
export declare const PATTERNS_CONST_SECTION = "\n\nexport const PATTERNS: WorkspacePatternConfig[] = [\n\t// wp-typia add pattern entries\n];\n";
|
|
28
|
-
export declare const BINDING_SOURCES_INTERFACE_SECTION = "\n\nexport interface WorkspaceBindingSourceConfig {\n\tattribute?: string;\n\tblock?: string;\n\teditorFile: string;\n\tserverFile: string;\n\tslug: string;\n}\n";
|
|
28
|
+
export declare const BINDING_SOURCES_INTERFACE_SECTION = "\n\nexport interface WorkspaceBindingSourceConfig {\n\tattribute?: string;\n\tblock?: string;\n\teditorFile: string;\n\tmetaPath?: string;\n\tpostMeta?: string;\n\tserverFile: string;\n\tslug: string;\n}\n";
|
|
29
29
|
export declare const BINDING_SOURCES_CONST_SECTION = "\n\nexport const BINDING_SOURCES: WorkspaceBindingSourceConfig[] = [\n\t// wp-typia add binding-source entries\n];\n";
|
|
30
30
|
export declare const CONTRACTS_INTERFACE_SECTION = "\n\nexport interface WorkspaceContractConfig {\n\tschemaFile: string;\n\tslug: string;\n\tsourceTypeName: string;\n\ttypesFile: string;\n}\n";
|
|
31
31
|
export declare const CONTRACTS_CONST_SECTION = "\n\nexport const CONTRACTS: WorkspaceContractConfig[] = [\n\t// wp-typia add contract entries\n];\n";
|
|
32
|
-
export declare const REST_RESOURCES_INTERFACE_SECTION = "\n\nexport interface WorkspaceRestResourceBaseConfig {\n\tapiFile: string;\n\tauth?: 'authenticated' | 'public' | 'public-write-protected';\n\tbodyTypeName?: string;\n\tclientFile: string;\n\tcontrollerClass?: string;\n\tcontrollerExtends?: string;\n\tnamespace: string;\n\topenApiFile: string;\n\tpermissionCallback?: string;\n\trestManifest?: ReturnType<\n\t\ttypeof import( '@wp-typia/block-runtime/metadata-core' ).defineEndpointManifest\n\t>;\n\tsecretFieldName?: string;\n\tsecretStateFieldName?: string;\n\tslug: string;\n\ttypesFile: string;\n\tvalidatorsFile: string;\n}\n\nexport interface GeneratedWorkspaceRestResourceConfig extends WorkspaceRestResourceBaseConfig {\n\tdataFile: string;\n\tmethods: Array< 'list' | 'read' | 'create' | 'update' | 'delete' >;\n\tmode?: 'generated';\n\tphpFile: string;\n\troutePattern?: string;\n}\n\nexport interface ManualWorkspaceRestResourceConfig extends WorkspaceRestResourceBaseConfig {\n\tmethod: 'DELETE' | 'GET' | 'PATCH' | 'POST' | 'PUT';\n\tmethods: [];\n\tmode: 'manual';\n\tpathPattern: string;\n\tqueryTypeName: string;\n\tresponseTypeName: string;\n}\n\nexport type WorkspaceRestResourceConfig =\n\t| GeneratedWorkspaceRestResourceConfig\n\t| ManualWorkspaceRestResourceConfig;\n";
|
|
32
|
+
export declare const REST_RESOURCES_INTERFACE_SECTION = "\n\nexport interface WorkspaceRestResourceBaseConfig {\n\tapiFile: string;\n\tauth?: 'authenticated' | 'public' | 'public-write-protected';\n\tbodyTypeName?: string;\n\tclientFile: string;\n\tcontrollerClass?: string;\n\tcontrollerExtends?: string;\n\tnamespace: string;\n\topenApiFile: string;\n\tpermissionCallback?: string;\n\trestManifest?: ReturnType<\n\t\ttypeof import( '@wp-typia/block-runtime/metadata-core' ).defineEndpointManifest\n\t>;\n\tsecretFieldName?: string;\n\tsecretPreserveOnEmpty?: boolean;\n\tsecretStateFieldName?: string;\n\tslug: string;\n\ttypesFile: string;\n\tvalidatorsFile: string;\n}\n\nexport interface GeneratedWorkspaceRestResourceConfig extends WorkspaceRestResourceBaseConfig {\n\tdataFile: string;\n\tmethods: Array< 'list' | 'read' | 'create' | 'update' | 'delete' >;\n\tmode?: 'generated';\n\tphpFile: string;\n\troutePattern?: string;\n}\n\nexport interface ManualWorkspaceRestResourceConfig extends WorkspaceRestResourceBaseConfig {\n\tmethod: 'DELETE' | 'GET' | 'PATCH' | 'POST' | 'PUT';\n\tmethods: [];\n\tmode: 'manual';\n\tpathPattern: string;\n\tqueryTypeName: string;\n\tresponseTypeName: string;\n}\n\nexport type WorkspaceRestResourceConfig =\n\t| GeneratedWorkspaceRestResourceConfig\n\t| ManualWorkspaceRestResourceConfig;\n";
|
|
33
33
|
export declare const REST_RESOURCES_CONST_SECTION = "\n\nexport const REST_RESOURCES: WorkspaceRestResourceConfig[] = [\n\t// wp-typia add rest-resource entries\n];\n";
|
|
34
34
|
/**
|
|
35
35
|
* Template inserted when repairing `WorkspacePostMetaConfig` in block-config.
|
|
@@ -64,8 +64,14 @@ export const BLOCK_TRANSFORMS: WorkspaceBlockTransformConfig[] = [
|
|
|
64
64
|
export const PATTERNS_INTERFACE_SECTION = `
|
|
65
65
|
|
|
66
66
|
export interface WorkspacePatternConfig {
|
|
67
|
-
\
|
|
67
|
+
\tcontentFile?: string;
|
|
68
|
+
\tfile?: string;
|
|
69
|
+
\tscope?: 'full' | 'section';
|
|
70
|
+
\tsectionRole?: string;
|
|
68
71
|
\tslug: string;
|
|
72
|
+
\ttags?: string[];
|
|
73
|
+
\tthumbnailUrl?: string;
|
|
74
|
+
\ttitle?: string;
|
|
69
75
|
}
|
|
70
76
|
`;
|
|
71
77
|
export const PATTERNS_CONST_SECTION = `
|
|
@@ -80,6 +86,8 @@ export interface WorkspaceBindingSourceConfig {
|
|
|
80
86
|
\tattribute?: string;
|
|
81
87
|
\tblock?: string;
|
|
82
88
|
\teditorFile: string;
|
|
89
|
+
\tmetaPath?: string;
|
|
90
|
+
\tpostMeta?: string;
|
|
83
91
|
\tserverFile: string;
|
|
84
92
|
\tslug: string;
|
|
85
93
|
}
|
|
@@ -121,6 +129,7 @@ export interface WorkspaceRestResourceBaseConfig {
|
|
|
121
129
|
\t\ttypeof import( '@wp-typia/block-runtime/metadata-core' ).defineEndpointManifest
|
|
122
130
|
\t>;
|
|
123
131
|
\tsecretFieldName?: string;
|
|
132
|
+
\tsecretPreserveOnEmpty?: boolean;
|
|
124
133
|
\tsecretStateFieldName?: string;
|
|
125
134
|
\tslug: string;
|
|
126
135
|
\ttypesFile: string;
|
|
@@ -23,13 +23,21 @@ export interface WorkspaceBlockTransformInventoryEntry {
|
|
|
23
23
|
to: string;
|
|
24
24
|
}
|
|
25
25
|
export interface WorkspacePatternInventoryEntry {
|
|
26
|
-
|
|
26
|
+
contentFile?: string;
|
|
27
|
+
file?: string;
|
|
28
|
+
scope?: string;
|
|
29
|
+
sectionRole?: string;
|
|
27
30
|
slug: string;
|
|
31
|
+
tags?: string[];
|
|
32
|
+
thumbnailUrl?: string;
|
|
33
|
+
title?: string;
|
|
28
34
|
}
|
|
29
35
|
export interface WorkspaceBindingSourceInventoryEntry {
|
|
30
36
|
attribute?: string;
|
|
31
37
|
block?: string;
|
|
32
38
|
editorFile: string;
|
|
39
|
+
metaPath?: string;
|
|
40
|
+
postMeta?: string;
|
|
33
41
|
serverFile: string;
|
|
34
42
|
slug: string;
|
|
35
43
|
}
|
|
@@ -73,6 +81,7 @@ export interface WorkspaceRestResourceInventoryEntry {
|
|
|
73
81
|
responseTypeName?: string;
|
|
74
82
|
routePattern?: string;
|
|
75
83
|
secretFieldName?: string;
|
|
84
|
+
secretPreserveOnEmpty?: boolean;
|
|
76
85
|
secretStateFieldName?: string;
|
|
77
86
|
slug: string;
|
|
78
87
|
typesFile: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import fs from "node:fs";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { parsePackageManagerField, } from "./package-managers.js";
|
|
4
|
+
import { readJsonFileSync } from "./json-utils.js";
|
|
4
5
|
export const WORKSPACE_TEMPLATE_PACKAGE = "@wp-typia/create-workspace-template";
|
|
5
6
|
function hasNonEmptyString(value) {
|
|
6
7
|
return typeof value === "string" && value.trim().length > 0;
|
|
@@ -17,12 +18,9 @@ export function parseWorkspacePackageJson(projectDirOrManifestPath) {
|
|
|
17
18
|
const packageJsonPath = path.basename(projectDirOrManifestPath) === "package.json"
|
|
18
19
|
? projectDirOrManifestPath
|
|
19
20
|
: path.join(projectDirOrManifestPath, "package.json");
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
catch (error) {
|
|
24
|
-
throw new Error(`Failed to parse workspace package manifest at ${packageJsonPath}: ${error instanceof Error ? error.message : String(error)}`);
|
|
25
|
-
}
|
|
21
|
+
return readJsonFileSync(packageJsonPath, {
|
|
22
|
+
context: "workspace package manifest",
|
|
23
|
+
});
|
|
26
24
|
}
|
|
27
25
|
function getWorkspaceMetadataIssues(packageJson) {
|
|
28
26
|
if (!packageJson.wpTypia) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wp-typia/project-tools",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.0",
|
|
4
4
|
"description": "Project orchestration and programmatic tooling for wp-typia",
|
|
5
5
|
"packageManager": "bun@1.3.11",
|
|
6
6
|
"type": "module",
|
|
@@ -92,6 +92,11 @@
|
|
|
92
92
|
"import": "./dist/runtime/package-managers.js",
|
|
93
93
|
"default": "./dist/runtime/package-managers.js"
|
|
94
94
|
},
|
|
95
|
+
"./pattern-catalog": {
|
|
96
|
+
"types": "./dist/runtime/pattern-catalog.d.ts",
|
|
97
|
+
"import": "./dist/runtime/pattern-catalog.js",
|
|
98
|
+
"default": "./dist/runtime/pattern-catalog.js"
|
|
99
|
+
},
|
|
95
100
|
"./schema-core": {
|
|
96
101
|
"types": "./dist/runtime/schema-core.d.ts",
|
|
97
102
|
"import": "./dist/runtime/schema-core.js",
|
|
@@ -161,9 +166,9 @@
|
|
|
161
166
|
},
|
|
162
167
|
"dependencies": {
|
|
163
168
|
"@wp-typia/api-client": "^0.4.5",
|
|
164
|
-
"@wp-typia/block-runtime": "^0.
|
|
169
|
+
"@wp-typia/block-runtime": "^0.7.0",
|
|
165
170
|
"@wp-typia/rest": "^0.3.13",
|
|
166
|
-
"@wp-typia/block-types": "^0.
|
|
171
|
+
"@wp-typia/block-types": "^0.3.0",
|
|
167
172
|
"mustache": "^4.2.0",
|
|
168
173
|
"npm-package-arg": "^13.0.0",
|
|
169
174
|
"semver": "^7.7.3",
|
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
import {
|
|
2
|
+
defineBlockNesting,
|
|
3
|
+
defineInnerBlocksTemplates,
|
|
4
|
+
} from '@wp-typia/block-runtime/metadata-core';
|
|
5
|
+
|
|
6
|
+
export const BLOCK_NESTING = defineBlockNesting( {
|
|
7
|
+
// Add parent, ancestor, and allowedBlocks relationships here.
|
|
8
|
+
} );
|
|
9
|
+
|
|
10
|
+
export const BLOCK_TEMPLATES = defineInnerBlocksTemplates( {
|
|
11
|
+
// Add default InnerBlocks templates here.
|
|
12
|
+
} );
|
|
13
|
+
|
|
14
|
+
export interface WorkspacePatternConfig {
|
|
15
|
+
file: string;
|
|
16
|
+
slug: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
1
19
|
export const BLOCKS = [
|
|
2
20
|
{
|
|
3
21
|
attributeTypeName: '{{pascalCase}}Attributes',
|
|
@@ -11,3 +29,7 @@ export const BLOCKS = [
|
|
|
11
29
|
},
|
|
12
30
|
// add-child: insert new block config entries here
|
|
13
31
|
] as const;
|
|
32
|
+
|
|
33
|
+
export const PATTERNS: WorkspacePatternConfig[] = [
|
|
34
|
+
// wp-typia add pattern entries
|
|
35
|
+
];
|