@kubb/studio 5.6.3 → 5.7.0
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 +5 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import process$1 from "node:process";
|
|
|
9
9
|
import { setTimeout as setTimeout$1 } from "node:timers/promises";
|
|
10
10
|
import { pathToFileURL } from "node:url";
|
|
11
11
|
import { existsSync } from "node:fs";
|
|
12
|
-
import { Diagnostics, Hookable, cacheStorage, createKubb, fsStorage, getInputKind, memoryStorage, resolveCacheDir } from "@kubb/core";
|
|
12
|
+
import { Diagnostics, Hookable, cacheStorage, createKubb, fsStorage, getInputKind, memoryStorage, resolveCacheDir, resolveMeta } from "@kubb/core";
|
|
13
13
|
import { RpcTarget, newWebSocketRpcSession } from "capnweb";
|
|
14
14
|
import { detectCodeFormat, parseExpression, parseModule } from "magicast";
|
|
15
15
|
import { promisify, stripVTControlCharacters } from "node:util";
|
|
@@ -192,7 +192,7 @@ function getElapsedMs(hrStart) {
|
|
|
192
192
|
}
|
|
193
193
|
//#endregion
|
|
194
194
|
//#region package.json
|
|
195
|
-
var version = "5.
|
|
195
|
+
var version = "5.7.0";
|
|
196
196
|
//#endregion
|
|
197
197
|
//#region src/resolveConfig.ts
|
|
198
198
|
/**
|
|
@@ -461,7 +461,7 @@ function mergeOptions(disk, studio) {
|
|
|
461
461
|
*/
|
|
462
462
|
async function mergePlugins(diskPlugins, studioPlugins) {
|
|
463
463
|
const disabledNames = new Set((studioPlugins ?? []).filter((entry) => entry.disabled).map((entry) => toPluginName(entry.name)));
|
|
464
|
-
const activeDiskPlugins = disabledNames.size ? diskPlugins?.filter((plugin) => !disabledNames.has(plugin.name)) : diskPlugins;
|
|
464
|
+
const activeDiskPlugins = disabledNames.size ? diskPlugins?.filter((plugin) => !disabledNames.has(resolveMeta(plugin).name)) : diskPlugins;
|
|
465
465
|
const activeStudioPlugins = studioPlugins?.filter((entry) => !entry.disabled);
|
|
466
466
|
if (!activeDiskPlugins && !activeStudioPlugins?.length) return void 0;
|
|
467
467
|
if (!activeStudioPlugins?.length) return activeDiskPlugins;
|
|
@@ -469,7 +469,7 @@ async function mergePlugins(diskPlugins, studioPlugins) {
|
|
|
469
469
|
const studioEntryByName = new Map(activeStudioPlugins.map((entry) => [toPluginName(entry.name), entry]));
|
|
470
470
|
const diskNames = new Set(activeDiskPlugins.map((plugin) => plugin.name));
|
|
471
471
|
const merged = await Promise.all(activeDiskPlugins.map(async (diskPlugin) => {
|
|
472
|
-
const studioEntry = studioEntryByName.get(diskPlugin.name);
|
|
472
|
+
const studioEntry = studioEntryByName.get(resolveMeta(diskPlugin).name);
|
|
473
473
|
if (!studioEntry) return diskPlugin;
|
|
474
474
|
const diskOptions = diskPlugin.options ?? {};
|
|
475
475
|
const options = mergeOptions(diskOptions, studioEntry.options ?? {});
|
|
@@ -1560,7 +1560,7 @@ var Agent = class extends RpcTarget {
|
|
|
1560
1560
|
file,
|
|
1561
1561
|
plugins: config.plugins.map((plugin) => ({
|
|
1562
1562
|
name: toStudioName({
|
|
1563
|
-
name: plugin.name,
|
|
1563
|
+
name: resolveMeta(plugin).name,
|
|
1564
1564
|
root
|
|
1565
1565
|
}),
|
|
1566
1566
|
options: toJSONOptions(plugin.options)
|
|
@@ -2199,7 +2199,7 @@ async function createSnapshot({ studioUrl = defaultStudioUrl, apiKey, config, ho
|
|
|
2199
2199
|
if (content === null) throw new Error(`The generation listed ${path} but did not keep its content`);
|
|
2200
2200
|
return [path, content];
|
|
2201
2201
|
})));
|
|
2202
|
-
const { peerDependencies, missingDependencies } = await resolvePeerDependencies(config.plugins.map((
|
|
2202
|
+
const { peerDependencies, missingDependencies } = await resolvePeerDependencies(config.plugins.map((plugin) => resolveMeta(plugin).name));
|
|
2203
2203
|
const missing = missingDependencies.filter((dependency) => !BUNDLED_DEPENDENCIES.includes(dependency));
|
|
2204
2204
|
if (missing.length) throw new Error(`Missing dependencies: ${missing.join(", ")}`);
|
|
2205
2205
|
const bytes = await createSnapshotPackage({
|