@immense/vue-pom-generator 1.0.102 → 1.0.104
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 +11 -30
- package/class-generation/index.ts +20 -17
- package/dist/index.cjs +27 -23
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +27 -23
- package/dist/index.mjs.map +1 -1
- package/dist/plugin/runtime/annotator/plugin.d.ts.map +1 -1
- package/package.json +1 -1
- package/plugin/runtime/annotator/plugin.ts +16 -13
package/dist/index.mjs
CHANGED
|
@@ -6905,12 +6905,16 @@ Fix: give direct and slot-projected instances distinct accessible names or seman
|
|
|
6905
6905
|
const members = [];
|
|
6906
6906
|
if (isView && (componentRefsForInstances.size > 0 || attachmentsForThisClass.length > 0 || widgetInstances.length > 0)) {
|
|
6907
6907
|
members.push(...getComponentInstances(directComponentInstances, projectedComponentInstances, attachmentsForThisClass, widgetInstances));
|
|
6908
|
-
members.push(getConstructor(directComponentInstances, attachmentsForThisClass, widgetInstances, { testIdAttribute }));
|
|
6909
6908
|
}
|
|
6910
6909
|
if (!isView && (componentRefsForInstances.size > 0 || attachmentsForThisClass.length > 0)) {
|
|
6911
6910
|
members.push(...getComponentInstances(directComponentInstances, projectedComponentInstances, attachmentsForThisClass));
|
|
6912
|
-
members.push(getConstructor(directComponentInstances, attachmentsForThisClass, [], { testIdAttribute }));
|
|
6913
6911
|
}
|
|
6912
|
+
members.push(getConstructor(
|
|
6913
|
+
directComponentInstances,
|
|
6914
|
+
attachmentsForThisClass,
|
|
6915
|
+
isView ? widgetInstances : [],
|
|
6916
|
+
{ testIdAttribute }
|
|
6917
|
+
));
|
|
6914
6918
|
members.push(
|
|
6915
6919
|
...getAttachmentPassthroughMethods(componentName, dependencies, attachmentsForThisClass, reservedAttachmentPassthroughNames)
|
|
6916
6920
|
);
|
|
@@ -6955,7 +6959,6 @@ function generateViewObjectModelContent(componentName, dependencies, componentHi
|
|
|
6955
6959
|
const basePageImport = path.relative(fromAbs, toAbs).replace(/\\/g, "/");
|
|
6956
6960
|
const basePageImportNoExt = stripExtension(basePageImport).replace(/\\/g, "/");
|
|
6957
6961
|
const basePageImportSpecifier = basePageImportNoExt.startsWith(".") ? basePageImportNoExt : `./${basePageImportNoExt}`;
|
|
6958
|
-
const needsPlaywrightPageImport = prepared.isView || prepared.attachmentsForThisClass.length > 0 || prepared.componentRefsForInstances.size > 0 || prepared.widgetInstances.length > 0;
|
|
6959
6962
|
const customPomImportSpecifiersByClass = options.customPomImportSpecifiersByClass ?? {};
|
|
6960
6963
|
const customImports = Array.from(
|
|
6961
6964
|
/* @__PURE__ */ new Set([
|
|
@@ -7007,16 +7010,14 @@ function generateViewObjectModelContent(componentName, dependencies, componentHi
|
|
|
7007
7010
|
const prefixText = `${buildFilePrefix({ eslintDisableSortImports: true })}${doc}
|
|
7008
7011
|
`;
|
|
7009
7012
|
return renderSourceFile(`${prepared.className}.ts`, (sourceFile) => {
|
|
7010
|
-
|
|
7011
|
-
|
|
7012
|
-
|
|
7013
|
-
|
|
7014
|
-
|
|
7015
|
-
|
|
7016
|
-
|
|
7017
|
-
|
|
7018
|
-
});
|
|
7019
|
-
}
|
|
7013
|
+
addNamedImport(sourceFile, {
|
|
7014
|
+
moduleSpecifier: "@playwright/test",
|
|
7015
|
+
isTypeOnly: true,
|
|
7016
|
+
namedImports: [
|
|
7017
|
+
{ name: "Locator", alias: "PwLocator" },
|
|
7018
|
+
{ name: "Page", alias: "PwPage" }
|
|
7019
|
+
]
|
|
7020
|
+
});
|
|
7020
7021
|
addNamedImport(sourceFile, {
|
|
7021
7022
|
moduleSpecifier: basePageImportSpecifier,
|
|
7022
7023
|
namedImports: ["BasePage", "Fluent"]
|
|
@@ -10991,17 +10992,20 @@ ${code}`,
|
|
|
10991
10992
|
map: null
|
|
10992
10993
|
};
|
|
10993
10994
|
},
|
|
10994
|
-
transformIndexHtml
|
|
10995
|
-
|
|
10996
|
-
|
|
10995
|
+
transformIndexHtml: {
|
|
10996
|
+
order: "pre",
|
|
10997
|
+
handler() {
|
|
10998
|
+
if (!options.enabled) {
|
|
10999
|
+
return void 0;
|
|
11000
|
+
}
|
|
11001
|
+
const tag = {
|
|
11002
|
+
tag: "script",
|
|
11003
|
+
attrs: { type: "module" },
|
|
11004
|
+
children: `import ${JSON.stringify(ANNOTATOR_CLIENT_VIRTUAL_ID)};`,
|
|
11005
|
+
injectTo: "body"
|
|
11006
|
+
};
|
|
11007
|
+
return [tag];
|
|
10997
11008
|
}
|
|
10998
|
-
const tag = {
|
|
10999
|
-
tag: "script",
|
|
11000
|
-
attrs: { type: "module" },
|
|
11001
|
-
children: `import ${JSON.stringify(ANNOTATOR_CLIENT_VIRTUAL_ID)};`,
|
|
11002
|
-
injectTo: "body"
|
|
11003
|
-
};
|
|
11004
|
-
return [tag];
|
|
11005
11009
|
}
|
|
11006
11010
|
};
|
|
11007
11011
|
}
|