@kubb/agent 5.0.0-beta.14 → 5.0.0-beta.16
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
|
@@ -4708,12 +4708,6 @@ async function disconnect({ sessionId, token, studioUrl }) {
|
|
|
4708
4708
|
}
|
|
4709
4709
|
}
|
|
4710
4710
|
|
|
4711
|
-
var __defProp$2 = Object.defineProperty;
|
|
4712
|
-
var __name = (target, value) => __defProp$2(target, "name", {
|
|
4713
|
-
value,
|
|
4714
|
-
configurable: true
|
|
4715
|
-
});
|
|
4716
|
-
|
|
4717
4711
|
const visitorDepths = {
|
|
4718
4712
|
deep: "deep"
|
|
4719
4713
|
};
|
|
@@ -5132,14 +5126,23 @@ function resolveRefName(node) {
|
|
|
5132
5126
|
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
5127
|
return (_g = (_f = node.name) != null ? _f : (_e = node.schema) == null ? void 0 : _e.name) != null ? _g : void 0;
|
|
5134
5128
|
}
|
|
5135
|
-
|
|
5136
|
-
|
|
5129
|
+
const schemaRefCache = /* @__PURE__ */ new WeakMap();
|
|
5130
|
+
function collectSchemaRefs(node) {
|
|
5131
|
+
const cached = schemaRefCache.get(node);
|
|
5132
|
+
if (cached) return cached;
|
|
5133
|
+
const refs = /* @__PURE__ */ new Set();
|
|
5137
5134
|
collect(node, { schema(child) {
|
|
5138
5135
|
if (child.type === "ref") {
|
|
5139
5136
|
const name = resolveRefName(child);
|
|
5140
|
-
if (name)
|
|
5137
|
+
if (name) refs.add(name);
|
|
5141
5138
|
}
|
|
5142
5139
|
} });
|
|
5140
|
+
schemaRefCache.set(node, refs);
|
|
5141
|
+
return refs;
|
|
5142
|
+
}
|
|
5143
|
+
function collectReferencedSchemaNames(node, out = /* @__PURE__ */ new Set()) {
|
|
5144
|
+
if (!node) return out;
|
|
5145
|
+
for (const name of collectSchemaRefs(node)) out.add(name);
|
|
5143
5146
|
return out;
|
|
5144
5147
|
}
|
|
5145
5148
|
function collectUsedSchemaNames(operations, schemas) {
|
|
@@ -5542,6 +5545,11 @@ var PluginDriver = (_b$1 = class {
|
|
|
5542
5545
|
* the build pipeline after the adapter's `parse()` resolves.
|
|
5543
5546
|
*/
|
|
5544
5547
|
__publicField$1(this, "inputNode");
|
|
5548
|
+
/**
|
|
5549
|
+
* Set when the adapter returns a streaming `InputStreamNode` (large specs).
|
|
5550
|
+
* Mutually exclusive with `inputNode` — exactly one is set after adapter setup.
|
|
5551
|
+
*/
|
|
5552
|
+
__publicField$1(this, "inputStreamNode");
|
|
5545
5553
|
__publicField$1(this, "adapter");
|
|
5546
5554
|
__privateAdd$1(this, _studioIsOpen, false);
|
|
5547
5555
|
/**
|
|
@@ -5736,6 +5744,7 @@ var PluginDriver = (_b$1 = class {
|
|
|
5736
5744
|
__privateGet$1(this, _defaultResolvers).clear();
|
|
5737
5745
|
this.fileManager.dispose();
|
|
5738
5746
|
this.inputNode = void 0;
|
|
5747
|
+
this.inputStreamNode = void 0;
|
|
5739
5748
|
}
|
|
5740
5749
|
/**
|
|
5741
5750
|
* Merges `partial` with the plugin's default resolver and stores the result.
|
|
@@ -5778,7 +5787,13 @@ var PluginDriver = (_b$1 = class {
|
|
|
5778
5787
|
driver.fileManager.upsert(...files);
|
|
5779
5788
|
},
|
|
5780
5789
|
get inputNode() {
|
|
5781
|
-
|
|
5790
|
+
var _a2, _b2;
|
|
5791
|
+
return (_b2 = driver.inputNode) != null ? _b2 : {
|
|
5792
|
+
kind: "Input",
|
|
5793
|
+
schemas: [],
|
|
5794
|
+
operations: [],
|
|
5795
|
+
meta: (_a2 = driver.inputStreamNode) == null ? void 0 : _a2.meta
|
|
5796
|
+
};
|
|
5782
5797
|
},
|
|
5783
5798
|
get adapter() {
|
|
5784
5799
|
return driver.adapter;
|
|
@@ -5875,15 +5890,7 @@ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read fr
|
|
|
5875
5890
|
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
5876
5891
|
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), member.set(obj, value), value);
|
|
5877
5892
|
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
5878
|
-
var
|
|
5879
|
-
set _(value) {
|
|
5880
|
-
__privateSet(obj, member, value);
|
|
5881
|
-
},
|
|
5882
|
-
get _() {
|
|
5883
|
-
return __privateGet(obj, member, getter);
|
|
5884
|
-
}
|
|
5885
|
-
});
|
|
5886
|
-
var _emitter, _a, _options, _URLPath_instances, transformParam_fn, eachParam_fn, _b, _c, _head, _tail, _size, _d, _limit, _e;
|
|
5893
|
+
var _emitter, _a, _options, _URLPath_instances, transformParam_fn, eachParam_fn, _b;
|
|
5887
5894
|
var BuildError = class extends Error {
|
|
5888
5895
|
constructor(message, options) {
|
|
5889
5896
|
super(message, { cause: options.cause });
|
|
@@ -6261,141 +6268,16 @@ eachParam_fn = function(fn) {
|
|
|
6261
6268
|
fn(raw, __privateMethod(this, _URLPath_instances, transformParam_fn).call(this, raw));
|
|
6262
6269
|
}
|
|
6263
6270
|
}, _b);
|
|
6264
|
-
var version$1 = "5.0.0-beta.
|
|
6271
|
+
var version$1 = "5.0.0-beta.16";
|
|
6265
6272
|
function createStorage(build2) {
|
|
6266
6273
|
return (options) => build2(options != null ? options : {});
|
|
6267
6274
|
}
|
|
6268
|
-
var Node$1 = (_c = class {
|
|
6269
|
-
constructor(value) {
|
|
6270
|
-
__publicField(this, "value");
|
|
6271
|
-
__publicField(this, "next");
|
|
6272
|
-
this.value = value;
|
|
6273
|
-
}
|
|
6274
|
-
}, __name(_c, "Node"), _c);
|
|
6275
|
-
var Queue = (_d = class {
|
|
6276
|
-
constructor() {
|
|
6277
|
-
__privateAdd(this, _head);
|
|
6278
|
-
__privateAdd(this, _tail);
|
|
6279
|
-
__privateAdd(this, _size);
|
|
6280
|
-
this.clear();
|
|
6281
|
-
}
|
|
6282
|
-
enqueue(value) {
|
|
6283
|
-
const node = new Node$1(value);
|
|
6284
|
-
if (__privateGet(this, _head)) {
|
|
6285
|
-
__privateGet(this, _tail).next = node;
|
|
6286
|
-
__privateSet(this, _tail, node);
|
|
6287
|
-
} else {
|
|
6288
|
-
__privateSet(this, _head, node);
|
|
6289
|
-
__privateSet(this, _tail, node);
|
|
6290
|
-
}
|
|
6291
|
-
__privateWrapper(this, _size)._++;
|
|
6292
|
-
}
|
|
6293
|
-
dequeue() {
|
|
6294
|
-
const current = __privateGet(this, _head);
|
|
6295
|
-
if (!current) return;
|
|
6296
|
-
__privateSet(this, _head, __privateGet(this, _head).next);
|
|
6297
|
-
__privateWrapper(this, _size)._--;
|
|
6298
|
-
if (!__privateGet(this, _head)) __privateSet(this, _tail, void 0);
|
|
6299
|
-
return current.value;
|
|
6300
|
-
}
|
|
6301
|
-
peek() {
|
|
6302
|
-
if (!__privateGet(this, _head)) return;
|
|
6303
|
-
return __privateGet(this, _head).value;
|
|
6304
|
-
}
|
|
6305
|
-
clear() {
|
|
6306
|
-
__privateSet(this, _head, void 0);
|
|
6307
|
-
__privateSet(this, _tail, void 0);
|
|
6308
|
-
__privateSet(this, _size, 0);
|
|
6309
|
-
}
|
|
6310
|
-
get size() {
|
|
6311
|
-
return __privateGet(this, _size);
|
|
6312
|
-
}
|
|
6313
|
-
*[Symbol.iterator]() {
|
|
6314
|
-
let current = __privateGet(this, _head);
|
|
6315
|
-
while (current) {
|
|
6316
|
-
yield current.value;
|
|
6317
|
-
current = current.next;
|
|
6318
|
-
}
|
|
6319
|
-
}
|
|
6320
|
-
*drain() {
|
|
6321
|
-
while (__privateGet(this, _head)) yield this.dequeue();
|
|
6322
|
-
}
|
|
6323
|
-
}, _head = new WeakMap(), _tail = new WeakMap(), _size = new WeakMap(), _d);
|
|
6324
|
-
function pLimit(concurrency) {
|
|
6325
|
-
let rejectOnClear = false;
|
|
6326
|
-
if (typeof concurrency === "object") ({ concurrency, rejectOnClear = false } = concurrency);
|
|
6327
|
-
validateConcurrency(concurrency);
|
|
6328
|
-
if (typeof rejectOnClear !== "boolean") throw new TypeError("Expected `rejectOnClear` to be a boolean");
|
|
6329
|
-
const queue = new Queue();
|
|
6330
|
-
let activeCount = 0;
|
|
6331
|
-
const resumeNext = () => {
|
|
6332
|
-
if (activeCount < concurrency && queue.size > 0) {
|
|
6333
|
-
activeCount++;
|
|
6334
|
-
queue.dequeue().run();
|
|
6335
|
-
}
|
|
6336
|
-
};
|
|
6337
|
-
const next = () => {
|
|
6338
|
-
activeCount--;
|
|
6339
|
-
resumeNext();
|
|
6340
|
-
};
|
|
6341
|
-
const run = async (function_, resolve2, arguments_) => {
|
|
6342
|
-
const result = (async () => function_(...arguments_))();
|
|
6343
|
-
resolve2(result);
|
|
6344
|
-
try {
|
|
6345
|
-
await result;
|
|
6346
|
-
} catch {
|
|
6347
|
-
}
|
|
6348
|
-
next();
|
|
6349
|
-
};
|
|
6350
|
-
const enqueue = (function_, resolve2, reject, arguments_) => {
|
|
6351
|
-
const queueItem = { reject };
|
|
6352
|
-
new Promise((internalResolve) => {
|
|
6353
|
-
queueItem.run = internalResolve;
|
|
6354
|
-
queue.enqueue(queueItem);
|
|
6355
|
-
}).then(run.bind(void 0, function_, resolve2, arguments_));
|
|
6356
|
-
if (activeCount < concurrency) resumeNext();
|
|
6357
|
-
};
|
|
6358
|
-
const generator = (function_, ...arguments_) => new Promise((resolve2, reject) => {
|
|
6359
|
-
enqueue(function_, resolve2, reject, arguments_);
|
|
6360
|
-
});
|
|
6361
|
-
Object.defineProperties(generator, {
|
|
6362
|
-
activeCount: { get: () => activeCount },
|
|
6363
|
-
pendingCount: { get: () => queue.size },
|
|
6364
|
-
clearQueue: { value() {
|
|
6365
|
-
if (!rejectOnClear) {
|
|
6366
|
-
queue.clear();
|
|
6367
|
-
return;
|
|
6368
|
-
}
|
|
6369
|
-
const abortError = AbortSignal.abort().reason;
|
|
6370
|
-
while (queue.size > 0) queue.dequeue().reject(abortError);
|
|
6371
|
-
} },
|
|
6372
|
-
concurrency: {
|
|
6373
|
-
get: () => concurrency,
|
|
6374
|
-
set(newConcurrency) {
|
|
6375
|
-
validateConcurrency(newConcurrency);
|
|
6376
|
-
concurrency = newConcurrency;
|
|
6377
|
-
queueMicrotask(() => {
|
|
6378
|
-
while (activeCount < concurrency && queue.size > 0) resumeNext();
|
|
6379
|
-
});
|
|
6380
|
-
}
|
|
6381
|
-
},
|
|
6382
|
-
map: { async value(iterable, function_) {
|
|
6383
|
-
const promises = Array.from(iterable, (value, index) => this(function_, value, index));
|
|
6384
|
-
return Promise.all(promises);
|
|
6385
|
-
} }
|
|
6386
|
-
});
|
|
6387
|
-
return generator;
|
|
6388
|
-
}
|
|
6389
|
-
function validateConcurrency(concurrency) {
|
|
6390
|
-
if (!((Number.isInteger(concurrency) || concurrency === Number.POSITIVE_INFINITY) && concurrency > 0)) throw new TypeError("Expected `concurrency` to be a number from 1 and up");
|
|
6391
|
-
}
|
|
6392
6275
|
function joinSources(file) {
|
|
6393
6276
|
return file.sources.map((item) => extractStringsFromNodes(item.nodes)).filter(Boolean).join("\n\n");
|
|
6394
6277
|
}
|
|
6395
|
-
var FileProcessor =
|
|
6278
|
+
var FileProcessor = class {
|
|
6396
6279
|
constructor() {
|
|
6397
6280
|
__publicField(this, "events", new AsyncEventEmitter());
|
|
6398
|
-
__privateAdd(this, _limit, pLimit(16));
|
|
6399
6281
|
}
|
|
6400
6282
|
async parse(file, { parsers, extension } = {}) {
|
|
6401
6283
|
const parseExtName = (extension == null ? void 0 : extension[file.extname]) || void 0;
|
|
@@ -6404,31 +6286,41 @@ var FileProcessor = (_e = class {
|
|
|
6404
6286
|
if (!parser) return joinSources(file);
|
|
6405
6287
|
return parser.parse(file, { extname: parseExtName });
|
|
6406
6288
|
}
|
|
6407
|
-
|
|
6408
|
-
|
|
6289
|
+
/**
|
|
6290
|
+
* Streams parsed files one at a time as each is processed.
|
|
6291
|
+
*
|
|
6292
|
+
* Unlike `run()`, files are yielded immediately after parsing rather than batched.
|
|
6293
|
+
* Storage writes can begin as soon as the first file is ready, keeping peak
|
|
6294
|
+
* memory proportional to one file at a time instead of the full batch.
|
|
6295
|
+
*/
|
|
6296
|
+
async *stream(files, options = {}) {
|
|
6409
6297
|
const total = files.length;
|
|
6410
6298
|
let processed = 0;
|
|
6411
|
-
const
|
|
6412
|
-
const source = await this.parse(file,
|
|
6413
|
-
|
|
6414
|
-
|
|
6415
|
-
});
|
|
6416
|
-
const currentProcessed = ++processed;
|
|
6417
|
-
const percentage = currentProcessed / total * 100;
|
|
6418
|
-
await this.events.emit("update", {
|
|
6299
|
+
for (const file of files) {
|
|
6300
|
+
const source = await this.parse(file, options);
|
|
6301
|
+
processed++;
|
|
6302
|
+
yield {
|
|
6419
6303
|
file,
|
|
6420
6304
|
source,
|
|
6421
|
-
processed
|
|
6422
|
-
|
|
6423
|
-
total
|
|
6424
|
-
}
|
|
6425
|
-
}
|
|
6426
|
-
|
|
6427
|
-
|
|
6305
|
+
processed,
|
|
6306
|
+
total,
|
|
6307
|
+
percentage: processed / total * 100
|
|
6308
|
+
};
|
|
6309
|
+
}
|
|
6310
|
+
}
|
|
6311
|
+
async run(files, options = {}) {
|
|
6312
|
+
await this.events.emit("start", files);
|
|
6313
|
+
for await (const { file, source, processed, total, percentage } of this.stream(files, options)) await this.events.emit("update", {
|
|
6314
|
+
file,
|
|
6315
|
+
source,
|
|
6316
|
+
processed,
|
|
6317
|
+
percentage,
|
|
6318
|
+
total
|
|
6319
|
+
});
|
|
6428
6320
|
await this.events.emit("end", files);
|
|
6429
6321
|
return files;
|
|
6430
6322
|
}
|
|
6431
|
-
}
|
|
6323
|
+
};
|
|
6432
6324
|
const fsStorage = createStorage(() => ({
|
|
6433
6325
|
name: "fs",
|
|
6434
6326
|
async hasItem(key) {
|
|
@@ -6453,9 +6345,8 @@ const fsStorage = createStorage(() => ({
|
|
|
6453
6345
|
await rm(resolve(key), { force: true });
|
|
6454
6346
|
},
|
|
6455
6347
|
async getKeys(base) {
|
|
6456
|
-
const keys = [];
|
|
6457
6348
|
const resolvedBase = resolve(base != null ? base : process.cwd());
|
|
6458
|
-
async function walk2(dir, prefix) {
|
|
6349
|
+
async function* walk2(dir, prefix) {
|
|
6459
6350
|
let entries;
|
|
6460
6351
|
try {
|
|
6461
6352
|
entries = await readdir$1(dir, { withFileTypes: true });
|
|
@@ -6464,11 +6355,12 @@ const fsStorage = createStorage(() => ({
|
|
|
6464
6355
|
}
|
|
6465
6356
|
for (const entry of entries) {
|
|
6466
6357
|
const rel = prefix ? `${prefix}/${entry.name}` : entry.name;
|
|
6467
|
-
if (entry.isDirectory())
|
|
6468
|
-
else
|
|
6358
|
+
if (entry.isDirectory()) yield* walk2(join(dir, entry.name), rel);
|
|
6359
|
+
else yield rel;
|
|
6469
6360
|
}
|
|
6470
6361
|
}
|
|
6471
|
-
|
|
6362
|
+
const keys = [];
|
|
6363
|
+
for await (const key of walk2(resolvedBase, "")) keys.push(key);
|
|
6472
6364
|
return keys;
|
|
6473
6365
|
},
|
|
6474
6366
|
async clear(base) {
|
|
@@ -6507,7 +6399,7 @@ function createSourcesView(storage) {
|
|
|
6507
6399
|
}))();
|
|
6508
6400
|
}
|
|
6509
6401
|
async function setup(userConfig, options = {}) {
|
|
6510
|
-
var _a2, _b2,
|
|
6402
|
+
var _a2, _b2, _c, _d, _e, _f, _g, _h, _i;
|
|
6511
6403
|
const hooks = (_a2 = options.hooks) != null ? _a2 : new AsyncEventEmitter();
|
|
6512
6404
|
const config = {
|
|
6513
6405
|
...userConfig,
|
|
@@ -6521,12 +6413,12 @@ async function setup(userConfig, options = {}) {
|
|
|
6521
6413
|
defaultBanner: DEFAULT_BANNER,
|
|
6522
6414
|
...userConfig.output
|
|
6523
6415
|
},
|
|
6524
|
-
storage: (
|
|
6416
|
+
storage: (_c = userConfig.storage) != null ? _c : fsStorage(),
|
|
6525
6417
|
devtools: userConfig.devtools ? {
|
|
6526
6418
|
studioUrl: DEFAULT_STUDIO_URL,
|
|
6527
6419
|
...typeof userConfig.devtools === "boolean" ? {} : userConfig.devtools
|
|
6528
6420
|
} : void 0,
|
|
6529
|
-
plugins: (
|
|
6421
|
+
plugins: (_d = userConfig.plugins) != null ? _d : []
|
|
6530
6422
|
};
|
|
6531
6423
|
const driver = new PluginDriver(config, { hooks });
|
|
6532
6424
|
const storage = createSourcesView(config.storage);
|
|
@@ -6537,7 +6429,7 @@ async function setup(userConfig, options = {}) {
|
|
|
6537
6429
|
"Configuration:",
|
|
6538
6430
|
` \u2022 Name: ${userConfig.name || "unnamed"}`,
|
|
6539
6431
|
` \u2022 Root: ${userConfig.root || process.cwd()}`,
|
|
6540
|
-
` \u2022 Output: ${((
|
|
6432
|
+
` \u2022 Output: ${((_e = userConfig.output) == null ? void 0 : _e.path) || "not specified"}`,
|
|
6541
6433
|
` \u2022 Plugins: ${((_f = userConfig.plugins) == null ? void 0 : _f.length) || 0}`,
|
|
6542
6434
|
"Output Settings:",
|
|
6543
6435
|
` \u2022 Storage: ${config.storage.name}`,
|
|
@@ -6584,15 +6476,40 @@ async function setup(userConfig, options = {}) {
|
|
|
6584
6476
|
logs: [`Running adapter: ${config.adapter.name}`]
|
|
6585
6477
|
});
|
|
6586
6478
|
driver.adapter = config.adapter;
|
|
6587
|
-
|
|
6588
|
-
|
|
6589
|
-
|
|
6590
|
-
|
|
6591
|
-
|
|
6592
|
-
|
|
6593
|
-
|
|
6594
|
-
|
|
6595
|
-
|
|
6479
|
+
if (config.adapter.count && config.adapter.stream) {
|
|
6480
|
+
const { schemas: schemaCount, operations: operationCount } = await config.adapter.count(source);
|
|
6481
|
+
if (schemaCount > 100) {
|
|
6482
|
+
driver.inputStreamNode = await config.adapter.stream(source);
|
|
6483
|
+
await hooks.emit("kubb:debug", {
|
|
6484
|
+
date: /* @__PURE__ */ new Date(),
|
|
6485
|
+
logs: [
|
|
6486
|
+
`\u2713 Adapter '${config.adapter.name}' streaming InputStreamNode`,
|
|
6487
|
+
` \u2022 Schemas: ${schemaCount} (threshold: 100)`,
|
|
6488
|
+
` \u2022 Operations: ${operationCount}`
|
|
6489
|
+
]
|
|
6490
|
+
});
|
|
6491
|
+
} else {
|
|
6492
|
+
driver.inputNode = await config.adapter.parse(source);
|
|
6493
|
+
await hooks.emit("kubb:debug", {
|
|
6494
|
+
date: /* @__PURE__ */ new Date(),
|
|
6495
|
+
logs: [
|
|
6496
|
+
`\u2713 Adapter '${config.adapter.name}' resolved InputNode`,
|
|
6497
|
+
` \u2022 Schemas: ${driver.inputNode.schemas.length}`,
|
|
6498
|
+
` \u2022 Operations: ${driver.inputNode.operations.length}`
|
|
6499
|
+
]
|
|
6500
|
+
});
|
|
6501
|
+
}
|
|
6502
|
+
} else {
|
|
6503
|
+
driver.inputNode = await config.adapter.parse(source);
|
|
6504
|
+
await hooks.emit("kubb:debug", {
|
|
6505
|
+
date: /* @__PURE__ */ new Date(),
|
|
6506
|
+
logs: [
|
|
6507
|
+
`\u2713 Adapter '${config.adapter.name}' resolved InputNode`,
|
|
6508
|
+
` \u2022 Schemas: ${driver.inputNode.schemas.length}`,
|
|
6509
|
+
` \u2022 Operations: ${driver.inputNode.operations.length}`
|
|
6510
|
+
]
|
|
6511
|
+
});
|
|
6512
|
+
}
|
|
6596
6513
|
}
|
|
6597
6514
|
return {
|
|
6598
6515
|
config,
|
|
@@ -6605,8 +6522,130 @@ async function setup(userConfig, options = {}) {
|
|
|
6605
6522
|
}
|
|
6606
6523
|
};
|
|
6607
6524
|
}
|
|
6525
|
+
async function runPluginStreamHooks(inputStreamNode, entries, driver, hooks, config, pluginTimings, failedPlugins, flushPendingFiles) {
|
|
6526
|
+
function resolveRendererFor(gen, state) {
|
|
6527
|
+
var _a2, _b2;
|
|
6528
|
+
return gen.renderer === null ? void 0 : (_b2 = (_a2 = gen.renderer) != null ? _a2 : state.plugin.renderer) != null ? _b2 : state.generatorContext.config.renderer;
|
|
6529
|
+
}
|
|
6530
|
+
const states = entries.map(({ plugin, context, hrStart }) => {
|
|
6531
|
+
var _a2;
|
|
6532
|
+
return {
|
|
6533
|
+
plugin,
|
|
6534
|
+
generatorContext: {
|
|
6535
|
+
...context,
|
|
6536
|
+
resolver: driver.getResolver(plugin.name)
|
|
6537
|
+
},
|
|
6538
|
+
generators: (_a2 = plugin.generators) != null ? _a2 : [],
|
|
6539
|
+
hrStart,
|
|
6540
|
+
failed: false,
|
|
6541
|
+
error: void 0
|
|
6542
|
+
};
|
|
6543
|
+
});
|
|
6544
|
+
let schemasProcessed = 0;
|
|
6545
|
+
for await (const node of inputStreamNode.schemas) {
|
|
6546
|
+
for (const state of states) {
|
|
6547
|
+
if (state.failed) continue;
|
|
6548
|
+
try {
|
|
6549
|
+
const { plugin, generatorContext, generators } = state;
|
|
6550
|
+
const { exclude, include, override } = plugin.options;
|
|
6551
|
+
const transformedNode = plugin.transformer ? transform(node, plugin.transformer) : node;
|
|
6552
|
+
const options = generatorContext.resolver.resolveOptions(transformedNode, {
|
|
6553
|
+
options: plugin.options,
|
|
6554
|
+
exclude,
|
|
6555
|
+
include,
|
|
6556
|
+
override
|
|
6557
|
+
});
|
|
6558
|
+
if (options === null) continue;
|
|
6559
|
+
const ctx = {
|
|
6560
|
+
...generatorContext,
|
|
6561
|
+
options
|
|
6562
|
+
};
|
|
6563
|
+
for (const gen of generators) {
|
|
6564
|
+
if (!gen.schema) continue;
|
|
6565
|
+
await applyHookResult(await gen.schema(transformedNode, ctx), driver, resolveRendererFor(gen, state));
|
|
6566
|
+
}
|
|
6567
|
+
await driver.hooks.emit("kubb:generate:schema", transformedNode, ctx);
|
|
6568
|
+
} catch (caughtError) {
|
|
6569
|
+
state.failed = true;
|
|
6570
|
+
state.error = caughtError;
|
|
6571
|
+
}
|
|
6572
|
+
}
|
|
6573
|
+
schemasProcessed++;
|
|
6574
|
+
if (schemasProcessed % 50 === 0) await flushPendingFiles();
|
|
6575
|
+
}
|
|
6576
|
+
const collectedOperations = [];
|
|
6577
|
+
for await (const node of inputStreamNode.operations) {
|
|
6578
|
+
collectedOperations.push(node);
|
|
6579
|
+
for (const state of states) {
|
|
6580
|
+
if (state.failed) continue;
|
|
6581
|
+
try {
|
|
6582
|
+
const { plugin, generatorContext, generators } = state;
|
|
6583
|
+
const { exclude, include, override } = plugin.options;
|
|
6584
|
+
const transformedNode = plugin.transformer ? transform(node, plugin.transformer) : node;
|
|
6585
|
+
const options = generatorContext.resolver.resolveOptions(transformedNode, {
|
|
6586
|
+
options: plugin.options,
|
|
6587
|
+
exclude,
|
|
6588
|
+
include,
|
|
6589
|
+
override
|
|
6590
|
+
});
|
|
6591
|
+
if (options === null) continue;
|
|
6592
|
+
const ctx = {
|
|
6593
|
+
...generatorContext,
|
|
6594
|
+
options
|
|
6595
|
+
};
|
|
6596
|
+
for (const gen of generators) {
|
|
6597
|
+
if (!gen.operation) continue;
|
|
6598
|
+
await applyHookResult(await gen.operation(transformedNode, ctx), driver, resolveRendererFor(gen, state));
|
|
6599
|
+
}
|
|
6600
|
+
await driver.hooks.emit("kubb:generate:operation", transformedNode, ctx);
|
|
6601
|
+
} catch (caughtError) {
|
|
6602
|
+
state.failed = true;
|
|
6603
|
+
state.error = caughtError;
|
|
6604
|
+
}
|
|
6605
|
+
}
|
|
6606
|
+
}
|
|
6607
|
+
for (const state of states) {
|
|
6608
|
+
if (!state.failed) try {
|
|
6609
|
+
const { plugin, generatorContext, generators } = state;
|
|
6610
|
+
const ctx = {
|
|
6611
|
+
...generatorContext,
|
|
6612
|
+
options: plugin.options
|
|
6613
|
+
};
|
|
6614
|
+
for (const gen of generators) {
|
|
6615
|
+
if (!gen.operations) continue;
|
|
6616
|
+
await applyHookResult(await gen.operations(collectedOperations, ctx), driver, resolveRendererFor(gen, state));
|
|
6617
|
+
}
|
|
6618
|
+
await driver.hooks.emit("kubb:generate:operations", collectedOperations, ctx);
|
|
6619
|
+
} catch (caughtError) {
|
|
6620
|
+
state.failed = true;
|
|
6621
|
+
state.error = caughtError;
|
|
6622
|
+
}
|
|
6623
|
+
const duration = getElapsedMs(state.hrStart);
|
|
6624
|
+
pluginTimings.set(state.plugin.name, duration);
|
|
6625
|
+
await hooks.emit("kubb:plugin:end", {
|
|
6626
|
+
plugin: state.plugin,
|
|
6627
|
+
duration,
|
|
6628
|
+
success: !state.failed,
|
|
6629
|
+
...state.failed && state.error ? { error: state.error } : {},
|
|
6630
|
+
config,
|
|
6631
|
+
get files() {
|
|
6632
|
+
return driver.fileManager.files;
|
|
6633
|
+
},
|
|
6634
|
+
upsertFile: (...files) => driver.fileManager.upsert(...files)
|
|
6635
|
+
});
|
|
6636
|
+
if (state.failed && state.error) failedPlugins.add({
|
|
6637
|
+
plugin: state.plugin,
|
|
6638
|
+
error: state.error
|
|
6639
|
+
});
|
|
6640
|
+
await hooks.emit("kubb:debug", {
|
|
6641
|
+
date: /* @__PURE__ */ new Date(),
|
|
6642
|
+
logs: [state.failed ? "\u2717 Plugin start failed" : `\u2713 Plugin started successfully (${formatMs(duration)})`]
|
|
6643
|
+
});
|
|
6644
|
+
}
|
|
6645
|
+
await flushPendingFiles();
|
|
6646
|
+
}
|
|
6608
6647
|
async function runPluginAstHooks(plugin, context) {
|
|
6609
|
-
var _a2, _b2,
|
|
6648
|
+
var _a2, _b2, _c;
|
|
6610
6649
|
const { adapter, inputNode, resolver, driver } = context;
|
|
6611
6650
|
const { exclude, include, override } = plugin.options;
|
|
6612
6651
|
if (!adapter || !inputNode) throw new Error(`[${plugin.name}] No adapter found. Add an OAS adapter (e.g. adapterOas()) before this plugin in your Kubb config.`);
|
|
@@ -6628,7 +6667,7 @@ async function runPluginAstHooks(plugin, context) {
|
|
|
6628
6667
|
"contentType"
|
|
6629
6668
|
]);
|
|
6630
6669
|
const hasOperationBasedIncludes = (_b2 = include == null ? void 0 : include.some(({ type }) => operationFilterTypes.has(type))) != null ? _b2 : false;
|
|
6631
|
-
const hasSchemaNameIncludes = (
|
|
6670
|
+
const hasSchemaNameIncludes = (_c = include == null ? void 0 : include.some(({ type }) => type === "schemaName")) != null ? _c : false;
|
|
6632
6671
|
let allowedSchemaNames;
|
|
6633
6672
|
if (hasOperationBasedIncludes && !hasSchemaNameIncludes) allowedSchemaNames = collectUsedSchemaNames(inputNode.operations.filter((op) => resolver.resolveOptions(op, {
|
|
6634
6673
|
options: plugin.options,
|
|
@@ -6652,10 +6691,7 @@ async function runPluginAstHooks(plugin, context) {
|
|
|
6652
6691
|
...generatorContext,
|
|
6653
6692
|
options
|
|
6654
6693
|
};
|
|
6655
|
-
|
|
6656
|
-
if (!gen.schema) continue;
|
|
6657
|
-
await applyHookResult(await gen.schema(transformedNode, ctx), driver, resolveRenderer(gen));
|
|
6658
|
-
}
|
|
6694
|
+
await Promise.all(generators.filter((gen) => gen.schema).map((gen) => Promise.resolve(gen.schema(transformedNode, ctx)).then((result) => applyHookResult(result, driver, resolveRenderer(gen)))));
|
|
6659
6695
|
await driver.hooks.emit("kubb:generate:schema", transformedNode, ctx);
|
|
6660
6696
|
},
|
|
6661
6697
|
async operation(node) {
|
|
@@ -6672,10 +6708,7 @@ async function runPluginAstHooks(plugin, context) {
|
|
|
6672
6708
|
...generatorContext,
|
|
6673
6709
|
options
|
|
6674
6710
|
};
|
|
6675
|
-
|
|
6676
|
-
if (!gen.operation) continue;
|
|
6677
|
-
await applyHookResult(await gen.operation(transformedNode, ctx), driver, resolveRenderer(gen));
|
|
6678
|
-
}
|
|
6711
|
+
await Promise.all(generators.filter((gen) => gen.operation).map((gen) => Promise.resolve(gen.operation(transformedNode, ctx)).then((result) => applyHookResult(result, driver, resolveRenderer(gen)))));
|
|
6679
6712
|
await driver.hooks.emit("kubb:generate:operation", transformedNode, ctx);
|
|
6680
6713
|
}
|
|
6681
6714
|
}
|
|
@@ -6693,7 +6726,7 @@ async function runPluginAstHooks(plugin, context) {
|
|
|
6693
6726
|
}
|
|
6694
6727
|
}
|
|
6695
6728
|
async function safeBuild(setupResult) {
|
|
6696
|
-
var _a2;
|
|
6729
|
+
var _a2, _b2, _c, _d;
|
|
6697
6730
|
const { driver, hooks, storage } = setupResult;
|
|
6698
6731
|
const failedPlugins = /* @__PURE__ */ new Set();
|
|
6699
6732
|
const pluginTimings = /* @__PURE__ */ new Map();
|
|
@@ -6702,54 +6735,90 @@ async function safeBuild(setupResult) {
|
|
|
6702
6735
|
const parsersMap = /* @__PURE__ */ new Map();
|
|
6703
6736
|
for (const parser of config.parsers) if (parser.extNames) for (const extname of parser.extNames) parsersMap.set(extname, parser);
|
|
6704
6737
|
const fileProcessor = new FileProcessor();
|
|
6705
|
-
|
|
6706
|
-
|
|
6707
|
-
});
|
|
6708
|
-
fileProcessor.events.on("update", async ({ file, source, processed, total, percentage }) => {
|
|
6709
|
-
await hooks.emit("kubb:file:processing:update", {
|
|
6710
|
-
file,
|
|
6711
|
-
source,
|
|
6712
|
-
processed,
|
|
6713
|
-
total,
|
|
6714
|
-
percentage,
|
|
6715
|
-
config
|
|
6716
|
-
});
|
|
6717
|
-
if (source) await storage.setItem(file.path, source);
|
|
6718
|
-
});
|
|
6719
|
-
fileProcessor.events.on("end", async (processed) => {
|
|
6720
|
-
await hooks.emit("kubb:files:processing:end", { files: processed });
|
|
6721
|
-
await hooks.emit("kubb:debug", {
|
|
6722
|
-
date: /* @__PURE__ */ new Date(),
|
|
6723
|
-
logs: [`\u2713 File write process completed for ${processed.length} files`]
|
|
6724
|
-
});
|
|
6725
|
-
});
|
|
6726
|
-
async function flushPendingFiles() {
|
|
6727
|
-
const files = driver.fileManager.files.filter((f) => !writtenPaths.has(f.path));
|
|
6738
|
+
async function flushPendingFiles(snapshot) {
|
|
6739
|
+
const files = driver.fileManager.files.filter((f) => !writtenPaths.has(f.path) && (!snapshot || !snapshot.has(f.path)));
|
|
6728
6740
|
if (files.length === 0) return;
|
|
6729
6741
|
await hooks.emit("kubb:debug", {
|
|
6730
6742
|
date: /* @__PURE__ */ new Date(),
|
|
6731
6743
|
logs: [`Writing ${files.length} files...`]
|
|
6732
6744
|
});
|
|
6733
|
-
await
|
|
6745
|
+
await hooks.emit("kubb:files:processing:start", { files });
|
|
6746
|
+
const stream = fileProcessor.stream(files, {
|
|
6734
6747
|
parsers: parsersMap,
|
|
6735
|
-
mode: "parallel",
|
|
6736
6748
|
extension: config.output.extension
|
|
6737
6749
|
});
|
|
6738
|
-
for (const file of
|
|
6750
|
+
for await (const { file, source, processed, total, percentage } of stream) {
|
|
6751
|
+
await hooks.emit("kubb:file:processing:update", {
|
|
6752
|
+
file,
|
|
6753
|
+
source,
|
|
6754
|
+
processed,
|
|
6755
|
+
total,
|
|
6756
|
+
percentage,
|
|
6757
|
+
config
|
|
6758
|
+
});
|
|
6759
|
+
if (source) await storage.setItem(file.path, source);
|
|
6760
|
+
writtenPaths.add(file.path);
|
|
6761
|
+
}
|
|
6762
|
+
await hooks.emit("kubb:files:processing:end", { files });
|
|
6763
|
+
await hooks.emit("kubb:debug", {
|
|
6764
|
+
date: /* @__PURE__ */ new Date(),
|
|
6765
|
+
logs: [`\u2713 File write process completed for ${files.length} files`]
|
|
6766
|
+
});
|
|
6739
6767
|
}
|
|
6740
6768
|
try {
|
|
6741
6769
|
await driver.emitSetupHooks();
|
|
6742
|
-
if (driver.adapter && driver.inputNode) await hooks.emit("kubb:build:start", {
|
|
6770
|
+
if (driver.adapter && (driver.inputNode || driver.inputStreamNode)) await hooks.emit("kubb:build:start", {
|
|
6743
6771
|
config,
|
|
6744
6772
|
adapter: driver.adapter,
|
|
6745
|
-
inputNode: driver.inputNode
|
|
6773
|
+
inputNode: (_b2 = driver.inputNode) != null ? _b2 : {
|
|
6774
|
+
kind: "Input",
|
|
6775
|
+
schemas: [],
|
|
6776
|
+
operations: [],
|
|
6777
|
+
meta: (_a2 = driver.inputStreamNode) == null ? void 0 : _a2.meta
|
|
6778
|
+
},
|
|
6746
6779
|
getPlugin: driver.getPlugin.bind(driver),
|
|
6747
6780
|
get files() {
|
|
6748
6781
|
return driver.fileManager.files;
|
|
6749
6782
|
},
|
|
6750
6783
|
upsertFile: (...files2) => driver.fileManager.upsert(...files2)
|
|
6751
6784
|
});
|
|
6752
|
-
|
|
6785
|
+
const inputStreamNode = driver.inputStreamNode;
|
|
6786
|
+
if (inputStreamNode) {
|
|
6787
|
+
const streamPluginEntries = [];
|
|
6788
|
+
for (const plugin of driver.plugins.values()) {
|
|
6789
|
+
const context = driver.getContext(plugin);
|
|
6790
|
+
const hrStart = process.hrtime();
|
|
6791
|
+
await hooks.emit("kubb:plugin:start", { plugin });
|
|
6792
|
+
await hooks.emit("kubb:debug", {
|
|
6793
|
+
date: /* @__PURE__ */ new Date(),
|
|
6794
|
+
logs: ["Starting plugin...", ` \u2022 Plugin Name: ${plugin.name}`]
|
|
6795
|
+
});
|
|
6796
|
+
if (((_c = plugin.generators) == null ? void 0 : _c.length) || driver.hasRegisteredGenerators(plugin.name)) streamPluginEntries.push({
|
|
6797
|
+
plugin,
|
|
6798
|
+
context,
|
|
6799
|
+
hrStart
|
|
6800
|
+
});
|
|
6801
|
+
else {
|
|
6802
|
+
const duration = getElapsedMs(hrStart);
|
|
6803
|
+
pluginTimings.set(plugin.name, duration);
|
|
6804
|
+
await hooks.emit("kubb:plugin:end", {
|
|
6805
|
+
plugin,
|
|
6806
|
+
duration,
|
|
6807
|
+
success: true,
|
|
6808
|
+
config,
|
|
6809
|
+
get files() {
|
|
6810
|
+
return driver.fileManager.files;
|
|
6811
|
+
},
|
|
6812
|
+
upsertFile: (...files2) => driver.fileManager.upsert(...files2)
|
|
6813
|
+
});
|
|
6814
|
+
await hooks.emit("kubb:debug", {
|
|
6815
|
+
date: /* @__PURE__ */ new Date(),
|
|
6816
|
+
logs: [`\u2713 Plugin started successfully (${formatMs(duration)})`]
|
|
6817
|
+
});
|
|
6818
|
+
}
|
|
6819
|
+
}
|
|
6820
|
+
if (streamPluginEntries.length > 0) await runPluginStreamHooks(inputStreamNode, streamPluginEntries, driver, hooks, config, pluginTimings, failedPlugins, flushPendingFiles);
|
|
6821
|
+
} else for (const plugin of driver.plugins.values()) {
|
|
6753
6822
|
const context = driver.getContext(plugin);
|
|
6754
6823
|
const hrStart = process.hrtime();
|
|
6755
6824
|
try {
|
|
@@ -6759,7 +6828,7 @@ async function safeBuild(setupResult) {
|
|
|
6759
6828
|
date: timestamp,
|
|
6760
6829
|
logs: ["Starting plugin...", ` \u2022 Plugin Name: ${plugin.name}`]
|
|
6761
6830
|
});
|
|
6762
|
-
if (((
|
|
6831
|
+
if (((_d = plugin.generators) == null ? void 0 : _d.length) || driver.hasRegisteredGenerators(plugin.name)) await runPluginAstHooks(plugin, context);
|
|
6763
6832
|
const duration = getElapsedMs(hrStart);
|
|
6764
6833
|
pluginTimings.set(plugin.name, duration);
|
|
6765
6834
|
await hooks.emit("kubb:plugin:end", {
|
|
@@ -6772,7 +6841,6 @@ async function safeBuild(setupResult) {
|
|
|
6772
6841
|
},
|
|
6773
6842
|
upsertFile: (...files2) => driver.fileManager.upsert(...files2)
|
|
6774
6843
|
});
|
|
6775
|
-
await flushPendingFiles();
|
|
6776
6844
|
await hooks.emit("kubb:debug", {
|
|
6777
6845
|
date: /* @__PURE__ */ new Date(),
|
|
6778
6846
|
logs: [`\u2713 Plugin started successfully (${formatMs(duration)})`]
|
|
@@ -6792,7 +6860,6 @@ async function safeBuild(setupResult) {
|
|
|
6792
6860
|
},
|
|
6793
6861
|
upsertFile: (...files2) => driver.fileManager.upsert(...files2)
|
|
6794
6862
|
});
|
|
6795
|
-
await flushPendingFiles();
|
|
6796
6863
|
await hooks.emit("kubb:debug", {
|
|
6797
6864
|
date: errorTimestamp,
|
|
6798
6865
|
logs: [
|
|
@@ -6808,6 +6875,7 @@ async function safeBuild(setupResult) {
|
|
|
6808
6875
|
error
|
|
6809
6876
|
});
|
|
6810
6877
|
}
|
|
6878
|
+
await flushPendingFiles();
|
|
6811
6879
|
}
|
|
6812
6880
|
await hooks.emit("kubb:plugins:end", {
|
|
6813
6881
|
config,
|
|
@@ -6952,7 +7020,7 @@ const memoryStorage = createStorage(() => {
|
|
|
6952
7020
|
};
|
|
6953
7021
|
});
|
|
6954
7022
|
|
|
6955
|
-
var version = "5.0.0-beta.
|
|
7023
|
+
var version = "5.0.0-beta.16";
|
|
6956
7024
|
|
|
6957
7025
|
function isCommandMessage(msg) {
|
|
6958
7026
|
return msg.type === "command";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nitro.mjs","sources":["../../../../../../node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.mjs","../../../../../../node_modules/.pnpm/ufo@1.6.4/node_modules/ufo/dist/index.mjs","../../../../../../node_modules/.pnpm/radix3@1.1.2/node_modules/radix3/dist/index.mjs","../../../../../../node_modules/.pnpm/defu@6.1.7/node_modules/defu/dist/defu.mjs","../../../../../../node_modules/.pnpm/node-mock-http@1.0.4/node_modules/node-mock-http/dist/index.mjs","../../../../../../node_modules/.pnpm/h3@1.15.11/node_modules/h3/dist/index.mjs","../../../../../../node_modules/.pnpm/hookable@5.5.3/node_modules/hookable/dist/index.mjs","../../../../../../node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/native.mjs","../../../../../../node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/shared/ofetch.CWycOUEr.mjs","../../../../../../node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/node.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.5_db0@0.3.4_ioredis@5.10.1/node_modules/unstorage/dist/shared/unstorage.zVDD2mZo.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.5_db0@0.3.4_ioredis@5.10.1/node_modules/unstorage/dist/index.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.5_db0@0.3.4_ioredis@5.10.1/node_modules/unstorage/drivers/utils/index.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.5_db0@0.3.4_ioredis@5.10.1/node_modules/unstorage/drivers/utils/node-fs.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.5_db0@0.3.4_ioredis@5.10.1/node_modules/unstorage/drivers/fs.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.5_db0@0.3.4_ioredis@5.10.1/node_modules/unstorage/drivers/fs-lite.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.4_rolldown@1.0.
|
|
1
|
+
{"version":3,"file":"nitro.mjs","sources":["../../../../../../node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.mjs","../../../../../../node_modules/.pnpm/ufo@1.6.4/node_modules/ufo/dist/index.mjs","../../../../../../node_modules/.pnpm/radix3@1.1.2/node_modules/radix3/dist/index.mjs","../../../../../../node_modules/.pnpm/defu@6.1.7/node_modules/defu/dist/defu.mjs","../../../../../../node_modules/.pnpm/node-mock-http@1.0.4/node_modules/node-mock-http/dist/index.mjs","../../../../../../node_modules/.pnpm/h3@1.15.11/node_modules/h3/dist/index.mjs","../../../../../../node_modules/.pnpm/hookable@5.5.3/node_modules/hookable/dist/index.mjs","../../../../../../node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/native.mjs","../../../../../../node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/shared/ofetch.CWycOUEr.mjs","../../../../../../node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/node.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.5_db0@0.3.4_ioredis@5.10.1/node_modules/unstorage/dist/shared/unstorage.zVDD2mZo.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.5_db0@0.3.4_ioredis@5.10.1/node_modules/unstorage/dist/index.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.5_db0@0.3.4_ioredis@5.10.1/node_modules/unstorage/drivers/utils/index.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.5_db0@0.3.4_ioredis@5.10.1/node_modules/unstorage/drivers/utils/node-fs.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.5_db0@0.3.4_ioredis@5.10.1/node_modules/unstorage/drivers/fs.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.5_db0@0.3.4_ioredis@5.10.1/node_modules/unstorage/drivers/fs-lite.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.4_rolldown@1.0.1/node_modules/nitropack/dist/runtime/internal/storage.mjs","../../../../../../node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/crypto/node/index.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.4_rolldown@1.0.1/node_modules/nitropack/dist/runtime/internal/hash.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.4_rolldown@1.0.1/node_modules/nitropack/dist/runtime/internal/cache.mjs","../../../../../../node_modules/.pnpm/klona@2.0.6/node_modules/klona/dist/index.mjs","../../../../../../node_modules/.pnpm/scule@1.3.0/node_modules/scule/dist/index.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.4_rolldown@1.0.1/node_modules/nitropack/dist/runtime/internal/utils.env.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.4_rolldown@1.0.1/node_modules/nitropack/dist/runtime/internal/config.mjs","../../../../../../node_modules/.pnpm/unctx@2.5.0/node_modules/unctx/dist/index.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.4_rolldown@1.0.1/node_modules/nitropack/dist/runtime/internal/context.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.4_rolldown@1.0.1/node_modules/nitropack/dist/runtime/internal/route-rules-utils.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.4_rolldown@1.0.1/node_modules/nitropack/dist/runtime/internal/route-rules.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.4_rolldown@1.0.1/node_modules/nitropack/dist/runtime/internal/utils.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.4_rolldown@1.0.1/node_modules/nitropack/dist/runtime/internal/error/utils.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.4_rolldown@1.0.1/node_modules/nitropack/dist/runtime/internal/error/prod.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.4_rolldown@1.0.1/node_modules/nitropack/dist/runtime/internal/plugin.mjs","../../../../server/utils/logger.ts","../../../../server/plugins/fetch-logger.ts","../../../../../../internals/utils/dist/index.js","../../../../server/plugins/heartbeat.ts","../../../../server/utils/token.ts","../../../../server/utils/api.ts","../../../../../ast/dist/index.js","../../../../../core/dist/PluginDriver-CT33kVoQ.js","../../../../../core/dist/index.js","../../../../server/types/agent.ts","../../../../server/utils/agentCache.ts","../../../../server/utils/executeHooks.ts","../../../../server/utils/generate.ts","../../../../server/utils/getCosmiConfig.ts","../../../../server/utils/loadConfig.ts","../../../../server/utils/resolvePlugins.ts","../../../../server/utils/mergePlugins.ts","../../../../server/utils/publish.ts","../../../../server/utils/setupHookListener.ts","../../../../server/constants.ts","../../../../server/utils/ws.ts","../../../../server/utils/connectStudio.ts","../../../../server/utils/runtimeConfig.ts","../../../../server/plugins/studio.ts","../../../../../../node_modules/.pnpm/nitropack@2.13.4_rolldown@1.0.1/node_modules/nitropack/dist/runtime/internal/app.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.4_rolldown@1.0.1/node_modules/nitropack/dist/runtime/internal/lib/http-graceful-shutdown.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.4_rolldown@1.0.1/node_modules/nitropack/dist/runtime/internal/shutdown.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.4_rolldown@1.0.1/node_modules/nitropack/dist/presets/node/runtime/node-server.mjs"],"names":["createRouter","f","h","i","l","createError","mergeHeaders","s","nodeFetch","Headers","Headers$1","AbortController$1","normalizeKey","defineDriver","DRIVER_NAME","createStorage","fsPromises","PATH_TRAVERSE_RE","fsp","_inlineAppConfig","createRadixRouter","formatMs","resolve","_a","process","path","_b","extname","__privateAdd","__privateMethod","__privateGet","__privateSet","__publicField","readFile","writeFile","build","walk","readdir","files","error","version","nitroApp","callNodeRequestHandler","fetchNodeRequestHandler","gracefulShutdown","HttpsServer","HttpServer"],"mappings":"","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,56,57,58,59]}
|
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.16",
|
|
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,18 +43,18 @@
|
|
|
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.16",
|
|
47
|
+
"@kubb/core": "5.0.0-beta.16"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@types/ws": "^8.18.1",
|
|
51
51
|
"msw": "^2.14.6",
|
|
52
52
|
"nitropack": "^2.13.4",
|
|
53
|
-
"vite": "^8.0.
|
|
53
|
+
"vite": "^8.0.13",
|
|
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.16",
|
|
56
|
+
"@kubb/parser-ts": "5.0.0-beta.16",
|
|
57
|
+
"@kubb/renderer-jsx": "5.0.0-beta.16"
|
|
58
58
|
},
|
|
59
59
|
"engines": {
|
|
60
60
|
"node": ">=22"
|