@rsbuild/core 0.6.7 → 0.6.9
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/compiled/commander/{typings/index.d.ts → index.d.ts} +26 -24
- package/compiled/commander/index.js +3528 -1
- package/compiled/commander/package.json +1 -1
- package/compiled/connect-history-api-fallback/index.js +186 -1
- package/compiled/dotenv/{lib/main.d.ts → index.d.ts} +16 -12
- package/compiled/dotenv/index.js +458 -1
- package/compiled/dotenv/package.json +1 -1
- package/compiled/dotenv-expand/{lib/main.d.ts → index.d.ts} +9 -7
- package/compiled/dotenv-expand/index.js +146 -1
- package/compiled/dotenv-expand/package.json +1 -1
- package/compiled/http-compression/index.js +185 -1
- package/compiled/launch-editor-middleware/index.js +843 -1
- package/compiled/on-finished/index.d.ts +2 -2
- package/compiled/on-finished/index.js +390 -3
- package/compiled/on-finished/package.json +1 -1
- package/compiled/open/index.d.ts +1 -153
- package/compiled/open/index.js +526 -1
- package/compiled/open/package.json +1 -1
- package/compiled/sirv/index.d.ts +1 -0
- package/compiled/sirv/index.js +798 -1
- package/compiled/sirv/package.json +1 -1
- package/compiled/webpack-dev-middleware/index.d.ts +1 -0
- package/compiled/webpack-dev-middleware/index.js +6696 -0
- package/compiled/webpack-dev-middleware/license +20 -0
- package/compiled/webpack-dev-middleware/package.json +1 -0
- package/compiled/webpack-dev-middleware/schema-utils.js +1 -0
- package/compiled/ws/index.d.ts +7 -15
- package/compiled/ws/index.js +4885 -1
- package/compiled/ws/package.json +1 -1
- package/dist/cli/commands.js +1 -1
- package/dist/cli/prepare.js +1 -1
- package/dist/client/format.d.ts +5 -0
- package/dist/client/{formatStats.js → format.js} +22 -46
- package/dist/client/hmr.d.ts +5 -0
- package/dist/client/hmr.mjs +201 -474
- package/dist/client/overlay.mjs +208 -237
- package/dist/createContext.js +1 -1
- package/dist/index.js +1 -1
- package/dist/plugins/target.js +19 -16
- package/dist/provider/plugins/swc.js +1 -0
- package/dist/provider/shared.js +2 -2
- package/dist/server/devMiddleware.js +1 -1
- package/dist/server/devServer.js +6 -1
- package/dist/server/getDevMiddlewares.d.ts +3 -0
- package/dist/server/getDevMiddlewares.js +6 -8
- package/dist/server/helper.d.ts +4 -4
- package/dist/server/middlewares.d.ts +5 -2
- package/dist/server/middlewares.js +1 -7
- package/package.json +6 -5
- package/compiled/open/license +0 -9
- package/compiled/sirv/sirv.d.ts +0 -27
- package/dist/client/formatStats.d.ts +0 -12
- package/dist/client/hmr/createSocketUrl.d.ts +0 -12
- package/dist/client/hmr/index.d.ts +0 -4
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
// - https://github.com/sindresorhus/type-fest/blob/main/source/primitive.d.ts
|
|
14
14
|
type LiteralUnion<LiteralType, BaseType extends string | number> = LiteralType | (BaseType & Record<never, never>);
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
declare class CommanderError extends Error {
|
|
17
17
|
code: string;
|
|
18
18
|
exitCode: number;
|
|
19
19
|
message: string;
|
|
@@ -29,7 +29,7 @@ export class CommanderError extends Error {
|
|
|
29
29
|
constructor(exitCode: number, code: string, message: string);
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
declare class InvalidArgumentError extends CommanderError {
|
|
33
33
|
/**
|
|
34
34
|
* Constructs the InvalidArgumentError class
|
|
35
35
|
* @param message - explanation of why argument is invalid
|
|
@@ -37,16 +37,16 @@ export class InvalidArgumentError extends CommanderError {
|
|
|
37
37
|
*/
|
|
38
38
|
constructor(message: string);
|
|
39
39
|
}
|
|
40
|
-
|
|
40
|
+
// deprecated old name
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
interface ErrorOptions { // optional parameter for error()
|
|
43
43
|
/** an id string representing the error */
|
|
44
44
|
code?: string;
|
|
45
45
|
/** suggested exit code which could be used with process.exit */
|
|
46
46
|
exitCode?: number;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
declare class Argument {
|
|
50
50
|
description: string;
|
|
51
51
|
required: boolean;
|
|
52
52
|
variadic: boolean;
|
|
@@ -92,7 +92,7 @@ export class Argument {
|
|
|
92
92
|
argOptional(): this;
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
|
|
95
|
+
declare class Option {
|
|
96
96
|
flags: string;
|
|
97
97
|
description: string;
|
|
98
98
|
|
|
@@ -206,7 +206,7 @@ export class Option {
|
|
|
206
206
|
isBoolean(): boolean;
|
|
207
207
|
}
|
|
208
208
|
|
|
209
|
-
|
|
209
|
+
declare class Help {
|
|
210
210
|
/** output helpWidth, long lines are wrapped to fit */
|
|
211
211
|
helpWidth?: number;
|
|
212
212
|
sortSubcommands: boolean;
|
|
@@ -262,19 +262,19 @@ export class Help {
|
|
|
262
262
|
/** Generate the built-in help text. */
|
|
263
263
|
formatHelp(cmd: Command, helper: Help): string;
|
|
264
264
|
}
|
|
265
|
-
|
|
265
|
+
type HelpConfiguration = Partial<Help>;
|
|
266
266
|
|
|
267
|
-
|
|
267
|
+
interface ParseOptions {
|
|
268
268
|
from: 'node' | 'electron' | 'user';
|
|
269
269
|
}
|
|
270
|
-
|
|
270
|
+
interface HelpContext { // optional parameter for .help() and .outputHelp()
|
|
271
271
|
error: boolean;
|
|
272
272
|
}
|
|
273
|
-
|
|
273
|
+
interface AddHelpTextContext { // passed to text function used with .addHelpText()
|
|
274
274
|
error: boolean;
|
|
275
275
|
command: Command;
|
|
276
276
|
}
|
|
277
|
-
|
|
277
|
+
interface OutputConfiguration {
|
|
278
278
|
writeOut?(str: string): void;
|
|
279
279
|
writeErr?(str: string): void;
|
|
280
280
|
getOutHelpWidth?(): number;
|
|
@@ -283,14 +283,14 @@ export interface OutputConfiguration {
|
|
|
283
283
|
|
|
284
284
|
}
|
|
285
285
|
|
|
286
|
-
|
|
287
|
-
|
|
286
|
+
type AddHelpTextPosition = 'beforeAll' | 'before' | 'after' | 'afterAll';
|
|
287
|
+
type HookEvent = 'preSubcommand' | 'preAction' | 'postAction';
|
|
288
288
|
// The source is a string so author can define their own too.
|
|
289
|
-
|
|
289
|
+
type OptionValueSource = LiteralUnion<'default' | 'config' | 'env' | 'cli' | 'implied', string> | undefined;
|
|
290
290
|
|
|
291
|
-
|
|
291
|
+
type OptionValues = Record<string, any>;
|
|
292
292
|
|
|
293
|
-
|
|
293
|
+
declare class Command {
|
|
294
294
|
args: string[];
|
|
295
295
|
processedArgs: any[];
|
|
296
296
|
readonly commands: readonly Command[];
|
|
@@ -877,23 +877,25 @@ export class Command {
|
|
|
877
877
|
on(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
878
878
|
}
|
|
879
879
|
|
|
880
|
-
|
|
880
|
+
interface CommandOptions {
|
|
881
881
|
hidden?: boolean;
|
|
882
882
|
isDefault?: boolean;
|
|
883
883
|
/** @deprecated since v7, replaced by hidden */
|
|
884
884
|
noHelp?: boolean;
|
|
885
885
|
}
|
|
886
|
-
|
|
886
|
+
interface ExecutableCommandOptions extends CommandOptions {
|
|
887
887
|
executableFile?: string;
|
|
888
888
|
}
|
|
889
889
|
|
|
890
|
-
|
|
890
|
+
interface ParseOptionsResult {
|
|
891
891
|
operands: string[];
|
|
892
892
|
unknown: string[];
|
|
893
893
|
}
|
|
894
894
|
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
895
|
+
declare function createCommand(name?: string): Command;
|
|
896
|
+
declare function createOption(flags: string, description?: string): Option;
|
|
897
|
+
declare function createArgument(name: string, description?: string): Argument;
|
|
898
898
|
|
|
899
|
-
|
|
899
|
+
declare const program: Command;
|
|
900
|
+
|
|
901
|
+
export { type AddHelpTextContext, type AddHelpTextPosition, Argument, Command, type CommandOptions, CommanderError, type ErrorOptions, type ExecutableCommandOptions, Help, type HelpConfiguration, type HelpContext, type HookEvent, InvalidArgumentError, InvalidArgumentError as InvalidOptionArgumentError, Option, type OptionValueSource, type OptionValues, type OutputConfiguration, type ParseOptions, type ParseOptionsResult, createArgument, createCommand, createOption, program };
|