@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.
Files changed (54) hide show
  1. package/compiled/commander/{typings/index.d.ts → index.d.ts} +26 -24
  2. package/compiled/commander/index.js +3528 -1
  3. package/compiled/commander/package.json +1 -1
  4. package/compiled/connect-history-api-fallback/index.js +186 -1
  5. package/compiled/dotenv/{lib/main.d.ts → index.d.ts} +16 -12
  6. package/compiled/dotenv/index.js +458 -1
  7. package/compiled/dotenv/package.json +1 -1
  8. package/compiled/dotenv-expand/{lib/main.d.ts → index.d.ts} +9 -7
  9. package/compiled/dotenv-expand/index.js +146 -1
  10. package/compiled/dotenv-expand/package.json +1 -1
  11. package/compiled/http-compression/index.js +185 -1
  12. package/compiled/launch-editor-middleware/index.js +843 -1
  13. package/compiled/on-finished/index.d.ts +2 -2
  14. package/compiled/on-finished/index.js +390 -3
  15. package/compiled/on-finished/package.json +1 -1
  16. package/compiled/open/index.d.ts +1 -153
  17. package/compiled/open/index.js +526 -1
  18. package/compiled/open/package.json +1 -1
  19. package/compiled/sirv/index.d.ts +1 -0
  20. package/compiled/sirv/index.js +798 -1
  21. package/compiled/sirv/package.json +1 -1
  22. package/compiled/webpack-dev-middleware/index.d.ts +1 -0
  23. package/compiled/webpack-dev-middleware/index.js +6696 -0
  24. package/compiled/webpack-dev-middleware/license +20 -0
  25. package/compiled/webpack-dev-middleware/package.json +1 -0
  26. package/compiled/webpack-dev-middleware/schema-utils.js +1 -0
  27. package/compiled/ws/index.d.ts +7 -15
  28. package/compiled/ws/index.js +4885 -1
  29. package/compiled/ws/package.json +1 -1
  30. package/dist/cli/commands.js +1 -1
  31. package/dist/cli/prepare.js +1 -1
  32. package/dist/client/format.d.ts +5 -0
  33. package/dist/client/{formatStats.js → format.js} +22 -46
  34. package/dist/client/hmr.d.ts +5 -0
  35. package/dist/client/hmr.mjs +201 -474
  36. package/dist/client/overlay.mjs +208 -237
  37. package/dist/createContext.js +1 -1
  38. package/dist/index.js +1 -1
  39. package/dist/plugins/target.js +19 -16
  40. package/dist/provider/plugins/swc.js +1 -0
  41. package/dist/provider/shared.js +2 -2
  42. package/dist/server/devMiddleware.js +1 -1
  43. package/dist/server/devServer.js +6 -1
  44. package/dist/server/getDevMiddlewares.d.ts +3 -0
  45. package/dist/server/getDevMiddlewares.js +6 -8
  46. package/dist/server/helper.d.ts +4 -4
  47. package/dist/server/middlewares.d.ts +5 -2
  48. package/dist/server/middlewares.js +1 -7
  49. package/package.json +6 -5
  50. package/compiled/open/license +0 -9
  51. package/compiled/sirv/sirv.d.ts +0 -27
  52. package/dist/client/formatStats.d.ts +0 -12
  53. package/dist/client/hmr/createSocketUrl.d.ts +0 -12
  54. 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
- export class CommanderError extends Error {
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
- export class InvalidArgumentError extends CommanderError {
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
- export { InvalidArgumentError as InvalidOptionArgumentError }; // deprecated old name
40
+ // deprecated old name
41
41
 
42
- export interface ErrorOptions { // optional parameter for error()
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
- export class Argument {
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
- export class Option {
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
- export class Help {
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
- export type HelpConfiguration = Partial<Help>;
265
+ type HelpConfiguration = Partial<Help>;
266
266
 
267
- export interface ParseOptions {
267
+ interface ParseOptions {
268
268
  from: 'node' | 'electron' | 'user';
269
269
  }
270
- export interface HelpContext { // optional parameter for .help() and .outputHelp()
270
+ interface HelpContext { // optional parameter for .help() and .outputHelp()
271
271
  error: boolean;
272
272
  }
273
- export interface AddHelpTextContext { // passed to text function used with .addHelpText()
273
+ interface AddHelpTextContext { // passed to text function used with .addHelpText()
274
274
  error: boolean;
275
275
  command: Command;
276
276
  }
277
- export interface OutputConfiguration {
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
- export type AddHelpTextPosition = 'beforeAll' | 'before' | 'after' | 'afterAll';
287
- export type HookEvent = 'preSubcommand' | 'preAction' | 'postAction';
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
- export type OptionValueSource = LiteralUnion<'default' | 'config' | 'env' | 'cli' | 'implied', string> | undefined;
289
+ type OptionValueSource = LiteralUnion<'default' | 'config' | 'env' | 'cli' | 'implied', string> | undefined;
290
290
 
291
- export type OptionValues = Record<string, any>;
291
+ type OptionValues = Record<string, any>;
292
292
 
293
- export class Command {
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
- export interface CommandOptions {
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
- export interface ExecutableCommandOptions extends CommandOptions {
886
+ interface ExecutableCommandOptions extends CommandOptions {
887
887
  executableFile?: string;
888
888
  }
889
889
 
890
- export interface ParseOptionsResult {
890
+ interface ParseOptionsResult {
891
891
  operands: string[];
892
892
  unknown: string[];
893
893
  }
894
894
 
895
- export function createCommand(name?: string): Command;
896
- export function createOption(flags: string, description?: string): Option;
897
- export function createArgument(name: string, description?: string): Argument;
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
- export const program: Command;
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 };