wrangler 2.0.0 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Cloudflare_CA.pem +18 -0
- package/README.md +3 -1
- package/bin/wrangler.js +21 -1
- package/package.json +6 -4
- package/pages/functions/buildWorker.ts +1 -1
- package/pages/functions/template-plugin.ts +3 -2
- package/src/__tests__/configuration.test.ts +1 -1
- package/src/__tests__/dev.test.tsx +77 -10
- package/src/__tests__/index.test.ts +51 -58
- package/src/__tests__/jest.setup.ts +8 -0
- package/src/__tests__/kv.test.ts +69 -48
- package/src/__tests__/pages.test.ts +12 -14
- package/src/__tests__/parse.test.ts +4 -0
- package/src/__tests__/publish.test.ts +127 -6
- package/src/__tests__/r2.test.ts +12 -16
- package/src/bundle.ts +1 -1
- package/src/config/config.ts +1 -1
- package/src/config/validation.ts +1 -1
- package/src/dev/dev.tsx +5 -2
- package/src/entry.ts +64 -9
- package/src/index.tsx +55 -21
- package/src/kv.ts +3 -1
- package/src/pages.tsx +61 -45
- package/src/parse.ts +3 -1
- package/src/proxy.ts +4 -9
- package/src/user.tsx +11 -1
- package/wrangler-dist/cli.js +1015 -784
package/wrangler-dist/cli.js
CHANGED
|
@@ -33,7 +33,7 @@ var require_main = __commonJS({
|
|
|
33
33
|
"node_modules/dotenv/lib/main.js"(exports2, module2) {
|
|
34
34
|
init_import_meta_url();
|
|
35
35
|
var fs9 = require("fs");
|
|
36
|
-
var
|
|
36
|
+
var path22 = require("path");
|
|
37
37
|
var os5 = require("os");
|
|
38
38
|
var LINE = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;
|
|
39
39
|
function parse(src) {
|
|
@@ -59,10 +59,10 @@ var require_main = __commonJS({
|
|
|
59
59
|
console.log(`[dotenv][DEBUG] ${message}`);
|
|
60
60
|
}
|
|
61
61
|
function _resolveHome(envPath) {
|
|
62
|
-
return envPath[0] === "~" ?
|
|
62
|
+
return envPath[0] === "~" ? path22.join(os5.homedir(), envPath.slice(1)) : envPath;
|
|
63
63
|
}
|
|
64
64
|
function config(options) {
|
|
65
|
-
let dotenvPath =
|
|
65
|
+
let dotenvPath = path22.resolve(process.cwd(), ".env");
|
|
66
66
|
let encoding = "utf8";
|
|
67
67
|
const debug = Boolean(options && options.debug);
|
|
68
68
|
const override = Boolean(options && options.override);
|
|
@@ -3122,15 +3122,15 @@ var require_route = __commonJS({
|
|
|
3122
3122
|
};
|
|
3123
3123
|
}
|
|
3124
3124
|
function wrapConversion(toModel, graph) {
|
|
3125
|
-
var
|
|
3125
|
+
var path22 = [graph[toModel].parent, toModel];
|
|
3126
3126
|
var fn = conversions[graph[toModel].parent][toModel];
|
|
3127
3127
|
var cur = graph[toModel].parent;
|
|
3128
3128
|
while (graph[cur].parent) {
|
|
3129
|
-
|
|
3129
|
+
path22.unshift(graph[cur].parent);
|
|
3130
3130
|
fn = link(conversions[graph[cur].parent][cur], fn);
|
|
3131
3131
|
cur = graph[cur].parent;
|
|
3132
3132
|
}
|
|
3133
|
-
fn.conversion =
|
|
3133
|
+
fn.conversion = path22;
|
|
3134
3134
|
return fn;
|
|
3135
3135
|
}
|
|
3136
3136
|
module2.exports = function(fromModel) {
|
|
@@ -3749,7 +3749,7 @@ var require_windows = __commonJS({
|
|
|
3749
3749
|
module2.exports = isexe;
|
|
3750
3750
|
isexe.sync = sync;
|
|
3751
3751
|
var fs9 = require("fs");
|
|
3752
|
-
function checkPathExt(
|
|
3752
|
+
function checkPathExt(path22, options) {
|
|
3753
3753
|
var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
|
|
3754
3754
|
if (!pathext) {
|
|
3755
3755
|
return true;
|
|
@@ -3760,25 +3760,25 @@ var require_windows = __commonJS({
|
|
|
3760
3760
|
}
|
|
3761
3761
|
for (var i2 = 0; i2 < pathext.length; i2++) {
|
|
3762
3762
|
var p = pathext[i2].toLowerCase();
|
|
3763
|
-
if (p &&
|
|
3763
|
+
if (p && path22.substr(-p.length).toLowerCase() === p) {
|
|
3764
3764
|
return true;
|
|
3765
3765
|
}
|
|
3766
3766
|
}
|
|
3767
3767
|
return false;
|
|
3768
3768
|
}
|
|
3769
|
-
function checkStat(stat3,
|
|
3769
|
+
function checkStat(stat3, path22, options) {
|
|
3770
3770
|
if (!stat3.isSymbolicLink() && !stat3.isFile()) {
|
|
3771
3771
|
return false;
|
|
3772
3772
|
}
|
|
3773
|
-
return checkPathExt(
|
|
3773
|
+
return checkPathExt(path22, options);
|
|
3774
3774
|
}
|
|
3775
|
-
function isexe(
|
|
3776
|
-
fs9.stat(
|
|
3777
|
-
cb2(er, er ? false : checkStat(stat3,
|
|
3775
|
+
function isexe(path22, options, cb2) {
|
|
3776
|
+
fs9.stat(path22, function(er, stat3) {
|
|
3777
|
+
cb2(er, er ? false : checkStat(stat3, path22, options));
|
|
3778
3778
|
});
|
|
3779
3779
|
}
|
|
3780
|
-
function sync(
|
|
3781
|
-
return checkStat(fs9.statSync(
|
|
3780
|
+
function sync(path22, options) {
|
|
3781
|
+
return checkStat(fs9.statSync(path22), path22, options);
|
|
3782
3782
|
}
|
|
3783
3783
|
}
|
|
3784
3784
|
});
|
|
@@ -3790,13 +3790,13 @@ var require_mode = __commonJS({
|
|
|
3790
3790
|
module2.exports = isexe;
|
|
3791
3791
|
isexe.sync = sync;
|
|
3792
3792
|
var fs9 = require("fs");
|
|
3793
|
-
function isexe(
|
|
3794
|
-
fs9.stat(
|
|
3793
|
+
function isexe(path22, options, cb2) {
|
|
3794
|
+
fs9.stat(path22, function(er, stat3) {
|
|
3795
3795
|
cb2(er, er ? false : checkStat(stat3, options));
|
|
3796
3796
|
});
|
|
3797
3797
|
}
|
|
3798
|
-
function sync(
|
|
3799
|
-
return checkStat(fs9.statSync(
|
|
3798
|
+
function sync(path22, options) {
|
|
3799
|
+
return checkStat(fs9.statSync(path22), options);
|
|
3800
3800
|
}
|
|
3801
3801
|
function checkStat(stat3, options) {
|
|
3802
3802
|
return stat3.isFile() && checkMode(stat3, options);
|
|
@@ -3830,7 +3830,7 @@ var require_isexe = __commonJS({
|
|
|
3830
3830
|
}
|
|
3831
3831
|
module2.exports = isexe;
|
|
3832
3832
|
isexe.sync = sync;
|
|
3833
|
-
function isexe(
|
|
3833
|
+
function isexe(path22, options, cb2) {
|
|
3834
3834
|
if (typeof options === "function") {
|
|
3835
3835
|
cb2 = options;
|
|
3836
3836
|
options = {};
|
|
@@ -3840,7 +3840,7 @@ var require_isexe = __commonJS({
|
|
|
3840
3840
|
throw new TypeError("callback not provided");
|
|
3841
3841
|
}
|
|
3842
3842
|
return new Promise(function(resolve11, reject) {
|
|
3843
|
-
isexe(
|
|
3843
|
+
isexe(path22, options || {}, function(er, is) {
|
|
3844
3844
|
if (er) {
|
|
3845
3845
|
reject(er);
|
|
3846
3846
|
} else {
|
|
@@ -3849,7 +3849,7 @@ var require_isexe = __commonJS({
|
|
|
3849
3849
|
});
|
|
3850
3850
|
});
|
|
3851
3851
|
}
|
|
3852
|
-
core(
|
|
3852
|
+
core(path22, options || {}, function(er, is) {
|
|
3853
3853
|
if (er) {
|
|
3854
3854
|
if (er.code === "EACCES" || options && options.ignoreErrors) {
|
|
3855
3855
|
er = null;
|
|
@@ -3859,9 +3859,9 @@ var require_isexe = __commonJS({
|
|
|
3859
3859
|
cb2(er, is);
|
|
3860
3860
|
});
|
|
3861
3861
|
}
|
|
3862
|
-
function sync(
|
|
3862
|
+
function sync(path22, options) {
|
|
3863
3863
|
try {
|
|
3864
|
-
return core.sync(
|
|
3864
|
+
return core.sync(path22, options || {});
|
|
3865
3865
|
} catch (er) {
|
|
3866
3866
|
if (options && options.ignoreErrors || er.code === "EACCES") {
|
|
3867
3867
|
return false;
|
|
@@ -3878,7 +3878,7 @@ var require_which = __commonJS({
|
|
|
3878
3878
|
"../../node_modules/which/which.js"(exports2, module2) {
|
|
3879
3879
|
init_import_meta_url();
|
|
3880
3880
|
var isWindows2 = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
|
|
3881
|
-
var
|
|
3881
|
+
var path22 = require("path");
|
|
3882
3882
|
var COLON = isWindows2 ? ";" : ":";
|
|
3883
3883
|
var isexe = require_isexe();
|
|
3884
3884
|
var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
@@ -3914,7 +3914,7 @@ var require_which = __commonJS({
|
|
|
3914
3914
|
return opt.all && found.length ? resolve11(found) : reject(getNotFoundError(cmd));
|
|
3915
3915
|
const ppRaw = pathEnv[i2];
|
|
3916
3916
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
3917
|
-
const pCmd =
|
|
3917
|
+
const pCmd = path22.join(pathPart, cmd);
|
|
3918
3918
|
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
3919
3919
|
resolve11(subStep(p, i2, 0));
|
|
3920
3920
|
});
|
|
@@ -3941,7 +3941,7 @@ var require_which = __commonJS({
|
|
|
3941
3941
|
for (let i2 = 0; i2 < pathEnv.length; i2++) {
|
|
3942
3942
|
const ppRaw = pathEnv[i2];
|
|
3943
3943
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
3944
|
-
const pCmd =
|
|
3944
|
+
const pCmd = path22.join(pathPart, cmd);
|
|
3945
3945
|
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
3946
3946
|
for (let j = 0; j < pathExt.length; j++) {
|
|
3947
3947
|
const cur = p + pathExt[j];
|
|
@@ -3991,7 +3991,7 @@ var require_resolveCommand = __commonJS({
|
|
|
3991
3991
|
"../../node_modules/cross-spawn/lib/util/resolveCommand.js"(exports2, module2) {
|
|
3992
3992
|
"use strict";
|
|
3993
3993
|
init_import_meta_url();
|
|
3994
|
-
var
|
|
3994
|
+
var path22 = require("path");
|
|
3995
3995
|
var which = require_which();
|
|
3996
3996
|
var getPathKey = require_path_key();
|
|
3997
3997
|
function resolveCommandAttempt(parsed, withoutPathExt) {
|
|
@@ -4009,7 +4009,7 @@ var require_resolveCommand = __commonJS({
|
|
|
4009
4009
|
try {
|
|
4010
4010
|
resolved = which.sync(parsed.command, {
|
|
4011
4011
|
path: env4[getPathKey({ env: env4 })],
|
|
4012
|
-
pathExt: withoutPathExt ?
|
|
4012
|
+
pathExt: withoutPathExt ? path22.delimiter : void 0
|
|
4013
4013
|
});
|
|
4014
4014
|
} catch (e2) {
|
|
4015
4015
|
} finally {
|
|
@@ -4018,7 +4018,7 @@ var require_resolveCommand = __commonJS({
|
|
|
4018
4018
|
}
|
|
4019
4019
|
}
|
|
4020
4020
|
if (resolved) {
|
|
4021
|
-
resolved =
|
|
4021
|
+
resolved = path22.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
|
|
4022
4022
|
}
|
|
4023
4023
|
return resolved;
|
|
4024
4024
|
}
|
|
@@ -4075,8 +4075,8 @@ var require_shebang_command = __commonJS({
|
|
|
4075
4075
|
if (!match) {
|
|
4076
4076
|
return null;
|
|
4077
4077
|
}
|
|
4078
|
-
const [
|
|
4079
|
-
const binary =
|
|
4078
|
+
const [path22, argument] = match[0].replace(/#! ?/, "").split(" ");
|
|
4079
|
+
const binary = path22.split("/").pop();
|
|
4080
4080
|
if (binary === "env") {
|
|
4081
4081
|
return argument;
|
|
4082
4082
|
}
|
|
@@ -4113,7 +4113,7 @@ var require_parse2 = __commonJS({
|
|
|
4113
4113
|
"../../node_modules/cross-spawn/lib/parse.js"(exports2, module2) {
|
|
4114
4114
|
"use strict";
|
|
4115
4115
|
init_import_meta_url();
|
|
4116
|
-
var
|
|
4116
|
+
var path22 = require("path");
|
|
4117
4117
|
var resolveCommand = require_resolveCommand();
|
|
4118
4118
|
var escape = require_escape();
|
|
4119
4119
|
var readShebang = require_readShebang();
|
|
@@ -4138,7 +4138,7 @@ var require_parse2 = __commonJS({
|
|
|
4138
4138
|
const needsShell = !isExecutableRegExp.test(commandFile);
|
|
4139
4139
|
if (parsed.options.forceShell || needsShell) {
|
|
4140
4140
|
const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
|
|
4141
|
-
parsed.command =
|
|
4141
|
+
parsed.command = path22.normalize(parsed.command);
|
|
4142
4142
|
parsed.command = escape.command(parsed.command);
|
|
4143
4143
|
parsed.args = parsed.args.map((arg2) => escape.argument(arg2, needsDoubleEscapeMetaChars));
|
|
4144
4144
|
const shellCommand = [parsed.command].concat(parsed.args).join(" ");
|
|
@@ -6241,11 +6241,11 @@ var require_lodash = __commonJS({
|
|
|
6241
6241
|
return isFunction2(object[key2]);
|
|
6242
6242
|
});
|
|
6243
6243
|
}
|
|
6244
|
-
function baseGet(object,
|
|
6245
|
-
|
|
6246
|
-
var index = 0, length =
|
|
6244
|
+
function baseGet(object, path22) {
|
|
6245
|
+
path22 = castPath(path22, object);
|
|
6246
|
+
var index = 0, length = path22.length;
|
|
6247
6247
|
while (object != null && index < length) {
|
|
6248
|
-
object = object[toKey(
|
|
6248
|
+
object = object[toKey(path22[index++])];
|
|
6249
6249
|
}
|
|
6250
6250
|
return index && index == length ? object : undefined2;
|
|
6251
6251
|
}
|
|
@@ -6309,10 +6309,10 @@ var require_lodash = __commonJS({
|
|
|
6309
6309
|
});
|
|
6310
6310
|
return accumulator;
|
|
6311
6311
|
}
|
|
6312
|
-
function baseInvoke(object,
|
|
6313
|
-
|
|
6314
|
-
object = parent(object,
|
|
6315
|
-
var func2 = object == null ? object : object[toKey(last(
|
|
6312
|
+
function baseInvoke(object, path22, args) {
|
|
6313
|
+
path22 = castPath(path22, object);
|
|
6314
|
+
object = parent(object, path22);
|
|
6315
|
+
var func2 = object == null ? object : object[toKey(last(path22))];
|
|
6316
6316
|
return func2 == null ? undefined2 : apply(func2, object, args);
|
|
6317
6317
|
}
|
|
6318
6318
|
function baseIsArguments(value) {
|
|
@@ -6468,13 +6468,13 @@ var require_lodash = __commonJS({
|
|
|
6468
6468
|
return object === source || baseIsMatch(object, source, matchData);
|
|
6469
6469
|
};
|
|
6470
6470
|
}
|
|
6471
|
-
function baseMatchesProperty(
|
|
6472
|
-
if (isKey(
|
|
6473
|
-
return matchesStrictComparable(toKey(
|
|
6471
|
+
function baseMatchesProperty(path22, srcValue) {
|
|
6472
|
+
if (isKey(path22) && isStrictComparable(srcValue)) {
|
|
6473
|
+
return matchesStrictComparable(toKey(path22), srcValue);
|
|
6474
6474
|
}
|
|
6475
6475
|
return function(object) {
|
|
6476
|
-
var objValue = get(object,
|
|
6477
|
-
return objValue === undefined2 && objValue === srcValue ? hasIn(object,
|
|
6476
|
+
var objValue = get(object, path22);
|
|
6477
|
+
return objValue === undefined2 && objValue === srcValue ? hasIn(object, path22) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
|
|
6478
6478
|
};
|
|
6479
6479
|
}
|
|
6480
6480
|
function baseMerge(object, source, srcIndex, customizer, stack) {
|
|
@@ -6571,23 +6571,23 @@ var require_lodash = __commonJS({
|
|
|
6571
6571
|
});
|
|
6572
6572
|
}
|
|
6573
6573
|
function basePick(object, paths) {
|
|
6574
|
-
return basePickBy(object, paths, function(value,
|
|
6575
|
-
return hasIn(object,
|
|
6574
|
+
return basePickBy(object, paths, function(value, path22) {
|
|
6575
|
+
return hasIn(object, path22);
|
|
6576
6576
|
});
|
|
6577
6577
|
}
|
|
6578
6578
|
function basePickBy(object, paths, predicate) {
|
|
6579
6579
|
var index = -1, length = paths.length, result2 = {};
|
|
6580
6580
|
while (++index < length) {
|
|
6581
|
-
var
|
|
6582
|
-
if (predicate(value,
|
|
6583
|
-
baseSet(result2, castPath(
|
|
6581
|
+
var path22 = paths[index], value = baseGet(object, path22);
|
|
6582
|
+
if (predicate(value, path22)) {
|
|
6583
|
+
baseSet(result2, castPath(path22, object), value);
|
|
6584
6584
|
}
|
|
6585
6585
|
}
|
|
6586
6586
|
return result2;
|
|
6587
6587
|
}
|
|
6588
|
-
function basePropertyDeep(
|
|
6588
|
+
function basePropertyDeep(path22) {
|
|
6589
6589
|
return function(object) {
|
|
6590
|
-
return baseGet(object,
|
|
6590
|
+
return baseGet(object, path22);
|
|
6591
6591
|
};
|
|
6592
6592
|
}
|
|
6593
6593
|
function basePullAll(array, values2, iteratee2, comparator) {
|
|
@@ -6661,14 +6661,14 @@ var require_lodash = __commonJS({
|
|
|
6661
6661
|
var array = values(collection);
|
|
6662
6662
|
return shuffleSelf(array, baseClamp(n, 0, array.length));
|
|
6663
6663
|
}
|
|
6664
|
-
function baseSet(object,
|
|
6664
|
+
function baseSet(object, path22, value, customizer) {
|
|
6665
6665
|
if (!isObject(object)) {
|
|
6666
6666
|
return object;
|
|
6667
6667
|
}
|
|
6668
|
-
|
|
6669
|
-
var index = -1, length =
|
|
6668
|
+
path22 = castPath(path22, object);
|
|
6669
|
+
var index = -1, length = path22.length, lastIndex = length - 1, nested = object;
|
|
6670
6670
|
while (nested != null && ++index < length) {
|
|
6671
|
-
var key2 = toKey(
|
|
6671
|
+
var key2 = toKey(path22[index]), newValue = value;
|
|
6672
6672
|
if (key2 === "__proto__" || key2 === "constructor" || key2 === "prototype") {
|
|
6673
6673
|
return object;
|
|
6674
6674
|
}
|
|
@@ -6676,7 +6676,7 @@ var require_lodash = __commonJS({
|
|
|
6676
6676
|
var objValue = nested[key2];
|
|
6677
6677
|
newValue = customizer ? customizer(objValue, key2, nested) : undefined2;
|
|
6678
6678
|
if (newValue === undefined2) {
|
|
6679
|
-
newValue = isObject(objValue) ? objValue : isIndex(
|
|
6679
|
+
newValue = isObject(objValue) ? objValue : isIndex(path22[index + 1]) ? [] : {};
|
|
6680
6680
|
}
|
|
6681
6681
|
}
|
|
6682
6682
|
assignValue(nested, key2, newValue);
|
|
@@ -6842,13 +6842,13 @@ var require_lodash = __commonJS({
|
|
|
6842
6842
|
}
|
|
6843
6843
|
return result2;
|
|
6844
6844
|
}
|
|
6845
|
-
function baseUnset(object,
|
|
6846
|
-
|
|
6847
|
-
object = parent(object,
|
|
6848
|
-
return object == null || delete object[toKey(last(
|
|
6845
|
+
function baseUnset(object, path22) {
|
|
6846
|
+
path22 = castPath(path22, object);
|
|
6847
|
+
object = parent(object, path22);
|
|
6848
|
+
return object == null || delete object[toKey(last(path22))];
|
|
6849
6849
|
}
|
|
6850
|
-
function baseUpdate(object,
|
|
6851
|
-
return baseSet(object,
|
|
6850
|
+
function baseUpdate(object, path22, updater, customizer) {
|
|
6851
|
+
return baseSet(object, path22, updater(baseGet(object, path22)), customizer);
|
|
6852
6852
|
}
|
|
6853
6853
|
function baseWhile(array, predicate, isDrop, fromRight) {
|
|
6854
6854
|
var length = array.length, index = fromRight ? length : -1;
|
|
@@ -7709,11 +7709,11 @@ var require_lodash = __commonJS({
|
|
|
7709
7709
|
var match = source.match(reWrapDetails);
|
|
7710
7710
|
return match ? match[1].split(reSplitDetails) : [];
|
|
7711
7711
|
}
|
|
7712
|
-
function hasPath(object,
|
|
7713
|
-
|
|
7714
|
-
var index = -1, length =
|
|
7712
|
+
function hasPath(object, path22, hasFunc) {
|
|
7713
|
+
path22 = castPath(path22, object);
|
|
7714
|
+
var index = -1, length = path22.length, result2 = false;
|
|
7715
7715
|
while (++index < length) {
|
|
7716
|
-
var key2 = toKey(
|
|
7716
|
+
var key2 = toKey(path22[index]);
|
|
7717
7717
|
if (!(result2 = object != null && hasFunc(object, key2))) {
|
|
7718
7718
|
break;
|
|
7719
7719
|
}
|
|
@@ -7915,8 +7915,8 @@ var require_lodash = __commonJS({
|
|
|
7915
7915
|
return apply(func2, this, otherArgs);
|
|
7916
7916
|
};
|
|
7917
7917
|
}
|
|
7918
|
-
function parent(object,
|
|
7919
|
-
return
|
|
7918
|
+
function parent(object, path22) {
|
|
7919
|
+
return path22.length < 2 ? object : baseGet(object, baseSlice(path22, 0, -1));
|
|
7920
7920
|
}
|
|
7921
7921
|
function reorder(array, indexes) {
|
|
7922
7922
|
var arrLength = array.length, length = nativeMin(indexes.length, arrLength), oldArray = copyArray(array);
|
|
@@ -8551,10 +8551,10 @@ var require_lodash = __commonJS({
|
|
|
8551
8551
|
}
|
|
8552
8552
|
return isString2(collection) ? fromIndex <= length && collection.indexOf(value, fromIndex) > -1 : !!length && baseIndexOf(collection, value, fromIndex) > -1;
|
|
8553
8553
|
}
|
|
8554
|
-
var invokeMap = baseRest(function(collection,
|
|
8555
|
-
var index = -1, isFunc = typeof
|
|
8554
|
+
var invokeMap = baseRest(function(collection, path22, args) {
|
|
8555
|
+
var index = -1, isFunc = typeof path22 == "function", result2 = isArrayLike(collection) ? Array2(collection.length) : [];
|
|
8556
8556
|
baseEach(collection, function(value) {
|
|
8557
|
-
result2[++index] = isFunc ? apply(
|
|
8557
|
+
result2[++index] = isFunc ? apply(path22, value, args) : baseInvoke(value, path22, args);
|
|
8558
8558
|
});
|
|
8559
8559
|
return result2;
|
|
8560
8560
|
});
|
|
@@ -9206,15 +9206,15 @@ var require_lodash = __commonJS({
|
|
|
9206
9206
|
function functionsIn(object) {
|
|
9207
9207
|
return object == null ? [] : baseFunctions(object, keysIn(object));
|
|
9208
9208
|
}
|
|
9209
|
-
function get(object,
|
|
9210
|
-
var result2 = object == null ? undefined2 : baseGet(object,
|
|
9209
|
+
function get(object, path22, defaultValue) {
|
|
9210
|
+
var result2 = object == null ? undefined2 : baseGet(object, path22);
|
|
9211
9211
|
return result2 === undefined2 ? defaultValue : result2;
|
|
9212
9212
|
}
|
|
9213
|
-
function has(object,
|
|
9214
|
-
return object != null && hasPath(object,
|
|
9213
|
+
function has(object, path22) {
|
|
9214
|
+
return object != null && hasPath(object, path22, baseHas);
|
|
9215
9215
|
}
|
|
9216
|
-
function hasIn(object,
|
|
9217
|
-
return object != null && hasPath(object,
|
|
9216
|
+
function hasIn(object, path22) {
|
|
9217
|
+
return object != null && hasPath(object, path22, baseHasIn);
|
|
9218
9218
|
}
|
|
9219
9219
|
var invert = createInverter(function(result2, value, key2) {
|
|
9220
9220
|
if (value != null && typeof value.toString != "function") {
|
|
@@ -9267,10 +9267,10 @@ var require_lodash = __commonJS({
|
|
|
9267
9267
|
return result2;
|
|
9268
9268
|
}
|
|
9269
9269
|
var isDeep = false;
|
|
9270
|
-
paths = arrayMap(paths, function(
|
|
9271
|
-
|
|
9272
|
-
isDeep || (isDeep =
|
|
9273
|
-
return
|
|
9270
|
+
paths = arrayMap(paths, function(path22) {
|
|
9271
|
+
path22 = castPath(path22, object);
|
|
9272
|
+
isDeep || (isDeep = path22.length > 1);
|
|
9273
|
+
return path22;
|
|
9274
9274
|
});
|
|
9275
9275
|
copyObject(object, getAllKeysIn(object), result2);
|
|
9276
9276
|
if (isDeep) {
|
|
@@ -9296,19 +9296,19 @@ var require_lodash = __commonJS({
|
|
|
9296
9296
|
return [prop];
|
|
9297
9297
|
});
|
|
9298
9298
|
predicate = getIteratee(predicate);
|
|
9299
|
-
return basePickBy(object, props, function(value,
|
|
9300
|
-
return predicate(value,
|
|
9299
|
+
return basePickBy(object, props, function(value, path22) {
|
|
9300
|
+
return predicate(value, path22[0]);
|
|
9301
9301
|
});
|
|
9302
9302
|
}
|
|
9303
|
-
function result(object,
|
|
9304
|
-
|
|
9305
|
-
var index = -1, length =
|
|
9303
|
+
function result(object, path22, defaultValue) {
|
|
9304
|
+
path22 = castPath(path22, object);
|
|
9305
|
+
var index = -1, length = path22.length;
|
|
9306
9306
|
if (!length) {
|
|
9307
9307
|
length = 1;
|
|
9308
9308
|
object = undefined2;
|
|
9309
9309
|
}
|
|
9310
9310
|
while (++index < length) {
|
|
9311
|
-
var value = object == null ? undefined2 : object[toKey(
|
|
9311
|
+
var value = object == null ? undefined2 : object[toKey(path22[index])];
|
|
9312
9312
|
if (value === undefined2) {
|
|
9313
9313
|
index = length;
|
|
9314
9314
|
value = defaultValue;
|
|
@@ -9317,12 +9317,12 @@ var require_lodash = __commonJS({
|
|
|
9317
9317
|
}
|
|
9318
9318
|
return object;
|
|
9319
9319
|
}
|
|
9320
|
-
function set(object,
|
|
9321
|
-
return object == null ? object : baseSet(object,
|
|
9320
|
+
function set(object, path22, value) {
|
|
9321
|
+
return object == null ? object : baseSet(object, path22, value);
|
|
9322
9322
|
}
|
|
9323
|
-
function setWith(object,
|
|
9323
|
+
function setWith(object, path22, value, customizer) {
|
|
9324
9324
|
customizer = typeof customizer == "function" ? customizer : undefined2;
|
|
9325
|
-
return object == null ? object : baseSet(object,
|
|
9325
|
+
return object == null ? object : baseSet(object, path22, value, customizer);
|
|
9326
9326
|
}
|
|
9327
9327
|
var toPairs = createToPairs(keys);
|
|
9328
9328
|
var toPairsIn = createToPairs(keysIn);
|
|
@@ -9344,15 +9344,15 @@ var require_lodash = __commonJS({
|
|
|
9344
9344
|
});
|
|
9345
9345
|
return accumulator;
|
|
9346
9346
|
}
|
|
9347
|
-
function unset(object,
|
|
9348
|
-
return object == null ? true : baseUnset(object,
|
|
9347
|
+
function unset(object, path22) {
|
|
9348
|
+
return object == null ? true : baseUnset(object, path22);
|
|
9349
9349
|
}
|
|
9350
|
-
function update(object,
|
|
9351
|
-
return object == null ? object : baseUpdate(object,
|
|
9350
|
+
function update(object, path22, updater) {
|
|
9351
|
+
return object == null ? object : baseUpdate(object, path22, castFunction(updater));
|
|
9352
9352
|
}
|
|
9353
|
-
function updateWith(object,
|
|
9353
|
+
function updateWith(object, path22, updater, customizer) {
|
|
9354
9354
|
customizer = typeof customizer == "function" ? customizer : undefined2;
|
|
9355
|
-
return object == null ? object : baseUpdate(object,
|
|
9355
|
+
return object == null ? object : baseUpdate(object, path22, castFunction(updater), customizer);
|
|
9356
9356
|
}
|
|
9357
9357
|
function values(object) {
|
|
9358
9358
|
return object == null ? [] : baseValues(object, keys(object));
|
|
@@ -9730,17 +9730,17 @@ var require_lodash = __commonJS({
|
|
|
9730
9730
|
function matches(source) {
|
|
9731
9731
|
return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
|
|
9732
9732
|
}
|
|
9733
|
-
function matchesProperty(
|
|
9734
|
-
return baseMatchesProperty(
|
|
9733
|
+
function matchesProperty(path22, srcValue) {
|
|
9734
|
+
return baseMatchesProperty(path22, baseClone(srcValue, CLONE_DEEP_FLAG));
|
|
9735
9735
|
}
|
|
9736
|
-
var method = baseRest(function(
|
|
9736
|
+
var method = baseRest(function(path22, args) {
|
|
9737
9737
|
return function(object) {
|
|
9738
|
-
return baseInvoke(object,
|
|
9738
|
+
return baseInvoke(object, path22, args);
|
|
9739
9739
|
};
|
|
9740
9740
|
});
|
|
9741
9741
|
var methodOf = baseRest(function(object, args) {
|
|
9742
|
-
return function(
|
|
9743
|
-
return baseInvoke(object,
|
|
9742
|
+
return function(path22) {
|
|
9743
|
+
return baseInvoke(object, path22, args);
|
|
9744
9744
|
};
|
|
9745
9745
|
});
|
|
9746
9746
|
function mixin3(object, source, options) {
|
|
@@ -9787,12 +9787,12 @@ var require_lodash = __commonJS({
|
|
|
9787
9787
|
var over = createOver(arrayMap);
|
|
9788
9788
|
var overEvery = createOver(arrayEvery);
|
|
9789
9789
|
var overSome = createOver(arraySome);
|
|
9790
|
-
function property(
|
|
9791
|
-
return isKey(
|
|
9790
|
+
function property(path22) {
|
|
9791
|
+
return isKey(path22) ? baseProperty(toKey(path22)) : basePropertyDeep(path22);
|
|
9792
9792
|
}
|
|
9793
9793
|
function propertyOf(object) {
|
|
9794
|
-
return function(
|
|
9795
|
-
return object == null ? undefined2 : baseGet(object,
|
|
9794
|
+
return function(path22) {
|
|
9795
|
+
return object == null ? undefined2 : baseGet(object, path22);
|
|
9796
9796
|
};
|
|
9797
9797
|
}
|
|
9798
9798
|
var range = createRange();
|
|
@@ -10245,12 +10245,12 @@ var require_lodash = __commonJS({
|
|
|
10245
10245
|
LazyWrapper.prototype.findLast = function(predicate) {
|
|
10246
10246
|
return this.reverse().find(predicate);
|
|
10247
10247
|
};
|
|
10248
|
-
LazyWrapper.prototype.invokeMap = baseRest(function(
|
|
10249
|
-
if (typeof
|
|
10248
|
+
LazyWrapper.prototype.invokeMap = baseRest(function(path22, args) {
|
|
10249
|
+
if (typeof path22 == "function") {
|
|
10250
10250
|
return new LazyWrapper(this);
|
|
10251
10251
|
}
|
|
10252
10252
|
return this.map(function(value) {
|
|
10253
|
-
return baseInvoke(value,
|
|
10253
|
+
return baseInvoke(value, path22, args);
|
|
10254
10254
|
});
|
|
10255
10255
|
});
|
|
10256
10256
|
LazyWrapper.prototype.reject = function(predicate) {
|
|
@@ -44947,15 +44947,15 @@ var require_route2 = __commonJS({
|
|
|
44947
44947
|
};
|
|
44948
44948
|
}
|
|
44949
44949
|
function wrapConversion(toModel, graph) {
|
|
44950
|
-
const
|
|
44950
|
+
const path22 = [graph[toModel].parent, toModel];
|
|
44951
44951
|
let fn = conversions[graph[toModel].parent][toModel];
|
|
44952
44952
|
let cur = graph[toModel].parent;
|
|
44953
44953
|
while (graph[cur].parent) {
|
|
44954
|
-
|
|
44954
|
+
path22.unshift(graph[cur].parent);
|
|
44955
44955
|
fn = link(conversions[graph[cur].parent][cur], fn);
|
|
44956
44956
|
cur = graph[cur].parent;
|
|
44957
44957
|
}
|
|
44958
|
-
fn.conversion =
|
|
44958
|
+
fn.conversion = path22;
|
|
44959
44959
|
return fn;
|
|
44960
44960
|
}
|
|
44961
44961
|
module2.exports = function(fromModel) {
|
|
@@ -46193,15 +46193,15 @@ var require_route3 = __commonJS({
|
|
|
46193
46193
|
};
|
|
46194
46194
|
}
|
|
46195
46195
|
function wrapConversion(toModel, graph) {
|
|
46196
|
-
const
|
|
46196
|
+
const path22 = [graph[toModel].parent, toModel];
|
|
46197
46197
|
let fn = conversions[graph[toModel].parent][toModel];
|
|
46198
46198
|
let cur = graph[toModel].parent;
|
|
46199
46199
|
while (graph[cur].parent) {
|
|
46200
|
-
|
|
46200
|
+
path22.unshift(graph[cur].parent);
|
|
46201
46201
|
fn = link(conversions[graph[cur].parent][cur], fn);
|
|
46202
46202
|
cur = graph[cur].parent;
|
|
46203
46203
|
}
|
|
46204
|
-
fn.conversion =
|
|
46204
|
+
fn.conversion = path22;
|
|
46205
46205
|
return fn;
|
|
46206
46206
|
}
|
|
46207
46207
|
module2.exports = function(fromModel) {
|
|
@@ -50180,8 +50180,8 @@ var require_backend = __commonJS({
|
|
|
50180
50180
|
}
|
|
50181
50181
|
return false;
|
|
50182
50182
|
}
|
|
50183
|
-
function getInObject(object,
|
|
50184
|
-
return
|
|
50183
|
+
function getInObject(object, path22) {
|
|
50184
|
+
return path22.reduce(function(reduced, attr) {
|
|
50185
50185
|
if (reduced) {
|
|
50186
50186
|
if (hasOwnProperty.call(reduced, attr)) {
|
|
50187
50187
|
return reduced[attr];
|
|
@@ -50193,11 +50193,11 @@ var require_backend = __commonJS({
|
|
|
50193
50193
|
return null;
|
|
50194
50194
|
}, object);
|
|
50195
50195
|
}
|
|
50196
|
-
function deletePathInObject(object,
|
|
50197
|
-
var length =
|
|
50198
|
-
var last =
|
|
50196
|
+
function deletePathInObject(object, path22) {
|
|
50197
|
+
var length = path22.length;
|
|
50198
|
+
var last = path22[length - 1];
|
|
50199
50199
|
if (object != null) {
|
|
50200
|
-
var parent = getInObject(object,
|
|
50200
|
+
var parent = getInObject(object, path22.slice(0, length - 1));
|
|
50201
50201
|
if (parent) {
|
|
50202
50202
|
if (Object(_isArray__WEBPACK_IMPORTED_MODULE_7__["a"])(parent)) {
|
|
50203
50203
|
parent.splice(last, 1);
|
|
@@ -50223,11 +50223,11 @@ var require_backend = __commonJS({
|
|
|
50223
50223
|
}
|
|
50224
50224
|
}
|
|
50225
50225
|
}
|
|
50226
|
-
function setInObject(object,
|
|
50227
|
-
var length =
|
|
50228
|
-
var last =
|
|
50226
|
+
function setInObject(object, path22, value) {
|
|
50227
|
+
var length = path22.length;
|
|
50228
|
+
var last = path22[length - 1];
|
|
50229
50229
|
if (object != null) {
|
|
50230
|
-
var parent = getInObject(object,
|
|
50230
|
+
var parent = getInObject(object, path22.slice(0, length - 1));
|
|
50231
50231
|
if (parent) {
|
|
50232
50232
|
parent[last] = value;
|
|
50233
50233
|
}
|
|
@@ -50652,11 +50652,11 @@ var require_backend = __commonJS({
|
|
|
50652
50652
|
return obj;
|
|
50653
50653
|
}
|
|
50654
50654
|
function cleanForBridge(data, isPathAllowed) {
|
|
50655
|
-
var
|
|
50655
|
+
var path22 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [];
|
|
50656
50656
|
if (data !== null) {
|
|
50657
50657
|
var cleanedPaths = [];
|
|
50658
50658
|
var unserializablePaths = [];
|
|
50659
|
-
var cleanedData = Object(_hydration__WEBPACK_IMPORTED_MODULE_1__["a"])(data, cleanedPaths, unserializablePaths,
|
|
50659
|
+
var cleanedData = Object(_hydration__WEBPACK_IMPORTED_MODULE_1__["a"])(data, cleanedPaths, unserializablePaths, path22, isPathAllowed);
|
|
50660
50660
|
return {
|
|
50661
50661
|
data: cleanedData,
|
|
50662
50662
|
cleaned: cleanedPaths,
|
|
@@ -50677,18 +50677,18 @@ var require_backend = __commonJS({
|
|
|
50677
50677
|
Object(clipboard_js__WEBPACK_IMPORTED_MODULE_0__["copy"])(text);
|
|
50678
50678
|
}
|
|
50679
50679
|
}
|
|
50680
|
-
function copyWithDelete(obj,
|
|
50680
|
+
function copyWithDelete(obj, path22) {
|
|
50681
50681
|
var index = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0;
|
|
50682
|
-
var key2 =
|
|
50682
|
+
var key2 = path22[index];
|
|
50683
50683
|
var updated = Object(shared_isArray__WEBPACK_IMPORTED_MODULE_2__["a"])(obj) ? obj.slice() : _objectSpread({}, obj);
|
|
50684
|
-
if (index + 1 ===
|
|
50684
|
+
if (index + 1 === path22.length) {
|
|
50685
50685
|
if (Object(shared_isArray__WEBPACK_IMPORTED_MODULE_2__["a"])(updated)) {
|
|
50686
50686
|
updated.splice(key2, 1);
|
|
50687
50687
|
} else {
|
|
50688
50688
|
delete updated[key2];
|
|
50689
50689
|
}
|
|
50690
50690
|
} else {
|
|
50691
|
-
updated[key2] = copyWithDelete(obj[key2],
|
|
50691
|
+
updated[key2] = copyWithDelete(obj[key2], path22, index + 1);
|
|
50692
50692
|
}
|
|
50693
50693
|
return updated;
|
|
50694
50694
|
}
|
|
@@ -50709,14 +50709,14 @@ var require_backend = __commonJS({
|
|
|
50709
50709
|
}
|
|
50710
50710
|
return updated;
|
|
50711
50711
|
}
|
|
50712
|
-
function copyWithSet(obj,
|
|
50712
|
+
function copyWithSet(obj, path22, value) {
|
|
50713
50713
|
var index = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0;
|
|
50714
|
-
if (index >=
|
|
50714
|
+
if (index >= path22.length) {
|
|
50715
50715
|
return value;
|
|
50716
50716
|
}
|
|
50717
|
-
var key2 =
|
|
50717
|
+
var key2 = path22[index];
|
|
50718
50718
|
var updated = Object(shared_isArray__WEBPACK_IMPORTED_MODULE_2__["a"])(obj) ? obj.slice() : _objectSpread({}, obj);
|
|
50719
|
-
updated[key2] = copyWithSet(obj[key2],
|
|
50719
|
+
updated[key2] = copyWithSet(obj[key2], path22, value, index + 1);
|
|
50720
50720
|
return updated;
|
|
50721
50721
|
}
|
|
50722
50722
|
function getEffectDurations(root) {
|
|
@@ -52417,8 +52417,8 @@ var require_backend = __commonJS({
|
|
|
52417
52417
|
unserializable: Symbol("unserializable")
|
|
52418
52418
|
};
|
|
52419
52419
|
var LEVEL_THRESHOLD = 2;
|
|
52420
|
-
function createDehydrated(type2, inspectable, data, cleaned,
|
|
52421
|
-
cleaned.push(
|
|
52420
|
+
function createDehydrated(type2, inspectable, data, cleaned, path22) {
|
|
52421
|
+
cleaned.push(path22);
|
|
52422
52422
|
var dehydrated = {
|
|
52423
52423
|
inspectable,
|
|
52424
52424
|
type: type2,
|
|
@@ -52436,13 +52436,13 @@ var require_backend = __commonJS({
|
|
|
52436
52436
|
}
|
|
52437
52437
|
return dehydrated;
|
|
52438
52438
|
}
|
|
52439
|
-
function dehydrate(data, cleaned, unserializable,
|
|
52439
|
+
function dehydrate(data, cleaned, unserializable, path22, isPathAllowed) {
|
|
52440
52440
|
var level = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : 0;
|
|
52441
52441
|
var type2 = Object(_utils__WEBPACK_IMPORTED_MODULE_0__["d"])(data);
|
|
52442
52442
|
var isPathAllowedCheck;
|
|
52443
52443
|
switch (type2) {
|
|
52444
52444
|
case "html_element":
|
|
52445
|
-
cleaned.push(
|
|
52445
|
+
cleaned.push(path22);
|
|
52446
52446
|
return {
|
|
52447
52447
|
inspectable: false,
|
|
52448
52448
|
preview_short: Object(_utils__WEBPACK_IMPORTED_MODULE_0__["b"])(data, false),
|
|
@@ -52451,7 +52451,7 @@ var require_backend = __commonJS({
|
|
|
52451
52451
|
type: type2
|
|
52452
52452
|
};
|
|
52453
52453
|
case "function":
|
|
52454
|
-
cleaned.push(
|
|
52454
|
+
cleaned.push(path22);
|
|
52455
52455
|
return {
|
|
52456
52456
|
inspectable: false,
|
|
52457
52457
|
preview_short: Object(_utils__WEBPACK_IMPORTED_MODULE_0__["b"])(data, false),
|
|
@@ -52460,14 +52460,14 @@ var require_backend = __commonJS({
|
|
|
52460
52460
|
type: type2
|
|
52461
52461
|
};
|
|
52462
52462
|
case "string":
|
|
52463
|
-
isPathAllowedCheck = isPathAllowed(
|
|
52463
|
+
isPathAllowedCheck = isPathAllowed(path22);
|
|
52464
52464
|
if (isPathAllowedCheck) {
|
|
52465
52465
|
return data;
|
|
52466
52466
|
} else {
|
|
52467
52467
|
return data.length <= 500 ? data : data.slice(0, 500) + "...";
|
|
52468
52468
|
}
|
|
52469
52469
|
case "bigint":
|
|
52470
|
-
cleaned.push(
|
|
52470
|
+
cleaned.push(path22);
|
|
52471
52471
|
return {
|
|
52472
52472
|
inspectable: false,
|
|
52473
52473
|
preview_short: Object(_utils__WEBPACK_IMPORTED_MODULE_0__["b"])(data, false),
|
|
@@ -52476,7 +52476,7 @@ var require_backend = __commonJS({
|
|
|
52476
52476
|
type: type2
|
|
52477
52477
|
};
|
|
52478
52478
|
case "symbol":
|
|
52479
|
-
cleaned.push(
|
|
52479
|
+
cleaned.push(path22);
|
|
52480
52480
|
return {
|
|
52481
52481
|
inspectable: false,
|
|
52482
52482
|
preview_short: Object(_utils__WEBPACK_IMPORTED_MODULE_0__["b"])(data, false),
|
|
@@ -52485,7 +52485,7 @@ var require_backend = __commonJS({
|
|
|
52485
52485
|
type: type2
|
|
52486
52486
|
};
|
|
52487
52487
|
case "react_element":
|
|
52488
|
-
cleaned.push(
|
|
52488
|
+
cleaned.push(path22);
|
|
52489
52489
|
return {
|
|
52490
52490
|
inspectable: false,
|
|
52491
52491
|
preview_short: Object(_utils__WEBPACK_IMPORTED_MODULE_0__["b"])(data, false),
|
|
@@ -52495,7 +52495,7 @@ var require_backend = __commonJS({
|
|
|
52495
52495
|
};
|
|
52496
52496
|
case "array_buffer":
|
|
52497
52497
|
case "data_view":
|
|
52498
|
-
cleaned.push(
|
|
52498
|
+
cleaned.push(path22);
|
|
52499
52499
|
return {
|
|
52500
52500
|
inspectable: false,
|
|
52501
52501
|
preview_short: Object(_utils__WEBPACK_IMPORTED_MODULE_0__["b"])(data, false),
|
|
@@ -52505,19 +52505,19 @@ var require_backend = __commonJS({
|
|
|
52505
52505
|
type: type2
|
|
52506
52506
|
};
|
|
52507
52507
|
case "array":
|
|
52508
|
-
isPathAllowedCheck = isPathAllowed(
|
|
52508
|
+
isPathAllowedCheck = isPathAllowed(path22);
|
|
52509
52509
|
if (level >= LEVEL_THRESHOLD && !isPathAllowedCheck) {
|
|
52510
|
-
return createDehydrated(type2, true, data, cleaned,
|
|
52510
|
+
return createDehydrated(type2, true, data, cleaned, path22);
|
|
52511
52511
|
}
|
|
52512
52512
|
return data.map(function(item, i2) {
|
|
52513
|
-
return dehydrate(item, cleaned, unserializable,
|
|
52513
|
+
return dehydrate(item, cleaned, unserializable, path22.concat([i2]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
|
|
52514
52514
|
});
|
|
52515
52515
|
case "html_all_collection":
|
|
52516
52516
|
case "typed_array":
|
|
52517
52517
|
case "iterator":
|
|
52518
|
-
isPathAllowedCheck = isPathAllowed(
|
|
52518
|
+
isPathAllowedCheck = isPathAllowed(path22);
|
|
52519
52519
|
if (level >= LEVEL_THRESHOLD && !isPathAllowedCheck) {
|
|
52520
|
-
return createDehydrated(type2, true, data, cleaned,
|
|
52520
|
+
return createDehydrated(type2, true, data, cleaned, path22);
|
|
52521
52521
|
} else {
|
|
52522
52522
|
var unserializableValue = {
|
|
52523
52523
|
unserializable: true,
|
|
@@ -52529,13 +52529,13 @@ var require_backend = __commonJS({
|
|
|
52529
52529
|
name: !data.constructor || data.constructor.name === "Object" ? "" : data.constructor.name
|
|
52530
52530
|
};
|
|
52531
52531
|
Array.from(data).forEach(function(item, i2) {
|
|
52532
|
-
return unserializableValue[i2] = dehydrate(item, cleaned, unserializable,
|
|
52532
|
+
return unserializableValue[i2] = dehydrate(item, cleaned, unserializable, path22.concat([i2]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
|
|
52533
52533
|
});
|
|
52534
|
-
unserializable.push(
|
|
52534
|
+
unserializable.push(path22);
|
|
52535
52535
|
return unserializableValue;
|
|
52536
52536
|
}
|
|
52537
52537
|
case "opaque_iterator":
|
|
52538
|
-
cleaned.push(
|
|
52538
|
+
cleaned.push(path22);
|
|
52539
52539
|
return {
|
|
52540
52540
|
inspectable: false,
|
|
52541
52541
|
preview_short: Object(_utils__WEBPACK_IMPORTED_MODULE_0__["b"])(data, false),
|
|
@@ -52544,7 +52544,7 @@ var require_backend = __commonJS({
|
|
|
52544
52544
|
type: type2
|
|
52545
52545
|
};
|
|
52546
52546
|
case "date":
|
|
52547
|
-
cleaned.push(
|
|
52547
|
+
cleaned.push(path22);
|
|
52548
52548
|
return {
|
|
52549
52549
|
inspectable: false,
|
|
52550
52550
|
preview_short: Object(_utils__WEBPACK_IMPORTED_MODULE_0__["b"])(data, false),
|
|
@@ -52553,7 +52553,7 @@ var require_backend = __commonJS({
|
|
|
52553
52553
|
type: type2
|
|
52554
52554
|
};
|
|
52555
52555
|
case "regexp":
|
|
52556
|
-
cleaned.push(
|
|
52556
|
+
cleaned.push(path22);
|
|
52557
52557
|
return {
|
|
52558
52558
|
inspectable: false,
|
|
52559
52559
|
preview_short: Object(_utils__WEBPACK_IMPORTED_MODULE_0__["b"])(data, false),
|
|
@@ -52562,21 +52562,21 @@ var require_backend = __commonJS({
|
|
|
52562
52562
|
type: type2
|
|
52563
52563
|
};
|
|
52564
52564
|
case "object":
|
|
52565
|
-
isPathAllowedCheck = isPathAllowed(
|
|
52565
|
+
isPathAllowedCheck = isPathAllowed(path22);
|
|
52566
52566
|
if (level >= LEVEL_THRESHOLD && !isPathAllowedCheck) {
|
|
52567
|
-
return createDehydrated(type2, true, data, cleaned,
|
|
52567
|
+
return createDehydrated(type2, true, data, cleaned, path22);
|
|
52568
52568
|
} else {
|
|
52569
52569
|
var object = {};
|
|
52570
52570
|
Object(_utils__WEBPACK_IMPORTED_MODULE_0__["c"])(data).forEach(function(key2) {
|
|
52571
52571
|
var name2 = key2.toString();
|
|
52572
|
-
object[name2] = dehydrate(data[key2], cleaned, unserializable,
|
|
52572
|
+
object[name2] = dehydrate(data[key2], cleaned, unserializable, path22.concat([name2]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
|
|
52573
52573
|
});
|
|
52574
52574
|
return object;
|
|
52575
52575
|
}
|
|
52576
52576
|
case "infinity":
|
|
52577
52577
|
case "nan":
|
|
52578
52578
|
case "undefined":
|
|
52579
|
-
cleaned.push(
|
|
52579
|
+
cleaned.push(path22);
|
|
52580
52580
|
return {
|
|
52581
52581
|
type: type2
|
|
52582
52582
|
};
|
|
@@ -52584,8 +52584,8 @@ var require_backend = __commonJS({
|
|
|
52584
52584
|
return data;
|
|
52585
52585
|
}
|
|
52586
52586
|
}
|
|
52587
|
-
function fillInPath(object, data,
|
|
52588
|
-
var target = Object(_utils__WEBPACK_IMPORTED_MODULE_0__["h"])(object,
|
|
52587
|
+
function fillInPath(object, data, path22, value) {
|
|
52588
|
+
var target = Object(_utils__WEBPACK_IMPORTED_MODULE_0__["h"])(object, path22);
|
|
52589
52589
|
if (target != null) {
|
|
52590
52590
|
if (!target[meta.unserializable]) {
|
|
52591
52591
|
delete target[meta.inspectable];
|
|
@@ -52600,9 +52600,9 @@ var require_backend = __commonJS({
|
|
|
52600
52600
|
}
|
|
52601
52601
|
if (value !== null && data.unserializable.length > 0) {
|
|
52602
52602
|
var unserializablePath = data.unserializable[0];
|
|
52603
|
-
var isMatch = unserializablePath.length ===
|
|
52604
|
-
for (var i2 = 0; i2 <
|
|
52605
|
-
if (
|
|
52603
|
+
var isMatch = unserializablePath.length === path22.length;
|
|
52604
|
+
for (var i2 = 0; i2 < path22.length; i2++) {
|
|
52605
|
+
if (path22[i2] !== unserializablePath[i2]) {
|
|
52606
52606
|
isMatch = false;
|
|
52607
52607
|
break;
|
|
52608
52608
|
}
|
|
@@ -52611,13 +52611,13 @@ var require_backend = __commonJS({
|
|
|
52611
52611
|
upgradeUnserializable(value, value);
|
|
52612
52612
|
}
|
|
52613
52613
|
}
|
|
52614
|
-
Object(_utils__WEBPACK_IMPORTED_MODULE_0__["l"])(object,
|
|
52614
|
+
Object(_utils__WEBPACK_IMPORTED_MODULE_0__["l"])(object, path22, value);
|
|
52615
52615
|
}
|
|
52616
52616
|
function hydrate(object, cleaned, unserializable) {
|
|
52617
|
-
cleaned.forEach(function(
|
|
52618
|
-
var length =
|
|
52619
|
-
var last =
|
|
52620
|
-
var parent = Object(_utils__WEBPACK_IMPORTED_MODULE_0__["h"])(object,
|
|
52617
|
+
cleaned.forEach(function(path22) {
|
|
52618
|
+
var length = path22.length;
|
|
52619
|
+
var last = path22[length - 1];
|
|
52620
|
+
var parent = Object(_utils__WEBPACK_IMPORTED_MODULE_0__["h"])(object, path22.slice(0, length - 1));
|
|
52621
52621
|
if (!parent || !parent.hasOwnProperty(last)) {
|
|
52622
52622
|
return;
|
|
52623
52623
|
}
|
|
@@ -52643,10 +52643,10 @@ var require_backend = __commonJS({
|
|
|
52643
52643
|
parent[last] = replaced;
|
|
52644
52644
|
}
|
|
52645
52645
|
});
|
|
52646
|
-
unserializable.forEach(function(
|
|
52647
|
-
var length =
|
|
52648
|
-
var last =
|
|
52649
|
-
var parent = Object(_utils__WEBPACK_IMPORTED_MODULE_0__["h"])(object,
|
|
52646
|
+
unserializable.forEach(function(path22) {
|
|
52647
|
+
var length = path22.length;
|
|
52648
|
+
var last = path22[length - 1];
|
|
52649
|
+
var parent = Object(_utils__WEBPACK_IMPORTED_MODULE_0__["h"])(object, path22.slice(0, length - 1));
|
|
52650
52650
|
if (!parent || !parent.hasOwnProperty(last)) {
|
|
52651
52651
|
return;
|
|
52652
52652
|
}
|
|
@@ -55256,9 +55256,9 @@ var require_backend = __commonJS({
|
|
|
55256
55256
|
}
|
|
55257
55257
|
return alternate;
|
|
55258
55258
|
}
|
|
55259
|
-
function prepareViewAttributeSource(id,
|
|
55259
|
+
function prepareViewAttributeSource(id, path22) {
|
|
55260
55260
|
if (isMostRecentlyInspectedElement(id)) {
|
|
55261
|
-
window.$attribute = Object(utils["h"])(mostRecentlyInspectedElement,
|
|
55261
|
+
window.$attribute = Object(utils["h"])(mostRecentlyInspectedElement, path22);
|
|
55262
55262
|
}
|
|
55263
55263
|
}
|
|
55264
55264
|
function prepareViewElementSource(id) {
|
|
@@ -55489,9 +55489,9 @@ var require_backend = __commonJS({
|
|
|
55489
55489
|
function isMostRecentlyInspectedElementCurrent(id) {
|
|
55490
55490
|
return isMostRecentlyInspectedElement(id) && !hasElementUpdatedSinceLastInspected;
|
|
55491
55491
|
}
|
|
55492
|
-
function mergeInspectedPaths(
|
|
55492
|
+
function mergeInspectedPaths(path22) {
|
|
55493
55493
|
var current = currentlyInspectedPaths;
|
|
55494
|
-
|
|
55494
|
+
path22.forEach(function(key2) {
|
|
55495
55495
|
if (!current[key2]) {
|
|
55496
55496
|
current[key2] = {};
|
|
55497
55497
|
}
|
|
@@ -55499,16 +55499,16 @@ var require_backend = __commonJS({
|
|
|
55499
55499
|
});
|
|
55500
55500
|
}
|
|
55501
55501
|
function createIsPathAllowed(key2, secondaryCategory) {
|
|
55502
|
-
return function isPathAllowed(
|
|
55502
|
+
return function isPathAllowed(path22) {
|
|
55503
55503
|
switch (secondaryCategory) {
|
|
55504
55504
|
case "hooks":
|
|
55505
|
-
if (
|
|
55505
|
+
if (path22.length === 1) {
|
|
55506
55506
|
return true;
|
|
55507
55507
|
}
|
|
55508
|
-
if (
|
|
55508
|
+
if (path22[path22.length - 2] === "hookSource" && path22[path22.length - 1] === "fileName") {
|
|
55509
55509
|
return true;
|
|
55510
55510
|
}
|
|
55511
|
-
if (
|
|
55511
|
+
if (path22[path22.length - 1] === "subHooks" || path22[path22.length - 2] === "subHooks") {
|
|
55512
55512
|
return true;
|
|
55513
55513
|
}
|
|
55514
55514
|
break;
|
|
@@ -55519,8 +55519,8 @@ var require_backend = __commonJS({
|
|
|
55519
55519
|
if (!current) {
|
|
55520
55520
|
return false;
|
|
55521
55521
|
}
|
|
55522
|
-
for (var i2 = 0; i2 <
|
|
55523
|
-
current = current[
|
|
55522
|
+
for (var i2 = 0; i2 < path22.length; i2++) {
|
|
55523
|
+
current = current[path22[i2]];
|
|
55524
55524
|
if (!current) {
|
|
55525
55525
|
return false;
|
|
55526
55526
|
}
|
|
@@ -55569,37 +55569,37 @@ var require_backend = __commonJS({
|
|
|
55569
55569
|
break;
|
|
55570
55570
|
}
|
|
55571
55571
|
}
|
|
55572
|
-
function storeAsGlobal(id,
|
|
55572
|
+
function storeAsGlobal(id, path22, count) {
|
|
55573
55573
|
if (isMostRecentlyInspectedElement(id)) {
|
|
55574
|
-
var value = Object(utils["h"])(mostRecentlyInspectedElement,
|
|
55574
|
+
var value = Object(utils["h"])(mostRecentlyInspectedElement, path22);
|
|
55575
55575
|
var key2 = "$reactTemp".concat(count);
|
|
55576
55576
|
window[key2] = value;
|
|
55577
55577
|
console.log(key2);
|
|
55578
55578
|
console.log(value);
|
|
55579
55579
|
}
|
|
55580
55580
|
}
|
|
55581
|
-
function copyElementPath(id,
|
|
55581
|
+
function copyElementPath(id, path22) {
|
|
55582
55582
|
if (isMostRecentlyInspectedElement(id)) {
|
|
55583
|
-
Object(backend_utils["b"])(Object(utils["h"])(mostRecentlyInspectedElement,
|
|
55583
|
+
Object(backend_utils["b"])(Object(utils["h"])(mostRecentlyInspectedElement, path22));
|
|
55584
55584
|
}
|
|
55585
55585
|
}
|
|
55586
|
-
function inspectElement(requestID, id,
|
|
55587
|
-
if (
|
|
55588
|
-
mergeInspectedPaths(
|
|
55586
|
+
function inspectElement(requestID, id, path22, forceFullData) {
|
|
55587
|
+
if (path22 !== null) {
|
|
55588
|
+
mergeInspectedPaths(path22);
|
|
55589
55589
|
}
|
|
55590
55590
|
if (isMostRecentlyInspectedElement(id) && !forceFullData) {
|
|
55591
55591
|
if (!hasElementUpdatedSinceLastInspected) {
|
|
55592
|
-
if (
|
|
55592
|
+
if (path22 !== null) {
|
|
55593
55593
|
var secondaryCategory = null;
|
|
55594
|
-
if (
|
|
55594
|
+
if (path22[0] === "hooks") {
|
|
55595
55595
|
secondaryCategory = "hooks";
|
|
55596
55596
|
}
|
|
55597
55597
|
return {
|
|
55598
55598
|
id,
|
|
55599
55599
|
responseID: requestID,
|
|
55600
55600
|
type: "hydrated-path",
|
|
55601
|
-
path:
|
|
55602
|
-
value: Object(backend_utils["a"])(Object(utils["h"])(mostRecentlyInspectedElement,
|
|
55601
|
+
path: path22,
|
|
55602
|
+
value: Object(backend_utils["a"])(Object(utils["h"])(mostRecentlyInspectedElement, path22), createIsPathAllowed(null, secondaryCategory), path22)
|
|
55603
55603
|
};
|
|
55604
55604
|
} else {
|
|
55605
55605
|
return {
|
|
@@ -55678,18 +55678,18 @@ var require_backend = __commonJS({
|
|
|
55678
55678
|
console.groupEnd();
|
|
55679
55679
|
}
|
|
55680
55680
|
}
|
|
55681
|
-
function deletePath(type2, id, hookID,
|
|
55681
|
+
function deletePath(type2, id, hookID, path22) {
|
|
55682
55682
|
var fiber = findCurrentFiberUsingSlowPathById(id);
|
|
55683
55683
|
if (fiber !== null) {
|
|
55684
55684
|
var instance = fiber.stateNode;
|
|
55685
55685
|
switch (type2) {
|
|
55686
55686
|
case "context":
|
|
55687
|
-
|
|
55687
|
+
path22 = path22.slice(1);
|
|
55688
55688
|
switch (fiber.tag) {
|
|
55689
55689
|
case ClassComponent:
|
|
55690
|
-
if (
|
|
55690
|
+
if (path22.length === 0) {
|
|
55691
55691
|
} else {
|
|
55692
|
-
Object(utils["a"])(instance.context,
|
|
55692
|
+
Object(utils["a"])(instance.context, path22);
|
|
55693
55693
|
}
|
|
55694
55694
|
instance.forceUpdate();
|
|
55695
55695
|
break;
|
|
@@ -55699,21 +55699,21 @@ var require_backend = __commonJS({
|
|
|
55699
55699
|
break;
|
|
55700
55700
|
case "hooks":
|
|
55701
55701
|
if (typeof overrideHookStateDeletePath === "function") {
|
|
55702
|
-
overrideHookStateDeletePath(fiber, hookID,
|
|
55702
|
+
overrideHookStateDeletePath(fiber, hookID, path22);
|
|
55703
55703
|
}
|
|
55704
55704
|
break;
|
|
55705
55705
|
case "props":
|
|
55706
55706
|
if (instance === null) {
|
|
55707
55707
|
if (typeof overridePropsDeletePath === "function") {
|
|
55708
|
-
overridePropsDeletePath(fiber,
|
|
55708
|
+
overridePropsDeletePath(fiber, path22);
|
|
55709
55709
|
}
|
|
55710
55710
|
} else {
|
|
55711
|
-
fiber.pendingProps = Object(backend_utils["c"])(instance.props,
|
|
55711
|
+
fiber.pendingProps = Object(backend_utils["c"])(instance.props, path22);
|
|
55712
55712
|
instance.forceUpdate();
|
|
55713
55713
|
}
|
|
55714
55714
|
break;
|
|
55715
55715
|
case "state":
|
|
55716
|
-
Object(utils["a"])(instance.state,
|
|
55716
|
+
Object(utils["a"])(instance.state, path22);
|
|
55717
55717
|
instance.forceUpdate();
|
|
55718
55718
|
break;
|
|
55719
55719
|
}
|
|
@@ -55761,19 +55761,19 @@ var require_backend = __commonJS({
|
|
|
55761
55761
|
}
|
|
55762
55762
|
}
|
|
55763
55763
|
}
|
|
55764
|
-
function overrideValueAtPath(type2, id, hookID,
|
|
55764
|
+
function overrideValueAtPath(type2, id, hookID, path22, value) {
|
|
55765
55765
|
var fiber = findCurrentFiberUsingSlowPathById(id);
|
|
55766
55766
|
if (fiber !== null) {
|
|
55767
55767
|
var instance = fiber.stateNode;
|
|
55768
55768
|
switch (type2) {
|
|
55769
55769
|
case "context":
|
|
55770
|
-
|
|
55770
|
+
path22 = path22.slice(1);
|
|
55771
55771
|
switch (fiber.tag) {
|
|
55772
55772
|
case ClassComponent:
|
|
55773
|
-
if (
|
|
55773
|
+
if (path22.length === 0) {
|
|
55774
55774
|
instance.context = value;
|
|
55775
55775
|
} else {
|
|
55776
|
-
Object(utils["l"])(instance.context,
|
|
55776
|
+
Object(utils["l"])(instance.context, path22, value);
|
|
55777
55777
|
}
|
|
55778
55778
|
instance.forceUpdate();
|
|
55779
55779
|
break;
|
|
@@ -55783,18 +55783,18 @@ var require_backend = __commonJS({
|
|
|
55783
55783
|
break;
|
|
55784
55784
|
case "hooks":
|
|
55785
55785
|
if (typeof overrideHookState === "function") {
|
|
55786
|
-
overrideHookState(fiber, hookID,
|
|
55786
|
+
overrideHookState(fiber, hookID, path22, value);
|
|
55787
55787
|
}
|
|
55788
55788
|
break;
|
|
55789
55789
|
case "props":
|
|
55790
55790
|
switch (fiber.tag) {
|
|
55791
55791
|
case ClassComponent:
|
|
55792
|
-
fiber.pendingProps = Object(backend_utils["e"])(instance.props,
|
|
55792
|
+
fiber.pendingProps = Object(backend_utils["e"])(instance.props, path22, value);
|
|
55793
55793
|
instance.forceUpdate();
|
|
55794
55794
|
break;
|
|
55795
55795
|
default:
|
|
55796
55796
|
if (typeof overrideProps === "function") {
|
|
55797
|
-
overrideProps(fiber,
|
|
55797
|
+
overrideProps(fiber, path22, value);
|
|
55798
55798
|
}
|
|
55799
55799
|
break;
|
|
55800
55800
|
}
|
|
@@ -55802,7 +55802,7 @@ var require_backend = __commonJS({
|
|
|
55802
55802
|
case "state":
|
|
55803
55803
|
switch (fiber.tag) {
|
|
55804
55804
|
case ClassComponent:
|
|
55805
|
-
Object(utils["l"])(instance.state,
|
|
55805
|
+
Object(utils["l"])(instance.state, path22, value);
|
|
55806
55806
|
instance.forceUpdate();
|
|
55807
55807
|
break;
|
|
55808
55808
|
}
|
|
@@ -55964,13 +55964,13 @@ var require_backend = __commonJS({
|
|
|
55964
55964
|
var trackedPathMatchFiber = null;
|
|
55965
55965
|
var trackedPathMatchDepth = -1;
|
|
55966
55966
|
var mightBeOnTrackedPath = false;
|
|
55967
|
-
function setTrackedPath(
|
|
55968
|
-
if (
|
|
55967
|
+
function setTrackedPath(path22) {
|
|
55968
|
+
if (path22 === null) {
|
|
55969
55969
|
trackedPathMatchFiber = null;
|
|
55970
55970
|
trackedPathMatchDepth = -1;
|
|
55971
55971
|
mightBeOnTrackedPath = false;
|
|
55972
55972
|
}
|
|
55973
|
-
trackedPath =
|
|
55973
|
+
trackedPath = path22;
|
|
55974
55974
|
}
|
|
55975
55975
|
function updateTrackedPathStateBeforeMount(fiber) {
|
|
55976
55976
|
if (trackedPath === null || !mightBeOnTrackedPath) {
|
|
@@ -60233,12 +60233,12 @@ var require_backend = __commonJS({
|
|
|
60233
60233
|
}
|
|
60234
60234
|
});
|
|
60235
60235
|
bridge_defineProperty(_assertThisInitialized(_this), "overrideValueAtPath", function(_ref) {
|
|
60236
|
-
var id = _ref.id,
|
|
60236
|
+
var id = _ref.id, path22 = _ref.path, rendererID = _ref.rendererID, type2 = _ref.type, value = _ref.value;
|
|
60237
60237
|
switch (type2) {
|
|
60238
60238
|
case "context":
|
|
60239
60239
|
_this.send("overrideContext", {
|
|
60240
60240
|
id,
|
|
60241
|
-
path:
|
|
60241
|
+
path: path22,
|
|
60242
60242
|
rendererID,
|
|
60243
60243
|
wasForwarded: true,
|
|
60244
60244
|
value
|
|
@@ -60247,7 +60247,7 @@ var require_backend = __commonJS({
|
|
|
60247
60247
|
case "hooks":
|
|
60248
60248
|
_this.send("overrideHookState", {
|
|
60249
60249
|
id,
|
|
60250
|
-
path:
|
|
60250
|
+
path: path22,
|
|
60251
60251
|
rendererID,
|
|
60252
60252
|
wasForwarded: true,
|
|
60253
60253
|
value
|
|
@@ -60256,7 +60256,7 @@ var require_backend = __commonJS({
|
|
|
60256
60256
|
case "props":
|
|
60257
60257
|
_this.send("overrideProps", {
|
|
60258
60258
|
id,
|
|
60259
|
-
path:
|
|
60259
|
+
path: path22,
|
|
60260
60260
|
rendererID,
|
|
60261
60261
|
wasForwarded: true,
|
|
60262
60262
|
value
|
|
@@ -60265,7 +60265,7 @@ var require_backend = __commonJS({
|
|
|
60265
60265
|
case "state":
|
|
60266
60266
|
_this.send("overrideState", {
|
|
60267
60267
|
id,
|
|
60268
|
-
path:
|
|
60268
|
+
path: path22,
|
|
60269
60269
|
rendererID,
|
|
60270
60270
|
wasForwarded: true,
|
|
60271
60271
|
value
|
|
@@ -60487,21 +60487,21 @@ var require_backend = __commonJS({
|
|
|
60487
60487
|
}
|
|
60488
60488
|
});
|
|
60489
60489
|
agent_defineProperty(agent_assertThisInitialized(_this), "copyElementPath", function(_ref4) {
|
|
60490
|
-
var id = _ref4.id,
|
|
60490
|
+
var id = _ref4.id, path22 = _ref4.path, rendererID = _ref4.rendererID;
|
|
60491
60491
|
var renderer = _this._rendererInterfaces[rendererID];
|
|
60492
60492
|
if (renderer == null) {
|
|
60493
60493
|
console.warn('Invalid renderer id "'.concat(rendererID, '" for element "').concat(id, '"'));
|
|
60494
60494
|
} else {
|
|
60495
|
-
renderer.copyElementPath(id,
|
|
60495
|
+
renderer.copyElementPath(id, path22);
|
|
60496
60496
|
}
|
|
60497
60497
|
});
|
|
60498
60498
|
agent_defineProperty(agent_assertThisInitialized(_this), "deletePath", function(_ref5) {
|
|
60499
|
-
var hookID = _ref5.hookID, id = _ref5.id,
|
|
60499
|
+
var hookID = _ref5.hookID, id = _ref5.id, path22 = _ref5.path, rendererID = _ref5.rendererID, type2 = _ref5.type;
|
|
60500
60500
|
var renderer = _this._rendererInterfaces[rendererID];
|
|
60501
60501
|
if (renderer == null) {
|
|
60502
60502
|
console.warn('Invalid renderer id "'.concat(rendererID, '" for element "').concat(id, '"'));
|
|
60503
60503
|
} else {
|
|
60504
|
-
renderer.deletePath(type2, id, hookID,
|
|
60504
|
+
renderer.deletePath(type2, id, hookID, path22);
|
|
60505
60505
|
}
|
|
60506
60506
|
});
|
|
60507
60507
|
agent_defineProperty(agent_assertThisInitialized(_this), "getBridgeProtocol", function() {
|
|
@@ -60532,12 +60532,12 @@ var require_backend = __commonJS({
|
|
|
60532
60532
|
}
|
|
60533
60533
|
});
|
|
60534
60534
|
agent_defineProperty(agent_assertThisInitialized(_this), "inspectElement", function(_ref8) {
|
|
60535
|
-
var forceFullData = _ref8.forceFullData, id = _ref8.id,
|
|
60535
|
+
var forceFullData = _ref8.forceFullData, id = _ref8.id, path22 = _ref8.path, rendererID = _ref8.rendererID, requestID = _ref8.requestID;
|
|
60536
60536
|
var renderer = _this._rendererInterfaces[rendererID];
|
|
60537
60537
|
if (renderer == null) {
|
|
60538
60538
|
console.warn('Invalid renderer id "'.concat(rendererID, '" for element "').concat(id, '"'));
|
|
60539
60539
|
} else {
|
|
60540
|
-
_this._bridge.send("inspectedElement", renderer.inspectElement(requestID, id,
|
|
60540
|
+
_this._bridge.send("inspectedElement", renderer.inspectElement(requestID, id, path22, forceFullData));
|
|
60541
60541
|
if (_this._persistedSelectionMatch === null || _this._persistedSelectionMatch.id !== id) {
|
|
60542
60542
|
_this._persistedSelection = null;
|
|
60543
60543
|
_this._persistedSelectionMatch = null;
|
|
@@ -60574,20 +60574,20 @@ var require_backend = __commonJS({
|
|
|
60574
60574
|
}
|
|
60575
60575
|
});
|
|
60576
60576
|
agent_defineProperty(agent_assertThisInitialized(_this), "overrideValueAtPath", function(_ref12) {
|
|
60577
|
-
var hookID = _ref12.hookID, id = _ref12.id,
|
|
60577
|
+
var hookID = _ref12.hookID, id = _ref12.id, path22 = _ref12.path, rendererID = _ref12.rendererID, type2 = _ref12.type, value = _ref12.value;
|
|
60578
60578
|
var renderer = _this._rendererInterfaces[rendererID];
|
|
60579
60579
|
if (renderer == null) {
|
|
60580
60580
|
console.warn('Invalid renderer id "'.concat(rendererID, '" for element "').concat(id, '"'));
|
|
60581
60581
|
} else {
|
|
60582
|
-
renderer.overrideValueAtPath(type2, id, hookID,
|
|
60582
|
+
renderer.overrideValueAtPath(type2, id, hookID, path22, value);
|
|
60583
60583
|
}
|
|
60584
60584
|
});
|
|
60585
60585
|
agent_defineProperty(agent_assertThisInitialized(_this), "overrideContext", function(_ref13) {
|
|
60586
|
-
var id = _ref13.id,
|
|
60586
|
+
var id = _ref13.id, path22 = _ref13.path, rendererID = _ref13.rendererID, wasForwarded = _ref13.wasForwarded, value = _ref13.value;
|
|
60587
60587
|
if (!wasForwarded) {
|
|
60588
60588
|
_this.overrideValueAtPath({
|
|
60589
60589
|
id,
|
|
60590
|
-
path:
|
|
60590
|
+
path: path22,
|
|
60591
60591
|
rendererID,
|
|
60592
60592
|
type: "context",
|
|
60593
60593
|
value
|
|
@@ -60595,11 +60595,11 @@ var require_backend = __commonJS({
|
|
|
60595
60595
|
}
|
|
60596
60596
|
});
|
|
60597
60597
|
agent_defineProperty(agent_assertThisInitialized(_this), "overrideHookState", function(_ref14) {
|
|
60598
|
-
var id = _ref14.id, hookID = _ref14.hookID,
|
|
60598
|
+
var id = _ref14.id, hookID = _ref14.hookID, path22 = _ref14.path, rendererID = _ref14.rendererID, wasForwarded = _ref14.wasForwarded, value = _ref14.value;
|
|
60599
60599
|
if (!wasForwarded) {
|
|
60600
60600
|
_this.overrideValueAtPath({
|
|
60601
60601
|
id,
|
|
60602
|
-
path:
|
|
60602
|
+
path: path22,
|
|
60603
60603
|
rendererID,
|
|
60604
60604
|
type: "hooks",
|
|
60605
60605
|
value
|
|
@@ -60607,11 +60607,11 @@ var require_backend = __commonJS({
|
|
|
60607
60607
|
}
|
|
60608
60608
|
});
|
|
60609
60609
|
agent_defineProperty(agent_assertThisInitialized(_this), "overrideProps", function(_ref15) {
|
|
60610
|
-
var id = _ref15.id,
|
|
60610
|
+
var id = _ref15.id, path22 = _ref15.path, rendererID = _ref15.rendererID, wasForwarded = _ref15.wasForwarded, value = _ref15.value;
|
|
60611
60611
|
if (!wasForwarded) {
|
|
60612
60612
|
_this.overrideValueAtPath({
|
|
60613
60613
|
id,
|
|
60614
|
-
path:
|
|
60614
|
+
path: path22,
|
|
60615
60615
|
rendererID,
|
|
60616
60616
|
type: "props",
|
|
60617
60617
|
value
|
|
@@ -60619,11 +60619,11 @@ var require_backend = __commonJS({
|
|
|
60619
60619
|
}
|
|
60620
60620
|
});
|
|
60621
60621
|
agent_defineProperty(agent_assertThisInitialized(_this), "overrideState", function(_ref16) {
|
|
60622
|
-
var id = _ref16.id,
|
|
60622
|
+
var id = _ref16.id, path22 = _ref16.path, rendererID = _ref16.rendererID, wasForwarded = _ref16.wasForwarded, value = _ref16.value;
|
|
60623
60623
|
if (!wasForwarded) {
|
|
60624
60624
|
_this.overrideValueAtPath({
|
|
60625
60625
|
id,
|
|
60626
|
-
path:
|
|
60626
|
+
path: path22,
|
|
60627
60627
|
rendererID,
|
|
60628
60628
|
type: "state",
|
|
60629
60629
|
value
|
|
@@ -60681,12 +60681,12 @@ var require_backend = __commonJS({
|
|
|
60681
60681
|
_this._bridge.send("profilingStatus", _this._isProfiling);
|
|
60682
60682
|
});
|
|
60683
60683
|
agent_defineProperty(agent_assertThisInitialized(_this), "storeAsGlobal", function(_ref18) {
|
|
60684
|
-
var count = _ref18.count, id = _ref18.id,
|
|
60684
|
+
var count = _ref18.count, id = _ref18.id, path22 = _ref18.path, rendererID = _ref18.rendererID;
|
|
60685
60685
|
var renderer = _this._rendererInterfaces[rendererID];
|
|
60686
60686
|
if (renderer == null) {
|
|
60687
60687
|
console.warn('Invalid renderer id "'.concat(rendererID, '" for element "').concat(id, '"'));
|
|
60688
60688
|
} else {
|
|
60689
|
-
renderer.storeAsGlobal(id,
|
|
60689
|
+
renderer.storeAsGlobal(id, path22, count);
|
|
60690
60690
|
}
|
|
60691
60691
|
});
|
|
60692
60692
|
agent_defineProperty(agent_assertThisInitialized(_this), "updateConsolePatchSettings", function(_ref19) {
|
|
@@ -60706,12 +60706,12 @@ var require_backend = __commonJS({
|
|
|
60706
60706
|
}
|
|
60707
60707
|
});
|
|
60708
60708
|
agent_defineProperty(agent_assertThisInitialized(_this), "viewAttributeSource", function(_ref20) {
|
|
60709
|
-
var id = _ref20.id,
|
|
60709
|
+
var id = _ref20.id, path22 = _ref20.path, rendererID = _ref20.rendererID;
|
|
60710
60710
|
var renderer = _this._rendererInterfaces[rendererID];
|
|
60711
60711
|
if (renderer == null) {
|
|
60712
60712
|
console.warn('Invalid renderer id "'.concat(rendererID, '" for element "').concat(id, '"'));
|
|
60713
60713
|
} else {
|
|
60714
|
-
renderer.prepareViewAttributeSource(id,
|
|
60714
|
+
renderer.prepareViewAttributeSource(id, path22);
|
|
60715
60715
|
}
|
|
60716
60716
|
});
|
|
60717
60717
|
agent_defineProperty(agent_assertThisInitialized(_this), "viewElementSource", function(_ref21) {
|
|
@@ -60765,11 +60765,11 @@ var require_backend = __commonJS({
|
|
|
60765
60765
|
});
|
|
60766
60766
|
agent_defineProperty(agent_assertThisInitialized(_this), "_throttledPersistSelection", lodash_throttle_default()(function(rendererID, id) {
|
|
60767
60767
|
var renderer = _this._rendererInterfaces[rendererID];
|
|
60768
|
-
var
|
|
60769
|
-
if (
|
|
60768
|
+
var path22 = renderer != null ? renderer.getPathForElement(id) : null;
|
|
60769
|
+
if (path22 !== null) {
|
|
60770
60770
|
Object(storage["e"])(constants3["g"], JSON.stringify({
|
|
60771
60771
|
rendererID,
|
|
60772
|
-
path:
|
|
60772
|
+
path: path22
|
|
60773
60773
|
}));
|
|
60774
60774
|
} else {
|
|
60775
60775
|
Object(storage["d"])(constants3["g"]);
|
|
@@ -61687,9 +61687,9 @@ var require_backend = __commonJS({
|
|
|
61687
61687
|
}
|
|
61688
61688
|
var currentlyInspectedElementID = null;
|
|
61689
61689
|
var currentlyInspectedPaths = {};
|
|
61690
|
-
function mergeInspectedPaths(
|
|
61690
|
+
function mergeInspectedPaths(path22) {
|
|
61691
61691
|
var current = currentlyInspectedPaths;
|
|
61692
|
-
|
|
61692
|
+
path22.forEach(function(key2) {
|
|
61693
61693
|
if (!current[key2]) {
|
|
61694
61694
|
current[key2] = {};
|
|
61695
61695
|
}
|
|
@@ -61697,13 +61697,13 @@ var require_backend = __commonJS({
|
|
|
61697
61697
|
});
|
|
61698
61698
|
}
|
|
61699
61699
|
function createIsPathAllowed(key2) {
|
|
61700
|
-
return function isPathAllowed(
|
|
61700
|
+
return function isPathAllowed(path22) {
|
|
61701
61701
|
var current = currentlyInspectedPaths[key2];
|
|
61702
61702
|
if (!current) {
|
|
61703
61703
|
return false;
|
|
61704
61704
|
}
|
|
61705
|
-
for (var i2 = 0; i2 <
|
|
61706
|
-
current = current[
|
|
61705
|
+
for (var i2 = 0; i2 < path22.length; i2++) {
|
|
61706
|
+
current = current[path22[i2]];
|
|
61707
61707
|
if (!current) {
|
|
61708
61708
|
return false;
|
|
61709
61709
|
}
|
|
@@ -61753,23 +61753,23 @@ var require_backend = __commonJS({
|
|
|
61753
61753
|
break;
|
|
61754
61754
|
}
|
|
61755
61755
|
}
|
|
61756
|
-
function storeAsGlobal(id,
|
|
61756
|
+
function storeAsGlobal(id, path22, count) {
|
|
61757
61757
|
var inspectedElement = inspectElementRaw(id);
|
|
61758
61758
|
if (inspectedElement !== null) {
|
|
61759
|
-
var value = Object(src_utils["h"])(inspectedElement,
|
|
61759
|
+
var value = Object(src_utils["h"])(inspectedElement, path22);
|
|
61760
61760
|
var key2 = "$reactTemp".concat(count);
|
|
61761
61761
|
window[key2] = value;
|
|
61762
61762
|
console.log(key2);
|
|
61763
61763
|
console.log(value);
|
|
61764
61764
|
}
|
|
61765
61765
|
}
|
|
61766
|
-
function copyElementPath(id,
|
|
61766
|
+
function copyElementPath(id, path22) {
|
|
61767
61767
|
var inspectedElement = inspectElementRaw(id);
|
|
61768
61768
|
if (inspectedElement !== null) {
|
|
61769
|
-
Object(utils["b"])(Object(src_utils["h"])(inspectedElement,
|
|
61769
|
+
Object(utils["b"])(Object(src_utils["h"])(inspectedElement, path22));
|
|
61770
61770
|
}
|
|
61771
61771
|
}
|
|
61772
|
-
function inspectElement(requestID, id,
|
|
61772
|
+
function inspectElement(requestID, id, path22, forceFullData) {
|
|
61773
61773
|
if (forceFullData || currentlyInspectedElementID !== id) {
|
|
61774
61774
|
currentlyInspectedElementID = id;
|
|
61775
61775
|
currentlyInspectedPaths = {};
|
|
@@ -61782,8 +61782,8 @@ var require_backend = __commonJS({
|
|
|
61782
61782
|
type: "not-found"
|
|
61783
61783
|
};
|
|
61784
61784
|
}
|
|
61785
|
-
if (
|
|
61786
|
-
mergeInspectedPaths(
|
|
61785
|
+
if (path22 !== null) {
|
|
61786
|
+
mergeInspectedPaths(path22);
|
|
61787
61787
|
}
|
|
61788
61788
|
updateSelectedElement(id);
|
|
61789
61789
|
inspectedElement.context = Object(utils["a"])(inspectedElement.context, createIsPathAllowed("context"));
|
|
@@ -61898,10 +61898,10 @@ var require_backend = __commonJS({
|
|
|
61898
61898
|
console.groupEnd();
|
|
61899
61899
|
}
|
|
61900
61900
|
}
|
|
61901
|
-
function prepareViewAttributeSource(id,
|
|
61901
|
+
function prepareViewAttributeSource(id, path22) {
|
|
61902
61902
|
var inspectedElement = inspectElementRaw(id);
|
|
61903
61903
|
if (inspectedElement !== null) {
|
|
61904
|
-
window.$attribute = Object(src_utils["h"])(inspectedElement,
|
|
61904
|
+
window.$attribute = Object(src_utils["h"])(inspectedElement, path22);
|
|
61905
61905
|
}
|
|
61906
61906
|
}
|
|
61907
61907
|
function prepareViewElementSource(id) {
|
|
@@ -61917,14 +61917,14 @@ var require_backend = __commonJS({
|
|
|
61917
61917
|
}
|
|
61918
61918
|
global2.$type = element.type;
|
|
61919
61919
|
}
|
|
61920
|
-
function deletePath(type2, id, hookID,
|
|
61920
|
+
function deletePath(type2, id, hookID, path22) {
|
|
61921
61921
|
var internalInstance = idToInternalInstanceMap.get(id);
|
|
61922
61922
|
if (internalInstance != null) {
|
|
61923
61923
|
var publicInstance = internalInstance._instance;
|
|
61924
61924
|
if (publicInstance != null) {
|
|
61925
61925
|
switch (type2) {
|
|
61926
61926
|
case "context":
|
|
61927
|
-
Object(src_utils["a"])(publicInstance.context,
|
|
61927
|
+
Object(src_utils["a"])(publicInstance.context, path22);
|
|
61928
61928
|
forceUpdate(publicInstance);
|
|
61929
61929
|
break;
|
|
61930
61930
|
case "hooks":
|
|
@@ -61932,12 +61932,12 @@ var require_backend = __commonJS({
|
|
|
61932
61932
|
case "props":
|
|
61933
61933
|
var element = internalInstance._currentElement;
|
|
61934
61934
|
internalInstance._currentElement = _objectSpread(_objectSpread({}, element), {}, {
|
|
61935
|
-
props: Object(utils["c"])(element.props,
|
|
61935
|
+
props: Object(utils["c"])(element.props, path22)
|
|
61936
61936
|
});
|
|
61937
61937
|
forceUpdate(publicInstance);
|
|
61938
61938
|
break;
|
|
61939
61939
|
case "state":
|
|
61940
|
-
Object(src_utils["a"])(publicInstance.state,
|
|
61940
|
+
Object(src_utils["a"])(publicInstance.state, path22);
|
|
61941
61941
|
forceUpdate(publicInstance);
|
|
61942
61942
|
break;
|
|
61943
61943
|
}
|
|
@@ -61971,14 +61971,14 @@ var require_backend = __commonJS({
|
|
|
61971
61971
|
}
|
|
61972
61972
|
}
|
|
61973
61973
|
}
|
|
61974
|
-
function overrideValueAtPath(type2, id, hookID,
|
|
61974
|
+
function overrideValueAtPath(type2, id, hookID, path22, value) {
|
|
61975
61975
|
var internalInstance = idToInternalInstanceMap.get(id);
|
|
61976
61976
|
if (internalInstance != null) {
|
|
61977
61977
|
var publicInstance = internalInstance._instance;
|
|
61978
61978
|
if (publicInstance != null) {
|
|
61979
61979
|
switch (type2) {
|
|
61980
61980
|
case "context":
|
|
61981
|
-
Object(src_utils["l"])(publicInstance.context,
|
|
61981
|
+
Object(src_utils["l"])(publicInstance.context, path22, value);
|
|
61982
61982
|
forceUpdate(publicInstance);
|
|
61983
61983
|
break;
|
|
61984
61984
|
case "hooks":
|
|
@@ -61986,12 +61986,12 @@ var require_backend = __commonJS({
|
|
|
61986
61986
|
case "props":
|
|
61987
61987
|
var element = internalInstance._currentElement;
|
|
61988
61988
|
internalInstance._currentElement = _objectSpread(_objectSpread({}, element), {}, {
|
|
61989
|
-
props: Object(utils["e"])(element.props,
|
|
61989
|
+
props: Object(utils["e"])(element.props, path22, value)
|
|
61990
61990
|
});
|
|
61991
61991
|
forceUpdate(publicInstance);
|
|
61992
61992
|
break;
|
|
61993
61993
|
case "state":
|
|
61994
|
-
Object(src_utils["l"])(publicInstance.state,
|
|
61994
|
+
Object(src_utils["l"])(publicInstance.state, path22, value);
|
|
61995
61995
|
forceUpdate(publicInstance);
|
|
61996
61996
|
break;
|
|
61997
61997
|
}
|
|
@@ -62030,7 +62030,7 @@ var require_backend = __commonJS({
|
|
|
62030
62030
|
}
|
|
62031
62031
|
function setTraceUpdatesEnabled(enabled) {
|
|
62032
62032
|
}
|
|
62033
|
-
function setTrackedPath(
|
|
62033
|
+
function setTrackedPath(path22) {
|
|
62034
62034
|
}
|
|
62035
62035
|
function getOwnersList(id) {
|
|
62036
62036
|
return null;
|
|
@@ -63808,15 +63808,15 @@ var require_route4 = __commonJS({
|
|
|
63808
63808
|
};
|
|
63809
63809
|
}
|
|
63810
63810
|
function wrapConversion(toModel, graph) {
|
|
63811
|
-
const
|
|
63811
|
+
const path22 = [graph[toModel].parent, toModel];
|
|
63812
63812
|
let fn = conversions[graph[toModel].parent][toModel];
|
|
63813
63813
|
let cur = graph[toModel].parent;
|
|
63814
63814
|
while (graph[cur].parent) {
|
|
63815
|
-
|
|
63815
|
+
path22.unshift(graph[cur].parent);
|
|
63816
63816
|
fn = link(conversions[graph[cur].parent][cur], fn);
|
|
63817
63817
|
cur = graph[cur].parent;
|
|
63818
63818
|
}
|
|
63819
|
-
fn.conversion =
|
|
63819
|
+
fn.conversion = path22;
|
|
63820
63820
|
return fn;
|
|
63821
63821
|
}
|
|
63822
63822
|
module2.exports = function(fromModel) {
|
|
@@ -66671,8 +66671,8 @@ var require_util2 = __commonJS({
|
|
|
66671
66671
|
if (!(url3 instanceof URL)) {
|
|
66672
66672
|
const port = url3.port != null ? url3.port : url3.protocol === "https:" ? 443 : 80;
|
|
66673
66673
|
const origin = url3.origin != null ? url3.origin : `${url3.protocol}//${url3.hostname}:${port}`;
|
|
66674
|
-
const
|
|
66675
|
-
url3 = new URL(
|
|
66674
|
+
const path22 = url3.path != null ? url3.path : `${url3.pathname || ""}${url3.search || ""}`;
|
|
66675
|
+
url3 = new URL(path22, origin);
|
|
66676
66676
|
}
|
|
66677
66677
|
return url3;
|
|
66678
66678
|
}
|
|
@@ -66920,7 +66920,7 @@ var require_request = __commonJS({
|
|
|
66920
66920
|
}
|
|
66921
66921
|
var Request = class {
|
|
66922
66922
|
constructor(origin, {
|
|
66923
|
-
path:
|
|
66923
|
+
path: path22,
|
|
66924
66924
|
method,
|
|
66925
66925
|
body,
|
|
66926
66926
|
headers,
|
|
@@ -66930,9 +66930,9 @@ var require_request = __commonJS({
|
|
|
66930
66930
|
headersTimeout,
|
|
66931
66931
|
bodyTimeout
|
|
66932
66932
|
}, handler2) {
|
|
66933
|
-
if (typeof
|
|
66933
|
+
if (typeof path22 !== "string") {
|
|
66934
66934
|
throw new InvalidArgumentError("path must be a string");
|
|
66935
|
-
} else if (
|
|
66935
|
+
} else if (path22[0] !== "/" && !(path22.startsWith("http://") || path22.startsWith("https://"))) {
|
|
66936
66936
|
throw new InvalidArgumentError("path must be an absolute URL or start with a slash");
|
|
66937
66937
|
}
|
|
66938
66938
|
if (typeof method !== "string") {
|
|
@@ -66970,7 +66970,7 @@ var require_request = __commonJS({
|
|
|
66970
66970
|
this.completed = false;
|
|
66971
66971
|
this.aborted = false;
|
|
66972
66972
|
this.upgrade = upgrade || null;
|
|
66973
|
-
this.path =
|
|
66973
|
+
this.path = path22;
|
|
66974
66974
|
this.origin = origin;
|
|
66975
66975
|
this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent;
|
|
66976
66976
|
this.blocking = blocking == null ? false : blocking;
|
|
@@ -67196,9 +67196,9 @@ var require_redirect = __commonJS({
|
|
|
67196
67196
|
return this.handler.onHeaders(statusCode, headers, resume, statusText);
|
|
67197
67197
|
}
|
|
67198
67198
|
const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin));
|
|
67199
|
-
const
|
|
67199
|
+
const path22 = search ? `${pathname}${search}` : pathname;
|
|
67200
67200
|
this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin);
|
|
67201
|
-
this.opts.path =
|
|
67201
|
+
this.opts.path = path22;
|
|
67202
67202
|
this.opts.origin = origin;
|
|
67203
67203
|
this.opts.maxRedirections = 0;
|
|
67204
67204
|
if (statusCode === 303 && this.opts.method !== "HEAD") {
|
|
@@ -68764,7 +68764,7 @@ var require_client = __commonJS({
|
|
|
68764
68764
|
}
|
|
68765
68765
|
}
|
|
68766
68766
|
function write(client, request) {
|
|
68767
|
-
const { body, method, path:
|
|
68767
|
+
const { body, method, path: path22, host, upgrade, headers, blocking } = request;
|
|
68768
68768
|
const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH";
|
|
68769
68769
|
if (body && typeof body.read === "function") {
|
|
68770
68770
|
body.read(0);
|
|
@@ -68810,7 +68810,7 @@ var require_client = __commonJS({
|
|
|
68810
68810
|
if (blocking) {
|
|
68811
68811
|
socket[kBlocking] = true;
|
|
68812
68812
|
}
|
|
68813
|
-
let header = `${method} ${
|
|
68813
|
+
let header = `${method} ${path22} HTTP/1.1\r
|
|
68814
68814
|
`;
|
|
68815
68815
|
if (typeof host === "string") {
|
|
68816
68816
|
header += `host: ${host}\r
|
|
@@ -70804,8 +70804,8 @@ var require_mock_utils = __commonJS({
|
|
|
70804
70804
|
}
|
|
70805
70805
|
return true;
|
|
70806
70806
|
}
|
|
70807
|
-
function matchKey(mockDispatch2, { path:
|
|
70808
|
-
const pathMatch = matchValue(mockDispatch2.path,
|
|
70807
|
+
function matchKey(mockDispatch2, { path: path22, method, body, headers }) {
|
|
70808
|
+
const pathMatch = matchValue(mockDispatch2.path, path22);
|
|
70809
70809
|
const methodMatch = matchValue(mockDispatch2.method, method);
|
|
70810
70810
|
const bodyMatch = typeof mockDispatch2.body !== "undefined" ? matchValue(mockDispatch2.body, body) : true;
|
|
70811
70811
|
const headersMatch = matchHeaders(mockDispatch2, headers);
|
|
@@ -70821,7 +70821,7 @@ var require_mock_utils = __commonJS({
|
|
|
70821
70821
|
}
|
|
70822
70822
|
}
|
|
70823
70823
|
function getMockDispatch(mockDispatches, key2) {
|
|
70824
|
-
let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path:
|
|
70824
|
+
let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path22 }) => matchValue(path22, key2.path));
|
|
70825
70825
|
if (matchedMockDispatches.length === 0) {
|
|
70826
70826
|
throw new MockNotMatchedError(`Mock dispatch not matched for path '${key2.path}'`);
|
|
70827
70827
|
}
|
|
@@ -70858,9 +70858,9 @@ var require_mock_utils = __commonJS({
|
|
|
70858
70858
|
}
|
|
70859
70859
|
}
|
|
70860
70860
|
function buildKey(opts) {
|
|
70861
|
-
const { path:
|
|
70861
|
+
const { path: path22, method, body, headers } = opts;
|
|
70862
70862
|
return {
|
|
70863
|
-
path:
|
|
70863
|
+
path: path22,
|
|
70864
70864
|
method,
|
|
70865
70865
|
body,
|
|
70866
70866
|
headers
|
|
@@ -73796,11 +73796,11 @@ var require_fetch = __commonJS({
|
|
|
73796
73796
|
const { request } = fetchParams;
|
|
73797
73797
|
const {
|
|
73798
73798
|
protocol: scheme,
|
|
73799
|
-
pathname:
|
|
73799
|
+
pathname: path22
|
|
73800
73800
|
} = new URL(requestCurrentURL(request));
|
|
73801
73801
|
switch (scheme) {
|
|
73802
73802
|
case "about:": {
|
|
73803
|
-
if (
|
|
73803
|
+
if (path22 === "blank") {
|
|
73804
73804
|
const resp = makeResponse({
|
|
73805
73805
|
statusText: "OK",
|
|
73806
73806
|
headersList: [
|
|
@@ -74423,6 +74423,158 @@ var require_undici = __commonJS({
|
|
|
74423
74423
|
}
|
|
74424
74424
|
});
|
|
74425
74425
|
|
|
74426
|
+
// ../../node_modules/@webcontainer/env/dist/index.js
|
|
74427
|
+
var require_dist = __commonJS({
|
|
74428
|
+
"../../node_modules/@webcontainer/env/dist/index.js"(exports2, module2) {
|
|
74429
|
+
init_import_meta_url();
|
|
74430
|
+
var c = Object.defineProperty;
|
|
74431
|
+
var U = Object.getOwnPropertyDescriptor;
|
|
74432
|
+
var d = Object.getOwnPropertyNames;
|
|
74433
|
+
var y = Object.prototype.hasOwnProperty;
|
|
74434
|
+
var o = (r, t2) => c(r, "name", { value: t2, configurable: true });
|
|
74435
|
+
var v = (r, t2) => {
|
|
74436
|
+
for (var e2 in t2)
|
|
74437
|
+
c(r, e2, { get: t2[e2], enumerable: true });
|
|
74438
|
+
};
|
|
74439
|
+
var b = (r, t2, e2, a) => {
|
|
74440
|
+
if (t2 && typeof t2 == "object" || typeof t2 == "function")
|
|
74441
|
+
for (let s of d(t2))
|
|
74442
|
+
!y.call(r, s) && s !== e2 && c(r, s, { get: () => t2[s], enumerable: !(a = U(t2, s)) || a.enumerable });
|
|
74443
|
+
return r;
|
|
74444
|
+
};
|
|
74445
|
+
var x = (r) => b(c({}, "__esModule", { value: true }), r);
|
|
74446
|
+
var R = {};
|
|
74447
|
+
v(R, { HostURL: () => n, isWebContainer: () => u });
|
|
74448
|
+
module2.exports = x(R);
|
|
74449
|
+
var L = /^([^.]+)--(\d+)\.(.+)$/;
|
|
74450
|
+
var S = /^localhost|^127\.0\.0\.1/;
|
|
74451
|
+
function _(r) {
|
|
74452
|
+
return L.test(r);
|
|
74453
|
+
}
|
|
74454
|
+
o(_, "isServiceUrl");
|
|
74455
|
+
function p(r) {
|
|
74456
|
+
return S.test(r);
|
|
74457
|
+
}
|
|
74458
|
+
o(p, "isLocalhost");
|
|
74459
|
+
function g({ appId: r, port: t2, host: e2 }, a = true) {
|
|
74460
|
+
try {
|
|
74461
|
+
e2 = new URL(e2).host;
|
|
74462
|
+
} catch {
|
|
74463
|
+
}
|
|
74464
|
+
let s = p(e2) ? "http" : "https";
|
|
74465
|
+
return `${a ? `${s}://` : ""}${r}--${t2}.${e2}`;
|
|
74466
|
+
}
|
|
74467
|
+
o(g, "getServiceUrl");
|
|
74468
|
+
var h;
|
|
74469
|
+
try {
|
|
74470
|
+
h = require("@blitz/env");
|
|
74471
|
+
} catch (r) {
|
|
74472
|
+
}
|
|
74473
|
+
function u() {
|
|
74474
|
+
return h != null && process.versions.webcontainer != null;
|
|
74475
|
+
}
|
|
74476
|
+
o(u, "isWebContainer");
|
|
74477
|
+
function l(r) {
|
|
74478
|
+
var e2;
|
|
74479
|
+
let t2 = h == null ? void 0 : h.getInitOptions();
|
|
74480
|
+
if (!t2 || !t2.server)
|
|
74481
|
+
throw new Error("Failed to construct service URL");
|
|
74482
|
+
return g({ appId: (e2 = t2.appId) != null ? e2 : "blitz", host: t2.server, port: r }, false);
|
|
74483
|
+
}
|
|
74484
|
+
o(l, "_createServiceURL");
|
|
74485
|
+
var n = class {
|
|
74486
|
+
constructor(t2) {
|
|
74487
|
+
this._url = t2;
|
|
74488
|
+
if (this._port = this._url.port, u() && p(this._url.hostname)) {
|
|
74489
|
+
let e2 = l(this._port);
|
|
74490
|
+
this._url.host = e2, this._port === this._url.port && (this._url.port = "");
|
|
74491
|
+
}
|
|
74492
|
+
}
|
|
74493
|
+
static parse(t2) {
|
|
74494
|
+
return t2 = typeof t2 == "string" ? new URL(t2) : t2, new n(t2);
|
|
74495
|
+
}
|
|
74496
|
+
get port() {
|
|
74497
|
+
return u() ? this._port : this._url.port;
|
|
74498
|
+
}
|
|
74499
|
+
get hash() {
|
|
74500
|
+
return this._url.hash;
|
|
74501
|
+
}
|
|
74502
|
+
get host() {
|
|
74503
|
+
return this._url.host;
|
|
74504
|
+
}
|
|
74505
|
+
get hostname() {
|
|
74506
|
+
return this._url.hostname;
|
|
74507
|
+
}
|
|
74508
|
+
get href() {
|
|
74509
|
+
return this._url.href;
|
|
74510
|
+
}
|
|
74511
|
+
get origin() {
|
|
74512
|
+
return this._url.origin;
|
|
74513
|
+
}
|
|
74514
|
+
get username() {
|
|
74515
|
+
return this._url.username;
|
|
74516
|
+
}
|
|
74517
|
+
get password() {
|
|
74518
|
+
return this._url.password;
|
|
74519
|
+
}
|
|
74520
|
+
get pathname() {
|
|
74521
|
+
return this._url.pathname;
|
|
74522
|
+
}
|
|
74523
|
+
get protocol() {
|
|
74524
|
+
return this._url.protocol;
|
|
74525
|
+
}
|
|
74526
|
+
get search() {
|
|
74527
|
+
return this._url.search;
|
|
74528
|
+
}
|
|
74529
|
+
get searchParams() {
|
|
74530
|
+
return this._url.searchParams;
|
|
74531
|
+
}
|
|
74532
|
+
update(t2) {
|
|
74533
|
+
var a;
|
|
74534
|
+
let e2 = u();
|
|
74535
|
+
for (let s in t2) {
|
|
74536
|
+
let i2 = (a = t2[s]) != null ? a : "";
|
|
74537
|
+
if (e2)
|
|
74538
|
+
switch (s) {
|
|
74539
|
+
case "port": {
|
|
74540
|
+
if (this._port = i2, (p(this._url.hostname) || _(this._url.hostname)) && (this._url.host = l(i2), this._port !== this._url.port))
|
|
74541
|
+
continue;
|
|
74542
|
+
break;
|
|
74543
|
+
}
|
|
74544
|
+
case "host": {
|
|
74545
|
+
let [m, f = this._port] = i2.split(":");
|
|
74546
|
+
this._port = f, p(m) && (i2 = l(f));
|
|
74547
|
+
break;
|
|
74548
|
+
}
|
|
74549
|
+
case "hostname": {
|
|
74550
|
+
if (p(i2)) {
|
|
74551
|
+
if (/\/|:/.test(i2))
|
|
74552
|
+
continue;
|
|
74553
|
+
i2 = l(this._port);
|
|
74554
|
+
} else
|
|
74555
|
+
this._url.port = this._port;
|
|
74556
|
+
break;
|
|
74557
|
+
}
|
|
74558
|
+
case "href": {
|
|
74559
|
+
this._url = n.parse(i2);
|
|
74560
|
+
continue;
|
|
74561
|
+
}
|
|
74562
|
+
}
|
|
74563
|
+
this._url[s] = i2;
|
|
74564
|
+
}
|
|
74565
|
+
return this;
|
|
74566
|
+
}
|
|
74567
|
+
toString() {
|
|
74568
|
+
return this._url.toString();
|
|
74569
|
+
}
|
|
74570
|
+
toJSON() {
|
|
74571
|
+
return this._url.toJSON();
|
|
74572
|
+
}
|
|
74573
|
+
};
|
|
74574
|
+
o(n, "HostURL");
|
|
74575
|
+
}
|
|
74576
|
+
});
|
|
74577
|
+
|
|
74426
74578
|
// ../../node_modules/lodash.isequal/index.js
|
|
74427
74579
|
var require_lodash2 = __commonJS({
|
|
74428
74580
|
"../../node_modules/lodash.isequal/index.js"(exports2, module2) {
|
|
@@ -75785,7 +75937,7 @@ var require_object_hash = __commonJS({
|
|
|
75785
75937
|
});
|
|
75786
75938
|
|
|
75787
75939
|
// ../../node_modules/ink-table/dist/index.js
|
|
75788
|
-
var
|
|
75940
|
+
var require_dist2 = __commonJS({
|
|
75789
75941
|
"../../node_modules/ink-table/dist/index.js"(exports2) {
|
|
75790
75942
|
"use strict";
|
|
75791
75943
|
init_import_meta_url();
|
|
@@ -76041,13 +76193,13 @@ var require_define_lazy_prop = __commonJS({
|
|
|
76041
76193
|
var require_open = __commonJS({
|
|
76042
76194
|
"../../node_modules/open/index.js"(exports2, module2) {
|
|
76043
76195
|
init_import_meta_url();
|
|
76044
|
-
var
|
|
76196
|
+
var path22 = require("path");
|
|
76045
76197
|
var childProcess2 = require("child_process");
|
|
76046
76198
|
var { promises: fs9, constants: fsConstants } = require("fs");
|
|
76047
76199
|
var isWsl = require_is_wsl();
|
|
76048
76200
|
var isDocker = require_is_docker();
|
|
76049
76201
|
var defineLazyProperty = require_define_lazy_prop();
|
|
76050
|
-
var localXdgOpenPath =
|
|
76202
|
+
var localXdgOpenPath = path22.join(__dirname, "xdg-open");
|
|
76051
76203
|
var { platform, arch: arch2 } = process;
|
|
76052
76204
|
var getWslDrivesMountPoint = (() => {
|
|
76053
76205
|
const defaultMountPoint = "/mnt/";
|
|
@@ -76277,7 +76429,7 @@ var require_constants4 = __commonJS({
|
|
|
76277
76429
|
"../../node_modules/picomatch/lib/constants.js"(exports2, module2) {
|
|
76278
76430
|
"use strict";
|
|
76279
76431
|
init_import_meta_url();
|
|
76280
|
-
var
|
|
76432
|
+
var path22 = require("path");
|
|
76281
76433
|
var WIN_SLASH = "\\\\/";
|
|
76282
76434
|
var WIN_NO_SLASH = `[^${WIN_SLASH}]`;
|
|
76283
76435
|
var DOT_LITERAL = "\\.";
|
|
@@ -76399,7 +76551,7 @@ var require_constants4 = __commonJS({
|
|
|
76399
76551
|
CHAR_UNDERSCORE: 95,
|
|
76400
76552
|
CHAR_VERTICAL_LINE: 124,
|
|
76401
76553
|
CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
|
|
76402
|
-
SEP:
|
|
76554
|
+
SEP: path22.sep,
|
|
76403
76555
|
extglobChars(chars) {
|
|
76404
76556
|
return {
|
|
76405
76557
|
"!": { type: "negate", open: "(?:(?!(?:", close: `))${chars.STAR})` },
|
|
@@ -76421,7 +76573,7 @@ var require_utils2 = __commonJS({
|
|
|
76421
76573
|
"../../node_modules/picomatch/lib/utils.js"(exports2) {
|
|
76422
76574
|
"use strict";
|
|
76423
76575
|
init_import_meta_url();
|
|
76424
|
-
var
|
|
76576
|
+
var path22 = require("path");
|
|
76425
76577
|
var win32 = process.platform === "win32";
|
|
76426
76578
|
var {
|
|
76427
76579
|
REGEX_BACKSLASH,
|
|
@@ -76450,7 +76602,7 @@ var require_utils2 = __commonJS({
|
|
|
76450
76602
|
if (options && typeof options.windows === "boolean") {
|
|
76451
76603
|
return options.windows;
|
|
76452
76604
|
}
|
|
76453
|
-
return win32 === true ||
|
|
76605
|
+
return win32 === true || path22.sep === "\\";
|
|
76454
76606
|
};
|
|
76455
76607
|
exports2.escapeLast = (input, char, lastIdx) => {
|
|
76456
76608
|
const idx = input.lastIndexOf(char, lastIdx);
|
|
@@ -77586,7 +77738,7 @@ var require_picomatch = __commonJS({
|
|
|
77586
77738
|
"../../node_modules/picomatch/lib/picomatch.js"(exports2, module2) {
|
|
77587
77739
|
"use strict";
|
|
77588
77740
|
init_import_meta_url();
|
|
77589
|
-
var
|
|
77741
|
+
var path22 = require("path");
|
|
77590
77742
|
var scan = require_scan();
|
|
77591
77743
|
var parse = require_parse3();
|
|
77592
77744
|
var utils = require_utils2();
|
|
@@ -77672,7 +77824,7 @@ var require_picomatch = __commonJS({
|
|
|
77672
77824
|
};
|
|
77673
77825
|
picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
|
|
77674
77826
|
const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
|
|
77675
|
-
return regex.test(
|
|
77827
|
+
return regex.test(path22.basename(input));
|
|
77676
77828
|
};
|
|
77677
77829
|
picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
|
|
77678
77830
|
picomatch.parse = (pattern, options) => {
|
|
@@ -77793,8 +77945,8 @@ var require_readdirp = __commonJS({
|
|
|
77793
77945
|
static get defaultOptions() {
|
|
77794
77946
|
return {
|
|
77795
77947
|
root: ".",
|
|
77796
|
-
fileFilter: (
|
|
77797
|
-
directoryFilter: (
|
|
77948
|
+
fileFilter: (path22) => true,
|
|
77949
|
+
directoryFilter: (path22) => true,
|
|
77798
77950
|
type: FILE_TYPE,
|
|
77799
77951
|
lstat: false,
|
|
77800
77952
|
depth: 2147483648,
|
|
@@ -77813,7 +77965,7 @@ var require_readdirp = __commonJS({
|
|
|
77813
77965
|
this._directoryFilter = normalizeFilter(opts.directoryFilter);
|
|
77814
77966
|
const statMethod = opts.lstat ? lstat3 : stat3;
|
|
77815
77967
|
if (wantBigintFsStats) {
|
|
77816
|
-
this._stat = (
|
|
77968
|
+
this._stat = (path22) => statMethod(path22, { bigint: true });
|
|
77817
77969
|
} else {
|
|
77818
77970
|
this._stat = statMethod;
|
|
77819
77971
|
}
|
|
@@ -77835,9 +77987,9 @@ var require_readdirp = __commonJS({
|
|
|
77835
77987
|
this.reading = true;
|
|
77836
77988
|
try {
|
|
77837
77989
|
while (!this.destroyed && batch > 0) {
|
|
77838
|
-
const { path:
|
|
77990
|
+
const { path: path22, depth, files: files2 = [] } = this.parent || {};
|
|
77839
77991
|
if (files2.length > 0) {
|
|
77840
|
-
const slice = files2.splice(0, batch).map((dirent) => this._formatEntry(dirent,
|
|
77992
|
+
const slice = files2.splice(0, batch).map((dirent) => this._formatEntry(dirent, path22));
|
|
77841
77993
|
for (const entry of await Promise.all(slice)) {
|
|
77842
77994
|
if (this.destroyed)
|
|
77843
77995
|
return;
|
|
@@ -77874,20 +78026,20 @@ var require_readdirp = __commonJS({
|
|
|
77874
78026
|
this.reading = false;
|
|
77875
78027
|
}
|
|
77876
78028
|
}
|
|
77877
|
-
async _exploreDir(
|
|
78029
|
+
async _exploreDir(path22, depth) {
|
|
77878
78030
|
let files2;
|
|
77879
78031
|
try {
|
|
77880
|
-
files2 = await readdir3(
|
|
78032
|
+
files2 = await readdir3(path22, this._rdOptions);
|
|
77881
78033
|
} catch (error) {
|
|
77882
78034
|
this._onError(error);
|
|
77883
78035
|
}
|
|
77884
|
-
return { files: files2, depth, path:
|
|
78036
|
+
return { files: files2, depth, path: path22 };
|
|
77885
78037
|
}
|
|
77886
|
-
async _formatEntry(dirent,
|
|
78038
|
+
async _formatEntry(dirent, path22) {
|
|
77887
78039
|
let entry;
|
|
77888
78040
|
try {
|
|
77889
78041
|
const basename4 = this._isDirent ? dirent.name : dirent;
|
|
77890
|
-
const fullPath = sysPath.resolve(sysPath.join(
|
|
78042
|
+
const fullPath = sysPath.resolve(sysPath.join(path22, basename4));
|
|
77891
78043
|
entry = { path: sysPath.relative(this._root, fullPath), fullPath, basename: basename4 };
|
|
77892
78044
|
entry[this._statsProp] = this._isDirent ? dirent : await this._stat(fullPath);
|
|
77893
78045
|
} catch (err2) {
|
|
@@ -77973,24 +78125,24 @@ var require_readdirp = __commonJS({
|
|
|
77973
78125
|
var require_normalize_path = __commonJS({
|
|
77974
78126
|
"../../node_modules/normalize-path/index.js"(exports2, module2) {
|
|
77975
78127
|
init_import_meta_url();
|
|
77976
|
-
module2.exports = function(
|
|
77977
|
-
if (typeof
|
|
78128
|
+
module2.exports = function(path22, stripTrailing) {
|
|
78129
|
+
if (typeof path22 !== "string") {
|
|
77978
78130
|
throw new TypeError("expected path to be a string");
|
|
77979
78131
|
}
|
|
77980
|
-
if (
|
|
78132
|
+
if (path22 === "\\" || path22 === "/")
|
|
77981
78133
|
return "/";
|
|
77982
|
-
var len =
|
|
78134
|
+
var len = path22.length;
|
|
77983
78135
|
if (len <= 1)
|
|
77984
|
-
return
|
|
78136
|
+
return path22;
|
|
77985
78137
|
var prefix2 = "";
|
|
77986
|
-
if (len > 4 &&
|
|
77987
|
-
var ch =
|
|
77988
|
-
if ((ch === "?" || ch === ".") &&
|
|
77989
|
-
|
|
78138
|
+
if (len > 4 && path22[3] === "\\") {
|
|
78139
|
+
var ch = path22[2];
|
|
78140
|
+
if ((ch === "?" || ch === ".") && path22.slice(0, 2) === "\\\\") {
|
|
78141
|
+
path22 = path22.slice(2);
|
|
77990
78142
|
prefix2 = "//";
|
|
77991
78143
|
}
|
|
77992
78144
|
}
|
|
77993
|
-
var segs =
|
|
78145
|
+
var segs = path22.split(/[/\\]+/);
|
|
77994
78146
|
if (stripTrailing !== false && segs[segs.length - 1] === "") {
|
|
77995
78147
|
segs.pop();
|
|
77996
78148
|
}
|
|
@@ -78029,17 +78181,17 @@ var require_anymatch = __commonJS({
|
|
|
78029
78181
|
if (!isList2 && typeof _path !== "string") {
|
|
78030
78182
|
throw new TypeError("anymatch: second argument must be a string: got " + Object.prototype.toString.call(_path));
|
|
78031
78183
|
}
|
|
78032
|
-
const
|
|
78184
|
+
const path22 = normalizePath(_path);
|
|
78033
78185
|
for (let index = 0; index < negPatterns.length; index++) {
|
|
78034
78186
|
const nglob = negPatterns[index];
|
|
78035
|
-
if (nglob(
|
|
78187
|
+
if (nglob(path22)) {
|
|
78036
78188
|
return returnIndex ? -1 : false;
|
|
78037
78189
|
}
|
|
78038
78190
|
}
|
|
78039
|
-
const applied = isList2 && [
|
|
78191
|
+
const applied = isList2 && [path22].concat(args.slice(1));
|
|
78040
78192
|
for (let index = 0; index < patterns.length; index++) {
|
|
78041
78193
|
const pattern = patterns[index];
|
|
78042
|
-
if (isList2 ? pattern(...applied) : pattern(
|
|
78194
|
+
if (isList2 ? pattern(...applied) : pattern(path22)) {
|
|
78043
78195
|
return returnIndex ? index : true;
|
|
78044
78196
|
}
|
|
78045
78197
|
}
|
|
@@ -79583,10 +79735,10 @@ var require_is_binary_path = __commonJS({
|
|
|
79583
79735
|
"../../node_modules/is-binary-path/index.js"(exports2, module2) {
|
|
79584
79736
|
"use strict";
|
|
79585
79737
|
init_import_meta_url();
|
|
79586
|
-
var
|
|
79738
|
+
var path22 = require("path");
|
|
79587
79739
|
var binaryExtensions = require_binary_extensions2();
|
|
79588
79740
|
var extensions = new Set(binaryExtensions);
|
|
79589
|
-
module2.exports = (filePath) => extensions.has(
|
|
79741
|
+
module2.exports = (filePath) => extensions.has(path22.extname(filePath).slice(1).toLowerCase());
|
|
79590
79742
|
}
|
|
79591
79743
|
});
|
|
79592
79744
|
|
|
@@ -79720,16 +79872,16 @@ var require_nodefs_handler = __commonJS({
|
|
|
79720
79872
|
};
|
|
79721
79873
|
var isEmptySet = (val) => val instanceof Set ? val.size === 0 : !val;
|
|
79722
79874
|
var FsWatchInstances = /* @__PURE__ */ new Map();
|
|
79723
|
-
function createFsWatchInstance(
|
|
79875
|
+
function createFsWatchInstance(path22, options, listener, errHandler, emitRaw) {
|
|
79724
79876
|
const handleEvent = (rawEvent, evPath) => {
|
|
79725
|
-
listener(
|
|
79726
|
-
emitRaw(rawEvent, evPath, { watchedPath:
|
|
79727
|
-
if (evPath &&
|
|
79728
|
-
fsWatchBroadcast(sysPath.resolve(
|
|
79877
|
+
listener(path22);
|
|
79878
|
+
emitRaw(rawEvent, evPath, { watchedPath: path22 });
|
|
79879
|
+
if (evPath && path22 !== evPath) {
|
|
79880
|
+
fsWatchBroadcast(sysPath.resolve(path22, evPath), KEY_LISTENERS, sysPath.join(path22, evPath));
|
|
79729
79881
|
}
|
|
79730
79882
|
};
|
|
79731
79883
|
try {
|
|
79732
|
-
return fs9.watch(
|
|
79884
|
+
return fs9.watch(path22, options, handleEvent);
|
|
79733
79885
|
} catch (error) {
|
|
79734
79886
|
errHandler(error);
|
|
79735
79887
|
}
|
|
@@ -79742,12 +79894,12 @@ var require_nodefs_handler = __commonJS({
|
|
|
79742
79894
|
listener(val1, val2, val3);
|
|
79743
79895
|
});
|
|
79744
79896
|
};
|
|
79745
|
-
var setFsWatchListener = (
|
|
79897
|
+
var setFsWatchListener = (path22, fullPath, options, handlers) => {
|
|
79746
79898
|
const { listener, errHandler, rawEmitter } = handlers;
|
|
79747
79899
|
let cont = FsWatchInstances.get(fullPath);
|
|
79748
79900
|
let watcher;
|
|
79749
79901
|
if (!options.persistent) {
|
|
79750
|
-
watcher = createFsWatchInstance(
|
|
79902
|
+
watcher = createFsWatchInstance(path22, options, listener, errHandler, rawEmitter);
|
|
79751
79903
|
return watcher.close.bind(watcher);
|
|
79752
79904
|
}
|
|
79753
79905
|
if (cont) {
|
|
@@ -79755,7 +79907,7 @@ var require_nodefs_handler = __commonJS({
|
|
|
79755
79907
|
addAndConvert(cont, KEY_ERR, errHandler);
|
|
79756
79908
|
addAndConvert(cont, KEY_RAW, rawEmitter);
|
|
79757
79909
|
} else {
|
|
79758
|
-
watcher = createFsWatchInstance(
|
|
79910
|
+
watcher = createFsWatchInstance(path22, options, fsWatchBroadcast.bind(null, fullPath, KEY_LISTENERS), errHandler, fsWatchBroadcast.bind(null, fullPath, KEY_RAW));
|
|
79759
79911
|
if (!watcher)
|
|
79760
79912
|
return;
|
|
79761
79913
|
watcher.on(EV_ERROR, async (error) => {
|
|
@@ -79763,7 +79915,7 @@ var require_nodefs_handler = __commonJS({
|
|
|
79763
79915
|
cont.watcherUnusable = true;
|
|
79764
79916
|
if (isWindows2 && error.code === "EPERM") {
|
|
79765
79917
|
try {
|
|
79766
|
-
const fd = await open2(
|
|
79918
|
+
const fd = await open2(path22, "r");
|
|
79767
79919
|
await close(fd);
|
|
79768
79920
|
broadcastErr(error);
|
|
79769
79921
|
} catch (err2) {
|
|
@@ -79794,7 +79946,7 @@ var require_nodefs_handler = __commonJS({
|
|
|
79794
79946
|
};
|
|
79795
79947
|
};
|
|
79796
79948
|
var FsWatchFileInstances = /* @__PURE__ */ new Map();
|
|
79797
|
-
var setFsWatchFileListener = (
|
|
79949
|
+
var setFsWatchFileListener = (path22, fullPath, options, handlers) => {
|
|
79798
79950
|
const { listener, rawEmitter } = handlers;
|
|
79799
79951
|
let cont = FsWatchFileInstances.get(fullPath);
|
|
79800
79952
|
let listeners = /* @__PURE__ */ new Set();
|
|
@@ -79820,7 +79972,7 @@ var require_nodefs_handler = __commonJS({
|
|
|
79820
79972
|
});
|
|
79821
79973
|
const currmtime = curr.mtimeMs;
|
|
79822
79974
|
if (curr.size !== prev.size || currmtime > prev.mtimeMs || currmtime === 0) {
|
|
79823
|
-
foreach(cont.listeners, (listener2) => listener2(
|
|
79975
|
+
foreach(cont.listeners, (listener2) => listener2(path22, curr));
|
|
79824
79976
|
}
|
|
79825
79977
|
})
|
|
79826
79978
|
};
|
|
@@ -79842,25 +79994,25 @@ var require_nodefs_handler = __commonJS({
|
|
|
79842
79994
|
this.fsw = fsW;
|
|
79843
79995
|
this._boundHandleError = (error) => fsW._handleError(error);
|
|
79844
79996
|
}
|
|
79845
|
-
_watchWithNodeFs(
|
|
79997
|
+
_watchWithNodeFs(path22, listener) {
|
|
79846
79998
|
const opts = this.fsw.options;
|
|
79847
|
-
const directory = sysPath.dirname(
|
|
79848
|
-
const basename4 = sysPath.basename(
|
|
79999
|
+
const directory = sysPath.dirname(path22);
|
|
80000
|
+
const basename4 = sysPath.basename(path22);
|
|
79849
80001
|
const parent = this.fsw._getWatchedDir(directory);
|
|
79850
80002
|
parent.add(basename4);
|
|
79851
|
-
const absolutePath = sysPath.resolve(
|
|
80003
|
+
const absolutePath = sysPath.resolve(path22);
|
|
79852
80004
|
const options = { persistent: opts.persistent };
|
|
79853
80005
|
if (!listener)
|
|
79854
80006
|
listener = EMPTY_FN;
|
|
79855
80007
|
let closer;
|
|
79856
80008
|
if (opts.usePolling) {
|
|
79857
80009
|
options.interval = opts.enableBinaryInterval && isBinaryPath(basename4) ? opts.binaryInterval : opts.interval;
|
|
79858
|
-
closer = setFsWatchFileListener(
|
|
80010
|
+
closer = setFsWatchFileListener(path22, absolutePath, options, {
|
|
79859
80011
|
listener,
|
|
79860
80012
|
rawEmitter: this.fsw._emitRaw
|
|
79861
80013
|
});
|
|
79862
80014
|
} else {
|
|
79863
|
-
closer = setFsWatchListener(
|
|
80015
|
+
closer = setFsWatchListener(path22, absolutePath, options, {
|
|
79864
80016
|
listener,
|
|
79865
80017
|
errHandler: this._boundHandleError,
|
|
79866
80018
|
rawEmitter: this.fsw._emitRaw
|
|
@@ -79878,7 +80030,7 @@ var require_nodefs_handler = __commonJS({
|
|
|
79878
80030
|
let prevStats = stats;
|
|
79879
80031
|
if (parent.has(basename4))
|
|
79880
80032
|
return;
|
|
79881
|
-
const listener = async (
|
|
80033
|
+
const listener = async (path22, newStats) => {
|
|
79882
80034
|
if (!this.fsw._throttle(THROTTLE_MODE_WATCH, file, 5))
|
|
79883
80035
|
return;
|
|
79884
80036
|
if (!newStats || newStats.mtimeMs === 0) {
|
|
@@ -79892,9 +80044,9 @@ var require_nodefs_handler = __commonJS({
|
|
|
79892
80044
|
this.fsw._emit(EV_CHANGE, file, newStats2);
|
|
79893
80045
|
}
|
|
79894
80046
|
if (isLinux && prevStats.ino !== newStats2.ino) {
|
|
79895
|
-
this.fsw._closeFile(
|
|
80047
|
+
this.fsw._closeFile(path22);
|
|
79896
80048
|
prevStats = newStats2;
|
|
79897
|
-
this.fsw._addPathCloser(
|
|
80049
|
+
this.fsw._addPathCloser(path22, this._watchWithNodeFs(file, listener));
|
|
79898
80050
|
} else {
|
|
79899
80051
|
prevStats = newStats2;
|
|
79900
80052
|
}
|
|
@@ -79918,7 +80070,7 @@ var require_nodefs_handler = __commonJS({
|
|
|
79918
80070
|
}
|
|
79919
80071
|
return closer;
|
|
79920
80072
|
}
|
|
79921
|
-
async _handleSymlink(entry, directory,
|
|
80073
|
+
async _handleSymlink(entry, directory, path22, item) {
|
|
79922
80074
|
if (this.fsw.closed) {
|
|
79923
80075
|
return;
|
|
79924
80076
|
}
|
|
@@ -79928,7 +80080,7 @@ var require_nodefs_handler = __commonJS({
|
|
|
79928
80080
|
this.fsw._incrReadyCount();
|
|
79929
80081
|
let linkPath;
|
|
79930
80082
|
try {
|
|
79931
|
-
linkPath = await fsrealpath(
|
|
80083
|
+
linkPath = await fsrealpath(path22);
|
|
79932
80084
|
} catch (e2) {
|
|
79933
80085
|
this.fsw._emitReady();
|
|
79934
80086
|
return true;
|
|
@@ -79938,12 +80090,12 @@ var require_nodefs_handler = __commonJS({
|
|
|
79938
80090
|
if (dir.has(item)) {
|
|
79939
80091
|
if (this.fsw._symlinkPaths.get(full) !== linkPath) {
|
|
79940
80092
|
this.fsw._symlinkPaths.set(full, linkPath);
|
|
79941
|
-
this.fsw._emit(EV_CHANGE,
|
|
80093
|
+
this.fsw._emit(EV_CHANGE, path22, entry.stats);
|
|
79942
80094
|
}
|
|
79943
80095
|
} else {
|
|
79944
80096
|
dir.add(item);
|
|
79945
80097
|
this.fsw._symlinkPaths.set(full, linkPath);
|
|
79946
|
-
this.fsw._emit(EV_ADD,
|
|
80098
|
+
this.fsw._emit(EV_ADD, path22, entry.stats);
|
|
79947
80099
|
}
|
|
79948
80100
|
this.fsw._emitReady();
|
|
79949
80101
|
return true;
|
|
@@ -79972,9 +80124,9 @@ var require_nodefs_handler = __commonJS({
|
|
|
79972
80124
|
return;
|
|
79973
80125
|
}
|
|
79974
80126
|
const item = entry.path;
|
|
79975
|
-
let
|
|
80127
|
+
let path22 = sysPath.join(directory, item);
|
|
79976
80128
|
current.add(item);
|
|
79977
|
-
if (entry.stats.isSymbolicLink() && await this._handleSymlink(entry, directory,
|
|
80129
|
+
if (entry.stats.isSymbolicLink() && await this._handleSymlink(entry, directory, path22, item)) {
|
|
79978
80130
|
return;
|
|
79979
80131
|
}
|
|
79980
80132
|
if (this.fsw.closed) {
|
|
@@ -79983,8 +80135,8 @@ var require_nodefs_handler = __commonJS({
|
|
|
79983
80135
|
}
|
|
79984
80136
|
if (item === target || !target && !previous.has(item)) {
|
|
79985
80137
|
this.fsw._incrReadyCount();
|
|
79986
|
-
|
|
79987
|
-
this._addToNodeFs(
|
|
80138
|
+
path22 = sysPath.join(dir, sysPath.relative(dir, path22));
|
|
80139
|
+
this._addToNodeFs(path22, initialAdd, wh, depth + 1);
|
|
79988
80140
|
}
|
|
79989
80141
|
}).on(EV_ERROR, this._boundHandleError);
|
|
79990
80142
|
return new Promise((resolve11) => stream.once(STR_END, () => {
|
|
@@ -80032,13 +80184,13 @@ var require_nodefs_handler = __commonJS({
|
|
|
80032
80184
|
}
|
|
80033
80185
|
return closer;
|
|
80034
80186
|
}
|
|
80035
|
-
async _addToNodeFs(
|
|
80187
|
+
async _addToNodeFs(path22, initialAdd, priorWh, depth, target) {
|
|
80036
80188
|
const ready = this.fsw._emitReady;
|
|
80037
|
-
if (this.fsw._isIgnored(
|
|
80189
|
+
if (this.fsw._isIgnored(path22) || this.fsw.closed) {
|
|
80038
80190
|
ready();
|
|
80039
80191
|
return false;
|
|
80040
80192
|
}
|
|
80041
|
-
const wh = this.fsw._getWatchHelpers(
|
|
80193
|
+
const wh = this.fsw._getWatchHelpers(path22, depth);
|
|
80042
80194
|
if (!wh.hasGlob && priorWh) {
|
|
80043
80195
|
wh.hasGlob = priorWh.hasGlob;
|
|
80044
80196
|
wh.globFilter = priorWh.globFilter;
|
|
@@ -80053,11 +80205,11 @@ var require_nodefs_handler = __commonJS({
|
|
|
80053
80205
|
ready();
|
|
80054
80206
|
return false;
|
|
80055
80207
|
}
|
|
80056
|
-
const follow = this.fsw.options.followSymlinks && !
|
|
80208
|
+
const follow = this.fsw.options.followSymlinks && !path22.includes(STAR) && !path22.includes(BRACE_START);
|
|
80057
80209
|
let closer;
|
|
80058
80210
|
if (stats.isDirectory()) {
|
|
80059
|
-
const absPath = sysPath.resolve(
|
|
80060
|
-
const targetPath = follow ? await fsrealpath(
|
|
80211
|
+
const absPath = sysPath.resolve(path22);
|
|
80212
|
+
const targetPath = follow ? await fsrealpath(path22) : path22;
|
|
80061
80213
|
if (this.fsw.closed)
|
|
80062
80214
|
return;
|
|
80063
80215
|
closer = await this._handleDir(wh.watchPath, stats, initialAdd, depth, target, wh, targetPath);
|
|
@@ -80067,28 +80219,28 @@ var require_nodefs_handler = __commonJS({
|
|
|
80067
80219
|
this.fsw._symlinkPaths.set(absPath, targetPath);
|
|
80068
80220
|
}
|
|
80069
80221
|
} else if (stats.isSymbolicLink()) {
|
|
80070
|
-
const targetPath = follow ? await fsrealpath(
|
|
80222
|
+
const targetPath = follow ? await fsrealpath(path22) : path22;
|
|
80071
80223
|
if (this.fsw.closed)
|
|
80072
80224
|
return;
|
|
80073
80225
|
const parent = sysPath.dirname(wh.watchPath);
|
|
80074
80226
|
this.fsw._getWatchedDir(parent).add(wh.watchPath);
|
|
80075
80227
|
this.fsw._emit(EV_ADD, wh.watchPath, stats);
|
|
80076
|
-
closer = await this._handleDir(parent, stats, initialAdd, depth,
|
|
80228
|
+
closer = await this._handleDir(parent, stats, initialAdd, depth, path22, wh, targetPath);
|
|
80077
80229
|
if (this.fsw.closed)
|
|
80078
80230
|
return;
|
|
80079
80231
|
if (targetPath !== void 0) {
|
|
80080
|
-
this.fsw._symlinkPaths.set(sysPath.resolve(
|
|
80232
|
+
this.fsw._symlinkPaths.set(sysPath.resolve(path22), targetPath);
|
|
80081
80233
|
}
|
|
80082
80234
|
} else {
|
|
80083
80235
|
closer = this._handleFile(wh.watchPath, stats, initialAdd);
|
|
80084
80236
|
}
|
|
80085
80237
|
ready();
|
|
80086
|
-
this.fsw._addPathCloser(
|
|
80238
|
+
this.fsw._addPathCloser(path22, closer);
|
|
80087
80239
|
return false;
|
|
80088
80240
|
} catch (error) {
|
|
80089
80241
|
if (this.fsw._handleError(error)) {
|
|
80090
80242
|
ready();
|
|
80091
|
-
return
|
|
80243
|
+
return path22;
|
|
80092
80244
|
}
|
|
80093
80245
|
}
|
|
80094
80246
|
}
|
|
@@ -80162,18 +80314,18 @@ var require_fsevents_handler = __commonJS({
|
|
|
80162
80314
|
131840,
|
|
80163
80315
|
262912
|
|
80164
80316
|
]);
|
|
80165
|
-
var createFSEventsInstance = (
|
|
80166
|
-
const stop = fsevents.watch(
|
|
80317
|
+
var createFSEventsInstance = (path22, callback) => {
|
|
80318
|
+
const stop = fsevents.watch(path22, callback);
|
|
80167
80319
|
return { stop };
|
|
80168
80320
|
};
|
|
80169
|
-
function setFSEventsListener(
|
|
80321
|
+
function setFSEventsListener(path22, realPath, listener, rawEmitter) {
|
|
80170
80322
|
let watchPath = sysPath.extname(realPath) ? sysPath.dirname(realPath) : realPath;
|
|
80171
80323
|
const parentPath = sysPath.dirname(watchPath);
|
|
80172
80324
|
let cont = FSEventsWatchers.get(watchPath);
|
|
80173
80325
|
if (couldConsolidate(parentPath)) {
|
|
80174
80326
|
watchPath = parentPath;
|
|
80175
80327
|
}
|
|
80176
|
-
const resolvedPath = sysPath.resolve(
|
|
80328
|
+
const resolvedPath = sysPath.resolve(path22);
|
|
80177
80329
|
const hasSymlink = resolvedPath !== realPath;
|
|
80178
80330
|
const filteredListener = (fullPath, flags, info) => {
|
|
80179
80331
|
if (hasSymlink)
|
|
@@ -80221,10 +80373,10 @@ var require_fsevents_handler = __commonJS({
|
|
|
80221
80373
|
}
|
|
80222
80374
|
};
|
|
80223
80375
|
}
|
|
80224
|
-
var couldConsolidate = (
|
|
80376
|
+
var couldConsolidate = (path22) => {
|
|
80225
80377
|
let count = 0;
|
|
80226
80378
|
for (const watchPath of FSEventsWatchers.keys()) {
|
|
80227
|
-
if (watchPath.indexOf(
|
|
80379
|
+
if (watchPath.indexOf(path22) === 0) {
|
|
80228
80380
|
count++;
|
|
80229
80381
|
if (count >= consolidateThreshhold) {
|
|
80230
80382
|
return true;
|
|
@@ -80234,9 +80386,9 @@ var require_fsevents_handler = __commonJS({
|
|
|
80234
80386
|
return false;
|
|
80235
80387
|
};
|
|
80236
80388
|
var canUse = () => fsevents && FSEventsWatchers.size < 128;
|
|
80237
|
-
var calcDepth = (
|
|
80389
|
+
var calcDepth = (path22, root) => {
|
|
80238
80390
|
let i2 = 0;
|
|
80239
|
-
while (!
|
|
80391
|
+
while (!path22.indexOf(root) && (path22 = sysPath.dirname(path22)) !== root)
|
|
80240
80392
|
i2++;
|
|
80241
80393
|
return i2;
|
|
80242
80394
|
};
|
|
@@ -80245,42 +80397,42 @@ var require_fsevents_handler = __commonJS({
|
|
|
80245
80397
|
constructor(fsw) {
|
|
80246
80398
|
this.fsw = fsw;
|
|
80247
80399
|
}
|
|
80248
|
-
checkIgnored(
|
|
80400
|
+
checkIgnored(path22, stats) {
|
|
80249
80401
|
const ipaths = this.fsw._ignoredPaths;
|
|
80250
|
-
if (this.fsw._isIgnored(
|
|
80251
|
-
ipaths.add(
|
|
80402
|
+
if (this.fsw._isIgnored(path22, stats)) {
|
|
80403
|
+
ipaths.add(path22);
|
|
80252
80404
|
if (stats && stats.isDirectory()) {
|
|
80253
|
-
ipaths.add(
|
|
80405
|
+
ipaths.add(path22 + ROOT_GLOBSTAR);
|
|
80254
80406
|
}
|
|
80255
80407
|
return true;
|
|
80256
80408
|
}
|
|
80257
|
-
ipaths.delete(
|
|
80258
|
-
ipaths.delete(
|
|
80409
|
+
ipaths.delete(path22);
|
|
80410
|
+
ipaths.delete(path22 + ROOT_GLOBSTAR);
|
|
80259
80411
|
}
|
|
80260
|
-
addOrChange(
|
|
80412
|
+
addOrChange(path22, fullPath, realPath, parent, watchedDir, item, info, opts) {
|
|
80261
80413
|
const event = watchedDir.has(item) ? EV_CHANGE : EV_ADD;
|
|
80262
|
-
this.handleEvent(event,
|
|
80414
|
+
this.handleEvent(event, path22, fullPath, realPath, parent, watchedDir, item, info, opts);
|
|
80263
80415
|
}
|
|
80264
|
-
async checkExists(
|
|
80416
|
+
async checkExists(path22, fullPath, realPath, parent, watchedDir, item, info, opts) {
|
|
80265
80417
|
try {
|
|
80266
|
-
const stats = await stat3(
|
|
80418
|
+
const stats = await stat3(path22);
|
|
80267
80419
|
if (this.fsw.closed)
|
|
80268
80420
|
return;
|
|
80269
80421
|
if (sameTypes(info, stats)) {
|
|
80270
|
-
this.addOrChange(
|
|
80422
|
+
this.addOrChange(path22, fullPath, realPath, parent, watchedDir, item, info, opts);
|
|
80271
80423
|
} else {
|
|
80272
|
-
this.handleEvent(EV_UNLINK,
|
|
80424
|
+
this.handleEvent(EV_UNLINK, path22, fullPath, realPath, parent, watchedDir, item, info, opts);
|
|
80273
80425
|
}
|
|
80274
80426
|
} catch (error) {
|
|
80275
80427
|
if (error.code === "EACCES") {
|
|
80276
|
-
this.addOrChange(
|
|
80428
|
+
this.addOrChange(path22, fullPath, realPath, parent, watchedDir, item, info, opts);
|
|
80277
80429
|
} else {
|
|
80278
|
-
this.handleEvent(EV_UNLINK,
|
|
80430
|
+
this.handleEvent(EV_UNLINK, path22, fullPath, realPath, parent, watchedDir, item, info, opts);
|
|
80279
80431
|
}
|
|
80280
80432
|
}
|
|
80281
80433
|
}
|
|
80282
|
-
handleEvent(event,
|
|
80283
|
-
if (this.fsw.closed || this.checkIgnored(
|
|
80434
|
+
handleEvent(event, path22, fullPath, realPath, parent, watchedDir, item, info, opts) {
|
|
80435
|
+
if (this.fsw.closed || this.checkIgnored(path22))
|
|
80284
80436
|
return;
|
|
80285
80437
|
if (event === EV_UNLINK) {
|
|
80286
80438
|
const isDirectory = info.type === FSEVENT_TYPE_DIRECTORY;
|
|
@@ -80290,17 +80442,17 @@ var require_fsevents_handler = __commonJS({
|
|
|
80290
80442
|
} else {
|
|
80291
80443
|
if (event === EV_ADD) {
|
|
80292
80444
|
if (info.type === FSEVENT_TYPE_DIRECTORY)
|
|
80293
|
-
this.fsw._getWatchedDir(
|
|
80445
|
+
this.fsw._getWatchedDir(path22);
|
|
80294
80446
|
if (info.type === FSEVENT_TYPE_SYMLINK && opts.followSymlinks) {
|
|
80295
80447
|
const curDepth = opts.depth === void 0 ? void 0 : calcDepth(fullPath, realPath) + 1;
|
|
80296
|
-
return this._addToFsEvents(
|
|
80448
|
+
return this._addToFsEvents(path22, false, true, curDepth);
|
|
80297
80449
|
}
|
|
80298
80450
|
this.fsw._getWatchedDir(parent).add(item);
|
|
80299
80451
|
}
|
|
80300
80452
|
const eventName = info.type === FSEVENT_TYPE_DIRECTORY ? event + DIR_SUFFIX : event;
|
|
80301
|
-
this.fsw._emit(eventName,
|
|
80453
|
+
this.fsw._emit(eventName, path22);
|
|
80302
80454
|
if (eventName === EV_ADD_DIR)
|
|
80303
|
-
this._addToFsEvents(
|
|
80455
|
+
this._addToFsEvents(path22, false, true);
|
|
80304
80456
|
}
|
|
80305
80457
|
}
|
|
80306
80458
|
_watchWithFsEvents(watchPath, realPath, transform, globFilter) {
|
|
@@ -80312,39 +80464,39 @@ var require_fsevents_handler = __commonJS({
|
|
|
80312
80464
|
return;
|
|
80313
80465
|
if (opts.depth !== void 0 && calcDepth(fullPath, realPath) > opts.depth)
|
|
80314
80466
|
return;
|
|
80315
|
-
const
|
|
80316
|
-
if (globFilter && !globFilter(
|
|
80467
|
+
const path22 = transform(sysPath.join(watchPath, sysPath.relative(watchPath, fullPath)));
|
|
80468
|
+
if (globFilter && !globFilter(path22))
|
|
80317
80469
|
return;
|
|
80318
|
-
const parent = sysPath.dirname(
|
|
80319
|
-
const item = sysPath.basename(
|
|
80320
|
-
const watchedDir = this.fsw._getWatchedDir(info.type === FSEVENT_TYPE_DIRECTORY ?
|
|
80470
|
+
const parent = sysPath.dirname(path22);
|
|
80471
|
+
const item = sysPath.basename(path22);
|
|
80472
|
+
const watchedDir = this.fsw._getWatchedDir(info.type === FSEVENT_TYPE_DIRECTORY ? path22 : parent);
|
|
80321
80473
|
if (wrongEventFlags.has(flags) || info.event === FSEVENT_UNKNOWN) {
|
|
80322
80474
|
if (typeof opts.ignored === FUNCTION_TYPE) {
|
|
80323
80475
|
let stats;
|
|
80324
80476
|
try {
|
|
80325
|
-
stats = await stat3(
|
|
80477
|
+
stats = await stat3(path22);
|
|
80326
80478
|
} catch (error) {
|
|
80327
80479
|
}
|
|
80328
80480
|
if (this.fsw.closed)
|
|
80329
80481
|
return;
|
|
80330
|
-
if (this.checkIgnored(
|
|
80482
|
+
if (this.checkIgnored(path22, stats))
|
|
80331
80483
|
return;
|
|
80332
80484
|
if (sameTypes(info, stats)) {
|
|
80333
|
-
this.addOrChange(
|
|
80485
|
+
this.addOrChange(path22, fullPath, realPath, parent, watchedDir, item, info, opts);
|
|
80334
80486
|
} else {
|
|
80335
|
-
this.handleEvent(EV_UNLINK,
|
|
80487
|
+
this.handleEvent(EV_UNLINK, path22, fullPath, realPath, parent, watchedDir, item, info, opts);
|
|
80336
80488
|
}
|
|
80337
80489
|
} else {
|
|
80338
|
-
this.checkExists(
|
|
80490
|
+
this.checkExists(path22, fullPath, realPath, parent, watchedDir, item, info, opts);
|
|
80339
80491
|
}
|
|
80340
80492
|
} else {
|
|
80341
80493
|
switch (info.event) {
|
|
80342
80494
|
case FSEVENT_CREATED:
|
|
80343
80495
|
case FSEVENT_MODIFIED:
|
|
80344
|
-
return this.addOrChange(
|
|
80496
|
+
return this.addOrChange(path22, fullPath, realPath, parent, watchedDir, item, info, opts);
|
|
80345
80497
|
case FSEVENT_DELETED:
|
|
80346
80498
|
case FSEVENT_MOVED:
|
|
80347
|
-
return this.checkExists(
|
|
80499
|
+
return this.checkExists(path22, fullPath, realPath, parent, watchedDir, item, info, opts);
|
|
80348
80500
|
}
|
|
80349
80501
|
}
|
|
80350
80502
|
};
|
|
@@ -80365,12 +80517,12 @@ var require_fsevents_handler = __commonJS({
|
|
|
80365
80517
|
return this.fsw._emitReady();
|
|
80366
80518
|
}
|
|
80367
80519
|
this.fsw._incrReadyCount();
|
|
80368
|
-
this._addToFsEvents(linkTarget || linkPath, (
|
|
80520
|
+
this._addToFsEvents(linkTarget || linkPath, (path22) => {
|
|
80369
80521
|
let aliasedPath = linkPath;
|
|
80370
80522
|
if (linkTarget && linkTarget !== DOT_SLASH) {
|
|
80371
|
-
aliasedPath =
|
|
80372
|
-
} else if (
|
|
80373
|
-
aliasedPath = sysPath.join(linkPath,
|
|
80523
|
+
aliasedPath = path22.replace(linkTarget, linkPath);
|
|
80524
|
+
} else if (path22 !== DOT_SLASH) {
|
|
80525
|
+
aliasedPath = sysPath.join(linkPath, path22);
|
|
80374
80526
|
}
|
|
80375
80527
|
return transform(aliasedPath);
|
|
80376
80528
|
}, false, curDepth);
|
|
@@ -80394,19 +80546,19 @@ var require_fsevents_handler = __commonJS({
|
|
|
80394
80546
|
this.fsw._emit(isDir ? EV_ADD_DIR : EV_ADD, pp, stats);
|
|
80395
80547
|
}
|
|
80396
80548
|
}
|
|
80397
|
-
initWatch(realPath,
|
|
80549
|
+
initWatch(realPath, path22, wh, processPath) {
|
|
80398
80550
|
if (this.fsw.closed)
|
|
80399
80551
|
return;
|
|
80400
80552
|
const closer = this._watchWithFsEvents(wh.watchPath, sysPath.resolve(realPath || wh.watchPath), processPath, wh.globFilter);
|
|
80401
|
-
this.fsw._addPathCloser(
|
|
80553
|
+
this.fsw._addPathCloser(path22, closer);
|
|
80402
80554
|
}
|
|
80403
|
-
async _addToFsEvents(
|
|
80555
|
+
async _addToFsEvents(path22, transform, forceAdd, priorDepth) {
|
|
80404
80556
|
if (this.fsw.closed) {
|
|
80405
80557
|
return;
|
|
80406
80558
|
}
|
|
80407
80559
|
const opts = this.fsw.options;
|
|
80408
80560
|
const processPath = typeof transform === FUNCTION_TYPE ? transform : IDENTITY_FN;
|
|
80409
|
-
const wh = this.fsw._getWatchHelpers(
|
|
80561
|
+
const wh = this.fsw._getWatchHelpers(path22);
|
|
80410
80562
|
try {
|
|
80411
80563
|
const stats = await statMethods[wh.statMethod](wh.watchPath);
|
|
80412
80564
|
if (this.fsw.closed)
|
|
@@ -80416,7 +80568,7 @@ var require_fsevents_handler = __commonJS({
|
|
|
80416
80568
|
}
|
|
80417
80569
|
if (stats.isDirectory()) {
|
|
80418
80570
|
if (!wh.globFilter)
|
|
80419
|
-
this.emitAdd(processPath(
|
|
80571
|
+
this.emitAdd(processPath(path22), stats, processPath, opts, forceAdd);
|
|
80420
80572
|
if (priorDepth && priorDepth > opts.depth)
|
|
80421
80573
|
return;
|
|
80422
80574
|
this.fsw._readdirp(wh.watchPath, {
|
|
@@ -80452,14 +80604,14 @@ var require_fsevents_handler = __commonJS({
|
|
|
80452
80604
|
}
|
|
80453
80605
|
if (opts.persistent && forceAdd !== true) {
|
|
80454
80606
|
if (typeof transform === FUNCTION_TYPE) {
|
|
80455
|
-
this.initWatch(void 0,
|
|
80607
|
+
this.initWatch(void 0, path22, wh, processPath);
|
|
80456
80608
|
} else {
|
|
80457
80609
|
let realPath;
|
|
80458
80610
|
try {
|
|
80459
80611
|
realPath = await realpath(wh.watchPath);
|
|
80460
80612
|
} catch (e2) {
|
|
80461
80613
|
}
|
|
80462
|
-
this.initWatch(realPath,
|
|
80614
|
+
this.initWatch(realPath, path22, wh, processPath);
|
|
80463
80615
|
}
|
|
80464
80616
|
}
|
|
80465
80617
|
}
|
|
@@ -80554,20 +80706,20 @@ var require_chokidar = __commonJS({
|
|
|
80554
80706
|
}
|
|
80555
80707
|
return str;
|
|
80556
80708
|
};
|
|
80557
|
-
var normalizePathToUnix = (
|
|
80558
|
-
var normalizeIgnored = (cwd2 = EMPTY_STR) => (
|
|
80559
|
-
if (typeof
|
|
80560
|
-
return
|
|
80561
|
-
return normalizePathToUnix(sysPath.isAbsolute(
|
|
80709
|
+
var normalizePathToUnix = (path22) => toUnix(sysPath.normalize(toUnix(path22)));
|
|
80710
|
+
var normalizeIgnored = (cwd2 = EMPTY_STR) => (path22) => {
|
|
80711
|
+
if (typeof path22 !== STRING_TYPE)
|
|
80712
|
+
return path22;
|
|
80713
|
+
return normalizePathToUnix(sysPath.isAbsolute(path22) ? path22 : sysPath.join(cwd2, path22));
|
|
80562
80714
|
};
|
|
80563
|
-
var getAbsolutePath = (
|
|
80564
|
-
if (sysPath.isAbsolute(
|
|
80565
|
-
return
|
|
80715
|
+
var getAbsolutePath = (path22, cwd2) => {
|
|
80716
|
+
if (sysPath.isAbsolute(path22)) {
|
|
80717
|
+
return path22;
|
|
80566
80718
|
}
|
|
80567
|
-
if (
|
|
80568
|
-
return BANG + sysPath.join(cwd2,
|
|
80719
|
+
if (path22.startsWith(BANG)) {
|
|
80720
|
+
return BANG + sysPath.join(cwd2, path22.slice(1));
|
|
80569
80721
|
}
|
|
80570
|
-
return sysPath.join(cwd2,
|
|
80722
|
+
return sysPath.join(cwd2, path22);
|
|
80571
80723
|
};
|
|
80572
80724
|
var undef = (opts, key2) => opts[key2] === void 0;
|
|
80573
80725
|
var DirEntry = class {
|
|
@@ -80622,17 +80774,17 @@ var require_chokidar = __commonJS({
|
|
|
80622
80774
|
var STAT_METHOD_F = "stat";
|
|
80623
80775
|
var STAT_METHOD_L = "lstat";
|
|
80624
80776
|
var WatchHelper = class {
|
|
80625
|
-
constructor(
|
|
80777
|
+
constructor(path22, watchPath, follow, fsw) {
|
|
80626
80778
|
this.fsw = fsw;
|
|
80627
|
-
this.path =
|
|
80779
|
+
this.path = path22 = path22.replace(REPLACER_RE, EMPTY_STR);
|
|
80628
80780
|
this.watchPath = watchPath;
|
|
80629
80781
|
this.fullWatchPath = sysPath.resolve(watchPath);
|
|
80630
|
-
this.hasGlob = watchPath !==
|
|
80631
|
-
if (
|
|
80782
|
+
this.hasGlob = watchPath !== path22;
|
|
80783
|
+
if (path22 === EMPTY_STR)
|
|
80632
80784
|
this.hasGlob = false;
|
|
80633
80785
|
this.globSymlink = this.hasGlob && follow ? void 0 : false;
|
|
80634
|
-
this.globFilter = this.hasGlob ? anymatch(
|
|
80635
|
-
this.dirParts = this.getDirParts(
|
|
80786
|
+
this.globFilter = this.hasGlob ? anymatch(path22, void 0, ANYMATCH_OPTS) : false;
|
|
80787
|
+
this.dirParts = this.getDirParts(path22);
|
|
80636
80788
|
this.dirParts.forEach((parts) => {
|
|
80637
80789
|
if (parts.length > 1)
|
|
80638
80790
|
parts.pop();
|
|
@@ -80660,13 +80812,13 @@ var require_chokidar = __commonJS({
|
|
|
80660
80812
|
const matchesGlob = this.hasGlob && typeof this.globFilter === FUNCTION_TYPE ? this.globFilter(resolvedPath) : true;
|
|
80661
80813
|
return matchesGlob && this.fsw._isntIgnored(resolvedPath, stats) && this.fsw._hasReadPermissions(stats);
|
|
80662
80814
|
}
|
|
80663
|
-
getDirParts(
|
|
80815
|
+
getDirParts(path22) {
|
|
80664
80816
|
if (!this.hasGlob)
|
|
80665
80817
|
return [];
|
|
80666
80818
|
const parts = [];
|
|
80667
|
-
const expandedPath =
|
|
80668
|
-
expandedPath.forEach((
|
|
80669
|
-
parts.push(sysPath.relative(this.watchPath,
|
|
80819
|
+
const expandedPath = path22.includes(BRACE_START) ? braces.expand(path22) : [path22];
|
|
80820
|
+
expandedPath.forEach((path23) => {
|
|
80821
|
+
parts.push(sysPath.relative(this.watchPath, path23).split(SLASH_OR_BACK_SLASH_RE));
|
|
80670
80822
|
});
|
|
80671
80823
|
return parts;
|
|
80672
80824
|
}
|
|
@@ -80781,21 +80933,21 @@ var require_chokidar = __commonJS({
|
|
|
80781
80933
|
this.closed = false;
|
|
80782
80934
|
let paths = unifyPaths(paths_);
|
|
80783
80935
|
if (cwd2) {
|
|
80784
|
-
paths = paths.map((
|
|
80785
|
-
const absPath = getAbsolutePath(
|
|
80786
|
-
if (disableGlobbing || !isGlob(
|
|
80936
|
+
paths = paths.map((path22) => {
|
|
80937
|
+
const absPath = getAbsolutePath(path22, cwd2);
|
|
80938
|
+
if (disableGlobbing || !isGlob(path22)) {
|
|
80787
80939
|
return absPath;
|
|
80788
80940
|
}
|
|
80789
80941
|
return normalizePath(absPath);
|
|
80790
80942
|
});
|
|
80791
80943
|
}
|
|
80792
|
-
paths = paths.filter((
|
|
80793
|
-
if (
|
|
80794
|
-
this._ignoredPaths.add(
|
|
80944
|
+
paths = paths.filter((path22) => {
|
|
80945
|
+
if (path22.startsWith(BANG)) {
|
|
80946
|
+
this._ignoredPaths.add(path22.slice(1));
|
|
80795
80947
|
return false;
|
|
80796
80948
|
}
|
|
80797
|
-
this._ignoredPaths.delete(
|
|
80798
|
-
this._ignoredPaths.delete(
|
|
80949
|
+
this._ignoredPaths.delete(path22);
|
|
80950
|
+
this._ignoredPaths.delete(path22 + SLASH_GLOBSTAR);
|
|
80799
80951
|
this._userIgnored = void 0;
|
|
80800
80952
|
return true;
|
|
80801
80953
|
});
|
|
@@ -80804,13 +80956,13 @@ var require_chokidar = __commonJS({
|
|
|
80804
80956
|
this._readyCount = paths.length;
|
|
80805
80957
|
if (this.options.persistent)
|
|
80806
80958
|
this._readyCount *= 2;
|
|
80807
|
-
paths.forEach((
|
|
80959
|
+
paths.forEach((path22) => this._fsEventsHandler._addToFsEvents(path22));
|
|
80808
80960
|
} else {
|
|
80809
80961
|
if (!this._readyCount)
|
|
80810
80962
|
this._readyCount = 0;
|
|
80811
80963
|
this._readyCount += paths.length;
|
|
80812
|
-
Promise.all(paths.map(async (
|
|
80813
|
-
const res = await this._nodeFsHandler._addToNodeFs(
|
|
80964
|
+
Promise.all(paths.map(async (path22) => {
|
|
80965
|
+
const res = await this._nodeFsHandler._addToNodeFs(path22, !_internal, 0, 0, _origAdd);
|
|
80814
80966
|
if (res)
|
|
80815
80967
|
this._emitReady();
|
|
80816
80968
|
return res;
|
|
@@ -80829,16 +80981,16 @@ var require_chokidar = __commonJS({
|
|
|
80829
80981
|
return this;
|
|
80830
80982
|
const paths = unifyPaths(paths_);
|
|
80831
80983
|
const { cwd: cwd2 } = this.options;
|
|
80832
|
-
paths.forEach((
|
|
80833
|
-
if (!sysPath.isAbsolute(
|
|
80984
|
+
paths.forEach((path22) => {
|
|
80985
|
+
if (!sysPath.isAbsolute(path22) && !this._closers.has(path22)) {
|
|
80834
80986
|
if (cwd2)
|
|
80835
|
-
|
|
80836
|
-
|
|
80987
|
+
path22 = sysPath.join(cwd2, path22);
|
|
80988
|
+
path22 = sysPath.resolve(path22);
|
|
80837
80989
|
}
|
|
80838
|
-
this._closePath(
|
|
80839
|
-
this._ignoredPaths.add(
|
|
80840
|
-
if (this._watched.has(
|
|
80841
|
-
this._ignoredPaths.add(
|
|
80990
|
+
this._closePath(path22);
|
|
80991
|
+
this._ignoredPaths.add(path22);
|
|
80992
|
+
if (this._watched.has(path22)) {
|
|
80993
|
+
this._ignoredPaths.add(path22 + SLASH_GLOBSTAR);
|
|
80842
80994
|
}
|
|
80843
80995
|
this._userIgnored = void 0;
|
|
80844
80996
|
});
|
|
@@ -80879,15 +81031,15 @@ var require_chokidar = __commonJS({
|
|
|
80879
81031
|
if (event !== EV_ERROR)
|
|
80880
81032
|
this.emit(EV_ALL, ...args);
|
|
80881
81033
|
}
|
|
80882
|
-
async _emit(event,
|
|
81034
|
+
async _emit(event, path22, val1, val2, val3) {
|
|
80883
81035
|
if (this.closed)
|
|
80884
81036
|
return;
|
|
80885
81037
|
const opts = this.options;
|
|
80886
81038
|
if (isWindows2)
|
|
80887
|
-
|
|
81039
|
+
path22 = sysPath.normalize(path22);
|
|
80888
81040
|
if (opts.cwd)
|
|
80889
|
-
|
|
80890
|
-
const args = [event,
|
|
81041
|
+
path22 = sysPath.relative(opts.cwd, path22);
|
|
81042
|
+
const args = [event, path22];
|
|
80891
81043
|
if (val3 !== void 0)
|
|
80892
81044
|
args.push(val1, val2, val3);
|
|
80893
81045
|
else if (val2 !== void 0)
|
|
@@ -80896,25 +81048,25 @@ var require_chokidar = __commonJS({
|
|
|
80896
81048
|
args.push(val1);
|
|
80897
81049
|
const awf = opts.awaitWriteFinish;
|
|
80898
81050
|
let pw;
|
|
80899
|
-
if (awf && (pw = this._pendingWrites.get(
|
|
81051
|
+
if (awf && (pw = this._pendingWrites.get(path22))) {
|
|
80900
81052
|
pw.lastChange = new Date();
|
|
80901
81053
|
return this;
|
|
80902
81054
|
}
|
|
80903
81055
|
if (opts.atomic) {
|
|
80904
81056
|
if (event === EV_UNLINK) {
|
|
80905
|
-
this._pendingUnlinks.set(
|
|
81057
|
+
this._pendingUnlinks.set(path22, args);
|
|
80906
81058
|
setTimeout(() => {
|
|
80907
|
-
this._pendingUnlinks.forEach((entry,
|
|
81059
|
+
this._pendingUnlinks.forEach((entry, path23) => {
|
|
80908
81060
|
this.emit(...entry);
|
|
80909
81061
|
this.emit(EV_ALL, ...entry);
|
|
80910
|
-
this._pendingUnlinks.delete(
|
|
81062
|
+
this._pendingUnlinks.delete(path23);
|
|
80911
81063
|
});
|
|
80912
81064
|
}, typeof opts.atomic === "number" ? opts.atomic : 100);
|
|
80913
81065
|
return this;
|
|
80914
81066
|
}
|
|
80915
|
-
if (event === EV_ADD && this._pendingUnlinks.has(
|
|
81067
|
+
if (event === EV_ADD && this._pendingUnlinks.has(path22)) {
|
|
80916
81068
|
event = args[0] = EV_CHANGE;
|
|
80917
|
-
this._pendingUnlinks.delete(
|
|
81069
|
+
this._pendingUnlinks.delete(path22);
|
|
80918
81070
|
}
|
|
80919
81071
|
}
|
|
80920
81072
|
if (awf && (event === EV_ADD || event === EV_CHANGE) && this._readyEmitted) {
|
|
@@ -80932,16 +81084,16 @@ var require_chokidar = __commonJS({
|
|
|
80932
81084
|
this.emitWithAll(event, args);
|
|
80933
81085
|
}
|
|
80934
81086
|
};
|
|
80935
|
-
this._awaitWriteFinish(
|
|
81087
|
+
this._awaitWriteFinish(path22, awf.stabilityThreshold, event, awfEmit);
|
|
80936
81088
|
return this;
|
|
80937
81089
|
}
|
|
80938
81090
|
if (event === EV_CHANGE) {
|
|
80939
|
-
const isThrottled = !this._throttle(EV_CHANGE,
|
|
81091
|
+
const isThrottled = !this._throttle(EV_CHANGE, path22, 50);
|
|
80940
81092
|
if (isThrottled)
|
|
80941
81093
|
return this;
|
|
80942
81094
|
}
|
|
80943
81095
|
if (opts.alwaysStat && val1 === void 0 && (event === EV_ADD || event === EV_ADD_DIR || event === EV_CHANGE)) {
|
|
80944
|
-
const fullPath = opts.cwd ? sysPath.join(opts.cwd,
|
|
81096
|
+
const fullPath = opts.cwd ? sysPath.join(opts.cwd, path22) : path22;
|
|
80945
81097
|
let stats;
|
|
80946
81098
|
try {
|
|
80947
81099
|
stats = await stat3(fullPath);
|
|
@@ -80961,21 +81113,21 @@ var require_chokidar = __commonJS({
|
|
|
80961
81113
|
}
|
|
80962
81114
|
return error || this.closed;
|
|
80963
81115
|
}
|
|
80964
|
-
_throttle(actionType,
|
|
81116
|
+
_throttle(actionType, path22, timeout) {
|
|
80965
81117
|
if (!this._throttled.has(actionType)) {
|
|
80966
81118
|
this._throttled.set(actionType, /* @__PURE__ */ new Map());
|
|
80967
81119
|
}
|
|
80968
81120
|
const action = this._throttled.get(actionType);
|
|
80969
|
-
const actionPath = action.get(
|
|
81121
|
+
const actionPath = action.get(path22);
|
|
80970
81122
|
if (actionPath) {
|
|
80971
81123
|
actionPath.count++;
|
|
80972
81124
|
return false;
|
|
80973
81125
|
}
|
|
80974
81126
|
let timeoutObject;
|
|
80975
81127
|
const clear = () => {
|
|
80976
|
-
const item = action.get(
|
|
81128
|
+
const item = action.get(path22);
|
|
80977
81129
|
const count = item ? item.count : 0;
|
|
80978
|
-
action.delete(
|
|
81130
|
+
action.delete(path22);
|
|
80979
81131
|
clearTimeout(timeoutObject);
|
|
80980
81132
|
if (item)
|
|
80981
81133
|
clearTimeout(item.timeoutObject);
|
|
@@ -80983,45 +81135,45 @@ var require_chokidar = __commonJS({
|
|
|
80983
81135
|
};
|
|
80984
81136
|
timeoutObject = setTimeout(clear, timeout);
|
|
80985
81137
|
const thr = { timeoutObject, clear, count: 0 };
|
|
80986
|
-
action.set(
|
|
81138
|
+
action.set(path22, thr);
|
|
80987
81139
|
return thr;
|
|
80988
81140
|
}
|
|
80989
81141
|
_incrReadyCount() {
|
|
80990
81142
|
return this._readyCount++;
|
|
80991
81143
|
}
|
|
80992
|
-
_awaitWriteFinish(
|
|
81144
|
+
_awaitWriteFinish(path22, threshold, event, awfEmit) {
|
|
80993
81145
|
let timeoutHandler;
|
|
80994
|
-
let fullPath =
|
|
80995
|
-
if (this.options.cwd && !sysPath.isAbsolute(
|
|
80996
|
-
fullPath = sysPath.join(this.options.cwd,
|
|
81146
|
+
let fullPath = path22;
|
|
81147
|
+
if (this.options.cwd && !sysPath.isAbsolute(path22)) {
|
|
81148
|
+
fullPath = sysPath.join(this.options.cwd, path22);
|
|
80997
81149
|
}
|
|
80998
81150
|
const now = new Date();
|
|
80999
81151
|
const awaitWriteFinish = (prevStat) => {
|
|
81000
81152
|
fs9.stat(fullPath, (err2, curStat) => {
|
|
81001
|
-
if (err2 || !this._pendingWrites.has(
|
|
81153
|
+
if (err2 || !this._pendingWrites.has(path22)) {
|
|
81002
81154
|
if (err2 && err2.code !== "ENOENT")
|
|
81003
81155
|
awfEmit(err2);
|
|
81004
81156
|
return;
|
|
81005
81157
|
}
|
|
81006
81158
|
const now2 = Number(new Date());
|
|
81007
81159
|
if (prevStat && curStat.size !== prevStat.size) {
|
|
81008
|
-
this._pendingWrites.get(
|
|
81160
|
+
this._pendingWrites.get(path22).lastChange = now2;
|
|
81009
81161
|
}
|
|
81010
|
-
const pw = this._pendingWrites.get(
|
|
81162
|
+
const pw = this._pendingWrites.get(path22);
|
|
81011
81163
|
const df = now2 - pw.lastChange;
|
|
81012
81164
|
if (df >= threshold) {
|
|
81013
|
-
this._pendingWrites.delete(
|
|
81165
|
+
this._pendingWrites.delete(path22);
|
|
81014
81166
|
awfEmit(void 0, curStat);
|
|
81015
81167
|
} else {
|
|
81016
81168
|
timeoutHandler = setTimeout(awaitWriteFinish, this.options.awaitWriteFinish.pollInterval, curStat);
|
|
81017
81169
|
}
|
|
81018
81170
|
});
|
|
81019
81171
|
};
|
|
81020
|
-
if (!this._pendingWrites.has(
|
|
81021
|
-
this._pendingWrites.set(
|
|
81172
|
+
if (!this._pendingWrites.has(path22)) {
|
|
81173
|
+
this._pendingWrites.set(path22, {
|
|
81022
81174
|
lastChange: now,
|
|
81023
81175
|
cancelWait: () => {
|
|
81024
|
-
this._pendingWrites.delete(
|
|
81176
|
+
this._pendingWrites.delete(path22);
|
|
81025
81177
|
clearTimeout(timeoutHandler);
|
|
81026
81178
|
return event;
|
|
81027
81179
|
}
|
|
@@ -81032,26 +81184,26 @@ var require_chokidar = __commonJS({
|
|
|
81032
81184
|
_getGlobIgnored() {
|
|
81033
81185
|
return [...this._ignoredPaths.values()];
|
|
81034
81186
|
}
|
|
81035
|
-
_isIgnored(
|
|
81036
|
-
if (this.options.atomic && DOT_RE.test(
|
|
81187
|
+
_isIgnored(path22, stats) {
|
|
81188
|
+
if (this.options.atomic && DOT_RE.test(path22))
|
|
81037
81189
|
return true;
|
|
81038
81190
|
if (!this._userIgnored) {
|
|
81039
81191
|
const { cwd: cwd2 } = this.options;
|
|
81040
81192
|
const ign = this.options.ignored;
|
|
81041
81193
|
const ignored = ign && ign.map(normalizeIgnored(cwd2));
|
|
81042
|
-
const paths = arrify(ignored).filter((
|
|
81194
|
+
const paths = arrify(ignored).filter((path23) => typeof path23 === STRING_TYPE && !isGlob(path23)).map((path23) => path23 + SLASH_GLOBSTAR);
|
|
81043
81195
|
const list = this._getGlobIgnored().map(normalizeIgnored(cwd2)).concat(ignored, paths);
|
|
81044
81196
|
this._userIgnored = anymatch(list, void 0, ANYMATCH_OPTS);
|
|
81045
81197
|
}
|
|
81046
|
-
return this._userIgnored([
|
|
81198
|
+
return this._userIgnored([path22, stats]);
|
|
81047
81199
|
}
|
|
81048
|
-
_isntIgnored(
|
|
81049
|
-
return !this._isIgnored(
|
|
81200
|
+
_isntIgnored(path22, stat4) {
|
|
81201
|
+
return !this._isIgnored(path22, stat4);
|
|
81050
81202
|
}
|
|
81051
|
-
_getWatchHelpers(
|
|
81052
|
-
const watchPath = depth || this.options.disableGlobbing || !isGlob(
|
|
81203
|
+
_getWatchHelpers(path22, depth) {
|
|
81204
|
+
const watchPath = depth || this.options.disableGlobbing || !isGlob(path22) ? path22 : globParent(path22);
|
|
81053
81205
|
const follow = this.options.followSymlinks;
|
|
81054
|
-
return new WatchHelper(
|
|
81206
|
+
return new WatchHelper(path22, watchPath, follow, this);
|
|
81055
81207
|
}
|
|
81056
81208
|
_getWatchedDir(directory) {
|
|
81057
81209
|
if (!this._boundRemove)
|
|
@@ -81070,59 +81222,59 @@ var require_chokidar = __commonJS({
|
|
|
81070
81222
|
return Boolean(4 & it);
|
|
81071
81223
|
}
|
|
81072
81224
|
_remove(directory, item, isDirectory) {
|
|
81073
|
-
const
|
|
81074
|
-
const fullPath = sysPath.resolve(
|
|
81075
|
-
isDirectory = isDirectory != null ? isDirectory : this._watched.has(
|
|
81076
|
-
if (!this._throttle("remove",
|
|
81225
|
+
const path22 = sysPath.join(directory, item);
|
|
81226
|
+
const fullPath = sysPath.resolve(path22);
|
|
81227
|
+
isDirectory = isDirectory != null ? isDirectory : this._watched.has(path22) || this._watched.has(fullPath);
|
|
81228
|
+
if (!this._throttle("remove", path22, 100))
|
|
81077
81229
|
return;
|
|
81078
81230
|
if (!isDirectory && !this.options.useFsEvents && this._watched.size === 1) {
|
|
81079
81231
|
this.add(directory, item, true);
|
|
81080
81232
|
}
|
|
81081
|
-
const wp = this._getWatchedDir(
|
|
81233
|
+
const wp = this._getWatchedDir(path22);
|
|
81082
81234
|
const nestedDirectoryChildren = wp.getChildren();
|
|
81083
|
-
nestedDirectoryChildren.forEach((nested) => this._remove(
|
|
81235
|
+
nestedDirectoryChildren.forEach((nested) => this._remove(path22, nested));
|
|
81084
81236
|
const parent = this._getWatchedDir(directory);
|
|
81085
81237
|
const wasTracked = parent.has(item);
|
|
81086
81238
|
parent.remove(item);
|
|
81087
81239
|
if (this._symlinkPaths.has(fullPath)) {
|
|
81088
81240
|
this._symlinkPaths.delete(fullPath);
|
|
81089
81241
|
}
|
|
81090
|
-
let relPath =
|
|
81242
|
+
let relPath = path22;
|
|
81091
81243
|
if (this.options.cwd)
|
|
81092
|
-
relPath = sysPath.relative(this.options.cwd,
|
|
81244
|
+
relPath = sysPath.relative(this.options.cwd, path22);
|
|
81093
81245
|
if (this.options.awaitWriteFinish && this._pendingWrites.has(relPath)) {
|
|
81094
81246
|
const event = this._pendingWrites.get(relPath).cancelWait();
|
|
81095
81247
|
if (event === EV_ADD)
|
|
81096
81248
|
return;
|
|
81097
81249
|
}
|
|
81098
|
-
this._watched.delete(
|
|
81250
|
+
this._watched.delete(path22);
|
|
81099
81251
|
this._watched.delete(fullPath);
|
|
81100
81252
|
const eventName = isDirectory ? EV_UNLINK_DIR : EV_UNLINK;
|
|
81101
|
-
if (wasTracked && !this._isIgnored(
|
|
81102
|
-
this._emit(eventName,
|
|
81253
|
+
if (wasTracked && !this._isIgnored(path22))
|
|
81254
|
+
this._emit(eventName, path22);
|
|
81103
81255
|
if (!this.options.useFsEvents) {
|
|
81104
|
-
this._closePath(
|
|
81256
|
+
this._closePath(path22);
|
|
81105
81257
|
}
|
|
81106
81258
|
}
|
|
81107
|
-
_closePath(
|
|
81108
|
-
this._closeFile(
|
|
81109
|
-
const dir = sysPath.dirname(
|
|
81110
|
-
this._getWatchedDir(dir).remove(sysPath.basename(
|
|
81259
|
+
_closePath(path22) {
|
|
81260
|
+
this._closeFile(path22);
|
|
81261
|
+
const dir = sysPath.dirname(path22);
|
|
81262
|
+
this._getWatchedDir(dir).remove(sysPath.basename(path22));
|
|
81111
81263
|
}
|
|
81112
|
-
_closeFile(
|
|
81113
|
-
const closers = this._closers.get(
|
|
81264
|
+
_closeFile(path22) {
|
|
81265
|
+
const closers = this._closers.get(path22);
|
|
81114
81266
|
if (!closers)
|
|
81115
81267
|
return;
|
|
81116
81268
|
closers.forEach((closer) => closer());
|
|
81117
|
-
this._closers.delete(
|
|
81269
|
+
this._closers.delete(path22);
|
|
81118
81270
|
}
|
|
81119
|
-
_addPathCloser(
|
|
81271
|
+
_addPathCloser(path22, closer) {
|
|
81120
81272
|
if (!closer)
|
|
81121
81273
|
return;
|
|
81122
|
-
let list = this._closers.get(
|
|
81274
|
+
let list = this._closers.get(path22);
|
|
81123
81275
|
if (!list) {
|
|
81124
81276
|
list = [];
|
|
81125
|
-
this._closers.set(
|
|
81277
|
+
this._closers.set(path22, list);
|
|
81126
81278
|
}
|
|
81127
81279
|
list.push(closer);
|
|
81128
81280
|
}
|
|
@@ -81178,7 +81330,7 @@ var require_npm_run_path = __commonJS({
|
|
|
81178
81330
|
"../../node_modules/clipboardy/node_modules/npm-run-path/index.js"(exports2, module2) {
|
|
81179
81331
|
"use strict";
|
|
81180
81332
|
init_import_meta_url();
|
|
81181
|
-
var
|
|
81333
|
+
var path22 = require("path");
|
|
81182
81334
|
var pathKey2 = require_path_key();
|
|
81183
81335
|
var npmRunPath2 = (options) => {
|
|
81184
81336
|
options = {
|
|
@@ -81188,16 +81340,16 @@ var require_npm_run_path = __commonJS({
|
|
|
81188
81340
|
...options
|
|
81189
81341
|
};
|
|
81190
81342
|
let previous;
|
|
81191
|
-
let cwdPath =
|
|
81343
|
+
let cwdPath = path22.resolve(options.cwd);
|
|
81192
81344
|
const result = [];
|
|
81193
81345
|
while (previous !== cwdPath) {
|
|
81194
|
-
result.push(
|
|
81346
|
+
result.push(path22.join(cwdPath, "node_modules/.bin"));
|
|
81195
81347
|
previous = cwdPath;
|
|
81196
|
-
cwdPath =
|
|
81348
|
+
cwdPath = path22.resolve(cwdPath, "..");
|
|
81197
81349
|
}
|
|
81198
|
-
const execPathDir =
|
|
81350
|
+
const execPathDir = path22.resolve(options.cwd, options.execPath, "..");
|
|
81199
81351
|
result.push(execPathDir);
|
|
81200
|
-
return result.concat(options.path).join(
|
|
81352
|
+
return result.concat(options.path).join(path22.delimiter);
|
|
81201
81353
|
};
|
|
81202
81354
|
module2.exports = npmRunPath2;
|
|
81203
81355
|
module2.exports.default = npmRunPath2;
|
|
@@ -81207,9 +81359,9 @@ var require_npm_run_path = __commonJS({
|
|
|
81207
81359
|
...options
|
|
81208
81360
|
};
|
|
81209
81361
|
const env4 = { ...options.env };
|
|
81210
|
-
const
|
|
81211
|
-
options.path = env4[
|
|
81212
|
-
env4[
|
|
81362
|
+
const path23 = pathKey2({ env: env4 });
|
|
81363
|
+
options.path = env4[path23];
|
|
81364
|
+
env4[path23] = module2.exports(options);
|
|
81213
81365
|
return env4;
|
|
81214
81366
|
};
|
|
81215
81367
|
}
|
|
@@ -82069,7 +82221,7 @@ var require_execa = __commonJS({
|
|
|
82069
82221
|
"../../node_modules/clipboardy/node_modules/execa/index.js"(exports2, module2) {
|
|
82070
82222
|
"use strict";
|
|
82071
82223
|
init_import_meta_url();
|
|
82072
|
-
var
|
|
82224
|
+
var path22 = require("path");
|
|
82073
82225
|
var childProcess2 = require("child_process");
|
|
82074
82226
|
var crossSpawn2 = require_cross_spawn();
|
|
82075
82227
|
var stripFinalNewline2 = require_strip_final_newline();
|
|
@@ -82111,7 +82263,7 @@ var require_execa = __commonJS({
|
|
|
82111
82263
|
};
|
|
82112
82264
|
options.env = getEnv2(options);
|
|
82113
82265
|
options.stdio = normalizeStdio2(options);
|
|
82114
|
-
if (process.platform === "win32" &&
|
|
82266
|
+
if (process.platform === "win32" && path22.basename(file, ".exe") === "cmd") {
|
|
82115
82267
|
args.unshift("/q");
|
|
82116
82268
|
}
|
|
82117
82269
|
return { file, args, options, parsed };
|
|
@@ -82295,7 +82447,7 @@ var require_arch = __commonJS({
|
|
|
82295
82447
|
init_import_meta_url();
|
|
82296
82448
|
var cp2 = require("child_process");
|
|
82297
82449
|
var fs9 = require("fs");
|
|
82298
|
-
var
|
|
82450
|
+
var path22 = require("path");
|
|
82299
82451
|
module2.exports = function arch2() {
|
|
82300
82452
|
if (process.arch === "x64") {
|
|
82301
82453
|
return "x64";
|
|
@@ -82312,7 +82464,7 @@ var require_arch = __commonJS({
|
|
|
82312
82464
|
var sysRoot = useEnv ? process.env.SYSTEMROOT : "C:\\Windows";
|
|
82313
82465
|
var isWOW64 = false;
|
|
82314
82466
|
try {
|
|
82315
|
-
isWOW64 = !!fs9.statSync(
|
|
82467
|
+
isWOW64 = !!fs9.statSync(path22.join(sysRoot, "sysnative"));
|
|
82316
82468
|
} catch (err2) {
|
|
82317
82469
|
}
|
|
82318
82470
|
return isWOW64 ? "x64" : "x86";
|
|
@@ -82334,7 +82486,7 @@ var require_command_exists = __commonJS({
|
|
|
82334
82486
|
var exec = require("child_process").exec;
|
|
82335
82487
|
var execSync2 = require("child_process").execSync;
|
|
82336
82488
|
var fs9 = require("fs");
|
|
82337
|
-
var
|
|
82489
|
+
var path22 = require("path");
|
|
82338
82490
|
var access3 = fs9.access;
|
|
82339
82491
|
var accessSync = fs9.accessSync;
|
|
82340
82492
|
var constants3 = fs9.constants || fs9;
|
|
@@ -82422,8 +82574,8 @@ var require_command_exists = __commonJS({
|
|
|
82422
82574
|
cleanInput = function(s) {
|
|
82423
82575
|
var isPathName = /[\\]/.test(s);
|
|
82424
82576
|
if (isPathName) {
|
|
82425
|
-
var dirname9 = '"' +
|
|
82426
|
-
var basename4 = '"' +
|
|
82577
|
+
var dirname9 = '"' + path22.dirname(s) + '"';
|
|
82578
|
+
var basename4 = '"' + path22.basename(s) + '"';
|
|
82427
82579
|
return dirname9 + ":" + basename4;
|
|
82428
82580
|
}
|
|
82429
82581
|
return '"' + s + '"';
|
|
@@ -83135,7 +83287,7 @@ var require_minimatch = __commonJS({
|
|
|
83135
83287
|
init_import_meta_url();
|
|
83136
83288
|
module2.exports = minimatch;
|
|
83137
83289
|
minimatch.Minimatch = Minimatch;
|
|
83138
|
-
var
|
|
83290
|
+
var path22 = function() {
|
|
83139
83291
|
try {
|
|
83140
83292
|
return require("path");
|
|
83141
83293
|
} catch (e2) {
|
|
@@ -83143,7 +83295,7 @@ var require_minimatch = __commonJS({
|
|
|
83143
83295
|
}() || {
|
|
83144
83296
|
sep: "/"
|
|
83145
83297
|
};
|
|
83146
|
-
minimatch.sep =
|
|
83298
|
+
minimatch.sep = path22.sep;
|
|
83147
83299
|
var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {};
|
|
83148
83300
|
var expand = require_brace_expansion();
|
|
83149
83301
|
var plTypes = {
|
|
@@ -83234,8 +83386,8 @@ var require_minimatch = __commonJS({
|
|
|
83234
83386
|
if (!options)
|
|
83235
83387
|
options = {};
|
|
83236
83388
|
pattern = pattern.trim();
|
|
83237
|
-
if (!options.allowWindowsEscape &&
|
|
83238
|
-
pattern = pattern.split(
|
|
83389
|
+
if (!options.allowWindowsEscape && path22.sep !== "/") {
|
|
83390
|
+
pattern = pattern.split(path22.sep).join("/");
|
|
83239
83391
|
}
|
|
83240
83392
|
this.options = options;
|
|
83241
83393
|
this.set = [];
|
|
@@ -83612,8 +83764,8 @@ var require_minimatch = __commonJS({
|
|
|
83612
83764
|
if (f === "/" && partial)
|
|
83613
83765
|
return true;
|
|
83614
83766
|
var options = this.options;
|
|
83615
|
-
if (
|
|
83616
|
-
f = f.split(
|
|
83767
|
+
if (path22.sep !== "/") {
|
|
83768
|
+
f = f.split(path22.sep).join("/");
|
|
83617
83769
|
}
|
|
83618
83770
|
f = f.split(slashSplit);
|
|
83619
83771
|
this.debug(this.pattern, "split", f);
|
|
@@ -83771,12 +83923,12 @@ var require_path_is_absolute = __commonJS({
|
|
|
83771
83923
|
"../../node_modules/path-is-absolute/index.js"(exports2, module2) {
|
|
83772
83924
|
"use strict";
|
|
83773
83925
|
init_import_meta_url();
|
|
83774
|
-
function posix(
|
|
83775
|
-
return
|
|
83926
|
+
function posix(path22) {
|
|
83927
|
+
return path22.charAt(0) === "/";
|
|
83776
83928
|
}
|
|
83777
|
-
function win32(
|
|
83929
|
+
function win32(path22) {
|
|
83778
83930
|
var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;
|
|
83779
|
-
var result = splitDeviceRe.exec(
|
|
83931
|
+
var result = splitDeviceRe.exec(path22);
|
|
83780
83932
|
var device = result[1] || "";
|
|
83781
83933
|
var isUnc = Boolean(device && device.charAt(1) !== ":");
|
|
83782
83934
|
return Boolean(result[2] || isUnc);
|
|
@@ -83802,7 +83954,7 @@ var require_common = __commonJS({
|
|
|
83802
83954
|
return Object.prototype.hasOwnProperty.call(obj, field);
|
|
83803
83955
|
}
|
|
83804
83956
|
var fs9 = require("fs");
|
|
83805
|
-
var
|
|
83957
|
+
var path22 = require("path");
|
|
83806
83958
|
var minimatch = require_minimatch();
|
|
83807
83959
|
var isAbsolute = require_path_is_absolute();
|
|
83808
83960
|
var Minimatch = minimatch.Minimatch;
|
|
@@ -83867,11 +84019,11 @@ var require_common = __commonJS({
|
|
|
83867
84019
|
if (!ownProp(options, "cwd"))
|
|
83868
84020
|
self2.cwd = cwd2;
|
|
83869
84021
|
else {
|
|
83870
|
-
self2.cwd =
|
|
84022
|
+
self2.cwd = path22.resolve(options.cwd);
|
|
83871
84023
|
self2.changedCwd = self2.cwd !== cwd2;
|
|
83872
84024
|
}
|
|
83873
|
-
self2.root = options.root ||
|
|
83874
|
-
self2.root =
|
|
84025
|
+
self2.root = options.root || path22.resolve(self2.cwd, "/");
|
|
84026
|
+
self2.root = path22.resolve(self2.root);
|
|
83875
84027
|
if (process.platform === "win32")
|
|
83876
84028
|
self2.root = self2.root.replace(/\\/g, "/");
|
|
83877
84029
|
self2.cwdAbs = isAbsolute(self2.cwd) ? self2.cwd : makeAbs(self2, self2.cwd);
|
|
@@ -83952,30 +84104,30 @@ var require_common = __commonJS({
|
|
|
83952
84104
|
function makeAbs(self2, f) {
|
|
83953
84105
|
var abs = f;
|
|
83954
84106
|
if (f.charAt(0) === "/") {
|
|
83955
|
-
abs =
|
|
84107
|
+
abs = path22.join(self2.root, f);
|
|
83956
84108
|
} else if (isAbsolute(f) || f === "") {
|
|
83957
84109
|
abs = f;
|
|
83958
84110
|
} else if (self2.changedCwd) {
|
|
83959
|
-
abs =
|
|
84111
|
+
abs = path22.resolve(self2.cwd, f);
|
|
83960
84112
|
} else {
|
|
83961
|
-
abs =
|
|
84113
|
+
abs = path22.resolve(f);
|
|
83962
84114
|
}
|
|
83963
84115
|
if (process.platform === "win32")
|
|
83964
84116
|
abs = abs.replace(/\\/g, "/");
|
|
83965
84117
|
return abs;
|
|
83966
84118
|
}
|
|
83967
|
-
function isIgnored(self2,
|
|
84119
|
+
function isIgnored(self2, path23) {
|
|
83968
84120
|
if (!self2.ignore.length)
|
|
83969
84121
|
return false;
|
|
83970
84122
|
return self2.ignore.some(function(item) {
|
|
83971
|
-
return item.matcher.match(
|
|
84123
|
+
return item.matcher.match(path23) || !!(item.gmatcher && item.gmatcher.match(path23));
|
|
83972
84124
|
});
|
|
83973
84125
|
}
|
|
83974
|
-
function childrenIgnored(self2,
|
|
84126
|
+
function childrenIgnored(self2, path23) {
|
|
83975
84127
|
if (!self2.ignore.length)
|
|
83976
84128
|
return false;
|
|
83977
84129
|
return self2.ignore.some(function(item) {
|
|
83978
|
-
return !!(item.gmatcher && item.gmatcher.match(
|
|
84130
|
+
return !!(item.gmatcher && item.gmatcher.match(path23));
|
|
83979
84131
|
});
|
|
83980
84132
|
}
|
|
83981
84133
|
}
|
|
@@ -83992,7 +84144,7 @@ var require_sync = __commonJS({
|
|
|
83992
84144
|
var Minimatch = minimatch.Minimatch;
|
|
83993
84145
|
var Glob = require_glob().Glob;
|
|
83994
84146
|
var util = require("util");
|
|
83995
|
-
var
|
|
84147
|
+
var path22 = require("path");
|
|
83996
84148
|
var assert10 = require("assert");
|
|
83997
84149
|
var isAbsolute = require_path_is_absolute();
|
|
83998
84150
|
var common = require_common();
|
|
@@ -84118,7 +84270,7 @@ var require_sync = __commonJS({
|
|
|
84118
84270
|
e2 = prefix2 + e2;
|
|
84119
84271
|
}
|
|
84120
84272
|
if (e2.charAt(0) === "/" && !this.nomount) {
|
|
84121
|
-
e2 =
|
|
84273
|
+
e2 = path22.join(this.root, e2);
|
|
84122
84274
|
}
|
|
84123
84275
|
this._emitMatch(index, e2);
|
|
84124
84276
|
}
|
|
@@ -84267,9 +84419,9 @@ var require_sync = __commonJS({
|
|
|
84267
84419
|
if (prefix2 && isAbsolute(prefix2) && !this.nomount) {
|
|
84268
84420
|
var trail = /[\/\\]$/.test(prefix2);
|
|
84269
84421
|
if (prefix2.charAt(0) === "/") {
|
|
84270
|
-
prefix2 =
|
|
84422
|
+
prefix2 = path22.join(this.root, prefix2);
|
|
84271
84423
|
} else {
|
|
84272
|
-
prefix2 =
|
|
84424
|
+
prefix2 = path22.resolve(this.root, prefix2);
|
|
84273
84425
|
if (trail)
|
|
84274
84426
|
prefix2 += "/";
|
|
84275
84427
|
}
|
|
@@ -84468,7 +84620,7 @@ var require_glob = __commonJS({
|
|
|
84468
84620
|
var Minimatch = minimatch.Minimatch;
|
|
84469
84621
|
var inherits = require_inherits();
|
|
84470
84622
|
var EE = require("events").EventEmitter;
|
|
84471
|
-
var
|
|
84623
|
+
var path22 = require("path");
|
|
84472
84624
|
var assert10 = require("assert");
|
|
84473
84625
|
var isAbsolute = require_path_is_absolute();
|
|
84474
84626
|
var globSync = require_sync();
|
|
@@ -84749,7 +84901,7 @@ var require_glob = __commonJS({
|
|
|
84749
84901
|
e2 = prefix2 + e2;
|
|
84750
84902
|
}
|
|
84751
84903
|
if (e2.charAt(0) === "/" && !this.nomount) {
|
|
84752
|
-
e2 =
|
|
84904
|
+
e2 = path22.join(this.root, e2);
|
|
84753
84905
|
}
|
|
84754
84906
|
this._emitMatch(index, e2);
|
|
84755
84907
|
}
|
|
@@ -84936,9 +85088,9 @@ var require_glob = __commonJS({
|
|
|
84936
85088
|
if (prefix2 && isAbsolute(prefix2) && !this.nomount) {
|
|
84937
85089
|
var trail = /[\/\\]$/.test(prefix2);
|
|
84938
85090
|
if (prefix2.charAt(0) === "/") {
|
|
84939
|
-
prefix2 =
|
|
85091
|
+
prefix2 = path22.join(this.root, prefix2);
|
|
84940
85092
|
} else {
|
|
84941
|
-
prefix2 =
|
|
85093
|
+
prefix2 = path22.resolve(this.root, prefix2);
|
|
84942
85094
|
if (trail)
|
|
84943
85095
|
prefix2 += "/";
|
|
84944
85096
|
}
|
|
@@ -85017,7 +85169,7 @@ var require_rimraf = __commonJS({
|
|
|
85017
85169
|
"../../node_modules/rimraf/rimraf.js"(exports2, module2) {
|
|
85018
85170
|
init_import_meta_url();
|
|
85019
85171
|
var assert10 = require("assert");
|
|
85020
|
-
var
|
|
85172
|
+
var path22 = require("path");
|
|
85021
85173
|
var fs9 = require("fs");
|
|
85022
85174
|
var glob = void 0;
|
|
85023
85175
|
try {
|
|
@@ -85199,7 +85351,7 @@ var require_rimraf = __commonJS({
|
|
|
85199
85351
|
return options.rmdir(p, cb2);
|
|
85200
85352
|
let errState;
|
|
85201
85353
|
files2.forEach((f) => {
|
|
85202
|
-
rimraf(
|
|
85354
|
+
rimraf(path22.join(p, f), options, (er2) => {
|
|
85203
85355
|
if (errState)
|
|
85204
85356
|
return;
|
|
85205
85357
|
if (er2)
|
|
@@ -85274,7 +85426,7 @@ var require_rimraf = __commonJS({
|
|
|
85274
85426
|
var rmkidsSync = (p, options) => {
|
|
85275
85427
|
assert10(p);
|
|
85276
85428
|
assert10(options);
|
|
85277
|
-
options.readdirSync(p).forEach((f) => rimrafSync(
|
|
85429
|
+
options.readdirSync(p).forEach((f) => rimrafSync(path22.join(p, f), options));
|
|
85278
85430
|
const retries = isWindows2 ? 100 : 1;
|
|
85279
85431
|
let i2 = 0;
|
|
85280
85432
|
do {
|
|
@@ -85300,7 +85452,7 @@ var require_tmp = __commonJS({
|
|
|
85300
85452
|
init_import_meta_url();
|
|
85301
85453
|
var fs9 = require("fs");
|
|
85302
85454
|
var os5 = require("os");
|
|
85303
|
-
var
|
|
85455
|
+
var path22 = require("path");
|
|
85304
85456
|
var crypto4 = require("crypto");
|
|
85305
85457
|
var _c = { fs: fs9.constants, os: os5.constants };
|
|
85306
85458
|
var rimraf = require_rimraf();
|
|
@@ -85523,9 +85675,9 @@ var require_tmp = __commonJS({
|
|
|
85523
85675
|
function _generateTmpName(opts) {
|
|
85524
85676
|
const tmpDir = opts.tmpdir;
|
|
85525
85677
|
if (!_isUndefined(opts.name))
|
|
85526
|
-
return
|
|
85678
|
+
return path22.join(tmpDir, opts.dir, opts.name);
|
|
85527
85679
|
if (!_isUndefined(opts.template))
|
|
85528
|
-
return
|
|
85680
|
+
return path22.join(tmpDir, opts.dir, opts.template).replace(TEMPLATE_PATTERN, _randomChars(6));
|
|
85529
85681
|
const name2 = [
|
|
85530
85682
|
opts.prefix ? opts.prefix : "tmp",
|
|
85531
85683
|
"-",
|
|
@@ -85534,7 +85686,7 @@ var require_tmp = __commonJS({
|
|
|
85534
85686
|
_randomChars(12),
|
|
85535
85687
|
opts.postfix ? "-" + opts.postfix : ""
|
|
85536
85688
|
].join("");
|
|
85537
|
-
return
|
|
85689
|
+
return path22.join(tmpDir, opts.dir, name2);
|
|
85538
85690
|
}
|
|
85539
85691
|
function _assertAndSanitizeOptions(options) {
|
|
85540
85692
|
options.tmpdir = _getTmpDir(options);
|
|
@@ -85555,9 +85707,9 @@ var require_tmp = __commonJS({
|
|
|
85555
85707
|
options.detachDescriptor = !!options.detachDescriptor;
|
|
85556
85708
|
options.discardDescriptor = !!options.discardDescriptor;
|
|
85557
85709
|
options.unsafeCleanup = !!options.unsafeCleanup;
|
|
85558
|
-
options.dir = _isUndefined(options.dir) ? "" :
|
|
85559
|
-
options.template = _isUndefined(options.template) ? void 0 :
|
|
85560
|
-
options.template = _isBlank(options.template) ? void 0 :
|
|
85710
|
+
options.dir = _isUndefined(options.dir) ? "" : path22.relative(tmpDir, _resolvePath(options.dir, tmpDir));
|
|
85711
|
+
options.template = _isUndefined(options.template) ? void 0 : path22.relative(tmpDir, _resolvePath(options.template, tmpDir));
|
|
85712
|
+
options.template = _isBlank(options.template) ? void 0 : path22.relative(options.dir, options.template);
|
|
85561
85713
|
options.name = _isUndefined(options.name) ? void 0 : _sanitizeName(options.name);
|
|
85562
85714
|
options.prefix = _isUndefined(options.prefix) ? "" : options.prefix;
|
|
85563
85715
|
options.postfix = _isUndefined(options.postfix) ? "" : options.postfix;
|
|
@@ -85565,9 +85717,9 @@ var require_tmp = __commonJS({
|
|
|
85565
85717
|
function _resolvePath(name2, tmpDir) {
|
|
85566
85718
|
const sanitizedName = _sanitizeName(name2);
|
|
85567
85719
|
if (sanitizedName.startsWith(tmpDir)) {
|
|
85568
|
-
return
|
|
85720
|
+
return path22.resolve(sanitizedName);
|
|
85569
85721
|
} else {
|
|
85570
|
-
return
|
|
85722
|
+
return path22.resolve(path22.join(tmpDir, sanitizedName));
|
|
85571
85723
|
}
|
|
85572
85724
|
}
|
|
85573
85725
|
function _sanitizeName(name2) {
|
|
@@ -85578,13 +85730,13 @@ var require_tmp = __commonJS({
|
|
|
85578
85730
|
}
|
|
85579
85731
|
function _assertIsRelative(name2, option, tmpDir) {
|
|
85580
85732
|
if (option === "name") {
|
|
85581
|
-
if (
|
|
85733
|
+
if (path22.isAbsolute(name2))
|
|
85582
85734
|
throw new Error(`${option} option must not contain an absolute path, found "${name2}".`);
|
|
85583
|
-
let basename4 =
|
|
85735
|
+
let basename4 = path22.basename(name2);
|
|
85584
85736
|
if (basename4 === ".." || basename4 === "." || basename4 !== name2)
|
|
85585
85737
|
throw new Error(`${option} option must not contain a path, found "${name2}".`);
|
|
85586
85738
|
} else {
|
|
85587
|
-
if (
|
|
85739
|
+
if (path22.isAbsolute(name2) && !name2.startsWith(tmpDir)) {
|
|
85588
85740
|
throw new Error(`${option} option must be relative to "${tmpDir}", found "${name2}".`);
|
|
85589
85741
|
}
|
|
85590
85742
|
let resolvedPath = _resolvePath(name2, tmpDir);
|
|
@@ -85605,7 +85757,7 @@ var require_tmp = __commonJS({
|
|
|
85605
85757
|
_gracefulCleanup = true;
|
|
85606
85758
|
}
|
|
85607
85759
|
function _getTmpDir(options) {
|
|
85608
|
-
return
|
|
85760
|
+
return path22.resolve(_sanitizeName(options && options.tmpdir || os5.tmpdir()));
|
|
85609
85761
|
}
|
|
85610
85762
|
process.addListener(EXIT, _garbageCollector);
|
|
85611
85763
|
Object.defineProperty(module2.exports, "tmpdir", {
|
|
@@ -85633,23 +85785,23 @@ var require_tmp_promise = __commonJS({
|
|
|
85633
85785
|
var { promisify: promisify2 } = require("util");
|
|
85634
85786
|
var tmp3 = require_tmp();
|
|
85635
85787
|
module2.exports.fileSync = tmp3.fileSync;
|
|
85636
|
-
var fileWithOptions = promisify2((options, cb2) => tmp3.file(options, (err2,
|
|
85788
|
+
var fileWithOptions = promisify2((options, cb2) => tmp3.file(options, (err2, path22, fd, cleanup) => err2 ? cb2(err2) : cb2(void 0, { path: path22, fd, cleanup: promisify2(cleanup) })));
|
|
85637
85789
|
module2.exports.file = async (options) => fileWithOptions(options);
|
|
85638
85790
|
module2.exports.withFile = async function withFile(fn, options) {
|
|
85639
|
-
const { path:
|
|
85791
|
+
const { path: path22, fd, cleanup } = await module2.exports.file(options);
|
|
85640
85792
|
try {
|
|
85641
|
-
return await fn({ path:
|
|
85793
|
+
return await fn({ path: path22, fd });
|
|
85642
85794
|
} finally {
|
|
85643
85795
|
await cleanup();
|
|
85644
85796
|
}
|
|
85645
85797
|
};
|
|
85646
85798
|
module2.exports.dirSync = tmp3.dirSync;
|
|
85647
|
-
var dirWithOptions = promisify2((options, cb2) => tmp3.dir(options, (err2,
|
|
85799
|
+
var dirWithOptions = promisify2((options, cb2) => tmp3.dir(options, (err2, path22, cleanup) => err2 ? cb2(err2) : cb2(void 0, { path: path22, cleanup: promisify2(cleanup) })));
|
|
85648
85800
|
module2.exports.dir = async (options) => dirWithOptions(options);
|
|
85649
85801
|
module2.exports.withDir = async function withDir(fn, options) {
|
|
85650
|
-
const { path:
|
|
85802
|
+
const { path: path22, cleanup } = await module2.exports.dir(options);
|
|
85651
85803
|
try {
|
|
85652
|
-
return await fn({ path:
|
|
85804
|
+
return await fn({ path: path22 });
|
|
85653
85805
|
} finally {
|
|
85654
85806
|
await cleanup();
|
|
85655
85807
|
}
|
|
@@ -91341,7 +91493,7 @@ var require_parseurl = __commonJS({
|
|
|
91341
91493
|
var require_depd = __commonJS({
|
|
91342
91494
|
"../../node_modules/depd/index.js"(exports2, module2) {
|
|
91343
91495
|
init_import_meta_url();
|
|
91344
|
-
var
|
|
91496
|
+
var relative6 = require("path").relative;
|
|
91345
91497
|
module2.exports = depd;
|
|
91346
91498
|
var basePath = process.cwd();
|
|
91347
91499
|
function containsNamespace(str, namespace) {
|
|
@@ -91533,7 +91685,7 @@ var require_depd = __commonJS({
|
|
|
91533
91685
|
return formatted;
|
|
91534
91686
|
}
|
|
91535
91687
|
function formatLocation(callSite) {
|
|
91536
|
-
return
|
|
91688
|
+
return relative6(basePath, callSite[0]) + ":" + callSite[1] + ":" + callSite[2];
|
|
91537
91689
|
}
|
|
91538
91690
|
function getStack() {
|
|
91539
91691
|
var limit = Error.stackTraceLimit;
|
|
@@ -92627,7 +92779,7 @@ var require_types = __commonJS({
|
|
|
92627
92779
|
var require_mime = __commonJS({
|
|
92628
92780
|
"../../node_modules/send/node_modules/mime/mime.js"(exports2, module2) {
|
|
92629
92781
|
init_import_meta_url();
|
|
92630
|
-
var
|
|
92782
|
+
var path22 = require("path");
|
|
92631
92783
|
var fs9 = require("fs");
|
|
92632
92784
|
function Mime() {
|
|
92633
92785
|
this.types = /* @__PURE__ */ Object.create(null);
|
|
@@ -92657,8 +92809,8 @@ var require_mime = __commonJS({
|
|
|
92657
92809
|
this.define(map);
|
|
92658
92810
|
this._loading = null;
|
|
92659
92811
|
};
|
|
92660
|
-
Mime.prototype.lookup = function(
|
|
92661
|
-
var ext =
|
|
92812
|
+
Mime.prototype.lookup = function(path23, fallback) {
|
|
92813
|
+
var ext = path23.replace(/^.*[\.\/\\]/, "").toLowerCase();
|
|
92662
92814
|
return this.types[ext] || fallback || this.default_type;
|
|
92663
92815
|
};
|
|
92664
92816
|
Mime.prototype.extension = function(mimeType) {
|
|
@@ -93058,28 +93210,28 @@ var require_send = __commonJS({
|
|
|
93058
93210
|
var ms = require_ms2();
|
|
93059
93211
|
var onFinished = require_on_finished();
|
|
93060
93212
|
var parseRange = require_range_parser();
|
|
93061
|
-
var
|
|
93213
|
+
var path22 = require("path");
|
|
93062
93214
|
var statuses = require_statuses();
|
|
93063
93215
|
var Stream = require("stream");
|
|
93064
93216
|
var util = require("util");
|
|
93065
|
-
var extname3 =
|
|
93066
|
-
var join8 =
|
|
93067
|
-
var normalize2 =
|
|
93068
|
-
var resolve11 =
|
|
93069
|
-
var sep2 =
|
|
93217
|
+
var extname3 = path22.extname;
|
|
93218
|
+
var join8 = path22.join;
|
|
93219
|
+
var normalize2 = path22.normalize;
|
|
93220
|
+
var resolve11 = path22.resolve;
|
|
93221
|
+
var sep2 = path22.sep;
|
|
93070
93222
|
var BYTES_RANGE_REGEXP = /^ *bytes=/;
|
|
93071
93223
|
var MAX_MAXAGE = 60 * 60 * 24 * 365 * 1e3;
|
|
93072
93224
|
var UP_PATH_REGEXP = /(?:^|[\\/])\.\.(?:[\\/]|$)/;
|
|
93073
93225
|
module2.exports = send;
|
|
93074
93226
|
module2.exports.mime = mime;
|
|
93075
|
-
function send(req,
|
|
93076
|
-
return new SendStream(req,
|
|
93227
|
+
function send(req, path23, options) {
|
|
93228
|
+
return new SendStream(req, path23, options);
|
|
93077
93229
|
}
|
|
93078
|
-
function SendStream(req,
|
|
93230
|
+
function SendStream(req, path23, options) {
|
|
93079
93231
|
Stream.call(this);
|
|
93080
93232
|
var opts = options || {};
|
|
93081
93233
|
this.options = opts;
|
|
93082
|
-
this.path =
|
|
93234
|
+
this.path = path23;
|
|
93083
93235
|
this.req = req;
|
|
93084
93236
|
this._acceptRanges = opts.acceptRanges !== void 0 ? Boolean(opts.acceptRanges) : true;
|
|
93085
93237
|
this._cacheControl = opts.cacheControl !== void 0 ? Boolean(opts.cacheControl) : true;
|
|
@@ -93125,8 +93277,8 @@ var require_send = __commonJS({
|
|
|
93125
93277
|
this._index = index2;
|
|
93126
93278
|
return this;
|
|
93127
93279
|
}, "send.index: pass index as option");
|
|
93128
|
-
SendStream.prototype.root = function root(
|
|
93129
|
-
this._root = resolve11(String(
|
|
93280
|
+
SendStream.prototype.root = function root(path23) {
|
|
93281
|
+
this._root = resolve11(String(path23));
|
|
93130
93282
|
debug("root %s", this._root);
|
|
93131
93283
|
return this;
|
|
93132
93284
|
};
|
|
@@ -93233,10 +93385,10 @@ var require_send = __commonJS({
|
|
|
93233
93385
|
var lastModified = this.res.getHeader("Last-Modified");
|
|
93234
93386
|
return parseHttpDate(lastModified) <= parseHttpDate(ifRange);
|
|
93235
93387
|
};
|
|
93236
|
-
SendStream.prototype.redirect = function redirect(
|
|
93388
|
+
SendStream.prototype.redirect = function redirect(path23) {
|
|
93237
93389
|
var res = this.res;
|
|
93238
93390
|
if (hasListeners(this, "directory")) {
|
|
93239
|
-
this.emit("directory", res,
|
|
93391
|
+
this.emit("directory", res, path23);
|
|
93240
93392
|
return;
|
|
93241
93393
|
}
|
|
93242
93394
|
if (this.hasTrailingSlash()) {
|
|
@@ -93256,42 +93408,42 @@ var require_send = __commonJS({
|
|
|
93256
93408
|
SendStream.prototype.pipe = function pipe(res) {
|
|
93257
93409
|
var root = this._root;
|
|
93258
93410
|
this.res = res;
|
|
93259
|
-
var
|
|
93260
|
-
if (
|
|
93411
|
+
var path23 = decode(this.path);
|
|
93412
|
+
if (path23 === -1) {
|
|
93261
93413
|
this.error(400);
|
|
93262
93414
|
return res;
|
|
93263
93415
|
}
|
|
93264
|
-
if (~
|
|
93416
|
+
if (~path23.indexOf("\0")) {
|
|
93265
93417
|
this.error(400);
|
|
93266
93418
|
return res;
|
|
93267
93419
|
}
|
|
93268
93420
|
var parts;
|
|
93269
93421
|
if (root !== null) {
|
|
93270
|
-
if (
|
|
93271
|
-
|
|
93422
|
+
if (path23) {
|
|
93423
|
+
path23 = normalize2("." + sep2 + path23);
|
|
93272
93424
|
}
|
|
93273
|
-
if (UP_PATH_REGEXP.test(
|
|
93274
|
-
debug('malicious path "%s"',
|
|
93425
|
+
if (UP_PATH_REGEXP.test(path23)) {
|
|
93426
|
+
debug('malicious path "%s"', path23);
|
|
93275
93427
|
this.error(403);
|
|
93276
93428
|
return res;
|
|
93277
93429
|
}
|
|
93278
|
-
parts =
|
|
93279
|
-
|
|
93430
|
+
parts = path23.split(sep2);
|
|
93431
|
+
path23 = normalize2(join8(root, path23));
|
|
93280
93432
|
} else {
|
|
93281
|
-
if (UP_PATH_REGEXP.test(
|
|
93282
|
-
debug('malicious path "%s"',
|
|
93433
|
+
if (UP_PATH_REGEXP.test(path23)) {
|
|
93434
|
+
debug('malicious path "%s"', path23);
|
|
93283
93435
|
this.error(403);
|
|
93284
93436
|
return res;
|
|
93285
93437
|
}
|
|
93286
|
-
parts = normalize2(
|
|
93287
|
-
|
|
93438
|
+
parts = normalize2(path23).split(sep2);
|
|
93439
|
+
path23 = resolve11(path23);
|
|
93288
93440
|
}
|
|
93289
93441
|
if (containsDotFile(parts)) {
|
|
93290
93442
|
var access3 = this._dotfiles;
|
|
93291
93443
|
if (access3 === void 0) {
|
|
93292
93444
|
access3 = parts[parts.length - 1][0] === "." ? this._hidden ? "allow" : "ignore" : "allow";
|
|
93293
93445
|
}
|
|
93294
|
-
debug('%s dotfile "%s"', access3,
|
|
93446
|
+
debug('%s dotfile "%s"', access3, path23);
|
|
93295
93447
|
switch (access3) {
|
|
93296
93448
|
case "allow":
|
|
93297
93449
|
break;
|
|
@@ -93305,13 +93457,13 @@ var require_send = __commonJS({
|
|
|
93305
93457
|
}
|
|
93306
93458
|
}
|
|
93307
93459
|
if (this._index.length && this.hasTrailingSlash()) {
|
|
93308
|
-
this.sendIndex(
|
|
93460
|
+
this.sendIndex(path23);
|
|
93309
93461
|
return res;
|
|
93310
93462
|
}
|
|
93311
|
-
this.sendFile(
|
|
93463
|
+
this.sendFile(path23);
|
|
93312
93464
|
return res;
|
|
93313
93465
|
};
|
|
93314
|
-
SendStream.prototype.send = function send2(
|
|
93466
|
+
SendStream.prototype.send = function send2(path23, stat3) {
|
|
93315
93467
|
var len = stat3.size;
|
|
93316
93468
|
var options = this.options;
|
|
93317
93469
|
var opts = {};
|
|
@@ -93323,9 +93475,9 @@ var require_send = __commonJS({
|
|
|
93323
93475
|
this.headersAlreadySent();
|
|
93324
93476
|
return;
|
|
93325
93477
|
}
|
|
93326
|
-
debug('pipe "%s"',
|
|
93327
|
-
this.setHeader(
|
|
93328
|
-
this.type(
|
|
93478
|
+
debug('pipe "%s"', path23);
|
|
93479
|
+
this.setHeader(path23, stat3);
|
|
93480
|
+
this.type(path23);
|
|
93329
93481
|
if (this.isConditionalGET()) {
|
|
93330
93482
|
if (this.isPreconditionFailure()) {
|
|
93331
93483
|
this.error(412);
|
|
@@ -93375,28 +93527,28 @@ var require_send = __commonJS({
|
|
|
93375
93527
|
res.end();
|
|
93376
93528
|
return;
|
|
93377
93529
|
}
|
|
93378
|
-
this.stream(
|
|
93530
|
+
this.stream(path23, opts);
|
|
93379
93531
|
};
|
|
93380
|
-
SendStream.prototype.sendFile = function sendFile(
|
|
93532
|
+
SendStream.prototype.sendFile = function sendFile(path23) {
|
|
93381
93533
|
var i2 = 0;
|
|
93382
93534
|
var self2 = this;
|
|
93383
|
-
debug('stat "%s"',
|
|
93384
|
-
fs9.stat(
|
|
93385
|
-
if (err2 && err2.code === "ENOENT" && !extname3(
|
|
93535
|
+
debug('stat "%s"', path23);
|
|
93536
|
+
fs9.stat(path23, function onstat(err2, stat3) {
|
|
93537
|
+
if (err2 && err2.code === "ENOENT" && !extname3(path23) && path23[path23.length - 1] !== sep2) {
|
|
93386
93538
|
return next(err2);
|
|
93387
93539
|
}
|
|
93388
93540
|
if (err2)
|
|
93389
93541
|
return self2.onStatError(err2);
|
|
93390
93542
|
if (stat3.isDirectory())
|
|
93391
|
-
return self2.redirect(
|
|
93392
|
-
self2.emit("file",
|
|
93393
|
-
self2.send(
|
|
93543
|
+
return self2.redirect(path23);
|
|
93544
|
+
self2.emit("file", path23, stat3);
|
|
93545
|
+
self2.send(path23, stat3);
|
|
93394
93546
|
});
|
|
93395
93547
|
function next(err2) {
|
|
93396
93548
|
if (self2._extensions.length <= i2) {
|
|
93397
93549
|
return err2 ? self2.onStatError(err2) : self2.error(404);
|
|
93398
93550
|
}
|
|
93399
|
-
var p =
|
|
93551
|
+
var p = path23 + "." + self2._extensions[i2++];
|
|
93400
93552
|
debug('stat "%s"', p);
|
|
93401
93553
|
fs9.stat(p, function(err3, stat3) {
|
|
93402
93554
|
if (err3)
|
|
@@ -93408,7 +93560,7 @@ var require_send = __commonJS({
|
|
|
93408
93560
|
});
|
|
93409
93561
|
}
|
|
93410
93562
|
};
|
|
93411
|
-
SendStream.prototype.sendIndex = function sendIndex(
|
|
93563
|
+
SendStream.prototype.sendIndex = function sendIndex(path23) {
|
|
93412
93564
|
var i2 = -1;
|
|
93413
93565
|
var self2 = this;
|
|
93414
93566
|
function next(err2) {
|
|
@@ -93417,7 +93569,7 @@ var require_send = __commonJS({
|
|
|
93417
93569
|
return self2.onStatError(err2);
|
|
93418
93570
|
return self2.error(404);
|
|
93419
93571
|
}
|
|
93420
|
-
var p = join8(
|
|
93572
|
+
var p = join8(path23, self2._index[i2]);
|
|
93421
93573
|
debug('stat "%s"', p);
|
|
93422
93574
|
fs9.stat(p, function(err3, stat3) {
|
|
93423
93575
|
if (err3)
|
|
@@ -93430,10 +93582,10 @@ var require_send = __commonJS({
|
|
|
93430
93582
|
}
|
|
93431
93583
|
next();
|
|
93432
93584
|
};
|
|
93433
|
-
SendStream.prototype.stream = function stream(
|
|
93585
|
+
SendStream.prototype.stream = function stream(path23, options) {
|
|
93434
93586
|
var self2 = this;
|
|
93435
93587
|
var res = this.res;
|
|
93436
|
-
var stream2 = fs9.createReadStream(
|
|
93588
|
+
var stream2 = fs9.createReadStream(path23, options);
|
|
93437
93589
|
this.emit("stream", stream2);
|
|
93438
93590
|
stream2.pipe(res);
|
|
93439
93591
|
function cleanup() {
|
|
@@ -93448,11 +93600,11 @@ var require_send = __commonJS({
|
|
|
93448
93600
|
self2.emit("end");
|
|
93449
93601
|
});
|
|
93450
93602
|
};
|
|
93451
|
-
SendStream.prototype.type = function type2(
|
|
93603
|
+
SendStream.prototype.type = function type2(path23) {
|
|
93452
93604
|
var res = this.res;
|
|
93453
93605
|
if (res.getHeader("Content-Type"))
|
|
93454
93606
|
return;
|
|
93455
|
-
var type3 = mime.lookup(
|
|
93607
|
+
var type3 = mime.lookup(path23);
|
|
93456
93608
|
if (!type3) {
|
|
93457
93609
|
debug("no content-type");
|
|
93458
93610
|
return;
|
|
@@ -93461,9 +93613,9 @@ var require_send = __commonJS({
|
|
|
93461
93613
|
debug("content-type %s", type3);
|
|
93462
93614
|
res.setHeader("Content-Type", type3 + (charset ? "; charset=" + charset : ""));
|
|
93463
93615
|
};
|
|
93464
|
-
SendStream.prototype.setHeader = function setHeader(
|
|
93616
|
+
SendStream.prototype.setHeader = function setHeader(path23, stat3) {
|
|
93465
93617
|
var res = this.res;
|
|
93466
|
-
this.emit("headers", res,
|
|
93618
|
+
this.emit("headers", res, path23, stat3);
|
|
93467
93619
|
if (this._acceptRanges && !res.getHeader("Accept-Ranges")) {
|
|
93468
93620
|
debug("accept ranges");
|
|
93469
93621
|
res.setHeader("Accept-Ranges", "bytes");
|
|
@@ -93522,9 +93674,9 @@ var require_send = __commonJS({
|
|
|
93522
93674
|
}
|
|
93523
93675
|
return err2 instanceof Error ? createError(status, err2, { expose: false }) : createError(status, err2);
|
|
93524
93676
|
}
|
|
93525
|
-
function decode(
|
|
93677
|
+
function decode(path23) {
|
|
93526
93678
|
try {
|
|
93527
|
-
return decodeURIComponent(
|
|
93679
|
+
return decodeURIComponent(path23);
|
|
93528
93680
|
} catch (err2) {
|
|
93529
93681
|
return -1;
|
|
93530
93682
|
}
|
|
@@ -93632,11 +93784,11 @@ var require_serve_static = __commonJS({
|
|
|
93632
93784
|
}
|
|
93633
93785
|
var forwardError = !fallthrough;
|
|
93634
93786
|
var originalUrl = parseUrl.original(req);
|
|
93635
|
-
var
|
|
93636
|
-
if (
|
|
93637
|
-
|
|
93787
|
+
var path22 = parseUrl(req).pathname;
|
|
93788
|
+
if (path22 === "/" && originalUrl.pathname.substr(-1) !== "/") {
|
|
93789
|
+
path22 = "";
|
|
93638
93790
|
}
|
|
93639
|
-
var stream = send(req,
|
|
93791
|
+
var stream = send(req, path22, opts);
|
|
93640
93792
|
stream.on("directory", onDirectory);
|
|
93641
93793
|
if (setHeaders) {
|
|
93642
93794
|
stream.on("headers", setHeaders);
|
|
@@ -93913,20 +94065,20 @@ var require_ignore = __commonJS({
|
|
|
93913
94065
|
var throwError2 = (message, Ctor) => {
|
|
93914
94066
|
throw new Ctor(message);
|
|
93915
94067
|
};
|
|
93916
|
-
var checkPath = (
|
|
93917
|
-
if (!isString2(
|
|
94068
|
+
var checkPath = (path22, originalPath, doThrow) => {
|
|
94069
|
+
if (!isString2(path22)) {
|
|
93918
94070
|
return doThrow(`path must be a string, but got \`${originalPath}\``, TypeError);
|
|
93919
94071
|
}
|
|
93920
|
-
if (!
|
|
94072
|
+
if (!path22) {
|
|
93921
94073
|
return doThrow(`path must not be empty`, TypeError);
|
|
93922
94074
|
}
|
|
93923
|
-
if (checkPath.isNotRelative(
|
|
94075
|
+
if (checkPath.isNotRelative(path22)) {
|
|
93924
94076
|
const r = "`path.relative()`d";
|
|
93925
94077
|
return doThrow(`path should be a ${r} string, but got "${originalPath}"`, RangeError);
|
|
93926
94078
|
}
|
|
93927
94079
|
return true;
|
|
93928
94080
|
};
|
|
93929
|
-
var isNotRelative = (
|
|
94081
|
+
var isNotRelative = (path22) => REGEX_TEST_INVALID_PATH.test(path22);
|
|
93930
94082
|
checkPath.isNotRelative = isNotRelative;
|
|
93931
94083
|
checkPath.convert = (p) => p;
|
|
93932
94084
|
var Ignore = class {
|
|
@@ -93968,7 +94120,7 @@ var require_ignore = __commonJS({
|
|
|
93968
94120
|
addPattern(pattern) {
|
|
93969
94121
|
return this.add(pattern);
|
|
93970
94122
|
}
|
|
93971
|
-
_testOne(
|
|
94123
|
+
_testOne(path22, checkUnignored) {
|
|
93972
94124
|
let ignored = false;
|
|
93973
94125
|
let unignored = false;
|
|
93974
94126
|
this._rules.forEach((rule) => {
|
|
@@ -93976,7 +94128,7 @@ var require_ignore = __commonJS({
|
|
|
93976
94128
|
if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) {
|
|
93977
94129
|
return;
|
|
93978
94130
|
}
|
|
93979
|
-
const matched = rule.regex.test(
|
|
94131
|
+
const matched = rule.regex.test(path22);
|
|
93980
94132
|
if (matched) {
|
|
93981
94133
|
ignored = !negative;
|
|
93982
94134
|
unignored = negative;
|
|
@@ -93988,39 +94140,39 @@ var require_ignore = __commonJS({
|
|
|
93988
94140
|
};
|
|
93989
94141
|
}
|
|
93990
94142
|
_test(originalPath, cache, checkUnignored, slices) {
|
|
93991
|
-
const
|
|
93992
|
-
checkPath(
|
|
93993
|
-
return this._t(
|
|
94143
|
+
const path22 = originalPath && checkPath.convert(originalPath);
|
|
94144
|
+
checkPath(path22, originalPath, this._allowRelativePaths ? RETURN_FALSE : throwError2);
|
|
94145
|
+
return this._t(path22, cache, checkUnignored, slices);
|
|
93994
94146
|
}
|
|
93995
|
-
_t(
|
|
93996
|
-
if (
|
|
93997
|
-
return cache[
|
|
94147
|
+
_t(path22, cache, checkUnignored, slices) {
|
|
94148
|
+
if (path22 in cache) {
|
|
94149
|
+
return cache[path22];
|
|
93998
94150
|
}
|
|
93999
94151
|
if (!slices) {
|
|
94000
|
-
slices =
|
|
94152
|
+
slices = path22.split(SLASH);
|
|
94001
94153
|
}
|
|
94002
94154
|
slices.pop();
|
|
94003
94155
|
if (!slices.length) {
|
|
94004
|
-
return cache[
|
|
94156
|
+
return cache[path22] = this._testOne(path22, checkUnignored);
|
|
94005
94157
|
}
|
|
94006
94158
|
const parent = this._t(slices.join(SLASH) + SLASH, cache, checkUnignored, slices);
|
|
94007
|
-
return cache[
|
|
94159
|
+
return cache[path22] = parent.ignored ? parent : this._testOne(path22, checkUnignored);
|
|
94008
94160
|
}
|
|
94009
|
-
ignores(
|
|
94010
|
-
return this._test(
|
|
94161
|
+
ignores(path22) {
|
|
94162
|
+
return this._test(path22, this._ignoreCache, false).ignored;
|
|
94011
94163
|
}
|
|
94012
94164
|
createFilter() {
|
|
94013
|
-
return (
|
|
94165
|
+
return (path22) => !this.ignores(path22);
|
|
94014
94166
|
}
|
|
94015
94167
|
filter(paths) {
|
|
94016
94168
|
return makeArray(paths).filter(this.createFilter());
|
|
94017
94169
|
}
|
|
94018
|
-
test(
|
|
94019
|
-
return this._test(
|
|
94170
|
+
test(path22) {
|
|
94171
|
+
return this._test(path22, this._testCache, true);
|
|
94020
94172
|
}
|
|
94021
94173
|
};
|
|
94022
94174
|
var factory = (options) => new Ignore(options);
|
|
94023
|
-
var isPathValid = (
|
|
94175
|
+
var isPathValid = (path22) => checkPath(path22 && checkPath.convert(path22), path22, RETURN_FALSE);
|
|
94024
94176
|
factory.isPathValid = isPathValid;
|
|
94025
94177
|
factory.default = factory;
|
|
94026
94178
|
module2.exports = factory;
|
|
@@ -94028,7 +94180,7 @@ var require_ignore = __commonJS({
|
|
|
94028
94180
|
const makePosix = (str) => /^\\\\\?\\/.test(str) || /["<>|\u0000-\u001F]+/u.test(str) ? str : str.replace(/\\/g, "/");
|
|
94029
94181
|
checkPath.convert = makePosix;
|
|
94030
94182
|
const REGIX_IS_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i;
|
|
94031
|
-
checkPath.isNotRelative = (
|
|
94183
|
+
checkPath.isNotRelative = (path22) => REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path22) || isNotRelative(path22);
|
|
94032
94184
|
}
|
|
94033
94185
|
}
|
|
94034
94186
|
});
|
|
@@ -94904,15 +95056,15 @@ var require_route5 = __commonJS({
|
|
|
94904
95056
|
};
|
|
94905
95057
|
}
|
|
94906
95058
|
function wrapConversion(toModel, graph) {
|
|
94907
|
-
const
|
|
95059
|
+
const path22 = [graph[toModel].parent, toModel];
|
|
94908
95060
|
let fn = conversions[graph[toModel].parent][toModel];
|
|
94909
95061
|
let cur = graph[toModel].parent;
|
|
94910
95062
|
while (graph[cur].parent) {
|
|
94911
|
-
|
|
95063
|
+
path22.unshift(graph[cur].parent);
|
|
94912
95064
|
fn = link(conversions[graph[cur].parent][cur], fn);
|
|
94913
95065
|
cur = graph[cur].parent;
|
|
94914
95066
|
}
|
|
94915
|
-
fn.conversion =
|
|
95067
|
+
fn.conversion = path22;
|
|
94916
95068
|
return fn;
|
|
94917
95069
|
}
|
|
94918
95070
|
module2.exports = function(fromModel) {
|
|
@@ -97196,11 +97348,11 @@ var require_Mime = __commonJS({
|
|
|
97196
97348
|
}
|
|
97197
97349
|
}
|
|
97198
97350
|
};
|
|
97199
|
-
Mime.prototype.getType = function(
|
|
97200
|
-
|
|
97201
|
-
let last =
|
|
97351
|
+
Mime.prototype.getType = function(path22) {
|
|
97352
|
+
path22 = String(path22);
|
|
97353
|
+
let last = path22.replace(/^.*[/\\]/, "").toLowerCase();
|
|
97202
97354
|
let ext = last.replace(/^.*\./, "").toLowerCase();
|
|
97203
|
-
let hasPath = last.length <
|
|
97355
|
+
let hasPath = last.length < path22.length;
|
|
97204
97356
|
let hasDot = ext.length < last.length - 1;
|
|
97205
97357
|
return (hasDot || !hasPath) && this._types[ext] || null;
|
|
97206
97358
|
};
|
|
@@ -97688,7 +97840,7 @@ var require_utils4 = __commonJS({
|
|
|
97688
97840
|
init_import_meta_url();
|
|
97689
97841
|
var fs9 = require("fs");
|
|
97690
97842
|
var ini = require_ini();
|
|
97691
|
-
var
|
|
97843
|
+
var path22 = require("path");
|
|
97692
97844
|
var stripJsonComments = require_strip_json_comments();
|
|
97693
97845
|
var parse = exports2.parse = function(content) {
|
|
97694
97846
|
if (/^\s*{/.test(content))
|
|
@@ -97702,7 +97854,7 @@ var require_utils4 = __commonJS({
|
|
|
97702
97854
|
for (var i2 in args)
|
|
97703
97855
|
if (typeof args[i2] !== "string")
|
|
97704
97856
|
return;
|
|
97705
|
-
var file2 =
|
|
97857
|
+
var file2 = path22.join.apply(null, args);
|
|
97706
97858
|
var content;
|
|
97707
97859
|
try {
|
|
97708
97860
|
return fs9.readFileSync(file2, "utf-8");
|
|
@@ -97740,15 +97892,15 @@ var require_utils4 = __commonJS({
|
|
|
97740
97892
|
return obj;
|
|
97741
97893
|
};
|
|
97742
97894
|
var find = exports2.find = function() {
|
|
97743
|
-
var rel =
|
|
97895
|
+
var rel = path22.join.apply(null, [].slice.call(arguments));
|
|
97744
97896
|
function find2(start, rel2) {
|
|
97745
|
-
var file2 =
|
|
97897
|
+
var file2 = path22.join(start, rel2);
|
|
97746
97898
|
try {
|
|
97747
97899
|
fs9.statSync(file2);
|
|
97748
97900
|
return file2;
|
|
97749
97901
|
} catch (err2) {
|
|
97750
|
-
if (
|
|
97751
|
-
return find2(
|
|
97902
|
+
if (path22.dirname(start) !== start)
|
|
97903
|
+
return find2(path22.dirname(start), rel2);
|
|
97752
97904
|
}
|
|
97753
97905
|
}
|
|
97754
97906
|
return find2(process.cwd(), rel);
|
|
@@ -98181,8 +98333,8 @@ var require_registry_auth_token = __commonJS({
|
|
|
98181
98333
|
}
|
|
98182
98334
|
return void 0;
|
|
98183
98335
|
}
|
|
98184
|
-
function normalizePath(
|
|
98185
|
-
return
|
|
98336
|
+
function normalizePath(path22) {
|
|
98337
|
+
return path22[path22.length - 1] === "/" ? path22 : path22 + "/";
|
|
98186
98338
|
}
|
|
98187
98339
|
function getAuthInfoForUrl(regUrl, npmrc) {
|
|
98188
98340
|
var bearerAuth = getBearerToken(npmrc[regUrl + tokenKey] || npmrc[regUrl + "/" + tokenKey]);
|
|
@@ -99444,11 +99596,11 @@ var parser = new YargsParser({
|
|
|
99444
99596
|
format: import_util.format,
|
|
99445
99597
|
normalize: import_path.normalize,
|
|
99446
99598
|
resolve: import_path.resolve,
|
|
99447
|
-
require: (
|
|
99599
|
+
require: (path22) => {
|
|
99448
99600
|
if (typeof require !== "undefined") {
|
|
99449
|
-
return require(
|
|
99450
|
-
} else if (
|
|
99451
|
-
return JSON.parse((0, import_fs.readFileSync)(
|
|
99601
|
+
return require(path22);
|
|
99602
|
+
} else if (path22.match(/\.json$/)) {
|
|
99603
|
+
return JSON.parse((0, import_fs.readFileSync)(path22, "utf8"));
|
|
99452
99604
|
} else {
|
|
99453
99605
|
throw Error("only .json config files are supported in ESM");
|
|
99454
99606
|
}
|
|
@@ -100124,9 +100276,9 @@ function npmRunPath(options = {}) {
|
|
|
100124
100276
|
}
|
|
100125
100277
|
function npmRunPathEnv({ env: env4 = import_node_process.default.env, ...options } = {}) {
|
|
100126
100278
|
env4 = { ...env4 };
|
|
100127
|
-
const
|
|
100128
|
-
options.path = env4[
|
|
100129
|
-
env4[
|
|
100279
|
+
const path22 = pathKey({ env: env4 });
|
|
100280
|
+
options.path = env4[path22];
|
|
100281
|
+
env4[path22] = npmRunPath(options);
|
|
100130
100282
|
return env4;
|
|
100131
100283
|
}
|
|
100132
100284
|
|
|
@@ -104810,7 +104962,7 @@ var yargs_default = Yargs;
|
|
|
104810
104962
|
|
|
104811
104963
|
// package.json
|
|
104812
104964
|
var name = "wrangler";
|
|
104813
|
-
var version = "2.0.
|
|
104965
|
+
var version = "2.0.3";
|
|
104814
104966
|
var author = "wrangler@cloudflare.com";
|
|
104815
104967
|
var description = "Command-line interface for all things Cloudflare Workers";
|
|
104816
104968
|
var bin = {
|
|
@@ -104819,9 +104971,9 @@ var bin = {
|
|
|
104819
104971
|
};
|
|
104820
104972
|
var license = "MIT OR Apache-2.0";
|
|
104821
104973
|
var bugs = {
|
|
104822
|
-
url: "https://github.com/cloudflare/
|
|
104974
|
+
url: "https://github.com/cloudflare/wrangler2/issues"
|
|
104823
104975
|
};
|
|
104824
|
-
var homepage = "https://github.com/cloudflare/
|
|
104976
|
+
var homepage = "https://github.com/cloudflare/wrangler2#readme";
|
|
104825
104977
|
var keywords = [
|
|
104826
104978
|
"wrangler",
|
|
104827
104979
|
"cloudflare",
|
|
@@ -104872,6 +105024,7 @@ var devDependencies = {
|
|
|
104872
105024
|
"@types/supports-color": "^8.1.1",
|
|
104873
105025
|
"@types/ws": "^8.5.3",
|
|
104874
105026
|
"@types/yargs": "^17.0.10",
|
|
105027
|
+
"@webcontainer/env": "^1.0.1",
|
|
104875
105028
|
chokidar: "^3.5.3",
|
|
104876
105029
|
clipboardy: "^3.0.0",
|
|
104877
105030
|
"cmd-shim": "^4.1.0",
|
|
@@ -104919,7 +105072,8 @@ var files = [
|
|
|
104919
105072
|
"wrangler-dist",
|
|
104920
105073
|
"templates",
|
|
104921
105074
|
"vendor",
|
|
104922
|
-
"import_meta_url.js"
|
|
105075
|
+
"import_meta_url.js",
|
|
105076
|
+
"Cloudflare_CA.pem"
|
|
104923
105077
|
];
|
|
104924
105078
|
var scripts = {
|
|
104925
105079
|
clean: "rm -rf wrangler-dist miniflare-dist",
|
|
@@ -105017,7 +105171,8 @@ var TOML_ERROR_NAME = "TomlError";
|
|
|
105017
105171
|
var TOML_ERROR_SUFFIX = " at row ";
|
|
105018
105172
|
function parseTOML(input, file) {
|
|
105019
105173
|
try {
|
|
105020
|
-
|
|
105174
|
+
const normalizedInput = input.replace(/\r\n$/g, "\n");
|
|
105175
|
+
return import_toml.default.parse(normalizedInput);
|
|
105021
105176
|
} catch (err2) {
|
|
105022
105177
|
const { name: name2, message, line, col } = err2;
|
|
105023
105178
|
if (name2 !== TOML_ERROR_NAME) {
|
|
@@ -105168,9 +105323,10 @@ var import_node_path6 = __toESM(require("node:path"));
|
|
|
105168
105323
|
var import_node_url4 = __toESM(require("node:url"));
|
|
105169
105324
|
var import_node_util2 = require("node:util");
|
|
105170
105325
|
var import_toml2 = __toESM(require_toml());
|
|
105326
|
+
var import_env = __toESM(require_dist());
|
|
105171
105327
|
var import_ink = __toESM(require_build2());
|
|
105172
105328
|
var import_ink_select_input = __toESM(require_build3());
|
|
105173
|
-
var import_ink_table = __toESM(
|
|
105329
|
+
var import_ink_table = __toESM(require_dist2());
|
|
105174
105330
|
var import_react = __toESM(require_react());
|
|
105175
105331
|
var import_undici = __toESM(require_undici());
|
|
105176
105332
|
|
|
@@ -105248,8 +105404,8 @@ function validateScopeKeys(scopes) {
|
|
|
105248
105404
|
var CLIENT_ID = "54d11594-84e4-41aa-b438-e81b8fa78ee7";
|
|
105249
105405
|
var AUTH_URL = "https://dash.cloudflare.com/oauth2/auth";
|
|
105250
105406
|
var TOKEN_URL = "https://dash.cloudflare.com/oauth2/token";
|
|
105251
|
-
var CALLBACK_URL = "http://localhost:8976/oauth/callback";
|
|
105252
105407
|
var REVOKE_URL = "https://dash.cloudflare.com/oauth2/revoke";
|
|
105408
|
+
var CALLBACK_URL = import_env.HostURL.parse("http://localhost:8976/oauth/callback").href;
|
|
105253
105409
|
var LocalState = getAuthTokens();
|
|
105254
105410
|
function getAuthTokens(config) {
|
|
105255
105411
|
try {
|
|
@@ -106032,9 +106188,9 @@ Please add "${field}" to "env.${envName}".`);
|
|
|
106032
106188
|
}
|
|
106033
106189
|
return rawEnv[field] ?? defaultValue;
|
|
106034
106190
|
}
|
|
106035
|
-
function unwindPropertyPath(root,
|
|
106191
|
+
function unwindPropertyPath(root, path22) {
|
|
106036
106192
|
let container = root;
|
|
106037
|
-
const parts =
|
|
106193
|
+
const parts = path22.split(".");
|
|
106038
106194
|
for (let i2 = 0; i2 < parts.length - 1; i2++) {
|
|
106039
106195
|
if (!hasProperty(container, parts[i2])) {
|
|
106040
106196
|
return;
|
|
@@ -106289,7 +106445,7 @@ function normalizeAndValidateMainField(configPath, rawMain, deprecatedUpload) {
|
|
|
106289
106445
|
function normalizeAndValidateDev(diagnostics, rawDev) {
|
|
106290
106446
|
const {
|
|
106291
106447
|
ip = "localhost",
|
|
106292
|
-
port
|
|
106448
|
+
port,
|
|
106293
106449
|
local_protocol = "http",
|
|
106294
106450
|
upstream_protocol = "https",
|
|
106295
106451
|
host,
|
|
@@ -106910,6 +107066,7 @@ function createWorkerUploadForm(worker) {
|
|
|
106910
107066
|
// src/dev/dev.tsx
|
|
106911
107067
|
init_import_meta_url();
|
|
106912
107068
|
var import_node_child_process3 = require("node:child_process");
|
|
107069
|
+
var path16 = __toESM(require("node:path"));
|
|
106913
107070
|
var import_chokidar = __toESM(require_chokidar());
|
|
106914
107071
|
|
|
106915
107072
|
// ../../node_modules/clipboardy/index.js
|
|
@@ -107120,9 +107277,10 @@ async function getEntry(args, config, command2) {
|
|
|
107120
107277
|
directory = import_node_path10.default.resolve(import_node_path10.default.dirname(config.configPath ?? "."));
|
|
107121
107278
|
file = import_node_path10.default.resolve(directory, config.main);
|
|
107122
107279
|
}
|
|
107123
|
-
|
|
107280
|
+
const relativeFile = import_node_path10.default.relative(directory, file) || ".";
|
|
107281
|
+
await runCustomBuild(file, relativeFile, config.build);
|
|
107124
107282
|
if (fileExists(file) === false) {
|
|
107125
|
-
throw new Error(`
|
|
107283
|
+
throw new Error(getMissingEntryPointMessage(`The entry-point file at "${relativeFile}" was not found.`, file, relativeFile));
|
|
107126
107284
|
}
|
|
107127
107285
|
const format4 = await guessWorkerFormat(file, directory, args.format ?? config.build?.upload?.format, config.tsconfig);
|
|
107128
107286
|
const { localBindings, remoteBindings } = partitionDurableObjectBindings(config);
|
|
@@ -107143,7 +107301,7 @@ ${migrateUrl}`);
|
|
|
107143
107301
|
}
|
|
107144
107302
|
return { file, directory, format: format4 };
|
|
107145
107303
|
}
|
|
107146
|
-
async function runCustomBuild(
|
|
107304
|
+
async function runCustomBuild(expectedEntryAbsolute, expectedEntryRelative, build6) {
|
|
107147
107305
|
if (build6?.command) {
|
|
107148
107306
|
logger.log("Running custom build:", build6.command);
|
|
107149
107307
|
await execaCommand(build6.command, {
|
|
@@ -107152,8 +107310,9 @@ async function runCustomBuild(expectedEntry, build6) {
|
|
|
107152
107310
|
stderr: "inherit",
|
|
107153
107311
|
...build6.cwd && { cwd: build6.cwd }
|
|
107154
107312
|
});
|
|
107155
|
-
if (fileExists(
|
|
107156
|
-
throw new Error(`
|
|
107313
|
+
if (fileExists(expectedEntryAbsolute) === false) {
|
|
107314
|
+
throw new Error(getMissingEntryPointMessage(`The expected output file at "${expectedEntryRelative}" was not found after running custom build: ${build6.command}.
|
|
107315
|
+
The \`main\` property in wrangler.toml should point to the file generated by the custom build.`, expectedEntryAbsolute, expectedEntryRelative));
|
|
107157
107316
|
}
|
|
107158
107317
|
}
|
|
107159
107318
|
}
|
|
@@ -107238,6 +107397,35 @@ function generateAddScriptNameExamples(localBindings) {
|
|
|
107238
107397
|
return `${currentBinding} ==> ${fixedBinding}`;
|
|
107239
107398
|
}).join("\n");
|
|
107240
107399
|
}
|
|
107400
|
+
function getMissingEntryPointMessage(message, absoluteEntryPointPath, relativeEntryPointPath) {
|
|
107401
|
+
if ((0, import_node_fs4.existsSync)(absoluteEntryPointPath) && (0, import_node_fs4.statSync)(absoluteEntryPointPath).isDirectory()) {
|
|
107402
|
+
message += `
|
|
107403
|
+
The provided entry-point path, "${relativeEntryPointPath}", points to a directory, rather than a file.
|
|
107404
|
+
`;
|
|
107405
|
+
const possiblePaths = [];
|
|
107406
|
+
for (const basenamePath of [
|
|
107407
|
+
"worker",
|
|
107408
|
+
"dist/worker",
|
|
107409
|
+
"index",
|
|
107410
|
+
"dist/index"
|
|
107411
|
+
]) {
|
|
107412
|
+
for (const extension of [".ts", ".tsx", ".js", ".jsx"]) {
|
|
107413
|
+
const filePath = basenamePath + extension;
|
|
107414
|
+
if (fileExists(import_node_path10.default.resolve(absoluteEntryPointPath, filePath))) {
|
|
107415
|
+
possiblePaths.push(import_node_path10.default.join(relativeEntryPointPath, filePath));
|
|
107416
|
+
}
|
|
107417
|
+
}
|
|
107418
|
+
}
|
|
107419
|
+
if (possiblePaths.length > 0) {
|
|
107420
|
+
message += `
|
|
107421
|
+
Did you mean to set the main field to${possiblePaths.length > 1 ? " one of" : ""}:
|
|
107422
|
+
\`\`\`
|
|
107423
|
+
` + possiblePaths.map((filePath) => `main = "./${filePath}"
|
|
107424
|
+
`).join("") + "```";
|
|
107425
|
+
}
|
|
107426
|
+
}
|
|
107427
|
+
return message;
|
|
107428
|
+
}
|
|
107241
107429
|
|
|
107242
107430
|
// src/dev/local.tsx
|
|
107243
107431
|
init_import_meta_url();
|
|
@@ -107438,6 +107626,7 @@ function usePreviewServer({
|
|
|
107438
107626
|
const request = message.pipe(remote.request(headers));
|
|
107439
107627
|
request.on("response", (responseHeaders) => {
|
|
107440
107628
|
const status = responseHeaders[":status"] ?? 500;
|
|
107629
|
+
logger.log(new Date().toLocaleTimeString(), method, url3, status);
|
|
107441
107630
|
rewriteRemoteHostToLocalHostInHeaders(responseHeaders, previewToken.host, port, localProtocol);
|
|
107442
107631
|
for (const name2 of Object.keys(responseHeaders)) {
|
|
107443
107632
|
if (name2.startsWith(":")) {
|
|
@@ -107522,9 +107711,7 @@ var HTTP1_HEADERS = /* @__PURE__ */ new Set([
|
|
|
107522
107711
|
]);
|
|
107523
107712
|
async function createProxyServer(localProtocol) {
|
|
107524
107713
|
const server = localProtocol === "https" ? (0, import_node_https.createServer)(await getHttpsOptions()) : (0, import_node_http2.createServer)();
|
|
107525
|
-
return server.on("
|
|
107526
|
-
logger.log(new Date().toLocaleTimeString(), req.method, req.url, res.statusCode);
|
|
107527
|
-
}).on("upgrade", (req) => {
|
|
107714
|
+
return server.on("upgrade", (req) => {
|
|
107528
107715
|
logger.log(new Date().toLocaleTimeString(), req.method, req.url, 101, "(WebSocket)");
|
|
107529
107716
|
}).on("error", (err2) => {
|
|
107530
107717
|
logger.error(new Date().toLocaleTimeString(), err2);
|
|
@@ -108415,7 +108602,7 @@ async function putKeyValue(accountId, namespaceId, keyValue) {
|
|
|
108415
108602
|
searchParams.set("expiration_ttl", `${keyValue.expiration_ttl}`);
|
|
108416
108603
|
}
|
|
108417
108604
|
}
|
|
108418
|
-
return await fetchResult(`/accounts/${accountId}/storage/kv/namespaces/${namespaceId}/values/${keyValue.key}`, { method: "PUT", body: keyValue.value }, searchParams);
|
|
108605
|
+
return await fetchResult(`/accounts/${accountId}/storage/kv/namespaces/${namespaceId}/values/${encodeURIComponent(keyValue.key)}`, { method: "PUT", body: keyValue.value }, searchParams);
|
|
108419
108606
|
}
|
|
108420
108607
|
async function getKeyValue(accountId, namespaceId, key2) {
|
|
108421
108608
|
return await fetchKVGetValue(accountId, namespaceId, key2);
|
|
@@ -108792,7 +108979,7 @@ async function bundleWorker(entry, destination, options) {
|
|
|
108792
108979
|
absWorkingDir: entry.directory,
|
|
108793
108980
|
outdir: destination,
|
|
108794
108981
|
external: ["__STATIC_CONTENT_MANIFEST"],
|
|
108795
|
-
format: "esm",
|
|
108982
|
+
format: entry.format === "modules" ? "esm" : "iife",
|
|
108796
108983
|
target: "es2020",
|
|
108797
108984
|
sourcemap: true,
|
|
108798
108985
|
minify,
|
|
@@ -109054,8 +109241,9 @@ function useCustomBuild(expectedEntry, build6) {
|
|
|
109054
109241
|
persistent: true,
|
|
109055
109242
|
ignoreInitial: true
|
|
109056
109243
|
}).on("all", (_event, filePath) => {
|
|
109244
|
+
const relativeFile = path16.relative(expectedEntry.directory, expectedEntry.file) || ".";
|
|
109057
109245
|
logger.log(`The file ${filePath} changed, restarting build...`);
|
|
109058
|
-
runCustomBuild(expectedEntry.file, build6).catch((err2) => {
|
|
109246
|
+
runCustomBuild(expectedEntry.file, relativeFile, build6).catch((err2) => {
|
|
109059
109247
|
logger.error("Custom build failed:", err2);
|
|
109060
109248
|
});
|
|
109061
109249
|
});
|
|
@@ -109063,7 +109251,7 @@ function useCustomBuild(expectedEntry, build6) {
|
|
|
109063
109251
|
return () => {
|
|
109064
109252
|
watcher?.close();
|
|
109065
109253
|
};
|
|
109066
|
-
}, [build6, expectedEntry
|
|
109254
|
+
}, [build6, expectedEntry]);
|
|
109067
109255
|
}
|
|
109068
109256
|
function sleep(period) {
|
|
109069
109257
|
return new Promise((resolve11) => setTimeout(resolve11, period));
|
|
@@ -109178,13 +109366,13 @@ var dev_default = (0, import_react_error_boundary.withErrorBoundary)(DevImplemen
|
|
|
109178
109366
|
// src/dev/dev-vars.ts
|
|
109179
109367
|
init_import_meta_url();
|
|
109180
109368
|
var fs5 = __toESM(require("node:fs"));
|
|
109181
|
-
var
|
|
109369
|
+
var path17 = __toESM(require("node:path"));
|
|
109182
109370
|
var import_dotenv = __toESM(require_main());
|
|
109183
109371
|
function getVarsForDev(config) {
|
|
109184
|
-
const configDir =
|
|
109185
|
-
const devVarsPath =
|
|
109372
|
+
const configDir = path17.resolve(path17.dirname(config.configPath ?? "."));
|
|
109373
|
+
const devVarsPath = path17.resolve(configDir, ".dev.vars");
|
|
109186
109374
|
if (fs5.existsSync(devVarsPath)) {
|
|
109187
|
-
const devVarsRelativePath =
|
|
109375
|
+
const devVarsRelativePath = path17.relative(process.cwd(), devVarsPath);
|
|
109188
109376
|
logger.log(`Using vars defined in ${devVarsRelativePath}`);
|
|
109189
109377
|
const devVars = import_dotenv.default.parse(fs5.readFileSync(devVarsPath, "utf8"));
|
|
109190
109378
|
return {
|
|
@@ -109347,7 +109535,7 @@ var import_chokidar2 = __toESM(require_chokidar());
|
|
|
109347
109535
|
var import_ink5 = __toESM(require_build2());
|
|
109348
109536
|
var import_ink_select_input2 = __toESM(require_build3());
|
|
109349
109537
|
var import_ink_spinner = __toESM(require_build5());
|
|
109350
|
-
var import_ink_table2 = __toESM(
|
|
109538
|
+
var import_ink_table2 = __toESM(require_dist2());
|
|
109351
109539
|
var import_mime = __toESM(require_mime2());
|
|
109352
109540
|
|
|
109353
109541
|
// ../../node_modules/pretty-bytes/index.js
|
|
@@ -109509,8 +109697,8 @@ function buildPlugin({
|
|
|
109509
109697
|
]
|
|
109510
109698
|
};
|
|
109511
109699
|
}
|
|
109512
|
-
const
|
|
109513
|
-
return { path:
|
|
109700
|
+
const path22 = `assets:./${(0, import_node_path15.relative)(outdir, directory)}`;
|
|
109701
|
+
return { path: path22, external: true, namespace: "assets" };
|
|
109514
109702
|
});
|
|
109515
109703
|
}
|
|
109516
109704
|
}
|
|
@@ -109638,7 +109826,7 @@ function buildWorker({
|
|
|
109638
109826
|
return {
|
|
109639
109827
|
contents: `export const onRequest = ({ request, env, functionPath }) => {
|
|
109640
109828
|
const url = new URL(request.url)
|
|
109641
|
-
const relativePathname = url.pathname.split(functionPath)[1] ||
|
|
109829
|
+
const relativePathname = \`/\${url.pathname.split(functionPath)[1] || ''}\`.replace(/^\\/\\//, '/');
|
|
109642
109830
|
url.pathname = '/cdn-cgi/pages-plugins/${identifier}' + relativePathname
|
|
109643
109831
|
request = new Request(url.toString(), request)
|
|
109644
109832
|
return env.ASSETS.fetch(request)
|
|
@@ -109661,9 +109849,9 @@ var import_esbuild5 = require("esbuild");
|
|
|
109661
109849
|
// src/paths.ts
|
|
109662
109850
|
init_import_meta_url();
|
|
109663
109851
|
var import_console = require("console");
|
|
109664
|
-
function toUrlPath(
|
|
109665
|
-
(0, import_console.assert)(!/^[a-z]:/i.test(
|
|
109666
|
-
return
|
|
109852
|
+
function toUrlPath(path22) {
|
|
109853
|
+
(0, import_console.assert)(!/^[a-z]:/i.test(path22), "Tried to convert a Windows file path with a drive to a URL path.");
|
|
109854
|
+
return path22.replace(/\\/g, "/");
|
|
109667
109855
|
}
|
|
109668
109856
|
|
|
109669
109857
|
// pages/functions/filepath-routing.ts
|
|
@@ -109952,6 +110140,7 @@ var getRequestContextCheckOptions = async () => {
|
|
|
109952
110140
|
// src/pages.tsx
|
|
109953
110141
|
var PAGES_CONFIG_CACHE_FILENAME = "pages.json";
|
|
109954
110142
|
var pagesBetaWarning = "\u{1F6A7} 'wrangler pages <command>' is a beta command. Please report any issues to https://github.com/cloudflare/wrangler2/issues/new/choose";
|
|
110143
|
+
var isInPagesCI = !!process.env.CF_PAGES;
|
|
109955
110144
|
var CLEANUP_CALLBACKS = [];
|
|
109956
110145
|
var CLEANUP = () => {
|
|
109957
110146
|
CLEANUP_CALLBACKS.forEach((callback) => callback());
|
|
@@ -110103,10 +110292,10 @@ function generateHeadersMatcher(headersFile) {
|
|
|
110103
110292
|
if (rule && Object.keys(rule.headers).length > 0) {
|
|
110104
110293
|
rules[rule.path] = rule.headers;
|
|
110105
110294
|
}
|
|
110106
|
-
const
|
|
110107
|
-
if (
|
|
110295
|
+
const path22 = validateURL(line);
|
|
110296
|
+
if (path22) {
|
|
110108
110297
|
rule = {
|
|
110109
|
-
path:
|
|
110298
|
+
path: path22,
|
|
110110
110299
|
headers: {}
|
|
110111
110300
|
};
|
|
110112
110301
|
continue;
|
|
@@ -110168,10 +110357,10 @@ function generateRedirectsMatcher(redirectsFile) {
|
|
|
110168
110357
|
return () => void 0;
|
|
110169
110358
|
}
|
|
110170
110359
|
}
|
|
110171
|
-
function extractPathname(
|
|
110172
|
-
if (!
|
|
110173
|
-
|
|
110174
|
-
const url3 = new import_node_url11.URL(`//${
|
|
110360
|
+
function extractPathname(path22 = "/", includeSearch, includeHash) {
|
|
110361
|
+
if (!path22.startsWith("/"))
|
|
110362
|
+
path22 = `/${path22}`;
|
|
110363
|
+
const url3 = new import_node_url11.URL(`//${path22}`, "relative://");
|
|
110175
110364
|
return `${url3.pathname}${includeSearch ? url3.search : ""}${includeHash ? url3.hash : ""}`;
|
|
110176
110365
|
}
|
|
110177
110366
|
function validateURL(token, onlyRelative = false, includeSearch = false, includeHash = false) {
|
|
@@ -110183,8 +110372,8 @@ function validateURL(token, onlyRelative = false, includeSearch = false, include
|
|
|
110183
110372
|
} else {
|
|
110184
110373
|
if (!token.startsWith("/") && onlyRelative)
|
|
110185
110374
|
token = `/${token}`;
|
|
110186
|
-
const
|
|
110187
|
-
if (
|
|
110375
|
+
const path22 = /^\//.exec(token);
|
|
110376
|
+
if (path22) {
|
|
110188
110377
|
try {
|
|
110189
110378
|
return extractPathname(token, includeSearch, includeHash);
|
|
110190
110379
|
} catch {
|
|
@@ -110202,21 +110391,21 @@ async function generateAssetsFetch(directory) {
|
|
|
110202
110391
|
const redirectsFile = (0, import_node_path19.join)(directory, "_redirects");
|
|
110203
110392
|
const workerFile = (0, import_node_path19.join)(directory, "_worker.js");
|
|
110204
110393
|
const ignoredFiles = [headersFile, redirectsFile, workerFile];
|
|
110205
|
-
const assetExists = (
|
|
110206
|
-
|
|
110207
|
-
return (0, import_node_fs7.existsSync)(
|
|
110394
|
+
const assetExists = (path22) => {
|
|
110395
|
+
path22 = (0, import_node_path19.join)(directory, path22);
|
|
110396
|
+
return (0, import_node_fs7.existsSync)(path22) && (0, import_node_fs7.lstatSync)(path22).isFile() && !ignoredFiles.includes(path22);
|
|
110208
110397
|
};
|
|
110209
|
-
const getAsset = (
|
|
110210
|
-
if (assetExists(
|
|
110211
|
-
return (0, import_node_path19.join)(directory,
|
|
110398
|
+
const getAsset = (path22) => {
|
|
110399
|
+
if (assetExists(path22)) {
|
|
110400
|
+
return (0, import_node_path19.join)(directory, path22);
|
|
110212
110401
|
}
|
|
110213
110402
|
};
|
|
110214
110403
|
let redirectsMatcher = generateRedirectsMatcher(redirectsFile);
|
|
110215
110404
|
let headersMatcher = generateHeadersMatcher(headersFile);
|
|
110216
110405
|
(0, import_chokidar2.watch)([headersFile, redirectsFile], {
|
|
110217
110406
|
persistent: true
|
|
110218
|
-
}).on("change", (
|
|
110219
|
-
switch (
|
|
110407
|
+
}).on("change", (path22) => {
|
|
110408
|
+
switch (path22) {
|
|
110220
110409
|
case headersFile: {
|
|
110221
110410
|
logger.log("_headers modified. Re-evaluating...");
|
|
110222
110411
|
headersMatcher = generateHeadersMatcher(headersFile);
|
|
@@ -110422,28 +110611,28 @@ var createDeployment = {
|
|
|
110422
110611
|
builder: (yargs) => {
|
|
110423
110612
|
return yargs.positional("directory", {
|
|
110424
110613
|
type: "string",
|
|
110425
|
-
|
|
110426
|
-
description: "The directory of
|
|
110614
|
+
demandOption: true,
|
|
110615
|
+
description: "The directory of static files to upload"
|
|
110427
110616
|
}).options({
|
|
110428
110617
|
"project-name": {
|
|
110429
110618
|
type: "string",
|
|
110430
|
-
description: "The name of the project you want to
|
|
110619
|
+
description: "The name of the project you want to deploy to"
|
|
110431
110620
|
},
|
|
110432
110621
|
branch: {
|
|
110433
110622
|
type: "string",
|
|
110434
|
-
description: "The
|
|
110623
|
+
description: "The name of the branch you want to deploy to"
|
|
110435
110624
|
},
|
|
110436
110625
|
"commit-hash": {
|
|
110437
110626
|
type: "string",
|
|
110438
|
-
description: "The
|
|
110627
|
+
description: "The SHA to attach to this deployment"
|
|
110439
110628
|
},
|
|
110440
110629
|
"commit-message": {
|
|
110441
110630
|
type: "string",
|
|
110442
|
-
description: "The
|
|
110631
|
+
description: "The commit message to attach to this deployment"
|
|
110443
110632
|
},
|
|
110444
110633
|
"commit-dirty": {
|
|
110445
110634
|
type: "boolean",
|
|
110446
|
-
description: "
|
|
110635
|
+
description: "Whether or not the workspace should be considered dirty for this deployment"
|
|
110447
110636
|
}
|
|
110448
110637
|
}).epilogue(pagesBetaWarning);
|
|
110449
110638
|
},
|
|
@@ -110455,34 +110644,40 @@ var createDeployment = {
|
|
|
110455
110644
|
commitMessage,
|
|
110456
110645
|
commitDirty
|
|
110457
110646
|
}) => {
|
|
110647
|
+
if (!directory) {
|
|
110648
|
+
throw new FatalError("Must specify a directory.", 1);
|
|
110649
|
+
}
|
|
110458
110650
|
const config = getConfigCache(PAGES_CONFIG_CACHE_FILENAME);
|
|
110459
110651
|
const accountId = await requireAuth(config);
|
|
110460
110652
|
projectName ??= config.project_name;
|
|
110461
110653
|
const isInteractive = process.stdin.isTTY;
|
|
110462
110654
|
if (!projectName && isInteractive) {
|
|
110463
|
-
const
|
|
110464
|
-
|
|
110465
|
-
|
|
110466
|
-
|
|
110467
|
-
|
|
110468
|
-
|
|
110469
|
-
|
|
110470
|
-
|
|
110471
|
-
|
|
110472
|
-
|
|
110473
|
-
|
|
110474
|
-
|
|
110655
|
+
const projects = (await listProjects({ accountId })).filter((project) => !project.source);
|
|
110656
|
+
let existingOrNew = "new";
|
|
110657
|
+
if (projects.length > 0) {
|
|
110658
|
+
existingOrNew = await new Promise((resolve11) => {
|
|
110659
|
+
const { unmount: unmount2 } = (0, import_ink5.render)(/* @__PURE__ */ import_react9.default.createElement(import_react9.default.Fragment, null, /* @__PURE__ */ import_react9.default.createElement(import_ink5.Text, null, "No project selected. Would you like to create one or use an existing project?"), /* @__PURE__ */ import_react9.default.createElement(import_ink_select_input2.default, {
|
|
110660
|
+
items: [
|
|
110661
|
+
{
|
|
110662
|
+
key: "new",
|
|
110663
|
+
label: "Create a new project",
|
|
110664
|
+
value: "new"
|
|
110665
|
+
},
|
|
110666
|
+
{
|
|
110667
|
+
key: "existing",
|
|
110668
|
+
label: "Use an existing project",
|
|
110669
|
+
value: "existing"
|
|
110670
|
+
}
|
|
110671
|
+
],
|
|
110672
|
+
onSelect: async (selected) => {
|
|
110673
|
+
resolve11(selected.value);
|
|
110674
|
+
unmount2();
|
|
110475
110675
|
}
|
|
110476
|
-
|
|
110477
|
-
|
|
110478
|
-
|
|
110479
|
-
unmount2();
|
|
110480
|
-
}
|
|
110481
|
-
})));
|
|
110482
|
-
});
|
|
110676
|
+
})));
|
|
110677
|
+
});
|
|
110678
|
+
}
|
|
110483
110679
|
switch (existingOrNew) {
|
|
110484
110680
|
case "existing": {
|
|
110485
|
-
const projects = (await listProjects({ accountId })).filter((project) => !project.source);
|
|
110486
110681
|
projectName = await new Promise((resolve11) => {
|
|
110487
110682
|
const { unmount: unmount2 } = (0, import_ink5.render)(/* @__PURE__ */ import_react9.default.createElement(import_react9.default.Fragment, null, /* @__PURE__ */ import_react9.default.createElement(import_ink5.Text, null, "Select a project:"), /* @__PURE__ */ import_react9.default.createElement(import_ink_select_input2.default, {
|
|
110488
110683
|
items: projects.map((project) => ({
|
|
@@ -110949,6 +111144,10 @@ var pages = (yargs) => {
|
|
|
110949
111144
|
type: "boolean",
|
|
110950
111145
|
default: false,
|
|
110951
111146
|
description: "Build a plugin rather than a Worker script"
|
|
111147
|
+
},
|
|
111148
|
+
"build-output-directory": {
|
|
111149
|
+
type: "string",
|
|
111150
|
+
description: "The directory to output static assets to"
|
|
110952
111151
|
}
|
|
110953
111152
|
}).epilogue(pagesBetaWarning), async ({
|
|
110954
111153
|
directory,
|
|
@@ -110958,9 +111157,13 @@ var pages = (yargs) => {
|
|
|
110958
111157
|
sourcemap,
|
|
110959
111158
|
fallbackService,
|
|
110960
111159
|
watch: watch3,
|
|
110961
|
-
plugin
|
|
111160
|
+
plugin,
|
|
111161
|
+
"build-output-directory": buildOutputDirectory
|
|
110962
111162
|
}) => {
|
|
110963
|
-
|
|
111163
|
+
if (!isInPagesCI) {
|
|
111164
|
+
logger.log(pagesBetaWarning);
|
|
111165
|
+
}
|
|
111166
|
+
buildOutputDirectory ??= (0, import_node_path19.dirname)(outfile);
|
|
110964
111167
|
await buildFunctions({
|
|
110965
111168
|
outfile,
|
|
110966
111169
|
outputConfigPath,
|
|
@@ -110970,7 +111173,7 @@ var pages = (yargs) => {
|
|
|
110970
111173
|
fallbackService,
|
|
110971
111174
|
watch: watch3,
|
|
110972
111175
|
plugin,
|
|
110973
|
-
buildOutputDirectory
|
|
111176
|
+
buildOutputDirectory
|
|
110974
111177
|
});
|
|
110975
111178
|
})).command("project", "\u26A1\uFE0F Interact with your Pages projects", (yargs2) => yargs2.command("list", "List your Cloudflare Pages projects", (yargs3) => yargs3.epilogue(pagesBetaWarning), async () => {
|
|
110976
111179
|
const config = getConfigCache(PAGES_CONFIG_CACHE_FILENAME);
|
|
@@ -111585,7 +111788,7 @@ async function updateCheck() {
|
|
|
111585
111788
|
// src/whoami.tsx
|
|
111586
111789
|
init_import_meta_url();
|
|
111587
111790
|
var import_ink6 = __toESM(require_build2());
|
|
111588
|
-
var import_ink_table3 = __toESM(
|
|
111791
|
+
var import_ink_table3 = __toESM(require_dist2());
|
|
111589
111792
|
var import_react10 = __toESM(require_react());
|
|
111590
111793
|
async function whoami() {
|
|
111591
111794
|
logger.log("Getting User settings...");
|
|
@@ -111634,6 +111837,7 @@ async function getAccounts() {
|
|
|
111634
111837
|
// src/index.tsx
|
|
111635
111838
|
var resetColor = "\x1B[0m";
|
|
111636
111839
|
var fgGreenColor = "\x1B[32m";
|
|
111840
|
+
var DEFAULT_LOCAL_PORT = 8787;
|
|
111637
111841
|
function getRules(config) {
|
|
111638
111842
|
const rules = config.rules ?? config.build?.upload?.rules ?? [];
|
|
111639
111843
|
if (config.rules && config.build?.upload?.rules) {
|
|
@@ -111809,7 +112013,16 @@ ${err2.message ?? err2}`);
|
|
|
111809
112013
|
}
|
|
111810
112014
|
const yesFlag = args.yes ?? false;
|
|
111811
112015
|
const isInsideGitProject = Boolean(await findUp(".git", { cwd: creationDirectory, type: "directory" }));
|
|
111812
|
-
|
|
112016
|
+
let isGitInstalled;
|
|
112017
|
+
try {
|
|
112018
|
+
isGitInstalled = (await execa("git", ["--version"])).exitCode === 0;
|
|
112019
|
+
} catch (err2) {
|
|
112020
|
+
if (err2.code !== "ENOENT") {
|
|
112021
|
+
throw err2;
|
|
112022
|
+
} else {
|
|
112023
|
+
isGitInstalled = false;
|
|
112024
|
+
}
|
|
112025
|
+
}
|
|
111813
112026
|
if (!isInsideGitProject && isGitInstalled) {
|
|
111814
112027
|
const shouldInitGit = yesFlag || await confirm("Would you like to use git to manage this Worker?");
|
|
111815
112028
|
if (shouldInitGit) {
|
|
@@ -111934,11 +112147,11 @@ To start developing your Worker, run \`npx wrangler dev\`${isCreatingWranglerTom
|
|
|
111934
112147
|
describe: "Perform on a specific environment"
|
|
111935
112148
|
});
|
|
111936
112149
|
}, () => {
|
|
111937
|
-
throw new DeprecationError("`wrangler build` has been deprecated, please refer to https://
|
|
112150
|
+
throw new DeprecationError("`wrangler build` has been deprecated, please refer to https://developers.cloudflare.com/workers/wrangler/migration/deprecations/#build for alternatives");
|
|
111938
112151
|
});
|
|
111939
112152
|
wrangler.command("config", false, () => {
|
|
111940
112153
|
}, () => {
|
|
111941
|
-
throw new DeprecationError("`wrangler config` has been deprecated, please refer to https://
|
|
112154
|
+
throw new DeprecationError("`wrangler config` has been deprecated, please refer to https://developers.cloudflare.com/workers/wrangler/migration/deprecations/#config for alternatives");
|
|
111942
112155
|
});
|
|
111943
112156
|
wrangler.command("dev [script]", "\u{1F442} Start a local server for developing your worker", (yargs) => {
|
|
111944
112157
|
return yargs.positional("script", {
|
|
@@ -112045,6 +112258,10 @@ To start developing your Worker, run \`npx wrangler dev\`${isCreatingWranglerTom
|
|
|
112045
112258
|
describe: "Enable dev tools",
|
|
112046
112259
|
type: "boolean",
|
|
112047
112260
|
deprecated: true
|
|
112261
|
+
}).option("legacy-env", {
|
|
112262
|
+
type: "boolean",
|
|
112263
|
+
describe: "Use legacy environments",
|
|
112264
|
+
hidden: true
|
|
112048
112265
|
});
|
|
112049
112266
|
}, async (args) => {
|
|
112050
112267
|
await printWranglerBanner();
|
|
@@ -112095,7 +112312,7 @@ To start developing your Worker, run \`npx wrangler dev\`${isCreatingWranglerTom
|
|
|
112095
112312
|
}
|
|
112096
112313
|
const nodeCompat = args.nodeCompat ?? config.node_compat;
|
|
112097
112314
|
if (nodeCompat) {
|
|
112098
|
-
logger.warn("Enabling node.js compatibility mode for
|
|
112315
|
+
logger.warn("Enabling node.js compatibility mode for built-ins and globals. This is experimental and has serious tradeoffs. Please see https://github.com/ionic-team/rollup-plugin-node-polyfills/ for more details.");
|
|
112099
112316
|
}
|
|
112100
112317
|
const { waitUntilExit } = (0, import_ink7.render)(/* @__PURE__ */ import_react11.default.createElement(dev_default, {
|
|
112101
112318
|
name: getScriptName(args, config),
|
|
@@ -112116,7 +112333,7 @@ To start developing your Worker, run \`npx wrangler dev\`${isCreatingWranglerTom
|
|
|
112116
112333
|
enableLocalPersistence: args["experimental-enable-local-persistence"] || false,
|
|
112117
112334
|
accountId,
|
|
112118
112335
|
assetPaths: getAssetPaths(config, args.site, args.siteInclude, args.siteExclude),
|
|
112119
|
-
port: args.port || config.dev
|
|
112336
|
+
port: args.port || config.dev.port || await getPorts({ port: DEFAULT_LOCAL_PORT }),
|
|
112120
112337
|
ip: args.ip || config.dev.ip,
|
|
112121
112338
|
inspectorPort: args["inspector-port"] ?? await getPorts({ port: 9229 }),
|
|
112122
112339
|
public: args["experimental-public"],
|
|
@@ -112240,6 +112457,10 @@ To start developing your Worker, run \`npx wrangler dev\`${isCreatingWranglerTom
|
|
|
112240
112457
|
}).option("dry-run", {
|
|
112241
112458
|
describe: "Don't actually publish",
|
|
112242
112459
|
type: "boolean"
|
|
112460
|
+
}).option("legacy-env", {
|
|
112461
|
+
type: "boolean",
|
|
112462
|
+
describe: "Use legacy environments",
|
|
112463
|
+
hidden: true
|
|
112243
112464
|
});
|
|
112244
112465
|
}, async (args) => {
|
|
112245
112466
|
await printWranglerBanner();
|
|
@@ -112323,6 +112544,10 @@ To start developing your Worker, run \`npx wrangler dev\`${isCreatingWranglerTom
|
|
|
112323
112544
|
hidden: true,
|
|
112324
112545
|
default: false,
|
|
112325
112546
|
describe: "If a log would have been filtered out, send it through anyway alongside the filter which would have blocked it."
|
|
112547
|
+
}).option("legacy-env", {
|
|
112548
|
+
type: "boolean",
|
|
112549
|
+
describe: "Use legacy environments",
|
|
112550
|
+
hidden: true
|
|
112326
112551
|
});
|
|
112327
112552
|
}, async (args) => {
|
|
112328
112553
|
if (args.format === "pretty") {
|
|
@@ -112417,7 +112642,7 @@ To start developing your Worker, run \`npx wrangler dev\`${isCreatingWranglerTom
|
|
|
112417
112642
|
enableLocalPersistence: false,
|
|
112418
112643
|
accountId,
|
|
112419
112644
|
assetPaths: void 0,
|
|
112420
|
-
port: config.dev
|
|
112645
|
+
port: config.dev.port || await getPorts({ port: DEFAULT_LOCAL_PORT }),
|
|
112421
112646
|
ip: config.dev.ip,
|
|
112422
112647
|
public: void 0,
|
|
112423
112648
|
compatibilityDate: getDevCompatibilityDate(config),
|
|
@@ -112503,10 +112728,14 @@ ${shouldDo}`);
|
|
|
112503
112728
|
wrangler.command("subdomain [name]", false, (yargs) => {
|
|
112504
112729
|
return yargs.positional("name", { type: "string" });
|
|
112505
112730
|
}, () => {
|
|
112506
|
-
throw new DeprecationError("`wrangler subdomain` has been deprecated, please refer to https://
|
|
112731
|
+
throw new DeprecationError("`wrangler subdomain` has been deprecated, please refer to https://developers.cloudflare.com/workers/wrangler/migration/deprecations/#subdomain for alternatives");
|
|
112507
112732
|
});
|
|
112508
112733
|
wrangler.command("secret", "\u{1F92B} Generate a secret that can be referenced in the worker script", (secretYargs) => {
|
|
112509
|
-
return secretYargs.command(subHelp).
|
|
112734
|
+
return secretYargs.command(subHelp).option("legacy-env", {
|
|
112735
|
+
type: "boolean",
|
|
112736
|
+
describe: "Use legacy environments",
|
|
112737
|
+
hidden: true
|
|
112738
|
+
}).command("put <key>", "Create or update a secret variable for a script", (yargs) => {
|
|
112510
112739
|
return yargs.positional("key", {
|
|
112511
112740
|
describe: "The variable name to be accessible in the script",
|
|
112512
112741
|
type: "string"
|
|
@@ -112703,7 +112932,7 @@ ${shouldDo}`);
|
|
|
112703
112932
|
throw new CommandLineArgsError("Not able to delete namespace.\n" + (e2.message ?? e2));
|
|
112704
112933
|
}
|
|
112705
112934
|
const accountId = await requireAuth(config);
|
|
112706
|
-
await fetchResult(`/accounts/${accountId}/storage/kv/namespaces/${id}`, { method: "DELETE" });
|
|
112935
|
+
await fetchResult(`/accounts/${accountId}/storage/kv/namespaces/${encodeURIComponent(id)}`, { method: "DELETE" });
|
|
112707
112936
|
});
|
|
112708
112937
|
});
|
|
112709
112938
|
wrangler.command("kv:key", "\u{1F511} Individually manage Workers KV key-value pairs", (kvKeyYargs) => {
|
|
@@ -112847,7 +113076,7 @@ ${shouldDo}`);
|
|
|
112847
113076
|
const namespaceId = getNamespaceId(args, config);
|
|
112848
113077
|
logger.log(`Deleting the key "${key2}" on namespace ${namespaceId}.`);
|
|
112849
113078
|
const accountId = await requireAuth(config);
|
|
112850
|
-
await fetchResult(`/accounts/${accountId}/storage/kv/namespaces/${namespaceId}/values/${key2}`, { method: "DELETE" });
|
|
113079
|
+
await fetchResult(`/accounts/${accountId}/storage/kv/namespaces/${namespaceId}/values/${encodeURIComponent(key2)}`, { method: "DELETE" });
|
|
112851
113080
|
});
|
|
112852
113081
|
});
|
|
112853
113082
|
wrangler.command("kv:bulk", "\u{1F4AA} Interact with multiple Workers KV key-value pairs at once", (kvBulkYargs) => {
|
|
@@ -113062,16 +113291,13 @@ Expected an array of strings.
|
|
|
113062
113291
|
await printWranglerBanner();
|
|
113063
113292
|
await whoami();
|
|
113064
113293
|
});
|
|
113065
|
-
wrangler.option("
|
|
113066
|
-
type: "boolean",
|
|
113067
|
-
describe: "Use legacy environments"
|
|
113068
|
-
}).option("config", {
|
|
113294
|
+
wrangler.option("config", {
|
|
113069
113295
|
alias: "c",
|
|
113070
113296
|
describe: "Path to .toml configuration file",
|
|
113071
113297
|
type: "string",
|
|
113072
113298
|
requiresArg: true
|
|
113073
113299
|
});
|
|
113074
|
-
wrangler.group(["config", "help", "version"
|
|
113300
|
+
wrangler.group(["config", "help", "version"], "Flags:");
|
|
113075
113301
|
wrangler.help().alias("h", "help");
|
|
113076
113302
|
wrangler.version(version).alias("v", "version");
|
|
113077
113303
|
wrangler.exitProcess(false);
|
|
@@ -113302,6 +113528,11 @@ object-assign
|
|
|
113302
113528
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
113303
113529
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
113304
113530
|
*/
|
|
113531
|
+
/**
|
|
113532
|
+
* @license Copyright 2022 Stackblitz, Inc. All Rights Reserved.
|
|
113533
|
+
* Portions of this software are patent pending in USA and EU jurisdictions.
|
|
113534
|
+
* More info available at https://stackblitz.com/terms-of-service.
|
|
113535
|
+
*/
|
|
113305
113536
|
/**
|
|
113306
113537
|
* @license React
|
|
113307
113538
|
* react-debug-tools.production.min.js
|