@kubb/agent 5.0.0-beta.17 → 5.0.0-beta.18
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
|
@@ -5505,6 +5505,9 @@ var FileManager = (_a$1 = class {
|
|
|
5505
5505
|
dispose() {
|
|
5506
5506
|
this.clear();
|
|
5507
5507
|
}
|
|
5508
|
+
[Symbol.dispose]() {
|
|
5509
|
+
this.dispose();
|
|
5510
|
+
}
|
|
5508
5511
|
/**
|
|
5509
5512
|
* All stored files, sorted by path length (shorter paths first).
|
|
5510
5513
|
*/
|
|
@@ -5746,6 +5749,9 @@ var PluginDriver = (_b$1 = class {
|
|
|
5746
5749
|
this.inputNode = void 0;
|
|
5747
5750
|
this.inputStreamNode = void 0;
|
|
5748
5751
|
}
|
|
5752
|
+
[Symbol.dispose]() {
|
|
5753
|
+
this.dispose();
|
|
5754
|
+
}
|
|
5749
5755
|
/**
|
|
5750
5756
|
* Merges `partial` with the plugin's default resolver and stores the result.
|
|
5751
5757
|
* Also mirrors it onto `plugin.resolver` so callers using `getPlugin(name).resolver`
|
|
@@ -5874,8 +5880,11 @@ async function applyHookResult(result, driver, rendererFactory) {
|
|
|
5874
5880
|
}
|
|
5875
5881
|
if (!rendererFactory) return;
|
|
5876
5882
|
const renderer = rendererFactory();
|
|
5877
|
-
await renderer.
|
|
5878
|
-
|
|
5883
|
+
if (renderer.stream) for await (const file of renderer.stream(result)) driver.fileManager.upsert(file);
|
|
5884
|
+
else {
|
|
5885
|
+
await renderer.render(result);
|
|
5886
|
+
driver.fileManager.upsert(...renderer.files);
|
|
5887
|
+
}
|
|
5879
5888
|
renderer.unmount();
|
|
5880
5889
|
}
|
|
5881
5890
|
|
|
@@ -6268,7 +6277,7 @@ eachParam_fn = function(fn) {
|
|
|
6268
6277
|
fn(raw, __privateMethod(this, _URLPath_instances, transformParam_fn).call(this, raw));
|
|
6269
6278
|
}
|
|
6270
6279
|
}, _b);
|
|
6271
|
-
var version$1 = "5.0.0-beta.
|
|
6280
|
+
var version$1 = "5.0.0-beta.18";
|
|
6272
6281
|
function createStorage(build2) {
|
|
6273
6282
|
return (options) => build2(options != null ? options : {});
|
|
6274
6283
|
}
|
|
@@ -6368,6 +6377,64 @@ const fsStorage = createStorage(() => ({
|
|
|
6368
6377
|
await clean(resolve(base));
|
|
6369
6378
|
}
|
|
6370
6379
|
}));
|
|
6380
|
+
function _usingCtx() {
|
|
6381
|
+
var r = "function" == typeof SuppressedError ? SuppressedError : function(r2, e2) {
|
|
6382
|
+
var n2 = Error();
|
|
6383
|
+
return n2.name = "SuppressedError", n2.error = r2, n2.suppressed = e2, n2;
|
|
6384
|
+
};
|
|
6385
|
+
var e = {};
|
|
6386
|
+
var n = [];
|
|
6387
|
+
function using(r2, e2) {
|
|
6388
|
+
if (null != e2) {
|
|
6389
|
+
if (Object(e2) !== e2) throw new TypeError("using declarations can only be used with objects, functions, null, or undefined.");
|
|
6390
|
+
if (r2) var o = e2[Symbol.asyncDispose || Symbol["for"]("Symbol.asyncDispose")];
|
|
6391
|
+
if (void 0 === o && (o = e2[Symbol.dispose || Symbol["for"]("Symbol.dispose")], r2)) var t = o;
|
|
6392
|
+
if ("function" != typeof o) throw new TypeError("Object is not disposable.");
|
|
6393
|
+
t && (o = function o2() {
|
|
6394
|
+
try {
|
|
6395
|
+
t.call(e2);
|
|
6396
|
+
} catch (r3) {
|
|
6397
|
+
return Promise.reject(r3);
|
|
6398
|
+
}
|
|
6399
|
+
}), n.push({
|
|
6400
|
+
v: e2,
|
|
6401
|
+
d: o,
|
|
6402
|
+
a: r2
|
|
6403
|
+
});
|
|
6404
|
+
} else r2 && n.push({
|
|
6405
|
+
d: e2,
|
|
6406
|
+
a: r2
|
|
6407
|
+
});
|
|
6408
|
+
return e2;
|
|
6409
|
+
}
|
|
6410
|
+
return {
|
|
6411
|
+
e,
|
|
6412
|
+
u: using.bind(null, false),
|
|
6413
|
+
a: using.bind(null, true),
|
|
6414
|
+
d: function d() {
|
|
6415
|
+
var o;
|
|
6416
|
+
var t = this.e;
|
|
6417
|
+
var s = 0;
|
|
6418
|
+
function next() {
|
|
6419
|
+
for (; o = n.pop(); ) try {
|
|
6420
|
+
if (!o.a && 1 === s) return s = 0, n.push(o), Promise.resolve().then(next);
|
|
6421
|
+
if (o.d) {
|
|
6422
|
+
var r2 = o.d.call(o.v);
|
|
6423
|
+
if (o.a) return s |= 2, Promise.resolve(r2).then(next, err);
|
|
6424
|
+
} else s |= 1;
|
|
6425
|
+
} catch (r3) {
|
|
6426
|
+
return err(r3);
|
|
6427
|
+
}
|
|
6428
|
+
if (1 === s) return t !== e ? Promise.reject(t) : Promise.resolve();
|
|
6429
|
+
if (t !== e) throw t;
|
|
6430
|
+
}
|
|
6431
|
+
function err(n2) {
|
|
6432
|
+
return t = t !== e ? new r(n2, t) : n2, next();
|
|
6433
|
+
}
|
|
6434
|
+
return next();
|
|
6435
|
+
}
|
|
6436
|
+
};
|
|
6437
|
+
}
|
|
6371
6438
|
function createSourcesView(storage) {
|
|
6372
6439
|
const paths = /* @__PURE__ */ new Set();
|
|
6373
6440
|
return createStorage(() => ({
|
|
@@ -6516,11 +6583,13 @@ async function setup(userConfig, options = {}) {
|
|
|
6516
6583
|
hooks,
|
|
6517
6584
|
driver,
|
|
6518
6585
|
storage,
|
|
6519
|
-
dispose
|
|
6520
|
-
|
|
6521
|
-
for (const [event, handler] of middlewareListeners) hooks.off(event, handler);
|
|
6522
|
-
}
|
|
6586
|
+
dispose,
|
|
6587
|
+
[Symbol.dispose]: dispose
|
|
6523
6588
|
};
|
|
6589
|
+
function dispose() {
|
|
6590
|
+
driver.dispose();
|
|
6591
|
+
for (const [event, handler] of middlewareListeners) hooks.off(event, handler);
|
|
6592
|
+
}
|
|
6524
6593
|
}
|
|
6525
6594
|
async function runPluginStreamHooks(inputStreamNode, entries, driver, hooks, config, pluginTimings, failedPlugins, flushPendingFiles) {
|
|
6526
6595
|
function resolveRendererFor(gen, state) {
|
|
@@ -6691,7 +6760,9 @@ async function runPluginAstHooks(plugin, context) {
|
|
|
6691
6760
|
...generatorContext,
|
|
6692
6761
|
options
|
|
6693
6762
|
};
|
|
6694
|
-
await Promise.all(generators.filter((gen) => gen.schema).map(
|
|
6763
|
+
await Promise.all(generators.filter((gen) => gen.schema).map(async (gen) => {
|
|
6764
|
+
return applyHookResult(await gen.schema(transformedNode, ctx), driver, resolveRenderer(gen));
|
|
6765
|
+
}));
|
|
6695
6766
|
await driver.hooks.emit("kubb:generate:schema", transformedNode, ctx);
|
|
6696
6767
|
},
|
|
6697
6768
|
async operation(node) {
|
|
@@ -6708,7 +6779,9 @@ async function runPluginAstHooks(plugin, context) {
|
|
|
6708
6779
|
...generatorContext,
|
|
6709
6780
|
options
|
|
6710
6781
|
};
|
|
6711
|
-
await Promise.all(generators.filter((gen) => gen.operation).map(
|
|
6782
|
+
await Promise.all(generators.filter((gen) => gen.operation).map(async (gen) => {
|
|
6783
|
+
return applyHookResult(await gen.operation(transformedNode, ctx), driver, resolveRenderer(gen));
|
|
6784
|
+
}));
|
|
6712
6785
|
await driver.hooks.emit("kubb:generate:operation", transformedNode, ctx);
|
|
6713
6786
|
}
|
|
6714
6787
|
}
|
|
@@ -6727,78 +6800,111 @@ async function runPluginAstHooks(plugin, context) {
|
|
|
6727
6800
|
}
|
|
6728
6801
|
async function safeBuild(setupResult) {
|
|
6729
6802
|
var _a2, _b2, _c, _d;
|
|
6730
|
-
|
|
6731
|
-
|
|
6732
|
-
|
|
6733
|
-
|
|
6734
|
-
|
|
6735
|
-
|
|
6736
|
-
|
|
6737
|
-
|
|
6738
|
-
|
|
6739
|
-
const
|
|
6740
|
-
|
|
6741
|
-
|
|
6742
|
-
|
|
6743
|
-
|
|
6744
|
-
|
|
6745
|
-
|
|
6746
|
-
|
|
6747
|
-
|
|
6748
|
-
|
|
6749
|
-
|
|
6750
|
-
|
|
6751
|
-
|
|
6752
|
-
|
|
6753
|
-
|
|
6754
|
-
|
|
6755
|
-
|
|
6756
|
-
|
|
6757
|
-
|
|
6803
|
+
try {
|
|
6804
|
+
var _usingCtx$1 = _usingCtx();
|
|
6805
|
+
_usingCtx$1.u(setupResult);
|
|
6806
|
+
const { driver, hooks, storage } = setupResult;
|
|
6807
|
+
const failedPlugins = /* @__PURE__ */ new Set();
|
|
6808
|
+
const pluginTimings = /* @__PURE__ */ new Map();
|
|
6809
|
+
const config = driver.config;
|
|
6810
|
+
const writtenPaths = /* @__PURE__ */ new Set();
|
|
6811
|
+
const parsersMap = /* @__PURE__ */ new Map();
|
|
6812
|
+
for (const parser of config.parsers) if (parser.extNames) for (const extname of parser.extNames) parsersMap.set(extname, parser);
|
|
6813
|
+
const fileProcessor = new FileProcessor();
|
|
6814
|
+
async function flushPendingFiles(snapshot) {
|
|
6815
|
+
const files = driver.fileManager.files.filter((f) => !writtenPaths.has(f.path) && (!snapshot || !snapshot.has(f.path)));
|
|
6816
|
+
if (files.length === 0) return;
|
|
6817
|
+
await hooks.emit("kubb:debug", {
|
|
6818
|
+
date: /* @__PURE__ */ new Date(),
|
|
6819
|
+
logs: [`Writing ${files.length} files...`]
|
|
6820
|
+
});
|
|
6821
|
+
await hooks.emit("kubb:files:processing:start", { files });
|
|
6822
|
+
const stream = fileProcessor.stream(files, {
|
|
6823
|
+
parsers: parsersMap,
|
|
6824
|
+
extension: config.output.extension
|
|
6825
|
+
});
|
|
6826
|
+
for await (const { file, source, processed, total, percentage } of stream) {
|
|
6827
|
+
await hooks.emit("kubb:file:processing:update", {
|
|
6828
|
+
file,
|
|
6829
|
+
source,
|
|
6830
|
+
processed,
|
|
6831
|
+
total,
|
|
6832
|
+
percentage,
|
|
6833
|
+
config
|
|
6834
|
+
});
|
|
6835
|
+
if (source) await storage.setItem(file.path, source);
|
|
6836
|
+
writtenPaths.add(file.path);
|
|
6837
|
+
}
|
|
6838
|
+
await hooks.emit("kubb:files:processing:end", { files });
|
|
6839
|
+
await hooks.emit("kubb:debug", {
|
|
6840
|
+
date: /* @__PURE__ */ new Date(),
|
|
6841
|
+
logs: [`\u2713 File write process completed for ${files.length} files`]
|
|
6758
6842
|
});
|
|
6759
|
-
if (source) await storage.setItem(file.path, source);
|
|
6760
|
-
writtenPaths.add(file.path);
|
|
6761
6843
|
}
|
|
6762
|
-
|
|
6763
|
-
|
|
6764
|
-
|
|
6765
|
-
|
|
6766
|
-
|
|
6767
|
-
|
|
6768
|
-
|
|
6769
|
-
|
|
6770
|
-
|
|
6771
|
-
|
|
6772
|
-
|
|
6773
|
-
|
|
6774
|
-
|
|
6775
|
-
|
|
6776
|
-
|
|
6777
|
-
|
|
6778
|
-
}
|
|
6779
|
-
|
|
6780
|
-
|
|
6781
|
-
|
|
6782
|
-
|
|
6783
|
-
|
|
6784
|
-
|
|
6785
|
-
|
|
6786
|
-
|
|
6787
|
-
|
|
6788
|
-
|
|
6844
|
+
try {
|
|
6845
|
+
await driver.emitSetupHooks();
|
|
6846
|
+
if (driver.adapter && (driver.inputNode || driver.inputStreamNode)) await hooks.emit("kubb:build:start", {
|
|
6847
|
+
config,
|
|
6848
|
+
adapter: driver.adapter,
|
|
6849
|
+
inputNode: (_b2 = driver.inputNode) != null ? _b2 : {
|
|
6850
|
+
kind: "Input",
|
|
6851
|
+
schemas: [],
|
|
6852
|
+
operations: [],
|
|
6853
|
+
meta: (_a2 = driver.inputStreamNode) == null ? void 0 : _a2.meta
|
|
6854
|
+
},
|
|
6855
|
+
getPlugin: driver.getPlugin.bind(driver),
|
|
6856
|
+
get files() {
|
|
6857
|
+
return driver.fileManager.files;
|
|
6858
|
+
},
|
|
6859
|
+
upsertFile: (...files2) => driver.fileManager.upsert(...files2)
|
|
6860
|
+
});
|
|
6861
|
+
const inputStreamNode = driver.inputStreamNode;
|
|
6862
|
+
if (inputStreamNode) {
|
|
6863
|
+
const streamPluginEntries = [];
|
|
6864
|
+
for (const plugin of driver.plugins.values()) {
|
|
6865
|
+
const context = driver.getContext(plugin);
|
|
6866
|
+
const hrStart = process.hrtime();
|
|
6867
|
+
await hooks.emit("kubb:plugin:start", { plugin });
|
|
6868
|
+
await hooks.emit("kubb:debug", {
|
|
6869
|
+
date: /* @__PURE__ */ new Date(),
|
|
6870
|
+
logs: ["Starting plugin...", ` \u2022 Plugin Name: ${plugin.name}`]
|
|
6871
|
+
});
|
|
6872
|
+
if (((_c = plugin.generators) == null ? void 0 : _c.length) || driver.hasRegisteredGenerators(plugin.name)) streamPluginEntries.push({
|
|
6873
|
+
plugin,
|
|
6874
|
+
context,
|
|
6875
|
+
hrStart
|
|
6876
|
+
});
|
|
6877
|
+
else {
|
|
6878
|
+
const duration = getElapsedMs(hrStart);
|
|
6879
|
+
pluginTimings.set(plugin.name, duration);
|
|
6880
|
+
await hooks.emit("kubb:plugin:end", {
|
|
6881
|
+
plugin,
|
|
6882
|
+
duration,
|
|
6883
|
+
success: true,
|
|
6884
|
+
config,
|
|
6885
|
+
get files() {
|
|
6886
|
+
return driver.fileManager.files;
|
|
6887
|
+
},
|
|
6888
|
+
upsertFile: (...files2) => driver.fileManager.upsert(...files2)
|
|
6889
|
+
});
|
|
6890
|
+
await hooks.emit("kubb:debug", {
|
|
6891
|
+
date: /* @__PURE__ */ new Date(),
|
|
6892
|
+
logs: [`\u2713 Plugin started successfully (${formatMs(duration)})`]
|
|
6893
|
+
});
|
|
6894
|
+
}
|
|
6895
|
+
}
|
|
6896
|
+
if (streamPluginEntries.length > 0) await runPluginStreamHooks(inputStreamNode, streamPluginEntries, driver, hooks, config, pluginTimings, failedPlugins, flushPendingFiles);
|
|
6897
|
+
} else for (const plugin of driver.plugins.values()) {
|
|
6789
6898
|
const context = driver.getContext(plugin);
|
|
6790
6899
|
const hrStart = process.hrtime();
|
|
6791
|
-
|
|
6792
|
-
|
|
6793
|
-
|
|
6794
|
-
|
|
6795
|
-
|
|
6796
|
-
|
|
6797
|
-
|
|
6798
|
-
context
|
|
6799
|
-
hrStart
|
|
6800
|
-
});
|
|
6801
|
-
else {
|
|
6900
|
+
try {
|
|
6901
|
+
const timestamp = /* @__PURE__ */ new Date();
|
|
6902
|
+
await hooks.emit("kubb:plugin:start", { plugin });
|
|
6903
|
+
await hooks.emit("kubb:debug", {
|
|
6904
|
+
date: timestamp,
|
|
6905
|
+
logs: ["Starting plugin...", ` \u2022 Plugin Name: ${plugin.name}`]
|
|
6906
|
+
});
|
|
6907
|
+
if (((_d = plugin.generators) == null ? void 0 : _d.length) || driver.hasRegisteredGenerators(plugin.name)) await runPluginAstHooks(plugin, context);
|
|
6802
6908
|
const duration = getElapsedMs(hrStart);
|
|
6803
6909
|
pluginTimings.set(plugin.name, duration);
|
|
6804
6910
|
await hooks.emit("kubb:plugin:end", {
|
|
@@ -6815,100 +6921,73 @@ async function safeBuild(setupResult) {
|
|
|
6815
6921
|
date: /* @__PURE__ */ new Date(),
|
|
6816
6922
|
logs: [`\u2713 Plugin started successfully (${formatMs(duration)})`]
|
|
6817
6923
|
});
|
|
6924
|
+
} catch (caughtError) {
|
|
6925
|
+
const error = caughtError;
|
|
6926
|
+
const errorTimestamp = /* @__PURE__ */ new Date();
|
|
6927
|
+
const duration = getElapsedMs(hrStart);
|
|
6928
|
+
await hooks.emit("kubb:plugin:end", {
|
|
6929
|
+
plugin,
|
|
6930
|
+
duration,
|
|
6931
|
+
success: false,
|
|
6932
|
+
error,
|
|
6933
|
+
config,
|
|
6934
|
+
get files() {
|
|
6935
|
+
return driver.fileManager.files;
|
|
6936
|
+
},
|
|
6937
|
+
upsertFile: (...files2) => driver.fileManager.upsert(...files2)
|
|
6938
|
+
});
|
|
6939
|
+
await hooks.emit("kubb:debug", {
|
|
6940
|
+
date: errorTimestamp,
|
|
6941
|
+
logs: [
|
|
6942
|
+
"\u2717 Plugin start failed",
|
|
6943
|
+
` \u2022 Plugin Name: ${plugin.name}`,
|
|
6944
|
+
` \u2022 Error: ${error.constructor.name} - ${error.message}`,
|
|
6945
|
+
" \u2022 Stack Trace:",
|
|
6946
|
+
error.stack || "No stack trace available"
|
|
6947
|
+
]
|
|
6948
|
+
});
|
|
6949
|
+
failedPlugins.add({
|
|
6950
|
+
plugin,
|
|
6951
|
+
error
|
|
6952
|
+
});
|
|
6818
6953
|
}
|
|
6954
|
+
await flushPendingFiles();
|
|
6819
6955
|
}
|
|
6820
|
-
|
|
6821
|
-
|
|
6822
|
-
|
|
6823
|
-
|
|
6824
|
-
|
|
6825
|
-
|
|
6826
|
-
|
|
6827
|
-
await hooks.emit("kubb:debug", {
|
|
6828
|
-
date: timestamp,
|
|
6829
|
-
logs: ["Starting plugin...", ` \u2022 Plugin Name: ${plugin.name}`]
|
|
6830
|
-
});
|
|
6831
|
-
if (((_d = plugin.generators) == null ? void 0 : _d.length) || driver.hasRegisteredGenerators(plugin.name)) await runPluginAstHooks(plugin, context);
|
|
6832
|
-
const duration = getElapsedMs(hrStart);
|
|
6833
|
-
pluginTimings.set(plugin.name, duration);
|
|
6834
|
-
await hooks.emit("kubb:plugin:end", {
|
|
6835
|
-
plugin,
|
|
6836
|
-
duration,
|
|
6837
|
-
success: true,
|
|
6838
|
-
config,
|
|
6839
|
-
get files() {
|
|
6840
|
-
return driver.fileManager.files;
|
|
6841
|
-
},
|
|
6842
|
-
upsertFile: (...files2) => driver.fileManager.upsert(...files2)
|
|
6843
|
-
});
|
|
6844
|
-
await hooks.emit("kubb:debug", {
|
|
6845
|
-
date: /* @__PURE__ */ new Date(),
|
|
6846
|
-
logs: [`\u2713 Plugin started successfully (${formatMs(duration)})`]
|
|
6847
|
-
});
|
|
6848
|
-
} catch (caughtError) {
|
|
6849
|
-
const error = caughtError;
|
|
6850
|
-
const errorTimestamp = /* @__PURE__ */ new Date();
|
|
6851
|
-
const duration = getElapsedMs(hrStart);
|
|
6852
|
-
await hooks.emit("kubb:plugin:end", {
|
|
6853
|
-
plugin,
|
|
6854
|
-
duration,
|
|
6855
|
-
success: false,
|
|
6856
|
-
error,
|
|
6857
|
-
config,
|
|
6858
|
-
get files() {
|
|
6859
|
-
return driver.fileManager.files;
|
|
6860
|
-
},
|
|
6861
|
-
upsertFile: (...files2) => driver.fileManager.upsert(...files2)
|
|
6862
|
-
});
|
|
6863
|
-
await hooks.emit("kubb:debug", {
|
|
6864
|
-
date: errorTimestamp,
|
|
6865
|
-
logs: [
|
|
6866
|
-
"\u2717 Plugin start failed",
|
|
6867
|
-
` \u2022 Plugin Name: ${plugin.name}`,
|
|
6868
|
-
` \u2022 Error: ${error.constructor.name} - ${error.message}`,
|
|
6869
|
-
" \u2022 Stack Trace:",
|
|
6870
|
-
error.stack || "No stack trace available"
|
|
6871
|
-
]
|
|
6872
|
-
});
|
|
6873
|
-
failedPlugins.add({
|
|
6874
|
-
plugin,
|
|
6875
|
-
error
|
|
6876
|
-
});
|
|
6877
|
-
}
|
|
6956
|
+
await hooks.emit("kubb:plugins:end", {
|
|
6957
|
+
config,
|
|
6958
|
+
get files() {
|
|
6959
|
+
return driver.fileManager.files;
|
|
6960
|
+
},
|
|
6961
|
+
upsertFile: (...files2) => driver.fileManager.upsert(...files2)
|
|
6962
|
+
});
|
|
6878
6963
|
await flushPendingFiles();
|
|
6964
|
+
const files = driver.fileManager.files;
|
|
6965
|
+
await hooks.emit("kubb:build:end", {
|
|
6966
|
+
files,
|
|
6967
|
+
config,
|
|
6968
|
+
outputDir: resolve(config.root, config.output.path)
|
|
6969
|
+
});
|
|
6970
|
+
return {
|
|
6971
|
+
failedPlugins,
|
|
6972
|
+
files,
|
|
6973
|
+
driver,
|
|
6974
|
+
pluginTimings,
|
|
6975
|
+
storage
|
|
6976
|
+
};
|
|
6977
|
+
} catch (error) {
|
|
6978
|
+
return {
|
|
6979
|
+
failedPlugins,
|
|
6980
|
+
files: [],
|
|
6981
|
+
driver,
|
|
6982
|
+
pluginTimings,
|
|
6983
|
+
error,
|
|
6984
|
+
storage
|
|
6985
|
+
};
|
|
6879
6986
|
}
|
|
6880
|
-
|
|
6881
|
-
|
|
6882
|
-
get files() {
|
|
6883
|
-
return driver.fileManager.files;
|
|
6884
|
-
},
|
|
6885
|
-
upsertFile: (...files2) => driver.fileManager.upsert(...files2)
|
|
6886
|
-
});
|
|
6887
|
-
await flushPendingFiles();
|
|
6888
|
-
const files = driver.fileManager.files;
|
|
6889
|
-
await hooks.emit("kubb:build:end", {
|
|
6890
|
-
files,
|
|
6891
|
-
config,
|
|
6892
|
-
outputDir: resolve(config.root, config.output.path)
|
|
6893
|
-
});
|
|
6894
|
-
return {
|
|
6895
|
-
failedPlugins,
|
|
6896
|
-
files,
|
|
6897
|
-
driver,
|
|
6898
|
-
pluginTimings,
|
|
6899
|
-
storage
|
|
6900
|
-
};
|
|
6901
|
-
} catch (error) {
|
|
6902
|
-
return {
|
|
6903
|
-
failedPlugins,
|
|
6904
|
-
files: [],
|
|
6905
|
-
driver,
|
|
6906
|
-
pluginTimings,
|
|
6907
|
-
error,
|
|
6908
|
-
storage
|
|
6909
|
-
};
|
|
6987
|
+
} catch (_) {
|
|
6988
|
+
_usingCtx$1.e = _;
|
|
6910
6989
|
} finally {
|
|
6911
|
-
|
|
6990
|
+
_usingCtx$1.d();
|
|
6912
6991
|
}
|
|
6913
6992
|
}
|
|
6914
6993
|
async function build(setupResult) {
|
|
@@ -7020,7 +7099,7 @@ const memoryStorage = createStorage(() => {
|
|
|
7020
7099
|
};
|
|
7021
7100
|
});
|
|
7022
7101
|
|
|
7023
|
-
var version = "5.0.0-beta.
|
|
7102
|
+
var version = "5.0.0-beta.18";
|
|
7024
7103
|
|
|
7025
7104
|
function isCommandMessage(msg) {
|
|
7026
7105
|
return msg.type === "command";
|
|
@@ -7031,9 +7110,6 @@ function isPongMessage(msg) {
|
|
|
7031
7110
|
function isDisconnectMessage(msg) {
|
|
7032
7111
|
return msg.type === "disconnect";
|
|
7033
7112
|
}
|
|
7034
|
-
function isPublishCommandMessage(msg) {
|
|
7035
|
-
return msg.type === "command" && msg.command === "publish";
|
|
7036
|
-
}
|
|
7037
7113
|
|
|
7038
7114
|
function getStorage() {
|
|
7039
7115
|
return useStorage("kubb");
|
|
@@ -7279,44 +7355,6 @@ async function mergePlugins(diskPlugins, studioPlugins) {
|
|
|
7279
7355
|
return [...mergedDisk, ...studioOnly];
|
|
7280
7356
|
}
|
|
7281
7357
|
|
|
7282
|
-
async function publish({ command, outputPath, root, hooks }) {
|
|
7283
|
-
var _a, _b, _c, _d;
|
|
7284
|
-
const resolvedOutputPath = path$1.isAbsolute(outputPath) ? outputPath : path$1.resolve(root, outputPath);
|
|
7285
|
-
const [cmd, ...args] = tokenize(command);
|
|
7286
|
-
if (!cmd) {
|
|
7287
|
-
throw new Error(`[plugin-publish] Invalid publish command: "${command}"`);
|
|
7288
|
-
}
|
|
7289
|
-
const commandWithArgs = args.length ? `${cmd} ${args.join(" ")}` : cmd;
|
|
7290
|
-
await hooks.emit("kubb:info", { message: `[publish] Running "${commandWithArgs}" in "${resolvedOutputPath}"` });
|
|
7291
|
-
const startTime = Date.now();
|
|
7292
|
-
let exitCode = null;
|
|
7293
|
-
try {
|
|
7294
|
-
const proc = x(cmd, args, {
|
|
7295
|
-
nodeOptions: { cwd: resolvedOutputPath }
|
|
7296
|
-
});
|
|
7297
|
-
for await (const line of proc) {
|
|
7298
|
-
if (line.trim()) {
|
|
7299
|
-
await hooks.emit("kubb:info", { message: line.trim() });
|
|
7300
|
-
}
|
|
7301
|
-
}
|
|
7302
|
-
const result = await proc;
|
|
7303
|
-
exitCode = (_a = result.exitCode) != null ? _a : null;
|
|
7304
|
-
} catch (err) {
|
|
7305
|
-
const message = (_d = (_c = (_b = err == null ? void 0 : err.stderr) == null ? void 0 : _b.trim()) != null ? _c : err == null ? void 0 : err.message) != null ? _d : String(err);
|
|
7306
|
-
const error = new Error(`[publish] Failed to run "${commandWithArgs}": ${message}`);
|
|
7307
|
-
error.cause = err;
|
|
7308
|
-
await hooks.emit("kubb:error", { error });
|
|
7309
|
-
throw error;
|
|
7310
|
-
}
|
|
7311
|
-
if (exitCode !== 0) {
|
|
7312
|
-
const error = new Error(`[publish] "${commandWithArgs}" exited with code ${exitCode}`);
|
|
7313
|
-
await hooks.emit("kubb:error", { error });
|
|
7314
|
-
throw error;
|
|
7315
|
-
}
|
|
7316
|
-
const duration = Date.now() - startTime;
|
|
7317
|
-
await hooks.emit("kubb:success", { message: `[publish] Published successfully in ${duration}ms` });
|
|
7318
|
-
}
|
|
7319
|
-
|
|
7320
7358
|
function setupHookListener(hooks, root) {
|
|
7321
7359
|
hooks.on("kubb:hook:start", async (ctx) => {
|
|
7322
7360
|
const { id, command, args } = ctx;
|
|
@@ -7387,11 +7425,11 @@ function sendAgentMessage(ws, message) {
|
|
|
7387
7425
|
throw new Error("Failed to send message to Kubb Studio", { cause: error });
|
|
7388
7426
|
}
|
|
7389
7427
|
}
|
|
7390
|
-
function setupEventsStream(ws, hooks
|
|
7428
|
+
function setupEventsStream(ws, hooks) {
|
|
7391
7429
|
function sendDataMessage(payload) {
|
|
7392
7430
|
sendAgentMessage(ws, {
|
|
7393
7431
|
type: "data",
|
|
7394
|
-
payload
|
|
7432
|
+
payload
|
|
7395
7433
|
});
|
|
7396
7434
|
}
|
|
7397
7435
|
hooks.on("kubb:plugin:start", (ctx) => {
|
|
@@ -7506,7 +7544,6 @@ async function connectToStudio(options) {
|
|
|
7506
7544
|
resolvedConfigPath,
|
|
7507
7545
|
allowAll,
|
|
7508
7546
|
allowWrite,
|
|
7509
|
-
allowPublish,
|
|
7510
7547
|
root,
|
|
7511
7548
|
retryInterval,
|
|
7512
7549
|
heartbeatInterval = 3e4,
|
|
@@ -7514,7 +7551,6 @@ async function connectToStudio(options) {
|
|
|
7514
7551
|
nitro
|
|
7515
7552
|
} = options;
|
|
7516
7553
|
const hooks = new AsyncEventEmitter();
|
|
7517
|
-
let currentSource;
|
|
7518
7554
|
async function reconnect() {
|
|
7519
7555
|
logger.info(`Retrying connection in ${formatMs$1(retryInterval)} to Kubb Studio ...`);
|
|
7520
7556
|
setTimeout(() => connectToStudio({ ...options, initialSession: void 0 }), retryInterval);
|
|
@@ -7529,7 +7565,6 @@ async function connectToStudio(options) {
|
|
|
7529
7565
|
const maskedSessionId = maskString(sessionId);
|
|
7530
7566
|
const effectiveAllowAll = isSandbox ? false : allowAll;
|
|
7531
7567
|
const effectiveWrite = isSandbox ? false : allowWrite;
|
|
7532
|
-
const effectivePublish = isSandbox ? false : allowPublish;
|
|
7533
7568
|
let serverDisconnected = false;
|
|
7534
7569
|
let heartbeatTimer;
|
|
7535
7570
|
async function cleanup(reason = "cleanup") {
|
|
@@ -7541,6 +7576,7 @@ async function connectToStudio(options) {
|
|
|
7541
7576
|
ws.removeEventListener("open", onOpen);
|
|
7542
7577
|
ws.removeEventListener("close", onClose);
|
|
7543
7578
|
ws.removeEventListener("error", onError);
|
|
7579
|
+
ws.removeEventListener("message", onMessage);
|
|
7544
7580
|
} catch (_error) {
|
|
7545
7581
|
}
|
|
7546
7582
|
}
|
|
@@ -7573,9 +7609,9 @@ async function connectToStudio(options) {
|
|
|
7573
7609
|
});
|
|
7574
7610
|
});
|
|
7575
7611
|
heartbeatTimer = setInterval(() => sendAgentMessage(ws, { type: "ping" }), heartbeatInterval);
|
|
7576
|
-
setupEventsStream(ws, hooks
|
|
7577
|
-
|
|
7578
|
-
var _a2, _b, _c, _d
|
|
7612
|
+
setupEventsStream(ws, hooks);
|
|
7613
|
+
const onMessage = async (message) => {
|
|
7614
|
+
var _a2, _b, _c, _d;
|
|
7579
7615
|
try {
|
|
7580
7616
|
const data = JSON.parse(message.data);
|
|
7581
7617
|
logger.info(`[${maskedSessionId}] Received "${data.type}" from Studio`);
|
|
@@ -7597,7 +7633,6 @@ async function connectToStudio(options) {
|
|
|
7597
7633
|
}
|
|
7598
7634
|
if (isCommandMessage(data)) {
|
|
7599
7635
|
if (data.command === "generate") {
|
|
7600
|
-
currentSource = "generate";
|
|
7601
7636
|
const config = await loadConfig(resolvedConfigPath);
|
|
7602
7637
|
const storedConfig = data.payload ? null : await getLatestStudioConfigFromStorage({ sessionId }).catch(() => null);
|
|
7603
7638
|
const patch = (_b = (_a2 = data.payload) != null ? _a2 : storedConfig) != null ? _b : void 0;
|
|
@@ -7620,7 +7655,7 @@ async function connectToStudio(options) {
|
|
|
7620
7655
|
}
|
|
7621
7656
|
const generationHooks = new AsyncEventEmitter();
|
|
7622
7657
|
setupHookListener(generationHooks, root);
|
|
7623
|
-
setupEventsStream(ws, generationHooks
|
|
7658
|
+
setupEventsStream(ws, generationHooks);
|
|
7624
7659
|
await generate({
|
|
7625
7660
|
config: {
|
|
7626
7661
|
...config,
|
|
@@ -7639,7 +7674,6 @@ async function connectToStudio(options) {
|
|
|
7639
7674
|
hooks: generationHooks
|
|
7640
7675
|
});
|
|
7641
7676
|
logger.success(`[${maskedSessionId}] Completed "${data.type}" from Studio`);
|
|
7642
|
-
currentSource = void 0;
|
|
7643
7677
|
return;
|
|
7644
7678
|
}
|
|
7645
7679
|
if (data.command === "connect") {
|
|
@@ -7651,8 +7685,7 @@ async function connectToStudio(options) {
|
|
|
7651
7685
|
configPath,
|
|
7652
7686
|
permissions: {
|
|
7653
7687
|
allowAll: effectiveAllowAll,
|
|
7654
|
-
allowWrite: effectiveWrite
|
|
7655
|
-
allowPublish: effectivePublish
|
|
7688
|
+
allowWrite: effectiveWrite
|
|
7656
7689
|
},
|
|
7657
7690
|
config: {
|
|
7658
7691
|
plugins: config.plugins.map((plugin) => ({
|
|
@@ -7665,30 +7698,13 @@ async function connectToStudio(options) {
|
|
|
7665
7698
|
logger.success(`[${maskedSessionId}] Completed "${data.type}" from Studio`);
|
|
7666
7699
|
return;
|
|
7667
7700
|
}
|
|
7668
|
-
if (isPublishCommandMessage(data)) {
|
|
7669
|
-
if (!effectivePublish) {
|
|
7670
|
-
logger.warn(`[${maskedSessionId}] Publish command rejected \u2014 KUBB_AGENT_ALLOW_PUBLISH is not enabled`);
|
|
7671
|
-
return;
|
|
7672
|
-
}
|
|
7673
|
-
currentSource = "publish";
|
|
7674
|
-
const config = await loadConfig(resolvedConfigPath);
|
|
7675
|
-
const resolvedCommand = (_e = (_d = data.payload.command) != null ? _d : process.env.KUBB_AGENT_PUBLISH_COMMAND) != null ? _e : "npm publish";
|
|
7676
|
-
await publish({
|
|
7677
|
-
command: resolvedCommand,
|
|
7678
|
-
outputPath: config.output.path,
|
|
7679
|
-
root,
|
|
7680
|
-
hooks
|
|
7681
|
-
});
|
|
7682
|
-
logger.success(`[${maskedSessionId}] Completed "${data.command}" from Studio`);
|
|
7683
|
-
currentSource = void 0;
|
|
7684
|
-
return;
|
|
7685
|
-
}
|
|
7686
7701
|
}
|
|
7687
7702
|
logger.warn(`[${maskedSessionId}] Unknown message type from Kubb Studio: ${message.data}`);
|
|
7688
7703
|
} catch (error) {
|
|
7689
|
-
logger.error(`[${maskedSessionId}] [unhandledRejection] ${(
|
|
7704
|
+
logger.error(`[${maskedSessionId}] [unhandledRejection] ${(_d = error == null ? void 0 : error.message) != null ? _d : error}`);
|
|
7690
7705
|
}
|
|
7691
|
-
}
|
|
7706
|
+
};
|
|
7707
|
+
ws.addEventListener("message", onMessage);
|
|
7692
7708
|
} catch (error) {
|
|
7693
7709
|
throw new Error(`[unhandledRejection] ${(_a = error == null ? void 0 : error.message) != null ? _a : error}`, {
|
|
7694
7710
|
cause: error
|
|
@@ -7718,7 +7734,6 @@ function resolveStudioRuntimeConfig(env = process$1.env, cwd = process$1.cwd())
|
|
|
7718
7734
|
root,
|
|
7719
7735
|
allowAll,
|
|
7720
7736
|
allowWrite: allowAll || parseBooleanEnv(env.KUBB_AGENT_ALLOW_WRITE),
|
|
7721
|
-
allowPublish: allowAll || parseBooleanEnv(env.KUBB_AGENT_ALLOW_PUBLISH),
|
|
7722
7737
|
poolSize: parsePositiveIntegerEnv(env.KUBB_AGENT_POOL_SIZE, agentDefaults.poolSize),
|
|
7723
7738
|
hasSecret: Boolean(env.KUBB_AGENT_SECRET)
|
|
7724
7739
|
};
|
|
@@ -7728,7 +7743,7 @@ function getErrorMessage(error) {
|
|
|
7728
7743
|
return error instanceof Error ? error.message : String(error);
|
|
7729
7744
|
}
|
|
7730
7745
|
const _zcw7I4pYH8OiCfaDcjy_x7I6IH1tLDQR3W_yRZgP6E = defineNitroPlugin(async (nitro) => {
|
|
7731
|
-
const { studioUrl, token, configPath, resolvedConfigPath, retryInterval, heartbeatInterval, root, allowAll, allowWrite,
|
|
7746
|
+
const { studioUrl, token, configPath, resolvedConfigPath, retryInterval, heartbeatInterval, root, allowAll, allowWrite, poolSize, hasSecret } = resolveStudioRuntimeConfig(process$1.env);
|
|
7732
7747
|
if (!token) {
|
|
7733
7748
|
logger.warn("KUBB_AGENT_TOKEN not set", "cannot authenticate with studio");
|
|
7734
7749
|
return null;
|
|
@@ -7747,7 +7762,6 @@ const _zcw7I4pYH8OiCfaDcjy_x7I6IH1tLDQR3W_yRZgP6E = defineNitroPlugin(async (nit
|
|
|
7747
7762
|
resolvedConfigPath,
|
|
7748
7763
|
allowAll,
|
|
7749
7764
|
allowWrite,
|
|
7750
|
-
allowPublish,
|
|
7751
7765
|
root,
|
|
7752
7766
|
retryInterval,
|
|
7753
7767
|
heartbeatInterval,
|
|
@@ -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/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-
|
|
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-T4-THx8t.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/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","r","e","n","o","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,55,56,57,58]}
|
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.18",
|
|
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.18",
|
|
47
|
+
"@kubb/core": "5.0.0-beta.18"
|
|
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.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.18",
|
|
56
|
+
"@kubb/parser-ts": "5.0.0-beta.18",
|
|
57
|
+
"@kubb/renderer-jsx": "5.0.0-beta.18"
|
|
58
58
|
},
|
|
59
59
|
"engines": {
|
|
60
60
|
"node": ">=22"
|