@rsbuild/webpack 1.0.0 → 1.0.1-beta.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.
Files changed (149) hide show
  1. package/README.md +23 -2
  2. package/dist/index.cjs +2582 -0
  3. package/dist/index.js +2609 -17
  4. package/dist-types/build.d.ts +3 -0
  5. package/dist-types/createCompiler.d.ts +12 -0
  6. package/dist-types/index.d.ts +2 -0
  7. package/dist-types/initConfigs.d.ts +11 -0
  8. package/dist-types/inspectConfig.d.ts +7 -0
  9. package/dist-types/package.json +1 -0
  10. package/dist-types/plugin.d.ts +5 -0
  11. package/dist-types/progress/ProgressPlugin.d.ts +13 -0
  12. package/{dist/webpackPlugins/ProgressPlugin → dist-types/progress}/helpers/bar.d.ts +2 -2
  13. package/dist-types/progress/helpers/bus.d.ts +18 -0
  14. package/dist-types/progress/helpers/index.d.ts +4 -0
  15. package/dist-types/progress/helpers/log.d.ts +8 -0
  16. package/dist-types/progress/helpers/nonTty.d.ts +9 -0
  17. package/{dist/webpackPlugins/ProgressPlugin → dist-types/progress}/helpers/percentage.d.ts +1 -1
  18. package/dist-types/progress/helpers/types.d.ts +24 -0
  19. package/{dist/webpackPlugins/ProgressPlugin → dist-types/progress}/helpers/utils.d.ts +1 -1
  20. package/dist-types/provider.d.ts +2 -0
  21. package/dist-types/shared.d.ts +17 -0
  22. package/dist-types/types.d.ts +3 -0
  23. package/dist-types/webpackConfig.d.ts +8 -0
  24. package/package.json +21 -50
  25. package/static/ModuleFilenameHelpers.js +1 -1
  26. package/compiled/ansi-escapes/index.d.ts +0 -248
  27. package/compiled/ansi-escapes/index.js +0 -1
  28. package/compiled/ansi-escapes/license +0 -9
  29. package/compiled/ansi-escapes/package.json +0 -1
  30. package/compiled/ansi-escapes/type-fest/index.d.ts +0 -2
  31. package/compiled/babel-plugin-lodash/index.d.ts +0 -1
  32. package/compiled/babel-plugin-lodash/index.js +0 -1
  33. package/compiled/babel-plugin-lodash/license +0 -44
  34. package/compiled/babel-plugin-lodash/package.json +0 -1
  35. package/compiled/babel-plugin-transform-react-remove-prop-types/index.d.ts +0 -1
  36. package/compiled/babel-plugin-transform-react-remove-prop-types/index.js +0 -1
  37. package/compiled/babel-plugin-transform-react-remove-prop-types/license +0 -22
  38. package/compiled/babel-plugin-transform-react-remove-prop-types/package.json +0 -1
  39. package/compiled/cli-truncate/index.d.ts +0 -96
  40. package/compiled/cli-truncate/index.js +0 -1
  41. package/compiled/cli-truncate/license +0 -9
  42. package/compiled/cli-truncate/package.json +0 -1
  43. package/compiled/copy-webpack-plugin/index.d.ts +0 -1
  44. package/compiled/copy-webpack-plugin/index.js +0 -22
  45. package/compiled/copy-webpack-plugin/license +0 -20
  46. package/compiled/copy-webpack-plugin/package.json +0 -1
  47. package/compiled/patch-console/build/index.d.ts +0 -4
  48. package/compiled/patch-console/index.js +0 -1
  49. package/compiled/patch-console/package.json +0 -1
  50. package/compiled/schema-utils3/index.d.ts +0 -1
  51. package/compiled/schema-utils3/index.js +0 -3
  52. package/compiled/schema-utils3/license +0 -20
  53. package/compiled/schema-utils3/package.json +0 -1
  54. package/compiled/tapable/index.js +0 -1
  55. package/compiled/tapable/license +0 -21
  56. package/compiled/tapable/package.json +0 -1
  57. package/compiled/tapable/tapable.d.ts +0 -116
  58. package/compiled/webpack-sources/index.d.ts +0 -1
  59. package/compiled/webpack-sources/index.js +0 -1
  60. package/compiled/webpack-sources/license +0 -21
  61. package/compiled/webpack-sources/package.json +0 -1
  62. package/dist/config/defaults.d.ts +0 -3
  63. package/dist/config/defaults.js +0 -47
  64. package/dist/config/normalize.d.ts +0 -7
  65. package/dist/config/normalize.js +0 -33
  66. package/dist/core/build.d.ts +0 -20
  67. package/dist/core/build.js +0 -80
  68. package/dist/core/createCompiler.d.ts +0 -14
  69. package/dist/core/createCompiler.js +0 -88
  70. package/dist/core/createContext.d.ts +0 -13
  71. package/dist/core/createContext.js +0 -58
  72. package/dist/core/devMiddleware.d.ts +0 -3
  73. package/dist/core/devMiddleware.js +0 -73
  74. package/dist/core/initConfigs.d.ts +0 -14
  75. package/dist/core/initConfigs.js +0 -79
  76. package/dist/core/initHooks.d.ts +0 -19
  77. package/dist/core/initHooks.js +0 -44
  78. package/dist/core/initPlugins.d.ts +0 -9
  79. package/dist/core/initPlugins.js +0 -86
  80. package/dist/core/inspectConfig.d.ts +0 -20
  81. package/dist/core/inspectConfig.js +0 -81
  82. package/dist/core/webpackConfig.d.ts +0 -9
  83. package/dist/core/webpackConfig.js +0 -164
  84. package/dist/exports/webpack.d.ts +0 -2
  85. package/dist/exports/webpack.js +0 -35
  86. package/dist/index.d.ts +0 -6
  87. package/dist/plugins/babel.d.ts +0 -3
  88. package/dist/plugins/babel.js +0 -169
  89. package/dist/plugins/basic.d.ts +0 -5
  90. package/dist/plugins/basic.js +0 -58
  91. package/dist/plugins/copy.d.ts +0 -2
  92. package/dist/plugins/copy.js +0 -69
  93. package/dist/plugins/css.d.ts +0 -23
  94. package/dist/plugins/css.js +0 -121
  95. package/dist/plugins/hmr.d.ts +0 -2
  96. package/dist/plugins/hmr.js +0 -41
  97. package/dist/plugins/less.d.ts +0 -6
  98. package/dist/plugins/less.js +0 -65
  99. package/dist/plugins/minimize.d.ts +0 -2
  100. package/dist/plugins/minimize.js +0 -64
  101. package/dist/plugins/output.d.ts +0 -2
  102. package/dist/plugins/output.js +0 -66
  103. package/dist/plugins/progress.d.ts +0 -2
  104. package/dist/plugins/progress.js +0 -58
  105. package/dist/plugins/react.d.ts +0 -2
  106. package/dist/plugins/react.js +0 -97
  107. package/dist/plugins/resolve.d.ts +0 -2
  108. package/dist/plugins/resolve.js +0 -86
  109. package/dist/plugins/sass.d.ts +0 -2
  110. package/dist/plugins/sass.js +0 -76
  111. package/dist/plugins/tsLoader.d.ts +0 -2
  112. package/dist/plugins/tsLoader.js +0 -105
  113. package/dist/provider.d.ts +0 -9
  114. package/dist/provider.js +0 -108
  115. package/dist/shared/fs.d.ts +0 -1
  116. package/dist/shared/fs.js +0 -48
  117. package/dist/shared/index.d.ts +0 -1
  118. package/dist/shared/index.js +0 -22
  119. package/dist/shared/plugin.d.ts +0 -3
  120. package/dist/shared/plugin.js +0 -78
  121. package/dist/types/config/index.d.ts +0 -26
  122. package/dist/types/config/index.js +0 -22
  123. package/dist/types/config/tools.d.ts +0 -51
  124. package/dist/types/config/tools.js +0 -16
  125. package/dist/types/context.d.ts +0 -17
  126. package/dist/types/context.js +0 -16
  127. package/dist/types/index.d.ts +0 -4
  128. package/dist/types/index.js +0 -28
  129. package/dist/types/plugin.d.ts +0 -6
  130. package/dist/types/plugin.js +0 -16
  131. package/dist/types/thirdParty/css.d.ts +0 -7
  132. package/dist/types/thirdParty/css.js +0 -16
  133. package/dist/types/thirdParty/index.d.ts +0 -8
  134. package/dist/types/thirdParty/index.js +0 -16
  135. package/dist/webpackPlugins/ProgressPlugin/ProgressPlugin.d.ts +0 -13
  136. package/dist/webpackPlugins/ProgressPlugin/ProgressPlugin.js +0 -104
  137. package/dist/webpackPlugins/ProgressPlugin/helpers/bar.js +0 -142
  138. package/dist/webpackPlugins/ProgressPlugin/helpers/bus.d.ts +0 -17
  139. package/dist/webpackPlugins/ProgressPlugin/helpers/bus.js +0 -105
  140. package/dist/webpackPlugins/ProgressPlugin/helpers/index.d.ts +0 -4
  141. package/dist/webpackPlugins/ProgressPlugin/helpers/index.js +0 -28
  142. package/dist/webpackPlugins/ProgressPlugin/helpers/log.d.ts +0 -9
  143. package/dist/webpackPlugins/ProgressPlugin/helpers/log.js +0 -62
  144. package/dist/webpackPlugins/ProgressPlugin/helpers/nonTty.d.ts +0 -15
  145. package/dist/webpackPlugins/ProgressPlugin/helpers/nonTty.js +0 -56
  146. package/dist/webpackPlugins/ProgressPlugin/helpers/percentage.js +0 -52
  147. package/dist/webpackPlugins/ProgressPlugin/helpers/type.d.ts +0 -23
  148. package/dist/webpackPlugins/ProgressPlugin/helpers/type.js +0 -16
  149. package/dist/webpackPlugins/ProgressPlugin/helpers/utils.js +0 -30
@@ -0,0 +1,3 @@
1
+ import type { BuildOptions } from '@rsbuild/core';
2
+ import { type InitConfigsOptions } from './initConfigs';
3
+ export declare const build: (initOptions: InitConfigsOptions, { mode, watch, compiler: customCompiler }?: BuildOptions) => Promise<void>;
@@ -0,0 +1,12 @@
1
+ import { type Rspack } from '@rsbuild/core';
2
+ import { type InitConfigsOptions } from './initConfigs';
3
+ import { type InternalContext } from './shared';
4
+ import type { WebpackConfig } from './types';
5
+ export declare function createCompiler({ context, webpackConfigs, }: {
6
+ context: InternalContext;
7
+ webpackConfigs: WebpackConfig[];
8
+ }): Promise<Rspack.Compiler | Rspack.MultiCompiler>;
9
+ export declare function createDevMiddleware(options: InitConfigsOptions, customCompiler?: Rspack.Compiler | Rspack.MultiCompiler): Promise<{
10
+ devMiddleware: import("node_modules/@rsbuild/core/dist-types/server/devMiddleware").DevMiddleware;
11
+ compiler: Rspack.Compiler | Rspack.MultiCompiler;
12
+ }>;
@@ -0,0 +1,2 @@
1
+ export { webpackProvider } from './provider';
2
+ export type { webpack, WebpackConfig, } from './types';
@@ -0,0 +1,11 @@
1
+ import { type CreateRsbuildOptions, type PluginManager } from '@rsbuild/core';
2
+ import { type InternalContext } from './shared';
3
+ import type { WebpackConfig } from './types';
4
+ export type InitConfigsOptions = {
5
+ context: InternalContext;
6
+ pluginManager: PluginManager;
7
+ rsbuildOptions: Required<CreateRsbuildOptions>;
8
+ };
9
+ export declare function initConfigs({ context, pluginManager, rsbuildOptions, }: InitConfigsOptions): Promise<{
10
+ webpackConfigs: WebpackConfig[];
11
+ }>;
@@ -0,0 +1,7 @@
1
+ import type { InspectConfigOptions, InspectConfigResult } from '@rsbuild/core';
2
+ import { type InitConfigsOptions } from './initConfigs';
3
+ import type { WebpackConfig } from './types';
4
+ export declare function inspectConfig({ context, pluginManager, rsbuildOptions, bundlerConfigs, inspectOptions, }: InitConfigsOptions & {
5
+ inspectOptions?: InspectConfigOptions;
6
+ bundlerConfigs?: WebpackConfig[];
7
+ }): Promise<InspectConfigResult<'webpack'>>;
@@ -0,0 +1 @@
1
+ {"//":"This file is for making TypeScript work with moduleResolution node16+.","version":"1.0.0"}
@@ -0,0 +1,5 @@
1
+ import type { RsbuildPlugin } from '@rsbuild/core';
2
+ /**
3
+ * Handling differences between Webpack and Rspack
4
+ */
5
+ export declare const pluginAdaptor: () => RsbuildPlugin;
@@ -0,0 +1,13 @@
1
+ import webpack from 'webpack';
2
+ import type { Props } from './helpers/types';
3
+ export interface ProgressOptions extends Omit<Partial<Props>, 'message' | 'total' | 'current' | 'done'> {
4
+ id?: string;
5
+ }
6
+ export declare class ProgressPlugin extends webpack.ProgressPlugin {
7
+ readonly name: string;
8
+ id: string;
9
+ hasCompileErrors: boolean;
10
+ compileTime: string | null;
11
+ constructor(options: ProgressOptions);
12
+ apply(compiler: webpack.Compiler): void;
13
+ }
@@ -1,5 +1,5 @@
1
- import type { Props } from './type';
1
+ import type { Props } from './types';
2
2
  export declare const FULL_WIDTH = 70;
3
3
  export declare const MIDDLE_WIDTH = 40;
4
4
  export declare const SMALL_WIDTH = 15;
5
- export declare const renderBar: (option: Partial<Props>) => string;
5
+ export declare const renderBar: (option: Partial<Props>) => string;
@@ -0,0 +1,18 @@
1
+ import type { LogUpdate } from './log';
2
+ import type { Colors, Props } from './types';
3
+ export declare const getProgressColor: (index: number) => Colors;
4
+ declare class Bus {
5
+ states: Partial<Props>[];
6
+ log: LogUpdate;
7
+ restore: () => void;
8
+ prevOutput: string;
9
+ destroyed: boolean;
10
+ constructor();
11
+ update(state: Partial<Props>): void;
12
+ writeToStd(type?: 'stdout' | 'stderr', data?: string): void;
13
+ render(): void;
14
+ destroy(): void;
15
+ clear(): void;
16
+ }
17
+ declare const bus: Bus;
18
+ export { bus };
@@ -0,0 +1,4 @@
1
+ export * from './bus';
2
+ export * from './bar';
3
+ export * from './types';
4
+ export * from './percentage';
@@ -0,0 +1,8 @@
1
+ import type { Writable } from 'node:stream';
2
+ export interface LogUpdate {
3
+ clear: () => void;
4
+ done: () => void;
5
+ (str: string): void;
6
+ }
7
+ declare const create: (stream: Writable) => LogUpdate;
8
+ export { create };
@@ -0,0 +1,9 @@
1
+ export declare function createNonTTYLogger(): {
2
+ log: ({ id, done, current, hasErrors, compileTime, }: {
3
+ id: string;
4
+ done: boolean;
5
+ current: number;
6
+ hasErrors: boolean;
7
+ compileTime: string | null;
8
+ }) => void;
9
+ };
@@ -4,4 +4,4 @@
4
4
  * or decrease in some cases, which will confuse the user.
5
5
  * So we format the percentage number and display a more smooth percentage.
6
6
  */
7
- export declare const createFriendlyPercentage: () => (percentage: number) => number;
7
+ export declare const createFriendlyPercentage: () => (percentage: number) => number;
@@ -0,0 +1,24 @@
1
+ import type color from 'picocolors';
2
+ export type Colors = Omit<keyof typeof color, 'createColor' | 'isColorSupported'>;
3
+ export type Props = {
4
+ total: number;
5
+ current: number;
6
+ color: Colors;
7
+ bgColor: Colors;
8
+ char: string;
9
+ width: number;
10
+ buildIcon: string;
11
+ errorIcon: string;
12
+ errorInfo: string;
13
+ message: string;
14
+ done: boolean;
15
+ messageWidth: number;
16
+ spaceWidth: number;
17
+ messageColor: Colors;
18
+ id: string;
19
+ maxIdLen: number;
20
+ hasErrors: boolean;
21
+ };
22
+ export type BusOption = {
23
+ state: Props[];
24
+ };
@@ -1 +1 @@
1
- export declare const clamp: (x: number, min: number, max: number) => number;
1
+ export declare const clamp: (x: number, min: number, max: number) => number;
@@ -0,0 +1,2 @@
1
+ import type { RsbuildProvider } from '@rsbuild/core';
2
+ export declare const webpackProvider: RsbuildProvider<'webpack'>;
@@ -0,0 +1,17 @@
1
+ import { __internalHelper } from '@rsbuild/core';
2
+ declare const getChainUtils: typeof __internalHelper.getChainUtils, initRsbuildConfig: typeof __internalHelper.initRsbuildConfig, createDevServer: typeof __internalHelper.createDevServer, formatStats: typeof __internalHelper.formatStats, getDevMiddleware: (multiCompiler: import("@rspack/core").Compiler | import("@rspack/core").MultiCompiler) => Promise<NonNullable<import("node_modules/@rsbuild/core/dist-types/server/devMiddleware").DevMiddleware>>, getStatsOptions: typeof __internalHelper.getStatsOptions, stringifyConfig: typeof __internalHelper.stringifyConfig, outputInspectConfigFiles: typeof __internalHelper.outputInspectConfigFiles, getRsbuildInspectConfig: ({ normalizedConfig, inspectOptions, pluginManager, }: {
3
+ normalizedConfig: import("@rsbuild/core").NormalizedConfig;
4
+ inspectOptions: import("@rsbuild/core").InspectConfigOptions;
5
+ pluginManager: import("@rsbuild/core").PluginManager;
6
+ }) => {
7
+ rawRsbuildConfig: string;
8
+ rsbuildConfig: import("@rsbuild/core").InspectConfigResult["origin"]["rsbuildConfig"];
9
+ rawEnvironmentConfigs: Array<{
10
+ name: string;
11
+ content: string;
12
+ }>;
13
+ environmentConfigs: import("@rsbuild/core").InspectConfigResult["origin"]["environmentConfigs"];
14
+ }, chainToConfig: typeof __internalHelper.chainToConfig, modifyBundlerChain: typeof __internalHelper.modifyBundlerChain, onCompileDone: (compiler: import("@rspack/core").Compiler | import("@rspack/core").MultiCompiler, onDone: (stats: import("@rspack/core").Stats | import("@rspack/core").MultiStats) => Promise<void>, MultiStatsCtor: new (stats: import("@rspack/core").Stats[]) => import("@rspack/core").MultiStats) => void, prettyTime: (seconds: number) => string;
15
+ export { getChainUtils, initRsbuildConfig, createDevServer, formatStats, getDevMiddleware, getStatsOptions, stringifyConfig, outputInspectConfigFiles, chainToConfig, modifyBundlerChain, onCompileDone, prettyTime, getRsbuildInspectConfig, };
16
+ export type InternalContext = __internalHelper.InternalContext;
17
+ export declare const castArray: <T>(arr?: T | T[]) => T[];
@@ -0,0 +1,3 @@
1
+ import type webpack from 'webpack';
2
+ import type { Configuration as WebpackConfig } from 'webpack';
3
+ export type { webpack, WebpackConfig };
@@ -0,0 +1,8 @@
1
+ import { type RsbuildTarget } from '@rsbuild/core';
2
+ import { type InternalContext } from './shared';
3
+ import type { WebpackConfig } from './types';
4
+ export declare function generateWebpackConfig({ target, context, environment, }: {
5
+ environment: string;
6
+ target: RsbuildTarget;
7
+ context: InternalContext;
8
+ }): Promise<WebpackConfig>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsbuild/webpack",
3
- "version": "1.0.0",
3
+ "version": "1.0.1-beta.0",
4
4
  "homepage": "https://rsbuild.dev",
5
5
  "repository": {
6
6
  "type": "git",
@@ -8,66 +8,37 @@
8
8
  "directory": "packages/compat/webpack"
9
9
  },
10
10
  "license": "MIT",
11
+ "type": "module",
11
12
  "exports": {
12
13
  ".": {
13
- "types": "./dist/index.d.ts",
14
- "default": "./dist/index.js"
15
- },
16
- "./plugin-css": {
17
- "types": "./dist/plugins/css.d.ts",
18
- "default": "./dist/plugins/css.js"
19
- },
20
- "./plugin-babel": {
21
- "types": "./dist/plugins/babel.d.ts",
22
- "default": "./dist/plugins/babel.js"
14
+ "types": "./dist-types/index.d.ts",
15
+ "import": "./dist/index.js",
16
+ "require": "./dist/index.cjs"
23
17
  }
24
18
  },
25
- "main": "./dist/index.js",
26
- "types": "./dist/index.d.ts",
19
+ "main": "./dist/index.cjs",
20
+ "types": "./dist-types/index.d.ts",
27
21
  "files": [
28
22
  "static",
29
- "compiled",
30
- "dist"
23
+ "dist",
24
+ "dist-types"
31
25
  ],
32
26
  "dependencies": {
33
- "@babel/core": "^7.23.2",
34
- "@babel/preset-react": "^7.22.15",
35
- "@babel/types": "^7.23.0",
36
- "@pmmmwh/react-refresh-webpack-plugin": "0.5.10",
37
- "babel-loader": "9.1.3",
38
- "babel-plugin-import": "1.13.5",
39
- "babel-plugin-transform-react-remove-prop-types": "0.4.24",
40
- "caniuse-lite": "^1.0.30001559",
41
- "fast-glob": "^3.3.1",
42
- "glob": "^9.3.5",
43
- "globby": "^11.1.0",
44
- "html-webpack-plugin": "npm:html-rspack-plugin@5.5.7",
45
- "lodash": "^4.17.21",
46
- "mini-css-extract-plugin": "2.7.6",
47
- "postcss": "8.4.31",
48
- "react-refresh": "^0.14.0",
49
- "style-loader": "3.3.3",
50
- "terser-webpack-plugin": "5.3.9",
51
- "ts-loader": "9.4.4",
27
+ "copy-webpack-plugin": "11.0.0",
28
+ "mini-css-extract-plugin": "2.9.0",
29
+ "picocolors": "^1.0.1",
30
+ "reduce-configs": "^1.0.0",
52
31
  "tsconfig-paths-webpack-plugin": "4.1.0",
53
- "webpack": "^5.89.0",
54
- "@rsbuild/babel-preset": "1.0.0",
55
- "@rsbuild/core": "1.0.0",
56
- "@rsbuild/plugin-react": "1.0.0",
57
- "@rsbuild/plugin-css-minimizer": "1.0.0",
58
- "@rsbuild/plugin-babel": "1.0.0",
59
- "@rsbuild/shared": "1.0.0"
32
+ "webpack": "^5.93.0",
33
+ "@rsbuild/core": "1.0.1-beta.0"
60
34
  },
61
35
  "devDependencies": {
62
- "@types/lodash": "^4.14.200",
63
- "@types/node": "^16",
64
- "react": "^18.2.0",
65
- "react-dom": "^18.2.0",
66
- "typescript": "^5.3.0",
67
- "@rsbuild/test-helper": "1.0.0"
68
- },
69
- "engines": {
70
- "node": ">=14.0.0"
36
+ "@types/node": "18.x",
37
+ "ansi-escapes": "4.3.2",
38
+ "cli-truncate": "2.1.0",
39
+ "patch-console": "1.0.0",
40
+ "typescript": "^5.5.2",
41
+ "@scripts/test-helper": "1.0.1-beta.0"
71
42
  },
72
43
  "publishConfig": {
73
44
  "access": "public",
@@ -1,2 +1,2 @@
1
- // Compat esbulid-loader prebuilt bundle, which includes subpath 'webpack/lib/ModuleFilenameHelpers.js'
1
+ // Compat esbuild-loader prebuilt bundle, which includes subpath 'webpack/lib/ModuleFilenameHelpers.js'
2
2
  module.exports = require('webpack/lib/ModuleFilenameHelpers');
@@ -1,248 +0,0 @@
1
- /// <reference types="node"/>
2
- import {LiteralUnion} from './type-fest';
3
-
4
- declare namespace ansiEscapes {
5
- interface ImageOptions {
6
- /**
7
- The width is given as a number followed by a unit, or the word `'auto'`.
8
-
9
- - `N`: N character cells.
10
- - `Npx`: N pixels.
11
- - `N%`: N percent of the session's width or height.
12
- - `auto`: The image's inherent size will be used to determine an appropriate dimension.
13
- */
14
- readonly width?: LiteralUnion<'auto', number | string>;
15
-
16
- /**
17
- The height is given as a number followed by a unit, or the word `'auto'`.
18
-
19
- - `N`: N character cells.
20
- - `Npx`: N pixels.
21
- - `N%`: N percent of the session's width or height.
22
- - `auto`: The image's inherent size will be used to determine an appropriate dimension.
23
- */
24
- readonly height?: LiteralUnion<'auto', number | string>;
25
-
26
- readonly preserveAspectRatio?: boolean;
27
- }
28
-
29
- interface AnnotationOptions {
30
- /**
31
- Nonzero number of columns to annotate.
32
-
33
- Default: The remainder of the line.
34
- */
35
- readonly length?: number;
36
-
37
- /**
38
- Starting X coordinate.
39
-
40
- Must be used with `y` and `length`.
41
-
42
- Default: The cursor position
43
- */
44
- readonly x?: number;
45
-
46
- /**
47
- Starting Y coordinate.
48
-
49
- Must be used with `x` and `length`.
50
-
51
- Default: Cursor position.
52
- */
53
- readonly y?: number;
54
-
55
- /**
56
- Create a "hidden" annotation.
57
-
58
- Annotations created this way can be shown using the "Show Annotations" iTerm command.
59
- */
60
- readonly isHidden?: boolean;
61
- }
62
- }
63
-
64
- declare const ansiEscapes: {
65
- /**
66
- Set the absolute position of the cursor. `x0` `y0` is the top left of the screen.
67
- */
68
- cursorTo(x: number, y?: number): string;
69
-
70
- /**
71
- Set the position of the cursor relative to its current position.
72
- */
73
- cursorMove(x: number, y?: number): string;
74
-
75
- /**
76
- Move cursor up a specific amount of rows.
77
-
78
- @param count - Count of rows to move up. Default is `1`.
79
- */
80
- cursorUp(count?: number): string;
81
-
82
- /**
83
- Move cursor down a specific amount of rows.
84
-
85
- @param count - Count of rows to move down. Default is `1`.
86
- */
87
- cursorDown(count?: number): string;
88
-
89
- /**
90
- Move cursor forward a specific amount of rows.
91
-
92
- @param count - Count of rows to move forward. Default is `1`.
93
- */
94
- cursorForward(count?: number): string;
95
-
96
- /**
97
- Move cursor backward a specific amount of rows.
98
-
99
- @param count - Count of rows to move backward. Default is `1`.
100
- */
101
- cursorBackward(count?: number): string;
102
-
103
- /**
104
- Move cursor to the left side.
105
- */
106
- cursorLeft: string;
107
-
108
- /**
109
- Save cursor position.
110
- */
111
- cursorSavePosition: string;
112
-
113
- /**
114
- Restore saved cursor position.
115
- */
116
- cursorRestorePosition: string;
117
-
118
- /**
119
- Get cursor position.
120
- */
121
- cursorGetPosition: string;
122
-
123
- /**
124
- Move cursor to the next line.
125
- */
126
- cursorNextLine: string;
127
-
128
- /**
129
- Move cursor to the previous line.
130
- */
131
- cursorPrevLine: string;
132
-
133
- /**
134
- Hide cursor.
135
- */
136
- cursorHide: string;
137
-
138
- /**
139
- Show cursor.
140
- */
141
- cursorShow: string;
142
-
143
- /**
144
- Erase from the current cursor position up the specified amount of rows.
145
-
146
- @param count - Count of rows to erase.
147
- */
148
- eraseLines(count: number): string;
149
-
150
- /**
151
- Erase from the current cursor position to the end of the current line.
152
- */
153
- eraseEndLine: string;
154
-
155
- /**
156
- Erase from the current cursor position to the start of the current line.
157
- */
158
- eraseStartLine: string;
159
-
160
- /**
161
- Erase the entire current line.
162
- */
163
- eraseLine: string;
164
-
165
- /**
166
- Erase the screen from the current line down to the bottom of the screen.
167
- */
168
- eraseDown: string;
169
-
170
- /**
171
- Erase the screen from the current line up to the top of the screen.
172
- */
173
- eraseUp: string;
174
-
175
- /**
176
- Erase the screen and move the cursor the top left position.
177
- */
178
- eraseScreen: string;
179
-
180
- /**
181
- Scroll display up one line.
182
- */
183
- scrollUp: string;
184
-
185
- /**
186
- Scroll display down one line.
187
- */
188
- scrollDown: string;
189
-
190
- /**
191
- Clear the terminal screen. (Viewport)
192
- */
193
- clearScreen: string;
194
-
195
- /**
196
- Clear the whole terminal, including scrollback buffer. (Not just the visible part of it)
197
- */
198
- clearTerminal: string;
199
-
200
- /**
201
- Output a beeping sound.
202
- */
203
- beep: string;
204
-
205
- /**
206
- Create a clickable link.
207
-
208
- [Supported terminals.](https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda) Use [`supports-hyperlinks`](https://github.com/jamestalmage/supports-hyperlinks) to detect link support.
209
- */
210
- link(text: string, url: string): string;
211
-
212
- /**
213
- Display an image.
214
-
215
- _Currently only supported on iTerm2 >=3_
216
-
217
- See [term-img](https://github.com/sindresorhus/term-img) for a higher-level module.
218
-
219
- @param buffer - Buffer of an image. Usually read in with `fs.readFile()`.
220
- */
221
- image(buffer: Buffer, options?: ansiEscapes.ImageOptions): string;
222
-
223
- iTerm: {
224
- /**
225
- [Inform iTerm2](https://www.iterm2.com/documentation-escape-codes.html) of the current directory to help semantic history and enable [Cmd-clicking relative paths](https://coderwall.com/p/b7e82q/quickly-open-files-in-iterm-with-cmd-click).
226
-
227
- @param cwd - Current directory. Default: `process.cwd()`.
228
- */
229
- setCwd(cwd?: string): string;
230
-
231
- /**
232
- An annotation looks like this when shown:
233
-
234
- ![screenshot of iTerm annotation](https://user-images.githubusercontent.com/924465/64382136-b60ac700-cfe9-11e9-8a35-9682e8dc4b72.png)
235
-
236
- See the [iTerm Proprietary Escape Codes documentation](https://iterm2.com/documentation-escape-codes.html) for more information.
237
-
238
- @param message - The message to display within the annotation. The `|` character is disallowed and will be stripped.
239
- @returns An escape code which will create an annotation when printed in iTerm2.
240
- */
241
- annotation(message: string, options?: ansiEscapes.AnnotationOptions): string;
242
- };
243
-
244
- // TODO: remove this in the next major version
245
- default: typeof ansiEscapes;
246
- };
247
-
248
- export = ansiEscapes;
@@ -1 +0,0 @@
1
- (()=>{"use strict";var e={933:e=>{const r=e.exports;e.exports["default"]=r;const n="[";const t="]";const o="";const i=";";const s=process.env.TERM_PROGRAM==="Apple_Terminal";r.cursorTo=(e,r)=>{if(typeof e!=="number"){throw new TypeError("The `x` argument is required")}if(typeof r!=="number"){return n+(e+1)+"G"}return n+(r+1)+";"+(e+1)+"H"};r.cursorMove=(e,r)=>{if(typeof e!=="number"){throw new TypeError("The `x` argument is required")}let t="";if(e<0){t+=n+-e+"D"}else if(e>0){t+=n+e+"C"}if(r<0){t+=n+-r+"A"}else if(r>0){t+=n+r+"B"}return t};r.cursorUp=(e=1)=>n+e+"A";r.cursorDown=(e=1)=>n+e+"B";r.cursorForward=(e=1)=>n+e+"C";r.cursorBackward=(e=1)=>n+e+"D";r.cursorLeft=n+"G";r.cursorSavePosition=s?"7":n+"s";r.cursorRestorePosition=s?"8":n+"u";r.cursorGetPosition=n+"6n";r.cursorNextLine=n+"E";r.cursorPrevLine=n+"F";r.cursorHide=n+"?25l";r.cursorShow=n+"?25h";r.eraseLines=e=>{let n="";for(let t=0;t<e;t++){n+=r.eraseLine+(t<e-1?r.cursorUp():"")}if(e){n+=r.cursorLeft}return n};r.eraseEndLine=n+"K";r.eraseStartLine=n+"1K";r.eraseLine=n+"2K";r.eraseDown=n+"J";r.eraseUp=n+"1J";r.eraseScreen=n+"2J";r.scrollUp=n+"S";r.scrollDown=n+"T";r.clearScreen="c";r.clearTerminal=process.platform==="win32"?`${r.eraseScreen}${n}0f`:`${r.eraseScreen}${n}3J${n}H`;r.beep=o;r.link=(e,r)=>[t,"8",i,i,r,o,e,t,"8",i,i,o].join("");r.image=(e,r={})=>{let n=`${t}1337;File=inline=1`;if(r.width){n+=`;width=${r.width}`}if(r.height){n+=`;height=${r.height}`}if(r.preserveAspectRatio===false){n+=";preserveAspectRatio=0"}return n+":"+e.toString("base64")+o};r.iTerm={setCwd:(e=process.cwd())=>`${t}50;CurrentDir=${e}${o}`,annotation:(e,r={})=>{let n=`${t}1337;`;const i=typeof r.x!=="undefined";const s=typeof r.y!=="undefined";if((i||s)&&!(i&&s&&typeof r.length!=="undefined")){throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined")}e=e.replace(/\|/g,"");n+=r.isHidden?"AddHiddenAnnotation=":"AddAnnotation=";if(r.length>0){n+=(i?[e,r.length,r.x,r.y]:[r.length,e]).join("|")}else{n+=e}return n+o}}}};var r={};function __nccwpck_require__(n){var t=r[n];if(t!==undefined){return t.exports}var o=r[n]={exports:{}};var i=true;try{e[n](o,o.exports,__nccwpck_require__);i=false}finally{if(i)delete r[n]}return o.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var n=__nccwpck_require__(933);module.exports=n})();
@@ -1,9 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
-
7
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
-
9
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1 +0,0 @@
1
- {"name":"ansi-escapes","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"version":"4.3.2","funding":"https://github.com/sponsors/sindresorhus","license":"MIT"}
@@ -1,2 +0,0 @@
1
- // These are all the basic types that's compatible with all supported TypeScript versions.
2
- export * from './base';
@@ -1 +0,0 @@
1
- export = any;
@@ -1 +0,0 @@
1
- (()=>{var e={443:(e,t)=>{"use strict";t.__esModule=true;t["default"]=MapCtor;function MapCtor(e){return Object.setPrototypeOf(new Map(e),Object.getPrototypeOf(this))}MapCtor.prototype=Map.prototype;e.exports=t["default"]},390:(e,t,r)=>{"use strict";t.__esModule=true;t["default"]=void 0;var a=_interopRequireDefault(r(443));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _inheritsLoose(e,t){e.prototype=Object.create(t.prototype);e.prototype.constructor=e;e.__proto__=t}var i={};var s=function(e){_inheritsLoose(MapCache,e);function MapCache(){return e.apply(this,arguments)||this}var t=MapCache.prototype;t.clear=function clear(){e.prototype.clear.call(this);return this};t.findKey=function findKey(e){var t;try{this.forEach((function(r,a,s){if(e(r,a,s)){t=a;throw i}}))}catch(e){if(e!==i){throw e}}return t};return MapCache}(a.default);t["default"]=s;e.exports=t["default"]},537:(e,t,r)=>{"use strict";t.__esModule=true;t["default"]=void 0;var a=_interopRequireDefault(r(848));var i=_interopRequireDefault(r(30));var s=_interopRequireDefault(r(823));var o=_interopRequireDefault(r(320));var n=_interopRequireDefault(r(765));var u=_interopRequireDefault(r(865));var l=_interopRequireDefault(r(147));var f=_interopRequireDefault(r(205));var d=_interopRequireDefault(r(390));var p=_interopRequireDefault(r(188));var c=r(906);var h=_interopRequireDefault(r(17));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _assertThisInitialized(e){if(e===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function _inheritsLoose(e,t){e.prototype=Object.create(t.prototype);e.prototype.constructor=e;e.__proto__=t}var m=function(e){_inheritsLoose(ModuleCache,e);function ModuleCache(t){var r;r=e.call(this)||this;t=(0,u.default)(t);if(!t){return _assertThisInitialized(r)}var a=h.default.join(t,"package.json");var p=l.default.existsSync(a)&&require(a).main||"index.js";var m=(0,c.normalizePath)(h.default.dirname(h.default.resolve(t,p)));var _=(0,n.default)(f.default.sync(h.default.join(t,"**/"),{ignore:h.default.join(t,"node_modules/**/")}),(function(e){return(0,o.default)(e,m)}),["desc"]);(0,s.default)(_,(function(e){var a=h.default.relative(t,e);var s=f.default.sync(h.default.join(e,"*.js"));var o=(0,i.default)(s,(function(e){var t=h.default.basename(e,".js");return[t.toLowerCase(),t]}));r.set(a,new d.default(o))}));return r}ModuleCache.resolve=function resolve(e,t){if(t===void 0){t=process.cwd()}try{var r=h.default.dirname(p.default._resolveFilename(e,(0,a.default)(new p.default,{paths:p.default._nodeModulePaths(t)}))).split(h.default.sep);var i=r.length;while(i--){var s=r.slice(0,i+1);var o=s.join("/");var n=h.default.join(o,"package.json");if(i&&r[i-1]=="node_modules"||l.default.existsSync(n)&&require(n).name==e){return o}}return r.join("/")}catch(e){}return""};return ModuleCache}(d.default);t["default"]=m;e.exports=t["default"]},715:(e,t,r)=>{"use strict";t.__esModule=true;t["default"]=void 0;var a=_interopRequireDefault(r(73));var i=_interopRequireDefault(r(865));var s=_interopRequireDefault(r(72));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var o=/^lodash(?:-compat|-es)?$/;var n=function Package(e){e=(0,i.default)(e);var t=(0,s.default)(e);this.base=e.replace(new RegExp(t+"/?"),"");this.id=t;this.isLodash=(0,a.default)(o.test(this.id));this.path=e};t["default"]=n;e.exports=t["default"]},498:(e,t,r)=>{"use strict";t.__esModule=true;t["default"]=void 0;var a=_interopRequireDefault(r(823));var i=_interopRequireDefault(r(390));var s=r(906);var o=_interopRequireDefault(r(715));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _inheritsLoose(e,t){e.prototype=Object.create(t.prototype);e.prototype.constructor=e;e.__proto__=t}var n=function(e){_inheritsLoose(Store,e);function Store(t){var r;r=e.call(this)||this;(0,a.default)(t,(function(e){return r.set(e)}));return r}var t=Store.prototype;t.get=function get(t){return e.prototype.get.call(this,(0,s.normalizePath)(t))};t.set=function set(t,r){if(r===void 0){r=new o.default((0,s.normalizePath)(t))}return e.prototype.set.call(this,(0,s.normalizePath)(t),r)};return Store}(i.default);t["default"]=n;e.exports=t["default"]},176:(e,t,r)=>{"use strict";t.__esModule=true;t["default"]=config;var a=_interopRequireDefault(r(779));var i=_interopRequireDefault(r(823));var s=_interopRequireDefault(r(390));var o=_interopRequireDefault(r(537));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var n=["lodash","lodash-es","lodash-compat"];var u;var l=[];var f=new s.default;function config(e){var t=e===void 0?{}:e,r=t.cwd,s=r===void 0?process.cwd():r,d=t.id,p=d===void 0?n:d;if(u!==s){u=s;f.clear()}(0,i.default)((0,a.default)(p),(function(e){if(!f.get(e)){var t=o.default.resolve(e,s);if(t){l.push(e);f.set(e,new o.default(t))}}}));return{ids:l,modules:f}}e.exports=t["default"]},445:(e,t,r)=>{"use strict";t.__esModule=true;t["default"]=void 0;var a=_interopRequireDefault(r(319));var i=r(408);var s=_interopRequireDefault(r(698));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function resolvePath(e,t,r){var a=e.base,i=e.id;var o=t.toLowerCase();var n=s.default.modules.get(i);if(!n.get(a).has(o)){a=a?"":n.findKey((function(e){return e.has(o)}));if(!a){throw r.buildCodeFrameError([`The '${i}' method \`${t}\` is not a known module.`,"Please report bugs to https://github.com/lodash/babel-plugin-lodash/issues."].join("\n"))}}return i+"/"+(a?a+"/":"")+n.get(a).get(o)}function importModule(e,t,r){return(0,i.addDefault)(r,resolvePath(e,t,r),{nameHint:t})}var o=(0,a.default)(importModule,(function(e,t){return(e.path+"/"+t).toLowerCase()}));t["default"]=o;e.exports=t["default"]},380:(e,t,r)=>{"use strict";t.__esModule=true;t["default"]=lodash;var a=_interopRequireDefault(r(80));var i=_interopRequireDefault(r(163));var s=_interopRequireDefault(r(823));var o=_interopRequireDefault(r(848));var n=r(638);var u=_interopRequireDefault(r(176));var l=_interopRequireDefault(r(445));var f=_interopRequireDefault(r(698));var d=_interopRequireDefault(r(498));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var p=["Lodash chain sequences are not supported by babel-plugin-lodash.","Consider substituting chain sequences with composition patterns.","See https://medium.com/making-internets/why-using-chain-is-a-mistake-9bc1f80d51ba"].join("\n");function lodash(e){var t=e.types;var r={PLACEHOLDER:t.identifier("placeholder"),UNDEFINED:t.identifier("undefined")};var c=new d.default;function getCallee(e){var r=e.parentPath;while(!r.isStatement()){if(r.isCallExpression()){var a=r.node.callee;while(t.isCallExpression(a)){a=a.callee}return a}r=r.parentPath}}var h={Program(e,a){var d=(0,o.default)(f.default,(0,u.default)(a.opts)),h=d.ids;var m=e.hub.file;l.default.cache.clear();c.clear();(0,s.default)(h,(function(e){c.set(e);f.default.modules.get(e).forEach((function(t,r){c.set(e+"/"+r)}))}));var _=[];var v=false;for(var b=m.ast.program.body,y=Array.isArray(b),g=0,b=y?b:b[Symbol.iterator]();;){var D;if(y){if(g>=b.length)break;D=b[g++]}else{g=b.next();if(g.done)break;D=g.value}var q=D;if((0,n.isImportDeclaration)(q)||(0,n.isExportDeclaration)(q)){v=true;break}}if(v){m.path.traverse({ImportDeclaration:{exit(e){var t=e.node;var r=[];var a=[];_.push({source:t.source.value,imported:r,specifiers:a});for(var i=e.get("specifiers"),s=Array.isArray(i),o=0,i=s?i:i[Symbol.iterator]();;){var n;if(s){if(o>=i.length)break;n=i[o++]}else{o=i.next();if(o.done)break;n=o.value}var u=n;var l=u.node.local.name;if(u.isImportDefaultSpecifier()){r.push("default");a.push({kind:"named",imported:"default",local:l})}if(u.isImportSpecifier()){var f=u.node.imported.name;r.push(f);a.push({kind:"named",imported:f,local:l})}if(u.isImportNamespaceSpecifier()){r.push("*");a.push({kind:"namespace",local:l})}}}}})}(0,s.default)(_,(function(e){var a=c.get(e.source);if(!a){return}var o=a.isLodash();var n=(0,i.default)(e.specifiers,(function(e){return e.imported==="default"}));(0,s.default)(n,(function(e){var i=e.imported,n=e.local;var u=m.scope.getBinding(n);var f=u.path.parent.importKind,d=f===void 0?"value":f;if(d!="value"){return}var c=o&&i==="chain";(0,s.default)(u.referencePaths,(function(e){var s=e.node,u=e.parentPath;var f=s.type;if(i&&i!=="default"){if(c&&e.parentPath.isCallExpression()){throw e.buildCodeFrameError(p)}var d=(0,l.default)(a,i,e),h=d.name;e.replaceWith({type:f,name:h})}else if(u.isMemberExpression()){var m=e.parent.property.name;if(o&&m==="chain"&&u.parentPath.isCallExpression()){throw e.buildCodeFrameError(p)}var _=(0,l.default)(a,m,e),v=_.name;u.replaceWith({type:f,name:v})}else if(o){var b=getCallee(e);if(b&&b.name===n){throw e.buildCodeFrameError(p)}e.replaceWith(b?t.memberExpression(b,r.PLACEHOLDER):r.UNDEFINED)}}))}))}))},ImportDeclaration(e){if(c.get(e.node.source.value)){e.remove()}},ExportNamedDeclaration(e){var t=e.node;var r=(0,a.default)(t,"source.value");var i=c.get(r);if(!i){return}t.source=null;(0,s.default)(t.specifiers,(function(t){t.local=(0,l.default)(i,t.local.name,e)}))}};return{visitor:h}}e.exports=t["default"]},698:(e,t,r)=>{"use strict";t.__esModule=true;t["default"]=void 0;var a=_interopRequireDefault(r(176));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var i=(0,a.default)();t["default"]=i;e.exports=t["default"]},906:(e,t,r)=>{"use strict";t.__esModule=true;t.normalizePath=normalizePath;var a=_interopRequireDefault(r(865));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function normalizePath(e){return(0,a.default)(e).replace(/\\/g,"/")}},72:e=>{var t=/^(?:(@[^/]+)[/]+)([^/]+)[/]?/;var r=/^([^/]+)[/]?/;e.exports=extract.bind(null,false);e.exports.base=extract.bind(null,true);function extract(e,a){if(/^@/.test(a)){var i=t.exec(a);if(!i||!i[1]||!i[2])return null;if(e)return i[2]||null;return[i[1],i[2]].join("/")}else{var i=r.exec(a);if(!i)return null;return i[1]||null}}},638:e=>{"use strict";e.exports=require("@babel/types")},205:e=>{"use strict";e.exports=require("glob")},491:e=>{"use strict";e.exports=require("assert")},147:e=>{"use strict";e.exports=require("fs")},848:e=>{"use strict";e.exports=require("lodash/assign")},779:e=>{"use strict";e.exports=require("lodash/castArray")},73:e=>{"use strict";e.exports=require("lodash/constant")},823:e=>{"use strict";e.exports=require("lodash/each")},80:e=>{"use strict";e.exports=require("lodash/get")},30:e=>{"use strict";e.exports=require("lodash/map")},319:e=>{"use strict";e.exports=require("lodash/memoize")},765:e=>{"use strict";e.exports=require("lodash/orderBy")},163:e=>{"use strict";e.exports=require("lodash/sortBy")},320:e=>{"use strict";e.exports=require("lodash/startsWith")},865:e=>{"use strict";e.exports=require("lodash/toString")},188:e=>{"use strict";e.exports=require("module")},17:e=>{"use strict";e.exports=require("path")},79:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var a=r(491);var i=r(638);const{callExpression:s,cloneNode:o,expressionStatement:n,identifier:u,importDeclaration:l,importDefaultSpecifier:f,importNamespaceSpecifier:d,importSpecifier:p,memberExpression:c,stringLiteral:h,variableDeclaration:m,variableDeclarator:_}=i;class ImportBuilder{constructor(e,t,r){this._statements=[];this._resultName=null;this._importedSource=void 0;this._scope=t;this._hub=r;this._importedSource=e}done(){return{statements:this._statements,resultName:this._resultName}}import(){this._statements.push(l([],h(this._importedSource)));return this}require(){this._statements.push(n(s(u("require"),[h(this._importedSource)])));return this}namespace(e="namespace"){const t=this._scope.generateUidIdentifier(e);const r=this._statements[this._statements.length-1];a(r.type==="ImportDeclaration");a(r.specifiers.length===0);r.specifiers=[d(t)];this._resultName=o(t);return this}default(e){const t=this._scope.generateUidIdentifier(e);const r=this._statements[this._statements.length-1];a(r.type==="ImportDeclaration");a(r.specifiers.length===0);r.specifiers=[f(t)];this._resultName=o(t);return this}named(e,t){if(t==="default")return this.default(e);const r=this._scope.generateUidIdentifier(e);const i=this._statements[this._statements.length-1];a(i.type==="ImportDeclaration");a(i.specifiers.length===0);i.specifiers=[p(r,u(t))];this._resultName=o(r);return this}var(e){const t=this._scope.generateUidIdentifier(e);let r=this._statements[this._statements.length-1];if(r.type!=="ExpressionStatement"){a(this._resultName);r=n(this._resultName);this._statements.push(r)}this._statements[this._statements.length-1]=m("var",[_(t,r.expression)]);this._resultName=o(t);return this}defaultInterop(){return this._interop(this._hub.addHelper("interopRequireDefault"))}wildcardInterop(){return this._interop(this._hub.addHelper("interopRequireWildcard"))}_interop(e){const t=this._statements[this._statements.length-1];if(t.type==="ExpressionStatement"){t.expression=s(e,[t.expression])}else if(t.type==="VariableDeclaration"){a(t.declarations.length===1);t.declarations[0].init=s(e,[t.declarations[0].init])}else{a.fail("Unexpected type.")}return this}prop(e){const t=this._statements[this._statements.length-1];if(t.type==="ExpressionStatement"){t.expression=c(t.expression,u(e))}else if(t.type==="VariableDeclaration"){a(t.declarations.length===1);t.declarations[0].init=c(t.declarations[0].init,u(e))}else{a.fail("Unexpected type:"+t.type)}return this}read(e){this._resultName=c(this._resultName,u(e))}}t["default"]=ImportBuilder},378:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var a=r(491);var i=r(638);var s=r(79);var o=r(898);const{numericLiteral:n,sequenceExpression:u}=i;class ImportInjector{constructor(e,t,r){this._defaultOpts={importedSource:null,importedType:"commonjs",importedInterop:"babel",importingInterop:"babel",ensureLiveReference:false,ensureNoContext:false,importPosition:"before"};const a=e.find((e=>e.isProgram()));this._programPath=a;this._programScope=a.scope;this._hub=a.hub;this._defaultOpts=this._applyDefaults(t,r,true)}addDefault(e,t){return this.addNamed("default",e,t)}addNamed(e,t,r){a(typeof e==="string");return this._generateImport(this._applyDefaults(t,r),e)}addNamespace(e,t){return this._generateImport(this._applyDefaults(e,t),null)}addSideEffect(e,t){return this._generateImport(this._applyDefaults(e,t),void 0)}_applyDefaults(e,t,r=false){let i;if(typeof e==="string"){i=Object.assign({},this._defaultOpts,{importedSource:e},t)}else{a(!t,"Unexpected secondary arguments.");i=Object.assign({},this._defaultOpts,e)}if(!r&&t){if(t.nameHint!==undefined)i.nameHint=t.nameHint;if(t.blockHoist!==undefined)i.blockHoist=t.blockHoist}return i}_generateImport(e,t){const r=t==="default";const a=!!t&&!r;const i=t===null;const{importedSource:l,importedType:f,importedInterop:d,importingInterop:p,ensureLiveReference:c,ensureNoContext:h,nameHint:m,importPosition:_,blockHoist:v}=e;let b=m||t;const y=(0,o.default)(this._programPath);const g=y&&p==="node";const D=y&&p==="babel";if(_==="after"&&!y){throw new Error(`"importPosition": "after" is only supported in modules`)}const q=new s.default(l,this._programScope,this._hub);if(f==="es6"){if(!g&&!D){throw new Error("Cannot import an ES6 module from CommonJS")}q.import();if(i){q.namespace(m||l)}else if(r||a){q.named(b,t)}}else if(f!=="commonjs"){throw new Error(`Unexpected interopType "${f}"`)}else if(d==="babel"){if(g){b=b!=="default"?b:l;const e=`${l}$es6Default`;q.import();if(i){q.default(e).var(b||l).wildcardInterop()}else if(r){if(c){q.default(e).var(b||l).defaultInterop().read("default")}else{q.default(e).var(b).defaultInterop().prop(t)}}else if(a){q.default(e).read(t)}}else if(D){q.import();if(i){q.namespace(b||l)}else if(r||a){q.named(b,t)}}else{q.require();if(i){q.var(b||l).wildcardInterop()}else if((r||a)&&c){if(r){b=b!=="default"?b:l;q.var(b).read(t);q.defaultInterop()}else{q.var(l).read(t)}}else if(r){q.var(b).defaultInterop().prop(t)}else if(a){q.var(b).prop(t)}}}else if(d==="compiled"){if(g){q.import();if(i){q.default(b||l)}else if(r||a){q.default(l).read(b)}}else if(D){q.import();if(i){q.namespace(b||l)}else if(r||a){q.named(b,t)}}else{q.require();if(i){q.var(b||l)}else if(r||a){if(c){q.var(l).read(b)}else{q.prop(t).var(b)}}}}else if(d==="uncompiled"){if(r&&c){throw new Error("No live reference for commonjs default")}if(g){q.import();if(i){q.default(b||l)}else if(r){q.default(b)}else if(a){q.default(l).read(b)}}else if(D){q.import();if(i){q.default(b||l)}else if(r){q.default(b)}else if(a){q.named(b,t)}}else{q.require();if(i){q.var(b||l)}else if(r){q.var(b)}else if(a){if(c){q.var(l).read(b)}else{q.var(b).prop(t)}}}}else{throw new Error(`Unknown importedInterop "${d}".`)}const{statements:x,resultName:w}=q.done();this._insertStatements(x,_,v);if((r||a)&&h&&w.type!=="Identifier"){return u([n(0),w])}return w}_insertStatements(e,t="before",r=3){const a=this._programPath.get("body");if(t==="after"){for(let t=a.length-1;t>=0;t--){if(a[t].isImportDeclaration()){a[t].insertAfter(e);return}}}else{e.forEach((e=>{e._blockHoist=r}));const t=a.find((e=>{const t=e.node._blockHoist;return Number.isFinite(t)&&t<4}));if(t){t.insertBefore(e);return}}this._programPath.unshiftContainer("body",e)}}t["default"]=ImportInjector},408:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});Object.defineProperty(t,"ImportInjector",{enumerable:true,get:function(){return a.default}});t.addDefault=addDefault;t.addNamed=addNamed;t.addNamespace=addNamespace;t.addSideEffect=addSideEffect;Object.defineProperty(t,"isModule",{enumerable:true,get:function(){return i.default}});var a=r(378);var i=r(898);function addDefault(e,t,r){return new a.default(e).addDefault(t,r)}function addNamed(e,t,r,i){return new a.default(e).addNamed(t,r,i)}function addNamespace(e,t,r){return new a.default(e).addNamespace(t,r)}function addSideEffect(e,t,r){return new a.default(e).addSideEffect(t,r)}},898:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=isModule;function isModule(e){return e.node.sourceType==="module"}}};var t={};function __nccwpck_require__(r){var a=t[r];if(a!==undefined){return a.exports}var i=t[r]={exports:{}};var s=true;try{e[r](i,i.exports,__nccwpck_require__);s=false}finally{if(s)delete t[r]}return i.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r=__nccwpck_require__(380);module.exports=r})();