@kubb/agent 5.0.0-alpha.13 → 5.0.0-alpha.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.output/nitro.json
CHANGED
|
@@ -4665,11 +4665,33 @@ function createSchema(props) {
|
|
|
4665
4665
|
kind: "Schema"
|
|
4666
4666
|
};
|
|
4667
4667
|
}
|
|
4668
|
+
function syncPropertySchema(required, schema) {
|
|
4669
|
+
var _a;
|
|
4670
|
+
const nullable = (_a = schema.nullable) != null ? _a : false;
|
|
4671
|
+
return {
|
|
4672
|
+
...schema,
|
|
4673
|
+
optional: !required && !nullable ? true : void 0,
|
|
4674
|
+
nullish: !required && nullable ? true : void 0
|
|
4675
|
+
};
|
|
4676
|
+
}
|
|
4668
4677
|
function createProperty(props) {
|
|
4678
|
+
var _a;
|
|
4679
|
+
const required = (_a = props.required) != null ? _a : false;
|
|
4680
|
+
return {
|
|
4681
|
+
...props,
|
|
4682
|
+
kind: "Property",
|
|
4683
|
+
required,
|
|
4684
|
+
schema: syncPropertySchema(required, props.schema)
|
|
4685
|
+
};
|
|
4686
|
+
}
|
|
4687
|
+
function createParameter(props) {
|
|
4688
|
+
var _a;
|
|
4689
|
+
const required = (_a = props.required) != null ? _a : false;
|
|
4669
4690
|
return {
|
|
4670
|
-
required: false,
|
|
4671
4691
|
...props,
|
|
4672
|
-
kind: "
|
|
4692
|
+
kind: "Parameter",
|
|
4693
|
+
required,
|
|
4694
|
+
schema: syncPropertySchema(required, props.schema)
|
|
4673
4695
|
};
|
|
4674
4696
|
}
|
|
4675
4697
|
function definePrinter(build) {
|
|
@@ -4825,117 +4847,146 @@ function getChildren(node, recurse) {
|
|
|
4825
4847
|
return [];
|
|
4826
4848
|
}
|
|
4827
4849
|
}
|
|
4828
|
-
async function walk(node,
|
|
4850
|
+
async function walk(node, options) {
|
|
4829
4851
|
var _a, _b;
|
|
4830
|
-
return _walk(node,
|
|
4852
|
+
return _walk(node, options, ((_a = options.depth) != null ? _a : visitorDepths.deep) === visitorDepths.deep, createLimit((_b = options.concurrency) != null ? _b : 30), void 0);
|
|
4831
4853
|
}
|
|
4832
|
-
async function _walk(node, visitor, recurse, limit) {
|
|
4854
|
+
async function _walk(node, visitor, recurse, limit, parent) {
|
|
4833
4855
|
switch (node.kind) {
|
|
4834
4856
|
case "Root":
|
|
4835
4857
|
await limit(() => {
|
|
4836
4858
|
var _a;
|
|
4837
|
-
return (_a = visitor.root) == null ? void 0 : _a.call(visitor, node);
|
|
4859
|
+
return (_a = visitor.root) == null ? void 0 : _a.call(visitor, node, { parent });
|
|
4838
4860
|
});
|
|
4839
4861
|
break;
|
|
4840
4862
|
case "Operation":
|
|
4841
4863
|
await limit(() => {
|
|
4842
4864
|
var _a;
|
|
4843
|
-
return (_a = visitor.operation) == null ? void 0 : _a.call(visitor, node);
|
|
4865
|
+
return (_a = visitor.operation) == null ? void 0 : _a.call(visitor, node, { parent });
|
|
4844
4866
|
});
|
|
4845
4867
|
break;
|
|
4846
4868
|
case "Schema":
|
|
4847
4869
|
await limit(() => {
|
|
4848
4870
|
var _a;
|
|
4849
|
-
return (_a = visitor.schema) == null ? void 0 : _a.call(visitor, node);
|
|
4871
|
+
return (_a = visitor.schema) == null ? void 0 : _a.call(visitor, node, { parent });
|
|
4850
4872
|
});
|
|
4851
4873
|
break;
|
|
4852
4874
|
case "Property":
|
|
4853
4875
|
await limit(() => {
|
|
4854
4876
|
var _a;
|
|
4855
|
-
return (_a = visitor.property) == null ? void 0 : _a.call(visitor, node);
|
|
4877
|
+
return (_a = visitor.property) == null ? void 0 : _a.call(visitor, node, { parent });
|
|
4856
4878
|
});
|
|
4857
4879
|
break;
|
|
4858
4880
|
case "Parameter":
|
|
4859
4881
|
await limit(() => {
|
|
4860
4882
|
var _a;
|
|
4861
|
-
return (_a = visitor.parameter) == null ? void 0 : _a.call(visitor, node);
|
|
4883
|
+
return (_a = visitor.parameter) == null ? void 0 : _a.call(visitor, node, { parent });
|
|
4862
4884
|
});
|
|
4863
4885
|
break;
|
|
4864
4886
|
case "Response":
|
|
4865
4887
|
await limit(() => {
|
|
4866
4888
|
var _a;
|
|
4867
|
-
return (_a = visitor.response) == null ? void 0 : _a.call(visitor, node);
|
|
4889
|
+
return (_a = visitor.response) == null ? void 0 : _a.call(visitor, node, { parent });
|
|
4868
4890
|
});
|
|
4869
4891
|
break;
|
|
4870
4892
|
}
|
|
4871
4893
|
const children = getChildren(node, recurse);
|
|
4872
|
-
await Promise.all(children.map((child) => _walk(child, visitor, recurse, limit)));
|
|
4894
|
+
await Promise.all(children.map((child) => _walk(child, visitor, recurse, limit, node)));
|
|
4873
4895
|
}
|
|
4874
|
-
function transform(node,
|
|
4875
|
-
var _a, _b, _c, _d, _e, _f, _g, _h
|
|
4876
|
-
const
|
|
4896
|
+
function transform(node, options) {
|
|
4897
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
4898
|
+
const { depth, parent, ...visitor } = options;
|
|
4899
|
+
const recurse = (depth != null ? depth : visitorDepths.deep) === visitorDepths.deep;
|
|
4877
4900
|
switch (node.kind) {
|
|
4878
4901
|
case "Root": {
|
|
4879
4902
|
let root = node;
|
|
4880
|
-
const replaced = (
|
|
4903
|
+
const replaced = (_a = visitor.root) == null ? void 0 : _a.call(visitor, root, { parent });
|
|
4881
4904
|
if (replaced) root = replaced;
|
|
4882
4905
|
return {
|
|
4883
4906
|
...root,
|
|
4884
|
-
schemas: root.schemas.map((s) => transform(s,
|
|
4885
|
-
|
|
4907
|
+
schemas: root.schemas.map((s) => transform(s, {
|
|
4908
|
+
...options,
|
|
4909
|
+
parent: root
|
|
4910
|
+
})),
|
|
4911
|
+
operations: root.operations.map((op) => transform(op, {
|
|
4912
|
+
...options,
|
|
4913
|
+
parent: root
|
|
4914
|
+
}))
|
|
4886
4915
|
};
|
|
4887
4916
|
}
|
|
4888
4917
|
case "Operation": {
|
|
4889
4918
|
let op = node;
|
|
4890
|
-
const replaced = (
|
|
4919
|
+
const replaced = (_b = visitor.operation) == null ? void 0 : _b.call(visitor, op, { parent });
|
|
4891
4920
|
if (replaced) op = replaced;
|
|
4892
4921
|
return {
|
|
4893
4922
|
...op,
|
|
4894
|
-
parameters: op.parameters.map((p) => transform(p,
|
|
4923
|
+
parameters: op.parameters.map((p) => transform(p, {
|
|
4924
|
+
...options,
|
|
4925
|
+
parent: op
|
|
4926
|
+
})),
|
|
4895
4927
|
requestBody: op.requestBody ? {
|
|
4896
4928
|
...op.requestBody,
|
|
4897
|
-
schema: op.requestBody.schema ? transform(op.requestBody.schema,
|
|
4929
|
+
schema: op.requestBody.schema ? transform(op.requestBody.schema, {
|
|
4930
|
+
...options,
|
|
4931
|
+
parent: op
|
|
4932
|
+
}) : void 0
|
|
4898
4933
|
} : void 0,
|
|
4899
|
-
responses: op.responses.map((r) => transform(r,
|
|
4934
|
+
responses: op.responses.map((r) => transform(r, {
|
|
4935
|
+
...options,
|
|
4936
|
+
parent: op
|
|
4937
|
+
}))
|
|
4900
4938
|
};
|
|
4901
4939
|
}
|
|
4902
4940
|
case "Schema": {
|
|
4903
4941
|
let schema = node;
|
|
4904
|
-
const replaced = (
|
|
4942
|
+
const replaced = (_c = visitor.schema) == null ? void 0 : _c.call(visitor, schema, { parent });
|
|
4905
4943
|
if (replaced) schema = replaced;
|
|
4944
|
+
const childOptions = {
|
|
4945
|
+
...options,
|
|
4946
|
+
parent: schema
|
|
4947
|
+
};
|
|
4906
4948
|
return {
|
|
4907
4949
|
...schema,
|
|
4908
|
-
..."properties" in schema && recurse ? { properties: schema.properties.map((p) => transform(p,
|
|
4909
|
-
..."items" in schema && recurse ? { items: (
|
|
4910
|
-
..."members" in schema && recurse ? { members: (
|
|
4911
|
-
..."additionalProperties" in schema && recurse && schema.additionalProperties && schema.additionalProperties !== true ? { additionalProperties: transform(schema.additionalProperties,
|
|
4950
|
+
..."properties" in schema && recurse ? { properties: schema.properties.map((p) => transform(p, childOptions)) } : {},
|
|
4951
|
+
..."items" in schema && recurse ? { items: (_d = schema.items) == null ? void 0 : _d.map((i) => transform(i, childOptions)) } : {},
|
|
4952
|
+
..."members" in schema && recurse ? { members: (_e = schema.members) == null ? void 0 : _e.map((m) => transform(m, childOptions)) } : {},
|
|
4953
|
+
..."additionalProperties" in schema && recurse && schema.additionalProperties && schema.additionalProperties !== true ? { additionalProperties: transform(schema.additionalProperties, childOptions) } : {}
|
|
4912
4954
|
};
|
|
4913
4955
|
}
|
|
4914
4956
|
case "Property": {
|
|
4915
4957
|
let prop = node;
|
|
4916
|
-
const replaced = (
|
|
4958
|
+
const replaced = (_f = visitor.property) == null ? void 0 : _f.call(visitor, prop, { parent });
|
|
4917
4959
|
if (replaced) prop = replaced;
|
|
4918
|
-
return {
|
|
4960
|
+
return createProperty({
|
|
4919
4961
|
...prop,
|
|
4920
|
-
schema: transform(prop.schema,
|
|
4921
|
-
|
|
4962
|
+
schema: transform(prop.schema, {
|
|
4963
|
+
...options,
|
|
4964
|
+
parent: prop
|
|
4965
|
+
})
|
|
4966
|
+
});
|
|
4922
4967
|
}
|
|
4923
4968
|
case "Parameter": {
|
|
4924
4969
|
let param = node;
|
|
4925
|
-
const replaced = (
|
|
4970
|
+
const replaced = (_g = visitor.parameter) == null ? void 0 : _g.call(visitor, param, { parent });
|
|
4926
4971
|
if (replaced) param = replaced;
|
|
4927
|
-
return {
|
|
4972
|
+
return createParameter({
|
|
4928
4973
|
...param,
|
|
4929
|
-
schema: transform(param.schema,
|
|
4930
|
-
|
|
4974
|
+
schema: transform(param.schema, {
|
|
4975
|
+
...options,
|
|
4976
|
+
parent: param
|
|
4977
|
+
})
|
|
4978
|
+
});
|
|
4931
4979
|
}
|
|
4932
4980
|
case "Response": {
|
|
4933
4981
|
let response = node;
|
|
4934
|
-
const replaced = (
|
|
4982
|
+
const replaced = (_h = visitor.response) == null ? void 0 : _h.call(visitor, response, { parent });
|
|
4935
4983
|
if (replaced) response = replaced;
|
|
4936
4984
|
return {
|
|
4937
4985
|
...response,
|
|
4938
|
-
schema: transform(response.schema,
|
|
4986
|
+
schema: transform(response.schema, {
|
|
4987
|
+
...options,
|
|
4988
|
+
parent: response
|
|
4989
|
+
})
|
|
4939
4990
|
};
|
|
4940
4991
|
}
|
|
4941
4992
|
case "FunctionParameter":
|
|
@@ -4944,33 +4995,77 @@ function transform(node, visitor, options = {}) {
|
|
|
4944
4995
|
return node;
|
|
4945
4996
|
}
|
|
4946
4997
|
}
|
|
4947
|
-
function
|
|
4948
|
-
|
|
4949
|
-
|
|
4998
|
+
function composeTransformers(...visitors) {
|
|
4999
|
+
return {
|
|
5000
|
+
root(node, context) {
|
|
5001
|
+
return visitors.reduce((acc, v) => {
|
|
5002
|
+
var _a, _b;
|
|
5003
|
+
return (_b = (_a = v.root) == null ? void 0 : _a.call(v, acc, context)) != null ? _b : acc;
|
|
5004
|
+
}, node);
|
|
5005
|
+
},
|
|
5006
|
+
operation(node, context) {
|
|
5007
|
+
return visitors.reduce((acc, v) => {
|
|
5008
|
+
var _a, _b;
|
|
5009
|
+
return (_b = (_a = v.operation) == null ? void 0 : _a.call(v, acc, context)) != null ? _b : acc;
|
|
5010
|
+
}, node);
|
|
5011
|
+
},
|
|
5012
|
+
schema(node, context) {
|
|
5013
|
+
return visitors.reduce((acc, v) => {
|
|
5014
|
+
var _a, _b;
|
|
5015
|
+
return (_b = (_a = v.schema) == null ? void 0 : _a.call(v, acc, context)) != null ? _b : acc;
|
|
5016
|
+
}, node);
|
|
5017
|
+
},
|
|
5018
|
+
property(node, context) {
|
|
5019
|
+
return visitors.reduce((acc, v) => {
|
|
5020
|
+
var _a, _b;
|
|
5021
|
+
return (_b = (_a = v.property) == null ? void 0 : _a.call(v, acc, context)) != null ? _b : acc;
|
|
5022
|
+
}, node);
|
|
5023
|
+
},
|
|
5024
|
+
parameter(node, context) {
|
|
5025
|
+
return visitors.reduce((acc, v) => {
|
|
5026
|
+
var _a, _b;
|
|
5027
|
+
return (_b = (_a = v.parameter) == null ? void 0 : _a.call(v, acc, context)) != null ? _b : acc;
|
|
5028
|
+
}, node);
|
|
5029
|
+
},
|
|
5030
|
+
response(node, context) {
|
|
5031
|
+
return visitors.reduce((acc, v) => {
|
|
5032
|
+
var _a, _b;
|
|
5033
|
+
return (_b = (_a = v.response) == null ? void 0 : _a.call(v, acc, context)) != null ? _b : acc;
|
|
5034
|
+
}, node);
|
|
5035
|
+
}
|
|
5036
|
+
};
|
|
5037
|
+
}
|
|
5038
|
+
function collect(node, options) {
|
|
5039
|
+
var _a, _b, _c, _d, _e, _f;
|
|
5040
|
+
const { depth, parent, ...visitor } = options;
|
|
5041
|
+
const recurse = (depth != null ? depth : visitorDepths.deep) === visitorDepths.deep;
|
|
4950
5042
|
const results = [];
|
|
4951
5043
|
let v;
|
|
4952
5044
|
switch (node.kind) {
|
|
4953
5045
|
case "Root":
|
|
4954
|
-
v = (
|
|
5046
|
+
v = (_a = visitor.root) == null ? void 0 : _a.call(visitor, node, { parent });
|
|
4955
5047
|
break;
|
|
4956
5048
|
case "Operation":
|
|
4957
|
-
v = (
|
|
5049
|
+
v = (_b = visitor.operation) == null ? void 0 : _b.call(visitor, node, { parent });
|
|
4958
5050
|
break;
|
|
4959
5051
|
case "Schema":
|
|
4960
|
-
v = (
|
|
5052
|
+
v = (_c = visitor.schema) == null ? void 0 : _c.call(visitor, node, { parent });
|
|
4961
5053
|
break;
|
|
4962
5054
|
case "Property":
|
|
4963
|
-
v = (
|
|
5055
|
+
v = (_d = visitor.property) == null ? void 0 : _d.call(visitor, node, { parent });
|
|
4964
5056
|
break;
|
|
4965
5057
|
case "Parameter":
|
|
4966
|
-
v = (
|
|
5058
|
+
v = (_e = visitor.parameter) == null ? void 0 : _e.call(visitor, node, { parent });
|
|
4967
5059
|
break;
|
|
4968
5060
|
case "Response":
|
|
4969
|
-
v = (
|
|
5061
|
+
v = (_f = visitor.response) == null ? void 0 : _f.call(visitor, node, { parent });
|
|
4970
5062
|
break;
|
|
4971
5063
|
}
|
|
4972
5064
|
if (v !== void 0) results.push(v);
|
|
4973
|
-
for (const child of getChildren(node, recurse)) for (const item of collect(child,
|
|
5065
|
+
for (const child of getChildren(node, recurse)) for (const item of collect(child, {
|
|
5066
|
+
...options,
|
|
5067
|
+
parent: node
|
|
5068
|
+
})) results.push(item);
|
|
4974
5069
|
return results;
|
|
4975
5070
|
}
|
|
4976
5071
|
|
|
@@ -6029,7 +6124,7 @@ const fsStorage = createStorage(() => ({
|
|
|
6029
6124
|
await clean(resolve(base));
|
|
6030
6125
|
}
|
|
6031
6126
|
}));
|
|
6032
|
-
var version$1 = "5.0.0-alpha.
|
|
6127
|
+
var version$1 = "5.0.0-alpha.15";
|
|
6033
6128
|
function getDiagnosticInfo() {
|
|
6034
6129
|
return {
|
|
6035
6130
|
nodeVersion: version$2,
|
|
@@ -6789,6 +6884,12 @@ async function detectLinter() {
|
|
|
6789
6884
|
]);
|
|
6790
6885
|
for (const linter of linterNames) if (await isLinterAvailable(linter)) return linter;
|
|
6791
6886
|
}
|
|
6887
|
+
function mergeResolvers(...resolvers) {
|
|
6888
|
+
return resolvers.reduce((acc, curr) => ({
|
|
6889
|
+
...acc,
|
|
6890
|
+
...curr
|
|
6891
|
+
}), resolvers[0]);
|
|
6892
|
+
}
|
|
6792
6893
|
function getPackageJSONSync(cwd) {
|
|
6793
6894
|
const pkgPath = pkg.up({ cwd });
|
|
6794
6895
|
if (!pkgPath) return;
|
|
@@ -6816,7 +6917,7 @@ function satisfiesDependency(dependency, version2, cwd) {
|
|
|
6816
6917
|
return satisfies(semVer, version2);
|
|
6817
6918
|
}
|
|
6818
6919
|
|
|
6819
|
-
var version = "5.0.0-alpha.
|
|
6920
|
+
var version = "5.0.0-alpha.15";
|
|
6820
6921
|
|
|
6821
6922
|
function isCommandMessage(msg) {
|
|
6822
6923
|
return msg.type === "command";
|
|
@@ -209639,10 +209740,10 @@ function buildParamsSchema({ params, node, resolver }) {
|
|
|
209639
209740
|
type: "object",
|
|
209640
209741
|
properties: params.map((param) => createProperty({
|
|
209641
209742
|
name: param.name,
|
|
209743
|
+
required: param.required,
|
|
209642
209744
|
schema: createSchema({
|
|
209643
209745
|
type: "ref",
|
|
209644
|
-
name: resolver.resolveParamName(node, param)
|
|
209645
|
-
optional: !param.required
|
|
209746
|
+
name: resolver.resolveParamName(node, param)
|
|
209646
209747
|
})
|
|
209647
209748
|
}))
|
|
209648
209749
|
});
|
|
@@ -209669,14 +209770,12 @@ function buildDataSchemaNode({ node, resolver }) {
|
|
|
209669
209770
|
}),
|
|
209670
209771
|
createProperty({
|
|
209671
209772
|
name: "pathParams",
|
|
209773
|
+
required: pathParams.length > 0,
|
|
209672
209774
|
schema: pathParams.length > 0 ? buildParamsSchema({
|
|
209673
209775
|
params: pathParams,
|
|
209674
209776
|
node,
|
|
209675
209777
|
resolver
|
|
209676
|
-
}) : createSchema({
|
|
209677
|
-
type: "never",
|
|
209678
|
-
optional: true
|
|
209679
|
-
})
|
|
209778
|
+
}) : createSchema({ type: "never" })
|
|
209680
209779
|
}),
|
|
209681
209780
|
createProperty({
|
|
209682
209781
|
name: "queryParams",
|
|
@@ -209708,6 +209807,7 @@ function buildDataSchemaNode({ node, resolver }) {
|
|
|
209708
209807
|
}),
|
|
209709
209808
|
createProperty({
|
|
209710
209809
|
name: "url",
|
|
209810
|
+
required: true,
|
|
209711
209811
|
schema: createSchema({
|
|
209712
209812
|
type: "url",
|
|
209713
209813
|
path: node.path
|
|
@@ -209722,6 +209822,7 @@ function buildResponsesSchemaNode({ node, resolver }) {
|
|
|
209722
209822
|
type: "object",
|
|
209723
209823
|
properties: node.responses.map((res) => createProperty({
|
|
209724
209824
|
name: String(res.statusCode),
|
|
209825
|
+
required: true,
|
|
209725
209826
|
schema: createSchema({
|
|
209726
209827
|
type: "ref",
|
|
209727
209828
|
name: resolver.resolveResponseStatusTypedName(node, res.statusCode)
|
|
@@ -209744,10 +209845,7 @@ function buildGroupedParamsSchema({ params, parentName }) {
|
|
|
209744
209845
|
return createSchema({
|
|
209745
209846
|
type: "object",
|
|
209746
209847
|
properties: params.map((param) => {
|
|
209747
|
-
let schema =
|
|
209748
|
-
...param.schema,
|
|
209749
|
-
optional: !param.required
|
|
209750
|
-
};
|
|
209848
|
+
let schema = param.schema;
|
|
209751
209849
|
if (narrowSchema(schema, "enum") && !schema.name && parentName) schema = {
|
|
209752
209850
|
...schema,
|
|
209753
209851
|
name: pascalCase$6([
|
|
@@ -209758,6 +209856,7 @@ function buildGroupedParamsSchema({ params, parentName }) {
|
|
|
209758
209856
|
};
|
|
209759
209857
|
return createProperty({
|
|
209760
209858
|
name: param.name,
|
|
209859
|
+
required: param.required,
|
|
209761
209860
|
schema
|
|
209762
209861
|
});
|
|
209763
209862
|
})
|
|
@@ -209793,10 +209892,12 @@ function buildLegacyResponsesSchemaNode({ node, resolver }) {
|
|
|
209793
209892
|
}) : createSchema({ type: "any" });
|
|
209794
209893
|
const properties = [createProperty({
|
|
209795
209894
|
name: "Response",
|
|
209895
|
+
required: true,
|
|
209796
209896
|
schema: responseSchema
|
|
209797
209897
|
})];
|
|
209798
209898
|
if (!isGet && ((_a = node.requestBody) == null ? void 0 : _a.schema)) properties.push(createProperty({
|
|
209799
209899
|
name: "Request",
|
|
209900
|
+
required: true,
|
|
209800
209901
|
schema: createSchema({
|
|
209801
209902
|
type: "ref",
|
|
209802
209903
|
name: resolver.resolveDataTypedName(node)
|
|
@@ -209804,6 +209905,7 @@ function buildLegacyResponsesSchemaNode({ node, resolver }) {
|
|
|
209804
209905
|
}));
|
|
209805
209906
|
if (node.parameters.some((p) => p.in === "query") && resolver.resolveQueryParamsTypedName) properties.push(createProperty({
|
|
209806
209907
|
name: "QueryParams",
|
|
209908
|
+
required: true,
|
|
209807
209909
|
schema: createSchema({
|
|
209808
209910
|
type: "ref",
|
|
209809
209911
|
name: resolver.resolveQueryParamsTypedName(node)
|
|
@@ -209811,6 +209913,7 @@ function buildLegacyResponsesSchemaNode({ node, resolver }) {
|
|
|
209811
209913
|
}));
|
|
209812
209914
|
if (node.parameters.some((p) => p.in === "path") && resolver.resolvePathParamsTypedName) properties.push(createProperty({
|
|
209813
209915
|
name: "PathParams",
|
|
209916
|
+
required: true,
|
|
209814
209917
|
schema: createSchema({
|
|
209815
209918
|
type: "ref",
|
|
209816
209919
|
name: resolver.resolvePathParamsTypedName(node)
|
|
@@ -209818,6 +209921,7 @@ function buildLegacyResponsesSchemaNode({ node, resolver }) {
|
|
|
209818
209921
|
}));
|
|
209819
209922
|
if (node.parameters.some((p) => p.in === "header") && resolver.resolveHeaderParamsTypedName) properties.push(createProperty({
|
|
209820
209923
|
name: "HeaderParams",
|
|
209924
|
+
required: true,
|
|
209821
209925
|
schema: createSchema({
|
|
209822
209926
|
type: "ref",
|
|
209823
209927
|
name: resolver.resolveHeaderParamsTypedName(node)
|
|
@@ -209825,6 +209929,7 @@ function buildLegacyResponsesSchemaNode({ node, resolver }) {
|
|
|
209825
209929
|
}));
|
|
209826
209930
|
properties.push(createProperty({
|
|
209827
209931
|
name: "Errors",
|
|
209932
|
+
required: true,
|
|
209828
209933
|
schema: errorsSchema
|
|
209829
209934
|
}));
|
|
209830
209935
|
return createSchema({
|
|
@@ -209879,7 +209984,7 @@ const typeGenerator = defineGenerator({
|
|
|
209879
209984
|
type: "react",
|
|
209880
209985
|
Operation({ node, adapter, options }) {
|
|
209881
209986
|
var _a, _b, _c;
|
|
209882
|
-
const { enumType, enumKeyCasing, optionalType, arrayType, syntaxType, paramsCasing, group, resolver, baseResolver, legacy } = options;
|
|
209987
|
+
const { enumType, enumKeyCasing, optionalType, arrayType, syntaxType, paramsCasing, group, resolver, baseResolver, legacy, transformers = [] } = options;
|
|
209883
209988
|
const { mode, getFile, resolveBanner, resolveFooter } = useKubb();
|
|
209884
209989
|
const file = getFile({
|
|
209885
209990
|
name: node.operationId,
|
|
@@ -209890,7 +209995,8 @@ const typeGenerator = defineGenerator({
|
|
|
209890
209995
|
const params = applyParamsCasing$1(node.parameters, paramsCasing);
|
|
209891
209996
|
function renderSchemaType({ node: schemaNode, name, typedName, description, keysToOmit }) {
|
|
209892
209997
|
if (!schemaNode) return null;
|
|
209893
|
-
const
|
|
209998
|
+
const transformedNode = transform(schemaNode, composeTransformers(...transformers));
|
|
209999
|
+
const imports = adapter.getImports(transformedNode, (schemaName) => ({
|
|
209894
210000
|
name: resolver.default(schemaName, "type"),
|
|
209895
210001
|
path: getFile({
|
|
209896
210002
|
name: schemaName,
|
|
@@ -209910,7 +210016,7 @@ const typeGenerator = defineGenerator({
|
|
|
209910
210016
|
].join("-"))), /* @__PURE__ */ jsx(Type, {
|
|
209911
210017
|
name,
|
|
209912
210018
|
typedName,
|
|
209913
|
-
node:
|
|
210019
|
+
node: transformedNode,
|
|
209914
210020
|
description,
|
|
209915
210021
|
enumType,
|
|
209916
210022
|
enumKeyCasing,
|
|
@@ -209924,7 +210030,7 @@ const typeGenerator = defineGenerator({
|
|
|
209924
210030
|
}
|
|
209925
210031
|
const responseTypes = legacy ? node.responses.map((res) => {
|
|
209926
210032
|
const responseName = resolver.resolveResponseStatusName(node, res.statusCode);
|
|
209927
|
-
const baseResponseName =
|
|
210033
|
+
const baseResponseName = baseResolver.resolveResponseStatusName(node, res.statusCode);
|
|
209928
210034
|
return renderSchemaType({
|
|
209929
210035
|
node: res.schema ? nameUnnamedEnums(res.schema, baseResponseName) : res.schema,
|
|
209930
210036
|
name: responseName,
|
|
@@ -209940,7 +210046,7 @@ const typeGenerator = defineGenerator({
|
|
|
209940
210046
|
keysToOmit: res.keysToOmit
|
|
209941
210047
|
}));
|
|
209942
210048
|
const requestType = ((_b = node.requestBody) == null ? void 0 : _b.schema) ? renderSchemaType({
|
|
209943
|
-
node: legacy ? nameUnnamedEnums(node.requestBody.schema,
|
|
210049
|
+
node: legacy ? nameUnnamedEnums(node.requestBody.schema, baseResolver.resolveDataName(node)) : node.requestBody.schema,
|
|
209944
210050
|
name: resolver.resolveDataName(node),
|
|
209945
210051
|
typedName: resolver.resolveDataTypedName(node),
|
|
209946
210052
|
description: (_c = node.requestBody.description) != null ? _c : node.requestBody.schema.description,
|
|
@@ -209954,7 +210060,7 @@ const typeGenerator = defineGenerator({
|
|
|
209954
210060
|
pathParams.length > 0 ? renderSchemaType({
|
|
209955
210061
|
node: buildGroupedParamsSchema({
|
|
209956
210062
|
params: pathParams,
|
|
209957
|
-
parentName:
|
|
210063
|
+
parentName: baseResolver.resolvePathParamsName(node)
|
|
209958
210064
|
}),
|
|
209959
210065
|
name: resolver.resolvePathParamsName(node),
|
|
209960
210066
|
typedName: resolver.resolvePathParamsTypedName(node)
|
|
@@ -209962,7 +210068,7 @@ const typeGenerator = defineGenerator({
|
|
|
209962
210068
|
queryParams.length > 0 ? renderSchemaType({
|
|
209963
210069
|
node: buildGroupedParamsSchema({
|
|
209964
210070
|
params: queryParams,
|
|
209965
|
-
parentName:
|
|
210071
|
+
parentName: baseResolver.resolveQueryParamsName(node)
|
|
209966
210072
|
}),
|
|
209967
210073
|
name: resolver.resolveQueryParamsName(node),
|
|
209968
210074
|
typedName: resolver.resolveQueryParamsTypedName(node)
|
|
@@ -209970,7 +210076,7 @@ const typeGenerator = defineGenerator({
|
|
|
209970
210076
|
headerParams.length > 0 ? renderSchemaType({
|
|
209971
210077
|
node: buildGroupedParamsSchema({
|
|
209972
210078
|
params: headerParams,
|
|
209973
|
-
parentName:
|
|
210079
|
+
parentName: baseResolver.resolveHeaderParamsName(node)
|
|
209974
210080
|
}),
|
|
209975
210081
|
name: resolver.resolveHeaderParamsName(node),
|
|
209976
210082
|
typedName: resolver.resolveHeaderParamsTypedName(node)
|
|
@@ -210068,10 +210174,11 @@ const typeGenerator = defineGenerator({
|
|
|
210068
210174
|
});
|
|
210069
210175
|
},
|
|
210070
210176
|
Schema({ node, adapter, options }) {
|
|
210071
|
-
const { enumType, enumKeyCasing, syntaxType, optionalType, arrayType, resolver, legacy } = options;
|
|
210177
|
+
const { enumType, enumKeyCasing, syntaxType, optionalType, arrayType, resolver, legacy, transformers = [] } = options;
|
|
210072
210178
|
const { mode, getFile, resolveBanner, resolveFooter } = useKubb();
|
|
210073
210179
|
if (!node.name) return;
|
|
210074
|
-
const
|
|
210180
|
+
const transformedNode = transform(node, composeTransformers(...transformers));
|
|
210181
|
+
const imports = adapter.getImports(transformedNode, (schemaName) => ({
|
|
210075
210182
|
name: resolver.default(schemaName, "type"),
|
|
210076
210183
|
path: getFile({
|
|
210077
210184
|
name: schemaName,
|
|
@@ -210108,7 +210215,7 @@ const typeGenerator = defineGenerator({
|
|
|
210108
210215
|
].join("-"))), /* @__PURE__ */ jsx(Type, {
|
|
210109
210216
|
name: type.name,
|
|
210110
210217
|
typedName: type.typedName,
|
|
210111
|
-
node,
|
|
210218
|
+
node: transformedNode,
|
|
210112
210219
|
enumType,
|
|
210113
210220
|
enumKeyCasing,
|
|
210114
210221
|
optionalType,
|
|
@@ -210126,6 +210233,7 @@ function resolveName(name, type) {
|
|
|
210126
210233
|
}
|
|
210127
210234
|
const resolverTs = defineResolver(() => {
|
|
210128
210235
|
return {
|
|
210236
|
+
name: "default",
|
|
210129
210237
|
default(name, type) {
|
|
210130
210238
|
return resolveName(name, type);
|
|
210131
210239
|
},
|
|
@@ -210201,6 +210309,7 @@ const resolverTs = defineResolver(() => {
|
|
|
210201
210309
|
const resolverTsLegacy = defineResolver(() => {
|
|
210202
210310
|
return {
|
|
210203
210311
|
...resolverTs,
|
|
210312
|
+
name: "legacy",
|
|
210204
210313
|
resolveResponseStatusName(node, statusCode) {
|
|
210205
210314
|
if (statusCode === "default") return this.resolveName(`${node.operationId} Error`);
|
|
210206
210315
|
return this.resolveName(`${node.operationId} ${statusCode}`);
|
|
@@ -210259,21 +210368,14 @@ const pluginTs = createPlugin((options) => {
|
|
|
210259
210368
|
const { output = {
|
|
210260
210369
|
path: "types",
|
|
210261
210370
|
barrelType: "named"
|
|
210262
|
-
}, group, exclude = [], include, override = [], enumType = "asConst", enumKeyCasing = "none", optionalType = "questionToken", arrayType = "array", syntaxType = "type",
|
|
210371
|
+
}, group, exclude = [], include, override = [], enumType = "asConst", enumKeyCasing = "none", optionalType = "questionToken", arrayType = "array", syntaxType = "type", paramsCasing, generators = [typeGenerator].filter(Boolean), legacy = false, resolvers: userResolvers, transformers = [] } = options;
|
|
210263
210372
|
const baseResolver = legacy ? resolverTsLegacy : resolverTs;
|
|
210264
|
-
const resolver = (
|
|
210265
|
-
...baseResolver,
|
|
210266
|
-
default(name, type) {
|
|
210267
|
-
const resolved = baseResolver.default(name, type);
|
|
210268
|
-
return transformers.name(resolved, type) || resolved;
|
|
210269
|
-
}
|
|
210270
|
-
} : baseResolver;
|
|
210373
|
+
const resolver = mergeResolvers(...userResolvers != null ? userResolvers : [baseResolver]);
|
|
210271
210374
|
let resolveNameWarning = false;
|
|
210272
210375
|
return {
|
|
210273
210376
|
name: pluginTsName,
|
|
210274
210377
|
options: {
|
|
210275
210378
|
output,
|
|
210276
|
-
transformers,
|
|
210277
210379
|
optionalType,
|
|
210278
210380
|
arrayType,
|
|
210279
210381
|
enumType,
|
|
@@ -210284,7 +210386,8 @@ const pluginTs = createPlugin((options) => {
|
|
|
210284
210386
|
paramsCasing,
|
|
210285
210387
|
legacy,
|
|
210286
210388
|
resolver,
|
|
210287
|
-
baseResolver
|
|
210389
|
+
baseResolver,
|
|
210390
|
+
transformers
|
|
210288
210391
|
},
|
|
210289
210392
|
resolvePath(baseName, pathMode, options2) {
|
|
210290
210393
|
var _a, _b;
|
|
@@ -210315,6 +210418,7 @@ const pluginTs = createPlugin((options) => {
|
|
|
210315
210418
|
if (!adapter) throw new Error("Plugin cannot work without adapter being set");
|
|
210316
210419
|
await openInStudio({ ast: true });
|
|
210317
210420
|
await walk(rootNode, {
|
|
210421
|
+
depth: "shallow",
|
|
210318
210422
|
async schema(schemaNode) {
|
|
210319
210423
|
const writeTasks = generators.map(async (generator) => {
|
|
210320
210424
|
if (generator.type === "react" && generator.version === "2") {
|
|
@@ -210363,7 +210467,7 @@ const pluginTs = createPlugin((options) => {
|
|
|
210363
210467
|
});
|
|
210364
210468
|
await Promise.all(writeTasks);
|
|
210365
210469
|
}
|
|
210366
|
-
}
|
|
210470
|
+
});
|
|
210367
210471
|
const barrelFiles = await getBarrelFiles(this.fabric.files, {
|
|
210368
210472
|
type: (_a = output.barrelType) != null ? _a : "named",
|
|
210369
210473
|
root,
|
|
@@ -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.4/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.9/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.4_db0@0.3.4_ioredis@5.10.1/node_modules/unstorage/dist/shared/unstorage.zVDD2mZo.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.4_db0@0.3.4_ioredis@5.10.1/node_modules/unstorage/dist/index.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.4_db0@0.3.4_ioredis@5.10.1/node_modules/unstorage/drivers/utils/index.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.4_db0@0.3.4_ioredis@5.10.1/node_modules/unstorage/drivers/utils/node-fs.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.4_db0@0.3.4_ioredis@5.10.1/node_modules/unstorage/drivers/fs.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.4_db0@0.3.4_ioredis@5.10.1/node_modules/unstorage/drivers/fs-lite.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.2_encoding@0.1.13_rolldown@1.0.0-rc.10/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.2_encoding@0.1.13_rolldown@1.0.0-rc.10/node_modules/nitropack/dist/runtime/internal/hash.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.2_encoding@0.1.13_rolldown@1.0.0-rc.10/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.2_encoding@0.1.13_rolldown@1.0.0-rc.10/node_modules/nitropack/dist/runtime/internal/utils.env.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.2_encoding@0.1.13_rolldown@1.0.0-rc.10/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.2_encoding@0.1.13_rolldown@1.0.0-rc.10/node_modules/nitropack/dist/runtime/internal/context.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.2_encoding@0.1.13_rolldown@1.0.0-rc.10/node_modules/nitropack/dist/runtime/internal/route-rules.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.2_encoding@0.1.13_rolldown@1.0.0-rc.10/node_modules/nitropack/dist/runtime/internal/utils.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.2_encoding@0.1.13_rolldown@1.0.0-rc.10/node_modules/nitropack/dist/runtime/internal/error/utils.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.2_encoding@0.1.13_rolldown@1.0.0-rc.10/node_modules/nitropack/dist/runtime/internal/error/prod.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.2_encoding@0.1.13_rolldown@1.0.0-rc.10/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/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","../../../../../plugin-client/dist/chunk--u3MIqq1.js","../../../../../plugin-oas/dist/getFooter-Dz4u5Mg4.js","../../../../../plugin-oas/dist/SchemaMapper-CqMkO2T1.js","../../../../../oas/dist/index.js","../../../../../plugin-oas/dist/requestBody-bs_SwfEj.js","../../../../../plugin-oas/dist/utils.js","../../../../../plugin-client/dist/StaticClassClient-BFqabdAx.js","../../../../../plugin-oas/dist/generators-hPE06pZB.js","../../../../../plugin-oas/dist/index.js","../../../../../plugin-zod/dist/components-Cp2XF1Sa.js","../../../../../plugin-ts/dist/casing-Cp-jbC_k.js","../../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/typescript.js","../../../../../plugin-ts/dist/Type-C8EHVKjc.js","../../../../../core/dist/hooks.js","../../../../../plugin-ts/dist/generators-dCqW0ECC.js","../../../../../plugin-ts/dist/resolvers-CH7hINyz.js","../../../../../plugin-ts/dist/index.js","../../../../../plugin-oas/dist/hooks.js","../../../../../plugin-zod/dist/generators-Dc5k6ZRg.js","../../../../../plugin-zod/dist/templates/ToZod.source.js","../../../../../plugin-zod/dist/index.js","../../../../../plugin-client/dist/generators-C7Uz42d2.js","../../../../../plugin-client/dist/templates/clients/axios.source.js","../../../../../plugin-client/dist/templates/clients/fetch.source.js","../../../../../plugin-client/dist/templates/config.source.js","../../../../../plugin-client/dist/index.js","../../../../../plugin-cypress/dist/components-C6qvavJ4.js","../../../../../plugin-cypress/dist/generators-CsddWitM.js","../../../../../plugin-cypress/dist/index.js","../../../../../plugin-faker/dist/components-BkBIov4R.js","../../../../../plugin-faker/dist/fakerGenerator-M5oCrPmy.js","../../../../../plugin-faker/dist/index.js","../../../../../plugin-mcp/dist/Server-zYi6bZ4D.js","../../../../../plugin-mcp/dist/generators-B8MpQcFC.js","../../../../../plugin-mcp/dist/index.js","../../../../../plugin-msw/dist/components-skQTekfZ.js","../../../../../plugin-msw/dist/generators-Cx8YEtI4.js","../../../../../plugin-msw/dist/index.js","../../../../../plugin-react-query/dist/chunk--u3MIqq1.js","../../../../../plugin-react-query/dist/components-CFTdrzdu.js","../../../../../plugin-react-query/dist/generators-D5XRpAur.js","../../../../../plugin-react-query/dist/index.js","../../../../../plugin-redoc/dist/index.js","../../../../../plugin-solid-query/dist/chunk--u3MIqq1.js","../../../../../plugin-solid-query/dist/components-DhF2y62B.js","../../../../../plugin-solid-query/dist/generators-Bjt_pqc2.js","../../../../../plugin-solid-query/dist/index.js","../../../../../plugin-svelte-query/dist/chunk--u3MIqq1.js","../../../../../plugin-svelte-query/dist/components-gSKB93uB.js","../../../../../plugin-svelte-query/dist/generators-BnlHq9qP.js","../../../../../plugin-svelte-query/dist/index.js","../../../../../plugin-swr/dist/chunk--u3MIqq1.js","../../../../../plugin-swr/dist/components-dWefgCqh.js","../../../../../plugin-swr/dist/generators-h6SrQ3Gr.js","../../../../../plugin-swr/dist/index.js","../../../../../plugin-vue-query/dist/chunk--u3MIqq1.js","../../../../../plugin-vue-query/dist/components--op2hxIJ.js","../../../../../plugin-vue-query/dist/generators-B6cv10kw.js","../../../../../plugin-vue-query/dist/index.js","../../../../server/utils/resolvePlugins.ts","../../../../server/utils/mergePlugins.ts","../../../../server/utils/publish.ts","../../../../server/utils/setupHookListener.ts","../../../../server/utils/ws.ts","../../../../server/utils/connectStudio.ts","../../../../server/plugins/studio.ts","../../../../../../node_modules/.pnpm/nitropack@2.13.2_encoding@0.1.13_rolldown@1.0.0-rc.10/node_modules/nitropack/dist/runtime/internal/app.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.2_encoding@0.1.13_rolldown@1.0.0-rc.10/node_modules/nitropack/dist/runtime/internal/lib/http-graceful-shutdown.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.2_encoding@0.1.13_rolldown@1.0.0-rc.10/node_modules/nitropack/dist/runtime/internal/shutdown.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.2_encoding@0.1.13_rolldown@1.0.0-rc.10/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","stringify","normalizeKey","defineDriver","DRIVER_NAME","createStorage","fsPromises","PATH_TRAVERSE_RE","fsp","snakeCase","_inlineAppConfig","createRadixRouter","_emitter","_a","toError","AsyncEventEmitter","__privateAdd","__privateGet","formatMs","parseHex","hex","process","toCamelOrPascal","applyToFileParts","camelCase","isValidVarName","applyParamsCasing","pascalCase","path","readFile","writeFile","URLPath","_b","_URLPath_instances","__publicField","_options","__privateSet","__privateMethod","transformParam_fn","eachParam_fn","match","Node","Queue","_head","_tail","_size","__privateWrapper","pLimit","validateConcurrency","resolve","extname","x","performance","build","readdir","version","_c","_d","_e","_f","renderOperation","renderSchema","item","trimExtName","error","__defProp","__name","isPlainObject","parse","loadConfig","schema","params","_context","trimQuotes","schemas","normalizedSchema","name","min","max","getParams$1","getParams","Operations","validate","oas","options","jsStringEscape","toRegExpString","Type","siblings","require","global","modifiers","questionToken","node","operationsGenerator","source","Function","baseURL","source$2","Response","getNestedAccessor","getTransformer$1","MutationKey","getParams$9","getTransformer","QueryKey","getParams$8","QueryOptions","getParams$7","InfiniteQuery","getParams$6","InfiniteQueryOptions","getParams$5","getParams$4","Mutation","getParams$3","Query","getParams$2","operations","fs","infiniteQueryGenerator","mutationGenerator","queryGenerator","__filename","__dirname","pkg","generics","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,111,112,113,114]}
|
|
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.4/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.9/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.4_db0@0.3.4_ioredis@5.10.1/node_modules/unstorage/dist/shared/unstorage.zVDD2mZo.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.4_db0@0.3.4_ioredis@5.10.1/node_modules/unstorage/dist/index.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.4_db0@0.3.4_ioredis@5.10.1/node_modules/unstorage/drivers/utils/index.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.4_db0@0.3.4_ioredis@5.10.1/node_modules/unstorage/drivers/utils/node-fs.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.4_db0@0.3.4_ioredis@5.10.1/node_modules/unstorage/drivers/fs.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.4_db0@0.3.4_ioredis@5.10.1/node_modules/unstorage/drivers/fs-lite.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.2_encoding@0.1.13_rolldown@1.0.0-rc.11/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.2_encoding@0.1.13_rolldown@1.0.0-rc.11/node_modules/nitropack/dist/runtime/internal/hash.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.2_encoding@0.1.13_rolldown@1.0.0-rc.11/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.2_encoding@0.1.13_rolldown@1.0.0-rc.11/node_modules/nitropack/dist/runtime/internal/utils.env.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.2_encoding@0.1.13_rolldown@1.0.0-rc.11/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.2_encoding@0.1.13_rolldown@1.0.0-rc.11/node_modules/nitropack/dist/runtime/internal/context.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.2_encoding@0.1.13_rolldown@1.0.0-rc.11/node_modules/nitropack/dist/runtime/internal/route-rules.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.2_encoding@0.1.13_rolldown@1.0.0-rc.11/node_modules/nitropack/dist/runtime/internal/utils.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.2_encoding@0.1.13_rolldown@1.0.0-rc.11/node_modules/nitropack/dist/runtime/internal/error/utils.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.2_encoding@0.1.13_rolldown@1.0.0-rc.11/node_modules/nitropack/dist/runtime/internal/error/prod.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.2_encoding@0.1.13_rolldown@1.0.0-rc.11/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/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","../../../../../plugin-client/dist/chunk--u3MIqq1.js","../../../../../plugin-oas/dist/getFooter-Dz4u5Mg4.js","../../../../../plugin-oas/dist/SchemaMapper-CqMkO2T1.js","../../../../../oas/dist/index.js","../../../../../plugin-oas/dist/requestBody-bs_SwfEj.js","../../../../../plugin-oas/dist/utils.js","../../../../../plugin-client/dist/StaticClassClient-BFqabdAx.js","../../../../../plugin-oas/dist/generators-hPE06pZB.js","../../../../../plugin-oas/dist/index.js","../../../../../plugin-zod/dist/components-Cp2XF1Sa.js","../../../../../plugin-ts/dist/casing-Cp-jbC_k.js","../../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/typescript.js","../../../../../plugin-ts/dist/Type-C8EHVKjc.js","../../../../../core/dist/hooks.js","../../../../../plugin-ts/dist/generators-BTTcjgbY.js","../../../../../plugin-ts/dist/resolvers-C_vYX56l.js","../../../../../plugin-ts/dist/index.js","../../../../../plugin-oas/dist/hooks.js","../../../../../plugin-zod/dist/generators-Dc5k6ZRg.js","../../../../../plugin-zod/dist/templates/ToZod.source.js","../../../../../plugin-zod/dist/index.js","../../../../../plugin-client/dist/generators-C7Uz42d2.js","../../../../../plugin-client/dist/templates/clients/axios.source.js","../../../../../plugin-client/dist/templates/clients/fetch.source.js","../../../../../plugin-client/dist/templates/config.source.js","../../../../../plugin-client/dist/index.js","../../../../../plugin-cypress/dist/components-C6qvavJ4.js","../../../../../plugin-cypress/dist/generators-CsddWitM.js","../../../../../plugin-cypress/dist/index.js","../../../../../plugin-faker/dist/components-BkBIov4R.js","../../../../../plugin-faker/dist/fakerGenerator-M5oCrPmy.js","../../../../../plugin-faker/dist/index.js","../../../../../plugin-mcp/dist/Server-zYi6bZ4D.js","../../../../../plugin-mcp/dist/generators-B8MpQcFC.js","../../../../../plugin-mcp/dist/index.js","../../../../../plugin-msw/dist/components-skQTekfZ.js","../../../../../plugin-msw/dist/generators-Cx8YEtI4.js","../../../../../plugin-msw/dist/index.js","../../../../../plugin-react-query/dist/chunk--u3MIqq1.js","../../../../../plugin-react-query/dist/components-CFTdrzdu.js","../../../../../plugin-react-query/dist/generators-D5XRpAur.js","../../../../../plugin-react-query/dist/index.js","../../../../../plugin-redoc/dist/index.js","../../../../../plugin-solid-query/dist/chunk--u3MIqq1.js","../../../../../plugin-solid-query/dist/components-DhF2y62B.js","../../../../../plugin-solid-query/dist/generators-Bjt_pqc2.js","../../../../../plugin-solid-query/dist/index.js","../../../../../plugin-svelte-query/dist/chunk--u3MIqq1.js","../../../../../plugin-svelte-query/dist/components-gSKB93uB.js","../../../../../plugin-svelte-query/dist/generators-BnlHq9qP.js","../../../../../plugin-svelte-query/dist/index.js","../../../../../plugin-swr/dist/chunk--u3MIqq1.js","../../../../../plugin-swr/dist/components-dWefgCqh.js","../../../../../plugin-swr/dist/generators-h6SrQ3Gr.js","../../../../../plugin-swr/dist/index.js","../../../../../plugin-vue-query/dist/chunk--u3MIqq1.js","../../../../../plugin-vue-query/dist/components--op2hxIJ.js","../../../../../plugin-vue-query/dist/generators-B6cv10kw.js","../../../../../plugin-vue-query/dist/index.js","../../../../server/utils/resolvePlugins.ts","../../../../server/utils/mergePlugins.ts","../../../../server/utils/publish.ts","../../../../server/utils/setupHookListener.ts","../../../../server/utils/ws.ts","../../../../server/utils/connectStudio.ts","../../../../server/plugins/studio.ts","../../../../../../node_modules/.pnpm/nitropack@2.13.2_encoding@0.1.13_rolldown@1.0.0-rc.11/node_modules/nitropack/dist/runtime/internal/app.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.2_encoding@0.1.13_rolldown@1.0.0-rc.11/node_modules/nitropack/dist/runtime/internal/lib/http-graceful-shutdown.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.2_encoding@0.1.13_rolldown@1.0.0-rc.11/node_modules/nitropack/dist/runtime/internal/shutdown.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.2_encoding@0.1.13_rolldown@1.0.0-rc.11/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","stringify","normalizeKey","defineDriver","DRIVER_NAME","createStorage","fsPromises","PATH_TRAVERSE_RE","fsp","snakeCase","_inlineAppConfig","createRadixRouter","_emitter","_a","toError","AsyncEventEmitter","__privateAdd","__privateGet","formatMs","parseHex","hex","process","toCamelOrPascal","applyToFileParts","camelCase","isValidVarName","applyParamsCasing","pascalCase","path","readFile","writeFile","URLPath","_b","_URLPath_instances","__publicField","_options","__privateSet","__privateMethod","transformParam_fn","eachParam_fn","match","Node","Queue","_head","_tail","_size","__privateWrapper","pLimit","validateConcurrency","resolve","extname","x","performance","build","readdir","version","_c","_d","_e","_f","renderOperation","renderSchema","item","trimExtName","error","__defProp","__name","isPlainObject","parse","loadConfig","schema","params","_context","trimQuotes","schemas","normalizedSchema","name","min","max","getParams$1","getParams","Operations","validate","oas","options","jsStringEscape","toRegExpString","Type","siblings","require","global","modifiers","questionToken","node","operationsGenerator","source","Function","baseURL","source$2","Response","getNestedAccessor","getTransformer$1","MutationKey","getParams$9","getTransformer","QueryKey","getParams$8","QueryOptions","getParams$7","InfiniteQuery","getParams$6","InfiniteQueryOptions","getParams$5","getParams$4","Mutation","getParams$3","Query","getParams$2","operations","fs","infiniteQueryGenerator","mutationGenerator","queryGenerator","__filename","__dirname","pkg","generics","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,111,112,113,114]}
|
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.15",
|
|
4
4
|
"description": "Agent server for Kubb, enabling HTTP-based access to code generation capabilities.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent",
|
|
@@ -40,21 +40,21 @@
|
|
|
40
40
|
"tinyexec": "^1.0.4",
|
|
41
41
|
"unstorage": "^1.17.4",
|
|
42
42
|
"ws": "^8.20.0",
|
|
43
|
-
"@kubb/core": "5.0.0-alpha.
|
|
44
|
-
"@kubb/plugin-client": "5.0.0-alpha.
|
|
45
|
-
"@kubb/plugin-cypress": "5.0.0-alpha.
|
|
46
|
-
"@kubb/plugin-faker": "5.0.0-alpha.
|
|
47
|
-
"@kubb/plugin-mcp": "5.0.0-alpha.
|
|
48
|
-
"@kubb/plugin-msw": "5.0.0-alpha.
|
|
49
|
-
"@kubb/plugin-oas": "5.0.0-alpha.
|
|
50
|
-
"@kubb/plugin-react-query": "5.0.0-alpha.
|
|
51
|
-
"@kubb/plugin-redoc": "5.0.0-alpha.
|
|
52
|
-
"@kubb/plugin-solid-query": "5.0.0-alpha.
|
|
53
|
-
"@kubb/plugin-svelte-query": "5.0.0-alpha.
|
|
54
|
-
"@kubb/plugin-swr": "5.0.0-alpha.
|
|
55
|
-
"@kubb/plugin-ts": "5.0.0-alpha.
|
|
56
|
-
"@kubb/plugin-vue-query": "5.0.0-alpha.
|
|
57
|
-
"@kubb/plugin-zod": "5.0.0-alpha.
|
|
43
|
+
"@kubb/core": "5.0.0-alpha.15",
|
|
44
|
+
"@kubb/plugin-client": "5.0.0-alpha.15",
|
|
45
|
+
"@kubb/plugin-cypress": "5.0.0-alpha.15",
|
|
46
|
+
"@kubb/plugin-faker": "5.0.0-alpha.15",
|
|
47
|
+
"@kubb/plugin-mcp": "5.0.0-alpha.15",
|
|
48
|
+
"@kubb/plugin-msw": "5.0.0-alpha.15",
|
|
49
|
+
"@kubb/plugin-oas": "5.0.0-alpha.15",
|
|
50
|
+
"@kubb/plugin-react-query": "5.0.0-alpha.15",
|
|
51
|
+
"@kubb/plugin-redoc": "5.0.0-alpha.15",
|
|
52
|
+
"@kubb/plugin-solid-query": "5.0.0-alpha.15",
|
|
53
|
+
"@kubb/plugin-svelte-query": "5.0.0-alpha.15",
|
|
54
|
+
"@kubb/plugin-swr": "5.0.0-alpha.15",
|
|
55
|
+
"@kubb/plugin-ts": "5.0.0-alpha.15",
|
|
56
|
+
"@kubb/plugin-vue-query": "5.0.0-alpha.15",
|
|
57
|
+
"@kubb/plugin-zod": "5.0.0-alpha.15"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@types/ws": "^8.18.1",
|