@wp-typia/project-tools 0.22.0 → 0.22.2
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/built-in-block-code-templates/interactivity.d.ts +1 -1
- package/dist/runtime/built-in-block-code-templates/interactivity.js +2 -2
- package/dist/runtime/cli-add-workspace-admin-view-scaffold.d.ts +9 -0
- package/dist/runtime/cli-add-workspace-admin-view-scaffold.js +257 -0
- package/dist/runtime/cli-add-workspace-admin-view-source.d.ts +5 -0
- package/dist/runtime/cli-add-workspace-admin-view-source.js +86 -0
- package/dist/runtime/cli-add-workspace-admin-view-templates.d.ts +23 -0
- package/dist/runtime/cli-add-workspace-admin-view-templates.js +991 -0
- package/dist/runtime/cli-add-workspace-admin-view-types.d.ts +29 -0
- package/dist/runtime/cli-add-workspace-admin-view-types.js +29 -0
- package/dist/runtime/cli-add-workspace-admin-view.d.ts +1 -16
- package/dist/runtime/cli-add-workspace-admin-view.js +22 -1388
- package/dist/runtime/cli-add-workspace-ai-source-emitters.js +119 -1
- package/dist/runtime/cli-add-workspace-ai.js +253 -30
- package/dist/runtime/package-versions.d.ts +15 -0
- package/dist/runtime/package-versions.js +72 -42
- package/dist/runtime/scaffold-compatibility.d.ts +2 -0
- package/dist/runtime/scaffold-compatibility.js +2 -0
- package/dist/runtime/string-case.d.ts +7 -0
- package/dist/runtime/string-case.js +21 -11
- package/dist/runtime/typia-llm.d.ts +37 -2
- package/dist/runtime/typia-llm.js +240 -3
- package/dist/runtime/workspace-inventory.js +24 -0
- package/package.json +1 -1
|
@@ -121,7 +121,9 @@ const WORKSPACE_COMPATIBILITY_CONFIG_FIELD = `\tcompatibility?: {
|
|
|
121
121
|
\t\t\twordpress?: string;
|
|
122
122
|
\t\t};
|
|
123
123
|
\t\tmode: 'baseline' | 'optional' | 'required';
|
|
124
|
+
\t\toptionalFeatureIds: string[];
|
|
124
125
|
\t\toptionalFeatures: string[];
|
|
126
|
+
\t\trequiredFeatureIds: string[];
|
|
125
127
|
\t\trequiredFeatures: string[];
|
|
126
128
|
\t\truntimeGates: string[];
|
|
127
129
|
\t};
|
|
@@ -670,6 +672,26 @@ function ensureInterfaceField(source, interfaceName, fieldName, fieldSource) {
|
|
|
670
672
|
return `${start}${body}${body.length > 0 && !body.endsWith(lineEnding) ? lineEnding : ""}${formattedFieldSource}${end}`;
|
|
671
673
|
});
|
|
672
674
|
}
|
|
675
|
+
function normalizeInterfaceFieldBlock(source, interfaceName, fieldName, fieldSource, requiredFragments) {
|
|
676
|
+
const interfacePattern = new RegExp(`(export\\s+interface\\s+${escapeRegex(interfaceName)}\\s*\\{\\r?\\n)([\\s\\S]*?)(\\r?\\n\\})`, "u");
|
|
677
|
+
return source.replace(interfacePattern, (match, start, body, end) => {
|
|
678
|
+
const fieldPattern = new RegExp(`(^([ \\t]*)${escapeRegex(fieldName)}\\??:\\s*\\{[ \\t]*\\r?\\n)([\\s\\S]*?)(^\\2\\};\\r?\\n?)`, "mu");
|
|
679
|
+
const fieldMatch = fieldPattern.exec(body);
|
|
680
|
+
if (!fieldMatch) {
|
|
681
|
+
return match;
|
|
682
|
+
}
|
|
683
|
+
const existingFieldSource = fieldMatch[0];
|
|
684
|
+
if (requiredFragments.every((fragment) => existingFieldSource.includes(fragment))) {
|
|
685
|
+
return match;
|
|
686
|
+
}
|
|
687
|
+
const lineEnding = start.endsWith("\r\n") ? "\r\n" : "\n";
|
|
688
|
+
const formattedFieldSource = `${fieldSource
|
|
689
|
+
.replace(/\r?\n$/u, "")
|
|
690
|
+
.split("\n")
|
|
691
|
+
.join(lineEnding)}${lineEnding}`;
|
|
692
|
+
return `${start}${body.slice(0, fieldMatch.index)}${formattedFieldSource}${body.slice(fieldMatch.index + existingFieldSource.length)}${end}`;
|
|
693
|
+
});
|
|
694
|
+
}
|
|
673
695
|
/**
|
|
674
696
|
* Update `scripts/block-config.ts` source text with additional inventory entries.
|
|
675
697
|
*
|
|
@@ -701,7 +723,9 @@ export function updateWorkspaceInventorySource(source, { blockEntries = [], bloc
|
|
|
701
723
|
nextSource = ensureInterfaceField(nextSource, "WorkspaceBindingSourceConfig", "attribute", "\tattribute?: string;");
|
|
702
724
|
nextSource = ensureInterfaceField(nextSource, "WorkspaceBindingSourceConfig", "block", "\tblock?: string;");
|
|
703
725
|
nextSource = ensureInterfaceField(nextSource, "WorkspaceAbilityConfig", "compatibility", WORKSPACE_COMPATIBILITY_CONFIG_FIELD);
|
|
726
|
+
nextSource = normalizeInterfaceFieldBlock(nextSource, "WorkspaceAbilityConfig", "compatibility", WORKSPACE_COMPATIBILITY_CONFIG_FIELD, ["optionalFeatureIds: string[];", "requiredFeatureIds: string[];"]);
|
|
704
727
|
nextSource = ensureInterfaceField(nextSource, "WorkspaceAiFeatureConfig", "compatibility", WORKSPACE_COMPATIBILITY_CONFIG_FIELD);
|
|
728
|
+
nextSource = normalizeInterfaceFieldBlock(nextSource, "WorkspaceAiFeatureConfig", "compatibility", WORKSPACE_COMPATIBILITY_CONFIG_FIELD, ["optionalFeatureIds: string[];", "requiredFeatureIds: string[];"]);
|
|
705
729
|
nextSource = appendEntriesAtMarker(nextSource, EDITOR_PLUGIN_CONFIG_ENTRY_MARKER, editorPluginEntries);
|
|
706
730
|
return nextSource;
|
|
707
731
|
}
|