@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 +22 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +14 -0
- package/dist/index.js +22 -8
- package/dist/index.js.map +1 -1
- package/dist/protocol.cjs.map +1 -1
- package/dist/protocol.d.ts +10 -0
- package/dist/protocol.js.map +1 -1
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -291,6 +291,16 @@ type StudioConnectedContext = {
|
|
|
291
291
|
*/
|
|
292
292
|
agent: string;
|
|
293
293
|
};
|
|
294
|
+
/**
|
|
295
|
+
* This agent's slug, refreshed on every connect so a rename in Studio shows up without a
|
|
296
|
+
* re-pair. Absent when Studio predates the field.
|
|
297
|
+
*/
|
|
298
|
+
agentSlug?: string;
|
|
299
|
+
/**
|
|
300
|
+
* This agent's organization slug, absent for a sandbox or global agent, which has none, or when
|
|
301
|
+
* Studio predates the field.
|
|
302
|
+
*/
|
|
303
|
+
organizationSlug?: string;
|
|
294
304
|
};
|
|
295
305
|
/**
|
|
296
306
|
* Fired once Studio confirms the `agent:connect` handshake was received and the session is fully
|
|
@@ -469,6 +479,10 @@ type PairingResult = {
|
|
|
469
479
|
* Display name chosen at pairing time.
|
|
470
480
|
*/
|
|
471
481
|
name: string;
|
|
482
|
+
/**
|
|
483
|
+
* This agent's organization slug, absent for a sandbox or global agent, which has none.
|
|
484
|
+
*/
|
|
485
|
+
organizationSlug?: string;
|
|
472
486
|
};
|
|
473
487
|
};
|
|
474
488
|
/**
|
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.8";
|
|
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)
|
|
@@ -2210,7 +2222,9 @@ var StudioSession = class {
|
|
|
2210
2222
|
studio: this.#studioVersion,
|
|
2211
2223
|
kubb: version,
|
|
2212
2224
|
agent: this.#options.version
|
|
2213
|
-
}
|
|
2225
|
+
},
|
|
2226
|
+
agentSlug: session.agentSlug,
|
|
2227
|
+
organizationSlug: session.organizationSlug
|
|
2214
2228
|
});
|
|
2215
2229
|
await this.#connectAck.promise;
|
|
2216
2230
|
await this.#hooks.callHook("studio:ready", {});
|