@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
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
/* eslint-disable no-console */
|
|
2
|
+
import fs from 'node:fs';
|
|
2
3
|
import path from 'node:path';
|
|
3
4
|
|
|
4
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
formatBlockPatternContentNestingDiagnostics,
|
|
7
|
+
validateBlockPatternContentNesting,
|
|
8
|
+
syncInnerBlocksTemplateModule,
|
|
9
|
+
syncBlockMetadata,
|
|
10
|
+
validateBlockNestingContract,
|
|
11
|
+
validateInnerBlocksTemplates,
|
|
12
|
+
} from '@wp-typia/block-runtime/metadata-core';
|
|
5
13
|
|
|
6
|
-
import { BLOCKS } from './block-config';
|
|
14
|
+
import { BLOCK_NESTING, BLOCK_TEMPLATES, BLOCKS, PATTERNS } from './block-config';
|
|
7
15
|
|
|
8
16
|
function parseCliOptions( argv: string[] ) {
|
|
9
17
|
const options = {
|
|
@@ -22,15 +30,108 @@ function parseCliOptions( argv: string[] ) {
|
|
|
22
30
|
return options;
|
|
23
31
|
}
|
|
24
32
|
|
|
33
|
+
function readWorkspaceBlockName( block: ( typeof BLOCKS )[ number ] ): string {
|
|
34
|
+
const blockJsonFile = path.join( 'src', 'blocks', block.slug, 'block.json' );
|
|
35
|
+
let blockJson: { name?: unknown };
|
|
36
|
+
try {
|
|
37
|
+
blockJson = JSON.parse( fs.readFileSync( blockJsonFile, 'utf8' ) ) as {
|
|
38
|
+
name?: unknown;
|
|
39
|
+
};
|
|
40
|
+
} catch ( error ) {
|
|
41
|
+
throw new Error(
|
|
42
|
+
`Failed to read block.json for block "${ block.slug }" at ${ blockJsonFile }: ${
|
|
43
|
+
error instanceof Error ? error.message : String( error )
|
|
44
|
+
}`
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
if ( typeof blockJson.name !== 'string' || blockJson.name.trim() === '' ) {
|
|
48
|
+
throw new Error( `${ blockJsonFile } must define a string "name".` );
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return blockJson.name;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function readPatternFileContent( pattern: ( typeof PATTERNS )[ number ] ): string {
|
|
55
|
+
try {
|
|
56
|
+
return fs.readFileSync( pattern.file, 'utf8' );
|
|
57
|
+
} catch ( error ) {
|
|
58
|
+
throw new Error(
|
|
59
|
+
`Failed to read pattern "${ pattern.slug }" at ${ pattern.file }: ${
|
|
60
|
+
error instanceof Error ? error.message : String( error )
|
|
61
|
+
}`
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function validatePatternContentNesting( knownBlockNames: readonly string[] ) {
|
|
67
|
+
const diagnostics = PATTERNS.flatMap( ( pattern ) => {
|
|
68
|
+
const content = readPatternFileContent( pattern );
|
|
69
|
+
return validateBlockPatternContentNesting( content, {
|
|
70
|
+
allowExternalBlockNames: true,
|
|
71
|
+
knownBlockNames,
|
|
72
|
+
nesting: BLOCK_NESTING,
|
|
73
|
+
patternFile: pattern.file,
|
|
74
|
+
} ).diagnostics;
|
|
75
|
+
} );
|
|
76
|
+
const warnings = diagnostics.filter(
|
|
77
|
+
( diagnostic ) => diagnostic.severity === 'warning'
|
|
78
|
+
);
|
|
79
|
+
const errors = diagnostics.filter(
|
|
80
|
+
( diagnostic ) => diagnostic.severity === 'error'
|
|
81
|
+
);
|
|
82
|
+
|
|
83
|
+
if ( warnings.length > 0 ) {
|
|
84
|
+
console.warn(
|
|
85
|
+
`⚠️ Pattern nesting validation warnings:\n${ formatBlockPatternContentNestingDiagnostics(
|
|
86
|
+
warnings
|
|
87
|
+
) }`
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
if ( errors.length > 0 ) {
|
|
92
|
+
throw new Error(
|
|
93
|
+
`Pattern content violates block nesting contract:\n${ formatBlockPatternContentNestingDiagnostics(
|
|
94
|
+
errors
|
|
95
|
+
) }`
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
25
100
|
async function main() {
|
|
26
101
|
const options = parseCliOptions( process.argv.slice( 2 ) );
|
|
102
|
+
const knownBlockNames = BLOCKS.map( readWorkspaceBlockName );
|
|
103
|
+
validateBlockNestingContract( BLOCK_NESTING, {
|
|
104
|
+
allowExternalBlockNames: true,
|
|
105
|
+
knownBlockNames,
|
|
106
|
+
} );
|
|
107
|
+
validateInnerBlocksTemplates( BLOCK_TEMPLATES, {
|
|
108
|
+
allowExternalBlockNames: true,
|
|
109
|
+
knownBlockNames,
|
|
110
|
+
nesting: BLOCK_NESTING,
|
|
111
|
+
} );
|
|
112
|
+
validatePatternContentNesting( knownBlockNames );
|
|
113
|
+
await syncInnerBlocksTemplateModule(
|
|
114
|
+
{
|
|
115
|
+
allowExternalBlockNames: true,
|
|
116
|
+
knownBlockNames,
|
|
117
|
+
nesting: BLOCK_NESTING,
|
|
118
|
+
outputFile: path.join( 'src', 'inner-blocks-templates.ts' ),
|
|
119
|
+
templates: BLOCK_TEMPLATES,
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
check: options.check,
|
|
123
|
+
}
|
|
124
|
+
);
|
|
27
125
|
|
|
28
126
|
for ( const block of BLOCKS ) {
|
|
29
127
|
const baseDir = path.join( 'src', 'blocks', block.slug );
|
|
30
128
|
const result = await syncBlockMetadata( {
|
|
129
|
+
allowExternalBlockNames: true,
|
|
31
130
|
blockJsonFile: path.join( baseDir, 'block.json' ),
|
|
32
131
|
jsonSchemaFile: path.join( baseDir, 'typia.schema.json' ),
|
|
132
|
+
knownBlockNames,
|
|
33
133
|
manifestFile: path.join( baseDir, 'typia.manifest.json' ),
|
|
134
|
+
nesting: BLOCK_NESTING,
|
|
34
135
|
openApiFile: path.join( baseDir, 'typia.openapi.json' ),
|
|
35
136
|
sourceTypeName: block.attributeTypeName,
|
|
36
137
|
typesFile: block.typesFile,
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/* This file is generated by wp-typia. Do not edit manually. */
|
|
2
|
+
|
|
3
|
+
export type WpTypiaInnerBlocksTemplateAttributes = Record<string, unknown>;
|
|
4
|
+
export type WpTypiaInnerBlocksTemplateItem = [
|
|
5
|
+
blockName: string,
|
|
6
|
+
attributes?: WpTypiaInnerBlocksTemplateAttributes,
|
|
7
|
+
innerBlocks?: WpTypiaInnerBlocksTemplate,
|
|
8
|
+
];
|
|
9
|
+
export type WpTypiaInnerBlocksTemplate = WpTypiaInnerBlocksTemplateItem[];
|
|
10
|
+
|
|
11
|
+
export const INNER_BLOCKS_TEMPLATES = {} satisfies Record<string, WpTypiaInnerBlocksTemplate>;
|
|
12
|
+
|
|
13
|
+
export type WpTypiaInnerBlocksTemplateName = keyof typeof INNER_BLOCKS_TEMPLATES;
|
|
@@ -1,4 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
defineBlockNesting,
|
|
3
|
+
defineEndpointManifest,
|
|
4
|
+
defineInnerBlocksTemplates,
|
|
5
|
+
} from '@wp-typia/block-runtime/metadata-core';
|
|
6
|
+
|
|
7
|
+
export const BLOCK_NESTING = defineBlockNesting( {
|
|
8
|
+
// Add parent, ancestor, and allowedBlocks relationships here.
|
|
9
|
+
} );
|
|
10
|
+
|
|
11
|
+
export const BLOCK_TEMPLATES = defineInnerBlocksTemplates( {
|
|
12
|
+
// Add default InnerBlocks templates here.
|
|
13
|
+
} );
|
|
14
|
+
|
|
15
|
+
export interface WorkspacePatternConfig {
|
|
16
|
+
file: string;
|
|
17
|
+
slug: string;
|
|
18
|
+
}
|
|
2
19
|
|
|
3
20
|
export const BLOCKS = [
|
|
4
21
|
{
|
|
@@ -73,3 +90,7 @@ export const BLOCKS = [
|
|
|
73
90
|
},
|
|
74
91
|
// add-child: insert new block config entries here
|
|
75
92
|
] as const;
|
|
93
|
+
|
|
94
|
+
export const PATTERNS: WorkspacePatternConfig[] = [
|
|
95
|
+
// wp-typia add pattern entries
|
|
96
|
+
];
|