@kubb/agent 5.0.0-beta.14 → 5.0.0-beta.15
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/.output/nitro.json
CHANGED
|
@@ -5132,14 +5132,23 @@ function resolveRefName(node) {
|
|
|
5132
5132
|
if (node.ref) return (_d = (_c = (_a = extractRefName(node.ref)) != null ? _a : node.name) != null ? _c : (_b = node.schema) == null ? void 0 : _b.name) != null ? _d : void 0;
|
|
5133
5133
|
return (_g = (_f = node.name) != null ? _f : (_e = node.schema) == null ? void 0 : _e.name) != null ? _g : void 0;
|
|
5134
5134
|
}
|
|
5135
|
-
|
|
5136
|
-
|
|
5135
|
+
const schemaRefCache = /* @__PURE__ */ new WeakMap();
|
|
5136
|
+
function collectSchemaRefs(node) {
|
|
5137
|
+
const cached = schemaRefCache.get(node);
|
|
5138
|
+
if (cached) return cached;
|
|
5139
|
+
const refs = /* @__PURE__ */ new Set();
|
|
5137
5140
|
collect(node, { schema(child) {
|
|
5138
5141
|
if (child.type === "ref") {
|
|
5139
5142
|
const name = resolveRefName(child);
|
|
5140
|
-
if (name)
|
|
5143
|
+
if (name) refs.add(name);
|
|
5141
5144
|
}
|
|
5142
5145
|
} });
|
|
5146
|
+
schemaRefCache.set(node, refs);
|
|
5147
|
+
return refs;
|
|
5148
|
+
}
|
|
5149
|
+
function collectReferencedSchemaNames(node, out = /* @__PURE__ */ new Set()) {
|
|
5150
|
+
if (!node) return out;
|
|
5151
|
+
for (const name of collectSchemaRefs(node)) out.add(name);
|
|
5143
5152
|
return out;
|
|
5144
5153
|
}
|
|
5145
5154
|
function collectUsedSchemaNames(operations, schemas) {
|
|
@@ -6261,7 +6270,7 @@ eachParam_fn = function(fn) {
|
|
|
6261
6270
|
fn(raw, __privateMethod(this, _URLPath_instances, transformParam_fn).call(this, raw));
|
|
6262
6271
|
}
|
|
6263
6272
|
}, _b);
|
|
6264
|
-
var version$1 = "5.0.0-beta.
|
|
6273
|
+
var version$1 = "5.0.0-beta.15";
|
|
6265
6274
|
function createStorage(build2) {
|
|
6266
6275
|
return (options) => build2(options != null ? options : {});
|
|
6267
6276
|
}
|
|
@@ -6453,9 +6462,8 @@ const fsStorage = createStorage(() => ({
|
|
|
6453
6462
|
await rm(resolve(key), { force: true });
|
|
6454
6463
|
},
|
|
6455
6464
|
async getKeys(base) {
|
|
6456
|
-
const keys = [];
|
|
6457
6465
|
const resolvedBase = resolve(base != null ? base : process.cwd());
|
|
6458
|
-
async function walk2(dir, prefix) {
|
|
6466
|
+
async function* walk2(dir, prefix) {
|
|
6459
6467
|
let entries;
|
|
6460
6468
|
try {
|
|
6461
6469
|
entries = await readdir$1(dir, { withFileTypes: true });
|
|
@@ -6464,11 +6472,12 @@ const fsStorage = createStorage(() => ({
|
|
|
6464
6472
|
}
|
|
6465
6473
|
for (const entry of entries) {
|
|
6466
6474
|
const rel = prefix ? `${prefix}/${entry.name}` : entry.name;
|
|
6467
|
-
if (entry.isDirectory())
|
|
6468
|
-
else
|
|
6475
|
+
if (entry.isDirectory()) yield* walk2(join(dir, entry.name), rel);
|
|
6476
|
+
else yield rel;
|
|
6469
6477
|
}
|
|
6470
6478
|
}
|
|
6471
|
-
|
|
6479
|
+
const keys = [];
|
|
6480
|
+
for await (const key of walk2(resolvedBase, "")) keys.push(key);
|
|
6472
6481
|
return keys;
|
|
6473
6482
|
},
|
|
6474
6483
|
async clear(base) {
|
|
@@ -6652,10 +6661,7 @@ async function runPluginAstHooks(plugin, context) {
|
|
|
6652
6661
|
...generatorContext,
|
|
6653
6662
|
options
|
|
6654
6663
|
};
|
|
6655
|
-
|
|
6656
|
-
if (!gen.schema) continue;
|
|
6657
|
-
await applyHookResult(await gen.schema(transformedNode, ctx), driver, resolveRenderer(gen));
|
|
6658
|
-
}
|
|
6664
|
+
await Promise.all(generators.filter((gen) => gen.schema).map((gen) => Promise.resolve(gen.schema(transformedNode, ctx)).then((result) => applyHookResult(result, driver, resolveRenderer(gen)))));
|
|
6659
6665
|
await driver.hooks.emit("kubb:generate:schema", transformedNode, ctx);
|
|
6660
6666
|
},
|
|
6661
6667
|
async operation(node) {
|
|
@@ -6672,10 +6678,7 @@ async function runPluginAstHooks(plugin, context) {
|
|
|
6672
6678
|
...generatorContext,
|
|
6673
6679
|
options
|
|
6674
6680
|
};
|
|
6675
|
-
|
|
6676
|
-
if (!gen.operation) continue;
|
|
6677
|
-
await applyHookResult(await gen.operation(transformedNode, ctx), driver, resolveRenderer(gen));
|
|
6678
|
-
}
|
|
6681
|
+
await Promise.all(generators.filter((gen) => gen.operation).map((gen) => Promise.resolve(gen.operation(transformedNode, ctx)).then((result) => applyHookResult(result, driver, resolveRenderer(gen)))));
|
|
6679
6682
|
await driver.hooks.emit("kubb:generate:operation", transformedNode, ctx);
|
|
6680
6683
|
}
|
|
6681
6684
|
}
|
|
@@ -6772,7 +6775,6 @@ async function safeBuild(setupResult) {
|
|
|
6772
6775
|
},
|
|
6773
6776
|
upsertFile: (...files2) => driver.fileManager.upsert(...files2)
|
|
6774
6777
|
});
|
|
6775
|
-
await flushPendingFiles();
|
|
6776
6778
|
await hooks.emit("kubb:debug", {
|
|
6777
6779
|
date: /* @__PURE__ */ new Date(),
|
|
6778
6780
|
logs: [`\u2713 Plugin started successfully (${formatMs(duration)})`]
|
|
@@ -6792,7 +6794,6 @@ async function safeBuild(setupResult) {
|
|
|
6792
6794
|
},
|
|
6793
6795
|
upsertFile: (...files2) => driver.fileManager.upsert(...files2)
|
|
6794
6796
|
});
|
|
6795
|
-
await flushPendingFiles();
|
|
6796
6797
|
await hooks.emit("kubb:debug", {
|
|
6797
6798
|
date: errorTimestamp,
|
|
6798
6799
|
logs: [
|
|
@@ -6952,7 +6953,7 @@ const memoryStorage = createStorage(() => {
|
|
|
6952
6953
|
};
|
|
6953
6954
|
});
|
|
6954
6955
|
|
|
6955
|
-
var version = "5.0.0-beta.
|
|
6956
|
+
var version = "5.0.0-beta.15";
|
|
6956
6957
|
|
|
6957
6958
|
function isCommandMessage(msg) {
|
|
6958
6959
|
return msg.type === "command";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubb/agent",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.15",
|
|
4
4
|
"description": "HTTP agent server for Kubb. Exposes code generation via REST API and WebSocket with real-time Kubb Studio integration, machine binding, and Docker support.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent",
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"tinyexec": "^1.1.2",
|
|
44
44
|
"unstorage": "^1.17.5",
|
|
45
45
|
"ws": "^8.20.1",
|
|
46
|
-
"@kubb/ast": "5.0.0-beta.
|
|
47
|
-
"@kubb/core": "5.0.0-beta.
|
|
46
|
+
"@kubb/ast": "5.0.0-beta.15",
|
|
47
|
+
"@kubb/core": "5.0.0-beta.15"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@types/ws": "^8.18.1",
|
|
@@ -52,9 +52,9 @@
|
|
|
52
52
|
"nitropack": "^2.13.4",
|
|
53
53
|
"vite": "^8.0.12",
|
|
54
54
|
"@internals/utils": "0.0.0",
|
|
55
|
-
"@kubb/adapter-oas": "5.0.0-beta.
|
|
56
|
-
"@kubb/parser-ts": "5.0.0-beta.
|
|
57
|
-
"@kubb/renderer-jsx": "5.0.0-beta.
|
|
55
|
+
"@kubb/adapter-oas": "5.0.0-beta.15",
|
|
56
|
+
"@kubb/parser-ts": "5.0.0-beta.15",
|
|
57
|
+
"@kubb/renderer-jsx": "5.0.0-beta.15"
|
|
58
58
|
},
|
|
59
59
|
"engines": {
|
|
60
60
|
"node": ">=22"
|