wrangler 2.0.25 → 2.0.26
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/miniflare-dist/index.mjs +15 -3
- package/package.json +3 -3
- package/src/__tests__/helpers/mock-cfetch.ts +33 -0
- package/src/__tests__/init.test.ts +537 -359
- package/src/__tests__/jest.setup.ts +3 -0
- package/src/__tests__/pages.test.ts +14 -0
- package/src/__tests__/tail.test.ts +19 -3
- package/src/api/dev.ts +1 -0
- package/src/cfetch/internal.ts +39 -0
- package/src/dev/dev.tsx +4 -0
- package/src/dev.tsx +2 -2
- package/src/init.ts +111 -38
- package/src/miniflare-cli/assets.ts +8 -0
- package/src/miniflare-cli/index.ts +6 -3
- package/src/pages/build.tsx +41 -15
- package/src/pages/constants.ts +1 -0
- package/src/pages/dev.tsx +86 -24
- package/src/pages/errors.ts +22 -0
- package/src/pages/functions/routes-consolidation.test.ts +185 -1
- package/src/pages/functions/routes-consolidation.ts +46 -2
- package/src/pages/functions/routes-transformation.ts +0 -3
- package/src/pages/functions.tsx +96 -0
- package/src/pages/index.tsx +65 -55
- package/src/pages/publish.tsx +27 -16
- package/src/tail/filters.ts +3 -1
- package/src/tail/printing.ts +2 -0
- package/templates/pages-template-plugin.ts +16 -4
- package/templates/pages-template-worker.ts +16 -5
- package/templates/service-bindings-module-facade.js +10 -7
- package/templates/service-bindings-sw-facade.js +10 -7
- package/wrangler-dist/cli.d.ts +1 -0
- package/wrangler-dist/cli.js +1034 -738
package/wrangler-dist/cli.js
CHANGED
|
@@ -47,7 +47,7 @@ var require_main = __commonJS({
|
|
|
47
47
|
"node_modules/dotenv/lib/main.js"(exports2, module2) {
|
|
48
48
|
init_import_meta_url();
|
|
49
49
|
var fs12 = require("fs");
|
|
50
|
-
var
|
|
50
|
+
var path29 = require("path");
|
|
51
51
|
var os8 = require("os");
|
|
52
52
|
var LINE = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;
|
|
53
53
|
function parse(src) {
|
|
@@ -73,10 +73,10 @@ var require_main = __commonJS({
|
|
|
73
73
|
console.log(`[dotenv][DEBUG] ${message}`);
|
|
74
74
|
}
|
|
75
75
|
function _resolveHome(envPath) {
|
|
76
|
-
return envPath[0] === "~" ?
|
|
76
|
+
return envPath[0] === "~" ? path29.join(os8.homedir(), envPath.slice(1)) : envPath;
|
|
77
77
|
}
|
|
78
78
|
function config(options) {
|
|
79
|
-
let dotenvPath =
|
|
79
|
+
let dotenvPath = path29.resolve(process.cwd(), ".env");
|
|
80
80
|
let encoding = "utf8";
|
|
81
81
|
const debug = Boolean(options && options.debug);
|
|
82
82
|
const override = Boolean(options && options.override);
|
|
@@ -1833,11 +1833,11 @@ var require_lodash = __commonJS({
|
|
|
1833
1833
|
return isFunction2(object[key2]);
|
|
1834
1834
|
});
|
|
1835
1835
|
}
|
|
1836
|
-
function baseGet(object,
|
|
1837
|
-
|
|
1838
|
-
var index = 0, length =
|
|
1836
|
+
function baseGet(object, path29) {
|
|
1837
|
+
path29 = castPath(path29, object);
|
|
1838
|
+
var index = 0, length = path29.length;
|
|
1839
1839
|
while (object != null && index < length) {
|
|
1840
|
-
object = object[toKey(
|
|
1840
|
+
object = object[toKey(path29[index++])];
|
|
1841
1841
|
}
|
|
1842
1842
|
return index && index == length ? object : undefined2;
|
|
1843
1843
|
}
|
|
@@ -1901,10 +1901,10 @@ var require_lodash = __commonJS({
|
|
|
1901
1901
|
});
|
|
1902
1902
|
return accumulator;
|
|
1903
1903
|
}
|
|
1904
|
-
function baseInvoke(object,
|
|
1905
|
-
|
|
1906
|
-
object = parent(object,
|
|
1907
|
-
var func2 = object == null ? object : object[toKey(last(
|
|
1904
|
+
function baseInvoke(object, path29, args) {
|
|
1905
|
+
path29 = castPath(path29, object);
|
|
1906
|
+
object = parent(object, path29);
|
|
1907
|
+
var func2 = object == null ? object : object[toKey(last(path29))];
|
|
1908
1908
|
return func2 == null ? undefined2 : apply(func2, object, args);
|
|
1909
1909
|
}
|
|
1910
1910
|
function baseIsArguments(value) {
|
|
@@ -2060,13 +2060,13 @@ var require_lodash = __commonJS({
|
|
|
2060
2060
|
return object === source || baseIsMatch(object, source, matchData);
|
|
2061
2061
|
};
|
|
2062
2062
|
}
|
|
2063
|
-
function baseMatchesProperty(
|
|
2064
|
-
if (isKey(
|
|
2065
|
-
return matchesStrictComparable(toKey(
|
|
2063
|
+
function baseMatchesProperty(path29, srcValue) {
|
|
2064
|
+
if (isKey(path29) && isStrictComparable(srcValue)) {
|
|
2065
|
+
return matchesStrictComparable(toKey(path29), srcValue);
|
|
2066
2066
|
}
|
|
2067
2067
|
return function(object) {
|
|
2068
|
-
var objValue = get(object,
|
|
2069
|
-
return objValue === undefined2 && objValue === srcValue ? hasIn(object,
|
|
2068
|
+
var objValue = get(object, path29);
|
|
2069
|
+
return objValue === undefined2 && objValue === srcValue ? hasIn(object, path29) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
|
|
2070
2070
|
};
|
|
2071
2071
|
}
|
|
2072
2072
|
function baseMerge(object, source, srcIndex, customizer, stack) {
|
|
@@ -2163,23 +2163,23 @@ var require_lodash = __commonJS({
|
|
|
2163
2163
|
});
|
|
2164
2164
|
}
|
|
2165
2165
|
function basePick(object, paths) {
|
|
2166
|
-
return basePickBy(object, paths, function(value,
|
|
2167
|
-
return hasIn(object,
|
|
2166
|
+
return basePickBy(object, paths, function(value, path29) {
|
|
2167
|
+
return hasIn(object, path29);
|
|
2168
2168
|
});
|
|
2169
2169
|
}
|
|
2170
2170
|
function basePickBy(object, paths, predicate) {
|
|
2171
2171
|
var index = -1, length = paths.length, result2 = {};
|
|
2172
2172
|
while (++index < length) {
|
|
2173
|
-
var
|
|
2174
|
-
if (predicate(value,
|
|
2175
|
-
baseSet(result2, castPath(
|
|
2173
|
+
var path29 = paths[index], value = baseGet(object, path29);
|
|
2174
|
+
if (predicate(value, path29)) {
|
|
2175
|
+
baseSet(result2, castPath(path29, object), value);
|
|
2176
2176
|
}
|
|
2177
2177
|
}
|
|
2178
2178
|
return result2;
|
|
2179
2179
|
}
|
|
2180
|
-
function basePropertyDeep(
|
|
2180
|
+
function basePropertyDeep(path29) {
|
|
2181
2181
|
return function(object) {
|
|
2182
|
-
return baseGet(object,
|
|
2182
|
+
return baseGet(object, path29);
|
|
2183
2183
|
};
|
|
2184
2184
|
}
|
|
2185
2185
|
function basePullAll(array, values2, iteratee2, comparator) {
|
|
@@ -2253,14 +2253,14 @@ var require_lodash = __commonJS({
|
|
|
2253
2253
|
var array = values(collection);
|
|
2254
2254
|
return shuffleSelf(array, baseClamp(n, 0, array.length));
|
|
2255
2255
|
}
|
|
2256
|
-
function baseSet(object,
|
|
2256
|
+
function baseSet(object, path29, value, customizer) {
|
|
2257
2257
|
if (!isObject(object)) {
|
|
2258
2258
|
return object;
|
|
2259
2259
|
}
|
|
2260
|
-
|
|
2261
|
-
var index = -1, length =
|
|
2260
|
+
path29 = castPath(path29, object);
|
|
2261
|
+
var index = -1, length = path29.length, lastIndex = length - 1, nested = object;
|
|
2262
2262
|
while (nested != null && ++index < length) {
|
|
2263
|
-
var key2 = toKey(
|
|
2263
|
+
var key2 = toKey(path29[index]), newValue = value;
|
|
2264
2264
|
if (key2 === "__proto__" || key2 === "constructor" || key2 === "prototype") {
|
|
2265
2265
|
return object;
|
|
2266
2266
|
}
|
|
@@ -2268,7 +2268,7 @@ var require_lodash = __commonJS({
|
|
|
2268
2268
|
var objValue = nested[key2];
|
|
2269
2269
|
newValue = customizer ? customizer(objValue, key2, nested) : undefined2;
|
|
2270
2270
|
if (newValue === undefined2) {
|
|
2271
|
-
newValue = isObject(objValue) ? objValue : isIndex(
|
|
2271
|
+
newValue = isObject(objValue) ? objValue : isIndex(path29[index + 1]) ? [] : {};
|
|
2272
2272
|
}
|
|
2273
2273
|
}
|
|
2274
2274
|
assignValue(nested, key2, newValue);
|
|
@@ -2434,13 +2434,13 @@ var require_lodash = __commonJS({
|
|
|
2434
2434
|
}
|
|
2435
2435
|
return result2;
|
|
2436
2436
|
}
|
|
2437
|
-
function baseUnset(object,
|
|
2438
|
-
|
|
2439
|
-
object = parent(object,
|
|
2440
|
-
return object == null || delete object[toKey(last(
|
|
2437
|
+
function baseUnset(object, path29) {
|
|
2438
|
+
path29 = castPath(path29, object);
|
|
2439
|
+
object = parent(object, path29);
|
|
2440
|
+
return object == null || delete object[toKey(last(path29))];
|
|
2441
2441
|
}
|
|
2442
|
-
function baseUpdate(object,
|
|
2443
|
-
return baseSet(object,
|
|
2442
|
+
function baseUpdate(object, path29, updater, customizer) {
|
|
2443
|
+
return baseSet(object, path29, updater(baseGet(object, path29)), customizer);
|
|
2444
2444
|
}
|
|
2445
2445
|
function baseWhile(array, predicate, isDrop, fromRight) {
|
|
2446
2446
|
var length = array.length, index = fromRight ? length : -1;
|
|
@@ -3323,11 +3323,11 @@ var require_lodash = __commonJS({
|
|
|
3323
3323
|
var match = source.match(reWrapDetails);
|
|
3324
3324
|
return match ? match[1].split(reSplitDetails) : [];
|
|
3325
3325
|
}
|
|
3326
|
-
function hasPath(object,
|
|
3327
|
-
|
|
3328
|
-
var index = -1, length =
|
|
3326
|
+
function hasPath(object, path29, hasFunc) {
|
|
3327
|
+
path29 = castPath(path29, object);
|
|
3328
|
+
var index = -1, length = path29.length, result2 = false;
|
|
3329
3329
|
while (++index < length) {
|
|
3330
|
-
var key2 = toKey(
|
|
3330
|
+
var key2 = toKey(path29[index]);
|
|
3331
3331
|
if (!(result2 = object != null && hasFunc(object, key2))) {
|
|
3332
3332
|
break;
|
|
3333
3333
|
}
|
|
@@ -3529,8 +3529,8 @@ var require_lodash = __commonJS({
|
|
|
3529
3529
|
return apply(func2, this, otherArgs);
|
|
3530
3530
|
};
|
|
3531
3531
|
}
|
|
3532
|
-
function parent(object,
|
|
3533
|
-
return
|
|
3532
|
+
function parent(object, path29) {
|
|
3533
|
+
return path29.length < 2 ? object : baseGet(object, baseSlice(path29, 0, -1));
|
|
3534
3534
|
}
|
|
3535
3535
|
function reorder(array, indexes) {
|
|
3536
3536
|
var arrLength = array.length, length = nativeMin(indexes.length, arrLength), oldArray = copyArray(array);
|
|
@@ -4165,10 +4165,10 @@ var require_lodash = __commonJS({
|
|
|
4165
4165
|
}
|
|
4166
4166
|
return isString2(collection) ? fromIndex <= length && collection.indexOf(value, fromIndex) > -1 : !!length && baseIndexOf(collection, value, fromIndex) > -1;
|
|
4167
4167
|
}
|
|
4168
|
-
var invokeMap = baseRest(function(collection,
|
|
4169
|
-
var index = -1, isFunc = typeof
|
|
4168
|
+
var invokeMap = baseRest(function(collection, path29, args) {
|
|
4169
|
+
var index = -1, isFunc = typeof path29 == "function", result2 = isArrayLike(collection) ? Array2(collection.length) : [];
|
|
4170
4170
|
baseEach(collection, function(value) {
|
|
4171
|
-
result2[++index] = isFunc ? apply(
|
|
4171
|
+
result2[++index] = isFunc ? apply(path29, value, args) : baseInvoke(value, path29, args);
|
|
4172
4172
|
});
|
|
4173
4173
|
return result2;
|
|
4174
4174
|
});
|
|
@@ -4820,15 +4820,15 @@ var require_lodash = __commonJS({
|
|
|
4820
4820
|
function functionsIn(object) {
|
|
4821
4821
|
return object == null ? [] : baseFunctions(object, keysIn(object));
|
|
4822
4822
|
}
|
|
4823
|
-
function get(object,
|
|
4824
|
-
var result2 = object == null ? undefined2 : baseGet(object,
|
|
4823
|
+
function get(object, path29, defaultValue) {
|
|
4824
|
+
var result2 = object == null ? undefined2 : baseGet(object, path29);
|
|
4825
4825
|
return result2 === undefined2 ? defaultValue : result2;
|
|
4826
4826
|
}
|
|
4827
|
-
function has(object,
|
|
4828
|
-
return object != null && hasPath(object,
|
|
4827
|
+
function has(object, path29) {
|
|
4828
|
+
return object != null && hasPath(object, path29, baseHas);
|
|
4829
4829
|
}
|
|
4830
|
-
function hasIn(object,
|
|
4831
|
-
return object != null && hasPath(object,
|
|
4830
|
+
function hasIn(object, path29) {
|
|
4831
|
+
return object != null && hasPath(object, path29, baseHasIn);
|
|
4832
4832
|
}
|
|
4833
4833
|
var invert = createInverter(function(result2, value, key2) {
|
|
4834
4834
|
if (value != null && typeof value.toString != "function") {
|
|
@@ -4881,10 +4881,10 @@ var require_lodash = __commonJS({
|
|
|
4881
4881
|
return result2;
|
|
4882
4882
|
}
|
|
4883
4883
|
var isDeep = false;
|
|
4884
|
-
paths = arrayMap(paths, function(
|
|
4885
|
-
|
|
4886
|
-
isDeep || (isDeep =
|
|
4887
|
-
return
|
|
4884
|
+
paths = arrayMap(paths, function(path29) {
|
|
4885
|
+
path29 = castPath(path29, object);
|
|
4886
|
+
isDeep || (isDeep = path29.length > 1);
|
|
4887
|
+
return path29;
|
|
4888
4888
|
});
|
|
4889
4889
|
copyObject(object, getAllKeysIn(object), result2);
|
|
4890
4890
|
if (isDeep) {
|
|
@@ -4910,19 +4910,19 @@ var require_lodash = __commonJS({
|
|
|
4910
4910
|
return [prop];
|
|
4911
4911
|
});
|
|
4912
4912
|
predicate = getIteratee(predicate);
|
|
4913
|
-
return basePickBy(object, props, function(value,
|
|
4914
|
-
return predicate(value,
|
|
4913
|
+
return basePickBy(object, props, function(value, path29) {
|
|
4914
|
+
return predicate(value, path29[0]);
|
|
4915
4915
|
});
|
|
4916
4916
|
}
|
|
4917
|
-
function result(object,
|
|
4918
|
-
|
|
4919
|
-
var index = -1, length =
|
|
4917
|
+
function result(object, path29, defaultValue) {
|
|
4918
|
+
path29 = castPath(path29, object);
|
|
4919
|
+
var index = -1, length = path29.length;
|
|
4920
4920
|
if (!length) {
|
|
4921
4921
|
length = 1;
|
|
4922
4922
|
object = undefined2;
|
|
4923
4923
|
}
|
|
4924
4924
|
while (++index < length) {
|
|
4925
|
-
var value = object == null ? undefined2 : object[toKey(
|
|
4925
|
+
var value = object == null ? undefined2 : object[toKey(path29[index])];
|
|
4926
4926
|
if (value === undefined2) {
|
|
4927
4927
|
index = length;
|
|
4928
4928
|
value = defaultValue;
|
|
@@ -4931,12 +4931,12 @@ var require_lodash = __commonJS({
|
|
|
4931
4931
|
}
|
|
4932
4932
|
return object;
|
|
4933
4933
|
}
|
|
4934
|
-
function set(object,
|
|
4935
|
-
return object == null ? object : baseSet(object,
|
|
4934
|
+
function set(object, path29, value) {
|
|
4935
|
+
return object == null ? object : baseSet(object, path29, value);
|
|
4936
4936
|
}
|
|
4937
|
-
function setWith(object,
|
|
4937
|
+
function setWith(object, path29, value, customizer) {
|
|
4938
4938
|
customizer = typeof customizer == "function" ? customizer : undefined2;
|
|
4939
|
-
return object == null ? object : baseSet(object,
|
|
4939
|
+
return object == null ? object : baseSet(object, path29, value, customizer);
|
|
4940
4940
|
}
|
|
4941
4941
|
var toPairs = createToPairs(keys);
|
|
4942
4942
|
var toPairsIn = createToPairs(keysIn);
|
|
@@ -4958,15 +4958,15 @@ var require_lodash = __commonJS({
|
|
|
4958
4958
|
});
|
|
4959
4959
|
return accumulator;
|
|
4960
4960
|
}
|
|
4961
|
-
function unset(object,
|
|
4962
|
-
return object == null ? true : baseUnset(object,
|
|
4961
|
+
function unset(object, path29) {
|
|
4962
|
+
return object == null ? true : baseUnset(object, path29);
|
|
4963
4963
|
}
|
|
4964
|
-
function update(object,
|
|
4965
|
-
return object == null ? object : baseUpdate(object,
|
|
4964
|
+
function update(object, path29, updater) {
|
|
4965
|
+
return object == null ? object : baseUpdate(object, path29, castFunction(updater));
|
|
4966
4966
|
}
|
|
4967
|
-
function updateWith(object,
|
|
4967
|
+
function updateWith(object, path29, updater, customizer) {
|
|
4968
4968
|
customizer = typeof customizer == "function" ? customizer : undefined2;
|
|
4969
|
-
return object == null ? object : baseUpdate(object,
|
|
4969
|
+
return object == null ? object : baseUpdate(object, path29, castFunction(updater), customizer);
|
|
4970
4970
|
}
|
|
4971
4971
|
function values(object) {
|
|
4972
4972
|
return object == null ? [] : baseValues(object, keys(object));
|
|
@@ -5347,17 +5347,17 @@ var require_lodash = __commonJS({
|
|
|
5347
5347
|
function matches(source) {
|
|
5348
5348
|
return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
|
|
5349
5349
|
}
|
|
5350
|
-
function matchesProperty(
|
|
5351
|
-
return baseMatchesProperty(
|
|
5350
|
+
function matchesProperty(path29, srcValue) {
|
|
5351
|
+
return baseMatchesProperty(path29, baseClone(srcValue, CLONE_DEEP_FLAG));
|
|
5352
5352
|
}
|
|
5353
|
-
var method = baseRest(function(
|
|
5353
|
+
var method = baseRest(function(path29, args) {
|
|
5354
5354
|
return function(object) {
|
|
5355
|
-
return baseInvoke(object,
|
|
5355
|
+
return baseInvoke(object, path29, args);
|
|
5356
5356
|
};
|
|
5357
5357
|
});
|
|
5358
5358
|
var methodOf = baseRest(function(object, args) {
|
|
5359
|
-
return function(
|
|
5360
|
-
return baseInvoke(object,
|
|
5359
|
+
return function(path29) {
|
|
5360
|
+
return baseInvoke(object, path29, args);
|
|
5361
5361
|
};
|
|
5362
5362
|
});
|
|
5363
5363
|
function mixin3(object, source, options) {
|
|
@@ -5404,12 +5404,12 @@ var require_lodash = __commonJS({
|
|
|
5404
5404
|
var over = createOver(arrayMap);
|
|
5405
5405
|
var overEvery = createOver(arrayEvery);
|
|
5406
5406
|
var overSome = createOver(arraySome);
|
|
5407
|
-
function property(
|
|
5408
|
-
return isKey(
|
|
5407
|
+
function property(path29) {
|
|
5408
|
+
return isKey(path29) ? baseProperty(toKey(path29)) : basePropertyDeep(path29);
|
|
5409
5409
|
}
|
|
5410
5410
|
function propertyOf(object) {
|
|
5411
|
-
return function(
|
|
5412
|
-
return object == null ? undefined2 : baseGet(object,
|
|
5411
|
+
return function(path29) {
|
|
5412
|
+
return object == null ? undefined2 : baseGet(object, path29);
|
|
5413
5413
|
};
|
|
5414
5414
|
}
|
|
5415
5415
|
var range = createRange();
|
|
@@ -5862,12 +5862,12 @@ var require_lodash = __commonJS({
|
|
|
5862
5862
|
LazyWrapper.prototype.findLast = function(predicate) {
|
|
5863
5863
|
return this.reverse().find(predicate);
|
|
5864
5864
|
};
|
|
5865
|
-
LazyWrapper.prototype.invokeMap = baseRest(function(
|
|
5866
|
-
if (typeof
|
|
5865
|
+
LazyWrapper.prototype.invokeMap = baseRest(function(path29, args) {
|
|
5866
|
+
if (typeof path29 == "function") {
|
|
5867
5867
|
return new LazyWrapper(this);
|
|
5868
5868
|
}
|
|
5869
5869
|
return this.map(function(value) {
|
|
5870
|
-
return baseInvoke(value,
|
|
5870
|
+
return baseInvoke(value, path29, args);
|
|
5871
5871
|
});
|
|
5872
5872
|
});
|
|
5873
5873
|
LazyWrapper.prototype.reject = function(predicate) {
|
|
@@ -40802,15 +40802,15 @@ var require_route = __commonJS({
|
|
|
40802
40802
|
};
|
|
40803
40803
|
}
|
|
40804
40804
|
function wrapConversion(toModel, graph) {
|
|
40805
|
-
const
|
|
40805
|
+
const path29 = [graph[toModel].parent, toModel];
|
|
40806
40806
|
let fn = conversions[graph[toModel].parent][toModel];
|
|
40807
40807
|
let cur = graph[toModel].parent;
|
|
40808
40808
|
while (graph[cur].parent) {
|
|
40809
|
-
|
|
40809
|
+
path29.unshift(graph[cur].parent);
|
|
40810
40810
|
fn = link(conversions[graph[cur].parent][cur], fn);
|
|
40811
40811
|
cur = graph[cur].parent;
|
|
40812
40812
|
}
|
|
40813
|
-
fn.conversion =
|
|
40813
|
+
fn.conversion = path29;
|
|
40814
40814
|
return fn;
|
|
40815
40815
|
}
|
|
40816
40816
|
module2.exports = function(fromModel) {
|
|
@@ -42048,15 +42048,15 @@ var require_route2 = __commonJS({
|
|
|
42048
42048
|
};
|
|
42049
42049
|
}
|
|
42050
42050
|
function wrapConversion(toModel, graph) {
|
|
42051
|
-
const
|
|
42051
|
+
const path29 = [graph[toModel].parent, toModel];
|
|
42052
42052
|
let fn = conversions[graph[toModel].parent][toModel];
|
|
42053
42053
|
let cur = graph[toModel].parent;
|
|
42054
42054
|
while (graph[cur].parent) {
|
|
42055
|
-
|
|
42055
|
+
path29.unshift(graph[cur].parent);
|
|
42056
42056
|
fn = link(conversions[graph[cur].parent][cur], fn);
|
|
42057
42057
|
cur = graph[cur].parent;
|
|
42058
42058
|
}
|
|
42059
|
-
fn.conversion =
|
|
42059
|
+
fn.conversion = path29;
|
|
42060
42060
|
return fn;
|
|
42061
42061
|
}
|
|
42062
42062
|
module2.exports = function(fromModel) {
|
|
@@ -46218,8 +46218,8 @@ var require_backend = __commonJS({
|
|
|
46218
46218
|
}
|
|
46219
46219
|
return false;
|
|
46220
46220
|
}
|
|
46221
|
-
function getInObject(object,
|
|
46222
|
-
return
|
|
46221
|
+
function getInObject(object, path29) {
|
|
46222
|
+
return path29.reduce(function(reduced, attr) {
|
|
46223
46223
|
if (reduced) {
|
|
46224
46224
|
if (hasOwnProperty.call(reduced, attr)) {
|
|
46225
46225
|
return reduced[attr];
|
|
@@ -46231,11 +46231,11 @@ var require_backend = __commonJS({
|
|
|
46231
46231
|
return null;
|
|
46232
46232
|
}, object);
|
|
46233
46233
|
}
|
|
46234
|
-
function deletePathInObject(object,
|
|
46235
|
-
var length =
|
|
46236
|
-
var last =
|
|
46234
|
+
function deletePathInObject(object, path29) {
|
|
46235
|
+
var length = path29.length;
|
|
46236
|
+
var last = path29[length - 1];
|
|
46237
46237
|
if (object != null) {
|
|
46238
|
-
var parent = getInObject(object,
|
|
46238
|
+
var parent = getInObject(object, path29.slice(0, length - 1));
|
|
46239
46239
|
if (parent) {
|
|
46240
46240
|
if (Object(_isArray__WEBPACK_IMPORTED_MODULE_7__["a"])(parent)) {
|
|
46241
46241
|
parent.splice(last, 1);
|
|
@@ -46261,11 +46261,11 @@ var require_backend = __commonJS({
|
|
|
46261
46261
|
}
|
|
46262
46262
|
}
|
|
46263
46263
|
}
|
|
46264
|
-
function setInObject(object,
|
|
46265
|
-
var length =
|
|
46266
|
-
var last =
|
|
46264
|
+
function setInObject(object, path29, value) {
|
|
46265
|
+
var length = path29.length;
|
|
46266
|
+
var last = path29[length - 1];
|
|
46267
46267
|
if (object != null) {
|
|
46268
|
-
var parent = getInObject(object,
|
|
46268
|
+
var parent = getInObject(object, path29.slice(0, length - 1));
|
|
46269
46269
|
if (parent) {
|
|
46270
46270
|
parent[last] = value;
|
|
46271
46271
|
}
|
|
@@ -46690,11 +46690,11 @@ var require_backend = __commonJS({
|
|
|
46690
46690
|
return obj;
|
|
46691
46691
|
}
|
|
46692
46692
|
function cleanForBridge(data, isPathAllowed) {
|
|
46693
|
-
var
|
|
46693
|
+
var path29 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [];
|
|
46694
46694
|
if (data !== null) {
|
|
46695
46695
|
var cleanedPaths = [];
|
|
46696
46696
|
var unserializablePaths = [];
|
|
46697
|
-
var cleanedData = Object(_hydration__WEBPACK_IMPORTED_MODULE_1__["a"])(data, cleanedPaths, unserializablePaths,
|
|
46697
|
+
var cleanedData = Object(_hydration__WEBPACK_IMPORTED_MODULE_1__["a"])(data, cleanedPaths, unserializablePaths, path29, isPathAllowed);
|
|
46698
46698
|
return {
|
|
46699
46699
|
data: cleanedData,
|
|
46700
46700
|
cleaned: cleanedPaths,
|
|
@@ -46715,18 +46715,18 @@ var require_backend = __commonJS({
|
|
|
46715
46715
|
Object(clipboard_js__WEBPACK_IMPORTED_MODULE_0__["copy"])(text);
|
|
46716
46716
|
}
|
|
46717
46717
|
}
|
|
46718
|
-
function copyWithDelete(obj,
|
|
46718
|
+
function copyWithDelete(obj, path29) {
|
|
46719
46719
|
var index = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0;
|
|
46720
|
-
var key2 =
|
|
46720
|
+
var key2 = path29[index];
|
|
46721
46721
|
var updated = Object(shared_isArray__WEBPACK_IMPORTED_MODULE_2__["a"])(obj) ? obj.slice() : _objectSpread({}, obj);
|
|
46722
|
-
if (index + 1 ===
|
|
46722
|
+
if (index + 1 === path29.length) {
|
|
46723
46723
|
if (Object(shared_isArray__WEBPACK_IMPORTED_MODULE_2__["a"])(updated)) {
|
|
46724
46724
|
updated.splice(key2, 1);
|
|
46725
46725
|
} else {
|
|
46726
46726
|
delete updated[key2];
|
|
46727
46727
|
}
|
|
46728
46728
|
} else {
|
|
46729
|
-
updated[key2] = copyWithDelete(obj[key2],
|
|
46729
|
+
updated[key2] = copyWithDelete(obj[key2], path29, index + 1);
|
|
46730
46730
|
}
|
|
46731
46731
|
return updated;
|
|
46732
46732
|
}
|
|
@@ -46747,14 +46747,14 @@ var require_backend = __commonJS({
|
|
|
46747
46747
|
}
|
|
46748
46748
|
return updated;
|
|
46749
46749
|
}
|
|
46750
|
-
function copyWithSet(obj,
|
|
46750
|
+
function copyWithSet(obj, path29, value) {
|
|
46751
46751
|
var index = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0;
|
|
46752
|
-
if (index >=
|
|
46752
|
+
if (index >= path29.length) {
|
|
46753
46753
|
return value;
|
|
46754
46754
|
}
|
|
46755
|
-
var key2 =
|
|
46755
|
+
var key2 = path29[index];
|
|
46756
46756
|
var updated = Object(shared_isArray__WEBPACK_IMPORTED_MODULE_2__["a"])(obj) ? obj.slice() : _objectSpread({}, obj);
|
|
46757
|
-
updated[key2] = copyWithSet(obj[key2],
|
|
46757
|
+
updated[key2] = copyWithSet(obj[key2], path29, value, index + 1);
|
|
46758
46758
|
return updated;
|
|
46759
46759
|
}
|
|
46760
46760
|
function getEffectDurations(root) {
|
|
@@ -48459,8 +48459,8 @@ var require_backend = __commonJS({
|
|
|
48459
48459
|
unserializable: Symbol("unserializable")
|
|
48460
48460
|
};
|
|
48461
48461
|
var LEVEL_THRESHOLD = 2;
|
|
48462
|
-
function createDehydrated(type2, inspectable, data, cleaned,
|
|
48463
|
-
cleaned.push(
|
|
48462
|
+
function createDehydrated(type2, inspectable, data, cleaned, path29) {
|
|
48463
|
+
cleaned.push(path29);
|
|
48464
48464
|
var dehydrated = {
|
|
48465
48465
|
inspectable,
|
|
48466
48466
|
type: type2,
|
|
@@ -48478,13 +48478,13 @@ var require_backend = __commonJS({
|
|
|
48478
48478
|
}
|
|
48479
48479
|
return dehydrated;
|
|
48480
48480
|
}
|
|
48481
|
-
function dehydrate(data, cleaned, unserializable,
|
|
48481
|
+
function dehydrate(data, cleaned, unserializable, path29, isPathAllowed) {
|
|
48482
48482
|
var level = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : 0;
|
|
48483
48483
|
var type2 = Object(_utils__WEBPACK_IMPORTED_MODULE_0__["d"])(data);
|
|
48484
48484
|
var isPathAllowedCheck;
|
|
48485
48485
|
switch (type2) {
|
|
48486
48486
|
case "html_element":
|
|
48487
|
-
cleaned.push(
|
|
48487
|
+
cleaned.push(path29);
|
|
48488
48488
|
return {
|
|
48489
48489
|
inspectable: false,
|
|
48490
48490
|
preview_short: Object(_utils__WEBPACK_IMPORTED_MODULE_0__["b"])(data, false),
|
|
@@ -48493,7 +48493,7 @@ var require_backend = __commonJS({
|
|
|
48493
48493
|
type: type2
|
|
48494
48494
|
};
|
|
48495
48495
|
case "function":
|
|
48496
|
-
cleaned.push(
|
|
48496
|
+
cleaned.push(path29);
|
|
48497
48497
|
return {
|
|
48498
48498
|
inspectable: false,
|
|
48499
48499
|
preview_short: Object(_utils__WEBPACK_IMPORTED_MODULE_0__["b"])(data, false),
|
|
@@ -48502,14 +48502,14 @@ var require_backend = __commonJS({
|
|
|
48502
48502
|
type: type2
|
|
48503
48503
|
};
|
|
48504
48504
|
case "string":
|
|
48505
|
-
isPathAllowedCheck = isPathAllowed(
|
|
48505
|
+
isPathAllowedCheck = isPathAllowed(path29);
|
|
48506
48506
|
if (isPathAllowedCheck) {
|
|
48507
48507
|
return data;
|
|
48508
48508
|
} else {
|
|
48509
48509
|
return data.length <= 500 ? data : data.slice(0, 500) + "...";
|
|
48510
48510
|
}
|
|
48511
48511
|
case "bigint":
|
|
48512
|
-
cleaned.push(
|
|
48512
|
+
cleaned.push(path29);
|
|
48513
48513
|
return {
|
|
48514
48514
|
inspectable: false,
|
|
48515
48515
|
preview_short: Object(_utils__WEBPACK_IMPORTED_MODULE_0__["b"])(data, false),
|
|
@@ -48518,7 +48518,7 @@ var require_backend = __commonJS({
|
|
|
48518
48518
|
type: type2
|
|
48519
48519
|
};
|
|
48520
48520
|
case "symbol":
|
|
48521
|
-
cleaned.push(
|
|
48521
|
+
cleaned.push(path29);
|
|
48522
48522
|
return {
|
|
48523
48523
|
inspectable: false,
|
|
48524
48524
|
preview_short: Object(_utils__WEBPACK_IMPORTED_MODULE_0__["b"])(data, false),
|
|
@@ -48527,7 +48527,7 @@ var require_backend = __commonJS({
|
|
|
48527
48527
|
type: type2
|
|
48528
48528
|
};
|
|
48529
48529
|
case "react_element":
|
|
48530
|
-
cleaned.push(
|
|
48530
|
+
cleaned.push(path29);
|
|
48531
48531
|
return {
|
|
48532
48532
|
inspectable: false,
|
|
48533
48533
|
preview_short: Object(_utils__WEBPACK_IMPORTED_MODULE_0__["b"])(data, false),
|
|
@@ -48537,7 +48537,7 @@ var require_backend = __commonJS({
|
|
|
48537
48537
|
};
|
|
48538
48538
|
case "array_buffer":
|
|
48539
48539
|
case "data_view":
|
|
48540
|
-
cleaned.push(
|
|
48540
|
+
cleaned.push(path29);
|
|
48541
48541
|
return {
|
|
48542
48542
|
inspectable: false,
|
|
48543
48543
|
preview_short: Object(_utils__WEBPACK_IMPORTED_MODULE_0__["b"])(data, false),
|
|
@@ -48547,19 +48547,19 @@ var require_backend = __commonJS({
|
|
|
48547
48547
|
type: type2
|
|
48548
48548
|
};
|
|
48549
48549
|
case "array":
|
|
48550
|
-
isPathAllowedCheck = isPathAllowed(
|
|
48550
|
+
isPathAllowedCheck = isPathAllowed(path29);
|
|
48551
48551
|
if (level >= LEVEL_THRESHOLD && !isPathAllowedCheck) {
|
|
48552
|
-
return createDehydrated(type2, true, data, cleaned,
|
|
48552
|
+
return createDehydrated(type2, true, data, cleaned, path29);
|
|
48553
48553
|
}
|
|
48554
48554
|
return data.map(function(item, i2) {
|
|
48555
|
-
return dehydrate(item, cleaned, unserializable,
|
|
48555
|
+
return dehydrate(item, cleaned, unserializable, path29.concat([i2]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
|
|
48556
48556
|
});
|
|
48557
48557
|
case "html_all_collection":
|
|
48558
48558
|
case "typed_array":
|
|
48559
48559
|
case "iterator":
|
|
48560
|
-
isPathAllowedCheck = isPathAllowed(
|
|
48560
|
+
isPathAllowedCheck = isPathAllowed(path29);
|
|
48561
48561
|
if (level >= LEVEL_THRESHOLD && !isPathAllowedCheck) {
|
|
48562
|
-
return createDehydrated(type2, true, data, cleaned,
|
|
48562
|
+
return createDehydrated(type2, true, data, cleaned, path29);
|
|
48563
48563
|
} else {
|
|
48564
48564
|
var unserializableValue = {
|
|
48565
48565
|
unserializable: true,
|
|
@@ -48571,13 +48571,13 @@ var require_backend = __commonJS({
|
|
|
48571
48571
|
name: !data.constructor || data.constructor.name === "Object" ? "" : data.constructor.name
|
|
48572
48572
|
};
|
|
48573
48573
|
Array.from(data).forEach(function(item, i2) {
|
|
48574
|
-
return unserializableValue[i2] = dehydrate(item, cleaned, unserializable,
|
|
48574
|
+
return unserializableValue[i2] = dehydrate(item, cleaned, unserializable, path29.concat([i2]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
|
|
48575
48575
|
});
|
|
48576
|
-
unserializable.push(
|
|
48576
|
+
unserializable.push(path29);
|
|
48577
48577
|
return unserializableValue;
|
|
48578
48578
|
}
|
|
48579
48579
|
case "opaque_iterator":
|
|
48580
|
-
cleaned.push(
|
|
48580
|
+
cleaned.push(path29);
|
|
48581
48581
|
return {
|
|
48582
48582
|
inspectable: false,
|
|
48583
48583
|
preview_short: Object(_utils__WEBPACK_IMPORTED_MODULE_0__["b"])(data, false),
|
|
@@ -48586,7 +48586,7 @@ var require_backend = __commonJS({
|
|
|
48586
48586
|
type: type2
|
|
48587
48587
|
};
|
|
48588
48588
|
case "date":
|
|
48589
|
-
cleaned.push(
|
|
48589
|
+
cleaned.push(path29);
|
|
48590
48590
|
return {
|
|
48591
48591
|
inspectable: false,
|
|
48592
48592
|
preview_short: Object(_utils__WEBPACK_IMPORTED_MODULE_0__["b"])(data, false),
|
|
@@ -48595,7 +48595,7 @@ var require_backend = __commonJS({
|
|
|
48595
48595
|
type: type2
|
|
48596
48596
|
};
|
|
48597
48597
|
case "regexp":
|
|
48598
|
-
cleaned.push(
|
|
48598
|
+
cleaned.push(path29);
|
|
48599
48599
|
return {
|
|
48600
48600
|
inspectable: false,
|
|
48601
48601
|
preview_short: Object(_utils__WEBPACK_IMPORTED_MODULE_0__["b"])(data, false),
|
|
@@ -48604,21 +48604,21 @@ var require_backend = __commonJS({
|
|
|
48604
48604
|
type: type2
|
|
48605
48605
|
};
|
|
48606
48606
|
case "object":
|
|
48607
|
-
isPathAllowedCheck = isPathAllowed(
|
|
48607
|
+
isPathAllowedCheck = isPathAllowed(path29);
|
|
48608
48608
|
if (level >= LEVEL_THRESHOLD && !isPathAllowedCheck) {
|
|
48609
|
-
return createDehydrated(type2, true, data, cleaned,
|
|
48609
|
+
return createDehydrated(type2, true, data, cleaned, path29);
|
|
48610
48610
|
} else {
|
|
48611
48611
|
var object = {};
|
|
48612
48612
|
Object(_utils__WEBPACK_IMPORTED_MODULE_0__["c"])(data).forEach(function(key2) {
|
|
48613
48613
|
var name = key2.toString();
|
|
48614
|
-
object[name] = dehydrate(data[key2], cleaned, unserializable,
|
|
48614
|
+
object[name] = dehydrate(data[key2], cleaned, unserializable, path29.concat([name]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
|
|
48615
48615
|
});
|
|
48616
48616
|
return object;
|
|
48617
48617
|
}
|
|
48618
48618
|
case "infinity":
|
|
48619
48619
|
case "nan":
|
|
48620
48620
|
case "undefined":
|
|
48621
|
-
cleaned.push(
|
|
48621
|
+
cleaned.push(path29);
|
|
48622
48622
|
return {
|
|
48623
48623
|
type: type2
|
|
48624
48624
|
};
|
|
@@ -48626,8 +48626,8 @@ var require_backend = __commonJS({
|
|
|
48626
48626
|
return data;
|
|
48627
48627
|
}
|
|
48628
48628
|
}
|
|
48629
|
-
function fillInPath(object, data,
|
|
48630
|
-
var target = Object(_utils__WEBPACK_IMPORTED_MODULE_0__["h"])(object,
|
|
48629
|
+
function fillInPath(object, data, path29, value) {
|
|
48630
|
+
var target = Object(_utils__WEBPACK_IMPORTED_MODULE_0__["h"])(object, path29);
|
|
48631
48631
|
if (target != null) {
|
|
48632
48632
|
if (!target[meta.unserializable]) {
|
|
48633
48633
|
delete target[meta.inspectable];
|
|
@@ -48642,9 +48642,9 @@ var require_backend = __commonJS({
|
|
|
48642
48642
|
}
|
|
48643
48643
|
if (value !== null && data.unserializable.length > 0) {
|
|
48644
48644
|
var unserializablePath = data.unserializable[0];
|
|
48645
|
-
var isMatch = unserializablePath.length ===
|
|
48646
|
-
for (var i2 = 0; i2 <
|
|
48647
|
-
if (
|
|
48645
|
+
var isMatch = unserializablePath.length === path29.length;
|
|
48646
|
+
for (var i2 = 0; i2 < path29.length; i2++) {
|
|
48647
|
+
if (path29[i2] !== unserializablePath[i2]) {
|
|
48648
48648
|
isMatch = false;
|
|
48649
48649
|
break;
|
|
48650
48650
|
}
|
|
@@ -48653,13 +48653,13 @@ var require_backend = __commonJS({
|
|
|
48653
48653
|
upgradeUnserializable(value, value);
|
|
48654
48654
|
}
|
|
48655
48655
|
}
|
|
48656
|
-
Object(_utils__WEBPACK_IMPORTED_MODULE_0__["l"])(object,
|
|
48656
|
+
Object(_utils__WEBPACK_IMPORTED_MODULE_0__["l"])(object, path29, value);
|
|
48657
48657
|
}
|
|
48658
48658
|
function hydrate(object, cleaned, unserializable) {
|
|
48659
|
-
cleaned.forEach(function(
|
|
48660
|
-
var length =
|
|
48661
|
-
var last =
|
|
48662
|
-
var parent = Object(_utils__WEBPACK_IMPORTED_MODULE_0__["h"])(object,
|
|
48659
|
+
cleaned.forEach(function(path29) {
|
|
48660
|
+
var length = path29.length;
|
|
48661
|
+
var last = path29[length - 1];
|
|
48662
|
+
var parent = Object(_utils__WEBPACK_IMPORTED_MODULE_0__["h"])(object, path29.slice(0, length - 1));
|
|
48663
48663
|
if (!parent || !parent.hasOwnProperty(last)) {
|
|
48664
48664
|
return;
|
|
48665
48665
|
}
|
|
@@ -48685,10 +48685,10 @@ var require_backend = __commonJS({
|
|
|
48685
48685
|
parent[last] = replaced;
|
|
48686
48686
|
}
|
|
48687
48687
|
});
|
|
48688
|
-
unserializable.forEach(function(
|
|
48689
|
-
var length =
|
|
48690
|
-
var last =
|
|
48691
|
-
var parent = Object(_utils__WEBPACK_IMPORTED_MODULE_0__["h"])(object,
|
|
48688
|
+
unserializable.forEach(function(path29) {
|
|
48689
|
+
var length = path29.length;
|
|
48690
|
+
var last = path29[length - 1];
|
|
48691
|
+
var parent = Object(_utils__WEBPACK_IMPORTED_MODULE_0__["h"])(object, path29.slice(0, length - 1));
|
|
48692
48692
|
if (!parent || !parent.hasOwnProperty(last)) {
|
|
48693
48693
|
return;
|
|
48694
48694
|
}
|
|
@@ -51300,9 +51300,9 @@ var require_backend = __commonJS({
|
|
|
51300
51300
|
}
|
|
51301
51301
|
return alternate;
|
|
51302
51302
|
}
|
|
51303
|
-
function prepareViewAttributeSource(id,
|
|
51303
|
+
function prepareViewAttributeSource(id, path29) {
|
|
51304
51304
|
if (isMostRecentlyInspectedElement(id)) {
|
|
51305
|
-
window.$attribute = Object(utils["h"])(mostRecentlyInspectedElement,
|
|
51305
|
+
window.$attribute = Object(utils["h"])(mostRecentlyInspectedElement, path29);
|
|
51306
51306
|
}
|
|
51307
51307
|
}
|
|
51308
51308
|
function prepareViewElementSource(id) {
|
|
@@ -51537,9 +51537,9 @@ var require_backend = __commonJS({
|
|
|
51537
51537
|
function isMostRecentlyInspectedElementCurrent(id) {
|
|
51538
51538
|
return isMostRecentlyInspectedElement(id) && !hasElementUpdatedSinceLastInspected;
|
|
51539
51539
|
}
|
|
51540
|
-
function mergeInspectedPaths(
|
|
51540
|
+
function mergeInspectedPaths(path29) {
|
|
51541
51541
|
var current = currentlyInspectedPaths;
|
|
51542
|
-
|
|
51542
|
+
path29.forEach(function(key2) {
|
|
51543
51543
|
if (!current[key2]) {
|
|
51544
51544
|
current[key2] = {};
|
|
51545
51545
|
}
|
|
@@ -51547,16 +51547,16 @@ var require_backend = __commonJS({
|
|
|
51547
51547
|
});
|
|
51548
51548
|
}
|
|
51549
51549
|
function createIsPathAllowed(key2, secondaryCategory) {
|
|
51550
|
-
return function isPathAllowed(
|
|
51550
|
+
return function isPathAllowed(path29) {
|
|
51551
51551
|
switch (secondaryCategory) {
|
|
51552
51552
|
case "hooks":
|
|
51553
|
-
if (
|
|
51553
|
+
if (path29.length === 1) {
|
|
51554
51554
|
return true;
|
|
51555
51555
|
}
|
|
51556
|
-
if (
|
|
51556
|
+
if (path29[path29.length - 2] === "hookSource" && path29[path29.length - 1] === "fileName") {
|
|
51557
51557
|
return true;
|
|
51558
51558
|
}
|
|
51559
|
-
if (
|
|
51559
|
+
if (path29[path29.length - 1] === "subHooks" || path29[path29.length - 2] === "subHooks") {
|
|
51560
51560
|
return true;
|
|
51561
51561
|
}
|
|
51562
51562
|
break;
|
|
@@ -51567,8 +51567,8 @@ var require_backend = __commonJS({
|
|
|
51567
51567
|
if (!current) {
|
|
51568
51568
|
return false;
|
|
51569
51569
|
}
|
|
51570
|
-
for (var i2 = 0; i2 <
|
|
51571
|
-
current = current[
|
|
51570
|
+
for (var i2 = 0; i2 < path29.length; i2++) {
|
|
51571
|
+
current = current[path29[i2]];
|
|
51572
51572
|
if (!current) {
|
|
51573
51573
|
return false;
|
|
51574
51574
|
}
|
|
@@ -51617,37 +51617,37 @@ var require_backend = __commonJS({
|
|
|
51617
51617
|
break;
|
|
51618
51618
|
}
|
|
51619
51619
|
}
|
|
51620
|
-
function storeAsGlobal(id,
|
|
51620
|
+
function storeAsGlobal(id, path29, count) {
|
|
51621
51621
|
if (isMostRecentlyInspectedElement(id)) {
|
|
51622
|
-
var value = Object(utils["h"])(mostRecentlyInspectedElement,
|
|
51622
|
+
var value = Object(utils["h"])(mostRecentlyInspectedElement, path29);
|
|
51623
51623
|
var key2 = "$reactTemp".concat(count);
|
|
51624
51624
|
window[key2] = value;
|
|
51625
51625
|
console.log(key2);
|
|
51626
51626
|
console.log(value);
|
|
51627
51627
|
}
|
|
51628
51628
|
}
|
|
51629
|
-
function copyElementPath(id,
|
|
51629
|
+
function copyElementPath(id, path29) {
|
|
51630
51630
|
if (isMostRecentlyInspectedElement(id)) {
|
|
51631
|
-
Object(backend_utils["b"])(Object(utils["h"])(mostRecentlyInspectedElement,
|
|
51631
|
+
Object(backend_utils["b"])(Object(utils["h"])(mostRecentlyInspectedElement, path29));
|
|
51632
51632
|
}
|
|
51633
51633
|
}
|
|
51634
|
-
function inspectElement(requestID, id,
|
|
51635
|
-
if (
|
|
51636
|
-
mergeInspectedPaths(
|
|
51634
|
+
function inspectElement(requestID, id, path29, forceFullData) {
|
|
51635
|
+
if (path29 !== null) {
|
|
51636
|
+
mergeInspectedPaths(path29);
|
|
51637
51637
|
}
|
|
51638
51638
|
if (isMostRecentlyInspectedElement(id) && !forceFullData) {
|
|
51639
51639
|
if (!hasElementUpdatedSinceLastInspected) {
|
|
51640
|
-
if (
|
|
51640
|
+
if (path29 !== null) {
|
|
51641
51641
|
var secondaryCategory = null;
|
|
51642
|
-
if (
|
|
51642
|
+
if (path29[0] === "hooks") {
|
|
51643
51643
|
secondaryCategory = "hooks";
|
|
51644
51644
|
}
|
|
51645
51645
|
return {
|
|
51646
51646
|
id,
|
|
51647
51647
|
responseID: requestID,
|
|
51648
51648
|
type: "hydrated-path",
|
|
51649
|
-
path:
|
|
51650
|
-
value: Object(backend_utils["a"])(Object(utils["h"])(mostRecentlyInspectedElement,
|
|
51649
|
+
path: path29,
|
|
51650
|
+
value: Object(backend_utils["a"])(Object(utils["h"])(mostRecentlyInspectedElement, path29), createIsPathAllowed(null, secondaryCategory), path29)
|
|
51651
51651
|
};
|
|
51652
51652
|
} else {
|
|
51653
51653
|
return {
|
|
@@ -51729,18 +51729,18 @@ var require_backend = __commonJS({
|
|
|
51729
51729
|
console.groupEnd();
|
|
51730
51730
|
}
|
|
51731
51731
|
}
|
|
51732
|
-
function deletePath(type2, id, hookID,
|
|
51732
|
+
function deletePath(type2, id, hookID, path29) {
|
|
51733
51733
|
var fiber = findCurrentFiberUsingSlowPathById(id);
|
|
51734
51734
|
if (fiber !== null) {
|
|
51735
51735
|
var instance = fiber.stateNode;
|
|
51736
51736
|
switch (type2) {
|
|
51737
51737
|
case "context":
|
|
51738
|
-
|
|
51738
|
+
path29 = path29.slice(1);
|
|
51739
51739
|
switch (fiber.tag) {
|
|
51740
51740
|
case ClassComponent:
|
|
51741
|
-
if (
|
|
51741
|
+
if (path29.length === 0) {
|
|
51742
51742
|
} else {
|
|
51743
|
-
Object(utils["a"])(instance.context,
|
|
51743
|
+
Object(utils["a"])(instance.context, path29);
|
|
51744
51744
|
}
|
|
51745
51745
|
instance.forceUpdate();
|
|
51746
51746
|
break;
|
|
@@ -51750,21 +51750,21 @@ var require_backend = __commonJS({
|
|
|
51750
51750
|
break;
|
|
51751
51751
|
case "hooks":
|
|
51752
51752
|
if (typeof overrideHookStateDeletePath === "function") {
|
|
51753
|
-
overrideHookStateDeletePath(fiber, hookID,
|
|
51753
|
+
overrideHookStateDeletePath(fiber, hookID, path29);
|
|
51754
51754
|
}
|
|
51755
51755
|
break;
|
|
51756
51756
|
case "props":
|
|
51757
51757
|
if (instance === null) {
|
|
51758
51758
|
if (typeof overridePropsDeletePath === "function") {
|
|
51759
|
-
overridePropsDeletePath(fiber,
|
|
51759
|
+
overridePropsDeletePath(fiber, path29);
|
|
51760
51760
|
}
|
|
51761
51761
|
} else {
|
|
51762
|
-
fiber.pendingProps = Object(backend_utils["c"])(instance.props,
|
|
51762
|
+
fiber.pendingProps = Object(backend_utils["c"])(instance.props, path29);
|
|
51763
51763
|
instance.forceUpdate();
|
|
51764
51764
|
}
|
|
51765
51765
|
break;
|
|
51766
51766
|
case "state":
|
|
51767
|
-
Object(utils["a"])(instance.state,
|
|
51767
|
+
Object(utils["a"])(instance.state, path29);
|
|
51768
51768
|
instance.forceUpdate();
|
|
51769
51769
|
break;
|
|
51770
51770
|
}
|
|
@@ -51812,19 +51812,19 @@ var require_backend = __commonJS({
|
|
|
51812
51812
|
}
|
|
51813
51813
|
}
|
|
51814
51814
|
}
|
|
51815
|
-
function overrideValueAtPath(type2, id, hookID,
|
|
51815
|
+
function overrideValueAtPath(type2, id, hookID, path29, value) {
|
|
51816
51816
|
var fiber = findCurrentFiberUsingSlowPathById(id);
|
|
51817
51817
|
if (fiber !== null) {
|
|
51818
51818
|
var instance = fiber.stateNode;
|
|
51819
51819
|
switch (type2) {
|
|
51820
51820
|
case "context":
|
|
51821
|
-
|
|
51821
|
+
path29 = path29.slice(1);
|
|
51822
51822
|
switch (fiber.tag) {
|
|
51823
51823
|
case ClassComponent:
|
|
51824
|
-
if (
|
|
51824
|
+
if (path29.length === 0) {
|
|
51825
51825
|
instance.context = value;
|
|
51826
51826
|
} else {
|
|
51827
|
-
Object(utils["l"])(instance.context,
|
|
51827
|
+
Object(utils["l"])(instance.context, path29, value);
|
|
51828
51828
|
}
|
|
51829
51829
|
instance.forceUpdate();
|
|
51830
51830
|
break;
|
|
@@ -51834,18 +51834,18 @@ var require_backend = __commonJS({
|
|
|
51834
51834
|
break;
|
|
51835
51835
|
case "hooks":
|
|
51836
51836
|
if (typeof overrideHookState === "function") {
|
|
51837
|
-
overrideHookState(fiber, hookID,
|
|
51837
|
+
overrideHookState(fiber, hookID, path29, value);
|
|
51838
51838
|
}
|
|
51839
51839
|
break;
|
|
51840
51840
|
case "props":
|
|
51841
51841
|
switch (fiber.tag) {
|
|
51842
51842
|
case ClassComponent:
|
|
51843
|
-
fiber.pendingProps = Object(backend_utils["e"])(instance.props,
|
|
51843
|
+
fiber.pendingProps = Object(backend_utils["e"])(instance.props, path29, value);
|
|
51844
51844
|
instance.forceUpdate();
|
|
51845
51845
|
break;
|
|
51846
51846
|
default:
|
|
51847
51847
|
if (typeof overrideProps === "function") {
|
|
51848
|
-
overrideProps(fiber,
|
|
51848
|
+
overrideProps(fiber, path29, value);
|
|
51849
51849
|
}
|
|
51850
51850
|
break;
|
|
51851
51851
|
}
|
|
@@ -51853,7 +51853,7 @@ var require_backend = __commonJS({
|
|
|
51853
51853
|
case "state":
|
|
51854
51854
|
switch (fiber.tag) {
|
|
51855
51855
|
case ClassComponent:
|
|
51856
|
-
Object(utils["l"])(instance.state,
|
|
51856
|
+
Object(utils["l"])(instance.state, path29, value);
|
|
51857
51857
|
instance.forceUpdate();
|
|
51858
51858
|
break;
|
|
51859
51859
|
}
|
|
@@ -52015,13 +52015,13 @@ var require_backend = __commonJS({
|
|
|
52015
52015
|
var trackedPathMatchFiber = null;
|
|
52016
52016
|
var trackedPathMatchDepth = -1;
|
|
52017
52017
|
var mightBeOnTrackedPath = false;
|
|
52018
|
-
function setTrackedPath(
|
|
52019
|
-
if (
|
|
52018
|
+
function setTrackedPath(path29) {
|
|
52019
|
+
if (path29 === null) {
|
|
52020
52020
|
trackedPathMatchFiber = null;
|
|
52021
52021
|
trackedPathMatchDepth = -1;
|
|
52022
52022
|
mightBeOnTrackedPath = false;
|
|
52023
52023
|
}
|
|
52024
|
-
trackedPath =
|
|
52024
|
+
trackedPath = path29;
|
|
52025
52025
|
}
|
|
52026
52026
|
function updateTrackedPathStateBeforeMount(fiber) {
|
|
52027
52027
|
if (trackedPath === null || !mightBeOnTrackedPath) {
|
|
@@ -56288,12 +56288,12 @@ var require_backend = __commonJS({
|
|
|
56288
56288
|
}
|
|
56289
56289
|
});
|
|
56290
56290
|
bridge_defineProperty(_assertThisInitialized(_this), "overrideValueAtPath", function(_ref) {
|
|
56291
|
-
var id = _ref.id,
|
|
56291
|
+
var id = _ref.id, path29 = _ref.path, rendererID = _ref.rendererID, type2 = _ref.type, value = _ref.value;
|
|
56292
56292
|
switch (type2) {
|
|
56293
56293
|
case "context":
|
|
56294
56294
|
_this.send("overrideContext", {
|
|
56295
56295
|
id,
|
|
56296
|
-
path:
|
|
56296
|
+
path: path29,
|
|
56297
56297
|
rendererID,
|
|
56298
56298
|
wasForwarded: true,
|
|
56299
56299
|
value
|
|
@@ -56302,7 +56302,7 @@ var require_backend = __commonJS({
|
|
|
56302
56302
|
case "hooks":
|
|
56303
56303
|
_this.send("overrideHookState", {
|
|
56304
56304
|
id,
|
|
56305
|
-
path:
|
|
56305
|
+
path: path29,
|
|
56306
56306
|
rendererID,
|
|
56307
56307
|
wasForwarded: true,
|
|
56308
56308
|
value
|
|
@@ -56311,7 +56311,7 @@ var require_backend = __commonJS({
|
|
|
56311
56311
|
case "props":
|
|
56312
56312
|
_this.send("overrideProps", {
|
|
56313
56313
|
id,
|
|
56314
|
-
path:
|
|
56314
|
+
path: path29,
|
|
56315
56315
|
rendererID,
|
|
56316
56316
|
wasForwarded: true,
|
|
56317
56317
|
value
|
|
@@ -56320,7 +56320,7 @@ var require_backend = __commonJS({
|
|
|
56320
56320
|
case "state":
|
|
56321
56321
|
_this.send("overrideState", {
|
|
56322
56322
|
id,
|
|
56323
|
-
path:
|
|
56323
|
+
path: path29,
|
|
56324
56324
|
rendererID,
|
|
56325
56325
|
wasForwarded: true,
|
|
56326
56326
|
value
|
|
@@ -56542,21 +56542,21 @@ var require_backend = __commonJS({
|
|
|
56542
56542
|
}
|
|
56543
56543
|
});
|
|
56544
56544
|
agent_defineProperty(agent_assertThisInitialized(_this), "copyElementPath", function(_ref4) {
|
|
56545
|
-
var id = _ref4.id,
|
|
56545
|
+
var id = _ref4.id, path29 = _ref4.path, rendererID = _ref4.rendererID;
|
|
56546
56546
|
var renderer = _this._rendererInterfaces[rendererID];
|
|
56547
56547
|
if (renderer == null) {
|
|
56548
56548
|
console.warn('Invalid renderer id "'.concat(rendererID, '" for element "').concat(id, '"'));
|
|
56549
56549
|
} else {
|
|
56550
|
-
renderer.copyElementPath(id,
|
|
56550
|
+
renderer.copyElementPath(id, path29);
|
|
56551
56551
|
}
|
|
56552
56552
|
});
|
|
56553
56553
|
agent_defineProperty(agent_assertThisInitialized(_this), "deletePath", function(_ref5) {
|
|
56554
|
-
var hookID = _ref5.hookID, id = _ref5.id,
|
|
56554
|
+
var hookID = _ref5.hookID, id = _ref5.id, path29 = _ref5.path, rendererID = _ref5.rendererID, type2 = _ref5.type;
|
|
56555
56555
|
var renderer = _this._rendererInterfaces[rendererID];
|
|
56556
56556
|
if (renderer == null) {
|
|
56557
56557
|
console.warn('Invalid renderer id "'.concat(rendererID, '" for element "').concat(id, '"'));
|
|
56558
56558
|
} else {
|
|
56559
|
-
renderer.deletePath(type2, id, hookID,
|
|
56559
|
+
renderer.deletePath(type2, id, hookID, path29);
|
|
56560
56560
|
}
|
|
56561
56561
|
});
|
|
56562
56562
|
agent_defineProperty(agent_assertThisInitialized(_this), "getBridgeProtocol", function() {
|
|
@@ -56587,12 +56587,12 @@ var require_backend = __commonJS({
|
|
|
56587
56587
|
}
|
|
56588
56588
|
});
|
|
56589
56589
|
agent_defineProperty(agent_assertThisInitialized(_this), "inspectElement", function(_ref8) {
|
|
56590
|
-
var forceFullData = _ref8.forceFullData, id = _ref8.id,
|
|
56590
|
+
var forceFullData = _ref8.forceFullData, id = _ref8.id, path29 = _ref8.path, rendererID = _ref8.rendererID, requestID = _ref8.requestID;
|
|
56591
56591
|
var renderer = _this._rendererInterfaces[rendererID];
|
|
56592
56592
|
if (renderer == null) {
|
|
56593
56593
|
console.warn('Invalid renderer id "'.concat(rendererID, '" for element "').concat(id, '"'));
|
|
56594
56594
|
} else {
|
|
56595
|
-
_this._bridge.send("inspectedElement", renderer.inspectElement(requestID, id,
|
|
56595
|
+
_this._bridge.send("inspectedElement", renderer.inspectElement(requestID, id, path29, forceFullData));
|
|
56596
56596
|
if (_this._persistedSelectionMatch === null || _this._persistedSelectionMatch.id !== id) {
|
|
56597
56597
|
_this._persistedSelection = null;
|
|
56598
56598
|
_this._persistedSelectionMatch = null;
|
|
@@ -56629,20 +56629,20 @@ var require_backend = __commonJS({
|
|
|
56629
56629
|
}
|
|
56630
56630
|
});
|
|
56631
56631
|
agent_defineProperty(agent_assertThisInitialized(_this), "overrideValueAtPath", function(_ref12) {
|
|
56632
|
-
var hookID = _ref12.hookID, id = _ref12.id,
|
|
56632
|
+
var hookID = _ref12.hookID, id = _ref12.id, path29 = _ref12.path, rendererID = _ref12.rendererID, type2 = _ref12.type, value = _ref12.value;
|
|
56633
56633
|
var renderer = _this._rendererInterfaces[rendererID];
|
|
56634
56634
|
if (renderer == null) {
|
|
56635
56635
|
console.warn('Invalid renderer id "'.concat(rendererID, '" for element "').concat(id, '"'));
|
|
56636
56636
|
} else {
|
|
56637
|
-
renderer.overrideValueAtPath(type2, id, hookID,
|
|
56637
|
+
renderer.overrideValueAtPath(type2, id, hookID, path29, value);
|
|
56638
56638
|
}
|
|
56639
56639
|
});
|
|
56640
56640
|
agent_defineProperty(agent_assertThisInitialized(_this), "overrideContext", function(_ref13) {
|
|
56641
|
-
var id = _ref13.id,
|
|
56641
|
+
var id = _ref13.id, path29 = _ref13.path, rendererID = _ref13.rendererID, wasForwarded = _ref13.wasForwarded, value = _ref13.value;
|
|
56642
56642
|
if (!wasForwarded) {
|
|
56643
56643
|
_this.overrideValueAtPath({
|
|
56644
56644
|
id,
|
|
56645
|
-
path:
|
|
56645
|
+
path: path29,
|
|
56646
56646
|
rendererID,
|
|
56647
56647
|
type: "context",
|
|
56648
56648
|
value
|
|
@@ -56650,11 +56650,11 @@ var require_backend = __commonJS({
|
|
|
56650
56650
|
}
|
|
56651
56651
|
});
|
|
56652
56652
|
agent_defineProperty(agent_assertThisInitialized(_this), "overrideHookState", function(_ref14) {
|
|
56653
|
-
var id = _ref14.id, hookID = _ref14.hookID,
|
|
56653
|
+
var id = _ref14.id, hookID = _ref14.hookID, path29 = _ref14.path, rendererID = _ref14.rendererID, wasForwarded = _ref14.wasForwarded, value = _ref14.value;
|
|
56654
56654
|
if (!wasForwarded) {
|
|
56655
56655
|
_this.overrideValueAtPath({
|
|
56656
56656
|
id,
|
|
56657
|
-
path:
|
|
56657
|
+
path: path29,
|
|
56658
56658
|
rendererID,
|
|
56659
56659
|
type: "hooks",
|
|
56660
56660
|
value
|
|
@@ -56662,11 +56662,11 @@ var require_backend = __commonJS({
|
|
|
56662
56662
|
}
|
|
56663
56663
|
});
|
|
56664
56664
|
agent_defineProperty(agent_assertThisInitialized(_this), "overrideProps", function(_ref15) {
|
|
56665
|
-
var id = _ref15.id,
|
|
56665
|
+
var id = _ref15.id, path29 = _ref15.path, rendererID = _ref15.rendererID, wasForwarded = _ref15.wasForwarded, value = _ref15.value;
|
|
56666
56666
|
if (!wasForwarded) {
|
|
56667
56667
|
_this.overrideValueAtPath({
|
|
56668
56668
|
id,
|
|
56669
|
-
path:
|
|
56669
|
+
path: path29,
|
|
56670
56670
|
rendererID,
|
|
56671
56671
|
type: "props",
|
|
56672
56672
|
value
|
|
@@ -56674,11 +56674,11 @@ var require_backend = __commonJS({
|
|
|
56674
56674
|
}
|
|
56675
56675
|
});
|
|
56676
56676
|
agent_defineProperty(agent_assertThisInitialized(_this), "overrideState", function(_ref16) {
|
|
56677
|
-
var id = _ref16.id,
|
|
56677
|
+
var id = _ref16.id, path29 = _ref16.path, rendererID = _ref16.rendererID, wasForwarded = _ref16.wasForwarded, value = _ref16.value;
|
|
56678
56678
|
if (!wasForwarded) {
|
|
56679
56679
|
_this.overrideValueAtPath({
|
|
56680
56680
|
id,
|
|
56681
|
-
path:
|
|
56681
|
+
path: path29,
|
|
56682
56682
|
rendererID,
|
|
56683
56683
|
type: "state",
|
|
56684
56684
|
value
|
|
@@ -56736,12 +56736,12 @@ var require_backend = __commonJS({
|
|
|
56736
56736
|
_this._bridge.send("profilingStatus", _this._isProfiling);
|
|
56737
56737
|
});
|
|
56738
56738
|
agent_defineProperty(agent_assertThisInitialized(_this), "storeAsGlobal", function(_ref18) {
|
|
56739
|
-
var count = _ref18.count, id = _ref18.id,
|
|
56739
|
+
var count = _ref18.count, id = _ref18.id, path29 = _ref18.path, rendererID = _ref18.rendererID;
|
|
56740
56740
|
var renderer = _this._rendererInterfaces[rendererID];
|
|
56741
56741
|
if (renderer == null) {
|
|
56742
56742
|
console.warn('Invalid renderer id "'.concat(rendererID, '" for element "').concat(id, '"'));
|
|
56743
56743
|
} else {
|
|
56744
|
-
renderer.storeAsGlobal(id,
|
|
56744
|
+
renderer.storeAsGlobal(id, path29, count);
|
|
56745
56745
|
}
|
|
56746
56746
|
});
|
|
56747
56747
|
agent_defineProperty(agent_assertThisInitialized(_this), "updateConsolePatchSettings", function(_ref19) {
|
|
@@ -56761,12 +56761,12 @@ var require_backend = __commonJS({
|
|
|
56761
56761
|
}
|
|
56762
56762
|
});
|
|
56763
56763
|
agent_defineProperty(agent_assertThisInitialized(_this), "viewAttributeSource", function(_ref20) {
|
|
56764
|
-
var id = _ref20.id,
|
|
56764
|
+
var id = _ref20.id, path29 = _ref20.path, rendererID = _ref20.rendererID;
|
|
56765
56765
|
var renderer = _this._rendererInterfaces[rendererID];
|
|
56766
56766
|
if (renderer == null) {
|
|
56767
56767
|
console.warn('Invalid renderer id "'.concat(rendererID, '" for element "').concat(id, '"'));
|
|
56768
56768
|
} else {
|
|
56769
|
-
renderer.prepareViewAttributeSource(id,
|
|
56769
|
+
renderer.prepareViewAttributeSource(id, path29);
|
|
56770
56770
|
}
|
|
56771
56771
|
});
|
|
56772
56772
|
agent_defineProperty(agent_assertThisInitialized(_this), "viewElementSource", function(_ref21) {
|
|
@@ -56820,11 +56820,11 @@ var require_backend = __commonJS({
|
|
|
56820
56820
|
});
|
|
56821
56821
|
agent_defineProperty(agent_assertThisInitialized(_this), "_throttledPersistSelection", lodash_throttle_default()(function(rendererID, id) {
|
|
56822
56822
|
var renderer = _this._rendererInterfaces[rendererID];
|
|
56823
|
-
var
|
|
56824
|
-
if (
|
|
56823
|
+
var path29 = renderer != null ? renderer.getPathForElement(id) : null;
|
|
56824
|
+
if (path29 !== null) {
|
|
56825
56825
|
Object(storage["e"])(constants3["g"], JSON.stringify({
|
|
56826
56826
|
rendererID,
|
|
56827
|
-
path:
|
|
56827
|
+
path: path29
|
|
56828
56828
|
}));
|
|
56829
56829
|
} else {
|
|
56830
56830
|
Object(storage["d"])(constants3["g"]);
|
|
@@ -57744,9 +57744,9 @@ var require_backend = __commonJS({
|
|
|
57744
57744
|
}
|
|
57745
57745
|
var currentlyInspectedElementID = null;
|
|
57746
57746
|
var currentlyInspectedPaths = {};
|
|
57747
|
-
function mergeInspectedPaths(
|
|
57747
|
+
function mergeInspectedPaths(path29) {
|
|
57748
57748
|
var current = currentlyInspectedPaths;
|
|
57749
|
-
|
|
57749
|
+
path29.forEach(function(key2) {
|
|
57750
57750
|
if (!current[key2]) {
|
|
57751
57751
|
current[key2] = {};
|
|
57752
57752
|
}
|
|
@@ -57754,13 +57754,13 @@ var require_backend = __commonJS({
|
|
|
57754
57754
|
});
|
|
57755
57755
|
}
|
|
57756
57756
|
function createIsPathAllowed(key2) {
|
|
57757
|
-
return function isPathAllowed(
|
|
57757
|
+
return function isPathAllowed(path29) {
|
|
57758
57758
|
var current = currentlyInspectedPaths[key2];
|
|
57759
57759
|
if (!current) {
|
|
57760
57760
|
return false;
|
|
57761
57761
|
}
|
|
57762
|
-
for (var i2 = 0; i2 <
|
|
57763
|
-
current = current[
|
|
57762
|
+
for (var i2 = 0; i2 < path29.length; i2++) {
|
|
57763
|
+
current = current[path29[i2]];
|
|
57764
57764
|
if (!current) {
|
|
57765
57765
|
return false;
|
|
57766
57766
|
}
|
|
@@ -57810,23 +57810,23 @@ var require_backend = __commonJS({
|
|
|
57810
57810
|
break;
|
|
57811
57811
|
}
|
|
57812
57812
|
}
|
|
57813
|
-
function storeAsGlobal(id,
|
|
57813
|
+
function storeAsGlobal(id, path29, count) {
|
|
57814
57814
|
var inspectedElement = inspectElementRaw(id);
|
|
57815
57815
|
if (inspectedElement !== null) {
|
|
57816
|
-
var value = Object(src_utils["h"])(inspectedElement,
|
|
57816
|
+
var value = Object(src_utils["h"])(inspectedElement, path29);
|
|
57817
57817
|
var key2 = "$reactTemp".concat(count);
|
|
57818
57818
|
window[key2] = value;
|
|
57819
57819
|
console.log(key2);
|
|
57820
57820
|
console.log(value);
|
|
57821
57821
|
}
|
|
57822
57822
|
}
|
|
57823
|
-
function copyElementPath(id,
|
|
57823
|
+
function copyElementPath(id, path29) {
|
|
57824
57824
|
var inspectedElement = inspectElementRaw(id);
|
|
57825
57825
|
if (inspectedElement !== null) {
|
|
57826
|
-
Object(utils["b"])(Object(src_utils["h"])(inspectedElement,
|
|
57826
|
+
Object(utils["b"])(Object(src_utils["h"])(inspectedElement, path29));
|
|
57827
57827
|
}
|
|
57828
57828
|
}
|
|
57829
|
-
function inspectElement(requestID, id,
|
|
57829
|
+
function inspectElement(requestID, id, path29, forceFullData) {
|
|
57830
57830
|
if (forceFullData || currentlyInspectedElementID !== id) {
|
|
57831
57831
|
currentlyInspectedElementID = id;
|
|
57832
57832
|
currentlyInspectedPaths = {};
|
|
@@ -57839,8 +57839,8 @@ var require_backend = __commonJS({
|
|
|
57839
57839
|
type: "not-found"
|
|
57840
57840
|
};
|
|
57841
57841
|
}
|
|
57842
|
-
if (
|
|
57843
|
-
mergeInspectedPaths(
|
|
57842
|
+
if (path29 !== null) {
|
|
57843
|
+
mergeInspectedPaths(path29);
|
|
57844
57844
|
}
|
|
57845
57845
|
updateSelectedElement(id);
|
|
57846
57846
|
inspectedElement.context = Object(utils["a"])(inspectedElement.context, createIsPathAllowed("context"));
|
|
@@ -57958,10 +57958,10 @@ var require_backend = __commonJS({
|
|
|
57958
57958
|
console.groupEnd();
|
|
57959
57959
|
}
|
|
57960
57960
|
}
|
|
57961
|
-
function prepareViewAttributeSource(id,
|
|
57961
|
+
function prepareViewAttributeSource(id, path29) {
|
|
57962
57962
|
var inspectedElement = inspectElementRaw(id);
|
|
57963
57963
|
if (inspectedElement !== null) {
|
|
57964
|
-
window.$attribute = Object(src_utils["h"])(inspectedElement,
|
|
57964
|
+
window.$attribute = Object(src_utils["h"])(inspectedElement, path29);
|
|
57965
57965
|
}
|
|
57966
57966
|
}
|
|
57967
57967
|
function prepareViewElementSource(id) {
|
|
@@ -57977,14 +57977,14 @@ var require_backend = __commonJS({
|
|
|
57977
57977
|
}
|
|
57978
57978
|
global2.$type = element.type;
|
|
57979
57979
|
}
|
|
57980
|
-
function deletePath(type2, id, hookID,
|
|
57980
|
+
function deletePath(type2, id, hookID, path29) {
|
|
57981
57981
|
var internalInstance = idToInternalInstanceMap.get(id);
|
|
57982
57982
|
if (internalInstance != null) {
|
|
57983
57983
|
var publicInstance = internalInstance._instance;
|
|
57984
57984
|
if (publicInstance != null) {
|
|
57985
57985
|
switch (type2) {
|
|
57986
57986
|
case "context":
|
|
57987
|
-
Object(src_utils["a"])(publicInstance.context,
|
|
57987
|
+
Object(src_utils["a"])(publicInstance.context, path29);
|
|
57988
57988
|
forceUpdate(publicInstance);
|
|
57989
57989
|
break;
|
|
57990
57990
|
case "hooks":
|
|
@@ -57992,12 +57992,12 @@ var require_backend = __commonJS({
|
|
|
57992
57992
|
case "props":
|
|
57993
57993
|
var element = internalInstance._currentElement;
|
|
57994
57994
|
internalInstance._currentElement = _objectSpread(_objectSpread({}, element), {}, {
|
|
57995
|
-
props: Object(utils["c"])(element.props,
|
|
57995
|
+
props: Object(utils["c"])(element.props, path29)
|
|
57996
57996
|
});
|
|
57997
57997
|
forceUpdate(publicInstance);
|
|
57998
57998
|
break;
|
|
57999
57999
|
case "state":
|
|
58000
|
-
Object(src_utils["a"])(publicInstance.state,
|
|
58000
|
+
Object(src_utils["a"])(publicInstance.state, path29);
|
|
58001
58001
|
forceUpdate(publicInstance);
|
|
58002
58002
|
break;
|
|
58003
58003
|
}
|
|
@@ -58031,14 +58031,14 @@ var require_backend = __commonJS({
|
|
|
58031
58031
|
}
|
|
58032
58032
|
}
|
|
58033
58033
|
}
|
|
58034
|
-
function overrideValueAtPath(type2, id, hookID,
|
|
58034
|
+
function overrideValueAtPath(type2, id, hookID, path29, value) {
|
|
58035
58035
|
var internalInstance = idToInternalInstanceMap.get(id);
|
|
58036
58036
|
if (internalInstance != null) {
|
|
58037
58037
|
var publicInstance = internalInstance._instance;
|
|
58038
58038
|
if (publicInstance != null) {
|
|
58039
58039
|
switch (type2) {
|
|
58040
58040
|
case "context":
|
|
58041
|
-
Object(src_utils["l"])(publicInstance.context,
|
|
58041
|
+
Object(src_utils["l"])(publicInstance.context, path29, value);
|
|
58042
58042
|
forceUpdate(publicInstance);
|
|
58043
58043
|
break;
|
|
58044
58044
|
case "hooks":
|
|
@@ -58046,12 +58046,12 @@ var require_backend = __commonJS({
|
|
|
58046
58046
|
case "props":
|
|
58047
58047
|
var element = internalInstance._currentElement;
|
|
58048
58048
|
internalInstance._currentElement = _objectSpread(_objectSpread({}, element), {}, {
|
|
58049
|
-
props: Object(utils["e"])(element.props,
|
|
58049
|
+
props: Object(utils["e"])(element.props, path29, value)
|
|
58050
58050
|
});
|
|
58051
58051
|
forceUpdate(publicInstance);
|
|
58052
58052
|
break;
|
|
58053
58053
|
case "state":
|
|
58054
|
-
Object(src_utils["l"])(publicInstance.state,
|
|
58054
|
+
Object(src_utils["l"])(publicInstance.state, path29, value);
|
|
58055
58055
|
forceUpdate(publicInstance);
|
|
58056
58056
|
break;
|
|
58057
58057
|
}
|
|
@@ -58090,7 +58090,7 @@ var require_backend = __commonJS({
|
|
|
58090
58090
|
}
|
|
58091
58091
|
function setTraceUpdatesEnabled(enabled) {
|
|
58092
58092
|
}
|
|
58093
|
-
function setTrackedPath(
|
|
58093
|
+
function setTrackedPath(path29) {
|
|
58094
58094
|
}
|
|
58095
58095
|
function getOwnersList(id) {
|
|
58096
58096
|
return null;
|
|
@@ -59874,15 +59874,15 @@ var require_route3 = __commonJS({
|
|
|
59874
59874
|
};
|
|
59875
59875
|
}
|
|
59876
59876
|
function wrapConversion(toModel, graph) {
|
|
59877
|
-
const
|
|
59877
|
+
const path29 = [graph[toModel].parent, toModel];
|
|
59878
59878
|
let fn = conversions[graph[toModel].parent][toModel];
|
|
59879
59879
|
let cur = graph[toModel].parent;
|
|
59880
59880
|
while (graph[cur].parent) {
|
|
59881
|
-
|
|
59881
|
+
path29.unshift(graph[cur].parent);
|
|
59882
59882
|
fn = link(conversions[graph[cur].parent][cur], fn);
|
|
59883
59883
|
cur = graph[cur].parent;
|
|
59884
59884
|
}
|
|
59885
|
-
fn.conversion =
|
|
59885
|
+
fn.conversion = path29;
|
|
59886
59886
|
return fn;
|
|
59887
59887
|
}
|
|
59888
59888
|
module2.exports = function(fromModel) {
|
|
@@ -62888,8 +62888,8 @@ var require_util2 = __commonJS({
|
|
|
62888
62888
|
if (!(url3 instanceof URL)) {
|
|
62889
62889
|
const port = url3.port != null ? url3.port : url3.protocol === "https:" ? 443 : 80;
|
|
62890
62890
|
const origin = url3.origin != null ? url3.origin : `${url3.protocol}//${url3.hostname}:${port}`;
|
|
62891
|
-
const
|
|
62892
|
-
url3 = new URL(
|
|
62891
|
+
const path29 = url3.path != null ? url3.path : `${url3.pathname || ""}${url3.search || ""}`;
|
|
62892
|
+
url3 = new URL(path29, origin);
|
|
62893
62893
|
}
|
|
62894
62894
|
return url3;
|
|
62895
62895
|
}
|
|
@@ -64094,7 +64094,7 @@ var require_request = __commonJS({
|
|
|
64094
64094
|
}
|
|
64095
64095
|
var Request = class {
|
|
64096
64096
|
constructor(origin, {
|
|
64097
|
-
path:
|
|
64097
|
+
path: path29,
|
|
64098
64098
|
method,
|
|
64099
64099
|
body,
|
|
64100
64100
|
headers,
|
|
@@ -64106,9 +64106,9 @@ var require_request = __commonJS({
|
|
|
64106
64106
|
bodyTimeout,
|
|
64107
64107
|
throwOnError
|
|
64108
64108
|
}, handler2) {
|
|
64109
|
-
if (typeof
|
|
64109
|
+
if (typeof path29 !== "string") {
|
|
64110
64110
|
throw new InvalidArgumentError("path must be a string");
|
|
64111
|
-
} else if (
|
|
64111
|
+
} else if (path29[0] !== "/" && !(path29.startsWith("http://") || path29.startsWith("https://")) && method !== "CONNECT") {
|
|
64112
64112
|
throw new InvalidArgumentError("path must be an absolute URL or start with a slash");
|
|
64113
64113
|
}
|
|
64114
64114
|
if (typeof method !== "string") {
|
|
@@ -64147,7 +64147,7 @@ var require_request = __commonJS({
|
|
|
64147
64147
|
this.completed = false;
|
|
64148
64148
|
this.aborted = false;
|
|
64149
64149
|
this.upgrade = upgrade || null;
|
|
64150
|
-
this.path = query ? util2.buildURL(
|
|
64150
|
+
this.path = query ? util2.buildURL(path29, query) : path29;
|
|
64151
64151
|
this.origin = origin;
|
|
64152
64152
|
this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent;
|
|
64153
64153
|
this.blocking = blocking == null ? false : blocking;
|
|
@@ -64520,9 +64520,9 @@ var require_redirect = __commonJS({
|
|
|
64520
64520
|
return this.handler.onHeaders(statusCode, headers, resume, statusText);
|
|
64521
64521
|
}
|
|
64522
64522
|
const { origin, pathname, search } = util2.parseURL(new URL(this.location, this.opts.origin));
|
|
64523
|
-
const
|
|
64523
|
+
const path29 = search ? `${pathname}${search}` : pathname;
|
|
64524
64524
|
this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin);
|
|
64525
|
-
this.opts.path =
|
|
64525
|
+
this.opts.path = path29;
|
|
64526
64526
|
this.opts.origin = origin;
|
|
64527
64527
|
this.opts.maxRedirections = 0;
|
|
64528
64528
|
if (statusCode === 303 && this.opts.method !== "HEAD") {
|
|
@@ -66006,7 +66006,7 @@ var require_client = __commonJS({
|
|
|
66006
66006
|
}
|
|
66007
66007
|
}
|
|
66008
66008
|
function write(client, request) {
|
|
66009
|
-
const { body, method, path:
|
|
66009
|
+
const { body, method, path: path29, host, upgrade, headers, blocking } = request;
|
|
66010
66010
|
const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH";
|
|
66011
66011
|
if (body && typeof body.read === "function") {
|
|
66012
66012
|
body.read(0);
|
|
@@ -66052,7 +66052,7 @@ var require_client = __commonJS({
|
|
|
66052
66052
|
if (blocking) {
|
|
66053
66053
|
socket[kBlocking] = true;
|
|
66054
66054
|
}
|
|
66055
|
-
let header = `${method} ${
|
|
66055
|
+
let header = `${method} ${path29} HTTP/1.1\r
|
|
66056
66056
|
`;
|
|
66057
66057
|
if (typeof host === "string") {
|
|
66058
66058
|
header += `host: ${host}\r
|
|
@@ -67985,8 +67985,8 @@ var require_mock_utils = __commonJS({
|
|
|
67985
67985
|
}
|
|
67986
67986
|
return true;
|
|
67987
67987
|
}
|
|
67988
|
-
function matchKey(mockDispatch2, { path:
|
|
67989
|
-
const pathMatch = matchValue(mockDispatch2.path,
|
|
67988
|
+
function matchKey(mockDispatch2, { path: path29, method, body, headers }) {
|
|
67989
|
+
const pathMatch = matchValue(mockDispatch2.path, path29);
|
|
67990
67990
|
const methodMatch = matchValue(mockDispatch2.method, method);
|
|
67991
67991
|
const bodyMatch = typeof mockDispatch2.body !== "undefined" ? matchValue(mockDispatch2.body, body) : true;
|
|
67992
67992
|
const headersMatch = matchHeaders(mockDispatch2, headers);
|
|
@@ -68003,7 +68003,7 @@ var require_mock_utils = __commonJS({
|
|
|
68003
68003
|
}
|
|
68004
68004
|
function getMockDispatch(mockDispatches, key2) {
|
|
68005
68005
|
const resolvedPath = key2.query ? buildURL(key2.path, key2.query) : key2.path;
|
|
68006
|
-
let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path:
|
|
68006
|
+
let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path29 }) => matchValue(path29, resolvedPath));
|
|
68007
68007
|
if (matchedMockDispatches.length === 0) {
|
|
68008
68008
|
throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`);
|
|
68009
68009
|
}
|
|
@@ -68040,9 +68040,9 @@ var require_mock_utils = __commonJS({
|
|
|
68040
68040
|
}
|
|
68041
68041
|
}
|
|
68042
68042
|
function buildKey(opts) {
|
|
68043
|
-
const { path:
|
|
68043
|
+
const { path: path29, method, body, headers, query } = opts;
|
|
68044
68044
|
return {
|
|
68045
|
-
path:
|
|
68045
|
+
path: path29,
|
|
68046
68046
|
method,
|
|
68047
68047
|
body,
|
|
68048
68048
|
headers,
|
|
@@ -68584,10 +68584,10 @@ var require_pending_interceptors_formatter = __commonJS({
|
|
|
68584
68584
|
}
|
|
68585
68585
|
format(pendingInterceptors) {
|
|
68586
68586
|
const withPrettyHeaders = pendingInterceptors.map(
|
|
68587
|
-
({ method, path:
|
|
68587
|
+
({ method, path: path29, data: { statusCode }, persist, times, timesInvoked, origin }) => ({
|
|
68588
68588
|
Method: method,
|
|
68589
68589
|
Origin: origin,
|
|
68590
|
-
Path:
|
|
68590
|
+
Path: path29,
|
|
68591
68591
|
"Status code": statusCode,
|
|
68592
68592
|
Persistent: persist ? "\u2705" : "\u274C",
|
|
68593
68593
|
Invocations: timesInvoked,
|
|
@@ -70559,11 +70559,11 @@ var require_fetch = __commonJS({
|
|
|
70559
70559
|
const { request } = fetchParams;
|
|
70560
70560
|
const {
|
|
70561
70561
|
protocol: scheme,
|
|
70562
|
-
pathname:
|
|
70562
|
+
pathname: path29
|
|
70563
70563
|
} = requestCurrentURL(request);
|
|
70564
70564
|
switch (scheme) {
|
|
70565
70565
|
case "about:": {
|
|
70566
|
-
if (
|
|
70566
|
+
if (path29 === "blank") {
|
|
70567
70567
|
const resp = makeResponse({
|
|
70568
70568
|
statusText: "OK",
|
|
70569
70569
|
headersList: [
|
|
@@ -73357,7 +73357,7 @@ var require_windows = __commonJS({
|
|
|
73357
73357
|
module2.exports = isexe;
|
|
73358
73358
|
isexe.sync = sync;
|
|
73359
73359
|
var fs12 = require("fs");
|
|
73360
|
-
function checkPathExt(
|
|
73360
|
+
function checkPathExt(path29, options) {
|
|
73361
73361
|
var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
|
|
73362
73362
|
if (!pathext) {
|
|
73363
73363
|
return true;
|
|
@@ -73368,25 +73368,25 @@ var require_windows = __commonJS({
|
|
|
73368
73368
|
}
|
|
73369
73369
|
for (var i2 = 0; i2 < pathext.length; i2++) {
|
|
73370
73370
|
var p = pathext[i2].toLowerCase();
|
|
73371
|
-
if (p &&
|
|
73371
|
+
if (p && path29.substr(-p.length).toLowerCase() === p) {
|
|
73372
73372
|
return true;
|
|
73373
73373
|
}
|
|
73374
73374
|
}
|
|
73375
73375
|
return false;
|
|
73376
73376
|
}
|
|
73377
|
-
function checkStat(stat3,
|
|
73377
|
+
function checkStat(stat3, path29, options) {
|
|
73378
73378
|
if (!stat3.isSymbolicLink() && !stat3.isFile()) {
|
|
73379
73379
|
return false;
|
|
73380
73380
|
}
|
|
73381
|
-
return checkPathExt(
|
|
73381
|
+
return checkPathExt(path29, options);
|
|
73382
73382
|
}
|
|
73383
|
-
function isexe(
|
|
73384
|
-
fs12.stat(
|
|
73385
|
-
cb2(er, er ? false : checkStat(stat3,
|
|
73383
|
+
function isexe(path29, options, cb2) {
|
|
73384
|
+
fs12.stat(path29, function(er, stat3) {
|
|
73385
|
+
cb2(er, er ? false : checkStat(stat3, path29, options));
|
|
73386
73386
|
});
|
|
73387
73387
|
}
|
|
73388
|
-
function sync(
|
|
73389
|
-
return checkStat(fs12.statSync(
|
|
73388
|
+
function sync(path29, options) {
|
|
73389
|
+
return checkStat(fs12.statSync(path29), path29, options);
|
|
73390
73390
|
}
|
|
73391
73391
|
}
|
|
73392
73392
|
});
|
|
@@ -73398,13 +73398,13 @@ var require_mode = __commonJS({
|
|
|
73398
73398
|
module2.exports = isexe;
|
|
73399
73399
|
isexe.sync = sync;
|
|
73400
73400
|
var fs12 = require("fs");
|
|
73401
|
-
function isexe(
|
|
73402
|
-
fs12.stat(
|
|
73401
|
+
function isexe(path29, options, cb2) {
|
|
73402
|
+
fs12.stat(path29, function(er, stat3) {
|
|
73403
73403
|
cb2(er, er ? false : checkStat(stat3, options));
|
|
73404
73404
|
});
|
|
73405
73405
|
}
|
|
73406
|
-
function sync(
|
|
73407
|
-
return checkStat(fs12.statSync(
|
|
73406
|
+
function sync(path29, options) {
|
|
73407
|
+
return checkStat(fs12.statSync(path29), options);
|
|
73408
73408
|
}
|
|
73409
73409
|
function checkStat(stat3, options) {
|
|
73410
73410
|
return stat3.isFile() && checkMode(stat3, options);
|
|
@@ -73438,7 +73438,7 @@ var require_isexe = __commonJS({
|
|
|
73438
73438
|
}
|
|
73439
73439
|
module2.exports = isexe;
|
|
73440
73440
|
isexe.sync = sync;
|
|
73441
|
-
function isexe(
|
|
73441
|
+
function isexe(path29, options, cb2) {
|
|
73442
73442
|
if (typeof options === "function") {
|
|
73443
73443
|
cb2 = options;
|
|
73444
73444
|
options = {};
|
|
@@ -73448,7 +73448,7 @@ var require_isexe = __commonJS({
|
|
|
73448
73448
|
throw new TypeError("callback not provided");
|
|
73449
73449
|
}
|
|
73450
73450
|
return new Promise(function(resolve13, reject) {
|
|
73451
|
-
isexe(
|
|
73451
|
+
isexe(path29, options || {}, function(er, is) {
|
|
73452
73452
|
if (er) {
|
|
73453
73453
|
reject(er);
|
|
73454
73454
|
} else {
|
|
@@ -73457,7 +73457,7 @@ var require_isexe = __commonJS({
|
|
|
73457
73457
|
});
|
|
73458
73458
|
});
|
|
73459
73459
|
}
|
|
73460
|
-
core(
|
|
73460
|
+
core(path29, options || {}, function(er, is) {
|
|
73461
73461
|
if (er) {
|
|
73462
73462
|
if (er.code === "EACCES" || options && options.ignoreErrors) {
|
|
73463
73463
|
er = null;
|
|
@@ -73467,9 +73467,9 @@ var require_isexe = __commonJS({
|
|
|
73467
73467
|
cb2(er, is);
|
|
73468
73468
|
});
|
|
73469
73469
|
}
|
|
73470
|
-
function sync(
|
|
73470
|
+
function sync(path29, options) {
|
|
73471
73471
|
try {
|
|
73472
|
-
return core.sync(
|
|
73472
|
+
return core.sync(path29, options || {});
|
|
73473
73473
|
} catch (er) {
|
|
73474
73474
|
if (options && options.ignoreErrors || er.code === "EACCES") {
|
|
73475
73475
|
return false;
|
|
@@ -73486,7 +73486,7 @@ var require_which = __commonJS({
|
|
|
73486
73486
|
"../../node_modules/which/which.js"(exports2, module2) {
|
|
73487
73487
|
init_import_meta_url();
|
|
73488
73488
|
var isWindows2 = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
|
|
73489
|
-
var
|
|
73489
|
+
var path29 = require("path");
|
|
73490
73490
|
var COLON = isWindows2 ? ";" : ":";
|
|
73491
73491
|
var isexe = require_isexe();
|
|
73492
73492
|
var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
@@ -73522,7 +73522,7 @@ var require_which = __commonJS({
|
|
|
73522
73522
|
return opt.all && found.length ? resolve13(found) : reject(getNotFoundError(cmd));
|
|
73523
73523
|
const ppRaw = pathEnv[i2];
|
|
73524
73524
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
73525
|
-
const pCmd =
|
|
73525
|
+
const pCmd = path29.join(pathPart, cmd);
|
|
73526
73526
|
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
73527
73527
|
resolve13(subStep(p, i2, 0));
|
|
73528
73528
|
});
|
|
@@ -73549,7 +73549,7 @@ var require_which = __commonJS({
|
|
|
73549
73549
|
for (let i2 = 0; i2 < pathEnv.length; i2++) {
|
|
73550
73550
|
const ppRaw = pathEnv[i2];
|
|
73551
73551
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
73552
|
-
const pCmd =
|
|
73552
|
+
const pCmd = path29.join(pathPart, cmd);
|
|
73553
73553
|
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
73554
73554
|
for (let j = 0; j < pathExt.length; j++) {
|
|
73555
73555
|
const cur = p + pathExt[j];
|
|
@@ -73599,7 +73599,7 @@ var require_resolveCommand = __commonJS({
|
|
|
73599
73599
|
"../../node_modules/cross-spawn/lib/util/resolveCommand.js"(exports2, module2) {
|
|
73600
73600
|
"use strict";
|
|
73601
73601
|
init_import_meta_url();
|
|
73602
|
-
var
|
|
73602
|
+
var path29 = require("path");
|
|
73603
73603
|
var which = require_which();
|
|
73604
73604
|
var getPathKey = require_path_key();
|
|
73605
73605
|
function resolveCommandAttempt(parsed, withoutPathExt) {
|
|
@@ -73617,7 +73617,7 @@ var require_resolveCommand = __commonJS({
|
|
|
73617
73617
|
try {
|
|
73618
73618
|
resolved = which.sync(parsed.command, {
|
|
73619
73619
|
path: env5[getPathKey({ env: env5 })],
|
|
73620
|
-
pathExt: withoutPathExt ?
|
|
73620
|
+
pathExt: withoutPathExt ? path29.delimiter : void 0
|
|
73621
73621
|
});
|
|
73622
73622
|
} catch (e2) {
|
|
73623
73623
|
} finally {
|
|
@@ -73626,7 +73626,7 @@ var require_resolveCommand = __commonJS({
|
|
|
73626
73626
|
}
|
|
73627
73627
|
}
|
|
73628
73628
|
if (resolved) {
|
|
73629
|
-
resolved =
|
|
73629
|
+
resolved = path29.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
|
|
73630
73630
|
}
|
|
73631
73631
|
return resolved;
|
|
73632
73632
|
}
|
|
@@ -73683,8 +73683,8 @@ var require_shebang_command = __commonJS({
|
|
|
73683
73683
|
if (!match) {
|
|
73684
73684
|
return null;
|
|
73685
73685
|
}
|
|
73686
|
-
const [
|
|
73687
|
-
const binary =
|
|
73686
|
+
const [path29, argument] = match[0].replace(/#! ?/, "").split(" ");
|
|
73687
|
+
const binary = path29.split("/").pop();
|
|
73688
73688
|
if (binary === "env") {
|
|
73689
73689
|
return argument;
|
|
73690
73690
|
}
|
|
@@ -73721,7 +73721,7 @@ var require_parse2 = __commonJS({
|
|
|
73721
73721
|
"../../node_modules/cross-spawn/lib/parse.js"(exports2, module2) {
|
|
73722
73722
|
"use strict";
|
|
73723
73723
|
init_import_meta_url();
|
|
73724
|
-
var
|
|
73724
|
+
var path29 = require("path");
|
|
73725
73725
|
var resolveCommand = require_resolveCommand();
|
|
73726
73726
|
var escape2 = require_escape();
|
|
73727
73727
|
var readShebang = require_readShebang();
|
|
@@ -73746,7 +73746,7 @@ var require_parse2 = __commonJS({
|
|
|
73746
73746
|
const needsShell = !isExecutableRegExp.test(commandFile);
|
|
73747
73747
|
if (parsed.options.forceShell || needsShell) {
|
|
73748
73748
|
const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
|
|
73749
|
-
parsed.command =
|
|
73749
|
+
parsed.command = path29.normalize(parsed.command);
|
|
73750
73750
|
parsed.command = escape2.command(parsed.command);
|
|
73751
73751
|
parsed.args = parsed.args.map((arg2) => escape2.argument(arg2, needsDoubleEscapeMetaChars));
|
|
73752
73752
|
const shellCommand = [parsed.command].concat(parsed.args).join(" ");
|
|
@@ -73882,7 +73882,7 @@ var require_npm_run_path = __commonJS({
|
|
|
73882
73882
|
"../../node_modules/clipboardy/node_modules/npm-run-path/index.js"(exports2, module2) {
|
|
73883
73883
|
"use strict";
|
|
73884
73884
|
init_import_meta_url();
|
|
73885
|
-
var
|
|
73885
|
+
var path29 = require("path");
|
|
73886
73886
|
var pathKey2 = require_path_key();
|
|
73887
73887
|
var npmRunPath2 = (options) => {
|
|
73888
73888
|
options = {
|
|
@@ -73892,16 +73892,16 @@ var require_npm_run_path = __commonJS({
|
|
|
73892
73892
|
...options
|
|
73893
73893
|
};
|
|
73894
73894
|
let previous;
|
|
73895
|
-
let cwdPath =
|
|
73895
|
+
let cwdPath = path29.resolve(options.cwd);
|
|
73896
73896
|
const result = [];
|
|
73897
73897
|
while (previous !== cwdPath) {
|
|
73898
|
-
result.push(
|
|
73898
|
+
result.push(path29.join(cwdPath, "node_modules/.bin"));
|
|
73899
73899
|
previous = cwdPath;
|
|
73900
|
-
cwdPath =
|
|
73900
|
+
cwdPath = path29.resolve(cwdPath, "..");
|
|
73901
73901
|
}
|
|
73902
|
-
const execPathDir =
|
|
73902
|
+
const execPathDir = path29.resolve(options.cwd, options.execPath, "..");
|
|
73903
73903
|
result.push(execPathDir);
|
|
73904
|
-
return result.concat(options.path).join(
|
|
73904
|
+
return result.concat(options.path).join(path29.delimiter);
|
|
73905
73905
|
};
|
|
73906
73906
|
module2.exports = npmRunPath2;
|
|
73907
73907
|
module2.exports.default = npmRunPath2;
|
|
@@ -73911,9 +73911,9 @@ var require_npm_run_path = __commonJS({
|
|
|
73911
73911
|
...options
|
|
73912
73912
|
};
|
|
73913
73913
|
const env5 = { ...options.env };
|
|
73914
|
-
const
|
|
73915
|
-
options.path = env5[
|
|
73916
|
-
env5[
|
|
73914
|
+
const path30 = pathKey2({ env: env5 });
|
|
73915
|
+
options.path = env5[path30];
|
|
73916
|
+
env5[path30] = module2.exports(options);
|
|
73917
73917
|
return env5;
|
|
73918
73918
|
};
|
|
73919
73919
|
}
|
|
@@ -74916,7 +74916,7 @@ var require_execa = __commonJS({
|
|
|
74916
74916
|
"../../node_modules/clipboardy/node_modules/execa/index.js"(exports2, module2) {
|
|
74917
74917
|
"use strict";
|
|
74918
74918
|
init_import_meta_url();
|
|
74919
|
-
var
|
|
74919
|
+
var path29 = require("path");
|
|
74920
74920
|
var childProcess2 = require("child_process");
|
|
74921
74921
|
var crossSpawn2 = require_cross_spawn();
|
|
74922
74922
|
var stripFinalNewline2 = require_strip_final_newline();
|
|
@@ -74958,7 +74958,7 @@ var require_execa = __commonJS({
|
|
|
74958
74958
|
};
|
|
74959
74959
|
options.env = getEnv2(options);
|
|
74960
74960
|
options.stdio = normalizeStdio2(options);
|
|
74961
|
-
if (process.platform === "win32" &&
|
|
74961
|
+
if (process.platform === "win32" && path29.basename(file, ".exe") === "cmd") {
|
|
74962
74962
|
args.unshift("/q");
|
|
74963
74963
|
}
|
|
74964
74964
|
return { file, args, options, parsed };
|
|
@@ -75146,7 +75146,7 @@ var require_arch = __commonJS({
|
|
|
75146
75146
|
init_import_meta_url();
|
|
75147
75147
|
var cp2 = require("child_process");
|
|
75148
75148
|
var fs12 = require("fs");
|
|
75149
|
-
var
|
|
75149
|
+
var path29 = require("path");
|
|
75150
75150
|
module2.exports = function arch2() {
|
|
75151
75151
|
if (process.arch === "x64") {
|
|
75152
75152
|
return "x64";
|
|
@@ -75163,7 +75163,7 @@ var require_arch = __commonJS({
|
|
|
75163
75163
|
var sysRoot = useEnv ? process.env.SYSTEMROOT : "C:\\Windows";
|
|
75164
75164
|
var isWOW64 = false;
|
|
75165
75165
|
try {
|
|
75166
|
-
isWOW64 = !!fs12.statSync(
|
|
75166
|
+
isWOW64 = !!fs12.statSync(path29.join(sysRoot, "sysnative"));
|
|
75167
75167
|
} catch (err2) {
|
|
75168
75168
|
}
|
|
75169
75169
|
return isWOW64 ? "x64" : "x86";
|
|
@@ -75185,7 +75185,7 @@ var require_command_exists = __commonJS({
|
|
|
75185
75185
|
var exec = require("child_process").exec;
|
|
75186
75186
|
var execSync4 = require("child_process").execSync;
|
|
75187
75187
|
var fs12 = require("fs");
|
|
75188
|
-
var
|
|
75188
|
+
var path29 = require("path");
|
|
75189
75189
|
var access3 = fs12.access;
|
|
75190
75190
|
var accessSync = fs12.accessSync;
|
|
75191
75191
|
var constants3 = fs12.constants || fs12;
|
|
@@ -75289,8 +75289,8 @@ var require_command_exists = __commonJS({
|
|
|
75289
75289
|
cleanInput = function(s) {
|
|
75290
75290
|
var isPathName = /[\\]/.test(s);
|
|
75291
75291
|
if (isPathName) {
|
|
75292
|
-
var dirname11 = '"' +
|
|
75293
|
-
var basename5 = '"' +
|
|
75292
|
+
var dirname11 = '"' + path29.dirname(s) + '"';
|
|
75293
|
+
var basename5 = '"' + path29.basename(s) + '"';
|
|
75294
75294
|
return dirname11 + ":" + basename5;
|
|
75295
75295
|
}
|
|
75296
75296
|
return '"' + s + '"';
|
|
@@ -76002,7 +76002,7 @@ var require_minimatch = __commonJS({
|
|
|
76002
76002
|
init_import_meta_url();
|
|
76003
76003
|
module2.exports = minimatch;
|
|
76004
76004
|
minimatch.Minimatch = Minimatch;
|
|
76005
|
-
var
|
|
76005
|
+
var path29 = function() {
|
|
76006
76006
|
try {
|
|
76007
76007
|
return require("path");
|
|
76008
76008
|
} catch (e2) {
|
|
@@ -76010,7 +76010,7 @@ var require_minimatch = __commonJS({
|
|
|
76010
76010
|
}() || {
|
|
76011
76011
|
sep: "/"
|
|
76012
76012
|
};
|
|
76013
|
-
minimatch.sep =
|
|
76013
|
+
minimatch.sep = path29.sep;
|
|
76014
76014
|
var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {};
|
|
76015
76015
|
var expand = require_brace_expansion();
|
|
76016
76016
|
var plTypes = {
|
|
@@ -76101,8 +76101,8 @@ var require_minimatch = __commonJS({
|
|
|
76101
76101
|
if (!options)
|
|
76102
76102
|
options = {};
|
|
76103
76103
|
pattern = pattern.trim();
|
|
76104
|
-
if (!options.allowWindowsEscape &&
|
|
76105
|
-
pattern = pattern.split(
|
|
76104
|
+
if (!options.allowWindowsEscape && path29.sep !== "/") {
|
|
76105
|
+
pattern = pattern.split(path29.sep).join("/");
|
|
76106
76106
|
}
|
|
76107
76107
|
this.options = options;
|
|
76108
76108
|
this.set = [];
|
|
@@ -76479,8 +76479,8 @@ var require_minimatch = __commonJS({
|
|
|
76479
76479
|
if (f === "/" && partial)
|
|
76480
76480
|
return true;
|
|
76481
76481
|
var options = this.options;
|
|
76482
|
-
if (
|
|
76483
|
-
f = f.split(
|
|
76482
|
+
if (path29.sep !== "/") {
|
|
76483
|
+
f = f.split(path29.sep).join("/");
|
|
76484
76484
|
}
|
|
76485
76485
|
f = f.split(slashSplit);
|
|
76486
76486
|
this.debug(this.pattern, "split", f);
|
|
@@ -76641,12 +76641,12 @@ var require_path_is_absolute = __commonJS({
|
|
|
76641
76641
|
"../../node_modules/path-is-absolute/index.js"(exports2, module2) {
|
|
76642
76642
|
"use strict";
|
|
76643
76643
|
init_import_meta_url();
|
|
76644
|
-
function posix(
|
|
76645
|
-
return
|
|
76644
|
+
function posix(path29) {
|
|
76645
|
+
return path29.charAt(0) === "/";
|
|
76646
76646
|
}
|
|
76647
|
-
function win32(
|
|
76647
|
+
function win32(path29) {
|
|
76648
76648
|
var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;
|
|
76649
|
-
var result = splitDeviceRe.exec(
|
|
76649
|
+
var result = splitDeviceRe.exec(path29);
|
|
76650
76650
|
var device = result[1] || "";
|
|
76651
76651
|
var isUnc = Boolean(device && device.charAt(1) !== ":");
|
|
76652
76652
|
return Boolean(result[2] || isUnc);
|
|
@@ -76672,7 +76672,7 @@ var require_common = __commonJS({
|
|
|
76672
76672
|
return Object.prototype.hasOwnProperty.call(obj, field);
|
|
76673
76673
|
}
|
|
76674
76674
|
var fs12 = require("fs");
|
|
76675
|
-
var
|
|
76675
|
+
var path29 = require("path");
|
|
76676
76676
|
var minimatch = require_minimatch();
|
|
76677
76677
|
var isAbsolute = require_path_is_absolute();
|
|
76678
76678
|
var Minimatch = minimatch.Minimatch;
|
|
@@ -76737,11 +76737,11 @@ var require_common = __commonJS({
|
|
|
76737
76737
|
if (!ownProp(options, "cwd"))
|
|
76738
76738
|
self2.cwd = cwd2;
|
|
76739
76739
|
else {
|
|
76740
|
-
self2.cwd =
|
|
76740
|
+
self2.cwd = path29.resolve(options.cwd);
|
|
76741
76741
|
self2.changedCwd = self2.cwd !== cwd2;
|
|
76742
76742
|
}
|
|
76743
|
-
self2.root = options.root ||
|
|
76744
|
-
self2.root =
|
|
76743
|
+
self2.root = options.root || path29.resolve(self2.cwd, "/");
|
|
76744
|
+
self2.root = path29.resolve(self2.root);
|
|
76745
76745
|
if (process.platform === "win32")
|
|
76746
76746
|
self2.root = self2.root.replace(/\\/g, "/");
|
|
76747
76747
|
self2.cwdAbs = isAbsolute(self2.cwd) ? self2.cwd : makeAbs(self2, self2.cwd);
|
|
@@ -76822,30 +76822,30 @@ var require_common = __commonJS({
|
|
|
76822
76822
|
function makeAbs(self2, f) {
|
|
76823
76823
|
var abs = f;
|
|
76824
76824
|
if (f.charAt(0) === "/") {
|
|
76825
|
-
abs =
|
|
76825
|
+
abs = path29.join(self2.root, f);
|
|
76826
76826
|
} else if (isAbsolute(f) || f === "") {
|
|
76827
76827
|
abs = f;
|
|
76828
76828
|
} else if (self2.changedCwd) {
|
|
76829
|
-
abs =
|
|
76829
|
+
abs = path29.resolve(self2.cwd, f);
|
|
76830
76830
|
} else {
|
|
76831
|
-
abs =
|
|
76831
|
+
abs = path29.resolve(f);
|
|
76832
76832
|
}
|
|
76833
76833
|
if (process.platform === "win32")
|
|
76834
76834
|
abs = abs.replace(/\\/g, "/");
|
|
76835
76835
|
return abs;
|
|
76836
76836
|
}
|
|
76837
|
-
function isIgnored(self2,
|
|
76837
|
+
function isIgnored(self2, path30) {
|
|
76838
76838
|
if (!self2.ignore.length)
|
|
76839
76839
|
return false;
|
|
76840
76840
|
return self2.ignore.some(function(item) {
|
|
76841
|
-
return item.matcher.match(
|
|
76841
|
+
return item.matcher.match(path30) || !!(item.gmatcher && item.gmatcher.match(path30));
|
|
76842
76842
|
});
|
|
76843
76843
|
}
|
|
76844
|
-
function childrenIgnored(self2,
|
|
76844
|
+
function childrenIgnored(self2, path30) {
|
|
76845
76845
|
if (!self2.ignore.length)
|
|
76846
76846
|
return false;
|
|
76847
76847
|
return self2.ignore.some(function(item) {
|
|
76848
|
-
return !!(item.gmatcher && item.gmatcher.match(
|
|
76848
|
+
return !!(item.gmatcher && item.gmatcher.match(path30));
|
|
76849
76849
|
});
|
|
76850
76850
|
}
|
|
76851
76851
|
}
|
|
@@ -76862,7 +76862,7 @@ var require_sync = __commonJS({
|
|
|
76862
76862
|
var Minimatch = minimatch.Minimatch;
|
|
76863
76863
|
var Glob = require_glob().Glob;
|
|
76864
76864
|
var util2 = require("util");
|
|
76865
|
-
var
|
|
76865
|
+
var path29 = require("path");
|
|
76866
76866
|
var assert12 = require("assert");
|
|
76867
76867
|
var isAbsolute = require_path_is_absolute();
|
|
76868
76868
|
var common = require_common();
|
|
@@ -76988,7 +76988,7 @@ var require_sync = __commonJS({
|
|
|
76988
76988
|
e2 = prefix2 + e2;
|
|
76989
76989
|
}
|
|
76990
76990
|
if (e2.charAt(0) === "/" && !this.nomount) {
|
|
76991
|
-
e2 =
|
|
76991
|
+
e2 = path29.join(this.root, e2);
|
|
76992
76992
|
}
|
|
76993
76993
|
this._emitMatch(index, e2);
|
|
76994
76994
|
}
|
|
@@ -77137,9 +77137,9 @@ var require_sync = __commonJS({
|
|
|
77137
77137
|
if (prefix2 && isAbsolute(prefix2) && !this.nomount) {
|
|
77138
77138
|
var trail = /[\/\\]$/.test(prefix2);
|
|
77139
77139
|
if (prefix2.charAt(0) === "/") {
|
|
77140
|
-
prefix2 =
|
|
77140
|
+
prefix2 = path29.join(this.root, prefix2);
|
|
77141
77141
|
} else {
|
|
77142
|
-
prefix2 =
|
|
77142
|
+
prefix2 = path29.resolve(this.root, prefix2);
|
|
77143
77143
|
if (trail)
|
|
77144
77144
|
prefix2 += "/";
|
|
77145
77145
|
}
|
|
@@ -77338,7 +77338,7 @@ var require_glob = __commonJS({
|
|
|
77338
77338
|
var Minimatch = minimatch.Minimatch;
|
|
77339
77339
|
var inherits = require_inherits();
|
|
77340
77340
|
var EE = require("events").EventEmitter;
|
|
77341
|
-
var
|
|
77341
|
+
var path29 = require("path");
|
|
77342
77342
|
var assert12 = require("assert");
|
|
77343
77343
|
var isAbsolute = require_path_is_absolute();
|
|
77344
77344
|
var globSync = require_sync();
|
|
@@ -77619,7 +77619,7 @@ var require_glob = __commonJS({
|
|
|
77619
77619
|
e2 = prefix2 + e2;
|
|
77620
77620
|
}
|
|
77621
77621
|
if (e2.charAt(0) === "/" && !this.nomount) {
|
|
77622
|
-
e2 =
|
|
77622
|
+
e2 = path29.join(this.root, e2);
|
|
77623
77623
|
}
|
|
77624
77624
|
this._emitMatch(index, e2);
|
|
77625
77625
|
}
|
|
@@ -77806,9 +77806,9 @@ var require_glob = __commonJS({
|
|
|
77806
77806
|
if (prefix2 && isAbsolute(prefix2) && !this.nomount) {
|
|
77807
77807
|
var trail = /[\/\\]$/.test(prefix2);
|
|
77808
77808
|
if (prefix2.charAt(0) === "/") {
|
|
77809
|
-
prefix2 =
|
|
77809
|
+
prefix2 = path29.join(this.root, prefix2);
|
|
77810
77810
|
} else {
|
|
77811
|
-
prefix2 =
|
|
77811
|
+
prefix2 = path29.resolve(this.root, prefix2);
|
|
77812
77812
|
if (trail)
|
|
77813
77813
|
prefix2 += "/";
|
|
77814
77814
|
}
|
|
@@ -77887,7 +77887,7 @@ var require_rimraf = __commonJS({
|
|
|
77887
77887
|
"../../node_modules/rimraf/rimraf.js"(exports2, module2) {
|
|
77888
77888
|
init_import_meta_url();
|
|
77889
77889
|
var assert12 = require("assert");
|
|
77890
|
-
var
|
|
77890
|
+
var path29 = require("path");
|
|
77891
77891
|
var fs12 = require("fs");
|
|
77892
77892
|
var glob = void 0;
|
|
77893
77893
|
try {
|
|
@@ -78069,7 +78069,7 @@ var require_rimraf = __commonJS({
|
|
|
78069
78069
|
return options.rmdir(p, cb2);
|
|
78070
78070
|
let errState;
|
|
78071
78071
|
files.forEach((f) => {
|
|
78072
|
-
rimraf(
|
|
78072
|
+
rimraf(path29.join(p, f), options, (er2) => {
|
|
78073
78073
|
if (errState)
|
|
78074
78074
|
return;
|
|
78075
78075
|
if (er2)
|
|
@@ -78144,7 +78144,7 @@ var require_rimraf = __commonJS({
|
|
|
78144
78144
|
var rmkidsSync = (p, options) => {
|
|
78145
78145
|
assert12(p);
|
|
78146
78146
|
assert12(options);
|
|
78147
|
-
options.readdirSync(p).forEach((f) => rimrafSync(
|
|
78147
|
+
options.readdirSync(p).forEach((f) => rimrafSync(path29.join(p, f), options));
|
|
78148
78148
|
const retries = isWindows2 ? 100 : 1;
|
|
78149
78149
|
let i2 = 0;
|
|
78150
78150
|
do {
|
|
@@ -78170,7 +78170,7 @@ var require_tmp = __commonJS({
|
|
|
78170
78170
|
init_import_meta_url();
|
|
78171
78171
|
var fs12 = require("fs");
|
|
78172
78172
|
var os8 = require("os");
|
|
78173
|
-
var
|
|
78173
|
+
var path29 = require("path");
|
|
78174
78174
|
var crypto5 = require("crypto");
|
|
78175
78175
|
var _c = { fs: fs12.constants, os: os8.constants };
|
|
78176
78176
|
var rimraf = require_rimraf();
|
|
@@ -78393,9 +78393,9 @@ var require_tmp = __commonJS({
|
|
|
78393
78393
|
function _generateTmpName(opts) {
|
|
78394
78394
|
const tmpDir = opts.tmpdir;
|
|
78395
78395
|
if (!_isUndefined(opts.name))
|
|
78396
|
-
return
|
|
78396
|
+
return path29.join(tmpDir, opts.dir, opts.name);
|
|
78397
78397
|
if (!_isUndefined(opts.template))
|
|
78398
|
-
return
|
|
78398
|
+
return path29.join(tmpDir, opts.dir, opts.template).replace(TEMPLATE_PATTERN, _randomChars(6));
|
|
78399
78399
|
const name = [
|
|
78400
78400
|
opts.prefix ? opts.prefix : "tmp",
|
|
78401
78401
|
"-",
|
|
@@ -78404,7 +78404,7 @@ var require_tmp = __commonJS({
|
|
|
78404
78404
|
_randomChars(12),
|
|
78405
78405
|
opts.postfix ? "-" + opts.postfix : ""
|
|
78406
78406
|
].join("");
|
|
78407
|
-
return
|
|
78407
|
+
return path29.join(tmpDir, opts.dir, name);
|
|
78408
78408
|
}
|
|
78409
78409
|
function _assertAndSanitizeOptions(options) {
|
|
78410
78410
|
options.tmpdir = _getTmpDir(options);
|
|
@@ -78425,9 +78425,9 @@ var require_tmp = __commonJS({
|
|
|
78425
78425
|
options.detachDescriptor = !!options.detachDescriptor;
|
|
78426
78426
|
options.discardDescriptor = !!options.discardDescriptor;
|
|
78427
78427
|
options.unsafeCleanup = !!options.unsafeCleanup;
|
|
78428
|
-
options.dir = _isUndefined(options.dir) ? "" :
|
|
78429
|
-
options.template = _isUndefined(options.template) ? void 0 :
|
|
78430
|
-
options.template = _isBlank(options.template) ? void 0 :
|
|
78428
|
+
options.dir = _isUndefined(options.dir) ? "" : path29.relative(tmpDir, _resolvePath(options.dir, tmpDir));
|
|
78429
|
+
options.template = _isUndefined(options.template) ? void 0 : path29.relative(tmpDir, _resolvePath(options.template, tmpDir));
|
|
78430
|
+
options.template = _isBlank(options.template) ? void 0 : path29.relative(options.dir, options.template);
|
|
78431
78431
|
options.name = _isUndefined(options.name) ? void 0 : _sanitizeName(options.name);
|
|
78432
78432
|
options.prefix = _isUndefined(options.prefix) ? "" : options.prefix;
|
|
78433
78433
|
options.postfix = _isUndefined(options.postfix) ? "" : options.postfix;
|
|
@@ -78435,9 +78435,9 @@ var require_tmp = __commonJS({
|
|
|
78435
78435
|
function _resolvePath(name, tmpDir) {
|
|
78436
78436
|
const sanitizedName = _sanitizeName(name);
|
|
78437
78437
|
if (sanitizedName.startsWith(tmpDir)) {
|
|
78438
|
-
return
|
|
78438
|
+
return path29.resolve(sanitizedName);
|
|
78439
78439
|
} else {
|
|
78440
|
-
return
|
|
78440
|
+
return path29.resolve(path29.join(tmpDir, sanitizedName));
|
|
78441
78441
|
}
|
|
78442
78442
|
}
|
|
78443
78443
|
function _sanitizeName(name) {
|
|
@@ -78448,13 +78448,13 @@ var require_tmp = __commonJS({
|
|
|
78448
78448
|
}
|
|
78449
78449
|
function _assertIsRelative(name, option, tmpDir) {
|
|
78450
78450
|
if (option === "name") {
|
|
78451
|
-
if (
|
|
78451
|
+
if (path29.isAbsolute(name))
|
|
78452
78452
|
throw new Error(`${option} option must not contain an absolute path, found "${name}".`);
|
|
78453
|
-
let basename5 =
|
|
78453
|
+
let basename5 = path29.basename(name);
|
|
78454
78454
|
if (basename5 === ".." || basename5 === "." || basename5 !== name)
|
|
78455
78455
|
throw new Error(`${option} option must not contain a path, found "${name}".`);
|
|
78456
78456
|
} else {
|
|
78457
|
-
if (
|
|
78457
|
+
if (path29.isAbsolute(name) && !name.startsWith(tmpDir)) {
|
|
78458
78458
|
throw new Error(`${option} option must be relative to "${tmpDir}", found "${name}".`);
|
|
78459
78459
|
}
|
|
78460
78460
|
let resolvedPath = _resolvePath(name, tmpDir);
|
|
@@ -78475,7 +78475,7 @@ var require_tmp = __commonJS({
|
|
|
78475
78475
|
_gracefulCleanup = true;
|
|
78476
78476
|
}
|
|
78477
78477
|
function _getTmpDir(options) {
|
|
78478
|
-
return
|
|
78478
|
+
return path29.resolve(_sanitizeName(options && options.tmpdir || os8.tmpdir()));
|
|
78479
78479
|
}
|
|
78480
78480
|
process.addListener(EXIT, _garbageCollector);
|
|
78481
78481
|
Object.defineProperty(module2.exports, "tmpdir", {
|
|
@@ -78506,14 +78506,14 @@ var require_tmp_promise = __commonJS({
|
|
|
78506
78506
|
var fileWithOptions = promisify2(
|
|
78507
78507
|
(options, cb2) => tmp4.file(
|
|
78508
78508
|
options,
|
|
78509
|
-
(err2,
|
|
78509
|
+
(err2, path29, fd, cleanup) => err2 ? cb2(err2) : cb2(void 0, { path: path29, fd, cleanup: promisify2(cleanup) })
|
|
78510
78510
|
)
|
|
78511
78511
|
);
|
|
78512
78512
|
module2.exports.file = async (options) => fileWithOptions(options);
|
|
78513
78513
|
module2.exports.withFile = async function withFile(fn, options) {
|
|
78514
|
-
const { path:
|
|
78514
|
+
const { path: path29, fd, cleanup } = await module2.exports.file(options);
|
|
78515
78515
|
try {
|
|
78516
|
-
return await fn({ path:
|
|
78516
|
+
return await fn({ path: path29, fd });
|
|
78517
78517
|
} finally {
|
|
78518
78518
|
await cleanup();
|
|
78519
78519
|
}
|
|
@@ -78522,14 +78522,14 @@ var require_tmp_promise = __commonJS({
|
|
|
78522
78522
|
var dirWithOptions = promisify2(
|
|
78523
78523
|
(options, cb2) => tmp4.dir(
|
|
78524
78524
|
options,
|
|
78525
|
-
(err2,
|
|
78525
|
+
(err2, path29, cleanup) => err2 ? cb2(err2) : cb2(void 0, { path: path29, cleanup: promisify2(cleanup) })
|
|
78526
78526
|
)
|
|
78527
78527
|
);
|
|
78528
78528
|
module2.exports.dir = async (options) => dirWithOptions(options);
|
|
78529
78529
|
module2.exports.withDir = async function withDir(fn, options) {
|
|
78530
|
-
const { path:
|
|
78530
|
+
const { path: path29, cleanup } = await module2.exports.dir(options);
|
|
78531
78531
|
try {
|
|
78532
|
-
return await fn({ path:
|
|
78532
|
+
return await fn({ path: path29 });
|
|
78533
78533
|
} finally {
|
|
78534
78534
|
await cleanup();
|
|
78535
78535
|
}
|
|
@@ -92537,11 +92537,11 @@ var require_mime_types = __commonJS({
|
|
|
92537
92537
|
}
|
|
92538
92538
|
return exts[0];
|
|
92539
92539
|
}
|
|
92540
|
-
function lookup(
|
|
92541
|
-
if (!
|
|
92540
|
+
function lookup(path29) {
|
|
92541
|
+
if (!path29 || typeof path29 !== "string") {
|
|
92542
92542
|
return false;
|
|
92543
92543
|
}
|
|
92544
|
-
var extension2 = extname4("x." +
|
|
92544
|
+
var extension2 = extname4("x." + path29).toLowerCase().substr(1);
|
|
92545
92545
|
if (!extension2) {
|
|
92546
92546
|
return false;
|
|
92547
92547
|
}
|
|
@@ -96224,7 +96224,7 @@ var require_path_to_regexp = __commonJS({
|
|
|
96224
96224
|
init_import_meta_url();
|
|
96225
96225
|
module2.exports = pathtoRegexp;
|
|
96226
96226
|
var MATCHING_GROUP_REGEXP = /\((?!\?)/g;
|
|
96227
|
-
function pathtoRegexp(
|
|
96227
|
+
function pathtoRegexp(path29, keys, options) {
|
|
96228
96228
|
options = options || {};
|
|
96229
96229
|
keys = keys || [];
|
|
96230
96230
|
var strict = options.strict;
|
|
@@ -96235,23 +96235,23 @@ var require_path_to_regexp = __commonJS({
|
|
|
96235
96235
|
var i2 = 0;
|
|
96236
96236
|
var name = 0;
|
|
96237
96237
|
var m;
|
|
96238
|
-
if (
|
|
96239
|
-
while (m = MATCHING_GROUP_REGEXP.exec(
|
|
96238
|
+
if (path29 instanceof RegExp) {
|
|
96239
|
+
while (m = MATCHING_GROUP_REGEXP.exec(path29.source)) {
|
|
96240
96240
|
keys.push({
|
|
96241
96241
|
name: name++,
|
|
96242
96242
|
optional: false,
|
|
96243
96243
|
offset: m.index
|
|
96244
96244
|
});
|
|
96245
96245
|
}
|
|
96246
|
-
return
|
|
96246
|
+
return path29;
|
|
96247
96247
|
}
|
|
96248
|
-
if (Array.isArray(
|
|
96249
|
-
|
|
96248
|
+
if (Array.isArray(path29)) {
|
|
96249
|
+
path29 = path29.map(function(value) {
|
|
96250
96250
|
return pathtoRegexp(value, keys, options).source;
|
|
96251
96251
|
});
|
|
96252
|
-
return new RegExp("(?:" +
|
|
96252
|
+
return new RegExp("(?:" + path29.join("|") + ")", flags);
|
|
96253
96253
|
}
|
|
96254
|
-
|
|
96254
|
+
path29 = ("^" + path29 + (strict ? "" : path29[path29.length - 1] === "/" ? "?" : "/?")).replace(/\/\(/g, "/(?:").replace(/([\/\.])/g, "\\$1").replace(/(\\\/)?(\\\.)?:(\w+)(\(.*?\))?(\*)?(\?)?/g, function(match, slash, format4, key2, capture, star, optional, offset) {
|
|
96255
96255
|
slash = slash || "";
|
|
96256
96256
|
format4 = format4 || "";
|
|
96257
96257
|
capture = capture || "([^\\/" + format4 + "]+?)";
|
|
@@ -96271,10 +96271,10 @@ var require_path_to_regexp = __commonJS({
|
|
|
96271
96271
|
}
|
|
96272
96272
|
return "(.*)";
|
|
96273
96273
|
});
|
|
96274
|
-
while (m = MATCHING_GROUP_REGEXP.exec(
|
|
96274
|
+
while (m = MATCHING_GROUP_REGEXP.exec(path29)) {
|
|
96275
96275
|
var escapeCount = 0;
|
|
96276
96276
|
var index = m.index;
|
|
96277
|
-
while (
|
|
96277
|
+
while (path29.charAt(--index) === "\\") {
|
|
96278
96278
|
escapeCount++;
|
|
96279
96279
|
}
|
|
96280
96280
|
if (escapeCount % 2 === 1) {
|
|
@@ -96289,8 +96289,8 @@ var require_path_to_regexp = __commonJS({
|
|
|
96289
96289
|
}
|
|
96290
96290
|
i2++;
|
|
96291
96291
|
}
|
|
96292
|
-
|
|
96293
|
-
return new RegExp(
|
|
96292
|
+
path29 += end ? "$" : path29[path29.length - 1] === "/" ? "" : "(?=\\/|$)";
|
|
96293
|
+
return new RegExp(path29, flags);
|
|
96294
96294
|
}
|
|
96295
96295
|
}
|
|
96296
96296
|
});
|
|
@@ -96304,19 +96304,19 @@ var require_layer = __commonJS({
|
|
|
96304
96304
|
var debug = require_src4()("express:router:layer");
|
|
96305
96305
|
var hasOwnProperty2 = Object.prototype.hasOwnProperty;
|
|
96306
96306
|
module2.exports = Layer;
|
|
96307
|
-
function Layer(
|
|
96307
|
+
function Layer(path29, options, fn) {
|
|
96308
96308
|
if (!(this instanceof Layer)) {
|
|
96309
|
-
return new Layer(
|
|
96309
|
+
return new Layer(path29, options, fn);
|
|
96310
96310
|
}
|
|
96311
|
-
debug("new %o",
|
|
96311
|
+
debug("new %o", path29);
|
|
96312
96312
|
var opts = options || {};
|
|
96313
96313
|
this.handle = fn;
|
|
96314
96314
|
this.name = fn.name || "<anonymous>";
|
|
96315
96315
|
this.params = void 0;
|
|
96316
96316
|
this.path = void 0;
|
|
96317
|
-
this.regexp = pathRegexp(
|
|
96318
|
-
this.regexp.fast_star =
|
|
96319
|
-
this.regexp.fast_slash =
|
|
96317
|
+
this.regexp = pathRegexp(path29, this.keys = [], opts);
|
|
96318
|
+
this.regexp.fast_star = path29 === "*";
|
|
96319
|
+
this.regexp.fast_slash = path29 === "/" && opts.end === false;
|
|
96320
96320
|
}
|
|
96321
96321
|
Layer.prototype.handle_error = function handle_error(error, req, res, next) {
|
|
96322
96322
|
var fn = this.handle;
|
|
@@ -96340,20 +96340,20 @@ var require_layer = __commonJS({
|
|
|
96340
96340
|
next(err2);
|
|
96341
96341
|
}
|
|
96342
96342
|
};
|
|
96343
|
-
Layer.prototype.match = function match(
|
|
96343
|
+
Layer.prototype.match = function match(path29) {
|
|
96344
96344
|
var match2;
|
|
96345
|
-
if (
|
|
96345
|
+
if (path29 != null) {
|
|
96346
96346
|
if (this.regexp.fast_slash) {
|
|
96347
96347
|
this.params = {};
|
|
96348
96348
|
this.path = "";
|
|
96349
96349
|
return true;
|
|
96350
96350
|
}
|
|
96351
96351
|
if (this.regexp.fast_star) {
|
|
96352
|
-
this.params = { "0": decode_param(
|
|
96353
|
-
this.path =
|
|
96352
|
+
this.params = { "0": decode_param(path29) };
|
|
96353
|
+
this.path = path29;
|
|
96354
96354
|
return true;
|
|
96355
96355
|
}
|
|
96356
|
-
match2 = this.regexp.exec(
|
|
96356
|
+
match2 = this.regexp.exec(path29);
|
|
96357
96357
|
}
|
|
96358
96358
|
if (!match2) {
|
|
96359
96359
|
this.params = void 0;
|
|
@@ -96448,10 +96448,10 @@ var require_route4 = __commonJS({
|
|
|
96448
96448
|
var slice = Array.prototype.slice;
|
|
96449
96449
|
var toString = Object.prototype.toString;
|
|
96450
96450
|
module2.exports = Route;
|
|
96451
|
-
function Route(
|
|
96452
|
-
this.path =
|
|
96451
|
+
function Route(path29) {
|
|
96452
|
+
this.path = path29;
|
|
96453
96453
|
this.stack = [];
|
|
96454
|
-
debug("new %o",
|
|
96454
|
+
debug("new %o", path29);
|
|
96455
96455
|
this.methods = {};
|
|
96456
96456
|
}
|
|
96457
96457
|
Route.prototype._handles_method = function _handles_method(method) {
|
|
@@ -96667,8 +96667,8 @@ var require_router = __commonJS({
|
|
|
96667
96667
|
if (++sync > 100) {
|
|
96668
96668
|
return setImmediate(next, err2);
|
|
96669
96669
|
}
|
|
96670
|
-
var
|
|
96671
|
-
if (
|
|
96670
|
+
var path29 = getPathname(req);
|
|
96671
|
+
if (path29 == null) {
|
|
96672
96672
|
return done(layerError);
|
|
96673
96673
|
}
|
|
96674
96674
|
var layer;
|
|
@@ -96676,7 +96676,7 @@ var require_router = __commonJS({
|
|
|
96676
96676
|
var route;
|
|
96677
96677
|
while (match !== true && idx < stack.length) {
|
|
96678
96678
|
layer = stack[idx++];
|
|
96679
|
-
match = matchLayer(layer,
|
|
96679
|
+
match = matchLayer(layer, path29);
|
|
96680
96680
|
route = layer.route;
|
|
96681
96681
|
if (typeof match !== "boolean") {
|
|
96682
96682
|
layerError = layerError || match;
|
|
@@ -96714,18 +96714,18 @@ var require_router = __commonJS({
|
|
|
96714
96714
|
} else if (route) {
|
|
96715
96715
|
layer.handle_request(req, res, next);
|
|
96716
96716
|
} else {
|
|
96717
|
-
trim_prefix(layer, layerError, layerPath,
|
|
96717
|
+
trim_prefix(layer, layerError, layerPath, path29);
|
|
96718
96718
|
}
|
|
96719
96719
|
sync = 0;
|
|
96720
96720
|
});
|
|
96721
96721
|
}
|
|
96722
|
-
function trim_prefix(layer, layerError, layerPath,
|
|
96722
|
+
function trim_prefix(layer, layerError, layerPath, path29) {
|
|
96723
96723
|
if (layerPath.length !== 0) {
|
|
96724
|
-
if (layerPath !==
|
|
96724
|
+
if (layerPath !== path29.slice(0, layerPath.length)) {
|
|
96725
96725
|
next(layerError);
|
|
96726
96726
|
return;
|
|
96727
96727
|
}
|
|
96728
|
-
var c =
|
|
96728
|
+
var c = path29[layerPath.length];
|
|
96729
96729
|
if (c && c !== "/" && c !== ".")
|
|
96730
96730
|
return next(layerError);
|
|
96731
96731
|
debug("trim prefix (%s) from url %s", layerPath, req.url);
|
|
@@ -96805,7 +96805,7 @@ var require_router = __commonJS({
|
|
|
96805
96805
|
};
|
|
96806
96806
|
proto.use = function use(fn) {
|
|
96807
96807
|
var offset = 0;
|
|
96808
|
-
var
|
|
96808
|
+
var path29 = "/";
|
|
96809
96809
|
if (typeof fn !== "function") {
|
|
96810
96810
|
var arg2 = fn;
|
|
96811
96811
|
while (Array.isArray(arg2) && arg2.length !== 0) {
|
|
@@ -96813,7 +96813,7 @@ var require_router = __commonJS({
|
|
|
96813
96813
|
}
|
|
96814
96814
|
if (typeof arg2 !== "function") {
|
|
96815
96815
|
offset = 1;
|
|
96816
|
-
|
|
96816
|
+
path29 = fn;
|
|
96817
96817
|
}
|
|
96818
96818
|
}
|
|
96819
96819
|
var callbacks = flatten(slice.call(arguments, offset));
|
|
@@ -96825,8 +96825,8 @@ var require_router = __commonJS({
|
|
|
96825
96825
|
if (typeof fn !== "function") {
|
|
96826
96826
|
throw new TypeError("Router.use() requires a middleware function but got a " + gettype(fn));
|
|
96827
96827
|
}
|
|
96828
|
-
debug("use %o %s",
|
|
96829
|
-
var layer = new Layer(
|
|
96828
|
+
debug("use %o %s", path29, fn.name || "<anonymous>");
|
|
96829
|
+
var layer = new Layer(path29, {
|
|
96830
96830
|
sensitive: this.caseSensitive,
|
|
96831
96831
|
strict: false,
|
|
96832
96832
|
end: false
|
|
@@ -96836,9 +96836,9 @@ var require_router = __commonJS({
|
|
|
96836
96836
|
}
|
|
96837
96837
|
return this;
|
|
96838
96838
|
};
|
|
96839
|
-
proto.route = function route(
|
|
96840
|
-
var route2 = new Route(
|
|
96841
|
-
var layer = new Layer(
|
|
96839
|
+
proto.route = function route(path29) {
|
|
96840
|
+
var route2 = new Route(path29);
|
|
96841
|
+
var layer = new Layer(path29, {
|
|
96842
96842
|
sensitive: this.caseSensitive,
|
|
96843
96843
|
strict: this.strict,
|
|
96844
96844
|
end: true
|
|
@@ -96848,8 +96848,8 @@ var require_router = __commonJS({
|
|
|
96848
96848
|
return route2;
|
|
96849
96849
|
};
|
|
96850
96850
|
methods.concat("all").forEach(function(method) {
|
|
96851
|
-
proto[method] = function(
|
|
96852
|
-
var route = this.route(
|
|
96851
|
+
proto[method] = function(path29) {
|
|
96852
|
+
var route = this.route(path29);
|
|
96853
96853
|
route[method].apply(route, slice.call(arguments, 1));
|
|
96854
96854
|
return this;
|
|
96855
96855
|
};
|
|
@@ -96885,9 +96885,9 @@ var require_router = __commonJS({
|
|
|
96885
96885
|
}
|
|
96886
96886
|
return toString.call(obj).replace(objectRegExp, "$1");
|
|
96887
96887
|
}
|
|
96888
|
-
function matchLayer(layer,
|
|
96888
|
+
function matchLayer(layer, path29) {
|
|
96889
96889
|
try {
|
|
96890
|
-
return layer.match(
|
|
96890
|
+
return layer.match(path29);
|
|
96891
96891
|
} catch (err2) {
|
|
96892
96892
|
return err2;
|
|
96893
96893
|
}
|
|
@@ -97009,13 +97009,13 @@ var require_view = __commonJS({
|
|
|
97009
97009
|
"use strict";
|
|
97010
97010
|
init_import_meta_url();
|
|
97011
97011
|
var debug = require_src4()("express:view");
|
|
97012
|
-
var
|
|
97012
|
+
var path29 = require("path");
|
|
97013
97013
|
var fs12 = require("fs");
|
|
97014
|
-
var dirname11 =
|
|
97015
|
-
var basename5 =
|
|
97016
|
-
var extname4 =
|
|
97017
|
-
var join11 =
|
|
97018
|
-
var resolve13 =
|
|
97014
|
+
var dirname11 = path29.dirname;
|
|
97015
|
+
var basename5 = path29.basename;
|
|
97016
|
+
var extname4 = path29.extname;
|
|
97017
|
+
var join11 = path29.join;
|
|
97018
|
+
var resolve13 = path29.resolve;
|
|
97019
97019
|
module2.exports = View;
|
|
97020
97020
|
function View(name, options) {
|
|
97021
97021
|
var opts = options || {};
|
|
@@ -97044,17 +97044,17 @@ var require_view = __commonJS({
|
|
|
97044
97044
|
this.path = this.lookup(fileName);
|
|
97045
97045
|
}
|
|
97046
97046
|
View.prototype.lookup = function lookup(name) {
|
|
97047
|
-
var
|
|
97047
|
+
var path30;
|
|
97048
97048
|
var roots = [].concat(this.root);
|
|
97049
97049
|
debug('lookup "%s"', name);
|
|
97050
|
-
for (var i2 = 0; i2 < roots.length && !
|
|
97050
|
+
for (var i2 = 0; i2 < roots.length && !path30; i2++) {
|
|
97051
97051
|
var root = roots[i2];
|
|
97052
97052
|
var loc = resolve13(root, name);
|
|
97053
97053
|
var dir = dirname11(loc);
|
|
97054
97054
|
var file = basename5(loc);
|
|
97055
|
-
|
|
97055
|
+
path30 = this.resolve(dir, file);
|
|
97056
97056
|
}
|
|
97057
|
-
return
|
|
97057
|
+
return path30;
|
|
97058
97058
|
};
|
|
97059
97059
|
View.prototype.render = function render9(options, callback) {
|
|
97060
97060
|
debug('render "%s"', this.path);
|
|
@@ -97062,21 +97062,21 @@ var require_view = __commonJS({
|
|
|
97062
97062
|
};
|
|
97063
97063
|
View.prototype.resolve = function resolve14(dir, file) {
|
|
97064
97064
|
var ext = this.ext;
|
|
97065
|
-
var
|
|
97066
|
-
var stat3 = tryStat(
|
|
97065
|
+
var path30 = join11(dir, file);
|
|
97066
|
+
var stat3 = tryStat(path30);
|
|
97067
97067
|
if (stat3 && stat3.isFile()) {
|
|
97068
|
-
return
|
|
97068
|
+
return path30;
|
|
97069
97069
|
}
|
|
97070
|
-
|
|
97071
|
-
stat3 = tryStat(
|
|
97070
|
+
path30 = join11(dir, basename5(file, ext), "index" + ext);
|
|
97071
|
+
stat3 = tryStat(path30);
|
|
97072
97072
|
if (stat3 && stat3.isFile()) {
|
|
97073
|
-
return
|
|
97073
|
+
return path30;
|
|
97074
97074
|
}
|
|
97075
97075
|
};
|
|
97076
|
-
function tryStat(
|
|
97077
|
-
debug('stat "%s"',
|
|
97076
|
+
function tryStat(path30) {
|
|
97077
|
+
debug('stat "%s"', path30);
|
|
97078
97078
|
try {
|
|
97079
|
-
return fs12.statSync(
|
|
97079
|
+
return fs12.statSync(path30);
|
|
97080
97080
|
} catch (e2) {
|
|
97081
97081
|
return void 0;
|
|
97082
97082
|
}
|
|
@@ -97929,7 +97929,7 @@ var require_types = __commonJS({
|
|
|
97929
97929
|
var require_mime = __commonJS({
|
|
97930
97930
|
"../../node_modules/send/node_modules/mime/mime.js"(exports2, module2) {
|
|
97931
97931
|
init_import_meta_url();
|
|
97932
|
-
var
|
|
97932
|
+
var path29 = require("path");
|
|
97933
97933
|
var fs12 = require("fs");
|
|
97934
97934
|
function Mime() {
|
|
97935
97935
|
this.types = /* @__PURE__ */ Object.create(null);
|
|
@@ -97959,8 +97959,8 @@ var require_mime = __commonJS({
|
|
|
97959
97959
|
this.define(map);
|
|
97960
97960
|
this._loading = null;
|
|
97961
97961
|
};
|
|
97962
|
-
Mime.prototype.lookup = function(
|
|
97963
|
-
var ext =
|
|
97962
|
+
Mime.prototype.lookup = function(path30, fallback) {
|
|
97963
|
+
var ext = path30.replace(/^.*[\.\/\\]/, "").toLowerCase();
|
|
97964
97964
|
return this.types[ext] || fallback || this.default_type;
|
|
97965
97965
|
};
|
|
97966
97966
|
Mime.prototype.extension = function(mimeType) {
|
|
@@ -98197,28 +98197,28 @@ var require_send = __commonJS({
|
|
|
98197
98197
|
var ms = require_ms5();
|
|
98198
98198
|
var onFinished = require_on_finished();
|
|
98199
98199
|
var parseRange = require_range_parser();
|
|
98200
|
-
var
|
|
98200
|
+
var path29 = require("path");
|
|
98201
98201
|
var statuses = require_statuses();
|
|
98202
98202
|
var Stream = require("stream");
|
|
98203
98203
|
var util2 = require("util");
|
|
98204
|
-
var extname4 =
|
|
98205
|
-
var join11 =
|
|
98206
|
-
var normalize2 =
|
|
98207
|
-
var resolve13 =
|
|
98208
|
-
var sep2 =
|
|
98204
|
+
var extname4 = path29.extname;
|
|
98205
|
+
var join11 = path29.join;
|
|
98206
|
+
var normalize2 = path29.normalize;
|
|
98207
|
+
var resolve13 = path29.resolve;
|
|
98208
|
+
var sep2 = path29.sep;
|
|
98209
98209
|
var BYTES_RANGE_REGEXP = /^ *bytes=/;
|
|
98210
98210
|
var MAX_MAXAGE = 60 * 60 * 24 * 365 * 1e3;
|
|
98211
98211
|
var UP_PATH_REGEXP = /(?:^|[\\/])\.\.(?:[\\/]|$)/;
|
|
98212
98212
|
module2.exports = send;
|
|
98213
98213
|
module2.exports.mime = mime;
|
|
98214
|
-
function send(req,
|
|
98215
|
-
return new SendStream(req,
|
|
98214
|
+
function send(req, path30, options) {
|
|
98215
|
+
return new SendStream(req, path30, options);
|
|
98216
98216
|
}
|
|
98217
|
-
function SendStream(req,
|
|
98217
|
+
function SendStream(req, path30, options) {
|
|
98218
98218
|
Stream.call(this);
|
|
98219
98219
|
var opts = options || {};
|
|
98220
98220
|
this.options = opts;
|
|
98221
|
-
this.path =
|
|
98221
|
+
this.path = path30;
|
|
98222
98222
|
this.req = req;
|
|
98223
98223
|
this._acceptRanges = opts.acceptRanges !== void 0 ? Boolean(opts.acceptRanges) : true;
|
|
98224
98224
|
this._cacheControl = opts.cacheControl !== void 0 ? Boolean(opts.cacheControl) : true;
|
|
@@ -98264,8 +98264,8 @@ var require_send = __commonJS({
|
|
|
98264
98264
|
this._index = index2;
|
|
98265
98265
|
return this;
|
|
98266
98266
|
}, "send.index: pass index as option");
|
|
98267
|
-
SendStream.prototype.root = function root(
|
|
98268
|
-
this._root = resolve13(String(
|
|
98267
|
+
SendStream.prototype.root = function root(path30) {
|
|
98268
|
+
this._root = resolve13(String(path30));
|
|
98269
98269
|
debug("root %s", this._root);
|
|
98270
98270
|
return this;
|
|
98271
98271
|
};
|
|
@@ -98378,10 +98378,10 @@ var require_send = __commonJS({
|
|
|
98378
98378
|
var lastModified = this.res.getHeader("Last-Modified");
|
|
98379
98379
|
return parseHttpDate(lastModified) <= parseHttpDate(ifRange);
|
|
98380
98380
|
};
|
|
98381
|
-
SendStream.prototype.redirect = function redirect(
|
|
98381
|
+
SendStream.prototype.redirect = function redirect(path30) {
|
|
98382
98382
|
var res = this.res;
|
|
98383
98383
|
if (hasListeners(this, "directory")) {
|
|
98384
|
-
this.emit("directory", res,
|
|
98384
|
+
this.emit("directory", res, path30);
|
|
98385
98385
|
return;
|
|
98386
98386
|
}
|
|
98387
98387
|
if (this.hasTrailingSlash()) {
|
|
@@ -98401,42 +98401,42 @@ var require_send = __commonJS({
|
|
|
98401
98401
|
SendStream.prototype.pipe = function pipe(res) {
|
|
98402
98402
|
var root = this._root;
|
|
98403
98403
|
this.res = res;
|
|
98404
|
-
var
|
|
98405
|
-
if (
|
|
98404
|
+
var path30 = decode(this.path);
|
|
98405
|
+
if (path30 === -1) {
|
|
98406
98406
|
this.error(400);
|
|
98407
98407
|
return res;
|
|
98408
98408
|
}
|
|
98409
|
-
if (~
|
|
98409
|
+
if (~path30.indexOf("\0")) {
|
|
98410
98410
|
this.error(400);
|
|
98411
98411
|
return res;
|
|
98412
98412
|
}
|
|
98413
98413
|
var parts;
|
|
98414
98414
|
if (root !== null) {
|
|
98415
|
-
if (
|
|
98416
|
-
|
|
98415
|
+
if (path30) {
|
|
98416
|
+
path30 = normalize2("." + sep2 + path30);
|
|
98417
98417
|
}
|
|
98418
|
-
if (UP_PATH_REGEXP.test(
|
|
98419
|
-
debug('malicious path "%s"',
|
|
98418
|
+
if (UP_PATH_REGEXP.test(path30)) {
|
|
98419
|
+
debug('malicious path "%s"', path30);
|
|
98420
98420
|
this.error(403);
|
|
98421
98421
|
return res;
|
|
98422
98422
|
}
|
|
98423
|
-
parts =
|
|
98424
|
-
|
|
98423
|
+
parts = path30.split(sep2);
|
|
98424
|
+
path30 = normalize2(join11(root, path30));
|
|
98425
98425
|
} else {
|
|
98426
|
-
if (UP_PATH_REGEXP.test(
|
|
98427
|
-
debug('malicious path "%s"',
|
|
98426
|
+
if (UP_PATH_REGEXP.test(path30)) {
|
|
98427
|
+
debug('malicious path "%s"', path30);
|
|
98428
98428
|
this.error(403);
|
|
98429
98429
|
return res;
|
|
98430
98430
|
}
|
|
98431
|
-
parts = normalize2(
|
|
98432
|
-
|
|
98431
|
+
parts = normalize2(path30).split(sep2);
|
|
98432
|
+
path30 = resolve13(path30);
|
|
98433
98433
|
}
|
|
98434
98434
|
if (containsDotFile(parts)) {
|
|
98435
98435
|
var access3 = this._dotfiles;
|
|
98436
98436
|
if (access3 === void 0) {
|
|
98437
98437
|
access3 = parts[parts.length - 1][0] === "." ? this._hidden ? "allow" : "ignore" : "allow";
|
|
98438
98438
|
}
|
|
98439
|
-
debug('%s dotfile "%s"', access3,
|
|
98439
|
+
debug('%s dotfile "%s"', access3, path30);
|
|
98440
98440
|
switch (access3) {
|
|
98441
98441
|
case "allow":
|
|
98442
98442
|
break;
|
|
@@ -98450,13 +98450,13 @@ var require_send = __commonJS({
|
|
|
98450
98450
|
}
|
|
98451
98451
|
}
|
|
98452
98452
|
if (this._index.length && this.hasTrailingSlash()) {
|
|
98453
|
-
this.sendIndex(
|
|
98453
|
+
this.sendIndex(path30);
|
|
98454
98454
|
return res;
|
|
98455
98455
|
}
|
|
98456
|
-
this.sendFile(
|
|
98456
|
+
this.sendFile(path30);
|
|
98457
98457
|
return res;
|
|
98458
98458
|
};
|
|
98459
|
-
SendStream.prototype.send = function send2(
|
|
98459
|
+
SendStream.prototype.send = function send2(path30, stat3) {
|
|
98460
98460
|
var len = stat3.size;
|
|
98461
98461
|
var options = this.options;
|
|
98462
98462
|
var opts = {};
|
|
@@ -98468,9 +98468,9 @@ var require_send = __commonJS({
|
|
|
98468
98468
|
this.headersAlreadySent();
|
|
98469
98469
|
return;
|
|
98470
98470
|
}
|
|
98471
|
-
debug('pipe "%s"',
|
|
98472
|
-
this.setHeader(
|
|
98473
|
-
this.type(
|
|
98471
|
+
debug('pipe "%s"', path30);
|
|
98472
|
+
this.setHeader(path30, stat3);
|
|
98473
|
+
this.type(path30);
|
|
98474
98474
|
if (this.isConditionalGET()) {
|
|
98475
98475
|
if (this.isPreconditionFailure()) {
|
|
98476
98476
|
this.error(412);
|
|
@@ -98520,28 +98520,28 @@ var require_send = __commonJS({
|
|
|
98520
98520
|
res.end();
|
|
98521
98521
|
return;
|
|
98522
98522
|
}
|
|
98523
|
-
this.stream(
|
|
98523
|
+
this.stream(path30, opts);
|
|
98524
98524
|
};
|
|
98525
|
-
SendStream.prototype.sendFile = function sendFile(
|
|
98525
|
+
SendStream.prototype.sendFile = function sendFile(path30) {
|
|
98526
98526
|
var i2 = 0;
|
|
98527
98527
|
var self2 = this;
|
|
98528
|
-
debug('stat "%s"',
|
|
98529
|
-
fs12.stat(
|
|
98530
|
-
if (err2 && err2.code === "ENOENT" && !extname4(
|
|
98528
|
+
debug('stat "%s"', path30);
|
|
98529
|
+
fs12.stat(path30, function onstat(err2, stat3) {
|
|
98530
|
+
if (err2 && err2.code === "ENOENT" && !extname4(path30) && path30[path30.length - 1] !== sep2) {
|
|
98531
98531
|
return next(err2);
|
|
98532
98532
|
}
|
|
98533
98533
|
if (err2)
|
|
98534
98534
|
return self2.onStatError(err2);
|
|
98535
98535
|
if (stat3.isDirectory())
|
|
98536
|
-
return self2.redirect(
|
|
98537
|
-
self2.emit("file",
|
|
98538
|
-
self2.send(
|
|
98536
|
+
return self2.redirect(path30);
|
|
98537
|
+
self2.emit("file", path30, stat3);
|
|
98538
|
+
self2.send(path30, stat3);
|
|
98539
98539
|
});
|
|
98540
98540
|
function next(err2) {
|
|
98541
98541
|
if (self2._extensions.length <= i2) {
|
|
98542
98542
|
return err2 ? self2.onStatError(err2) : self2.error(404);
|
|
98543
98543
|
}
|
|
98544
|
-
var p =
|
|
98544
|
+
var p = path30 + "." + self2._extensions[i2++];
|
|
98545
98545
|
debug('stat "%s"', p);
|
|
98546
98546
|
fs12.stat(p, function(err3, stat3) {
|
|
98547
98547
|
if (err3)
|
|
@@ -98553,7 +98553,7 @@ var require_send = __commonJS({
|
|
|
98553
98553
|
});
|
|
98554
98554
|
}
|
|
98555
98555
|
};
|
|
98556
|
-
SendStream.prototype.sendIndex = function sendIndex(
|
|
98556
|
+
SendStream.prototype.sendIndex = function sendIndex(path30) {
|
|
98557
98557
|
var i2 = -1;
|
|
98558
98558
|
var self2 = this;
|
|
98559
98559
|
function next(err2) {
|
|
@@ -98562,7 +98562,7 @@ var require_send = __commonJS({
|
|
|
98562
98562
|
return self2.onStatError(err2);
|
|
98563
98563
|
return self2.error(404);
|
|
98564
98564
|
}
|
|
98565
|
-
var p = join11(
|
|
98565
|
+
var p = join11(path30, self2._index[i2]);
|
|
98566
98566
|
debug('stat "%s"', p);
|
|
98567
98567
|
fs12.stat(p, function(err3, stat3) {
|
|
98568
98568
|
if (err3)
|
|
@@ -98575,10 +98575,10 @@ var require_send = __commonJS({
|
|
|
98575
98575
|
}
|
|
98576
98576
|
next();
|
|
98577
98577
|
};
|
|
98578
|
-
SendStream.prototype.stream = function stream2(
|
|
98578
|
+
SendStream.prototype.stream = function stream2(path30, options) {
|
|
98579
98579
|
var self2 = this;
|
|
98580
98580
|
var res = this.res;
|
|
98581
|
-
var stream3 = fs12.createReadStream(
|
|
98581
|
+
var stream3 = fs12.createReadStream(path30, options);
|
|
98582
98582
|
this.emit("stream", stream3);
|
|
98583
98583
|
stream3.pipe(res);
|
|
98584
98584
|
function cleanup() {
|
|
@@ -98593,11 +98593,11 @@ var require_send = __commonJS({
|
|
|
98593
98593
|
self2.emit("end");
|
|
98594
98594
|
});
|
|
98595
98595
|
};
|
|
98596
|
-
SendStream.prototype.type = function type2(
|
|
98596
|
+
SendStream.prototype.type = function type2(path30) {
|
|
98597
98597
|
var res = this.res;
|
|
98598
98598
|
if (res.getHeader("Content-Type"))
|
|
98599
98599
|
return;
|
|
98600
|
-
var type3 = mime.lookup(
|
|
98600
|
+
var type3 = mime.lookup(path30);
|
|
98601
98601
|
if (!type3) {
|
|
98602
98602
|
debug("no content-type");
|
|
98603
98603
|
return;
|
|
@@ -98606,9 +98606,9 @@ var require_send = __commonJS({
|
|
|
98606
98606
|
debug("content-type %s", type3);
|
|
98607
98607
|
res.setHeader("Content-Type", type3 + (charset ? "; charset=" + charset : ""));
|
|
98608
98608
|
};
|
|
98609
|
-
SendStream.prototype.setHeader = function setHeader(
|
|
98609
|
+
SendStream.prototype.setHeader = function setHeader(path30, stat3) {
|
|
98610
98610
|
var res = this.res;
|
|
98611
|
-
this.emit("headers", res,
|
|
98611
|
+
this.emit("headers", res, path30, stat3);
|
|
98612
98612
|
if (this._acceptRanges && !res.getHeader("Accept-Ranges")) {
|
|
98613
98613
|
debug("accept ranges");
|
|
98614
98614
|
res.setHeader("Accept-Ranges", "bytes");
|
|
@@ -98667,9 +98667,9 @@ var require_send = __commonJS({
|
|
|
98667
98667
|
}
|
|
98668
98668
|
return err2 instanceof Error ? createError(status, err2, { expose: false }) : createError(status, err2);
|
|
98669
98669
|
}
|
|
98670
|
-
function decode(
|
|
98670
|
+
function decode(path30) {
|
|
98671
98671
|
try {
|
|
98672
|
-
return decodeURIComponent(
|
|
98672
|
+
return decodeURIComponent(path30);
|
|
98673
98673
|
} catch (err2) {
|
|
98674
98674
|
return -1;
|
|
98675
98675
|
}
|
|
@@ -99585,12 +99585,12 @@ var require_utils3 = __commonJS({
|
|
|
99585
99585
|
var querystring = require("querystring");
|
|
99586
99586
|
exports2.etag = createETagGenerator({ weak: false });
|
|
99587
99587
|
exports2.wetag = createETagGenerator({ weak: true });
|
|
99588
|
-
exports2.isAbsolute = function(
|
|
99589
|
-
if ("/" ===
|
|
99588
|
+
exports2.isAbsolute = function(path29) {
|
|
99589
|
+
if ("/" === path29[0])
|
|
99590
99590
|
return true;
|
|
99591
|
-
if (":" ===
|
|
99591
|
+
if (":" === path29[1] && ("\\" === path29[2] || "/" === path29[2]))
|
|
99592
99592
|
return true;
|
|
99593
|
-
if ("\\\\" ===
|
|
99593
|
+
if ("\\\\" === path29.substring(0, 2))
|
|
99594
99594
|
return true;
|
|
99595
99595
|
};
|
|
99596
99596
|
exports2.flatten = deprecate.function(
|
|
@@ -99804,7 +99804,7 @@ var require_application = __commonJS({
|
|
|
99804
99804
|
};
|
|
99805
99805
|
app.use = function use(fn) {
|
|
99806
99806
|
var offset = 0;
|
|
99807
|
-
var
|
|
99807
|
+
var path29 = "/";
|
|
99808
99808
|
if (typeof fn !== "function") {
|
|
99809
99809
|
var arg2 = fn;
|
|
99810
99810
|
while (Array.isArray(arg2) && arg2.length !== 0) {
|
|
@@ -99812,7 +99812,7 @@ var require_application = __commonJS({
|
|
|
99812
99812
|
}
|
|
99813
99813
|
if (typeof arg2 !== "function") {
|
|
99814
99814
|
offset = 1;
|
|
99815
|
-
|
|
99815
|
+
path29 = fn;
|
|
99816
99816
|
}
|
|
99817
99817
|
}
|
|
99818
99818
|
var fns = flatten(slice.call(arguments, offset));
|
|
@@ -99823,12 +99823,12 @@ var require_application = __commonJS({
|
|
|
99823
99823
|
var router = this._router;
|
|
99824
99824
|
fns.forEach(function(fn2) {
|
|
99825
99825
|
if (!fn2 || !fn2.handle || !fn2.set) {
|
|
99826
|
-
return router.use(
|
|
99826
|
+
return router.use(path29, fn2);
|
|
99827
99827
|
}
|
|
99828
|
-
debug(".use app under %s",
|
|
99829
|
-
fn2.mountpath =
|
|
99828
|
+
debug(".use app under %s", path29);
|
|
99829
|
+
fn2.mountpath = path29;
|
|
99830
99830
|
fn2.parent = this;
|
|
99831
|
-
router.use(
|
|
99831
|
+
router.use(path29, function mounted_app(req, res, next) {
|
|
99832
99832
|
var orig = req.app;
|
|
99833
99833
|
fn2.handle(req, res, function(err2) {
|
|
99834
99834
|
setPrototypeOf(req, orig.request);
|
|
@@ -99840,9 +99840,9 @@ var require_application = __commonJS({
|
|
|
99840
99840
|
}, this);
|
|
99841
99841
|
return this;
|
|
99842
99842
|
};
|
|
99843
|
-
app.route = function route(
|
|
99843
|
+
app.route = function route(path29) {
|
|
99844
99844
|
this.lazyrouter();
|
|
99845
|
-
return this._router.route(
|
|
99845
|
+
return this._router.route(path29);
|
|
99846
99846
|
};
|
|
99847
99847
|
app.engine = function engine(ext, fn) {
|
|
99848
99848
|
if (typeof fn !== "function") {
|
|
@@ -99893,7 +99893,7 @@ var require_application = __commonJS({
|
|
|
99893
99893
|
}
|
|
99894
99894
|
return this;
|
|
99895
99895
|
};
|
|
99896
|
-
app.path = function
|
|
99896
|
+
app.path = function path29() {
|
|
99897
99897
|
return this.parent ? this.parent.path() + this.mountpath : "";
|
|
99898
99898
|
};
|
|
99899
99899
|
app.enabled = function enabled(setting) {
|
|
@@ -99909,19 +99909,19 @@ var require_application = __commonJS({
|
|
|
99909
99909
|
return this.set(setting, false);
|
|
99910
99910
|
};
|
|
99911
99911
|
methods.forEach(function(method) {
|
|
99912
|
-
app[method] = function(
|
|
99912
|
+
app[method] = function(path29) {
|
|
99913
99913
|
if (method === "get" && arguments.length === 1) {
|
|
99914
|
-
return this.set(
|
|
99914
|
+
return this.set(path29);
|
|
99915
99915
|
}
|
|
99916
99916
|
this.lazyrouter();
|
|
99917
|
-
var route = this._router.route(
|
|
99917
|
+
var route = this._router.route(path29);
|
|
99918
99918
|
route[method].apply(route, slice.call(arguments, 1));
|
|
99919
99919
|
return this;
|
|
99920
99920
|
};
|
|
99921
99921
|
});
|
|
99922
|
-
app.all = function all2(
|
|
99922
|
+
app.all = function all2(path29) {
|
|
99923
99923
|
this.lazyrouter();
|
|
99924
|
-
var route = this._router.route(
|
|
99924
|
+
var route = this._router.route(path29);
|
|
99925
99925
|
var args = slice.call(arguments, 1);
|
|
99926
99926
|
for (var i2 = 0; i2 < methods.length; i2++) {
|
|
99927
99927
|
route[methods[i2]].apply(route, args);
|
|
@@ -100700,7 +100700,7 @@ var require_request3 = __commonJS({
|
|
|
100700
100700
|
var subdomains2 = !isIP(hostname) ? hostname.split(".").reverse() : [hostname];
|
|
100701
100701
|
return subdomains2.slice(offset);
|
|
100702
100702
|
});
|
|
100703
|
-
defineGetter(req, "path", function
|
|
100703
|
+
defineGetter(req, "path", function path29() {
|
|
100704
100704
|
return parse(this).pathname;
|
|
100705
100705
|
});
|
|
100706
100706
|
defineGetter(req, "hostname", function hostname() {
|
|
@@ -101008,7 +101008,7 @@ var require_response2 = __commonJS({
|
|
|
101008
101008
|
var http3 = require("http");
|
|
101009
101009
|
var isAbsolute = require_utils3().isAbsolute;
|
|
101010
101010
|
var onFinished = require_on_finished();
|
|
101011
|
-
var
|
|
101011
|
+
var path29 = require("path");
|
|
101012
101012
|
var statuses = require_statuses();
|
|
101013
101013
|
var merge = require_utils_merge();
|
|
101014
101014
|
var sign = require_cookie_signature().sign;
|
|
@@ -101017,9 +101017,9 @@ var require_response2 = __commonJS({
|
|
|
101017
101017
|
var setCharset = require_utils3().setCharset;
|
|
101018
101018
|
var cookie = require_cookie();
|
|
101019
101019
|
var send = require_send();
|
|
101020
|
-
var extname4 =
|
|
101020
|
+
var extname4 = path29.extname;
|
|
101021
101021
|
var mime = send.mime;
|
|
101022
|
-
var resolve13 =
|
|
101022
|
+
var resolve13 = path29.resolve;
|
|
101023
101023
|
var vary = require_vary();
|
|
101024
101024
|
var res = Object.create(http3.ServerResponse.prototype);
|
|
101025
101025
|
module2.exports = res;
|
|
@@ -101197,26 +101197,26 @@ var require_response2 = __commonJS({
|
|
|
101197
101197
|
this.type("txt");
|
|
101198
101198
|
return this.send(body);
|
|
101199
101199
|
};
|
|
101200
|
-
res.sendFile = function sendFile(
|
|
101200
|
+
res.sendFile = function sendFile(path30, options, callback) {
|
|
101201
101201
|
var done = callback;
|
|
101202
101202
|
var req = this.req;
|
|
101203
101203
|
var res2 = this;
|
|
101204
101204
|
var next = req.next;
|
|
101205
101205
|
var opts = options || {};
|
|
101206
|
-
if (!
|
|
101206
|
+
if (!path30) {
|
|
101207
101207
|
throw new TypeError("path argument is required to res.sendFile");
|
|
101208
101208
|
}
|
|
101209
|
-
if (typeof
|
|
101209
|
+
if (typeof path30 !== "string") {
|
|
101210
101210
|
throw new TypeError("path must be a string to res.sendFile");
|
|
101211
101211
|
}
|
|
101212
101212
|
if (typeof options === "function") {
|
|
101213
101213
|
done = options;
|
|
101214
101214
|
opts = {};
|
|
101215
101215
|
}
|
|
101216
|
-
if (!opts.root && !isAbsolute(
|
|
101216
|
+
if (!opts.root && !isAbsolute(path30)) {
|
|
101217
101217
|
throw new TypeError("path must be absolute or specify root to res.sendFile");
|
|
101218
101218
|
}
|
|
101219
|
-
var pathname = encodeURI(
|
|
101219
|
+
var pathname = encodeURI(path30);
|
|
101220
101220
|
var file = send(req, pathname, opts);
|
|
101221
101221
|
sendfile(res2, file, opts, function(err2) {
|
|
101222
101222
|
if (done)
|
|
@@ -101228,7 +101228,7 @@ var require_response2 = __commonJS({
|
|
|
101228
101228
|
}
|
|
101229
101229
|
});
|
|
101230
101230
|
};
|
|
101231
|
-
res.sendfile = function(
|
|
101231
|
+
res.sendfile = function(path30, options, callback) {
|
|
101232
101232
|
var done = callback;
|
|
101233
101233
|
var req = this.req;
|
|
101234
101234
|
var res2 = this;
|
|
@@ -101238,7 +101238,7 @@ var require_response2 = __commonJS({
|
|
|
101238
101238
|
done = options;
|
|
101239
101239
|
opts = {};
|
|
101240
101240
|
}
|
|
101241
|
-
var file = send(req,
|
|
101241
|
+
var file = send(req, path30, opts);
|
|
101242
101242
|
sendfile(res2, file, opts, function(err2) {
|
|
101243
101243
|
if (done)
|
|
101244
101244
|
return done(err2);
|
|
@@ -101253,7 +101253,7 @@ var require_response2 = __commonJS({
|
|
|
101253
101253
|
res.sendfile,
|
|
101254
101254
|
"res.sendfile: Use res.sendFile instead"
|
|
101255
101255
|
);
|
|
101256
|
-
res.download = function download(
|
|
101256
|
+
res.download = function download(path30, filename, options, callback) {
|
|
101257
101257
|
var done = callback;
|
|
101258
101258
|
var name = filename;
|
|
101259
101259
|
var opts = options || null;
|
|
@@ -101270,7 +101270,7 @@ var require_response2 = __commonJS({
|
|
|
101270
101270
|
opts = filename;
|
|
101271
101271
|
}
|
|
101272
101272
|
var headers = {
|
|
101273
|
-
"Content-Disposition": contentDisposition(name ||
|
|
101273
|
+
"Content-Disposition": contentDisposition(name || path30)
|
|
101274
101274
|
};
|
|
101275
101275
|
if (opts && opts.headers) {
|
|
101276
101276
|
var keys = Object.keys(opts.headers);
|
|
@@ -101283,7 +101283,7 @@ var require_response2 = __commonJS({
|
|
|
101283
101283
|
}
|
|
101284
101284
|
opts = Object.create(opts);
|
|
101285
101285
|
opts.headers = headers;
|
|
101286
|
-
var fullPath = !opts.root ? resolve13(
|
|
101286
|
+
var fullPath = !opts.root ? resolve13(path30) : path30;
|
|
101287
101287
|
return this.sendFile(fullPath, opts, done);
|
|
101288
101288
|
};
|
|
101289
101289
|
res.contentType = res.type = function contentType(type2) {
|
|
@@ -101583,11 +101583,11 @@ var require_serve_static = __commonJS({
|
|
|
101583
101583
|
}
|
|
101584
101584
|
var forwardError = !fallthrough;
|
|
101585
101585
|
var originalUrl = parseUrl.original(req);
|
|
101586
|
-
var
|
|
101587
|
-
if (
|
|
101588
|
-
|
|
101586
|
+
var path29 = parseUrl(req).pathname;
|
|
101587
|
+
if (path29 === "/" && originalUrl.pathname.substr(-1) !== "/") {
|
|
101588
|
+
path29 = "";
|
|
101589
101589
|
}
|
|
101590
|
-
var stream2 = send(req,
|
|
101590
|
+
var stream2 = send(req, path29, opts);
|
|
101591
101591
|
stream2.on("directory", onDirectory);
|
|
101592
101592
|
if (setHeaders) {
|
|
101593
101593
|
stream2.on("headers", setHeaders);
|
|
@@ -102737,8 +102737,8 @@ var require_uri_all = __commonJS({
|
|
|
102737
102737
|
wsComponents.secure = void 0;
|
|
102738
102738
|
}
|
|
102739
102739
|
if (wsComponents.resourceName) {
|
|
102740
|
-
var _wsComponents$resourc = wsComponents.resourceName.split("?"), _wsComponents$resourc2 = slicedToArray(_wsComponents$resourc, 2),
|
|
102741
|
-
wsComponents.path =
|
|
102740
|
+
var _wsComponents$resourc = wsComponents.resourceName.split("?"), _wsComponents$resourc2 = slicedToArray(_wsComponents$resourc, 2), path29 = _wsComponents$resourc2[0], query = _wsComponents$resourc2[1];
|
|
102741
|
+
wsComponents.path = path29 && path29 !== "/" ? path29 : void 0;
|
|
102742
102742
|
wsComponents.query = query;
|
|
102743
102743
|
wsComponents.resourceName = void 0;
|
|
102744
102744
|
}
|
|
@@ -103143,12 +103143,12 @@ var require_util4 = __commonJS({
|
|
|
103143
103143
|
return "'" + escapeQuotes(str) + "'";
|
|
103144
103144
|
}
|
|
103145
103145
|
function getPathExpr(currentPath, expr, jsonPointers, isNumber) {
|
|
103146
|
-
var
|
|
103147
|
-
return joinPaths(currentPath,
|
|
103146
|
+
var path29 = jsonPointers ? "'/' + " + expr + (isNumber ? "" : ".replace(/~/g, '~0').replace(/\\//g, '~1')") : isNumber ? "'[' + " + expr + " + ']'" : "'[\\'' + " + expr + " + '\\']'";
|
|
103147
|
+
return joinPaths(currentPath, path29);
|
|
103148
103148
|
}
|
|
103149
103149
|
function getPath(currentPath, prop, jsonPointers) {
|
|
103150
|
-
var
|
|
103151
|
-
return joinPaths(currentPath,
|
|
103150
|
+
var path29 = jsonPointers ? toQuotedString("/" + escapeJsonPointer(prop)) : toQuotedString(getProperty(prop));
|
|
103151
|
+
return joinPaths(currentPath, path29);
|
|
103152
103152
|
}
|
|
103153
103153
|
var JSON_POINTER = /^\/(?:[^~]|~0|~1)*$/;
|
|
103154
103154
|
var RELATIVE_JSON_POINTER = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;
|
|
@@ -112126,6 +112126,38 @@ var require_object_keys = __commonJS({
|
|
|
112126
112126
|
}
|
|
112127
112127
|
});
|
|
112128
112128
|
|
|
112129
|
+
// ../../node_modules/has-property-descriptors/index.js
|
|
112130
|
+
var require_has_property_descriptors = __commonJS({
|
|
112131
|
+
"../../node_modules/has-property-descriptors/index.js"(exports2, module2) {
|
|
112132
|
+
"use strict";
|
|
112133
|
+
init_import_meta_url();
|
|
112134
|
+
var GetIntrinsic = require_get_intrinsic();
|
|
112135
|
+
var $defineProperty = GetIntrinsic("%Object.defineProperty%", true);
|
|
112136
|
+
var hasPropertyDescriptors = function hasPropertyDescriptors2() {
|
|
112137
|
+
if ($defineProperty) {
|
|
112138
|
+
try {
|
|
112139
|
+
$defineProperty({}, "a", { value: 1 });
|
|
112140
|
+
return true;
|
|
112141
|
+
} catch (e2) {
|
|
112142
|
+
return false;
|
|
112143
|
+
}
|
|
112144
|
+
}
|
|
112145
|
+
return false;
|
|
112146
|
+
};
|
|
112147
|
+
hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
|
|
112148
|
+
if (!hasPropertyDescriptors()) {
|
|
112149
|
+
return null;
|
|
112150
|
+
}
|
|
112151
|
+
try {
|
|
112152
|
+
return $defineProperty([], "length", { value: 1 }).length !== 1;
|
|
112153
|
+
} catch (e2) {
|
|
112154
|
+
return true;
|
|
112155
|
+
}
|
|
112156
|
+
};
|
|
112157
|
+
module2.exports = hasPropertyDescriptors;
|
|
112158
|
+
}
|
|
112159
|
+
});
|
|
112160
|
+
|
|
112129
112161
|
// ../../node_modules/define-properties/index.js
|
|
112130
112162
|
var require_define_properties = __commonJS({
|
|
112131
112163
|
"../../node_modules/define-properties/index.js"(exports2, module2) {
|
|
@@ -112139,19 +112171,8 @@ var require_define_properties = __commonJS({
|
|
|
112139
112171
|
var isFunction2 = function(fn) {
|
|
112140
112172
|
return typeof fn === "function" && toStr.call(fn) === "[object Function]";
|
|
112141
112173
|
};
|
|
112142
|
-
var
|
|
112143
|
-
|
|
112144
|
-
try {
|
|
112145
|
-
origDefineProperty(obj, "x", { enumerable: false, value: obj });
|
|
112146
|
-
for (var _2 in obj) {
|
|
112147
|
-
return false;
|
|
112148
|
-
}
|
|
112149
|
-
return obj.x === obj;
|
|
112150
|
-
} catch (e2) {
|
|
112151
|
-
return false;
|
|
112152
|
-
}
|
|
112153
|
-
};
|
|
112154
|
-
var supportsDescriptors = origDefineProperty && arePropertyDescriptorsSupported();
|
|
112174
|
+
var hasPropertyDescriptors = require_has_property_descriptors()();
|
|
112175
|
+
var supportsDescriptors = origDefineProperty && hasPropertyDescriptors;
|
|
112155
112176
|
var defineProperty2 = function(object, name, value, predicate) {
|
|
112156
112177
|
if (name in object && (!isFunction2(predicate) || !predicate())) {
|
|
112157
112178
|
return;
|
|
@@ -113165,13 +113186,13 @@ var require_define_lazy_prop = __commonJS({
|
|
|
113165
113186
|
var require_open = __commonJS({
|
|
113166
113187
|
"../../node_modules/open/index.js"(exports2, module2) {
|
|
113167
113188
|
init_import_meta_url();
|
|
113168
|
-
var
|
|
113189
|
+
var path29 = require("path");
|
|
113169
113190
|
var childProcess2 = require("child_process");
|
|
113170
113191
|
var { promises: fs12, constants: fsConstants } = require("fs");
|
|
113171
113192
|
var isWsl = require_is_wsl();
|
|
113172
113193
|
var isDocker = require_is_docker();
|
|
113173
113194
|
var defineLazyProperty = require_define_lazy_prop();
|
|
113174
|
-
var localXdgOpenPath =
|
|
113195
|
+
var localXdgOpenPath = path29.join(__dirname, "xdg-open");
|
|
113175
113196
|
var { platform, arch: arch2 } = process;
|
|
113176
113197
|
var getWslDrivesMountPoint = (() => {
|
|
113177
113198
|
const defaultMountPoint = "/mnt/";
|
|
@@ -119148,7 +119169,7 @@ var require_XDGAppPaths = __commonJS({
|
|
|
119148
119169
|
return typeof t2;
|
|
119149
119170
|
}
|
|
119150
119171
|
function Adapt(adapter_) {
|
|
119151
|
-
var meta = adapter_.meta,
|
|
119172
|
+
var meta = adapter_.meta, path29 = adapter_.path, xdg = adapter_.xdg;
|
|
119152
119173
|
var XDGAppPaths_ = function() {
|
|
119153
119174
|
function XDGAppPaths_2(options_) {
|
|
119154
119175
|
if (options_ === void 0) {
|
|
@@ -119170,7 +119191,7 @@ var require_XDGAppPaths = __commonJS({
|
|
|
119170
119191
|
meta.mainFilename()
|
|
119171
119192
|
];
|
|
119172
119193
|
var nameFallback = "an-anonymous-script";
|
|
119173
|
-
var name =
|
|
119194
|
+
var name = path29.parse(((_c = namePriorityList.find(function(e2) {
|
|
119174
119195
|
return isString2(e2);
|
|
119175
119196
|
})) !== null && _c !== void 0 ? _c : nameFallback) + suffix).name;
|
|
119176
119197
|
XDGAppPaths.$name = function $name() {
|
|
@@ -119189,28 +119210,28 @@ var require_XDGAppPaths = __commonJS({
|
|
|
119189
119210
|
return isIsolated(dirOptions) ? name : "";
|
|
119190
119211
|
}
|
|
119191
119212
|
XDGAppPaths.cache = function cache(dirOptions) {
|
|
119192
|
-
return
|
|
119213
|
+
return path29.join(xdg.cache(), finalPathSegment(dirOptions));
|
|
119193
119214
|
};
|
|
119194
119215
|
XDGAppPaths.config = function config(dirOptions) {
|
|
119195
|
-
return
|
|
119216
|
+
return path29.join(xdg.config(), finalPathSegment(dirOptions));
|
|
119196
119217
|
};
|
|
119197
119218
|
XDGAppPaths.data = function data(dirOptions) {
|
|
119198
|
-
return
|
|
119219
|
+
return path29.join(xdg.data(), finalPathSegment(dirOptions));
|
|
119199
119220
|
};
|
|
119200
119221
|
XDGAppPaths.runtime = function runtime(dirOptions) {
|
|
119201
|
-
return xdg.runtime() ?
|
|
119222
|
+
return xdg.runtime() ? path29.join(xdg.runtime(), finalPathSegment(dirOptions)) : void 0;
|
|
119202
119223
|
};
|
|
119203
119224
|
XDGAppPaths.state = function state(dirOptions) {
|
|
119204
|
-
return
|
|
119225
|
+
return path29.join(xdg.state(), finalPathSegment(dirOptions));
|
|
119205
119226
|
};
|
|
119206
119227
|
XDGAppPaths.configDirs = function configDirs(dirOptions) {
|
|
119207
119228
|
return xdg.configDirs().map(function(s) {
|
|
119208
|
-
return
|
|
119229
|
+
return path29.join(s, finalPathSegment(dirOptions));
|
|
119209
119230
|
});
|
|
119210
119231
|
};
|
|
119211
119232
|
XDGAppPaths.dataDirs = function dataDirs(dirOptions) {
|
|
119212
119233
|
return xdg.dataDirs().map(function(s) {
|
|
119213
|
-
return
|
|
119234
|
+
return path29.join(s, finalPathSegment(dirOptions));
|
|
119214
119235
|
});
|
|
119215
119236
|
};
|
|
119216
119237
|
return XDGAppPaths;
|
|
@@ -119239,14 +119260,14 @@ var require_XDG = __commonJS({
|
|
|
119239
119260
|
exports2.__esModule = true;
|
|
119240
119261
|
exports2.Adapt = void 0;
|
|
119241
119262
|
function Adapt(adapter_) {
|
|
119242
|
-
var env5 = adapter_.env, osPaths = adapter_.osPaths,
|
|
119263
|
+
var env5 = adapter_.env, osPaths = adapter_.osPaths, path29 = adapter_.path;
|
|
119243
119264
|
var isMacOS = /^darwin$/i.test(adapter_.process.platform);
|
|
119244
119265
|
var isWinOS = /^win/i.test(adapter_.process.platform);
|
|
119245
119266
|
function baseDir() {
|
|
119246
119267
|
return osPaths.home() || osPaths.temp();
|
|
119247
119268
|
}
|
|
119248
119269
|
function valOrPath(val, pathSegments) {
|
|
119249
|
-
return val ||
|
|
119270
|
+
return val || path29.join.apply(path29, pathSegments);
|
|
119250
119271
|
}
|
|
119251
119272
|
var linux = function() {
|
|
119252
119273
|
var cache = function() {
|
|
@@ -119321,11 +119342,11 @@ var require_XDG = __commonJS({
|
|
|
119321
119342
|
XDG.state = extension.state;
|
|
119322
119343
|
XDG.configDirs = function configDirs() {
|
|
119323
119344
|
var pathList = env5.get("XDG_CONFIG_DIRS");
|
|
119324
|
-
return __spreadArrays([extension.config()], pathList ? pathList.split(
|
|
119345
|
+
return __spreadArrays([extension.config()], pathList ? pathList.split(path29.delimiter) : []);
|
|
119325
119346
|
};
|
|
119326
119347
|
XDG.dataDirs = function dataDirs() {
|
|
119327
119348
|
var pathList = env5.get("XDG_DATA_DIRS");
|
|
119328
|
-
return __spreadArrays([extension.data()], pathList ? pathList.split(
|
|
119349
|
+
return __spreadArrays([extension.data()], pathList ? pathList.split(path29.delimiter) : []);
|
|
119329
119350
|
};
|
|
119330
119351
|
return XDG;
|
|
119331
119352
|
}
|
|
@@ -119356,7 +119377,7 @@ var require_OSPaths = __commonJS({
|
|
|
119356
119377
|
return !s;
|
|
119357
119378
|
}
|
|
119358
119379
|
function Adapt(adapter_) {
|
|
119359
|
-
var env5 = adapter_.env, os8 = adapter_.os,
|
|
119380
|
+
var env5 = adapter_.env, os8 = adapter_.os, path29 = adapter_.path;
|
|
119360
119381
|
var isWinOS = /^win/i.test(adapter_.process.platform);
|
|
119361
119382
|
function normalizePath(path_) {
|
|
119362
119383
|
return path_ ? adapter_.path.normalize(adapter_.path.join(path_, ".")) : void 0;
|
|
@@ -119370,7 +119391,7 @@ var require_OSPaths = __commonJS({
|
|
|
119370
119391
|
typeof os8.homedir === "function" ? os8.homedir() : void 0,
|
|
119371
119392
|
env5.get("USERPROFILE"),
|
|
119372
119393
|
env5.get("HOME"),
|
|
119373
|
-
env5.get("HOMEDRIVE") || env5.get("HOMEPATH") ?
|
|
119394
|
+
env5.get("HOMEDRIVE") || env5.get("HOMEPATH") ? path29.join(env5.get("HOMEDRIVE") || "", env5.get("HOMEPATH") || "") : void 0
|
|
119374
119395
|
];
|
|
119375
119396
|
return normalizePath(priorityList.find(function(v) {
|
|
119376
119397
|
return !isEmpty(v);
|
|
@@ -119380,7 +119401,7 @@ var require_OSPaths = __commonJS({
|
|
|
119380
119401
|
}
|
|
119381
119402
|
function temp() {
|
|
119382
119403
|
function joinPathToBase(base, segments) {
|
|
119383
|
-
return base ?
|
|
119404
|
+
return base ? path29.join.apply(path29, __spreadArrays([base], segments)) : void 0;
|
|
119384
119405
|
}
|
|
119385
119406
|
function posix() {
|
|
119386
119407
|
var fallback = "/tmp";
|
|
@@ -119483,7 +119504,7 @@ var require_node5 = __commonJS({
|
|
|
119483
119504
|
exports2.__esModule = true;
|
|
119484
119505
|
exports2.adapter = void 0;
|
|
119485
119506
|
var os8 = __importStar(require("os"));
|
|
119486
|
-
var
|
|
119507
|
+
var path29 = __importStar(require("path"));
|
|
119487
119508
|
exports2.adapter = {
|
|
119488
119509
|
env: {
|
|
119489
119510
|
get: function(s) {
|
|
@@ -119491,7 +119512,7 @@ var require_node5 = __commonJS({
|
|
|
119491
119512
|
}
|
|
119492
119513
|
},
|
|
119493
119514
|
os: os8,
|
|
119494
|
-
path:
|
|
119515
|
+
path: path29,
|
|
119495
119516
|
process
|
|
119496
119517
|
};
|
|
119497
119518
|
}
|
|
@@ -119546,7 +119567,7 @@ var require_node6 = __commonJS({
|
|
|
119546
119567
|
};
|
|
119547
119568
|
exports2.__esModule = true;
|
|
119548
119569
|
exports2.adapter = void 0;
|
|
119549
|
-
var
|
|
119570
|
+
var path29 = __importStar(require("path"));
|
|
119550
119571
|
var os_paths_1 = __importDefault(require_mod_cjs());
|
|
119551
119572
|
exports2.adapter = {
|
|
119552
119573
|
env: {
|
|
@@ -119555,7 +119576,7 @@ var require_node6 = __commonJS({
|
|
|
119555
119576
|
}
|
|
119556
119577
|
},
|
|
119557
119578
|
osPaths: os_paths_1["default"],
|
|
119558
|
-
path:
|
|
119579
|
+
path: path29,
|
|
119559
119580
|
process
|
|
119560
119581
|
};
|
|
119561
119582
|
}
|
|
@@ -119610,7 +119631,7 @@ var require_node7 = __commonJS({
|
|
|
119610
119631
|
};
|
|
119611
119632
|
exports2.__esModule = true;
|
|
119612
119633
|
exports2.adapter = void 0;
|
|
119613
|
-
var
|
|
119634
|
+
var path29 = __importStar(require("path"));
|
|
119614
119635
|
var xdg_portable_1 = __importDefault(require_mod_cjs2());
|
|
119615
119636
|
exports2.adapter = {
|
|
119616
119637
|
meta: {
|
|
@@ -119624,7 +119645,7 @@ var require_node7 = __commonJS({
|
|
|
119624
119645
|
return process.pkg ? process.execPath : void 0;
|
|
119625
119646
|
}
|
|
119626
119647
|
},
|
|
119627
|
-
path:
|
|
119648
|
+
path: path29,
|
|
119628
119649
|
process,
|
|
119629
119650
|
xdg: xdg_portable_1["default"]
|
|
119630
119651
|
};
|
|
@@ -121593,17 +121614,17 @@ var require_ignore = __commonJS({
|
|
|
121593
121614
|
var throwError2 = (message, Ctor) => {
|
|
121594
121615
|
throw new Ctor(message);
|
|
121595
121616
|
};
|
|
121596
|
-
var checkPath = (
|
|
121597
|
-
if (!isString2(
|
|
121617
|
+
var checkPath = (path29, originalPath, doThrow) => {
|
|
121618
|
+
if (!isString2(path29)) {
|
|
121598
121619
|
return doThrow(
|
|
121599
121620
|
`path must be a string, but got \`${originalPath}\``,
|
|
121600
121621
|
TypeError
|
|
121601
121622
|
);
|
|
121602
121623
|
}
|
|
121603
|
-
if (!
|
|
121624
|
+
if (!path29) {
|
|
121604
121625
|
return doThrow(`path must not be empty`, TypeError);
|
|
121605
121626
|
}
|
|
121606
|
-
if (checkPath.isNotRelative(
|
|
121627
|
+
if (checkPath.isNotRelative(path29)) {
|
|
121607
121628
|
const r = "`path.relative()`d";
|
|
121608
121629
|
return doThrow(
|
|
121609
121630
|
`path should be a ${r} string, but got "${originalPath}"`,
|
|
@@ -121612,7 +121633,7 @@ var require_ignore = __commonJS({
|
|
|
121612
121633
|
}
|
|
121613
121634
|
return true;
|
|
121614
121635
|
};
|
|
121615
|
-
var isNotRelative = (
|
|
121636
|
+
var isNotRelative = (path29) => REGEX_TEST_INVALID_PATH.test(path29);
|
|
121616
121637
|
checkPath.isNotRelative = isNotRelative;
|
|
121617
121638
|
checkPath.convert = (p) => p;
|
|
121618
121639
|
var Ignore = class {
|
|
@@ -121656,7 +121677,7 @@ var require_ignore = __commonJS({
|
|
|
121656
121677
|
addPattern(pattern) {
|
|
121657
121678
|
return this.add(pattern);
|
|
121658
121679
|
}
|
|
121659
|
-
_testOne(
|
|
121680
|
+
_testOne(path29, checkUnignored) {
|
|
121660
121681
|
let ignored = false;
|
|
121661
121682
|
let unignored = false;
|
|
121662
121683
|
this._rules.forEach((rule) => {
|
|
@@ -121664,7 +121685,7 @@ var require_ignore = __commonJS({
|
|
|
121664
121685
|
if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) {
|
|
121665
121686
|
return;
|
|
121666
121687
|
}
|
|
121667
|
-
const matched = rule.regex.test(
|
|
121688
|
+
const matched = rule.regex.test(path29);
|
|
121668
121689
|
if (matched) {
|
|
121669
121690
|
ignored = !negative;
|
|
121670
121691
|
unignored = negative;
|
|
@@ -121676,24 +121697,24 @@ var require_ignore = __commonJS({
|
|
|
121676
121697
|
};
|
|
121677
121698
|
}
|
|
121678
121699
|
_test(originalPath, cache, checkUnignored, slices) {
|
|
121679
|
-
const
|
|
121700
|
+
const path29 = originalPath && checkPath.convert(originalPath);
|
|
121680
121701
|
checkPath(
|
|
121681
|
-
|
|
121702
|
+
path29,
|
|
121682
121703
|
originalPath,
|
|
121683
121704
|
this._allowRelativePaths ? RETURN_FALSE : throwError2
|
|
121684
121705
|
);
|
|
121685
|
-
return this._t(
|
|
121706
|
+
return this._t(path29, cache, checkUnignored, slices);
|
|
121686
121707
|
}
|
|
121687
|
-
_t(
|
|
121688
|
-
if (
|
|
121689
|
-
return cache[
|
|
121708
|
+
_t(path29, cache, checkUnignored, slices) {
|
|
121709
|
+
if (path29 in cache) {
|
|
121710
|
+
return cache[path29];
|
|
121690
121711
|
}
|
|
121691
121712
|
if (!slices) {
|
|
121692
|
-
slices =
|
|
121713
|
+
slices = path29.split(SLASH);
|
|
121693
121714
|
}
|
|
121694
121715
|
slices.pop();
|
|
121695
121716
|
if (!slices.length) {
|
|
121696
|
-
return cache[
|
|
121717
|
+
return cache[path29] = this._testOne(path29, checkUnignored);
|
|
121697
121718
|
}
|
|
121698
121719
|
const parent = this._t(
|
|
121699
121720
|
slices.join(SLASH) + SLASH,
|
|
@@ -121701,23 +121722,23 @@ var require_ignore = __commonJS({
|
|
|
121701
121722
|
checkUnignored,
|
|
121702
121723
|
slices
|
|
121703
121724
|
);
|
|
121704
|
-
return cache[
|
|
121725
|
+
return cache[path29] = parent.ignored ? parent : this._testOne(path29, checkUnignored);
|
|
121705
121726
|
}
|
|
121706
|
-
ignores(
|
|
121707
|
-
return this._test(
|
|
121727
|
+
ignores(path29) {
|
|
121728
|
+
return this._test(path29, this._ignoreCache, false).ignored;
|
|
121708
121729
|
}
|
|
121709
121730
|
createFilter() {
|
|
121710
|
-
return (
|
|
121731
|
+
return (path29) => !this.ignores(path29);
|
|
121711
121732
|
}
|
|
121712
121733
|
filter(paths) {
|
|
121713
121734
|
return makeArray(paths).filter(this.createFilter());
|
|
121714
121735
|
}
|
|
121715
|
-
test(
|
|
121716
|
-
return this._test(
|
|
121736
|
+
test(path29) {
|
|
121737
|
+
return this._test(path29, this._testCache, true);
|
|
121717
121738
|
}
|
|
121718
121739
|
};
|
|
121719
121740
|
var factory = (options) => new Ignore(options);
|
|
121720
|
-
var isPathValid = (
|
|
121741
|
+
var isPathValid = (path29) => checkPath(path29 && checkPath.convert(path29), path29, RETURN_FALSE);
|
|
121721
121742
|
factory.isPathValid = isPathValid;
|
|
121722
121743
|
factory.default = factory;
|
|
121723
121744
|
module2.exports = factory;
|
|
@@ -121725,7 +121746,7 @@ var require_ignore = __commonJS({
|
|
|
121725
121746
|
const makePosix = (str) => /^\\\\\?\\/.test(str) || /["<>|\u0000-\u001F]+/u.test(str) ? str : str.replace(/\\/g, "/");
|
|
121726
121747
|
checkPath.convert = makePosix;
|
|
121727
121748
|
const REGIX_IS_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i;
|
|
121728
|
-
checkPath.isNotRelative = (
|
|
121749
|
+
checkPath.isNotRelative = (path29) => REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path29) || isNotRelative(path29);
|
|
121729
121750
|
}
|
|
121730
121751
|
}
|
|
121731
121752
|
});
|
|
@@ -122643,15 +122664,15 @@ var require_route5 = __commonJS({
|
|
|
122643
122664
|
};
|
|
122644
122665
|
}
|
|
122645
122666
|
function wrapConversion(toModel, graph) {
|
|
122646
|
-
var
|
|
122667
|
+
var path29 = [graph[toModel].parent, toModel];
|
|
122647
122668
|
var fn = conversions[graph[toModel].parent][toModel];
|
|
122648
122669
|
var cur = graph[toModel].parent;
|
|
122649
122670
|
while (graph[cur].parent) {
|
|
122650
|
-
|
|
122671
|
+
path29.unshift(graph[cur].parent);
|
|
122651
122672
|
fn = link(conversions[graph[cur].parent][cur], fn);
|
|
122652
122673
|
cur = graph[cur].parent;
|
|
122653
122674
|
}
|
|
122654
|
-
fn.conversion =
|
|
122675
|
+
fn.conversion = path29;
|
|
122655
122676
|
return fn;
|
|
122656
122677
|
}
|
|
122657
122678
|
module2.exports = function(fromModel) {
|
|
@@ -124134,15 +124155,15 @@ var require_route6 = __commonJS({
|
|
|
124134
124155
|
};
|
|
124135
124156
|
}
|
|
124136
124157
|
function wrapConversion(toModel, graph) {
|
|
124137
|
-
const
|
|
124158
|
+
const path29 = [graph[toModel].parent, toModel];
|
|
124138
124159
|
let fn = conversions[graph[toModel].parent][toModel];
|
|
124139
124160
|
let cur = graph[toModel].parent;
|
|
124140
124161
|
while (graph[cur].parent) {
|
|
124141
|
-
|
|
124162
|
+
path29.unshift(graph[cur].parent);
|
|
124142
124163
|
fn = link(conversions[graph[cur].parent][cur], fn);
|
|
124143
124164
|
cur = graph[cur].parent;
|
|
124144
124165
|
}
|
|
124145
|
-
fn.conversion =
|
|
124166
|
+
fn.conversion = path29;
|
|
124146
124167
|
return fn;
|
|
124147
124168
|
}
|
|
124148
124169
|
module2.exports = function(fromModel) {
|
|
@@ -127016,11 +127037,11 @@ var require_Mime = __commonJS({
|
|
|
127016
127037
|
}
|
|
127017
127038
|
}
|
|
127018
127039
|
};
|
|
127019
|
-
Mime.prototype.getType = function(
|
|
127020
|
-
|
|
127021
|
-
let last =
|
|
127040
|
+
Mime.prototype.getType = function(path29) {
|
|
127041
|
+
path29 = String(path29);
|
|
127042
|
+
let last = path29.replace(/^.*[/\\]/, "").toLowerCase();
|
|
127022
127043
|
let ext = last.replace(/^.*\./, "").toLowerCase();
|
|
127023
|
-
let hasPath = last.length <
|
|
127044
|
+
let hasPath = last.length < path29.length;
|
|
127024
127045
|
let hasDot = ext.length < last.length - 1;
|
|
127025
127046
|
return (hasDot || !hasPath) && this._types[ext] || null;
|
|
127026
127047
|
};
|
|
@@ -127479,7 +127500,7 @@ var require_utils4 = __commonJS({
|
|
|
127479
127500
|
init_import_meta_url();
|
|
127480
127501
|
var fs12 = require("fs");
|
|
127481
127502
|
var ini = require_ini();
|
|
127482
|
-
var
|
|
127503
|
+
var path29 = require("path");
|
|
127483
127504
|
var stripJsonComments = require_strip_json_comments();
|
|
127484
127505
|
var parse = exports2.parse = function(content) {
|
|
127485
127506
|
if (/^\s*{/.test(content))
|
|
@@ -127493,7 +127514,7 @@ var require_utils4 = __commonJS({
|
|
|
127493
127514
|
for (var i2 in args)
|
|
127494
127515
|
if ("string" !== typeof args[i2])
|
|
127495
127516
|
return;
|
|
127496
|
-
var file2 =
|
|
127517
|
+
var file2 = path29.join.apply(null, args);
|
|
127497
127518
|
var content;
|
|
127498
127519
|
try {
|
|
127499
127520
|
return fs12.readFileSync(file2, "utf-8");
|
|
@@ -127531,15 +127552,15 @@ var require_utils4 = __commonJS({
|
|
|
127531
127552
|
return obj;
|
|
127532
127553
|
};
|
|
127533
127554
|
var find = exports2.find = function() {
|
|
127534
|
-
var rel =
|
|
127555
|
+
var rel = path29.join.apply(null, [].slice.call(arguments));
|
|
127535
127556
|
function find2(start, rel2) {
|
|
127536
|
-
var file2 =
|
|
127557
|
+
var file2 = path29.join(start, rel2);
|
|
127537
127558
|
try {
|
|
127538
127559
|
fs12.statSync(file2);
|
|
127539
127560
|
return file2;
|
|
127540
127561
|
} catch (err2) {
|
|
127541
|
-
if (
|
|
127542
|
-
return find2(
|
|
127562
|
+
if (path29.dirname(start) !== start)
|
|
127563
|
+
return find2(path29.dirname(start), rel2);
|
|
127543
127564
|
}
|
|
127544
127565
|
}
|
|
127545
127566
|
return find2(process.cwd(), rel);
|
|
@@ -127974,8 +127995,8 @@ var require_registry_auth_token = __commonJS({
|
|
|
127974
127995
|
}
|
|
127975
127996
|
return void 0;
|
|
127976
127997
|
}
|
|
127977
|
-
function normalizePath(
|
|
127978
|
-
return
|
|
127998
|
+
function normalizePath(path29) {
|
|
127999
|
+
return path29[path29.length - 1] === "/" ? path29 : path29 + "/";
|
|
127979
128000
|
}
|
|
127980
128001
|
function getAuthInfoForUrl(regUrl, npmrc) {
|
|
127981
128002
|
var bearerAuth = getBearerToken(npmrc[regUrl + tokenKey] || npmrc[regUrl + "/" + tokenKey]);
|
|
@@ -129248,11 +129269,11 @@ var parser = new YargsParser({
|
|
|
129248
129269
|
format: import_util.format,
|
|
129249
129270
|
normalize: import_path.normalize,
|
|
129250
129271
|
resolve: import_path.resolve,
|
|
129251
|
-
require: (
|
|
129272
|
+
require: (path29) => {
|
|
129252
129273
|
if (typeof require !== "undefined") {
|
|
129253
|
-
return require(
|
|
129254
|
-
} else if (
|
|
129255
|
-
return JSON.parse((0, import_fs.readFileSync)(
|
|
129274
|
+
return require(path29);
|
|
129275
|
+
} else if (path29.match(/\.json$/)) {
|
|
129276
|
+
return JSON.parse((0, import_fs.readFileSync)(path29, "utf8"));
|
|
129256
129277
|
} else {
|
|
129257
129278
|
throw Error("only .json config files are supported in ESM");
|
|
129258
129279
|
}
|
|
@@ -129850,7 +129871,7 @@ init_import_meta_url();
|
|
|
129850
129871
|
|
|
129851
129872
|
// src/dev.tsx
|
|
129852
129873
|
init_import_meta_url();
|
|
129853
|
-
var
|
|
129874
|
+
var import_node_path31 = __toESM(require("node:path"));
|
|
129854
129875
|
var import_chokidar4 = require("chokidar");
|
|
129855
129876
|
|
|
129856
129877
|
// ../../node_modules/get-port/index.js
|
|
@@ -130634,9 +130655,9 @@ Please add "${field}" to "env.${envName}".`
|
|
|
130634
130655
|
}
|
|
130635
130656
|
return rawEnv[field] ?? defaultValue;
|
|
130636
130657
|
}
|
|
130637
|
-
function unwindPropertyPath(root,
|
|
130658
|
+
function unwindPropertyPath(root, path29) {
|
|
130638
130659
|
let container = root;
|
|
130639
|
-
const parts =
|
|
130660
|
+
const parts = path29.split(".");
|
|
130640
130661
|
for (let i2 = 0; i2 < parts.length - 1; i2++) {
|
|
130641
130662
|
if (!hasProperty(container, parts[i2])) {
|
|
130642
130663
|
return;
|
|
@@ -132812,9 +132833,9 @@ function npmRunPath(options = {}) {
|
|
|
132812
132833
|
}
|
|
132813
132834
|
function npmRunPathEnv({ env: env5 = import_node_process3.default.env, ...options } = {}) {
|
|
132814
132835
|
env5 = { ...env5 };
|
|
132815
|
-
const
|
|
132816
|
-
options.path = env5[
|
|
132817
|
-
env5[
|
|
132836
|
+
const path29 = pathKey({ env: env5 });
|
|
132837
|
+
options.path = env5[path29];
|
|
132838
|
+
env5[path29] = npmRunPath(options);
|
|
132818
132839
|
return env5;
|
|
132819
132840
|
}
|
|
132820
132841
|
|
|
@@ -133987,7 +134008,7 @@ var import_websocket_server = __toESM(require_websocket_server2(), 1);
|
|
|
133987
134008
|
var wrapper_default = import_websocket.default;
|
|
133988
134009
|
|
|
133989
134010
|
// package.json
|
|
133990
|
-
var version = "2.0.
|
|
134011
|
+
var version = "2.0.26";
|
|
133991
134012
|
var package_default = {
|
|
133992
134013
|
name: "wrangler",
|
|
133993
134014
|
version,
|
|
@@ -134042,11 +134063,11 @@ var package_default = {
|
|
|
134042
134063
|
build: "npm run clean && npm run bundle && npm run emit-types",
|
|
134043
134064
|
bundle: "node -r esbuild-register scripts/bundle.ts",
|
|
134044
134065
|
"check:type": "tsc",
|
|
134045
|
-
clean: "
|
|
134066
|
+
clean: "rimraf wrangler-dist miniflare-dist emitted-types",
|
|
134046
134067
|
dev: "npm run clean && concurrently -c black,blue --kill-others-on-fail false 'npm run bundle -- --watch' 'npm run check:type -- --watch --preserveWatchOutput'",
|
|
134047
134068
|
"emit-types": "tsc -p tsconfig.emit.json && node -r esbuild-register scripts/emit-types.ts",
|
|
134048
134069
|
prepublishOnly: "SOURCEMAPS=false npm run build",
|
|
134049
|
-
start: "npm run bundle && NODE_OPTIONS=--enable-source-maps ./bin/wrangler.js",
|
|
134070
|
+
start: "npm run bundle && cross-env NODE_OPTIONS=--enable-source-maps ./bin/wrangler.js",
|
|
134050
134071
|
test: "jest --silent=false --verbose=true",
|
|
134051
134072
|
"test-watch": "npm run test -- --runInBand --testTimeout=50000 --watch",
|
|
134052
134073
|
"test:ci": "npm run test -- --verbose=true --coverage"
|
|
@@ -136493,6 +136514,29 @@ async function fetchR2Objects(resource, bodyInit = {}) {
|
|
|
136493
136514
|
);
|
|
136494
136515
|
}
|
|
136495
136516
|
}
|
|
136517
|
+
async function fetchDashboardScript(resource, bodyInit = {}) {
|
|
136518
|
+
await requireLoggedIn();
|
|
136519
|
+
const auth = requireApiToken();
|
|
136520
|
+
const headers = cloneHeaders(bodyInit.headers);
|
|
136521
|
+
addAuthorizationHeaderIfUnspecified(headers, auth);
|
|
136522
|
+
addUserAgent(headers);
|
|
136523
|
+
const response = await (0, import_undici3.fetch)(`${getCloudflareAPIBaseURL()}${resource}`, {
|
|
136524
|
+
...bodyInit,
|
|
136525
|
+
headers
|
|
136526
|
+
});
|
|
136527
|
+
if (!response.ok || !response.body) {
|
|
136528
|
+
throw new Error(
|
|
136529
|
+
`Failed to fetch ${resource} - ${response.status}: ${response.statusText});`
|
|
136530
|
+
);
|
|
136531
|
+
}
|
|
136532
|
+
const usesModules = response.headers.get("content-type")?.startsWith("multipart");
|
|
136533
|
+
if (usesModules) {
|
|
136534
|
+
const file = await response.text();
|
|
136535
|
+
return file.split("\n").slice(4, -4).join("\n");
|
|
136536
|
+
} else {
|
|
136537
|
+
return response.text();
|
|
136538
|
+
}
|
|
136539
|
+
}
|
|
136496
136540
|
|
|
136497
136541
|
// src/cfetch/index.ts
|
|
136498
136542
|
async function fetchResult(resource, init = {}, queryParams, abortSignal) {
|
|
@@ -138329,6 +138373,10 @@ function useHotkeys(props) {
|
|
|
138329
138373
|
console.log();
|
|
138330
138374
|
break;
|
|
138331
138375
|
case "b": {
|
|
138376
|
+
if (ip === "0.0.0.0") {
|
|
138377
|
+
await openInBrowser(`${localProtocol}://127.0.0.1:${port}`);
|
|
138378
|
+
return;
|
|
138379
|
+
}
|
|
138332
138380
|
await openInBrowser(`${localProtocol}://${ip}:${port}`);
|
|
138333
138381
|
break;
|
|
138334
138382
|
}
|
|
@@ -138616,7 +138664,7 @@ async function getMetricsDispatcher(options) {
|
|
|
138616
138664
|
}
|
|
138617
138665
|
};
|
|
138618
138666
|
async function dispatch(event) {
|
|
138619
|
-
if (
|
|
138667
|
+
if (!SPARROW_SOURCE_KEY) {
|
|
138620
138668
|
logger.debug(
|
|
138621
138669
|
"Metrics dispatcher: Source Key not provided. Be sure to initialize before sending events.",
|
|
138622
138670
|
event
|
|
@@ -138649,7 +138697,7 @@ async function getMetricsDispatcher(options) {
|
|
|
138649
138697
|
headers: {
|
|
138650
138698
|
Accept: "*/*",
|
|
138651
138699
|
"Content-Type": "application/json",
|
|
138652
|
-
"Sparrow-Source-Key":
|
|
138700
|
+
"Sparrow-Source-Key": SPARROW_SOURCE_KEY
|
|
138653
138701
|
},
|
|
138654
138702
|
mode: "cors",
|
|
138655
138703
|
keepalive: true,
|
|
@@ -138727,7 +138775,7 @@ async function getZoneIdFromHost(host) {
|
|
|
138727
138775
|
// src/index.tsx
|
|
138728
138776
|
init_import_meta_url();
|
|
138729
138777
|
var fs11 = __toESM(require("node:fs"));
|
|
138730
|
-
var
|
|
138778
|
+
var import_node_path30 = __toESM(require("node:path"));
|
|
138731
138779
|
var stream = __toESM(require("node:stream"));
|
|
138732
138780
|
var import_node_string_decoder = require("node:string_decoder");
|
|
138733
138781
|
var import_promises12 = require("node:timers/promises");
|
|
@@ -142306,6 +142354,11 @@ async function initOptions(yargs) {
|
|
|
142306
142354
|
describe: 'Answer "yes" to any prompts for new projects',
|
|
142307
142355
|
type: "boolean",
|
|
142308
142356
|
alias: "y"
|
|
142357
|
+
}).option("from-dash", {
|
|
142358
|
+
describe: "Download script from the dashboard for local development",
|
|
142359
|
+
type: "string",
|
|
142360
|
+
requiresArg: true,
|
|
142361
|
+
hidden: true
|
|
142309
142362
|
});
|
|
142310
142363
|
}
|
|
142311
142364
|
async function initHandler(args) {
|
|
@@ -142320,7 +142373,11 @@ async function initHandler(args) {
|
|
|
142320
142373
|
const devDepsToInstall = [];
|
|
142321
142374
|
const instructions = [];
|
|
142322
142375
|
let shouldRunPackageManagerInstall = false;
|
|
142323
|
-
const
|
|
142376
|
+
const fromDashScriptName = args["from-dash"];
|
|
142377
|
+
const creationDirectory = import_node_path17.default.resolve(
|
|
142378
|
+
process.cwd(),
|
|
142379
|
+
(args.name ? args.name : fromDashScriptName) ?? ""
|
|
142380
|
+
);
|
|
142324
142381
|
if (args.site) {
|
|
142325
142382
|
const gitDirectory = creationDirectory !== process.cwd() ? import_node_path17.default.basename(creationDirectory) : "my-site";
|
|
142326
142383
|
const message = `The --site option is no longer supported.
|
|
@@ -142343,12 +142400,15 @@ Have you considered using Cloudflare Pages instead? See https://pages.cloudflare
|
|
|
142343
142400
|
);
|
|
142344
142401
|
let justCreatedWranglerToml = false;
|
|
142345
142402
|
if (fs7.existsSync(wranglerTomlDestination)) {
|
|
142403
|
+
let shouldContinue = false;
|
|
142346
142404
|
logger.warn(
|
|
142347
142405
|
`${import_node_path17.default.relative(process.cwd(), wranglerTomlDestination)} already exists!`
|
|
142348
142406
|
);
|
|
142349
|
-
|
|
142350
|
-
|
|
142351
|
-
|
|
142407
|
+
if (!fromDashScriptName) {
|
|
142408
|
+
shouldContinue = await confirm(
|
|
142409
|
+
"Do you want to continue initializing this project?"
|
|
142410
|
+
);
|
|
142411
|
+
}
|
|
142352
142412
|
if (!shouldContinue) {
|
|
142353
142413
|
return;
|
|
142354
142414
|
}
|
|
@@ -142601,29 +142661,54 @@ To start developing your Worker, run \`npx wrangler dev\`${isCreatingWranglerTom
|
|
|
142601
142661
|
process.cwd(),
|
|
142602
142662
|
import_node_path17.default.join(creationDirectory, "./src/index.ts")
|
|
142603
142663
|
);
|
|
142604
|
-
|
|
142605
|
-
|
|
142606
|
-
const
|
|
142664
|
+
if (fromDashScriptName) {
|
|
142665
|
+
const config = readConfig(args.config, args);
|
|
142666
|
+
const accountId = await requireAuth(config);
|
|
142607
142667
|
await (0, import_promises6.mkdir)(import_node_path17.default.join(creationDirectory, "./src"), {
|
|
142608
142668
|
recursive: true
|
|
142609
142669
|
});
|
|
142670
|
+
const dashScript = await fetchDashboardScript(
|
|
142671
|
+
`/accounts/${accountId}/workers/scripts/${fromDashScriptName}`,
|
|
142672
|
+
{
|
|
142673
|
+
method: "GET"
|
|
142674
|
+
}
|
|
142675
|
+
);
|
|
142610
142676
|
await (0, import_promises6.writeFile)(
|
|
142611
142677
|
import_node_path17.default.join(creationDirectory, "./src/index.ts"),
|
|
142612
|
-
|
|
142613
|
-
);
|
|
142614
|
-
logger.log(
|
|
142615
|
-
`\u2728 Created ${import_node_path17.default.relative(
|
|
142616
|
-
process.cwd(),
|
|
142617
|
-
import_node_path17.default.join(creationDirectory, "./src/index.ts")
|
|
142618
|
-
)}`
|
|
142678
|
+
dashScript
|
|
142619
142679
|
);
|
|
142620
142680
|
await writePackageJsonScriptsAndUpdateWranglerToml(
|
|
142621
142681
|
shouldWritePackageJsonScripts,
|
|
142622
142682
|
justCreatedWranglerToml,
|
|
142623
142683
|
pathToPackageJson,
|
|
142624
142684
|
"src/index.ts",
|
|
142625
|
-
|
|
142685
|
+
{}
|
|
142626
142686
|
);
|
|
142687
|
+
} else {
|
|
142688
|
+
const newWorkerType = yesFlag ? "fetch" : await getNewWorkerType(newWorkerFilename);
|
|
142689
|
+
if (newWorkerType !== "none") {
|
|
142690
|
+
const template = getNewWorkerTemplate("ts", newWorkerType);
|
|
142691
|
+
await (0, import_promises6.mkdir)(import_node_path17.default.join(creationDirectory, "./src"), {
|
|
142692
|
+
recursive: true
|
|
142693
|
+
});
|
|
142694
|
+
await (0, import_promises6.writeFile)(
|
|
142695
|
+
import_node_path17.default.join(creationDirectory, "./src/index.ts"),
|
|
142696
|
+
readFileSync5(import_node_path17.default.join(__dirname, `../templates/${template}`))
|
|
142697
|
+
);
|
|
142698
|
+
logger.log(
|
|
142699
|
+
`\u2728 Created ${import_node_path17.default.relative(
|
|
142700
|
+
process.cwd(),
|
|
142701
|
+
import_node_path17.default.join(creationDirectory, "./src/index.ts")
|
|
142702
|
+
)}`
|
|
142703
|
+
);
|
|
142704
|
+
await writePackageJsonScriptsAndUpdateWranglerToml(
|
|
142705
|
+
shouldWritePackageJsonScripts,
|
|
142706
|
+
justCreatedWranglerToml,
|
|
142707
|
+
pathToPackageJson,
|
|
142708
|
+
"src/index.ts",
|
|
142709
|
+
getNewWorkerToml(newWorkerType)
|
|
142710
|
+
);
|
|
142711
|
+
}
|
|
142627
142712
|
}
|
|
142628
142713
|
}
|
|
142629
142714
|
} else {
|
|
@@ -142632,29 +142717,54 @@ To start developing your Worker, run \`npx wrangler dev\`${isCreatingWranglerTom
|
|
|
142632
142717
|
process.cwd(),
|
|
142633
142718
|
import_node_path17.default.join(creationDirectory, "./src/index.js")
|
|
142634
142719
|
);
|
|
142635
|
-
|
|
142636
|
-
|
|
142637
|
-
const
|
|
142720
|
+
if (fromDashScriptName) {
|
|
142721
|
+
const config = readConfig(args.config, args);
|
|
142722
|
+
const accountId = await requireAuth(config);
|
|
142638
142723
|
await (0, import_promises6.mkdir)(import_node_path17.default.join(creationDirectory, "./src"), {
|
|
142639
142724
|
recursive: true
|
|
142640
142725
|
});
|
|
142726
|
+
const dashScript = await fetchDashboardScript(
|
|
142727
|
+
`/accounts/${accountId}/workers/scripts/${fromDashScriptName}`,
|
|
142728
|
+
{
|
|
142729
|
+
method: "GET"
|
|
142730
|
+
}
|
|
142731
|
+
);
|
|
142641
142732
|
await (0, import_promises6.writeFile)(
|
|
142642
142733
|
import_node_path17.default.join(creationDirectory, "./src/index.js"),
|
|
142643
|
-
|
|
142644
|
-
);
|
|
142645
|
-
logger.log(
|
|
142646
|
-
`\u2728 Created ${import_node_path17.default.relative(
|
|
142647
|
-
process.cwd(),
|
|
142648
|
-
import_node_path17.default.join(creationDirectory, "./src/index.js")
|
|
142649
|
-
)}`
|
|
142734
|
+
dashScript
|
|
142650
142735
|
);
|
|
142651
142736
|
await writePackageJsonScriptsAndUpdateWranglerToml(
|
|
142652
142737
|
shouldWritePackageJsonScripts,
|
|
142653
142738
|
justCreatedWranglerToml,
|
|
142654
142739
|
pathToPackageJson,
|
|
142655
|
-
"src/index.
|
|
142656
|
-
|
|
142740
|
+
"src/index.ts",
|
|
142741
|
+
{}
|
|
142657
142742
|
);
|
|
142743
|
+
} else {
|
|
142744
|
+
const newWorkerType = yesFlag ? "fetch" : await getNewWorkerType(newWorkerFilename);
|
|
142745
|
+
if (newWorkerType !== "none") {
|
|
142746
|
+
const template = getNewWorkerTemplate("js", newWorkerType);
|
|
142747
|
+
await (0, import_promises6.mkdir)(import_node_path17.default.join(creationDirectory, "./src"), {
|
|
142748
|
+
recursive: true
|
|
142749
|
+
});
|
|
142750
|
+
await (0, import_promises6.writeFile)(
|
|
142751
|
+
import_node_path17.default.join(creationDirectory, "./src/index.js"),
|
|
142752
|
+
readFileSync5(import_node_path17.default.join(__dirname, `../templates/${template}`))
|
|
142753
|
+
);
|
|
142754
|
+
logger.log(
|
|
142755
|
+
`\u2728 Created ${import_node_path17.default.relative(
|
|
142756
|
+
process.cwd(),
|
|
142757
|
+
import_node_path17.default.join(creationDirectory, "./src/index.js")
|
|
142758
|
+
)}`
|
|
142759
|
+
);
|
|
142760
|
+
await writePackageJsonScriptsAndUpdateWranglerToml(
|
|
142761
|
+
shouldWritePackageJsonScripts,
|
|
142762
|
+
justCreatedWranglerToml,
|
|
142763
|
+
pathToPackageJson,
|
|
142764
|
+
"src/index.js",
|
|
142765
|
+
getNewWorkerToml(newWorkerType)
|
|
142766
|
+
);
|
|
142767
|
+
}
|
|
142658
142768
|
}
|
|
142659
142769
|
}
|
|
142660
142770
|
}
|
|
@@ -142762,12 +142872,12 @@ var import_node_path24 = require("node:path");
|
|
|
142762
142872
|
// src/paths.ts
|
|
142763
142873
|
init_import_meta_url();
|
|
142764
142874
|
var import_console = require("console");
|
|
142765
|
-
function toUrlPath(
|
|
142875
|
+
function toUrlPath(path29) {
|
|
142766
142876
|
(0, import_console.assert)(
|
|
142767
|
-
!/^[a-z]:/i.test(
|
|
142877
|
+
!/^[a-z]:/i.test(path29),
|
|
142768
142878
|
"Tried to convert a Windows file path with a drive to a URL path."
|
|
142769
142879
|
);
|
|
142770
|
-
return
|
|
142880
|
+
return path29.replace(/\\/g, "/");
|
|
142771
142881
|
}
|
|
142772
142882
|
|
|
142773
142883
|
// src/pages/constants.ts
|
|
@@ -142781,8 +142891,21 @@ var MAX_CHECK_MISSING_ATTEMPTS = 5;
|
|
|
142781
142891
|
var SECONDS_TO_WAIT_FOR_PROXY = 5;
|
|
142782
142892
|
var isInPagesCI = !!process.env.CF_PAGES;
|
|
142783
142893
|
var MAX_FUNCTIONS_ROUTES_RULES = 100;
|
|
142894
|
+
var MAX_FUNCTIONS_ROUTES_RULE_LENGTH = 100;
|
|
142784
142895
|
var ROUTES_SPEC_VERSION = 1;
|
|
142785
142896
|
|
|
142897
|
+
// src/pages/errors.ts
|
|
142898
|
+
init_import_meta_url();
|
|
142899
|
+
var FunctionsNoRoutesError = class extends Error {
|
|
142900
|
+
constructor(message) {
|
|
142901
|
+
super(message);
|
|
142902
|
+
}
|
|
142903
|
+
};
|
|
142904
|
+
var EXIT_CODE_FUNCTIONS_NO_ROUTES_ERROR = 156;
|
|
142905
|
+
function getFunctionsNoRoutesWarning(functionsDirectory, suffix) {
|
|
142906
|
+
return `No routes found when building Functions directory: ${functionsDirectory}${suffix ? " - " + suffix : ""}`;
|
|
142907
|
+
}
|
|
142908
|
+
|
|
142786
142909
|
// src/pages/functions/buildPlugin.ts
|
|
142787
142910
|
init_import_meta_url();
|
|
142788
142911
|
var import_promises7 = require("node:fs/promises");
|
|
@@ -142858,8 +142981,8 @@ function buildPlugin({
|
|
|
142858
142981
|
]
|
|
142859
142982
|
};
|
|
142860
142983
|
}
|
|
142861
|
-
const
|
|
142862
|
-
return { path:
|
|
142984
|
+
const path29 = `assets:./${(0, import_node_path19.relative)(outdir, directory)}`;
|
|
142985
|
+
return { path: path29, external: true, namespace: "assets" };
|
|
142863
142986
|
});
|
|
142864
142987
|
}
|
|
142865
142988
|
}
|
|
@@ -143331,11 +143454,14 @@ var import_node_path23 = require("node:path");
|
|
|
143331
143454
|
// src/pages/functions/routes-consolidation.ts
|
|
143332
143455
|
init_import_meta_url();
|
|
143333
143456
|
function consolidateRoutes(routes) {
|
|
143457
|
+
const routesShortened = Array.from(
|
|
143458
|
+
new Set(routes.map((route) => shortenRoute(route)))
|
|
143459
|
+
);
|
|
143334
143460
|
const routesMap = /* @__PURE__ */ new Map();
|
|
143335
|
-
for (const route of
|
|
143461
|
+
for (const route of routesShortened) {
|
|
143336
143462
|
routesMap.set(route, true);
|
|
143337
143463
|
}
|
|
143338
|
-
for (const route of
|
|
143464
|
+
for (const route of routesShortened.filter((r) => r.endsWith("/*"))) {
|
|
143339
143465
|
if (routesMap.has(route)) {
|
|
143340
143466
|
const routeTrimmed = route.substring(0, route.length - 1);
|
|
143341
143467
|
for (const nextRoute of routesMap.keys()) {
|
|
@@ -143347,6 +143473,27 @@ function consolidateRoutes(routes) {
|
|
|
143347
143473
|
}
|
|
143348
143474
|
return Array.from(routesMap.keys());
|
|
143349
143475
|
}
|
|
143476
|
+
function shortenRoute(routeToShorten, maxLength = MAX_FUNCTIONS_ROUTES_RULE_LENGTH) {
|
|
143477
|
+
if (routeToShorten.length <= maxLength) {
|
|
143478
|
+
return routeToShorten;
|
|
143479
|
+
}
|
|
143480
|
+
let route = routeToShorten;
|
|
143481
|
+
for (let i2 = 0; i2 < routeToShorten.length; i2++) {
|
|
143482
|
+
for (let j = maxLength - 1 - i2; j > 0; j--) {
|
|
143483
|
+
if (route[j] === "/") {
|
|
143484
|
+
route = route.slice(0, j) + "/*";
|
|
143485
|
+
break;
|
|
143486
|
+
}
|
|
143487
|
+
}
|
|
143488
|
+
if (route.length <= maxLength) {
|
|
143489
|
+
break;
|
|
143490
|
+
}
|
|
143491
|
+
}
|
|
143492
|
+
if (route.length > maxLength) {
|
|
143493
|
+
route = "/*";
|
|
143494
|
+
}
|
|
143495
|
+
return route;
|
|
143496
|
+
}
|
|
143350
143497
|
|
|
143351
143498
|
// src/pages/functions/routes-transformation.ts
|
|
143352
143499
|
function convertRoutesToGlobPatterns(routes) {
|
|
@@ -143492,19 +143639,30 @@ var Handler = async ({
|
|
|
143492
143639
|
);
|
|
143493
143640
|
}
|
|
143494
143641
|
buildOutputDirectory ??= (0, import_node_path24.dirname)(outfile);
|
|
143495
|
-
|
|
143496
|
-
|
|
143497
|
-
|
|
143498
|
-
|
|
143499
|
-
|
|
143500
|
-
|
|
143501
|
-
|
|
143502
|
-
|
|
143503
|
-
|
|
143504
|
-
|
|
143505
|
-
|
|
143506
|
-
|
|
143507
|
-
|
|
143642
|
+
try {
|
|
143643
|
+
await buildFunctions({
|
|
143644
|
+
outfile,
|
|
143645
|
+
outputConfigPath,
|
|
143646
|
+
functionsDirectory: directory,
|
|
143647
|
+
minify,
|
|
143648
|
+
sourcemap,
|
|
143649
|
+
fallbackService,
|
|
143650
|
+
watch: watch5,
|
|
143651
|
+
plugin,
|
|
143652
|
+
buildOutputDirectory,
|
|
143653
|
+
nodeCompat,
|
|
143654
|
+
routesOutputPath
|
|
143655
|
+
});
|
|
143656
|
+
} catch (e2) {
|
|
143657
|
+
if (e2 instanceof FunctionsNoRoutesError) {
|
|
143658
|
+
throw new FatalError(
|
|
143659
|
+
getFunctionsNoRoutesWarning(directory),
|
|
143660
|
+
EXIT_CODE_FUNCTIONS_NO_ROUTES_ERROR
|
|
143661
|
+
);
|
|
143662
|
+
} else {
|
|
143663
|
+
throw e2;
|
|
143664
|
+
}
|
|
143665
|
+
}
|
|
143508
143666
|
await sendMetricsEvent("build pages functions");
|
|
143509
143667
|
};
|
|
143510
143668
|
async function buildFunctions({
|
|
@@ -143530,7 +143688,12 @@ async function buildFunctions({
|
|
|
143530
143688
|
baseDir: functionsDirectory,
|
|
143531
143689
|
baseURL
|
|
143532
143690
|
});
|
|
143533
|
-
if (config.routes
|
|
143691
|
+
if (!config.routes || config.routes.length === 0) {
|
|
143692
|
+
throw new FunctionsNoRoutesError(
|
|
143693
|
+
`Failed to find any routes while compiling Functions in: ${functionsDirectory}`
|
|
143694
|
+
);
|
|
143695
|
+
}
|
|
143696
|
+
if (routesOutputPath) {
|
|
143534
143697
|
const routesJSON = convertRoutesToRoutesJSONSpec(config.routes);
|
|
143535
143698
|
(0, import_node_fs10.writeFileSync)(routesOutputPath, JSON.stringify(routesJSON, null, 2));
|
|
143536
143699
|
}
|
|
@@ -143804,6 +143967,16 @@ function Options2(yargs) {
|
|
|
143804
143967
|
default: true,
|
|
143805
143968
|
description: "Run on my machine"
|
|
143806
143969
|
},
|
|
143970
|
+
"compatibility-date": {
|
|
143971
|
+
describe: "Date to use for compatibility checks",
|
|
143972
|
+
type: "string"
|
|
143973
|
+
},
|
|
143974
|
+
"compatibility-flags": {
|
|
143975
|
+
describe: "Flags to use for compatibility checks",
|
|
143976
|
+
alias: "compatibility-flag",
|
|
143977
|
+
type: "string",
|
|
143978
|
+
array: true
|
|
143979
|
+
},
|
|
143807
143980
|
ip: {
|
|
143808
143981
|
type: "string",
|
|
143809
143982
|
default: "0.0.0.0",
|
|
@@ -143876,6 +144049,8 @@ function Options2(yargs) {
|
|
|
143876
144049
|
var Handler2 = async ({
|
|
143877
144050
|
local,
|
|
143878
144051
|
directory,
|
|
144052
|
+
"compatibility-date": compatibilityDate = "2021-11-02",
|
|
144053
|
+
"compatibility-flags": compatibilityFlags,
|
|
143879
144054
|
ip,
|
|
143880
144055
|
port,
|
|
143881
144056
|
"inspector-port": inspectorPort,
|
|
@@ -143900,7 +144075,7 @@ var Handler2 = async ({
|
|
|
143900
144075
|
throw new FatalError("Pages does not support wrangler.toml", 1);
|
|
143901
144076
|
}
|
|
143902
144077
|
const functionsDirectory = "./functions";
|
|
143903
|
-
|
|
144078
|
+
let usingFunctions = (0, import_node_fs11.existsSync)(functionsDirectory);
|
|
143904
144079
|
const command2 = remaining;
|
|
143905
144080
|
let proxyPort;
|
|
143906
144081
|
if (directory !== void 0 && command2.length > 0) {
|
|
@@ -143922,7 +144097,7 @@ var Handler2 = async ({
|
|
|
143922
144097
|
const scriptReadyPromise = new Promise(
|
|
143923
144098
|
(promiseResolve) => scriptReadyResolve = promiseResolve
|
|
143924
144099
|
);
|
|
143925
|
-
let scriptPath;
|
|
144100
|
+
let scriptPath = "";
|
|
143926
144101
|
if (usingFunctions) {
|
|
143927
144102
|
const outfile = (0, import_node_path25.join)((0, import_node_os9.tmpdir)(), `./functionsWorker-${Math.random()}.js`);
|
|
143928
144103
|
scriptPath = outfile;
|
|
@@ -143932,35 +144107,56 @@ var Handler2 = async ({
|
|
|
143932
144107
|
);
|
|
143933
144108
|
}
|
|
143934
144109
|
logger.log(`Compiling worker to "${outfile}"...`);
|
|
144110
|
+
const onEnd = () => scriptReadyResolve();
|
|
143935
144111
|
try {
|
|
143936
144112
|
await buildFunctions({
|
|
143937
144113
|
outfile,
|
|
143938
144114
|
functionsDirectory,
|
|
143939
144115
|
sourcemap: true,
|
|
143940
144116
|
watch: true,
|
|
143941
|
-
onEnd
|
|
144117
|
+
onEnd,
|
|
143942
144118
|
buildOutputDirectory: directory,
|
|
143943
144119
|
nodeCompat
|
|
143944
144120
|
});
|
|
143945
144121
|
await sendMetricsEvent("build pages functions");
|
|
143946
|
-
|
|
143947
|
-
|
|
143948
|
-
|
|
143949
|
-
|
|
143950
|
-
|
|
143951
|
-
|
|
143952
|
-
|
|
143953
|
-
|
|
143954
|
-
|
|
143955
|
-
|
|
143956
|
-
|
|
143957
|
-
|
|
143958
|
-
|
|
143959
|
-
|
|
144122
|
+
(0, import_chokidar3.watch)([functionsDirectory], {
|
|
144123
|
+
persistent: true,
|
|
144124
|
+
ignoreInitial: true
|
|
144125
|
+
}).on("all", async () => {
|
|
144126
|
+
try {
|
|
144127
|
+
await buildFunctions({
|
|
144128
|
+
outfile,
|
|
144129
|
+
functionsDirectory,
|
|
144130
|
+
sourcemap: true,
|
|
144131
|
+
watch: true,
|
|
144132
|
+
onEnd,
|
|
144133
|
+
buildOutputDirectory: directory,
|
|
144134
|
+
nodeCompat
|
|
144135
|
+
});
|
|
144136
|
+
await sendMetricsEvent("build pages functions");
|
|
144137
|
+
} catch (e2) {
|
|
144138
|
+
if (e2 instanceof FunctionsNoRoutesError) {
|
|
144139
|
+
logger.warn(
|
|
144140
|
+
getFunctionsNoRoutesWarning(functionsDirectory, "skipping")
|
|
144141
|
+
);
|
|
144142
|
+
} else {
|
|
144143
|
+
throw e2;
|
|
144144
|
+
}
|
|
144145
|
+
}
|
|
143960
144146
|
});
|
|
143961
|
-
|
|
143962
|
-
|
|
143963
|
-
|
|
144147
|
+
} catch (e2) {
|
|
144148
|
+
if (e2 instanceof FunctionsNoRoutesError) {
|
|
144149
|
+
logger.warn(
|
|
144150
|
+
getFunctionsNoRoutesWarning(functionsDirectory, "skipping")
|
|
144151
|
+
);
|
|
144152
|
+
onEnd();
|
|
144153
|
+
usingFunctions = false;
|
|
144154
|
+
} else {
|
|
144155
|
+
throw e2;
|
|
144156
|
+
}
|
|
144157
|
+
}
|
|
144158
|
+
}
|
|
144159
|
+
if (!usingFunctions) {
|
|
143964
144160
|
scriptReadyResolve();
|
|
143965
144161
|
scriptPath = directory !== void 0 ? (0, import_node_path25.join)(directory, singleWorkerScriptPath) : singleWorkerScriptPath;
|
|
143966
144162
|
if (!(0, import_node_fs11.existsSync)(scriptPath)) {
|
|
@@ -143987,6 +144183,12 @@ var Handler2 = async ({
|
|
|
143987
144183
|
}
|
|
143988
144184
|
}
|
|
143989
144185
|
await scriptReadyPromise;
|
|
144186
|
+
if (scriptPath === "") {
|
|
144187
|
+
throw new FatalError(
|
|
144188
|
+
"Failed to start wrangler pages dev due to an unknown error",
|
|
144189
|
+
1
|
|
144190
|
+
);
|
|
144191
|
+
}
|
|
143990
144192
|
const { stop, waitUntilExit } = await unstable_dev(
|
|
143991
144193
|
scriptPath,
|
|
143992
144194
|
{
|
|
@@ -143996,7 +144198,8 @@ var Handler2 = async ({
|
|
|
143996
144198
|
watch: true,
|
|
143997
144199
|
localProtocol,
|
|
143998
144200
|
liveReload,
|
|
143999
|
-
compatibilityDate
|
|
144201
|
+
compatibilityDate,
|
|
144202
|
+
compatibilityFlags,
|
|
144000
144203
|
nodeCompat,
|
|
144001
144204
|
vars: Object.fromEntries(
|
|
144002
144205
|
bindings.map((binding) => binding.toString().split("=")).map(([key2, ...values]) => [key2, values.join("=")])
|
|
@@ -144081,7 +144284,8 @@ function getPids(pid) {
|
|
|
144081
144284
|
function getPort(pid) {
|
|
144082
144285
|
let command2, regExp;
|
|
144083
144286
|
if (isWindows()) {
|
|
144084
|
-
|
|
144287
|
+
const drive = (0, import_node_os9.homedir)().split(":\\")[0];
|
|
144288
|
+
command2 = drive + ":\\windows\\system32\\netstat.exe -nao";
|
|
144085
144289
|
regExp = new RegExp(`TCP\\s+.*:(\\d+)\\s+.*:\\d+\\s+LISTENING\\s+${pid}`);
|
|
144086
144290
|
} else {
|
|
144087
144291
|
command2 = "lsof -nPi";
|
|
@@ -144167,12 +144371,83 @@ You should bundle your Worker or remove the import if it is unused.`
|
|
|
144167
144371
|
}
|
|
144168
144372
|
};
|
|
144169
144373
|
|
|
144374
|
+
// src/pages/functions.tsx
|
|
144375
|
+
init_import_meta_url();
|
|
144376
|
+
var import_node_fs12 = require("node:fs");
|
|
144377
|
+
var import_node_path26 = __toESM(require("node:path"));
|
|
144378
|
+
function OptimizeRoutesOptions(yargs) {
|
|
144379
|
+
return yargs.options({
|
|
144380
|
+
"routes-path": {
|
|
144381
|
+
type: "string",
|
|
144382
|
+
demandOption: true,
|
|
144383
|
+
description: "The location of the _routes.json file"
|
|
144384
|
+
}
|
|
144385
|
+
}).options({
|
|
144386
|
+
"output-routes-path": {
|
|
144387
|
+
type: "string",
|
|
144388
|
+
demandOption: true,
|
|
144389
|
+
description: "The location of the optimized output routes file"
|
|
144390
|
+
}
|
|
144391
|
+
});
|
|
144392
|
+
}
|
|
144393
|
+
async function OptimizeRoutesHandler({
|
|
144394
|
+
routesPath,
|
|
144395
|
+
outputRoutesPath
|
|
144396
|
+
}) {
|
|
144397
|
+
if (!isInPagesCI) {
|
|
144398
|
+
logger.log(pagesBetaWarning);
|
|
144399
|
+
}
|
|
144400
|
+
let routesFileContents;
|
|
144401
|
+
const routesOutputDirectory = import_node_path26.default.dirname(outputRoutesPath);
|
|
144402
|
+
if (!(0, import_node_fs12.existsSync)(routesPath)) {
|
|
144403
|
+
throw new FatalError(
|
|
144404
|
+
`Oops! File ${routesPath} does not exist. Please make sure --routes-path is a valid file path (for example "/public/_routes.json").`,
|
|
144405
|
+
1
|
|
144406
|
+
);
|
|
144407
|
+
}
|
|
144408
|
+
if (!(0, import_node_fs12.existsSync)(routesOutputDirectory) || !(0, import_node_fs12.lstatSync)(routesOutputDirectory).isDirectory()) {
|
|
144409
|
+
throw new FatalError(
|
|
144410
|
+
`Oops! Folder ${routesOutputDirectory} does not exist. Please make sure --output-routes-path is a valid file path (for example "/public/_routes.json").`,
|
|
144411
|
+
1
|
|
144412
|
+
);
|
|
144413
|
+
}
|
|
144414
|
+
try {
|
|
144415
|
+
routesFileContents = (0, import_node_fs12.readFileSync)(routesPath, "utf-8");
|
|
144416
|
+
} catch (err2) {
|
|
144417
|
+
throw new FatalError(`Error while reading ${routesPath} file: ${err2}`);
|
|
144418
|
+
}
|
|
144419
|
+
const routes = JSON.parse(routesFileContents);
|
|
144420
|
+
if (!isRoutesJSONSpec(routes)) {
|
|
144421
|
+
throw new FatalError(
|
|
144422
|
+
`
|
|
144423
|
+
Invalid _routes.json file found at: ${routesPath}. Please make sure the JSON object has the following format:
|
|
144424
|
+
{
|
|
144425
|
+
version: ${ROUTES_SPEC_VERSION};
|
|
144426
|
+
include: string[];
|
|
144427
|
+
exclude: string[];
|
|
144428
|
+
}
|
|
144429
|
+
`,
|
|
144430
|
+
1
|
|
144431
|
+
);
|
|
144432
|
+
}
|
|
144433
|
+
const optimizedRoutes = optimizeRoutesJSONSpec(routes);
|
|
144434
|
+
const optimizedRoutesContents = JSON.stringify(optimizedRoutes);
|
|
144435
|
+
try {
|
|
144436
|
+
(0, import_node_fs12.writeFileSync)(outputRoutesPath, optimizedRoutesContents);
|
|
144437
|
+
} catch (err2) {
|
|
144438
|
+
throw new FatalError(
|
|
144439
|
+
`Error writing to ${outputRoutesPath} file: ${err2}`,
|
|
144440
|
+
1
|
|
144441
|
+
);
|
|
144442
|
+
}
|
|
144443
|
+
}
|
|
144444
|
+
|
|
144170
144445
|
// src/pages/publish.tsx
|
|
144171
144446
|
init_import_meta_url();
|
|
144172
144447
|
var import_node_child_process6 = require("node:child_process");
|
|
144173
|
-
var
|
|
144448
|
+
var import_node_fs13 = require("node:fs");
|
|
144174
144449
|
var import_node_os10 = require("node:os");
|
|
144175
|
-
var
|
|
144450
|
+
var import_node_path28 = require("node:path");
|
|
144176
144451
|
var import_node_process7 = require("node:process");
|
|
144177
144452
|
var import_ink9 = __toESM(require_build2());
|
|
144178
144453
|
var import_ink_select_input4 = __toESM(require_build3());
|
|
@@ -144182,7 +144457,7 @@ var import_undici9 = __toESM(require_undici());
|
|
|
144182
144457
|
// src/pages/upload.tsx
|
|
144183
144458
|
init_import_meta_url();
|
|
144184
144459
|
var import_promises11 = require("node:fs/promises");
|
|
144185
|
-
var
|
|
144460
|
+
var import_node_path27 = require("node:path");
|
|
144186
144461
|
var import_blake3_wasm = require("blake3-wasm");
|
|
144187
144462
|
var import_ink8 = __toESM(require_build2());
|
|
144188
144463
|
var import_ink_spinner = __toESM(require_build5());
|
|
@@ -144729,7 +145004,7 @@ var Handler3 = async ({
|
|
|
144729
145004
|
jwt: process.env.CF_PAGES_UPLOAD_JWT
|
|
144730
145005
|
});
|
|
144731
145006
|
if (outputManifestPath) {
|
|
144732
|
-
await (0, import_promises11.mkdir)((0,
|
|
145007
|
+
await (0, import_promises11.mkdir)((0, import_node_path27.dirname)(outputManifestPath), { recursive: true });
|
|
144733
145008
|
await (0, import_promises11.writeFile)(outputManifestPath, JSON.stringify(manifest));
|
|
144734
145009
|
}
|
|
144735
145010
|
logger.log(`\u2728 Upload complete!`);
|
|
@@ -144753,12 +145028,12 @@ var upload = async (args) => {
|
|
|
144753
145028
|
"node_modules",
|
|
144754
145029
|
".git"
|
|
144755
145030
|
];
|
|
144756
|
-
const directory = (0,
|
|
145031
|
+
const directory = (0, import_node_path27.resolve)(args.directory);
|
|
144757
145032
|
const walk = async (dir, fileMap2 = /* @__PURE__ */ new Map(), startingDir = dir) => {
|
|
144758
145033
|
const files2 = await (0, import_promises11.readdir)(dir);
|
|
144759
145034
|
await Promise.all(
|
|
144760
145035
|
files2.map(async (file) => {
|
|
144761
|
-
const filepath = (0,
|
|
145036
|
+
const filepath = (0, import_node_path27.join)(dir, file);
|
|
144762
145037
|
const filestat = await (0, import_promises11.stat)(filepath);
|
|
144763
145038
|
if (IGNORE_LIST.includes(file)) {
|
|
144764
145039
|
return;
|
|
@@ -144769,10 +145044,10 @@ var upload = async (args) => {
|
|
|
144769
145044
|
if (filestat.isDirectory()) {
|
|
144770
145045
|
fileMap2 = await walk(filepath, fileMap2, startingDir);
|
|
144771
145046
|
} else {
|
|
144772
|
-
const name = (0,
|
|
145047
|
+
const name = (0, import_node_path27.relative)(startingDir, filepath).split(import_node_path27.sep).join("/");
|
|
144773
145048
|
const fileContent = await (0, import_promises11.readFile)(filepath);
|
|
144774
145049
|
const base64Content = fileContent.toString("base64");
|
|
144775
|
-
const extension = (0,
|
|
145050
|
+
const extension = (0, import_node_path27.extname)((0, import_node_path27.basename)(name)).substring(1);
|
|
144776
145051
|
if (filestat.size > 25 * 1024 * 1024) {
|
|
144777
145052
|
throw new FatalError(
|
|
144778
145053
|
`Error: Pages only supports files up to ${prettyBytes(
|
|
@@ -145162,20 +145437,29 @@ To silence this warning, pass in --commit-dirty=true`
|
|
|
145162
145437
|
}
|
|
145163
145438
|
}
|
|
145164
145439
|
let builtFunctions = void 0;
|
|
145165
|
-
const functionsDirectory = (0,
|
|
145166
|
-
const routesOutputPath = (0,
|
|
145167
|
-
if ((0,
|
|
145168
|
-
const outfile = (0,
|
|
145169
|
-
|
|
145170
|
-
|
|
145440
|
+
const functionsDirectory = (0, import_node_path28.join)((0, import_node_process7.cwd)(), "functions");
|
|
145441
|
+
const routesOutputPath = (0, import_node_path28.join)((0, import_node_os10.tmpdir)(), `_routes-${Math.random()}.json`);
|
|
145442
|
+
if ((0, import_node_fs13.existsSync)(functionsDirectory)) {
|
|
145443
|
+
const outfile = (0, import_node_path28.join)((0, import_node_os10.tmpdir)(), `./functionsWorker-${Math.random()}.js`);
|
|
145444
|
+
try {
|
|
145445
|
+
await buildFunctions({
|
|
145171
145446
|
outfile,
|
|
145172
145447
|
functionsDirectory,
|
|
145173
|
-
onEnd: () =>
|
|
145174
|
-
|
|
145448
|
+
onEnd: () => {
|
|
145449
|
+
},
|
|
145450
|
+
buildOutputDirectory: (0, import_node_path28.dirname)(outfile),
|
|
145175
145451
|
routesOutputPath
|
|
145176
|
-
})
|
|
145177
|
-
|
|
145178
|
-
|
|
145452
|
+
});
|
|
145453
|
+
builtFunctions = (0, import_node_fs13.readFileSync)(outfile, "utf-8");
|
|
145454
|
+
} catch (e2) {
|
|
145455
|
+
if (e2 instanceof FunctionsNoRoutesError) {
|
|
145456
|
+
logger.warn(
|
|
145457
|
+
getFunctionsNoRoutesWarning(functionsDirectory, "skipping")
|
|
145458
|
+
);
|
|
145459
|
+
} else {
|
|
145460
|
+
throw e2;
|
|
145461
|
+
}
|
|
145462
|
+
}
|
|
145179
145463
|
}
|
|
145180
145464
|
const manifest = await upload({ directory, accountId, projectName });
|
|
145181
145465
|
const formData = new import_undici9.FormData();
|
|
@@ -145194,37 +145478,41 @@ To silence this warning, pass in --commit-dirty=true`
|
|
|
145194
145478
|
}
|
|
145195
145479
|
let _headers, _redirects, _routes, _workerJS;
|
|
145196
145480
|
try {
|
|
145197
|
-
_headers = (0,
|
|
145481
|
+
_headers = (0, import_node_fs13.readFileSync)((0, import_node_path28.join)(directory, "_headers"), "utf-8");
|
|
145198
145482
|
} catch {
|
|
145199
145483
|
}
|
|
145200
145484
|
try {
|
|
145201
|
-
_redirects = (0,
|
|
145485
|
+
_redirects = (0, import_node_fs13.readFileSync)((0, import_node_path28.join)(directory, "_redirects"), "utf-8");
|
|
145202
145486
|
} catch {
|
|
145203
145487
|
}
|
|
145204
145488
|
try {
|
|
145205
|
-
|
|
145206
|
-
} catch {
|
|
145207
|
-
}
|
|
145208
|
-
try {
|
|
145209
|
-
_workerJS = (0, import_node_fs12.readFileSync)((0, import_node_path27.join)(directory, "_worker.js"), "utf-8");
|
|
145489
|
+
_workerJS = (0, import_node_fs13.readFileSync)((0, import_node_path28.join)(directory, "_worker.js"), "utf-8");
|
|
145210
145490
|
} catch {
|
|
145211
145491
|
}
|
|
145212
145492
|
if (_headers) {
|
|
145213
145493
|
formData.append("_headers", new import_undici9.File([_headers], "_headers"));
|
|
145494
|
+
logger.log(`\u2728 Uploading _headers`);
|
|
145214
145495
|
}
|
|
145215
145496
|
if (_redirects) {
|
|
145216
145497
|
formData.append("_redirects", new import_undici9.File([_redirects], "_redirects"));
|
|
145217
|
-
|
|
145218
|
-
if (_routes) {
|
|
145219
|
-
formData.append("_routes.json", new import_undici9.File([_routes], "_routes.json"));
|
|
145498
|
+
logger.log(`\u2728 Uploading _redirects`);
|
|
145220
145499
|
}
|
|
145221
145500
|
if (builtFunctions) {
|
|
145222
145501
|
formData.append("_worker.js", new import_undici9.File([builtFunctions], "_worker.js"));
|
|
145502
|
+
logger.log(`\u2728 Uploading Functions`);
|
|
145503
|
+
try {
|
|
145504
|
+
_routes = (0, import_node_fs13.readFileSync)(routesOutputPath, "utf-8");
|
|
145505
|
+
if (_routes) {
|
|
145506
|
+
formData.append("_routes.json", new import_undici9.File([_routes], "_routes.json"));
|
|
145507
|
+
}
|
|
145508
|
+
} catch {
|
|
145509
|
+
}
|
|
145223
145510
|
} else if (_workerJS) {
|
|
145224
145511
|
formData.append("_worker.js", new import_undici9.File([_workerJS], "_worker.js"));
|
|
145512
|
+
logger.log(`\u2728 Uploading _worker.js`);
|
|
145225
145513
|
try {
|
|
145226
|
-
const routesPath = (0,
|
|
145227
|
-
const advancedModeRoutesString = (0,
|
|
145514
|
+
const routesPath = (0, import_node_path28.join)(directory, "_routes.json");
|
|
145515
|
+
const advancedModeRoutesString = (0, import_node_fs13.readFileSync)(routesPath, "utf-8");
|
|
145228
145516
|
const advancedModeRoutes = JSON.parse(advancedModeRoutesString);
|
|
145229
145517
|
if (!isRoutesJSONSpec(advancedModeRoutes)) {
|
|
145230
145518
|
throw new FatalError(
|
|
@@ -145233,6 +145521,8 @@ To silence this warning, pass in --commit-dirty=true`
|
|
|
145233
145521
|
);
|
|
145234
145522
|
}
|
|
145235
145523
|
_routes = JSON.stringify(optimizeRoutesJSONSpec(advancedModeRoutes));
|
|
145524
|
+
formData.append("_routes.json", new import_undici9.File([_routes], "_routes.json"));
|
|
145525
|
+
logger.log(`\u2728 Uploading _routes.json`);
|
|
145236
145526
|
logger.warn(
|
|
145237
145527
|
`\u{1F6A8} _routes.json is an experimental feature and is subject to change. Don't use unless you really must!`
|
|
145238
145528
|
);
|
|
@@ -145277,14 +145567,17 @@ var pages = (yargs) => {
|
|
|
145277
145567
|
).command(
|
|
145278
145568
|
"functions",
|
|
145279
145569
|
false,
|
|
145280
|
-
(yargs2) =>
|
|
145281
|
-
|
|
145282
|
-
|
|
145283
|
-
|
|
145284
|
-
|
|
145285
|
-
|
|
145286
|
-
|
|
145287
|
-
|
|
145570
|
+
(yargs2) => yargs2.command(
|
|
145571
|
+
"build [directory]",
|
|
145572
|
+
"Compile a folder of Cloudflare Pages Functions into a single Worker",
|
|
145573
|
+
Options,
|
|
145574
|
+
Handler
|
|
145575
|
+
).command(
|
|
145576
|
+
"optimize-routes [routesPath] [outputRoutesPath]",
|
|
145577
|
+
"Consolidate and optimize the route paths declared in _routes.json",
|
|
145578
|
+
OptimizeRoutesOptions,
|
|
145579
|
+
OptimizeRoutesHandler
|
|
145580
|
+
)
|
|
145288
145581
|
).command(
|
|
145289
145582
|
"project",
|
|
145290
145583
|
"\u26A1\uFE0F Interact with your Pages projects",
|
|
@@ -145349,8 +145642,8 @@ function previewHandler() {
|
|
|
145349
145642
|
// src/publish.ts
|
|
145350
145643
|
init_import_meta_url();
|
|
145351
145644
|
var import_node_assert9 = __toESM(require("node:assert"));
|
|
145352
|
-
var
|
|
145353
|
-
var
|
|
145645
|
+
var import_node_fs14 = require("node:fs");
|
|
145646
|
+
var import_node_path29 = __toESM(require("node:path"));
|
|
145354
145647
|
var import_node_url11 = require("node:url");
|
|
145355
145648
|
var import_tmp_promise3 = __toESM(require_tmp_promise());
|
|
145356
145649
|
|
|
@@ -145582,9 +145875,9 @@ See https://developers.cloudflare.com/workers/platform/compatibility-dates for m
|
|
|
145582
145875
|
"A [site] definition requires a `bucket` field with a path to the site's assets directory."
|
|
145583
145876
|
);
|
|
145584
145877
|
if (props.outDir) {
|
|
145585
|
-
(0,
|
|
145586
|
-
const readmePath =
|
|
145587
|
-
(0,
|
|
145878
|
+
(0, import_node_fs14.mkdirSync)(props.outDir, { recursive: true });
|
|
145879
|
+
const readmePath = import_node_path29.default.join(props.outDir, "README.md");
|
|
145880
|
+
(0, import_node_fs14.writeFileSync)(
|
|
145588
145881
|
readmePath,
|
|
145589
145882
|
`This folder contains the built output assets for the worker "${scriptName}" generated at ${new Date().toISOString()}.`
|
|
145590
145883
|
);
|
|
@@ -145620,10 +145913,10 @@ See https://developers.cloudflare.com/workers/platform/compatibility-dates for m
|
|
|
145620
145913
|
try {
|
|
145621
145914
|
if (props.noBundle) {
|
|
145622
145915
|
const destinationDir = typeof destination === "string" ? destination : destination.path;
|
|
145623
|
-
(0,
|
|
145624
|
-
(0,
|
|
145625
|
-
|
|
145626
|
-
(0,
|
|
145916
|
+
(0, import_node_fs14.mkdirSync)(destinationDir, { recursive: true });
|
|
145917
|
+
(0, import_node_fs14.writeFileSync)(
|
|
145918
|
+
import_node_path29.default.join(destinationDir, import_node_path29.default.basename(props.entry.file)),
|
|
145919
|
+
(0, import_node_fs14.readFileSync)(props.entry.file, "utf-8")
|
|
145627
145920
|
);
|
|
145628
145921
|
}
|
|
145629
145922
|
const {
|
|
@@ -145657,7 +145950,7 @@ See https://developers.cloudflare.com/workers/platform/compatibility-dates for m
|
|
|
145657
145950
|
firstPartyWorkerDevFacade: false
|
|
145658
145951
|
}
|
|
145659
145952
|
);
|
|
145660
|
-
const content = (0,
|
|
145953
|
+
const content = (0, import_node_fs14.readFileSync)(resolvedEntryPointPath, {
|
|
145661
145954
|
encoding: "utf-8"
|
|
145662
145955
|
});
|
|
145663
145956
|
const migrations = !props.dryRun ? await getMigrationsToUpload(scriptName, {
|
|
@@ -145703,7 +145996,7 @@ See https://developers.cloudflare.com/workers/platform/compatibility-dates for m
|
|
|
145703
145996
|
const worker = {
|
|
145704
145997
|
name: scriptName,
|
|
145705
145998
|
main: {
|
|
145706
|
-
name:
|
|
145999
|
+
name: import_node_path29.default.basename(resolvedEntryPointPath),
|
|
145707
146000
|
content,
|
|
145708
146001
|
type: bundleType
|
|
145709
146002
|
},
|
|
@@ -145715,7 +146008,7 @@ See https://developers.cloudflare.com/workers/platform/compatibility-dates for m
|
|
|
145715
146008
|
usage_model: config.usage_model
|
|
145716
146009
|
};
|
|
145717
146010
|
void printBundleSize(
|
|
145718
|
-
{ name:
|
|
146011
|
+
{ name: import_node_path29.default.basename(resolvedEntryPointPath), content },
|
|
145719
146012
|
modules
|
|
145720
146013
|
);
|
|
145721
146014
|
const withoutStaticAssets = {
|
|
@@ -146679,6 +146972,7 @@ function parseOutcome(statuses) {
|
|
|
146679
146972
|
case "error":
|
|
146680
146973
|
outcomes.add("exception");
|
|
146681
146974
|
outcomes.add("exceededCpu");
|
|
146975
|
+
outcomes.add("exceededMemory");
|
|
146682
146976
|
outcomes.add("unknown");
|
|
146683
146977
|
break;
|
|
146684
146978
|
default:
|
|
@@ -146769,6 +147063,8 @@ function prettifyOutcome(outcome) {
|
|
|
146769
147063
|
return "Canceled";
|
|
146770
147064
|
case "exceededCpu":
|
|
146771
147065
|
return "Exceeded CPU Limit";
|
|
147066
|
+
case "exceededMemory":
|
|
147067
|
+
return "Exceeded Memory Limit";
|
|
146772
147068
|
case "exception":
|
|
146773
147069
|
return "Exception Thrown";
|
|
146774
147070
|
case "unknown":
|
|
@@ -147364,7 +147660,7 @@ function createCLIParser(argv) {
|
|
|
147364
147660
|
},
|
|
147365
147661
|
async (args) => {
|
|
147366
147662
|
await printWranglerBanner();
|
|
147367
|
-
const configPath = args.config || args.script && findWranglerToml(
|
|
147663
|
+
const configPath = args.config || args.script && findWranglerToml(import_node_path30.default.dirname(args.script));
|
|
147368
147664
|
const config = readConfig(configPath, args);
|
|
147369
147665
|
const entry = await getEntry(args, config, "publish");
|
|
147370
147666
|
await sendMetricsEvent(
|
|
@@ -148851,7 +149147,7 @@ async function startDev(args) {
|
|
|
148851
149147
|
logger.loggerLevel = args.logLevel === "none" ? "error" : args.logLevel;
|
|
148852
149148
|
}
|
|
148853
149149
|
await printWranglerBanner();
|
|
148854
|
-
const configPath = args.config || args.script && findWranglerToml(
|
|
149150
|
+
const configPath = args.config || args.script && findWranglerToml(import_node_path31.default.dirname(args.script));
|
|
148855
149151
|
let config = readConfig(configPath, args);
|
|
148856
149152
|
if (config.configPath) {
|
|
148857
149153
|
watcher = (0, import_chokidar4.watch)(config.configPath, {
|
|
@@ -148859,7 +149155,7 @@ async function startDev(args) {
|
|
|
148859
149155
|
}).on("change", async (_event) => {
|
|
148860
149156
|
config = readConfig(configPath, args);
|
|
148861
149157
|
if (config.configPath) {
|
|
148862
|
-
logger.log(`${
|
|
149158
|
+
logger.log(`${import_node_path31.default.basename(config.configPath)} changed...`);
|
|
148863
149159
|
rerender(await getDevReactElement(config));
|
|
148864
149160
|
}
|
|
148865
149161
|
});
|
|
@@ -149000,9 +149296,9 @@ async function startDev(args) {
|
|
|
149000
149296
|
isWorkersSite: Boolean(args.site || config.site),
|
|
149001
149297
|
compatibilityDate: getDevCompatibilityDate(
|
|
149002
149298
|
config,
|
|
149003
|
-
args
|
|
149299
|
+
args.compatibilityDate
|
|
149004
149300
|
),
|
|
149005
|
-
compatibilityFlags: args
|
|
149301
|
+
compatibilityFlags: args.compatibilityFlags || config.compatibility_flags,
|
|
149006
149302
|
usageModel: config.usage_model,
|
|
149007
149303
|
bindings,
|
|
149008
149304
|
crons: config.triggers.crons,
|