@wp-typia/project-tools 0.16.11 → 0.16.12
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/README.md +9 -3
- package/dist/runtime/built-in-block-artifact-documents.d.ts +3 -0
- package/dist/runtime/built-in-block-artifact-documents.js +2 -0
- package/dist/runtime/built-in-block-artifact-types.d.ts +51 -0
- package/dist/runtime/built-in-block-artifact-types.js +304 -0
- package/dist/runtime/built-in-block-artifacts.js +4 -803
- package/dist/runtime/built-in-block-attribute-emitters.d.ts +71 -0
- package/dist/runtime/built-in-block-attribute-emitters.js +176 -0
- package/dist/runtime/built-in-block-attribute-specs.d.ts +38 -0
- package/dist/runtime/built-in-block-attribute-specs.js +358 -0
- package/dist/runtime/built-in-block-code-templates/basic.d.ts +4 -0
- package/dist/runtime/built-in-block-code-templates/basic.js +249 -0
- package/dist/runtime/built-in-block-code-templates/compound-child.d.ts +4 -0
- package/dist/runtime/built-in-block-code-templates/compound-child.js +138 -0
- package/dist/runtime/built-in-block-code-templates/compound-parent.d.ts +6 -0
- package/dist/runtime/built-in-block-code-templates/compound-parent.js +227 -0
- package/dist/runtime/built-in-block-code-templates/compound-persistence.d.ts +4 -0
- package/dist/runtime/built-in-block-code-templates/compound-persistence.js +478 -0
- package/dist/runtime/built-in-block-code-templates/compound.d.ts +3 -0
- package/dist/runtime/built-in-block-code-templates/compound.js +3 -0
- package/dist/runtime/built-in-block-code-templates/interactivity.d.ts +5 -0
- package/dist/runtime/built-in-block-code-templates/interactivity.js +547 -0
- package/dist/runtime/built-in-block-code-templates/persistence.d.ts +5 -0
- package/dist/runtime/built-in-block-code-templates/persistence.js +550 -0
- package/dist/runtime/built-in-block-code-templates/shared.d.ts +16 -0
- package/dist/runtime/built-in-block-code-templates/shared.js +53 -0
- package/dist/runtime/built-in-block-code-templates.d.ts +5 -32
- package/dist/runtime/built-in-block-code-templates.js +5 -2230
- package/dist/runtime/cli-add-block-config.d.ts +6 -0
- package/dist/runtime/cli-add-block-config.js +143 -0
- package/dist/runtime/cli-add-block-legacy-validator.d.ts +4 -0
- package/dist/runtime/cli-add-block-legacy-validator.js +168 -0
- package/dist/runtime/cli-add-block.js +3 -301
- package/dist/runtime/cli-add-workspace-assets.d.ts +38 -0
- package/dist/runtime/cli-add-workspace-assets.js +399 -0
- package/dist/runtime/cli-add-workspace.d.ts +2 -38
- package/dist/runtime/cli-add-workspace.js +5 -396
- package/dist/runtime/cli-doctor-environment.d.ts +12 -0
- package/dist/runtime/cli-doctor-environment.js +123 -0
- package/dist/runtime/cli-doctor-workspace.d.ts +14 -0
- package/dist/runtime/cli-doctor-workspace.js +296 -0
- package/dist/runtime/cli-doctor.d.ts +4 -2
- package/dist/runtime/cli-doctor.js +10 -405
- package/dist/runtime/migration-command-surface.d.ts +67 -0
- package/dist/runtime/migration-command-surface.js +189 -0
- package/dist/runtime/migration-diff-rename.d.ts +13 -0
- package/dist/runtime/migration-diff-rename.js +192 -0
- package/dist/runtime/migration-diff-transform.d.ts +14 -0
- package/dist/runtime/migration-diff-transform.js +105 -0
- package/dist/runtime/migration-diff.js +12 -297
- package/dist/runtime/migration-generated-artifacts.d.ts +3 -0
- package/dist/runtime/migration-generated-artifacts.js +41 -0
- package/dist/runtime/migration-maintenance.d.ts +51 -0
- package/dist/runtime/migration-maintenance.js +380 -0
- package/dist/runtime/migration-planning.d.ts +23 -0
- package/dist/runtime/migration-planning.js +131 -0
- package/dist/runtime/migration-project-config-source.d.ts +6 -0
- package/dist/runtime/migration-project-config-source.js +424 -0
- package/dist/runtime/migration-project-layout-discovery.d.ts +61 -0
- package/dist/runtime/migration-project-layout-discovery.js +337 -0
- package/dist/runtime/migration-project-layout-paths.d.ts +135 -0
- package/dist/runtime/migration-project-layout-paths.js +288 -0
- package/dist/runtime/migration-project-layout.d.ts +3 -0
- package/dist/runtime/migration-project-layout.js +2 -0
- package/dist/runtime/migration-project-workspace.d.ts +47 -0
- package/dist/runtime/migration-project-workspace.js +212 -0
- package/dist/runtime/migration-project.d.ts +4 -94
- package/dist/runtime/migration-project.js +3 -1101
- package/dist/runtime/migration-render-diff-rule.d.ts +5 -0
- package/dist/runtime/migration-render-diff-rule.js +120 -0
- package/dist/runtime/migration-render-execution.d.ts +3 -0
- package/dist/runtime/migration-render-execution.js +428 -0
- package/dist/runtime/migration-render-generated.d.ts +27 -0
- package/dist/runtime/migration-render-generated.js +230 -0
- package/dist/runtime/migration-render-support.d.ts +3 -0
- package/dist/runtime/migration-render-support.js +16 -0
- package/dist/runtime/migration-render.d.ts +3 -33
- package/dist/runtime/migration-render.js +3 -789
- package/dist/runtime/migrations.d.ts +24 -118
- package/dist/runtime/migrations.js +12 -700
- package/dist/runtime/scaffold-bootstrap.d.ts +45 -0
- package/dist/runtime/scaffold-bootstrap.js +185 -0
- package/dist/runtime/scaffold-package-manager-files.d.ts +35 -0
- package/dist/runtime/scaffold-package-manager-files.js +79 -0
- package/dist/runtime/scaffold.d.ts +1 -12
- package/dist/runtime/scaffold.js +10 -393
- package/dist/runtime/template-source-contracts.d.ts +81 -0
- package/dist/runtime/template-source-contracts.js +1 -0
- package/dist/runtime/template-source-external.d.ts +21 -0
- package/dist/runtime/template-source-external.js +184 -0
- package/dist/runtime/template-source-locators.d.ts +4 -0
- package/dist/runtime/template-source-locators.js +72 -0
- package/dist/runtime/template-source-normalization.d.ts +7 -0
- package/dist/runtime/template-source-normalization.js +53 -0
- package/dist/runtime/template-source-remote.d.ts +23 -0
- package/dist/runtime/template-source-remote.js +336 -0
- package/dist/runtime/template-source-seeds.d.ts +12 -0
- package/dist/runtime/template-source-seeds.js +243 -0
- package/dist/runtime/template-source.d.ts +4 -86
- package/dist/runtime/template-source.js +9 -828
- package/package.json +4 -4
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { summarizeManifest, summarizeUnionBranches } from "./migration-manifest.js";
|
|
4
|
+
import { getSnapshotBlockJsonPath, getSnapshotManifestPath, getSnapshotSavePath, readRuleMetadata, } from "./migration-project.js";
|
|
5
|
+
import { getGeneratedDir, normalizeImportPath } from "./migration-render-support.js";
|
|
6
|
+
import { readJson, renderPhpValue } from "./migration-utils.js";
|
|
7
|
+
/**
|
|
8
|
+
* Renders the generated migration registry module for a block target.
|
|
9
|
+
*
|
|
10
|
+
* Prefers manifest wrapper modules when they are available in the project,
|
|
11
|
+
* while still validating the imported manifest before the registry consumes it.
|
|
12
|
+
*
|
|
13
|
+
* @param state The resolved migration project state.
|
|
14
|
+
* @param blockKey The stable key for the block whose registry is being generated.
|
|
15
|
+
* @param entries The generated migration entries to include in the registry.
|
|
16
|
+
* @returns The generated TypeScript source code for the migration registry file.
|
|
17
|
+
*/
|
|
18
|
+
export function renderMigrationRegistryFile(state, blockKey, entries) {
|
|
19
|
+
const block = state.blocks.find((entry) => entry.key === blockKey);
|
|
20
|
+
if (!block) {
|
|
21
|
+
throw new Error(`Unknown migration block target: ${blockKey}`);
|
|
22
|
+
}
|
|
23
|
+
const generatedDir = getGeneratedDir(block, state);
|
|
24
|
+
const currentManifestWrapperCandidates = [
|
|
25
|
+
block.manifestFile.replace(/typia\.manifest\.json$/u, "manifest-document.ts"),
|
|
26
|
+
path.join(path.dirname(block.typesFile), "manifest-document.ts"),
|
|
27
|
+
].filter((candidate, index, allCandidates) => candidate !== block.manifestFile && allCandidates.indexOf(candidate) === index);
|
|
28
|
+
const currentManifestWrapperFile = currentManifestWrapperCandidates.find((candidate) => fs.existsSync(path.join(state.projectDir, candidate))) ?? null;
|
|
29
|
+
const currentManifestSourceFile = currentManifestWrapperFile ?? block.manifestFile;
|
|
30
|
+
const currentManifestImport = normalizeImportPath(path.relative(generatedDir, path.join(state.projectDir, currentManifestSourceFile)), currentManifestWrapperFile !== null);
|
|
31
|
+
const imports = [
|
|
32
|
+
`import rawCurrentManifest from "${currentManifestImport}";`,
|
|
33
|
+
`import type { ManifestDocument, MigrationRiskSummary } from "${normalizeImportPath(path.relative(getGeneratedDir(block, state), path.join(state.projectDir, "src", "migrations", "helpers.ts")), true)}";`,
|
|
34
|
+
`import { parseManifestDocument } from "@wp-typia/block-runtime/editor";`,
|
|
35
|
+
];
|
|
36
|
+
const body = [];
|
|
37
|
+
entries.forEach(({ entry, riskSummary }, index) => {
|
|
38
|
+
imports.push(`import manifest_${index} from "${entry.manifestImport}";`);
|
|
39
|
+
imports.push(`import * as rule_${index} from "${entry.ruleImport}";`);
|
|
40
|
+
body.push(`\t{`);
|
|
41
|
+
body.push(`\t\tfromMigrationVersion: "${entry.fromVersion}",`);
|
|
42
|
+
body.push(`\t\tmanifest: parseManifestDocument<ManifestDocument>(manifest_${index}),`);
|
|
43
|
+
body.push(`\t\triskSummary: ${JSON.stringify(riskSummary, null, "\t").replace(/\n/g, "\n\t\t")},`);
|
|
44
|
+
body.push(`\t\trule: rule_${index},`);
|
|
45
|
+
body.push(`\t},`);
|
|
46
|
+
});
|
|
47
|
+
return `/* eslint-disable prettier/prettier, @typescript-eslint/method-signature-style */
|
|
48
|
+
${imports.join("\n")}
|
|
49
|
+
|
|
50
|
+
interface MigrationRegistryEntry {
|
|
51
|
+
\tfromMigrationVersion: string;
|
|
52
|
+
\tmanifest: ManifestDocument;
|
|
53
|
+
\triskSummary: MigrationRiskSummary;
|
|
54
|
+
\trule: {
|
|
55
|
+
\t\tmigrate(input: Record<string, unknown>): Record<string, unknown>;
|
|
56
|
+
\t\tunresolved?: readonly string[];
|
|
57
|
+
\t};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export const migrationRegistry: {
|
|
61
|
+
\tcurrentMigrationVersion: string;
|
|
62
|
+
\tcurrentManifest: ManifestDocument;
|
|
63
|
+
\tentries: MigrationRegistryEntry[];
|
|
64
|
+
} = {
|
|
65
|
+
\tcurrentMigrationVersion: "${state.config.currentMigrationVersion}",
|
|
66
|
+
\tcurrentManifest: parseManifestDocument<ManifestDocument>(rawCurrentManifest),
|
|
67
|
+
\tentries: [
|
|
68
|
+
${body.join("\n")}
|
|
69
|
+
\t],
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export default migrationRegistry;
|
|
73
|
+
`;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Renders the generated deprecated module for a block target.
|
|
77
|
+
*
|
|
78
|
+
* The emitted module exposes the ordered deprecation array consumed by block
|
|
79
|
+
* registration and migration helpers.
|
|
80
|
+
*
|
|
81
|
+
* @param state The resolved migration project state.
|
|
82
|
+
* @param blockKey The stable key for the block whose deprecated entries are being generated.
|
|
83
|
+
* @param entries The migration entries that define deprecated manifest versions.
|
|
84
|
+
* @returns The generated TypeScript source code for the deprecated module.
|
|
85
|
+
*/
|
|
86
|
+
export function renderGeneratedDeprecatedFile(state, blockKey, entries) {
|
|
87
|
+
const block = state.blocks.find((entry) => entry.key === blockKey);
|
|
88
|
+
if (!block) {
|
|
89
|
+
throw new Error(`Unknown migration block target: ${blockKey}`);
|
|
90
|
+
}
|
|
91
|
+
const currentTypeName = typeof block.currentManifest.sourceType === "string" &&
|
|
92
|
+
block.currentManifest.sourceType.length > 0
|
|
93
|
+
? block.currentManifest.sourceType
|
|
94
|
+
: "Record<string, unknown>";
|
|
95
|
+
const hasNamedCurrentType = currentTypeName !== "Record<string, unknown>";
|
|
96
|
+
const generatedDir = getGeneratedDir(block, state);
|
|
97
|
+
const typesImport = normalizeImportPath(path.relative(generatedDir, path.join(state.projectDir, block.typesFile)), true);
|
|
98
|
+
if (entries.length === 0) {
|
|
99
|
+
return `/* eslint-disable prettier/prettier */
|
|
100
|
+
import type { BlockDeprecationList } from "@wp-typia/block-types/blocks/registration";
|
|
101
|
+
${hasNamedCurrentType ? `import type { ${currentTypeName} } from "${typesImport}";\n` : ""}
|
|
102
|
+
|
|
103
|
+
export const deprecated: BlockDeprecationList<${currentTypeName}> = [];
|
|
104
|
+
`;
|
|
105
|
+
}
|
|
106
|
+
const imports = [
|
|
107
|
+
`import type { BlockConfiguration, BlockDeprecationList } from "@wp-typia/block-types/blocks/registration";`,
|
|
108
|
+
...(hasNamedCurrentType
|
|
109
|
+
? [`import type { ${currentTypeName} } from "${typesImport}";`]
|
|
110
|
+
: []),
|
|
111
|
+
];
|
|
112
|
+
const definitions = [];
|
|
113
|
+
const arrayEntries = [];
|
|
114
|
+
entries.forEach((entry, index) => {
|
|
115
|
+
imports.push(`import block_${index} from "${entry.blockJsonImport}";`);
|
|
116
|
+
imports.push(`import save_${index} from "${entry.saveImport}";`);
|
|
117
|
+
imports.push(`import * as rule_${index} from "${entry.ruleImport}";`);
|
|
118
|
+
definitions.push(`const deprecated_${index}: BlockDeprecationList<${currentTypeName}>[number] = {`);
|
|
119
|
+
definitions.push(`\tattributes: (block_${index}.attributes ?? {}) as BlockConfiguration["attributes"],`);
|
|
120
|
+
definitions.push(`\tsave: save_${index} as BlockConfiguration["save"],`);
|
|
121
|
+
definitions.push(`\tmigrate(attributes: Record<string, unknown>) {`);
|
|
122
|
+
definitions.push(`\t\treturn rule_${index}.migrate(attributes);`);
|
|
123
|
+
definitions.push(`\t},`);
|
|
124
|
+
definitions.push(`};`);
|
|
125
|
+
arrayEntries.push(`deprecated_${index}`);
|
|
126
|
+
});
|
|
127
|
+
return `/* eslint-disable prettier/prettier */
|
|
128
|
+
${imports.join("\n")}
|
|
129
|
+
|
|
130
|
+
${definitions.join("\n\n")}
|
|
131
|
+
|
|
132
|
+
export const deprecated: BlockDeprecationList<${currentTypeName}> = [${arrayEntries.join(", ")}];
|
|
133
|
+
`;
|
|
134
|
+
}
|
|
135
|
+
export function renderGeneratedMigrationIndexFile(state, entries) {
|
|
136
|
+
if (state.blocks.length === 0) {
|
|
137
|
+
return `export const migrationBlocks = [] as const;\nexport default migrationBlocks;\n`;
|
|
138
|
+
}
|
|
139
|
+
const generatedDir = state.paths.generatedDir;
|
|
140
|
+
const imports = [];
|
|
141
|
+
const definitions = [];
|
|
142
|
+
state.blocks.forEach((block, index) => {
|
|
143
|
+
const scopedEntries = entries.filter((entry) => entry.block.key === block.key);
|
|
144
|
+
const registryImport = block.layout === "legacy" ? "./registry" : `./${block.key}/registry`;
|
|
145
|
+
const deprecatedImport = block.layout === "legacy" ? "./deprecated" : `./${block.key}/deprecated`;
|
|
146
|
+
const validatorsImport = normalizeImportPath(path.relative(generatedDir, path.join(state.projectDir, block.typesFile.replace(/types\.ts$/u, "validators.ts"))), true);
|
|
147
|
+
imports.push(`import registry_${index} from "${registryImport}";`);
|
|
148
|
+
imports.push(`import { deprecated as deprecated_${index} } from "${deprecatedImport}";`);
|
|
149
|
+
imports.push(`import { validators as validators_${index} } from "${validatorsImport}";`);
|
|
150
|
+
definitions.push(`\t{`);
|
|
151
|
+
definitions.push(`\t\tkey: "${block.key}",`);
|
|
152
|
+
definitions.push(`\t\tblockName: "${block.blockName}",`);
|
|
153
|
+
definitions.push(`\t\tregistry: registry_${index},`);
|
|
154
|
+
definitions.push(`\t\tdeprecated: deprecated_${index},`);
|
|
155
|
+
definitions.push(`\t\tvalidators: validators_${index},`);
|
|
156
|
+
definitions.push(`\t\tlegacyMigrationVersions: ${JSON.stringify(scopedEntries.map((entry) => entry.fromVersion))},`);
|
|
157
|
+
definitions.push(`\t},`);
|
|
158
|
+
});
|
|
159
|
+
return `/* eslint-disable prettier/prettier */
|
|
160
|
+
${imports.join("\n")}
|
|
161
|
+
|
|
162
|
+
export const migrationBlocks = [
|
|
163
|
+
${definitions.join("\n")}
|
|
164
|
+
] as const;
|
|
165
|
+
|
|
166
|
+
export default migrationBlocks;
|
|
167
|
+
`;
|
|
168
|
+
}
|
|
169
|
+
export function renderPhpMigrationRegistryFile(state, entries) {
|
|
170
|
+
const blocks = state.blocks.map((block) => {
|
|
171
|
+
const snapshots = Object.fromEntries(state.config.supportedMigrationVersions.map((version) => {
|
|
172
|
+
const manifestPath = getSnapshotManifestPath(state.projectDir, block, version);
|
|
173
|
+
const blockJsonPath = getSnapshotBlockJsonPath(state.projectDir, block, version);
|
|
174
|
+
const savePath = getSnapshotSavePath(state.projectDir, block, version);
|
|
175
|
+
return [
|
|
176
|
+
version,
|
|
177
|
+
{
|
|
178
|
+
blockJson: fs.existsSync(blockJsonPath)
|
|
179
|
+
? {
|
|
180
|
+
attributeNames: Object.keys((readJson(blockJsonPath).attributes ?? {})),
|
|
181
|
+
name: readJson(blockJsonPath).name ?? null,
|
|
182
|
+
}
|
|
183
|
+
: null,
|
|
184
|
+
hasSaveSnapshot: fs.existsSync(savePath),
|
|
185
|
+
manifest: fs.existsSync(manifestPath)
|
|
186
|
+
? summarizeManifest(readJson(manifestPath))
|
|
187
|
+
: null,
|
|
188
|
+
},
|
|
189
|
+
];
|
|
190
|
+
}));
|
|
191
|
+
const edgeSummaries = entries
|
|
192
|
+
.filter((entry) => entry.block.key === block.key)
|
|
193
|
+
.map((entry) => {
|
|
194
|
+
const ruleMetadata = readRuleMetadata(entry.rulePath);
|
|
195
|
+
const snapshotManifest = snapshots[entry.fromVersion]?.manifest ?? null;
|
|
196
|
+
return {
|
|
197
|
+
autoAppliedRenameCount: ruleMetadata.renameMap.length,
|
|
198
|
+
autoAppliedRenames: ruleMetadata.renameMap,
|
|
199
|
+
fromMigrationVersion: entry.fromVersion,
|
|
200
|
+
nestedPathRenames: ruleMetadata.renameMap.filter((item) => item.currentPath.includes(".")),
|
|
201
|
+
ruleFile: path.relative(state.projectDir, entry.rulePath).replace(/\\/g, "/"),
|
|
202
|
+
toMigrationVersion: entry.toVersion,
|
|
203
|
+
transformKeys: ruleMetadata.transforms,
|
|
204
|
+
unionBranches: snapshotManifest ? summarizeUnionBranches(snapshotManifest) : [],
|
|
205
|
+
unresolved: ruleMetadata.unresolved,
|
|
206
|
+
};
|
|
207
|
+
});
|
|
208
|
+
return {
|
|
209
|
+
blockName: block.blockName,
|
|
210
|
+
currentManifest: summarizeManifest(block.currentManifest),
|
|
211
|
+
edges: edgeSummaries,
|
|
212
|
+
key: block.key,
|
|
213
|
+
legacyMigrationVersions: state.config.supportedMigrationVersions.filter((version) => version !== state.config.currentMigrationVersion),
|
|
214
|
+
snapshots,
|
|
215
|
+
};
|
|
216
|
+
});
|
|
217
|
+
return `<?php
|
|
218
|
+
declare(strict_types=1);
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Generated from advanced migration snapshots. Do not edit manually.
|
|
222
|
+
*/
|
|
223
|
+
return ${renderPhpValue({
|
|
224
|
+
currentMigrationVersion: state.config.currentMigrationVersion,
|
|
225
|
+
blocks,
|
|
226
|
+
snapshotDir: state.config.snapshotDir,
|
|
227
|
+
supportedMigrationVersions: state.config.supportedMigrationVersions,
|
|
228
|
+
}, 0)};
|
|
229
|
+
`;
|
|
230
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { MigrationProjectState } from "./migration-types.js";
|
|
2
|
+
export declare function normalizeImportPath(relativePath: string, stripExtension?: boolean): string;
|
|
3
|
+
export declare function getGeneratedDir(block: MigrationProjectState["blocks"][number], state: MigrationProjectState): string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
export function normalizeImportPath(relativePath, stripExtension = false) {
|
|
3
|
+
let nextPath = relativePath.replace(/\\/g, "/");
|
|
4
|
+
if (!nextPath.startsWith(".")) {
|
|
5
|
+
nextPath = `./${nextPath}`;
|
|
6
|
+
}
|
|
7
|
+
if (stripExtension) {
|
|
8
|
+
nextPath = nextPath.replace(/\.[^.]+$/u, "");
|
|
9
|
+
}
|
|
10
|
+
return nextPath;
|
|
11
|
+
}
|
|
12
|
+
export function getGeneratedDir(block, state) {
|
|
13
|
+
return block.layout === "legacy"
|
|
14
|
+
? state.paths.generatedDir
|
|
15
|
+
: path.join(state.paths.generatedDir, block.key);
|
|
16
|
+
}
|
|
@@ -1,33 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
}): string;
|
|
5
|
-
export declare function renderMigrationRuleFile({ block, currentAttributes, currentTypeName, diff, fromVersion, projectDir, rulePath, targetVersion, }: MigrationRuleFileInput): string;
|
|
6
|
-
/**
|
|
7
|
-
* Renders the generated migration registry module for a block target.
|
|
8
|
-
*
|
|
9
|
-
* Prefers manifest wrapper modules when they are available in the project,
|
|
10
|
-
* while still validating the imported manifest before the registry consumes it.
|
|
11
|
-
*
|
|
12
|
-
* @param state The resolved migration project state.
|
|
13
|
-
* @param blockKey The stable key for the block whose registry is being generated.
|
|
14
|
-
* @param entries The generated migration entries to include in the registry.
|
|
15
|
-
* @returns The generated TypeScript source code for the migration registry file.
|
|
16
|
-
*/
|
|
17
|
-
export declare function renderMigrationRegistryFile(state: MigrationProjectState, blockKey: string, entries: GeneratedMigrationEntry[]): string;
|
|
18
|
-
/**
|
|
19
|
-
* Renders the generated deprecated module for a block target.
|
|
20
|
-
*
|
|
21
|
-
* The emitted module exposes the ordered deprecation array consumed by block
|
|
22
|
-
* registration and migration helpers.
|
|
23
|
-
*
|
|
24
|
-
* @param state The resolved migration project state.
|
|
25
|
-
* @param blockKey The stable key for the block whose deprecated entries are being generated.
|
|
26
|
-
* @param entries The migration entries that define deprecated manifest versions.
|
|
27
|
-
* @returns The generated TypeScript source code for the deprecated module.
|
|
28
|
-
*/
|
|
29
|
-
export declare function renderGeneratedDeprecatedFile(state: MigrationProjectState, blockKey: string, entries: MigrationEntry[]): string;
|
|
30
|
-
export declare function renderGeneratedMigrationIndexFile(state: MigrationProjectState, entries: MigrationEntry[]): string;
|
|
31
|
-
export declare function renderPhpMigrationRegistryFile(state: MigrationProjectState, entries: MigrationEntry[]): string;
|
|
32
|
-
export declare function renderVerifyFile(state: MigrationProjectState, blockKey: string, entries: MigrationEntry[]): string;
|
|
33
|
-
export declare function renderFuzzFile(state: MigrationProjectState, blockKey: string, entries: GeneratedMigrationEntry[]): string;
|
|
1
|
+
export { formatDiffReport, renderMigrationRuleFile } from "./migration-render-diff-rule.js";
|
|
2
|
+
export { renderGeneratedDeprecatedFile, renderGeneratedMigrationIndexFile, renderMigrationRegistryFile, renderPhpMigrationRegistryFile, } from "./migration-render-generated.js";
|
|
3
|
+
export { renderFuzzFile, renderVerifyFile } from "./migration-render-execution.js";
|