@rspack-debug/core 2.0.0-canary-20260116 → 2.0.0-rc.0
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 +1 -1
- package/compiled/@rspack/lite-tapable/dist/index.d.ts +175 -0
- package/compiled/@rspack/lite-tapable/license +22 -0
- package/compiled/@rspack/lite-tapable/package.json +1 -0
- package/compiled/@swc/types/index.d.ts +15 -9
- package/compiled/@swc/types/package.json +1 -1
- package/compiled/connect-next/index.d.ts +56 -0
- package/compiled/connect-next/license +26 -0
- package/compiled/connect-next/package.json +1 -0
- package/compiled/http-proxy-middleware/index.d.ts +544 -0
- package/compiled/{browserslist-load-config → http-proxy-middleware}/license +3 -2
- package/compiled/http-proxy-middleware/package.json +1 -0
- package/compiled/open/index.d.ts +161 -0
- package/compiled/open/package.json +1 -0
- package/compiled/watchpack/index.d.ts +2 -0
- package/compiled/webpack-sources/index.js +188 -131
- package/compiled/webpack-sources/package.json +1 -1
- package/compiled/webpack-sources/types.d.ts +6 -3
- package/dist/BuildInfo.d.ts +1 -1
- package/dist/Compilation.d.ts +5 -2
- package/dist/Compiler.d.ts +7 -4
- package/dist/ContextModuleFactory.d.ts +1 -1
- package/dist/FileSystem.d.ts +1 -1
- package/dist/Module.d.ts +1 -1
- package/dist/ModuleGraph.d.ts +1 -0
- package/dist/MultiCompiler.d.ts +1 -1
- package/dist/MultiWatching.d.ts +1 -1
- package/dist/NativeWatchFileSystem.d.ts +1 -1
- package/dist/NormalModule.d.ts +1 -2
- package/dist/NormalModuleFactory.d.ts +1 -1
- package/dist/RuntimeGlobals.d.ts +1 -1
- package/dist/Watching.d.ts +1 -1
- package/dist/builtin-loader/lightningcss/index.d.ts +11 -9
- package/dist/builtin-loader/lightningcss/target.d.ts +4 -0
- package/dist/builtin-loader/swc/index.d.ts +2 -2
- package/dist/builtin-loader/swc/pluginImport.d.ts +1 -1
- package/dist/builtin-loader/swc/types.d.ts +37 -2
- package/dist/builtin-plugin/EsmLibraryPlugin.d.ts +5 -1
- package/dist/builtin-plugin/EsmNodeTargetPlugin.d.ts +9 -0
- package/dist/builtin-plugin/JavascriptModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/LightningCssMinimizerRspackPlugin.d.ts +5 -4
- package/dist/builtin-plugin/ProgressPlugin.d.ts +5 -4
- package/dist/builtin-plugin/RsdoctorPlugin.d.ts +3 -3
- package/dist/builtin-plugin/RuntimePlugin.d.ts +1 -1
- package/dist/builtin-plugin/SplitChunksPlugin.d.ts +2 -1
- package/dist/builtin-plugin/SwcJsMinimizerPlugin.d.ts +3 -2
- package/dist/builtin-plugin/WorkerPlugin.d.ts +1 -0
- package/dist/builtin-plugin/html-plugin/hooks.d.ts +1 -1
- package/dist/builtin-plugin/index.d.ts +2 -0
- package/dist/builtin-plugin/lazy-compilation/middleware.d.ts +3 -3
- package/dist/builtin-plugin/rsc/Coordinator.d.ts +8 -0
- package/dist/builtin-plugin/rsc/RscClientPlugin.d.ts +13 -0
- package/dist/builtin-plugin/rsc/RscServerPlugin.d.ts +39 -0
- package/dist/builtin-plugin/rsc/index.d.ts +24 -0
- package/dist/checkNodeVersion.d.ts +1 -0
- package/dist/config/adapterRuleUse.d.ts +2 -1
- package/dist/config/defaults.d.ts +4 -2
- package/dist/config/devServer.d.ts +102 -237
- package/dist/config/normalization.d.ts +2 -3
- package/dist/config/target.d.ts +14 -11
- package/dist/config/types.d.ts +151 -62
- package/dist/container/ContainerPlugin.d.ts +3 -2
- package/dist/container/ContainerReferencePlugin.d.ts +4 -3
- package/dist/container/ModuleFederationManifestPlugin.d.ts +10 -3
- package/dist/container/ModuleFederationPlugin.d.ts +20 -1
- package/dist/container/ModuleFederationPluginV1.d.ts +2 -2
- package/dist/container/ModuleFederationRuntimePlugin.d.ts +4 -0
- package/dist/cssExtractLoader.js +3 -3
- package/dist/exports.d.ts +11 -8
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2074 -707
- package/dist/lib/Cache.d.ts +1 -1
- package/dist/lib/HookWebpackError.d.ts +1 -1
- package/dist/moduleFederationDefaultRuntime.js +1 -1
- package/dist/node/NodeWatchFileSystem.d.ts +1 -1
- package/dist/rspack.d.ts +1 -1
- package/dist/sharing/CollectSharedEntryPlugin.d.ts +22 -0
- package/dist/sharing/ConsumeSharedPlugin.d.ts +16 -3
- package/dist/sharing/IndependentSharedPlugin.d.ts +35 -0
- package/dist/sharing/ProvideSharedPlugin.d.ts +22 -2
- package/dist/sharing/SharePlugin.d.ts +43 -5
- package/dist/sharing/SharedContainerPlugin.d.ts +23 -0
- package/dist/sharing/SharedUsedExportsOptimizerPlugin.d.ts +14 -0
- package/dist/sharing/TreeShakingSharedPlugin.d.ts +16 -0
- package/dist/sharing/utils.d.ts +1 -0
- package/dist/stats/StatsFactory.d.ts +1 -1
- package/dist/stats/StatsPrinter.d.ts +1 -1
- package/dist/swc.d.ts +2 -2
- package/dist/taps/types.d.ts +1 -1
- package/dist/util/createHash.d.ts +1 -1
- package/dist/util/source.d.ts +1 -1
- package/dist/util/supportsColor.d.ts +6 -0
- package/dist/util/targetsVersion.d.ts +2 -0
- package/dist/worker.js +20 -19
- package/hot/dev-server.js +1 -1
- package/hot/emitter.js +0 -2
- package/hot/lazy-compilation-node.js +91 -34
- package/hot/lazy-compilation-web.js +61 -35
- package/hot/log.js +0 -2
- package/hot/only-dev-server.js +1 -1
- package/module.d.ts +4 -2
- package/package.json +23 -24
- package/compiled/browserslist-load-config/index.d.ts +0 -21
- package/compiled/browserslist-load-config/index.js +0 -252
- package/compiled/browserslist-load-config/package.json +0 -1
- package/dist/builtin-loader/index.d.ts +0 -1
- package/dist/rslib-runtime.js +0 -29
package/README.md
CHANGED
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
type FixedSizeArray<T extends number, U> = T extends 0 ? undefined[] : ReadonlyArray<U> & {
|
|
2
|
+
0: U;
|
|
3
|
+
length: T;
|
|
4
|
+
};
|
|
5
|
+
type Measure<T extends number> = T extends 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 ? T : never;
|
|
6
|
+
type Append<T extends any[], U> = {
|
|
7
|
+
0: [U];
|
|
8
|
+
1: [T[0], U];
|
|
9
|
+
2: [T[0], T[1], U];
|
|
10
|
+
3: [T[0], T[1], T[2], U];
|
|
11
|
+
4: [T[0], T[1], T[2], T[3], U];
|
|
12
|
+
5: [T[0], T[1], T[2], T[3], T[4], U];
|
|
13
|
+
6: [T[0], T[1], T[2], T[3], T[4], T[5], U];
|
|
14
|
+
7: [T[0], T[1], T[2], T[3], T[4], T[5], T[6], U];
|
|
15
|
+
8: [T[0], T[1], T[2], T[3], T[4], T[5], T[6], T[7], U];
|
|
16
|
+
}[Measure<T['length']>];
|
|
17
|
+
export type AsArray<T> = T extends any[] ? T : [T];
|
|
18
|
+
export type Fn<T, R> = (...args: AsArray<T>) => R;
|
|
19
|
+
export type FnAsync<T, R> = (...args: Append<AsArray<T>, InnerCallback<Error, R>>) => void;
|
|
20
|
+
export type FnPromise<T, R> = (...args: AsArray<T>) => Promise<R>;
|
|
21
|
+
declare class UnsetAdditionalOptions {
|
|
22
|
+
_UnsetAdditionalOptions: true;
|
|
23
|
+
}
|
|
24
|
+
type IfSet<X> = X extends UnsetAdditionalOptions ? {} : X;
|
|
25
|
+
export type Callback<E, T> = (error: E | null, result?: T) => void;
|
|
26
|
+
type InnerCallback<E, T> = (error?: E | null | false, result?: T) => void;
|
|
27
|
+
type FullTap = Tap & {
|
|
28
|
+
type: 'sync' | 'async' | 'promise';
|
|
29
|
+
fn: Function;
|
|
30
|
+
};
|
|
31
|
+
type Tap = TapOptions & {
|
|
32
|
+
name: string;
|
|
33
|
+
};
|
|
34
|
+
type TapOptions = {
|
|
35
|
+
before?: string;
|
|
36
|
+
stage?: number;
|
|
37
|
+
};
|
|
38
|
+
export type Options<AdditionalOptions = UnsetAdditionalOptions> = string | (Tap & IfSet<AdditionalOptions>);
|
|
39
|
+
export interface HookInterceptor<T, R, AdditionalOptions = UnsetAdditionalOptions> {
|
|
40
|
+
name?: string;
|
|
41
|
+
tap?: (tap: FullTap & IfSet<AdditionalOptions>) => void;
|
|
42
|
+
call?: (...args: any[]) => void;
|
|
43
|
+
loop?: (...args: any[]) => void;
|
|
44
|
+
error?: (err: Error) => void;
|
|
45
|
+
result?: (result: R) => void;
|
|
46
|
+
done?: () => void;
|
|
47
|
+
register?: (tap: FullTap & IfSet<AdditionalOptions>) => FullTap & IfSet<AdditionalOptions>;
|
|
48
|
+
}
|
|
49
|
+
type ArgumentNames<T extends any[]> = FixedSizeArray<T['length'], string>;
|
|
50
|
+
type ExtractHookArgs<H> = H extends Hook<infer T, any> ? T : never;
|
|
51
|
+
type ExtractHookReturn<H> = H extends Hook<any, infer R> ? R : never;
|
|
52
|
+
type ExtractHookAdditionalOptions<H> = H extends Hook<any, any, infer A> ? A : never;
|
|
53
|
+
export interface Hook<T = any, R = any, AdditionalOptions = UnsetAdditionalOptions> {
|
|
54
|
+
name?: string;
|
|
55
|
+
tap(opt: Options<AdditionalOptions>, fn: Fn<T, R>): void;
|
|
56
|
+
tapAsync(opt: Options<AdditionalOptions>, fn: FnAsync<T, R>): void;
|
|
57
|
+
tapPromise(opt: Options<AdditionalOptions>, fn: FnPromise<T, R>): void;
|
|
58
|
+
intercept(interceptor: HookInterceptor<T, R, AdditionalOptions>): void;
|
|
59
|
+
isUsed(): boolean;
|
|
60
|
+
withOptions(opt: TapOptions & IfSet<AdditionalOptions>): Hook<T, R, AdditionalOptions>;
|
|
61
|
+
queryStageRange(stageRange: StageRange): QueriedHook<T, R, AdditionalOptions>;
|
|
62
|
+
}
|
|
63
|
+
export declare class HookBase<T, R, AdditionalOptions = UnsetAdditionalOptions> implements Hook<T, R, AdditionalOptions> {
|
|
64
|
+
args: ArgumentNames<AsArray<T>>;
|
|
65
|
+
name?: string;
|
|
66
|
+
taps: (FullTap & IfSet<AdditionalOptions>)[];
|
|
67
|
+
interceptors: HookInterceptor<T, R, AdditionalOptions>[];
|
|
68
|
+
constructor(args?: ArgumentNames<AsArray<T>>, name?: string);
|
|
69
|
+
intercept(interceptor: HookInterceptor<T, R, AdditionalOptions>): void;
|
|
70
|
+
_runRegisterInterceptors(options: FullTap & IfSet<AdditionalOptions>): FullTap & IfSet<AdditionalOptions>;
|
|
71
|
+
_runCallInterceptors(...args: any[]): void;
|
|
72
|
+
_runErrorInterceptors(e: Error): void;
|
|
73
|
+
_runTapInterceptors(tap: FullTap & IfSet<AdditionalOptions>): void;
|
|
74
|
+
_runDoneInterceptors(): void;
|
|
75
|
+
_runResultInterceptors(r: R): void;
|
|
76
|
+
withOptions(options: TapOptions & IfSet<AdditionalOptions>): Hook<T, R, AdditionalOptions>;
|
|
77
|
+
isUsed(): boolean;
|
|
78
|
+
queryStageRange(stageRange: StageRange): QueriedHook<T, R, AdditionalOptions>;
|
|
79
|
+
callAsyncStageRange(queried: QueriedHook<T, R, AdditionalOptions>, ...args: Append<AsArray<T>, Callback<Error, R>>): void;
|
|
80
|
+
callAsync(...args: Append<AsArray<T>, Callback<Error, R>>): void;
|
|
81
|
+
promiseStageRange(queried: QueriedHook<T, R, AdditionalOptions>, ...args: AsArray<T>): Promise<R>;
|
|
82
|
+
promise(...args: AsArray<T>): Promise<R>;
|
|
83
|
+
tap(options: Options<AdditionalOptions>, fn: Fn<T, R>): void;
|
|
84
|
+
tapAsync(options: Options<AdditionalOptions>, fn: FnAsync<T, R>): void;
|
|
85
|
+
tapPromise(options: Options<AdditionalOptions>, fn: FnPromise<T, R>): void;
|
|
86
|
+
_tap(type: 'sync' | 'async' | 'promise', options: Options<AdditionalOptions>, fn: Function): void;
|
|
87
|
+
_insert(item: FullTap & IfSet<AdditionalOptions>): void;
|
|
88
|
+
_prepareArgs(args: AsArray<T>): (T | undefined)[];
|
|
89
|
+
}
|
|
90
|
+
export type StageRange = readonly [number, number];
|
|
91
|
+
export declare const minStage: number;
|
|
92
|
+
export declare const maxStage: number;
|
|
93
|
+
export declare const safeStage: (stage: number) => number;
|
|
94
|
+
export declare class QueriedHook<T, R, AdditionalOptions = UnsetAdditionalOptions> {
|
|
95
|
+
stageRange: StageRange;
|
|
96
|
+
hook: HookBase<T, R, AdditionalOptions>;
|
|
97
|
+
tapsInRange: (FullTap & IfSet<AdditionalOptions>)[];
|
|
98
|
+
constructor(stageRange: StageRange, hook: HookBase<T, R, AdditionalOptions>);
|
|
99
|
+
isUsed(): boolean;
|
|
100
|
+
call(...args: AsArray<T>): R;
|
|
101
|
+
callAsync(...args: Append<AsArray<T>, Callback<Error, R>>): void;
|
|
102
|
+
promise(...args: AsArray<T>): Promise<R>;
|
|
103
|
+
}
|
|
104
|
+
export declare class SyncHook<T, R = void, AdditionalOptions = UnsetAdditionalOptions> extends HookBase<T, R, AdditionalOptions> {
|
|
105
|
+
callAsyncStageRange(queried: QueriedHook<T, R, AdditionalOptions>, ...args: Append<AsArray<T>, Callback<Error, R>>): void;
|
|
106
|
+
call(...args: AsArray<T>): R;
|
|
107
|
+
callStageRange(queried: QueriedHook<T, R, AdditionalOptions>, ...args: AsArray<T>): R;
|
|
108
|
+
tapAsync(): never;
|
|
109
|
+
tapPromise(): never;
|
|
110
|
+
}
|
|
111
|
+
export declare class SyncBailHook<T, R, AdditionalOptions = UnsetAdditionalOptions> extends HookBase<T, R, AdditionalOptions> {
|
|
112
|
+
callAsyncStageRange(queried: QueriedHook<T, R, AdditionalOptions>, ...args: Append<AsArray<T>, Callback<Error, R>>): void;
|
|
113
|
+
call(...args: AsArray<T>): R;
|
|
114
|
+
callStageRange(queried: QueriedHook<T, R, AdditionalOptions>, ...args: AsArray<T>): R;
|
|
115
|
+
tapAsync(): never;
|
|
116
|
+
tapPromise(): never;
|
|
117
|
+
}
|
|
118
|
+
export declare class SyncWaterfallHook<T, AdditionalOptions = UnsetAdditionalOptions> extends HookBase<T, AsArray<T>[0], AdditionalOptions> {
|
|
119
|
+
constructor(args?: ArgumentNames<AsArray<T>>, name?: string);
|
|
120
|
+
callAsyncStageRange(queried: QueriedHook<T, AsArray<T>[0], AdditionalOptions>, ...args: Append<AsArray<T>, Callback<Error, AsArray<T>[0]>>): void;
|
|
121
|
+
call(...args: AsArray<T>): AsArray<T>[0];
|
|
122
|
+
callStageRange(queried: QueriedHook<T, AsArray<T>[0], AdditionalOptions>, ...args: AsArray<T>): AsArray<T>[0];
|
|
123
|
+
tapAsync(): never;
|
|
124
|
+
tapPromise(): never;
|
|
125
|
+
}
|
|
126
|
+
export declare class AsyncParallelHook<T, AdditionalOptions = UnsetAdditionalOptions> extends HookBase<T, void, AdditionalOptions> {
|
|
127
|
+
callAsyncStageRange(queried: QueriedHook<T, void, AdditionalOptions>, ...args: Append<AsArray<T>, Callback<Error, void>>): void;
|
|
128
|
+
}
|
|
129
|
+
export declare class AsyncSeriesHook<T, AdditionalOptions = UnsetAdditionalOptions> extends HookBase<T, void, AdditionalOptions> {
|
|
130
|
+
callAsyncStageRange(queried: QueriedHook<T, void, AdditionalOptions>, ...args: Append<AsArray<T>, Callback<Error, void>>): void;
|
|
131
|
+
}
|
|
132
|
+
export declare class AsyncSeriesBailHook<T, R, AdditionalOptions = UnsetAdditionalOptions> extends HookBase<T, R, AdditionalOptions> {
|
|
133
|
+
callAsyncStageRange(queried: QueriedHook<T, R, AdditionalOptions>, ...args: Append<AsArray<T>, Callback<Error, R>>): void;
|
|
134
|
+
}
|
|
135
|
+
export declare class AsyncSeriesWaterfallHook<T, AdditionalOptions = UnsetAdditionalOptions> extends HookBase<T, AsArray<T>[0], AdditionalOptions> {
|
|
136
|
+
constructor(args?: ArgumentNames<AsArray<T>>, name?: string);
|
|
137
|
+
callAsyncStageRange(queried: QueriedHook<T, AsArray<T>[0], AdditionalOptions>, ...args: Append<AsArray<T>, Callback<Error, AsArray<T>[0]>>): void;
|
|
138
|
+
}
|
|
139
|
+
export type HookMapKey = any;
|
|
140
|
+
export type HookFactory<H> = (key: HookMapKey, hook?: H) => H;
|
|
141
|
+
export interface HookMapInterceptor<H> {
|
|
142
|
+
factory?: HookFactory<H>;
|
|
143
|
+
}
|
|
144
|
+
export declare class HookMap<H extends Hook> {
|
|
145
|
+
_map: Map<HookMapKey, H>;
|
|
146
|
+
_factory: HookFactory<H>;
|
|
147
|
+
name?: string;
|
|
148
|
+
_interceptors: HookMapInterceptor<H>[];
|
|
149
|
+
constructor(factory: HookFactory<H>, name?: string);
|
|
150
|
+
get(key: HookMapKey): H | undefined;
|
|
151
|
+
for(key: HookMapKey): H;
|
|
152
|
+
intercept(interceptor: HookMapInterceptor<H>): void;
|
|
153
|
+
isUsed(): boolean;
|
|
154
|
+
queryStageRange(stageRange: StageRange): QueriedHookMap<H>;
|
|
155
|
+
}
|
|
156
|
+
export declare class QueriedHookMap<H extends Hook> {
|
|
157
|
+
stageRange: StageRange;
|
|
158
|
+
hookMap: HookMap<H>;
|
|
159
|
+
constructor(stageRange: StageRange, hookMap: HookMap<H>);
|
|
160
|
+
get(key: HookMapKey): QueriedHook<any, any, UnsetAdditionalOptions> | undefined;
|
|
161
|
+
for(key: HookMapKey): QueriedHook<any, any, UnsetAdditionalOptions>;
|
|
162
|
+
isUsed(): boolean;
|
|
163
|
+
}
|
|
164
|
+
export declare class MultiHook<H extends Hook> {
|
|
165
|
+
hooks: H[];
|
|
166
|
+
name?: string;
|
|
167
|
+
constructor(hooks: H[], name?: string);
|
|
168
|
+
tap(options: Options<ExtractHookAdditionalOptions<Hook>>, fn: Fn<ExtractHookArgs<Hook>, ExtractHookReturn<Hook>>): void;
|
|
169
|
+
tapAsync(options: Options<ExtractHookAdditionalOptions<Hook>>, fn: FnAsync<ExtractHookArgs<Hook>, ExtractHookReturn<Hook>>): void;
|
|
170
|
+
tapPromise(options: Options<ExtractHookAdditionalOptions<Hook>>, fn: FnPromise<ExtractHookArgs<Hook>, ExtractHookReturn<Hook>>): void;
|
|
171
|
+
isUsed(): boolean;
|
|
172
|
+
intercept(interceptor: HookInterceptor<ExtractHookArgs<Hook>, ExtractHookReturn<Hook>, ExtractHookAdditionalOptions<Hook>>): void;
|
|
173
|
+
withOptions(options: TapOptions & IfSet<ExtractHookAdditionalOptions<Hook>>): MultiHook<Hook<any, any, UnsetAdditionalOptions>>;
|
|
174
|
+
}
|
|
175
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022-present Bytedance, Inc. and its affiliates.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"@rspack/lite-tapable","version":"1.1.0","license":"MIT","types":"./dist/index.d.ts","type":"module"}
|
|
@@ -293,6 +293,8 @@ interface TerserCompressOptions {
|
|
|
293
293
|
unsafe_proto?: boolean;
|
|
294
294
|
unsafe_regexp?: boolean;
|
|
295
295
|
unsafe_undefined?: boolean;
|
|
296
|
+
unsafe_hoist_static_method_alias?: boolean;
|
|
297
|
+
unsafe_hoist_global_objects_alias?: boolean;
|
|
296
298
|
unused?: boolean;
|
|
297
299
|
const_to_let?: boolean;
|
|
298
300
|
module?: boolean;
|
|
@@ -386,27 +388,27 @@ interface Options extends Config {
|
|
|
386
388
|
*
|
|
387
389
|
* "root" - Passes the "root" value through as unchanged.
|
|
388
390
|
* "upward" - Walks upward from the "root" directory, looking for a directory
|
|
389
|
-
* containing a
|
|
391
|
+
* containing a .swcrc file, and throws an error if a .swcrc
|
|
390
392
|
* is not found.
|
|
391
393
|
* "upward-optional" - Walk upward from the "root" directory, looking for
|
|
392
|
-
* a directory containing a
|
|
393
|
-
* if a
|
|
394
|
+
* a directory containing a .swcrc file, and falls back to "root"
|
|
395
|
+
* if a .swcrc is not found.
|
|
394
396
|
*
|
|
395
397
|
*
|
|
396
398
|
* "root" is the default mode because it avoids the risk that Swc
|
|
397
|
-
* will accidentally load a
|
|
399
|
+
* will accidentally load a .swcrc that is entirely outside
|
|
398
400
|
* of the current project folder. If you use "upward-optional",
|
|
399
401
|
* be aware that it will walk up the directory structure all the
|
|
400
402
|
* way to the filesystem root, and it is always possible that someone
|
|
401
|
-
* will have a forgotten
|
|
403
|
+
* will have a forgotten .swcrc in their home directory,
|
|
402
404
|
* which could cause unexpected errors in your builds.
|
|
403
405
|
*
|
|
404
406
|
*
|
|
405
407
|
* Users with monorepo project structures that run builds/tests on a
|
|
406
408
|
* per-package basis may well want to use "upward" since monorepos
|
|
407
|
-
* often have a
|
|
409
|
+
* often have a .swcrc in the project root. Running Swc
|
|
408
410
|
* in a monorepo subdirectory without "upward", will cause Swc
|
|
409
|
-
* to skip loading any
|
|
411
|
+
* to skip loading any .swcrc files in the project root,
|
|
410
412
|
* which can lead to unexpected errors and compilation failure.
|
|
411
413
|
*/
|
|
412
414
|
rootMode?: "root" | "upward" | "upward-optional";
|
|
@@ -595,6 +597,10 @@ interface JscConfig {
|
|
|
595
597
|
* This option only works when `keepImportAttributes` is `true`.
|
|
596
598
|
*/
|
|
597
599
|
emitAssertForImportAttributes?: boolean;
|
|
600
|
+
/**
|
|
601
|
+
* Emit ECMA-426 source-map scopes metadata.
|
|
602
|
+
*/
|
|
603
|
+
emitSourceMapScopes?: boolean;
|
|
598
604
|
/**
|
|
599
605
|
* Specify the location where SWC stores its intermediate cache files.
|
|
600
606
|
* Currently only transform plugin uses this. If not specified, SWC will
|
|
@@ -775,7 +781,7 @@ interface TransformConfig {
|
|
|
775
781
|
/**
|
|
776
782
|
* https://swc.rs/docs/configuration/compilation#jsctransformdecoratorversion
|
|
777
783
|
*/
|
|
778
|
-
decoratorVersion?: "2021-12" | "2022-03";
|
|
784
|
+
decoratorVersion?: "2021-12" | "2022-03" | "2023-11";
|
|
779
785
|
treatConstEnumAsEnum?: boolean;
|
|
780
786
|
/**
|
|
781
787
|
* https://www.typescriptlang.org/tsconfig#useDefineForClassFields
|
|
@@ -1443,7 +1449,7 @@ interface JSXAttribute extends Node, HasSpan {
|
|
|
1443
1449
|
value?: JSXAttrValue;
|
|
1444
1450
|
}
|
|
1445
1451
|
type JSXAttributeName = Identifier | JSXNamespacedName;
|
|
1446
|
-
type JSXAttrValue =
|
|
1452
|
+
type JSXAttrValue = StringLiteral | JSXExpressionContainer | JSXElement | JSXFragment;
|
|
1447
1453
|
interface JSXText extends Node, HasSpan {
|
|
1448
1454
|
type: "JSXText";
|
|
1449
1455
|
value: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@swc/types","author":"강동윤 <kdy1997.dev@gmail.com>","version":"0.1.
|
|
1
|
+
{"name":"@swc/types","author":"강동윤 <kdy1997.dev@gmail.com>","version":"0.1.26","license":"Apache-2.0","types":"index.d.ts","type":"commonjs"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { EventEmitter } from 'node:events';
|
|
2
|
+
import * as http from 'node:http';
|
|
3
|
+
import { ListenOptions } from 'node:net';
|
|
4
|
+
|
|
5
|
+
/*!
|
|
6
|
+
* connect
|
|
7
|
+
* Copyright(c) 2010 Sencha Inc.
|
|
8
|
+
* Copyright(c) 2011 TJ Holowaychuk
|
|
9
|
+
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
10
|
+
* Copyright(c) 2025 Rstackjs
|
|
11
|
+
* MIT Licensed
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Public and internal Connect types.
|
|
16
|
+
*/
|
|
17
|
+
interface IncomingMessage extends http.IncomingMessage {
|
|
18
|
+
originalUrl?: http.IncomingMessage['url'] | undefined;
|
|
19
|
+
}
|
|
20
|
+
type NextFunction = (err?: any) => void;
|
|
21
|
+
type SimpleHandleFunction = (req: IncomingMessage, res: http.ServerResponse) => void;
|
|
22
|
+
type NextHandleFunction = (req: IncomingMessage, res: http.ServerResponse, next: NextFunction) => void;
|
|
23
|
+
type ErrorHandleFunction = (err: any, req: IncomingMessage, res: http.ServerResponse, next: NextFunction) => void;
|
|
24
|
+
type HandleFunction = SimpleHandleFunction | NextHandleFunction | ErrorHandleFunction;
|
|
25
|
+
type ServerHandle = HandleFunction | http.Server;
|
|
26
|
+
interface ServerStackItem {
|
|
27
|
+
route: string;
|
|
28
|
+
handle: ServerHandle;
|
|
29
|
+
}
|
|
30
|
+
interface Server extends EventEmitter {
|
|
31
|
+
(req: http.IncomingMessage, res: http.ServerResponse, next?: Function): void;
|
|
32
|
+
route: string;
|
|
33
|
+
stack: ServerStackItem[];
|
|
34
|
+
handle(req: http.IncomingMessage, res: http.ServerResponse, next?: Function): void;
|
|
35
|
+
use(fn: NextHandleFunction): Server;
|
|
36
|
+
use(fn: HandleFunction): Server;
|
|
37
|
+
use(fn: http.Server): Server;
|
|
38
|
+
use(route: string, fn: NextHandleFunction): Server;
|
|
39
|
+
use(route: string, fn: HandleFunction): Server;
|
|
40
|
+
use(route: string, fn: http.Server): Server;
|
|
41
|
+
listen(port: number, hostname?: string, backlog?: number, callback?: Function): http.Server;
|
|
42
|
+
listen(port: number, hostname?: string, callback?: Function): http.Server;
|
|
43
|
+
listen(path: string, callback?: Function): http.Server;
|
|
44
|
+
listen(options: ListenOptions, callback?: Function): http.Server;
|
|
45
|
+
listen(handle: unknown, listeningListener?: Function): http.Server;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Create a new connect server.
|
|
49
|
+
*
|
|
50
|
+
* @return {function}
|
|
51
|
+
* @public
|
|
52
|
+
*/
|
|
53
|
+
declare function connect(): Server;
|
|
54
|
+
|
|
55
|
+
export { connect };
|
|
56
|
+
export type { ErrorHandleFunction, HandleFunction, IncomingMessage, NextFunction, NextHandleFunction, Server, ServerHandle, ServerStackItem, SimpleHandleFunction };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
(The MIT License)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2010 Sencha Inc.
|
|
4
|
+
Copyright (c) 2011 LearnBoost
|
|
5
|
+
Copyright (c) 2011-2014 TJ Holowaychuk
|
|
6
|
+
Copyright (c) 2015 Douglas Christopher Wilson
|
|
7
|
+
Copyright (c) 2025 Rstackjs
|
|
8
|
+
|
|
9
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
10
|
+
a copy of this software and associated documentation files (the
|
|
11
|
+
'Software'), to deal in the Software without restriction, including
|
|
12
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
13
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
14
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
15
|
+
the following conditions:
|
|
16
|
+
|
|
17
|
+
The above copyright notice and this permission notice shall be
|
|
18
|
+
included in all copies or substantial portions of the Software.
|
|
19
|
+
|
|
20
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
|
21
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
22
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
23
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
24
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
25
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
26
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"connect-next","author":"TJ Holowaychuk <tj@vision-media.ca> (http://tjholowaychuk.com)","version":"4.0.0","license":"MIT","types":"index.d.ts","type":"module"}
|