@rspack-debug/core 2.0.0-beta.1 → 2.0.0-beta.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/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/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/Compilation.d.ts +1 -1
- package/dist/Compiler.d.ts +1 -1
- package/dist/ContextModuleFactory.d.ts +1 -1
- package/dist/MultiCompiler.d.ts +1 -1
- package/dist/MultiWatching.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-plugin/JavascriptModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ProgressPlugin.d.ts +5 -4
- package/dist/builtin-plugin/RsdoctorPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RuntimePlugin.d.ts +1 -1
- package/dist/builtin-plugin/html-plugin/hooks.d.ts +1 -1
- package/dist/config/types.d.ts +6 -0
- package/dist/exports.d.ts +1 -1
- package/dist/index.js +28 -67
- package/dist/lib/Cache.d.ts +1 -1
- package/dist/lib/HookWebpackError.d.ts +1 -1
- package/dist/rspack.d.ts +1 -1
- package/dist/stats/StatsFactory.d.ts +1 -1
- package/dist/stats/StatsPrinter.d.ts +1 -1
- package/dist/taps/types.d.ts +1 -1
- package/package.json +9 -12
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/******/ "use strict";
|
|
3
3
|
/******/ var __webpack_modules__ = ({
|
|
4
4
|
|
|
5
|
-
/***/
|
|
5
|
+
/***/ 61:
|
|
6
6
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
7
7
|
|
|
8
8
|
/*
|
|
@@ -12,13 +12,13 @@
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
const Source = __nccwpck_require__(
|
|
16
|
-
const streamAndGetSourceAndMap = __nccwpck_require__(
|
|
17
|
-
const streamChunksOfRawSource = __nccwpck_require__(
|
|
18
|
-
const streamChunksOfSourceMap = __nccwpck_require__(
|
|
15
|
+
const Source = __nccwpck_require__(331);
|
|
16
|
+
const streamAndGetSourceAndMap = __nccwpck_require__(439);
|
|
17
|
+
const streamChunksOfRawSource = __nccwpck_require__(300);
|
|
18
|
+
const streamChunksOfSourceMap = __nccwpck_require__(814);
|
|
19
19
|
const {
|
|
20
20
|
isDualStringBufferCachingEnabled,
|
|
21
|
-
} = __nccwpck_require__(
|
|
21
|
+
} = __nccwpck_require__(806);
|
|
22
22
|
|
|
23
23
|
/** @typedef {import("./Source").HashLike} HashLike */
|
|
24
24
|
/** @typedef {import("./Source").MapOptions} MapOptions */
|
|
@@ -101,20 +101,40 @@ class CachedSource extends Source {
|
|
|
101
101
|
*/
|
|
102
102
|
constructor(source, cachedData) {
|
|
103
103
|
super();
|
|
104
|
+
/**
|
|
105
|
+
* @private
|
|
106
|
+
* @type {Source | (() => Source)}
|
|
107
|
+
*/
|
|
104
108
|
this._source = source;
|
|
109
|
+
/**
|
|
110
|
+
* @private
|
|
111
|
+
* @type {boolean | undefined}
|
|
112
|
+
*/
|
|
105
113
|
this._cachedSourceType = cachedData ? cachedData.source : undefined;
|
|
106
114
|
/**
|
|
107
115
|
* @private
|
|
108
116
|
* @type {undefined | string}
|
|
109
117
|
*/
|
|
110
118
|
this._cachedSource = undefined;
|
|
119
|
+
/**
|
|
120
|
+
* @private
|
|
121
|
+
* @type {Buffer | undefined}
|
|
122
|
+
*/
|
|
111
123
|
this._cachedBuffer = cachedData ? cachedData.buffer : undefined;
|
|
124
|
+
/**
|
|
125
|
+
* @private
|
|
126
|
+
* @type {number | undefined}
|
|
127
|
+
*/
|
|
112
128
|
this._cachedSize = cachedData ? cachedData.size : undefined;
|
|
113
129
|
/**
|
|
114
130
|
* @private
|
|
115
131
|
* @type {BufferedMaps}
|
|
116
132
|
*/
|
|
117
133
|
this._cachedMaps = cachedData ? cachedData.maps : new Map();
|
|
134
|
+
/**
|
|
135
|
+
* @private
|
|
136
|
+
* @type {(string | Buffer)[] | undefined}
|
|
137
|
+
*/
|
|
118
138
|
this._cachedHashUpdate = cachedData ? cachedData.hash : undefined;
|
|
119
139
|
}
|
|
120
140
|
|
|
@@ -408,7 +428,7 @@ module.exports = CachedSource;
|
|
|
408
428
|
|
|
409
429
|
/***/ }),
|
|
410
430
|
|
|
411
|
-
/***/
|
|
431
|
+
/***/ 961:
|
|
412
432
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
413
433
|
|
|
414
434
|
/*
|
|
@@ -418,7 +438,7 @@ module.exports = CachedSource;
|
|
|
418
438
|
|
|
419
439
|
|
|
420
440
|
|
|
421
|
-
const Source = __nccwpck_require__(
|
|
441
|
+
const Source = __nccwpck_require__(331);
|
|
422
442
|
|
|
423
443
|
/** @typedef {import("./Source").HashLike} HashLike */
|
|
424
444
|
/** @typedef {import("./Source").MapOptions} MapOptions */
|
|
@@ -452,6 +472,10 @@ class CompatSource extends Source {
|
|
|
452
472
|
*/
|
|
453
473
|
constructor(sourceLike) {
|
|
454
474
|
super();
|
|
475
|
+
/**
|
|
476
|
+
* @private
|
|
477
|
+
* @type {SourceLike}
|
|
478
|
+
*/
|
|
455
479
|
this._sourceLike = sourceLike;
|
|
456
480
|
}
|
|
457
481
|
|
|
@@ -520,7 +544,7 @@ module.exports = CompatSource;
|
|
|
520
544
|
|
|
521
545
|
/***/ }),
|
|
522
546
|
|
|
523
|
-
/***/
|
|
547
|
+
/***/ 523:
|
|
524
548
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
525
549
|
|
|
526
550
|
/*
|
|
@@ -530,10 +554,10 @@ module.exports = CompatSource;
|
|
|
530
554
|
|
|
531
555
|
|
|
532
556
|
|
|
533
|
-
const RawSource = __nccwpck_require__(
|
|
534
|
-
const Source = __nccwpck_require__(
|
|
535
|
-
const { getMap, getSourceAndMap } = __nccwpck_require__(
|
|
536
|
-
const streamChunks = __nccwpck_require__(
|
|
557
|
+
const RawSource = __nccwpck_require__(855);
|
|
558
|
+
const Source = __nccwpck_require__(331);
|
|
559
|
+
const { getMap, getSourceAndMap } = __nccwpck_require__(568);
|
|
560
|
+
const streamChunks = __nccwpck_require__(786);
|
|
537
561
|
|
|
538
562
|
/** @typedef {import("./CompatSource").SourceLike} SourceLike */
|
|
539
563
|
/** @typedef {import("./Source").HashLike} HashLike */
|
|
@@ -573,6 +597,10 @@ class ConcatSource extends Source {
|
|
|
573
597
|
}
|
|
574
598
|
}
|
|
575
599
|
|
|
600
|
+
/**
|
|
601
|
+
* @private
|
|
602
|
+
* @type {boolean}
|
|
603
|
+
*/
|
|
576
604
|
this._isOptimized = args.length === 0;
|
|
577
605
|
}
|
|
578
606
|
|
|
@@ -921,7 +949,7 @@ module.exports = ConcatSource;
|
|
|
921
949
|
|
|
922
950
|
/***/ }),
|
|
923
951
|
|
|
924
|
-
/***/
|
|
952
|
+
/***/ 792:
|
|
925
953
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
926
954
|
|
|
927
955
|
/*
|
|
@@ -931,14 +959,14 @@ module.exports = ConcatSource;
|
|
|
931
959
|
|
|
932
960
|
|
|
933
961
|
|
|
934
|
-
const Source = __nccwpck_require__(
|
|
935
|
-
const { getMap, getSourceAndMap } = __nccwpck_require__(
|
|
936
|
-
const getGeneratedSourceInfo = __nccwpck_require__(
|
|
937
|
-
const splitIntoLines = __nccwpck_require__(
|
|
938
|
-
const splitIntoPotentialTokens = __nccwpck_require__(
|
|
962
|
+
const Source = __nccwpck_require__(331);
|
|
963
|
+
const { getMap, getSourceAndMap } = __nccwpck_require__(568);
|
|
964
|
+
const getGeneratedSourceInfo = __nccwpck_require__(784);
|
|
965
|
+
const splitIntoLines = __nccwpck_require__(509);
|
|
966
|
+
const splitIntoPotentialTokens = __nccwpck_require__(674);
|
|
939
967
|
const {
|
|
940
968
|
isDualStringBufferCachingEnabled,
|
|
941
|
-
} = __nccwpck_require__(
|
|
969
|
+
} = __nccwpck_require__(806);
|
|
942
970
|
|
|
943
971
|
/** @typedef {import("./Source").HashLike} HashLike */
|
|
944
972
|
/** @typedef {import("./Source").MapOptions} MapOptions */
|
|
@@ -971,6 +999,10 @@ class OriginalSource extends Source {
|
|
|
971
999
|
* @type {undefined | Buffer}
|
|
972
1000
|
*/
|
|
973
1001
|
this._valueAsBuffer = isBuffer ? value : undefined;
|
|
1002
|
+
/**
|
|
1003
|
+
* @private
|
|
1004
|
+
* @type {string}
|
|
1005
|
+
*/
|
|
974
1006
|
this._name = name;
|
|
975
1007
|
}
|
|
976
1008
|
|
|
@@ -1126,7 +1158,7 @@ module.exports = OriginalSource;
|
|
|
1126
1158
|
|
|
1127
1159
|
/***/ }),
|
|
1128
1160
|
|
|
1129
|
-
/***/
|
|
1161
|
+
/***/ 199:
|
|
1130
1162
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1131
1163
|
|
|
1132
1164
|
/*
|
|
@@ -1136,10 +1168,10 @@ module.exports = OriginalSource;
|
|
|
1136
1168
|
|
|
1137
1169
|
|
|
1138
1170
|
|
|
1139
|
-
const RawSource = __nccwpck_require__(
|
|
1140
|
-
const Source = __nccwpck_require__(
|
|
1141
|
-
const { getMap, getSourceAndMap } = __nccwpck_require__(
|
|
1142
|
-
const streamChunks = __nccwpck_require__(
|
|
1171
|
+
const RawSource = __nccwpck_require__(855);
|
|
1172
|
+
const Source = __nccwpck_require__(331);
|
|
1173
|
+
const { getMap, getSourceAndMap } = __nccwpck_require__(568);
|
|
1174
|
+
const streamChunks = __nccwpck_require__(786);
|
|
1143
1175
|
|
|
1144
1176
|
/** @typedef {import("./Source").HashLike} HashLike */
|
|
1145
1177
|
/** @typedef {import("./Source").MapOptions} MapOptions */
|
|
@@ -1161,6 +1193,11 @@ class PrefixSource extends Source {
|
|
|
1161
1193
|
*/
|
|
1162
1194
|
constructor(prefix, source) {
|
|
1163
1195
|
super();
|
|
1196
|
+
/**
|
|
1197
|
+
* @private
|
|
1198
|
+
* @type {string}
|
|
1199
|
+
*/
|
|
1200
|
+
this._prefix = prefix;
|
|
1164
1201
|
/**
|
|
1165
1202
|
* @private
|
|
1166
1203
|
* @type {Source}
|
|
@@ -1169,7 +1206,6 @@ class PrefixSource extends Source {
|
|
|
1169
1206
|
typeof source === "string" || Buffer.isBuffer(source)
|
|
1170
1207
|
? new RawSource(source, true)
|
|
1171
1208
|
: source;
|
|
1172
|
-
this._prefix = prefix;
|
|
1173
1209
|
}
|
|
1174
1210
|
|
|
1175
1211
|
getPrefix() {
|
|
@@ -1291,7 +1327,7 @@ module.exports = PrefixSource;
|
|
|
1291
1327
|
|
|
1292
1328
|
/***/ }),
|
|
1293
1329
|
|
|
1294
|
-
/***/
|
|
1330
|
+
/***/ 855:
|
|
1295
1331
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1296
1332
|
|
|
1297
1333
|
/*
|
|
@@ -1301,12 +1337,12 @@ module.exports = PrefixSource;
|
|
|
1301
1337
|
|
|
1302
1338
|
|
|
1303
1339
|
|
|
1304
|
-
const Source = __nccwpck_require__(
|
|
1305
|
-
const streamChunksOfRawSource = __nccwpck_require__(
|
|
1340
|
+
const Source = __nccwpck_require__(331);
|
|
1341
|
+
const streamChunksOfRawSource = __nccwpck_require__(300);
|
|
1306
1342
|
const {
|
|
1307
1343
|
internString,
|
|
1308
1344
|
isDualStringBufferCachingEnabled,
|
|
1309
|
-
} = __nccwpck_require__(
|
|
1345
|
+
} = __nccwpck_require__(806);
|
|
1310
1346
|
|
|
1311
1347
|
/** @typedef {import("./Source").HashLike} HashLike */
|
|
1312
1348
|
/** @typedef {import("./Source").MapOptions} MapOptions */
|
|
@@ -1329,6 +1365,10 @@ class RawSource extends Source {
|
|
|
1329
1365
|
if (!isBuffer && typeof value !== "string") {
|
|
1330
1366
|
throw new TypeError("argument 'value' must be either string or Buffer");
|
|
1331
1367
|
}
|
|
1368
|
+
/**
|
|
1369
|
+
* @private
|
|
1370
|
+
* @type {boolean}
|
|
1371
|
+
*/
|
|
1332
1372
|
this._valueIsBuffer = !convertToString && isBuffer;
|
|
1333
1373
|
const internedString =
|
|
1334
1374
|
typeof value === "string" ? internString(value) : undefined;
|
|
@@ -1434,7 +1474,7 @@ module.exports = RawSource;
|
|
|
1434
1474
|
|
|
1435
1475
|
/***/ }),
|
|
1436
1476
|
|
|
1437
|
-
/***/
|
|
1477
|
+
/***/ 197:
|
|
1438
1478
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1439
1479
|
|
|
1440
1480
|
/*
|
|
@@ -1444,10 +1484,10 @@ module.exports = RawSource;
|
|
|
1444
1484
|
|
|
1445
1485
|
|
|
1446
1486
|
|
|
1447
|
-
const Source = __nccwpck_require__(
|
|
1448
|
-
const { getMap, getSourceAndMap } = __nccwpck_require__(
|
|
1449
|
-
const splitIntoLines = __nccwpck_require__(
|
|
1450
|
-
const streamChunks = __nccwpck_require__(
|
|
1487
|
+
const Source = __nccwpck_require__(331);
|
|
1488
|
+
const { getMap, getSourceAndMap } = __nccwpck_require__(568);
|
|
1489
|
+
const splitIntoLines = __nccwpck_require__(509);
|
|
1490
|
+
const streamChunks = __nccwpck_require__(786);
|
|
1451
1491
|
|
|
1452
1492
|
/** @typedef {import("./Source").HashLike} HashLike */
|
|
1453
1493
|
/** @typedef {import("./Source").MapOptions} MapOptions */
|
|
@@ -1495,10 +1535,22 @@ class ReplaceSource extends Source {
|
|
|
1495
1535
|
*/
|
|
1496
1536
|
constructor(source, name) {
|
|
1497
1537
|
super();
|
|
1538
|
+
/**
|
|
1539
|
+
* @private
|
|
1540
|
+
* @type {Source}
|
|
1541
|
+
*/
|
|
1498
1542
|
this._source = source;
|
|
1543
|
+
/**
|
|
1544
|
+
* @private
|
|
1545
|
+
* @type {string | undefined}
|
|
1546
|
+
*/
|
|
1499
1547
|
this._name = name;
|
|
1500
1548
|
/** @type {Replacement[]} */
|
|
1501
1549
|
this._replacements = [];
|
|
1550
|
+
/**
|
|
1551
|
+
* @private
|
|
1552
|
+
* @type {boolean}
|
|
1553
|
+
*/
|
|
1502
1554
|
this._isSorted = true;
|
|
1503
1555
|
}
|
|
1504
1556
|
|
|
@@ -1986,7 +2038,7 @@ module.exports.Replacement = Replacement;
|
|
|
1986
2038
|
|
|
1987
2039
|
/***/ }),
|
|
1988
2040
|
|
|
1989
|
-
/***/
|
|
2041
|
+
/***/ 628:
|
|
1990
2042
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1991
2043
|
|
|
1992
2044
|
/*
|
|
@@ -1996,7 +2048,7 @@ module.exports.Replacement = Replacement;
|
|
|
1996
2048
|
|
|
1997
2049
|
|
|
1998
2050
|
|
|
1999
|
-
const Source = __nccwpck_require__(
|
|
2051
|
+
const Source = __nccwpck_require__(331);
|
|
2000
2052
|
|
|
2001
2053
|
/** @typedef {import("./Source").HashLike} HashLike */
|
|
2002
2054
|
/** @typedef {import("./Source").MapOptions} MapOptions */
|
|
@@ -2009,6 +2061,10 @@ class SizeOnlySource extends Source {
|
|
|
2009
2061
|
*/
|
|
2010
2062
|
constructor(size) {
|
|
2011
2063
|
super();
|
|
2064
|
+
/**
|
|
2065
|
+
* @private
|
|
2066
|
+
* @type {number}
|
|
2067
|
+
*/
|
|
2012
2068
|
this._size = size;
|
|
2013
2069
|
}
|
|
2014
2070
|
|
|
@@ -2060,7 +2116,7 @@ module.exports = SizeOnlySource;
|
|
|
2060
2116
|
|
|
2061
2117
|
/***/ }),
|
|
2062
2118
|
|
|
2063
|
-
/***/
|
|
2119
|
+
/***/ 331:
|
|
2064
2120
|
/***/ ((module) => {
|
|
2065
2121
|
|
|
2066
2122
|
/*
|
|
@@ -2156,7 +2212,7 @@ module.exports = Source;
|
|
|
2156
2212
|
|
|
2157
2213
|
/***/ }),
|
|
2158
2214
|
|
|
2159
|
-
/***/
|
|
2215
|
+
/***/ 476:
|
|
2160
2216
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
2161
2217
|
|
|
2162
2218
|
/*
|
|
@@ -2166,13 +2222,13 @@ module.exports = Source;
|
|
|
2166
2222
|
|
|
2167
2223
|
|
|
2168
2224
|
|
|
2169
|
-
const Source = __nccwpck_require__(
|
|
2170
|
-
const { getMap, getSourceAndMap } = __nccwpck_require__(
|
|
2171
|
-
const streamChunksOfCombinedSourceMap = __nccwpck_require__(
|
|
2172
|
-
const streamChunksOfSourceMap = __nccwpck_require__(
|
|
2225
|
+
const Source = __nccwpck_require__(331);
|
|
2226
|
+
const { getMap, getSourceAndMap } = __nccwpck_require__(568);
|
|
2227
|
+
const streamChunksOfCombinedSourceMap = __nccwpck_require__(647);
|
|
2228
|
+
const streamChunksOfSourceMap = __nccwpck_require__(814);
|
|
2173
2229
|
const {
|
|
2174
2230
|
isDualStringBufferCachingEnabled,
|
|
2175
|
-
} = __nccwpck_require__(
|
|
2231
|
+
} = __nccwpck_require__(806);
|
|
2176
2232
|
|
|
2177
2233
|
/** @typedef {import("./Source").HashLike} HashLike */
|
|
2178
2234
|
/** @typedef {import("./Source").MapOptions} MapOptions */
|
|
@@ -2191,7 +2247,7 @@ class SourceMapSource extends Source {
|
|
|
2191
2247
|
* @param {string} name name
|
|
2192
2248
|
* @param {string | Buffer | RawSourceMap=} sourceMap source map
|
|
2193
2249
|
* @param {SourceValue=} originalSource original source
|
|
2194
|
-
* @param {(string | Buffer | RawSourceMap)=} innerSourceMap inner source map
|
|
2250
|
+
* @param {(null | string | Buffer | RawSourceMap)=} innerSourceMap inner source map
|
|
2195
2251
|
* @param {boolean=} removeOriginalSource do remove original source
|
|
2196
2252
|
*/
|
|
2197
2253
|
constructor(
|
|
@@ -2253,10 +2309,11 @@ class SourceMapSource extends Source {
|
|
|
2253
2309
|
* @private
|
|
2254
2310
|
* @type {undefined | RawSourceMap}
|
|
2255
2311
|
*/
|
|
2312
|
+
|
|
2256
2313
|
this._innerSourceMapAsObject =
|
|
2257
2314
|
innerSourceMapIsBuffer || innerSourceMapIsString
|
|
2258
2315
|
? undefined
|
|
2259
|
-
: innerSourceMap;
|
|
2316
|
+
: innerSourceMap || undefined;
|
|
2260
2317
|
/**
|
|
2261
2318
|
* @private
|
|
2262
2319
|
* @type {undefined | string}
|
|
@@ -2529,7 +2586,7 @@ module.exports = SourceMapSource;
|
|
|
2529
2586
|
|
|
2530
2587
|
/***/ }),
|
|
2531
2588
|
|
|
2532
|
-
/***/
|
|
2589
|
+
/***/ 983:
|
|
2533
2590
|
/***/ ((module) => {
|
|
2534
2591
|
|
|
2535
2592
|
/*
|
|
@@ -2761,7 +2818,7 @@ module.exports = createMappingsSerializer;
|
|
|
2761
2818
|
|
|
2762
2819
|
/***/ }),
|
|
2763
2820
|
|
|
2764
|
-
/***/
|
|
2821
|
+
/***/ 568:
|
|
2765
2822
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
2766
2823
|
|
|
2767
2824
|
/*
|
|
@@ -2771,7 +2828,7 @@ module.exports = createMappingsSerializer;
|
|
|
2771
2828
|
|
|
2772
2829
|
|
|
2773
2830
|
|
|
2774
|
-
const createMappingsSerializer = __nccwpck_require__(
|
|
2831
|
+
const createMappingsSerializer = __nccwpck_require__(983);
|
|
2775
2832
|
|
|
2776
2833
|
/** @typedef {import("../Source").RawSourceMap} RawSourceMap */
|
|
2777
2834
|
/** @typedef {import("../Source").SourceAndMap} SourceAndMap */
|
|
@@ -2781,12 +2838,11 @@ const createMappingsSerializer = __nccwpck_require__(294);
|
|
|
2781
2838
|
/** @typedef {{ streamChunks: StreamChunksFunction }} SourceLikeWithStreamChunks */
|
|
2782
2839
|
|
|
2783
2840
|
/**
|
|
2784
|
-
* @param {SourceLikeWithStreamChunks}
|
|
2841
|
+
* @param {SourceLikeWithStreamChunks} source source
|
|
2785
2842
|
* @param {Options=} options options
|
|
2786
|
-
* @returns {
|
|
2843
|
+
* @returns {RawSourceMap | null} map
|
|
2787
2844
|
*/
|
|
2788
|
-
module.exports.
|
|
2789
|
-
let code = "";
|
|
2845
|
+
module.exports.getMap = (source, options) => {
|
|
2790
2846
|
let mappings = "";
|
|
2791
2847
|
/** @type {(string | null)[]} */
|
|
2792
2848
|
const potentialSources = [];
|
|
@@ -2795,8 +2851,8 @@ module.exports.getSourceAndMap = (inputSource, options) => {
|
|
|
2795
2851
|
/** @type {(string | null)[]} */
|
|
2796
2852
|
const potentialNames = [];
|
|
2797
2853
|
const addMapping = createMappingsSerializer(options);
|
|
2798
|
-
|
|
2799
|
-
{ ...options, finalSource: true },
|
|
2854
|
+
source.streamChunks(
|
|
2855
|
+
{ ...options, source: false, finalSource: true },
|
|
2800
2856
|
(
|
|
2801
2857
|
chunk,
|
|
2802
2858
|
generatedLine,
|
|
@@ -2806,7 +2862,6 @@ module.exports.getSourceAndMap = (inputSource, options) => {
|
|
|
2806
2862
|
originalColumn,
|
|
2807
2863
|
nameIndex,
|
|
2808
2864
|
) => {
|
|
2809
|
-
if (chunk !== undefined) code += chunk;
|
|
2810
2865
|
mappings += addMapping(
|
|
2811
2866
|
generatedLine,
|
|
2812
2867
|
generatedColumn,
|
|
@@ -2835,32 +2890,29 @@ module.exports.getSourceAndMap = (inputSource, options) => {
|
|
|
2835
2890
|
potentialNames[nameIndex] = name;
|
|
2836
2891
|
},
|
|
2837
2892
|
);
|
|
2838
|
-
return
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
names: /** @type {string[]} */ (potentialNames),
|
|
2853
|
-
}
|
|
2854
|
-
: null,
|
|
2855
|
-
};
|
|
2893
|
+
return mappings.length > 0
|
|
2894
|
+
? {
|
|
2895
|
+
version: 3,
|
|
2896
|
+
file: "x",
|
|
2897
|
+
mappings,
|
|
2898
|
+
// We handle broken sources as `null`, in spec this field should be string, but no information what we should do in such cases if we change type it will be breaking change
|
|
2899
|
+
sources: /** @type {string[]} */ (potentialSources),
|
|
2900
|
+
sourcesContent:
|
|
2901
|
+
potentialSourcesContent.length > 0
|
|
2902
|
+
? /** @type {string[]} */ (potentialSourcesContent)
|
|
2903
|
+
: undefined,
|
|
2904
|
+
names: /** @type {string[]} */ (potentialNames),
|
|
2905
|
+
}
|
|
2906
|
+
: null;
|
|
2856
2907
|
};
|
|
2857
2908
|
|
|
2858
2909
|
/**
|
|
2859
|
-
* @param {SourceLikeWithStreamChunks}
|
|
2910
|
+
* @param {SourceLikeWithStreamChunks} inputSource input source
|
|
2860
2911
|
* @param {Options=} options options
|
|
2861
|
-
* @returns {
|
|
2912
|
+
* @returns {SourceAndMap} map
|
|
2862
2913
|
*/
|
|
2863
|
-
module.exports.
|
|
2914
|
+
module.exports.getSourceAndMap = (inputSource, options) => {
|
|
2915
|
+
let code = "";
|
|
2864
2916
|
let mappings = "";
|
|
2865
2917
|
/** @type {(string | null)[]} */
|
|
2866
2918
|
const potentialSources = [];
|
|
@@ -2869,8 +2921,8 @@ module.exports.getMap = (source, options) => {
|
|
|
2869
2921
|
/** @type {(string | null)[]} */
|
|
2870
2922
|
const potentialNames = [];
|
|
2871
2923
|
const addMapping = createMappingsSerializer(options);
|
|
2872
|
-
source.streamChunks(
|
|
2873
|
-
{ ...options,
|
|
2924
|
+
const { source } = inputSource.streamChunks(
|
|
2925
|
+
{ ...options, finalSource: true },
|
|
2874
2926
|
(
|
|
2875
2927
|
chunk,
|
|
2876
2928
|
generatedLine,
|
|
@@ -2880,6 +2932,7 @@ module.exports.getMap = (source, options) => {
|
|
|
2880
2932
|
originalColumn,
|
|
2881
2933
|
nameIndex,
|
|
2882
2934
|
) => {
|
|
2935
|
+
if (chunk !== undefined) code += chunk;
|
|
2883
2936
|
mappings += addMapping(
|
|
2884
2937
|
generatedLine,
|
|
2885
2938
|
generatedColumn,
|
|
@@ -2908,26 +2961,30 @@ module.exports.getMap = (source, options) => {
|
|
|
2908
2961
|
potentialNames[nameIndex] = name;
|
|
2909
2962
|
},
|
|
2910
2963
|
);
|
|
2911
|
-
return
|
|
2912
|
-
?
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
:
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2964
|
+
return {
|
|
2965
|
+
source: source !== undefined ? source : code,
|
|
2966
|
+
map:
|
|
2967
|
+
mappings.length > 0
|
|
2968
|
+
? {
|
|
2969
|
+
version: 3,
|
|
2970
|
+
file: "x",
|
|
2971
|
+
mappings,
|
|
2972
|
+
// We handle broken sources as `null`, in spec this field should be string, but no information what we should do in such cases if we change type it will be breaking change
|
|
2973
|
+
sources: /** @type {string[]} */ (potentialSources),
|
|
2974
|
+
sourcesContent:
|
|
2975
|
+
potentialSourcesContent.length > 0
|
|
2976
|
+
? /** @type {string[]} */ (potentialSourcesContent)
|
|
2977
|
+
: undefined,
|
|
2978
|
+
names: /** @type {string[]} */ (potentialNames),
|
|
2979
|
+
}
|
|
2980
|
+
: null,
|
|
2981
|
+
};
|
|
2925
2982
|
};
|
|
2926
2983
|
|
|
2927
2984
|
|
|
2928
2985
|
/***/ }),
|
|
2929
2986
|
|
|
2930
|
-
/***/
|
|
2987
|
+
/***/ 784:
|
|
2931
2988
|
/***/ ((module) => {
|
|
2932
2989
|
|
|
2933
2990
|
/*
|
|
@@ -2978,7 +3035,7 @@ module.exports = getGeneratedSourceInfo;
|
|
|
2978
3035
|
|
|
2979
3036
|
/***/ }),
|
|
2980
3037
|
|
|
2981
|
-
/***/
|
|
3038
|
+
/***/ 711:
|
|
2982
3039
|
/***/ ((module) => {
|
|
2983
3040
|
|
|
2984
3041
|
/*
|
|
@@ -3009,7 +3066,7 @@ module.exports = getSource;
|
|
|
3009
3066
|
|
|
3010
3067
|
/***/ }),
|
|
3011
3068
|
|
|
3012
|
-
/***/
|
|
3069
|
+
/***/ 28:
|
|
3013
3070
|
/***/ ((module) => {
|
|
3014
3071
|
|
|
3015
3072
|
/*
|
|
@@ -3136,7 +3193,7 @@ module.exports = readMappings;
|
|
|
3136
3193
|
|
|
3137
3194
|
/***/ }),
|
|
3138
3195
|
|
|
3139
|
-
/***/
|
|
3196
|
+
/***/ 509:
|
|
3140
3197
|
/***/ ((module) => {
|
|
3141
3198
|
|
|
3142
3199
|
/*
|
|
@@ -3176,7 +3233,7 @@ module.exports = splitIntoLines;
|
|
|
3176
3233
|
|
|
3177
3234
|
/***/ }),
|
|
3178
3235
|
|
|
3179
|
-
/***/
|
|
3236
|
+
/***/ 674:
|
|
3180
3237
|
/***/ ((module) => {
|
|
3181
3238
|
|
|
3182
3239
|
/*
|
|
@@ -3236,7 +3293,7 @@ module.exports = splitIntoPotentialTokens;
|
|
|
3236
3293
|
|
|
3237
3294
|
/***/ }),
|
|
3238
3295
|
|
|
3239
|
-
/***/
|
|
3296
|
+
/***/ 439:
|
|
3240
3297
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
3241
3298
|
|
|
3242
3299
|
/*
|
|
@@ -3246,8 +3303,8 @@ module.exports = splitIntoPotentialTokens;
|
|
|
3246
3303
|
|
|
3247
3304
|
|
|
3248
3305
|
|
|
3249
|
-
const createMappingsSerializer = __nccwpck_require__(
|
|
3250
|
-
const streamChunks = __nccwpck_require__(
|
|
3306
|
+
const createMappingsSerializer = __nccwpck_require__(983);
|
|
3307
|
+
const streamChunks = __nccwpck_require__(786);
|
|
3251
3308
|
|
|
3252
3309
|
/** @typedef {import("../Source").RawSourceMap} RawSourceMap */
|
|
3253
3310
|
/** @typedef {import("./streamChunks").GeneratedSourceInfo} GeneratedSourceInfo */
|
|
@@ -3366,7 +3423,7 @@ module.exports = streamAndGetSourceAndMap;
|
|
|
3366
3423
|
|
|
3367
3424
|
/***/ }),
|
|
3368
3425
|
|
|
3369
|
-
/***/
|
|
3426
|
+
/***/ 786:
|
|
3370
3427
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
3371
3428
|
|
|
3372
3429
|
/*
|
|
@@ -3376,8 +3433,8 @@ module.exports = streamAndGetSourceAndMap;
|
|
|
3376
3433
|
|
|
3377
3434
|
|
|
3378
3435
|
|
|
3379
|
-
const streamChunksOfRawSource = __nccwpck_require__(
|
|
3380
|
-
const streamChunksOfSourceMap = __nccwpck_require__(
|
|
3436
|
+
const streamChunksOfRawSource = __nccwpck_require__(300);
|
|
3437
|
+
const streamChunksOfSourceMap = __nccwpck_require__(814);
|
|
3381
3438
|
|
|
3382
3439
|
/** @typedef {import("../Source")} Source */
|
|
3383
3440
|
/** @typedef {import("./getGeneratedSourceInfo").GeneratedSourceInfo} GeneratedSourceInfo */
|
|
@@ -3435,7 +3492,7 @@ module.exports = (source, options, onChunk, onSource, onName) => {
|
|
|
3435
3492
|
|
|
3436
3493
|
/***/ }),
|
|
3437
3494
|
|
|
3438
|
-
/***/
|
|
3495
|
+
/***/ 647:
|
|
3439
3496
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
3440
3497
|
|
|
3441
3498
|
/*
|
|
@@ -3445,8 +3502,8 @@ module.exports = (source, options, onChunk, onSource, onName) => {
|
|
|
3445
3502
|
|
|
3446
3503
|
|
|
3447
3504
|
|
|
3448
|
-
const splitIntoLines = __nccwpck_require__(
|
|
3449
|
-
const streamChunksOfSourceMap = __nccwpck_require__(
|
|
3505
|
+
const splitIntoLines = __nccwpck_require__(509);
|
|
3506
|
+
const streamChunksOfSourceMap = __nccwpck_require__(814);
|
|
3450
3507
|
|
|
3451
3508
|
/** @typedef {import("../Source").RawSourceMap} RawSourceMap */
|
|
3452
3509
|
/** @typedef {import("./getGeneratedSourceInfo").GeneratedSourceInfo} GeneratedSourceInfo */
|
|
@@ -3808,7 +3865,7 @@ module.exports = streamChunksOfCombinedSourceMap;
|
|
|
3808
3865
|
|
|
3809
3866
|
/***/ }),
|
|
3810
3867
|
|
|
3811
|
-
/***/
|
|
3868
|
+
/***/ 300:
|
|
3812
3869
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
3813
3870
|
|
|
3814
3871
|
/*
|
|
@@ -3818,8 +3875,8 @@ module.exports = streamChunksOfCombinedSourceMap;
|
|
|
3818
3875
|
|
|
3819
3876
|
|
|
3820
3877
|
|
|
3821
|
-
const getGeneratedSourceInfo = __nccwpck_require__(
|
|
3822
|
-
const splitIntoLines = __nccwpck_require__(
|
|
3878
|
+
const getGeneratedSourceInfo = __nccwpck_require__(784);
|
|
3879
|
+
const splitIntoLines = __nccwpck_require__(509);
|
|
3823
3880
|
|
|
3824
3881
|
/** @typedef {import("./getGeneratedSourceInfo").GeneratedSourceInfo} GeneratedSourceInfo */
|
|
3825
3882
|
/** @typedef {import("./streamChunks").OnChunk} OnChunk */
|
|
@@ -3869,7 +3926,7 @@ module.exports = (source, onChunk, onSource, onName, finalSource) =>
|
|
|
3869
3926
|
|
|
3870
3927
|
/***/ }),
|
|
3871
3928
|
|
|
3872
|
-
/***/
|
|
3929
|
+
/***/ 814:
|
|
3873
3930
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
3874
3931
|
|
|
3875
3932
|
/*
|
|
@@ -3879,10 +3936,10 @@ module.exports = (source, onChunk, onSource, onName, finalSource) =>
|
|
|
3879
3936
|
|
|
3880
3937
|
|
|
3881
3938
|
|
|
3882
|
-
const getGeneratedSourceInfo = __nccwpck_require__(
|
|
3883
|
-
const getSource = __nccwpck_require__(
|
|
3884
|
-
const readMappings = __nccwpck_require__(
|
|
3885
|
-
const splitIntoLines = __nccwpck_require__(
|
|
3939
|
+
const getGeneratedSourceInfo = __nccwpck_require__(784);
|
|
3940
|
+
const getSource = __nccwpck_require__(711);
|
|
3941
|
+
const readMappings = __nccwpck_require__(28);
|
|
3942
|
+
const splitIntoLines = __nccwpck_require__(509);
|
|
3886
3943
|
|
|
3887
3944
|
/** @typedef {import("../Source").RawSourceMap} RawSourceMap */
|
|
3888
3945
|
/** @typedef {import("./getGeneratedSourceInfo").GeneratedSourceInfo} GeneratedSourceInfo */
|
|
@@ -4375,7 +4432,7 @@ module.exports = (
|
|
|
4375
4432
|
|
|
4376
4433
|
/***/ }),
|
|
4377
4434
|
|
|
4378
|
-
/***/
|
|
4435
|
+
/***/ 806:
|
|
4379
4436
|
/***/ ((module) => {
|
|
4380
4437
|
|
|
4381
4438
|
/*
|
|
@@ -4490,16 +4547,16 @@ function internString(str) {
|
|
|
4490
4547
|
module.exports = {
|
|
4491
4548
|
disableDualStringBufferCaching,
|
|
4492
4549
|
enableDualStringBufferCaching,
|
|
4493
|
-
internString,
|
|
4494
|
-
isDualStringBufferCachingEnabled,
|
|
4495
4550
|
enterStringInterningRange,
|
|
4496
4551
|
exitStringInterningRange,
|
|
4552
|
+
internString,
|
|
4553
|
+
isDualStringBufferCachingEnabled,
|
|
4497
4554
|
};
|
|
4498
4555
|
|
|
4499
4556
|
|
|
4500
4557
|
/***/ }),
|
|
4501
4558
|
|
|
4502
|
-
/***/
|
|
4559
|
+
/***/ 340:
|
|
4503
4560
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
4504
4561
|
|
|
4505
4562
|
/*
|
|
@@ -4586,38 +4643,38 @@ module.exports = mergeExports(
|
|
|
4586
4643
|
{},
|
|
4587
4644
|
{
|
|
4588
4645
|
get Source() {
|
|
4589
|
-
return __nccwpck_require__(
|
|
4646
|
+
return __nccwpck_require__(331);
|
|
4590
4647
|
},
|
|
4591
4648
|
get RawSource() {
|
|
4592
|
-
return __nccwpck_require__(
|
|
4649
|
+
return __nccwpck_require__(855);
|
|
4593
4650
|
},
|
|
4594
4651
|
get OriginalSource() {
|
|
4595
|
-
return __nccwpck_require__(
|
|
4652
|
+
return __nccwpck_require__(792);
|
|
4596
4653
|
},
|
|
4597
4654
|
get SourceMapSource() {
|
|
4598
|
-
return __nccwpck_require__(
|
|
4655
|
+
return __nccwpck_require__(476);
|
|
4599
4656
|
},
|
|
4600
4657
|
get CachedSource() {
|
|
4601
|
-
return __nccwpck_require__(
|
|
4658
|
+
return __nccwpck_require__(61);
|
|
4602
4659
|
},
|
|
4603
4660
|
get ConcatSource() {
|
|
4604
|
-
return __nccwpck_require__(
|
|
4661
|
+
return __nccwpck_require__(523);
|
|
4605
4662
|
},
|
|
4606
4663
|
get ReplaceSource() {
|
|
4607
|
-
return __nccwpck_require__(
|
|
4664
|
+
return __nccwpck_require__(197);
|
|
4608
4665
|
},
|
|
4609
4666
|
get PrefixSource() {
|
|
4610
|
-
return __nccwpck_require__(
|
|
4667
|
+
return __nccwpck_require__(199);
|
|
4611
4668
|
},
|
|
4612
4669
|
get SizeOnlySource() {
|
|
4613
|
-
return __nccwpck_require__(
|
|
4670
|
+
return __nccwpck_require__(628);
|
|
4614
4671
|
},
|
|
4615
4672
|
get CompatSource() {
|
|
4616
|
-
return __nccwpck_require__(
|
|
4673
|
+
return __nccwpck_require__(961);
|
|
4617
4674
|
},
|
|
4618
4675
|
util: {
|
|
4619
4676
|
get stringBufferUtils() {
|
|
4620
|
-
return __nccwpck_require__(
|
|
4677
|
+
return __nccwpck_require__(806);
|
|
4621
4678
|
},
|
|
4622
4679
|
},
|
|
4623
4680
|
},
|
|
@@ -4668,7 +4725,7 @@ module.exports = mergeExports(
|
|
|
4668
4725
|
/******/ // startup
|
|
4669
4726
|
/******/ // Load entry module and return exports
|
|
4670
4727
|
/******/ // This entry module is referenced by other modules so it can't be inlined
|
|
4671
|
-
/******/ var __webpack_exports__ = __nccwpck_require__(
|
|
4728
|
+
/******/ var __webpack_exports__ = __nccwpck_require__(340);
|
|
4672
4729
|
/******/ module.exports = __webpack_exports__;
|
|
4673
4730
|
/******/
|
|
4674
4731
|
/******/ })()
|