@nuxt/webpack-builder 3.20.2 → 3.21.1
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/README.md +5 -3
- package/dist/THIRD-PARTY-LICENSES.md +3847 -0
- package/dist/_chunks/libs/@babel/parser.d.mts +1536 -0
- package/dist/_chunks/libs/@jridgewell/trace-mapping.d.mts +82 -0
- package/dist/_chunks/libs/@types/estree.d.mts +525 -0
- package/dist/_chunks/libs/@types/pug.d.mts +123 -0
- package/dist/_chunks/libs/@unhead/vue.d.mts +1096 -0
- package/dist/_chunks/libs/@vitejs/plugin-vue-jsx.d.mts +5297 -0
- package/dist/_chunks/libs/@vitejs/plugin-vue.d.mts +83 -0
- package/dist/_chunks/libs/@volar/language-core.d.mts +56 -0
- package/dist/_chunks/libs/@volar/source-map.d.mts +10 -0
- package/dist/_chunks/libs/@vue/compiler-core.d.mts +1213 -0
- package/dist/_chunks/libs/@vue/compiler-dom.d.mts +45 -0
- package/dist/_chunks/libs/@vue/language-core.d.mts +11387 -0
- package/dist/_chunks/libs/c12.d.mts +147 -0
- package/dist/_chunks/libs/compatx.d.mts +47 -0
- package/dist/_chunks/libs/h3.d.mts +45 -0
- package/dist/_chunks/libs/ofetch.d.mts +870 -0
- package/dist/_chunks/libs/open.d.mts +1 -0
- package/dist/_chunks/libs/oxc-transform.d.mts +422 -0
- package/dist/_chunks/libs/pkg-types.d.mts +23 -0
- package/dist/_chunks/libs/rollup-plugin-visualizer.d.mts +90 -0
- package/dist/_chunks/libs/scule.d.mts +15 -0
- package/dist/_chunks/libs/unctx.d.mts +28 -0
- package/dist/_chunks/libs/unimport.d.mts +386 -0
- package/dist/_chunks/libs/untyped.d.mts +44 -0
- package/dist/_chunks/libs/vue-router.d.mts +1413 -0
- package/dist/_chunks/rolldown-runtime.mjs +12 -0
- package/dist/index.d.mts +3150 -4
- package/dist/index.mjs +1310 -1155
- package/dist/loaders/vue-module-identifier.mjs +11 -0
- package/package.json +31 -27
- package/dist/index.d.ts +0 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "child_process";
|
|
@@ -0,0 +1,422 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/oxc-transform@0.112.0/node_modules/oxc-transform/index.d.ts
|
|
2
|
+
interface CompilerAssumptions {
|
|
3
|
+
ignoreFunctionLength?: boolean;
|
|
4
|
+
noDocumentAll?: boolean;
|
|
5
|
+
objectRestNoSymbols?: boolean;
|
|
6
|
+
pureGetters?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* When using public class fields, assume that they don't shadow any getter in the current class,
|
|
9
|
+
* in its subclasses or in its superclass. Thus, it's safe to assign them rather than using
|
|
10
|
+
* `Object.defineProperty`.
|
|
11
|
+
*
|
|
12
|
+
* For example:
|
|
13
|
+
*
|
|
14
|
+
* Input:
|
|
15
|
+
* ```js
|
|
16
|
+
* class Test {
|
|
17
|
+
* field = 2;
|
|
18
|
+
*
|
|
19
|
+
* static staticField = 3;
|
|
20
|
+
* }
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* When `set_public_class_fields` is `true`, the output will be:
|
|
24
|
+
* ```js
|
|
25
|
+
* class Test {
|
|
26
|
+
* constructor() {
|
|
27
|
+
* this.field = 2;
|
|
28
|
+
* }
|
|
29
|
+
* }
|
|
30
|
+
* Test.staticField = 3;
|
|
31
|
+
* ```
|
|
32
|
+
*
|
|
33
|
+
* Otherwise, the output will be:
|
|
34
|
+
* ```js
|
|
35
|
+
* import _defineProperty from "@oxc-project/runtime/helpers/defineProperty";
|
|
36
|
+
* class Test {
|
|
37
|
+
* constructor() {
|
|
38
|
+
* _defineProperty(this, "field", 2);
|
|
39
|
+
* }
|
|
40
|
+
* }
|
|
41
|
+
* _defineProperty(Test, "staticField", 3);
|
|
42
|
+
* ```
|
|
43
|
+
*
|
|
44
|
+
* NOTE: For TypeScript, if you wanted behavior is equivalent to `useDefineForClassFields: false`, you should
|
|
45
|
+
* set both `set_public_class_fields` and [`crate::TypeScriptOptions::remove_class_fields_without_initializer`]
|
|
46
|
+
* to `true`.
|
|
47
|
+
*/
|
|
48
|
+
setPublicClassFields?: boolean;
|
|
49
|
+
}
|
|
50
|
+
interface DecoratorOptions {
|
|
51
|
+
/**
|
|
52
|
+
* Enables experimental support for decorators, which is a version of decorators that predates the TC39 standardization process.
|
|
53
|
+
*
|
|
54
|
+
* Decorators are a language feature which hasn’t yet been fully ratified into the JavaScript specification.
|
|
55
|
+
* This means that the implementation version in TypeScript may differ from the implementation in JavaScript when it it decided by TC39.
|
|
56
|
+
*
|
|
57
|
+
* @see https://www.typescriptlang.org/tsconfig/#experimentalDecorators
|
|
58
|
+
* @default false
|
|
59
|
+
*/
|
|
60
|
+
legacy?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Enables emitting decorator metadata.
|
|
63
|
+
*
|
|
64
|
+
* This option the same as [emitDecoratorMetadata](https://www.typescriptlang.org/tsconfig/#emitDecoratorMetadata)
|
|
65
|
+
* in TypeScript, and it only works when `legacy` is true.
|
|
66
|
+
*
|
|
67
|
+
* @see https://www.typescriptlang.org/tsconfig/#emitDecoratorMetadata
|
|
68
|
+
* @default false
|
|
69
|
+
*/
|
|
70
|
+
emitDecoratorMetadata?: boolean;
|
|
71
|
+
}
|
|
72
|
+
declare const enum HelperMode {
|
|
73
|
+
/**
|
|
74
|
+
* Runtime mode (default): Helper functions are imported from a runtime package.
|
|
75
|
+
*
|
|
76
|
+
* Example:
|
|
77
|
+
*
|
|
78
|
+
* ```js
|
|
79
|
+
* import helperName from "@oxc-project/runtime/helpers/helperName";
|
|
80
|
+
* helperName(...arguments);
|
|
81
|
+
* ```
|
|
82
|
+
*/
|
|
83
|
+
Runtime = 'Runtime',
|
|
84
|
+
/**
|
|
85
|
+
* External mode: Helper functions are accessed from a global `babelHelpers` object.
|
|
86
|
+
*
|
|
87
|
+
* Example:
|
|
88
|
+
*
|
|
89
|
+
* ```js
|
|
90
|
+
* babelHelpers.helperName(...arguments);
|
|
91
|
+
* ```
|
|
92
|
+
*/
|
|
93
|
+
External = 'External'
|
|
94
|
+
}
|
|
95
|
+
interface Helpers {
|
|
96
|
+
mode?: HelperMode;
|
|
97
|
+
}
|
|
98
|
+
interface IsolatedDeclarationsOptions {
|
|
99
|
+
/**
|
|
100
|
+
* Do not emit declarations for code that has an @internal annotation in its JSDoc comment.
|
|
101
|
+
* This is an internal compiler option; use at your own risk, because the compiler does not check that the result is valid.
|
|
102
|
+
*
|
|
103
|
+
* Default: `false`
|
|
104
|
+
*
|
|
105
|
+
* See <https://www.typescriptlang.org/tsconfig/#stripInternal>
|
|
106
|
+
*/
|
|
107
|
+
stripInternal?: boolean;
|
|
108
|
+
sourcemap?: boolean;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Configure how TSX and JSX are transformed.
|
|
112
|
+
*
|
|
113
|
+
* @see {@link https://oxc.rs/docs/guide/usage/transformer/jsx}
|
|
114
|
+
*/
|
|
115
|
+
interface JsxOptions {
|
|
116
|
+
/**
|
|
117
|
+
* Decides which runtime to use.
|
|
118
|
+
*
|
|
119
|
+
* - 'automatic' - auto-import the correct JSX factories
|
|
120
|
+
* - 'classic' - no auto-import
|
|
121
|
+
*
|
|
122
|
+
* @default 'automatic'
|
|
123
|
+
*/
|
|
124
|
+
runtime?: 'classic' | 'automatic';
|
|
125
|
+
/**
|
|
126
|
+
* Emit development-specific information, such as `__source` and `__self`.
|
|
127
|
+
*
|
|
128
|
+
* @default false
|
|
129
|
+
*/
|
|
130
|
+
development?: boolean;
|
|
131
|
+
/**
|
|
132
|
+
* Toggles whether or not to throw an error if an XML namespaced tag name
|
|
133
|
+
* is used.
|
|
134
|
+
*
|
|
135
|
+
* Though the JSX spec allows this, it is disabled by default since React's
|
|
136
|
+
* JSX does not currently have support for it.
|
|
137
|
+
*
|
|
138
|
+
* @default true
|
|
139
|
+
*/
|
|
140
|
+
throwIfNamespace?: boolean;
|
|
141
|
+
/**
|
|
142
|
+
* Mark JSX elements and top-level React method calls as pure for tree shaking.
|
|
143
|
+
*
|
|
144
|
+
* @default true
|
|
145
|
+
*/
|
|
146
|
+
pure?: boolean;
|
|
147
|
+
/**
|
|
148
|
+
* Replaces the import source when importing functions.
|
|
149
|
+
*
|
|
150
|
+
* @default 'react'
|
|
151
|
+
*/
|
|
152
|
+
importSource?: string;
|
|
153
|
+
/**
|
|
154
|
+
* Replace the function used when compiling JSX expressions. It should be a
|
|
155
|
+
* qualified name (e.g. `React.createElement`) or an identifier (e.g.
|
|
156
|
+
* `createElement`).
|
|
157
|
+
*
|
|
158
|
+
* Only used for `classic` {@link runtime}.
|
|
159
|
+
*
|
|
160
|
+
* @default 'React.createElement'
|
|
161
|
+
*/
|
|
162
|
+
pragma?: string;
|
|
163
|
+
/**
|
|
164
|
+
* Replace the component used when compiling JSX fragments. It should be a
|
|
165
|
+
* valid JSX tag name.
|
|
166
|
+
*
|
|
167
|
+
* Only used for `classic` {@link runtime}.
|
|
168
|
+
*
|
|
169
|
+
* @default 'React.Fragment'
|
|
170
|
+
*/
|
|
171
|
+
pragmaFrag?: string;
|
|
172
|
+
/**
|
|
173
|
+
* Enable React Fast Refresh .
|
|
174
|
+
*
|
|
175
|
+
* Conforms to the implementation in {@link https://github.com/facebook/react/tree/v18.3.1/packages/react-refresh}
|
|
176
|
+
*
|
|
177
|
+
* @default false
|
|
178
|
+
*/
|
|
179
|
+
refresh?: boolean | ReactRefreshOptions;
|
|
180
|
+
}
|
|
181
|
+
interface PluginsOptions {
|
|
182
|
+
styledComponents?: StyledComponentsOptions;
|
|
183
|
+
taggedTemplateEscape?: boolean;
|
|
184
|
+
}
|
|
185
|
+
interface ReactRefreshOptions {
|
|
186
|
+
/**
|
|
187
|
+
* Specify the identifier of the refresh registration variable.
|
|
188
|
+
*
|
|
189
|
+
* @default `$RefreshReg$`.
|
|
190
|
+
*/
|
|
191
|
+
refreshReg?: string;
|
|
192
|
+
/**
|
|
193
|
+
* Specify the identifier of the refresh signature variable.
|
|
194
|
+
*
|
|
195
|
+
* @default `$RefreshSig$`.
|
|
196
|
+
*/
|
|
197
|
+
refreshSig?: string;
|
|
198
|
+
emitFullSignatures?: boolean;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Configure how styled-components are transformed.
|
|
202
|
+
*
|
|
203
|
+
* @see {@link https://oxc.rs/docs/guide/usage/transformer/plugins#styled-components}
|
|
204
|
+
*/
|
|
205
|
+
interface StyledComponentsOptions {
|
|
206
|
+
/**
|
|
207
|
+
* Enhances the attached CSS class name on each component with richer output to help
|
|
208
|
+
* identify your components in the DOM without React DevTools.
|
|
209
|
+
*
|
|
210
|
+
* @default true
|
|
211
|
+
*/
|
|
212
|
+
displayName?: boolean;
|
|
213
|
+
/**
|
|
214
|
+
* Controls whether the `displayName` of a component will be prefixed with the filename
|
|
215
|
+
* to make the component name as unique as possible.
|
|
216
|
+
*
|
|
217
|
+
* @default true
|
|
218
|
+
*/
|
|
219
|
+
fileName?: boolean;
|
|
220
|
+
/**
|
|
221
|
+
* Adds a unique identifier to every styled component to avoid checksum mismatches
|
|
222
|
+
* due to different class generation on the client and server during server-side rendering.
|
|
223
|
+
*
|
|
224
|
+
* @default true
|
|
225
|
+
*/
|
|
226
|
+
ssr?: boolean;
|
|
227
|
+
/**
|
|
228
|
+
* Transpiles styled-components tagged template literals to a smaller representation
|
|
229
|
+
* than what Babel normally creates, helping to reduce bundle size.
|
|
230
|
+
*
|
|
231
|
+
* @default true
|
|
232
|
+
*/
|
|
233
|
+
transpileTemplateLiterals?: boolean;
|
|
234
|
+
/**
|
|
235
|
+
* Minifies CSS content by removing all whitespace and comments from your CSS,
|
|
236
|
+
* keeping valuable bytes out of your bundles.
|
|
237
|
+
*
|
|
238
|
+
* @default true
|
|
239
|
+
*/
|
|
240
|
+
minify?: boolean;
|
|
241
|
+
/**
|
|
242
|
+
* Enables transformation of JSX `css` prop when using styled-components.
|
|
243
|
+
*
|
|
244
|
+
* **Note: This feature is not yet implemented in oxc.**
|
|
245
|
+
*
|
|
246
|
+
* @default true
|
|
247
|
+
*/
|
|
248
|
+
cssProp?: boolean;
|
|
249
|
+
/**
|
|
250
|
+
* Enables "pure annotation" to aid dead code elimination by bundlers.
|
|
251
|
+
*
|
|
252
|
+
* @default false
|
|
253
|
+
*/
|
|
254
|
+
pure?: boolean;
|
|
255
|
+
/**
|
|
256
|
+
* Adds a namespace prefix to component identifiers to ensure class names are unique.
|
|
257
|
+
*
|
|
258
|
+
* Example: With `namespace: "my-app"`, generates `componentId: "my-app__sc-3rfj0a-1"`
|
|
259
|
+
*/
|
|
260
|
+
namespace?: string;
|
|
261
|
+
/**
|
|
262
|
+
* List of file names that are considered meaningless for component naming purposes.
|
|
263
|
+
*
|
|
264
|
+
* When the `fileName` option is enabled and a component is in a file with a name
|
|
265
|
+
* from this list, the directory name will be used instead of the file name for
|
|
266
|
+
* the component's display name.
|
|
267
|
+
*
|
|
268
|
+
* @default `["index"]`
|
|
269
|
+
*/
|
|
270
|
+
meaninglessFileNames?: Array<string>;
|
|
271
|
+
/**
|
|
272
|
+
* Import paths to be considered as styled-components imports at the top level.
|
|
273
|
+
*
|
|
274
|
+
* **Note: This feature is not yet implemented in oxc.**
|
|
275
|
+
*/
|
|
276
|
+
topLevelImportPaths?: Array<string>;
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* Options for transforming a JavaScript or TypeScript file.
|
|
280
|
+
*
|
|
281
|
+
* @see {@link transform}
|
|
282
|
+
*/
|
|
283
|
+
interface TransformOptions {
|
|
284
|
+
/** Treat the source text as `js`, `jsx`, `ts`, `tsx`, or `dts`. */
|
|
285
|
+
lang?: 'js' | 'jsx' | 'ts' | 'tsx' | 'dts';
|
|
286
|
+
/** Treat the source text as `script` or `module` code. */
|
|
287
|
+
sourceType?: 'script' | 'module' | 'commonjs' | 'unambiguous' | undefined;
|
|
288
|
+
/**
|
|
289
|
+
* The current working directory. Used to resolve relative paths in other
|
|
290
|
+
* options.
|
|
291
|
+
*/
|
|
292
|
+
cwd?: string;
|
|
293
|
+
/**
|
|
294
|
+
* Enable source map generation.
|
|
295
|
+
*
|
|
296
|
+
* When `true`, the `sourceMap` field of transform result objects will be populated.
|
|
297
|
+
*
|
|
298
|
+
* @default false
|
|
299
|
+
*
|
|
300
|
+
* @see {@link SourceMap}
|
|
301
|
+
*/
|
|
302
|
+
sourcemap?: boolean;
|
|
303
|
+
/** Set assumptions in order to produce smaller output. */
|
|
304
|
+
assumptions?: CompilerAssumptions;
|
|
305
|
+
/**
|
|
306
|
+
* Configure how TypeScript is transformed.
|
|
307
|
+
* @see {@link https://oxc.rs/docs/guide/usage/transformer/typescript}
|
|
308
|
+
*/
|
|
309
|
+
typescript?: TypeScriptOptions;
|
|
310
|
+
/**
|
|
311
|
+
* Configure how TSX and JSX are transformed.
|
|
312
|
+
* @see {@link https://oxc.rs/docs/guide/usage/transformer/jsx}
|
|
313
|
+
*/
|
|
314
|
+
jsx?: 'preserve' | JsxOptions;
|
|
315
|
+
/**
|
|
316
|
+
* Sets the target environment for the generated JavaScript.
|
|
317
|
+
*
|
|
318
|
+
* The lowest target is `es2015`.
|
|
319
|
+
*
|
|
320
|
+
* Example:
|
|
321
|
+
*
|
|
322
|
+
* * `'es2015'`
|
|
323
|
+
* * `['es2020', 'chrome58', 'edge16', 'firefox57', 'node12', 'safari11']`
|
|
324
|
+
*
|
|
325
|
+
* @default `esnext` (No transformation)
|
|
326
|
+
*
|
|
327
|
+
* @see {@link https://oxc.rs/docs/guide/usage/transformer/lowering#target}
|
|
328
|
+
*/
|
|
329
|
+
target?: string | Array<string>;
|
|
330
|
+
/** Behaviour for runtime helpers. */
|
|
331
|
+
helpers?: Helpers;
|
|
332
|
+
/**
|
|
333
|
+
* Define Plugin
|
|
334
|
+
* @see {@link https://oxc.rs/docs/guide/usage/transformer/global-variable-replacement#define}
|
|
335
|
+
*/
|
|
336
|
+
define?: Record<string, string>;
|
|
337
|
+
/**
|
|
338
|
+
* Inject Plugin
|
|
339
|
+
* @see {@link https://oxc.rs/docs/guide/usage/transformer/global-variable-replacement#inject}
|
|
340
|
+
*/
|
|
341
|
+
inject?: Record<string, string | [string, string]>;
|
|
342
|
+
/** Decorator plugin */
|
|
343
|
+
decorator?: DecoratorOptions;
|
|
344
|
+
/**
|
|
345
|
+
* Third-party plugins to use.
|
|
346
|
+
* @see {@link https://oxc.rs/docs/guide/usage/transformer/plugins}
|
|
347
|
+
*/
|
|
348
|
+
plugins?: PluginsOptions;
|
|
349
|
+
}
|
|
350
|
+
interface TypeScriptOptions {
|
|
351
|
+
jsxPragma?: string;
|
|
352
|
+
jsxPragmaFrag?: string;
|
|
353
|
+
onlyRemoveTypeImports?: boolean;
|
|
354
|
+
allowNamespaces?: boolean;
|
|
355
|
+
/**
|
|
356
|
+
* When enabled, type-only class fields are only removed if they are prefixed with the declare modifier:
|
|
357
|
+
*
|
|
358
|
+
* @deprecated
|
|
359
|
+
*
|
|
360
|
+
* Allowing `declare` fields is built-in support in Oxc without any option. If you want to remove class fields
|
|
361
|
+
* without initializer, you can use `remove_class_fields_without_initializer: true` instead.
|
|
362
|
+
*/
|
|
363
|
+
allowDeclareFields?: boolean;
|
|
364
|
+
/**
|
|
365
|
+
* When enabled, class fields without initializers are removed.
|
|
366
|
+
*
|
|
367
|
+
* For example:
|
|
368
|
+
* ```ts
|
|
369
|
+
* class Foo {
|
|
370
|
+
* x: number;
|
|
371
|
+
* y: number = 0;
|
|
372
|
+
* }
|
|
373
|
+
* ```
|
|
374
|
+
* // transform into
|
|
375
|
+
* ```js
|
|
376
|
+
* class Foo {
|
|
377
|
+
* x: number;
|
|
378
|
+
* }
|
|
379
|
+
* ```
|
|
380
|
+
*
|
|
381
|
+
* The option is used to align with the behavior of TypeScript's `useDefineForClassFields: false` option.
|
|
382
|
+
* When you want to enable this, you also need to set [`crate::CompilerAssumptions::set_public_class_fields`]
|
|
383
|
+
* to `true`. The `set_public_class_fields: true` + `remove_class_fields_without_initializer: true` is
|
|
384
|
+
* equivalent to `useDefineForClassFields: false` in TypeScript.
|
|
385
|
+
*
|
|
386
|
+
* When `set_public_class_fields` is true and class-properties plugin is enabled, the above example transforms into:
|
|
387
|
+
*
|
|
388
|
+
* ```js
|
|
389
|
+
* class Foo {
|
|
390
|
+
* constructor() {
|
|
391
|
+
* this.y = 0;
|
|
392
|
+
* }
|
|
393
|
+
* }
|
|
394
|
+
* ```
|
|
395
|
+
*
|
|
396
|
+
* Defaults to `false`.
|
|
397
|
+
*/
|
|
398
|
+
removeClassFieldsWithoutInitializer?: boolean;
|
|
399
|
+
/**
|
|
400
|
+
* Also generate a `.d.ts` declaration file for TypeScript files.
|
|
401
|
+
*
|
|
402
|
+
* The source file must be compliant with all
|
|
403
|
+
* [`isolatedDeclarations`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-5.html#isolated-declarations)
|
|
404
|
+
* requirements.
|
|
405
|
+
*
|
|
406
|
+
* @default false
|
|
407
|
+
*/
|
|
408
|
+
declaration?: IsolatedDeclarationsOptions;
|
|
409
|
+
/**
|
|
410
|
+
* Rewrite or remove TypeScript import/export declaration extensions.
|
|
411
|
+
*
|
|
412
|
+
* - When set to `rewrite`, it will change `.ts`, `.mts`, `.cts` extensions to `.js`, `.mjs`, `.cjs` respectively.
|
|
413
|
+
* - When set to `remove`, it will remove `.ts`/`.mts`/`.cts`/`.tsx` extension entirely.
|
|
414
|
+
* - When set to `true`, it's equivalent to `rewrite`.
|
|
415
|
+
* - When set to `false` or omitted, no changes will be made to the extensions.
|
|
416
|
+
*
|
|
417
|
+
* @default false
|
|
418
|
+
*/
|
|
419
|
+
rewriteImportExtensions?: 'rewrite' | 'remove' | boolean;
|
|
420
|
+
}
|
|
421
|
+
//#endregion
|
|
422
|
+
export { TransformOptions as t };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import "exsolve";
|
|
2
|
+
|
|
3
|
+
//#region ../../node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.d.mts
|
|
4
|
+
type StripEnums<T extends Record<string, any>> = { [K in keyof T]: T[K] extends boolean ? T[K] : T[K] extends string ? T[K] : T[K] extends object ? T[K] : T[K] extends Array<any> ? T[K] : T[K] extends undefined ? undefined : any };
|
|
5
|
+
interface TSConfig {
|
|
6
|
+
compilerOptions?: StripEnums<CompilerOptions>;
|
|
7
|
+
exclude?: string[];
|
|
8
|
+
compileOnSave?: boolean;
|
|
9
|
+
extends?: string | string[];
|
|
10
|
+
files?: string[];
|
|
11
|
+
include?: string[];
|
|
12
|
+
typeAcquisition?: TypeAcquisition;
|
|
13
|
+
references?: {
|
|
14
|
+
path: string;
|
|
15
|
+
}[];
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Defines a TSConfig structure.
|
|
19
|
+
* @param tsconfig - The contents of `tsconfig.json` as an object. See {@link TSConfig}.
|
|
20
|
+
* @returns the same `tsconfig.json` object.
|
|
21
|
+
*/
|
|
22
|
+
//#endregion
|
|
23
|
+
export { TSConfig as t };
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/rollup-plugin-visualizer@6.0.5_rolldown@1.0.0-rc.3_rollup@4.57.1/node_modules/rollup-plugin-visualizer/dist/plugin/template-types.d.ts
|
|
2
|
+
type TemplateType = "sunburst" | "treemap" | "network" | "raw-data" | "list" | "flamegraph";
|
|
3
|
+
//#endregion
|
|
4
|
+
//#region ../../node_modules/.pnpm/rollup-plugin-visualizer@6.0.5_rolldown@1.0.0-rc.3_rollup@4.57.1/node_modules/rollup-plugin-visualizer/dist/shared/create-filter.d.ts
|
|
5
|
+
type Filter = {
|
|
6
|
+
bundle?: string | null | undefined;
|
|
7
|
+
file?: string | null | undefined;
|
|
8
|
+
};
|
|
9
|
+
//#endregion
|
|
10
|
+
//#region ../../node_modules/.pnpm/rollup-plugin-visualizer@6.0.5_rolldown@1.0.0-rc.3_rollup@4.57.1/node_modules/rollup-plugin-visualizer/dist/plugin/index.d.ts
|
|
11
|
+
interface PluginVisualizerOptions {
|
|
12
|
+
/**
|
|
13
|
+
* The path to the template file to use. Or just a name of a file.
|
|
14
|
+
*
|
|
15
|
+
* @default "stats.html"
|
|
16
|
+
*/
|
|
17
|
+
filename?: string;
|
|
18
|
+
/**
|
|
19
|
+
* If plugin should emit json file with visualizer data. It can be used with plugin CLI
|
|
20
|
+
*
|
|
21
|
+
* @default false
|
|
22
|
+
* @deprecated use template 'raw-data'
|
|
23
|
+
*/
|
|
24
|
+
json?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* HTML <title> value in generated file. Ignored when `json` is true.
|
|
27
|
+
*
|
|
28
|
+
* @default "Rollup Visualizer"
|
|
29
|
+
*/
|
|
30
|
+
title?: string;
|
|
31
|
+
/**
|
|
32
|
+
* If plugin should open browser with generated file. Ignored when `json` or `emitFile` is true.
|
|
33
|
+
*
|
|
34
|
+
* @default false
|
|
35
|
+
*/
|
|
36
|
+
open?: boolean;
|
|
37
|
+
openOptions?: OpenOptions;
|
|
38
|
+
/**
|
|
39
|
+
* Which diagram to generate. 'sunburst' or 'treemap' can help find big dependencies or if they are repeated.
|
|
40
|
+
* 'network' can answer you why something was included.
|
|
41
|
+
* 'flamegraph' will be familar to tools that you know already.
|
|
42
|
+
*
|
|
43
|
+
* @default 'treemap'
|
|
44
|
+
*/
|
|
45
|
+
template?: TemplateType;
|
|
46
|
+
/**
|
|
47
|
+
* If plugin should also calculate sizes of gzipped files.
|
|
48
|
+
*
|
|
49
|
+
* @default false
|
|
50
|
+
*/
|
|
51
|
+
gzipSize?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* If plugin should also calculate sizes of brotlied files.
|
|
54
|
+
*
|
|
55
|
+
* @default false
|
|
56
|
+
*/
|
|
57
|
+
brotliSize?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* If plugin should use sourcemap to calculate sizes of modules. By idea it will present more accurate results.
|
|
60
|
+
* `gzipSize` and `brotliSize` does not make much sense with this option.
|
|
61
|
+
*
|
|
62
|
+
* @default false
|
|
63
|
+
*/
|
|
64
|
+
sourcemap?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Absolute path where project is located. It is used to cut prefix from file's paths.
|
|
67
|
+
*
|
|
68
|
+
* @default process.cwd()
|
|
69
|
+
*/
|
|
70
|
+
projectRoot?: string | RegExp;
|
|
71
|
+
/**
|
|
72
|
+
* Use rollup .emitFile API to generate files. Could be usefull if you want to output to configured by rollup output dir.
|
|
73
|
+
* When this set to true, filename options must be filename and not a path.
|
|
74
|
+
*
|
|
75
|
+
* @default false
|
|
76
|
+
*/
|
|
77
|
+
emitFile?: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* A valid picomatch pattern, or array of patterns. If options.include is omitted or has zero length, filter will return true by
|
|
80
|
+
* default. Otherwise, an ID must match one or more of the picomatch patterns, and must not match any of the options.exclude patterns.
|
|
81
|
+
*/
|
|
82
|
+
include?: Filter | Filter[];
|
|
83
|
+
/**
|
|
84
|
+
* A valid picomatch pattern, or array of patterns. If options.include is omitted or has zero length, filter will return true by
|
|
85
|
+
* default. Otherwise, an ID must match one or more of the picomatch patterns, and must not match any of the options.exclude patterns.
|
|
86
|
+
*/
|
|
87
|
+
exclude?: Filter | Filter[];
|
|
88
|
+
}
|
|
89
|
+
//#endregion
|
|
90
|
+
export { PluginVisualizerOptions as t };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/scule@1.3.0/node_modules/scule/dist/index.d.ts
|
|
2
|
+
type Splitter = "-" | "_" | "/" | ".";
|
|
3
|
+
type FirstOfString<S extends string> = S extends `${infer F}${string}` ? F : never;
|
|
4
|
+
type RemoveFirstOfString<S extends string> = S extends `${string}${infer R}` ? R : never;
|
|
5
|
+
type IsUpper<S extends string> = S extends Uppercase<S> ? true : false;
|
|
6
|
+
type IsLower<S extends string> = S extends Lowercase<S> ? true : false;
|
|
7
|
+
type SameLetterCase<X extends string, Y extends string> = IsUpper<X> extends IsUpper<Y> ? true : IsLower<X> extends IsLower<Y> ? true : false;
|
|
8
|
+
type JoinLowercaseWords<T extends readonly string[], Joiner extends string, Accumulator extends string = ""> = T extends readonly [infer F extends string, ...infer R extends string[]] ? Accumulator extends "" ? JoinLowercaseWords<R, Joiner, `${Accumulator}${Lowercase<F>}`> : JoinLowercaseWords<R, Joiner, `${Accumulator}${Joiner}${Lowercase<F>}`> : Accumulator;
|
|
9
|
+
type LastOfArray<T extends any[]> = T extends [...any, infer R] ? R : never;
|
|
10
|
+
type RemoveLastOfArray<T extends any[]> = T extends [...infer F, any] ? F : never;
|
|
11
|
+
type SplitByCase<T, Separator extends string = Splitter, Accumulator extends unknown[] = []> = string extends Separator ? string[] : T extends `${infer F}${infer R}` ? [LastOfArray<Accumulator>] extends [never] ? SplitByCase<R, Separator, [F]> : LastOfArray<Accumulator> extends string ? R extends "" ? SplitByCase<R, Separator, [...RemoveLastOfArray<Accumulator>, `${LastOfArray<Accumulator>}${F}`]> : SameLetterCase<F, FirstOfString<R>> extends true ? F extends Separator ? FirstOfString<R> extends Separator ? SplitByCase<R, Separator, [...Accumulator, ""]> : IsUpper<FirstOfString<R>> extends true ? SplitByCase<RemoveFirstOfString<R>, Separator, [...Accumulator, FirstOfString<R>]> : SplitByCase<R, Separator, [...Accumulator, ""]> : SplitByCase<R, Separator, [...RemoveLastOfArray<Accumulator>, `${LastOfArray<Accumulator>}${F}`]> : IsLower<F> extends true ? SplitByCase<RemoveFirstOfString<R>, Separator, [...RemoveLastOfArray<Accumulator>, `${LastOfArray<Accumulator>}${F}`, FirstOfString<R>]> : SplitByCase<R, Separator, [...Accumulator, F]> : never : Accumulator extends [] ? T extends "" ? [] : string[] : Accumulator;
|
|
12
|
+
type JoinByCase<T, Joiner extends string> = string extends T ? string : string[] extends T ? string : T extends string ? SplitByCase<T> extends readonly string[] ? JoinLowercaseWords<SplitByCase<T>, Joiner> : never : T extends readonly string[] ? JoinLowercaseWords<T, Joiner> : never;
|
|
13
|
+
type SnakeCase<T extends string | readonly string[]> = JoinByCase<T, "_">;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { SnakeCase as t };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import MagicString from "magic-string";
|
|
2
|
+
|
|
3
|
+
//#region ../../node_modules/.pnpm/unctx@2.5.0/node_modules/unctx/dist/transform.d.ts
|
|
4
|
+
interface TransformerOptions {
|
|
5
|
+
/**
|
|
6
|
+
* The function names to be transformed.
|
|
7
|
+
*
|
|
8
|
+
* @default ['withAsyncContext']
|
|
9
|
+
*/
|
|
10
|
+
asyncFunctions?: string[];
|
|
11
|
+
/**
|
|
12
|
+
* @default 'unctx'
|
|
13
|
+
*/
|
|
14
|
+
helperModule?: string;
|
|
15
|
+
/**
|
|
16
|
+
* @default 'executeAsync'
|
|
17
|
+
*/
|
|
18
|
+
helperName?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Whether to transform properties of an object defined with a helper function. For example,
|
|
21
|
+
* to transform key `middleware` within the object defined with function `defineMeta`, you would pass:
|
|
22
|
+
* `{ defineMeta: ['middleware'] }`.
|
|
23
|
+
* @default {}
|
|
24
|
+
*/
|
|
25
|
+
objectDefinitions?: Record<string, string[]>;
|
|
26
|
+
}
|
|
27
|
+
//#endregion
|
|
28
|
+
export { TransformerOptions as t };
|