@ohos-ports/rspack-core 2.3.2-beta.0 → 2.3.4-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.
- package/README.md +5 -4
- package/compiled/http-proxy-middleware/index.d.ts +2 -0
- package/compiled/http-proxy-middleware/package.json +1 -1
- package/compiled/tinypool/dist/index.js +5 -3
- package/compiled/watchpack/index.js +198 -26
- package/compiled/watchpack/package.json +1 -1
- package/compiled/webpack-sources/index.d.ts +2 -0
- package/compiled/webpack-sources/index.js +207 -94
- package/compiled/webpack-sources/package.json +1 -1
- package/compiled/webpack-sources/types/RawSource.d.ts +0 -10
- package/compiled/webpack-sources/types/helpers/sourceMap.d.ts +47 -0
- package/compiled/webpack-sources/types/index.d.ts +1 -0
- package/dist/RuntimeGlobals.d.ts +2 -1
- package/dist/RuntimeTemplate.d.ts +1 -0
- package/dist/builtin-loader/lightningcss/index.d.ts +5 -1
- package/dist/builtin-plugin/CompactHashedChunkIdsPlugin.d.ts +1 -0
- package/dist/builtin-plugin/CompactHashedModuleIdsPlugin.d.ts +1 -0
- package/dist/builtin-plugin/DeterministicChunkIdsPlugin.d.ts +5 -0
- package/dist/config/adapterRuleUse.d.ts +1 -0
- package/dist/config/target.d.ts +4 -0
- package/dist/config/types.d.ts +12 -1
- package/dist/cssExtractLoader.js +1 -1
- package/dist/exports.d.ts +2 -1
- package/dist/index.js +480 -352
- package/dist/sharing/IndependentSharedPlugin.d.ts +1 -2
- package/dist/sharing/utils.d.ts +1 -1
- package/dist/worker.js +4 -1
- package/package.json +4 -4
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/******/ "use strict";
|
|
3
3
|
/******/ var __webpack_modules__ = ({
|
|
4
4
|
|
|
5
|
-
/***/
|
|
5
|
+
/***/ 228:
|
|
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__(478);
|
|
16
|
+
const streamAndGetSourceAndMap = __nccwpck_require__(574);
|
|
17
|
+
const streamChunksOfRawSource = __nccwpck_require__(139);
|
|
18
|
+
const streamChunksOfSourceMap = __nccwpck_require__(953);
|
|
19
19
|
const {
|
|
20
20
|
isDualStringBufferCachingEnabled,
|
|
21
|
-
} = __nccwpck_require__(
|
|
21
|
+
} = __nccwpck_require__(477);
|
|
22
22
|
|
|
23
23
|
/** @typedef {import("./Source").ClearCacheOptions} ClearCacheOptions */
|
|
24
24
|
/** @typedef {import("./Source").HashLike} HashLike */
|
|
@@ -622,7 +622,7 @@ module.exports = CachedSource;
|
|
|
622
622
|
|
|
623
623
|
/***/ }),
|
|
624
624
|
|
|
625
|
-
/***/
|
|
625
|
+
/***/ 92:
|
|
626
626
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
627
627
|
|
|
628
628
|
/*
|
|
@@ -632,7 +632,7 @@ module.exports = CachedSource;
|
|
|
632
632
|
|
|
633
633
|
|
|
634
634
|
|
|
635
|
-
const Source = __nccwpck_require__(
|
|
635
|
+
const Source = __nccwpck_require__(478);
|
|
636
636
|
|
|
637
637
|
/** @typedef {import("./Source").ClearCacheOptions} ClearCacheOptions */
|
|
638
638
|
/** @typedef {import("./Source").HashLike} HashLike */
|
|
@@ -779,7 +779,7 @@ module.exports = CompatSource;
|
|
|
779
779
|
|
|
780
780
|
/***/ }),
|
|
781
781
|
|
|
782
|
-
/***/
|
|
782
|
+
/***/ 862:
|
|
783
783
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
784
784
|
|
|
785
785
|
/*
|
|
@@ -789,10 +789,10 @@ module.exports = CompatSource;
|
|
|
789
789
|
|
|
790
790
|
|
|
791
791
|
|
|
792
|
-
const RawSource = __nccwpck_require__(
|
|
793
|
-
const Source = __nccwpck_require__(
|
|
794
|
-
const { getMap, getSourceAndMap } = __nccwpck_require__(
|
|
795
|
-
const streamChunks = __nccwpck_require__(
|
|
792
|
+
const RawSource = __nccwpck_require__(792);
|
|
793
|
+
const Source = __nccwpck_require__(478);
|
|
794
|
+
const { getMap, getSourceAndMap } = __nccwpck_require__(75);
|
|
795
|
+
const streamChunks = __nccwpck_require__(275);
|
|
796
796
|
|
|
797
797
|
/** @typedef {import("./CompatSource").SourceLike} SourceLike */
|
|
798
798
|
/** @typedef {import("./Source").ClearCacheOptions} ClearCacheOptions */
|
|
@@ -1256,7 +1256,7 @@ module.exports = ConcatSource;
|
|
|
1256
1256
|
|
|
1257
1257
|
/***/ }),
|
|
1258
1258
|
|
|
1259
|
-
/***/
|
|
1259
|
+
/***/ 605:
|
|
1260
1260
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1261
1261
|
|
|
1262
1262
|
/*
|
|
@@ -1266,13 +1266,13 @@ module.exports = ConcatSource;
|
|
|
1266
1266
|
|
|
1267
1267
|
|
|
1268
1268
|
|
|
1269
|
-
const Source = __nccwpck_require__(
|
|
1270
|
-
const { getMap, getSourceAndMap } = __nccwpck_require__(
|
|
1271
|
-
const getGeneratedSourceInfo = __nccwpck_require__(
|
|
1272
|
-
const { eachPotentialToken } = __nccwpck_require__(
|
|
1269
|
+
const Source = __nccwpck_require__(478);
|
|
1270
|
+
const { getMap, getSourceAndMap } = __nccwpck_require__(75);
|
|
1271
|
+
const getGeneratedSourceInfo = __nccwpck_require__(845);
|
|
1272
|
+
const { eachPotentialToken } = __nccwpck_require__(259);
|
|
1273
1273
|
const {
|
|
1274
1274
|
isDualStringBufferCachingEnabled,
|
|
1275
|
-
} = __nccwpck_require__(
|
|
1275
|
+
} = __nccwpck_require__(477);
|
|
1276
1276
|
|
|
1277
1277
|
/** @typedef {import("./Source").ClearCacheOptions} ClearCacheOptions */
|
|
1278
1278
|
/** @typedef {import("./Source").HashLike} HashLike */
|
|
@@ -1531,7 +1531,7 @@ module.exports = OriginalSource;
|
|
|
1531
1531
|
|
|
1532
1532
|
/***/ }),
|
|
1533
1533
|
|
|
1534
|
-
/***/
|
|
1534
|
+
/***/ 370:
|
|
1535
1535
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1536
1536
|
|
|
1537
1537
|
/*
|
|
@@ -1541,10 +1541,10 @@ module.exports = OriginalSource;
|
|
|
1541
1541
|
|
|
1542
1542
|
|
|
1543
1543
|
|
|
1544
|
-
const RawSource = __nccwpck_require__(
|
|
1545
|
-
const Source = __nccwpck_require__(
|
|
1546
|
-
const { getMap, getSourceAndMap } = __nccwpck_require__(
|
|
1547
|
-
const streamChunks = __nccwpck_require__(
|
|
1544
|
+
const RawSource = __nccwpck_require__(792);
|
|
1545
|
+
const Source = __nccwpck_require__(478);
|
|
1546
|
+
const { getMap, getSourceAndMap } = __nccwpck_require__(75);
|
|
1547
|
+
const streamChunks = __nccwpck_require__(275);
|
|
1548
1548
|
|
|
1549
1549
|
/** @typedef {import("./Source").ClearCacheOptions} ClearCacheOptions */
|
|
1550
1550
|
/** @typedef {import("./Source").HashLike} HashLike */
|
|
@@ -1749,7 +1749,7 @@ module.exports = PrefixSource;
|
|
|
1749
1749
|
|
|
1750
1750
|
/***/ }),
|
|
1751
1751
|
|
|
1752
|
-
/***/
|
|
1752
|
+
/***/ 792:
|
|
1753
1753
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1754
1754
|
|
|
1755
1755
|
/*
|
|
@@ -1759,12 +1759,12 @@ module.exports = PrefixSource;
|
|
|
1759
1759
|
|
|
1760
1760
|
|
|
1761
1761
|
|
|
1762
|
-
const Source = __nccwpck_require__(
|
|
1763
|
-
const streamChunksOfRawSource = __nccwpck_require__(
|
|
1762
|
+
const Source = __nccwpck_require__(478);
|
|
1763
|
+
const streamChunksOfRawSource = __nccwpck_require__(139);
|
|
1764
1764
|
const {
|
|
1765
1765
|
internString,
|
|
1766
1766
|
isDualStringBufferCachingEnabled,
|
|
1767
|
-
} = __nccwpck_require__(
|
|
1767
|
+
} = __nccwpck_require__(477);
|
|
1768
1768
|
|
|
1769
1769
|
/** @typedef {import("./Source").ClearCacheOptions} ClearCacheOptions */
|
|
1770
1770
|
/** @typedef {import("./Source").HashLike} HashLike */
|
|
@@ -1777,6 +1777,17 @@ const {
|
|
|
1777
1777
|
/** @typedef {import("./helpers/streamChunks").OnSource} OnSource */
|
|
1778
1778
|
/** @typedef {import("./helpers/streamChunks").Options} Options */
|
|
1779
1779
|
|
|
1780
|
+
/**
|
|
1781
|
+
* Whether `buffer` can be rebuilt from `string` (its utf8 decoding) byte for
|
|
1782
|
+
* byte. Decoding replaces each malformed sequence with U+FFFD, so a string
|
|
1783
|
+
* without U+FFFD always round-trips; only one containing it is compared.
|
|
1784
|
+
* @param {string} string the cached string form
|
|
1785
|
+
* @param {Buffer} buffer the cached buffer form
|
|
1786
|
+
* @returns {boolean} true when `Buffer.from(string)` equals `buffer`
|
|
1787
|
+
*/
|
|
1788
|
+
const isLosslessUtf8 = (string, buffer) =>
|
|
1789
|
+
!string.includes("\uFFFD") || Buffer.from(string, "utf8").equals(buffer);
|
|
1790
|
+
|
|
1780
1791
|
class RawSource extends Source {
|
|
1781
1792
|
/**
|
|
1782
1793
|
* @param {string | Buffer} value value
|
|
@@ -1826,7 +1837,10 @@ class RawSource extends Source {
|
|
|
1826
1837
|
/** @type {Buffer} */
|
|
1827
1838
|
(this._valueAsBuffer).toString("utf8");
|
|
1828
1839
|
if (isDualStringBufferCachingEnabled()) {
|
|
1829
|
-
|
|
1840
|
+
const interned = internString(value);
|
|
1841
|
+
this._value = interned;
|
|
1842
|
+
this._valueAsString = interned;
|
|
1843
|
+
return interned;
|
|
1830
1844
|
}
|
|
1831
1845
|
return value;
|
|
1832
1846
|
}
|
|
@@ -1920,11 +1934,18 @@ class RawSource extends Source {
|
|
|
1920
1934
|
// only the string form, populated lazily by streamChunks, is
|
|
1921
1935
|
// safe to drop.
|
|
1922
1936
|
this._valueAsString = undefined;
|
|
1923
|
-
} else if (
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1937
|
+
} else if (
|
|
1938
|
+
this._valueAsBuffer !== undefined &&
|
|
1939
|
+
this._valueAsString !== undefined &&
|
|
1940
|
+
isLosslessUtf8(this._valueAsString, this._valueAsBuffer)
|
|
1941
|
+
) {
|
|
1942
|
+
// The value is string-backed (constructed from a string, or from a
|
|
1943
|
+
// buffer with `convertToString`) and a string copy exists that
|
|
1944
|
+
// encodes back to the same bytes, so the buffer can be rebuilt from
|
|
1945
|
+
// it and is safe to drop. The buffer stays when it is the only copy
|
|
1946
|
+
// (`convertToString` and no string cached yet) or when it is not
|
|
1947
|
+
// valid UTF-8, since decoding replaced bytes with U+FFFD.
|
|
1948
|
+
if (this._value === undefined) this._value = this._valueAsString;
|
|
1928
1949
|
this._valueAsBuffer = undefined;
|
|
1929
1950
|
}
|
|
1930
1951
|
}
|
|
@@ -1952,7 +1973,7 @@ module.exports = RawSource;
|
|
|
1952
1973
|
|
|
1953
1974
|
/***/ }),
|
|
1954
1975
|
|
|
1955
|
-
/***/
|
|
1976
|
+
/***/ 894:
|
|
1956
1977
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1957
1978
|
|
|
1958
1979
|
/*
|
|
@@ -1962,10 +1983,10 @@ module.exports = RawSource;
|
|
|
1962
1983
|
|
|
1963
1984
|
|
|
1964
1985
|
|
|
1965
|
-
const Source = __nccwpck_require__(
|
|
1966
|
-
const { getMap, getSourceAndMap } = __nccwpck_require__(
|
|
1967
|
-
const splitIntoLines = __nccwpck_require__(
|
|
1968
|
-
const streamChunks = __nccwpck_require__(
|
|
1986
|
+
const Source = __nccwpck_require__(478);
|
|
1987
|
+
const { getMap, getSourceAndMap } = __nccwpck_require__(75);
|
|
1988
|
+
const splitIntoLines = __nccwpck_require__(36);
|
|
1989
|
+
const streamChunks = __nccwpck_require__(275);
|
|
1969
1990
|
|
|
1970
1991
|
/** @typedef {import("./Source").ClearCacheOptions} ClearCacheOptions */
|
|
1971
1992
|
/** @typedef {import("./Source").HashLike} HashLike */
|
|
@@ -2712,7 +2733,7 @@ module.exports.Replacement = Replacement;
|
|
|
2712
2733
|
|
|
2713
2734
|
/***/ }),
|
|
2714
2735
|
|
|
2715
|
-
/***/
|
|
2736
|
+
/***/ 57:
|
|
2716
2737
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
2717
2738
|
|
|
2718
2739
|
/*
|
|
@@ -2722,7 +2743,7 @@ module.exports.Replacement = Replacement;
|
|
|
2722
2743
|
|
|
2723
2744
|
|
|
2724
2745
|
|
|
2725
|
-
const Source = __nccwpck_require__(
|
|
2746
|
+
const Source = __nccwpck_require__(478);
|
|
2726
2747
|
|
|
2727
2748
|
/** @typedef {import("./Source").HashLike} HashLike */
|
|
2728
2749
|
/** @typedef {import("./Source").MapOptions} MapOptions */
|
|
@@ -2799,7 +2820,7 @@ module.exports = SizeOnlySource;
|
|
|
2799
2820
|
|
|
2800
2821
|
/***/ }),
|
|
2801
2822
|
|
|
2802
|
-
/***/
|
|
2823
|
+
/***/ 478:
|
|
2803
2824
|
/***/ ((module) => {
|
|
2804
2825
|
|
|
2805
2826
|
/*
|
|
@@ -2934,7 +2955,7 @@ module.exports = Source;
|
|
|
2934
2955
|
|
|
2935
2956
|
/***/ }),
|
|
2936
2957
|
|
|
2937
|
-
/***/
|
|
2958
|
+
/***/ 915:
|
|
2938
2959
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
2939
2960
|
|
|
2940
2961
|
/*
|
|
@@ -2944,13 +2965,13 @@ module.exports = Source;
|
|
|
2944
2965
|
|
|
2945
2966
|
|
|
2946
2967
|
|
|
2947
|
-
const Source = __nccwpck_require__(
|
|
2948
|
-
const { getMap, getSourceAndMap } = __nccwpck_require__(
|
|
2949
|
-
const streamChunksOfCombinedSourceMap = __nccwpck_require__(
|
|
2950
|
-
const streamChunksOfSourceMap = __nccwpck_require__(
|
|
2968
|
+
const Source = __nccwpck_require__(478);
|
|
2969
|
+
const { getMap, getSourceAndMap } = __nccwpck_require__(75);
|
|
2970
|
+
const streamChunksOfCombinedSourceMap = __nccwpck_require__(12);
|
|
2971
|
+
const streamChunksOfSourceMap = __nccwpck_require__(953);
|
|
2951
2972
|
const {
|
|
2952
2973
|
isDualStringBufferCachingEnabled,
|
|
2953
|
-
} = __nccwpck_require__(
|
|
2974
|
+
} = __nccwpck_require__(477);
|
|
2954
2975
|
|
|
2955
2976
|
/** @typedef {import("./Source").ClearCacheOptions} ClearCacheOptions */
|
|
2956
2977
|
/** @typedef {import("./Source").HashLike} HashLike */
|
|
@@ -3390,7 +3411,7 @@ module.exports = SourceMapSource;
|
|
|
3390
3411
|
|
|
3391
3412
|
/***/ }),
|
|
3392
3413
|
|
|
3393
|
-
/***/
|
|
3414
|
+
/***/ 566:
|
|
3394
3415
|
/***/ ((module) => {
|
|
3395
3416
|
|
|
3396
3417
|
/*
|
|
@@ -3875,7 +3896,7 @@ module.exports.createMappingsWriter = createMappingsWriter;
|
|
|
3875
3896
|
|
|
3876
3897
|
/***/ }),
|
|
3877
3898
|
|
|
3878
|
-
/***/
|
|
3899
|
+
/***/ 75:
|
|
3879
3900
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
3880
3901
|
|
|
3881
3902
|
/*
|
|
@@ -3885,7 +3906,7 @@ module.exports.createMappingsWriter = createMappingsWriter;
|
|
|
3885
3906
|
|
|
3886
3907
|
|
|
3887
3908
|
|
|
3888
|
-
const { createMappingsWriter } = __nccwpck_require__(
|
|
3909
|
+
const { createMappingsWriter } = __nccwpck_require__(566);
|
|
3889
3910
|
|
|
3890
3911
|
/** @typedef {import("../Source").RawSourceMap} RawSourceMap */
|
|
3891
3912
|
/** @typedef {import("../Source").SourceAndMap} SourceAndMap */
|
|
@@ -3904,7 +3925,7 @@ let scopesHelpers;
|
|
|
3904
3925
|
* @returns {ReturnType<typeof import("./scopes").createScopesWriter>} writer
|
|
3905
3926
|
*/
|
|
3906
3927
|
const createScopesWriter = () => {
|
|
3907
|
-
if (scopesHelpers === undefined) scopesHelpers = __nccwpck_require__(
|
|
3928
|
+
if (scopesHelpers === undefined) scopesHelpers = __nccwpck_require__(708);
|
|
3908
3929
|
return scopesHelpers.createScopesWriter();
|
|
3909
3930
|
};
|
|
3910
3931
|
|
|
@@ -4133,7 +4154,7 @@ module.exports.getSourceAndMap = (inputSource, options) => {
|
|
|
4133
4154
|
|
|
4134
4155
|
/***/ }),
|
|
4135
4156
|
|
|
4136
|
-
/***/
|
|
4157
|
+
/***/ 845:
|
|
4137
4158
|
/***/ ((module) => {
|
|
4138
4159
|
|
|
4139
4160
|
/*
|
|
@@ -4187,7 +4208,7 @@ module.exports = getGeneratedSourceInfo;
|
|
|
4187
4208
|
|
|
4188
4209
|
/***/ }),
|
|
4189
4210
|
|
|
4190
|
-
/***/
|
|
4211
|
+
/***/ 432:
|
|
4191
4212
|
/***/ ((module) => {
|
|
4192
4213
|
|
|
4193
4214
|
/*
|
|
@@ -4218,7 +4239,7 @@ module.exports = getSource;
|
|
|
4218
4239
|
|
|
4219
4240
|
/***/ }),
|
|
4220
4241
|
|
|
4221
|
-
/***/
|
|
4242
|
+
/***/ 878:
|
|
4222
4243
|
/***/ ((module) => {
|
|
4223
4244
|
|
|
4224
4245
|
/*
|
|
@@ -4348,7 +4369,7 @@ module.exports = readMappings;
|
|
|
4348
4369
|
|
|
4349
4370
|
/***/ }),
|
|
4350
4371
|
|
|
4351
|
-
/***/
|
|
4372
|
+
/***/ 708:
|
|
4352
4373
|
/***/ ((module) => {
|
|
4353
4374
|
|
|
4354
4375
|
/*
|
|
@@ -4793,7 +4814,88 @@ module.exports.encodeScopes = encodeScopes;
|
|
|
4793
4814
|
|
|
4794
4815
|
/***/ }),
|
|
4795
4816
|
|
|
4796
|
-
/***/
|
|
4817
|
+
/***/ 847:
|
|
4818
|
+
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
4819
|
+
|
|
4820
|
+
/*
|
|
4821
|
+
MIT License http://www.opensource.org/licenses/mit-license.php
|
|
4822
|
+
Author Alexander Akait @alexander-akait
|
|
4823
|
+
*/
|
|
4824
|
+
|
|
4825
|
+
|
|
4826
|
+
|
|
4827
|
+
const getSource = __nccwpck_require__(432);
|
|
4828
|
+
const readMappings = __nccwpck_require__(878);
|
|
4829
|
+
|
|
4830
|
+
/** @typedef {import("../Source").RawSourceMap} RawSourceMap */
|
|
4831
|
+
|
|
4832
|
+
/**
|
|
4833
|
+
* Where a generated position came from: `line` counts from one, `column`
|
|
4834
|
+
* from zero, as in a stack trace.
|
|
4835
|
+
* @typedef {object} OriginalPosition
|
|
4836
|
+
* @property {string} source source, joined with the map's `sourceRoot`
|
|
4837
|
+
* @property {number} line line
|
|
4838
|
+
* @property {number} column column
|
|
4839
|
+
* @property {string | null} name name, if the mapping carries one
|
|
4840
|
+
*/
|
|
4841
|
+
|
|
4842
|
+
/**
|
|
4843
|
+
* Finds the original position of a generated one: the closest mapping at or
|
|
4844
|
+
* before `column` on `line`. Decodes the whole map, so it suits a one-off
|
|
4845
|
+
* lookup (an error location), not a loop over many positions.
|
|
4846
|
+
* @param {RawSourceMap | string | Buffer} sourceMap source map, or its JSON
|
|
4847
|
+
* @param {number} line generated line, counting from one
|
|
4848
|
+
* @param {number} column generated column, counting from zero
|
|
4849
|
+
* @returns {OriginalPosition | null} original position, or `null` when nothing maps there
|
|
4850
|
+
*/
|
|
4851
|
+
const originalPositionFor = (sourceMap, line, column) => {
|
|
4852
|
+
/** @type {RawSourceMap} */
|
|
4853
|
+
const map =
|
|
4854
|
+
typeof sourceMap === "string" || Buffer.isBuffer(sourceMap)
|
|
4855
|
+
? JSON.parse(sourceMap.toString("utf8"))
|
|
4856
|
+
: sourceMap;
|
|
4857
|
+
let sourceIndex = -1;
|
|
4858
|
+
let originalLine = -1;
|
|
4859
|
+
let originalColumn = -1;
|
|
4860
|
+
let nameIndex = -1;
|
|
4861
|
+
// Mappings arrive in generated order, so the last one at or before
|
|
4862
|
+
// `column` on `line` is the closest.
|
|
4863
|
+
readMappings(
|
|
4864
|
+
map.mappings,
|
|
4865
|
+
(
|
|
4866
|
+
generatedLine,
|
|
4867
|
+
generatedColumn,
|
|
4868
|
+
mappingSourceIndex,
|
|
4869
|
+
mappingOriginalLine,
|
|
4870
|
+
mappingOriginalColumn,
|
|
4871
|
+
mappingNameIndex,
|
|
4872
|
+
) => {
|
|
4873
|
+
if (generatedLine !== line || generatedColumn > column) return;
|
|
4874
|
+
sourceIndex = mappingSourceIndex;
|
|
4875
|
+
originalLine = mappingOriginalLine;
|
|
4876
|
+
originalColumn = mappingOriginalColumn;
|
|
4877
|
+
nameIndex = mappingNameIndex;
|
|
4878
|
+
},
|
|
4879
|
+
);
|
|
4880
|
+
// An index past the end of `sources` or `names` is a malformed map.
|
|
4881
|
+
if (sourceIndex < 0 || sourceIndex >= map.sources.length) return null;
|
|
4882
|
+
return {
|
|
4883
|
+
source: /** @type {string} */ (getSource(map, sourceIndex)),
|
|
4884
|
+
line: originalLine,
|
|
4885
|
+
column: originalColumn,
|
|
4886
|
+
name:
|
|
4887
|
+
nameIndex >= 0 && map.names && nameIndex < map.names.length
|
|
4888
|
+
? map.names[nameIndex]
|
|
4889
|
+
: null,
|
|
4890
|
+
};
|
|
4891
|
+
};
|
|
4892
|
+
|
|
4893
|
+
module.exports.originalPositionFor = originalPositionFor;
|
|
4894
|
+
|
|
4895
|
+
|
|
4896
|
+
/***/ }),
|
|
4897
|
+
|
|
4898
|
+
/***/ 36:
|
|
4797
4899
|
/***/ ((module) => {
|
|
4798
4900
|
|
|
4799
4901
|
/*
|
|
@@ -4834,7 +4936,7 @@ module.exports = splitIntoLines;
|
|
|
4834
4936
|
|
|
4835
4937
|
/***/ }),
|
|
4836
4938
|
|
|
4837
|
-
/***/
|
|
4939
|
+
/***/ 259:
|
|
4838
4940
|
/***/ ((module) => {
|
|
4839
4941
|
|
|
4840
4942
|
/*
|
|
@@ -4967,7 +5069,7 @@ module.exports.eachPotentialToken = eachPotentialToken;
|
|
|
4967
5069
|
|
|
4968
5070
|
/***/ }),
|
|
4969
5071
|
|
|
4970
|
-
/***/
|
|
5072
|
+
/***/ 574:
|
|
4971
5073
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
4972
5074
|
|
|
4973
5075
|
/*
|
|
@@ -4977,8 +5079,8 @@ module.exports.eachPotentialToken = eachPotentialToken;
|
|
|
4977
5079
|
|
|
4978
5080
|
|
|
4979
5081
|
|
|
4980
|
-
const { createMappingsWriter } = __nccwpck_require__(
|
|
4981
|
-
const streamChunks = __nccwpck_require__(
|
|
5082
|
+
const { createMappingsWriter } = __nccwpck_require__(566);
|
|
5083
|
+
const streamChunks = __nccwpck_require__(275);
|
|
4982
5084
|
|
|
4983
5085
|
/** @typedef {import("../Source").RawSourceMap} RawSourceMap */
|
|
4984
5086
|
/** @typedef {import("./streamChunks").GeneratedSourceInfo} GeneratedSourceInfo */
|
|
@@ -4998,7 +5100,7 @@ let scopesHelpers;
|
|
|
4998
5100
|
* @returns {ReturnType<typeof import("./scopes").createScopesWriter>} writer
|
|
4999
5101
|
*/
|
|
5000
5102
|
const createScopesWriter = () => {
|
|
5001
|
-
if (scopesHelpers === undefined) scopesHelpers = __nccwpck_require__(
|
|
5103
|
+
if (scopesHelpers === undefined) scopesHelpers = __nccwpck_require__(708);
|
|
5002
5104
|
return scopesHelpers.createScopesWriter();
|
|
5003
5105
|
};
|
|
5004
5106
|
|
|
@@ -5136,7 +5238,7 @@ module.exports = streamAndGetSourceAndMap;
|
|
|
5136
5238
|
|
|
5137
5239
|
/***/ }),
|
|
5138
5240
|
|
|
5139
|
-
/***/
|
|
5241
|
+
/***/ 275:
|
|
5140
5242
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
5141
5243
|
|
|
5142
5244
|
/*
|
|
@@ -5146,8 +5248,8 @@ module.exports = streamAndGetSourceAndMap;
|
|
|
5146
5248
|
|
|
5147
5249
|
|
|
5148
5250
|
|
|
5149
|
-
const streamChunksOfRawSource = __nccwpck_require__(
|
|
5150
|
-
const streamChunksOfSourceMap = __nccwpck_require__(
|
|
5251
|
+
const streamChunksOfRawSource = __nccwpck_require__(139);
|
|
5252
|
+
const streamChunksOfSourceMap = __nccwpck_require__(953);
|
|
5151
5253
|
|
|
5152
5254
|
/** @typedef {import("../Source")} Source */
|
|
5153
5255
|
/** @typedef {import("./getGeneratedSourceInfo").GeneratedSourceInfo} GeneratedSourceInfo */
|
|
@@ -5206,7 +5308,7 @@ module.exports = (source, options, onChunk, onSource, onName) => {
|
|
|
5206
5308
|
|
|
5207
5309
|
/***/ }),
|
|
5208
5310
|
|
|
5209
|
-
/***/
|
|
5311
|
+
/***/ 12:
|
|
5210
5312
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
5211
5313
|
|
|
5212
5314
|
/*
|
|
@@ -5216,8 +5318,8 @@ module.exports = (source, options, onChunk, onSource, onName) => {
|
|
|
5216
5318
|
|
|
5217
5319
|
|
|
5218
5320
|
|
|
5219
|
-
const splitIntoLines = __nccwpck_require__(
|
|
5220
|
-
const streamChunksOfSourceMap = __nccwpck_require__(
|
|
5321
|
+
const splitIntoLines = __nccwpck_require__(36);
|
|
5322
|
+
const streamChunksOfSourceMap = __nccwpck_require__(953);
|
|
5221
5323
|
|
|
5222
5324
|
/** @typedef {import("../Source").RawSourceMap} RawSourceMap */
|
|
5223
5325
|
/** @typedef {import("./getGeneratedSourceInfo").GeneratedSourceInfo} GeneratedSourceInfo */
|
|
@@ -5583,7 +5685,7 @@ module.exports = streamChunksOfCombinedSourceMap;
|
|
|
5583
5685
|
|
|
5584
5686
|
/***/ }),
|
|
5585
5687
|
|
|
5586
|
-
/***/
|
|
5688
|
+
/***/ 139:
|
|
5587
5689
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
5588
5690
|
|
|
5589
5691
|
/*
|
|
@@ -5593,7 +5695,7 @@ module.exports = streamChunksOfCombinedSourceMap;
|
|
|
5593
5695
|
|
|
5594
5696
|
|
|
5595
5697
|
|
|
5596
|
-
const getGeneratedSourceInfo = __nccwpck_require__(
|
|
5698
|
+
const getGeneratedSourceInfo = __nccwpck_require__(845);
|
|
5597
5699
|
|
|
5598
5700
|
/** @typedef {import("./getGeneratedSourceInfo").GeneratedSourceInfo} GeneratedSourceInfo */
|
|
5599
5701
|
/** @typedef {import("./streamChunks").OnChunk} OnChunk */
|
|
@@ -5652,7 +5754,7 @@ module.exports = (source, onChunk, onSource, onName, finalSource) =>
|
|
|
5652
5754
|
|
|
5653
5755
|
/***/ }),
|
|
5654
5756
|
|
|
5655
|
-
/***/
|
|
5757
|
+
/***/ 953:
|
|
5656
5758
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
5657
5759
|
|
|
5658
5760
|
/*
|
|
@@ -5662,10 +5764,10 @@ module.exports = (source, onChunk, onSource, onName, finalSource) =>
|
|
|
5662
5764
|
|
|
5663
5765
|
|
|
5664
5766
|
|
|
5665
|
-
const getGeneratedSourceInfo = __nccwpck_require__(
|
|
5666
|
-
const getSource = __nccwpck_require__(
|
|
5667
|
-
const readMappings = __nccwpck_require__(
|
|
5668
|
-
const splitIntoLines = __nccwpck_require__(
|
|
5767
|
+
const getGeneratedSourceInfo = __nccwpck_require__(845);
|
|
5768
|
+
const getSource = __nccwpck_require__(432);
|
|
5769
|
+
const readMappings = __nccwpck_require__(878);
|
|
5770
|
+
const splitIntoLines = __nccwpck_require__(36);
|
|
5669
5771
|
|
|
5670
5772
|
/** @typedef {import("../Source").RawSourceMap} RawSourceMap */
|
|
5671
5773
|
/** @typedef {import("./getGeneratedSourceInfo").GeneratedSourceInfo} GeneratedSourceInfo */
|
|
@@ -5701,7 +5803,9 @@ const streamChunksOfSourceMapFull = (
|
|
|
5701
5803
|
onSource(
|
|
5702
5804
|
i,
|
|
5703
5805
|
getSource(sourceMap, i),
|
|
5704
|
-
|
|
5806
|
+
sourcesContent && typeof sourcesContent[i] === "string"
|
|
5807
|
+
? sourcesContent[i]
|
|
5808
|
+
: undefined,
|
|
5705
5809
|
);
|
|
5706
5810
|
}
|
|
5707
5811
|
if (names) {
|
|
@@ -5872,7 +5976,9 @@ const streamChunksOfSourceMapLinesFull = (
|
|
|
5872
5976
|
onSource(
|
|
5873
5977
|
i,
|
|
5874
5978
|
getSource(sourceMap, i),
|
|
5875
|
-
|
|
5979
|
+
sourcesContent && typeof sourcesContent[i] === "string"
|
|
5980
|
+
? sourcesContent[i]
|
|
5981
|
+
: undefined,
|
|
5876
5982
|
);
|
|
5877
5983
|
}
|
|
5878
5984
|
|
|
@@ -5977,7 +6083,9 @@ const streamChunksOfSourceMapFinal = (
|
|
|
5977
6083
|
onSource(
|
|
5978
6084
|
i,
|
|
5979
6085
|
getSource(sourceMap, i),
|
|
5980
|
-
|
|
6086
|
+
sourcesContent && typeof sourcesContent[i] === "string"
|
|
6087
|
+
? sourcesContent[i]
|
|
6088
|
+
: undefined,
|
|
5981
6089
|
);
|
|
5982
6090
|
}
|
|
5983
6091
|
if (names) {
|
|
@@ -6061,7 +6169,9 @@ const streamChunksOfSourceMapLinesFinal = (
|
|
|
6061
6169
|
onSource(
|
|
6062
6170
|
i,
|
|
6063
6171
|
getSource(sourceMap, i),
|
|
6064
|
-
|
|
6172
|
+
sourcesContent && typeof sourcesContent[i] === "string"
|
|
6173
|
+
? sourcesContent[i]
|
|
6174
|
+
: undefined,
|
|
6065
6175
|
);
|
|
6066
6176
|
}
|
|
6067
6177
|
|
|
@@ -6166,7 +6276,7 @@ module.exports = (
|
|
|
6166
6276
|
|
|
6167
6277
|
/***/ }),
|
|
6168
6278
|
|
|
6169
|
-
/***/
|
|
6279
|
+
/***/ 477:
|
|
6170
6280
|
/***/ ((module) => {
|
|
6171
6281
|
|
|
6172
6282
|
/*
|
|
@@ -6290,7 +6400,7 @@ module.exports = {
|
|
|
6290
6400
|
|
|
6291
6401
|
/***/ }),
|
|
6292
6402
|
|
|
6293
|
-
/***/
|
|
6403
|
+
/***/ 571:
|
|
6294
6404
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
6295
6405
|
|
|
6296
6406
|
/*
|
|
@@ -6377,41 +6487,44 @@ module.exports = mergeExports(
|
|
|
6377
6487
|
{},
|
|
6378
6488
|
{
|
|
6379
6489
|
get Source() {
|
|
6380
|
-
return __nccwpck_require__(
|
|
6490
|
+
return __nccwpck_require__(478);
|
|
6381
6491
|
},
|
|
6382
6492
|
get RawSource() {
|
|
6383
|
-
return __nccwpck_require__(
|
|
6493
|
+
return __nccwpck_require__(792);
|
|
6384
6494
|
},
|
|
6385
6495
|
get OriginalSource() {
|
|
6386
|
-
return __nccwpck_require__(
|
|
6496
|
+
return __nccwpck_require__(605);
|
|
6387
6497
|
},
|
|
6388
6498
|
get SourceMapSource() {
|
|
6389
|
-
return __nccwpck_require__(
|
|
6499
|
+
return __nccwpck_require__(915);
|
|
6390
6500
|
},
|
|
6391
6501
|
get CachedSource() {
|
|
6392
|
-
return __nccwpck_require__(
|
|
6502
|
+
return __nccwpck_require__(228);
|
|
6393
6503
|
},
|
|
6394
6504
|
get ConcatSource() {
|
|
6395
|
-
return __nccwpck_require__(
|
|
6505
|
+
return __nccwpck_require__(862);
|
|
6396
6506
|
},
|
|
6397
6507
|
get ReplaceSource() {
|
|
6398
|
-
return __nccwpck_require__(
|
|
6508
|
+
return __nccwpck_require__(894);
|
|
6399
6509
|
},
|
|
6400
6510
|
get PrefixSource() {
|
|
6401
|
-
return __nccwpck_require__(
|
|
6511
|
+
return __nccwpck_require__(370);
|
|
6402
6512
|
},
|
|
6403
6513
|
get SizeOnlySource() {
|
|
6404
|
-
return __nccwpck_require__(
|
|
6514
|
+
return __nccwpck_require__(57);
|
|
6405
6515
|
},
|
|
6406
6516
|
get CompatSource() {
|
|
6407
|
-
return __nccwpck_require__(
|
|
6517
|
+
return __nccwpck_require__(92);
|
|
6408
6518
|
},
|
|
6409
6519
|
util: {
|
|
6410
6520
|
get scopes() {
|
|
6411
|
-
return __nccwpck_require__(
|
|
6521
|
+
return __nccwpck_require__(708);
|
|
6522
|
+
},
|
|
6523
|
+
get sourceMap() {
|
|
6524
|
+
return __nccwpck_require__(847);
|
|
6412
6525
|
},
|
|
6413
6526
|
get stringBufferUtils() {
|
|
6414
|
-
return __nccwpck_require__(
|
|
6527
|
+
return __nccwpck_require__(477);
|
|
6415
6528
|
},
|
|
6416
6529
|
},
|
|
6417
6530
|
},
|
|
@@ -6462,7 +6575,7 @@ module.exports = mergeExports(
|
|
|
6462
6575
|
/******/ // startup
|
|
6463
6576
|
/******/ // Load entry module and return exports
|
|
6464
6577
|
/******/ // This entry module is referenced by other modules so it can't be inlined
|
|
6465
|
-
/******/ var __webpack_exports__ = __nccwpck_require__(
|
|
6578
|
+
/******/ var __webpack_exports__ = __nccwpck_require__(571);
|
|
6466
6579
|
/******/ module.exports = __webpack_exports__;
|
|
6467
6580
|
/******/
|
|
6468
6581
|
/******/ })()
|
|
@@ -1,14 +1,4 @@
|
|
|
1
1
|
export = RawSource;
|
|
2
|
-
/** @typedef {import("./Source").ClearCacheOptions} ClearCacheOptions */
|
|
3
|
-
/** @typedef {import("./Source").HashLike} HashLike */
|
|
4
|
-
/** @typedef {import("./Source").MapOptions} MapOptions */
|
|
5
|
-
/** @typedef {import("./Source").RawSourceMap} RawSourceMap */
|
|
6
|
-
/** @typedef {import("./Source").SourceValue} SourceValue */
|
|
7
|
-
/** @typedef {import("./helpers/getGeneratedSourceInfo").GeneratedSourceInfo} GeneratedSourceInfo */
|
|
8
|
-
/** @typedef {import("./helpers/streamChunks").OnChunk} OnChunk */
|
|
9
|
-
/** @typedef {import("./helpers/streamChunks").OnName} OnName */
|
|
10
|
-
/** @typedef {import("./helpers/streamChunks").OnSource} OnSource */
|
|
11
|
-
/** @typedef {import("./helpers/streamChunks").Options} Options */
|
|
12
2
|
declare class RawSource extends Source {
|
|
13
3
|
/**
|
|
14
4
|
* @param {string | Buffer} value value
|