@kubb/agent 5.0.0-alpha.53 → 5.0.0-alpha.55
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
|
@@ -7,7 +7,7 @@ import https, { Server } from 'node:https';
|
|
|
7
7
|
import { EventEmitter } from 'node:events';
|
|
8
8
|
import { Buffer as Buffer$1 } from 'node:buffer';
|
|
9
9
|
import { promises, existsSync, readdirSync } from 'node:fs';
|
|
10
|
-
import path$1, { resolve, dirname, relative, join, extname
|
|
10
|
+
import path$1, { resolve, dirname, relative, join, extname } from 'node:path';
|
|
11
11
|
import anymatch from 'anymatch';
|
|
12
12
|
import { createHash, randomBytes } from 'node:crypto';
|
|
13
13
|
import process$1, { version as version$2 } from 'node:process';
|
|
@@ -4672,7 +4672,7 @@ var __name = (target, value) => __defProp$2(target, "name", {
|
|
|
4672
4672
|
const visitorDepths = {
|
|
4673
4673
|
deep: "deep"
|
|
4674
4674
|
};
|
|
4675
|
-
function trimExtName
|
|
4675
|
+
function trimExtName(text) {
|
|
4676
4676
|
const dotIndex = text.lastIndexOf(".");
|
|
4677
4677
|
if (dotIndex > 0 && !text.includes("/", dotIndex)) return text.slice(0, dotIndex);
|
|
4678
4678
|
return text;
|
|
@@ -4837,18 +4837,6 @@ function createParameter(props) {
|
|
|
4837
4837
|
schema: syncOptionality(props.schema, required)
|
|
4838
4838
|
};
|
|
4839
4839
|
}
|
|
4840
|
-
function createExport(props) {
|
|
4841
|
-
return {
|
|
4842
|
-
...props,
|
|
4843
|
-
kind: "Export"
|
|
4844
|
-
};
|
|
4845
|
-
}
|
|
4846
|
-
function createSource(props) {
|
|
4847
|
-
return {
|
|
4848
|
-
...props,
|
|
4849
|
-
kind: "Source"
|
|
4850
|
-
};
|
|
4851
|
-
}
|
|
4852
4840
|
function createFile(input) {
|
|
4853
4841
|
var _a, _b, _c, _d, _e;
|
|
4854
4842
|
const extname = path$1.extname(input.baseName) || (input.baseName.startsWith(".") ? input.baseName : "");
|
|
@@ -4864,7 +4852,7 @@ function createFile(input) {
|
|
|
4864
4852
|
kind: "File",
|
|
4865
4853
|
...input,
|
|
4866
4854
|
id: createHash("sha256").update(input.path).digest("hex"),
|
|
4867
|
-
name: trimExtName
|
|
4855
|
+
name: trimExtName(input.baseName),
|
|
4868
4856
|
extname,
|
|
4869
4857
|
imports: resolvedImports,
|
|
4870
4858
|
exports: resolvedExports,
|
|
@@ -4894,7 +4882,7 @@ function createLimit(concurrency) {
|
|
|
4894
4882
|
};
|
|
4895
4883
|
}
|
|
4896
4884
|
function getChildren(node, recurse) {
|
|
4897
|
-
var _a;
|
|
4885
|
+
var _a, _b, _c;
|
|
4898
4886
|
switch (node.kind) {
|
|
4899
4887
|
case "Input":
|
|
4900
4888
|
return [...node.schemas, ...node.operations];
|
|
@@ -4903,7 +4891,7 @@ function getChildren(node, recurse) {
|
|
|
4903
4891
|
case "Operation":
|
|
4904
4892
|
return [
|
|
4905
4893
|
...node.parameters,
|
|
4906
|
-
...((_a = node.requestBody) == null ? void 0 : _a.
|
|
4894
|
+
...(_c = (_b = (_a = node.requestBody) == null ? void 0 : _a.content) == null ? void 0 : _b.flatMap((c) => c.schema ? [c.schema] : [])) != null ? _c : [],
|
|
4907
4895
|
...node.responses
|
|
4908
4896
|
];
|
|
4909
4897
|
case "Schema": {
|
|
@@ -4983,7 +4971,7 @@ async function _walk(node, visitor, recurse, limit, parent) {
|
|
|
4983
4971
|
for (const child of children) await _walk(child, visitor, recurse, limit, node);
|
|
4984
4972
|
}
|
|
4985
4973
|
function transform(node, options) {
|
|
4986
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
4974
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
4987
4975
|
const { depth, parent, ...visitor } = options;
|
|
4988
4976
|
const recurse = (depth != null ? depth : visitorDepths.deep) === visitorDepths.deep;
|
|
4989
4977
|
switch (node.kind) {
|
|
@@ -5021,10 +5009,13 @@ function transform(node, options) {
|
|
|
5021
5009
|
})),
|
|
5022
5010
|
requestBody: op.requestBody ? {
|
|
5023
5011
|
...op.requestBody,
|
|
5024
|
-
|
|
5025
|
-
...
|
|
5026
|
-
|
|
5027
|
-
|
|
5012
|
+
content: (_d = op.requestBody.content) == null ? void 0 : _d.map((c) => ({
|
|
5013
|
+
...c,
|
|
5014
|
+
schema: c.schema ? transform(c.schema, {
|
|
5015
|
+
...options,
|
|
5016
|
+
parent: op
|
|
5017
|
+
}) : void 0
|
|
5018
|
+
}))
|
|
5028
5019
|
} : void 0,
|
|
5029
5020
|
responses: op.responses.map((r) => transform(r, {
|
|
5030
5021
|
...options,
|
|
@@ -5034,7 +5025,7 @@ function transform(node, options) {
|
|
|
5034
5025
|
}
|
|
5035
5026
|
case "Schema": {
|
|
5036
5027
|
let schema = node;
|
|
5037
|
-
const replaced = (
|
|
5028
|
+
const replaced = (_e = visitor.schema) == null ? void 0 : _e.call(visitor, schema, { parent });
|
|
5038
5029
|
if (replaced) schema = replaced;
|
|
5039
5030
|
const childOptions = {
|
|
5040
5031
|
...options,
|
|
@@ -5043,14 +5034,14 @@ function transform(node, options) {
|
|
|
5043
5034
|
return {
|
|
5044
5035
|
...schema,
|
|
5045
5036
|
..."properties" in schema && recurse ? { properties: schema.properties.map((p) => transform(p, childOptions)) } : {},
|
|
5046
|
-
..."items" in schema && recurse ? { items: (
|
|
5047
|
-
..."members" in schema && recurse ? { members: (
|
|
5037
|
+
..."items" in schema && recurse ? { items: (_f = schema.items) == null ? void 0 : _f.map((i) => transform(i, childOptions)) } : {},
|
|
5038
|
+
..."members" in schema && recurse ? { members: (_g = schema.members) == null ? void 0 : _g.map((m) => transform(m, childOptions)) } : {},
|
|
5048
5039
|
..."additionalProperties" in schema && recurse && schema.additionalProperties && schema.additionalProperties !== true ? { additionalProperties: transform(schema.additionalProperties, childOptions) } : {}
|
|
5049
5040
|
};
|
|
5050
5041
|
}
|
|
5051
5042
|
case "Property": {
|
|
5052
5043
|
let prop = node;
|
|
5053
|
-
const replaced = (
|
|
5044
|
+
const replaced = (_h = visitor.property) == null ? void 0 : _h.call(visitor, prop, { parent });
|
|
5054
5045
|
if (replaced) prop = replaced;
|
|
5055
5046
|
return createProperty({
|
|
5056
5047
|
...prop,
|
|
@@ -5062,7 +5053,7 @@ function transform(node, options) {
|
|
|
5062
5053
|
}
|
|
5063
5054
|
case "Parameter": {
|
|
5064
5055
|
let param = node;
|
|
5065
|
-
const replaced = (
|
|
5056
|
+
const replaced = (_i = visitor.parameter) == null ? void 0 : _i.call(visitor, param, { parent });
|
|
5066
5057
|
if (replaced) param = replaced;
|
|
5067
5058
|
return createParameter({
|
|
5068
5059
|
...param,
|
|
@@ -5074,7 +5065,7 @@ function transform(node, options) {
|
|
|
5074
5065
|
}
|
|
5075
5066
|
case "Response": {
|
|
5076
5067
|
let response = node;
|
|
5077
|
-
const replaced = (
|
|
5068
|
+
const replaced = (_j = visitor.response) == null ? void 0 : _j.call(visitor, response, { parent });
|
|
5078
5069
|
if (replaced) response = replaced;
|
|
5079
5070
|
return {
|
|
5080
5071
|
...response,
|
|
@@ -5131,14 +5122,7 @@ function pascalCase(text, { isFile, prefix = "", suffix = "" } = {}) {
|
|
|
5131
5122
|
}) : camelCase(part));
|
|
5132
5123
|
return toCamelOrPascal(`${prefix} ${text} ${suffix}`, true);
|
|
5133
5124
|
}
|
|
5134
|
-
function trimExtName$1(text) {
|
|
5135
|
-
const dotIndex = text.lastIndexOf(".");
|
|
5136
|
-
if (dotIndex > 0 && !text.includes("/", dotIndex)) return text.slice(0, dotIndex);
|
|
5137
|
-
return text;
|
|
5138
|
-
}
|
|
5139
5125
|
const DEFAULT_STUDIO_URL = "https://studio.kubb.dev";
|
|
5140
|
-
const BARREL_BASENAME = "index";
|
|
5141
|
-
const BARREL_FILENAME = `${BARREL_BASENAME}.ts`;
|
|
5142
5126
|
const DEFAULT_BANNER = "simple";
|
|
5143
5127
|
const DEFAULT_EXTENSION = { ".ts": ".ts" };
|
|
5144
5128
|
const stringPatternCache = /* @__PURE__ */ new Map();
|
|
@@ -5154,7 +5138,7 @@ function testPattern(value, pattern) {
|
|
|
5154
5138
|
return value.match(pattern) !== null;
|
|
5155
5139
|
}
|
|
5156
5140
|
function matchesOperationPattern(node, type, pattern) {
|
|
5157
|
-
var _a2;
|
|
5141
|
+
var _a2, _b2, _c;
|
|
5158
5142
|
switch (type) {
|
|
5159
5143
|
case "tag":
|
|
5160
5144
|
return node.tags.some((tag) => testPattern(tag, pattern));
|
|
@@ -5165,7 +5149,7 @@ function matchesOperationPattern(node, type, pattern) {
|
|
|
5165
5149
|
case "method":
|
|
5166
5150
|
return testPattern(node.method.toLowerCase(), pattern);
|
|
5167
5151
|
case "contentType":
|
|
5168
|
-
return ((_a2 = node.requestBody) == null ? void 0 : _a2.
|
|
5152
|
+
return (_c = (_b2 = (_a2 = node.requestBody) == null ? void 0 : _a2.content) == null ? void 0 : _b2.some((c) => testPattern(c.contentType, pattern))) != null ? _c : false;
|
|
5169
5153
|
default:
|
|
5170
5154
|
return false;
|
|
5171
5155
|
}
|
|
@@ -5393,30 +5377,19 @@ var FileManager = (_a$1 = class {
|
|
|
5393
5377
|
}
|
|
5394
5378
|
/**
|
|
5395
5379
|
* All stored files, sorted by path length (shorter paths first).
|
|
5396
|
-
* Barrel/index files (e.g. index.ts) are sorted last within each length bucket.
|
|
5397
5380
|
*/
|
|
5398
5381
|
get files() {
|
|
5399
5382
|
if (__privateGet$1(this, _filesCache)) return __privateGet$1(this, _filesCache);
|
|
5400
|
-
|
|
5401
|
-
|
|
5402
|
-
|
|
5403
|
-
|
|
5404
|
-
|
|
5405
|
-
|
|
5406
|
-
|
|
5407
|
-
const ma = meta.get(a);
|
|
5408
|
-
const mb = meta.get(b);
|
|
5409
|
-
if (ma.length !== mb.length) return ma.length - mb.length;
|
|
5410
|
-
if (ma.isIndex !== mb.isIndex) return ma.isIndex ? 1 : -1;
|
|
5383
|
+
__privateSet$1(this, _filesCache, [...__privateGet$1(this, _cache).values()].sort((a, b) => {
|
|
5384
|
+
const lenDiff = a.path.length - b.path.length;
|
|
5385
|
+
if (lenDiff !== 0) return lenDiff;
|
|
5386
|
+
const aIsIndex = a.path.endsWith("/index.ts") || a.path === "index.ts";
|
|
5387
|
+
const bIsIndex = b.path.endsWith("/index.ts") || b.path === "index.ts";
|
|
5388
|
+
if (aIsIndex && !bIsIndex) return 1;
|
|
5389
|
+
if (!aIsIndex && bIsIndex) return -1;
|
|
5411
5390
|
return 0;
|
|
5412
|
-
});
|
|
5413
|
-
|
|
5414
|
-
for (const key of keys) {
|
|
5415
|
-
const file = __privateGet$1(this, _cache).get(key);
|
|
5416
|
-
if (file) files.push(file);
|
|
5417
|
-
}
|
|
5418
|
-
__privateSet$1(this, _filesCache, files);
|
|
5419
|
-
return files;
|
|
5391
|
+
}));
|
|
5392
|
+
return __privateGet$1(this, _filesCache);
|
|
5420
5393
|
}
|
|
5421
5394
|
}, _cache = new WeakMap(), _filesCache = new WeakMap(), _a$1);
|
|
5422
5395
|
async function applyHookResult(result, driver, rendererFactory) {
|
|
@@ -5431,6 +5404,9 @@ async function applyHookResult(result, driver, rendererFactory) {
|
|
|
5431
5404
|
driver.fileManager.upsert(...renderer.files);
|
|
5432
5405
|
renderer.unmount();
|
|
5433
5406
|
}
|
|
5407
|
+
function enforceOrder(enforce) {
|
|
5408
|
+
return enforce === "pre" ? -1 : enforce === "post" ? 1 : 0;
|
|
5409
|
+
}
|
|
5434
5410
|
var PluginDriver = (_b$1 = class {
|
|
5435
5411
|
constructor(config, options) {
|
|
5436
5412
|
__privateAdd$1(this, _PluginDriver_instances);
|
|
@@ -5467,7 +5443,7 @@ var PluginDriver = (_b$1 = class {
|
|
|
5467
5443
|
var _a2, _b2;
|
|
5468
5444
|
if ((_a2 = b.dependencies) == null ? void 0 : _a2.includes(a.name)) return -1;
|
|
5469
5445
|
if ((_b2 = a.dependencies) == null ? void 0 : _b2.includes(b.name)) return 1;
|
|
5470
|
-
return
|
|
5446
|
+
return enforceOrder(a.enforce) - enforceOrder(b.enforce);
|
|
5471
5447
|
}).forEach((plugin) => {
|
|
5472
5448
|
this.plugins.set(plugin.name, plugin);
|
|
5473
5449
|
});
|
|
@@ -5725,6 +5701,7 @@ normalizePlugin_fn = function(hookPlugin) {
|
|
|
5725
5701
|
const normalizedPlugin = {
|
|
5726
5702
|
name: hookPlugin.name,
|
|
5727
5703
|
dependencies: hookPlugin.dependencies,
|
|
5704
|
+
enforce: hookPlugin.enforce,
|
|
5728
5705
|
options: {
|
|
5729
5706
|
output: { path: "." },
|
|
5730
5707
|
exclude: [],
|
|
@@ -5770,7 +5747,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
5770
5747
|
return __privateGet(obj, member, getter);
|
|
5771
5748
|
}
|
|
5772
5749
|
});
|
|
5773
|
-
var _emitter, _a, _options, _URLPath_instances, transformParam_fn, eachParam_fn, _b, _c, _head, _tail, _size, _d, _limit, _e
|
|
5750
|
+
var _emitter, _a, _options, _URLPath_instances, transformParam_fn, eachParam_fn, _b, _c, _head, _tail, _size, _d, _limit, _e;
|
|
5774
5751
|
var BuildError = class extends Error {
|
|
5775
5752
|
constructor(message, options) {
|
|
5776
5753
|
super(message, { cause: options.cause });
|
|
@@ -5886,23 +5863,14 @@ function formatMs(ms) {
|
|
|
5886
5863
|
if (ms >= 1e3) return `${(ms / 1e3).toFixed(2)}s`;
|
|
5887
5864
|
return `${Math.round(ms)}ms`;
|
|
5888
5865
|
}
|
|
5889
|
-
function
|
|
5890
|
-
if (
|
|
5891
|
-
return
|
|
5892
|
-
}
|
|
5893
|
-
function getRelativePath(rootDir, filePath) {
|
|
5894
|
-
if (!rootDir || !filePath) throw new Error(`Root and file should be filled in when retrieving the relativePath, ${rootDir || ""} ${filePath || ""}`);
|
|
5895
|
-
const relativePath = posix.relative(toSlash(rootDir), toSlash(filePath));
|
|
5896
|
-
return relativePath.startsWith("../") ? relativePath : `./${relativePath}`;
|
|
5897
|
-
}
|
|
5898
|
-
async function exists(path2) {
|
|
5899
|
-
if (typeof Bun !== "undefined") return Bun.file(path2).exists();
|
|
5900
|
-
return access(path2).then(() => true, () => false);
|
|
5866
|
+
async function exists(path) {
|
|
5867
|
+
if (typeof Bun !== "undefined") return Bun.file(path).exists();
|
|
5868
|
+
return access(path).then(() => true, () => false);
|
|
5901
5869
|
}
|
|
5902
|
-
async function write(
|
|
5870
|
+
async function write(path, data, options = {}) {
|
|
5903
5871
|
const trimmed = data.trim();
|
|
5904
5872
|
if (trimmed === "") return null;
|
|
5905
|
-
const resolved = resolve(
|
|
5873
|
+
const resolved = resolve(path);
|
|
5906
5874
|
if (typeof Bun !== "undefined") {
|
|
5907
5875
|
const file = Bun.file(resolved);
|
|
5908
5876
|
if ((await file.exists() ? await file.text() : null) === trimmed) return null;
|
|
@@ -5917,7 +5885,7 @@ async function write(path2, data, options = {}) {
|
|
|
5917
5885
|
await writeFile$1(resolved, trimmed, { encoding: "utf-8" });
|
|
5918
5886
|
if (options.sanity) {
|
|
5919
5887
|
const savedData = await readFile$1(resolved, { encoding: "utf-8" });
|
|
5920
|
-
if (savedData !== trimmed) throw new Error(`Sanity check failed for ${
|
|
5888
|
+
if (savedData !== trimmed) throw new Error(`Sanity check failed for ${path}
|
|
5921
5889
|
|
|
5922
5890
|
Data[${data.length}]:
|
|
5923
5891
|
${data}
|
|
@@ -5929,8 +5897,8 @@ ${savedData}
|
|
|
5929
5897
|
}
|
|
5930
5898
|
return trimmed;
|
|
5931
5899
|
}
|
|
5932
|
-
async function clean(
|
|
5933
|
-
return rm(
|
|
5900
|
+
async function clean(path) {
|
|
5901
|
+
return rm(path, {
|
|
5934
5902
|
recursive: true,
|
|
5935
5903
|
force: true
|
|
5936
5904
|
});
|
|
@@ -5944,14 +5912,14 @@ function isValidVarName(name) {
|
|
|
5944
5912
|
return true;
|
|
5945
5913
|
}
|
|
5946
5914
|
var URLPath = (_b = class {
|
|
5947
|
-
constructor(
|
|
5915
|
+
constructor(path, options = {}) {
|
|
5948
5916
|
__privateAdd(this, _URLPath_instances);
|
|
5949
5917
|
/**
|
|
5950
5918
|
* The raw OpenAPI/Swagger path string, e.g. `/pet/{petId}`.
|
|
5951
5919
|
*/
|
|
5952
5920
|
__publicField(this, "path");
|
|
5953
5921
|
__privateAdd(this, _options);
|
|
5954
|
-
this.path =
|
|
5922
|
+
this.path = path;
|
|
5955
5923
|
__privateSet(this, _options, options);
|
|
5956
5924
|
}
|
|
5957
5925
|
/** Converts the OpenAPI path to Express-style colon syntax, e.g. `/pet/{petId}` → `/pet/:petId`.
|
|
@@ -6297,7 +6265,7 @@ const fsStorage = createStorage(() => ({
|
|
|
6297
6265
|
await clean(resolve(base));
|
|
6298
6266
|
}
|
|
6299
6267
|
}));
|
|
6300
|
-
var version$1 = "5.0.0-alpha.
|
|
6268
|
+
var version$1 = "5.0.0-alpha.55";
|
|
6301
6269
|
function getDiagnosticInfo() {
|
|
6302
6270
|
return {
|
|
6303
6271
|
nodeVersion: version$2,
|
|
@@ -6307,229 +6275,11 @@ function getDiagnosticInfo() {
|
|
|
6307
6275
|
cwd: process.cwd()
|
|
6308
6276
|
};
|
|
6309
6277
|
}
|
|
6310
|
-
var TreeNode = (_f = class {
|
|
6311
|
-
constructor(data, parent) {
|
|
6312
|
-
__publicField(this, "data");
|
|
6313
|
-
__publicField(this, "parent");
|
|
6314
|
-
__publicField(this, "children", []);
|
|
6315
|
-
__privateAdd(this, _cachedLeaves);
|
|
6316
|
-
this.data = data;
|
|
6317
|
-
this.parent = parent;
|
|
6318
|
-
}
|
|
6319
|
-
addChild(data) {
|
|
6320
|
-
const child = new _f(data, this);
|
|
6321
|
-
if (!this.children) this.children = [];
|
|
6322
|
-
this.children.push(child);
|
|
6323
|
-
return child;
|
|
6324
|
-
}
|
|
6325
|
-
/**
|
|
6326
|
-
* Returns the root ancestor of this node, walking up via `parent` links.
|
|
6327
|
-
*/
|
|
6328
|
-
get root() {
|
|
6329
|
-
if (!this.parent) return this;
|
|
6330
|
-
return this.parent.root;
|
|
6331
|
-
}
|
|
6332
|
-
/**
|
|
6333
|
-
* Returns all leaf descendants (nodes with no children) of this node.
|
|
6334
|
-
*
|
|
6335
|
-
* Results are cached after the first traversal.
|
|
6336
|
-
*/
|
|
6337
|
-
get leaves() {
|
|
6338
|
-
if (!this.children || this.children.length === 0) return [this];
|
|
6339
|
-
if (__privateGet(this, _cachedLeaves)) return __privateGet(this, _cachedLeaves);
|
|
6340
|
-
const leaves = [];
|
|
6341
|
-
for (const child of this.children) leaves.push(...child.leaves);
|
|
6342
|
-
__privateSet(this, _cachedLeaves, leaves);
|
|
6343
|
-
return leaves;
|
|
6344
|
-
}
|
|
6345
|
-
/**
|
|
6346
|
-
* Visits this node and every descendant in depth-first order.
|
|
6347
|
-
*/
|
|
6348
|
-
forEach(callback) {
|
|
6349
|
-
if (typeof callback !== "function") throw new TypeError("forEach() callback must be a function");
|
|
6350
|
-
callback(this);
|
|
6351
|
-
for (const child of this.children) child.forEach(callback);
|
|
6352
|
-
return this;
|
|
6353
|
-
}
|
|
6354
|
-
/**
|
|
6355
|
-
* Finds the first leaf that satisfies `predicate`, or `undefined` when none match.
|
|
6356
|
-
*/
|
|
6357
|
-
findDeep(predicate) {
|
|
6358
|
-
if (typeof predicate !== "function") throw new TypeError("find() predicate must be a function");
|
|
6359
|
-
return this.leaves.find(predicate);
|
|
6360
|
-
}
|
|
6361
|
-
/**
|
|
6362
|
-
* Calls `callback` for every leaf of this node.
|
|
6363
|
-
*/
|
|
6364
|
-
forEachDeep(callback) {
|
|
6365
|
-
if (typeof callback !== "function") throw new TypeError("forEach() callback must be a function");
|
|
6366
|
-
this.leaves.forEach(callback);
|
|
6367
|
-
}
|
|
6368
|
-
/**
|
|
6369
|
-
* Returns all leaves that satisfy `callback`.
|
|
6370
|
-
*/
|
|
6371
|
-
filterDeep(callback) {
|
|
6372
|
-
if (typeof callback !== "function") throw new TypeError("filter() callback must be a function");
|
|
6373
|
-
return this.leaves.filter(callback);
|
|
6374
|
-
}
|
|
6375
|
-
/**
|
|
6376
|
-
* Maps every leaf through `callback` and returns the resulting array.
|
|
6377
|
-
*/
|
|
6378
|
-
mapDeep(callback) {
|
|
6379
|
-
if (typeof callback !== "function") throw new TypeError("map() callback must be a function");
|
|
6380
|
-
return this.leaves.map(callback);
|
|
6381
|
-
}
|
|
6382
|
-
/**
|
|
6383
|
-
* Builds a {@link TreeNode} tree from a flat list of files.
|
|
6384
|
-
*
|
|
6385
|
-
* - Filters to files under `root` (when provided) and skips `.json` files.
|
|
6386
|
-
* - Returns `null` when no files match.
|
|
6387
|
-
*/
|
|
6388
|
-
static build(files, root) {
|
|
6389
|
-
var _a2;
|
|
6390
|
-
try {
|
|
6391
|
-
const filteredTree = buildDirectoryTree(files, root);
|
|
6392
|
-
if (!filteredTree) return null;
|
|
6393
|
-
const treeNode = new _f({
|
|
6394
|
-
name: filteredTree.name,
|
|
6395
|
-
path: filteredTree.path,
|
|
6396
|
-
file: filteredTree.file,
|
|
6397
|
-
type: PluginDriver.getMode(filteredTree.path)
|
|
6398
|
-
});
|
|
6399
|
-
const recurse = (node, item) => {
|
|
6400
|
-
var _a3, _b2;
|
|
6401
|
-
const subNode = node.addChild({
|
|
6402
|
-
name: item.name,
|
|
6403
|
-
path: item.path,
|
|
6404
|
-
file: item.file,
|
|
6405
|
-
type: PluginDriver.getMode(item.path)
|
|
6406
|
-
});
|
|
6407
|
-
if ((_a3 = item.children) == null ? void 0 : _a3.length) (_b2 = item.children) == null ? void 0 : _b2.forEach((child) => {
|
|
6408
|
-
recurse(subNode, child);
|
|
6409
|
-
});
|
|
6410
|
-
};
|
|
6411
|
-
(_a2 = filteredTree.children) == null ? void 0 : _a2.forEach((child) => {
|
|
6412
|
-
recurse(treeNode, child);
|
|
6413
|
-
});
|
|
6414
|
-
return treeNode;
|
|
6415
|
-
} catch (error) {
|
|
6416
|
-
throw new Error("Something went wrong with creating barrel files with the TreeNode class", { cause: error });
|
|
6417
|
-
}
|
|
6418
|
-
}
|
|
6419
|
-
}, _cachedLeaves = new WeakMap(), _f);
|
|
6420
|
-
const normalizePath = (p) => p.replaceAll("\\", "/");
|
|
6421
|
-
function buildDirectoryTree(files, rootFolder = "") {
|
|
6422
|
-
const normalizedRootFolder = normalizePath(rootFolder);
|
|
6423
|
-
const rootPrefix = normalizedRootFolder.endsWith("/") ? normalizedRootFolder : `${normalizedRootFolder}/`;
|
|
6424
|
-
const filteredFiles = files.filter((file) => {
|
|
6425
|
-
const normalizedFilePath = normalizePath(file.path);
|
|
6426
|
-
return rootFolder ? normalizedFilePath.startsWith(rootPrefix) && !normalizedFilePath.endsWith(".json") : !normalizedFilePath.endsWith(".json");
|
|
6427
|
-
});
|
|
6428
|
-
if (filteredFiles.length === 0) return null;
|
|
6429
|
-
const root = {
|
|
6430
|
-
name: rootFolder || "",
|
|
6431
|
-
path: rootFolder || "",
|
|
6432
|
-
children: []
|
|
6433
|
-
};
|
|
6434
|
-
filteredFiles.forEach((file) => {
|
|
6435
|
-
const parts = file.path.slice(rootFolder.length).split("/").filter(Boolean);
|
|
6436
|
-
let currentLevel = root.children;
|
|
6437
|
-
let currentPath = normalizePath(rootFolder);
|
|
6438
|
-
parts.forEach((part, index) => {
|
|
6439
|
-
currentPath = path$1.posix.join(currentPath, part);
|
|
6440
|
-
let existingNode = currentLevel.find((node) => node.name === part);
|
|
6441
|
-
if (!existingNode) {
|
|
6442
|
-
if (index === parts.length - 1) existingNode = {
|
|
6443
|
-
name: part,
|
|
6444
|
-
file,
|
|
6445
|
-
path: currentPath
|
|
6446
|
-
};
|
|
6447
|
-
else existingNode = {
|
|
6448
|
-
name: part,
|
|
6449
|
-
path: currentPath,
|
|
6450
|
-
children: []
|
|
6451
|
-
};
|
|
6452
|
-
currentLevel.push(existingNode);
|
|
6453
|
-
}
|
|
6454
|
-
if (!existingNode.file) currentLevel = existingNode.children;
|
|
6455
|
-
});
|
|
6456
|
-
});
|
|
6457
|
-
return root;
|
|
6458
|
-
}
|
|
6459
|
-
function getBarrelFilesByRoot(root, files) {
|
|
6460
|
-
var _a2;
|
|
6461
|
-
const cachedFiles = /* @__PURE__ */ new Map();
|
|
6462
|
-
(_a2 = TreeNode.build(files, root)) == null ? void 0 : _a2.forEach((treeNode) => {
|
|
6463
|
-
var _a3, _b2;
|
|
6464
|
-
if (!(treeNode == null ? void 0 : treeNode.children) || !((_a3 = treeNode.parent) == null ? void 0 : _a3.data.path)) return;
|
|
6465
|
-
const barrelFile = createFile({
|
|
6466
|
-
path: join((_b2 = treeNode.parent) == null ? void 0 : _b2.data.path, BARREL_FILENAME),
|
|
6467
|
-
baseName: BARREL_FILENAME,
|
|
6468
|
-
exports: [],
|
|
6469
|
-
imports: [],
|
|
6470
|
-
sources: []
|
|
6471
|
-
});
|
|
6472
|
-
const previousBarrelFile = cachedFiles.get(barrelFile.path);
|
|
6473
|
-
treeNode.leaves.forEach((item) => {
|
|
6474
|
-
var _a4;
|
|
6475
|
-
if (!item.data.name) return;
|
|
6476
|
-
(((_a4 = item.data.file) == null ? void 0 : _a4.sources) || []).forEach((source) => {
|
|
6477
|
-
var _a5, _b3;
|
|
6478
|
-
if (!((_a5 = item.data.file) == null ? void 0 : _a5.path) || !source.isIndexable || !source.name) return;
|
|
6479
|
-
if (previousBarrelFile == null ? void 0 : previousBarrelFile.sources.some((item2) => item2.name === source.name && item2.isTypeOnly === source.isTypeOnly)) return;
|
|
6480
|
-
barrelFile.exports.push(createExport({
|
|
6481
|
-
name: [source.name],
|
|
6482
|
-
path: getRelativePath((_b3 = treeNode.parent) == null ? void 0 : _b3.data.path, item.data.path),
|
|
6483
|
-
isTypeOnly: source.isTypeOnly
|
|
6484
|
-
}));
|
|
6485
|
-
barrelFile.sources.push(createSource({
|
|
6486
|
-
name: source.name,
|
|
6487
|
-
isTypeOnly: source.isTypeOnly,
|
|
6488
|
-
isExportable: false,
|
|
6489
|
-
isIndexable: false
|
|
6490
|
-
}));
|
|
6491
|
-
});
|
|
6492
|
-
});
|
|
6493
|
-
if (previousBarrelFile) {
|
|
6494
|
-
previousBarrelFile.sources.push(...barrelFile.sources);
|
|
6495
|
-
previousBarrelFile.exports.push(...barrelFile.exports);
|
|
6496
|
-
} else cachedFiles.set(barrelFile.path, barrelFile);
|
|
6497
|
-
});
|
|
6498
|
-
return [...cachedFiles.values()];
|
|
6499
|
-
}
|
|
6500
|
-
function trimExtName(text) {
|
|
6501
|
-
const dotIndex = text.lastIndexOf(".");
|
|
6502
|
-
if (dotIndex > 0 && !text.includes("/", dotIndex)) return text.slice(0, dotIndex);
|
|
6503
|
-
return text;
|
|
6504
|
-
}
|
|
6505
|
-
async function getBarrelFiles(files, { type, meta = {}, root, output }) {
|
|
6506
|
-
if (!type || type === "propagate") return [];
|
|
6507
|
-
const pathToBuildFrom = join(root, output.path);
|
|
6508
|
-
if (trimExtName(pathToBuildFrom).endsWith("index")) return [];
|
|
6509
|
-
const barrelFiles = getBarrelFilesByRoot(pathToBuildFrom, files);
|
|
6510
|
-
if (type === "all") return barrelFiles.map((file) => {
|
|
6511
|
-
return {
|
|
6512
|
-
...file,
|
|
6513
|
-
exports: file.exports.map((exportItem) => {
|
|
6514
|
-
return {
|
|
6515
|
-
...exportItem,
|
|
6516
|
-
name: void 0
|
|
6517
|
-
};
|
|
6518
|
-
})
|
|
6519
|
-
};
|
|
6520
|
-
});
|
|
6521
|
-
return barrelFiles.map((indexFile) => {
|
|
6522
|
-
return {
|
|
6523
|
-
...indexFile,
|
|
6524
|
-
meta
|
|
6525
|
-
};
|
|
6526
|
-
});
|
|
6527
|
-
}
|
|
6528
6278
|
function isInputPath(config) {
|
|
6529
6279
|
return typeof (config == null ? void 0 : config.input) === "object" && config.input !== null && "path" in config.input;
|
|
6530
6280
|
}
|
|
6531
6281
|
async function setup(userConfig, options = {}) {
|
|
6532
|
-
var _a2, _b2, _c2, _d2, _e2,
|
|
6282
|
+
var _a2, _b2, _c2, _d2, _e2, _f, _g, _h, _i, _j;
|
|
6533
6283
|
const hooks = (_a2 = options.hooks) != null ? _a2 : new AsyncEventEmitter();
|
|
6534
6284
|
const sources = /* @__PURE__ */ new Map();
|
|
6535
6285
|
const diagnosticInfo = getDiagnosticInfo();
|
|
@@ -6544,7 +6294,7 @@ async function setup(userConfig, options = {}) {
|
|
|
6544
6294
|
` \u2022 Plugins: ${((_c2 = userConfig.plugins) == null ? void 0 : _c2.length) || 0}`,
|
|
6545
6295
|
"Output Settings:",
|
|
6546
6296
|
` \u2022 Storage: ${((_d2 = userConfig.output) == null ? void 0 : _d2.storage) ? `custom(${userConfig.output.storage.name})` : ((_e2 = userConfig.output) == null ? void 0 : _e2.write) === false ? "disabled" : "filesystem (default)"}`,
|
|
6547
|
-
` \u2022 Formatter: ${((
|
|
6297
|
+
` \u2022 Formatter: ${((_f = userConfig.output) == null ? void 0 : _f.format) || "none"}`,
|
|
6548
6298
|
` \u2022 Linter: ${((_g = userConfig.output) == null ? void 0 : _g.lint) || "none"}`,
|
|
6549
6299
|
"Environment:",
|
|
6550
6300
|
Object.entries(diagnosticInfo).map(([key, value]) => ` \u2022 ${key}: ${value}`).join("\n")
|
|
@@ -6572,7 +6322,6 @@ async function setup(userConfig, options = {}) {
|
|
|
6572
6322
|
adapter: userConfig.adapter,
|
|
6573
6323
|
output: {
|
|
6574
6324
|
write: true,
|
|
6575
|
-
barrelType: "named",
|
|
6576
6325
|
extension: DEFAULT_EXTENSION,
|
|
6577
6326
|
defaultBanner: DEFAULT_BANNER,
|
|
6578
6327
|
...userConfig.output
|
|
@@ -6592,6 +6341,7 @@ async function setup(userConfig, options = {}) {
|
|
|
6592
6341
|
await (storage == null ? void 0 : storage.clear(resolve(config.root, config.output.path)));
|
|
6593
6342
|
}
|
|
6594
6343
|
const driver = new PluginDriver(config, { hooks });
|
|
6344
|
+
for (const middleware of (_j = config.middleware) != null ? _j : []) middleware.install(hooks);
|
|
6595
6345
|
const adapter = config.adapter;
|
|
6596
6346
|
if (!adapter) throw new Error("No adapter configured. Please provide an adapter in your kubb.config.ts.");
|
|
6597
6347
|
const source = inputToAdapterSource(config);
|
|
@@ -6688,7 +6438,7 @@ async function runPluginAstHooks(plugin, context) {
|
|
|
6688
6438
|
}
|
|
6689
6439
|
}
|
|
6690
6440
|
async function safeBuild(setupResult) {
|
|
6691
|
-
var _a2
|
|
6441
|
+
var _a2;
|
|
6692
6442
|
const { driver, hooks, sources, storage } = setupResult;
|
|
6693
6443
|
const failedPlugins = /* @__PURE__ */ new Set();
|
|
6694
6444
|
const pluginTimings = /* @__PURE__ */ new Map();
|
|
@@ -6699,13 +6449,15 @@ async function safeBuild(setupResult) {
|
|
|
6699
6449
|
config,
|
|
6700
6450
|
adapter: driver.adapter,
|
|
6701
6451
|
inputNode: driver.inputNode,
|
|
6702
|
-
getPlugin: driver.getPlugin.bind(driver)
|
|
6452
|
+
getPlugin: driver.getPlugin.bind(driver),
|
|
6453
|
+
get files() {
|
|
6454
|
+
return driver.fileManager.files;
|
|
6455
|
+
},
|
|
6456
|
+
upsertFile: (...files2) => driver.fileManager.upsert(...files2)
|
|
6703
6457
|
});
|
|
6704
6458
|
for (const plugin of driver.plugins.values()) {
|
|
6705
6459
|
const context = driver.getContext(plugin);
|
|
6706
6460
|
const hrStart = process.hrtime();
|
|
6707
|
-
const { output } = (_a2 = plugin.options) != null ? _a2 : {};
|
|
6708
|
-
const root = resolve(config.root, config.output.path);
|
|
6709
6461
|
try {
|
|
6710
6462
|
const timestamp = /* @__PURE__ */ new Date();
|
|
6711
6463
|
await hooks.emit("kubb:plugin:start", { plugin });
|
|
@@ -6713,16 +6465,7 @@ async function safeBuild(setupResult) {
|
|
|
6713
6465
|
date: timestamp,
|
|
6714
6466
|
logs: ["Starting plugin...", ` \u2022 Plugin Name: ${plugin.name}`]
|
|
6715
6467
|
});
|
|
6716
|
-
if (((
|
|
6717
|
-
if (output) {
|
|
6718
|
-
const barrelFiles = await getBarrelFiles(driver.fileManager.files, {
|
|
6719
|
-
type: (_c2 = output.barrelType) != null ? _c2 : "named",
|
|
6720
|
-
root,
|
|
6721
|
-
output,
|
|
6722
|
-
meta: { pluginName: plugin.name }
|
|
6723
|
-
});
|
|
6724
|
-
await context.upsertFile(...barrelFiles);
|
|
6725
|
-
}
|
|
6468
|
+
if (((_a2 = plugin.generators) == null ? void 0 : _a2.length) || driver.hasRegisteredGenerators(plugin.name)) await runPluginAstHooks(plugin, context);
|
|
6726
6469
|
const duration = getElapsedMs(hrStart);
|
|
6727
6470
|
pluginTimings.set(plugin.name, duration);
|
|
6728
6471
|
await hooks.emit("kubb:plugin:end", {
|
|
@@ -6760,45 +6503,6 @@ async function safeBuild(setupResult) {
|
|
|
6760
6503
|
});
|
|
6761
6504
|
}
|
|
6762
6505
|
}
|
|
6763
|
-
if (config.output.barrelType) {
|
|
6764
|
-
const rootPath = resolve(resolve(config.root), config.output.path, BARREL_FILENAME);
|
|
6765
|
-
const rootDir = dirname(rootPath);
|
|
6766
|
-
await hooks.emit("kubb:debug", {
|
|
6767
|
-
date: /* @__PURE__ */ new Date(),
|
|
6768
|
-
logs: [
|
|
6769
|
-
"Generating barrel file",
|
|
6770
|
-
` \u2022 Type: ${config.output.barrelType}`,
|
|
6771
|
-
` \u2022 Path: ${rootPath}`
|
|
6772
|
-
]
|
|
6773
|
-
});
|
|
6774
|
-
const barrelFiles = driver.fileManager.files.filter((file) => {
|
|
6775
|
-
return file.sources.some((source) => source.isIndexable);
|
|
6776
|
-
});
|
|
6777
|
-
await hooks.emit("kubb:debug", {
|
|
6778
|
-
date: /* @__PURE__ */ new Date(),
|
|
6779
|
-
logs: [`Found ${barrelFiles.length} indexable files for barrel export`]
|
|
6780
|
-
});
|
|
6781
|
-
const existingBarrel = driver.fileManager.files.find((f) => f.path === rootPath);
|
|
6782
|
-
const rootFile = createFile({
|
|
6783
|
-
path: rootPath,
|
|
6784
|
-
baseName: BARREL_FILENAME,
|
|
6785
|
-
exports: buildBarrelExports({
|
|
6786
|
-
barrelFiles,
|
|
6787
|
-
rootDir,
|
|
6788
|
-
existingExports: new Set((_e2 = (_d2 = existingBarrel == null ? void 0 : existingBarrel.exports) == null ? void 0 : _d2.flatMap((e) => Array.isArray(e.name) ? e.name : [e.name]).filter((n) => Boolean(n))) != null ? _e2 : []),
|
|
6789
|
-
config,
|
|
6790
|
-
driver
|
|
6791
|
-
}).map((e) => createExport(e)),
|
|
6792
|
-
sources: [],
|
|
6793
|
-
imports: [],
|
|
6794
|
-
meta: {}
|
|
6795
|
-
});
|
|
6796
|
-
driver.fileManager.upsert(rootFile);
|
|
6797
|
-
await hooks.emit("kubb:debug", {
|
|
6798
|
-
date: /* @__PURE__ */ new Date(),
|
|
6799
|
-
logs: [`\u2713 Generated barrel file (${((_f2 = rootFile.exports) == null ? void 0 : _f2.length) || 0} exports)`]
|
|
6800
|
-
});
|
|
6801
|
-
}
|
|
6802
6506
|
const files = driver.fileManager.files;
|
|
6803
6507
|
const parsersMap = /* @__PURE__ */ new Map();
|
|
6804
6508
|
for (const parser of config.parsers) if (parser.extNames) for (const extname of parser.extNames) parsersMap.set(extname, parser);
|
|
@@ -6876,28 +6580,6 @@ async function build(setupResult) {
|
|
|
6876
6580
|
sources
|
|
6877
6581
|
};
|
|
6878
6582
|
}
|
|
6879
|
-
function buildBarrelExports({ barrelFiles, rootDir, existingExports, config, driver }) {
|
|
6880
|
-
const pluginNameMap = /* @__PURE__ */ new Map();
|
|
6881
|
-
for (const plugin of driver.plugins.values()) pluginNameMap.set(plugin.name, plugin);
|
|
6882
|
-
return barrelFiles.flatMap((file) => {
|
|
6883
|
-
var _a2, _b2;
|
|
6884
|
-
const containsOnlyTypes = (_a2 = file.sources) == null ? void 0 : _a2.every((source) => source.isTypeOnly);
|
|
6885
|
-
return ((_b2 = file.sources) != null ? _b2 : []).flatMap((source) => {
|
|
6886
|
-
var _a3, _b3;
|
|
6887
|
-
if (!file.path || !source.isIndexable) return [];
|
|
6888
|
-
const meta = file.meta;
|
|
6889
|
-
const pluginOptions = (_a3 = (meta == null ? void 0 : meta.pluginName) ? pluginNameMap.get(meta.pluginName) : void 0) == null ? void 0 : _a3.options;
|
|
6890
|
-
if (!pluginOptions || ((_b3 = pluginOptions.output) == null ? void 0 : _b3.barrelType) === false) return [];
|
|
6891
|
-
const exportName = config.output.barrelType === "all" ? void 0 : source.name ? [source.name] : void 0;
|
|
6892
|
-
if (exportName == null ? void 0 : exportName.some((n) => existingExports.has(n))) return [];
|
|
6893
|
-
return [createExport({
|
|
6894
|
-
name: exportName,
|
|
6895
|
-
path: getRelativePath(rootDir, file.path),
|
|
6896
|
-
isTypeOnly: config.output.barrelType === "all" ? containsOnlyTypes : source.isTypeOnly
|
|
6897
|
-
})];
|
|
6898
|
-
});
|
|
6899
|
-
});
|
|
6900
|
-
}
|
|
6901
6583
|
function inputToAdapterSource(config) {
|
|
6902
6584
|
if (Array.isArray(config.input)) return {
|
|
6903
6585
|
type: "paths",
|
|
@@ -6979,7 +6661,7 @@ const memoryStorage = createStorage(() => {
|
|
|
6979
6661
|
};
|
|
6980
6662
|
});
|
|
6981
6663
|
|
|
6982
|
-
var version = "5.0.0-alpha.
|
|
6664
|
+
var version = "5.0.0-alpha.55";
|
|
6983
6665
|
|
|
6984
6666
|
function isCommandMessage(msg) {
|
|
6985
6667
|
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.3/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.3_rolldown@1.0.0-rc.16/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.3_rolldown@1.0.0-rc.16/node_modules/nitropack/dist/runtime/internal/hash.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.16/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.3_rolldown@1.0.0-rc.16/node_modules/nitropack/dist/runtime/internal/utils.env.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.16/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.3_rolldown@1.0.0-rc.16/node_modules/nitropack/dist/runtime/internal/context.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.16/node_modules/nitropack/dist/runtime/internal/route-rules.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.16/node_modules/nitropack/dist/runtime/internal/utils.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.16/node_modules/nitropack/dist/runtime/internal/error/utils.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.16/node_modules/nitropack/dist/runtime/internal/error/prod.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.16/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","../../../../../core/dist/chunk--u3MIqq1.js","../../../../../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.3/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.3_rolldown@1.0.0-rc.16/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.3_rolldown@1.0.0-rc.16/node_modules/nitropack/dist/runtime/internal/hash.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.16/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.3_rolldown@1.0.0-rc.16/node_modules/nitropack/dist/runtime/internal/utils.env.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.16/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.3_rolldown@1.0.0-rc.16/node_modules/nitropack/dist/runtime/internal/context.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.16/node_modules/nitropack/dist/runtime/internal/route-rules.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.16/node_modules/nitropack/dist/runtime/internal/utils.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.16/node_modules/nitropack/dist/runtime/internal/error/utils.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.16/node_modules/nitropack/dist/runtime/internal/error/prod.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.16/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","../../../../../core/dist/chunk--u3MIqq1.js","../../../../../ast/dist/index.js","../../../../../core/dist/PluginDriver-Cn9cRX4m.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.3_rolldown@1.0.0-rc.16/node_modules/nitropack/dist/runtime/internal/app.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.16/node_modules/nitropack/dist/runtime/internal/lib/http-graceful-shutdown.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.16/node_modules/nitropack/dist/runtime/internal/shutdown.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.16/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","__defProp","path","exports","_b","extname","__privateAdd","__privateGet","__privateSet","__publicField","__privateMethod","readFile","writeFile","build","walk","readdir","version","_c","_d","_e","files","error","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,56,57,58,59]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubb/agent",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.55",
|
|
4
4
|
"description": "Agent server for Kubb, enabling HTTP-based access to code generation capabilities.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent",
|
|
@@ -43,17 +43,17 @@
|
|
|
43
43
|
"tinyexec": "^1.1.1",
|
|
44
44
|
"unstorage": "^1.17.5",
|
|
45
45
|
"ws": "^8.20.0",
|
|
46
|
-
"@kubb/ast": "5.0.0-alpha.
|
|
47
|
-
"@kubb/core": "5.0.0-alpha.
|
|
46
|
+
"@kubb/ast": "5.0.0-alpha.55",
|
|
47
|
+
"@kubb/core": "5.0.0-alpha.55"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@types/ws": "^8.18.1",
|
|
51
51
|
"msw": "^2.13.4",
|
|
52
52
|
"nitropack": "^2.13.3",
|
|
53
53
|
"vite": "^8.0.9",
|
|
54
|
+
"@kubb/parser-ts": "5.0.0-alpha.55",
|
|
54
55
|
"@internals/utils": "0.0.0",
|
|
55
|
-
"@kubb/adapter-oas": "5.0.0-alpha.
|
|
56
|
-
"@kubb/parser-ts": "5.0.0-alpha.53"
|
|
56
|
+
"@kubb/adapter-oas": "5.0.0-alpha.55"
|
|
57
57
|
},
|
|
58
58
|
"engines": {
|
|
59
59
|
"node": ">=22"
|