@kubb/agent 5.0.0-beta.75 → 5.0.0-beta.8
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 +353 -418
- package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
- package/.output/server/chunks/routes/api/health.get.mjs +1 -1
- package/.output/server/index.mjs +1 -1
- package/.output/server/node_modules/ajv/dist/2019.d.ts +1 -1
- package/.output/server/node_modules/ajv/dist/2019.js.map +1 -1
- package/.output/server/node_modules/ajv/dist/2020.d.ts +1 -1
- package/.output/server/node_modules/ajv/dist/2020.js.map +1 -1
- package/.output/server/node_modules/ajv/dist/ajv.d.ts +1 -1
- package/.output/server/node_modules/ajv/dist/ajv.js.map +1 -1
- package/.output/server/node_modules/ajv/dist/compile/index.d.ts +2 -1
- package/.output/server/node_modules/ajv/dist/compile/index.js +10 -3
- package/.output/server/node_modules/ajv/dist/compile/index.js.map +1 -1
- package/.output/server/node_modules/ajv/dist/compile/jtd/parse.js +1 -1
- package/.output/server/node_modules/ajv/dist/compile/jtd/parse.js.map +1 -1
- package/.output/server/node_modules/ajv/dist/compile/jtd/serialize.js +1 -1
- package/.output/server/node_modules/ajv/dist/compile/jtd/serialize.js.map +1 -1
- package/.output/server/node_modules/ajv/dist/compile/names.d.ts +1 -0
- package/.output/server/node_modules/ajv/dist/compile/names.js +1 -0
- package/.output/server/node_modules/ajv/dist/compile/names.js.map +1 -1
- package/.output/server/node_modules/ajv/dist/compile/validate/index.d.ts +1 -1
- package/.output/server/node_modules/ajv/dist/compile/validate/index.js +18 -4
- package/.output/server/node_modules/ajv/dist/compile/validate/index.js.map +1 -1
- package/.output/server/node_modules/ajv/dist/core.d.ts +4 -0
- package/.output/server/node_modules/ajv/dist/core.js +15 -1
- package/.output/server/node_modules/ajv/dist/core.js.map +1 -1
- package/.output/server/node_modules/ajv/dist/draft4.d.ts +19 -0
- package/.output/server/node_modules/ajv/dist/draft4.js +57 -0
- package/.output/server/node_modules/ajv/dist/draft4.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/refs/json-schema-draft-04.json +138 -0
- package/.output/server/node_modules/ajv/dist/types/index.d.ts +3 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +2 -1
- package/.output/server/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js.map +1 -1
- package/.output/server/node_modules/ajv/dist/vocabularies/applicator/allOf.js +1 -1
- package/.output/server/node_modules/ajv/dist/vocabularies/applicator/allOf.js.map +1 -1
- package/.output/server/node_modules/ajv/dist/vocabularies/applicator/properties.js +2 -1
- package/.output/server/node_modules/ajv/dist/vocabularies/applicator/properties.js.map +1 -1
- package/.output/server/node_modules/ajv/dist/vocabularies/code.d.ts +1 -1
- package/.output/server/node_modules/ajv/dist/vocabularies/code.js +10 -3
- package/.output/server/node_modules/ajv/dist/vocabularies/code.js.map +1 -1
- package/.output/server/node_modules/ajv/dist/vocabularies/core/ref.js +12 -2
- package/.output/server/node_modules/ajv/dist/vocabularies/core/ref.js.map +1 -1
- package/.output/server/node_modules/ajv/dist/vocabularies/discriminator/index.js +56 -21
- package/.output/server/node_modules/ajv/dist/vocabularies/discriminator/index.js.map +1 -1
- package/.output/server/node_modules/ajv/dist/vocabularies/draft4.d.ts +3 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/draft4.js +29 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/draft4.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/metadata.js +10 -2
- package/.output/server/node_modules/ajv/dist/vocabularies/metadata.js.map +1 -1
- package/.output/server/node_modules/ajv/dist/vocabularies/oasContext.d.ts +3 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/oasContext.js +26 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/oasContext.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js +22 -3
- package/.output/server/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js.map +1 -1
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/draft04/limitNumber.d.ts +12 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/draft04/limitNumber.js +43 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/draft04/limitNumber.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/draft04/limitNumberExclusive.d.ts +3 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/draft04/limitNumberExclusive.js +19 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/draft04/limitNumberExclusive.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/index.js +4 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/index.js.map +1 -1
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/readOnly.d.ts +3 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/readOnly.js +20 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/readOnly.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/required.js +8 -1
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/required.js.map +1 -1
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/writeOnly.d.ts +3 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/writeOnly.js +20 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/writeOnly.js.map +1 -0
- package/.output/server/node_modules/ajv/lib/2019.ts +1 -0
- package/.output/server/node_modules/ajv/lib/2020.ts +1 -0
- package/.output/server/node_modules/ajv/lib/ajv.ts +1 -0
- package/.output/server/node_modules/ajv/lib/compile/index.ts +16 -3
- package/.output/server/node_modules/ajv/lib/compile/jtd/parse.ts +3 -1
- package/.output/server/node_modules/ajv/lib/compile/jtd/serialize.ts +3 -1
- package/.output/server/node_modules/ajv/lib/compile/names.ts +1 -0
- package/.output/server/node_modules/ajv/lib/compile/validate/index.ts +21 -4
- package/.output/server/node_modules/ajv/lib/core.ts +20 -1
- package/.output/server/node_modules/ajv/lib/draft4.ts +79 -0
- package/.output/server/node_modules/ajv/lib/refs/json-schema-draft-04.json +138 -0
- package/.output/server/node_modules/ajv/lib/types/index.ts +4 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/applicator/additionalProperties.ts +2 -1
- package/.output/server/node_modules/ajv/lib/vocabularies/applicator/allOf.ts +1 -1
- package/.output/server/node_modules/ajv/lib/vocabularies/applicator/properties.ts +4 -1
- package/.output/server/node_modules/ajv/lib/vocabularies/code.ts +10 -3
- package/.output/server/node_modules/ajv/lib/vocabularies/core/ref.ts +21 -5
- package/.output/server/node_modules/ajv/lib/vocabularies/discriminator/index.ts +69 -19
- package/.output/server/node_modules/ajv/lib/vocabularies/draft4.ts +32 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/metadata.ts +10 -2
- package/.output/server/node_modules/ajv/lib/vocabularies/oasContext.ts +27 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/unevaluated/unevaluatedProperties.ts +29 -7
- package/.output/server/node_modules/ajv/lib/vocabularies/validation/draft04/limitNumber.ts +75 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/validation/draft04/limitNumberExclusive.ts +26 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/validation/index.ts +4 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/validation/readOnly.ts +23 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/validation/required.ts +7 -1
- package/.output/server/node_modules/ajv/lib/vocabularies/validation/writeOnly.ts +22 -0
- package/.output/server/node_modules/ajv/package.json +9 -6
- package/.output/server/node_modules/jiti/LICENSE +21 -0
- package/.output/server/node_modules/jiti/README.md +258 -0
- package/.output/server/node_modules/jiti/dist/babel.cjs +257 -0
- package/.output/server/node_modules/jiti/dist/jiti.cjs +1 -0
- package/.output/server/node_modules/jiti/lib/jiti-cli.mjs +34 -0
- package/.output/server/node_modules/jiti/lib/jiti-hooks.mjs +124 -0
- package/.output/server/node_modules/jiti/lib/jiti-native.mjs +121 -0
- package/.output/server/node_modules/jiti/lib/jiti-register.d.mts +1 -0
- package/.output/server/node_modules/jiti/lib/jiti-register.mjs +4 -0
- package/.output/server/node_modules/jiti/lib/jiti-static.mjs +23 -0
- package/.output/server/node_modules/jiti/lib/jiti.cjs +30 -0
- package/.output/server/node_modules/jiti/lib/jiti.d.cts +8 -0
- package/.output/server/node_modules/jiti/lib/jiti.d.mts +8 -0
- package/.output/server/node_modules/jiti/lib/jiti.mjs +29 -0
- package/.output/server/node_modules/jiti/lib/types.d.ts +420 -0
- package/.output/server/node_modules/jiti/package.json +146 -0
- package/.output/server/package.json +2 -5
- package/README.md +62 -27
- package/package.json +13 -12
- package/.output/server/node_modules/@rolldown/binding-linux-x64-gnu/package.json +0 -40
- package/.output/server/node_modules/@rolldown/binding-linux-x64-gnu/rolldown-binding.linux-x64-gnu.node +0 -0
- package/.output/server/node_modules/@rolldown/pluginutils/dist/filter/composable-filters.js +0 -256
- package/.output/server/node_modules/@rolldown/pluginutils/dist/filter/filter-vite-plugins.js +0 -75
- package/.output/server/node_modules/@rolldown/pluginutils/dist/filter/index.js +0 -3
- package/.output/server/node_modules/@rolldown/pluginutils/dist/filter/simple-filters.js +0 -70
- package/.output/server/node_modules/@rolldown/pluginutils/dist/index.js +0 -1
- package/.output/server/node_modules/@rolldown/pluginutils/dist/utils.js +0 -17
- package/.output/server/node_modules/@rolldown/pluginutils/package.json +0 -37
- package/.output/server/node_modules/rolldown/dist/index.mjs +0 -50
- package/.output/server/node_modules/rolldown/dist/parse-ast-index.mjs +0 -60
- package/.output/server/node_modules/rolldown/dist/shared/binding-BeU_1iEk.mjs +0 -582
- package/.output/server/node_modules/rolldown/dist/shared/bindingify-input-options-DbbBhzky.mjs +0 -2211
- package/.output/server/node_modules/rolldown/dist/shared/define-config-DJOr6Iwt.mjs +0 -6
- package/.output/server/node_modules/rolldown/dist/shared/error-DL-e8-oE.mjs +0 -85
- package/.output/server/node_modules/rolldown/dist/shared/logs-D80CXhvg.mjs +0 -180
- package/.output/server/node_modules/rolldown/dist/shared/misc-DJYbNKZX.mjs +0 -21
- package/.output/server/node_modules/rolldown/dist/shared/normalize-string-or-regex-CbQQ69gT.mjs +0 -66
- package/.output/server/node_modules/rolldown/dist/shared/parse-B_ZnWxLZ.mjs +0 -74
- package/.output/server/node_modules/rolldown/dist/shared/prompt-U5ajztzG.mjs +0 -847
- package/.output/server/node_modules/rolldown/dist/shared/rolldown-D3JZ9rMt.mjs +0 -40
- package/.output/server/node_modules/rolldown/dist/shared/rolldown-build-DSxL8qiP.mjs +0 -3325
- package/.output/server/node_modules/rolldown/dist/shared/watch-Bd8v9ewv.mjs +0 -374
- package/.output/server/node_modules/rolldown/package.json +0 -153
- package/.output/server/node_modules/unrun/dist/index.mjs +0 -2
- package/.output/server/node_modules/unrun/dist/src-GU5PtktT.mjs +0 -887
- package/.output/server/node_modules/unrun/package.json +0 -125
|
@@ -0,0 +1,420 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates a new {@linkcode Jiti} instance with custom options.
|
|
3
|
+
*
|
|
4
|
+
* @param id - Instance id, usually the current filename.
|
|
5
|
+
* @param userOptions - Custom options to override the default options.
|
|
6
|
+
* @returns A {@linkcode Jiti} instance.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* <caption>ESM Usage</caption>
|
|
10
|
+
*
|
|
11
|
+
* ```ts
|
|
12
|
+
* import { createJiti } from "jiti";
|
|
13
|
+
*
|
|
14
|
+
* const jiti = createJiti(import.meta.url, { debug: true });
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* <caption>CommonJS Usage **(deprecated)**</caption>
|
|
19
|
+
*
|
|
20
|
+
* ```ts
|
|
21
|
+
* const { createJiti } = require("jiti");
|
|
22
|
+
*
|
|
23
|
+
* const jiti = createJiti(__filename, { debug: true });
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* @since 2.0.0
|
|
27
|
+
*/
|
|
28
|
+
export declare function createJiti(id: string, userOptions?: JitiOptions): Jiti;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Jiti instance
|
|
32
|
+
*
|
|
33
|
+
* Calling `jiti()` is similar to CommonJS {@linkcode require()} but adds
|
|
34
|
+
* extra features such as TypeScript and ESM compatibility.
|
|
35
|
+
*
|
|
36
|
+
* **Note:** It is recommended to use
|
|
37
|
+
* {@linkcode Jiti.import | await jiti.import()} instead.
|
|
38
|
+
*/
|
|
39
|
+
export interface Jiti extends NodeRequire {
|
|
40
|
+
/**
|
|
41
|
+
* Resolved options
|
|
42
|
+
*/
|
|
43
|
+
options: JitiOptions;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* ESM import a module with additional TypeScript and ESM compatibility.
|
|
47
|
+
*
|
|
48
|
+
* If you need the default export of module, you can use
|
|
49
|
+
* `jiti.import(id, { default: true })` as shortcut to `mod?.default ?? mod`.
|
|
50
|
+
*/
|
|
51
|
+
import<T = unknown>(
|
|
52
|
+
id: string,
|
|
53
|
+
opts?: JitiResolveOptions & { default?: true },
|
|
54
|
+
): Promise<T>;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Resolve with ESM import conditions.
|
|
58
|
+
*/
|
|
59
|
+
esmResolve(id: string, parentURL?: string): string;
|
|
60
|
+
esmResolve<T extends JitiResolveOptions = JitiResolveOptions>(
|
|
61
|
+
id: string,
|
|
62
|
+
opts?: T,
|
|
63
|
+
): T["try"] extends true ? string | undefined : string;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Transform source code
|
|
67
|
+
*/
|
|
68
|
+
transform: (opts: TransformOptions) => string;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Evaluate transformed code as a module
|
|
72
|
+
*/
|
|
73
|
+
evalModule: (source: string, options?: EvalModuleOptions) => unknown;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Jiti instance options
|
|
78
|
+
*/
|
|
79
|
+
export interface JitiOptions {
|
|
80
|
+
/**
|
|
81
|
+
* Filesystem source cache
|
|
82
|
+
*
|
|
83
|
+
* An string can be passed to set the custom cache directory.
|
|
84
|
+
*
|
|
85
|
+
* By default (when set to `true`), jiti uses
|
|
86
|
+
* `node_modules/.cache/jiti` (if exists) or `{TMP_DIR}/jiti`.
|
|
87
|
+
*
|
|
88
|
+
* This option can also be disabled using
|
|
89
|
+
* `JITI_FS_CACHE=false` environment variable.
|
|
90
|
+
*
|
|
91
|
+
* **Note:** It is recommended to keep this option
|
|
92
|
+
* enabled for better performance.
|
|
93
|
+
*
|
|
94
|
+
* @default true
|
|
95
|
+
*/
|
|
96
|
+
fsCache?: boolean | string;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Rebuild the filesystem source cache
|
|
100
|
+
*
|
|
101
|
+
* This option can also be enabled using
|
|
102
|
+
* `JITI_REBUILD_FS_CACHE=true` environment variable.
|
|
103
|
+
*
|
|
104
|
+
* @default false
|
|
105
|
+
*/
|
|
106
|
+
rebuildFsCache?: boolean;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* @deprecated Use the {@linkcode fsCache} option.
|
|
110
|
+
*
|
|
111
|
+
* @default true
|
|
112
|
+
*/
|
|
113
|
+
cache?: boolean | string;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Runtime module cache
|
|
117
|
+
*
|
|
118
|
+
* Disabling allows editing code and importing same module multiple times.
|
|
119
|
+
*
|
|
120
|
+
* When enabled, jiti integrates with Node.js native CommonJS cache store.
|
|
121
|
+
*
|
|
122
|
+
* This option can also be disabled using
|
|
123
|
+
* `JITI_MODULE_CACHE=false` environment variable.
|
|
124
|
+
*
|
|
125
|
+
* @default true
|
|
126
|
+
*/
|
|
127
|
+
moduleCache?: boolean;
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* @deprecated Use the {@linkcode moduleCache} option.
|
|
131
|
+
*
|
|
132
|
+
* @default true
|
|
133
|
+
*/
|
|
134
|
+
requireCache?: boolean;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Custom transform function
|
|
138
|
+
*/
|
|
139
|
+
transform?: (opts: TransformOptions) => TransformResult;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Enable verbose debugging.
|
|
143
|
+
*
|
|
144
|
+
* Can also be enabled using `JITI_DEBUG=1` environment variable.
|
|
145
|
+
*
|
|
146
|
+
* @default false
|
|
147
|
+
*/
|
|
148
|
+
debug?: boolean;
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Enable sourcemaps for transformed code.
|
|
152
|
+
*
|
|
153
|
+
* Can also be disabled using `JITI_SOURCE_MAPS=0` environment variable.
|
|
154
|
+
*
|
|
155
|
+
* @default false
|
|
156
|
+
*/
|
|
157
|
+
sourceMaps?: boolean;
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Jiti combines module exports with the `default` export using an
|
|
161
|
+
* internal Proxy to improve compatibility with mixed CJS/ESM usage.
|
|
162
|
+
* You can check the current implementation
|
|
163
|
+
* {@link https://github.com/unjs/jiti/blob/main/src/utils.ts#L105 here}.
|
|
164
|
+
*
|
|
165
|
+
* Can be disabled using `JITI_INTEROP_DEFAULT=0` environment variable.
|
|
166
|
+
*
|
|
167
|
+
* @default true
|
|
168
|
+
*/
|
|
169
|
+
interopDefault?: boolean;
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Jiti hard source cache version.
|
|
173
|
+
*
|
|
174
|
+
* @internal
|
|
175
|
+
*/
|
|
176
|
+
cacheVersion?: string;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Supported extensions to resolve.
|
|
180
|
+
*
|
|
181
|
+
* @default [".js", ".mjs", ".cjs", ".ts", ".tsx", ".mts", ".cts", ".mtsx", ".ctsx", ".json"]
|
|
182
|
+
*/
|
|
183
|
+
extensions?: string[];
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Transform options
|
|
187
|
+
*/
|
|
188
|
+
transformOptions?: Omit<TransformOptions, "source">;
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Resolve aliases
|
|
192
|
+
*
|
|
193
|
+
* You can use `JITI_ALIAS` environment variable to set aliases as
|
|
194
|
+
* a JSON string.
|
|
195
|
+
*
|
|
196
|
+
* @default {}
|
|
197
|
+
*/
|
|
198
|
+
alias?: Record<string, string>;
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* List of modules (within `node_modules`) to always use native
|
|
202
|
+
* require/import for them.
|
|
203
|
+
*
|
|
204
|
+
* You can use `JITI_NATIVE_MODULES` environment variable to set
|
|
205
|
+
* native modules as a JSON string.
|
|
206
|
+
*
|
|
207
|
+
* @default []
|
|
208
|
+
*/
|
|
209
|
+
nativeModules?: string[];
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* List of modules (within `node_modules`) to transform them
|
|
213
|
+
* regardless of syntax.
|
|
214
|
+
*
|
|
215
|
+
* You can use `JITI_TRANSFORM_MODULES` environment variable to set
|
|
216
|
+
* transform modules as a JSON string.
|
|
217
|
+
*
|
|
218
|
+
* @default []
|
|
219
|
+
*/
|
|
220
|
+
transformModules?: string[];
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Parent module's {@linkcode ImportMeta | import.meta} context to use
|
|
224
|
+
* for ESM resolution.
|
|
225
|
+
*
|
|
226
|
+
* (Only used for `jiti/native` import)
|
|
227
|
+
*/
|
|
228
|
+
importMeta?: ImportMeta;
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Try to use native require and import without jiti transformations first.
|
|
232
|
+
*
|
|
233
|
+
* Enabled if Bun is detected.
|
|
234
|
+
*
|
|
235
|
+
* @default false
|
|
236
|
+
*/
|
|
237
|
+
tryNative?: boolean;
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* Always use a temp file (instead of a `data:` URL) for the ESM
|
|
241
|
+
* evaluation fallback path.
|
|
242
|
+
*
|
|
243
|
+
* jiti automatically falls back to a temp file when the `data:` URL
|
|
244
|
+
* import fails with `ENAMETOOLONG` — which happens on filesystems with
|
|
245
|
+
* a strict `NAME_MAX` limit (e.g. ecryptfs-encrypted home directories
|
|
246
|
+
* on Linux, some macOS configurations) once the base64-encoded source
|
|
247
|
+
* exceeds the limit. Setting this to `true` forces the temp-file path
|
|
248
|
+
* up front, skipping the `data:` URL attempt.
|
|
249
|
+
*
|
|
250
|
+
* The temp file is written to `{TMP_DIR}/jiti-esm/` and cleaned up
|
|
251
|
+
* after import.
|
|
252
|
+
*
|
|
253
|
+
* Can also be enabled using the `JITI_ESM_EVAL_TEMP_FILE=true`
|
|
254
|
+
* environment variable.
|
|
255
|
+
*
|
|
256
|
+
* @default false
|
|
257
|
+
*/
|
|
258
|
+
esmEvalTempFile?: boolean;
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* Enable JSX support Enable JSX support using
|
|
262
|
+
* {@link https://babeljs.io/docs/babel-plugin-transform-react-jsx | `@babel/plugin-transform-react-jsx`}.
|
|
263
|
+
*
|
|
264
|
+
* You can also use `JITI_JSX=1` environment variable to enable JSX support.
|
|
265
|
+
*
|
|
266
|
+
* @default false
|
|
267
|
+
*/
|
|
268
|
+
jsx?: boolean | JSXOptions;
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* Virtual modules - pre-loaded module objects that bypass filesystem resolution.
|
|
272
|
+
* Useful for bundled modules in compiled binaries (e.g., Bun).
|
|
273
|
+
*
|
|
274
|
+
* When a module ID matches a key in this map, the corresponding value is
|
|
275
|
+
* returned directly without any filesystem resolution or transformation.
|
|
276
|
+
*
|
|
277
|
+
* @example
|
|
278
|
+
* ```ts
|
|
279
|
+
* import * as typebox from "@sinclair/typebox";
|
|
280
|
+
*
|
|
281
|
+
* const jiti = createJiti(import.meta.url, {
|
|
282
|
+
* virtualModules: {
|
|
283
|
+
* "@sinclair/typebox": typebox,
|
|
284
|
+
* },
|
|
285
|
+
* });
|
|
286
|
+
* ```
|
|
287
|
+
*/
|
|
288
|
+
virtualModules?: Record<string, unknown>;
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* Enable tsconfig paths resolution.
|
|
292
|
+
*
|
|
293
|
+
* - `true`: auto-discover `tsconfig.json` by walking up from the
|
|
294
|
+
* jiti instance's parent path
|
|
295
|
+
* - `string`: explicit path to a `tsconfig.json` file
|
|
296
|
+
* - `false` (default): disabled
|
|
297
|
+
*
|
|
298
|
+
* When enabled, jiti uses
|
|
299
|
+
* {@link https://github.com/privatenumber/get-tsconfig | get-tsconfig}
|
|
300
|
+
* to resolve TypeScript path aliases defined in `compilerOptions.paths`.
|
|
301
|
+
*
|
|
302
|
+
* @default false
|
|
303
|
+
*/
|
|
304
|
+
tsconfigPaths?: boolean | string;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
interface NodeRequire {
|
|
308
|
+
/**
|
|
309
|
+
* Module cache
|
|
310
|
+
*/
|
|
311
|
+
cache: ModuleCache;
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* @deprecated Prefer {@linkcode Jiti.import | await jiti.import()}
|
|
315
|
+
* for better compatibility.
|
|
316
|
+
*/
|
|
317
|
+
(id: string): any;
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* @deprecated Prefer {@linkcode Jiti.esmResolve | jiti.esmResolve}
|
|
321
|
+
* for better compatibility.
|
|
322
|
+
*/
|
|
323
|
+
resolve: {
|
|
324
|
+
/** @deprecated */
|
|
325
|
+
(id: string, options?: { paths?: string[] | undefined }): string;
|
|
326
|
+
/** @deprecated */
|
|
327
|
+
paths(request: string): string[] | null;
|
|
328
|
+
};
|
|
329
|
+
|
|
330
|
+
/** @deprecated CommonJS API */
|
|
331
|
+
extensions: Record<
|
|
332
|
+
".js" | ".json" | ".node",
|
|
333
|
+
(m: NodeModule, filename: string) => any | undefined
|
|
334
|
+
>;
|
|
335
|
+
|
|
336
|
+
/** @deprecated CommonJS API */
|
|
337
|
+
main: NodeModule | undefined;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
export interface NodeModule {
|
|
341
|
+
/**
|
|
342
|
+
* `true` if the module is running during the Node.js preload.
|
|
343
|
+
*/
|
|
344
|
+
isPreloading: boolean;
|
|
345
|
+
exports: any;
|
|
346
|
+
require: NodeRequire;
|
|
347
|
+
id: string;
|
|
348
|
+
filename: string;
|
|
349
|
+
loaded: boolean;
|
|
350
|
+
/**
|
|
351
|
+
* @deprecated since Node.js **v14.6.0** Please use
|
|
352
|
+
* {@linkcode NodeRequire.main | require.main} and
|
|
353
|
+
* {@linkcode NodeModule.children | module.children} instead.
|
|
354
|
+
*/
|
|
355
|
+
parent: NodeModule | null | undefined;
|
|
356
|
+
children: NodeModule[];
|
|
357
|
+
/**
|
|
358
|
+
* The directory name of the module.
|
|
359
|
+
* This is usually the same as the `path.dirname()` of the `module.id`.
|
|
360
|
+
*
|
|
361
|
+
* @since Node.js **v11.14.0**
|
|
362
|
+
*/
|
|
363
|
+
path: string;
|
|
364
|
+
paths: string[];
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
export type ModuleCache = Record<string, NodeModule>;
|
|
368
|
+
|
|
369
|
+
export type EvalModuleOptions = Partial<{
|
|
370
|
+
id: string;
|
|
371
|
+
filename: string;
|
|
372
|
+
ext: string;
|
|
373
|
+
cache: ModuleCache;
|
|
374
|
+
/**
|
|
375
|
+
* @default true
|
|
376
|
+
*/
|
|
377
|
+
async: boolean;
|
|
378
|
+
forceTranspile: boolean;
|
|
379
|
+
}>;
|
|
380
|
+
|
|
381
|
+
export interface TransformOptions {
|
|
382
|
+
source: string;
|
|
383
|
+
filename?: string;
|
|
384
|
+
ts?: boolean;
|
|
385
|
+
retainLines?: boolean;
|
|
386
|
+
interopDefault?: boolean;
|
|
387
|
+
/**
|
|
388
|
+
* @default false
|
|
389
|
+
*/
|
|
390
|
+
async?: boolean;
|
|
391
|
+
/**
|
|
392
|
+
* @default false
|
|
393
|
+
*/
|
|
394
|
+
jsx?: boolean | JSXOptions;
|
|
395
|
+
babel?: Record<string, any>;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
export interface TransformResult {
|
|
399
|
+
code: string;
|
|
400
|
+
error?: any;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
export interface JitiResolveOptions {
|
|
404
|
+
conditions?: string[];
|
|
405
|
+
parentURL?: string | URL;
|
|
406
|
+
try?: boolean;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* @see {@link https://babeljs.io/docs/babel-plugin-transform-react-jsx#options | Reference}
|
|
411
|
+
*/
|
|
412
|
+
export interface JSXOptions {
|
|
413
|
+
throwIfNamespace?: boolean;
|
|
414
|
+
runtime?: "classic" | "automatic";
|
|
415
|
+
importSource?: string;
|
|
416
|
+
pragma?: string;
|
|
417
|
+
pragmaFrag?: string;
|
|
418
|
+
useBuiltIns?: boolean;
|
|
419
|
+
useSpread?: boolean;
|
|
420
|
+
}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "jiti",
|
|
3
|
+
"version": "2.7.0",
|
|
4
|
+
"description": "Runtime typescript and ESM support for Node.js",
|
|
5
|
+
"repository": "unjs/jiti",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": {
|
|
11
|
+
"types": "./lib/jiti.d.mts",
|
|
12
|
+
"default": "./lib/jiti.mjs"
|
|
13
|
+
},
|
|
14
|
+
"require": {
|
|
15
|
+
"types": "./lib/jiti.d.cts",
|
|
16
|
+
"default": "./lib/jiti.cjs"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"./register": {
|
|
20
|
+
"types": "./lib/jiti-register.d.mts",
|
|
21
|
+
"import": "./lib/jiti-register.mjs"
|
|
22
|
+
},
|
|
23
|
+
"./native": {
|
|
24
|
+
"types": "./lib/jiti.d.mts",
|
|
25
|
+
"import": "./lib/jiti-native.mjs"
|
|
26
|
+
},
|
|
27
|
+
"./static": {
|
|
28
|
+
"types": "./lib/jiti.d.mts",
|
|
29
|
+
"import": "./lib/jiti-static.mjs"
|
|
30
|
+
},
|
|
31
|
+
"./package.json": "./package.json"
|
|
32
|
+
},
|
|
33
|
+
"main": "./lib/jiti.cjs",
|
|
34
|
+
"module": "./lib/jiti.mjs",
|
|
35
|
+
"types": "./lib/jiti.d.cts",
|
|
36
|
+
"typesVersions": {
|
|
37
|
+
"*": {
|
|
38
|
+
"register": [
|
|
39
|
+
"./lib/jiti-register.d.mts"
|
|
40
|
+
],
|
|
41
|
+
"native": [
|
|
42
|
+
"./lib/jiti.d.mts"
|
|
43
|
+
],
|
|
44
|
+
"static": [
|
|
45
|
+
"./lib/jiti.d.mts"
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"bin": {
|
|
50
|
+
"jiti": "./lib/jiti-cli.mjs"
|
|
51
|
+
},
|
|
52
|
+
"files": [
|
|
53
|
+
"lib",
|
|
54
|
+
"dist",
|
|
55
|
+
"register.cjs"
|
|
56
|
+
],
|
|
57
|
+
"scripts": {
|
|
58
|
+
"bench": "node test/bench.mjs && deno -A test/bench.mjs && bun --bun test/bench.mjs",
|
|
59
|
+
"build": "pnpm clean && pnpm rspack",
|
|
60
|
+
"build:rolldown": "pnpm clean && pnpm rolldown -c rolldown.config.mjs",
|
|
61
|
+
"clean": "rm -rf dist",
|
|
62
|
+
"dev": "pnpm clean && pnpm rspack --watch",
|
|
63
|
+
"jiti": "JITI_DEBUG=1 JITI_JSX=1 lib/jiti-cli.mjs",
|
|
64
|
+
"lint": "eslint . && prettier -c src lib test stubs",
|
|
65
|
+
"lint:fix": "eslint --fix . && prettier -w src lib test stubs",
|
|
66
|
+
"prepack": "pnpm build",
|
|
67
|
+
"release": "pnpm build && pnpm test && changelogen --release --push && npm publish",
|
|
68
|
+
"test": "pnpm lint && pnpm test:types && vitest run --coverage && pnpm test:node-register && pnpm test:bun && pnpm test:native",
|
|
69
|
+
"test:bun": "bun --bun test test/bun",
|
|
70
|
+
"test:native": "pnpm test:native:bun && pnpm test:native:node && pnpm test:native:deno",
|
|
71
|
+
"test:native:bun": "bun --bun test test/native/bun.test.ts",
|
|
72
|
+
"test:native:deno": "deno test -A --no-check test/native/deno.test.ts",
|
|
73
|
+
"test:native:node": "node --test --experimental-strip-types test/native/node.test.ts",
|
|
74
|
+
"test:node-register": "JITI_JSX=1 node --test test/node-register.test.mjs",
|
|
75
|
+
"test:types": "tsgo --noEmit"
|
|
76
|
+
},
|
|
77
|
+
"devDependencies": {
|
|
78
|
+
"@babel/core": "^7.29.0",
|
|
79
|
+
"@babel/helper-module-imports": "^7.28.6",
|
|
80
|
+
"@babel/helper-module-transforms": "^7.28.6",
|
|
81
|
+
"@babel/helper-plugin-utils": "^7.28.6",
|
|
82
|
+
"@babel/helper-simple-access": "^7.27.1",
|
|
83
|
+
"@babel/plugin-proposal-decorators": "^7.29.0",
|
|
84
|
+
"@babel/plugin-syntax-class-properties": "^7.12.13",
|
|
85
|
+
"@babel/plugin-syntax-import-assertions": "^7.28.6",
|
|
86
|
+
"@babel/plugin-syntax-jsx": "^7.28.6",
|
|
87
|
+
"@babel/plugin-transform-explicit-resource-management": "^7.28.6",
|
|
88
|
+
"@babel/plugin-transform-export-namespace-from": "^7.27.1",
|
|
89
|
+
"@babel/plugin-transform-react-jsx": "^7.28.6",
|
|
90
|
+
"@babel/plugin-transform-typescript": "^7.28.6",
|
|
91
|
+
"@babel/preset-typescript": "^7.28.5",
|
|
92
|
+
"@babel/template": "^7.28.6",
|
|
93
|
+
"@babel/traverse": "^7.29.0",
|
|
94
|
+
"@babel/types": "^7.29.0",
|
|
95
|
+
"@rspack/cli": "^2.0.1",
|
|
96
|
+
"@rspack/core": "^2.0.1",
|
|
97
|
+
"@types/babel__core": "^7.20.5",
|
|
98
|
+
"@types/babel__helper-module-imports": "^7.18.3",
|
|
99
|
+
"@types/babel__helper-plugin-utils": "^7.10.3",
|
|
100
|
+
"@types/babel__template": "^7.4.4",
|
|
101
|
+
"@types/babel__traverse": "^7.28.0",
|
|
102
|
+
"@types/node": "^25.6.0",
|
|
103
|
+
"@typescript/native-preview": "7.0.0-dev.20260505.1",
|
|
104
|
+
"@vitest/coverage-v8": "^4.1.5",
|
|
105
|
+
"acorn": "^8.16.0",
|
|
106
|
+
"babel-plugin-parameter-decorator": "^1.0.16",
|
|
107
|
+
"changelogen": "^0.6.2",
|
|
108
|
+
"config": "^4.4.1",
|
|
109
|
+
"consola": "^3.4.2",
|
|
110
|
+
"defu": "^6.1.7",
|
|
111
|
+
"destr": "^2.0.5",
|
|
112
|
+
"escape-string-regexp": "^5.0.0",
|
|
113
|
+
"eslint": "^10.3.0",
|
|
114
|
+
"eslint-config-unjs": "^0.6.2",
|
|
115
|
+
"estree-walker": "^3.0.3",
|
|
116
|
+
"etag": "^1.8.1",
|
|
117
|
+
"fast-glob": "^3.3.3",
|
|
118
|
+
"get-tsconfig": "^4.14.0",
|
|
119
|
+
"is-installed-globally": "^1.0.0",
|
|
120
|
+
"mime": "^4.1.0",
|
|
121
|
+
"mitata": "^1.0.34",
|
|
122
|
+
"mlly": "^1.8.2",
|
|
123
|
+
"moment-timezone": "^0.6.2",
|
|
124
|
+
"nano-jsx": "^0.2.1",
|
|
125
|
+
"pathe": "^2.0.3",
|
|
126
|
+
"pkg-types": "^2.3.1",
|
|
127
|
+
"preact": "^10.29.1",
|
|
128
|
+
"preact-render-to-string": "^6.6.7",
|
|
129
|
+
"prettier": "^3.8.3",
|
|
130
|
+
"react": "^19.2.5",
|
|
131
|
+
"react-dom": "^19.2.5",
|
|
132
|
+
"reflect-metadata": "^0.2.2",
|
|
133
|
+
"rolldown": "1.0.0-rc.18",
|
|
134
|
+
"solid-js": "^1.9.12",
|
|
135
|
+
"std-env": "^4.1.0",
|
|
136
|
+
"terser-webpack-plugin": "^5.5.0",
|
|
137
|
+
"tinyexec": "^1.1.2",
|
|
138
|
+
"ts-loader": "^9.5.7",
|
|
139
|
+
"typescript": "^5.9.3",
|
|
140
|
+
"vitest": "^4.1.5",
|
|
141
|
+
"vue": "^3.5.33",
|
|
142
|
+
"yoctocolors": "^2.1.2",
|
|
143
|
+
"zod": "^4.4.3"
|
|
144
|
+
},
|
|
145
|
+
"packageManager": "pnpm@10.30.3"
|
|
146
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubb/agent-prod",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.8",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"private": true,
|
|
6
6
|
"dependencies": {
|
|
@@ -9,21 +9,18 @@
|
|
|
9
9
|
"@logtail/tools": "0.5.8",
|
|
10
10
|
"@logtail/types": "0.5.8",
|
|
11
11
|
"@msgpack/msgpack": "2.8.0",
|
|
12
|
-
"@rolldown/binding-linux-x64-gnu": "1.0.0-rc.17",
|
|
13
|
-
"@rolldown/pluginutils": "1.0.0-rc.17",
|
|
14
12
|
"anymatch": "3.1.3",
|
|
15
13
|
"chokidar": "5.0.0",
|
|
16
14
|
"consola": "3.4.2",
|
|
17
15
|
"fflate": "0.8.2",
|
|
16
|
+
"jiti": "2.7.0",
|
|
18
17
|
"normalize-path": "3.0.0",
|
|
19
18
|
"picomatch": "2.3.2",
|
|
20
19
|
"readdirp": "5.0.0",
|
|
21
20
|
"remeda": "2.34.0",
|
|
22
|
-
"rolldown": "1.0.0-rc.17",
|
|
23
21
|
"serialize-error": "8.1.0",
|
|
24
22
|
"stack-trace": "0.0.10",
|
|
25
23
|
"tinyexec": "1.1.2",
|
|
26
|
-
"unrun": "0.2.37",
|
|
27
24
|
"ws": "8.20.0"
|
|
28
25
|
}
|
|
29
26
|
}
|