@kubb/studio 5.2.3 → 5.2.4
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 +17 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +17 -3
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -569,7 +569,7 @@ async function disconnect({ sessionId, token, studioUrl, slug }) {
|
|
|
569
569
|
}
|
|
570
570
|
//#endregion
|
|
571
571
|
//#region package.json
|
|
572
|
-
var version = "5.2.
|
|
572
|
+
var version = "5.2.4";
|
|
573
573
|
//#endregion
|
|
574
574
|
//#region src/hooks.ts
|
|
575
575
|
/**
|
|
@@ -675,6 +675,20 @@ function toPluginName(packageName) {
|
|
|
675
675
|
return packageName.split("/").pop() ?? packageName;
|
|
676
676
|
}
|
|
677
677
|
/**
|
|
678
|
+
* Adds the `@kubb/` scope a plugin's package carries but its `name` does not, the inverse of
|
|
679
|
+
* {@link toPluginName}. A name outside the `plugin-` convention is left alone, so a third-party
|
|
680
|
+
* plugin is not reported as one of Kubb's.
|
|
681
|
+
*
|
|
682
|
+
* @example
|
|
683
|
+
* ```ts
|
|
684
|
+
* toPackageName('plugin-ts') // '@kubb/plugin-ts'
|
|
685
|
+
* toPackageName('@acme/my-plugin') // '@acme/my-plugin'
|
|
686
|
+
* ```
|
|
687
|
+
*/
|
|
688
|
+
function toPackageName(name) {
|
|
689
|
+
return name.startsWith("plugin-") ? `@kubb/${name}` : name;
|
|
690
|
+
}
|
|
691
|
+
/**
|
|
678
692
|
* Derives the conventional named export for a `@kubb/*` plugin package from its package name.
|
|
679
693
|
*
|
|
680
694
|
* @example
|
|
@@ -1509,7 +1523,7 @@ const CONNECT_TIMEOUT_MS = 5e3;
|
|
|
1509
1523
|
const eventSeqCounters = /* @__PURE__ */ new WeakMap();
|
|
1510
1524
|
const require$1 = (0, node_module.createRequire)(require("url").pathToFileURL(__filename).href);
|
|
1511
1525
|
async function resolvePeerDependencies(names) {
|
|
1512
|
-
const uniqueNames = [...new Set(names)];
|
|
1526
|
+
const uniqueNames = [...new Set(names.map(toPackageName))];
|
|
1513
1527
|
const peerDependencies = {};
|
|
1514
1528
|
const missingDependencies = [];
|
|
1515
1529
|
const versions = await Promise.all(uniqueNames.map(async (name) => {
|
|
@@ -1955,7 +1969,7 @@ var StudioSession = class {
|
|
|
1955
1969
|
path: configPath,
|
|
1956
1970
|
file: await this.#readConfigFileView(),
|
|
1957
1971
|
plugins: config.plugins.map((plugin) => ({
|
|
1958
|
-
name:
|
|
1972
|
+
name: toPackageName(plugin.name),
|
|
1959
1973
|
options: plugin.options ?? {}
|
|
1960
1974
|
}))
|
|
1961
1975
|
},
|