@kubb/studio 5.3.6 → 5.3.7
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/index.cjs +19 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +19 -7
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -706,7 +706,7 @@ async function createAgent({ studioUrl, token, name, machineToken }) {
|
|
|
706
706
|
}
|
|
707
707
|
//#endregion
|
|
708
708
|
//#region package.json
|
|
709
|
-
var version = "5.3.
|
|
709
|
+
var version = "5.3.7";
|
|
710
710
|
//#endregion
|
|
711
711
|
//#region src/hooks.ts
|
|
712
712
|
/**
|
|
@@ -1751,16 +1751,28 @@ async function createSnapshotPackage(files, packageInfo) {
|
|
|
1751
1751
|
const filePath = (0, node_path.join)(entry.parentPath, entry.name);
|
|
1752
1752
|
return [`package/dist/${(0, node_path.relative)(dist, filePath).split(node_path.sep).join("/")}`, await (0, node_fs_promises.readFile)(filePath, "utf8")];
|
|
1753
1753
|
}));
|
|
1754
|
+
const builtPaths = new Set(builtEntries.map(([path]) => path));
|
|
1755
|
+
const hasBarrel = builtPaths.has("package/dist/index.mjs") && builtPaths.has("package/dist/index.cjs");
|
|
1756
|
+
const barrelFields = hasBarrel ? {
|
|
1757
|
+
main: "./dist/index.cjs",
|
|
1758
|
+
module: "./dist/index.mjs"
|
|
1759
|
+
} : {};
|
|
1760
|
+
const barrelExport = hasBarrel ? { ".": {
|
|
1761
|
+
import: "./dist/index.mjs",
|
|
1762
|
+
require: "./dist/index.cjs"
|
|
1763
|
+
} } : {};
|
|
1754
1764
|
const entries = {
|
|
1755
1765
|
"package/package.json": JSON.stringify({
|
|
1756
1766
|
...packageInfo,
|
|
1757
1767
|
type: "module",
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1768
|
+
...barrelFields,
|
|
1769
|
+
exports: {
|
|
1770
|
+
...barrelExport,
|
|
1771
|
+
"./*": {
|
|
1772
|
+
import: "./dist/*.mjs",
|
|
1773
|
+
require: "./dist/*.cjs"
|
|
1774
|
+
}
|
|
1775
|
+
}
|
|
1764
1776
|
}, null, 2),
|
|
1765
1777
|
...Object.fromEntries(resolvedPaths.map(({ content, target }) => [target, content])),
|
|
1766
1778
|
...Object.fromEntries(builtEntries)
|