@immense/vue-pom-generator 1.0.40 → 1.0.42
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/RELEASE_NOTES.md +19 -19
- package/class-generation/index.ts +1 -1
- package/dist/class-generation/index.d.ts +1 -1
- package/dist/class-generation/index.d.ts.map +1 -1
- package/dist/index.cjs +100 -79
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +100 -79
- package/dist/index.mjs.map +1 -1
- package/dist/plugin/create-vue-pom-generator-plugins.d.ts.map +1 -1
- package/dist/plugin/support/build-plugin.d.ts +1 -1
- package/dist/plugin/support/build-plugin.d.ts.map +1 -1
- package/dist/plugin/support/dev-plugin.d.ts +3 -2
- package/dist/plugin/support/dev-plugin.d.ts.map +1 -1
- package/dist/plugin/support-plugins.d.ts +3 -2
- package/dist/plugin/support-plugins.d.ts.map +1 -1
- package/dist/tests/dev-plugin-options.test.d.ts +2 -0
- package/dist/tests/dev-plugin-options.test.d.ts.map +1 -0
- package/dist/utils.d.ts +1 -1
- package/dist/utils.d.ts.map +1 -1
- package/package.json +1 -1
package/RELEASE_NOTES.md
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
●
|
|
1
|
+
● Based on the PR information and the specified release window (2026-04-06T12:50:48-05:00 to
|
|
2
|
+
2026-04-06T17:25:31-05:00), only PR #6 falls within this window. PRs #1 and #4 were merged
|
|
3
|
+
earlier (February and April 1st respectively) and should not be included in v1.0.42.
|
|
2
4
|
|
|
5
|
+
```markdown
|
|
3
6
|
## Highlights
|
|
4
7
|
|
|
5
|
-
-
|
|
6
|
-
-
|
|
7
|
-
-
|
|
8
|
-
-
|
|
8
|
+
- Dev mode now fails fast on snapshot generation errors instead of silently continuing
|
|
9
|
+
- Snapshot maps are rebuilt atomically to prevent partial state after compilation failures
|
|
10
|
+
- Dev server behavior now matches build-mode semantics for strict snapshot errors
|
|
11
|
+
- Added regression test coverage for strict collision failures during dev startup
|
|
9
12
|
|
|
10
13
|
## Changes
|
|
11
14
|
|
|
12
|
-
**
|
|
13
|
-
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
- Added automated PR release-notes preview comments
|
|
15
|
+
**Error Handling**
|
|
16
|
+
- Dev startup now awaits snapshot generation so strict transform failures reject instead of
|
|
17
|
+
silently continuing
|
|
18
|
+
- Snapshot maps are rebuilt atomically during startup and batched regeneration to avoid partial
|
|
19
|
+
state on failed recompiles
|
|
18
20
|
|
|
19
21
|
**Testing**
|
|
20
|
-
- Added
|
|
21
|
-
- Added 50+ new test cases for utilities coverage
|
|
22
|
+
- Added regression coverage for strict collision failures during dev startup
|
|
22
23
|
|
|
23
24
|
## Breaking Changes
|
|
24
25
|
|
|
@@ -26,13 +27,12 @@
|
|
|
26
27
|
|
|
27
28
|
## Pull Requests Included
|
|
28
29
|
|
|
29
|
-
- #
|
|
30
|
-
(https://github.com/immense/vue-pom-generator/pull/
|
|
31
|
-
- #1 Add PR release-notes preview comments (https://github.com/immense/vue-pom-generator/pull/1)
|
|
32
|
-
by @dkattan
|
|
30
|
+
- #6 fix: fail fast on dev snapshot generation errors
|
|
31
|
+
(https://github.com/immense/vue-pom-generator/pull/6)
|
|
33
32
|
|
|
34
33
|
## Testing
|
|
35
34
|
|
|
36
|
-
Added
|
|
37
|
-
|
|
35
|
+
Added regression test coverage for strict collision failures during dev startup. All tests
|
|
36
|
+
passing with validation via eslint, typecheck, build, and test suite.
|
|
37
|
+
```
|
|
38
38
|
|
|
@@ -75,7 +75,7 @@ interface CustomPomAttachment {
|
|
|
75
75
|
className: string;
|
|
76
76
|
propertyName: string;
|
|
77
77
|
attachWhenUsesComponents: string[];
|
|
78
|
-
attachTo?: "views" | "components" | "both";
|
|
78
|
+
attachTo?: "views" | "components" | "both" | "pagesAndComponents";
|
|
79
79
|
flatten?: boolean;
|
|
80
80
|
}
|
|
81
81
|
|
|
@@ -8,7 +8,7 @@ interface CustomPomAttachment {
|
|
|
8
8
|
className: string;
|
|
9
9
|
propertyName: string;
|
|
10
10
|
attachWhenUsesComponents: string[];
|
|
11
|
-
attachTo?: "views" | "components" | "both";
|
|
11
|
+
attachTo?: "views" | "components" | "both" | "pagesAndComponents";
|
|
12
12
|
flatten?: boolean;
|
|
13
13
|
}
|
|
14
14
|
export interface GenerateFilesOptions {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../class-generation/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,oCAAoC,EAAE,MAAM,sBAAsB,CAAC;AAE5E,OAAO,EAAE,sBAAsB,EAAoE,MAAM,UAAU,CAAC;AAQpH,OAAO,EAAE,oCAAoC,EAAE,CAAC;AA8ChD,UAAU,SAAS;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB;AASD,UAAU,mBAAmB;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,wBAAwB,EAAE,MAAM,EAAE,CAAC;IACnC,QAAQ,CAAC,EAAE,OAAO,GAAG,YAAY,GAAG,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../class-generation/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,oCAAoC,EAAE,MAAM,sBAAsB,CAAC;AAE5E,OAAO,EAAE,sBAAsB,EAAoE,MAAM,UAAU,CAAC;AAQpH,OAAO,EAAE,oCAAoC,EAAE,CAAC;AA8ChD,UAAU,SAAS;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB;AASD,UAAU,mBAAmB;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,wBAAwB,EAAE,MAAM,EAAE,CAAC;IACnC,QAAQ,CAAC,EAAE,OAAO,GAAG,YAAY,GAAG,MAAM,GAAG,oBAAoB,CAAC;IAClE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AA8PD,MAAM,WAAW,oBAAoB;IACnC;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;;;;;;;;;;;;;OAeG;IACH,gBAAgB,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG;QAAE,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAE1D;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;;;;;OAOG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEhD;;;;;OAKG;IACH,oCAAoC,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IAEzD;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAE7C,yEAAyE;IACzE,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB,uDAAuD;IACvD,aAAa,CAAC,EAAE,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,CAAC;IAEvC,6BAA6B;IAC7B,MAAM,CAAC,EAAE;QACP,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;IAEF,6EAA6E;IAC7E,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAElC,2FAA2F;IAC3F,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,mDAAmD;IACnD,UAAU,CAAC,EAAE,YAAY,GAAG,MAAM,CAAC;IAEnC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IAEpB,oBAAoB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;CAClD;AA+BD,wBAAsB,aAAa,CACjC,qBAAqB,EAAE,GAAG,CAAC,MAAM,EAAE,sBAAsB,CAAC,EAC1D,eAAe,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EACpC,iBAAiB,EAAE,MAAM,EACzB,OAAO,GAAE,oBAAyB,iBAmFnC"}
|
package/dist/index.cjs
CHANGED
|
@@ -739,14 +739,16 @@ function nodeHasForDirective(node) {
|
|
|
739
739
|
function getKeyDirective(node) {
|
|
740
740
|
return findDirectiveByName(node, "bind", "key") ?? null;
|
|
741
741
|
}
|
|
742
|
-
function getKeyDirectiveValue(node,
|
|
742
|
+
function getKeyDirectiveValue(node, _context = null) {
|
|
743
743
|
const keyDirective = getKeyDirective(node);
|
|
744
|
-
|
|
745
|
-
if (
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
744
|
+
const rawSource = keyDirective?.exp?.loc.source?.trim();
|
|
745
|
+
if (rawSource) {
|
|
746
|
+
return `\${${rawSource}}`;
|
|
747
|
+
}
|
|
748
|
+
if (keyDirective?.exp) {
|
|
749
|
+
const value = compilerCore.stringifyExpression(keyDirective.exp);
|
|
750
|
+
if (value)
|
|
751
|
+
return `\${${value}}`;
|
|
750
752
|
}
|
|
751
753
|
return null;
|
|
752
754
|
}
|
|
@@ -6008,6 +6010,7 @@ function createDevProcessorPlugin(options) {
|
|
|
6008
6010
|
customPomDir,
|
|
6009
6011
|
customPomImportAliases,
|
|
6010
6012
|
customPomImportNameCollisionBehavior,
|
|
6013
|
+
nameCollisionBehavior = "suffix",
|
|
6011
6014
|
testIdAttribute,
|
|
6012
6015
|
routerAwarePoms,
|
|
6013
6016
|
resolvedRouterEntry,
|
|
@@ -6034,7 +6037,7 @@ function createDevProcessorPlugin(options) {
|
|
|
6034
6037
|
return;
|
|
6035
6038
|
scheduleVueFileRegen(ctx.file, "hmr");
|
|
6036
6039
|
},
|
|
6037
|
-
configureServer(server) {
|
|
6040
|
+
async configureServer(server) {
|
|
6038
6041
|
const getViewsDirAbs = () => path.isAbsolute(viewsDir) ? viewsDir : path.resolve(projectRootRef.current, viewsDir);
|
|
6039
6042
|
const routerInitPromise = (async () => {
|
|
6040
6043
|
if (!routerAwarePoms) {
|
|
@@ -6111,8 +6114,8 @@ function createDevProcessorPlugin(options) {
|
|
|
6111
6114
|
}
|
|
6112
6115
|
return out;
|
|
6113
6116
|
};
|
|
6114
|
-
|
|
6115
|
-
|
|
6117
|
+
let snapshotHierarchy = /* @__PURE__ */ new Map();
|
|
6118
|
+
let snapshotVuePathMap = /* @__PURE__ */ new Map();
|
|
6116
6119
|
const filePathToComponentName = /* @__PURE__ */ new Map();
|
|
6117
6120
|
const getComponentNameForFile = (filePath) => {
|
|
6118
6121
|
const normalized = path.resolve(filePath);
|
|
@@ -6129,12 +6132,12 @@ function createDevProcessorPlugin(options) {
|
|
|
6129
6132
|
filePathToComponentName.set(normalized, name);
|
|
6130
6133
|
return name;
|
|
6131
6134
|
};
|
|
6132
|
-
const compileVueFileIntoSnapshot = (filePath) => {
|
|
6135
|
+
const compileVueFileIntoSnapshot = (filePath, targetHierarchy = snapshotHierarchy, targetVuePathMap = snapshotVuePathMap) => {
|
|
6133
6136
|
const started = node_perf_hooks.performance.now();
|
|
6134
6137
|
const absolutePath = path.resolve(filePath);
|
|
6135
6138
|
const componentName = getComponentNameForFile(absolutePath);
|
|
6136
|
-
|
|
6137
|
-
|
|
6139
|
+
targetVuePathMap.set(componentName, absolutePath);
|
|
6140
|
+
targetHierarchy.delete(componentName);
|
|
6138
6141
|
let sfc = "";
|
|
6139
6142
|
try {
|
|
6140
6143
|
sfc = fs.readFileSync(absolutePath, "utf8");
|
|
@@ -6144,29 +6147,33 @@ function createDevProcessorPlugin(options) {
|
|
|
6144
6147
|
const template = extractTemplateFromSfc(sfc, absolutePath);
|
|
6145
6148
|
if (!template.trim())
|
|
6146
6149
|
return { componentName, ms: node_perf_hooks.performance.now() - started, compiled: true };
|
|
6147
|
-
|
|
6148
|
-
|
|
6149
|
-
|
|
6150
|
-
|
|
6151
|
-
|
|
6152
|
-
|
|
6153
|
-
|
|
6154
|
-
|
|
6155
|
-
|
|
6156
|
-
|
|
6157
|
-
|
|
6158
|
-
|
|
6159
|
-
|
|
6160
|
-
|
|
6161
|
-
|
|
6162
|
-
|
|
6163
|
-
|
|
6150
|
+
compilerDom__namespace.compile(template, {
|
|
6151
|
+
filename: absolutePath,
|
|
6152
|
+
prefixIdentifiers: true,
|
|
6153
|
+
nodeTransforms: [
|
|
6154
|
+
createTestIdTransform(
|
|
6155
|
+
componentName,
|
|
6156
|
+
targetHierarchy,
|
|
6157
|
+
nativeWrappers,
|
|
6158
|
+
excludedComponents,
|
|
6159
|
+
getViewsDirAbs(),
|
|
6160
|
+
{
|
|
6161
|
+
existingIdBehavior: "preserve",
|
|
6162
|
+
nameCollisionBehavior,
|
|
6163
|
+
testIdAttribute,
|
|
6164
|
+
warn: (message) => loggerRef.current.warn(message),
|
|
6165
|
+
vueFilesPathMap: targetVuePathMap,
|
|
6166
|
+
wrapperSearchRoots: getWrapperSearchRoots()
|
|
6167
|
+
}
|
|
6168
|
+
)
|
|
6169
|
+
]
|
|
6170
|
+
});
|
|
6164
6171
|
return { componentName, ms: node_perf_hooks.performance.now() - started, compiled: true };
|
|
6165
6172
|
};
|
|
6166
6173
|
const fullRebuildSnapshotFromFilesystem = () => {
|
|
6167
6174
|
const t0 = node_perf_hooks.performance.now();
|
|
6168
|
-
|
|
6169
|
-
|
|
6175
|
+
const nextHierarchy = /* @__PURE__ */ new Map();
|
|
6176
|
+
const nextVuePathMap = /* @__PURE__ */ new Map();
|
|
6170
6177
|
filePathToComponentName.clear();
|
|
6171
6178
|
let totalVueFiles = 0;
|
|
6172
6179
|
let compiledCount = 0;
|
|
@@ -6177,11 +6184,13 @@ function createDevProcessorPlugin(options) {
|
|
|
6177
6184
|
const vueFiles = walkFilesRecursive(absDir);
|
|
6178
6185
|
totalVueFiles += vueFiles.length;
|
|
6179
6186
|
for (const file of vueFiles) {
|
|
6180
|
-
const res = compileVueFileIntoSnapshot(file);
|
|
6187
|
+
const res = compileVueFileIntoSnapshot(file, nextHierarchy, nextVuePathMap);
|
|
6181
6188
|
if (res.compiled)
|
|
6182
6189
|
compiledCount++;
|
|
6183
6190
|
}
|
|
6184
6191
|
}
|
|
6192
|
+
snapshotHierarchy = nextHierarchy;
|
|
6193
|
+
snapshotVuePathMap = nextVuePathMap;
|
|
6185
6194
|
const t1 = node_perf_hooks.performance.now();
|
|
6186
6195
|
logInfo(`initial scan: found ${totalVueFiles} .vue files in ${scanDirs.join(", ")}`);
|
|
6187
6196
|
logInfo(`initial compile: ${compiledCount}/${totalVueFiles} files in ${formatMs(t1 - t0)} (components=${snapshotHierarchy.size})`);
|
|
@@ -6198,6 +6207,8 @@ function createDevProcessorPlugin(options) {
|
|
|
6198
6207
|
customPomDir,
|
|
6199
6208
|
customPomImportAliases,
|
|
6200
6209
|
customPomImportNameCollisionBehavior,
|
|
6210
|
+
viewsDir,
|
|
6211
|
+
scanDirs,
|
|
6201
6212
|
testIdAttribute,
|
|
6202
6213
|
vueRouterFluentChaining: routerAwarePoms,
|
|
6203
6214
|
routerEntry: resolvedRouterEntry,
|
|
@@ -6206,6 +6217,10 @@ function createDevProcessorPlugin(options) {
|
|
|
6206
6217
|
const t1 = node_perf_hooks.performance.now();
|
|
6207
6218
|
logInfo(`generate(${reason}): components=${snapshotHierarchy.size} in ${formatMs(t1 - t0)}`);
|
|
6208
6219
|
};
|
|
6220
|
+
let timer = null;
|
|
6221
|
+
let maxWaitTimer = null;
|
|
6222
|
+
const pendingChangedVueFiles = /* @__PURE__ */ new Set();
|
|
6223
|
+
const pendingDeletedComponents = /* @__PURE__ */ new Set();
|
|
6209
6224
|
const initialBuildPromise = (async () => {
|
|
6210
6225
|
const t0 = node_perf_hooks.performance.now();
|
|
6211
6226
|
await routerInitPromise;
|
|
@@ -6214,13 +6229,44 @@ function createDevProcessorPlugin(options) {
|
|
|
6214
6229
|
const t1 = node_perf_hooks.performance.now();
|
|
6215
6230
|
logInfo(`startup total: ${formatMs(t1 - t0)}`);
|
|
6216
6231
|
})();
|
|
6232
|
+
const logGenerationError = (reason, message) => {
|
|
6233
|
+
server.config.logger.error(`[vue-pom-generator] dev generation failed during ${reason}: ${message}`);
|
|
6234
|
+
};
|
|
6235
|
+
const regenerateFromPending = async (reason) => {
|
|
6236
|
+
const t0 = node_perf_hooks.performance.now();
|
|
6237
|
+
await initialBuildPromise;
|
|
6238
|
+
const nextHierarchy = new Map(snapshotHierarchy);
|
|
6239
|
+
const nextVuePathMap = new Map(snapshotVuePathMap);
|
|
6240
|
+
for (const componentName of pendingDeletedComponents) {
|
|
6241
|
+
nextHierarchy.delete(componentName);
|
|
6242
|
+
nextVuePathMap.delete(componentName);
|
|
6243
|
+
}
|
|
6244
|
+
const files = Array.from(pendingChangedVueFiles);
|
|
6245
|
+
const deletedCount = pendingDeletedComponents.size;
|
|
6246
|
+
pendingChangedVueFiles.clear();
|
|
6247
|
+
pendingDeletedComponents.clear();
|
|
6248
|
+
let compileMs = 0;
|
|
6249
|
+
for (const f of files) {
|
|
6250
|
+
const res = compileVueFileIntoSnapshot(f, nextHierarchy, nextVuePathMap);
|
|
6251
|
+
compileMs += res.ms;
|
|
6252
|
+
}
|
|
6253
|
+
snapshotHierarchy = nextHierarchy;
|
|
6254
|
+
snapshotVuePathMap = nextVuePathMap;
|
|
6255
|
+
const t1 = node_perf_hooks.performance.now();
|
|
6256
|
+
generateAggregatedFromSnapshot(reason);
|
|
6257
|
+
const t2 = node_perf_hooks.performance.now();
|
|
6258
|
+
return {
|
|
6259
|
+
files,
|
|
6260
|
+
deletedCount,
|
|
6261
|
+
compileMs,
|
|
6262
|
+
preGenerateMs: t1 - t0,
|
|
6263
|
+
generateMs: t2 - t1,
|
|
6264
|
+
totalMs: t2 - t0
|
|
6265
|
+
};
|
|
6266
|
+
};
|
|
6217
6267
|
const watchedVueGlobs = scanDirs.map((dir) => path.resolve(projectRootRef.current, dir, "**", "*.vue"));
|
|
6218
6268
|
const watchedPluginGlob = path.resolve(projectRootRef.current, "vite-plugins", "vue-pom-generator", "**", "*.ts");
|
|
6219
6269
|
server.watcher.add([...watchedVueGlobs, watchedPluginGlob, basePageClassPath]);
|
|
6220
|
-
let timer = null;
|
|
6221
|
-
let maxWaitTimer = null;
|
|
6222
|
-
const pendingChangedVueFiles = /* @__PURE__ */ new Set();
|
|
6223
|
-
const pendingDeletedComponents = /* @__PURE__ */ new Set();
|
|
6224
6270
|
scheduleVueFileRegenLocal = (filePath, source) => {
|
|
6225
6271
|
pendingChangedVueFiles.add(filePath);
|
|
6226
6272
|
logDebug(`queued(${source}): files=${pendingChangedVueFiles.size} deleted=${pendingDeletedComponents.size}`);
|
|
@@ -6237,29 +6283,14 @@ function createDevProcessorPlugin(options) {
|
|
|
6237
6283
|
timer = null;
|
|
6238
6284
|
}
|
|
6239
6285
|
maxWaitTimer = null;
|
|
6240
|
-
void (
|
|
6241
|
-
const t0 = node_perf_hooks.performance.now();
|
|
6242
|
-
await initialBuildPromise;
|
|
6243
|
-
for (const componentName of pendingDeletedComponents) {
|
|
6244
|
-
snapshotHierarchy.delete(componentName);
|
|
6245
|
-
snapshotVuePathMap.delete(componentName);
|
|
6246
|
-
}
|
|
6247
|
-
const files = Array.from(pendingChangedVueFiles);
|
|
6248
|
-
const deletedCount = pendingDeletedComponents.size;
|
|
6249
|
-
pendingChangedVueFiles.clear();
|
|
6250
|
-
pendingDeletedComponents.clear();
|
|
6251
|
-
let compileMs = 0;
|
|
6252
|
-
for (const f of files) {
|
|
6253
|
-
const res = compileVueFileIntoSnapshot(f);
|
|
6254
|
-
compileMs += res.ms;
|
|
6255
|
-
}
|
|
6256
|
-
const t1 = node_perf_hooks.performance.now();
|
|
6257
|
-
generateAggregatedFromSnapshot("max-wait");
|
|
6258
|
-
const t2 = node_perf_hooks.performance.now();
|
|
6286
|
+
void regenerateFromPending("max-wait").then(({ files, deletedCount, compileMs, preGenerateMs, generateMs, totalMs }) => {
|
|
6259
6287
|
logInfo(
|
|
6260
|
-
`max-wait: files=${files.length} deleted=${deletedCount} compile=${formatMs(compileMs)} wall=${formatMs(
|
|
6288
|
+
`max-wait: files=${files.length} deleted=${deletedCount} compile=${formatMs(compileMs)} wall=${formatMs(preGenerateMs)} gen=${formatMs(generateMs)} total=${formatMs(totalMs)}`
|
|
6261
6289
|
);
|
|
6262
|
-
})()
|
|
6290
|
+
}).catch((error) => {
|
|
6291
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
6292
|
+
logGenerationError("max-wait", message);
|
|
6293
|
+
});
|
|
6263
6294
|
}, MAX_WAIT_MS);
|
|
6264
6295
|
}
|
|
6265
6296
|
if (wasEmpty) {
|
|
@@ -6275,31 +6306,17 @@ function createDevProcessorPlugin(options) {
|
|
|
6275
6306
|
clearTimeout(maxWaitTimer);
|
|
6276
6307
|
maxWaitTimer = null;
|
|
6277
6308
|
}
|
|
6278
|
-
|
|
6279
|
-
|
|
6280
|
-
await initialBuildPromise;
|
|
6281
|
-
for (const componentName of pendingDeletedComponents) {
|
|
6282
|
-
snapshotHierarchy.delete(componentName);
|
|
6283
|
-
snapshotVuePathMap.delete(componentName);
|
|
6284
|
-
}
|
|
6285
|
-
const files = Array.from(pendingChangedVueFiles);
|
|
6286
|
-
const deletedCount = pendingDeletedComponents.size;
|
|
6287
|
-
pendingChangedVueFiles.clear();
|
|
6288
|
-
pendingDeletedComponents.clear();
|
|
6289
|
-
let compileMs = 0;
|
|
6290
|
-
for (const f of files) {
|
|
6291
|
-
const res = compileVueFileIntoSnapshot(f);
|
|
6292
|
-
compileMs += res.ms;
|
|
6293
|
-
}
|
|
6294
|
-
const t1 = node_perf_hooks.performance.now();
|
|
6295
|
-
generateAggregatedFromSnapshot(files.length || deletedCount ? "batched" : "noop");
|
|
6296
|
-
const t2 = node_perf_hooks.performance.now();
|
|
6309
|
+
const reason = pendingChangedVueFiles.size || pendingDeletedComponents.size ? "batched" : "noop";
|
|
6310
|
+
void regenerateFromPending(reason).then(({ files, deletedCount, compileMs, preGenerateMs, generateMs, totalMs }) => {
|
|
6297
6311
|
if (files.length || deletedCount) {
|
|
6298
6312
|
logInfo(
|
|
6299
|
-
`batched: files=${files.length} deleted=${deletedCount} compile=${formatMs(compileMs)} wall=${formatMs(
|
|
6313
|
+
`batched: files=${files.length} deleted=${deletedCount} compile=${formatMs(compileMs)} wall=${formatMs(preGenerateMs)} gen=${formatMs(generateMs)} total=${formatMs(totalMs)}`
|
|
6300
6314
|
);
|
|
6301
6315
|
}
|
|
6302
|
-
})()
|
|
6316
|
+
}).catch((error) => {
|
|
6317
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
6318
|
+
logGenerationError(reason, message);
|
|
6319
|
+
});
|
|
6303
6320
|
}, 75);
|
|
6304
6321
|
}
|
|
6305
6322
|
server.watcher.on("change", async (changedPath) => {
|
|
@@ -6351,6 +6368,7 @@ function createDevProcessorPlugin(options) {
|
|
|
6351
6368
|
});
|
|
6352
6369
|
setTimeout(() => {
|
|
6353
6370
|
}, 250);
|
|
6371
|
+
await initialBuildPromise;
|
|
6354
6372
|
}
|
|
6355
6373
|
};
|
|
6356
6374
|
}
|
|
@@ -6381,6 +6399,7 @@ function createSupportPlugins(options) {
|
|
|
6381
6399
|
viewsDir,
|
|
6382
6400
|
scanDirs,
|
|
6383
6401
|
getWrapperSearchRoots,
|
|
6402
|
+
nameCollisionBehavior = "suffix",
|
|
6384
6403
|
outDir,
|
|
6385
6404
|
emitLanguages,
|
|
6386
6405
|
csharp,
|
|
@@ -6457,6 +6476,7 @@ function createSupportPlugins(options) {
|
|
|
6457
6476
|
customPomDir,
|
|
6458
6477
|
customPomImportAliases,
|
|
6459
6478
|
customPomImportNameCollisionBehavior,
|
|
6479
|
+
nameCollisionBehavior,
|
|
6460
6480
|
testIdAttribute,
|
|
6461
6481
|
routerAwarePoms,
|
|
6462
6482
|
routerType,
|
|
@@ -7037,6 +7057,7 @@ function createVuePomGeneratorPlugins(options = {}) {
|
|
|
7037
7057
|
viewsDir,
|
|
7038
7058
|
scanDirs,
|
|
7039
7059
|
getWrapperSearchRoots: getWrapperSearchRootsAbs,
|
|
7060
|
+
nameCollisionBehavior,
|
|
7040
7061
|
outDir,
|
|
7041
7062
|
emitLanguages,
|
|
7042
7063
|
csharp,
|