@kubb/agent 5.0.0-alpha.12 → 5.0.0-alpha.14
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 +1 -1
- package/.output/server/chunks/nitro/nitro.mjs +252 -130
- package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
- package/.output/server/node_modules/.nitro/{ws@8.19.0 → ws@8.20.0}/lib/permessage-deflate.js +6 -6
- package/.output/server/node_modules/.nitro/{ws@8.19.0 → ws@8.20.0}/lib/websocket-server.js +5 -5
- package/.output/server/node_modules/.nitro/{ws@8.19.0 → ws@8.20.0}/lib/websocket.js +6 -6
- package/.output/server/node_modules/.nitro/{ws@8.19.0 → ws@8.20.0}/package.json +4 -3
- package/.output/server/node_modules/.nitro/ws@8.20.0/wrapper.mjs +21 -0
- package/.output/server/package.json +2 -2
- package/package.json +18 -18
- package/.output/server/node_modules/.nitro/ws@8.19.0/wrapper.mjs +0 -8
- /package/.output/server/node_modules/.nitro/{ws@8.19.0 → ws@8.20.0}/lib/buffer-util.js +0 -0
- /package/.output/server/node_modules/.nitro/{ws@8.19.0 → ws@8.20.0}/lib/constants.js +0 -0
- /package/.output/server/node_modules/.nitro/{ws@8.19.0 → ws@8.20.0}/lib/event-target.js +0 -0
- /package/.output/server/node_modules/.nitro/{ws@8.19.0 → ws@8.20.0}/lib/extension.js +0 -0
- /package/.output/server/node_modules/.nitro/{ws@8.19.0 → ws@8.20.0}/lib/limiter.js +0 -0
- /package/.output/server/node_modules/.nitro/{ws@8.19.0 → ws@8.20.0}/lib/receiver.js +0 -0
- /package/.output/server/node_modules/.nitro/{ws@8.19.0 → ws@8.20.0}/lib/sender.js +0 -0
- /package/.output/server/node_modules/.nitro/{ws@8.19.0 → ws@8.20.0}/lib/stream.js +0 -0
- /package/.output/server/node_modules/.nitro/{ws@8.19.0 → ws@8.20.0}/lib/subprotocol.js +0 -0
- /package/.output/server/node_modules/.nitro/{ws@8.19.0 → ws@8.20.0}/lib/validation.js +0 -0
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;
|
|
4669
4680
|
return {
|
|
4670
|
-
required: false,
|
|
4671
4681
|
...props,
|
|
4672
|
-
kind: "Property"
|
|
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;
|
|
4690
|
+
return {
|
|
4691
|
+
...props,
|
|
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.14";
|
|
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.14";
|
|
6820
6921
|
|
|
6821
6922
|
function isCommandMessage(msg) {
|
|
6822
6923
|
return msg.type === "command";
|
|
@@ -11102,6 +11203,41 @@ function Zod({ name, typeName, tree, schema, inferTypeName, mapper, coercion, ke
|
|
|
11102
11203
|
})] });
|
|
11103
11204
|
}
|
|
11104
11205
|
|
|
11206
|
+
function toCamelOrPascal$a(text, pascal) {
|
|
11207
|
+
return text.trim().replace(/([a-z\d])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").replace(/(\d)([a-z])/g, "$1 $2").split(/[\s\-_./\\:]+/).filter(Boolean).map((word, i) => {
|
|
11208
|
+
if (word.length > 1 && word === word.toUpperCase()) return word;
|
|
11209
|
+
if (i === 0 && !pascal) return word.charAt(0).toLowerCase() + word.slice(1);
|
|
11210
|
+
return word.charAt(0).toUpperCase() + word.slice(1);
|
|
11211
|
+
}).join("").replace(/[^a-zA-Z0-9]/g, "");
|
|
11212
|
+
}
|
|
11213
|
+
function applyToFileParts$a(text, transformPart) {
|
|
11214
|
+
const parts = text.split(/\.(?=[a-zA-Z])/);
|
|
11215
|
+
return parts.map((part, i) => transformPart(part, i === parts.length - 1)).join("/");
|
|
11216
|
+
}
|
|
11217
|
+
function camelCase$a(text, { isFile, prefix = "", suffix = "" } = {}) {
|
|
11218
|
+
if (isFile) return applyToFileParts$a(text, (part, isLast) => camelCase$a(part, isLast ? {
|
|
11219
|
+
prefix,
|
|
11220
|
+
suffix
|
|
11221
|
+
} : {}));
|
|
11222
|
+
return toCamelOrPascal$a(`${prefix} ${text} ${suffix}`, false);
|
|
11223
|
+
}
|
|
11224
|
+
function pascalCase$6(text, { isFile, prefix = "", suffix = "" } = {}) {
|
|
11225
|
+
if (isFile) return applyToFileParts$a(text, (part, isLast) => isLast ? pascalCase$6(part, {
|
|
11226
|
+
prefix,
|
|
11227
|
+
suffix
|
|
11228
|
+
}) : camelCase$a(part));
|
|
11229
|
+
return toCamelOrPascal$a(`${prefix} ${text} ${suffix}`, true);
|
|
11230
|
+
}
|
|
11231
|
+
function snakeCase(text, { prefix = "", suffix = "" } = {}) {
|
|
11232
|
+
return `${prefix} ${text} ${suffix}`.trim().replace(/([a-z])([A-Z])/g, "$1_$2").replace(/[\s\-.]+/g, "_").replace(/[^a-zA-Z0-9_]/g, "").toLowerCase().split("_").filter(Boolean).join("_");
|
|
11233
|
+
}
|
|
11234
|
+
function screamingSnakeCase(text, { prefix = "", suffix = "" } = {}) {
|
|
11235
|
+
return snakeCase(text, {
|
|
11236
|
+
prefix,
|
|
11237
|
+
suffix
|
|
11238
|
+
}).toUpperCase();
|
|
11239
|
+
}
|
|
11240
|
+
|
|
11105
11241
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : "undefined" !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
11106
11242
|
|
|
11107
11243
|
function getDefaultExportFromCjs (x) {
|
|
@@ -208986,40 +209122,6 @@ Additional information: BADCLIENT: Bad error code, ${badCode} not found in range
|
|
|
208986
209122
|
var typescriptExports = typescript.exports;
|
|
208987
209123
|
const ts = /*@__PURE__*/getDefaultExportFromCjs(typescriptExports);
|
|
208988
209124
|
|
|
208989
|
-
function toCamelOrPascal$a(text, pascal) {
|
|
208990
|
-
return text.trim().replace(/([a-z\d])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").replace(/(\d)([a-z])/g, "$1 $2").split(/[\s\-_./\\:]+/).filter(Boolean).map((word, i) => {
|
|
208991
|
-
if (word.length > 1 && word === word.toUpperCase()) return word;
|
|
208992
|
-
if (i === 0 && !pascal) return word.charAt(0).toLowerCase() + word.slice(1);
|
|
208993
|
-
return word.charAt(0).toUpperCase() + word.slice(1);
|
|
208994
|
-
}).join("").replace(/[^a-zA-Z0-9]/g, "");
|
|
208995
|
-
}
|
|
208996
|
-
function applyToFileParts$a(text, transformPart) {
|
|
208997
|
-
const parts = text.split(/\.(?=[a-zA-Z])/);
|
|
208998
|
-
return parts.map((part, i) => transformPart(part, i === parts.length - 1)).join("/");
|
|
208999
|
-
}
|
|
209000
|
-
function camelCase$a(text, { isFile, prefix = "", suffix = "" } = {}) {
|
|
209001
|
-
if (isFile) return applyToFileParts$a(text, (part, isLast) => camelCase$a(part, isLast ? {
|
|
209002
|
-
prefix,
|
|
209003
|
-
suffix
|
|
209004
|
-
} : {}));
|
|
209005
|
-
return toCamelOrPascal$a(`${prefix} ${text} ${suffix}`, false);
|
|
209006
|
-
}
|
|
209007
|
-
function pascalCase$6(text, { isFile, prefix = "", suffix = "" } = {}) {
|
|
209008
|
-
if (isFile) return applyToFileParts$a(text, (part, isLast) => isLast ? pascalCase$6(part, {
|
|
209009
|
-
prefix,
|
|
209010
|
-
suffix
|
|
209011
|
-
}) : camelCase$a(part));
|
|
209012
|
-
return toCamelOrPascal$a(`${prefix} ${text} ${suffix}`, true);
|
|
209013
|
-
}
|
|
209014
|
-
function snakeCase(text, { prefix = "", suffix = "" } = {}) {
|
|
209015
|
-
return `${prefix} ${text} ${suffix}`.trim().replace(/([a-z])([A-Z])/g, "$1_$2").replace(/[\s\-.]+/g, "_").replace(/[^a-zA-Z0-9_]/g, "").toLowerCase().split("_").filter(Boolean).join("_");
|
|
209016
|
-
}
|
|
209017
|
-
function screamingSnakeCase(text, { prefix = "", suffix = "" } = {}) {
|
|
209018
|
-
return snakeCase(text, {
|
|
209019
|
-
prefix,
|
|
209020
|
-
suffix
|
|
209021
|
-
}).toUpperCase();
|
|
209022
|
-
}
|
|
209023
209125
|
function trimQuotes$1(text) {
|
|
209024
209126
|
if (text.length >= 2) {
|
|
209025
209127
|
const first = text[0];
|
|
@@ -209305,11 +209407,12 @@ function buildPropertyType(schema, baseType, optionalType) {
|
|
|
209305
209407
|
return type;
|
|
209306
209408
|
}
|
|
209307
209409
|
function buildPropertyJSDocComments(schema) {
|
|
209410
|
+
const isArray = schema.type === "array";
|
|
209308
209411
|
return [
|
|
209309
209412
|
"description" in schema && schema.description ? `@description ${jsStringEscape$1(schema.description)}` : void 0,
|
|
209310
209413
|
"deprecated" in schema && schema.deprecated ? "@deprecated" : void 0,
|
|
209311
|
-
"min" in schema && schema.min !== void 0 ? `@minLength ${schema.min}` : void 0,
|
|
209312
|
-
"max" in schema && schema.max !== void 0 ? `@maxLength ${schema.max}` : void 0,
|
|
209414
|
+
!isArray && "min" in schema && schema.min !== void 0 ? `@minLength ${schema.min}` : void 0,
|
|
209415
|
+
!isArray && "max" in schema && schema.max !== void 0 ? `@maxLength ${schema.max}` : void 0,
|
|
209313
209416
|
"pattern" in schema && schema.pattern ? `@pattern ${schema.pattern}` : void 0,
|
|
209314
209417
|
"default" in schema && schema.default !== void 0 ? `@default ${"primitive" in schema && schema.primitive === "string" ? stringify$1(schema.default) : schema.default}` : void 0,
|
|
209315
209418
|
"example" in schema && schema.example !== void 0 ? `@example ${schema.example}` : void 0,
|
|
@@ -209637,10 +209740,10 @@ function buildParamsSchema({ params, node, resolver }) {
|
|
|
209637
209740
|
type: "object",
|
|
209638
209741
|
properties: params.map((param) => createProperty({
|
|
209639
209742
|
name: param.name,
|
|
209743
|
+
required: param.required,
|
|
209640
209744
|
schema: createSchema({
|
|
209641
209745
|
type: "ref",
|
|
209642
|
-
name: resolver.resolveParamName(node, param)
|
|
209643
|
-
optional: !param.required
|
|
209746
|
+
name: resolver.resolveParamName(node, param)
|
|
209644
209747
|
})
|
|
209645
209748
|
}))
|
|
209646
209749
|
});
|
|
@@ -209667,14 +209770,12 @@ function buildDataSchemaNode({ node, resolver }) {
|
|
|
209667
209770
|
}),
|
|
209668
209771
|
createProperty({
|
|
209669
209772
|
name: "pathParams",
|
|
209773
|
+
required: pathParams.length > 0,
|
|
209670
209774
|
schema: pathParams.length > 0 ? buildParamsSchema({
|
|
209671
209775
|
params: pathParams,
|
|
209672
209776
|
node,
|
|
209673
209777
|
resolver
|
|
209674
|
-
}) : createSchema({
|
|
209675
|
-
type: "never",
|
|
209676
|
-
optional: true
|
|
209677
|
-
})
|
|
209778
|
+
}) : createSchema({ type: "never" })
|
|
209678
209779
|
}),
|
|
209679
209780
|
createProperty({
|
|
209680
209781
|
name: "queryParams",
|
|
@@ -209706,6 +209807,7 @@ function buildDataSchemaNode({ node, resolver }) {
|
|
|
209706
209807
|
}),
|
|
209707
209808
|
createProperty({
|
|
209708
209809
|
name: "url",
|
|
209810
|
+
required: true,
|
|
209709
209811
|
schema: createSchema({
|
|
209710
209812
|
type: "url",
|
|
209711
209813
|
path: node.path
|
|
@@ -209720,6 +209822,7 @@ function buildResponsesSchemaNode({ node, resolver }) {
|
|
|
209720
209822
|
type: "object",
|
|
209721
209823
|
properties: node.responses.map((res) => createProperty({
|
|
209722
209824
|
name: String(res.statusCode),
|
|
209825
|
+
required: true,
|
|
209723
209826
|
schema: createSchema({
|
|
209724
209827
|
type: "ref",
|
|
209725
209828
|
name: resolver.resolveResponseStatusTypedName(node, res.statusCode)
|
|
@@ -209742,10 +209845,7 @@ function buildGroupedParamsSchema({ params, parentName }) {
|
|
|
209742
209845
|
return createSchema({
|
|
209743
209846
|
type: "object",
|
|
209744
209847
|
properties: params.map((param) => {
|
|
209745
|
-
let schema =
|
|
209746
|
-
...param.schema,
|
|
209747
|
-
optional: !param.required
|
|
209748
|
-
};
|
|
209848
|
+
let schema = param.schema;
|
|
209749
209849
|
if (narrowSchema(schema, "enum") && !schema.name && parentName) schema = {
|
|
209750
209850
|
...schema,
|
|
209751
209851
|
name: pascalCase$6([
|
|
@@ -209756,6 +209856,7 @@ function buildGroupedParamsSchema({ params, parentName }) {
|
|
|
209756
209856
|
};
|
|
209757
209857
|
return createProperty({
|
|
209758
209858
|
name: param.name,
|
|
209859
|
+
required: param.required,
|
|
209759
209860
|
schema
|
|
209760
209861
|
});
|
|
209761
209862
|
})
|
|
@@ -209791,17 +209892,20 @@ function buildLegacyResponsesSchemaNode({ node, resolver }) {
|
|
|
209791
209892
|
}) : createSchema({ type: "any" });
|
|
209792
209893
|
const properties = [createProperty({
|
|
209793
209894
|
name: "Response",
|
|
209895
|
+
required: true,
|
|
209794
209896
|
schema: responseSchema
|
|
209795
209897
|
})];
|
|
209796
209898
|
if (!isGet && ((_a = node.requestBody) == null ? void 0 : _a.schema)) properties.push(createProperty({
|
|
209797
209899
|
name: "Request",
|
|
209900
|
+
required: true,
|
|
209798
209901
|
schema: createSchema({
|
|
209799
209902
|
type: "ref",
|
|
209800
209903
|
name: resolver.resolveDataTypedName(node)
|
|
209801
209904
|
})
|
|
209802
209905
|
}));
|
|
209803
|
-
|
|
209906
|
+
if (node.parameters.some((p) => p.in === "query") && resolver.resolveQueryParamsTypedName) properties.push(createProperty({
|
|
209804
209907
|
name: "QueryParams",
|
|
209908
|
+
required: true,
|
|
209805
209909
|
schema: createSchema({
|
|
209806
209910
|
type: "ref",
|
|
209807
209911
|
name: resolver.resolveQueryParamsTypedName(node)
|
|
@@ -209809,6 +209913,7 @@ function buildLegacyResponsesSchemaNode({ node, resolver }) {
|
|
|
209809
209913
|
}));
|
|
209810
209914
|
if (node.parameters.some((p) => p.in === "path") && resolver.resolvePathParamsTypedName) properties.push(createProperty({
|
|
209811
209915
|
name: "PathParams",
|
|
209916
|
+
required: true,
|
|
209812
209917
|
schema: createSchema({
|
|
209813
209918
|
type: "ref",
|
|
209814
209919
|
name: resolver.resolvePathParamsTypedName(node)
|
|
@@ -209816,6 +209921,7 @@ function buildLegacyResponsesSchemaNode({ node, resolver }) {
|
|
|
209816
209921
|
}));
|
|
209817
209922
|
if (node.parameters.some((p) => p.in === "header") && resolver.resolveHeaderParamsTypedName) properties.push(createProperty({
|
|
209818
209923
|
name: "HeaderParams",
|
|
209924
|
+
required: true,
|
|
209819
209925
|
schema: createSchema({
|
|
209820
209926
|
type: "ref",
|
|
209821
209927
|
name: resolver.resolveHeaderParamsTypedName(node)
|
|
@@ -209823,6 +209929,7 @@ function buildLegacyResponsesSchemaNode({ node, resolver }) {
|
|
|
209823
209929
|
}));
|
|
209824
209930
|
properties.push(createProperty({
|
|
209825
209931
|
name: "Errors",
|
|
209932
|
+
required: true,
|
|
209826
209933
|
schema: errorsSchema
|
|
209827
209934
|
}));
|
|
209828
209935
|
return createSchema({
|
|
@@ -209876,8 +209983,8 @@ const typeGenerator = defineGenerator({
|
|
|
209876
209983
|
name: "typescript",
|
|
209877
209984
|
type: "react",
|
|
209878
209985
|
Operation({ node, adapter, options }) {
|
|
209879
|
-
var _a, _b;
|
|
209880
|
-
const { enumType, enumKeyCasing, optionalType, arrayType, syntaxType, paramsCasing, group, resolver, legacy } = options;
|
|
209986
|
+
var _a, _b, _c;
|
|
209987
|
+
const { enumType, enumKeyCasing, optionalType, arrayType, syntaxType, paramsCasing, group, resolver, baseResolver, legacy, transformers = [] } = options;
|
|
209881
209988
|
const { mode, getFile, resolveBanner, resolveFooter } = useKubb();
|
|
209882
209989
|
const file = getFile({
|
|
209883
209990
|
name: node.operationId,
|
|
@@ -209888,7 +209995,8 @@ const typeGenerator = defineGenerator({
|
|
|
209888
209995
|
const params = applyParamsCasing$1(node.parameters, paramsCasing);
|
|
209889
209996
|
function renderSchemaType({ node: schemaNode, name, typedName, description, keysToOmit }) {
|
|
209890
209997
|
if (!schemaNode) return null;
|
|
209891
|
-
const
|
|
209998
|
+
const transformedNode = transform(schemaNode, composeTransformers(...transformers));
|
|
209999
|
+
const imports = adapter.getImports(transformedNode, (schemaName) => ({
|
|
209892
210000
|
name: resolver.default(schemaName, "type"),
|
|
209893
210001
|
path: getFile({
|
|
209894
210002
|
name: schemaName,
|
|
@@ -209908,7 +210016,7 @@ const typeGenerator = defineGenerator({
|
|
|
209908
210016
|
].join("-"))), /* @__PURE__ */ jsx(Type, {
|
|
209909
210017
|
name,
|
|
209910
210018
|
typedName,
|
|
209911
|
-
node:
|
|
210019
|
+
node: transformedNode,
|
|
209912
210020
|
description,
|
|
209913
210021
|
enumType,
|
|
209914
210022
|
enumKeyCasing,
|
|
@@ -209916,13 +210024,15 @@ const typeGenerator = defineGenerator({
|
|
|
209916
210024
|
arrayType,
|
|
209917
210025
|
syntaxType,
|
|
209918
210026
|
resolver,
|
|
209919
|
-
keysToOmit
|
|
210027
|
+
keysToOmit,
|
|
210028
|
+
legacy
|
|
209920
210029
|
})] });
|
|
209921
210030
|
}
|
|
209922
210031
|
const responseTypes = legacy ? node.responses.map((res) => {
|
|
209923
210032
|
const responseName = resolver.resolveResponseStatusName(node, res.statusCode);
|
|
210033
|
+
const baseResponseName = baseResolver.resolveResponseStatusName(node, res.statusCode);
|
|
209924
210034
|
return renderSchemaType({
|
|
209925
|
-
node: res.schema ? nameUnnamedEnums(res.schema,
|
|
210035
|
+
node: res.schema ? nameUnnamedEnums(res.schema, baseResponseName) : res.schema,
|
|
209926
210036
|
name: responseName,
|
|
209927
210037
|
typedName: resolver.resolveResponseStatusTypedName(node, res.statusCode),
|
|
209928
210038
|
description: res.description,
|
|
@@ -209936,10 +210046,10 @@ const typeGenerator = defineGenerator({
|
|
|
209936
210046
|
keysToOmit: res.keysToOmit
|
|
209937
210047
|
}));
|
|
209938
210048
|
const requestType = ((_b = node.requestBody) == null ? void 0 : _b.schema) ? renderSchemaType({
|
|
209939
|
-
node: legacy ? nameUnnamedEnums(node.requestBody.schema,
|
|
210049
|
+
node: legacy ? nameUnnamedEnums(node.requestBody.schema, baseResolver.resolveDataName(node)) : node.requestBody.schema,
|
|
209940
210050
|
name: resolver.resolveDataName(node),
|
|
209941
210051
|
typedName: resolver.resolveDataTypedName(node),
|
|
209942
|
-
description: node.requestBody.schema.description,
|
|
210052
|
+
description: (_c = node.requestBody.description) != null ? _c : node.requestBody.schema.description,
|
|
209943
210053
|
keysToOmit: node.requestBody.keysToOmit
|
|
209944
210054
|
}) : null;
|
|
209945
210055
|
if (legacy) {
|
|
@@ -209950,7 +210060,7 @@ const typeGenerator = defineGenerator({
|
|
|
209950
210060
|
pathParams.length > 0 ? renderSchemaType({
|
|
209951
210061
|
node: buildGroupedParamsSchema({
|
|
209952
210062
|
params: pathParams,
|
|
209953
|
-
parentName:
|
|
210063
|
+
parentName: baseResolver.resolvePathParamsName(node)
|
|
209954
210064
|
}),
|
|
209955
210065
|
name: resolver.resolvePathParamsName(node),
|
|
209956
210066
|
typedName: resolver.resolvePathParamsTypedName(node)
|
|
@@ -209958,7 +210068,7 @@ const typeGenerator = defineGenerator({
|
|
|
209958
210068
|
queryParams.length > 0 ? renderSchemaType({
|
|
209959
210069
|
node: buildGroupedParamsSchema({
|
|
209960
210070
|
params: queryParams,
|
|
209961
|
-
parentName:
|
|
210071
|
+
parentName: baseResolver.resolveQueryParamsName(node)
|
|
209962
210072
|
}),
|
|
209963
210073
|
name: resolver.resolveQueryParamsName(node),
|
|
209964
210074
|
typedName: resolver.resolveQueryParamsTypedName(node)
|
|
@@ -209966,7 +210076,7 @@ const typeGenerator = defineGenerator({
|
|
|
209966
210076
|
headerParams.length > 0 ? renderSchemaType({
|
|
209967
210077
|
node: buildGroupedParamsSchema({
|
|
209968
210078
|
params: headerParams,
|
|
209969
|
-
parentName:
|
|
210079
|
+
parentName: baseResolver.resolveHeaderParamsName(node)
|
|
209970
210080
|
}),
|
|
209971
210081
|
name: resolver.resolveHeaderParamsName(node),
|
|
209972
210082
|
typedName: resolver.resolveHeaderParamsTypedName(node)
|
|
@@ -209998,8 +210108,8 @@ const typeGenerator = defineGenerator({
|
|
|
209998
210108
|
legacyParamTypes,
|
|
209999
210109
|
responseTypes,
|
|
210000
210110
|
requestType,
|
|
210001
|
-
|
|
210002
|
-
|
|
210111
|
+
legacyResponseType,
|
|
210112
|
+
legacyResponsesType
|
|
210003
210113
|
]
|
|
210004
210114
|
});
|
|
210005
210115
|
}
|
|
@@ -210008,6 +210118,16 @@ const typeGenerator = defineGenerator({
|
|
|
210008
210118
|
name: resolver.resolveParamName(node, param),
|
|
210009
210119
|
typedName: resolver.resolveParamTypedName(node, param)
|
|
210010
210120
|
}));
|
|
210121
|
+
const queryParamsList = params.filter((p) => p.in === "query");
|
|
210122
|
+
const queryParamsType = queryParamsList.length > 0 ? renderSchemaType({
|
|
210123
|
+
node: buildParamsSchema({
|
|
210124
|
+
params: queryParamsList,
|
|
210125
|
+
node,
|
|
210126
|
+
resolver
|
|
210127
|
+
}),
|
|
210128
|
+
name: resolver.resolveQueryParamsName(node),
|
|
210129
|
+
typedName: resolver.resolveQueryParamsTypedName(node)
|
|
210130
|
+
}) : null;
|
|
210011
210131
|
const dataType = renderSchemaType({
|
|
210012
210132
|
node: buildDataSchemaNode({
|
|
210013
210133
|
node: {
|
|
@@ -210044,6 +210164,7 @@ const typeGenerator = defineGenerator({
|
|
|
210044
210164
|
footer: resolveFooter(),
|
|
210045
210165
|
children: [
|
|
210046
210166
|
paramTypes,
|
|
210167
|
+
queryParamsType,
|
|
210047
210168
|
responseTypes,
|
|
210048
210169
|
requestType,
|
|
210049
210170
|
dataType,
|
|
@@ -210053,10 +210174,11 @@ const typeGenerator = defineGenerator({
|
|
|
210053
210174
|
});
|
|
210054
210175
|
},
|
|
210055
210176
|
Schema({ node, adapter, options }) {
|
|
210056
|
-
const { enumType, enumKeyCasing, syntaxType, optionalType, arrayType, resolver } = options;
|
|
210177
|
+
const { enumType, enumKeyCasing, syntaxType, optionalType, arrayType, resolver, legacy, transformers = [] } = options;
|
|
210057
210178
|
const { mode, getFile, resolveBanner, resolveFooter } = useKubb();
|
|
210058
210179
|
if (!node.name) return;
|
|
210059
|
-
const
|
|
210180
|
+
const transformedNode = transform(node, composeTransformers(...transformers));
|
|
210181
|
+
const imports = adapter.getImports(transformedNode, (schemaName) => ({
|
|
210060
210182
|
name: resolver.default(schemaName, "type"),
|
|
210061
210183
|
path: getFile({
|
|
210062
210184
|
name: schemaName,
|
|
@@ -210093,13 +210215,14 @@ const typeGenerator = defineGenerator({
|
|
|
210093
210215
|
].join("-"))), /* @__PURE__ */ jsx(Type, {
|
|
210094
210216
|
name: type.name,
|
|
210095
210217
|
typedName: type.typedName,
|
|
210096
|
-
node,
|
|
210218
|
+
node: transformedNode,
|
|
210097
210219
|
enumType,
|
|
210098
210220
|
enumKeyCasing,
|
|
210099
210221
|
optionalType,
|
|
210100
210222
|
arrayType,
|
|
210101
210223
|
syntaxType,
|
|
210102
|
-
resolver
|
|
210224
|
+
resolver,
|
|
210225
|
+
legacy
|
|
210103
210226
|
})]
|
|
210104
210227
|
});
|
|
210105
210228
|
}
|
|
@@ -210110,6 +210233,7 @@ function resolveName(name, type) {
|
|
|
210110
210233
|
}
|
|
210111
210234
|
const resolverTs = defineResolver(() => {
|
|
210112
210235
|
return {
|
|
210236
|
+
name: "default",
|
|
210113
210237
|
default(name, type) {
|
|
210114
210238
|
return resolveName(name, type);
|
|
210115
210239
|
},
|
|
@@ -210168,11 +210292,11 @@ const resolverTs = defineResolver(() => {
|
|
|
210168
210292
|
resolvePathParamsTypedName(_node) {
|
|
210169
210293
|
throw new Error("resolvePathParamsTypedName is only available in legacy mode (legacy: true). Use resolveParamTypedName per individual parameter instead.");
|
|
210170
210294
|
},
|
|
210171
|
-
resolveQueryParamsName(
|
|
210172
|
-
|
|
210295
|
+
resolveQueryParamsName(node) {
|
|
210296
|
+
return this.resolveName(`${node.operationId} QueryParams`);
|
|
210173
210297
|
},
|
|
210174
|
-
resolveQueryParamsTypedName(
|
|
210175
|
-
|
|
210298
|
+
resolveQueryParamsTypedName(node) {
|
|
210299
|
+
return this.resolveTypedName(`${node.operationId} QueryParams`);
|
|
210176
210300
|
},
|
|
210177
210301
|
resolveHeaderParamsName(_node) {
|
|
210178
210302
|
throw new Error("resolveHeaderParamsName is only available in legacy mode (legacy: true). Use resolveParamName per individual parameter instead.");
|
|
@@ -210185,6 +210309,7 @@ const resolverTs = defineResolver(() => {
|
|
|
210185
210309
|
const resolverTsLegacy = defineResolver(() => {
|
|
210186
210310
|
return {
|
|
210187
210311
|
...resolverTs,
|
|
210312
|
+
name: "legacy",
|
|
210188
210313
|
resolveResponseStatusName(node, statusCode) {
|
|
210189
210314
|
if (statusCode === "default") return this.resolveName(`${node.operationId} Error`);
|
|
210190
210315
|
return this.resolveName(`${node.operationId} ${statusCode}`);
|
|
@@ -210203,11 +210328,11 @@ const resolverTsLegacy = defineResolver(() => {
|
|
|
210203
210328
|
},
|
|
210204
210329
|
resolveResponsesName(node) {
|
|
210205
210330
|
const suffix = node.method === "GET" ? "Query" : "Mutation";
|
|
210206
|
-
return this.
|
|
210331
|
+
return `${this.default(node.operationId, "function")}${suffix}`;
|
|
210207
210332
|
},
|
|
210208
210333
|
resolveResponsesTypedName(node) {
|
|
210209
210334
|
const suffix = node.method === "GET" ? "Query" : "Mutation";
|
|
210210
|
-
return this.
|
|
210335
|
+
return `${this.default(node.operationId, "type")}${suffix}`;
|
|
210211
210336
|
},
|
|
210212
210337
|
resolveResponseName(node) {
|
|
210213
210338
|
const suffix = node.method === "GET" ? "QueryResponse" : "MutationResponse";
|
|
@@ -210237,26 +210362,20 @@ const resolverTsLegacy = defineResolver(() => {
|
|
|
210237
210362
|
}
|
|
210238
210363
|
};
|
|
210239
210364
|
});
|
|
210365
|
+
|
|
210240
210366
|
const pluginTsName = "plugin-ts";
|
|
210241
210367
|
const pluginTs = createPlugin((options) => {
|
|
210242
210368
|
const { output = {
|
|
210243
210369
|
path: "types",
|
|
210244
210370
|
barrelType: "named"
|
|
210245
|
-
}, 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;
|
|
210246
210372
|
const baseResolver = legacy ? resolverTsLegacy : resolverTs;
|
|
210247
|
-
const resolver = (
|
|
210248
|
-
...baseResolver,
|
|
210249
|
-
default(name, type) {
|
|
210250
|
-
const resolved = baseResolver.default(name, type);
|
|
210251
|
-
return transformers.name(resolved, type) || resolved;
|
|
210252
|
-
}
|
|
210253
|
-
} : baseResolver;
|
|
210373
|
+
const resolver = mergeResolvers(...userResolvers != null ? userResolvers : [baseResolver]);
|
|
210254
210374
|
let resolveNameWarning = false;
|
|
210255
210375
|
return {
|
|
210256
210376
|
name: pluginTsName,
|
|
210257
210377
|
options: {
|
|
210258
210378
|
output,
|
|
210259
|
-
transformers,
|
|
210260
210379
|
optionalType,
|
|
210261
210380
|
arrayType,
|
|
210262
210381
|
enumType,
|
|
@@ -210266,7 +210385,9 @@ const pluginTs = createPlugin((options) => {
|
|
|
210266
210385
|
override,
|
|
210267
210386
|
paramsCasing,
|
|
210268
210387
|
legacy,
|
|
210269
|
-
resolver
|
|
210388
|
+
resolver,
|
|
210389
|
+
baseResolver,
|
|
210390
|
+
transformers
|
|
210270
210391
|
},
|
|
210271
210392
|
resolvePath(baseName, pathMode, options2) {
|
|
210272
210393
|
var _a, _b;
|
|
@@ -210297,6 +210418,7 @@ const pluginTs = createPlugin((options) => {
|
|
|
210297
210418
|
if (!adapter) throw new Error("Plugin cannot work without adapter being set");
|
|
210298
210419
|
await openInStudio({ ast: true });
|
|
210299
210420
|
await walk(rootNode, {
|
|
210421
|
+
depth: "shallow",
|
|
210300
210422
|
async schema(schemaNode) {
|
|
210301
210423
|
const writeTasks = generators.map(async (generator) => {
|
|
210302
210424
|
if (generator.type === "react" && generator.version === "2") {
|
|
@@ -210345,7 +210467,7 @@ const pluginTs = createPlugin((options) => {
|
|
|
210345
210467
|
});
|
|
210346
210468
|
await Promise.all(writeTasks);
|
|
210347
210469
|
}
|
|
210348
|
-
}
|
|
210470
|
+
});
|
|
210349
210471
|
const barrelFiles = await getBarrelFiles(this.fabric.files, {
|
|
210350
210472
|
type: (_a = output.barrelType) != null ? _a : "named",
|
|
210351
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","../../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/typescript.js","../../../../../plugin-ts/dist/Type-CX1HRooG.js","../../../../../core/dist/hooks.js","../../../../../plugin-ts/dist/generators-CLuCmfUz.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,55,109,110,111,112]}
|
|
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-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.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]}
|
package/.output/server/node_modules/.nitro/{ws@8.19.0 → ws@8.20.0}/lib/permessage-deflate.js
RENAMED
|
@@ -37,6 +37,9 @@ class PerMessageDeflate {
|
|
|
37
37
|
* acknowledge disabling of client context takeover
|
|
38
38
|
* @param {Number} [options.concurrencyLimit=10] The number of concurrent
|
|
39
39
|
* calls to zlib
|
|
40
|
+
* @param {Boolean} [options.isServer=false] Create the instance in either
|
|
41
|
+
* server or client mode
|
|
42
|
+
* @param {Number} [options.maxPayload=0] The maximum allowed message length
|
|
40
43
|
* @param {(Boolean|Number)} [options.serverMaxWindowBits] Request/confirm the
|
|
41
44
|
* use of a custom server window size
|
|
42
45
|
* @param {Boolean} [options.serverNoContextTakeover=false] Request/accept
|
|
@@ -47,16 +50,13 @@ class PerMessageDeflate {
|
|
|
47
50
|
* deflate
|
|
48
51
|
* @param {Object} [options.zlibInflateOptions] Options to pass to zlib on
|
|
49
52
|
* inflate
|
|
50
|
-
* @param {Boolean} [isServer=false] Create the instance in either server or
|
|
51
|
-
* client mode
|
|
52
|
-
* @param {Number} [maxPayload=0] The maximum allowed message length
|
|
53
53
|
*/
|
|
54
|
-
constructor(options
|
|
55
|
-
this._maxPayload = maxPayload | 0;
|
|
54
|
+
constructor(options) {
|
|
56
55
|
this._options = options || {};
|
|
57
56
|
this._threshold =
|
|
58
57
|
this._options.threshold !== undefined ? this._options.threshold : 1024;
|
|
59
|
-
this.
|
|
58
|
+
this._maxPayload = this._options.maxPayload | 0;
|
|
59
|
+
this._isServer = !!this._options.isServer;
|
|
60
60
|
this._deflate = null;
|
|
61
61
|
this._inflate = null;
|
|
62
62
|
|
|
@@ -293,11 +293,11 @@ class WebSocketServer extends EventEmitter {
|
|
|
293
293
|
this.options.perMessageDeflate &&
|
|
294
294
|
secWebSocketExtensions !== undefined
|
|
295
295
|
) {
|
|
296
|
-
const perMessageDeflate = new PerMessageDeflate(
|
|
297
|
-
this.options.perMessageDeflate,
|
|
298
|
-
true,
|
|
299
|
-
this.options.maxPayload
|
|
300
|
-
);
|
|
296
|
+
const perMessageDeflate = new PerMessageDeflate({
|
|
297
|
+
...this.options.perMessageDeflate,
|
|
298
|
+
isServer: true,
|
|
299
|
+
maxPayload: this.options.maxPayload
|
|
300
|
+
});
|
|
301
301
|
|
|
302
302
|
try {
|
|
303
303
|
const offers = extension.parse(secWebSocketExtensions);
|
|
@@ -693,7 +693,7 @@ function initAsClient(websocket, address, protocols, options) {
|
|
|
693
693
|
} else {
|
|
694
694
|
try {
|
|
695
695
|
parsedUrl = new URL(address);
|
|
696
|
-
} catch
|
|
696
|
+
} catch {
|
|
697
697
|
throw new SyntaxError(`Invalid URL: ${address}`);
|
|
698
698
|
}
|
|
699
699
|
}
|
|
@@ -755,11 +755,11 @@ function initAsClient(websocket, address, protocols, options) {
|
|
|
755
755
|
opts.timeout = opts.handshakeTimeout;
|
|
756
756
|
|
|
757
757
|
if (opts.perMessageDeflate) {
|
|
758
|
-
perMessageDeflate = new PerMessageDeflate(
|
|
759
|
-
opts.perMessageDeflate
|
|
760
|
-
false,
|
|
761
|
-
opts.maxPayload
|
|
762
|
-
);
|
|
758
|
+
perMessageDeflate = new PerMessageDeflate({
|
|
759
|
+
...opts.perMessageDeflate,
|
|
760
|
+
isServer: false,
|
|
761
|
+
maxPayload: opts.maxPayload
|
|
762
|
+
});
|
|
763
763
|
opts.headers['Sec-WebSocket-Extensions'] = format({
|
|
764
764
|
[PerMessageDeflate.extensionName]: perMessageDeflate.offer()
|
|
765
765
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ws",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.20.0",
|
|
4
4
|
"description": "Simple to use, blazing fast and thoroughly tested websocket client and server for Node.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"HyBi",
|
|
@@ -55,12 +55,13 @@
|
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
+
"@eslint/js": "^10.0.1",
|
|
58
59
|
"benchmark": "^2.1.4",
|
|
59
60
|
"bufferutil": "^4.0.1",
|
|
60
|
-
"eslint": "^
|
|
61
|
+
"eslint": "^10.0.1",
|
|
61
62
|
"eslint-config-prettier": "^10.0.1",
|
|
62
63
|
"eslint-plugin-prettier": "^5.0.0",
|
|
63
|
-
"globals": "^
|
|
64
|
+
"globals": "^17.0.0",
|
|
64
65
|
"mocha": "^8.4.0",
|
|
65
66
|
"nyc": "^15.0.0",
|
|
66
67
|
"prettier": "^3.0.0",
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import createWebSocketStream from './lib/stream.js';
|
|
2
|
+
import extension from './lib/extension.js';
|
|
3
|
+
import PerMessageDeflate from './lib/permessage-deflate.js';
|
|
4
|
+
import Receiver from './lib/receiver.js';
|
|
5
|
+
import Sender from './lib/sender.js';
|
|
6
|
+
import subprotocol from './lib/subprotocol.js';
|
|
7
|
+
import WebSocket from './lib/websocket.js';
|
|
8
|
+
import WebSocketServer from './lib/websocket-server.js';
|
|
9
|
+
|
|
10
|
+
export {
|
|
11
|
+
createWebSocketStream,
|
|
12
|
+
extension,
|
|
13
|
+
PerMessageDeflate,
|
|
14
|
+
Receiver,
|
|
15
|
+
Sender,
|
|
16
|
+
subprotocol,
|
|
17
|
+
WebSocket,
|
|
18
|
+
WebSocketServer
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export default WebSocket;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubb/agent-prod",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.14",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"private": true,
|
|
6
6
|
"dependencies": {
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"validate.io-integer": "1.0.5",
|
|
109
109
|
"validate.io-integer-array": "1.0.0",
|
|
110
110
|
"validate.io-number": "1.0.3",
|
|
111
|
-
"ws": "8.
|
|
111
|
+
"ws": "8.20.0",
|
|
112
112
|
"yaml": "1.10.2",
|
|
113
113
|
"yaml-ast-parser": "0.0.43",
|
|
114
114
|
"yocto-queue": "1.2.2"
|
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.14",
|
|
4
4
|
"description": "Agent server for Kubb, enabling HTTP-based access to code generation capabilities.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent",
|
|
@@ -39,26 +39,26 @@
|
|
|
39
39
|
"remeda": "^2.33.6",
|
|
40
40
|
"tinyexec": "^1.0.4",
|
|
41
41
|
"unstorage": "^1.17.4",
|
|
42
|
-
"ws": "^8.
|
|
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.
|
|
42
|
+
"ws": "^8.20.0",
|
|
43
|
+
"@kubb/core": "5.0.0-alpha.14",
|
|
44
|
+
"@kubb/plugin-client": "5.0.0-alpha.14",
|
|
45
|
+
"@kubb/plugin-cypress": "5.0.0-alpha.14",
|
|
46
|
+
"@kubb/plugin-faker": "5.0.0-alpha.14",
|
|
47
|
+
"@kubb/plugin-mcp": "5.0.0-alpha.14",
|
|
48
|
+
"@kubb/plugin-msw": "5.0.0-alpha.14",
|
|
49
|
+
"@kubb/plugin-oas": "5.0.0-alpha.14",
|
|
50
|
+
"@kubb/plugin-react-query": "5.0.0-alpha.14",
|
|
51
|
+
"@kubb/plugin-redoc": "5.0.0-alpha.14",
|
|
52
|
+
"@kubb/plugin-solid-query": "5.0.0-alpha.14",
|
|
53
|
+
"@kubb/plugin-svelte-query": "5.0.0-alpha.14",
|
|
54
|
+
"@kubb/plugin-swr": "5.0.0-alpha.14",
|
|
55
|
+
"@kubb/plugin-ts": "5.0.0-alpha.14",
|
|
56
|
+
"@kubb/plugin-vue-query": "5.0.0-alpha.14",
|
|
57
|
+
"@kubb/plugin-zod": "5.0.0-alpha.14"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@types/ws": "^8.18.1",
|
|
61
|
-
"msw": "^2.12.
|
|
61
|
+
"msw": "^2.12.14",
|
|
62
62
|
"nitropack": "^2.13.2",
|
|
63
63
|
"vite": "^7.3.1",
|
|
64
64
|
"@internals/utils": "0.0.0"
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import createWebSocketStream from './lib/stream.js';
|
|
2
|
-
import Receiver from './lib/receiver.js';
|
|
3
|
-
import Sender from './lib/sender.js';
|
|
4
|
-
import WebSocket from './lib/websocket.js';
|
|
5
|
-
import WebSocketServer from './lib/websocket-server.js';
|
|
6
|
-
|
|
7
|
-
export { createWebSocketStream, Receiver, Sender, WebSocket, WebSocketServer };
|
|
8
|
-
export default WebSocket;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|