netcore-blueprint 0.0.60 → 0.0.61
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/bin/copy-module.js +7 -6
- package/package.json +1 -1
package/bin/copy-module.js
CHANGED
|
@@ -263,13 +263,14 @@ function addModuleReferencesToHostApi(moduleName, hostApiCsprojPath) {
|
|
|
263
263
|
.map(r => ` <ProjectReference Include="${r}" />`)
|
|
264
264
|
.join('\n');
|
|
265
265
|
|
|
266
|
-
//
|
|
267
|
-
const
|
|
266
|
+
// 🔥 Find ItemGroup that has ProjectReference BUT NOT PackageReference
|
|
267
|
+
const projectOnlyItemGroupRegex =
|
|
268
|
+
/<ItemGroup>(?:(?!<PackageReference)[\s\S])*?<ProjectReference[\s\S]*?<\/ItemGroup>/;
|
|
268
269
|
|
|
269
|
-
const match = content.match(
|
|
270
|
+
const match = content.match(projectOnlyItemGroupRegex);
|
|
270
271
|
|
|
271
272
|
if (match) {
|
|
272
|
-
// ✅ Append to
|
|
273
|
+
// ✅ Append to correct ProjectReference-only ItemGroup
|
|
273
274
|
const originalGroup = match[0];
|
|
274
275
|
|
|
275
276
|
const updatedGroup = originalGroup.replace(
|
|
@@ -279,9 +280,9 @@ function addModuleReferencesToHostApi(moduleName, hostApiCsprojPath) {
|
|
|
279
280
|
|
|
280
281
|
content = content.replace(originalGroup, updatedGroup);
|
|
281
282
|
|
|
282
|
-
console.log(`✅ Appended
|
|
283
|
+
console.log(`✅ Appended to ProjectReference-only ItemGroup`);
|
|
283
284
|
} else {
|
|
284
|
-
// 🆕
|
|
285
|
+
// 🆕 Fallback: create new clean ProjectReference ItemGroup
|
|
285
286
|
const newItemGroup = `
|
|
286
287
|
|
|
287
288
|
<ItemGroup>
|