@hexagen-monaco/sync 0.12.0 → 0.12.1
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/cli.js +5 -40
- package/dist/cli.js.map +1 -1
- package/dist/fs-utils.d.ts.map +1 -1
- package/dist/generators/barrels/recursive.d.ts.map +1 -1
- package/dist/index.js +5 -40
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/fs-utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fs-utils.d.ts","sourceRoot":"","sources":["../src/fs-utils.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAYhD,eAAO,MAAM,cAAc,aAiBzB,CAAC;AASH;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAExD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,GAAG,OAAO,
|
|
1
|
+
{"version":3,"file":"fs-utils.d.ts","sourceRoot":"","sources":["../src/fs-utils.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAYhD,eAAO,MAAM,cAAc,aAiBzB,CAAC;AASH;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAExD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,GAAG,OAAO,CAc7E;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,GAAG,OAAO,CAIvE;AAED;;;;;;;;;GASG;AACH,wBAAsB,mBAAmB,CACvC,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,UAAU,EAClB,MAAM,CAAC,EAAE,cAAc,EACvB,kBAAkB,GAAE,OAAe,GAClC,OAAO,CAAC,WAAW,CAAC,CAsHtB;AAED;;GAEG;AACH,wBAAsB,aAAa,CACjC,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,UAAU,EAClB,kBAAkB,GAAE,OAAe,GAClC,OAAO,CAAC,WAAW,CAAC,CAQtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recursive.d.ts","sourceRoot":"","sources":["../../../src/generators/barrels/recursive.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"recursive.d.ts","sourceRoot":"","sources":["../../../src/generators/barrels/recursive.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,kBAAkB,CAAC;AAY1B;;;GAGG;AACH,qBAAa,mBAAoB,SAAQ,KAAK;aAChB,KAAK,EAAE,MAAM,EAAE;gBAAf,KAAK,EAAE,MAAM,EAAE;CAI5C;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAYD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,wBAAwB,CAC5C,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,UAAU,EAClB,MAAM,CAAC,EAAE,cAAc,GACtB,OAAO,CAAC,eAAe,CAAC,CAsI1B"}
|
package/dist/index.js
CHANGED
|
@@ -399,7 +399,7 @@ function isGeneratedFile(content) {
|
|
|
399
399
|
return content.includes(GENERATED_MARKER);
|
|
400
400
|
}
|
|
401
401
|
function isProtectedRoot(filePath, config) {
|
|
402
|
-
const relative = path7.relative(config.workspaceRoot, filePath);
|
|
402
|
+
const relative = path7.relative(config.workspaceRoot, filePath).replace(/\\/g, "/");
|
|
403
403
|
const isRootLevel = !relative.startsWith("packages/") && !relative.startsWith("tools/") && !relative.startsWith("apps/");
|
|
404
404
|
return isRootLevel && Array.from(protectedFiles).some(
|
|
405
405
|
(f) => relative.endsWith(f) || relative.includes(f)
|
|
@@ -855,53 +855,18 @@ async function walkDirectory(dirPath, pendingWrites, preserved, exportGraph, con
|
|
|
855
855
|
if (exportEntries.length === 0) {
|
|
856
856
|
const barrelPath2 = path7.join(dirPath, "index.ts");
|
|
857
857
|
const existingBarrel = await readFileIfExists(barrelPath2);
|
|
858
|
-
const dirName = path7.basename(dirPath);
|
|
859
|
-
const isLayerDir = ["domain", "application", "infrastructure"].includes(
|
|
860
|
-
dirName
|
|
861
|
-
);
|
|
862
858
|
if (existingBarrel) {
|
|
863
859
|
const isGenerated = isGeneratedFile2(existingBarrel);
|
|
864
|
-
const
|
|
865
|
-
|
|
860
|
+
const statements = existingBarrel.split("\n").map((line) => line.trim()).filter((line) => line.length > 0 && !line.startsWith("//"));
|
|
861
|
+
const isEmptyStub = statements.length === 1 && /^export\s*\{\s*\}\s*;?$/.test(statements[0]);
|
|
862
|
+
if (isGenerated || isEmptyStub) {
|
|
866
863
|
pendingWrites.push({
|
|
867
864
|
filePath: barrelPath2,
|
|
868
865
|
content: "",
|
|
869
866
|
// Empty content signals deletion
|
|
870
867
|
isNew: false
|
|
871
868
|
});
|
|
872
|
-
} else if (isEmptyStub && isLayerDir) {
|
|
873
|
-
const newContent = `${GENERATED_MARKER2}
|
|
874
|
-
|
|
875
|
-
export {};
|
|
876
|
-
`;
|
|
877
|
-
if (contentHash2(existingBarrel) !== contentHash2(newContent)) {
|
|
878
|
-
pendingWrites.push({
|
|
879
|
-
filePath: barrelPath2,
|
|
880
|
-
content: newContent,
|
|
881
|
-
isNew: false
|
|
882
|
-
});
|
|
883
|
-
}
|
|
884
|
-
} else if (!existingBarrel.includes("export {}") && isLayerDir) {
|
|
885
|
-
const newContent = `${GENERATED_MARKER2}
|
|
886
|
-
|
|
887
|
-
export {};
|
|
888
|
-
`;
|
|
889
|
-
pendingWrites.push({
|
|
890
|
-
filePath: barrelPath2,
|
|
891
|
-
content: newContent,
|
|
892
|
-
isNew: false
|
|
893
|
-
});
|
|
894
869
|
}
|
|
895
|
-
} else if (isLayerDir) {
|
|
896
|
-
const newContent = `${GENERATED_MARKER2}
|
|
897
|
-
|
|
898
|
-
export {};
|
|
899
|
-
`;
|
|
900
|
-
pendingWrites.push({
|
|
901
|
-
filePath: barrelPath2,
|
|
902
|
-
content: newContent,
|
|
903
|
-
isNew: true
|
|
904
|
-
});
|
|
905
870
|
}
|
|
906
871
|
return [];
|
|
907
872
|
}
|
|
@@ -1514,7 +1479,7 @@ function assertValidToolchainVersion(version, source) {
|
|
|
1514
1479
|
function resolveToolchainVersion() {
|
|
1515
1480
|
{
|
|
1516
1481
|
return assertValidToolchainVersion(
|
|
1517
|
-
"0.12.
|
|
1482
|
+
"0.12.1",
|
|
1518
1483
|
"build-injected __HEXAGEN_TOOLCHAIN_VERSION__"
|
|
1519
1484
|
);
|
|
1520
1485
|
}
|