@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.js
CHANGED
|
@@ -676,7 +676,7 @@ async function createAgent({ studioUrl, token, name, machineToken }) {
|
|
|
676
676
|
}
|
|
677
677
|
//#endregion
|
|
678
678
|
//#region package.json
|
|
679
|
-
var version = "5.3.
|
|
679
|
+
var version = "5.3.7";
|
|
680
680
|
//#endregion
|
|
681
681
|
//#region src/hooks.ts
|
|
682
682
|
/**
|
|
@@ -1721,16 +1721,28 @@ async function createSnapshotPackage(files, packageInfo) {
|
|
|
1721
1721
|
const filePath = join(entry.parentPath, entry.name);
|
|
1722
1722
|
return [`package/dist/${relative(dist, filePath).split(sep).join("/")}`, await readFile(filePath, "utf8")];
|
|
1723
1723
|
}));
|
|
1724
|
+
const builtPaths = new Set(builtEntries.map(([path]) => path));
|
|
1725
|
+
const hasBarrel = builtPaths.has("package/dist/index.mjs") && builtPaths.has("package/dist/index.cjs");
|
|
1726
|
+
const barrelFields = hasBarrel ? {
|
|
1727
|
+
main: "./dist/index.cjs",
|
|
1728
|
+
module: "./dist/index.mjs"
|
|
1729
|
+
} : {};
|
|
1730
|
+
const barrelExport = hasBarrel ? { ".": {
|
|
1731
|
+
import: "./dist/index.mjs",
|
|
1732
|
+
require: "./dist/index.cjs"
|
|
1733
|
+
} } : {};
|
|
1724
1734
|
const entries = {
|
|
1725
1735
|
"package/package.json": JSON.stringify({
|
|
1726
1736
|
...packageInfo,
|
|
1727
1737
|
type: "module",
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1738
|
+
...barrelFields,
|
|
1739
|
+
exports: {
|
|
1740
|
+
...barrelExport,
|
|
1741
|
+
"./*": {
|
|
1742
|
+
import: "./dist/*.mjs",
|
|
1743
|
+
require: "./dist/*.cjs"
|
|
1744
|
+
}
|
|
1745
|
+
}
|
|
1734
1746
|
}, null, 2),
|
|
1735
1747
|
...Object.fromEntries(resolvedPaths.map(({ content, target }) => [target, content])),
|
|
1736
1748
|
...Object.fromEntries(builtEntries)
|