@kubb/studio 5.3.6 → 5.3.8

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 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.6";
709
+ var version = "5.3.8";
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
- main: "./dist/index.cjs",
1759
- module: "./dist/index.mjs",
1760
- exports: { ".": {
1761
- import: "./dist/index.mjs",
1762
- require: "./dist/index.cjs"
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)
@@ -2240,7 +2252,9 @@ var StudioSession = class {
2240
2252
  studio: this.#studioVersion,
2241
2253
  kubb: version,
2242
2254
  agent: this.#options.version
2243
- }
2255
+ },
2256
+ agentSlug: session.agentSlug,
2257
+ organizationSlug: session.organizationSlug
2244
2258
  });
2245
2259
  await this.#connectAck.promise;
2246
2260
  await this.#hooks.callHook("studio:ready", {});