@wp-typia/project-tools 0.22.8 → 0.22.10

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.
Files changed (50) hide show
  1. package/dist/runtime/ai-artifacts.js +3 -4
  2. package/dist/runtime/ai-feature-artifacts.js +2 -4
  3. package/dist/runtime/cli-add-block.js +12 -1
  4. package/dist/runtime/cli-add-filesystem.js +2 -15
  5. package/dist/runtime/cli-add-types.d.ts +8 -0
  6. package/dist/runtime/cli-add-types.js +13 -0
  7. package/dist/runtime/cli-add.d.ts +3 -2
  8. package/dist/runtime/cli-add.js +2 -2
  9. package/dist/runtime/cli-core.d.ts +4 -2
  10. package/dist/runtime/cli-core.js +3 -2
  11. package/dist/runtime/cli-doctor-workspace-shared.js +3 -0
  12. package/dist/runtime/cli-doctor-workspace.d.ts +1 -1
  13. package/dist/runtime/cli-doctor-workspace.js +8 -3
  14. package/dist/runtime/cli-doctor.js +1 -1
  15. package/dist/runtime/cli-scaffold.js +3 -3
  16. package/dist/runtime/create-template-validation.js +2 -28
  17. package/dist/runtime/fs-async.d.ts +7 -0
  18. package/dist/runtime/fs-async.js +11 -2
  19. package/dist/runtime/id-suggestions.d.ts +21 -0
  20. package/dist/runtime/id-suggestions.js +48 -0
  21. package/dist/runtime/index.d.ts +5 -2
  22. package/dist/runtime/index.js +3 -1
  23. package/dist/runtime/migration-maintenance-verify.js +5 -0
  24. package/dist/runtime/migration-render-generated.js +4 -0
  25. package/dist/runtime/package-versions.js +3 -7
  26. package/dist/runtime/scaffold-repository-reference.js +3 -7
  27. package/dist/runtime/scaffold.js +3 -3
  28. package/dist/runtime/template-builtins.js +11 -8
  29. package/dist/runtime/template-layers.js +2 -2
  30. package/dist/runtime/template-source-external.d.ts +3 -0
  31. package/dist/runtime/template-source-external.js +5 -2
  32. package/dist/runtime/template-source-remote.d.ts +6 -0
  33. package/dist/runtime/template-source-remote.js +8 -2
  34. package/dist/runtime/template-source-seeds.d.ts +13 -0
  35. package/dist/runtime/template-source-seeds.js +36 -8
  36. package/dist/runtime/template-source.js +2 -2
  37. package/dist/runtime/typia-llm.js +3 -4
  38. package/dist/runtime/workspace-inventory-mutations.d.ts +24 -0
  39. package/dist/runtime/workspace-inventory-mutations.js +132 -0
  40. package/dist/runtime/workspace-inventory-parser.d.ts +52 -0
  41. package/dist/runtime/workspace-inventory-parser.js +511 -0
  42. package/dist/runtime/workspace-inventory-read.d.ts +44 -0
  43. package/dist/runtime/workspace-inventory-read.js +91 -0
  44. package/dist/runtime/workspace-inventory-templates.d.ts +35 -0
  45. package/dist/runtime/workspace-inventory-templates.js +198 -0
  46. package/dist/runtime/workspace-inventory-types.d.ts +171 -0
  47. package/dist/runtime/workspace-inventory-types.js +1 -0
  48. package/dist/runtime/workspace-inventory.d.ts +5 -238
  49. package/dist/runtime/workspace-inventory.js +4 -901
  50. package/package.json +7 -2
@@ -0,0 +1,198 @@
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 REST_RESOURCE_CONFIG_ENTRY_MARKER = "\t// wp-typia add rest-resource entries";
8
+ export const ABILITY_CONFIG_ENTRY_MARKER = "\t// wp-typia add ability entries";
9
+ export const AI_FEATURE_CONFIG_ENTRY_MARKER = "\t// wp-typia add ai-feature entries";
10
+ export const ADMIN_VIEW_CONFIG_ENTRY_MARKER = "\t// wp-typia add admin-view entries";
11
+ /**
12
+ * Marker used to append generated editor-plugin entries into `EDITOR_PLUGINS`.
13
+ */
14
+ export const EDITOR_PLUGIN_CONFIG_ENTRY_MARKER = "\t// wp-typia add editor-plugin entries";
15
+ export const VARIATIONS_INTERFACE_SECTION = `
16
+
17
+ export interface WorkspaceVariationConfig {
18
+ \tblock: string;
19
+ \tfile: string;
20
+ \tslug: string;
21
+ }
22
+ `;
23
+ export const VARIATIONS_CONST_SECTION = `
24
+
25
+ export const VARIATIONS: WorkspaceVariationConfig[] = [
26
+ \t// wp-typia add variation entries
27
+ ];
28
+ `;
29
+ export const BLOCK_STYLES_INTERFACE_SECTION = `
30
+
31
+ export interface WorkspaceBlockStyleConfig {
32
+ \tblock: string;
33
+ \tfile: string;
34
+ \tslug: string;
35
+ }
36
+ `;
37
+ export const BLOCK_STYLES_CONST_SECTION = `
38
+
39
+ export const BLOCK_STYLES: WorkspaceBlockStyleConfig[] = [
40
+ \t// wp-typia add style entries
41
+ ];
42
+ `;
43
+ export const BLOCK_TRANSFORMS_INTERFACE_SECTION = `
44
+
45
+ export interface WorkspaceBlockTransformConfig {
46
+ \tblock: string;
47
+ \tfile: string;
48
+ \tfrom: string;
49
+ \tslug: string;
50
+ \tto: string;
51
+ }
52
+ `;
53
+ export const BLOCK_TRANSFORMS_CONST_SECTION = `
54
+
55
+ export const BLOCK_TRANSFORMS: WorkspaceBlockTransformConfig[] = [
56
+ \t// wp-typia add transform entries
57
+ ];
58
+ `;
59
+ export const PATTERNS_INTERFACE_SECTION = `
60
+
61
+ export interface WorkspacePatternConfig {
62
+ \tfile: string;
63
+ \tslug: string;
64
+ }
65
+ `;
66
+ export const PATTERNS_CONST_SECTION = `
67
+
68
+ export const PATTERNS: WorkspacePatternConfig[] = [
69
+ \t// wp-typia add pattern entries
70
+ ];
71
+ `;
72
+ export const BINDING_SOURCES_INTERFACE_SECTION = `
73
+
74
+ export interface WorkspaceBindingSourceConfig {
75
+ \tattribute?: string;
76
+ \tblock?: string;
77
+ \teditorFile: string;
78
+ \tserverFile: string;
79
+ \tslug: string;
80
+ }
81
+ `;
82
+ export const BINDING_SOURCES_CONST_SECTION = `
83
+
84
+ export const BINDING_SOURCES: WorkspaceBindingSourceConfig[] = [
85
+ \t// wp-typia add binding-source entries
86
+ ];
87
+ `;
88
+ export const REST_RESOURCES_INTERFACE_SECTION = `
89
+
90
+ export interface WorkspaceRestResourceConfig {
91
+ \tapiFile: string;
92
+ \tclientFile: string;
93
+ \tdataFile: string;
94
+ \tmethods: Array< 'list' | 'read' | 'create' | 'update' | 'delete' >;
95
+ \tnamespace: string;
96
+ \topenApiFile: string;
97
+ \tphpFile: string;
98
+ \trestManifest?: ReturnType<
99
+ \t\ttypeof import( '@wp-typia/block-runtime/metadata-core' ).defineEndpointManifest
100
+ \t>;
101
+ \tslug: string;
102
+ \ttypesFile: string;
103
+ \tvalidatorsFile: string;
104
+ }
105
+ `;
106
+ export const REST_RESOURCES_CONST_SECTION = `
107
+
108
+ export const REST_RESOURCES: WorkspaceRestResourceConfig[] = [
109
+ \t// wp-typia add rest-resource entries
110
+ ];
111
+ `;
112
+ export const WORKSPACE_COMPATIBILITY_CONFIG_FIELD = `\tcompatibility?: {
113
+ \t\thardMinimums: {
114
+ \t\t\tphp?: string;
115
+ \t\t\twordpress?: string;
116
+ \t\t};
117
+ \t\tmode: 'baseline' | 'optional' | 'required';
118
+ \t\toptionalFeatureIds: string[];
119
+ \t\toptionalFeatures: string[];
120
+ \t\trequiredFeatureIds: string[];
121
+ \t\trequiredFeatures: string[];
122
+ \t\truntimeGates: string[];
123
+ \t};
124
+ `;
125
+ export const ABILITIES_INTERFACE_SECTION = `
126
+
127
+ export interface WorkspaceAbilityConfig {
128
+ \tclientFile: string;
129
+ ${WORKSPACE_COMPATIBILITY_CONFIG_FIELD}\tconfigFile: string;
130
+ \tdataFile: string;
131
+ \tinputSchemaFile: string;
132
+ \tinputTypeName: string;
133
+ \toutputSchemaFile: string;
134
+ \toutputTypeName: string;
135
+ \tphpFile: string;
136
+ \tslug: string;
137
+ \ttypesFile: string;
138
+ }
139
+ `;
140
+ export const ABILITIES_CONST_SECTION = `
141
+
142
+ export const ABILITIES: WorkspaceAbilityConfig[] = [
143
+ \t// wp-typia add ability entries
144
+ ];
145
+ `;
146
+ export const AI_FEATURES_INTERFACE_SECTION = `
147
+
148
+ export interface WorkspaceAiFeatureConfig {
149
+ \taiSchemaFile: string;
150
+ \tapiFile: string;
151
+ \tclientFile: string;
152
+ ${WORKSPACE_COMPATIBILITY_CONFIG_FIELD}\tdataFile: string;
153
+ \tnamespace: string;
154
+ \topenApiFile: string;
155
+ \tphpFile: string;
156
+ \trestManifest?: ReturnType<
157
+ \t\ttypeof import( '@wp-typia/block-runtime/metadata-core' ).defineEndpointManifest
158
+ \t>;
159
+ \tslug: string;
160
+ \ttypesFile: string;
161
+ \tvalidatorsFile: string;
162
+ }
163
+ `;
164
+ export const AI_FEATURES_CONST_SECTION = `
165
+
166
+ export const AI_FEATURES: WorkspaceAiFeatureConfig[] = [
167
+ \t// wp-typia add ai-feature entries
168
+ ];
169
+ `;
170
+ export const ADMIN_VIEWS_INTERFACE_SECTION = `
171
+
172
+ export interface WorkspaceAdminViewConfig {
173
+ \tfile: string;
174
+ \tphpFile: string;
175
+ \tslug: string;
176
+ \tsource?: string;
177
+ }
178
+ `;
179
+ export const ADMIN_VIEWS_CONST_SECTION = `
180
+
181
+ export const ADMIN_VIEWS: WorkspaceAdminViewConfig[] = [
182
+ \t// wp-typia add admin-view entries
183
+ ];
184
+ `;
185
+ export const EDITOR_PLUGINS_INTERFACE_SECTION = `
186
+
187
+ export interface WorkspaceEditorPluginConfig {
188
+ \tfile: string;
189
+ \tslug: string;
190
+ \tslot: string;
191
+ }
192
+ `;
193
+ export const EDITOR_PLUGINS_CONST_SECTION = `
194
+
195
+ export const EDITOR_PLUGINS: WorkspaceEditorPluginConfig[] = [
196
+ \t// wp-typia add editor-plugin entries
197
+ ];
198
+ `;
@@ -0,0 +1,171 @@
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
+ * REST-resource entry parsed from `scripts/block-config.ts`.
38
+ *
39
+ * Each file path is stored relative to the workspace root so doctor checks and
40
+ * workspace mutation helpers can resolve the generated TypeScript, OpenAPI, and
41
+ * PHP route artifacts without guessing their locations.
42
+ */
43
+ export interface WorkspaceRestResourceInventoryEntry {
44
+ apiFile: string;
45
+ clientFile: string;
46
+ dataFile: string;
47
+ methods: string[];
48
+ namespace: string;
49
+ openApiFile: string;
50
+ phpFile: string;
51
+ slug: string;
52
+ typesFile: string;
53
+ validatorsFile: string;
54
+ }
55
+ /**
56
+ * Ability entry parsed from `scripts/block-config.ts`.
57
+ *
58
+ * Each file path stays relative to the workspace root so doctor checks, schema
59
+ * sync scripts, and generated admin/editor helpers can resolve typed workflow
60
+ * artifacts without guessing their locations.
61
+ */
62
+ export interface WorkspaceAbilityInventoryEntry {
63
+ clientFile: string;
64
+ configFile: string;
65
+ dataFile: string;
66
+ inputSchemaFile: string;
67
+ inputTypeName: string;
68
+ outputSchemaFile: string;
69
+ outputTypeName: string;
70
+ phpFile: string;
71
+ slug: string;
72
+ typesFile: string;
73
+ }
74
+ /**
75
+ * AI-feature entry parsed from `scripts/block-config.ts`.
76
+ *
77
+ * Each file path stays relative to the workspace root so doctor checks, add
78
+ * workflows, and split sync scripts can reason about the REST and AI-safe
79
+ * artifacts without guessing their locations.
80
+ */
81
+ export interface WorkspaceAiFeatureInventoryEntry {
82
+ aiSchemaFile: string;
83
+ apiFile: string;
84
+ clientFile: string;
85
+ dataFile: string;
86
+ namespace: string;
87
+ openApiFile: string;
88
+ phpFile: string;
89
+ slug: string;
90
+ typesFile: string;
91
+ validatorsFile: string;
92
+ }
93
+ /**
94
+ * DataViews admin-screen entry parsed from `scripts/block-config.ts`.
95
+ *
96
+ * @property file Relative path to the generated admin view shared entry file.
97
+ * @property phpFile Relative path to the generated WordPress admin page glue.
98
+ * @property slug Normalized admin view slug.
99
+ * @property source Optional source locator such as `rest-resource:products` or
100
+ * `core-data:postType/post`.
101
+ */
102
+ export interface WorkspaceAdminViewInventoryEntry {
103
+ file: string;
104
+ phpFile: string;
105
+ slug: string;
106
+ source?: string;
107
+ }
108
+ /**
109
+ * Editor-plugin entry parsed from `scripts/block-config.ts`.
110
+ *
111
+ * @property file Relative path to the generated editor plugin entry file.
112
+ * @property slug Normalized editor plugin slug.
113
+ * @property slot Canonical editor shell slot for the plugin scaffold.
114
+ */
115
+ export interface WorkspaceEditorPluginInventoryEntry {
116
+ file: string;
117
+ slug: string;
118
+ slot: string;
119
+ }
120
+ export interface WorkspaceInventory {
121
+ adminViews: WorkspaceAdminViewInventoryEntry[];
122
+ bindingSources: WorkspaceBindingSourceInventoryEntry[];
123
+ blockConfigPath: string;
124
+ blocks: WorkspaceBlockInventoryEntry[];
125
+ blockStyles: WorkspaceBlockStyleInventoryEntry[];
126
+ blockTransforms: WorkspaceBlockTransformInventoryEntry[];
127
+ abilities: WorkspaceAbilityInventoryEntry[];
128
+ aiFeatures: WorkspaceAiFeatureInventoryEntry[];
129
+ hasAbilitiesSection: boolean;
130
+ hasAdminViewsSection: boolean;
131
+ hasBindingSourcesSection: boolean;
132
+ hasAiFeaturesSection: boolean;
133
+ hasBlockStylesSection: boolean;
134
+ hasBlockTransformsSection: boolean;
135
+ hasEditorPluginsSection: boolean;
136
+ hasPatternsSection: boolean;
137
+ hasRestResourcesSection: boolean;
138
+ hasVariationsSection: boolean;
139
+ editorPlugins: WorkspaceEditorPluginInventoryEntry[];
140
+ patterns: WorkspacePatternInventoryEntry[];
141
+ restResources: WorkspaceRestResourceInventoryEntry[];
142
+ source: string;
143
+ variations: WorkspaceVariationInventoryEntry[];
144
+ }
145
+ export type WorkspaceBlockSelectOption = {
146
+ description: string;
147
+ name: string;
148
+ value: string;
149
+ };
150
+ export type WorkspaceInventoryParseResult = Omit<WorkspaceInventory, "blockConfigPath">;
151
+ export type WorkspaceInventoryEntriesKey = {
152
+ [Key in keyof WorkspaceInventoryParseResult]: WorkspaceInventoryParseResult[Key] extends unknown[] ? Key : never;
153
+ }[keyof WorkspaceInventoryParseResult];
154
+ export type WorkspaceInventorySectionFlagKey = {
155
+ [Key in keyof WorkspaceInventoryParseResult]: WorkspaceInventoryParseResult[Key] extends boolean ? Key : never;
156
+ }[keyof WorkspaceInventoryParseResult];
157
+ export type WorkspaceInventoryUpdateOptions = {
158
+ abilityEntries?: string[];
159
+ adminViewEntries?: string[];
160
+ aiFeatureEntries?: string[];
161
+ blockEntries?: string[];
162
+ blockStyleEntries?: string[];
163
+ blockTransformEntries?: string[];
164
+ bindingSourceEntries?: string[];
165
+ editorPluginEntries?: string[];
166
+ patternEntries?: string[];
167
+ restResourceEntries?: string[];
168
+ transformSource?: (source: string) => string;
169
+ variationEntries?: string[];
170
+ };
171
+ export type WorkspaceInventoryAppendOptionKey = Exclude<keyof WorkspaceInventoryUpdateOptions, "transformSource">;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,238 +1,5 @@
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
- * REST-resource entry parsed from `scripts/block-config.ts`.
38
- *
39
- * Each file path is stored relative to the workspace root so doctor checks and
40
- * workspace mutation helpers can resolve the generated TypeScript, OpenAPI, and
41
- * PHP route artifacts without guessing their locations.
42
- */
43
- export interface WorkspaceRestResourceInventoryEntry {
44
- apiFile: string;
45
- clientFile: string;
46
- dataFile: string;
47
- methods: string[];
48
- namespace: string;
49
- openApiFile: string;
50
- phpFile: string;
51
- slug: string;
52
- typesFile: string;
53
- validatorsFile: string;
54
- }
55
- /**
56
- * Ability entry parsed from `scripts/block-config.ts`.
57
- *
58
- * Each file path stays relative to the workspace root so doctor checks, schema
59
- * sync scripts, and generated admin/editor helpers can resolve typed workflow
60
- * artifacts without guessing their locations.
61
- */
62
- export interface WorkspaceAbilityInventoryEntry {
63
- clientFile: string;
64
- configFile: string;
65
- dataFile: string;
66
- inputSchemaFile: string;
67
- inputTypeName: string;
68
- outputSchemaFile: string;
69
- outputTypeName: string;
70
- phpFile: string;
71
- slug: string;
72
- typesFile: string;
73
- }
74
- /**
75
- * AI-feature entry parsed from `scripts/block-config.ts`.
76
- *
77
- * Each file path stays relative to the workspace root so doctor checks, add
78
- * workflows, and split sync scripts can reason about the REST and AI-safe
79
- * artifacts without guessing their locations.
80
- */
81
- export interface WorkspaceAiFeatureInventoryEntry {
82
- aiSchemaFile: string;
83
- apiFile: string;
84
- clientFile: string;
85
- dataFile: string;
86
- namespace: string;
87
- openApiFile: string;
88
- phpFile: string;
89
- slug: string;
90
- typesFile: string;
91
- validatorsFile: string;
92
- }
93
- /**
94
- * DataViews admin-screen entry parsed from `scripts/block-config.ts`.
95
- *
96
- * @property file Relative path to the generated admin view shared entry file.
97
- * @property phpFile Relative path to the generated WordPress admin page glue.
98
- * @property slug Normalized admin view slug.
99
- * @property source Optional source locator such as `rest-resource:products` or
100
- * `core-data:postType/post`.
101
- */
102
- export interface WorkspaceAdminViewInventoryEntry {
103
- file: string;
104
- phpFile: string;
105
- slug: string;
106
- source?: string;
107
- }
108
- /**
109
- * Editor-plugin entry parsed from `scripts/block-config.ts`.
110
- *
111
- * @property file Relative path to the generated editor plugin entry file.
112
- * @property slug Normalized editor plugin slug.
113
- * @property slot Canonical editor shell slot for the plugin scaffold.
114
- */
115
- export interface WorkspaceEditorPluginInventoryEntry {
116
- file: string;
117
- slug: string;
118
- slot: string;
119
- }
120
- export interface WorkspaceInventory {
121
- adminViews: WorkspaceAdminViewInventoryEntry[];
122
- bindingSources: WorkspaceBindingSourceInventoryEntry[];
123
- blockConfigPath: string;
124
- blocks: WorkspaceBlockInventoryEntry[];
125
- blockStyles: WorkspaceBlockStyleInventoryEntry[];
126
- blockTransforms: WorkspaceBlockTransformInventoryEntry[];
127
- abilities: WorkspaceAbilityInventoryEntry[];
128
- aiFeatures: WorkspaceAiFeatureInventoryEntry[];
129
- hasAbilitiesSection: boolean;
130
- hasAdminViewsSection: boolean;
131
- hasBindingSourcesSection: boolean;
132
- hasAiFeaturesSection: boolean;
133
- hasBlockStylesSection: boolean;
134
- hasBlockTransformsSection: boolean;
135
- hasEditorPluginsSection: boolean;
136
- hasPatternsSection: boolean;
137
- hasRestResourcesSection: boolean;
138
- hasVariationsSection: boolean;
139
- editorPlugins: WorkspaceEditorPluginInventoryEntry[];
140
- patterns: WorkspacePatternInventoryEntry[];
141
- restResources: WorkspaceRestResourceInventoryEntry[];
142
- source: string;
143
- variations: WorkspaceVariationInventoryEntry[];
144
- }
145
- export declare const BLOCK_CONFIG_ENTRY_MARKER = "\t// wp-typia add block entries";
146
- export declare const VARIATION_CONFIG_ENTRY_MARKER = "\t// wp-typia add variation entries";
147
- export declare const BLOCK_STYLE_CONFIG_ENTRY_MARKER = "\t// wp-typia add style entries";
148
- export declare const BLOCK_TRANSFORM_CONFIG_ENTRY_MARKER = "\t// wp-typia add transform entries";
149
- export declare const PATTERN_CONFIG_ENTRY_MARKER = "\t// wp-typia add pattern entries";
150
- export declare const BINDING_SOURCE_CONFIG_ENTRY_MARKER = "\t// wp-typia add binding-source entries";
151
- export declare const REST_RESOURCE_CONFIG_ENTRY_MARKER = "\t// wp-typia add rest-resource entries";
152
- export declare const ABILITY_CONFIG_ENTRY_MARKER = "\t// wp-typia add ability entries";
153
- export declare const AI_FEATURE_CONFIG_ENTRY_MARKER = "\t// wp-typia add ai-feature entries";
154
- export declare const ADMIN_VIEW_CONFIG_ENTRY_MARKER = "\t// wp-typia add admin-view entries";
155
- /**
156
- * Marker used to append generated editor-plugin entries into `EDITOR_PLUGINS`.
157
- */
158
- export declare const EDITOR_PLUGIN_CONFIG_ENTRY_MARKER = "\t// wp-typia add editor-plugin entries";
159
- type WorkspaceInventoryUpdateOptions = {
160
- abilityEntries?: string[];
161
- adminViewEntries?: string[];
162
- aiFeatureEntries?: string[];
163
- blockEntries?: string[];
164
- blockStyleEntries?: string[];
165
- blockTransformEntries?: string[];
166
- bindingSourceEntries?: string[];
167
- editorPluginEntries?: string[];
168
- patternEntries?: string[];
169
- restResourceEntries?: string[];
170
- transformSource?: (source: string) => string;
171
- variationEntries?: string[];
172
- };
173
- /**
174
- * Parse workspace inventory entries from the source of `scripts/block-config.ts`.
175
- *
176
- * @param source Raw TypeScript source from `scripts/block-config.ts`.
177
- * @returns Parsed inventory sections without the resolved `blockConfigPath`.
178
- * @throws {Error} When `BLOCKS` is missing or any inventory entry is malformed.
179
- */
180
- export declare function parseWorkspaceInventorySource(source: string): Omit<WorkspaceInventory, "blockConfigPath">;
181
- /**
182
- * Synchronously read and parse the canonical workspace inventory file.
183
- *
184
- * This compatibility helper is intentionally sync-only for callers that expose
185
- * synchronous APIs. Prefer `readWorkspaceInventoryAsync()` from async command
186
- * paths so workspace reads do not block the event loop.
187
- *
188
- * @param projectDir Workspace root directory.
189
- * @returns Parsed `WorkspaceInventory` including the resolved `blockConfigPath`.
190
- * @throws {Error} When `scripts/block-config.ts` is missing or invalid.
191
- */
192
- export declare function readWorkspaceInventory(projectDir: string): WorkspaceInventory;
193
- /**
194
- * Asynchronously read and parse the canonical workspace inventory file.
195
- *
196
- * @param projectDir Workspace root directory.
197
- * @returns Parsed `WorkspaceInventory` including the resolved `blockConfigPath`.
198
- * @throws {Error} When `scripts/block-config.ts` is missing or invalid.
199
- */
200
- export declare function readWorkspaceInventoryAsync(projectDir: string): Promise<WorkspaceInventory>;
201
- /**
202
- * Return select options for the current workspace block inventory.
203
- *
204
- * The `description` field mirrors `block.typesFile`, while `name` and `value`
205
- * both map to the block slug for use in interactive add flows.
206
- *
207
- * @param projectDir Workspace root directory.
208
- * @returns Block options for variation-target selection.
209
- */
210
- export declare function getWorkspaceBlockSelectOptions(projectDir: string): Array<{
211
- description: string;
212
- name: string;
213
- value: string;
214
- }>;
215
- /**
216
- * Update `scripts/block-config.ts` source text with additional inventory entries.
217
- *
218
- * Missing inventory sections for variations, patterns, binding sources, REST
219
- * resources, workflow abilities, AI features, editor plugins, block styles, and
220
- * block transforms are created
221
- * automatically before new entries are appended at their marker comments.
222
- * When provided, `transformSource` runs before any entries are inserted.
223
- *
224
- * @param source Existing `scripts/block-config.ts` source.
225
- * @param options Entry lists plus an optional source transformer.
226
- * @returns Updated source text with all requested inventory entries appended.
227
- */
228
- export declare function updateWorkspaceInventorySource(source: string, options?: WorkspaceInventoryUpdateOptions): string;
229
- /**
230
- * Append new entries to the canonical workspace inventory file on disk.
231
- *
232
- * @param projectDir Workspace root directory.
233
- * @param options Entry lists and optional source transform passed through to
234
- * `updateWorkspaceInventorySource`.
235
- * @returns Resolves once `scripts/block-config.ts` has been updated if needed.
236
- */
237
- export declare function appendWorkspaceInventoryEntries(projectDir: string, options: Parameters<typeof updateWorkspaceInventorySource>[1]): Promise<void>;
238
- export {};
1
+ export { ABILITY_CONFIG_ENTRY_MARKER, ADMIN_VIEW_CONFIG_ENTRY_MARKER, AI_FEATURE_CONFIG_ENTRY_MARKER, BINDING_SOURCE_CONFIG_ENTRY_MARKER, BLOCK_CONFIG_ENTRY_MARKER, BLOCK_STYLE_CONFIG_ENTRY_MARKER, BLOCK_TRANSFORM_CONFIG_ENTRY_MARKER, EDITOR_PLUGIN_CONFIG_ENTRY_MARKER, PATTERN_CONFIG_ENTRY_MARKER, REST_RESOURCE_CONFIG_ENTRY_MARKER, VARIATION_CONFIG_ENTRY_MARKER, } from "./workspace-inventory-templates.js";
2
+ export { parseWorkspaceInventorySource } from "./workspace-inventory-parser.js";
3
+ export { getWorkspaceBlockSelectOptions, getWorkspaceBlockSelectOptionsAsync, readWorkspaceInventory, readWorkspaceInventoryAsync, } from "./workspace-inventory-read.js";
4
+ export { appendWorkspaceInventoryEntries, updateWorkspaceInventorySource, } from "./workspace-inventory-mutations.js";
5
+ export type { WorkspaceAbilityInventoryEntry, WorkspaceAdminViewInventoryEntry, WorkspaceAiFeatureInventoryEntry, WorkspaceBindingSourceInventoryEntry, WorkspaceBlockInventoryEntry, WorkspaceBlockSelectOption, WorkspaceBlockStyleInventoryEntry, WorkspaceBlockTransformInventoryEntry, WorkspaceEditorPluginInventoryEntry, WorkspaceInventory, WorkspacePatternInventoryEntry, WorkspaceRestResourceInventoryEntry, WorkspaceVariationInventoryEntry, } from "./workspace-inventory-types.js";