@wp-typia/project-tools 0.22.9 → 0.23.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-artifacts.js +3 -4
- package/dist/runtime/ai-feature-artifacts.js +2 -4
- package/dist/runtime/cli-add-collision.d.ts +25 -0
- package/dist/runtime/cli-add-collision.js +76 -0
- package/dist/runtime/cli-add-filesystem.js +2 -15
- package/dist/runtime/cli-add-help.js +11 -2
- package/dist/runtime/cli-add-kind-ids.d.ts +1 -1
- package/dist/runtime/cli-add-kind-ids.js +3 -0
- package/dist/runtime/cli-add-types.d.ts +117 -0
- package/dist/runtime/cli-add-types.js +29 -1
- package/dist/runtime/cli-add-validation.d.ts +90 -1
- package/dist/runtime/cli-add-validation.js +304 -1
- package/dist/runtime/cli-add-workspace-admin-view-scaffold.js +74 -19
- package/dist/runtime/cli-add-workspace-admin-view-source.js +11 -2
- package/dist/runtime/cli-add-workspace-admin-view-templates.d.ts +20 -2
- package/dist/runtime/cli-add-workspace-admin-view-templates.js +359 -3
- package/dist/runtime/cli-add-workspace-admin-view-types.d.ts +21 -0
- package/dist/runtime/cli-add-workspace-admin-view-types.js +22 -0
- package/dist/runtime/cli-add-workspace-ai-anchors.js +121 -31
- package/dist/runtime/cli-add-workspace-contract-source-emitters.d.ts +15 -0
- package/dist/runtime/cli-add-workspace-contract-source-emitters.js +42 -0
- package/dist/runtime/cli-add-workspace-contract.d.ts +15 -0
- package/dist/runtime/cli-add-workspace-contract.js +65 -0
- package/dist/runtime/cli-add-workspace-integration-env.d.ts +24 -0
- package/dist/runtime/cli-add-workspace-integration-env.js +391 -0
- package/dist/runtime/cli-add-workspace-post-meta-anchors.d.ts +23 -0
- package/dist/runtime/cli-add-workspace-post-meta-anchors.js +244 -0
- package/dist/runtime/cli-add-workspace-post-meta-source-emitters.d.ts +63 -0
- package/dist/runtime/cli-add-workspace-post-meta-source-emitters.js +179 -0
- package/dist/runtime/cli-add-workspace-post-meta.d.ts +15 -0
- package/dist/runtime/cli-add-workspace-post-meta.js +107 -0
- package/dist/runtime/cli-add-workspace-rest-anchors.d.ts +1 -0
- package/dist/runtime/cli-add-workspace-rest-anchors.js +285 -21
- package/dist/runtime/cli-add-workspace-rest-source-emitters.d.ts +90 -2
- package/dist/runtime/cli-add-workspace-rest-source-emitters.js +302 -29
- package/dist/runtime/cli-add-workspace-rest.d.ts +15 -2
- package/dist/runtime/cli-add-workspace-rest.js +329 -21
- package/dist/runtime/cli-add-workspace.d.ts +15 -0
- package/dist/runtime/cli-add-workspace.js +15 -0
- package/dist/runtime/cli-add.d.ts +1 -1
- package/dist/runtime/cli-add.js +1 -1
- package/dist/runtime/cli-core.d.ts +2 -1
- package/dist/runtime/cli-core.js +2 -1
- package/dist/runtime/cli-doctor-environment.js +1 -3
- package/dist/runtime/cli-doctor-workspace-features.js +128 -10
- package/dist/runtime/cli-doctor-workspace-package.d.ts +25 -3
- package/dist/runtime/cli-doctor-workspace-package.js +35 -13
- package/dist/runtime/cli-doctor-workspace-shared.d.ts +2 -0
- package/dist/runtime/cli-doctor-workspace-shared.js +5 -0
- package/dist/runtime/cli-doctor-workspace.d.ts +1 -1
- package/dist/runtime/cli-doctor-workspace.js +16 -8
- package/dist/runtime/cli-doctor.js +1 -1
- package/dist/runtime/cli-help.js +7 -0
- package/dist/runtime/cli-init-templates.js +11 -1
- package/dist/runtime/contract-artifacts.d.ts +14 -0
- package/dist/runtime/contract-artifacts.js +15 -0
- package/dist/runtime/fs-async.d.ts +7 -0
- package/dist/runtime/fs-async.js +11 -2
- package/dist/runtime/index.d.ts +1 -1
- package/dist/runtime/index.js +1 -1
- package/dist/runtime/migration-maintenance-verify.js +3 -0
- package/dist/runtime/migration-render-generated.js +4 -0
- package/dist/runtime/package-versions.js +3 -7
- package/dist/runtime/rest-resource-artifacts.d.ts +57 -1
- package/dist/runtime/rest-resource-artifacts.js +97 -1
- package/dist/runtime/scaffold-repository-reference.js +3 -7
- package/dist/runtime/template-render.d.ts +1 -1
- package/dist/runtime/template-render.js +1 -1
- package/dist/runtime/template-source-cache-markers.d.ts +37 -0
- package/dist/runtime/template-source-cache-markers.js +125 -0
- package/dist/runtime/template-source-cache.d.ts +1 -4
- package/dist/runtime/template-source-cache.js +16 -122
- package/dist/runtime/template-source-external.d.ts +4 -2
- package/dist/runtime/template-source-external.js +4 -2
- package/dist/runtime/template-source-remote.d.ts +8 -4
- package/dist/runtime/template-source-remote.js +8 -4
- package/dist/runtime/typia-llm.js +3 -4
- package/dist/runtime/workspace-inventory-mutations.d.ts +24 -0
- package/dist/runtime/workspace-inventory-mutations.js +181 -0
- package/dist/runtime/workspace-inventory-parser.d.ts +53 -0
- package/dist/runtime/workspace-inventory-parser.js +632 -0
- package/dist/runtime/workspace-inventory-read.d.ts +51 -0
- package/dist/runtime/workspace-inventory-read.js +98 -0
- package/dist/runtime/workspace-inventory-templates.d.ts +50 -0
- package/dist/runtime/workspace-inventory-templates.js +268 -0
- package/dist/runtime/workspace-inventory-types.d.ts +220 -0
- package/dist/runtime/workspace-inventory-types.js +1 -0
- package/dist/runtime/workspace-inventory.d.ts +5 -252
- package/dist/runtime/workspace-inventory.js +4 -928
- package/package.json +2 -2
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { readFile } from "node:fs/promises";
|
|
4
|
+
import { isFileNotFoundError } from "./fs-async.js";
|
|
5
|
+
import { parseWorkspaceInventorySource } from "./workspace-inventory-parser.js";
|
|
6
|
+
/**
|
|
7
|
+
* Synchronously read and parse the canonical workspace inventory file.
|
|
8
|
+
*
|
|
9
|
+
* This compatibility helper is intentionally sync-only for callers that expose
|
|
10
|
+
* synchronous APIs. Prefer `readWorkspaceInventoryAsync()` from async command
|
|
11
|
+
* paths so workspace reads do not block the event loop.
|
|
12
|
+
*
|
|
13
|
+
* @deprecated Since 0.22.10. Use `readWorkspaceInventoryAsync()` from async
|
|
14
|
+
* command paths. Removal target: not currently scheduled; this sync
|
|
15
|
+
* compatibility helper remains available until release notes announce a
|
|
16
|
+
* versioned target.
|
|
17
|
+
*
|
|
18
|
+
* @param projectDir Workspace root directory.
|
|
19
|
+
* @returns Parsed `WorkspaceInventory` including the resolved `blockConfigPath`.
|
|
20
|
+
* @throws {Error} When `scripts/block-config.ts` is missing or invalid.
|
|
21
|
+
*/
|
|
22
|
+
export function readWorkspaceInventory(projectDir) {
|
|
23
|
+
const blockConfigPath = path.join(projectDir, "scripts", "block-config.ts");
|
|
24
|
+
let source;
|
|
25
|
+
try {
|
|
26
|
+
source = readFileSync(blockConfigPath, "utf8");
|
|
27
|
+
}
|
|
28
|
+
catch (error) {
|
|
29
|
+
if (isFileNotFoundError(error)) {
|
|
30
|
+
throw new Error(`Workspace inventory file is missing at ${blockConfigPath}. Expected scripts/block-config.ts to exist.`);
|
|
31
|
+
}
|
|
32
|
+
throw error;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
blockConfigPath,
|
|
36
|
+
...parseWorkspaceInventorySource(source),
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Asynchronously read and parse the canonical workspace inventory file.
|
|
41
|
+
*
|
|
42
|
+
* @param projectDir Workspace root directory.
|
|
43
|
+
* @returns Parsed `WorkspaceInventory` including the resolved `blockConfigPath`.
|
|
44
|
+
* @throws {Error} When `scripts/block-config.ts` is missing or invalid.
|
|
45
|
+
*/
|
|
46
|
+
export async function readWorkspaceInventoryAsync(projectDir) {
|
|
47
|
+
const blockConfigPath = path.join(projectDir, "scripts", "block-config.ts");
|
|
48
|
+
let source;
|
|
49
|
+
try {
|
|
50
|
+
source = await readFile(blockConfigPath, "utf8");
|
|
51
|
+
}
|
|
52
|
+
catch (error) {
|
|
53
|
+
if (isFileNotFoundError(error)) {
|
|
54
|
+
throw new Error(`Workspace inventory file is missing at ${blockConfigPath}. Expected scripts/block-config.ts to exist.`);
|
|
55
|
+
}
|
|
56
|
+
throw error;
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
blockConfigPath,
|
|
60
|
+
...parseWorkspaceInventorySource(source),
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
function toWorkspaceBlockSelectOptions(blocks) {
|
|
64
|
+
return blocks.map((block) => ({
|
|
65
|
+
description: block.typesFile,
|
|
66
|
+
name: block.slug,
|
|
67
|
+
value: block.slug,
|
|
68
|
+
}));
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Synchronously return select options for the current workspace block inventory.
|
|
72
|
+
*
|
|
73
|
+
* The `description` field mirrors `block.typesFile`, while `name` and `value`
|
|
74
|
+
* both map to the block slug for use in interactive add flows.
|
|
75
|
+
*
|
|
76
|
+
* @deprecated Since 0.22.10. Use `getWorkspaceBlockSelectOptionsAsync()` from
|
|
77
|
+
* async command paths. Removal target: not currently scheduled; this sync
|
|
78
|
+
* compatibility helper remains available until release notes announce a
|
|
79
|
+
* versioned target.
|
|
80
|
+
*
|
|
81
|
+
* @param projectDir Workspace root directory.
|
|
82
|
+
* @returns Block options for variation-target selection.
|
|
83
|
+
*/
|
|
84
|
+
export function getWorkspaceBlockSelectOptions(projectDir) {
|
|
85
|
+
return toWorkspaceBlockSelectOptions(readWorkspaceInventory(projectDir).blocks);
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Asynchronously return select options for the current workspace block inventory.
|
|
89
|
+
*
|
|
90
|
+
* The returned option shape matches `getWorkspaceBlockSelectOptions()` while
|
|
91
|
+
* avoiding synchronous inventory reads in interactive or async command paths.
|
|
92
|
+
*
|
|
93
|
+
* @param projectDir Workspace root directory.
|
|
94
|
+
* @returns Block options for variation-target selection.
|
|
95
|
+
*/
|
|
96
|
+
export async function getWorkspaceBlockSelectOptionsAsync(projectDir) {
|
|
97
|
+
return toWorkspaceBlockSelectOptions((await readWorkspaceInventoryAsync(projectDir)).blocks);
|
|
98
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export declare const BLOCK_CONFIG_ENTRY_MARKER = "\t// wp-typia add block entries";
|
|
2
|
+
export declare const VARIATION_CONFIG_ENTRY_MARKER = "\t// wp-typia add variation entries";
|
|
3
|
+
export declare const BLOCK_STYLE_CONFIG_ENTRY_MARKER = "\t// wp-typia add style entries";
|
|
4
|
+
export declare const BLOCK_TRANSFORM_CONFIG_ENTRY_MARKER = "\t// wp-typia add transform entries";
|
|
5
|
+
export declare const PATTERN_CONFIG_ENTRY_MARKER = "\t// wp-typia add pattern entries";
|
|
6
|
+
export declare const BINDING_SOURCE_CONFIG_ENTRY_MARKER = "\t// wp-typia add binding-source entries";
|
|
7
|
+
export declare const CONTRACT_CONFIG_ENTRY_MARKER = "\t// wp-typia add contract entries";
|
|
8
|
+
export declare const REST_RESOURCE_CONFIG_ENTRY_MARKER = "\t// wp-typia add rest-resource entries";
|
|
9
|
+
/**
|
|
10
|
+
* Marker used to append generated post-meta entries into `POST_META`.
|
|
11
|
+
*/
|
|
12
|
+
export declare const POST_META_CONFIG_ENTRY_MARKER = "\t// wp-typia add post-meta entries";
|
|
13
|
+
export declare const ABILITY_CONFIG_ENTRY_MARKER = "\t// wp-typia add ability entries";
|
|
14
|
+
export declare const AI_FEATURE_CONFIG_ENTRY_MARKER = "\t// wp-typia add ai-feature entries";
|
|
15
|
+
export declare const ADMIN_VIEW_CONFIG_ENTRY_MARKER = "\t// wp-typia add admin-view entries";
|
|
16
|
+
/**
|
|
17
|
+
* Marker used to append generated editor-plugin entries into `EDITOR_PLUGINS`.
|
|
18
|
+
*/
|
|
19
|
+
export declare const EDITOR_PLUGIN_CONFIG_ENTRY_MARKER = "\t// wp-typia add editor-plugin entries";
|
|
20
|
+
export declare const VARIATIONS_INTERFACE_SECTION = "\n\nexport interface WorkspaceVariationConfig {\n\tblock: string;\n\tfile: string;\n\tslug: string;\n}\n";
|
|
21
|
+
export declare const VARIATIONS_CONST_SECTION = "\n\nexport const VARIATIONS: WorkspaceVariationConfig[] = [\n\t// wp-typia add variation entries\n];\n";
|
|
22
|
+
export declare const BLOCK_STYLES_INTERFACE_SECTION = "\n\nexport interface WorkspaceBlockStyleConfig {\n\tblock: string;\n\tfile: string;\n\tslug: string;\n}\n";
|
|
23
|
+
export declare const BLOCK_STYLES_CONST_SECTION = "\n\nexport const BLOCK_STYLES: WorkspaceBlockStyleConfig[] = [\n\t// wp-typia add style entries\n];\n";
|
|
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
|
+
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: string;\n\tslug: string;\n}\n";
|
|
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";
|
|
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
|
+
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
|
+
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";
|
|
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
|
+
/**
|
|
35
|
+
* Template inserted when repairing `WorkspacePostMetaConfig` in block-config.
|
|
36
|
+
*/
|
|
37
|
+
export declare const POST_META_INTERFACE_SECTION = "\n\nexport interface WorkspacePostMetaConfig {\n\tmetaKey: string;\n\tphpFile: string;\n\tpostType: string;\n\tschemaFile: string;\n\tshowInRest: boolean;\n\tslug: string;\n\tsourceTypeName: string;\n\ttypesFile: string;\n}\n";
|
|
38
|
+
/**
|
|
39
|
+
* Template inserted when repairing the `POST_META` inventory array.
|
|
40
|
+
*/
|
|
41
|
+
export declare const POST_META_CONST_SECTION = "\n\nexport const POST_META: WorkspacePostMetaConfig[] = [\n\t// wp-typia add post-meta entries\n];\n";
|
|
42
|
+
export declare const WORKSPACE_COMPATIBILITY_CONFIG_FIELD = "\tcompatibility?: {\n\t\thardMinimums: {\n\t\t\tphp?: string;\n\t\t\twordpress?: string;\n\t\t};\n\t\tmode: 'baseline' | 'optional' | 'required';\n\t\toptionalFeatureIds: string[];\n\t\toptionalFeatures: string[];\n\t\trequiredFeatureIds: string[];\n\t\trequiredFeatures: string[];\n\t\truntimeGates: string[];\n\t};\n";
|
|
43
|
+
export declare const ABILITIES_INTERFACE_SECTION = "\n\nexport interface WorkspaceAbilityConfig {\n\tclientFile: string;\n\tcompatibility?: {\n\t\thardMinimums: {\n\t\t\tphp?: string;\n\t\t\twordpress?: string;\n\t\t};\n\t\tmode: 'baseline' | 'optional' | 'required';\n\t\toptionalFeatureIds: string[];\n\t\toptionalFeatures: string[];\n\t\trequiredFeatureIds: string[];\n\t\trequiredFeatures: string[];\n\t\truntimeGates: string[];\n\t};\n\tconfigFile: string;\n\tdataFile: string;\n\tinputSchemaFile: string;\n\tinputTypeName: string;\n\toutputSchemaFile: string;\n\toutputTypeName: string;\n\tphpFile: string;\n\tslug: string;\n\ttypesFile: string;\n}\n";
|
|
44
|
+
export declare const ABILITIES_CONST_SECTION = "\n\nexport const ABILITIES: WorkspaceAbilityConfig[] = [\n\t// wp-typia add ability entries\n];\n";
|
|
45
|
+
export declare const AI_FEATURES_INTERFACE_SECTION = "\n\nexport interface WorkspaceAiFeatureConfig {\n\taiSchemaFile: string;\n\tapiFile: string;\n\tclientFile: string;\n\tcompatibility?: {\n\t\thardMinimums: {\n\t\t\tphp?: string;\n\t\t\twordpress?: string;\n\t\t};\n\t\tmode: 'baseline' | 'optional' | 'required';\n\t\toptionalFeatureIds: string[];\n\t\toptionalFeatures: string[];\n\t\trequiredFeatureIds: string[];\n\t\trequiredFeatures: string[];\n\t\truntimeGates: string[];\n\t};\n\tdataFile: string;\n\tnamespace: string;\n\topenApiFile: string;\n\tphpFile: string;\n\trestManifest?: ReturnType<\n\t\ttypeof import( '@wp-typia/block-runtime/metadata-core' ).defineEndpointManifest\n\t>;\n\tslug: string;\n\ttypesFile: string;\n\tvalidatorsFile: string;\n}\n";
|
|
46
|
+
export declare const AI_FEATURES_CONST_SECTION = "\n\nexport const AI_FEATURES: WorkspaceAiFeatureConfig[] = [\n\t// wp-typia add ai-feature entries\n];\n";
|
|
47
|
+
export declare const ADMIN_VIEWS_INTERFACE_SECTION = "\n\nexport interface WorkspaceAdminViewConfig {\n\tfile: string;\n\tphpFile: string;\n\tslug: string;\n\tsource?: string;\n}\n";
|
|
48
|
+
export declare const ADMIN_VIEWS_CONST_SECTION = "\n\nexport const ADMIN_VIEWS: WorkspaceAdminViewConfig[] = [\n\t// wp-typia add admin-view entries\n];\n";
|
|
49
|
+
export declare const EDITOR_PLUGINS_INTERFACE_SECTION = "\n\nexport interface WorkspaceEditorPluginConfig {\n\tfile: string;\n\tslug: string;\n\tslot: string;\n}\n";
|
|
50
|
+
export declare const EDITOR_PLUGINS_CONST_SECTION = "\n\nexport const EDITOR_PLUGINS: WorkspaceEditorPluginConfig[] = [\n\t// wp-typia add editor-plugin entries\n];\n";
|
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
export const BLOCK_CONFIG_ENTRY_MARKER = "\t// wp-typia add block entries";
|
|
2
|
+
export const VARIATION_CONFIG_ENTRY_MARKER = "\t// wp-typia add variation entries";
|
|
3
|
+
export const BLOCK_STYLE_CONFIG_ENTRY_MARKER = "\t// wp-typia add style entries";
|
|
4
|
+
export const BLOCK_TRANSFORM_CONFIG_ENTRY_MARKER = "\t// wp-typia add transform entries";
|
|
5
|
+
export const PATTERN_CONFIG_ENTRY_MARKER = "\t// wp-typia add pattern entries";
|
|
6
|
+
export const BINDING_SOURCE_CONFIG_ENTRY_MARKER = "\t// wp-typia add binding-source entries";
|
|
7
|
+
export const CONTRACT_CONFIG_ENTRY_MARKER = "\t// wp-typia add contract entries";
|
|
8
|
+
export const REST_RESOURCE_CONFIG_ENTRY_MARKER = "\t// wp-typia add rest-resource entries";
|
|
9
|
+
/**
|
|
10
|
+
* Marker used to append generated post-meta entries into `POST_META`.
|
|
11
|
+
*/
|
|
12
|
+
export const POST_META_CONFIG_ENTRY_MARKER = "\t// wp-typia add post-meta entries";
|
|
13
|
+
export const ABILITY_CONFIG_ENTRY_MARKER = "\t// wp-typia add ability entries";
|
|
14
|
+
export const AI_FEATURE_CONFIG_ENTRY_MARKER = "\t// wp-typia add ai-feature entries";
|
|
15
|
+
export const ADMIN_VIEW_CONFIG_ENTRY_MARKER = "\t// wp-typia add admin-view entries";
|
|
16
|
+
/**
|
|
17
|
+
* Marker used to append generated editor-plugin entries into `EDITOR_PLUGINS`.
|
|
18
|
+
*/
|
|
19
|
+
export const EDITOR_PLUGIN_CONFIG_ENTRY_MARKER = "\t// wp-typia add editor-plugin entries";
|
|
20
|
+
export const VARIATIONS_INTERFACE_SECTION = `
|
|
21
|
+
|
|
22
|
+
export interface WorkspaceVariationConfig {
|
|
23
|
+
\tblock: string;
|
|
24
|
+
\tfile: string;
|
|
25
|
+
\tslug: string;
|
|
26
|
+
}
|
|
27
|
+
`;
|
|
28
|
+
export const VARIATIONS_CONST_SECTION = `
|
|
29
|
+
|
|
30
|
+
export const VARIATIONS: WorkspaceVariationConfig[] = [
|
|
31
|
+
\t// wp-typia add variation entries
|
|
32
|
+
];
|
|
33
|
+
`;
|
|
34
|
+
export const BLOCK_STYLES_INTERFACE_SECTION = `
|
|
35
|
+
|
|
36
|
+
export interface WorkspaceBlockStyleConfig {
|
|
37
|
+
\tblock: string;
|
|
38
|
+
\tfile: string;
|
|
39
|
+
\tslug: string;
|
|
40
|
+
}
|
|
41
|
+
`;
|
|
42
|
+
export const BLOCK_STYLES_CONST_SECTION = `
|
|
43
|
+
|
|
44
|
+
export const BLOCK_STYLES: WorkspaceBlockStyleConfig[] = [
|
|
45
|
+
\t// wp-typia add style entries
|
|
46
|
+
];
|
|
47
|
+
`;
|
|
48
|
+
export const BLOCK_TRANSFORMS_INTERFACE_SECTION = `
|
|
49
|
+
|
|
50
|
+
export interface WorkspaceBlockTransformConfig {
|
|
51
|
+
\tblock: string;
|
|
52
|
+
\tfile: string;
|
|
53
|
+
\tfrom: string;
|
|
54
|
+
\tslug: string;
|
|
55
|
+
\tto: string;
|
|
56
|
+
}
|
|
57
|
+
`;
|
|
58
|
+
export const BLOCK_TRANSFORMS_CONST_SECTION = `
|
|
59
|
+
|
|
60
|
+
export const BLOCK_TRANSFORMS: WorkspaceBlockTransformConfig[] = [
|
|
61
|
+
\t// wp-typia add transform entries
|
|
62
|
+
];
|
|
63
|
+
`;
|
|
64
|
+
export const PATTERNS_INTERFACE_SECTION = `
|
|
65
|
+
|
|
66
|
+
export interface WorkspacePatternConfig {
|
|
67
|
+
\tfile: string;
|
|
68
|
+
\tslug: string;
|
|
69
|
+
}
|
|
70
|
+
`;
|
|
71
|
+
export const PATTERNS_CONST_SECTION = `
|
|
72
|
+
|
|
73
|
+
export const PATTERNS: WorkspacePatternConfig[] = [
|
|
74
|
+
\t// wp-typia add pattern entries
|
|
75
|
+
];
|
|
76
|
+
`;
|
|
77
|
+
export const BINDING_SOURCES_INTERFACE_SECTION = `
|
|
78
|
+
|
|
79
|
+
export interface WorkspaceBindingSourceConfig {
|
|
80
|
+
\tattribute?: string;
|
|
81
|
+
\tblock?: string;
|
|
82
|
+
\teditorFile: string;
|
|
83
|
+
\tserverFile: string;
|
|
84
|
+
\tslug: string;
|
|
85
|
+
}
|
|
86
|
+
`;
|
|
87
|
+
export const BINDING_SOURCES_CONST_SECTION = `
|
|
88
|
+
|
|
89
|
+
export const BINDING_SOURCES: WorkspaceBindingSourceConfig[] = [
|
|
90
|
+
\t// wp-typia add binding-source entries
|
|
91
|
+
];
|
|
92
|
+
`;
|
|
93
|
+
export const CONTRACTS_INTERFACE_SECTION = `
|
|
94
|
+
|
|
95
|
+
export interface WorkspaceContractConfig {
|
|
96
|
+
\tschemaFile: string;
|
|
97
|
+
\tslug: string;
|
|
98
|
+
\tsourceTypeName: string;
|
|
99
|
+
\ttypesFile: string;
|
|
100
|
+
}
|
|
101
|
+
`;
|
|
102
|
+
export const CONTRACTS_CONST_SECTION = `
|
|
103
|
+
|
|
104
|
+
export const CONTRACTS: WorkspaceContractConfig[] = [
|
|
105
|
+
\t// wp-typia add contract entries
|
|
106
|
+
];
|
|
107
|
+
`;
|
|
108
|
+
export const REST_RESOURCES_INTERFACE_SECTION = `
|
|
109
|
+
|
|
110
|
+
export interface WorkspaceRestResourceBaseConfig {
|
|
111
|
+
\tapiFile: string;
|
|
112
|
+
\tauth?: 'authenticated' | 'public' | 'public-write-protected';
|
|
113
|
+
\tbodyTypeName?: string;
|
|
114
|
+
\tclientFile: string;
|
|
115
|
+
\tcontrollerClass?: string;
|
|
116
|
+
\tcontrollerExtends?: string;
|
|
117
|
+
\tnamespace: string;
|
|
118
|
+
\topenApiFile: string;
|
|
119
|
+
\tpermissionCallback?: string;
|
|
120
|
+
\trestManifest?: ReturnType<
|
|
121
|
+
\t\ttypeof import( '@wp-typia/block-runtime/metadata-core' ).defineEndpointManifest
|
|
122
|
+
\t>;
|
|
123
|
+
\tsecretFieldName?: string;
|
|
124
|
+
\tsecretStateFieldName?: string;
|
|
125
|
+
\tslug: string;
|
|
126
|
+
\ttypesFile: string;
|
|
127
|
+
\tvalidatorsFile: string;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export interface GeneratedWorkspaceRestResourceConfig extends WorkspaceRestResourceBaseConfig {
|
|
131
|
+
\tdataFile: string;
|
|
132
|
+
\tmethods: Array< 'list' | 'read' | 'create' | 'update' | 'delete' >;
|
|
133
|
+
\tmode?: 'generated';
|
|
134
|
+
\tphpFile: string;
|
|
135
|
+
\troutePattern?: string;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export interface ManualWorkspaceRestResourceConfig extends WorkspaceRestResourceBaseConfig {
|
|
139
|
+
\tmethod: 'DELETE' | 'GET' | 'PATCH' | 'POST' | 'PUT';
|
|
140
|
+
\tmethods: [];
|
|
141
|
+
\tmode: 'manual';
|
|
142
|
+
\tpathPattern: string;
|
|
143
|
+
\tqueryTypeName: string;
|
|
144
|
+
\tresponseTypeName: string;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export type WorkspaceRestResourceConfig =
|
|
148
|
+
\t| GeneratedWorkspaceRestResourceConfig
|
|
149
|
+
\t| ManualWorkspaceRestResourceConfig;
|
|
150
|
+
`;
|
|
151
|
+
export const REST_RESOURCES_CONST_SECTION = `
|
|
152
|
+
|
|
153
|
+
export const REST_RESOURCES: WorkspaceRestResourceConfig[] = [
|
|
154
|
+
\t// wp-typia add rest-resource entries
|
|
155
|
+
];
|
|
156
|
+
`;
|
|
157
|
+
/**
|
|
158
|
+
* Template inserted when repairing `WorkspacePostMetaConfig` in block-config.
|
|
159
|
+
*/
|
|
160
|
+
export const POST_META_INTERFACE_SECTION = `
|
|
161
|
+
|
|
162
|
+
export interface WorkspacePostMetaConfig {
|
|
163
|
+
\tmetaKey: string;
|
|
164
|
+
\tphpFile: string;
|
|
165
|
+
\tpostType: string;
|
|
166
|
+
\tschemaFile: string;
|
|
167
|
+
\tshowInRest: boolean;
|
|
168
|
+
\tslug: string;
|
|
169
|
+
\tsourceTypeName: string;
|
|
170
|
+
\ttypesFile: string;
|
|
171
|
+
}
|
|
172
|
+
`;
|
|
173
|
+
/**
|
|
174
|
+
* Template inserted when repairing the `POST_META` inventory array.
|
|
175
|
+
*/
|
|
176
|
+
export const POST_META_CONST_SECTION = `
|
|
177
|
+
|
|
178
|
+
export const POST_META: WorkspacePostMetaConfig[] = [
|
|
179
|
+
\t// wp-typia add post-meta entries
|
|
180
|
+
];
|
|
181
|
+
`;
|
|
182
|
+
export const WORKSPACE_COMPATIBILITY_CONFIG_FIELD = `\tcompatibility?: {
|
|
183
|
+
\t\thardMinimums: {
|
|
184
|
+
\t\t\tphp?: string;
|
|
185
|
+
\t\t\twordpress?: string;
|
|
186
|
+
\t\t};
|
|
187
|
+
\t\tmode: 'baseline' | 'optional' | 'required';
|
|
188
|
+
\t\toptionalFeatureIds: string[];
|
|
189
|
+
\t\toptionalFeatures: string[];
|
|
190
|
+
\t\trequiredFeatureIds: string[];
|
|
191
|
+
\t\trequiredFeatures: string[];
|
|
192
|
+
\t\truntimeGates: string[];
|
|
193
|
+
\t};
|
|
194
|
+
`;
|
|
195
|
+
export const ABILITIES_INTERFACE_SECTION = `
|
|
196
|
+
|
|
197
|
+
export interface WorkspaceAbilityConfig {
|
|
198
|
+
\tclientFile: string;
|
|
199
|
+
${WORKSPACE_COMPATIBILITY_CONFIG_FIELD}\tconfigFile: string;
|
|
200
|
+
\tdataFile: string;
|
|
201
|
+
\tinputSchemaFile: string;
|
|
202
|
+
\tinputTypeName: string;
|
|
203
|
+
\toutputSchemaFile: string;
|
|
204
|
+
\toutputTypeName: string;
|
|
205
|
+
\tphpFile: string;
|
|
206
|
+
\tslug: string;
|
|
207
|
+
\ttypesFile: string;
|
|
208
|
+
}
|
|
209
|
+
`;
|
|
210
|
+
export const ABILITIES_CONST_SECTION = `
|
|
211
|
+
|
|
212
|
+
export const ABILITIES: WorkspaceAbilityConfig[] = [
|
|
213
|
+
\t// wp-typia add ability entries
|
|
214
|
+
];
|
|
215
|
+
`;
|
|
216
|
+
export const AI_FEATURES_INTERFACE_SECTION = `
|
|
217
|
+
|
|
218
|
+
export interface WorkspaceAiFeatureConfig {
|
|
219
|
+
\taiSchemaFile: string;
|
|
220
|
+
\tapiFile: string;
|
|
221
|
+
\tclientFile: string;
|
|
222
|
+
${WORKSPACE_COMPATIBILITY_CONFIG_FIELD}\tdataFile: string;
|
|
223
|
+
\tnamespace: string;
|
|
224
|
+
\topenApiFile: string;
|
|
225
|
+
\tphpFile: string;
|
|
226
|
+
\trestManifest?: ReturnType<
|
|
227
|
+
\t\ttypeof import( '@wp-typia/block-runtime/metadata-core' ).defineEndpointManifest
|
|
228
|
+
\t>;
|
|
229
|
+
\tslug: string;
|
|
230
|
+
\ttypesFile: string;
|
|
231
|
+
\tvalidatorsFile: string;
|
|
232
|
+
}
|
|
233
|
+
`;
|
|
234
|
+
export const AI_FEATURES_CONST_SECTION = `
|
|
235
|
+
|
|
236
|
+
export const AI_FEATURES: WorkspaceAiFeatureConfig[] = [
|
|
237
|
+
\t// wp-typia add ai-feature entries
|
|
238
|
+
];
|
|
239
|
+
`;
|
|
240
|
+
export const ADMIN_VIEWS_INTERFACE_SECTION = `
|
|
241
|
+
|
|
242
|
+
export interface WorkspaceAdminViewConfig {
|
|
243
|
+
\tfile: string;
|
|
244
|
+
\tphpFile: string;
|
|
245
|
+
\tslug: string;
|
|
246
|
+
\tsource?: string;
|
|
247
|
+
}
|
|
248
|
+
`;
|
|
249
|
+
export const ADMIN_VIEWS_CONST_SECTION = `
|
|
250
|
+
|
|
251
|
+
export const ADMIN_VIEWS: WorkspaceAdminViewConfig[] = [
|
|
252
|
+
\t// wp-typia add admin-view entries
|
|
253
|
+
];
|
|
254
|
+
`;
|
|
255
|
+
export const EDITOR_PLUGINS_INTERFACE_SECTION = `
|
|
256
|
+
|
|
257
|
+
export interface WorkspaceEditorPluginConfig {
|
|
258
|
+
\tfile: string;
|
|
259
|
+
\tslug: string;
|
|
260
|
+
\tslot: string;
|
|
261
|
+
}
|
|
262
|
+
`;
|
|
263
|
+
export const EDITOR_PLUGINS_CONST_SECTION = `
|
|
264
|
+
|
|
265
|
+
export const EDITOR_PLUGINS: WorkspaceEditorPluginConfig[] = [
|
|
266
|
+
\t// wp-typia add editor-plugin entries
|
|
267
|
+
];
|
|
268
|
+
`;
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
export interface WorkspaceBlockInventoryEntry {
|
|
2
|
+
apiTypesFile?: string;
|
|
3
|
+
attributeTypeName?: string;
|
|
4
|
+
openApiFile?: string;
|
|
5
|
+
slug: string;
|
|
6
|
+
typesFile: string;
|
|
7
|
+
}
|
|
8
|
+
export interface WorkspaceVariationInventoryEntry {
|
|
9
|
+
block: string;
|
|
10
|
+
file: string;
|
|
11
|
+
slug: string;
|
|
12
|
+
}
|
|
13
|
+
export interface WorkspaceBlockStyleInventoryEntry {
|
|
14
|
+
block: string;
|
|
15
|
+
file: string;
|
|
16
|
+
slug: string;
|
|
17
|
+
}
|
|
18
|
+
export interface WorkspaceBlockTransformInventoryEntry {
|
|
19
|
+
block: string;
|
|
20
|
+
file: string;
|
|
21
|
+
from: string;
|
|
22
|
+
slug: string;
|
|
23
|
+
to: string;
|
|
24
|
+
}
|
|
25
|
+
export interface WorkspacePatternInventoryEntry {
|
|
26
|
+
file: string;
|
|
27
|
+
slug: string;
|
|
28
|
+
}
|
|
29
|
+
export interface WorkspaceBindingSourceInventoryEntry {
|
|
30
|
+
attribute?: string;
|
|
31
|
+
block?: string;
|
|
32
|
+
editorFile: string;
|
|
33
|
+
serverFile: string;
|
|
34
|
+
slug: string;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Standalone TypeScript contract entry parsed from `scripts/block-config.ts`.
|
|
38
|
+
*
|
|
39
|
+
* These contracts generate JSON Schema artifacts without owning a WordPress REST
|
|
40
|
+
* route, so smoke tests and external integrations can reference stable schema
|
|
41
|
+
* names from the workspace inventory.
|
|
42
|
+
*/
|
|
43
|
+
export interface WorkspaceContractInventoryEntry {
|
|
44
|
+
schemaFile: string;
|
|
45
|
+
slug: string;
|
|
46
|
+
sourceTypeName: string;
|
|
47
|
+
typesFile: string;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* REST-resource entry parsed from `scripts/block-config.ts`.
|
|
51
|
+
*
|
|
52
|
+
* Each file path is stored relative to the workspace root so doctor checks and
|
|
53
|
+
* workspace mutation helpers can resolve the generated TypeScript, OpenAPI, and
|
|
54
|
+
* PHP route artifacts without guessing their locations.
|
|
55
|
+
*/
|
|
56
|
+
export interface WorkspaceRestResourceInventoryEntry {
|
|
57
|
+
apiFile: string;
|
|
58
|
+
auth?: string;
|
|
59
|
+
bodyTypeName?: string;
|
|
60
|
+
clientFile: string;
|
|
61
|
+
controllerClass?: string;
|
|
62
|
+
controllerExtends?: string;
|
|
63
|
+
dataFile?: string;
|
|
64
|
+
method?: string;
|
|
65
|
+
methods: string[];
|
|
66
|
+
mode?: "generated" | "manual";
|
|
67
|
+
namespace: string;
|
|
68
|
+
openApiFile: string;
|
|
69
|
+
pathPattern?: string;
|
|
70
|
+
permissionCallback?: string;
|
|
71
|
+
phpFile?: string;
|
|
72
|
+
queryTypeName?: string;
|
|
73
|
+
responseTypeName?: string;
|
|
74
|
+
routePattern?: string;
|
|
75
|
+
secretFieldName?: string;
|
|
76
|
+
secretStateFieldName?: string;
|
|
77
|
+
slug: string;
|
|
78
|
+
typesFile: string;
|
|
79
|
+
validatorsFile: string;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Post-meta contract entry parsed from `scripts/block-config.ts`.
|
|
83
|
+
*
|
|
84
|
+
* The TypeScript source and schema artifact define the persisted meta value
|
|
85
|
+
* shape, while the PHP file registers the matching WordPress post-meta key for
|
|
86
|
+
* the declared post type scope.
|
|
87
|
+
*/
|
|
88
|
+
export interface WorkspacePostMetaInventoryEntry {
|
|
89
|
+
metaKey: string;
|
|
90
|
+
phpFile: string;
|
|
91
|
+
postType: string;
|
|
92
|
+
schemaFile: string;
|
|
93
|
+
showInRest: boolean;
|
|
94
|
+
slug: string;
|
|
95
|
+
sourceTypeName: string;
|
|
96
|
+
typesFile: string;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Ability entry parsed from `scripts/block-config.ts`.
|
|
100
|
+
*
|
|
101
|
+
* Each file path stays relative to the workspace root so doctor checks, schema
|
|
102
|
+
* sync scripts, and generated admin/editor helpers can resolve typed workflow
|
|
103
|
+
* artifacts without guessing their locations.
|
|
104
|
+
*/
|
|
105
|
+
export interface WorkspaceAbilityInventoryEntry {
|
|
106
|
+
clientFile: string;
|
|
107
|
+
configFile: string;
|
|
108
|
+
dataFile: string;
|
|
109
|
+
inputSchemaFile: string;
|
|
110
|
+
inputTypeName: string;
|
|
111
|
+
outputSchemaFile: string;
|
|
112
|
+
outputTypeName: string;
|
|
113
|
+
phpFile: string;
|
|
114
|
+
slug: string;
|
|
115
|
+
typesFile: string;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* AI-feature entry parsed from `scripts/block-config.ts`.
|
|
119
|
+
*
|
|
120
|
+
* Each file path stays relative to the workspace root so doctor checks, add
|
|
121
|
+
* workflows, and split sync scripts can reason about the REST and AI-safe
|
|
122
|
+
* artifacts without guessing their locations.
|
|
123
|
+
*/
|
|
124
|
+
export interface WorkspaceAiFeatureInventoryEntry {
|
|
125
|
+
aiSchemaFile: string;
|
|
126
|
+
apiFile: string;
|
|
127
|
+
clientFile: string;
|
|
128
|
+
dataFile: string;
|
|
129
|
+
namespace: string;
|
|
130
|
+
openApiFile: string;
|
|
131
|
+
phpFile: string;
|
|
132
|
+
slug: string;
|
|
133
|
+
typesFile: string;
|
|
134
|
+
validatorsFile: string;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* DataViews admin-screen entry parsed from `scripts/block-config.ts`.
|
|
138
|
+
*
|
|
139
|
+
* @property file Relative path to the generated admin view shared entry file.
|
|
140
|
+
* @property phpFile Relative path to the generated WordPress admin page glue.
|
|
141
|
+
* @property slug Normalized admin view slug.
|
|
142
|
+
* @property source Optional source locator such as `rest-resource:products` or
|
|
143
|
+
* `core-data:postType/post`.
|
|
144
|
+
*/
|
|
145
|
+
export interface WorkspaceAdminViewInventoryEntry {
|
|
146
|
+
file: string;
|
|
147
|
+
phpFile: string;
|
|
148
|
+
slug: string;
|
|
149
|
+
source?: string;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Editor-plugin entry parsed from `scripts/block-config.ts`.
|
|
153
|
+
*
|
|
154
|
+
* @property file Relative path to the generated editor plugin entry file.
|
|
155
|
+
* @property slug Normalized editor plugin slug.
|
|
156
|
+
* @property slot Canonical editor shell slot for the plugin scaffold.
|
|
157
|
+
*/
|
|
158
|
+
export interface WorkspaceEditorPluginInventoryEntry {
|
|
159
|
+
file: string;
|
|
160
|
+
slug: string;
|
|
161
|
+
slot: string;
|
|
162
|
+
}
|
|
163
|
+
export interface WorkspaceInventory {
|
|
164
|
+
adminViews: WorkspaceAdminViewInventoryEntry[];
|
|
165
|
+
bindingSources: WorkspaceBindingSourceInventoryEntry[];
|
|
166
|
+
blockConfigPath: string;
|
|
167
|
+
blocks: WorkspaceBlockInventoryEntry[];
|
|
168
|
+
blockStyles: WorkspaceBlockStyleInventoryEntry[];
|
|
169
|
+
blockTransforms: WorkspaceBlockTransformInventoryEntry[];
|
|
170
|
+
contracts: WorkspaceContractInventoryEntry[];
|
|
171
|
+
abilities: WorkspaceAbilityInventoryEntry[];
|
|
172
|
+
aiFeatures: WorkspaceAiFeatureInventoryEntry[];
|
|
173
|
+
hasAbilitiesSection: boolean;
|
|
174
|
+
hasAdminViewsSection: boolean;
|
|
175
|
+
hasBindingSourcesSection: boolean;
|
|
176
|
+
hasAiFeaturesSection: boolean;
|
|
177
|
+
hasBlockStylesSection: boolean;
|
|
178
|
+
hasBlockTransformsSection: boolean;
|
|
179
|
+
hasContractsSection: boolean;
|
|
180
|
+
hasEditorPluginsSection: boolean;
|
|
181
|
+
hasPatternsSection: boolean;
|
|
182
|
+
hasPostMetaSection: boolean;
|
|
183
|
+
hasRestResourcesSection: boolean;
|
|
184
|
+
hasVariationsSection: boolean;
|
|
185
|
+
editorPlugins: WorkspaceEditorPluginInventoryEntry[];
|
|
186
|
+
patterns: WorkspacePatternInventoryEntry[];
|
|
187
|
+
postMeta: WorkspacePostMetaInventoryEntry[];
|
|
188
|
+
restResources: WorkspaceRestResourceInventoryEntry[];
|
|
189
|
+
source: string;
|
|
190
|
+
variations: WorkspaceVariationInventoryEntry[];
|
|
191
|
+
}
|
|
192
|
+
export type WorkspaceBlockSelectOption = {
|
|
193
|
+
description: string;
|
|
194
|
+
name: string;
|
|
195
|
+
value: string;
|
|
196
|
+
};
|
|
197
|
+
export type WorkspaceInventoryParseResult = Omit<WorkspaceInventory, "blockConfigPath">;
|
|
198
|
+
export type WorkspaceInventoryEntriesKey = {
|
|
199
|
+
[Key in keyof WorkspaceInventoryParseResult]: WorkspaceInventoryParseResult[Key] extends unknown[] ? Key : never;
|
|
200
|
+
}[keyof WorkspaceInventoryParseResult];
|
|
201
|
+
export type WorkspaceInventorySectionFlagKey = {
|
|
202
|
+
[Key in keyof WorkspaceInventoryParseResult]: WorkspaceInventoryParseResult[Key] extends boolean ? Key : never;
|
|
203
|
+
}[keyof WorkspaceInventoryParseResult];
|
|
204
|
+
export type WorkspaceInventoryUpdateOptions = {
|
|
205
|
+
abilityEntries?: string[];
|
|
206
|
+
adminViewEntries?: string[];
|
|
207
|
+
aiFeatureEntries?: string[];
|
|
208
|
+
blockEntries?: string[];
|
|
209
|
+
blockStyleEntries?: string[];
|
|
210
|
+
blockTransformEntries?: string[];
|
|
211
|
+
bindingSourceEntries?: string[];
|
|
212
|
+
contractEntries?: string[];
|
|
213
|
+
editorPluginEntries?: string[];
|
|
214
|
+
patternEntries?: string[];
|
|
215
|
+
postMetaEntries?: string[];
|
|
216
|
+
restResourceEntries?: string[];
|
|
217
|
+
transformSource?: (source: string) => string;
|
|
218
|
+
variationEntries?: string[];
|
|
219
|
+
};
|
|
220
|
+
export type WorkspaceInventoryAppendOptionKey = Exclude<keyof WorkspaceInventoryUpdateOptions, "transformSource">;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|