@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.
Files changed (90) 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-collision.d.ts +25 -0
  4. package/dist/runtime/cli-add-collision.js +76 -0
  5. package/dist/runtime/cli-add-filesystem.js +2 -15
  6. package/dist/runtime/cli-add-help.js +11 -2
  7. package/dist/runtime/cli-add-kind-ids.d.ts +1 -1
  8. package/dist/runtime/cli-add-kind-ids.js +3 -0
  9. package/dist/runtime/cli-add-types.d.ts +117 -0
  10. package/dist/runtime/cli-add-types.js +29 -1
  11. package/dist/runtime/cli-add-validation.d.ts +90 -1
  12. package/dist/runtime/cli-add-validation.js +304 -1
  13. package/dist/runtime/cli-add-workspace-admin-view-scaffold.js +74 -19
  14. package/dist/runtime/cli-add-workspace-admin-view-source.js +11 -2
  15. package/dist/runtime/cli-add-workspace-admin-view-templates.d.ts +20 -2
  16. package/dist/runtime/cli-add-workspace-admin-view-templates.js +359 -3
  17. package/dist/runtime/cli-add-workspace-admin-view-types.d.ts +21 -0
  18. package/dist/runtime/cli-add-workspace-admin-view-types.js +22 -0
  19. package/dist/runtime/cli-add-workspace-ai-anchors.js +121 -31
  20. package/dist/runtime/cli-add-workspace-contract-source-emitters.d.ts +15 -0
  21. package/dist/runtime/cli-add-workspace-contract-source-emitters.js +42 -0
  22. package/dist/runtime/cli-add-workspace-contract.d.ts +15 -0
  23. package/dist/runtime/cli-add-workspace-contract.js +65 -0
  24. package/dist/runtime/cli-add-workspace-integration-env.d.ts +24 -0
  25. package/dist/runtime/cli-add-workspace-integration-env.js +391 -0
  26. package/dist/runtime/cli-add-workspace-post-meta-anchors.d.ts +23 -0
  27. package/dist/runtime/cli-add-workspace-post-meta-anchors.js +244 -0
  28. package/dist/runtime/cli-add-workspace-post-meta-source-emitters.d.ts +63 -0
  29. package/dist/runtime/cli-add-workspace-post-meta-source-emitters.js +179 -0
  30. package/dist/runtime/cli-add-workspace-post-meta.d.ts +15 -0
  31. package/dist/runtime/cli-add-workspace-post-meta.js +107 -0
  32. package/dist/runtime/cli-add-workspace-rest-anchors.d.ts +1 -0
  33. package/dist/runtime/cli-add-workspace-rest-anchors.js +285 -21
  34. package/dist/runtime/cli-add-workspace-rest-source-emitters.d.ts +90 -2
  35. package/dist/runtime/cli-add-workspace-rest-source-emitters.js +302 -29
  36. package/dist/runtime/cli-add-workspace-rest.d.ts +15 -2
  37. package/dist/runtime/cli-add-workspace-rest.js +329 -21
  38. package/dist/runtime/cli-add-workspace.d.ts +15 -0
  39. package/dist/runtime/cli-add-workspace.js +15 -0
  40. package/dist/runtime/cli-add.d.ts +1 -1
  41. package/dist/runtime/cli-add.js +1 -1
  42. package/dist/runtime/cli-core.d.ts +2 -1
  43. package/dist/runtime/cli-core.js +2 -1
  44. package/dist/runtime/cli-doctor-environment.js +1 -3
  45. package/dist/runtime/cli-doctor-workspace-features.js +128 -10
  46. package/dist/runtime/cli-doctor-workspace-package.d.ts +25 -3
  47. package/dist/runtime/cli-doctor-workspace-package.js +35 -13
  48. package/dist/runtime/cli-doctor-workspace-shared.d.ts +2 -0
  49. package/dist/runtime/cli-doctor-workspace-shared.js +5 -0
  50. package/dist/runtime/cli-doctor-workspace.d.ts +1 -1
  51. package/dist/runtime/cli-doctor-workspace.js +16 -8
  52. package/dist/runtime/cli-doctor.js +1 -1
  53. package/dist/runtime/cli-help.js +7 -0
  54. package/dist/runtime/cli-init-templates.js +11 -1
  55. package/dist/runtime/contract-artifacts.d.ts +14 -0
  56. package/dist/runtime/contract-artifacts.js +15 -0
  57. package/dist/runtime/fs-async.d.ts +7 -0
  58. package/dist/runtime/fs-async.js +11 -2
  59. package/dist/runtime/index.d.ts +1 -1
  60. package/dist/runtime/index.js +1 -1
  61. package/dist/runtime/migration-maintenance-verify.js +3 -0
  62. package/dist/runtime/migration-render-generated.js +4 -0
  63. package/dist/runtime/package-versions.js +3 -7
  64. package/dist/runtime/rest-resource-artifacts.d.ts +57 -1
  65. package/dist/runtime/rest-resource-artifacts.js +97 -1
  66. package/dist/runtime/scaffold-repository-reference.js +3 -7
  67. package/dist/runtime/template-render.d.ts +1 -1
  68. package/dist/runtime/template-render.js +1 -1
  69. package/dist/runtime/template-source-cache-markers.d.ts +37 -0
  70. package/dist/runtime/template-source-cache-markers.js +125 -0
  71. package/dist/runtime/template-source-cache.d.ts +1 -4
  72. package/dist/runtime/template-source-cache.js +16 -122
  73. package/dist/runtime/template-source-external.d.ts +4 -2
  74. package/dist/runtime/template-source-external.js +4 -2
  75. package/dist/runtime/template-source-remote.d.ts +8 -4
  76. package/dist/runtime/template-source-remote.js +8 -4
  77. package/dist/runtime/typia-llm.js +3 -4
  78. package/dist/runtime/workspace-inventory-mutations.d.ts +24 -0
  79. package/dist/runtime/workspace-inventory-mutations.js +181 -0
  80. package/dist/runtime/workspace-inventory-parser.d.ts +53 -0
  81. package/dist/runtime/workspace-inventory-parser.js +632 -0
  82. package/dist/runtime/workspace-inventory-read.d.ts +51 -0
  83. package/dist/runtime/workspace-inventory-read.js +98 -0
  84. package/dist/runtime/workspace-inventory-templates.d.ts +50 -0
  85. package/dist/runtime/workspace-inventory-templates.js +268 -0
  86. package/dist/runtime/workspace-inventory-types.d.ts +220 -0
  87. package/dist/runtime/workspace-inventory-types.js +1 -0
  88. package/dist/runtime/workspace-inventory.d.ts +5 -252
  89. package/dist/runtime/workspace-inventory.js +4 -928
  90. package/package.json +2 -2
@@ -1,252 +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 type WorkspaceBlockSelectOption = {
146
- description: string;
147
- name: string;
148
- value: string;
149
- };
150
- export declare const BLOCK_CONFIG_ENTRY_MARKER = "\t// wp-typia add block entries";
151
- export declare const VARIATION_CONFIG_ENTRY_MARKER = "\t// wp-typia add variation entries";
152
- export declare const BLOCK_STYLE_CONFIG_ENTRY_MARKER = "\t// wp-typia add style entries";
153
- export declare const BLOCK_TRANSFORM_CONFIG_ENTRY_MARKER = "\t// wp-typia add transform entries";
154
- export declare const PATTERN_CONFIG_ENTRY_MARKER = "\t// wp-typia add pattern entries";
155
- export declare const BINDING_SOURCE_CONFIG_ENTRY_MARKER = "\t// wp-typia add binding-source entries";
156
- export declare const REST_RESOURCE_CONFIG_ENTRY_MARKER = "\t// wp-typia add rest-resource entries";
157
- export declare const ABILITY_CONFIG_ENTRY_MARKER = "\t// wp-typia add ability entries";
158
- export declare const AI_FEATURE_CONFIG_ENTRY_MARKER = "\t// wp-typia add ai-feature entries";
159
- export declare const ADMIN_VIEW_CONFIG_ENTRY_MARKER = "\t// wp-typia add admin-view entries";
160
- /**
161
- * Marker used to append generated editor-plugin entries into `EDITOR_PLUGINS`.
162
- */
163
- export declare const EDITOR_PLUGIN_CONFIG_ENTRY_MARKER = "\t// wp-typia add editor-plugin entries";
164
- type WorkspaceInventoryUpdateOptions = {
165
- abilityEntries?: string[];
166
- adminViewEntries?: string[];
167
- aiFeatureEntries?: string[];
168
- blockEntries?: string[];
169
- blockStyleEntries?: string[];
170
- blockTransformEntries?: string[];
171
- bindingSourceEntries?: string[];
172
- editorPluginEntries?: string[];
173
- patternEntries?: string[];
174
- restResourceEntries?: string[];
175
- transformSource?: (source: string) => string;
176
- variationEntries?: string[];
177
- };
178
- /**
179
- * Parse workspace inventory entries from the source of `scripts/block-config.ts`.
180
- *
181
- * @param source Raw TypeScript source from `scripts/block-config.ts`.
182
- * @returns Parsed inventory sections without the resolved `blockConfigPath`.
183
- * @throws {Error} When `BLOCKS` is missing or any inventory entry is malformed.
184
- */
185
- export declare function parseWorkspaceInventorySource(source: string): Omit<WorkspaceInventory, "blockConfigPath">;
186
- /**
187
- * Synchronously read and parse the canonical workspace inventory file.
188
- *
189
- * This compatibility helper is intentionally sync-only for callers that expose
190
- * synchronous APIs. Prefer `readWorkspaceInventoryAsync()` from async command
191
- * paths so workspace reads do not block the event loop.
192
- *
193
- * @param projectDir Workspace root directory.
194
- * @returns Parsed `WorkspaceInventory` including the resolved `blockConfigPath`.
195
- * @throws {Error} When `scripts/block-config.ts` is missing or invalid.
196
- */
197
- export declare function readWorkspaceInventory(projectDir: string): WorkspaceInventory;
198
- /**
199
- * Asynchronously read and parse the canonical workspace inventory file.
200
- *
201
- * @param projectDir Workspace root directory.
202
- * @returns Parsed `WorkspaceInventory` including the resolved `blockConfigPath`.
203
- * @throws {Error} When `scripts/block-config.ts` is missing or invalid.
204
- */
205
- export declare function readWorkspaceInventoryAsync(projectDir: string): Promise<WorkspaceInventory>;
206
- /**
207
- * Synchronously return select options for the current workspace block inventory.
208
- *
209
- * The `description` field mirrors `block.typesFile`, while `name` and `value`
210
- * both map to the block slug for use in interactive add flows.
211
- *
212
- * @deprecated Use `getWorkspaceBlockSelectOptionsAsync()` from async command
213
- * paths. This helper intentionally remains sync-only for compatibility callers.
214
- *
215
- * @param projectDir Workspace root directory.
216
- * @returns Block options for variation-target selection.
217
- */
218
- export declare function getWorkspaceBlockSelectOptions(projectDir: string): WorkspaceBlockSelectOption[];
219
- /**
220
- * Asynchronously return select options for the current workspace block inventory.
221
- *
222
- * The returned option shape matches `getWorkspaceBlockSelectOptions()` while
223
- * avoiding synchronous inventory reads in interactive or async command paths.
224
- *
225
- * @param projectDir Workspace root directory.
226
- * @returns Block options for variation-target selection.
227
- */
228
- export declare function getWorkspaceBlockSelectOptionsAsync(projectDir: string): Promise<WorkspaceBlockSelectOption[]>;
229
- /**
230
- * Update `scripts/block-config.ts` source text with additional inventory entries.
231
- *
232
- * Missing inventory sections for variations, patterns, binding sources, REST
233
- * resources, workflow abilities, AI features, editor plugins, block styles, and
234
- * block transforms are created
235
- * automatically before new entries are appended at their marker comments.
236
- * When provided, `transformSource` runs before any entries are inserted.
237
- *
238
- * @param source Existing `scripts/block-config.ts` source.
239
- * @param options Entry lists plus an optional source transformer.
240
- * @returns Updated source text with all requested inventory entries appended.
241
- */
242
- export declare function updateWorkspaceInventorySource(source: string, options?: WorkspaceInventoryUpdateOptions): string;
243
- /**
244
- * Append new entries to the canonical workspace inventory file on disk.
245
- *
246
- * @param projectDir Workspace root directory.
247
- * @param options Entry lists and optional source transform passed through to
248
- * `updateWorkspaceInventorySource`.
249
- * @returns Resolves once `scripts/block-config.ts` has been updated if needed.
250
- */
251
- export declare function appendWorkspaceInventoryEntries(projectDir: string, options: Parameters<typeof updateWorkspaceInventorySource>[1]): Promise<void>;
252
- 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, CONTRACT_CONFIG_ENTRY_MARKER, EDITOR_PLUGIN_CONFIG_ENTRY_MARKER, PATTERN_CONFIG_ENTRY_MARKER, POST_META_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, WorkspaceContractInventoryEntry, WorkspaceEditorPluginInventoryEntry, WorkspaceInventory, WorkspacePatternInventoryEntry, WorkspacePostMetaInventoryEntry, WorkspaceRestResourceInventoryEntry, WorkspaceVariationInventoryEntry, } from "./workspace-inventory-types.js";