@parcel/utils 2.8.4-nightly.0 → 2.9.1
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/lib/index.js +145 -87
- package/lib/index.js.map +1 -1
- package/package.json +8 -8
- package/src/glob.js +13 -1
- package/src/index.js +8 -1
- package/src/schema.js +1 -2
- package/src/sourcemap.js +6 -3
package/lib/index.js
CHANGED
|
@@ -3447,6 +3447,7 @@ $parcel$export(module.exports, "makeDeferredWithPromise", () => $75952a43539cb60
|
|
|
3447
3447
|
$parcel$export(module.exports, "getProgressMessage", () => $01f892dcf45b57a7$export$d28945a2f2ba5e30);
|
|
3448
3448
|
$parcel$export(module.exports, "isGlob", () => $e8d0e504a4244d84$export$f3a2344a73dbdd42);
|
|
3449
3449
|
$parcel$export(module.exports, "isGlobMatch", () => $e8d0e504a4244d84$export$16e6d319a883f04e);
|
|
3450
|
+
$parcel$export(module.exports, "globMatch", () => $e8d0e504a4244d84$export$73b12c6cc27aa6c0);
|
|
3450
3451
|
$parcel$export(module.exports, "globSync", () => $e8d0e504a4244d84$export$42275ba87174c828);
|
|
3451
3452
|
$parcel$export(module.exports, "glob", () => $e8d0e504a4244d84$export$442f1a04865e4790);
|
|
3452
3453
|
$parcel$export(module.exports, "globToRegex", () => $e8d0e504a4244d84$export$c0436a5422df81e4);
|
|
@@ -33698,6 +33699,10 @@ function $e8d0e504a4244d84$export$16e6d319a883f04e(filePath, glob, opts) {
|
|
|
33698
33699
|
glob = Array.isArray(glob) ? glob.map((0, $3dff16cfd200ff25$export$16778b798ae8e49d)) : (0, $3dff16cfd200ff25$export$16778b798ae8e49d)(glob);
|
|
33699
33700
|
return (0, $fec3b4fc54d3756a$exports.isMatch)(filePath, glob, opts);
|
|
33700
33701
|
}
|
|
33702
|
+
function $e8d0e504a4244d84$export$73b12c6cc27aa6c0(values, glob, opts) {
|
|
33703
|
+
glob = Array.isArray(glob) ? glob.map((0, $3dff16cfd200ff25$export$16778b798ae8e49d)) : (0, $3dff16cfd200ff25$export$16778b798ae8e49d)(glob);
|
|
33704
|
+
return (0, (/*@__PURE__*/$parcel$interopDefault($fec3b4fc54d3756a$exports)))(values, glob, opts);
|
|
33705
|
+
}
|
|
33701
33706
|
function $e8d0e504a4244d84$export$c0436a5422df81e4(glob, opts) {
|
|
33702
33707
|
return (0, $fec3b4fc54d3756a$exports.makeRe)(glob, opts);
|
|
33703
33708
|
}
|
|
@@ -33718,7 +33723,8 @@ function $e8d0e504a4244d84$export$42275ba87174c828(p, fs, options) {
|
|
|
33718
33723
|
return fs.readdirSync(p, opts);
|
|
33719
33724
|
}
|
|
33720
33725
|
}
|
|
33721
|
-
};
|
|
33726
|
+
};
|
|
33727
|
+
// $FlowFixMe
|
|
33722
33728
|
return (0, (/*@__PURE__*/$parcel$interopDefault($21b1b538e1d1be85$exports))).sync((0, $3dff16cfd200ff25$export$16778b798ae8e49d)(p), options);
|
|
33723
33729
|
}
|
|
33724
33730
|
function $e8d0e504a4244d84$export$442f1a04865e4790(p, fs, options) {
|
|
@@ -33754,7 +33760,8 @@ function $e8d0e504a4244d84$export$442f1a04865e4790(p, fs, options) {
|
|
|
33754
33760
|
}
|
|
33755
33761
|
}
|
|
33756
33762
|
}
|
|
33757
|
-
};
|
|
33763
|
+
};
|
|
33764
|
+
// $FlowFixMe Added in Flow 0.121.0 upgrade in #4381
|
|
33758
33765
|
return (0, (/*@__PURE__*/$parcel$interopDefault($21b1b538e1d1be85$exports)))((0, $3dff16cfd200ff25$export$16778b798ae8e49d)(p), options);
|
|
33759
33766
|
}
|
|
33760
33767
|
|
|
@@ -33780,7 +33787,8 @@ function $275c1a71c92a4142$export$2e2bcd8739ae039(files) {
|
|
|
33780
33787
|
}
|
|
33781
33788
|
}
|
|
33782
33789
|
return cur ? cur.dir : process.cwd();
|
|
33783
|
-
}
|
|
33790
|
+
}
|
|
33791
|
+
// Transforms a path like `packages/*/src/index.js` to the root of the glob, `packages/`
|
|
33784
33792
|
function $275c1a71c92a4142$var$findGlobRoot(dir) {
|
|
33785
33793
|
let parts = dir.split((0, ($parcel$interopDefault($8C1kk$path))).sep);
|
|
33786
33794
|
let last = parts.length;
|
|
@@ -33823,7 +33831,9 @@ var $7cae98672dfb03cc$var$nonLocalhostDomainRE = /^[^\s\.]+\.\S{2,}$/;
|
|
|
33823
33831
|
}
|
|
33824
33832
|
|
|
33825
33833
|
|
|
33826
|
-
|
|
33834
|
+
// Matches anchor (ie: #raptors)
|
|
33835
|
+
const $f7d48e99e9c9e3b2$var$ANCHOR_REGEXP = /^#/;
|
|
33836
|
+
// Matches scheme (ie: tel:, mailto:, data:, itms-apps:)
|
|
33827
33837
|
const $f7d48e99e9c9e3b2$var$SCHEME_REGEXP = /^[a-z][a-z0-9\-+.]*:/i;
|
|
33828
33838
|
function $f7d48e99e9c9e3b2$export$2e2bcd8739ae039(url) {
|
|
33829
33839
|
return (0, (/*@__PURE__*/$parcel$interopDefault($7cae98672dfb03cc$exports)))(url) || $f7d48e99e9c9e3b2$var$ANCHOR_REGEXP.test(url) || $f7d48e99e9c9e3b2$var$SCHEME_REGEXP.test(url);
|
|
@@ -34133,7 +34143,8 @@ async function $f02d6a9d30f55938$export$2e2bcd8739ae039(diagnostic, options, ter
|
|
|
34133
34143
|
if (code != null) formattedCodeFrame = (0, ($parcel$interopDefault($8C1kk$parcelcodeframe)))(code, highlights, {
|
|
34134
34144
|
useColor: true,
|
|
34135
34145
|
syntaxHighlighting: true,
|
|
34136
|
-
language:
|
|
34146
|
+
language: // $FlowFixMe sketchy null checks do not matter here...
|
|
34147
|
+
codeFrame.language || (filePath != null ? (0, ($parcel$interopDefault($8C1kk$path))).extname(filePath).substr(1) : undefined),
|
|
34137
34148
|
terminalWidth: terminalWidth
|
|
34138
34149
|
});
|
|
34139
34150
|
let location;
|
|
@@ -34167,7 +34178,8 @@ function $75952a43539cb60f$export$93f345b3f0dd27e7() {
|
|
|
34167
34178
|
resolve: resolve,
|
|
34168
34179
|
reject: reject
|
|
34169
34180
|
};
|
|
34170
|
-
});
|
|
34181
|
+
});
|
|
34182
|
+
// Promise constructor callback executes synchronously, so this is defined
|
|
34171
34183
|
(0, ($parcel$interopDefault($8C1kk$assert)))(deferred != null);
|
|
34172
34184
|
return {
|
|
34173
34185
|
deferred: deferred,
|
|
@@ -34252,26 +34264,18 @@ class $b0fd219fea43bcac$export$2e2bcd8739ae039 {
|
|
|
34252
34264
|
|
|
34253
34265
|
|
|
34254
34266
|
|
|
34255
|
-
|
|
34256
|
-
|
|
34257
|
-
$parcel$export($f48e6c7a66080865$exports, "distance", () => $f48e6c7a66080865$export$9f17032d917177de, (v) => $f48e6c7a66080865$export$9f17032d917177de = v);
|
|
34258
|
-
$parcel$export($f48e6c7a66080865$exports, "closest", () => $f48e6c7a66080865$export$ff7f7c97cdce86e, (v) => $f48e6c7a66080865$export$ff7f7c97cdce86e = v);
|
|
34259
|
-
var $f48e6c7a66080865$export$9f17032d917177de;
|
|
34260
|
-
var $f48e6c7a66080865$export$ff7f7c97cdce86e;
|
|
34261
|
-
const $f48e6c7a66080865$var$peq = new Uint32Array(0x10000);
|
|
34262
|
-
const $f48e6c7a66080865$var$myers_32 = (a, b)=>{
|
|
34267
|
+
const $c066e3e3e5b06560$var$peq = new Uint32Array(0x10000);
|
|
34268
|
+
const $c066e3e3e5b06560$var$myers_32 = (a, b)=>{
|
|
34263
34269
|
const n = a.length;
|
|
34264
34270
|
const m = b.length;
|
|
34265
34271
|
const lst = 1 << n - 1;
|
|
34266
34272
|
let pv = -1;
|
|
34267
34273
|
let mv = 0;
|
|
34268
34274
|
let sc = n;
|
|
34269
|
-
let i =
|
|
34270
|
-
while(i--)$
|
|
34271
|
-
i = n;
|
|
34272
|
-
while(i--)$f48e6c7a66080865$var$peq[a.charCodeAt(i)] |= 1 << i;
|
|
34275
|
+
let i = n;
|
|
34276
|
+
while(i--)$c066e3e3e5b06560$var$peq[a.charCodeAt(i)] |= 1 << i;
|
|
34273
34277
|
for(i = 0; i < m; i++){
|
|
34274
|
-
let eq = $
|
|
34278
|
+
let eq = $c066e3e3e5b06560$var$peq[b.charCodeAt(i)];
|
|
34275
34279
|
const xv = eq | mv;
|
|
34276
34280
|
eq |= (eq & pv) + pv ^ pv;
|
|
34277
34281
|
mv |= ~(eq | pv);
|
|
@@ -34282,16 +34286,17 @@ const $f48e6c7a66080865$var$myers_32 = (a, b)=>{
|
|
|
34282
34286
|
pv = pv << 1 | ~(xv | mv);
|
|
34283
34287
|
mv &= xv;
|
|
34284
34288
|
}
|
|
34289
|
+
i = n;
|
|
34290
|
+
while(i--)$c066e3e3e5b06560$var$peq[a.charCodeAt(i)] = 0;
|
|
34285
34291
|
return sc;
|
|
34286
34292
|
};
|
|
34287
|
-
const $
|
|
34293
|
+
const $c066e3e3e5b06560$var$myers_x = (b, a)=>{
|
|
34288
34294
|
const n = a.length;
|
|
34289
34295
|
const m = b.length;
|
|
34290
34296
|
const mhc = [];
|
|
34291
34297
|
const phc = [];
|
|
34292
34298
|
const hsize = Math.ceil(n / 32);
|
|
34293
34299
|
const vsize = Math.ceil(m / 32);
|
|
34294
|
-
let score = m;
|
|
34295
34300
|
for(let i = 0; i < hsize; i++){
|
|
34296
34301
|
phc[i] = -1;
|
|
34297
34302
|
mhc[i] = 0;
|
|
@@ -34301,71 +34306,68 @@ const $f48e6c7a66080865$var$myers_x = (b, a)=>{
|
|
|
34301
34306
|
let mv = 0;
|
|
34302
34307
|
let pv = -1;
|
|
34303
34308
|
const start = j * 32;
|
|
34304
|
-
const vlen = Math.min(32, m
|
|
34305
|
-
let k =
|
|
34306
|
-
while(k--)$f48e6c7a66080865$var$peq[a.charCodeAt(k)] = 0;
|
|
34307
|
-
for(k = start; k < start + vlen; k++)$f48e6c7a66080865$var$peq[b.charCodeAt(k)] |= 1 << k;
|
|
34308
|
-
score = m;
|
|
34309
|
+
const vlen = Math.min(32, m) + start;
|
|
34310
|
+
for(let k = start; k < vlen; k++)$c066e3e3e5b06560$var$peq[b.charCodeAt(k)] |= 1 << k;
|
|
34309
34311
|
for(let i = 0; i < n; i++){
|
|
34310
|
-
const eq = $
|
|
34311
|
-
const pb = phc[i / 32 | 0] >>> i
|
|
34312
|
-
const mb = mhc[i / 32 | 0] >>> i
|
|
34312
|
+
const eq = $c066e3e3e5b06560$var$peq[a.charCodeAt(i)];
|
|
34313
|
+
const pb = phc[i / 32 | 0] >>> i & 1;
|
|
34314
|
+
const mb = mhc[i / 32 | 0] >>> i & 1;
|
|
34313
34315
|
const xv = eq | mv;
|
|
34314
34316
|
const xh = ((eq | mb) & pv) + pv ^ pv | eq | mb;
|
|
34315
34317
|
let ph = mv | ~(xh | pv);
|
|
34316
34318
|
let mh = pv & xh;
|
|
34317
|
-
if (ph >>> 31 ^ pb) phc[i / 32 | 0] ^= 1 << i
|
|
34318
|
-
if (mh >>> 31 ^ mb) mhc[i / 32 | 0] ^= 1 << i
|
|
34319
|
+
if (ph >>> 31 ^ pb) phc[i / 32 | 0] ^= 1 << i;
|
|
34320
|
+
if (mh >>> 31 ^ mb) mhc[i / 32 | 0] ^= 1 << i;
|
|
34319
34321
|
ph = ph << 1 | pb;
|
|
34320
34322
|
mh = mh << 1 | mb;
|
|
34321
34323
|
pv = mh | ~(xv | ph);
|
|
34322
34324
|
mv = ph & xv;
|
|
34323
34325
|
}
|
|
34326
|
+
for(let k = start; k < vlen; k++)$c066e3e3e5b06560$var$peq[b.charCodeAt(k)] = 0;
|
|
34324
34327
|
}
|
|
34325
34328
|
let mv = 0;
|
|
34326
34329
|
let pv = -1;
|
|
34327
34330
|
const start = j * 32;
|
|
34328
|
-
const vlen = Math.min(32, m - start);
|
|
34329
|
-
let k =
|
|
34330
|
-
|
|
34331
|
-
for(k = start; k < start + vlen; k++)$f48e6c7a66080865$var$peq[b.charCodeAt(k)] |= 1 << k;
|
|
34332
|
-
score = m;
|
|
34331
|
+
const vlen = Math.min(32, m - start) + start;
|
|
34332
|
+
for(let k = start; k < vlen; k++)$c066e3e3e5b06560$var$peq[b.charCodeAt(k)] |= 1 << k;
|
|
34333
|
+
let score = m;
|
|
34333
34334
|
for(let i = 0; i < n; i++){
|
|
34334
|
-
const eq = $
|
|
34335
|
-
const pb = phc[i / 32 | 0] >>> i
|
|
34336
|
-
const mb = mhc[i / 32 | 0] >>> i
|
|
34335
|
+
const eq = $c066e3e3e5b06560$var$peq[a.charCodeAt(i)];
|
|
34336
|
+
const pb = phc[i / 32 | 0] >>> i & 1;
|
|
34337
|
+
const mb = mhc[i / 32 | 0] >>> i & 1;
|
|
34337
34338
|
const xv = eq | mv;
|
|
34338
34339
|
const xh = ((eq | mb) & pv) + pv ^ pv | eq | mb;
|
|
34339
34340
|
let ph = mv | ~(xh | pv);
|
|
34340
34341
|
let mh = pv & xh;
|
|
34341
|
-
score += ph >>> m
|
|
34342
|
-
score -= mh >>> m
|
|
34343
|
-
if (ph >>> 31 ^ pb) phc[i / 32 | 0] ^= 1 << i
|
|
34344
|
-
if (mh >>> 31 ^ mb) mhc[i / 32 | 0] ^= 1 << i
|
|
34342
|
+
score += ph >>> m - 1 & 1;
|
|
34343
|
+
score -= mh >>> m - 1 & 1;
|
|
34344
|
+
if (ph >>> 31 ^ pb) phc[i / 32 | 0] ^= 1 << i;
|
|
34345
|
+
if (mh >>> 31 ^ mb) mhc[i / 32 | 0] ^= 1 << i;
|
|
34345
34346
|
ph = ph << 1 | pb;
|
|
34346
34347
|
mh = mh << 1 | mb;
|
|
34347
34348
|
pv = mh | ~(xv | ph);
|
|
34348
34349
|
mv = ph & xv;
|
|
34349
34350
|
}
|
|
34351
|
+
for(let k = start; k < vlen; k++)$c066e3e3e5b06560$var$peq[b.charCodeAt(k)] = 0;
|
|
34350
34352
|
return score;
|
|
34351
34353
|
};
|
|
34352
|
-
$
|
|
34354
|
+
const $c066e3e3e5b06560$export$9f17032d917177de = (a, b)=>{
|
|
34353
34355
|
if (a.length < b.length) {
|
|
34354
34356
|
const tmp = b;
|
|
34355
34357
|
b = a;
|
|
34356
34358
|
a = tmp;
|
|
34357
34359
|
}
|
|
34358
34360
|
if (b.length === 0) return a.length;
|
|
34359
|
-
if (a.length <= 32) return $
|
|
34360
|
-
return $
|
|
34361
|
+
if (a.length <= 32) return $c066e3e3e5b06560$var$myers_32(a, b);
|
|
34362
|
+
return $c066e3e3e5b06560$var$myers_x(a, b);
|
|
34361
34363
|
};
|
|
34362
|
-
$
|
|
34364
|
+
const $c066e3e3e5b06560$export$ff7f7c97cdce86e = (str, arr)=>{
|
|
34363
34365
|
let min_distance = Infinity;
|
|
34364
34366
|
let min_index = 0;
|
|
34365
34367
|
for(let i = 0; i < arr.length; i++){
|
|
34366
|
-
const
|
|
34367
|
-
if (
|
|
34368
|
-
min_distance =
|
|
34368
|
+
const dist = $c066e3e3e5b06560$export$9f17032d917177de(str, arr[i]);
|
|
34369
|
+
if (dist < min_distance) {
|
|
34370
|
+
min_distance = dist;
|
|
34369
34371
|
min_index = i;
|
|
34370
34372
|
}
|
|
34371
34373
|
}
|
|
@@ -34391,11 +34393,13 @@ function $4ca1027d34905147$var$validateSchema(schema, data) {
|
|
|
34391
34393
|
else switch(schemaNode.type){
|
|
34392
34394
|
case "array":
|
|
34393
34395
|
if (schemaNode.items) {
|
|
34394
|
-
let results = [];
|
|
34396
|
+
let results = [];
|
|
34397
|
+
// $FlowFixMe type was already checked
|
|
34395
34398
|
for(let i = 0; i < dataNode.length; i++){
|
|
34396
34399
|
let result = walk([
|
|
34397
34400
|
schemaNode.items
|
|
34398
|
-
].concat(schemaAncestors),
|
|
34401
|
+
].concat(schemaAncestors), // $FlowFixMe type was already checked
|
|
34402
|
+
dataNode[i], dataPath + "/" + i);
|
|
34399
34403
|
if (result) results.push(result);
|
|
34400
34404
|
}
|
|
34401
34405
|
if (results.length) return results.reduce((acc, v)=>acc.concat(v), []);
|
|
@@ -34476,13 +34480,15 @@ function $4ca1027d34905147$var$validateSchema(schema, data) {
|
|
|
34476
34480
|
})));
|
|
34477
34481
|
}
|
|
34478
34482
|
if (schemaNode.properties) {
|
|
34479
|
-
let { additionalProperties: additionalProperties = true } = schemaNode;
|
|
34483
|
+
let { additionalProperties: additionalProperties = true } = schemaNode;
|
|
34484
|
+
// $FlowFixMe type was already checked
|
|
34480
34485
|
for(let k in dataNode){
|
|
34481
34486
|
if (invalidProps && invalidProps.includes(k)) continue;
|
|
34482
34487
|
else if (k in schemaNode.properties) {
|
|
34483
34488
|
let result = walk([
|
|
34484
34489
|
schemaNode.properties[k]
|
|
34485
|
-
].concat(schemaAncestors),
|
|
34490
|
+
].concat(schemaAncestors), // $FlowFixMe type was already checked
|
|
34491
|
+
dataNode[k], dataPath + "/" + (0, $8C1kk$parceldiagnostic.encodeJSONKeyComponent)(k));
|
|
34486
34492
|
if (result) results.push(result);
|
|
34487
34493
|
} else {
|
|
34488
34494
|
if (typeof additionalProperties === "boolean") {
|
|
@@ -34490,7 +34496,8 @@ function $4ca1027d34905147$var$validateSchema(schema, data) {
|
|
|
34490
34496
|
type: "enum",
|
|
34491
34497
|
dataType: "key",
|
|
34492
34498
|
dataPath: dataPath + "/" + (0, $8C1kk$parceldiagnostic.encodeJSONKeyComponent)(k),
|
|
34493
|
-
expectedValues: Object.keys(schemaNode.properties).filter(
|
|
34499
|
+
expectedValues: Object.keys(schemaNode.properties).filter(// $FlowFixMe type was already checked
|
|
34500
|
+
(p)=>!(p in dataNode)),
|
|
34494
34501
|
actualValue: k,
|
|
34495
34502
|
ancestors: schemaAncestors,
|
|
34496
34503
|
prettyType: schemaNode.__type
|
|
@@ -34498,7 +34505,8 @@ function $4ca1027d34905147$var$validateSchema(schema, data) {
|
|
|
34498
34505
|
} else {
|
|
34499
34506
|
let result = walk([
|
|
34500
34507
|
additionalProperties
|
|
34501
|
-
].concat(schemaAncestors),
|
|
34508
|
+
].concat(schemaAncestors), // $FlowFixMe type was already checked
|
|
34509
|
+
dataNode[k], dataPath + "/" + (0, $8C1kk$parceldiagnostic.encodeJSONKeyComponent)(k));
|
|
34502
34510
|
if (result) results.push(result);
|
|
34503
34511
|
}
|
|
34504
34512
|
}
|
|
@@ -34562,14 +34570,16 @@ var $4ca1027d34905147$export$2e2bcd8739ae039 = $4ca1027d34905147$var$validateSch
|
|
|
34562
34570
|
function $4ca1027d34905147$export$2115c2c0a84eef61(expectedValues, actualValue) {
|
|
34563
34571
|
let result = expectedValues.map((exp)=>[
|
|
34564
34572
|
exp,
|
|
34565
|
-
|
|
34566
|
-
]).filter(
|
|
34573
|
+
$c066e3e3e5b06560$export$9f17032d917177de(exp, actualValue)
|
|
34574
|
+
]).filter(// Remove if more than half of the string would need to be changed
|
|
34575
|
+
([, d])=>d * 2 < actualValue.length);
|
|
34567
34576
|
result.sort(([, a], [, b])=>a - b);
|
|
34568
34577
|
return result.map(([v])=>v);
|
|
34569
34578
|
}
|
|
34570
34579
|
$4ca1027d34905147$var$validateSchema.diagnostic = function(schema, data, origin, message) {
|
|
34571
34580
|
if ("source" in data && "data" in data && typeof data.source !== "string" && !data) throw new Error("At least one of data.source and data.data must be defined!");
|
|
34572
|
-
var
|
|
34581
|
+
var // $FlowFixMe we can assume it's a JSON object
|
|
34582
|
+
_data_data;
|
|
34573
34583
|
let object = data.map ? data.map.data : (_data_data = data.data) !== null && _data_data !== void 0 ? _data_data : JSON.parse(data.source);
|
|
34574
34584
|
let errors = $4ca1027d34905147$var$validateSchema(schema, object);
|
|
34575
34585
|
if (errors.length) {
|
|
@@ -34661,7 +34671,8 @@ class $3f2d35ad38f40faa$export$2e2bcd8739ae039 extends (0, $8C1kk$stream.Transfo
|
|
|
34661
34671
|
|
|
34662
34672
|
|
|
34663
34673
|
function $dfabc3743c08d51c$export$2e2bcd8739ae039(publicURL, assetPath) {
|
|
34664
|
-
const url = (0, ($parcel$interopDefault($8C1kk$url))).parse(publicURL, false, true);
|
|
34674
|
+
const url = (0, ($parcel$interopDefault($8C1kk$url))).parse(publicURL, false, true);
|
|
34675
|
+
// Leading / ensures that paths with colons are not parsed as a protocol.
|
|
34665
34676
|
let p = assetPath.startsWith("/") ? assetPath : "/" + assetPath;
|
|
34666
34677
|
const assetUrl = (0, ($parcel$interopDefault($8C1kk$url))).parse(p);
|
|
34667
34678
|
url.pathname = (0, ($parcel$interopDefault($8C1kk$path))).posix.join(url.pathname, assetUrl.pathname);
|
|
@@ -34678,7 +34689,8 @@ function $b18990c6c3ea36b3$export$2e2bcd8739ae039(from, to) {
|
|
|
34678
34689
|
}
|
|
34679
34690
|
|
|
34680
34691
|
|
|
34681
|
-
function $43b0dce5dd282650$export$2e2bcd8739ae039(start, specifier, lineOffset = 0, columnOffset = 0,
|
|
34692
|
+
function $43b0dce5dd282650$export$2e2bcd8739ae039(start, specifier, lineOffset = 0, columnOffset = 0, // Imports are usually wrapped in quotes
|
|
34693
|
+
importWrapperLength = 2) {
|
|
34682
34694
|
return {
|
|
34683
34695
|
filePath: specifier,
|
|
34684
34696
|
start: {
|
|
@@ -34879,6 +34891,7 @@ $618f8c1de80a427f$exports = async (target, options)=>{
|
|
|
34879
34891
|
|
|
34880
34892
|
|
|
34881
34893
|
|
|
34894
|
+
// Chrome app name is platform dependent. we should not hard code it.
|
|
34882
34895
|
// https://github.com/react-native-community/cli/blob/e2be8a905285d9b37512fc78c9755b9635ecf805/packages/cli/src/commands/server/launchDebugger.ts#L28
|
|
34883
34896
|
function $f064b622a304e96c$var$getChromeAppName() {
|
|
34884
34897
|
switch(process.platform){
|
|
@@ -35183,10 +35196,28 @@ var $5dc3ee1f90b35876$var$parse = function parse(text, reviver) {
|
|
|
35183
35196
|
};
|
|
35184
35197
|
function $5dc3ee1f90b35876$var$internalize(holder, name, reviver) {
|
|
35185
35198
|
const value = holder[name];
|
|
35186
|
-
if (value != null && typeof value === "object")
|
|
35187
|
-
|
|
35188
|
-
|
|
35189
|
-
|
|
35199
|
+
if (value != null && typeof value === "object") {
|
|
35200
|
+
if (Array.isArray(value)) for(let i = 0; i < value.length; i++){
|
|
35201
|
+
const key = String(i);
|
|
35202
|
+
const replacement = $5dc3ee1f90b35876$var$internalize(value, key, reviver);
|
|
35203
|
+
if (replacement === undefined) delete value[key];
|
|
35204
|
+
else Object.defineProperty(value, key, {
|
|
35205
|
+
value: replacement,
|
|
35206
|
+
writable: true,
|
|
35207
|
+
enumerable: true,
|
|
35208
|
+
configurable: true
|
|
35209
|
+
});
|
|
35210
|
+
}
|
|
35211
|
+
else for(const key in value){
|
|
35212
|
+
const replacement = $5dc3ee1f90b35876$var$internalize(value, key, reviver);
|
|
35213
|
+
if (replacement === undefined) delete value[key];
|
|
35214
|
+
else Object.defineProperty(value, key, {
|
|
35215
|
+
value: replacement,
|
|
35216
|
+
writable: true,
|
|
35217
|
+
enumerable: true,
|
|
35218
|
+
configurable: true
|
|
35219
|
+
});
|
|
35220
|
+
}
|
|
35190
35221
|
}
|
|
35191
35222
|
return reviver.call(holder, name, value);
|
|
35192
35223
|
}
|
|
@@ -35872,7 +35903,12 @@ function $5dc3ee1f90b35876$var$push() {
|
|
|
35872
35903
|
else {
|
|
35873
35904
|
const parent = $5dc3ee1f90b35876$var$stack[$5dc3ee1f90b35876$var$stack.length - 1];
|
|
35874
35905
|
if (Array.isArray(parent)) parent.push(value);
|
|
35875
|
-
else parent
|
|
35906
|
+
else Object.defineProperty(parent, $5dc3ee1f90b35876$var$key, {
|
|
35907
|
+
value: value,
|
|
35908
|
+
writable: true,
|
|
35909
|
+
enumerable: true,
|
|
35910
|
+
configurable: true
|
|
35911
|
+
});
|
|
35876
35912
|
}
|
|
35877
35913
|
if (value !== null && typeof value === "object") {
|
|
35878
35914
|
$5dc3ee1f90b35876$var$stack.push(value);
|
|
@@ -36787,16 +36823,22 @@ async function $6aebdac47db0459e$export$6643be4f4e63e994(fs, moduleName, dir) {
|
|
|
36787
36823
|
let modulesDir = (0, ($parcel$interopDefault($8C1kk$path))).join(dir, "node_modules");
|
|
36788
36824
|
let stats = await fs.stat(modulesDir);
|
|
36789
36825
|
if (stats.isDirectory()) {
|
|
36790
|
-
let dirContent = (await fs.readdir(modulesDir)).sort();
|
|
36791
|
-
|
|
36826
|
+
let dirContent = (await fs.readdir(modulesDir)).sort();
|
|
36827
|
+
// Filter out the modules that interest us
|
|
36828
|
+
let modules = dirContent.filter((i)=>isOrganisationModule ? i.startsWith("@") : !i.startsWith("@"));
|
|
36829
|
+
// If it's an organisation module, loop through all the modules of that organisation
|
|
36792
36830
|
if (isOrganisationModule) await Promise.all(modules.map(async (item)=>{
|
|
36793
36831
|
let orgDirPath = (0, ($parcel$interopDefault($8C1kk$path))).join(modulesDir, item);
|
|
36794
|
-
let orgDirContent = (await fs.readdir(orgDirPath)).sort();
|
|
36832
|
+
let orgDirContent = (await fs.readdir(orgDirPath)).sort();
|
|
36833
|
+
// Add all org packages
|
|
36795
36834
|
potentialModules.push(...orgDirContent.map((i)=>`${item}/${i}`));
|
|
36796
36835
|
}));
|
|
36797
36836
|
else potentialModules.push(...modules);
|
|
36798
36837
|
}
|
|
36799
|
-
} catch (err) {
|
|
36838
|
+
} catch (err) {
|
|
36839
|
+
// ignore
|
|
36840
|
+
}
|
|
36841
|
+
// Move up a directory
|
|
36800
36842
|
dir = (0, ($parcel$interopDefault($8C1kk$path))).dirname(dir);
|
|
36801
36843
|
}
|
|
36802
36844
|
return (0, $4ca1027d34905147$export$2115c2c0a84eef61)(potentialModules.sort(), moduleName).slice(0, 2);
|
|
@@ -36810,7 +36852,7 @@ async function $6aebdac47db0459e$var$findAllFilesUp({ fs: fs , dir: dir , root:
|
|
|
36810
36852
|
let stats = await fs.stat(fullPath);
|
|
36811
36853
|
let isDir = stats.isDirectory();
|
|
36812
36854
|
if (isDir && includeDirectories || stats.isFile()) collected.push(relativeFilePath);
|
|
36813
|
-
|
|
36855
|
+
// If it's a directory, run over each item within said directory...
|
|
36814
36856
|
if (isDir) return $6aebdac47db0459e$var$findAllFilesUp({
|
|
36815
36857
|
fs: fs,
|
|
36816
36858
|
dir: fullPath,
|
|
@@ -36823,7 +36865,8 @@ async function $6aebdac47db0459e$var$findAllFilesUp({ fs: fs , dir: dir , root:
|
|
|
36823
36865
|
}));
|
|
36824
36866
|
}
|
|
36825
36867
|
async function $6aebdac47db0459e$export$4eeb1b3271a29661(fs, fileSpecifier, dir, projectRoot, leadingDotSlash = true, includeDirectories = true, includeExtension = false) {
|
|
36826
|
-
let potentialFiles = [];
|
|
36868
|
+
let potentialFiles = [];
|
|
36869
|
+
// Find our root, we won't recommend files above the package root as that's bad practise
|
|
36827
36870
|
let pkg = await (0, $10671d0be444e08b$export$7eca4ea16d4c8343)(fs, (0, ($parcel$interopDefault($8C1kk$path))).join(dir, "index"), [
|
|
36828
36871
|
"package.json"
|
|
36829
36872
|
], projectRoot);
|
|
@@ -36915,10 +36958,11 @@ class $5783bf7916ff59db$export$674cd7dcb504ac5c extends Map {
|
|
|
36915
36958
|
else {
|
|
36916
36959
|
ret = this._getDefault(key);
|
|
36917
36960
|
this.set(key, ret);
|
|
36918
|
-
}
|
|
36961
|
+
}
|
|
36962
|
+
// $FlowFixMe
|
|
36919
36963
|
return ret;
|
|
36920
36964
|
}
|
|
36921
|
-
}
|
|
36965
|
+
}
|
|
36922
36966
|
class $5783bf7916ff59db$export$4924f7ffab2ae440 extends WeakMap {
|
|
36923
36967
|
constructor(getDefault, entries){
|
|
36924
36968
|
super(entries);
|
|
@@ -36930,7 +36974,8 @@ class $5783bf7916ff59db$export$4924f7ffab2ae440 extends WeakMap {
|
|
|
36930
36974
|
else {
|
|
36931
36975
|
ret = this._getDefault(key);
|
|
36932
36976
|
this.set(key, ret);
|
|
36933
|
-
}
|
|
36977
|
+
}
|
|
36978
|
+
// $FlowFixMe
|
|
36934
36979
|
return ret;
|
|
36935
36980
|
}
|
|
36936
36981
|
}
|
|
@@ -36981,16 +37026,20 @@ function $4b14026b40817fca$export$42462553d605d8cd(fs, filePath) {
|
|
|
36981
37026
|
}
|
|
36982
37027
|
|
|
36983
37028
|
|
|
36984
|
-
let $1c93db5abaa33eaa$export$8b1c306fed4227bf;
|
|
37029
|
+
let $1c93db5abaa33eaa$export$8b1c306fed4227bf;
|
|
37030
|
+
// $FlowFixMe[prop-missing]
|
|
36985
37031
|
if (process.browser) {
|
|
36986
|
-
$1c93db5abaa33eaa$export$8b1c306fed4227bf = ArrayBuffer;
|
|
37032
|
+
$1c93db5abaa33eaa$export$8b1c306fed4227bf = ArrayBuffer;
|
|
37033
|
+
// Safari has removed the constructor
|
|
36987
37034
|
if (typeof SharedArrayBuffer !== "undefined") {
|
|
36988
37035
|
let channel = new MessageChannel();
|
|
36989
37036
|
try {
|
|
36990
37037
|
// Firefox might throw when sending the Buffer over a MessagePort
|
|
36991
37038
|
channel.port1.postMessage(new SharedArrayBuffer(0));
|
|
36992
37039
|
$1c93db5abaa33eaa$export$8b1c306fed4227bf = SharedArrayBuffer;
|
|
36993
|
-
} catch (_) {
|
|
37040
|
+
} catch (_) {
|
|
37041
|
+
// NOOP
|
|
37042
|
+
}
|
|
36994
37043
|
channel.port1.close();
|
|
36995
37044
|
channel.port2.close();
|
|
36996
37045
|
}
|
|
@@ -37016,7 +37065,8 @@ async function $0e887a49fdd81cad$export$3b1983e9896f988b(options) {
|
|
|
37016
37065
|
cert: cert,
|
|
37017
37066
|
key: key
|
|
37018
37067
|
}, options.listener);
|
|
37019
|
-
}
|
|
37068
|
+
}
|
|
37069
|
+
// HTTPServer#close only stops accepting new connections, and does not close existing ones.
|
|
37020
37070
|
// Before closing, destroy any active connections through their sockets. Additionally, remove sockets when they close:
|
|
37021
37071
|
// https://stackoverflow.com/questions/18874689/force-close-all-connections-in-a-node-js-http-server
|
|
37022
37072
|
// https://stackoverflow.com/questions/14626636/how-do-i-shutdown-a-node-js-https-server-immediately/14636625#14636625
|
|
@@ -37115,7 +37165,8 @@ function $bc66accb63b05e9a$export$a22ef0cbdf8abc95({ dependency: dependency , fr
|
|
|
37115
37165
|
leadingDotSlash: false
|
|
37116
37166
|
}),
|
|
37117
37167
|
hash: orig.hash
|
|
37118
|
-
});
|
|
37168
|
+
});
|
|
37169
|
+
// If the resulting path includes a colon character and doesn't start with a ./ or ../
|
|
37119
37170
|
// we need to add one so that the first part before the colon isn't parsed as a URL protocol.
|
|
37120
37171
|
if (to.includes(":") && !to.startsWith("./") && !to.startsWith("../")) to = "./" + to;
|
|
37121
37172
|
} else to = (0, $dfabc3743c08d51c$export$2e2bcd8739ae039)(toBundle.target.publicUrl, (0, ($parcel$interopDefault($8C1kk$url))).format({
|
|
@@ -37450,8 +37501,8 @@ function $46fc74961fdcfe31$export$2fed780245c466c1(loc, originalMap) {
|
|
|
37450
37501
|
let { filePath: filePath , start: { line: startLine , column: startCol } , end: { line: endLine , column: endCol } } = loc;
|
|
37451
37502
|
let lineDiff = endLine - startLine;
|
|
37452
37503
|
let colDiff = endCol - startCol;
|
|
37453
|
-
let start = originalMap.findClosestMapping(startLine, startCol);
|
|
37454
|
-
let end = originalMap.findClosestMapping(endLine, endCol);
|
|
37504
|
+
let start = originalMap.findClosestMapping(startLine, startCol - 1);
|
|
37505
|
+
let end = originalMap.findClosestMapping(endLine, endCol - 1);
|
|
37455
37506
|
if (start === null || start === void 0 ? void 0 : start.original) {
|
|
37456
37507
|
if (start.source) filePath = start.source;
|
|
37457
37508
|
({ line: startLine , column: startCol } = start.original);
|
|
@@ -37459,11 +37510,13 @@ function $46fc74961fdcfe31$export$2fed780245c466c1(loc, originalMap) {
|
|
|
37459
37510
|
}
|
|
37460
37511
|
if (end === null || end === void 0 ? void 0 : end.original) {
|
|
37461
37512
|
({ line: endLine , column: endCol } = end.original);
|
|
37462
|
-
endCol++;
|
|
37513
|
+
endCol++; // source map columns are 0-based
|
|
37463
37514
|
if (endLine < startLine) {
|
|
37464
37515
|
endLine = startLine;
|
|
37465
37516
|
endCol = startCol;
|
|
37466
37517
|
} else if (endLine === startLine && endCol < startCol && lineDiff === 0) endCol = startCol + colDiff;
|
|
37518
|
+
else if (endLine === startLine && startCol === endCol && lineDiff === 0) // Prevent 0-length ranges
|
|
37519
|
+
endCol = startCol + 1;
|
|
37467
37520
|
} else {
|
|
37468
37521
|
endLine = startLine;
|
|
37469
37522
|
endCol = startCol;
|
|
@@ -37483,12 +37536,15 @@ function $46fc74961fdcfe31$export$2fed780245c466c1(loc, originalMap) {
|
|
|
37483
37536
|
|
|
37484
37537
|
|
|
37485
37538
|
|
|
37539
|
+
// As our current version of flow doesn't support BigInt's, these values/types
|
|
37486
37540
|
// have been hoisted to keep the flow errors to a minimum. This can be removed
|
|
37487
37541
|
// if we upgrade to a flow version that supports BigInt's
|
|
37488
37542
|
// $FlowFixMe
|
|
37489
37543
|
// $FlowFixMe
|
|
37490
|
-
const $2c32463ab90dab73$var$BIGINT_ZERO = 0n;
|
|
37491
|
-
|
|
37544
|
+
const $2c32463ab90dab73$var$BIGINT_ZERO = 0n;
|
|
37545
|
+
// $FlowFixMe
|
|
37546
|
+
const $2c32463ab90dab73$var$BIGINT_ONE = 1n;
|
|
37547
|
+
// $FlowFixMe
|
|
37492
37548
|
let $2c32463ab90dab73$var$numberToBigInt = (v)=>BigInt(v);
|
|
37493
37549
|
let $2c32463ab90dab73$var$bitUnion = (a, b)=>a | b;
|
|
37494
37550
|
class $2c32463ab90dab73$export$33dc8f3f7b9e35df {
|
|
@@ -37551,7 +37607,8 @@ class $2c32463ab90dab73$export$33dc8f3f7b9e35df {
|
|
|
37551
37607
|
values() {
|
|
37552
37608
|
let values = [];
|
|
37553
37609
|
let tmpValue = this._value;
|
|
37554
|
-
let i;
|
|
37610
|
+
let i;
|
|
37611
|
+
// This implementation is optimized for BitSets that contain a very small percentage
|
|
37555
37612
|
// of items compared to the total number of potential items. This makes sense for
|
|
37556
37613
|
// our bundler use-cases where Sets often contain <1% coverage of the total item count.
|
|
37557
37614
|
// In cases where Sets contain a larger percentage of the total items, a regular looping
|
|
@@ -37559,7 +37616,8 @@ class $2c32463ab90dab73$export$33dc8f3f7b9e35df {
|
|
|
37559
37616
|
while(tmpValue > $2c32463ab90dab73$var$BIGINT_ZERO){
|
|
37560
37617
|
// Get last set bit
|
|
37561
37618
|
i = tmpValue.toString(2).length - 1;
|
|
37562
|
-
values.push(this._items[i]);
|
|
37619
|
+
values.push(this._items[i]);
|
|
37620
|
+
// Unset last set bit
|
|
37563
37621
|
tmpValue &= ~($2c32463ab90dab73$var$BIGINT_ONE << $2c32463ab90dab73$var$numberToBigInt(i));
|
|
37564
37622
|
}
|
|
37565
37623
|
return values;
|