@trpc/openapi 11.18.1-canary.9 → 11.19.0-alpha
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/dist/{cli.js → cli.mjs} +104 -109
- package/dist/heyapi/index.cjs +24 -38
- package/dist/heyapi/index.d.cts +9 -12
- package/dist/heyapi/index.d.cts.map +1 -1
- package/dist/heyapi/index.d.mts +9 -12
- package/dist/heyapi/index.d.mts.map +1 -1
- package/dist/heyapi/index.mjs +23 -38
- package/dist/heyapi/index.mjs.map +1 -1
- package/dist/index.cjs +128 -108
- package/dist/index.d.cts +3 -8
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +3 -9
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +89 -103
- package/dist/index.mjs.map +1 -1
- package/dist/objectSpread2-C2ceYbQe.cjs +67 -0
- package/dist/objectSpread2-Dh4InpQf.mjs +62 -0
- package/dist/rolldown-runtime-D7D4PA-g.mjs +13 -0
- package/package.json +10 -10
- package/src/generate.ts +67 -8
- package/src/heyapi/index.ts +1 -2
- package/src/types.ts +9 -16
- package/dist/chunk-CJ2cON1m.mjs +0 -33
- package/dist/objectSpread2-Blgb1OZh.mjs +0 -90
- package/dist/objectSpread2-Blgb1OZh.mjs.map +0 -1
- package/dist/objectSpread2-Cw30I7tb.cjs +0 -131
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@trpc/openapi",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "11.
|
|
5
|
+
"version": "11.19.0-alpha",
|
|
6
6
|
"description": "OpenAPI document generator for tRPC routers",
|
|
7
7
|
"author": "KATT",
|
|
8
8
|
"license": "MIT",
|
|
@@ -77,25 +77,25 @@
|
|
|
77
77
|
"openapi-types": "^12.1.3"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
|
-
"@hey-api/openapi-ts": "
|
|
80
|
+
"@hey-api/openapi-ts": "catalog:",
|
|
81
81
|
"@swagger-api/apidom-ls": "^1.6.0",
|
|
82
82
|
"@tanstack/intent": "^0.0.27",
|
|
83
|
-
"@trpc/server": "11.
|
|
84
|
-
"@types/node": "
|
|
83
|
+
"@trpc/server": "11.19.0",
|
|
84
|
+
"@types/node": "catalog:",
|
|
85
85
|
"bson": "^7.2.0",
|
|
86
|
-
"eslint": "
|
|
86
|
+
"eslint": "catalog:",
|
|
87
87
|
"ion-js": "^5.2.1",
|
|
88
88
|
"superjson": "^1.12.4",
|
|
89
|
-
"tsdown": "
|
|
90
|
-
"typescript": "
|
|
89
|
+
"tsdown": "catalog:",
|
|
90
|
+
"typescript": "catalog:ts-api",
|
|
91
91
|
"vscode-languageserver-textdocument": "^1.0.12",
|
|
92
92
|
"vscode-languageserver-types": "^3.17.5",
|
|
93
93
|
"zod": "^4.2.1"
|
|
94
94
|
},
|
|
95
95
|
"peerDependencies": {
|
|
96
96
|
"@hey-api/openapi-ts": ">=0.94.5",
|
|
97
|
-
"@trpc/server": "11.
|
|
98
|
-
"typescript": ">=5.7.2",
|
|
97
|
+
"@trpc/server": "11.19.0",
|
|
98
|
+
"typescript": ">=5.7.2 <7",
|
|
99
99
|
"zod": ">=4.0.0"
|
|
100
100
|
},
|
|
101
101
|
"peerDependenciesMeta": {
|
|
@@ -112,5 +112,5 @@
|
|
|
112
112
|
"keywords": [
|
|
113
113
|
"tanstack-intent"
|
|
114
114
|
],
|
|
115
|
-
"gitHead": "
|
|
115
|
+
"gitHead": "fcc6bca0ece2762e393e6d8c8527bbaa17a878d2"
|
|
116
116
|
}
|
package/src/generate.ts
CHANGED
|
@@ -73,6 +73,59 @@ function isObjectType(type: ts.Type): boolean {
|
|
|
73
73
|
return hasFlag(type, ts.TypeFlags.Object);
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
+
const STANDARD_FUNCTION_INTERFACES = new Set([
|
|
77
|
+
'Function',
|
|
78
|
+
'CallableFunction',
|
|
79
|
+
'NewableFunction',
|
|
80
|
+
]);
|
|
81
|
+
|
|
82
|
+
function isStandardFunctionInterface(type: ts.Type): boolean {
|
|
83
|
+
const symbol = type.getSymbol();
|
|
84
|
+
const name = symbol?.getName();
|
|
85
|
+
if (!name || !STANDARD_FUNCTION_INTERFACES.has(name)) {
|
|
86
|
+
return false;
|
|
87
|
+
}
|
|
88
|
+
return (
|
|
89
|
+
symbol?.declarations?.some((d) =>
|
|
90
|
+
/(^|[\\/])lib\.[^\\/]*\.d\.ts$/.test(d.getSourceFile().fileName),
|
|
91
|
+
) ?? false
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
function isFunctionType(type: ts.Type): boolean {
|
|
96
|
+
return (
|
|
97
|
+
type.getCallSignatures().length > 0 ||
|
|
98
|
+
type.getConstructSignatures().length > 0 ||
|
|
99
|
+
isStandardFunctionInterface(type)
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function hasFunctionMember(type: ts.Type): boolean {
|
|
104
|
+
if (isFunctionType(type)) {
|
|
105
|
+
return true;
|
|
106
|
+
}
|
|
107
|
+
return type.isUnion() && type.types.some(isFunctionType);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
function isUnserialisableType(type: ts.Type): boolean {
|
|
111
|
+
if (isFunctionType(type)) {
|
|
112
|
+
return true;
|
|
113
|
+
}
|
|
114
|
+
if (!type.isUnion() || !type.types.some(isFunctionType)) {
|
|
115
|
+
return false;
|
|
116
|
+
}
|
|
117
|
+
// Once callables are dropped, a union of nothing but `null` / `undefined`
|
|
118
|
+
// describes no value worth emitting.
|
|
119
|
+
return !type.types.some(
|
|
120
|
+
(m) =>
|
|
121
|
+
!isFunctionType(m) &&
|
|
122
|
+
!hasFlag(
|
|
123
|
+
m,
|
|
124
|
+
ts.TypeFlags.Undefined | ts.TypeFlags.Void | ts.TypeFlags.Null,
|
|
125
|
+
),
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
|
|
76
129
|
function isOptionalSymbol(sym: ts.Symbol): boolean {
|
|
77
130
|
return (sym.flags & ts.SymbolFlags.Optional) !== 0;
|
|
78
131
|
}
|
|
@@ -339,7 +392,9 @@ function convertUnionType(
|
|
|
339
392
|
|
|
340
393
|
// Strip undefined / void members (they make the field optional, not typed)
|
|
341
394
|
const defined = members.filter(
|
|
342
|
-
(m) =>
|
|
395
|
+
(m) =>
|
|
396
|
+
!hasFlag(m, ts.TypeFlags.Undefined | ts.TypeFlags.Void) &&
|
|
397
|
+
!isFunctionType(m),
|
|
343
398
|
);
|
|
344
399
|
if (defined.length === 0) {
|
|
345
400
|
return {};
|
|
@@ -446,11 +501,7 @@ function detectDiscriminatorProperty(schemas: SchemaObject[]): string | null {
|
|
|
446
501
|
for (const prop of firstProps) {
|
|
447
502
|
const allHaveConst = schemas.every((s) => {
|
|
448
503
|
const propSchema = s.properties?.[prop];
|
|
449
|
-
return (
|
|
450
|
-
propSchema !== undefined &&
|
|
451
|
-
propSchema.const !== undefined &&
|
|
452
|
-
s.required?.includes(prop)
|
|
453
|
-
);
|
|
504
|
+
return propSchema?.const !== undefined && s.required?.includes(prop);
|
|
454
505
|
});
|
|
455
506
|
if (allHaveConst) {
|
|
456
507
|
return prop;
|
|
@@ -697,6 +748,9 @@ function convertPlainObject(
|
|
|
697
748
|
}
|
|
698
749
|
|
|
699
750
|
const propType = checker.getTypeOfSymbol(prop);
|
|
751
|
+
if (isUnserialisableType(propType)) {
|
|
752
|
+
continue;
|
|
753
|
+
}
|
|
700
754
|
const propSchema = typeToJsonSchema(propType, ctx, depth + 1);
|
|
701
755
|
|
|
702
756
|
// Extract JSDoc comment from the property symbol as a description
|
|
@@ -706,7 +760,7 @@ function convertPlainObject(
|
|
|
706
760
|
}
|
|
707
761
|
|
|
708
762
|
properties[prop.name] = propSchema;
|
|
709
|
-
if (!isOptionalSymbol(prop)) {
|
|
763
|
+
if (!isOptionalSymbol(prop) && !hasFunctionMember(propType)) {
|
|
710
764
|
required.push(prop.name);
|
|
711
765
|
}
|
|
712
766
|
}
|
|
@@ -726,7 +780,9 @@ function convertPlainObject(
|
|
|
726
780
|
ctx,
|
|
727
781
|
depth + 1,
|
|
728
782
|
);
|
|
729
|
-
} else if (
|
|
783
|
+
} else if (typeProps.length > 0) {
|
|
784
|
+
// Closed shape. Stays closed even when every property was filtered out,
|
|
785
|
+
// so the result reads as "no keys" rather than "any keys".
|
|
730
786
|
result.additionalProperties = false;
|
|
731
787
|
}
|
|
732
788
|
|
|
@@ -795,6 +851,9 @@ function convertTypeToSchema(
|
|
|
795
851
|
ctx.visited.delete(type);
|
|
796
852
|
return result;
|
|
797
853
|
}
|
|
854
|
+
if (isFunctionType(type)) {
|
|
855
|
+
return {};
|
|
856
|
+
}
|
|
798
857
|
if (isObjectType(type)) {
|
|
799
858
|
return convertObjectType(type, ctx, depth);
|
|
800
859
|
}
|
package/src/heyapi/index.ts
CHANGED
|
@@ -5,8 +5,7 @@ import type {
|
|
|
5
5
|
} from '@trpc/server';
|
|
6
6
|
|
|
7
7
|
export type DataTransformerOptions =
|
|
8
|
-
|
|
|
9
|
-
| TRPCCombinedDataTransformer;
|
|
8
|
+
TRPCDataTransformer | TRPCCombinedDataTransformer;
|
|
10
9
|
export interface TRPCHeyApiClientOptions {
|
|
11
10
|
transformer?: DataTransformerOptions;
|
|
12
11
|
}
|
package/src/types.ts
CHANGED
|
@@ -4,13 +4,7 @@ export type Replace<TTarget, TReplaceWith> = Omit<TTarget, keyof TReplaceWith> &
|
|
|
4
4
|
TReplaceWith;
|
|
5
5
|
|
|
6
6
|
export type SchemaType =
|
|
7
|
-
| '
|
|
8
|
-
| 'boolean'
|
|
9
|
-
| 'integer'
|
|
10
|
-
| 'null'
|
|
11
|
-
| 'number'
|
|
12
|
-
| 'object'
|
|
13
|
-
| 'string';
|
|
7
|
+
'array' | 'boolean' | 'integer' | 'null' | 'number' | 'object' | 'string';
|
|
14
8
|
|
|
15
9
|
export type PrimitiveSchemaType = SchemaType;
|
|
16
10
|
|
|
@@ -67,15 +61,14 @@ export type MediaTypeObject = Replace<
|
|
|
67
61
|
}
|
|
68
62
|
>;
|
|
69
63
|
|
|
70
|
-
export interface ParameterBaseObject
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
> {}
|
|
64
|
+
export interface ParameterBaseObject extends Replace<
|
|
65
|
+
BaseOpenAPIV3_1.ParameterBaseObject,
|
|
66
|
+
{
|
|
67
|
+
schema?: SchemaObject | ReferenceObject;
|
|
68
|
+
examples?: Record<string, ReferenceObject | ExampleObject>;
|
|
69
|
+
content?: Record<string, MediaTypeObject>;
|
|
70
|
+
}
|
|
71
|
+
> {}
|
|
79
72
|
|
|
80
73
|
export interface ParameterObject extends ParameterBaseObject {
|
|
81
74
|
name: string;
|
package/dist/chunk-CJ2cON1m.mjs
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
//#region rolldown:runtime
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __commonJS = (cb, mod) => function() {
|
|
9
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
10
|
-
};
|
|
11
|
-
var __export = (target, all) => {
|
|
12
|
-
for (var name in all) __defProp(target, name, {
|
|
13
|
-
get: all[name],
|
|
14
|
-
enumerable: true
|
|
15
|
-
});
|
|
16
|
-
};
|
|
17
|
-
var __copyProps = (to, from, except, desc) => {
|
|
18
|
-
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
19
|
-
key = keys[i];
|
|
20
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
21
|
-
get: ((k) => from[k]).bind(null, key),
|
|
22
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
return to;
|
|
26
|
-
};
|
|
27
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
28
|
-
value: mod,
|
|
29
|
-
enumerable: true
|
|
30
|
-
}) : target, mod));
|
|
31
|
-
|
|
32
|
-
//#endregion
|
|
33
|
-
export { __commonJS, __export, __toESM };
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { __commonJS } from "./chunk-CJ2cON1m.mjs";
|
|
2
|
-
|
|
3
|
-
//#region ../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/typeof.js
|
|
4
|
-
var require_typeof = __commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/typeof.js"(exports, module) {
|
|
5
|
-
function _typeof$2(o) {
|
|
6
|
-
"@babel/helpers - typeof";
|
|
7
|
-
return module.exports = _typeof$2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o$1) {
|
|
8
|
-
return typeof o$1;
|
|
9
|
-
} : function(o$1) {
|
|
10
|
-
return o$1 && "function" == typeof Symbol && o$1.constructor === Symbol && o$1 !== Symbol.prototype ? "symbol" : typeof o$1;
|
|
11
|
-
}, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof$2(o);
|
|
12
|
-
}
|
|
13
|
-
module.exports = _typeof$2, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
14
|
-
} });
|
|
15
|
-
|
|
16
|
-
//#endregion
|
|
17
|
-
//#region ../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js
|
|
18
|
-
var require_toPrimitive = __commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js"(exports, module) {
|
|
19
|
-
var _typeof$1 = require_typeof()["default"];
|
|
20
|
-
function toPrimitive$1(t, r) {
|
|
21
|
-
if ("object" != _typeof$1(t) || !t) return t;
|
|
22
|
-
var e = t[Symbol.toPrimitive];
|
|
23
|
-
if (void 0 !== e) {
|
|
24
|
-
var i = e.call(t, r || "default");
|
|
25
|
-
if ("object" != _typeof$1(i)) return i;
|
|
26
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
27
|
-
}
|
|
28
|
-
return ("string" === r ? String : Number)(t);
|
|
29
|
-
}
|
|
30
|
-
module.exports = toPrimitive$1, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
31
|
-
} });
|
|
32
|
-
|
|
33
|
-
//#endregion
|
|
34
|
-
//#region ../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js
|
|
35
|
-
var require_toPropertyKey = __commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js"(exports, module) {
|
|
36
|
-
var _typeof = require_typeof()["default"];
|
|
37
|
-
var toPrimitive = require_toPrimitive();
|
|
38
|
-
function toPropertyKey$1(t) {
|
|
39
|
-
var i = toPrimitive(t, "string");
|
|
40
|
-
return "symbol" == _typeof(i) ? i : i + "";
|
|
41
|
-
}
|
|
42
|
-
module.exports = toPropertyKey$1, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
43
|
-
} });
|
|
44
|
-
|
|
45
|
-
//#endregion
|
|
46
|
-
//#region ../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js
|
|
47
|
-
var require_defineProperty = __commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js"(exports, module) {
|
|
48
|
-
var toPropertyKey = require_toPropertyKey();
|
|
49
|
-
function _defineProperty(e, r, t) {
|
|
50
|
-
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
51
|
-
value: t,
|
|
52
|
-
enumerable: !0,
|
|
53
|
-
configurable: !0,
|
|
54
|
-
writable: !0
|
|
55
|
-
}) : e[r] = t, e;
|
|
56
|
-
}
|
|
57
|
-
module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
58
|
-
} });
|
|
59
|
-
|
|
60
|
-
//#endregion
|
|
61
|
-
//#region ../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js
|
|
62
|
-
var require_objectSpread2 = __commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js"(exports, module) {
|
|
63
|
-
var defineProperty = require_defineProperty();
|
|
64
|
-
function ownKeys(e, r) {
|
|
65
|
-
var t = Object.keys(e);
|
|
66
|
-
if (Object.getOwnPropertySymbols) {
|
|
67
|
-
var o = Object.getOwnPropertySymbols(e);
|
|
68
|
-
r && (o = o.filter(function(r$1) {
|
|
69
|
-
return Object.getOwnPropertyDescriptor(e, r$1).enumerable;
|
|
70
|
-
})), t.push.apply(t, o);
|
|
71
|
-
}
|
|
72
|
-
return t;
|
|
73
|
-
}
|
|
74
|
-
function _objectSpread2(e) {
|
|
75
|
-
for (var r = 1; r < arguments.length; r++) {
|
|
76
|
-
var t = null != arguments[r] ? arguments[r] : {};
|
|
77
|
-
r % 2 ? ownKeys(Object(t), !0).forEach(function(r$1) {
|
|
78
|
-
defineProperty(e, r$1, t[r$1]);
|
|
79
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r$1) {
|
|
80
|
-
Object.defineProperty(e, r$1, Object.getOwnPropertyDescriptor(t, r$1));
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
return e;
|
|
84
|
-
}
|
|
85
|
-
module.exports = _objectSpread2, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
86
|
-
} });
|
|
87
|
-
|
|
88
|
-
//#endregion
|
|
89
|
-
export { require_objectSpread2 };
|
|
90
|
-
//# sourceMappingURL=objectSpread2-Blgb1OZh.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"objectSpread2-Blgb1OZh.mjs","names":["_typeof","o","_typeof","toPrimitive","toPropertyKey","r"],"sources":["../../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/typeof.js","../../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js","../../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js","../../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js","../../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js"],"sourcesContent":["function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports, _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nmodule.exports = toPrimitive, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nvar toPrimitive = require(\"./toPrimitive.js\");\nfunction toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\nmodule.exports = toPropertyKey, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var toPropertyKey = require(\"./toPropertyKey.js\");\nfunction _defineProperty(e, r, t) {\n return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n value: t,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[r] = t, e;\n}\nmodule.exports = _defineProperty, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var defineProperty = require(\"./defineProperty.js\");\nfunction ownKeys(e, r) {\n var t = Object.keys(e);\n if (Object.getOwnPropertySymbols) {\n var o = Object.getOwnPropertySymbols(e);\n r && (o = o.filter(function (r) {\n return Object.getOwnPropertyDescriptor(e, r).enumerable;\n })), t.push.apply(t, o);\n }\n return t;\n}\nfunction _objectSpread2(e) {\n for (var r = 1; r < arguments.length; r++) {\n var t = null != arguments[r] ? arguments[r] : {};\n r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {\n defineProperty(e, r, t[r]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {\n Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));\n });\n }\n return e;\n}\nmodule.exports = _objectSpread2, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;"],"x_google_ignoreList":[0,1,2,3,4],"mappings":";;;;CAAA,SAASA,UAAQ,GAAG;AAClB;AAEA,SAAO,OAAO,UAAUA,YAAU,qBAAqB,UAAU,mBAAmB,OAAO,WAAW,SAAUC,KAAG;AACjH,iBAAcA;EACf,IAAG,SAAUA,KAAG;AACf,UAAOA,OAAK,qBAAqB,UAAUA,IAAE,gBAAgB,UAAUA,QAAM,OAAO,YAAY,kBAAkBA;EACnH,GAAE,OAAO,QAAQ,aAAa,MAAM,OAAO,QAAQ,aAAa,OAAO,SAAS,UAAQ,EAAE;CAC5F;AACD,QAAO,UAAUD,WAAS,OAAO,QAAQ,aAAa,MAAM,OAAO,QAAQ,aAAa,OAAO;;;;;;CCT/F,IAAIE,6BAAiC;CACrC,SAASC,cAAY,GAAG,GAAG;AACzB,MAAI,YAAY,UAAQ,EAAE,KAAK,EAAG,QAAO;EACzC,IAAI,IAAI,EAAE,OAAO;AACjB,WAAS,MAAM,GAAG;GAChB,IAAI,IAAI,EAAE,KAAK,GAAG,KAAK,UAAU;AACjC,OAAI,YAAY,UAAQ,EAAE,CAAE,QAAO;AACnC,SAAM,IAAI,UAAU;EACrB;AACD,SAAO,CAAC,aAAa,IAAI,SAAS,QAAQ,EAAE;CAC7C;AACD,QAAO,UAAUA,eAAa,OAAO,QAAQ,aAAa,MAAM,OAAO,QAAQ,aAAa,OAAO;;;;;;CCXnG,IAAI,2BAAiC;CACrC,IAAI;CACJ,SAASC,gBAAc,GAAG;EACxB,IAAI,IAAI,YAAY,GAAG,SAAS;AAChC,SAAO,YAAY,QAAQ,EAAE,GAAG,IAAI,IAAI;CACzC;AACD,QAAO,UAAUA,iBAAe,OAAO,QAAQ,aAAa,MAAM,OAAO,QAAQ,aAAa,OAAO;;;;;;CCNrG,IAAI;CACJ,SAAS,gBAAgB,GAAG,GAAG,GAAG;AAChC,UAAQ,IAAI,cAAc,EAAE,KAAK,IAAI,OAAO,eAAe,GAAG,GAAG;GAC/D,OAAO;GACP,aAAa;GACb,eAAe;GACf,WAAW;EACZ,EAAC,GAAG,EAAE,KAAK,GAAG;CAChB;AACD,QAAO,UAAU,iBAAiB,OAAO,QAAQ,aAAa,MAAM,OAAO,QAAQ,aAAa,OAAO;;;;;;CCTvG,IAAI;CACJ,SAAS,QAAQ,GAAG,GAAG;EACrB,IAAI,IAAI,OAAO,KAAK,EAAE;AACtB,MAAI,OAAO,uBAAuB;GAChC,IAAI,IAAI,OAAO,sBAAsB,EAAE;AACvC,SAAM,IAAI,EAAE,OAAO,SAAUC,KAAG;AAC9B,WAAO,OAAO,yBAAyB,GAAGA,IAAE,CAAC;GAC9C,EAAC,GAAG,EAAE,KAAK,MAAM,GAAG,EAAE;EACxB;AACD,SAAO;CACR;CACD,SAAS,eAAe,GAAG;AACzB,OAAK,IAAI,IAAI,GAAG,IAAI,UAAU,QAAQ,KAAK;GACzC,IAAI,IAAI,QAAQ,UAAU,KAAK,UAAU,KAAK,CAAE;AAChD,OAAI,IAAI,QAAQ,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,SAAUA,KAAG;AAClD,mBAAe,GAAGA,KAAG,EAAEA,KAAG;GAC3B,EAAC,GAAG,OAAO,4BAA4B,OAAO,iBAAiB,GAAG,OAAO,0BAA0B,EAAE,CAAC,GAAG,QAAQ,OAAO,EAAE,CAAC,CAAC,QAAQ,SAAUA,KAAG;AAChJ,WAAO,eAAe,GAAGA,KAAG,OAAO,yBAAyB,GAAGA,IAAE,CAAC;GACnE,EAAC;EACH;AACD,SAAO;CACR;AACD,QAAO,UAAU,gBAAgB,OAAO,QAAQ,aAAa,MAAM,OAAO,QAAQ,aAAa,OAAO"}
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
//#region rolldown:runtime
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __commonJS = (cb, mod) => function() {
|
|
9
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
13
|
-
key = keys[i];
|
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
15
|
-
get: ((k) => from[k]).bind(null, key),
|
|
16
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
return to;
|
|
20
|
-
};
|
|
21
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
22
|
-
value: mod,
|
|
23
|
-
enumerable: true
|
|
24
|
-
}) : target, mod));
|
|
25
|
-
|
|
26
|
-
//#endregion
|
|
27
|
-
|
|
28
|
-
//#region ../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/typeof.js
|
|
29
|
-
var require_typeof = __commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/typeof.js"(exports, module) {
|
|
30
|
-
function _typeof$2(o) {
|
|
31
|
-
"@babel/helpers - typeof";
|
|
32
|
-
return module.exports = _typeof$2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o$1) {
|
|
33
|
-
return typeof o$1;
|
|
34
|
-
} : function(o$1) {
|
|
35
|
-
return o$1 && "function" == typeof Symbol && o$1.constructor === Symbol && o$1 !== Symbol.prototype ? "symbol" : typeof o$1;
|
|
36
|
-
}, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof$2(o);
|
|
37
|
-
}
|
|
38
|
-
module.exports = _typeof$2, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
39
|
-
} });
|
|
40
|
-
|
|
41
|
-
//#endregion
|
|
42
|
-
//#region ../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js
|
|
43
|
-
var require_toPrimitive = __commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js"(exports, module) {
|
|
44
|
-
var _typeof$1 = require_typeof()["default"];
|
|
45
|
-
function toPrimitive$1(t, r) {
|
|
46
|
-
if ("object" != _typeof$1(t) || !t) return t;
|
|
47
|
-
var e = t[Symbol.toPrimitive];
|
|
48
|
-
if (void 0 !== e) {
|
|
49
|
-
var i = e.call(t, r || "default");
|
|
50
|
-
if ("object" != _typeof$1(i)) return i;
|
|
51
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
52
|
-
}
|
|
53
|
-
return ("string" === r ? String : Number)(t);
|
|
54
|
-
}
|
|
55
|
-
module.exports = toPrimitive$1, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
56
|
-
} });
|
|
57
|
-
|
|
58
|
-
//#endregion
|
|
59
|
-
//#region ../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js
|
|
60
|
-
var require_toPropertyKey = __commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js"(exports, module) {
|
|
61
|
-
var _typeof = require_typeof()["default"];
|
|
62
|
-
var toPrimitive = require_toPrimitive();
|
|
63
|
-
function toPropertyKey$1(t) {
|
|
64
|
-
var i = toPrimitive(t, "string");
|
|
65
|
-
return "symbol" == _typeof(i) ? i : i + "";
|
|
66
|
-
}
|
|
67
|
-
module.exports = toPropertyKey$1, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
68
|
-
} });
|
|
69
|
-
|
|
70
|
-
//#endregion
|
|
71
|
-
//#region ../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js
|
|
72
|
-
var require_defineProperty = __commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js"(exports, module) {
|
|
73
|
-
var toPropertyKey = require_toPropertyKey();
|
|
74
|
-
function _defineProperty(e, r, t) {
|
|
75
|
-
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
76
|
-
value: t,
|
|
77
|
-
enumerable: !0,
|
|
78
|
-
configurable: !0,
|
|
79
|
-
writable: !0
|
|
80
|
-
}) : e[r] = t, e;
|
|
81
|
-
}
|
|
82
|
-
module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
83
|
-
} });
|
|
84
|
-
|
|
85
|
-
//#endregion
|
|
86
|
-
//#region ../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js
|
|
87
|
-
var require_objectSpread2 = __commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js"(exports, module) {
|
|
88
|
-
var defineProperty = require_defineProperty();
|
|
89
|
-
function ownKeys(e, r) {
|
|
90
|
-
var t = Object.keys(e);
|
|
91
|
-
if (Object.getOwnPropertySymbols) {
|
|
92
|
-
var o = Object.getOwnPropertySymbols(e);
|
|
93
|
-
r && (o = o.filter(function(r$1) {
|
|
94
|
-
return Object.getOwnPropertyDescriptor(e, r$1).enumerable;
|
|
95
|
-
})), t.push.apply(t, o);
|
|
96
|
-
}
|
|
97
|
-
return t;
|
|
98
|
-
}
|
|
99
|
-
function _objectSpread2(e) {
|
|
100
|
-
for (var r = 1; r < arguments.length; r++) {
|
|
101
|
-
var t = null != arguments[r] ? arguments[r] : {};
|
|
102
|
-
r % 2 ? ownKeys(Object(t), !0).forEach(function(r$1) {
|
|
103
|
-
defineProperty(e, r$1, t[r$1]);
|
|
104
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r$1) {
|
|
105
|
-
Object.defineProperty(e, r$1, Object.getOwnPropertyDescriptor(t, r$1));
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
return e;
|
|
109
|
-
}
|
|
110
|
-
module.exports = _objectSpread2, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
111
|
-
} });
|
|
112
|
-
|
|
113
|
-
//#endregion
|
|
114
|
-
Object.defineProperty(exports, '__commonJS', {
|
|
115
|
-
enumerable: true,
|
|
116
|
-
get: function () {
|
|
117
|
-
return __commonJS;
|
|
118
|
-
}
|
|
119
|
-
});
|
|
120
|
-
Object.defineProperty(exports, '__toESM', {
|
|
121
|
-
enumerable: true,
|
|
122
|
-
get: function () {
|
|
123
|
-
return __toESM;
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
|
-
Object.defineProperty(exports, 'require_objectSpread2', {
|
|
127
|
-
enumerable: true,
|
|
128
|
-
get: function () {
|
|
129
|
-
return require_objectSpread2;
|
|
130
|
-
}
|
|
131
|
-
});
|