create-cloudflare 2.68.4 → 2.69.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +1152 -26
- package/package.json +6 -6
- package/templates/tanstack-start/c3.ts +3 -1
package/dist/cli.js
CHANGED
|
@@ -13533,7 +13533,7 @@ var require_snapshot_recorder = __commonJS({
|
|
|
13533
13533
|
"use strict";
|
|
13534
13534
|
var { writeFile: writeFile4, readFile: readFile2, mkdir } = require("node:fs/promises");
|
|
13535
13535
|
var { dirname: dirname7, resolve: resolve12 } = require("node:path");
|
|
13536
|
-
var { setTimeout:
|
|
13536
|
+
var { setTimeout: setTimeout6, clearTimeout: clearTimeout2 } = require("node:timers");
|
|
13537
13537
|
var { InvalidArgumentError, UndiciError } = require_errors();
|
|
13538
13538
|
var { hashId, isUrlExcludedFactory, normalizeHeaders, createHeaderFilters } = require_snapshot_utils();
|
|
13539
13539
|
function formatRequestKey(opts, headerFilters, matchOptions = {}) {
|
|
@@ -13867,7 +13867,7 @@ var require_snapshot_recorder = __commonJS({
|
|
|
13867
13867
|
* Schedules a flush (debounced to avoid excessive writes)
|
|
13868
13868
|
*/
|
|
13869
13869
|
#scheduleFlush() {
|
|
13870
|
-
this.#flushTimeout =
|
|
13870
|
+
this.#flushTimeout = setTimeout6(() => {
|
|
13871
13871
|
this.saveSnapshots().catch(() => {
|
|
13872
13872
|
});
|
|
13873
13873
|
if (this.#autoFlush) {
|
|
@@ -52043,7 +52043,7 @@ var require_tiny_invariant_cjs = __commonJS({
|
|
|
52043
52043
|
});
|
|
52044
52044
|
|
|
52045
52045
|
// ../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/base64.js
|
|
52046
|
-
var
|
|
52046
|
+
var require_base642 = __commonJS({
|
|
52047
52047
|
"../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/base64.js"(exports2) {
|
|
52048
52048
|
var intToCharMap = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");
|
|
52049
52049
|
exports2.encode = function(number) {
|
|
@@ -52086,7 +52086,7 @@ var require_base64 = __commonJS({
|
|
|
52086
52086
|
// ../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/base64-vlq.js
|
|
52087
52087
|
var require_base64_vlq = __commonJS({
|
|
52088
52088
|
"../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/base64-vlq.js"(exports2) {
|
|
52089
|
-
var base64 =
|
|
52089
|
+
var base64 = require_base642();
|
|
52090
52090
|
var VLQ_BASE_SHIFT = 5;
|
|
52091
52091
|
var VLQ_BASE = 1 << VLQ_BASE_SHIFT;
|
|
52092
52092
|
var VLQ_BASE_MASK = VLQ_BASE - 1;
|
|
@@ -74459,7 +74459,7 @@ var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__
|
|
|
74459
74459
|
mod
|
|
74460
74460
|
));
|
|
74461
74461
|
|
|
74462
|
-
// ../workers-utils/dist/chunk-
|
|
74462
|
+
// ../workers-utils/dist/chunk-AKFE3ND4.mjs
|
|
74463
74463
|
var import_node_assert = __toESM(require("node:assert"), 1);
|
|
74464
74464
|
function isCompatDate(str) {
|
|
74465
74465
|
return /^\d{4}-\d{2}-\d{2}$/.test(str);
|
|
@@ -74755,6 +74755,23 @@ function mapWorkerMetadataBindings(bindings) {
|
|
|
74755
74755
|
}
|
|
74756
74756
|
];
|
|
74757
74757
|
break;
|
|
74758
|
+
case "web_search":
|
|
74759
|
+
{
|
|
74760
|
+
configObj.web_search = {
|
|
74761
|
+
binding: binding.name
|
|
74762
|
+
};
|
|
74763
|
+
}
|
|
74764
|
+
break;
|
|
74765
|
+
case "agent_memory": {
|
|
74766
|
+
configObj.agent_memory = [
|
|
74767
|
+
...configObj.agent_memory ?? [],
|
|
74768
|
+
{
|
|
74769
|
+
binding: binding.name,
|
|
74770
|
+
namespace: binding.namespace
|
|
74771
|
+
}
|
|
74772
|
+
];
|
|
74773
|
+
break;
|
|
74774
|
+
}
|
|
74758
74775
|
case "hyperdrive":
|
|
74759
74776
|
configObj.hyperdrive = [
|
|
74760
74777
|
...configObj.hyperdrive ?? [],
|
|
@@ -74778,7 +74795,9 @@ function mapWorkerMetadataBindings(bindings) {
|
|
|
74778
74795
|
...configObj.pipelines ?? [],
|
|
74779
74796
|
{
|
|
74780
74797
|
binding: binding.name,
|
|
74781
|
-
|
|
74798
|
+
// NOTE: stream is the primary field, but we also support pipeline for backward compatibility
|
|
74799
|
+
...binding.stream && { stream: binding.stream },
|
|
74800
|
+
...binding.pipeline && { pipeline: binding.pipeline }
|
|
74782
74801
|
}
|
|
74783
74802
|
];
|
|
74784
74803
|
break;
|
|
@@ -77820,6 +77839,7 @@ var import_node_os2 = __toESM(require("node:os"), 1);
|
|
|
77820
77839
|
var import_node_child_process = require("node:child_process");
|
|
77821
77840
|
var import_node_crypto = require("node:crypto");
|
|
77822
77841
|
var import_undici = __toESM(require_undici(), 1);
|
|
77842
|
+
var timersPromises = __toESM(require("node:timers/promises"), 1);
|
|
77823
77843
|
var require_XDGAppPaths = __commonJS2({
|
|
77824
77844
|
"../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/lib/XDGAppPaths.js"(exports2) {
|
|
77825
77845
|
exports2.__esModule = true;
|
|
@@ -78650,6 +78670,975 @@ var require_command_exists2 = __commonJS2({
|
|
|
78650
78670
|
module2.exports = require_command_exists();
|
|
78651
78671
|
}
|
|
78652
78672
|
});
|
|
78673
|
+
var require_ini = __commonJS2({
|
|
78674
|
+
"../../node_modules/.pnpm/ini@1.3.8/node_modules/ini/ini.js"(exports2) {
|
|
78675
|
+
exports2.parse = exports2.decode = decode;
|
|
78676
|
+
exports2.stringify = exports2.encode = encode;
|
|
78677
|
+
exports2.safe = safe;
|
|
78678
|
+
exports2.unsafe = unsafe;
|
|
78679
|
+
var eol = typeof process !== "undefined" && process.platform === "win32" ? "\r\n" : "\n";
|
|
78680
|
+
function encode(obj, opt) {
|
|
78681
|
+
var children = [];
|
|
78682
|
+
var out = "";
|
|
78683
|
+
if (typeof opt === "string") {
|
|
78684
|
+
opt = {
|
|
78685
|
+
section: opt,
|
|
78686
|
+
whitespace: false
|
|
78687
|
+
};
|
|
78688
|
+
} else {
|
|
78689
|
+
opt = opt || {};
|
|
78690
|
+
opt.whitespace = opt.whitespace === true;
|
|
78691
|
+
}
|
|
78692
|
+
var separator = opt.whitespace ? " = " : "=";
|
|
78693
|
+
Object.keys(obj).forEach(function(k, _2, __) {
|
|
78694
|
+
var val = obj[k];
|
|
78695
|
+
if (val && Array.isArray(val)) {
|
|
78696
|
+
val.forEach(function(item) {
|
|
78697
|
+
out += safe(k + "[]") + separator + safe(item) + "\n";
|
|
78698
|
+
});
|
|
78699
|
+
} else if (val && typeof val === "object")
|
|
78700
|
+
children.push(k);
|
|
78701
|
+
else
|
|
78702
|
+
out += safe(k) + separator + safe(val) + eol;
|
|
78703
|
+
});
|
|
78704
|
+
if (opt.section && out.length)
|
|
78705
|
+
out = "[" + safe(opt.section) + "]" + eol + out;
|
|
78706
|
+
children.forEach(function(k, _2, __) {
|
|
78707
|
+
var nk = dotSplit(k).join("\\.");
|
|
78708
|
+
var section = (opt.section ? opt.section + "." : "") + nk;
|
|
78709
|
+
var child = encode(obj[k], {
|
|
78710
|
+
section,
|
|
78711
|
+
whitespace: opt.whitespace
|
|
78712
|
+
});
|
|
78713
|
+
if (out.length && child.length)
|
|
78714
|
+
out += eol;
|
|
78715
|
+
out += child;
|
|
78716
|
+
});
|
|
78717
|
+
return out;
|
|
78718
|
+
}
|
|
78719
|
+
__name(encode, "encode");
|
|
78720
|
+
function dotSplit(str) {
|
|
78721
|
+
return str.replace(/\1/g, "LITERAL\\1LITERAL").replace(/\\\./g, "").split(/\./).map(function(part) {
|
|
78722
|
+
return part.replace(/\1/g, "\\.").replace(/\2LITERAL\\1LITERAL\2/g, "");
|
|
78723
|
+
});
|
|
78724
|
+
}
|
|
78725
|
+
__name(dotSplit, "dotSplit");
|
|
78726
|
+
function decode(str) {
|
|
78727
|
+
var out = {};
|
|
78728
|
+
var p2 = out;
|
|
78729
|
+
var section = null;
|
|
78730
|
+
var re = /^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i;
|
|
78731
|
+
var lines = str.split(/[\r\n]+/g);
|
|
78732
|
+
lines.forEach(function(line, _2, __) {
|
|
78733
|
+
if (!line || line.match(/^\s*[;#]/))
|
|
78734
|
+
return;
|
|
78735
|
+
var match = line.match(re);
|
|
78736
|
+
if (!match)
|
|
78737
|
+
return;
|
|
78738
|
+
if (match[1] !== void 0) {
|
|
78739
|
+
section = unsafe(match[1]);
|
|
78740
|
+
if (section === "__proto__") {
|
|
78741
|
+
p2 = {};
|
|
78742
|
+
return;
|
|
78743
|
+
}
|
|
78744
|
+
p2 = out[section] = out[section] || {};
|
|
78745
|
+
return;
|
|
78746
|
+
}
|
|
78747
|
+
var key = unsafe(match[2]);
|
|
78748
|
+
if (key === "__proto__")
|
|
78749
|
+
return;
|
|
78750
|
+
var value = match[3] ? unsafe(match[4]) : true;
|
|
78751
|
+
switch (value) {
|
|
78752
|
+
case "true":
|
|
78753
|
+
case "false":
|
|
78754
|
+
case "null":
|
|
78755
|
+
value = JSON.parse(value);
|
|
78756
|
+
}
|
|
78757
|
+
if (key.length > 2 && key.slice(-2) === "[]") {
|
|
78758
|
+
key = key.substring(0, key.length - 2);
|
|
78759
|
+
if (key === "__proto__")
|
|
78760
|
+
return;
|
|
78761
|
+
if (!p2[key])
|
|
78762
|
+
p2[key] = [];
|
|
78763
|
+
else if (!Array.isArray(p2[key]))
|
|
78764
|
+
p2[key] = [p2[key]];
|
|
78765
|
+
}
|
|
78766
|
+
if (Array.isArray(p2[key]))
|
|
78767
|
+
p2[key].push(value);
|
|
78768
|
+
else
|
|
78769
|
+
p2[key] = value;
|
|
78770
|
+
});
|
|
78771
|
+
Object.keys(out).filter(function(k, _2, __) {
|
|
78772
|
+
if (!out[k] || typeof out[k] !== "object" || Array.isArray(out[k]))
|
|
78773
|
+
return false;
|
|
78774
|
+
var parts = dotSplit(k);
|
|
78775
|
+
var p22 = out;
|
|
78776
|
+
var l = parts.pop();
|
|
78777
|
+
var nl = l.replace(/\\\./g, ".");
|
|
78778
|
+
parts.forEach(function(part, _3, __2) {
|
|
78779
|
+
if (part === "__proto__")
|
|
78780
|
+
return;
|
|
78781
|
+
if (!p22[part] || typeof p22[part] !== "object")
|
|
78782
|
+
p22[part] = {};
|
|
78783
|
+
p22 = p22[part];
|
|
78784
|
+
});
|
|
78785
|
+
if (p22 === out && nl === l)
|
|
78786
|
+
return false;
|
|
78787
|
+
p22[nl] = out[k];
|
|
78788
|
+
return true;
|
|
78789
|
+
}).forEach(function(del, _2, __) {
|
|
78790
|
+
delete out[del];
|
|
78791
|
+
});
|
|
78792
|
+
return out;
|
|
78793
|
+
}
|
|
78794
|
+
__name(decode, "decode");
|
|
78795
|
+
function isQuoted(val) {
|
|
78796
|
+
return val.charAt(0) === '"' && val.slice(-1) === '"' || val.charAt(0) === "'" && val.slice(-1) === "'";
|
|
78797
|
+
}
|
|
78798
|
+
__name(isQuoted, "isQuoted");
|
|
78799
|
+
function safe(val) {
|
|
78800
|
+
return typeof val !== "string" || val.match(/[=\r\n]/) || val.match(/^\[/) || val.length > 1 && isQuoted(val) || val !== val.trim() ? JSON.stringify(val) : val.replace(/;/g, "\\;").replace(/#/g, "\\#");
|
|
78801
|
+
}
|
|
78802
|
+
__name(safe, "safe");
|
|
78803
|
+
function unsafe(val, doUnesc) {
|
|
78804
|
+
val = (val || "").trim();
|
|
78805
|
+
if (isQuoted(val)) {
|
|
78806
|
+
if (val.charAt(0) === "'")
|
|
78807
|
+
val = val.substr(1, val.length - 2);
|
|
78808
|
+
try {
|
|
78809
|
+
val = JSON.parse(val);
|
|
78810
|
+
} catch (_2) {
|
|
78811
|
+
}
|
|
78812
|
+
} else {
|
|
78813
|
+
var esc = false;
|
|
78814
|
+
var unesc = "";
|
|
78815
|
+
for (var i = 0, l = val.length; i < l; i++) {
|
|
78816
|
+
var c2 = val.charAt(i);
|
|
78817
|
+
if (esc) {
|
|
78818
|
+
if ("\\;#".indexOf(c2) !== -1)
|
|
78819
|
+
unesc += c2;
|
|
78820
|
+
else
|
|
78821
|
+
unesc += "\\" + c2;
|
|
78822
|
+
esc = false;
|
|
78823
|
+
} else if (";#".indexOf(c2) !== -1)
|
|
78824
|
+
break;
|
|
78825
|
+
else if (c2 === "\\")
|
|
78826
|
+
esc = true;
|
|
78827
|
+
else
|
|
78828
|
+
unesc += c2;
|
|
78829
|
+
}
|
|
78830
|
+
if (esc)
|
|
78831
|
+
unesc += "\\";
|
|
78832
|
+
return unesc.trim();
|
|
78833
|
+
}
|
|
78834
|
+
return val;
|
|
78835
|
+
}
|
|
78836
|
+
__name(unsafe, "unsafe");
|
|
78837
|
+
}
|
|
78838
|
+
});
|
|
78839
|
+
var require_strip_json_comments = __commonJS2({
|
|
78840
|
+
"../../node_modules/.pnpm/strip-json-comments@2.0.1/node_modules/strip-json-comments/index.js"(exports2, module2) {
|
|
78841
|
+
var singleComment = 1;
|
|
78842
|
+
var multiComment = 2;
|
|
78843
|
+
function stripWithoutWhitespace() {
|
|
78844
|
+
return "";
|
|
78845
|
+
}
|
|
78846
|
+
__name(stripWithoutWhitespace, "stripWithoutWhitespace");
|
|
78847
|
+
function stripWithWhitespace(str, start, end) {
|
|
78848
|
+
return str.slice(start, end).replace(/\S/g, " ");
|
|
78849
|
+
}
|
|
78850
|
+
__name(stripWithWhitespace, "stripWithWhitespace");
|
|
78851
|
+
module2.exports = function(str, opts) {
|
|
78852
|
+
opts = opts || {};
|
|
78853
|
+
var currentChar;
|
|
78854
|
+
var nextChar;
|
|
78855
|
+
var insideString = false;
|
|
78856
|
+
var insideComment = false;
|
|
78857
|
+
var offset = 0;
|
|
78858
|
+
var ret = "";
|
|
78859
|
+
var strip = opts.whitespace === false ? stripWithoutWhitespace : stripWithWhitespace;
|
|
78860
|
+
for (var i = 0; i < str.length; i++) {
|
|
78861
|
+
currentChar = str[i];
|
|
78862
|
+
nextChar = str[i + 1];
|
|
78863
|
+
if (!insideComment && currentChar === '"') {
|
|
78864
|
+
var escaped = str[i - 1] === "\\" && str[i - 2] !== "\\";
|
|
78865
|
+
if (!escaped) {
|
|
78866
|
+
insideString = !insideString;
|
|
78867
|
+
}
|
|
78868
|
+
}
|
|
78869
|
+
if (insideString) {
|
|
78870
|
+
continue;
|
|
78871
|
+
}
|
|
78872
|
+
if (!insideComment && currentChar + nextChar === "//") {
|
|
78873
|
+
ret += str.slice(offset, i);
|
|
78874
|
+
offset = i;
|
|
78875
|
+
insideComment = singleComment;
|
|
78876
|
+
i++;
|
|
78877
|
+
} else if (insideComment === singleComment && currentChar + nextChar === "\r\n") {
|
|
78878
|
+
i++;
|
|
78879
|
+
insideComment = false;
|
|
78880
|
+
ret += strip(str, offset, i);
|
|
78881
|
+
offset = i;
|
|
78882
|
+
continue;
|
|
78883
|
+
} else if (insideComment === singleComment && currentChar === "\n") {
|
|
78884
|
+
insideComment = false;
|
|
78885
|
+
ret += strip(str, offset, i);
|
|
78886
|
+
offset = i;
|
|
78887
|
+
} else if (!insideComment && currentChar + nextChar === "/*") {
|
|
78888
|
+
ret += str.slice(offset, i);
|
|
78889
|
+
offset = i;
|
|
78890
|
+
insideComment = multiComment;
|
|
78891
|
+
i++;
|
|
78892
|
+
continue;
|
|
78893
|
+
} else if (insideComment === multiComment && currentChar + nextChar === "*/") {
|
|
78894
|
+
i++;
|
|
78895
|
+
insideComment = false;
|
|
78896
|
+
ret += strip(str, offset, i + 1);
|
|
78897
|
+
offset = i + 1;
|
|
78898
|
+
continue;
|
|
78899
|
+
}
|
|
78900
|
+
}
|
|
78901
|
+
return ret + (insideComment ? strip(str.substr(offset)) : str.substr(offset));
|
|
78902
|
+
};
|
|
78903
|
+
}
|
|
78904
|
+
});
|
|
78905
|
+
var require_utils2 = __commonJS2({
|
|
78906
|
+
"../../node_modules/.pnpm/rc@1.2.8/node_modules/rc/lib/utils.js"(exports2) {
|
|
78907
|
+
var fs32 = __require("fs");
|
|
78908
|
+
var ini = require_ini();
|
|
78909
|
+
var path52 = __require("path");
|
|
78910
|
+
var stripJsonComments = require_strip_json_comments();
|
|
78911
|
+
var parse10 = exports2.parse = function(content) {
|
|
78912
|
+
if (/^\s*{/.test(content))
|
|
78913
|
+
return JSON.parse(stripJsonComments(content));
|
|
78914
|
+
return ini.parse(content);
|
|
78915
|
+
};
|
|
78916
|
+
var file2 = exports2.file = function() {
|
|
78917
|
+
var args = [].slice.call(arguments).filter(function(arg) {
|
|
78918
|
+
return arg != null;
|
|
78919
|
+
});
|
|
78920
|
+
for (var i in args)
|
|
78921
|
+
if ("string" !== typeof args[i])
|
|
78922
|
+
return;
|
|
78923
|
+
var file22 = path52.join.apply(null, args);
|
|
78924
|
+
try {
|
|
78925
|
+
return fs32.readFileSync(file22, "utf-8");
|
|
78926
|
+
} catch (err) {
|
|
78927
|
+
return;
|
|
78928
|
+
}
|
|
78929
|
+
};
|
|
78930
|
+
exports2.json = function() {
|
|
78931
|
+
var content = file2.apply(null, arguments);
|
|
78932
|
+
return content ? parse10(content) : null;
|
|
78933
|
+
};
|
|
78934
|
+
exports2.env = function(prefix, env22) {
|
|
78935
|
+
env22 = env22 || process.env;
|
|
78936
|
+
var obj = {};
|
|
78937
|
+
var l = prefix.length;
|
|
78938
|
+
for (var k in env22) {
|
|
78939
|
+
if (k.toLowerCase().indexOf(prefix.toLowerCase()) === 0) {
|
|
78940
|
+
var keypath = k.substring(l).split("__");
|
|
78941
|
+
var _emptyStringIndex;
|
|
78942
|
+
while ((_emptyStringIndex = keypath.indexOf("")) > -1) {
|
|
78943
|
+
keypath.splice(_emptyStringIndex, 1);
|
|
78944
|
+
}
|
|
78945
|
+
var cursor = obj;
|
|
78946
|
+
keypath.forEach(/* @__PURE__ */ __name(function _buildSubObj(_subkey, i) {
|
|
78947
|
+
if (!_subkey || typeof cursor !== "object")
|
|
78948
|
+
return;
|
|
78949
|
+
if (i === keypath.length - 1)
|
|
78950
|
+
cursor[_subkey] = env22[k];
|
|
78951
|
+
if (cursor[_subkey] === void 0)
|
|
78952
|
+
cursor[_subkey] = {};
|
|
78953
|
+
cursor = cursor[_subkey];
|
|
78954
|
+
}, "_buildSubObj"));
|
|
78955
|
+
}
|
|
78956
|
+
}
|
|
78957
|
+
return obj;
|
|
78958
|
+
};
|
|
78959
|
+
exports2.find = function() {
|
|
78960
|
+
var rel = path52.join.apply(null, [].slice.call(arguments));
|
|
78961
|
+
function find2(start, rel2) {
|
|
78962
|
+
var file22 = path52.join(start, rel2);
|
|
78963
|
+
try {
|
|
78964
|
+
fs32.statSync(file22);
|
|
78965
|
+
return file22;
|
|
78966
|
+
} catch (err) {
|
|
78967
|
+
if (path52.dirname(start) !== start)
|
|
78968
|
+
return find2(path52.dirname(start), rel2);
|
|
78969
|
+
}
|
|
78970
|
+
}
|
|
78971
|
+
__name(find2, "find");
|
|
78972
|
+
return find2(process.cwd(), rel);
|
|
78973
|
+
};
|
|
78974
|
+
}
|
|
78975
|
+
});
|
|
78976
|
+
var require_deep_extend = __commonJS2({
|
|
78977
|
+
"../../node_modules/.pnpm/deep-extend@0.6.0/node_modules/deep-extend/lib/deep-extend.js"(exports2, module2) {
|
|
78978
|
+
function isSpecificValue(val) {
|
|
78979
|
+
return val instanceof Buffer || val instanceof Date || val instanceof RegExp ? true : false;
|
|
78980
|
+
}
|
|
78981
|
+
__name(isSpecificValue, "isSpecificValue");
|
|
78982
|
+
function cloneSpecificValue(val) {
|
|
78983
|
+
if (val instanceof Buffer) {
|
|
78984
|
+
var x = Buffer.alloc ? Buffer.alloc(val.length) : new Buffer(val.length);
|
|
78985
|
+
val.copy(x);
|
|
78986
|
+
return x;
|
|
78987
|
+
} else if (val instanceof Date) {
|
|
78988
|
+
return new Date(val.getTime());
|
|
78989
|
+
} else if (val instanceof RegExp) {
|
|
78990
|
+
return new RegExp(val);
|
|
78991
|
+
} else {
|
|
78992
|
+
throw new Error("Unexpected situation");
|
|
78993
|
+
}
|
|
78994
|
+
}
|
|
78995
|
+
__name(cloneSpecificValue, "cloneSpecificValue");
|
|
78996
|
+
function deepCloneArray(arr) {
|
|
78997
|
+
var clone = [];
|
|
78998
|
+
arr.forEach(function(item, index) {
|
|
78999
|
+
if (typeof item === "object" && item !== null) {
|
|
79000
|
+
if (Array.isArray(item)) {
|
|
79001
|
+
clone[index] = deepCloneArray(item);
|
|
79002
|
+
} else if (isSpecificValue(item)) {
|
|
79003
|
+
clone[index] = cloneSpecificValue(item);
|
|
79004
|
+
} else {
|
|
79005
|
+
clone[index] = deepExtend({}, item);
|
|
79006
|
+
}
|
|
79007
|
+
} else {
|
|
79008
|
+
clone[index] = item;
|
|
79009
|
+
}
|
|
79010
|
+
});
|
|
79011
|
+
return clone;
|
|
79012
|
+
}
|
|
79013
|
+
__name(deepCloneArray, "deepCloneArray");
|
|
79014
|
+
function safeGetProperty(object, property) {
|
|
79015
|
+
return property === "__proto__" ? void 0 : object[property];
|
|
79016
|
+
}
|
|
79017
|
+
__name(safeGetProperty, "safeGetProperty");
|
|
79018
|
+
var deepExtend = module2.exports = function() {
|
|
79019
|
+
if (arguments.length < 1 || typeof arguments[0] !== "object") {
|
|
79020
|
+
return false;
|
|
79021
|
+
}
|
|
79022
|
+
if (arguments.length < 2) {
|
|
79023
|
+
return arguments[0];
|
|
79024
|
+
}
|
|
79025
|
+
var target = arguments[0];
|
|
79026
|
+
var args = Array.prototype.slice.call(arguments, 1);
|
|
79027
|
+
var val, src;
|
|
79028
|
+
args.forEach(function(obj) {
|
|
79029
|
+
if (typeof obj !== "object" || obj === null || Array.isArray(obj)) {
|
|
79030
|
+
return;
|
|
79031
|
+
}
|
|
79032
|
+
Object.keys(obj).forEach(function(key) {
|
|
79033
|
+
src = safeGetProperty(target, key);
|
|
79034
|
+
val = safeGetProperty(obj, key);
|
|
79035
|
+
if (val === target) {
|
|
79036
|
+
return;
|
|
79037
|
+
} else if (typeof val !== "object" || val === null) {
|
|
79038
|
+
target[key] = val;
|
|
79039
|
+
return;
|
|
79040
|
+
} else if (Array.isArray(val)) {
|
|
79041
|
+
target[key] = deepCloneArray(val);
|
|
79042
|
+
return;
|
|
79043
|
+
} else if (isSpecificValue(val)) {
|
|
79044
|
+
target[key] = cloneSpecificValue(val);
|
|
79045
|
+
return;
|
|
79046
|
+
} else if (typeof src !== "object" || src === null || Array.isArray(src)) {
|
|
79047
|
+
target[key] = deepExtend({}, val);
|
|
79048
|
+
return;
|
|
79049
|
+
} else {
|
|
79050
|
+
target[key] = deepExtend(src, val);
|
|
79051
|
+
return;
|
|
79052
|
+
}
|
|
79053
|
+
});
|
|
79054
|
+
});
|
|
79055
|
+
return target;
|
|
79056
|
+
};
|
|
79057
|
+
}
|
|
79058
|
+
});
|
|
79059
|
+
var require_minimist = __commonJS2({
|
|
79060
|
+
"../../node_modules/.pnpm/minimist@1.2.6/node_modules/minimist/index.js"(exports2, module2) {
|
|
79061
|
+
module2.exports = function(args, opts) {
|
|
79062
|
+
if (!opts) opts = {};
|
|
79063
|
+
var flags = { bools: {}, strings: {}, unknownFn: null };
|
|
79064
|
+
if (typeof opts["unknown"] === "function") {
|
|
79065
|
+
flags.unknownFn = opts["unknown"];
|
|
79066
|
+
}
|
|
79067
|
+
if (typeof opts["boolean"] === "boolean" && opts["boolean"]) {
|
|
79068
|
+
flags.allBools = true;
|
|
79069
|
+
} else {
|
|
79070
|
+
[].concat(opts["boolean"]).filter(Boolean).forEach(function(key2) {
|
|
79071
|
+
flags.bools[key2] = true;
|
|
79072
|
+
});
|
|
79073
|
+
}
|
|
79074
|
+
var aliases = {};
|
|
79075
|
+
Object.keys(opts.alias || {}).forEach(function(key2) {
|
|
79076
|
+
aliases[key2] = [].concat(opts.alias[key2]);
|
|
79077
|
+
aliases[key2].forEach(function(x) {
|
|
79078
|
+
aliases[x] = [key2].concat(aliases[key2].filter(function(y2) {
|
|
79079
|
+
return x !== y2;
|
|
79080
|
+
}));
|
|
79081
|
+
});
|
|
79082
|
+
});
|
|
79083
|
+
[].concat(opts.string).filter(Boolean).forEach(function(key2) {
|
|
79084
|
+
flags.strings[key2] = true;
|
|
79085
|
+
if (aliases[key2]) {
|
|
79086
|
+
flags.strings[aliases[key2]] = true;
|
|
79087
|
+
}
|
|
79088
|
+
});
|
|
79089
|
+
var defaults = opts["default"] || {};
|
|
79090
|
+
var argv = { _: [] };
|
|
79091
|
+
Object.keys(flags.bools).forEach(function(key2) {
|
|
79092
|
+
setArg(key2, defaults[key2] === void 0 ? false : defaults[key2]);
|
|
79093
|
+
});
|
|
79094
|
+
var notFlags = [];
|
|
79095
|
+
if (args.indexOf("--") !== -1) {
|
|
79096
|
+
notFlags = args.slice(args.indexOf("--") + 1);
|
|
79097
|
+
args = args.slice(0, args.indexOf("--"));
|
|
79098
|
+
}
|
|
79099
|
+
function argDefined(key2, arg2) {
|
|
79100
|
+
return flags.allBools && /^--[^=]+$/.test(arg2) || flags.strings[key2] || flags.bools[key2] || aliases[key2];
|
|
79101
|
+
}
|
|
79102
|
+
__name(argDefined, "argDefined");
|
|
79103
|
+
function setArg(key2, val, arg2) {
|
|
79104
|
+
if (arg2 && flags.unknownFn && !argDefined(key2, arg2)) {
|
|
79105
|
+
if (flags.unknownFn(arg2) === false) return;
|
|
79106
|
+
}
|
|
79107
|
+
var value2 = !flags.strings[key2] && isNumber(val) ? Number(val) : val;
|
|
79108
|
+
setKey(argv, key2.split("."), value2);
|
|
79109
|
+
(aliases[key2] || []).forEach(function(x) {
|
|
79110
|
+
setKey(argv, x.split("."), value2);
|
|
79111
|
+
});
|
|
79112
|
+
}
|
|
79113
|
+
__name(setArg, "setArg");
|
|
79114
|
+
function setKey(obj, keys, value2) {
|
|
79115
|
+
var o = obj;
|
|
79116
|
+
for (var i2 = 0; i2 < keys.length - 1; i2++) {
|
|
79117
|
+
var key2 = keys[i2];
|
|
79118
|
+
if (isConstructorOrProto(o, key2)) return;
|
|
79119
|
+
if (o[key2] === void 0) o[key2] = {};
|
|
79120
|
+
if (o[key2] === Object.prototype || o[key2] === Number.prototype || o[key2] === String.prototype) o[key2] = {};
|
|
79121
|
+
if (o[key2] === Array.prototype) o[key2] = [];
|
|
79122
|
+
o = o[key2];
|
|
79123
|
+
}
|
|
79124
|
+
var key2 = keys[keys.length - 1];
|
|
79125
|
+
if (isConstructorOrProto(o, key2)) return;
|
|
79126
|
+
if (o === Object.prototype || o === Number.prototype || o === String.prototype) o = {};
|
|
79127
|
+
if (o === Array.prototype) o = [];
|
|
79128
|
+
if (o[key2] === void 0 || flags.bools[key2] || typeof o[key2] === "boolean") {
|
|
79129
|
+
o[key2] = value2;
|
|
79130
|
+
} else if (Array.isArray(o[key2])) {
|
|
79131
|
+
o[key2].push(value2);
|
|
79132
|
+
} else {
|
|
79133
|
+
o[key2] = [o[key2], value2];
|
|
79134
|
+
}
|
|
79135
|
+
}
|
|
79136
|
+
__name(setKey, "setKey");
|
|
79137
|
+
function aliasIsBoolean(key2) {
|
|
79138
|
+
return aliases[key2].some(function(x) {
|
|
79139
|
+
return flags.bools[x];
|
|
79140
|
+
});
|
|
79141
|
+
}
|
|
79142
|
+
__name(aliasIsBoolean, "aliasIsBoolean");
|
|
79143
|
+
for (var i = 0; i < args.length; i++) {
|
|
79144
|
+
var arg = args[i];
|
|
79145
|
+
if (/^--.+=/.test(arg)) {
|
|
79146
|
+
var m = arg.match(/^--([^=]+)=([\s\S]*)$/);
|
|
79147
|
+
var key = m[1];
|
|
79148
|
+
var value = m[2];
|
|
79149
|
+
if (flags.bools[key]) {
|
|
79150
|
+
value = value !== "false";
|
|
79151
|
+
}
|
|
79152
|
+
setArg(key, value, arg);
|
|
79153
|
+
} else if (/^--no-.+/.test(arg)) {
|
|
79154
|
+
var key = arg.match(/^--no-(.+)/)[1];
|
|
79155
|
+
setArg(key, false, arg);
|
|
79156
|
+
} else if (/^--.+/.test(arg)) {
|
|
79157
|
+
var key = arg.match(/^--(.+)/)[1];
|
|
79158
|
+
var next = args[i + 1];
|
|
79159
|
+
if (next !== void 0 && !/^-/.test(next) && !flags.bools[key] && !flags.allBools && (aliases[key] ? !aliasIsBoolean(key) : true)) {
|
|
79160
|
+
setArg(key, next, arg);
|
|
79161
|
+
i++;
|
|
79162
|
+
} else if (/^(true|false)$/.test(next)) {
|
|
79163
|
+
setArg(key, next === "true", arg);
|
|
79164
|
+
i++;
|
|
79165
|
+
} else {
|
|
79166
|
+
setArg(key, flags.strings[key] ? "" : true, arg);
|
|
79167
|
+
}
|
|
79168
|
+
} else if (/^-[^-]+/.test(arg)) {
|
|
79169
|
+
var letters = arg.slice(1, -1).split("");
|
|
79170
|
+
var broken = false;
|
|
79171
|
+
for (var j2 = 0; j2 < letters.length; j2++) {
|
|
79172
|
+
var next = arg.slice(j2 + 2);
|
|
79173
|
+
if (next === "-") {
|
|
79174
|
+
setArg(letters[j2], next, arg);
|
|
79175
|
+
continue;
|
|
79176
|
+
}
|
|
79177
|
+
if (/[A-Za-z]/.test(letters[j2]) && /=/.test(next)) {
|
|
79178
|
+
setArg(letters[j2], next.split("=")[1], arg);
|
|
79179
|
+
broken = true;
|
|
79180
|
+
break;
|
|
79181
|
+
}
|
|
79182
|
+
if (/[A-Za-z]/.test(letters[j2]) && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) {
|
|
79183
|
+
setArg(letters[j2], next, arg);
|
|
79184
|
+
broken = true;
|
|
79185
|
+
break;
|
|
79186
|
+
}
|
|
79187
|
+
if (letters[j2 + 1] && letters[j2 + 1].match(/\W/)) {
|
|
79188
|
+
setArg(letters[j2], arg.slice(j2 + 2), arg);
|
|
79189
|
+
broken = true;
|
|
79190
|
+
break;
|
|
79191
|
+
} else {
|
|
79192
|
+
setArg(letters[j2], flags.strings[letters[j2]] ? "" : true, arg);
|
|
79193
|
+
}
|
|
79194
|
+
}
|
|
79195
|
+
var key = arg.slice(-1)[0];
|
|
79196
|
+
if (!broken && key !== "-") {
|
|
79197
|
+
if (args[i + 1] && !/^(-|--)[^-]/.test(args[i + 1]) && !flags.bools[key] && (aliases[key] ? !aliasIsBoolean(key) : true)) {
|
|
79198
|
+
setArg(key, args[i + 1], arg);
|
|
79199
|
+
i++;
|
|
79200
|
+
} else if (args[i + 1] && /^(true|false)$/.test(args[i + 1])) {
|
|
79201
|
+
setArg(key, args[i + 1] === "true", arg);
|
|
79202
|
+
i++;
|
|
79203
|
+
} else {
|
|
79204
|
+
setArg(key, flags.strings[key] ? "" : true, arg);
|
|
79205
|
+
}
|
|
79206
|
+
}
|
|
79207
|
+
} else {
|
|
79208
|
+
if (!flags.unknownFn || flags.unknownFn(arg) !== false) {
|
|
79209
|
+
argv._.push(
|
|
79210
|
+
flags.strings["_"] || !isNumber(arg) ? arg : Number(arg)
|
|
79211
|
+
);
|
|
79212
|
+
}
|
|
79213
|
+
if (opts.stopEarly) {
|
|
79214
|
+
argv._.push.apply(argv._, args.slice(i + 1));
|
|
79215
|
+
break;
|
|
79216
|
+
}
|
|
79217
|
+
}
|
|
79218
|
+
}
|
|
79219
|
+
Object.keys(defaults).forEach(function(key2) {
|
|
79220
|
+
if (!hasKey(argv, key2.split("."))) {
|
|
79221
|
+
setKey(argv, key2.split("."), defaults[key2]);
|
|
79222
|
+
(aliases[key2] || []).forEach(function(x) {
|
|
79223
|
+
setKey(argv, x.split("."), defaults[key2]);
|
|
79224
|
+
});
|
|
79225
|
+
}
|
|
79226
|
+
});
|
|
79227
|
+
if (opts["--"]) {
|
|
79228
|
+
argv["--"] = new Array();
|
|
79229
|
+
notFlags.forEach(function(key2) {
|
|
79230
|
+
argv["--"].push(key2);
|
|
79231
|
+
});
|
|
79232
|
+
} else {
|
|
79233
|
+
notFlags.forEach(function(key2) {
|
|
79234
|
+
argv._.push(key2);
|
|
79235
|
+
});
|
|
79236
|
+
}
|
|
79237
|
+
return argv;
|
|
79238
|
+
};
|
|
79239
|
+
function hasKey(obj, keys) {
|
|
79240
|
+
var o = obj;
|
|
79241
|
+
keys.slice(0, -1).forEach(function(key2) {
|
|
79242
|
+
o = o[key2] || {};
|
|
79243
|
+
});
|
|
79244
|
+
var key = keys[keys.length - 1];
|
|
79245
|
+
return key in o;
|
|
79246
|
+
}
|
|
79247
|
+
__name(hasKey, "hasKey");
|
|
79248
|
+
function isNumber(x) {
|
|
79249
|
+
if (typeof x === "number") return true;
|
|
79250
|
+
if (/^0x[0-9a-f]+$/i.test(x)) return true;
|
|
79251
|
+
return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x);
|
|
79252
|
+
}
|
|
79253
|
+
__name(isNumber, "isNumber");
|
|
79254
|
+
function isConstructorOrProto(obj, key) {
|
|
79255
|
+
return key === "constructor" && typeof obj[key] === "function" || key === "__proto__";
|
|
79256
|
+
}
|
|
79257
|
+
__name(isConstructorOrProto, "isConstructorOrProto");
|
|
79258
|
+
}
|
|
79259
|
+
});
|
|
79260
|
+
var require_rc = __commonJS2({
|
|
79261
|
+
"../../node_modules/.pnpm/rc@1.2.8/node_modules/rc/index.js"(exports2, module2) {
|
|
79262
|
+
var cc = require_utils2();
|
|
79263
|
+
var join22 = __require("path").join;
|
|
79264
|
+
var deepExtend = require_deep_extend();
|
|
79265
|
+
var etc = "/etc";
|
|
79266
|
+
var win = process.platform === "win32";
|
|
79267
|
+
var home = win ? process.env.USERPROFILE : process.env.HOME;
|
|
79268
|
+
module2.exports = function(name3, defaults, argv, parse10) {
|
|
79269
|
+
if ("string" !== typeof name3)
|
|
79270
|
+
throw new Error("rc(name): name *must* be string");
|
|
79271
|
+
if (!argv)
|
|
79272
|
+
argv = require_minimist()(process.argv.slice(2));
|
|
79273
|
+
defaults = ("string" === typeof defaults ? cc.json(defaults) : defaults) || {};
|
|
79274
|
+
parse10 = parse10 || cc.parse;
|
|
79275
|
+
var env3 = cc.env(name3 + "_");
|
|
79276
|
+
var configs = [defaults];
|
|
79277
|
+
var configFiles = [];
|
|
79278
|
+
function addConfigFile(file2) {
|
|
79279
|
+
if (configFiles.indexOf(file2) >= 0) return;
|
|
79280
|
+
var fileConfig = cc.file(file2);
|
|
79281
|
+
if (fileConfig) {
|
|
79282
|
+
configs.push(parse10(fileConfig));
|
|
79283
|
+
configFiles.push(file2);
|
|
79284
|
+
}
|
|
79285
|
+
}
|
|
79286
|
+
__name(addConfigFile, "addConfigFile");
|
|
79287
|
+
if (!win)
|
|
79288
|
+
[
|
|
79289
|
+
join22(etc, name3, "config"),
|
|
79290
|
+
join22(etc, name3 + "rc")
|
|
79291
|
+
].forEach(addConfigFile);
|
|
79292
|
+
if (home)
|
|
79293
|
+
[
|
|
79294
|
+
join22(home, ".config", name3, "config"),
|
|
79295
|
+
join22(home, ".config", name3),
|
|
79296
|
+
join22(home, "." + name3, "config"),
|
|
79297
|
+
join22(home, "." + name3 + "rc")
|
|
79298
|
+
].forEach(addConfigFile);
|
|
79299
|
+
addConfigFile(cc.find("." + name3 + "rc"));
|
|
79300
|
+
if (env3.config) addConfigFile(env3.config);
|
|
79301
|
+
if (argv.config) addConfigFile(argv.config);
|
|
79302
|
+
return deepExtend.apply(null, configs.concat([
|
|
79303
|
+
env3,
|
|
79304
|
+
argv,
|
|
79305
|
+
configFiles.length ? { configs: configFiles, config: configFiles[configFiles.length - 1] } : void 0
|
|
79306
|
+
]));
|
|
79307
|
+
};
|
|
79308
|
+
}
|
|
79309
|
+
});
|
|
79310
|
+
var require_registry_url = __commonJS2({
|
|
79311
|
+
"../../node_modules/.pnpm/registry-url@3.1.0/node_modules/registry-url/index.js"(exports2, module2) {
|
|
79312
|
+
module2.exports = function(scope) {
|
|
79313
|
+
var rc = require_rc()("npm", { registry: "https://registry.npmjs.org/" });
|
|
79314
|
+
var url = rc[scope + ":registry"] || rc.registry;
|
|
79315
|
+
return url.slice(-1) === "/" ? url : url + "/";
|
|
79316
|
+
};
|
|
79317
|
+
}
|
|
79318
|
+
});
|
|
79319
|
+
var require_safe_buffer = __commonJS2({
|
|
79320
|
+
"../../node_modules/.pnpm/safe-buffer@5.2.1/node_modules/safe-buffer/index.js"(exports2, module2) {
|
|
79321
|
+
var buffer = __require("buffer");
|
|
79322
|
+
var Buffer22 = buffer.Buffer;
|
|
79323
|
+
function copyProps(src, dst) {
|
|
79324
|
+
for (var key in src) {
|
|
79325
|
+
dst[key] = src[key];
|
|
79326
|
+
}
|
|
79327
|
+
}
|
|
79328
|
+
__name(copyProps, "copyProps");
|
|
79329
|
+
if (Buffer22.from && Buffer22.alloc && Buffer22.allocUnsafe && Buffer22.allocUnsafeSlow) {
|
|
79330
|
+
module2.exports = buffer;
|
|
79331
|
+
} else {
|
|
79332
|
+
copyProps(buffer, exports2);
|
|
79333
|
+
exports2.Buffer = SafeBuffer;
|
|
79334
|
+
}
|
|
79335
|
+
function SafeBuffer(arg, encodingOrOffset, length) {
|
|
79336
|
+
return Buffer22(arg, encodingOrOffset, length);
|
|
79337
|
+
}
|
|
79338
|
+
__name(SafeBuffer, "SafeBuffer");
|
|
79339
|
+
SafeBuffer.prototype = Object.create(Buffer22.prototype);
|
|
79340
|
+
copyProps(Buffer22, SafeBuffer);
|
|
79341
|
+
SafeBuffer.from = function(arg, encodingOrOffset, length) {
|
|
79342
|
+
if (typeof arg === "number") {
|
|
79343
|
+
throw new TypeError("Argument must not be a number");
|
|
79344
|
+
}
|
|
79345
|
+
return Buffer22(arg, encodingOrOffset, length);
|
|
79346
|
+
};
|
|
79347
|
+
SafeBuffer.alloc = function(size, fill, encoding) {
|
|
79348
|
+
if (typeof size !== "number") {
|
|
79349
|
+
throw new TypeError("Argument must be a number");
|
|
79350
|
+
}
|
|
79351
|
+
var buf = Buffer22(size);
|
|
79352
|
+
if (fill !== void 0) {
|
|
79353
|
+
if (typeof encoding === "string") {
|
|
79354
|
+
buf.fill(fill, encoding);
|
|
79355
|
+
} else {
|
|
79356
|
+
buf.fill(fill);
|
|
79357
|
+
}
|
|
79358
|
+
} else {
|
|
79359
|
+
buf.fill(0);
|
|
79360
|
+
}
|
|
79361
|
+
return buf;
|
|
79362
|
+
};
|
|
79363
|
+
SafeBuffer.allocUnsafe = function(size) {
|
|
79364
|
+
if (typeof size !== "number") {
|
|
79365
|
+
throw new TypeError("Argument must be a number");
|
|
79366
|
+
}
|
|
79367
|
+
return Buffer22(size);
|
|
79368
|
+
};
|
|
79369
|
+
SafeBuffer.allocUnsafeSlow = function(size) {
|
|
79370
|
+
if (typeof size !== "number") {
|
|
79371
|
+
throw new TypeError("Argument must be a number");
|
|
79372
|
+
}
|
|
79373
|
+
return buffer.SlowBuffer(size);
|
|
79374
|
+
};
|
|
79375
|
+
}
|
|
79376
|
+
});
|
|
79377
|
+
var require_base64 = __commonJS2({
|
|
79378
|
+
"../../node_modules/.pnpm/registry-auth-token@3.3.2/node_modules/registry-auth-token/base64.js"(exports2, module2) {
|
|
79379
|
+
var safeBuffer = require_safe_buffer().Buffer;
|
|
79380
|
+
function decodeBase64(base64) {
|
|
79381
|
+
return safeBuffer.from(base64, "base64").toString("utf8");
|
|
79382
|
+
}
|
|
79383
|
+
__name(decodeBase64, "decodeBase64");
|
|
79384
|
+
function encodeBase64(string) {
|
|
79385
|
+
return safeBuffer.from(string, "utf8").toString("base64");
|
|
79386
|
+
}
|
|
79387
|
+
__name(encodeBase64, "encodeBase64");
|
|
79388
|
+
module2.exports = {
|
|
79389
|
+
decodeBase64,
|
|
79390
|
+
encodeBase64
|
|
79391
|
+
};
|
|
79392
|
+
}
|
|
79393
|
+
});
|
|
79394
|
+
var require_registry_auth_token = __commonJS2({
|
|
79395
|
+
"../../node_modules/.pnpm/registry-auth-token@3.3.2/node_modules/registry-auth-token/index.js"(exports2, module2) {
|
|
79396
|
+
var url = __require("url");
|
|
79397
|
+
var base64 = require_base64();
|
|
79398
|
+
var decodeBase64 = base64.decodeBase64;
|
|
79399
|
+
var encodeBase64 = base64.encodeBase64;
|
|
79400
|
+
var tokenKey = ":_authToken";
|
|
79401
|
+
var userKey = ":username";
|
|
79402
|
+
var passwordKey = ":_password";
|
|
79403
|
+
module2.exports = function() {
|
|
79404
|
+
var checkUrl;
|
|
79405
|
+
var options;
|
|
79406
|
+
if (arguments.length >= 2) {
|
|
79407
|
+
checkUrl = arguments[0];
|
|
79408
|
+
options = arguments[1];
|
|
79409
|
+
} else if (typeof arguments[0] === "string") {
|
|
79410
|
+
checkUrl = arguments[0];
|
|
79411
|
+
} else {
|
|
79412
|
+
options = arguments[0];
|
|
79413
|
+
}
|
|
79414
|
+
options = options || {};
|
|
79415
|
+
options.npmrc = options.npmrc || require_rc()("npm", { registry: "https://registry.npmjs.org/" });
|
|
79416
|
+
checkUrl = checkUrl || options.npmrc.registry;
|
|
79417
|
+
return getRegistryAuthInfo(checkUrl, options) || getLegacyAuthInfo(options.npmrc);
|
|
79418
|
+
};
|
|
79419
|
+
function getRegistryAuthInfo(checkUrl, options) {
|
|
79420
|
+
var parsed = url.parse(checkUrl, false, true);
|
|
79421
|
+
var pathname;
|
|
79422
|
+
while (pathname !== "/" && parsed.pathname !== pathname) {
|
|
79423
|
+
pathname = parsed.pathname || "/";
|
|
79424
|
+
var regUrl = "//" + parsed.host + pathname.replace(/\/$/, "");
|
|
79425
|
+
var authInfo = getAuthInfoForUrl(regUrl, options.npmrc);
|
|
79426
|
+
if (authInfo) {
|
|
79427
|
+
return authInfo;
|
|
79428
|
+
}
|
|
79429
|
+
if (!options.recursive) {
|
|
79430
|
+
return /\/$/.test(checkUrl) ? void 0 : getRegistryAuthInfo(url.resolve(checkUrl, "."), options);
|
|
79431
|
+
}
|
|
79432
|
+
parsed.pathname = url.resolve(normalizePath(pathname), "..") || "/";
|
|
79433
|
+
}
|
|
79434
|
+
return void 0;
|
|
79435
|
+
}
|
|
79436
|
+
__name(getRegistryAuthInfo, "getRegistryAuthInfo");
|
|
79437
|
+
function getLegacyAuthInfo(npmrc) {
|
|
79438
|
+
if (npmrc._auth) {
|
|
79439
|
+
return { token: npmrc._auth, type: "Basic" };
|
|
79440
|
+
}
|
|
79441
|
+
return void 0;
|
|
79442
|
+
}
|
|
79443
|
+
__name(getLegacyAuthInfo, "getLegacyAuthInfo");
|
|
79444
|
+
function normalizePath(path52) {
|
|
79445
|
+
return path52[path52.length - 1] === "/" ? path52 : path52 + "/";
|
|
79446
|
+
}
|
|
79447
|
+
__name(normalizePath, "normalizePath");
|
|
79448
|
+
function getAuthInfoForUrl(regUrl, npmrc) {
|
|
79449
|
+
var bearerAuth = getBearerToken(npmrc[regUrl + tokenKey] || npmrc[regUrl + "/" + tokenKey]);
|
|
79450
|
+
if (bearerAuth) {
|
|
79451
|
+
return bearerAuth;
|
|
79452
|
+
}
|
|
79453
|
+
var username = npmrc[regUrl + userKey] || npmrc[regUrl + "/" + userKey];
|
|
79454
|
+
var password = npmrc[regUrl + passwordKey] || npmrc[regUrl + "/" + passwordKey];
|
|
79455
|
+
var basicAuth = getTokenForUsernameAndPassword(username, password);
|
|
79456
|
+
if (basicAuth) {
|
|
79457
|
+
return basicAuth;
|
|
79458
|
+
}
|
|
79459
|
+
return void 0;
|
|
79460
|
+
}
|
|
79461
|
+
__name(getAuthInfoForUrl, "getAuthInfoForUrl");
|
|
79462
|
+
function getBearerToken(tok) {
|
|
79463
|
+
if (!tok) {
|
|
79464
|
+
return void 0;
|
|
79465
|
+
}
|
|
79466
|
+
var token = tok.replace(/^\$\{?([^}]*)\}?$/, function(fullMatch, envVar) {
|
|
79467
|
+
return process.env[envVar];
|
|
79468
|
+
});
|
|
79469
|
+
return { token, type: "Bearer" };
|
|
79470
|
+
}
|
|
79471
|
+
__name(getBearerToken, "getBearerToken");
|
|
79472
|
+
function getTokenForUsernameAndPassword(username, password) {
|
|
79473
|
+
if (!username || !password) {
|
|
79474
|
+
return void 0;
|
|
79475
|
+
}
|
|
79476
|
+
var pass = decodeBase64(password.replace(/^\$\{?([^}]*)\}?$/, function(fullMatch, envVar) {
|
|
79477
|
+
return process.env[envVar];
|
|
79478
|
+
}));
|
|
79479
|
+
var token = encodeBase64(username + ":" + pass);
|
|
79480
|
+
return {
|
|
79481
|
+
token,
|
|
79482
|
+
type: "Basic",
|
|
79483
|
+
password: pass,
|
|
79484
|
+
username
|
|
79485
|
+
};
|
|
79486
|
+
}
|
|
79487
|
+
__name(getTokenForUsernameAndPassword, "getTokenForUsernameAndPassword");
|
|
79488
|
+
}
|
|
79489
|
+
});
|
|
79490
|
+
var require_update_check = __commonJS2({
|
|
79491
|
+
"../../node_modules/.pnpm/update-check@1.5.4/node_modules/update-check/index.js"(exports2, module2) {
|
|
79492
|
+
var { URL: URL2 } = __require("url");
|
|
79493
|
+
var { join: join22 } = __require("path");
|
|
79494
|
+
var fs32 = __require("fs");
|
|
79495
|
+
var { promisify: promisify7 } = __require("util");
|
|
79496
|
+
var { tmpdir: tmpdir4 } = __require("os");
|
|
79497
|
+
var registryUrl = require_registry_url();
|
|
79498
|
+
var writeFile4 = promisify7(fs32.writeFile);
|
|
79499
|
+
var mkdir = promisify7(fs32.mkdir);
|
|
79500
|
+
var readFile2 = promisify7(fs32.readFile);
|
|
79501
|
+
var compareVersions = /* @__PURE__ */ __name((a, b2) => a.localeCompare(b2, "en-US", { numeric: true }), "compareVersions");
|
|
79502
|
+
var encode = /* @__PURE__ */ __name((value) => encodeURIComponent(value).replace(/^%40/, "@"), "encode");
|
|
79503
|
+
var getFile = /* @__PURE__ */ __name(async (details, distTag) => {
|
|
79504
|
+
const rootDir = tmpdir4();
|
|
79505
|
+
const subDir = join22(rootDir, "update-check");
|
|
79506
|
+
if (!fs32.existsSync(subDir)) {
|
|
79507
|
+
await mkdir(subDir);
|
|
79508
|
+
}
|
|
79509
|
+
let name3 = `${details.name}-${distTag}.json`;
|
|
79510
|
+
if (details.scope) {
|
|
79511
|
+
name3 = `${details.scope}-${name3}`;
|
|
79512
|
+
}
|
|
79513
|
+
return join22(subDir, name3);
|
|
79514
|
+
}, "getFile");
|
|
79515
|
+
var evaluateCache = /* @__PURE__ */ __name(async (file2, time, interval) => {
|
|
79516
|
+
if (fs32.existsSync(file2)) {
|
|
79517
|
+
const content = await readFile2(file2, "utf8");
|
|
79518
|
+
const { lastUpdate, latest } = JSON.parse(content);
|
|
79519
|
+
const nextCheck = lastUpdate + interval;
|
|
79520
|
+
if (nextCheck > time) {
|
|
79521
|
+
return {
|
|
79522
|
+
shouldCheck: false,
|
|
79523
|
+
latest
|
|
79524
|
+
};
|
|
79525
|
+
}
|
|
79526
|
+
}
|
|
79527
|
+
return {
|
|
79528
|
+
shouldCheck: true,
|
|
79529
|
+
latest: null
|
|
79530
|
+
};
|
|
79531
|
+
}, "evaluateCache");
|
|
79532
|
+
var updateCache = /* @__PURE__ */ __name(async (file2, latest, lastUpdate) => {
|
|
79533
|
+
const content = JSON.stringify({
|
|
79534
|
+
latest,
|
|
79535
|
+
lastUpdate
|
|
79536
|
+
});
|
|
79537
|
+
await writeFile4(file2, content, "utf8");
|
|
79538
|
+
}, "updateCache");
|
|
79539
|
+
var loadPackage = /* @__PURE__ */ __name((url, authInfo) => new Promise((resolve12, reject) => {
|
|
79540
|
+
const options = {
|
|
79541
|
+
host: url.hostname,
|
|
79542
|
+
path: url.pathname,
|
|
79543
|
+
port: url.port,
|
|
79544
|
+
headers: {
|
|
79545
|
+
accept: "application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"
|
|
79546
|
+
},
|
|
79547
|
+
timeout: 2e3
|
|
79548
|
+
};
|
|
79549
|
+
if (authInfo) {
|
|
79550
|
+
options.headers.authorization = `${authInfo.type} ${authInfo.token}`;
|
|
79551
|
+
}
|
|
79552
|
+
const { get } = url.protocol === "https:" ? __require("https") : __require("http");
|
|
79553
|
+
get(options, (response) => {
|
|
79554
|
+
const { statusCode } = response;
|
|
79555
|
+
if (statusCode !== 200) {
|
|
79556
|
+
const error2 = new Error(`Request failed with code ${statusCode}`);
|
|
79557
|
+
error2.code = statusCode;
|
|
79558
|
+
reject(error2);
|
|
79559
|
+
response.resume();
|
|
79560
|
+
return;
|
|
79561
|
+
}
|
|
79562
|
+
let rawData = "";
|
|
79563
|
+
response.setEncoding("utf8");
|
|
79564
|
+
response.on("data", (chunk) => {
|
|
79565
|
+
rawData += chunk;
|
|
79566
|
+
});
|
|
79567
|
+
response.on("end", () => {
|
|
79568
|
+
try {
|
|
79569
|
+
const parsedData = JSON.parse(rawData);
|
|
79570
|
+
resolve12(parsedData);
|
|
79571
|
+
} catch (e2) {
|
|
79572
|
+
reject(e2);
|
|
79573
|
+
}
|
|
79574
|
+
});
|
|
79575
|
+
}).on("error", reject).on("timeout", reject);
|
|
79576
|
+
}), "loadPackage");
|
|
79577
|
+
var getMostRecent = /* @__PURE__ */ __name(async ({ full, scope }, distTag) => {
|
|
79578
|
+
const regURL = registryUrl(scope);
|
|
79579
|
+
const url = new URL2(full, regURL);
|
|
79580
|
+
let spec = null;
|
|
79581
|
+
try {
|
|
79582
|
+
spec = await loadPackage(url);
|
|
79583
|
+
} catch (err) {
|
|
79584
|
+
if (err.code && String(err.code).startsWith(4)) {
|
|
79585
|
+
const registryAuthToken = require_registry_auth_token();
|
|
79586
|
+
const authInfo = registryAuthToken(regURL, { recursive: true });
|
|
79587
|
+
spec = await loadPackage(url, authInfo);
|
|
79588
|
+
} else {
|
|
79589
|
+
throw err;
|
|
79590
|
+
}
|
|
79591
|
+
}
|
|
79592
|
+
const version3 = spec["dist-tags"][distTag];
|
|
79593
|
+
if (!version3) {
|
|
79594
|
+
throw new Error(`Distribution tag ${distTag} is not available`);
|
|
79595
|
+
}
|
|
79596
|
+
return version3;
|
|
79597
|
+
}, "getMostRecent");
|
|
79598
|
+
var defaultConfig = {
|
|
79599
|
+
interval: 36e5,
|
|
79600
|
+
distTag: "latest"
|
|
79601
|
+
};
|
|
79602
|
+
var getDetails = /* @__PURE__ */ __name((name3) => {
|
|
79603
|
+
const spec = {
|
|
79604
|
+
full: encode(name3)
|
|
79605
|
+
};
|
|
79606
|
+
if (name3.includes("/")) {
|
|
79607
|
+
const parts = name3.split("/");
|
|
79608
|
+
spec.scope = parts[0];
|
|
79609
|
+
spec.name = parts[1];
|
|
79610
|
+
} else {
|
|
79611
|
+
spec.scope = null;
|
|
79612
|
+
spec.name = name3;
|
|
79613
|
+
}
|
|
79614
|
+
return spec;
|
|
79615
|
+
}, "getDetails");
|
|
79616
|
+
module2.exports = async (pkg, config49) => {
|
|
79617
|
+
if (typeof pkg !== "object") {
|
|
79618
|
+
throw new Error("The first parameter should be your package.json file content");
|
|
79619
|
+
}
|
|
79620
|
+
const details = getDetails(pkg.name);
|
|
79621
|
+
const time = Date.now();
|
|
79622
|
+
const { distTag, interval } = Object.assign({}, defaultConfig, config49);
|
|
79623
|
+
const file2 = await getFile(details, distTag);
|
|
79624
|
+
let latest = null;
|
|
79625
|
+
let shouldCheck = true;
|
|
79626
|
+
({ shouldCheck, latest } = await evaluateCache(file2, time, interval));
|
|
79627
|
+
if (shouldCheck) {
|
|
79628
|
+
latest = await getMostRecent(details, distTag);
|
|
79629
|
+
await updateCache(file2, latest, time);
|
|
79630
|
+
}
|
|
79631
|
+
const comparision = compareVersions(pkg.version, latest);
|
|
79632
|
+
if (comparision === -1) {
|
|
79633
|
+
return {
|
|
79634
|
+
latest,
|
|
79635
|
+
fromCache: !shouldCheck
|
|
79636
|
+
};
|
|
79637
|
+
}
|
|
79638
|
+
return null;
|
|
79639
|
+
};
|
|
79640
|
+
}
|
|
79641
|
+
});
|
|
78653
79642
|
var defaultWranglerConfig = {
|
|
78654
79643
|
/* COMPUTED_FIELDS */
|
|
78655
79644
|
configPath: void 0,
|
|
@@ -78699,6 +79688,8 @@ var defaultWranglerConfig = {
|
|
|
78699
79688
|
vectorize: [],
|
|
78700
79689
|
ai_search_namespaces: [],
|
|
78701
79690
|
ai_search: [],
|
|
79691
|
+
web_search: void 0,
|
|
79692
|
+
agent_memory: [],
|
|
78702
79693
|
hyperdrive: [],
|
|
78703
79694
|
workflows: [],
|
|
78704
79695
|
secrets_store_secrets: [],
|
|
@@ -82737,7 +83728,8 @@ var getWranglerSendMetricsFromEnv = getBooleanEnvironmentVariableFactory({
|
|
|
82737
83728
|
variableName: "WRANGLER_SEND_METRICS"
|
|
82738
83729
|
});
|
|
82739
83730
|
var getWranglerSendErrorReportsFromEnv = getBooleanEnvironmentVariableFactory({
|
|
82740
|
-
variableName: "WRANGLER_SEND_ERROR_REPORTS"
|
|
83731
|
+
variableName: "WRANGLER_SEND_ERROR_REPORTS",
|
|
83732
|
+
defaultValue: false
|
|
82741
83733
|
});
|
|
82742
83734
|
var getCloudflareApiEnvironmentFromEnv = getEnvironmentVariableFactory(
|
|
82743
83735
|
{
|
|
@@ -83300,6 +84292,8 @@ var friendlyBindingNames = {
|
|
|
83300
84292
|
vectorize: "Vectorize Index",
|
|
83301
84293
|
ai_search_namespaces: "AI Search Namespace",
|
|
83302
84294
|
ai_search: "AI Search Instance",
|
|
84295
|
+
web_search: "Web Search",
|
|
84296
|
+
agent_memory: "Agent Memory",
|
|
83303
84297
|
hyperdrive: "Hyperdrive Config",
|
|
83304
84298
|
r2_buckets: "R2 Bucket",
|
|
83305
84299
|
logfwdr: "logfwdr",
|
|
@@ -83352,6 +84346,8 @@ var bindingTypeFriendlyNames = {
|
|
|
83352
84346
|
vectorize: "Vectorize Index",
|
|
83353
84347
|
ai_search_namespace: "AI Search Namespace",
|
|
83354
84348
|
ai_search: "AI Search Instance",
|
|
84349
|
+
web_search: "Web Search",
|
|
84350
|
+
agent_memory: "Agent Memory",
|
|
83355
84351
|
hyperdrive: "Hyperdrive Config",
|
|
83356
84352
|
service: "Worker",
|
|
83357
84353
|
fetcher: "Service Binding",
|
|
@@ -84546,6 +85542,26 @@ function normalizeAndValidateEnvironment(diagnostics, configPath, rawEnv, isDisp
|
|
|
84546
85542
|
validateBindingArray(envName, validateAISearchBinding),
|
|
84547
85543
|
[]
|
|
84548
85544
|
),
|
|
85545
|
+
web_search: notInheritable(
|
|
85546
|
+
diagnostics,
|
|
85547
|
+
topLevelEnv,
|
|
85548
|
+
rawConfig,
|
|
85549
|
+
rawEnv,
|
|
85550
|
+
envName,
|
|
85551
|
+
"web_search",
|
|
85552
|
+
validateNamedSimpleBinding(envName),
|
|
85553
|
+
void 0
|
|
85554
|
+
),
|
|
85555
|
+
agent_memory: notInheritable(
|
|
85556
|
+
diagnostics,
|
|
85557
|
+
topLevelEnv,
|
|
85558
|
+
rawConfig,
|
|
85559
|
+
rawEnv,
|
|
85560
|
+
envName,
|
|
85561
|
+
"agent_memory",
|
|
85562
|
+
validateBindingArray(envName, validateAgentMemoryBinding),
|
|
85563
|
+
[]
|
|
85564
|
+
),
|
|
84549
85565
|
hyperdrive: notInheritable(
|
|
84550
85566
|
diagnostics,
|
|
84551
85567
|
topLevelEnv,
|
|
@@ -85629,6 +86645,8 @@ var validateUnsafeBinding = /* @__PURE__ */ __name((diagnostics, field, value) =
|
|
|
85629
86645
|
"ai",
|
|
85630
86646
|
"ai_search_namespace",
|
|
85631
86647
|
"ai_search",
|
|
86648
|
+
"web_search",
|
|
86649
|
+
"agent_memory",
|
|
85632
86650
|
"kv_namespace",
|
|
85633
86651
|
"durable_object_namespace",
|
|
85634
86652
|
"d1_database",
|
|
@@ -86544,6 +87562,36 @@ var validateAISearchBinding = /* @__PURE__ */ __name((diagnostics, field, value)
|
|
|
86544
87562
|
]);
|
|
86545
87563
|
return isValid2;
|
|
86546
87564
|
}, "validateAISearchBinding");
|
|
87565
|
+
var validateAgentMemoryBinding = /* @__PURE__ */ __name((diagnostics, field, value) => {
|
|
87566
|
+
if (typeof value !== "object" || value === null) {
|
|
87567
|
+
diagnostics.errors.push(
|
|
87568
|
+
`"agent_memory" bindings should be objects, but got ${JSON.stringify(value)}`
|
|
87569
|
+
);
|
|
87570
|
+
return false;
|
|
87571
|
+
}
|
|
87572
|
+
let isValid2 = true;
|
|
87573
|
+
if (!isRequiredProperty(value, "binding", "string")) {
|
|
87574
|
+
diagnostics.errors.push(
|
|
87575
|
+
`"${field}" bindings should have a string "binding" field but got ${JSON.stringify(value)}.`
|
|
87576
|
+
);
|
|
87577
|
+
isValid2 = false;
|
|
87578
|
+
}
|
|
87579
|
+
if (!isRequiredProperty(value, "namespace", "string")) {
|
|
87580
|
+
diagnostics.errors.push(
|
|
87581
|
+
`"${field}" bindings must have a "namespace" field but got ${JSON.stringify(value)}.`
|
|
87582
|
+
);
|
|
87583
|
+
isValid2 = false;
|
|
87584
|
+
}
|
|
87585
|
+
if (!isRemoteValid(value, field, diagnostics)) {
|
|
87586
|
+
isValid2 = false;
|
|
87587
|
+
}
|
|
87588
|
+
validateAdditionalProperties(diagnostics, field, Object.keys(value), [
|
|
87589
|
+
"binding",
|
|
87590
|
+
"namespace",
|
|
87591
|
+
"remote"
|
|
87592
|
+
]);
|
|
87593
|
+
return isValid2;
|
|
87594
|
+
}, "validateAgentMemoryBinding");
|
|
86547
87595
|
var validateHyperdriveBinding = /* @__PURE__ */ __name((diagnostics, field, value) => {
|
|
86548
87596
|
if (typeof value !== "object" || value === null) {
|
|
86549
87597
|
diagnostics.errors.push(
|
|
@@ -87043,9 +88091,17 @@ var validatePipelineBinding = /* @__PURE__ */ __name((diagnostics, field, value)
|
|
|
87043
88091
|
);
|
|
87044
88092
|
isValid2 = false;
|
|
87045
88093
|
}
|
|
87046
|
-
|
|
88094
|
+
const hasStream = isOptionalProperty(value, "stream", "string");
|
|
88095
|
+
const hasPipeline = isOptionalProperty(value, "pipeline", "string");
|
|
88096
|
+
const v = value;
|
|
88097
|
+
if (hasStream && v.stream) ;
|
|
88098
|
+
else if (hasPipeline && v.pipeline) {
|
|
88099
|
+
diagnostics.warnings.push(
|
|
88100
|
+
`The "pipeline" field in "${field}" bindings is deprecated. Use "stream" instead.`
|
|
88101
|
+
);
|
|
88102
|
+
} else {
|
|
87047
88103
|
diagnostics.errors.push(
|
|
87048
|
-
`"${field}" bindings must have a string "
|
|
88104
|
+
`"${field}" bindings must have a string "stream" field but got ${JSON.stringify(
|
|
87049
88105
|
value
|
|
87050
88106
|
)}.`
|
|
87051
88107
|
);
|
|
@@ -87056,6 +88112,7 @@ var validatePipelineBinding = /* @__PURE__ */ __name((diagnostics, field, value)
|
|
|
87056
88112
|
}
|
|
87057
88113
|
validateAdditionalProperties(diagnostics, field, Object.keys(value), [
|
|
87058
88114
|
"binding",
|
|
88115
|
+
"stream",
|
|
87059
88116
|
"pipeline",
|
|
87060
88117
|
"remote"
|
|
87061
88118
|
]);
|
|
@@ -87995,7 +89052,9 @@ var BINDING_LOCAL_SUPPORT = {
|
|
|
87995
89052
|
artifacts: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator",
|
|
87996
89053
|
flagship: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator",
|
|
87997
89054
|
vpc_service: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator",
|
|
87998
|
-
vpc_network: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator"
|
|
89055
|
+
vpc_network: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator",
|
|
89056
|
+
web_search: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator",
|
|
89057
|
+
agent_memory: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator"
|
|
87999
89058
|
};
|
|
88000
89059
|
function getBindingLocalSupport(type) {
|
|
88001
89060
|
if (type in BINDING_LOCAL_SUPPORT) {
|
|
@@ -88564,18 +89623,6 @@ __name(downloadCloudflared, "downloadCloudflared");
|
|
|
88564
89623
|
async function downloadAndExtractTarball(response, expectedChecksum, binPath, cacheDir) {
|
|
88565
89624
|
const tempTarPath = (0, import_node_path2.join)(cacheDir, "cloudflared.tgz");
|
|
88566
89625
|
const buffer = Buffer.from(await response.arrayBuffer());
|
|
88567
|
-
if (expectedChecksum) {
|
|
88568
|
-
const actualSha256 = sha256Hex(buffer);
|
|
88569
|
-
if (actualSha256 !== expectedChecksum) {
|
|
88570
|
-
throw new UserError(
|
|
88571
|
-
`[cloudflared] SHA256 mismatch for downloaded cloudflared tarball.
|
|
88572
|
-
|
|
88573
|
-
Expected: ${expectedChecksum}
|
|
88574
|
-
Actual: ${actualSha256}`,
|
|
88575
|
-
{ telemetryMessage: "tunnel cloudflared tarball checksum mismatch" }
|
|
88576
|
-
);
|
|
88577
|
-
}
|
|
88578
|
-
}
|
|
88579
89626
|
(0, import_node_fs2.writeFileSync)(tempTarPath, buffer);
|
|
88580
89627
|
try {
|
|
88581
89628
|
(0, import_node_child_process.execFileSync)("tar", ["-xzf", tempTarPath, "-C", cacheDir], {
|
|
@@ -88585,6 +89632,21 @@ Actual: ${actualSha256}`,
|
|
|
88585
89632
|
if (extractedPath !== binPath && (0, import_node_fs2.existsSync)(extractedPath)) {
|
|
88586
89633
|
(0, import_node_fs2.renameSync)(extractedPath, binPath);
|
|
88587
89634
|
}
|
|
89635
|
+
if (expectedChecksum) {
|
|
89636
|
+
const extractedBinary = (0, import_node_fs2.readFileSync)(binPath);
|
|
89637
|
+
const actualSha256 = sha256Hex(extractedBinary);
|
|
89638
|
+
if (actualSha256 !== expectedChecksum) {
|
|
89639
|
+
throw new UserError(
|
|
89640
|
+
`[cloudflared] SHA256 mismatch for downloaded cloudflared binary.
|
|
89641
|
+
|
|
89642
|
+
Expected: ${expectedChecksum}
|
|
89643
|
+
Actual: ${actualSha256}`,
|
|
89644
|
+
{
|
|
89645
|
+
telemetryMessage: "tunnel cloudflared extracted binary checksum mismatch"
|
|
89646
|
+
}
|
|
89647
|
+
);
|
|
89648
|
+
}
|
|
89649
|
+
}
|
|
88588
89650
|
} finally {
|
|
88589
89651
|
try {
|
|
88590
89652
|
if ((0, import_node_fs2.existsSync)(tempTarPath)) {
|
|
@@ -88940,6 +90002,35 @@ The local dev server started at ${origin.href}.
|
|
|
88940
90002
|
return new Error(errorMessage);
|
|
88941
90003
|
}
|
|
88942
90004
|
__name(createTunnelStartupError, "createTunnelStartupError");
|
|
90005
|
+
var import_update_check = __toESM2(require_update_check());
|
|
90006
|
+
var UPDATE_CHECK_TIMEOUT_MS = 3e3;
|
|
90007
|
+
var TIMED_OUT = /* @__PURE__ */ Symbol("timed_out");
|
|
90008
|
+
async function fetchLatestNpmVersion(name3, version3) {
|
|
90009
|
+
let result = null;
|
|
90010
|
+
try {
|
|
90011
|
+
result = await Promise.race([
|
|
90012
|
+
(0, import_update_check.default)(
|
|
90013
|
+
{ name: name3, version: version3 },
|
|
90014
|
+
{
|
|
90015
|
+
distTag: version3.startsWith("0.0.0") ? "beta" : "latest"
|
|
90016
|
+
}
|
|
90017
|
+
),
|
|
90018
|
+
timersPromises.setTimeout(UPDATE_CHECK_TIMEOUT_MS, TIMED_OUT, {
|
|
90019
|
+
ref: false
|
|
90020
|
+
})
|
|
90021
|
+
]);
|
|
90022
|
+
} catch {
|
|
90023
|
+
return { status: "failed" };
|
|
90024
|
+
}
|
|
90025
|
+
if (result === TIMED_OUT) {
|
|
90026
|
+
return { status: "failed" };
|
|
90027
|
+
}
|
|
90028
|
+
if (result === null) {
|
|
90029
|
+
return { status: "up-to-date" };
|
|
90030
|
+
}
|
|
90031
|
+
return { status: "update-available", latest: result.latest };
|
|
90032
|
+
}
|
|
90033
|
+
__name(fetchLatestNpmVersion, "fetchLatestNpmVersion");
|
|
88943
90034
|
|
|
88944
90035
|
// ../cli/dist/check-macos-version.mjs
|
|
88945
90036
|
var import_ci_info = __toESM(require_ci_info(), 1);
|
|
@@ -95907,7 +96998,7 @@ var Yargs = YargsFactory(esm_default2);
|
|
|
95907
96998
|
var yargs_default = Yargs;
|
|
95908
96999
|
|
|
95909
97000
|
// package.json
|
|
95910
|
-
var version = "2.
|
|
97001
|
+
var version = "2.69.0";
|
|
95911
97002
|
|
|
95912
97003
|
// src/metrics.ts
|
|
95913
97004
|
var import_node_async_hooks = require("node:async_hooks");
|
|
@@ -98119,7 +99210,7 @@ var package_default = {
|
|
|
98119
99210
|
name: "frameworks_clis_info",
|
|
98120
99211
|
dependencies: {
|
|
98121
99212
|
"@angular/create": "21.2.12",
|
|
98122
|
-
"@tanstack/
|
|
99213
|
+
"@tanstack/cli": "0.68.0",
|
|
98123
99214
|
"create-analog": "2.5.2",
|
|
98124
99215
|
"create-astro": "5.0.6",
|
|
98125
99216
|
"create-docusaurus": "3.10.1",
|
|
@@ -100297,6 +101388,8 @@ var c3_default43 = config40;
|
|
|
100297
101388
|
var { npm: npm19 } = detectPackageManager();
|
|
100298
101389
|
var generate25 = async (ctx) => {
|
|
100299
101390
|
await runFrameworkGenerator(ctx, [
|
|
101391
|
+
// @tanstack/cli uses `create` as a subcommand
|
|
101392
|
+
"create",
|
|
100300
101393
|
ctx.project.name,
|
|
100301
101394
|
"--deployment",
|
|
100302
101395
|
"cloudflare",
|
|
@@ -100311,7 +101404,7 @@ var config41 = {
|
|
|
100311
101404
|
configVersion: 1,
|
|
100312
101405
|
id: "tanstack-start",
|
|
100313
101406
|
platform: "workers",
|
|
100314
|
-
frameworkCli: "@tanstack/
|
|
101407
|
+
frameworkCli: "@tanstack/cli",
|
|
100315
101408
|
displayName: "TanStack Start",
|
|
100316
101409
|
generate: generate25,
|
|
100317
101410
|
transformPackageJson: async () => ({
|
|
@@ -100593,7 +101686,7 @@ If the application uses Durable Objects or Workflows, refer to the relevant best
|
|
|
100593
101686
|
var import_node_assert6 = __toESM(require("node:assert"));
|
|
100594
101687
|
|
|
100595
101688
|
// ../wrangler/package.json
|
|
100596
|
-
var version2 = "4.
|
|
101689
|
+
var version2 = "4.96.0";
|
|
100597
101690
|
|
|
100598
101691
|
// src/git.ts
|
|
100599
101692
|
var offerGit = async (ctx) => {
|
|
@@ -104685,6 +105778,39 @@ smol-toml/dist/index.js:
|
|
|
104685
105778
|
*/
|
|
104686
105779
|
/*! Bundled license information:
|
|
104687
105780
|
|
|
105781
|
+
deep-extend/lib/deep-extend.js:
|
|
105782
|
+
(*!
|
|
105783
|
+
* @description Recursive object extending
|
|
105784
|
+
* @author Viacheslav Lotsmanov <lotsmanov89@gmail.com>
|
|
105785
|
+
* @license MIT
|
|
105786
|
+
*
|
|
105787
|
+
* The MIT License (MIT)
|
|
105788
|
+
*
|
|
105789
|
+
* Copyright (c) 2013-2018 Viacheslav Lotsmanov
|
|
105790
|
+
*
|
|
105791
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
105792
|
+
* this software and associated documentation files (the "Software"), to deal in
|
|
105793
|
+
* the Software without restriction, including without limitation the rights to
|
|
105794
|
+
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
105795
|
+
* the Software, and to permit persons to whom the Software is furnished to do so,
|
|
105796
|
+
* subject to the following conditions:
|
|
105797
|
+
*
|
|
105798
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
105799
|
+
* copies or substantial portions of the Software.
|
|
105800
|
+
*
|
|
105801
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
105802
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
105803
|
+
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
105804
|
+
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
105805
|
+
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
105806
|
+
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
105807
|
+
*)
|
|
105808
|
+
|
|
105809
|
+
safe-buffer/index.js:
|
|
105810
|
+
(*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
|
105811
|
+
*/
|
|
105812
|
+
/*! Bundled license information:
|
|
105813
|
+
|
|
104688
105814
|
undici/lib/web/fetch/body.js:
|
|
104689
105815
|
(*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> *)
|
|
104690
105816
|
|