@umijs/bundler-webpack 4.0.0-beta.8 → 4.0.0-canary-20240513.3
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/client/client/client.js +255 -167
- package/client/constants.d.ts +15 -0
- package/client/constants.js +30 -12
- package/client/utils/formatWebpackMessages.d.ts +12 -0
- package/client/utils/formatWebpackMessages.js +87 -86
- package/compiled/autoprefixer/browserslist/index.d.ts +33 -7
- package/compiled/autoprefixer/index.js +3 -3
- package/compiled/autoprefixer/package.json +1 -1
- package/compiled/autoprefixer/postcss/lib/at-rule.d.ts +1 -1
- package/compiled/autoprefixer/postcss/lib/comment.d.ts +1 -1
- package/compiled/autoprefixer/postcss/lib/container.d.ts +2 -2
- package/compiled/autoprefixer/postcss/lib/css-syntax-error.d.ts +55 -8
- package/compiled/autoprefixer/postcss/lib/declaration.d.ts +2 -2
- package/compiled/autoprefixer/postcss/lib/input.d.ts +26 -6
- package/compiled/autoprefixer/postcss/lib/lazy-result.d.ts +11 -10
- package/compiled/autoprefixer/postcss/lib/no-work-result.d.ts +37 -0
- package/compiled/autoprefixer/postcss/lib/node.d.ts +38 -4
- package/compiled/autoprefixer/postcss/lib/postcss.d.ts +31 -30
- package/compiled/autoprefixer/postcss/lib/processor.d.ts +6 -5
- package/compiled/autoprefixer/postcss/lib/result.d.ts +3 -2
- package/compiled/autoprefixer/postcss/lib/rule.d.ts +1 -1
- package/compiled/autoprefixer/postcss/lib/warning.d.ts +37 -3
- package/compiled/autoprefixer/source-map-js/source-map.d.ts +99 -82
- package/compiled/babel-loader/index.js +8 -2
- package/compiled/babel-loader/package.json +1 -1
- package/compiled/copy-webpack-plugin/939.index.js +1171 -0
- package/compiled/copy-webpack-plugin/index.js +16 -10
- package/compiled/copy-webpack-plugin/package.json +1 -1
- package/compiled/css-minimizer-webpack-plugin/index.js +8 -2
- package/compiled/css-minimizer-webpack-plugin/minify.js +23 -22
- package/compiled/css-minimizer-webpack-plugin/package.json +1 -1
- package/compiled/css-minimizer-webpack-plugin/utils.js +305 -54
- package/compiled/cssnano/index.js +12 -11
- package/compiled/cssnano/package.json +1 -1
- package/compiled/express.d.ts +2 -0
- package/compiled/file-loader/index.js +3 -0
- package/compiled/file-loader/package.json +1 -0
- package/compiled/less-loader/index.js +1 -1
- package/compiled/less-loader/package.json +1 -1
- package/compiled/mini-css-extract-plugin/hmr/hotModuleReplacement.js +60 -46
- package/compiled/mini-css-extract-plugin/hmr/normalize-url.js +10 -6
- package/compiled/mini-css-extract-plugin/index.js +10669 -10348
- package/compiled/mini-css-extract-plugin/loader.js +159 -100
- package/compiled/mini-css-extract-plugin/package.json +1 -1
- package/compiled/mini-css-extract-plugin/utils.js +88 -44
- package/compiled/postcss-loader/index.js +1 -1
- package/compiled/postcss-loader/package.json +1 -1
- package/compiled/sass-loader/index.js +1 -1
- package/compiled/sass-loader/package.json +1 -1
- package/compiled/sass-loader/sass.default.dart.js +4 -0
- package/compiled/schema-utils/ajv/dist/ajv.d.ts +16 -0
- package/compiled/schema-utils/ajv/dist/compile/codegen/code.d.ts +39 -0
- package/compiled/schema-utils/ajv/dist/compile/codegen/index.d.ts +79 -0
- package/compiled/schema-utils/ajv/dist/compile/codegen/scope.d.ts +79 -0
- package/compiled/schema-utils/ajv/dist/compile/errors.d.ts +13 -0
- package/compiled/schema-utils/ajv/dist/compile/index.d.ts +80 -0
- package/compiled/schema-utils/ajv/dist/compile/ref_error.d.ts +5 -0
- package/compiled/schema-utils/ajv/dist/compile/resolve.d.ts +12 -0
- package/compiled/schema-utils/ajv/dist/compile/rules.d.ts +28 -0
- package/compiled/schema-utils/ajv/dist/compile/util.d.ts +40 -0
- package/compiled/schema-utils/ajv/dist/compile/validate/index.d.ts +42 -0
- package/compiled/schema-utils/ajv/dist/compile/validate/subschema.d.ts +47 -0
- package/compiled/schema-utils/ajv/dist/core.d.ts +171 -0
- package/compiled/schema-utils/ajv/dist/runtime/validation_error.d.ts +7 -0
- package/compiled/schema-utils/ajv/dist/types/index.d.ts +177 -0
- package/compiled/schema-utils/ajv/dist/types/json-schema.d.ts +124 -0
- package/compiled/schema-utils/ajv/dist/types/jtd-schema.d.ts +168 -0
- package/compiled/schema-utils/declarations/validate.d.ts +4 -4
- package/compiled/schema-utils/index.js +8 -2
- package/compiled/schema-utils/uri-js/dist/es5/uri.all.d.ts +59 -0
- package/compiled/style-loader/index.js +1 -1
- package/compiled/stylus-loader/LICENSE +20 -0
- package/compiled/stylus-loader/index.js +44 -0
- package/compiled/stylus-loader/package.json +1 -0
- package/compiled/terser/@jridgewell/gen-mapping/dist/types/gen-mapping.d.ts +90 -0
- package/compiled/terser/@jridgewell/gen-mapping/dist/types/sourcemap-segment.d.ts +12 -0
- package/compiled/terser/@jridgewell/gen-mapping/dist/types/types.d.ts +35 -0
- package/compiled/terser/@jridgewell/source-map/dist/types/source-map.d.ts +25 -0
- package/compiled/terser/@jridgewell/trace-mapping/dist/types/sourcemap-segment.d.ts +16 -0
- package/compiled/terser/@jridgewell/trace-mapping/dist/types/trace-mapping.d.ts +74 -0
- package/compiled/terser/@jridgewell/trace-mapping/dist/types/types.d.ts +92 -0
- package/compiled/terser/index.js +1 -1
- package/compiled/terser/package.json +1 -1
- package/compiled/terser/tools/terser.d.ts +6 -3
- package/compiled/terser-webpack-plugin/@jridgewell/trace-mapping/dist/types/sourcemap-segment.d.ts +16 -0
- package/compiled/terser-webpack-plugin/@jridgewell/trace-mapping/dist/types/trace-mapping.d.ts +74 -0
- package/compiled/terser-webpack-plugin/@jridgewell/trace-mapping/dist/types/types.d.ts +92 -0
- package/compiled/terser-webpack-plugin/index.js +1390 -3693
- package/compiled/terser-webpack-plugin/jest-worker/build/types.d.ts +1 -0
- package/compiled/terser-webpack-plugin/minify.js +10 -3
- package/compiled/terser-webpack-plugin/package.json +1 -1
- package/compiled/terser-webpack-plugin/types/index.d.ts +186 -152
- package/compiled/terser-webpack-plugin/types/minify.d.ts +17 -0
- package/compiled/terser-webpack-plugin/types/utils.d.ts +20 -24
- package/compiled/terser-webpack-plugin/utils.js +153 -34
- package/compiled/webpack/BasicEffectRulePlugin.js +1 -0
- package/compiled/webpack/BasicEvaluatedExpression.js +1 -0
- package/compiled/webpack/BasicMatcherRulePlugin.js +1 -0
- package/compiled/webpack/ExternalsPlugin.js +1 -0
- package/compiled/webpack/FetchCompileAsyncWasmPlugin.js +1 -0
- package/compiled/webpack/FetchCompileWasmPlugin.js +1 -0
- package/compiled/webpack/HotModuleReplacement.runtime.js +29 -14
- package/compiled/webpack/JavascriptHotModuleReplacement.runtime.js +4 -3
- package/compiled/webpack/LimitChunkCountPlugin.js +1 -0
- package/compiled/webpack/NodeTargetPlugin.js +1 -0
- package/compiled/webpack/NodeTemplatePlugin.js +1 -0
- package/compiled/webpack/ObjectMatcherRulePlugin.js +1 -0
- package/compiled/webpack/RuleSetCompiler.js +1 -0
- package/compiled/webpack/StringXor.js +1 -0
- package/compiled/webpack/UseEffectRulePlugin.js +1 -0
- package/compiled/webpack/WebWorkerTemplatePlugin.js +1 -0
- package/compiled/webpack/deepImports.json +15 -1
- package/compiled/webpack/index.js +26404 -10329
- package/compiled/webpack/json-schema/index.d.ts +8 -1
- package/compiled/webpack/lazy-compilation-node.js +10 -0
- package/compiled/webpack/lazy-compilation-web.js +9 -0
- package/compiled/webpack/types.d.ts +823 -287
- package/compiled/webpack-5-chain/index.js +1 -1
- package/compiled/webpack-5-chain/package.json +1 -1
- package/compiled/webpack-5-chain/types/index.d.ts +76 -20
- package/compiled/webpack-bundle-analyzer/index.js +7 -6
- package/compiled/webpack-bundle-analyzer/package.json +1 -1
- package/compiled/webpack-bundle-analyzer/public/viewer.js +2 -2
- package/compiled/webpack-bundle-analyzer/public/viewer.js.map +1 -1
- package/compiled/webpack-dev-middleware/index.js +12 -5
- package/compiled/webpack-dev-middleware/package.json +1 -1
- package/compiled/{tapable → webpack-manifest-plugin}/LICENSE +2 -2
- package/compiled/webpack-manifest-plugin/index.js +1 -0
- package/compiled/webpack-manifest-plugin/package.json +1 -0
- package/compiled/webpack-sources/index.js +1 -1
- package/compiled/{express → webpackbar}/LICENSE +1 -5
- package/compiled/webpackbar/dist/index.d.ts +121 -0
- package/compiled/webpackbar/index.js +7 -0
- package/compiled/webpackbar/package.json +1 -0
- package/compiled/ws/LICENSE +13 -12
- package/compiled/ws/index.d.ts +74 -35
- package/compiled/ws/index.js +1 -1
- package/compiled/ws/package.json +1 -1
- package/dist/build.d.ts +8 -3
- package/dist/build.js +147 -68
- package/dist/cli.d.ts +0 -1
- package/dist/cli.js +84 -81
- package/dist/config/_sampleFeature.js +33 -20
- package/dist/config/assetRules.js +46 -55
- package/dist/config/bundleAnalyzerPlugin.js +41 -28
- package/dist/config/compressPlugin.js +125 -74
- package/dist/config/config.d.ts +11 -2
- package/dist/config/config.js +235 -172
- package/dist/config/copyPlugin.js +61 -47
- package/dist/config/cssRules.js +162 -95
- package/dist/config/definePlugin.d.ts +2 -0
- package/dist/config/definePlugin.js +59 -39
- package/dist/config/detectCssModulesInDependence.d.ts +10 -0
- package/dist/config/detectCssModulesInDependence.js +151 -0
- package/dist/config/detectDeadCode.d.ts +12 -0
- package/dist/config/detectDeadCode.js +191 -0
- package/dist/config/detectDeadCodePlugin.d.ts +9 -0
- package/dist/config/detectDeadCodePlugin.js +82 -0
- package/dist/config/fastRefreshPlugin.js +46 -31
- package/dist/config/forkTSCheckerPlugin.d.ts +11 -0
- package/dist/config/forkTSCheckerPlugin.js +49 -0
- package/dist/config/harmonyLinkingErrorPlugin.d.ts +6 -0
- package/dist/config/harmonyLinkingErrorPlugin.js +53 -0
- package/dist/config/ignorePlugin.js +38 -25
- package/dist/config/javaScriptRules.d.ts +2 -0
- package/dist/config/javaScriptRules.js +186 -150
- package/dist/config/manifestPlugin.d.ts +11 -0
- package/dist/config/manifestPlugin.js +40 -0
- package/dist/config/miniCSSExtractPlugin.d.ts +1 -0
- package/dist/config/miniCSSExtractPlugin.js +52 -31
- package/dist/config/nodePolyfill.js +49 -32
- package/dist/config/nodePrefixPlugin.d.ts +11 -0
- package/dist/config/nodePrefixPlugin.js +38 -0
- package/dist/config/progressPlugin.js +50 -24
- package/dist/config/purgecssWebpackPlugin.js +41 -30
- package/dist/config/speedMeasureWebpackPlugin.js +56 -31
- package/dist/config/ssrPlugin.d.ts +11 -0
- package/dist/config/ssrPlugin.js +98 -0
- package/dist/config/svgRules.d.ts +1 -0
- package/dist/config/svgRules.js +68 -54
- package/dist/constants.d.ts +4 -0
- package/dist/constants.js +59 -15
- package/dist/dev.d.ts +23 -3
- package/dist/dev.js +198 -81
- package/dist/index.d.ts +6 -2
- package/dist/index.js +31 -15
- package/dist/loader/svgr.d.ts +4 -0
- package/dist/loader/svgr.js +84 -0
- package/dist/loader/swc.d.ts +4 -0
- package/dist/loader/swc.js +149 -0
- package/dist/parcelCSS.d.ts +2 -0
- package/dist/parcelCSS.js +39 -0
- package/dist/plugins/EsbuildMinifyFix.d.ts +8 -0
- package/dist/plugins/EsbuildMinifyFix.js +136 -0
- package/dist/plugins/ProgressPlugin.js +68 -43
- package/dist/plugins/RuntimePublicPathPlugin.d.ts +4 -0
- package/dist/plugins/RuntimePublicPathPlugin.js +45 -0
- package/dist/plugins/_SamplePlugin.d.ts +1 -1
- package/dist/plugins/_SamplePlugin.js +37 -14
- package/dist/requireHook.js +44 -27
- package/dist/schema.d.ts +4 -3
- package/dist/schema.js +175 -69
- package/dist/server/server.d.ts +4 -3
- package/dist/server/server.js +219 -154
- package/dist/server/ws.d.ts +8 -3
- package/dist/server/ws.js +72 -38
- package/dist/swcPlugins/autoCSSModules.d.ts +11 -2
- package/dist/swcPlugins/autoCSSModules.js +60 -32
- package/dist/swcPlugins/changeImportFromString.d.ts +2 -0
- package/dist/swcPlugins/changeImportFromString.js +32 -0
- package/dist/swcPlugins/lockCoreJS.d.ts +6 -0
- package/dist/swcPlugins/lockCoreJS.js +56 -0
- package/dist/types.d.ts +53 -9
- package/dist/types.js +61 -29
- package/dist/utils/browsersList.js +31 -8
- package/dist/utils/depMatch.js +65 -39
- package/dist/utils/formatWebpackMessages.js +119 -91
- package/dist/utils/getEsBuildTarget.d.ts +7 -0
- package/dist/utils/getEsBuildTarget.js +46 -0
- package/dist/utils/pkgUpContainsName.d.ts +1 -0
- package/dist/utils/pkgUpContainsName.js +50 -0
- package/package.json +89 -81
- package/compiled/@svgr/webpack/.svgo.yml +0 -75
- package/compiled/@svgr/webpack/LICENSE +0 -7
- package/compiled/@svgr/webpack/index.js +0 -343
- package/compiled/@svgr/webpack/package.json +0 -1
- package/compiled/css-loader/api.js +0 -102
- package/compiled/css-loader/getUrl.js +0 -29
- package/compiled/css-loader/index.js +0 -2
- package/compiled/css-loader/noSourceMaps.js +0 -5
- package/compiled/css-loader/package.json +0 -1
- package/compiled/css-loader/sourceMaps.js +0 -22
- package/compiled/express/body-parser/index.d.ts +0 -104
- package/compiled/express/connect/index.d.ts +0 -93
- package/compiled/express/express-serve-static-core/index.d.ts +0 -1252
- package/compiled/express/index.d.ts +0 -133
- package/compiled/express/index.js +0 -338
- package/compiled/express/mime/index.d.ts +0 -35
- package/compiled/express/package.json +0 -1
- package/compiled/express/qs/index.d.ts +0 -62
- package/compiled/express/range-parser/index.d.ts +0 -35
- package/compiled/express/serve-static/index.d.ts +0 -108
- package/compiled/http-proxy-middleware/LICENSE +0 -22
- package/compiled/http-proxy-middleware/dist/index.d.ts +0 -4
- package/compiled/http-proxy-middleware/dist/types.d.ts +0 -54
- package/compiled/http-proxy-middleware/http-proxy/index.d.ts +0 -226
- package/compiled/http-proxy-middleware/index.js +0 -66
- package/compiled/http-proxy-middleware/package.json +0 -1
- package/compiled/less/index.js +0 -31
- package/compiled/less/package.json +0 -1
- package/compiled/react-refresh/index.js +0 -19
- package/compiled/swc-loader/LICENSE +0 -25
- package/compiled/swc-loader/index.js +0 -1
- package/compiled/swc-loader/package.json +0 -1
- package/compiled/tapable/index.js +0 -1
- package/compiled/tapable/package.json +0 -1
- package/compiled/tapable/tapable.d.ts +0 -116
- package/dist/build.d.ts.map +0 -1
- package/dist/cli.d.ts.map +0 -1
- package/dist/client/client.d.ts.map +0 -1
- package/dist/client/client.js +0 -239
- package/dist/config/_sampleFeature.d.ts.map +0 -1
- package/dist/config/assetRules.d.ts.map +0 -1
- package/dist/config/bundleAnalyzerPlugin.d.ts.map +0 -1
- package/dist/config/compressPlugin.d.ts.map +0 -1
- package/dist/config/config.d.ts.map +0 -1
- package/dist/config/copyPlugin.d.ts.map +0 -1
- package/dist/config/cssRules.d.ts.map +0 -1
- package/dist/config/definePlugin.d.ts.map +0 -1
- package/dist/config/fastRefreshPlugin.d.ts.map +0 -1
- package/dist/config/ignorePlugin.d.ts.map +0 -1
- package/dist/config/javaScriptRules.d.ts.map +0 -1
- package/dist/config/miniCSSExtractPlugin.d.ts.map +0 -1
- package/dist/config/nodePolyfill.d.ts.map +0 -1
- package/dist/config/progressPlugin.d.ts.map +0 -1
- package/dist/config/purgecssWebpackPlugin.d.ts.map +0 -1
- package/dist/config/speedMeasureWebpackPlugin.d.ts.map +0 -1
- package/dist/config/svgRules.d.ts.map +0 -1
- package/dist/constants.d.ts.map +0 -1
- package/dist/dev.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/plugins/ESBuildCSSMinifyPlugin.d.ts +0 -11
- package/dist/plugins/ESBuildCSSMinifyPlugin.d.ts.map +0 -1
- package/dist/plugins/ESBuildCSSMinifyPlugin.js +0 -65
- package/dist/plugins/ProgressPlugin.d.ts.map +0 -1
- package/dist/plugins/_SamplePlugin.d.ts.map +0 -1
- package/dist/requireHook.d.ts.map +0 -1
- package/dist/schema.d.ts.map +0 -1
- package/dist/server/server.d.ts.map +0 -1
- package/dist/server/ws.d.ts.map +0 -1
- package/dist/swcPlugins/autoCSSModules.d.ts.map +0 -1
- package/dist/types.d.ts.map +0 -1
- package/dist/utils/browsersList.d.ts.map +0 -1
- package/dist/utils/depMatch.d.ts.map +0 -1
- package/dist/utils/formatWebpackMessages.d.ts.map +0 -1
- /package/{dist → client}/client/client.d.ts +0 -0
- /package/compiled/{css-loader → file-loader}/LICENSE +0 -0
|
@@ -1,98 +1,115 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
declare module 'source-map-js' {
|
|
2
|
+
export interface StartOfSourceMap {
|
|
3
|
+
file?: string;
|
|
4
|
+
sourceRoot?: string;
|
|
5
|
+
}
|
|
5
6
|
|
|
6
|
-
export interface RawSourceMap extends StartOfSourceMap {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
7
|
+
export interface RawSourceMap extends StartOfSourceMap {
|
|
8
|
+
version: string;
|
|
9
|
+
sources: string[];
|
|
10
|
+
names: string[];
|
|
11
|
+
sourcesContent?: string[];
|
|
12
|
+
mappings: string;
|
|
13
|
+
}
|
|
13
14
|
|
|
14
|
-
export interface Position {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
15
|
+
export interface Position {
|
|
16
|
+
line: number;
|
|
17
|
+
column: number;
|
|
18
|
+
}
|
|
18
19
|
|
|
19
|
-
export interface LineRange extends Position {
|
|
20
|
-
|
|
21
|
-
}
|
|
20
|
+
export interface LineRange extends Position {
|
|
21
|
+
lastColumn: number;
|
|
22
|
+
}
|
|
22
23
|
|
|
23
|
-
export interface FindPosition extends Position {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
24
|
+
export interface FindPosition extends Position {
|
|
25
|
+
// SourceMapConsumer.GREATEST_LOWER_BOUND or SourceMapConsumer.LEAST_UPPER_BOUND
|
|
26
|
+
bias?: number;
|
|
27
|
+
}
|
|
27
28
|
|
|
28
|
-
export interface SourceFindPosition extends FindPosition {
|
|
29
|
-
|
|
30
|
-
}
|
|
29
|
+
export interface SourceFindPosition extends FindPosition {
|
|
30
|
+
source: string;
|
|
31
|
+
}
|
|
31
32
|
|
|
32
|
-
export interface MappedPosition extends Position {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
33
|
+
export interface MappedPosition extends Position {
|
|
34
|
+
source: string;
|
|
35
|
+
name?: string;
|
|
36
|
+
}
|
|
36
37
|
|
|
37
|
-
export interface MappingItem {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
38
|
+
export interface MappingItem {
|
|
39
|
+
source: string;
|
|
40
|
+
generatedLine: number;
|
|
41
|
+
generatedColumn: number;
|
|
42
|
+
originalLine: number;
|
|
43
|
+
originalColumn: number;
|
|
44
|
+
name: string;
|
|
45
|
+
}
|
|
45
46
|
|
|
46
|
-
export class SourceMapConsumer {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
47
|
+
export class SourceMapConsumer {
|
|
48
|
+
static GENERATED_ORDER: number;
|
|
49
|
+
static ORIGINAL_ORDER: number;
|
|
50
|
+
|
|
51
|
+
static GREATEST_LOWER_BOUND: number;
|
|
52
|
+
static LEAST_UPPER_BOUND: number;
|
|
53
|
+
|
|
54
|
+
constructor(rawSourceMap: RawSourceMap);
|
|
55
|
+
computeColumnSpans(): void;
|
|
56
|
+
originalPositionFor(generatedPosition: FindPosition): MappedPosition;
|
|
57
|
+
generatedPositionFor(originalPosition: SourceFindPosition): LineRange;
|
|
58
|
+
allGeneratedPositionsFor(originalPosition: MappedPosition): Position[];
|
|
59
|
+
hasContentsOfAllSources(): boolean;
|
|
60
|
+
sourceContentFor(source: string, returnNullOnMissing?: boolean): string;
|
|
61
|
+
eachMapping(callback: (mapping: MappingItem) => void, context?: any, order?: number): void;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export interface Mapping {
|
|
65
|
+
generated: Position;
|
|
66
|
+
original: Position;
|
|
67
|
+
source: string;
|
|
68
|
+
name?: string;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export class SourceMapGenerator {
|
|
72
|
+
constructor(startOfSourceMap?: StartOfSourceMap);
|
|
73
|
+
static fromSourceMap(sourceMapConsumer: SourceMapConsumer): SourceMapGenerator;
|
|
74
|
+
addMapping(mapping: Mapping): void;
|
|
75
|
+
setSourceContent(sourceFile: string, sourceContent: string): void;
|
|
76
|
+
applySourceMap(sourceMapConsumer: SourceMapConsumer, sourceFile?: string, sourceMapPath?: string): void;
|
|
77
|
+
toString(): string;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export interface CodeWithSourceMap {
|
|
81
|
+
code: string;
|
|
82
|
+
map: SourceMapGenerator;
|
|
83
|
+
}
|
|
62
84
|
|
|
63
|
-
export
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
85
|
+
export class SourceNode {
|
|
86
|
+
constructor();
|
|
87
|
+
constructor(line: number, column: number, source: string);
|
|
88
|
+
constructor(line: number, column: number, source: string, chunk?: string, name?: string);
|
|
89
|
+
static fromStringWithSourceMap(code: string, sourceMapConsumer: SourceMapConsumer, relativePath?: string): SourceNode;
|
|
90
|
+
add(chunk: string): void;
|
|
91
|
+
prepend(chunk: string): void;
|
|
92
|
+
setSourceContent(sourceFile: string, sourceContent: string): void;
|
|
93
|
+
walk(fn: (chunk: string, mapping: MappedPosition) => void): void;
|
|
94
|
+
walkSourceContents(fn: (file: string, content: string) => void): void;
|
|
95
|
+
join(sep: string): SourceNode;
|
|
96
|
+
replaceRight(pattern: string, replacement: string): SourceNode;
|
|
97
|
+
toString(): string;
|
|
98
|
+
toStringWithSourceMap(startOfSourceMap?: StartOfSourceMap): CodeWithSourceMap;
|
|
99
|
+
}
|
|
68
100
|
}
|
|
69
101
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
addMapping(mapping: Mapping): void;
|
|
74
|
-
setSourceContent(sourceFile: string, sourceContent: string): void;
|
|
75
|
-
applySourceMap(sourceMapConsumer: SourceMapConsumer, sourceFile?: string, sourceMapPath?: string): void;
|
|
76
|
-
toString(): string;
|
|
102
|
+
declare module 'source-map-js/lib/source-map-generator' {
|
|
103
|
+
import { SourceMapGenerator } from '../source-map-js'
|
|
104
|
+
export { SourceMapGenerator }
|
|
77
105
|
}
|
|
78
106
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
107
|
+
declare module 'source-map-js/lib/source-map-consumer' {
|
|
108
|
+
import { SourceMapConsumer } from '../source-map-js'
|
|
109
|
+
export { SourceMapConsumer }
|
|
82
110
|
}
|
|
83
111
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
constructor(line: number, column: number, source: string, chunk?: string, name?: string);
|
|
88
|
-
static fromStringWithSourceMap(code: string, sourceMapConsumer: SourceMapConsumer, relativePath?: string): SourceNode;
|
|
89
|
-
add(chunk: string): void;
|
|
90
|
-
prepend(chunk: string): void;
|
|
91
|
-
setSourceContent(sourceFile: string, sourceContent: string): void;
|
|
92
|
-
walk(fn: (chunk: string, mapping: MappedPosition) => void): void;
|
|
93
|
-
walkSourceContents(fn: (file: string, content: string) => void): void;
|
|
94
|
-
join(sep: string): SourceNode;
|
|
95
|
-
replaceRight(pattern: string, replacement: string): SourceNode;
|
|
96
|
-
toString(): string;
|
|
97
|
-
toStringWithSourceMap(startOfSourceMap?: StartOfSourceMap): CodeWithSourceMap;
|
|
112
|
+
declare module 'source-map-js/lib/source-node' {
|
|
113
|
+
import { SourceNode } from '../source-map-js'
|
|
114
|
+
export { SourceNode }
|
|
98
115
|
}
|