meshy-node 0.10.5 → 0.10.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dashboard/assets/DashboardPage-B8aG_22p.js +176 -0
- package/dashboard/assets/{DashboardShared-vm6Ua9h6.js → DashboardShared-BUUqTMMG.js} +9 -9
- package/dashboard/assets/{DiffTab-Bz1OAlIg.js → DiffTab-BJ-QDAVa.js} +2 -2
- package/dashboard/assets/FilesTab-CXyf-FqN.js +11 -0
- package/dashboard/assets/{MarkdownPreviewFrame-CrujIEck.js → MarkdownPreviewFrame-CFCsFLMN.js} +1 -1
- package/dashboard/assets/PreviewTab-hYU-Sg4s.js +21 -0
- package/dashboard/assets/{SharedConversationPage-D86sReze.js → SharedConversationPage-Bb7cY7t7.js} +2 -2
- package/dashboard/assets/{file-CBXlsD1A.js → file-Ct6iLy28.js} +1 -1
- package/dashboard/assets/index-0SJFGvhq.js +346 -0
- package/dashboard/assets/index-Br15-PXW.css +1 -0
- package/dashboard/index.html +2 -2
- package/main.cjs +1015 -1222
- package/package.json +1 -1
- package/runtime-metadata.json +4 -4
- package/dashboard/assets/DashboardPage-CuNReQ9k.js +0 -166
- package/dashboard/assets/FilesTab-BlJn83X5.js +0 -11
- package/dashboard/assets/PreviewTab-C7vB52yS.js +0 -21
- package/dashboard/assets/index-B21dpk5D.js +0 -346
- package/dashboard/assets/index-Bd5ODKX4.css +0 -1
package/main.cjs
CHANGED
|
@@ -8647,8 +8647,8 @@ function getClient(endpoint, clientOptions = {}) {
|
|
|
8647
8647
|
}
|
|
8648
8648
|
const { allowInsecureConnection: allowInsecureConnection2, httpClient } = clientOptions;
|
|
8649
8649
|
const endpointUrl = clientOptions.endpoint ?? endpoint;
|
|
8650
|
-
const client = (
|
|
8651
|
-
const getUrl3 = (requestOptions) => buildRequestUrl(endpointUrl,
|
|
8650
|
+
const client = (path47, ...args) => {
|
|
8651
|
+
const getUrl3 = (requestOptions) => buildRequestUrl(endpointUrl, path47, args, { allowInsecureConnection: allowInsecureConnection2, ...requestOptions });
|
|
8652
8652
|
return {
|
|
8653
8653
|
get: (requestOptions = {}) => {
|
|
8654
8654
|
return buildOperation("GET", getUrl3(requestOptions), pipeline3, requestOptions, allowInsecureConnection2, httpClient);
|
|
@@ -10391,8 +10391,8 @@ var init_parseUtil = __esm({
|
|
|
10391
10391
|
init_errors();
|
|
10392
10392
|
init_en();
|
|
10393
10393
|
makeIssue = (params) => {
|
|
10394
|
-
const { data, path:
|
|
10395
|
-
const fullPath = [...
|
|
10394
|
+
const { data, path: path47, errorMaps, issueData } = params;
|
|
10395
|
+
const fullPath = [...path47, ...issueData.path || []];
|
|
10396
10396
|
const fullIssue = {
|
|
10397
10397
|
...issueData,
|
|
10398
10398
|
path: fullPath
|
|
@@ -10706,11 +10706,11 @@ var init_types = __esm({
|
|
|
10706
10706
|
init_parseUtil();
|
|
10707
10707
|
init_util();
|
|
10708
10708
|
ParseInputLazyPath = class {
|
|
10709
|
-
constructor(parent, value,
|
|
10709
|
+
constructor(parent, value, path47, key2) {
|
|
10710
10710
|
this._cachedPath = [];
|
|
10711
10711
|
this.parent = parent;
|
|
10712
10712
|
this.data = value;
|
|
10713
|
-
this._path =
|
|
10713
|
+
this._path = path47;
|
|
10714
10714
|
this._key = key2;
|
|
10715
10715
|
}
|
|
10716
10716
|
get path() {
|
|
@@ -15365,8 +15365,8 @@ var require_node2 = __commonJS({
|
|
|
15365
15365
|
}
|
|
15366
15366
|
break;
|
|
15367
15367
|
case "FILE":
|
|
15368
|
-
var
|
|
15369
|
-
stream2 = new
|
|
15368
|
+
var fs43 = require("fs");
|
|
15369
|
+
stream2 = new fs43.SyncWriteStream(fd2, { autoClose: false });
|
|
15370
15370
|
stream2._type = "fs";
|
|
15371
15371
|
break;
|
|
15372
15372
|
case "PIPE":
|
|
@@ -28180,11 +28180,11 @@ var require_mime_types = __commonJS({
|
|
|
28180
28180
|
}
|
|
28181
28181
|
return exts[0];
|
|
28182
28182
|
}
|
|
28183
|
-
function lookup(
|
|
28184
|
-
if (!
|
|
28183
|
+
function lookup(path47) {
|
|
28184
|
+
if (!path47 || typeof path47 !== "string") {
|
|
28185
28185
|
return false;
|
|
28186
28186
|
}
|
|
28187
|
-
var extension3 = extname4("x." +
|
|
28187
|
+
var extension3 = extname4("x." + path47).toLowerCase().substr(1);
|
|
28188
28188
|
if (!extension3) {
|
|
28189
28189
|
return false;
|
|
28190
28190
|
}
|
|
@@ -31636,7 +31636,7 @@ var require_finalhandler = __commonJS({
|
|
|
31636
31636
|
} else {
|
|
31637
31637
|
headers = getErrorHeaders(err);
|
|
31638
31638
|
}
|
|
31639
|
-
msg =
|
|
31639
|
+
msg = getErrorMessage3(err, status, env4);
|
|
31640
31640
|
} else {
|
|
31641
31641
|
status = 404;
|
|
31642
31642
|
msg = "Cannot " + req.method + " " + encodeUrl(getResourceName(req));
|
|
@@ -31667,7 +31667,7 @@ var require_finalhandler = __commonJS({
|
|
|
31667
31667
|
}
|
|
31668
31668
|
return headers;
|
|
31669
31669
|
}
|
|
31670
|
-
function
|
|
31670
|
+
function getErrorMessage3(err, status, env4) {
|
|
31671
31671
|
var msg;
|
|
31672
31672
|
if (env4 !== "production") {
|
|
31673
31673
|
msg = err.stack;
|
|
@@ -31789,7 +31789,7 @@ var require_path_to_regexp = __commonJS({
|
|
|
31789
31789
|
init_cjs_shims();
|
|
31790
31790
|
module2.exports = pathToRegexp;
|
|
31791
31791
|
var MATCHING_GROUP_REGEXP = /\\.|\((?:\?<(.*?)>)?(?!\?)/g;
|
|
31792
|
-
function pathToRegexp(
|
|
31792
|
+
function pathToRegexp(path47, keys2, options) {
|
|
31793
31793
|
options = options || {};
|
|
31794
31794
|
keys2 = keys2 || [];
|
|
31795
31795
|
var strict = options.strict;
|
|
@@ -31803,8 +31803,8 @@ var require_path_to_regexp = __commonJS({
|
|
|
31803
31803
|
var pos = 0;
|
|
31804
31804
|
var backtrack = "";
|
|
31805
31805
|
var m;
|
|
31806
|
-
if (
|
|
31807
|
-
while (m = MATCHING_GROUP_REGEXP.exec(
|
|
31806
|
+
if (path47 instanceof RegExp) {
|
|
31807
|
+
while (m = MATCHING_GROUP_REGEXP.exec(path47.source)) {
|
|
31808
31808
|
if (m[0][0] === "\\") continue;
|
|
31809
31809
|
keys2.push({
|
|
31810
31810
|
name: m[1] || name2++,
|
|
@@ -31812,18 +31812,18 @@ var require_path_to_regexp = __commonJS({
|
|
|
31812
31812
|
offset: m.index
|
|
31813
31813
|
});
|
|
31814
31814
|
}
|
|
31815
|
-
return
|
|
31815
|
+
return path47;
|
|
31816
31816
|
}
|
|
31817
|
-
if (Array.isArray(
|
|
31818
|
-
|
|
31817
|
+
if (Array.isArray(path47)) {
|
|
31818
|
+
path47 = path47.map(function(value) {
|
|
31819
31819
|
return pathToRegexp(value, keys2, options).source;
|
|
31820
31820
|
});
|
|
31821
|
-
return new RegExp(
|
|
31821
|
+
return new RegExp(path47.join("|"), flags);
|
|
31822
31822
|
}
|
|
31823
|
-
if (typeof
|
|
31823
|
+
if (typeof path47 !== "string") {
|
|
31824
31824
|
throw new TypeError("path must be a string, array of strings, or regular expression");
|
|
31825
31825
|
}
|
|
31826
|
-
|
|
31826
|
+
path47 = path47.replace(
|
|
31827
31827
|
/\\.|(\/)?(\.)?:(\w+)(\(.*?\))?(\*)?(\?)?|[.*]|\/\(/g,
|
|
31828
31828
|
function(match, slash, format, key2, capture, star, optional2, offset) {
|
|
31829
31829
|
if (match[0] === "\\") {
|
|
@@ -31840,7 +31840,7 @@ var require_path_to_regexp = __commonJS({
|
|
|
31840
31840
|
if (slash || format) {
|
|
31841
31841
|
backtrack = "";
|
|
31842
31842
|
} else {
|
|
31843
|
-
backtrack +=
|
|
31843
|
+
backtrack += path47.slice(pos, offset);
|
|
31844
31844
|
}
|
|
31845
31845
|
pos = offset + match.length;
|
|
31846
31846
|
if (match === "*") {
|
|
@@ -31870,7 +31870,7 @@ var require_path_to_regexp = __commonJS({
|
|
|
31870
31870
|
return result;
|
|
31871
31871
|
}
|
|
31872
31872
|
);
|
|
31873
|
-
while (m = MATCHING_GROUP_REGEXP.exec(
|
|
31873
|
+
while (m = MATCHING_GROUP_REGEXP.exec(path47)) {
|
|
31874
31874
|
if (m[0][0] === "\\") continue;
|
|
31875
31875
|
if (keysOffset + i === keys2.length || keys2[keysOffset + i].offset > m.index) {
|
|
31876
31876
|
keys2.splice(keysOffset + i, 0, {
|
|
@@ -31882,13 +31882,13 @@ var require_path_to_regexp = __commonJS({
|
|
|
31882
31882
|
}
|
|
31883
31883
|
i++;
|
|
31884
31884
|
}
|
|
31885
|
-
|
|
31885
|
+
path47 += strict ? "" : path47[path47.length - 1] === "/" ? "?" : "/?";
|
|
31886
31886
|
if (end) {
|
|
31887
|
-
|
|
31888
|
-
} else if (
|
|
31889
|
-
|
|
31887
|
+
path47 += "$";
|
|
31888
|
+
} else if (path47[path47.length - 1] !== "/") {
|
|
31889
|
+
path47 += lookahead ? "(?=/|$)" : "(?:/|$)";
|
|
31890
31890
|
}
|
|
31891
|
-
return new RegExp("^" +
|
|
31891
|
+
return new RegExp("^" + path47, flags);
|
|
31892
31892
|
}
|
|
31893
31893
|
}
|
|
31894
31894
|
});
|
|
@@ -31902,19 +31902,19 @@ var require_layer = __commonJS({
|
|
|
31902
31902
|
var debug = require_src2()("express:router:layer");
|
|
31903
31903
|
var hasOwnProperty3 = Object.prototype.hasOwnProperty;
|
|
31904
31904
|
module2.exports = Layer;
|
|
31905
|
-
function Layer(
|
|
31905
|
+
function Layer(path47, options, fn) {
|
|
31906
31906
|
if (!(this instanceof Layer)) {
|
|
31907
|
-
return new Layer(
|
|
31907
|
+
return new Layer(path47, options, fn);
|
|
31908
31908
|
}
|
|
31909
|
-
debug("new %o",
|
|
31909
|
+
debug("new %o", path47);
|
|
31910
31910
|
var opts = options || {};
|
|
31911
31911
|
this.handle = fn;
|
|
31912
31912
|
this.name = fn.name || "<anonymous>";
|
|
31913
31913
|
this.params = void 0;
|
|
31914
31914
|
this.path = void 0;
|
|
31915
|
-
this.regexp = pathRegexp(
|
|
31916
|
-
this.regexp.fast_star =
|
|
31917
|
-
this.regexp.fast_slash =
|
|
31915
|
+
this.regexp = pathRegexp(path47, this.keys = [], opts);
|
|
31916
|
+
this.regexp.fast_star = path47 === "*";
|
|
31917
|
+
this.regexp.fast_slash = path47 === "/" && opts.end === false;
|
|
31918
31918
|
}
|
|
31919
31919
|
Layer.prototype.handle_error = function handle_error(error2, req, res, next2) {
|
|
31920
31920
|
var fn = this.handle;
|
|
@@ -31938,20 +31938,20 @@ var require_layer = __commonJS({
|
|
|
31938
31938
|
next2(err);
|
|
31939
31939
|
}
|
|
31940
31940
|
};
|
|
31941
|
-
Layer.prototype.match = function match(
|
|
31941
|
+
Layer.prototype.match = function match(path47) {
|
|
31942
31942
|
var match2;
|
|
31943
|
-
if (
|
|
31943
|
+
if (path47 != null) {
|
|
31944
31944
|
if (this.regexp.fast_slash) {
|
|
31945
31945
|
this.params = {};
|
|
31946
31946
|
this.path = "";
|
|
31947
31947
|
return true;
|
|
31948
31948
|
}
|
|
31949
31949
|
if (this.regexp.fast_star) {
|
|
31950
|
-
this.params = { "0": decode_param(
|
|
31951
|
-
this.path =
|
|
31950
|
+
this.params = { "0": decode_param(path47) };
|
|
31951
|
+
this.path = path47;
|
|
31952
31952
|
return true;
|
|
31953
31953
|
}
|
|
31954
|
-
match2 = this.regexp.exec(
|
|
31954
|
+
match2 = this.regexp.exec(path47);
|
|
31955
31955
|
}
|
|
31956
31956
|
if (!match2) {
|
|
31957
31957
|
this.params = void 0;
|
|
@@ -32046,10 +32046,10 @@ var require_route = __commonJS({
|
|
|
32046
32046
|
var slice = Array.prototype.slice;
|
|
32047
32047
|
var toString3 = Object.prototype.toString;
|
|
32048
32048
|
module2.exports = Route;
|
|
32049
|
-
function Route(
|
|
32050
|
-
this.path =
|
|
32049
|
+
function Route(path47) {
|
|
32050
|
+
this.path = path47;
|
|
32051
32051
|
this.stack = [];
|
|
32052
|
-
debug("new %o",
|
|
32052
|
+
debug("new %o", path47);
|
|
32053
32053
|
this.methods = {};
|
|
32054
32054
|
}
|
|
32055
32055
|
Route.prototype._handles_method = function _handles_method(method) {
|
|
@@ -32264,8 +32264,8 @@ var require_router = __commonJS({
|
|
|
32264
32264
|
if (++sync > 100) {
|
|
32265
32265
|
return setImmediate(next2, err);
|
|
32266
32266
|
}
|
|
32267
|
-
var
|
|
32268
|
-
if (
|
|
32267
|
+
var path47 = getPathname(req);
|
|
32268
|
+
if (path47 == null) {
|
|
32269
32269
|
return done(layerError);
|
|
32270
32270
|
}
|
|
32271
32271
|
var layer;
|
|
@@ -32273,7 +32273,7 @@ var require_router = __commonJS({
|
|
|
32273
32273
|
var route;
|
|
32274
32274
|
while (match !== true && idx < stack.length) {
|
|
32275
32275
|
layer = stack[idx++];
|
|
32276
|
-
match = matchLayer(layer,
|
|
32276
|
+
match = matchLayer(layer, path47);
|
|
32277
32277
|
route = layer.route;
|
|
32278
32278
|
if (typeof match !== "boolean") {
|
|
32279
32279
|
layerError = layerError || match;
|
|
@@ -32311,18 +32311,18 @@ var require_router = __commonJS({
|
|
|
32311
32311
|
} else if (route) {
|
|
32312
32312
|
layer.handle_request(req, res, next2);
|
|
32313
32313
|
} else {
|
|
32314
|
-
trim_prefix(layer, layerError, layerPath,
|
|
32314
|
+
trim_prefix(layer, layerError, layerPath, path47);
|
|
32315
32315
|
}
|
|
32316
32316
|
sync = 0;
|
|
32317
32317
|
});
|
|
32318
32318
|
}
|
|
32319
|
-
function trim_prefix(layer, layerError, layerPath,
|
|
32319
|
+
function trim_prefix(layer, layerError, layerPath, path47) {
|
|
32320
32320
|
if (layerPath.length !== 0) {
|
|
32321
|
-
if (layerPath !==
|
|
32321
|
+
if (layerPath !== path47.slice(0, layerPath.length)) {
|
|
32322
32322
|
next2(layerError);
|
|
32323
32323
|
return;
|
|
32324
32324
|
}
|
|
32325
|
-
var c =
|
|
32325
|
+
var c = path47[layerPath.length];
|
|
32326
32326
|
if (c && c !== "/" && c !== ".") return next2(layerError);
|
|
32327
32327
|
debug("trim prefix (%s) from url %s", layerPath, req.url);
|
|
32328
32328
|
removed = layerPath;
|
|
@@ -32400,7 +32400,7 @@ var require_router = __commonJS({
|
|
|
32400
32400
|
};
|
|
32401
32401
|
proto2.use = function use(fn) {
|
|
32402
32402
|
var offset = 0;
|
|
32403
|
-
var
|
|
32403
|
+
var path47 = "/";
|
|
32404
32404
|
if (typeof fn !== "function") {
|
|
32405
32405
|
var arg = fn;
|
|
32406
32406
|
while (Array.isArray(arg) && arg.length !== 0) {
|
|
@@ -32408,7 +32408,7 @@ var require_router = __commonJS({
|
|
|
32408
32408
|
}
|
|
32409
32409
|
if (typeof arg !== "function") {
|
|
32410
32410
|
offset = 1;
|
|
32411
|
-
|
|
32411
|
+
path47 = fn;
|
|
32412
32412
|
}
|
|
32413
32413
|
}
|
|
32414
32414
|
var callbacks = flatten(slice.call(arguments, offset));
|
|
@@ -32420,8 +32420,8 @@ var require_router = __commonJS({
|
|
|
32420
32420
|
if (typeof fn !== "function") {
|
|
32421
32421
|
throw new TypeError("Router.use() requires a middleware function but got a " + gettype(fn));
|
|
32422
32422
|
}
|
|
32423
|
-
debug("use %o %s",
|
|
32424
|
-
var layer = new Layer(
|
|
32423
|
+
debug("use %o %s", path47, fn.name || "<anonymous>");
|
|
32424
|
+
var layer = new Layer(path47, {
|
|
32425
32425
|
sensitive: this.caseSensitive,
|
|
32426
32426
|
strict: false,
|
|
32427
32427
|
end: false
|
|
@@ -32431,9 +32431,9 @@ var require_router = __commonJS({
|
|
|
32431
32431
|
}
|
|
32432
32432
|
return this;
|
|
32433
32433
|
};
|
|
32434
|
-
proto2.route = function route(
|
|
32435
|
-
var route2 = new Route(
|
|
32436
|
-
var layer = new Layer(
|
|
32434
|
+
proto2.route = function route(path47) {
|
|
32435
|
+
var route2 = new Route(path47);
|
|
32436
|
+
var layer = new Layer(path47, {
|
|
32437
32437
|
sensitive: this.caseSensitive,
|
|
32438
32438
|
strict: this.strict,
|
|
32439
32439
|
end: true
|
|
@@ -32443,8 +32443,8 @@ var require_router = __commonJS({
|
|
|
32443
32443
|
return route2;
|
|
32444
32444
|
};
|
|
32445
32445
|
methods.concat("all").forEach(function(method) {
|
|
32446
|
-
proto2[method] = function(
|
|
32447
|
-
var route = this.route(
|
|
32446
|
+
proto2[method] = function(path47) {
|
|
32447
|
+
var route = this.route(path47);
|
|
32448
32448
|
route[method].apply(route, slice.call(arguments, 1));
|
|
32449
32449
|
return this;
|
|
32450
32450
|
};
|
|
@@ -32480,9 +32480,9 @@ var require_router = __commonJS({
|
|
|
32480
32480
|
}
|
|
32481
32481
|
return toString3.call(obj).replace(objectRegExp, "$1");
|
|
32482
32482
|
}
|
|
32483
|
-
function matchLayer(layer,
|
|
32483
|
+
function matchLayer(layer, path47) {
|
|
32484
32484
|
try {
|
|
32485
|
-
return layer.match(
|
|
32485
|
+
return layer.match(path47);
|
|
32486
32486
|
} catch (err) {
|
|
32487
32487
|
return err;
|
|
32488
32488
|
}
|
|
@@ -32603,13 +32603,13 @@ var require_view = __commonJS({
|
|
|
32603
32603
|
"use strict";
|
|
32604
32604
|
init_cjs_shims();
|
|
32605
32605
|
var debug = require_src2()("express:view");
|
|
32606
|
-
var
|
|
32607
|
-
var
|
|
32608
|
-
var dirname11 =
|
|
32609
|
-
var basename6 =
|
|
32610
|
-
var extname4 =
|
|
32611
|
-
var
|
|
32612
|
-
var resolve24 =
|
|
32606
|
+
var path47 = require("path");
|
|
32607
|
+
var fs43 = require("fs");
|
|
32608
|
+
var dirname11 = path47.dirname;
|
|
32609
|
+
var basename6 = path47.basename;
|
|
32610
|
+
var extname4 = path47.extname;
|
|
32611
|
+
var join31 = path47.join;
|
|
32612
|
+
var resolve24 = path47.resolve;
|
|
32613
32613
|
module2.exports = View3;
|
|
32614
32614
|
function View3(name2, options) {
|
|
32615
32615
|
var opts = options || {};
|
|
@@ -32638,17 +32638,17 @@ var require_view = __commonJS({
|
|
|
32638
32638
|
this.path = this.lookup(fileName);
|
|
32639
32639
|
}
|
|
32640
32640
|
View3.prototype.lookup = function lookup(name2) {
|
|
32641
|
-
var
|
|
32641
|
+
var path48;
|
|
32642
32642
|
var roots = [].concat(this.root);
|
|
32643
32643
|
debug('lookup "%s"', name2);
|
|
32644
|
-
for (var i = 0; i < roots.length && !
|
|
32644
|
+
for (var i = 0; i < roots.length && !path48; i++) {
|
|
32645
32645
|
var root7 = roots[i];
|
|
32646
32646
|
var loc = resolve24(root7, name2);
|
|
32647
32647
|
var dir = dirname11(loc);
|
|
32648
32648
|
var file = basename6(loc);
|
|
32649
|
-
|
|
32649
|
+
path48 = this.resolve(dir, file);
|
|
32650
32650
|
}
|
|
32651
|
-
return
|
|
32651
|
+
return path48;
|
|
32652
32652
|
};
|
|
32653
32653
|
View3.prototype.render = function render(options, callback) {
|
|
32654
32654
|
debug('render "%s"', this.path);
|
|
@@ -32656,21 +32656,21 @@ var require_view = __commonJS({
|
|
|
32656
32656
|
};
|
|
32657
32657
|
View3.prototype.resolve = function resolve25(dir, file) {
|
|
32658
32658
|
var ext = this.ext;
|
|
32659
|
-
var
|
|
32660
|
-
var stat3 = tryStat(
|
|
32659
|
+
var path48 = join31(dir, file);
|
|
32660
|
+
var stat3 = tryStat(path48);
|
|
32661
32661
|
if (stat3 && stat3.isFile()) {
|
|
32662
|
-
return
|
|
32662
|
+
return path48;
|
|
32663
32663
|
}
|
|
32664
|
-
|
|
32665
|
-
stat3 = tryStat(
|
|
32664
|
+
path48 = join31(dir, basename6(file, ext), "index" + ext);
|
|
32665
|
+
stat3 = tryStat(path48);
|
|
32666
32666
|
if (stat3 && stat3.isFile()) {
|
|
32667
|
-
return
|
|
32667
|
+
return path48;
|
|
32668
32668
|
}
|
|
32669
32669
|
};
|
|
32670
|
-
function tryStat(
|
|
32671
|
-
debug('stat "%s"',
|
|
32670
|
+
function tryStat(path48) {
|
|
32671
|
+
debug('stat "%s"', path48);
|
|
32672
32672
|
try {
|
|
32673
|
-
return
|
|
32673
|
+
return fs43.statSync(path48);
|
|
32674
32674
|
} catch (e) {
|
|
32675
32675
|
return void 0;
|
|
32676
32676
|
}
|
|
@@ -32971,8 +32971,8 @@ var require_mime = __commonJS({
|
|
|
32971
32971
|
"../../node_modules/.pnpm/mime@1.6.0/node_modules/mime/mime.js"(exports2, module2) {
|
|
32972
32972
|
"use strict";
|
|
32973
32973
|
init_cjs_shims();
|
|
32974
|
-
var
|
|
32975
|
-
var
|
|
32974
|
+
var path47 = require("path");
|
|
32975
|
+
var fs43 = require("fs");
|
|
32976
32976
|
function Mime() {
|
|
32977
32977
|
this.types = /* @__PURE__ */ Object.create(null);
|
|
32978
32978
|
this.extensions = /* @__PURE__ */ Object.create(null);
|
|
@@ -32993,7 +32993,7 @@ var require_mime = __commonJS({
|
|
|
32993
32993
|
};
|
|
32994
32994
|
Mime.prototype.load = function(file) {
|
|
32995
32995
|
this._loading = file;
|
|
32996
|
-
var map3 = {}, content3 =
|
|
32996
|
+
var map3 = {}, content3 = fs43.readFileSync(file, "ascii"), lines = content3.split(/[\r\n]+/);
|
|
32997
32997
|
lines.forEach(function(line) {
|
|
32998
32998
|
var fields = line.replace(/\s*#.*|^\s*|\s*$/g, "").split(/\s+/);
|
|
32999
32999
|
map3[fields.shift()] = fields;
|
|
@@ -33001,8 +33001,8 @@ var require_mime = __commonJS({
|
|
|
33001
33001
|
this.define(map3);
|
|
33002
33002
|
this._loading = null;
|
|
33003
33003
|
};
|
|
33004
|
-
Mime.prototype.lookup = function(
|
|
33005
|
-
var ext =
|
|
33004
|
+
Mime.prototype.lookup = function(path48, fallback) {
|
|
33005
|
+
var ext = path48.replace(/^.*[\.\/\\]/, "").toLowerCase();
|
|
33006
33006
|
return this.types[ext] || fallback || this.default_type;
|
|
33007
33007
|
};
|
|
33008
33008
|
Mime.prototype.extension = function(mimeType) {
|
|
@@ -33117,33 +33117,33 @@ var require_send = __commonJS({
|
|
|
33117
33117
|
var escapeHtml2 = require_escape_html();
|
|
33118
33118
|
var etag = require_etag();
|
|
33119
33119
|
var fresh = require_fresh();
|
|
33120
|
-
var
|
|
33120
|
+
var fs43 = require("fs");
|
|
33121
33121
|
var mime = require_mime();
|
|
33122
33122
|
var ms = require_ms();
|
|
33123
33123
|
var onFinished = require_on_finished();
|
|
33124
33124
|
var parseRange = require_range_parser();
|
|
33125
|
-
var
|
|
33125
|
+
var path47 = require("path");
|
|
33126
33126
|
var statuses = require_statuses();
|
|
33127
33127
|
var Stream = require("stream");
|
|
33128
33128
|
var util5 = require("util");
|
|
33129
|
-
var extname4 =
|
|
33130
|
-
var
|
|
33131
|
-
var normalize8 =
|
|
33132
|
-
var resolve24 =
|
|
33133
|
-
var sep11 =
|
|
33129
|
+
var extname4 = path47.extname;
|
|
33130
|
+
var join31 = path47.join;
|
|
33131
|
+
var normalize8 = path47.normalize;
|
|
33132
|
+
var resolve24 = path47.resolve;
|
|
33133
|
+
var sep11 = path47.sep;
|
|
33134
33134
|
var BYTES_RANGE_REGEXP = /^ *bytes=/;
|
|
33135
33135
|
var MAX_MAXAGE = 60 * 60 * 24 * 365 * 1e3;
|
|
33136
33136
|
var UP_PATH_REGEXP = /(?:^|[\\/])\.\.(?:[\\/]|$)/;
|
|
33137
33137
|
module2.exports = send;
|
|
33138
33138
|
module2.exports.mime = mime;
|
|
33139
|
-
function send(req,
|
|
33140
|
-
return new SendStream(req,
|
|
33139
|
+
function send(req, path48, options) {
|
|
33140
|
+
return new SendStream(req, path48, options);
|
|
33141
33141
|
}
|
|
33142
|
-
function SendStream(req,
|
|
33142
|
+
function SendStream(req, path48, options) {
|
|
33143
33143
|
Stream.call(this);
|
|
33144
33144
|
var opts = options || {};
|
|
33145
33145
|
this.options = opts;
|
|
33146
|
-
this.path =
|
|
33146
|
+
this.path = path48;
|
|
33147
33147
|
this.req = req;
|
|
33148
33148
|
this._acceptRanges = opts.acceptRanges !== void 0 ? Boolean(opts.acceptRanges) : true;
|
|
33149
33149
|
this._cacheControl = opts.cacheControl !== void 0 ? Boolean(opts.cacheControl) : true;
|
|
@@ -33189,8 +33189,8 @@ var require_send = __commonJS({
|
|
|
33189
33189
|
this._index = index3;
|
|
33190
33190
|
return this;
|
|
33191
33191
|
}, "send.index: pass index as option");
|
|
33192
|
-
SendStream.prototype.root = function root7(
|
|
33193
|
-
this._root = resolve24(String(
|
|
33192
|
+
SendStream.prototype.root = function root7(path48) {
|
|
33193
|
+
this._root = resolve24(String(path48));
|
|
33194
33194
|
debug("root %s", this._root);
|
|
33195
33195
|
return this;
|
|
33196
33196
|
};
|
|
@@ -33303,10 +33303,10 @@ var require_send = __commonJS({
|
|
|
33303
33303
|
var lastModified = this.res.getHeader("Last-Modified");
|
|
33304
33304
|
return parseHttpDate(lastModified) <= parseHttpDate(ifRange);
|
|
33305
33305
|
};
|
|
33306
|
-
SendStream.prototype.redirect = function redirect(
|
|
33306
|
+
SendStream.prototype.redirect = function redirect(path48) {
|
|
33307
33307
|
var res = this.res;
|
|
33308
33308
|
if (hasListeners(this, "directory")) {
|
|
33309
|
-
this.emit("directory", res,
|
|
33309
|
+
this.emit("directory", res, path48);
|
|
33310
33310
|
return;
|
|
33311
33311
|
}
|
|
33312
33312
|
if (this.hasTrailingSlash()) {
|
|
@@ -33326,42 +33326,42 @@ var require_send = __commonJS({
|
|
|
33326
33326
|
SendStream.prototype.pipe = function pipe2(res) {
|
|
33327
33327
|
var root7 = this._root;
|
|
33328
33328
|
this.res = res;
|
|
33329
|
-
var
|
|
33330
|
-
if (
|
|
33329
|
+
var path48 = decode2(this.path);
|
|
33330
|
+
if (path48 === -1) {
|
|
33331
33331
|
this.error(400);
|
|
33332
33332
|
return res;
|
|
33333
33333
|
}
|
|
33334
|
-
if (~
|
|
33334
|
+
if (~path48.indexOf("\0")) {
|
|
33335
33335
|
this.error(400);
|
|
33336
33336
|
return res;
|
|
33337
33337
|
}
|
|
33338
33338
|
var parts;
|
|
33339
33339
|
if (root7 !== null) {
|
|
33340
|
-
if (
|
|
33341
|
-
|
|
33340
|
+
if (path48) {
|
|
33341
|
+
path48 = normalize8("." + sep11 + path48);
|
|
33342
33342
|
}
|
|
33343
|
-
if (UP_PATH_REGEXP.test(
|
|
33344
|
-
debug('malicious path "%s"',
|
|
33343
|
+
if (UP_PATH_REGEXP.test(path48)) {
|
|
33344
|
+
debug('malicious path "%s"', path48);
|
|
33345
33345
|
this.error(403);
|
|
33346
33346
|
return res;
|
|
33347
33347
|
}
|
|
33348
|
-
parts =
|
|
33349
|
-
|
|
33348
|
+
parts = path48.split(sep11);
|
|
33349
|
+
path48 = normalize8(join31(root7, path48));
|
|
33350
33350
|
} else {
|
|
33351
|
-
if (UP_PATH_REGEXP.test(
|
|
33352
|
-
debug('malicious path "%s"',
|
|
33351
|
+
if (UP_PATH_REGEXP.test(path48)) {
|
|
33352
|
+
debug('malicious path "%s"', path48);
|
|
33353
33353
|
this.error(403);
|
|
33354
33354
|
return res;
|
|
33355
33355
|
}
|
|
33356
|
-
parts = normalize8(
|
|
33357
|
-
|
|
33356
|
+
parts = normalize8(path48).split(sep11);
|
|
33357
|
+
path48 = resolve24(path48);
|
|
33358
33358
|
}
|
|
33359
33359
|
if (containsDotFile(parts)) {
|
|
33360
33360
|
var access = this._dotfiles;
|
|
33361
33361
|
if (access === void 0) {
|
|
33362
33362
|
access = parts[parts.length - 1][0] === "." ? this._hidden ? "allow" : "ignore" : "allow";
|
|
33363
33363
|
}
|
|
33364
|
-
debug('%s dotfile "%s"', access,
|
|
33364
|
+
debug('%s dotfile "%s"', access, path48);
|
|
33365
33365
|
switch (access) {
|
|
33366
33366
|
case "allow":
|
|
33367
33367
|
break;
|
|
@@ -33375,13 +33375,13 @@ var require_send = __commonJS({
|
|
|
33375
33375
|
}
|
|
33376
33376
|
}
|
|
33377
33377
|
if (this._index.length && this.hasTrailingSlash()) {
|
|
33378
|
-
this.sendIndex(
|
|
33378
|
+
this.sendIndex(path48);
|
|
33379
33379
|
return res;
|
|
33380
33380
|
}
|
|
33381
|
-
this.sendFile(
|
|
33381
|
+
this.sendFile(path48);
|
|
33382
33382
|
return res;
|
|
33383
33383
|
};
|
|
33384
|
-
SendStream.prototype.send = function send2(
|
|
33384
|
+
SendStream.prototype.send = function send2(path48, stat3) {
|
|
33385
33385
|
var len = stat3.size;
|
|
33386
33386
|
var options = this.options;
|
|
33387
33387
|
var opts = {};
|
|
@@ -33393,9 +33393,9 @@ var require_send = __commonJS({
|
|
|
33393
33393
|
this.headersAlreadySent();
|
|
33394
33394
|
return;
|
|
33395
33395
|
}
|
|
33396
|
-
debug('pipe "%s"',
|
|
33397
|
-
this.setHeader(
|
|
33398
|
-
this.type(
|
|
33396
|
+
debug('pipe "%s"', path48);
|
|
33397
|
+
this.setHeader(path48, stat3);
|
|
33398
|
+
this.type(path48);
|
|
33399
33399
|
if (this.isConditionalGET()) {
|
|
33400
33400
|
if (this.isPreconditionFailure()) {
|
|
33401
33401
|
this.error(412);
|
|
@@ -33444,28 +33444,28 @@ var require_send = __commonJS({
|
|
|
33444
33444
|
res.end();
|
|
33445
33445
|
return;
|
|
33446
33446
|
}
|
|
33447
|
-
this.stream(
|
|
33447
|
+
this.stream(path48, opts);
|
|
33448
33448
|
};
|
|
33449
|
-
SendStream.prototype.sendFile = function sendFile(
|
|
33449
|
+
SendStream.prototype.sendFile = function sendFile(path48) {
|
|
33450
33450
|
var i = 0;
|
|
33451
33451
|
var self2 = this;
|
|
33452
|
-
debug('stat "%s"',
|
|
33453
|
-
|
|
33454
|
-
if (err && err.code === "ENOENT" && !extname4(
|
|
33452
|
+
debug('stat "%s"', path48);
|
|
33453
|
+
fs43.stat(path48, function onstat(err, stat3) {
|
|
33454
|
+
if (err && err.code === "ENOENT" && !extname4(path48) && path48[path48.length - 1] !== sep11) {
|
|
33455
33455
|
return next2(err);
|
|
33456
33456
|
}
|
|
33457
33457
|
if (err) return self2.onStatError(err);
|
|
33458
|
-
if (stat3.isDirectory()) return self2.redirect(
|
|
33459
|
-
self2.emit("file",
|
|
33460
|
-
self2.send(
|
|
33458
|
+
if (stat3.isDirectory()) return self2.redirect(path48);
|
|
33459
|
+
self2.emit("file", path48, stat3);
|
|
33460
|
+
self2.send(path48, stat3);
|
|
33461
33461
|
});
|
|
33462
33462
|
function next2(err) {
|
|
33463
33463
|
if (self2._extensions.length <= i) {
|
|
33464
33464
|
return err ? self2.onStatError(err) : self2.error(404);
|
|
33465
33465
|
}
|
|
33466
|
-
var p2 =
|
|
33466
|
+
var p2 = path48 + "." + self2._extensions[i++];
|
|
33467
33467
|
debug('stat "%s"', p2);
|
|
33468
|
-
|
|
33468
|
+
fs43.stat(p2, function(err2, stat3) {
|
|
33469
33469
|
if (err2) return next2(err2);
|
|
33470
33470
|
if (stat3.isDirectory()) return next2();
|
|
33471
33471
|
self2.emit("file", p2, stat3);
|
|
@@ -33473,7 +33473,7 @@ var require_send = __commonJS({
|
|
|
33473
33473
|
});
|
|
33474
33474
|
}
|
|
33475
33475
|
};
|
|
33476
|
-
SendStream.prototype.sendIndex = function sendIndex(
|
|
33476
|
+
SendStream.prototype.sendIndex = function sendIndex(path48) {
|
|
33477
33477
|
var i = -1;
|
|
33478
33478
|
var self2 = this;
|
|
33479
33479
|
function next2(err) {
|
|
@@ -33481,9 +33481,9 @@ var require_send = __commonJS({
|
|
|
33481
33481
|
if (err) return self2.onStatError(err);
|
|
33482
33482
|
return self2.error(404);
|
|
33483
33483
|
}
|
|
33484
|
-
var p2 =
|
|
33484
|
+
var p2 = join31(path48, self2._index[i]);
|
|
33485
33485
|
debug('stat "%s"', p2);
|
|
33486
|
-
|
|
33486
|
+
fs43.stat(p2, function(err2, stat3) {
|
|
33487
33487
|
if (err2) return next2(err2);
|
|
33488
33488
|
if (stat3.isDirectory()) return next2();
|
|
33489
33489
|
self2.emit("file", p2, stat3);
|
|
@@ -33492,10 +33492,10 @@ var require_send = __commonJS({
|
|
|
33492
33492
|
}
|
|
33493
33493
|
next2();
|
|
33494
33494
|
};
|
|
33495
|
-
SendStream.prototype.stream = function stream(
|
|
33495
|
+
SendStream.prototype.stream = function stream(path48, options) {
|
|
33496
33496
|
var self2 = this;
|
|
33497
33497
|
var res = this.res;
|
|
33498
|
-
var stream2 =
|
|
33498
|
+
var stream2 = fs43.createReadStream(path48, options);
|
|
33499
33499
|
this.emit("stream", stream2);
|
|
33500
33500
|
stream2.pipe(res);
|
|
33501
33501
|
function cleanup() {
|
|
@@ -33510,10 +33510,10 @@ var require_send = __commonJS({
|
|
|
33510
33510
|
self2.emit("end");
|
|
33511
33511
|
});
|
|
33512
33512
|
};
|
|
33513
|
-
SendStream.prototype.type = function type(
|
|
33513
|
+
SendStream.prototype.type = function type(path48) {
|
|
33514
33514
|
var res = this.res;
|
|
33515
33515
|
if (res.getHeader("Content-Type")) return;
|
|
33516
|
-
var type2 = mime.lookup(
|
|
33516
|
+
var type2 = mime.lookup(path48);
|
|
33517
33517
|
if (!type2) {
|
|
33518
33518
|
debug("no content-type");
|
|
33519
33519
|
return;
|
|
@@ -33522,9 +33522,9 @@ var require_send = __commonJS({
|
|
|
33522
33522
|
debug("content-type %s", type2);
|
|
33523
33523
|
res.setHeader("Content-Type", type2 + (charset ? "; charset=" + charset : ""));
|
|
33524
33524
|
};
|
|
33525
|
-
SendStream.prototype.setHeader = function setHeader(
|
|
33525
|
+
SendStream.prototype.setHeader = function setHeader(path48, stat3) {
|
|
33526
33526
|
var res = this.res;
|
|
33527
|
-
this.emit("headers", res,
|
|
33527
|
+
this.emit("headers", res, path48, stat3);
|
|
33528
33528
|
if (this._acceptRanges && !res.getHeader("Accept-Ranges")) {
|
|
33529
33529
|
debug("accept ranges");
|
|
33530
33530
|
res.setHeader("Accept-Ranges", "bytes");
|
|
@@ -33583,9 +33583,9 @@ var require_send = __commonJS({
|
|
|
33583
33583
|
}
|
|
33584
33584
|
return err instanceof Error ? createError(status, err, { expose: false }) : createError(status, err);
|
|
33585
33585
|
}
|
|
33586
|
-
function decode2(
|
|
33586
|
+
function decode2(path48) {
|
|
33587
33587
|
try {
|
|
33588
|
-
return decodeURIComponent(
|
|
33588
|
+
return decodeURIComponent(path48);
|
|
33589
33589
|
} catch (err) {
|
|
33590
33590
|
return -1;
|
|
33591
33591
|
}
|
|
@@ -34499,10 +34499,10 @@ var require_utils2 = __commonJS({
|
|
|
34499
34499
|
var querystring = require("querystring");
|
|
34500
34500
|
exports2.etag = createETagGenerator({ weak: false });
|
|
34501
34501
|
exports2.wetag = createETagGenerator({ weak: true });
|
|
34502
|
-
exports2.isAbsolute = function(
|
|
34503
|
-
if ("/" ===
|
|
34504
|
-
if (":" ===
|
|
34505
|
-
if ("\\\\" ===
|
|
34502
|
+
exports2.isAbsolute = function(path47) {
|
|
34503
|
+
if ("/" === path47[0]) return true;
|
|
34504
|
+
if (":" === path47[1] && ("\\" === path47[2] || "/" === path47[2])) return true;
|
|
34505
|
+
if ("\\\\" === path47.substring(0, 2)) return true;
|
|
34506
34506
|
};
|
|
34507
34507
|
exports2.flatten = deprecate.function(
|
|
34508
34508
|
flatten,
|
|
@@ -34714,7 +34714,7 @@ var require_application = __commonJS({
|
|
|
34714
34714
|
};
|
|
34715
34715
|
app.use = function use(fn) {
|
|
34716
34716
|
var offset = 0;
|
|
34717
|
-
var
|
|
34717
|
+
var path47 = "/";
|
|
34718
34718
|
if (typeof fn !== "function") {
|
|
34719
34719
|
var arg = fn;
|
|
34720
34720
|
while (Array.isArray(arg) && arg.length !== 0) {
|
|
@@ -34722,7 +34722,7 @@ var require_application = __commonJS({
|
|
|
34722
34722
|
}
|
|
34723
34723
|
if (typeof arg !== "function") {
|
|
34724
34724
|
offset = 1;
|
|
34725
|
-
|
|
34725
|
+
path47 = fn;
|
|
34726
34726
|
}
|
|
34727
34727
|
}
|
|
34728
34728
|
var fns = flatten(slice.call(arguments, offset));
|
|
@@ -34733,12 +34733,12 @@ var require_application = __commonJS({
|
|
|
34733
34733
|
var router = this._router;
|
|
34734
34734
|
fns.forEach(function(fn2) {
|
|
34735
34735
|
if (!fn2 || !fn2.handle || !fn2.set) {
|
|
34736
|
-
return router.use(
|
|
34736
|
+
return router.use(path47, fn2);
|
|
34737
34737
|
}
|
|
34738
|
-
debug(".use app under %s",
|
|
34739
|
-
fn2.mountpath =
|
|
34738
|
+
debug(".use app under %s", path47);
|
|
34739
|
+
fn2.mountpath = path47;
|
|
34740
34740
|
fn2.parent = this;
|
|
34741
|
-
router.use(
|
|
34741
|
+
router.use(path47, function mounted_app(req, res, next2) {
|
|
34742
34742
|
var orig = req.app;
|
|
34743
34743
|
fn2.handle(req, res, function(err) {
|
|
34744
34744
|
setPrototypeOf(req, orig.request);
|
|
@@ -34750,9 +34750,9 @@ var require_application = __commonJS({
|
|
|
34750
34750
|
}, this);
|
|
34751
34751
|
return this;
|
|
34752
34752
|
};
|
|
34753
|
-
app.route = function route(
|
|
34753
|
+
app.route = function route(path47) {
|
|
34754
34754
|
this.lazyrouter();
|
|
34755
|
-
return this._router.route(
|
|
34755
|
+
return this._router.route(path47);
|
|
34756
34756
|
};
|
|
34757
34757
|
app.engine = function engine(ext, fn) {
|
|
34758
34758
|
if (typeof fn !== "function") {
|
|
@@ -34803,7 +34803,7 @@ var require_application = __commonJS({
|
|
|
34803
34803
|
}
|
|
34804
34804
|
return this;
|
|
34805
34805
|
};
|
|
34806
|
-
app.path = function
|
|
34806
|
+
app.path = function path47() {
|
|
34807
34807
|
return this.parent ? this.parent.path() + this.mountpath : "";
|
|
34808
34808
|
};
|
|
34809
34809
|
app.enabled = function enabled2(setting) {
|
|
@@ -34819,19 +34819,19 @@ var require_application = __commonJS({
|
|
|
34819
34819
|
return this.set(setting, false);
|
|
34820
34820
|
};
|
|
34821
34821
|
methods.forEach(function(method) {
|
|
34822
|
-
app[method] = function(
|
|
34822
|
+
app[method] = function(path47) {
|
|
34823
34823
|
if (method === "get" && arguments.length === 1) {
|
|
34824
|
-
return this.set(
|
|
34824
|
+
return this.set(path47);
|
|
34825
34825
|
}
|
|
34826
34826
|
this.lazyrouter();
|
|
34827
|
-
var route = this._router.route(
|
|
34827
|
+
var route = this._router.route(path47);
|
|
34828
34828
|
route[method].apply(route, slice.call(arguments, 1));
|
|
34829
34829
|
return this;
|
|
34830
34830
|
};
|
|
34831
34831
|
});
|
|
34832
|
-
app.all = function all6(
|
|
34832
|
+
app.all = function all6(path47) {
|
|
34833
34833
|
this.lazyrouter();
|
|
34834
|
-
var route = this._router.route(
|
|
34834
|
+
var route = this._router.route(path47);
|
|
34835
34835
|
var args = slice.call(arguments, 1);
|
|
34836
34836
|
for (var i = 0; i < methods.length; i++) {
|
|
34837
34837
|
route[methods[i]].apply(route, args);
|
|
@@ -35597,7 +35597,7 @@ var require_request = __commonJS({
|
|
|
35597
35597
|
var subdomains2 = !isIP(hostname6) ? hostname6.split(".").reverse() : [hostname6];
|
|
35598
35598
|
return subdomains2.slice(offset);
|
|
35599
35599
|
});
|
|
35600
|
-
defineGetter(req, "path", function
|
|
35600
|
+
defineGetter(req, "path", function path47() {
|
|
35601
35601
|
return parse9(this).pathname;
|
|
35602
35602
|
});
|
|
35603
35603
|
defineGetter(req, "hostname", function hostname6() {
|
|
@@ -35924,7 +35924,7 @@ var require_response = __commonJS({
|
|
|
35924
35924
|
var http6 = require("http");
|
|
35925
35925
|
var isAbsolute13 = require_utils2().isAbsolute;
|
|
35926
35926
|
var onFinished = require_on_finished();
|
|
35927
|
-
var
|
|
35927
|
+
var path47 = require("path");
|
|
35928
35928
|
var statuses = require_statuses();
|
|
35929
35929
|
var merge4 = require_utils_merge();
|
|
35930
35930
|
var sign = require_cookie_signature().sign;
|
|
@@ -35933,9 +35933,9 @@ var require_response = __commonJS({
|
|
|
35933
35933
|
var setCharset = require_utils2().setCharset;
|
|
35934
35934
|
var cookie = require_cookie();
|
|
35935
35935
|
var send = require_send();
|
|
35936
|
-
var extname4 =
|
|
35936
|
+
var extname4 = path47.extname;
|
|
35937
35937
|
var mime = send.mime;
|
|
35938
|
-
var resolve24 =
|
|
35938
|
+
var resolve24 = path47.resolve;
|
|
35939
35939
|
var vary = require_vary();
|
|
35940
35940
|
var res = Object.create(http6.ServerResponse.prototype);
|
|
35941
35941
|
module2.exports = res;
|
|
@@ -36112,26 +36112,26 @@ var require_response = __commonJS({
|
|
|
36112
36112
|
this.type("txt");
|
|
36113
36113
|
return this.send(body3);
|
|
36114
36114
|
};
|
|
36115
|
-
res.sendFile = function sendFile(
|
|
36115
|
+
res.sendFile = function sendFile(path48, options, callback) {
|
|
36116
36116
|
var done = callback;
|
|
36117
36117
|
var req = this.req;
|
|
36118
36118
|
var res2 = this;
|
|
36119
36119
|
var next2 = req.next;
|
|
36120
36120
|
var opts = options || {};
|
|
36121
|
-
if (!
|
|
36121
|
+
if (!path48) {
|
|
36122
36122
|
throw new TypeError("path argument is required to res.sendFile");
|
|
36123
36123
|
}
|
|
36124
|
-
if (typeof
|
|
36124
|
+
if (typeof path48 !== "string") {
|
|
36125
36125
|
throw new TypeError("path must be a string to res.sendFile");
|
|
36126
36126
|
}
|
|
36127
36127
|
if (typeof options === "function") {
|
|
36128
36128
|
done = options;
|
|
36129
36129
|
opts = {};
|
|
36130
36130
|
}
|
|
36131
|
-
if (!opts.root && !isAbsolute13(
|
|
36131
|
+
if (!opts.root && !isAbsolute13(path48)) {
|
|
36132
36132
|
throw new TypeError("path must be absolute or specify root to res.sendFile");
|
|
36133
36133
|
}
|
|
36134
|
-
var pathname = encodeURI(
|
|
36134
|
+
var pathname = encodeURI(path48);
|
|
36135
36135
|
var file = send(req, pathname, opts);
|
|
36136
36136
|
sendfile(res2, file, opts, function(err) {
|
|
36137
36137
|
if (done) return done(err);
|
|
@@ -36141,7 +36141,7 @@ var require_response = __commonJS({
|
|
|
36141
36141
|
}
|
|
36142
36142
|
});
|
|
36143
36143
|
};
|
|
36144
|
-
res.sendfile = function(
|
|
36144
|
+
res.sendfile = function(path48, options, callback) {
|
|
36145
36145
|
var done = callback;
|
|
36146
36146
|
var req = this.req;
|
|
36147
36147
|
var res2 = this;
|
|
@@ -36151,7 +36151,7 @@ var require_response = __commonJS({
|
|
|
36151
36151
|
done = options;
|
|
36152
36152
|
opts = {};
|
|
36153
36153
|
}
|
|
36154
|
-
var file = send(req,
|
|
36154
|
+
var file = send(req, path48, opts);
|
|
36155
36155
|
sendfile(res2, file, opts, function(err) {
|
|
36156
36156
|
if (done) return done(err);
|
|
36157
36157
|
if (err && err.code === "EISDIR") return next2();
|
|
@@ -36164,7 +36164,7 @@ var require_response = __commonJS({
|
|
|
36164
36164
|
res.sendfile,
|
|
36165
36165
|
"res.sendfile: Use res.sendFile instead"
|
|
36166
36166
|
);
|
|
36167
|
-
res.download = function download(
|
|
36167
|
+
res.download = function download(path48, filename, options, callback) {
|
|
36168
36168
|
var done = callback;
|
|
36169
36169
|
var name2 = filename;
|
|
36170
36170
|
var opts = options || null;
|
|
@@ -36181,7 +36181,7 @@ var require_response = __commonJS({
|
|
|
36181
36181
|
opts = filename;
|
|
36182
36182
|
}
|
|
36183
36183
|
var headers = {
|
|
36184
|
-
"Content-Disposition": contentDisposition(name2 ||
|
|
36184
|
+
"Content-Disposition": contentDisposition(name2 || path48)
|
|
36185
36185
|
};
|
|
36186
36186
|
if (opts && opts.headers) {
|
|
36187
36187
|
var keys2 = Object.keys(opts.headers);
|
|
@@ -36194,7 +36194,7 @@ var require_response = __commonJS({
|
|
|
36194
36194
|
}
|
|
36195
36195
|
opts = Object.create(opts);
|
|
36196
36196
|
opts.headers = headers;
|
|
36197
|
-
var fullPath = !opts.root ? resolve24(
|
|
36197
|
+
var fullPath = !opts.root ? resolve24(path48) : path48;
|
|
36198
36198
|
return this.sendFile(fullPath, opts, done);
|
|
36199
36199
|
};
|
|
36200
36200
|
res.contentType = res.type = function contentType(type) {
|
|
@@ -36496,11 +36496,11 @@ var require_serve_static = __commonJS({
|
|
|
36496
36496
|
}
|
|
36497
36497
|
var forwardError = !fallthrough;
|
|
36498
36498
|
var originalUrl = parseUrl.original(req);
|
|
36499
|
-
var
|
|
36500
|
-
if (
|
|
36501
|
-
|
|
36499
|
+
var path47 = parseUrl(req).pathname;
|
|
36500
|
+
if (path47 === "/" && originalUrl.pathname.substr(-1) !== "/") {
|
|
36501
|
+
path47 = "";
|
|
36502
36502
|
}
|
|
36503
|
-
var stream = send(req,
|
|
36503
|
+
var stream = send(req, path47, opts);
|
|
36504
36504
|
stream.on("directory", onDirectory);
|
|
36505
36505
|
if (setHeaders) {
|
|
36506
36506
|
stream.on("headers", setHeaders);
|
|
@@ -36840,10 +36840,10 @@ function assignProp(target, prop, value) {
|
|
|
36840
36840
|
configurable: true
|
|
36841
36841
|
});
|
|
36842
36842
|
}
|
|
36843
|
-
function getElementAtPath(obj,
|
|
36844
|
-
if (!
|
|
36843
|
+
function getElementAtPath(obj, path47) {
|
|
36844
|
+
if (!path47)
|
|
36845
36845
|
return obj;
|
|
36846
|
-
return
|
|
36846
|
+
return path47.reduce((acc, key2) => acc?.[key2], obj);
|
|
36847
36847
|
}
|
|
36848
36848
|
function promiseAllObject(promisesObj) {
|
|
36849
36849
|
const keys2 = Object.keys(promisesObj);
|
|
@@ -37092,11 +37092,11 @@ function aborted(x, startIndex = 0) {
|
|
|
37092
37092
|
}
|
|
37093
37093
|
return false;
|
|
37094
37094
|
}
|
|
37095
|
-
function prefixIssues(
|
|
37095
|
+
function prefixIssues(path47, issues) {
|
|
37096
37096
|
return issues.map((iss) => {
|
|
37097
37097
|
var _a2;
|
|
37098
37098
|
(_a2 = iss).path ?? (_a2.path = []);
|
|
37099
|
-
iss.path.unshift(
|
|
37099
|
+
iss.path.unshift(path47);
|
|
37100
37100
|
return iss;
|
|
37101
37101
|
});
|
|
37102
37102
|
}
|
|
@@ -46942,8 +46942,8 @@ var require_utils3 = __commonJS({
|
|
|
46942
46942
|
}
|
|
46943
46943
|
return ind;
|
|
46944
46944
|
}
|
|
46945
|
-
function removeDotSegments(
|
|
46946
|
-
let input =
|
|
46945
|
+
function removeDotSegments(path47) {
|
|
46946
|
+
let input = path47;
|
|
46947
46947
|
const output = [];
|
|
46948
46948
|
let nextSlash = -1;
|
|
46949
46949
|
let len = 0;
|
|
@@ -47196,8 +47196,8 @@ var require_schemes = __commonJS({
|
|
|
47196
47196
|
wsComponent.secure = void 0;
|
|
47197
47197
|
}
|
|
47198
47198
|
if (wsComponent.resourceName) {
|
|
47199
|
-
const [
|
|
47200
|
-
wsComponent.path =
|
|
47199
|
+
const [path47, query] = wsComponent.resourceName.split("?");
|
|
47200
|
+
wsComponent.path = path47 && path47 !== "/" ? path47 : void 0;
|
|
47201
47201
|
wsComponent.query = query;
|
|
47202
47202
|
wsComponent.resourceName = void 0;
|
|
47203
47203
|
}
|
|
@@ -50636,12 +50636,12 @@ var require_dist4 = __commonJS({
|
|
|
50636
50636
|
throw new Error(`Unknown format "${name2}"`);
|
|
50637
50637
|
return f;
|
|
50638
50638
|
};
|
|
50639
|
-
function addFormats(ajv, list4,
|
|
50639
|
+
function addFormats(ajv, list4, fs43, exportName) {
|
|
50640
50640
|
var _a2;
|
|
50641
50641
|
var _b;
|
|
50642
50642
|
(_a2 = (_b = ajv.opts.code).formats) !== null && _a2 !== void 0 ? _a2 : _b.formats = (0, codegen_1._)`require("ajv-formats/dist/formats").${exportName}`;
|
|
50643
50643
|
for (const f of list4)
|
|
50644
|
-
ajv.addFormat(f,
|
|
50644
|
+
ajv.addFormat(f, fs43[f]);
|
|
50645
50645
|
}
|
|
50646
50646
|
module2.exports = exports2 = formatsPlugin;
|
|
50647
50647
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -51472,8 +51472,8 @@ var require_windows = __commonJS({
|
|
|
51472
51472
|
init_cjs_shims();
|
|
51473
51473
|
module2.exports = isexe;
|
|
51474
51474
|
isexe.sync = sync;
|
|
51475
|
-
var
|
|
51476
|
-
function checkPathExt(
|
|
51475
|
+
var fs43 = require("fs");
|
|
51476
|
+
function checkPathExt(path47, options) {
|
|
51477
51477
|
var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
|
|
51478
51478
|
if (!pathext) {
|
|
51479
51479
|
return true;
|
|
@@ -51484,25 +51484,25 @@ var require_windows = __commonJS({
|
|
|
51484
51484
|
}
|
|
51485
51485
|
for (var i = 0; i < pathext.length; i++) {
|
|
51486
51486
|
var p2 = pathext[i].toLowerCase();
|
|
51487
|
-
if (p2 &&
|
|
51487
|
+
if (p2 && path47.substr(-p2.length).toLowerCase() === p2) {
|
|
51488
51488
|
return true;
|
|
51489
51489
|
}
|
|
51490
51490
|
}
|
|
51491
51491
|
return false;
|
|
51492
51492
|
}
|
|
51493
|
-
function checkStat(stat3,
|
|
51493
|
+
function checkStat(stat3, path47, options) {
|
|
51494
51494
|
if (!stat3.isSymbolicLink() && !stat3.isFile()) {
|
|
51495
51495
|
return false;
|
|
51496
51496
|
}
|
|
51497
|
-
return checkPathExt(
|
|
51497
|
+
return checkPathExt(path47, options);
|
|
51498
51498
|
}
|
|
51499
|
-
function isexe(
|
|
51500
|
-
|
|
51501
|
-
cb(er, er ? false : checkStat(stat3,
|
|
51499
|
+
function isexe(path47, options, cb) {
|
|
51500
|
+
fs43.stat(path47, function(er, stat3) {
|
|
51501
|
+
cb(er, er ? false : checkStat(stat3, path47, options));
|
|
51502
51502
|
});
|
|
51503
51503
|
}
|
|
51504
|
-
function sync(
|
|
51505
|
-
return checkStat(
|
|
51504
|
+
function sync(path47, options) {
|
|
51505
|
+
return checkStat(fs43.statSync(path47), path47, options);
|
|
51506
51506
|
}
|
|
51507
51507
|
}
|
|
51508
51508
|
});
|
|
@@ -51514,14 +51514,14 @@ var require_mode = __commonJS({
|
|
|
51514
51514
|
init_cjs_shims();
|
|
51515
51515
|
module2.exports = isexe;
|
|
51516
51516
|
isexe.sync = sync;
|
|
51517
|
-
var
|
|
51518
|
-
function isexe(
|
|
51519
|
-
|
|
51517
|
+
var fs43 = require("fs");
|
|
51518
|
+
function isexe(path47, options, cb) {
|
|
51519
|
+
fs43.stat(path47, function(er, stat3) {
|
|
51520
51520
|
cb(er, er ? false : checkStat(stat3, options));
|
|
51521
51521
|
});
|
|
51522
51522
|
}
|
|
51523
|
-
function sync(
|
|
51524
|
-
return checkStat(
|
|
51523
|
+
function sync(path47, options) {
|
|
51524
|
+
return checkStat(fs43.statSync(path47), options);
|
|
51525
51525
|
}
|
|
51526
51526
|
function checkStat(stat3, options) {
|
|
51527
51527
|
return stat3.isFile() && checkMode(stat3, options);
|
|
@@ -51547,7 +51547,7 @@ var require_isexe = __commonJS({
|
|
|
51547
51547
|
"../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js"(exports2, module2) {
|
|
51548
51548
|
"use strict";
|
|
51549
51549
|
init_cjs_shims();
|
|
51550
|
-
var
|
|
51550
|
+
var fs43 = require("fs");
|
|
51551
51551
|
var core2;
|
|
51552
51552
|
if (process.platform === "win32" || global.TESTING_WINDOWS) {
|
|
51553
51553
|
core2 = require_windows();
|
|
@@ -51556,7 +51556,7 @@ var require_isexe = __commonJS({
|
|
|
51556
51556
|
}
|
|
51557
51557
|
module2.exports = isexe;
|
|
51558
51558
|
isexe.sync = sync;
|
|
51559
|
-
function isexe(
|
|
51559
|
+
function isexe(path47, options, cb) {
|
|
51560
51560
|
if (typeof options === "function") {
|
|
51561
51561
|
cb = options;
|
|
51562
51562
|
options = {};
|
|
@@ -51566,7 +51566,7 @@ var require_isexe = __commonJS({
|
|
|
51566
51566
|
throw new TypeError("callback not provided");
|
|
51567
51567
|
}
|
|
51568
51568
|
return new Promise(function(resolve24, reject) {
|
|
51569
|
-
isexe(
|
|
51569
|
+
isexe(path47, options || {}, function(er, is2) {
|
|
51570
51570
|
if (er) {
|
|
51571
51571
|
reject(er);
|
|
51572
51572
|
} else {
|
|
@@ -51575,7 +51575,7 @@ var require_isexe = __commonJS({
|
|
|
51575
51575
|
});
|
|
51576
51576
|
});
|
|
51577
51577
|
}
|
|
51578
|
-
core2(
|
|
51578
|
+
core2(path47, options || {}, function(er, is2) {
|
|
51579
51579
|
if (er) {
|
|
51580
51580
|
if (er.code === "EACCES" || options && options.ignoreErrors) {
|
|
51581
51581
|
er = null;
|
|
@@ -51585,9 +51585,9 @@ var require_isexe = __commonJS({
|
|
|
51585
51585
|
cb(er, is2);
|
|
51586
51586
|
});
|
|
51587
51587
|
}
|
|
51588
|
-
function sync(
|
|
51588
|
+
function sync(path47, options) {
|
|
51589
51589
|
try {
|
|
51590
|
-
return core2.sync(
|
|
51590
|
+
return core2.sync(path47, options || {});
|
|
51591
51591
|
} catch (er) {
|
|
51592
51592
|
if (options && options.ignoreErrors || er.code === "EACCES") {
|
|
51593
51593
|
return false;
|
|
@@ -51605,7 +51605,7 @@ var require_which = __commonJS({
|
|
|
51605
51605
|
"use strict";
|
|
51606
51606
|
init_cjs_shims();
|
|
51607
51607
|
var isWindows3 = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
|
|
51608
|
-
var
|
|
51608
|
+
var path47 = require("path");
|
|
51609
51609
|
var COLON = isWindows3 ? ";" : ":";
|
|
51610
51610
|
var isexe = require_isexe();
|
|
51611
51611
|
var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
@@ -51643,7 +51643,7 @@ var require_which = __commonJS({
|
|
|
51643
51643
|
return opt.all && found.length ? resolve24(found) : reject(getNotFoundError(cmd));
|
|
51644
51644
|
const ppRaw = pathEnv[i];
|
|
51645
51645
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
51646
|
-
const pCmd =
|
|
51646
|
+
const pCmd = path47.join(pathPart, cmd);
|
|
51647
51647
|
const p2 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
51648
51648
|
resolve24(subStep(p2, i, 0));
|
|
51649
51649
|
});
|
|
@@ -51670,7 +51670,7 @@ var require_which = __commonJS({
|
|
|
51670
51670
|
for (let i = 0; i < pathEnv.length; i++) {
|
|
51671
51671
|
const ppRaw = pathEnv[i];
|
|
51672
51672
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
51673
|
-
const pCmd =
|
|
51673
|
+
const pCmd = path47.join(pathPart, cmd);
|
|
51674
51674
|
const p2 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
51675
51675
|
for (let j = 0; j < pathExt.length; j++) {
|
|
51676
51676
|
const cur = p2 + pathExt[j];
|
|
@@ -51720,7 +51720,7 @@ var require_resolveCommand = __commonJS({
|
|
|
51720
51720
|
"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js"(exports2, module2) {
|
|
51721
51721
|
"use strict";
|
|
51722
51722
|
init_cjs_shims();
|
|
51723
|
-
var
|
|
51723
|
+
var path47 = require("path");
|
|
51724
51724
|
var which = require_which();
|
|
51725
51725
|
var getPathKey = require_path_key();
|
|
51726
51726
|
function resolveCommandAttempt(parsed, withoutPathExt) {
|
|
@@ -51738,7 +51738,7 @@ var require_resolveCommand = __commonJS({
|
|
|
51738
51738
|
try {
|
|
51739
51739
|
resolved = which.sync(parsed.command, {
|
|
51740
51740
|
path: env4[getPathKey({ env: env4 })],
|
|
51741
|
-
pathExt: withoutPathExt ?
|
|
51741
|
+
pathExt: withoutPathExt ? path47.delimiter : void 0
|
|
51742
51742
|
});
|
|
51743
51743
|
} catch (e) {
|
|
51744
51744
|
} finally {
|
|
@@ -51747,7 +51747,7 @@ var require_resolveCommand = __commonJS({
|
|
|
51747
51747
|
}
|
|
51748
51748
|
}
|
|
51749
51749
|
if (resolved) {
|
|
51750
|
-
resolved =
|
|
51750
|
+
resolved = path47.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
|
|
51751
51751
|
}
|
|
51752
51752
|
return resolved;
|
|
51753
51753
|
}
|
|
@@ -51804,8 +51804,8 @@ var require_shebang_command = __commonJS({
|
|
|
51804
51804
|
if (!match) {
|
|
51805
51805
|
return null;
|
|
51806
51806
|
}
|
|
51807
|
-
const [
|
|
51808
|
-
const binary =
|
|
51807
|
+
const [path47, argument] = match[0].replace(/#! ?/, "").split(" ");
|
|
51808
|
+
const binary = path47.split("/").pop();
|
|
51809
51809
|
if (binary === "env") {
|
|
51810
51810
|
return argument;
|
|
51811
51811
|
}
|
|
@@ -51819,16 +51819,16 @@ var require_readShebang = __commonJS({
|
|
|
51819
51819
|
"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js"(exports2, module2) {
|
|
51820
51820
|
"use strict";
|
|
51821
51821
|
init_cjs_shims();
|
|
51822
|
-
var
|
|
51822
|
+
var fs43 = require("fs");
|
|
51823
51823
|
var shebangCommand = require_shebang_command();
|
|
51824
51824
|
function readShebang(command) {
|
|
51825
51825
|
const size = 150;
|
|
51826
51826
|
const buffer = Buffer.alloc(size);
|
|
51827
51827
|
let fd;
|
|
51828
51828
|
try {
|
|
51829
|
-
fd =
|
|
51830
|
-
|
|
51831
|
-
|
|
51829
|
+
fd = fs43.openSync(command, "r");
|
|
51830
|
+
fs43.readSync(fd, buffer, 0, size, 0);
|
|
51831
|
+
fs43.closeSync(fd);
|
|
51832
51832
|
} catch (e) {
|
|
51833
51833
|
}
|
|
51834
51834
|
return shebangCommand(buffer.toString());
|
|
@@ -51842,7 +51842,7 @@ var require_parse3 = __commonJS({
|
|
|
51842
51842
|
"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js"(exports2, module2) {
|
|
51843
51843
|
"use strict";
|
|
51844
51844
|
init_cjs_shims();
|
|
51845
|
-
var
|
|
51845
|
+
var path47 = require("path");
|
|
51846
51846
|
var resolveCommand = require_resolveCommand();
|
|
51847
51847
|
var escape2 = require_escape();
|
|
51848
51848
|
var readShebang = require_readShebang();
|
|
@@ -51867,7 +51867,7 @@ var require_parse3 = __commonJS({
|
|
|
51867
51867
|
const needsShell = !isExecutableRegExp.test(commandFile);
|
|
51868
51868
|
if (parsed.options.forceShell || needsShell) {
|
|
51869
51869
|
const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
|
|
51870
|
-
parsed.command =
|
|
51870
|
+
parsed.command = path47.normalize(parsed.command);
|
|
51871
51871
|
parsed.command = escape2.command(parsed.command);
|
|
51872
51872
|
parsed.args = parsed.args.map((arg) => escape2.argument(arg, needsDoubleEscapeMetaChars));
|
|
51873
51873
|
const shellCommand = [parsed.command].concat(parsed.args).join(" ");
|
|
@@ -57936,9 +57936,9 @@ __export(getMachineId_linux_exports, {
|
|
|
57936
57936
|
});
|
|
57937
57937
|
async function getMachineId2() {
|
|
57938
57938
|
const paths = ["/etc/machine-id", "/var/lib/dbus/machine-id"];
|
|
57939
|
-
for (const
|
|
57939
|
+
for (const path47 of paths) {
|
|
57940
57940
|
try {
|
|
57941
|
-
const result = await import_fs.promises.readFile(
|
|
57941
|
+
const result = await import_fs.promises.readFile(path47, { encoding: "utf8" });
|
|
57942
57942
|
return result.trim();
|
|
57943
57943
|
} catch (e) {
|
|
57944
57944
|
diag2.debug(`error reading machine id: ${e}`);
|
|
@@ -65395,19 +65395,19 @@ var require_module_details_from_path = __commonJS({
|
|
|
65395
65395
|
basedir += segments[i] + sep11;
|
|
65396
65396
|
}
|
|
65397
65397
|
}
|
|
65398
|
-
var
|
|
65398
|
+
var path47 = "";
|
|
65399
65399
|
var lastSegmentIndex = segments.length - 1;
|
|
65400
65400
|
for (var i2 = index2 + offset; i2 <= lastSegmentIndex; i2++) {
|
|
65401
65401
|
if (i2 === lastSegmentIndex) {
|
|
65402
|
-
|
|
65402
|
+
path47 += segments[i2];
|
|
65403
65403
|
} else {
|
|
65404
|
-
|
|
65404
|
+
path47 += segments[i2] + sep11;
|
|
65405
65405
|
}
|
|
65406
65406
|
}
|
|
65407
65407
|
return {
|
|
65408
65408
|
name: name2,
|
|
65409
65409
|
basedir,
|
|
65410
|
-
path:
|
|
65410
|
+
path: path47
|
|
65411
65411
|
};
|
|
65412
65412
|
};
|
|
65413
65413
|
}
|
|
@@ -65418,7 +65418,7 @@ var require_require_in_the_middle = __commonJS({
|
|
|
65418
65418
|
"../../node_modules/.pnpm/require-in-the-middle@8.0.1/node_modules/require-in-the-middle/index.js"(exports2, module2) {
|
|
65419
65419
|
"use strict";
|
|
65420
65420
|
init_cjs_shims();
|
|
65421
|
-
var
|
|
65421
|
+
var path47 = require("path");
|
|
65422
65422
|
var Module = require("module");
|
|
65423
65423
|
var debug = require_src()("require-in-the-middle");
|
|
65424
65424
|
var moduleDetailsFromPath = require_module_details_from_path();
|
|
@@ -65563,7 +65563,7 @@ var require_require_in_the_middle = __commonJS({
|
|
|
65563
65563
|
}
|
|
65564
65564
|
moduleName = filename;
|
|
65565
65565
|
} else if (hasWhitelist === true && modules.includes(filename)) {
|
|
65566
|
-
const parsedPath =
|
|
65566
|
+
const parsedPath = path47.parse(filename);
|
|
65567
65567
|
moduleName = parsedPath.name;
|
|
65568
65568
|
basedir = parsedPath.dir;
|
|
65569
65569
|
} else {
|
|
@@ -65601,7 +65601,7 @@ var require_require_in_the_middle = __commonJS({
|
|
|
65601
65601
|
}
|
|
65602
65602
|
if (res !== filename) {
|
|
65603
65603
|
if (internals === true) {
|
|
65604
|
-
moduleName = moduleName +
|
|
65604
|
+
moduleName = moduleName + path47.sep + path47.relative(basedir, filename);
|
|
65605
65605
|
debug("preparing to process require of internal file: %s", moduleName);
|
|
65606
65606
|
} else {
|
|
65607
65607
|
debug("ignoring require of non-main module file: %s", res);
|
|
@@ -65637,8 +65637,8 @@ var require_require_in_the_middle = __commonJS({
|
|
|
65637
65637
|
}
|
|
65638
65638
|
};
|
|
65639
65639
|
function resolveModuleName(stat3) {
|
|
65640
|
-
const normalizedPath =
|
|
65641
|
-
return
|
|
65640
|
+
const normalizedPath = path47.sep !== "/" ? stat3.path.split(path47.sep).join("/") : stat3.path;
|
|
65641
|
+
return path47.posix.join(stat3.name, normalizedPath).replace(normalize8, "");
|
|
65642
65642
|
}
|
|
65643
65643
|
}
|
|
65644
65644
|
});
|
|
@@ -65717,15 +65717,15 @@ var init_ModuleNameTrie = __esm({
|
|
|
65717
65717
|
|
|
65718
65718
|
// ../../node_modules/.pnpm/@opentelemetry+instrumentation@0.218.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/instrumentation/build/esm/platform/node/RequireInTheMiddleSingleton.js
|
|
65719
65719
|
function normalizePathSeparators(moduleNameOrPath) {
|
|
65720
|
-
return
|
|
65720
|
+
return path37.sep !== ModuleNameSeparator ? moduleNameOrPath.split(path37.sep).join(ModuleNameSeparator) : moduleNameOrPath;
|
|
65721
65721
|
}
|
|
65722
|
-
var import_require_in_the_middle,
|
|
65722
|
+
var import_require_in_the_middle, path37, isMocha, RequireInTheMiddleSingleton;
|
|
65723
65723
|
var init_RequireInTheMiddleSingleton = __esm({
|
|
65724
65724
|
"../../node_modules/.pnpm/@opentelemetry+instrumentation@0.218.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/instrumentation/build/esm/platform/node/RequireInTheMiddleSingleton.js"() {
|
|
65725
65725
|
"use strict";
|
|
65726
65726
|
init_cjs_shims();
|
|
65727
65727
|
import_require_in_the_middle = __toESM(require_require_in_the_middle());
|
|
65728
|
-
|
|
65728
|
+
path37 = __toESM(require("path"));
|
|
65729
65729
|
init_ModuleNameTrie();
|
|
65730
65730
|
isMocha = [
|
|
65731
65731
|
"afterEach",
|
|
@@ -65850,7 +65850,7 @@ var require_import_in_the_middle = __commonJS({
|
|
|
65850
65850
|
"../../node_modules/.pnpm/import-in-the-middle@3.0.2/node_modules/import-in-the-middle/index.js"(exports2, module2) {
|
|
65851
65851
|
"use strict";
|
|
65852
65852
|
init_cjs_shims();
|
|
65853
|
-
var
|
|
65853
|
+
var path47 = require("path");
|
|
65854
65854
|
var moduleDetailsFromPath = require_module_details_from_path();
|
|
65855
65855
|
var { fileURLToPath: fileURLToPath3 } = require("url");
|
|
65856
65856
|
var { MessageChannel } = require("worker_threads");
|
|
@@ -65969,7 +65969,7 @@ var require_import_in_the_middle = __commonJS({
|
|
|
65969
65969
|
} else if (baseDir.endsWith(specifiers.get(loadUrl)) || isTurbopackSpecifier(specifiers.get(loadUrl), baseDir)) {
|
|
65970
65970
|
callHookFn(hookFn, namespace, name2, baseDir);
|
|
65971
65971
|
} else if (internals) {
|
|
65972
|
-
const internalPath = name2 +
|
|
65972
|
+
const internalPath = name2 + path47.sep + path47.relative(baseDir, filePath);
|
|
65973
65973
|
callHookFn(hookFn, namespace, internalPath, baseDir);
|
|
65974
65974
|
}
|
|
65975
65975
|
} else if (matchArg === specifier) {
|
|
@@ -66043,12 +66043,12 @@ function isSupported(supportedVersions, version3, includePrerelease) {
|
|
|
66043
66043
|
return satisfies(version3, supportedVersion, { includePrerelease });
|
|
66044
66044
|
});
|
|
66045
66045
|
}
|
|
66046
|
-
var
|
|
66046
|
+
var path38, import_util10, import_import_in_the_middle, import_require_in_the_middle2, import_fs3, InstrumentationBase;
|
|
66047
66047
|
var init_instrumentation2 = __esm({
|
|
66048
66048
|
"../../node_modules/.pnpm/@opentelemetry+instrumentation@0.218.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/instrumentation/build/esm/platform/node/instrumentation.js"() {
|
|
66049
66049
|
"use strict";
|
|
66050
66050
|
init_cjs_shims();
|
|
66051
|
-
|
|
66051
|
+
path38 = __toESM(require("path"));
|
|
66052
66052
|
import_util10 = require("util");
|
|
66053
66053
|
init_semver2();
|
|
66054
66054
|
init_shimmer();
|
|
@@ -66149,7 +66149,7 @@ var init_instrumentation2 = __esm({
|
|
|
66149
66149
|
}
|
|
66150
66150
|
_extractPackageVersion(baseDir) {
|
|
66151
66151
|
try {
|
|
66152
|
-
const json = (0, import_fs3.readFileSync)(
|
|
66152
|
+
const json = (0, import_fs3.readFileSync)(path38.join(baseDir, "package.json"), {
|
|
66153
66153
|
encoding: "utf8"
|
|
66154
66154
|
});
|
|
66155
66155
|
const version3 = JSON.parse(json).version;
|
|
@@ -66191,7 +66191,7 @@ var init_instrumentation2 = __esm({
|
|
|
66191
66191
|
return exports2;
|
|
66192
66192
|
}
|
|
66193
66193
|
const files = module2.files ?? [];
|
|
66194
|
-
const normalizedName =
|
|
66194
|
+
const normalizedName = path38.normalize(name2);
|
|
66195
66195
|
const supportedFileInstrumentations = files.filter((f) => f.name === normalizedName && isSupported(f.supportedVersions, version3, module2.includePrerelease));
|
|
66196
66196
|
return supportedFileInstrumentations.reduce((patchedExports, file) => {
|
|
66197
66197
|
file.moduleExports = patchedExports;
|
|
@@ -66237,8 +66237,8 @@ var init_instrumentation2 = __esm({
|
|
|
66237
66237
|
this._warnOnPreloadedModules();
|
|
66238
66238
|
for (const module2 of this._modules) {
|
|
66239
66239
|
const hookFn = (exports2, name2, baseDir) => {
|
|
66240
|
-
if (!baseDir &&
|
|
66241
|
-
const parsedPath =
|
|
66240
|
+
if (!baseDir && path38.isAbsolute(name2)) {
|
|
66241
|
+
const parsedPath = path38.parse(name2);
|
|
66242
66242
|
name2 = parsedPath.name;
|
|
66243
66243
|
baseDir = parsedPath.dir;
|
|
66244
66244
|
}
|
|
@@ -66247,7 +66247,7 @@ var init_instrumentation2 = __esm({
|
|
|
66247
66247
|
const onRequire = (exports2, name2, baseDir) => {
|
|
66248
66248
|
return this._onRequire(module2, exports2, name2, baseDir);
|
|
66249
66249
|
};
|
|
66250
|
-
const hook =
|
|
66250
|
+
const hook = path38.isAbsolute(module2.name) ? new import_require_in_the_middle2.Hook([module2.name], { internals: true }, onRequire) : this._requireInTheMiddleSingleton.register(module2.name, onRequire);
|
|
66251
66251
|
this._hooks.push(hook);
|
|
66252
66252
|
const esmHook = new import_import_in_the_middle.Hook([module2.name], { internals: true }, hookFn);
|
|
66253
66253
|
this._hooks.push(esmHook);
|
|
@@ -68729,7 +68729,7 @@ var init_util4 = __esm({
|
|
|
68729
68729
|
});
|
|
68730
68730
|
|
|
68731
68731
|
// ../../node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.218.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/otlp-exporter-base/build/esm/configuration/otlp-http-configuration.js
|
|
68732
|
-
function
|
|
68732
|
+
function mergeHeaders(userProvidedHeaders, fallbackHeaders, defaultHeaders) {
|
|
68733
68733
|
return async () => {
|
|
68734
68734
|
const requiredHeaders = {
|
|
68735
68735
|
...await defaultHeaders()
|
|
@@ -68758,7 +68758,7 @@ function validateUserProvidedUrl(url3) {
|
|
|
68758
68758
|
function mergeOtlpHttpConfigurationWithDefaults(userProvidedConfiguration, fallbackConfiguration, defaultConfiguration) {
|
|
68759
68759
|
return {
|
|
68760
68760
|
...mergeOtlpSharedConfigurationWithDefaults(userProvidedConfiguration, fallbackConfiguration, defaultConfiguration),
|
|
68761
|
-
headers:
|
|
68761
|
+
headers: mergeHeaders(userProvidedConfiguration.headers, fallbackConfiguration.headers, defaultConfiguration.headers),
|
|
68762
68762
|
url: validateUserProvidedUrl(userProvidedConfiguration.url) ?? fallbackConfiguration.url ?? defaultConfiguration.url
|
|
68763
68763
|
};
|
|
68764
68764
|
}
|
|
@@ -69178,7 +69178,7 @@ function appendRootPathToUrlIfNeeded(url3) {
|
|
|
69178
69178
|
return void 0;
|
|
69179
69179
|
}
|
|
69180
69180
|
}
|
|
69181
|
-
function appendResourcePathToUrl(url3,
|
|
69181
|
+
function appendResourcePathToUrl(url3, path47) {
|
|
69182
69182
|
try {
|
|
69183
69183
|
new URL(url3);
|
|
69184
69184
|
} catch {
|
|
@@ -69188,11 +69188,11 @@ function appendResourcePathToUrl(url3, path46) {
|
|
|
69188
69188
|
if (!url3.endsWith("/")) {
|
|
69189
69189
|
url3 = url3 + "/";
|
|
69190
69190
|
}
|
|
69191
|
-
url3 +=
|
|
69191
|
+
url3 += path47;
|
|
69192
69192
|
try {
|
|
69193
69193
|
new URL(url3);
|
|
69194
69194
|
} catch {
|
|
69195
|
-
diag2.warn(`Configuration: Provided URL appended with '${
|
|
69195
|
+
diag2.warn(`Configuration: Provided URL appended with '${path47}' is not a valid URL, using 'undefined' instead of '${url3}'`);
|
|
69196
69196
|
return void 0;
|
|
69197
69197
|
}
|
|
69198
69198
|
return url3;
|
|
@@ -69217,7 +69217,7 @@ function readFileFromEnv(signalSpecificEnvVar, nonSignalSpecificEnvVar, warningM
|
|
|
69217
69217
|
const filePath = signalSpecificPath ?? nonSignalSpecificPath;
|
|
69218
69218
|
if (filePath != null) {
|
|
69219
69219
|
try {
|
|
69220
|
-
return
|
|
69220
|
+
return fs36.readFileSync(path39.resolve(process.cwd(), filePath));
|
|
69221
69221
|
} catch {
|
|
69222
69222
|
diag2.warn(warningMessage);
|
|
69223
69223
|
return void 0;
|
|
@@ -69248,13 +69248,13 @@ function getNodeHttpConfigurationFromEnvironment(signalIdentifier, signalResourc
|
|
|
69248
69248
|
})
|
|
69249
69249
|
};
|
|
69250
69250
|
}
|
|
69251
|
-
var
|
|
69251
|
+
var fs36, path39;
|
|
69252
69252
|
var init_otlp_node_http_env_configuration = __esm({
|
|
69253
69253
|
"../../node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.218.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/otlp-exporter-base/build/esm/configuration/otlp-node-http-env-configuration.js"() {
|
|
69254
69254
|
"use strict";
|
|
69255
69255
|
init_cjs_shims();
|
|
69256
|
-
|
|
69257
|
-
|
|
69256
|
+
fs36 = __toESM(require("fs"));
|
|
69257
|
+
path39 = __toESM(require("path"));
|
|
69258
69258
|
init_esm11();
|
|
69259
69259
|
init_esm8();
|
|
69260
69260
|
init_shared_env_configuration();
|
|
@@ -69649,9 +69649,9 @@ var require_error = __commonJS({
|
|
|
69649
69649
|
"use strict";
|
|
69650
69650
|
init_cjs_shims();
|
|
69651
69651
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
69652
|
-
exports2.getErrorMessage =
|
|
69652
|
+
exports2.getErrorMessage = getErrorMessage3;
|
|
69653
69653
|
exports2.getErrorCode = getErrorCode;
|
|
69654
|
-
function
|
|
69654
|
+
function getErrorMessage3(error2) {
|
|
69655
69655
|
if (error2 instanceof Error) {
|
|
69656
69656
|
return error2.message;
|
|
69657
69657
|
} else {
|
|
@@ -70055,14 +70055,14 @@ var require_tls_helpers = __commonJS({
|
|
|
70055
70055
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
70056
70056
|
exports2.CIPHER_SUITES = void 0;
|
|
70057
70057
|
exports2.getDefaultRootsData = getDefaultRootsData;
|
|
70058
|
-
var
|
|
70058
|
+
var fs43 = require("fs");
|
|
70059
70059
|
exports2.CIPHER_SUITES = process.env.GRPC_SSL_CIPHER_SUITES;
|
|
70060
70060
|
var DEFAULT_ROOTS_FILE_PATH = process.env.GRPC_DEFAULT_SSL_ROOTS_FILE_PATH;
|
|
70061
70061
|
var defaultRootsData = null;
|
|
70062
70062
|
function getDefaultRootsData() {
|
|
70063
70063
|
if (DEFAULT_ROOTS_FILE_PATH) {
|
|
70064
70064
|
if (defaultRootsData === null) {
|
|
70065
|
-
defaultRootsData =
|
|
70065
|
+
defaultRootsData = fs43.readFileSync(DEFAULT_ROOTS_FILE_PATH);
|
|
70066
70066
|
}
|
|
70067
70067
|
return defaultRootsData;
|
|
70068
70068
|
}
|
|
@@ -70094,19 +70094,19 @@ var require_uri_parser = __commonJS({
|
|
|
70094
70094
|
};
|
|
70095
70095
|
}
|
|
70096
70096
|
var NUMBER_REGEX = /^\d+$/;
|
|
70097
|
-
function splitHostPort(
|
|
70098
|
-
if (
|
|
70099
|
-
const hostEnd =
|
|
70097
|
+
function splitHostPort(path47) {
|
|
70098
|
+
if (path47.startsWith("[")) {
|
|
70099
|
+
const hostEnd = path47.indexOf("]");
|
|
70100
70100
|
if (hostEnd === -1) {
|
|
70101
70101
|
return null;
|
|
70102
70102
|
}
|
|
70103
|
-
const host =
|
|
70103
|
+
const host = path47.substring(1, hostEnd);
|
|
70104
70104
|
if (host.indexOf(":") === -1) {
|
|
70105
70105
|
return null;
|
|
70106
70106
|
}
|
|
70107
|
-
if (
|
|
70108
|
-
if (
|
|
70109
|
-
const portString =
|
|
70107
|
+
if (path47.length > hostEnd + 1) {
|
|
70108
|
+
if (path47[hostEnd + 1] === ":") {
|
|
70109
|
+
const portString = path47.substring(hostEnd + 2);
|
|
70110
70110
|
if (NUMBER_REGEX.test(portString)) {
|
|
70111
70111
|
return {
|
|
70112
70112
|
host,
|
|
@@ -70124,7 +70124,7 @@ var require_uri_parser = __commonJS({
|
|
|
70124
70124
|
};
|
|
70125
70125
|
}
|
|
70126
70126
|
} else {
|
|
70127
|
-
const splitPath =
|
|
70127
|
+
const splitPath = path47.split(":");
|
|
70128
70128
|
if (splitPath.length === 2) {
|
|
70129
70129
|
if (NUMBER_REGEX.test(splitPath[1])) {
|
|
70130
70130
|
return {
|
|
@@ -70136,7 +70136,7 @@ var require_uri_parser = __commonJS({
|
|
|
70136
70136
|
}
|
|
70137
70137
|
} else {
|
|
70138
70138
|
return {
|
|
70139
|
-
host:
|
|
70139
|
+
host: path47
|
|
70140
70140
|
};
|
|
70141
70141
|
}
|
|
70142
70142
|
}
|
|
@@ -73321,14 +73321,14 @@ var require_client_interceptors = __commonJS({
|
|
|
73321
73321
|
}
|
|
73322
73322
|
};
|
|
73323
73323
|
exports2.InterceptingCall = InterceptingCall;
|
|
73324
|
-
function getCall(channel,
|
|
73324
|
+
function getCall(channel, path47, options) {
|
|
73325
73325
|
var _a2, _b;
|
|
73326
73326
|
const deadline = (_a2 = options.deadline) !== null && _a2 !== void 0 ? _a2 : Infinity;
|
|
73327
73327
|
const host = options.host;
|
|
73328
73328
|
const parent = (_b = options.parent) !== null && _b !== void 0 ? _b : null;
|
|
73329
73329
|
const propagateFlags = options.propagate_flags;
|
|
73330
73330
|
const credentials = options.credentials;
|
|
73331
|
-
const call = channel.createCall(
|
|
73331
|
+
const call = channel.createCall(path47, deadline, host, parent, propagateFlags);
|
|
73332
73332
|
if (credentials) {
|
|
73333
73333
|
call.setCredentials(credentials);
|
|
73334
73334
|
}
|
|
@@ -73900,9 +73900,9 @@ var require_make_client = __commonJS({
|
|
|
73900
73900
|
ServiceClientImpl.serviceName = serviceName3;
|
|
73901
73901
|
return ServiceClientImpl;
|
|
73902
73902
|
}
|
|
73903
|
-
function partial2(fn,
|
|
73903
|
+
function partial2(fn, path47, serialize4, deserialize2) {
|
|
73904
73904
|
return function(...args) {
|
|
73905
|
-
return fn.call(this,
|
|
73905
|
+
return fn.call(this, path47, serialize4, deserialize2, ...args);
|
|
73906
73906
|
};
|
|
73907
73907
|
}
|
|
73908
73908
|
function isProtobufTypeDefinition(obj) {
|
|
@@ -76781,17 +76781,17 @@ var require_fs = __commonJS({
|
|
|
76781
76781
|
"../../node_modules/.pnpm/@protobufjs+fetch@1.1.1/node_modules/@protobufjs/fetch/util/fs.js"(exports2, module2) {
|
|
76782
76782
|
"use strict";
|
|
76783
76783
|
init_cjs_shims();
|
|
76784
|
-
var
|
|
76784
|
+
var fs43 = null;
|
|
76785
76785
|
try {
|
|
76786
|
-
|
|
76786
|
+
fs43 = require(
|
|
76787
76787
|
/* webpackIgnore: true */
|
|
76788
76788
|
"fs"
|
|
76789
76789
|
);
|
|
76790
|
-
if (!
|
|
76791
|
-
|
|
76790
|
+
if (!fs43 || !fs43.readFile || !fs43.readFileSync)
|
|
76791
|
+
fs43 = null;
|
|
76792
76792
|
} catch (e) {
|
|
76793
76793
|
}
|
|
76794
|
-
module2.exports =
|
|
76794
|
+
module2.exports = fs43;
|
|
76795
76795
|
}
|
|
76796
76796
|
});
|
|
76797
76797
|
|
|
@@ -76802,7 +76802,7 @@ var require_fetch = __commonJS({
|
|
|
76802
76802
|
init_cjs_shims();
|
|
76803
76803
|
module2.exports = fetch2;
|
|
76804
76804
|
var asPromise = require_aspromise();
|
|
76805
|
-
var
|
|
76805
|
+
var fs43 = require_fs();
|
|
76806
76806
|
function fetch2(filename, options, callback) {
|
|
76807
76807
|
if (typeof options === "function") {
|
|
76808
76808
|
callback = options;
|
|
@@ -76811,8 +76811,8 @@ var require_fetch = __commonJS({
|
|
|
76811
76811
|
options = {};
|
|
76812
76812
|
if (!callback)
|
|
76813
76813
|
return asPromise(fetch2, this, filename, options);
|
|
76814
|
-
if (!options.xhr &&
|
|
76815
|
-
return
|
|
76814
|
+
if (!options.xhr && fs43 && fs43.readFile)
|
|
76815
|
+
return fs43.readFile(filename, function fetchReadFileCallback(err, contents) {
|
|
76816
76816
|
return err && typeof XMLHttpRequest !== "undefined" ? fetch2.xhr(filename, options, callback) : err ? callback(err) : callback(null, options.binary ? contents : contents.toString("utf8"));
|
|
76817
76817
|
});
|
|
76818
76818
|
return fetch2.xhr(filename, options, callback);
|
|
@@ -76851,15 +76851,15 @@ var require_path = __commonJS({
|
|
|
76851
76851
|
"../../node_modules/.pnpm/@protobufjs+path@1.1.2/node_modules/@protobufjs/path/index.js"(exports2) {
|
|
76852
76852
|
"use strict";
|
|
76853
76853
|
init_cjs_shims();
|
|
76854
|
-
var
|
|
76854
|
+
var path47 = exports2;
|
|
76855
76855
|
var isAbsolute13 = (
|
|
76856
76856
|
/**
|
|
76857
76857
|
* Tests if the specified path is absolute.
|
|
76858
76858
|
* @param {string} path Path to test
|
|
76859
76859
|
* @returns {boolean} `true` if path is absolute
|
|
76860
76860
|
*/
|
|
76861
|
-
|
|
76862
|
-
return /^(?:\/|\w+:)/.test(
|
|
76861
|
+
path47.isAbsolute = function isAbsolute14(path48) {
|
|
76862
|
+
return /^(?:\/|\w+:)/.test(path48);
|
|
76863
76863
|
}
|
|
76864
76864
|
);
|
|
76865
76865
|
var normalize8 = (
|
|
@@ -76868,9 +76868,9 @@ var require_path = __commonJS({
|
|
|
76868
76868
|
* @param {string} path Path to normalize
|
|
76869
76869
|
* @returns {string} Normalized path
|
|
76870
76870
|
*/
|
|
76871
|
-
|
|
76872
|
-
|
|
76873
|
-
var parts =
|
|
76871
|
+
path47.normalize = function normalize9(path48) {
|
|
76872
|
+
path48 = path48.replace(/\\/g, "/").replace(/\/{2,}/g, "/");
|
|
76873
|
+
var parts = path48.split("/"), absolute = isAbsolute13(path48), prefix = "";
|
|
76874
76874
|
if (absolute)
|
|
76875
76875
|
prefix = parts.shift() + "/";
|
|
76876
76876
|
for (var i = 0; i < parts.length; ) {
|
|
@@ -76889,7 +76889,7 @@ var require_path = __commonJS({
|
|
|
76889
76889
|
return prefix + parts.join("/");
|
|
76890
76890
|
}
|
|
76891
76891
|
);
|
|
76892
|
-
|
|
76892
|
+
path47.resolve = function resolve24(originPath, includePath, alreadyNormalized) {
|
|
76893
76893
|
if (!alreadyNormalized)
|
|
76894
76894
|
includePath = normalize8(includePath);
|
|
76895
76895
|
if (isAbsolute13(includePath))
|
|
@@ -76918,17 +76918,17 @@ var require_fs2 = __commonJS({
|
|
|
76918
76918
|
"../../node_modules/.pnpm/protobufjs@7.6.4/node_modules/protobufjs/src/util/fs.js"(exports2, module2) {
|
|
76919
76919
|
"use strict";
|
|
76920
76920
|
init_cjs_shims();
|
|
76921
|
-
var
|
|
76921
|
+
var fs43 = null;
|
|
76922
76922
|
try {
|
|
76923
|
-
|
|
76923
|
+
fs43 = require(
|
|
76924
76924
|
/* webpackIgnore: true */
|
|
76925
76925
|
"fs"
|
|
76926
76926
|
);
|
|
76927
|
-
if (!
|
|
76928
|
-
|
|
76927
|
+
if (!fs43 || !fs43.readFile || !fs43.readFileSync)
|
|
76928
|
+
fs43 = null;
|
|
76929
76929
|
} catch (e) {
|
|
76930
76930
|
}
|
|
76931
|
-
module2.exports =
|
|
76931
|
+
module2.exports = fs43;
|
|
76932
76932
|
}
|
|
76933
76933
|
});
|
|
76934
76934
|
|
|
@@ -77076,18 +77076,18 @@ var require_namespace = __commonJS({
|
|
|
77076
77076
|
object3.onRemove(this);
|
|
77077
77077
|
return clearCache(this);
|
|
77078
77078
|
};
|
|
77079
|
-
Namespace.prototype.define = function define2(
|
|
77080
|
-
if (util5.isString(
|
|
77081
|
-
|
|
77082
|
-
else if (!Array.isArray(
|
|
77079
|
+
Namespace.prototype.define = function define2(path47, json) {
|
|
77080
|
+
if (util5.isString(path47))
|
|
77081
|
+
path47 = path47.split(".");
|
|
77082
|
+
else if (!Array.isArray(path47))
|
|
77083
77083
|
throw TypeError("illegal path");
|
|
77084
|
-
if (
|
|
77084
|
+
if (path47 && path47.length && path47[0] === "")
|
|
77085
77085
|
throw Error("path must be relative");
|
|
77086
|
-
if (
|
|
77086
|
+
if (path47.length > util5.recursionLimit)
|
|
77087
77087
|
throw Error("max depth exceeded");
|
|
77088
77088
|
var ptr = this;
|
|
77089
|
-
while (
|
|
77090
|
-
var part =
|
|
77089
|
+
while (path47.length > 0) {
|
|
77090
|
+
var part = path47.shift();
|
|
77091
77091
|
if (ptr.nested && ptr.nested[part]) {
|
|
77092
77092
|
ptr = ptr.nested[part];
|
|
77093
77093
|
if (!(ptr instanceof Namespace))
|
|
@@ -77122,26 +77122,26 @@ var require_namespace = __commonJS({
|
|
|
77122
77122
|
});
|
|
77123
77123
|
return this;
|
|
77124
77124
|
};
|
|
77125
|
-
Namespace.prototype.lookup = function lookup(
|
|
77125
|
+
Namespace.prototype.lookup = function lookup(path47, filterTypes, parentAlreadyChecked) {
|
|
77126
77126
|
if (typeof filterTypes === "boolean") {
|
|
77127
77127
|
parentAlreadyChecked = filterTypes;
|
|
77128
77128
|
filterTypes = void 0;
|
|
77129
77129
|
} else if (filterTypes && !Array.isArray(filterTypes))
|
|
77130
77130
|
filterTypes = [filterTypes];
|
|
77131
|
-
if (util5.isString(
|
|
77132
|
-
if (
|
|
77131
|
+
if (util5.isString(path47) && path47.length) {
|
|
77132
|
+
if (path47 === ".")
|
|
77133
77133
|
return this.root;
|
|
77134
|
-
|
|
77135
|
-
} else if (!
|
|
77134
|
+
path47 = path47.split(".");
|
|
77135
|
+
} else if (!path47.length)
|
|
77136
77136
|
return this;
|
|
77137
|
-
var flatPath =
|
|
77138
|
-
if (
|
|
77139
|
-
return this.root.lookup(
|
|
77137
|
+
var flatPath = path47.join(".");
|
|
77138
|
+
if (path47[0] === "")
|
|
77139
|
+
return this.root.lookup(path47.slice(1), filterTypes);
|
|
77140
77140
|
var found = this.root._fullyQualifiedObjects && this.root._fullyQualifiedObjects["." + flatPath];
|
|
77141
77141
|
if (found && (!filterTypes || filterTypes.indexOf(found.constructor) > -1)) {
|
|
77142
77142
|
return found;
|
|
77143
77143
|
}
|
|
77144
|
-
found = this._lookupImpl(
|
|
77144
|
+
found = this._lookupImpl(path47, flatPath);
|
|
77145
77145
|
if (found && (!filterTypes || filterTypes.indexOf(found.constructor) > -1)) {
|
|
77146
77146
|
return found;
|
|
77147
77147
|
}
|
|
@@ -77149,7 +77149,7 @@ var require_namespace = __commonJS({
|
|
|
77149
77149
|
return null;
|
|
77150
77150
|
var current = this;
|
|
77151
77151
|
while (current.parent) {
|
|
77152
|
-
found = current.parent._lookupImpl(
|
|
77152
|
+
found = current.parent._lookupImpl(path47, flatPath);
|
|
77153
77153
|
if (found && (!filterTypes || filterTypes.indexOf(found.constructor) > -1)) {
|
|
77154
77154
|
return found;
|
|
77155
77155
|
}
|
|
@@ -77157,22 +77157,22 @@ var require_namespace = __commonJS({
|
|
|
77157
77157
|
}
|
|
77158
77158
|
return null;
|
|
77159
77159
|
};
|
|
77160
|
-
Namespace.prototype._lookupImpl = function lookup(
|
|
77160
|
+
Namespace.prototype._lookupImpl = function lookup(path47, flatPath) {
|
|
77161
77161
|
if (Object.prototype.hasOwnProperty.call(this._lookupCache, flatPath)) {
|
|
77162
77162
|
return this._lookupCache[flatPath];
|
|
77163
77163
|
}
|
|
77164
|
-
var found = this.get(
|
|
77164
|
+
var found = this.get(path47[0]);
|
|
77165
77165
|
var exact = null;
|
|
77166
77166
|
if (found) {
|
|
77167
|
-
if (
|
|
77167
|
+
if (path47.length === 1) {
|
|
77168
77168
|
exact = found;
|
|
77169
77169
|
} else if (found instanceof Namespace) {
|
|
77170
|
-
|
|
77171
|
-
exact = found._lookupImpl(
|
|
77170
|
+
path47 = path47.slice(1);
|
|
77171
|
+
exact = found._lookupImpl(path47, path47.join("."));
|
|
77172
77172
|
}
|
|
77173
77173
|
} else {
|
|
77174
77174
|
for (var i = 0; i < this.nestedArray.length; ++i)
|
|
77175
|
-
if (this._nestedArray[i] instanceof Namespace && (found = this._nestedArray[i]._lookupImpl(
|
|
77175
|
+
if (this._nestedArray[i] instanceof Namespace && (found = this._nestedArray[i]._lookupImpl(path47, flatPath))) {
|
|
77176
77176
|
exact = found;
|
|
77177
77177
|
break;
|
|
77178
77178
|
}
|
|
@@ -77180,28 +77180,28 @@ var require_namespace = __commonJS({
|
|
|
77180
77180
|
this._lookupCache[flatPath] = exact;
|
|
77181
77181
|
return exact;
|
|
77182
77182
|
};
|
|
77183
|
-
Namespace.prototype.lookupType = function lookupType(
|
|
77184
|
-
var found = this.lookup(
|
|
77183
|
+
Namespace.prototype.lookupType = function lookupType(path47) {
|
|
77184
|
+
var found = this.lookup(path47, [Type]);
|
|
77185
77185
|
if (!found)
|
|
77186
|
-
throw Error("no such type: " +
|
|
77186
|
+
throw Error("no such type: " + path47);
|
|
77187
77187
|
return found;
|
|
77188
77188
|
};
|
|
77189
|
-
Namespace.prototype.lookupEnum = function lookupEnum(
|
|
77190
|
-
var found = this.lookup(
|
|
77189
|
+
Namespace.prototype.lookupEnum = function lookupEnum(path47) {
|
|
77190
|
+
var found = this.lookup(path47, [Enum]);
|
|
77191
77191
|
if (!found)
|
|
77192
|
-
throw Error("no such Enum '" +
|
|
77192
|
+
throw Error("no such Enum '" + path47 + "' in " + this);
|
|
77193
77193
|
return found;
|
|
77194
77194
|
};
|
|
77195
|
-
Namespace.prototype.lookupTypeOrEnum = function lookupTypeOrEnum(
|
|
77196
|
-
var found = this.lookup(
|
|
77195
|
+
Namespace.prototype.lookupTypeOrEnum = function lookupTypeOrEnum(path47) {
|
|
77196
|
+
var found = this.lookup(path47, [Type, Enum]);
|
|
77197
77197
|
if (!found)
|
|
77198
|
-
throw Error("no such Type or Enum '" +
|
|
77198
|
+
throw Error("no such Type or Enum '" + path47 + "' in " + this);
|
|
77199
77199
|
return found;
|
|
77200
77200
|
};
|
|
77201
|
-
Namespace.prototype.lookupService = function lookupService(
|
|
77202
|
-
var found = this.lookup(
|
|
77201
|
+
Namespace.prototype.lookupService = function lookupService(path47) {
|
|
77202
|
+
var found = this.lookup(path47, [Service]);
|
|
77203
77203
|
if (!found)
|
|
77204
|
-
throw Error("no such Service '" +
|
|
77204
|
+
throw Error("no such Service '" + path47 + "' in " + this);
|
|
77205
77205
|
return found;
|
|
77206
77206
|
};
|
|
77207
77207
|
Namespace._configure = function(Type_, Service_, Enum_) {
|
|
@@ -78624,13 +78624,13 @@ var require_util2 = __commonJS({
|
|
|
78624
78624
|
Object.defineProperty(object3, "$type", { value: enm, enumerable: false });
|
|
78625
78625
|
return enm;
|
|
78626
78626
|
};
|
|
78627
|
-
util5.setProperty = function setProperty(dst,
|
|
78628
|
-
function setProp(dst2,
|
|
78629
|
-
var part =
|
|
78627
|
+
util5.setProperty = function setProperty(dst, path47, value, ifNotSet) {
|
|
78628
|
+
function setProp(dst2, path48, value2) {
|
|
78629
|
+
var part = path48.shift();
|
|
78630
78630
|
if (util5.isUnsafeProperty(part))
|
|
78631
78631
|
return dst2;
|
|
78632
|
-
if (
|
|
78633
|
-
dst2[part] = setProp(dst2[part] || {},
|
|
78632
|
+
if (path48.length > 0) {
|
|
78633
|
+
dst2[part] = setProp(dst2[part] || {}, path48, value2);
|
|
78634
78634
|
} else {
|
|
78635
78635
|
var prevValue = dst2[part];
|
|
78636
78636
|
if (prevValue && ifNotSet)
|
|
@@ -78643,12 +78643,12 @@ var require_util2 = __commonJS({
|
|
|
78643
78643
|
}
|
|
78644
78644
|
if (typeof dst !== "object")
|
|
78645
78645
|
throw TypeError("dst must be an object");
|
|
78646
|
-
if (!
|
|
78646
|
+
if (!path47)
|
|
78647
78647
|
throw TypeError("path must be specified");
|
|
78648
|
-
|
|
78649
|
-
if (
|
|
78648
|
+
path47 = path47.split(".");
|
|
78649
|
+
if (path47.length > util5.recursionLimit)
|
|
78650
78650
|
throw Error("max depth exceeded");
|
|
78651
|
-
return setProp(dst,
|
|
78651
|
+
return setProp(dst, path47, value);
|
|
78652
78652
|
};
|
|
78653
78653
|
Object.defineProperty(util5, "decorateRoot", {
|
|
78654
78654
|
get: function() {
|
|
@@ -79198,12 +79198,12 @@ var require_object = __commonJS({
|
|
|
79198
79198
|
*/
|
|
79199
79199
|
fullName: {
|
|
79200
79200
|
get: function() {
|
|
79201
|
-
var
|
|
79201
|
+
var path47 = [this.name], ptr = this.parent;
|
|
79202
79202
|
while (ptr) {
|
|
79203
|
-
|
|
79203
|
+
path47.unshift(ptr.name);
|
|
79204
79204
|
ptr = ptr.parent;
|
|
79205
79205
|
}
|
|
79206
|
-
return
|
|
79206
|
+
return path47.join(".");
|
|
79207
79207
|
}
|
|
79208
79208
|
}
|
|
79209
79209
|
});
|
|
@@ -83247,19 +83247,19 @@ var require_util3 = __commonJS({
|
|
|
83247
83247
|
init_cjs_shims();
|
|
83248
83248
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
83249
83249
|
exports2.addCommonProtos = exports2.loadProtosWithOptionsSync = exports2.loadProtosWithOptions = void 0;
|
|
83250
|
-
var
|
|
83251
|
-
var
|
|
83250
|
+
var fs43 = require("fs");
|
|
83251
|
+
var path47 = require("path");
|
|
83252
83252
|
var Protobuf = require_protobufjs();
|
|
83253
83253
|
function addIncludePathResolver(root7, includePaths) {
|
|
83254
83254
|
const originalResolvePath = root7.resolvePath;
|
|
83255
83255
|
root7.resolvePath = (origin, target) => {
|
|
83256
|
-
if (
|
|
83256
|
+
if (path47.isAbsolute(target)) {
|
|
83257
83257
|
return target;
|
|
83258
83258
|
}
|
|
83259
83259
|
for (const directory of includePaths) {
|
|
83260
|
-
const fullPath =
|
|
83260
|
+
const fullPath = path47.join(directory, target);
|
|
83261
83261
|
try {
|
|
83262
|
-
|
|
83262
|
+
fs43.accessSync(fullPath, fs43.constants.R_OK);
|
|
83263
83263
|
return fullPath;
|
|
83264
83264
|
} catch (err) {
|
|
83265
83265
|
continue;
|
|
@@ -88639,9 +88639,9 @@ var require_server_call = __commonJS({
|
|
|
88639
88639
|
return status;
|
|
88640
88640
|
}
|
|
88641
88641
|
var ServerUnaryCallImpl = class extends events_1.EventEmitter {
|
|
88642
|
-
constructor(
|
|
88642
|
+
constructor(path47, call, metadata, request2) {
|
|
88643
88643
|
super();
|
|
88644
|
-
this.path =
|
|
88644
|
+
this.path = path47;
|
|
88645
88645
|
this.call = call;
|
|
88646
88646
|
this.metadata = metadata;
|
|
88647
88647
|
this.request = request2;
|
|
@@ -88671,9 +88671,9 @@ var require_server_call = __commonJS({
|
|
|
88671
88671
|
};
|
|
88672
88672
|
exports2.ServerUnaryCallImpl = ServerUnaryCallImpl;
|
|
88673
88673
|
var ServerReadableStreamImpl = class extends stream_1.Readable {
|
|
88674
|
-
constructor(
|
|
88674
|
+
constructor(path47, call, metadata) {
|
|
88675
88675
|
super({ objectMode: true });
|
|
88676
|
-
this.path =
|
|
88676
|
+
this.path = path47;
|
|
88677
88677
|
this.call = call;
|
|
88678
88678
|
this.metadata = metadata;
|
|
88679
88679
|
this.cancelled = false;
|
|
@@ -88705,9 +88705,9 @@ var require_server_call = __commonJS({
|
|
|
88705
88705
|
};
|
|
88706
88706
|
exports2.ServerReadableStreamImpl = ServerReadableStreamImpl;
|
|
88707
88707
|
var ServerWritableStreamImpl = class extends stream_1.Writable {
|
|
88708
|
-
constructor(
|
|
88708
|
+
constructor(path47, call, metadata, request2) {
|
|
88709
88709
|
super({ objectMode: true });
|
|
88710
|
-
this.path =
|
|
88710
|
+
this.path = path47;
|
|
88711
88711
|
this.call = call;
|
|
88712
88712
|
this.metadata = metadata;
|
|
88713
88713
|
this.request = request2;
|
|
@@ -88761,9 +88761,9 @@ var require_server_call = __commonJS({
|
|
|
88761
88761
|
};
|
|
88762
88762
|
exports2.ServerWritableStreamImpl = ServerWritableStreamImpl;
|
|
88763
88763
|
var ServerDuplexStreamImpl = class extends stream_1.Duplex {
|
|
88764
|
-
constructor(
|
|
88764
|
+
constructor(path47, call, metadata) {
|
|
88765
88765
|
super({ objectMode: true });
|
|
88766
|
-
this.path =
|
|
88766
|
+
this.path = path47;
|
|
88767
88767
|
this.call = call;
|
|
88768
88768
|
this.metadata = metadata;
|
|
88769
88769
|
this.pendingStatus = {
|
|
@@ -91048,11 +91048,11 @@ var require_server = __commonJS({
|
|
|
91048
91048
|
}
|
|
91049
91049
|
return true;
|
|
91050
91050
|
}
|
|
91051
|
-
_retrieveHandler(
|
|
91052
|
-
serverCallTrace("Received call to method " +
|
|
91053
|
-
const handler = this.handlers.get(
|
|
91051
|
+
_retrieveHandler(path47) {
|
|
91052
|
+
serverCallTrace("Received call to method " + path47 + " at address " + this.serverAddressString);
|
|
91053
|
+
const handler = this.handlers.get(path47);
|
|
91054
91054
|
if (handler === void 0) {
|
|
91055
|
-
serverCallTrace("No handler registered for method " +
|
|
91055
|
+
serverCallTrace("No handler registered for method " + path47 + ". Sending UNIMPLEMENTED status.");
|
|
91056
91056
|
return null;
|
|
91057
91057
|
}
|
|
91058
91058
|
return handler;
|
|
@@ -91076,10 +91076,10 @@ var require_server = __commonJS({
|
|
|
91076
91076
|
channelzSessionInfo === null || channelzSessionInfo === void 0 ? void 0 : channelzSessionInfo.streamTracker.addCallFailed();
|
|
91077
91077
|
return;
|
|
91078
91078
|
}
|
|
91079
|
-
const
|
|
91080
|
-
const handler = this._retrieveHandler(
|
|
91079
|
+
const path47 = headers[HTTP2_HEADER_PATH];
|
|
91080
|
+
const handler = this._retrieveHandler(path47);
|
|
91081
91081
|
if (!handler) {
|
|
91082
|
-
this._respondWithError(getUnimplementedStatusResponse(
|
|
91082
|
+
this._respondWithError(getUnimplementedStatusResponse(path47), stream, channelzSessionInfo);
|
|
91083
91083
|
return;
|
|
91084
91084
|
}
|
|
91085
91085
|
const callEventTracker = {
|
|
@@ -91129,10 +91129,10 @@ var require_server = __commonJS({
|
|
|
91129
91129
|
if (this._verifyContentType(stream, headers) !== true) {
|
|
91130
91130
|
return;
|
|
91131
91131
|
}
|
|
91132
|
-
const
|
|
91133
|
-
const handler = this._retrieveHandler(
|
|
91132
|
+
const path47 = headers[HTTP2_HEADER_PATH];
|
|
91133
|
+
const handler = this._retrieveHandler(path47);
|
|
91134
91134
|
if (!handler) {
|
|
91135
|
-
this._respondWithError(getUnimplementedStatusResponse(
|
|
91135
|
+
this._respondWithError(getUnimplementedStatusResponse(path47), stream, null);
|
|
91136
91136
|
return;
|
|
91137
91137
|
}
|
|
91138
91138
|
const call = (0, server_interceptors_1.getServerInterceptingCall)([...extraInterceptors, ...this.interceptors], stream, headers, null, handler, this.options);
|
|
@@ -92156,7 +92156,7 @@ var require_certificate_provider = __commonJS({
|
|
|
92156
92156
|
init_cjs_shims();
|
|
92157
92157
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
92158
92158
|
exports2.FileWatcherCertificateProvider = void 0;
|
|
92159
|
-
var
|
|
92159
|
+
var fs43 = require("fs");
|
|
92160
92160
|
var logging = require_logging();
|
|
92161
92161
|
var constants_1 = require_constants2();
|
|
92162
92162
|
var util_1 = require("util");
|
|
@@ -92164,7 +92164,7 @@ var require_certificate_provider = __commonJS({
|
|
|
92164
92164
|
function trace2(text10) {
|
|
92165
92165
|
logging.trace(constants_1.LogVerbosity.DEBUG, TRACER_NAME, text10);
|
|
92166
92166
|
}
|
|
92167
|
-
var readFilePromise = (0, util_1.promisify)(
|
|
92167
|
+
var readFilePromise = (0, util_1.promisify)(fs43.readFile);
|
|
92168
92168
|
var FileWatcherCertificateProvider = class {
|
|
92169
92169
|
constructor(config2) {
|
|
92170
92170
|
this.config = config2;
|
|
@@ -92421,13 +92421,13 @@ var require_resolver_uds = __commonJS({
|
|
|
92421
92421
|
this.listener = listener;
|
|
92422
92422
|
this.hasReturnedResult = false;
|
|
92423
92423
|
this.endpoints = [];
|
|
92424
|
-
let
|
|
92424
|
+
let path47;
|
|
92425
92425
|
if (target.authority === "") {
|
|
92426
|
-
|
|
92426
|
+
path47 = "/" + target.path;
|
|
92427
92427
|
} else {
|
|
92428
|
-
|
|
92428
|
+
path47 = target.path;
|
|
92429
92429
|
}
|
|
92430
|
-
this.endpoints = [{ addresses: [{ path:
|
|
92430
|
+
this.endpoints = [{ addresses: [{ path: path47 }] }];
|
|
92431
92431
|
}
|
|
92432
92432
|
updateResolution() {
|
|
92433
92433
|
if (!this.hasReturnedResult) {
|
|
@@ -92488,12 +92488,12 @@ var require_resolver_ip = __commonJS({
|
|
|
92488
92488
|
return;
|
|
92489
92489
|
}
|
|
92490
92490
|
const pathList = target.path.split(",");
|
|
92491
|
-
for (const
|
|
92492
|
-
const hostPort = (0, uri_parser_1.splitHostPort)(
|
|
92491
|
+
for (const path47 of pathList) {
|
|
92492
|
+
const hostPort = (0, uri_parser_1.splitHostPort)(path47);
|
|
92493
92493
|
if (hostPort === null) {
|
|
92494
92494
|
this.error = {
|
|
92495
92495
|
code: constants_1.Status.UNAVAILABLE,
|
|
92496
|
-
details: `Failed to parse ${target.scheme} address ${
|
|
92496
|
+
details: `Failed to parse ${target.scheme} address ${path47}`,
|
|
92497
92497
|
metadata: new metadata_1.Metadata()
|
|
92498
92498
|
};
|
|
92499
92499
|
return;
|
|
@@ -92501,7 +92501,7 @@ var require_resolver_ip = __commonJS({
|
|
|
92501
92501
|
if (target.scheme === IPV4_SCHEME && !(0, net_1.isIPv4)(hostPort.host) || target.scheme === IPV6_SCHEME && !(0, net_1.isIPv6)(hostPort.host)) {
|
|
92502
92502
|
this.error = {
|
|
92503
92503
|
code: constants_1.Status.UNAVAILABLE,
|
|
92504
|
-
details: `Failed to parse ${target.scheme} address ${
|
|
92504
|
+
details: `Failed to parse ${target.scheme} address ${path47}`,
|
|
92505
92505
|
metadata: new metadata_1.Metadata()
|
|
92506
92506
|
};
|
|
92507
92507
|
return;
|
|
@@ -93863,10 +93863,10 @@ var require_create_service_client_constructor = __commonJS({
|
|
|
93863
93863
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
93864
93864
|
exports2.createServiceClientConstructor = void 0;
|
|
93865
93865
|
var grpc = require_src7();
|
|
93866
|
-
function createServiceClientConstructor(
|
|
93866
|
+
function createServiceClientConstructor(path47, name2) {
|
|
93867
93867
|
const serviceDefinition = {
|
|
93868
93868
|
export: {
|
|
93869
|
-
path:
|
|
93869
|
+
path: path47,
|
|
93870
93870
|
requestStream: false,
|
|
93871
93871
|
responseStream: false,
|
|
93872
93872
|
requestSerialize: (arg) => {
|
|
@@ -94088,8 +94088,8 @@ var require_otlp_grpc_env_configuration = __commonJS({
|
|
|
94088
94088
|
var core_1 = (init_esm11(), __toCommonJS(esm_exports4));
|
|
94089
94089
|
var grpc_exporter_transport_1 = require_grpc_exporter_transport();
|
|
94090
94090
|
var node_http_1 = (init_index_node_http(), __toCommonJS(index_node_http_exports));
|
|
94091
|
-
var
|
|
94092
|
-
var
|
|
94091
|
+
var fs43 = require("fs");
|
|
94092
|
+
var path47 = require("path");
|
|
94093
94093
|
var api_1 = (init_esm8(), __toCommonJS(esm_exports));
|
|
94094
94094
|
function fallbackIfNullishOrBlank(signalSpecific, nonSignalSpecific) {
|
|
94095
94095
|
if (signalSpecific != null && signalSpecific !== "") {
|
|
@@ -94108,9 +94108,9 @@ var require_otlp_grpc_env_configuration = __commonJS({
|
|
|
94108
94108
|
if (Object.keys(signalSpecificHeaders).length === 0 && Object.keys(nonSignalSpecificHeaders).length === 0) {
|
|
94109
94109
|
return void 0;
|
|
94110
94110
|
}
|
|
94111
|
-
const
|
|
94111
|
+
const mergeHeaders2 = Object.assign({}, nonSignalSpecificHeaders, signalSpecificHeaders);
|
|
94112
94112
|
const metadata = (0, grpc_exporter_transport_1.createEmptyMetadata)();
|
|
94113
|
-
for (const [key2, value] of Object.entries(
|
|
94113
|
+
for (const [key2, value] of Object.entries(mergeHeaders2)) {
|
|
94114
94114
|
metadata.set(key2, value);
|
|
94115
94115
|
}
|
|
94116
94116
|
return metadata;
|
|
@@ -94138,7 +94138,7 @@ var require_otlp_grpc_env_configuration = __commonJS({
|
|
|
94138
94138
|
const filePath = fallbackIfNullishOrBlank(signalSpecificPath, nonSignalSpecificPath);
|
|
94139
94139
|
if (filePath != null) {
|
|
94140
94140
|
try {
|
|
94141
|
-
return
|
|
94141
|
+
return fs43.readFileSync(path47.resolve(process.cwd(), filePath));
|
|
94142
94142
|
} catch {
|
|
94143
94143
|
api_1.diag.warn(warningMessage);
|
|
94144
94144
|
return void 0;
|
|
@@ -95823,7 +95823,7 @@ var require_utils4 = __commonJS({
|
|
|
95823
95823
|
var exporter_metrics_otlp_http_1 = (init_esm27(), __toCommonJS(esm_exports20));
|
|
95824
95824
|
var exporter_metrics_otlp_proto_1 = (init_esm28(), __toCommonJS(esm_exports21));
|
|
95825
95825
|
var sdk_logs_1 = (init_esm13(), __toCommonJS(esm_exports6));
|
|
95826
|
-
var
|
|
95826
|
+
var fs43 = require("fs");
|
|
95827
95827
|
var RESOURCE_DETECTOR_ENVIRONMENT = "env";
|
|
95828
95828
|
var RESOURCE_DETECTOR_HOST = "host";
|
|
95829
95829
|
var RESOURCE_DETECTOR_OS = "os";
|
|
@@ -96246,21 +96246,21 @@ var require_utils4 = __commonJS({
|
|
|
96246
96246
|
const httpsAgentOptions = {};
|
|
96247
96247
|
if (tls.ca_file) {
|
|
96248
96248
|
try {
|
|
96249
|
-
httpsAgentOptions.ca =
|
|
96249
|
+
httpsAgentOptions.ca = fs43.readFileSync(tls.ca_file);
|
|
96250
96250
|
} catch (e) {
|
|
96251
96251
|
api_1.diag.warn(`Failed to read TLS CA file at ${tls.ca_file}: ${e}`);
|
|
96252
96252
|
}
|
|
96253
96253
|
}
|
|
96254
96254
|
if (tls.cert_file) {
|
|
96255
96255
|
try {
|
|
96256
|
-
httpsAgentOptions.cert =
|
|
96256
|
+
httpsAgentOptions.cert = fs43.readFileSync(tls.cert_file);
|
|
96257
96257
|
} catch (e) {
|
|
96258
96258
|
api_1.diag.warn(`Failed to read TLS cert file at ${tls.cert_file}: ${e}`);
|
|
96259
96259
|
}
|
|
96260
96260
|
}
|
|
96261
96261
|
if (tls.key_file) {
|
|
96262
96262
|
try {
|
|
96263
|
-
httpsAgentOptions.key =
|
|
96263
|
+
httpsAgentOptions.key = fs43.readFileSync(tls.key_file);
|
|
96264
96264
|
} catch (e) {
|
|
96265
96265
|
api_1.diag.warn(`Failed to read TLS key file at ${tls.key_file}: ${e}`);
|
|
96266
96266
|
}
|
|
@@ -97553,17 +97553,17 @@ var require_visit = __commonJS({
|
|
|
97553
97553
|
visit2.BREAK = BREAK;
|
|
97554
97554
|
visit2.SKIP = SKIP2;
|
|
97555
97555
|
visit2.REMOVE = REMOVE;
|
|
97556
|
-
function visit_(key2, node2, visitor,
|
|
97557
|
-
const ctrl = callVisitor(key2, node2, visitor,
|
|
97556
|
+
function visit_(key2, node2, visitor, path47) {
|
|
97557
|
+
const ctrl = callVisitor(key2, node2, visitor, path47);
|
|
97558
97558
|
if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
|
|
97559
|
-
replaceNode(key2,
|
|
97560
|
-
return visit_(key2, ctrl, visitor,
|
|
97559
|
+
replaceNode(key2, path47, ctrl);
|
|
97560
|
+
return visit_(key2, ctrl, visitor, path47);
|
|
97561
97561
|
}
|
|
97562
97562
|
if (typeof ctrl !== "symbol") {
|
|
97563
97563
|
if (identity2.isCollection(node2)) {
|
|
97564
|
-
|
|
97564
|
+
path47 = Object.freeze(path47.concat(node2));
|
|
97565
97565
|
for (let i = 0; i < node2.items.length; ++i) {
|
|
97566
|
-
const ci = visit_(i, node2.items[i], visitor,
|
|
97566
|
+
const ci = visit_(i, node2.items[i], visitor, path47);
|
|
97567
97567
|
if (typeof ci === "number")
|
|
97568
97568
|
i = ci - 1;
|
|
97569
97569
|
else if (ci === BREAK)
|
|
@@ -97574,13 +97574,13 @@ var require_visit = __commonJS({
|
|
|
97574
97574
|
}
|
|
97575
97575
|
}
|
|
97576
97576
|
} else if (identity2.isPair(node2)) {
|
|
97577
|
-
|
|
97578
|
-
const ck = visit_("key", node2.key, visitor,
|
|
97577
|
+
path47 = Object.freeze(path47.concat(node2));
|
|
97578
|
+
const ck = visit_("key", node2.key, visitor, path47);
|
|
97579
97579
|
if (ck === BREAK)
|
|
97580
97580
|
return BREAK;
|
|
97581
97581
|
else if (ck === REMOVE)
|
|
97582
97582
|
node2.key = null;
|
|
97583
|
-
const cv = visit_("value", node2.value, visitor,
|
|
97583
|
+
const cv = visit_("value", node2.value, visitor, path47);
|
|
97584
97584
|
if (cv === BREAK)
|
|
97585
97585
|
return BREAK;
|
|
97586
97586
|
else if (cv === REMOVE)
|
|
@@ -97601,17 +97601,17 @@ var require_visit = __commonJS({
|
|
|
97601
97601
|
visitAsync.BREAK = BREAK;
|
|
97602
97602
|
visitAsync.SKIP = SKIP2;
|
|
97603
97603
|
visitAsync.REMOVE = REMOVE;
|
|
97604
|
-
async function visitAsync_(key2, node2, visitor,
|
|
97605
|
-
const ctrl = await callVisitor(key2, node2, visitor,
|
|
97604
|
+
async function visitAsync_(key2, node2, visitor, path47) {
|
|
97605
|
+
const ctrl = await callVisitor(key2, node2, visitor, path47);
|
|
97606
97606
|
if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
|
|
97607
|
-
replaceNode(key2,
|
|
97608
|
-
return visitAsync_(key2, ctrl, visitor,
|
|
97607
|
+
replaceNode(key2, path47, ctrl);
|
|
97608
|
+
return visitAsync_(key2, ctrl, visitor, path47);
|
|
97609
97609
|
}
|
|
97610
97610
|
if (typeof ctrl !== "symbol") {
|
|
97611
97611
|
if (identity2.isCollection(node2)) {
|
|
97612
|
-
|
|
97612
|
+
path47 = Object.freeze(path47.concat(node2));
|
|
97613
97613
|
for (let i = 0; i < node2.items.length; ++i) {
|
|
97614
|
-
const ci = await visitAsync_(i, node2.items[i], visitor,
|
|
97614
|
+
const ci = await visitAsync_(i, node2.items[i], visitor, path47);
|
|
97615
97615
|
if (typeof ci === "number")
|
|
97616
97616
|
i = ci - 1;
|
|
97617
97617
|
else if (ci === BREAK)
|
|
@@ -97622,13 +97622,13 @@ var require_visit = __commonJS({
|
|
|
97622
97622
|
}
|
|
97623
97623
|
}
|
|
97624
97624
|
} else if (identity2.isPair(node2)) {
|
|
97625
|
-
|
|
97626
|
-
const ck = await visitAsync_("key", node2.key, visitor,
|
|
97625
|
+
path47 = Object.freeze(path47.concat(node2));
|
|
97626
|
+
const ck = await visitAsync_("key", node2.key, visitor, path47);
|
|
97627
97627
|
if (ck === BREAK)
|
|
97628
97628
|
return BREAK;
|
|
97629
97629
|
else if (ck === REMOVE)
|
|
97630
97630
|
node2.key = null;
|
|
97631
|
-
const cv = await visitAsync_("value", node2.value, visitor,
|
|
97631
|
+
const cv = await visitAsync_("value", node2.value, visitor, path47);
|
|
97632
97632
|
if (cv === BREAK)
|
|
97633
97633
|
return BREAK;
|
|
97634
97634
|
else if (cv === REMOVE)
|
|
@@ -97655,23 +97655,23 @@ var require_visit = __commonJS({
|
|
|
97655
97655
|
}
|
|
97656
97656
|
return visitor;
|
|
97657
97657
|
}
|
|
97658
|
-
function callVisitor(key2, node2, visitor,
|
|
97658
|
+
function callVisitor(key2, node2, visitor, path47) {
|
|
97659
97659
|
if (typeof visitor === "function")
|
|
97660
|
-
return visitor(key2, node2,
|
|
97660
|
+
return visitor(key2, node2, path47);
|
|
97661
97661
|
if (identity2.isMap(node2))
|
|
97662
|
-
return visitor.Map?.(key2, node2,
|
|
97662
|
+
return visitor.Map?.(key2, node2, path47);
|
|
97663
97663
|
if (identity2.isSeq(node2))
|
|
97664
|
-
return visitor.Seq?.(key2, node2,
|
|
97664
|
+
return visitor.Seq?.(key2, node2, path47);
|
|
97665
97665
|
if (identity2.isPair(node2))
|
|
97666
|
-
return visitor.Pair?.(key2, node2,
|
|
97666
|
+
return visitor.Pair?.(key2, node2, path47);
|
|
97667
97667
|
if (identity2.isScalar(node2))
|
|
97668
|
-
return visitor.Scalar?.(key2, node2,
|
|
97668
|
+
return visitor.Scalar?.(key2, node2, path47);
|
|
97669
97669
|
if (identity2.isAlias(node2))
|
|
97670
|
-
return visitor.Alias?.(key2, node2,
|
|
97670
|
+
return visitor.Alias?.(key2, node2, path47);
|
|
97671
97671
|
return void 0;
|
|
97672
97672
|
}
|
|
97673
|
-
function replaceNode(key2,
|
|
97674
|
-
const parent =
|
|
97673
|
+
function replaceNode(key2, path47, node2) {
|
|
97674
|
+
const parent = path47[path47.length - 1];
|
|
97675
97675
|
if (identity2.isCollection(parent)) {
|
|
97676
97676
|
parent.items[key2] = node2;
|
|
97677
97677
|
} else if (identity2.isPair(parent)) {
|
|
@@ -98290,10 +98290,10 @@ var require_Collection = __commonJS({
|
|
|
98290
98290
|
var createNode = require_createNode();
|
|
98291
98291
|
var identity2 = require_identity();
|
|
98292
98292
|
var Node = require_Node();
|
|
98293
|
-
function collectionFromPath(schema,
|
|
98293
|
+
function collectionFromPath(schema, path47, value) {
|
|
98294
98294
|
let v = value;
|
|
98295
|
-
for (let i =
|
|
98296
|
-
const k =
|
|
98295
|
+
for (let i = path47.length - 1; i >= 0; --i) {
|
|
98296
|
+
const k = path47[i];
|
|
98297
98297
|
if (typeof k === "number" && Number.isInteger(k) && k >= 0) {
|
|
98298
98298
|
const a = [];
|
|
98299
98299
|
a[k] = v;
|
|
@@ -98312,7 +98312,7 @@ var require_Collection = __commonJS({
|
|
|
98312
98312
|
sourceObjects: /* @__PURE__ */ new Map()
|
|
98313
98313
|
});
|
|
98314
98314
|
}
|
|
98315
|
-
var isEmptyPath = (
|
|
98315
|
+
var isEmptyPath = (path47) => path47 == null || typeof path47 === "object" && !!path47[Symbol.iterator]().next().done;
|
|
98316
98316
|
var Collection = class extends Node.NodeBase {
|
|
98317
98317
|
constructor(type, schema) {
|
|
98318
98318
|
super(type);
|
|
@@ -98342,11 +98342,11 @@ var require_Collection = __commonJS({
|
|
|
98342
98342
|
* be a Pair instance or a `{ key, value }` object, which may not have a key
|
|
98343
98343
|
* that already exists in the map.
|
|
98344
98344
|
*/
|
|
98345
|
-
addIn(
|
|
98346
|
-
if (isEmptyPath(
|
|
98345
|
+
addIn(path47, value) {
|
|
98346
|
+
if (isEmptyPath(path47))
|
|
98347
98347
|
this.add(value);
|
|
98348
98348
|
else {
|
|
98349
|
-
const [key2, ...rest] =
|
|
98349
|
+
const [key2, ...rest] = path47;
|
|
98350
98350
|
const node2 = this.get(key2, true);
|
|
98351
98351
|
if (identity2.isCollection(node2))
|
|
98352
98352
|
node2.addIn(rest, value);
|
|
@@ -98360,8 +98360,8 @@ var require_Collection = __commonJS({
|
|
|
98360
98360
|
* Removes a value from the collection.
|
|
98361
98361
|
* @returns `true` if the item was found and removed.
|
|
98362
98362
|
*/
|
|
98363
|
-
deleteIn(
|
|
98364
|
-
const [key2, ...rest] =
|
|
98363
|
+
deleteIn(path47) {
|
|
98364
|
+
const [key2, ...rest] = path47;
|
|
98365
98365
|
if (rest.length === 0)
|
|
98366
98366
|
return this.delete(key2);
|
|
98367
98367
|
const node2 = this.get(key2, true);
|
|
@@ -98375,8 +98375,8 @@ var require_Collection = __commonJS({
|
|
|
98375
98375
|
* scalar values from their surrounding node; to disable set `keepScalar` to
|
|
98376
98376
|
* `true` (collections are always returned intact).
|
|
98377
98377
|
*/
|
|
98378
|
-
getIn(
|
|
98379
|
-
const [key2, ...rest] =
|
|
98378
|
+
getIn(path47, keepScalar) {
|
|
98379
|
+
const [key2, ...rest] = path47;
|
|
98380
98380
|
const node2 = this.get(key2, true);
|
|
98381
98381
|
if (rest.length === 0)
|
|
98382
98382
|
return !keepScalar && identity2.isScalar(node2) ? node2.value : node2;
|
|
@@ -98394,8 +98394,8 @@ var require_Collection = __commonJS({
|
|
|
98394
98394
|
/**
|
|
98395
98395
|
* Checks if the collection includes a value with the key `key`.
|
|
98396
98396
|
*/
|
|
98397
|
-
hasIn(
|
|
98398
|
-
const [key2, ...rest] =
|
|
98397
|
+
hasIn(path47) {
|
|
98398
|
+
const [key2, ...rest] = path47;
|
|
98399
98399
|
if (rest.length === 0)
|
|
98400
98400
|
return this.has(key2);
|
|
98401
98401
|
const node2 = this.get(key2, true);
|
|
@@ -98405,8 +98405,8 @@ var require_Collection = __commonJS({
|
|
|
98405
98405
|
* Sets a value in this collection. For `!!set`, `value` needs to be a
|
|
98406
98406
|
* boolean to add/remove the item from the set.
|
|
98407
98407
|
*/
|
|
98408
|
-
setIn(
|
|
98409
|
-
const [key2, ...rest] =
|
|
98408
|
+
setIn(path47, value) {
|
|
98409
|
+
const [key2, ...rest] = path47;
|
|
98410
98410
|
if (rest.length === 0) {
|
|
98411
98411
|
this.set(key2, value);
|
|
98412
98412
|
} else {
|
|
@@ -100956,9 +100956,9 @@ var require_Document = __commonJS({
|
|
|
100956
100956
|
this.contents.add(value);
|
|
100957
100957
|
}
|
|
100958
100958
|
/** Adds a value to the document. */
|
|
100959
|
-
addIn(
|
|
100959
|
+
addIn(path47, value) {
|
|
100960
100960
|
if (assertCollection(this.contents))
|
|
100961
|
-
this.contents.addIn(
|
|
100961
|
+
this.contents.addIn(path47, value);
|
|
100962
100962
|
}
|
|
100963
100963
|
/**
|
|
100964
100964
|
* Create a new `Alias` node, ensuring that the target `node` has the required anchor.
|
|
@@ -101033,14 +101033,14 @@ var require_Document = __commonJS({
|
|
|
101033
101033
|
* Removes a value from the document.
|
|
101034
101034
|
* @returns `true` if the item was found and removed.
|
|
101035
101035
|
*/
|
|
101036
|
-
deleteIn(
|
|
101037
|
-
if (Collection.isEmptyPath(
|
|
101036
|
+
deleteIn(path47) {
|
|
101037
|
+
if (Collection.isEmptyPath(path47)) {
|
|
101038
101038
|
if (this.contents == null)
|
|
101039
101039
|
return false;
|
|
101040
101040
|
this.contents = null;
|
|
101041
101041
|
return true;
|
|
101042
101042
|
}
|
|
101043
|
-
return assertCollection(this.contents) ? this.contents.deleteIn(
|
|
101043
|
+
return assertCollection(this.contents) ? this.contents.deleteIn(path47) : false;
|
|
101044
101044
|
}
|
|
101045
101045
|
/**
|
|
101046
101046
|
* Returns item at `key`, or `undefined` if not found. By default unwraps
|
|
@@ -101055,10 +101055,10 @@ var require_Document = __commonJS({
|
|
|
101055
101055
|
* scalar values from their surrounding node; to disable set `keepScalar` to
|
|
101056
101056
|
* `true` (collections are always returned intact).
|
|
101057
101057
|
*/
|
|
101058
|
-
getIn(
|
|
101059
|
-
if (Collection.isEmptyPath(
|
|
101058
|
+
getIn(path47, keepScalar) {
|
|
101059
|
+
if (Collection.isEmptyPath(path47))
|
|
101060
101060
|
return !keepScalar && identity2.isScalar(this.contents) ? this.contents.value : this.contents;
|
|
101061
|
-
return identity2.isCollection(this.contents) ? this.contents.getIn(
|
|
101061
|
+
return identity2.isCollection(this.contents) ? this.contents.getIn(path47, keepScalar) : void 0;
|
|
101062
101062
|
}
|
|
101063
101063
|
/**
|
|
101064
101064
|
* Checks if the document includes a value with the key `key`.
|
|
@@ -101069,10 +101069,10 @@ var require_Document = __commonJS({
|
|
|
101069
101069
|
/**
|
|
101070
101070
|
* Checks if the document includes a value at `path`.
|
|
101071
101071
|
*/
|
|
101072
|
-
hasIn(
|
|
101073
|
-
if (Collection.isEmptyPath(
|
|
101072
|
+
hasIn(path47) {
|
|
101073
|
+
if (Collection.isEmptyPath(path47))
|
|
101074
101074
|
return this.contents !== void 0;
|
|
101075
|
-
return identity2.isCollection(this.contents) ? this.contents.hasIn(
|
|
101075
|
+
return identity2.isCollection(this.contents) ? this.contents.hasIn(path47) : false;
|
|
101076
101076
|
}
|
|
101077
101077
|
/**
|
|
101078
101078
|
* Sets a value in this document. For `!!set`, `value` needs to be a
|
|
@@ -101089,13 +101089,13 @@ var require_Document = __commonJS({
|
|
|
101089
101089
|
* Sets a value in this document. For `!!set`, `value` needs to be a
|
|
101090
101090
|
* boolean to add/remove the item from the set.
|
|
101091
101091
|
*/
|
|
101092
|
-
setIn(
|
|
101093
|
-
if (Collection.isEmptyPath(
|
|
101092
|
+
setIn(path47, value) {
|
|
101093
|
+
if (Collection.isEmptyPath(path47)) {
|
|
101094
101094
|
this.contents = value;
|
|
101095
101095
|
} else if (this.contents == null) {
|
|
101096
|
-
this.contents = Collection.collectionFromPath(this.schema, Array.from(
|
|
101096
|
+
this.contents = Collection.collectionFromPath(this.schema, Array.from(path47), value);
|
|
101097
101097
|
} else if (assertCollection(this.contents)) {
|
|
101098
|
-
this.contents.setIn(
|
|
101098
|
+
this.contents.setIn(path47, value);
|
|
101099
101099
|
}
|
|
101100
101100
|
}
|
|
101101
101101
|
/**
|
|
@@ -103075,9 +103075,9 @@ var require_cst_visit = __commonJS({
|
|
|
103075
103075
|
visit2.BREAK = BREAK;
|
|
103076
103076
|
visit2.SKIP = SKIP2;
|
|
103077
103077
|
visit2.REMOVE = REMOVE;
|
|
103078
|
-
visit2.itemAtPath = (cst,
|
|
103078
|
+
visit2.itemAtPath = (cst, path47) => {
|
|
103079
103079
|
let item = cst;
|
|
103080
|
-
for (const [field, index2] of
|
|
103080
|
+
for (const [field, index2] of path47) {
|
|
103081
103081
|
const tok = item?.[field];
|
|
103082
103082
|
if (tok && "items" in tok) {
|
|
103083
103083
|
item = tok.items[index2];
|
|
@@ -103086,23 +103086,23 @@ var require_cst_visit = __commonJS({
|
|
|
103086
103086
|
}
|
|
103087
103087
|
return item;
|
|
103088
103088
|
};
|
|
103089
|
-
visit2.parentCollection = (cst,
|
|
103090
|
-
const parent = visit2.itemAtPath(cst,
|
|
103091
|
-
const field =
|
|
103089
|
+
visit2.parentCollection = (cst, path47) => {
|
|
103090
|
+
const parent = visit2.itemAtPath(cst, path47.slice(0, -1));
|
|
103091
|
+
const field = path47[path47.length - 1][0];
|
|
103092
103092
|
const coll = parent?.[field];
|
|
103093
103093
|
if (coll && "items" in coll)
|
|
103094
103094
|
return coll;
|
|
103095
103095
|
throw new Error("Parent collection not found");
|
|
103096
103096
|
};
|
|
103097
|
-
function _visit(
|
|
103098
|
-
let ctrl = visitor(item,
|
|
103097
|
+
function _visit(path47, item, visitor) {
|
|
103098
|
+
let ctrl = visitor(item, path47);
|
|
103099
103099
|
if (typeof ctrl === "symbol")
|
|
103100
103100
|
return ctrl;
|
|
103101
103101
|
for (const field of ["key", "value"]) {
|
|
103102
103102
|
const token = item[field];
|
|
103103
103103
|
if (token && "items" in token) {
|
|
103104
103104
|
for (let i = 0; i < token.items.length; ++i) {
|
|
103105
|
-
const ci = _visit(Object.freeze(
|
|
103105
|
+
const ci = _visit(Object.freeze(path47.concat([[field, i]])), token.items[i], visitor);
|
|
103106
103106
|
if (typeof ci === "number")
|
|
103107
103107
|
i = ci - 1;
|
|
103108
103108
|
else if (ci === BREAK)
|
|
@@ -103113,10 +103113,10 @@ var require_cst_visit = __commonJS({
|
|
|
103113
103113
|
}
|
|
103114
103114
|
}
|
|
103115
103115
|
if (typeof ctrl === "function" && field === "key")
|
|
103116
|
-
ctrl = ctrl(item,
|
|
103116
|
+
ctrl = ctrl(item, path47);
|
|
103117
103117
|
}
|
|
103118
103118
|
}
|
|
103119
|
-
return typeof ctrl === "function" ? ctrl(item,
|
|
103119
|
+
return typeof ctrl === "function" ? ctrl(item, path47) : ctrl;
|
|
103120
103120
|
}
|
|
103121
103121
|
exports2.visit = visit2;
|
|
103122
103122
|
}
|
|
@@ -104422,14 +104422,14 @@ var require_parser = __commonJS({
|
|
|
104422
104422
|
case "scalar":
|
|
104423
104423
|
case "single-quoted-scalar":
|
|
104424
104424
|
case "double-quoted-scalar": {
|
|
104425
|
-
const
|
|
104425
|
+
const fs43 = this.flowScalar(this.type);
|
|
104426
104426
|
if (atNextItem || it.value) {
|
|
104427
|
-
map3.items.push({ start, key:
|
|
104427
|
+
map3.items.push({ start, key: fs43, sep: [] });
|
|
104428
104428
|
this.onKeyLine = true;
|
|
104429
104429
|
} else if (it.sep) {
|
|
104430
|
-
this.stack.push(
|
|
104430
|
+
this.stack.push(fs43);
|
|
104431
104431
|
} else {
|
|
104432
|
-
Object.assign(it, { key:
|
|
104432
|
+
Object.assign(it, { key: fs43, sep: [] });
|
|
104433
104433
|
this.onKeyLine = true;
|
|
104434
104434
|
}
|
|
104435
104435
|
return;
|
|
@@ -104557,13 +104557,13 @@ var require_parser = __commonJS({
|
|
|
104557
104557
|
case "scalar":
|
|
104558
104558
|
case "single-quoted-scalar":
|
|
104559
104559
|
case "double-quoted-scalar": {
|
|
104560
|
-
const
|
|
104560
|
+
const fs43 = this.flowScalar(this.type);
|
|
104561
104561
|
if (!it || it.value)
|
|
104562
|
-
fc.items.push({ start: [], key:
|
|
104562
|
+
fc.items.push({ start: [], key: fs43, sep: [] });
|
|
104563
104563
|
else if (it.sep)
|
|
104564
|
-
this.stack.push(
|
|
104564
|
+
this.stack.push(fs43);
|
|
104565
104565
|
else
|
|
104566
|
-
Object.assign(it, { key:
|
|
104566
|
+
Object.assign(it, { key: fs43, sep: [] });
|
|
104567
104567
|
return;
|
|
104568
104568
|
}
|
|
104569
104569
|
case "flow-map-end":
|
|
@@ -113270,7 +113270,7 @@ var require_FileConfigFactory = __commonJS({
|
|
|
113270
113270
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
113271
113271
|
exports2.parseConfigFile = exports2.FileConfigFactory = void 0;
|
|
113272
113272
|
var core_1 = (init_esm11(), __toCommonJS(esm_exports4));
|
|
113273
|
-
var
|
|
113273
|
+
var fs43 = require("fs");
|
|
113274
113274
|
var yaml = require_dist5();
|
|
113275
113275
|
var utils_1 = require_utils5();
|
|
113276
113276
|
var validateConfig = require_validator();
|
|
@@ -113287,7 +113287,7 @@ var require_FileConfigFactory = __commonJS({
|
|
|
113287
113287
|
function parseConfigFile() {
|
|
113288
113288
|
const supportedFileVersionPattern = /^1\.0$/;
|
|
113289
113289
|
const configFile = (0, core_1.getStringFromEnv)("OTEL_CONFIG_FILE") || "";
|
|
113290
|
-
const file =
|
|
113290
|
+
const file = fs43.readFileSync(configFile, "utf8");
|
|
113291
113291
|
const rawParsed = yaml.parse(file);
|
|
113292
113292
|
const processed = substituteEnvVars(rawParsed);
|
|
113293
113293
|
const fileFormat = processed?.file_format;
|
|
@@ -114162,9 +114162,9 @@ __export(getMachineId_linux_exports2, {
|
|
|
114162
114162
|
});
|
|
114163
114163
|
async function getMachineId8() {
|
|
114164
114164
|
const paths = ["/etc/machine-id", "/var/lib/dbus/machine-id"];
|
|
114165
|
-
for (const
|
|
114165
|
+
for (const path47 of paths) {
|
|
114166
114166
|
try {
|
|
114167
|
-
const result = await import_fs4.promises.readFile(
|
|
114167
|
+
const result = await import_fs4.promises.readFile(path47, { encoding: "utf8" });
|
|
114168
114168
|
return result.trim();
|
|
114169
114169
|
} catch (e) {
|
|
114170
114170
|
diag2.debug(`error reading machine id: ${e}`);
|
|
@@ -119333,31 +119333,31 @@ function getClient2(endpoint, credentialsOrPipelineOptions, clientOptions = {})
|
|
|
119333
119333
|
...clientOptions,
|
|
119334
119334
|
pipeline: pipeline3
|
|
119335
119335
|
});
|
|
119336
|
-
const client = (
|
|
119336
|
+
const client = (path47, ...args) => {
|
|
119337
119337
|
return {
|
|
119338
119338
|
get: (requestOptions = {}) => {
|
|
119339
|
-
return tspClient.path(
|
|
119339
|
+
return tspClient.path(path47, ...args).get(wrapRequestParameters(requestOptions));
|
|
119340
119340
|
},
|
|
119341
119341
|
post: (requestOptions = {}) => {
|
|
119342
|
-
return tspClient.path(
|
|
119342
|
+
return tspClient.path(path47, ...args).post(wrapRequestParameters(requestOptions));
|
|
119343
119343
|
},
|
|
119344
119344
|
put: (requestOptions = {}) => {
|
|
119345
|
-
return tspClient.path(
|
|
119345
|
+
return tspClient.path(path47, ...args).put(wrapRequestParameters(requestOptions));
|
|
119346
119346
|
},
|
|
119347
119347
|
patch: (requestOptions = {}) => {
|
|
119348
|
-
return tspClient.path(
|
|
119348
|
+
return tspClient.path(path47, ...args).patch(wrapRequestParameters(requestOptions));
|
|
119349
119349
|
},
|
|
119350
119350
|
delete: (requestOptions = {}) => {
|
|
119351
|
-
return tspClient.path(
|
|
119351
|
+
return tspClient.path(path47, ...args).delete(wrapRequestParameters(requestOptions));
|
|
119352
119352
|
},
|
|
119353
119353
|
head: (requestOptions = {}) => {
|
|
119354
|
-
return tspClient.path(
|
|
119354
|
+
return tspClient.path(path47, ...args).head(wrapRequestParameters(requestOptions));
|
|
119355
119355
|
},
|
|
119356
119356
|
options: (requestOptions = {}) => {
|
|
119357
|
-
return tspClient.path(
|
|
119357
|
+
return tspClient.path(path47, ...args).options(wrapRequestParameters(requestOptions));
|
|
119358
119358
|
},
|
|
119359
119359
|
trace: (requestOptions = {}) => {
|
|
119360
|
-
return tspClient.path(
|
|
119360
|
+
return tspClient.path(path47, ...args).trace(wrapRequestParameters(requestOptions));
|
|
119361
119361
|
}
|
|
119362
119362
|
};
|
|
119363
119363
|
};
|
|
@@ -122296,7 +122296,7 @@ var require_import_in_the_middle2 = __commonJS({
|
|
|
122296
122296
|
"../../node_modules/.pnpm/import-in-the-middle@2.0.6/node_modules/import-in-the-middle/index.js"(exports2, module2) {
|
|
122297
122297
|
"use strict";
|
|
122298
122298
|
init_cjs_shims();
|
|
122299
|
-
var
|
|
122299
|
+
var path47 = require("path");
|
|
122300
122300
|
var moduleDetailsFromPath = require_module_details_from_path();
|
|
122301
122301
|
var { fileURLToPath: fileURLToPath3 } = require("url");
|
|
122302
122302
|
var { MessageChannel } = require("worker_threads");
|
|
@@ -122409,7 +122409,7 @@ var require_import_in_the_middle2 = __commonJS({
|
|
|
122409
122409
|
} else if (baseDir.endsWith(specifiers.get(loadUrl))) {
|
|
122410
122410
|
callHookFn(hookFn, namespace, name2, baseDir);
|
|
122411
122411
|
} else if (internals) {
|
|
122412
|
-
const internalPath = name2 +
|
|
122412
|
+
const internalPath = name2 + path47.sep + path47.relative(baseDir, filePath);
|
|
122413
122413
|
callHookFn(hookFn, namespace, internalPath, baseDir);
|
|
122414
122414
|
}
|
|
122415
122415
|
} else if (matchArg === specifier) {
|
|
@@ -122693,26 +122693,26 @@ var require_utils6 = __commonJS({
|
|
|
122693
122693
|
const reqUrlObject = requestUrl || {};
|
|
122694
122694
|
const protocol = reqUrlObject.protocol || fallbackProtocol;
|
|
122695
122695
|
const port = (reqUrlObject.port || "").toString();
|
|
122696
|
-
let
|
|
122696
|
+
let path47 = reqUrlObject.path || "/";
|
|
122697
122697
|
let host = reqUrlObject.host || reqUrlObject.hostname || headers.host || "localhost";
|
|
122698
122698
|
if (host.indexOf(":") === -1 && port && port !== "80" && port !== "443") {
|
|
122699
122699
|
host += `:${port}`;
|
|
122700
122700
|
}
|
|
122701
|
-
if (
|
|
122701
|
+
if (path47.includes("?")) {
|
|
122702
122702
|
try {
|
|
122703
|
-
const parsedUrl = new URL(
|
|
122703
|
+
const parsedUrl = new URL(path47, "http://localhost");
|
|
122704
122704
|
const sensitiveParamsToRedact = redactedQueryParams || [];
|
|
122705
122705
|
for (const sensitiveParam of sensitiveParamsToRedact) {
|
|
122706
122706
|
if (parsedUrl.searchParams.get(sensitiveParam)) {
|
|
122707
122707
|
parsedUrl.searchParams.set(sensitiveParam, internal_types_2.STR_REDACTED);
|
|
122708
122708
|
}
|
|
122709
122709
|
}
|
|
122710
|
-
|
|
122710
|
+
path47 = `${parsedUrl.pathname}${parsedUrl.search}`;
|
|
122711
122711
|
} catch {
|
|
122712
122712
|
}
|
|
122713
122713
|
}
|
|
122714
122714
|
const authPart = reqUrlObject.auth ? `${internal_types_2.STR_REDACTED}:${internal_types_2.STR_REDACTED}@` : "";
|
|
122715
|
-
return `${protocol}//${authPart}${host}${
|
|
122715
|
+
return `${protocol}//${authPart}${host}${path47}`;
|
|
122716
122716
|
};
|
|
122717
122717
|
exports2.getAbsoluteUrl = getAbsoluteUrl;
|
|
122718
122718
|
var parseResponseStatus = (kind, statusCode) => {
|
|
@@ -124865,15 +124865,15 @@ var init_ModuleNameTrie2 = __esm({
|
|
|
124865
124865
|
|
|
124866
124866
|
// ../../node_modules/.pnpm/@opentelemetry+instrumentation@0.217.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/instrumentation/build/esm/platform/node/RequireInTheMiddleSingleton.js
|
|
124867
124867
|
function normalizePathSeparators3(moduleNameOrPath) {
|
|
124868
|
-
return
|
|
124868
|
+
return path45.sep !== ModuleNameSeparator3 ? moduleNameOrPath.split(path45.sep).join(ModuleNameSeparator3) : moduleNameOrPath;
|
|
124869
124869
|
}
|
|
124870
|
-
var import_require_in_the_middle5,
|
|
124870
|
+
var import_require_in_the_middle5, path45, isMocha3, RequireInTheMiddleSingleton3;
|
|
124871
124871
|
var init_RequireInTheMiddleSingleton2 = __esm({
|
|
124872
124872
|
"../../node_modules/.pnpm/@opentelemetry+instrumentation@0.217.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/instrumentation/build/esm/platform/node/RequireInTheMiddleSingleton.js"() {
|
|
124873
124873
|
"use strict";
|
|
124874
124874
|
init_cjs_shims();
|
|
124875
124875
|
import_require_in_the_middle5 = __toESM(require_require_in_the_middle());
|
|
124876
|
-
|
|
124876
|
+
path45 = __toESM(require("path"));
|
|
124877
124877
|
init_ModuleNameTrie2();
|
|
124878
124878
|
isMocha3 = [
|
|
124879
124879
|
"afterEach",
|
|
@@ -124988,12 +124988,12 @@ function isSupported3(supportedVersions, version3, includePrerelease) {
|
|
|
124988
124988
|
return satisfies3(version3, supportedVersion, { includePrerelease });
|
|
124989
124989
|
});
|
|
124990
124990
|
}
|
|
124991
|
-
var
|
|
124991
|
+
var path46, import_util15, import_import_in_the_middle3, import_require_in_the_middle6, import_fs7, InstrumentationBase3;
|
|
124992
124992
|
var init_instrumentation4 = __esm({
|
|
124993
124993
|
"../../node_modules/.pnpm/@opentelemetry+instrumentation@0.217.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/instrumentation/build/esm/platform/node/instrumentation.js"() {
|
|
124994
124994
|
"use strict";
|
|
124995
124995
|
init_cjs_shims();
|
|
124996
|
-
|
|
124996
|
+
path46 = __toESM(require("path"));
|
|
124997
124997
|
import_util15 = require("util");
|
|
124998
124998
|
init_semver3();
|
|
124999
124999
|
init_shimmer2();
|
|
@@ -125094,7 +125094,7 @@ var init_instrumentation4 = __esm({
|
|
|
125094
125094
|
}
|
|
125095
125095
|
_extractPackageVersion(baseDir) {
|
|
125096
125096
|
try {
|
|
125097
|
-
const json = (0, import_fs7.readFileSync)(
|
|
125097
|
+
const json = (0, import_fs7.readFileSync)(path46.join(baseDir, "package.json"), {
|
|
125098
125098
|
encoding: "utf8"
|
|
125099
125099
|
});
|
|
125100
125100
|
const version3 = JSON.parse(json).version;
|
|
@@ -125136,7 +125136,7 @@ var init_instrumentation4 = __esm({
|
|
|
125136
125136
|
return exports2;
|
|
125137
125137
|
}
|
|
125138
125138
|
const files = module2.files ?? [];
|
|
125139
|
-
const normalizedName =
|
|
125139
|
+
const normalizedName = path46.normalize(name2);
|
|
125140
125140
|
const supportedFileInstrumentations = files.filter((f) => f.name === normalizedName && isSupported3(f.supportedVersions, version3, module2.includePrerelease));
|
|
125141
125141
|
return supportedFileInstrumentations.reduce((patchedExports, file) => {
|
|
125142
125142
|
file.moduleExports = patchedExports;
|
|
@@ -125182,8 +125182,8 @@ var init_instrumentation4 = __esm({
|
|
|
125182
125182
|
this._warnOnPreloadedModules();
|
|
125183
125183
|
for (const module2 of this._modules) {
|
|
125184
125184
|
const hookFn = (exports2, name2, baseDir) => {
|
|
125185
|
-
if (!baseDir &&
|
|
125186
|
-
const parsedPath =
|
|
125185
|
+
if (!baseDir && path46.isAbsolute(name2)) {
|
|
125186
|
+
const parsedPath = path46.parse(name2);
|
|
125187
125187
|
name2 = parsedPath.name;
|
|
125188
125188
|
baseDir = parsedPath.dir;
|
|
125189
125189
|
}
|
|
@@ -125192,7 +125192,7 @@ var init_instrumentation4 = __esm({
|
|
|
125192
125192
|
const onRequire = (exports2, name2, baseDir) => {
|
|
125193
125193
|
return this._onRequire(module2, exports2, name2, baseDir);
|
|
125194
125194
|
};
|
|
125195
|
-
const hook =
|
|
125195
|
+
const hook = path46.isAbsolute(module2.name) ? new import_require_in_the_middle6.Hook([module2.name], { internals: true }, onRequire) : this._requireInTheMiddleSingleton.register(module2.name, onRequire);
|
|
125196
125196
|
this._hooks.push(hook);
|
|
125197
125197
|
const esmHook = new import_import_in_the_middle3.Hook([module2.name], { internals: true }, hookFn);
|
|
125198
125198
|
this._hooks.push(esmHook);
|
|
@@ -126831,10 +126831,10 @@ var require_utils8 = __commonJS({
|
|
|
126831
126831
|
};
|
|
126832
126832
|
}
|
|
126833
126833
|
exports2.patchClientConnectCallback = patchClientConnectCallback;
|
|
126834
|
-
function
|
|
126834
|
+
function getErrorMessage3(e) {
|
|
126835
126835
|
return typeof e === "object" && e !== null && "message" in e ? String(e.message) : void 0;
|
|
126836
126836
|
}
|
|
126837
|
-
exports2.getErrorMessage =
|
|
126837
|
+
exports2.getErrorMessage = getErrorMessage3;
|
|
126838
126838
|
function isObjectWithTextString(it) {
|
|
126839
126839
|
return typeof it === "object" && typeof it?.text === "string";
|
|
126840
126840
|
}
|
|
@@ -128713,7 +128713,7 @@ var require_buffer_list = __commonJS({
|
|
|
128713
128713
|
}
|
|
128714
128714
|
}, {
|
|
128715
128715
|
key: "join",
|
|
128716
|
-
value: function
|
|
128716
|
+
value: function join31(s2) {
|
|
128717
128717
|
if (this.length === 0) return "";
|
|
128718
128718
|
var p2 = this.head;
|
|
128719
128719
|
var ret = "" + p2.data;
|
|
@@ -131631,7 +131631,7 @@ function formatHelp(command) {
|
|
|
131631
131631
|
" -c, --config <path> Config file path (default: ./config.json)",
|
|
131632
131632
|
" --reset Ignore remembered startup options and prompt again",
|
|
131633
131633
|
" --disable-auth Disable bearer auth for this run",
|
|
131634
|
-
" --qr-code Render a mobile
|
|
131634
|
+
" --qr-code Render a mobile REST/AAD pairing QR",
|
|
131635
131635
|
" --enable-ghc-tunnel Enable the GitHub Copilot Tunnel without prompting",
|
|
131636
131636
|
" --disable-ghc-tunnel Disable the GitHub Copilot Tunnel without prompting",
|
|
131637
131637
|
" -h, --help Show this help"
|
|
@@ -131665,7 +131665,7 @@ function formatHelp(command) {
|
|
|
131665
131665
|
" -c, --config <path> Config file path (default: ./config.json)",
|
|
131666
131666
|
" --reset Ignore remembered startup options and prompt again",
|
|
131667
131667
|
" --disable-auth Disable bearer auth for this run",
|
|
131668
|
-
" --qr-code Render a mobile
|
|
131668
|
+
" --qr-code Render a mobile REST/AAD pairing QR",
|
|
131669
131669
|
" --enable-ghc-tunnel Enable the GitHub Copilot Tunnel without prompting",
|
|
131670
131670
|
" --disable-ghc-tunnel Disable the GitHub Copilot Tunnel without prompting",
|
|
131671
131671
|
" -h, --help Show this help"
|
|
@@ -136523,11 +136523,11 @@ function persistNodeStartupTransport(storagePath, transport) {
|
|
|
136523
136523
|
transport
|
|
136524
136524
|
});
|
|
136525
136525
|
}
|
|
136526
|
-
function persistNodeStartupJoin(storagePath,
|
|
136526
|
+
function persistNodeStartupJoin(storagePath, join31) {
|
|
136527
136527
|
const startup = resolveNodeStartupMetadata(storagePath);
|
|
136528
136528
|
persistNodeStartupMetadata(storagePath, {
|
|
136529
136529
|
...startup,
|
|
136530
|
-
join:
|
|
136530
|
+
join: join31
|
|
136531
136531
|
});
|
|
136532
136532
|
}
|
|
136533
136533
|
function resolvePersistedDevTunnelId(storagePath, kind) {
|
|
@@ -137587,19 +137587,19 @@ async function fetchWithTimeout(url3, init, timeoutMs = DEFAULT_NODE_REQUEST_TIM
|
|
|
137587
137587
|
cleanup();
|
|
137588
137588
|
}
|
|
137589
137589
|
}
|
|
137590
|
-
async function fetchNodeWithFallback(node2,
|
|
137590
|
+
async function fetchNodeWithFallback(node2, path47, init, timeoutMs = DEFAULT_NODE_REQUEST_TIMEOUT_MS, trace2, options) {
|
|
137591
137591
|
let lastError;
|
|
137592
137592
|
const endpoints = getNodeRequestEndpoints(node2, options);
|
|
137593
137593
|
for (const [index2, endpoint] of endpoints.entries()) {
|
|
137594
137594
|
const attempt = index2 + 1;
|
|
137595
|
-
trace2?.onAttempt?.({ attempt, endpoint, path:
|
|
137595
|
+
trace2?.onAttempt?.({ attempt, endpoint, path: path47, timeoutMs, totalEndpoints: endpoints.length });
|
|
137596
137596
|
try {
|
|
137597
|
-
const response = await fetchWithTimeout(`${endpoint}${
|
|
137598
|
-
trace2?.onResponse?.({ attempt, endpoint, path:
|
|
137597
|
+
const response = await fetchWithTimeout(`${endpoint}${path47}`, init, timeoutMs);
|
|
137598
|
+
trace2?.onResponse?.({ attempt, endpoint, path: path47, response, timeoutMs, totalEndpoints: endpoints.length });
|
|
137599
137599
|
return { endpoint, response };
|
|
137600
137600
|
} catch (error2) {
|
|
137601
137601
|
lastError = error2;
|
|
137602
|
-
trace2?.onError?.({ attempt, endpoint, error: error2, path:
|
|
137602
|
+
trace2?.onError?.({ attempt, endpoint, error: error2, path: path47, timeoutMs, totalEndpoints: endpoints.length });
|
|
137603
137603
|
}
|
|
137604
137604
|
}
|
|
137605
137605
|
throw lastError instanceof Error ? lastError : new Error("No reachable node endpoint");
|
|
@@ -138854,11 +138854,21 @@ var PULL_DELIVERY_LEASE_MS = 15e3;
|
|
|
138854
138854
|
function getNodeMessagePayloadValue(message, key2) {
|
|
138855
138855
|
return typeof message.payload === "object" && message.payload !== null ? message.payload[key2] : void 0;
|
|
138856
138856
|
}
|
|
138857
|
+
function getNodeMessageTaskId(message) {
|
|
138858
|
+
const taskId = getNodeMessagePayloadValue(message, "taskId");
|
|
138859
|
+
if (typeof taskId === "string") return taskId;
|
|
138860
|
+
const task = getNodeMessagePayloadValue(message, "task");
|
|
138861
|
+
if (typeof task === "object" && task !== null) {
|
|
138862
|
+
const nestedTaskId = task.id;
|
|
138863
|
+
if (typeof nestedTaskId === "string") return nestedTaskId;
|
|
138864
|
+
}
|
|
138865
|
+
return void 0;
|
|
138866
|
+
}
|
|
138857
138867
|
function describeNodeMessage(message) {
|
|
138858
138868
|
return {
|
|
138859
138869
|
messageId: message.id,
|
|
138860
138870
|
kind: message.kind,
|
|
138861
|
-
taskId:
|
|
138871
|
+
taskId: getNodeMessageTaskId(message),
|
|
138862
138872
|
path: getNodeMessagePayloadValue(message, "path"),
|
|
138863
138873
|
expectsResponse: message.expectsResponse
|
|
138864
138874
|
};
|
|
@@ -138883,7 +138893,7 @@ var KeepaliveNodeMessageQueue = class {
|
|
|
138883
138893
|
for (const targetNodeId of targetNodeIds) {
|
|
138884
138894
|
const queued = this.queuedMessages.get(targetNodeId);
|
|
138885
138895
|
if (!queued || queued.length === 0) continue;
|
|
138886
|
-
const remaining = queued.filter((message) =>
|
|
138896
|
+
const remaining = queued.filter((message) => getNodeMessageTaskId(message) !== taskId);
|
|
138887
138897
|
removed += queued.length - remaining.length;
|
|
138888
138898
|
if (remaining.length > 0) this.queuedMessages.set(targetNodeId, remaining);
|
|
138889
138899
|
else this.queuedMessages.delete(targetNodeId);
|
|
@@ -138943,8 +138953,7 @@ var KeepaliveNodeMessageQueue = class {
|
|
|
138943
138953
|
}
|
|
138944
138954
|
leaseMessageForDelivery(nodeId, message, now) {
|
|
138945
138955
|
if (message.kind !== "task.execute") return true;
|
|
138946
|
-
const
|
|
138947
|
-
const taskId = typeof task === "object" && task !== null ? task.id : void 0;
|
|
138956
|
+
const taskId = getNodeMessageTaskId(message);
|
|
138948
138957
|
const key2 = `${nodeId}:task.execute:${taskId ?? message.id}`;
|
|
138949
138958
|
const leaseUntil = this.pullDeliveryLeases.get(key2) ?? 0;
|
|
138950
138959
|
if (leaseUntil > now) return false;
|
|
@@ -139030,6 +139039,8 @@ var NODE_KIND_BY_LEGACY = {
|
|
|
139030
139039
|
"node-terminal-session-get": "node.terminal.session.get",
|
|
139031
139040
|
"node-terminal-session-stop": "node.terminal.session.stop",
|
|
139032
139041
|
"node-sessions-list": "node.sessions.list",
|
|
139042
|
+
"node-sessions-hide": "node.sessions.hide",
|
|
139043
|
+
"node-sessions-hide-folder": "node.sessions.hide-folder",
|
|
139033
139044
|
"node-preview-session": "node.preview.create",
|
|
139034
139045
|
devtunnel: "node.transport.set",
|
|
139035
139046
|
"node-agent-upgrade": "node.agent.upgrade",
|
|
@@ -139813,9 +139824,9 @@ var DataRouter = class {
|
|
|
139813
139824
|
/**
|
|
139814
139825
|
* Returns true if the request should be proxied to the leader.
|
|
139815
139826
|
*/
|
|
139816
|
-
shouldProxy(method,
|
|
139827
|
+
shouldProxy(method, path47) {
|
|
139817
139828
|
if (this.election.isLeader()) return false;
|
|
139818
|
-
if (this.isExcludedPath(
|
|
139829
|
+
if (this.isExcludedPath(path47)) return false;
|
|
139819
139830
|
if (method.toUpperCase() === "GET") return false;
|
|
139820
139831
|
return WRITE_METHODS.has(method.toUpperCase());
|
|
139821
139832
|
}
|
|
@@ -139919,8 +139930,8 @@ var DataRouter = class {
|
|
|
139919
139930
|
};
|
|
139920
139931
|
}
|
|
139921
139932
|
// ── Helpers ───────────────────────────────────────────────────────────
|
|
139922
|
-
isExcludedPath(
|
|
139923
|
-
return EXCLUDED_PATH_PREFIXES.some((prefix) =>
|
|
139933
|
+
isExcludedPath(path47) {
|
|
139934
|
+
return EXCLUDED_PATH_PREFIXES.some((prefix) => path47.startsWith(prefix)) || EXCLUDED_PATH_SUFFIXES.some((suffix) => path47.endsWith(suffix));
|
|
139924
139935
|
}
|
|
139925
139936
|
};
|
|
139926
139937
|
|
|
@@ -140357,7 +140368,7 @@ function extractCopilotAssistantContent(event) {
|
|
|
140357
140368
|
activityContent.push({ type: "thinking", thinking: reasoning });
|
|
140358
140369
|
}
|
|
140359
140370
|
if (text10) {
|
|
140360
|
-
textContent.push({ type: "text", text: text10 });
|
|
140371
|
+
textContent.push({ type: "text", text: text10, phase: "final_answer" });
|
|
140361
140372
|
}
|
|
140362
140373
|
if (Array.isArray(data?.toolRequests)) {
|
|
140363
140374
|
for (const request2 of data.toolRequests) {
|
|
@@ -141565,6 +141576,9 @@ function isEmptyClaudeMessageEvent(event) {
|
|
|
141565
141576
|
function shouldSkipClaudeTranscriptEvent(event) {
|
|
141566
141577
|
return event.isMeta === true || event.isSidechain === true || event.type === "attachment" || event.type === "last-prompt" || isEmptyClaudeMessageEvent(event);
|
|
141567
141578
|
}
|
|
141579
|
+
function timestampClaudeTranscriptEvent(event) {
|
|
141580
|
+
return typeof event.timestamp === "string" && event.timestamp.trim().length > 0 ? event : { ...event, timestamp: (/* @__PURE__ */ new Date()).toISOString() };
|
|
141581
|
+
}
|
|
141568
141582
|
var ClaudeCodeEngine = class extends ExecutionEngine {
|
|
141569
141583
|
sessions = /* @__PURE__ */ new Map();
|
|
141570
141584
|
/** Rebuild in-memory sessions map from persisted task payloads. */
|
|
@@ -141633,8 +141647,9 @@ var ClaudeCodeEngine = class extends ExecutionEngine {
|
|
|
141633
141647
|
this.persistSession(task.id, event.session_id, cwd);
|
|
141634
141648
|
this.logger.info("Session established", { taskId: task.id, sessionId: event.session_id });
|
|
141635
141649
|
}
|
|
141636
|
-
|
|
141637
|
-
this.
|
|
141650
|
+
const outputEvent = timestampClaudeTranscriptEvent(event);
|
|
141651
|
+
this.emitOutput(task.id, outputEvent);
|
|
141652
|
+
this.appendLog(task.id, outputEvent);
|
|
141638
141653
|
} catch {
|
|
141639
141654
|
}
|
|
141640
141655
|
};
|
|
@@ -141761,8 +141776,9 @@ var ClaudeCodeEngine = class extends ExecutionEngine {
|
|
|
141761
141776
|
});
|
|
141762
141777
|
this.persistSession(taskId, event.session_id, session.cwd);
|
|
141763
141778
|
}
|
|
141764
|
-
|
|
141765
|
-
this.
|
|
141779
|
+
const outputEvent = timestampClaudeTranscriptEvent(event);
|
|
141780
|
+
this.emitOutput(taskId, outputEvent);
|
|
141781
|
+
this.appendLog(taskId, outputEvent);
|
|
141766
141782
|
} catch {
|
|
141767
141783
|
}
|
|
141768
141784
|
};
|
|
@@ -144812,6 +144828,7 @@ init_cjs_shims();
|
|
|
144812
144828
|
init_cjs_shims();
|
|
144813
144829
|
var MOBILE_PAIRING_QR_TYPE = "meshy.mobile.pairing";
|
|
144814
144830
|
var MOBILE_PAIRING_QR_VERSION = 3;
|
|
144831
|
+
var COMPACT_MOBILE_PAIRING_QR_TYPE = "mmp";
|
|
144815
144832
|
function buildPairingQrPayload(payload) {
|
|
144816
144833
|
return {
|
|
144817
144834
|
type: MOBILE_PAIRING_QR_TYPE,
|
|
@@ -144820,7 +144837,21 @@ function buildPairingQrPayload(payload) {
|
|
|
144820
144837
|
};
|
|
144821
144838
|
}
|
|
144822
144839
|
function serializePairingQrPayload(payload) {
|
|
144823
|
-
return JSON.stringify(
|
|
144840
|
+
return JSON.stringify({
|
|
144841
|
+
t: COMPACT_MOBILE_PAIRING_QR_TYPE,
|
|
144842
|
+
v: MOBILE_PAIRING_QR_VERSION,
|
|
144843
|
+
n: payload.nodeId,
|
|
144844
|
+
N: payload.nodeName,
|
|
144845
|
+
u: payload.apiBaseUrl,
|
|
144846
|
+
p: payload.pairingId,
|
|
144847
|
+
e: payload.expiresAt,
|
|
144848
|
+
m: payload.maxUses,
|
|
144849
|
+
a: {
|
|
144850
|
+
t: payload.aad.tenantId,
|
|
144851
|
+
c: payload.aad.clientId,
|
|
144852
|
+
s: payload.aad.scopes
|
|
144853
|
+
}
|
|
144854
|
+
});
|
|
144824
144855
|
}
|
|
144825
144856
|
|
|
144826
144857
|
// ../../packages/core/src/mobile-auth/audit.ts
|
|
@@ -145536,8 +145567,9 @@ var GitRemoteBranchOptionSchema = external_exports.object({
|
|
|
145536
145567
|
branch: external_exports.string(),
|
|
145537
145568
|
ref: external_exports.string()
|
|
145538
145569
|
});
|
|
145570
|
+
var NativeSessionAgentSchema = external_exports.enum(["codex", "claudecode", "copilot"]);
|
|
145539
145571
|
var NativeSessionSummarySchema = external_exports.object({
|
|
145540
|
-
agent:
|
|
145572
|
+
agent: NativeSessionAgentSchema,
|
|
145541
145573
|
sessionId: external_exports.string(),
|
|
145542
145574
|
cwd: external_exports.string(),
|
|
145543
145575
|
summary: external_exports.string(),
|
|
@@ -145574,9 +145606,17 @@ var NodeWorkDirBranchQuery = external_exports.object({
|
|
|
145574
145606
|
allowAbsolute: QueryBoolean
|
|
145575
145607
|
});
|
|
145576
145608
|
var NodeNativeSessionsQuery = external_exports.object({
|
|
145577
|
-
agent:
|
|
145609
|
+
agent: NativeSessionAgentSchema,
|
|
145578
145610
|
limit: external_exports.coerce.number().int().min(1).max(100).default(50)
|
|
145579
145611
|
});
|
|
145612
|
+
var NodeNativeSessionParams = external_exports.object({
|
|
145613
|
+
agent: NativeSessionAgentSchema,
|
|
145614
|
+
sessionId: external_exports.string().trim().min(1)
|
|
145615
|
+
});
|
|
145616
|
+
var HideNodeNativeSessionFolderBody = external_exports.object({
|
|
145617
|
+
agent: NativeSessionAgentSchema,
|
|
145618
|
+
cwd: external_exports.string().trim().min(1)
|
|
145619
|
+
});
|
|
145580
145620
|
var NodeTerminalSessionStartBody = external_exports.object({
|
|
145581
145621
|
command: external_exports.string().trim().min(1),
|
|
145582
145622
|
cwd: external_exports.string().trim().min(1).optional()
|
|
@@ -145623,9 +145663,22 @@ var CreateNodeWorkDirBranchResponse = NodeWorkDirBranchResponse.extend({
|
|
|
145623
145663
|
});
|
|
145624
145664
|
var NodeNativeSessionsResponse = external_exports.object({
|
|
145625
145665
|
nodeId: external_exports.string(),
|
|
145626
|
-
agent:
|
|
145666
|
+
agent: NativeSessionAgentSchema,
|
|
145627
145667
|
sessions: external_exports.array(NativeSessionSummarySchema)
|
|
145628
145668
|
});
|
|
145669
|
+
var HideNodeNativeSessionResponse = external_exports.object({
|
|
145670
|
+
ok: external_exports.literal(true),
|
|
145671
|
+
agent: NativeSessionAgentSchema,
|
|
145672
|
+
sessionId: external_exports.string(),
|
|
145673
|
+
hidden: external_exports.boolean()
|
|
145674
|
+
});
|
|
145675
|
+
var HideNodeNativeSessionFolderResponse = external_exports.object({
|
|
145676
|
+
ok: external_exports.literal(true),
|
|
145677
|
+
agent: NativeSessionAgentSchema,
|
|
145678
|
+
cwd: external_exports.string(),
|
|
145679
|
+
hidden: external_exports.boolean(),
|
|
145680
|
+
hiddenCount: external_exports.number().int().min(0)
|
|
145681
|
+
});
|
|
145629
145682
|
var NodeTerminalSessionResponse = external_exports.object({
|
|
145630
145683
|
id: external_exports.string(),
|
|
145631
145684
|
nodeId: external_exports.string(),
|
|
@@ -145830,8 +145883,8 @@ var BatchTaskIdsBody = external_exports.object({
|
|
|
145830
145883
|
|
|
145831
145884
|
// ../../packages/api/src/app/server.ts
|
|
145832
145885
|
init_cjs_shims();
|
|
145833
|
-
var
|
|
145834
|
-
var
|
|
145886
|
+
var path33 = __toESM(require("path"), 1);
|
|
145887
|
+
var fs28 = __toESM(require("fs"), 1);
|
|
145835
145888
|
var import_express18 = __toESM(require_express2(), 1);
|
|
145836
145889
|
|
|
145837
145890
|
// ../../packages/api/src/middleware/auth.ts
|
|
@@ -146058,8 +146111,8 @@ function decodePathSegment(value) {
|
|
|
146058
146111
|
return value;
|
|
146059
146112
|
}
|
|
146060
146113
|
}
|
|
146061
|
-
function getSingleTaskDeleteId(
|
|
146062
|
-
const match = /^\/api\/tasks\/([^/]+)$/.exec(
|
|
146114
|
+
function getSingleTaskDeleteId(path47) {
|
|
146115
|
+
const match = /^\/api\/tasks\/([^/]+)$/.exec(path47);
|
|
146063
146116
|
return match ? decodePathSegment(match[1]) : null;
|
|
146064
146117
|
}
|
|
146065
146118
|
function getSuccessfulBatchDeleteIds(body3) {
|
|
@@ -146235,14 +146288,14 @@ function createRequestLoggingMiddleware(rootLogger, options = {}) {
|
|
|
146235
146288
|
return;
|
|
146236
146289
|
}
|
|
146237
146290
|
const startedAt = process.hrtime.bigint();
|
|
146238
|
-
const
|
|
146291
|
+
const path47 = req.path;
|
|
146239
146292
|
let logged = false;
|
|
146240
146293
|
const logCompletion = (closed) => {
|
|
146241
146294
|
if (logged) return;
|
|
146242
146295
|
logged = true;
|
|
146243
146296
|
log2.info("request completed", {
|
|
146244
146297
|
method: req.method,
|
|
146245
|
-
path:
|
|
146298
|
+
path: path47,
|
|
146246
146299
|
statusCode: res.statusCode,
|
|
146247
146300
|
durationMs: durationMs(startedAt),
|
|
146248
146301
|
closed,
|
|
@@ -146320,14 +146373,14 @@ function createRequestTelemetryMiddleware(telemetry, options = {}) {
|
|
|
146320
146373
|
return;
|
|
146321
146374
|
}
|
|
146322
146375
|
const startedAt = process.hrtime.bigint();
|
|
146323
|
-
const
|
|
146376
|
+
const path47 = req.path;
|
|
146324
146377
|
let tracked = false;
|
|
146325
146378
|
const trackCompletion = (closed) => {
|
|
146326
146379
|
if (tracked) return;
|
|
146327
146380
|
tracked = true;
|
|
146328
146381
|
try {
|
|
146329
146382
|
const duration3 = durationMs2(startedAt);
|
|
146330
|
-
const route = resolveTelemetryRoute(
|
|
146383
|
+
const route = resolveTelemetryRoute(path47);
|
|
146331
146384
|
const dimensions = {
|
|
146332
146385
|
method: req.method,
|
|
146333
146386
|
routeGroup: route.routeGroup,
|
|
@@ -146911,7 +146964,8 @@ var fs18 = __toESM(require("fs"), 1);
|
|
|
146911
146964
|
var path23 = __toESM(require("path"), 1);
|
|
146912
146965
|
var MAX_INLINE_SIZE = 512 * 1024;
|
|
146913
146966
|
var HTML_FILE_EXTENSION = /\.html?$/i;
|
|
146914
|
-
var
|
|
146967
|
+
var README_FILE_NAME = /^readme\.mdx?$/i;
|
|
146968
|
+
var PREVIEW_IGNORED_DIRS = /* @__PURE__ */ new Set(["node_modules"]);
|
|
146915
146969
|
var TEXT_EXTENSIONS = /* @__PURE__ */ new Set([
|
|
146916
146970
|
".txt",
|
|
146917
146971
|
".log",
|
|
@@ -147109,7 +147163,7 @@ function detectHtmlEntries(root7) {
|
|
|
147109
147163
|
try {
|
|
147110
147164
|
const topLevel = fs18.readdirSync(root7, { withFileTypes: true });
|
|
147111
147165
|
entries.push(...collectHtmlPreviewEntries(topLevel, ""));
|
|
147112
|
-
const subdirs = topLevel.filter(
|
|
147166
|
+
const subdirs = topLevel.filter(isPreviewDirectory).sort((a, b) => a.name.localeCompare(b.name));
|
|
147113
147167
|
for (const dir of subdirs) {
|
|
147114
147168
|
const dirEntries = fs18.readdirSync(path23.join(root7, dir.name), { withFileTypes: true });
|
|
147115
147169
|
entries.push(...collectHtmlPreviewEntries(dirEntries, dir.name));
|
|
@@ -147118,6 +147172,9 @@ function detectHtmlEntries(root7) {
|
|
|
147118
147172
|
}
|
|
147119
147173
|
return entries;
|
|
147120
147174
|
}
|
|
147175
|
+
function isPreviewDirectory(entry) {
|
|
147176
|
+
return entry.isDirectory() && !entry.name.startsWith(".") && !PREVIEW_IGNORED_DIRS.has(entry.name);
|
|
147177
|
+
}
|
|
147121
147178
|
function collectHtmlPreviewEntries(entries, relativeDir) {
|
|
147122
147179
|
return entries.filter((entry) => entry.isFile() && !entry.name.startsWith(".") && HTML_FILE_EXTENSION.test(entry.name)).sort(comparePreviewEntryNames).map((entry) => {
|
|
147123
147180
|
const entryPath = relativeDir ? `${relativeDir}/${entry.name}` : entry.name;
|
|
@@ -147139,14 +147196,13 @@ function detectMarkdownEntries(root7) {
|
|
|
147139
147196
|
entries.push({ path: f.name, label: f.name });
|
|
147140
147197
|
}
|
|
147141
147198
|
}
|
|
147142
|
-
const subdirs = topLevel.filter(
|
|
147199
|
+
const subdirs = topLevel.filter(isPreviewDirectory).sort((a, b) => a.name.localeCompare(b.name));
|
|
147143
147200
|
for (const dir of subdirs) {
|
|
147144
|
-
|
|
147145
|
-
|
|
147146
|
-
|
|
147147
|
-
|
|
147148
|
-
|
|
147149
|
-
}
|
|
147201
|
+
const dirEntries = fs18.readdirSync(path23.join(root7, dir.name), { withFileTypes: true });
|
|
147202
|
+
const readme = dirEntries.filter((entry) => entry.isFile() && !entry.name.startsWith(".") && README_FILE_NAME.test(entry.name)).sort((a, b) => a.name.localeCompare(b.name))[0];
|
|
147203
|
+
if (readme) {
|
|
147204
|
+
const entryPath = `${dir.name}/${readme.name}`;
|
|
147205
|
+
entries.push({ path: entryPath, label: entryPath });
|
|
147150
147206
|
}
|
|
147151
147207
|
}
|
|
147152
147208
|
} catch {
|
|
@@ -149106,6 +149162,8 @@ var LEGACY_KIND_BY_NODE_MESSAGE = {
|
|
|
149106
149162
|
"node.terminal.session.get": "node-terminal-session-get",
|
|
149107
149163
|
"node.terminal.session.stop": "node-terminal-session-stop",
|
|
149108
149164
|
"node.sessions.list": "node-sessions-list",
|
|
149165
|
+
"node.sessions.hide": "node-sessions-hide",
|
|
149166
|
+
"node.sessions.hide-folder": "node-sessions-hide-folder",
|
|
149109
149167
|
"node.preview.create": "node-preview-session",
|
|
149110
149168
|
"node.transport.set": "devtunnel",
|
|
149111
149169
|
"node.agent.upgrade": "node-agent-upgrade",
|
|
@@ -149582,13 +149640,75 @@ ${err.message}` : err.message;
|
|
|
149582
149640
|
|
|
149583
149641
|
// ../../packages/api/src/node/node-native-session-service.ts
|
|
149584
149642
|
init_cjs_shims();
|
|
149585
|
-
|
|
149643
|
+
var fs23 = __toESM(require("fs"), 1);
|
|
149644
|
+
var path27 = __toESM(require("path"), 1);
|
|
149645
|
+
function defaultHiddenFile() {
|
|
149646
|
+
return { sessions: [], folders: [] };
|
|
149647
|
+
}
|
|
149648
|
+
function getHiddenFilePath(storagePath) {
|
|
149649
|
+
return path27.join(storagePath, "native-session-hidden.json");
|
|
149650
|
+
}
|
|
149651
|
+
function isNativeSessionAgent(value) {
|
|
149652
|
+
return value === "codex" || value === "claudecode" || value === "copilot";
|
|
149653
|
+
}
|
|
149654
|
+
function isHiddenSessionEntry(value) {
|
|
149655
|
+
return typeof value === "object" && value !== null && isNativeSessionAgent(value.agent) && typeof value.sessionId === "string" && typeof value.hiddenAt === "string";
|
|
149656
|
+
}
|
|
149657
|
+
function isHiddenFolderEntry(value) {
|
|
149658
|
+
return typeof value === "object" && value !== null && isNativeSessionAgent(value.agent) && typeof value.cwd === "string" && typeof value.hiddenAt === "string";
|
|
149659
|
+
}
|
|
149660
|
+
function readHiddenFile(storagePath) {
|
|
149661
|
+
if (!storagePath) return defaultHiddenFile();
|
|
149662
|
+
try {
|
|
149663
|
+
const parsed = JSON.parse(fs23.readFileSync(getHiddenFilePath(storagePath), "utf8"));
|
|
149664
|
+
return {
|
|
149665
|
+
sessions: Array.isArray(parsed.sessions) ? parsed.sessions.filter(isHiddenSessionEntry) : [],
|
|
149666
|
+
folders: Array.isArray(parsed.folders) ? parsed.folders.filter(isHiddenFolderEntry) : []
|
|
149667
|
+
};
|
|
149668
|
+
} catch {
|
|
149669
|
+
return defaultHiddenFile();
|
|
149670
|
+
}
|
|
149671
|
+
}
|
|
149672
|
+
function writeHiddenFile(storagePath, hidden) {
|
|
149673
|
+
fs23.mkdirSync(storagePath, { recursive: true });
|
|
149674
|
+
fs23.writeFileSync(getHiddenFilePath(storagePath), JSON.stringify(hidden, null, 2) + "\n", "utf8");
|
|
149675
|
+
}
|
|
149676
|
+
function isHiddenSession(session, hidden) {
|
|
149677
|
+
return hidden.sessions.some((entry) => entry.agent === session.agent && entry.sessionId === session.sessionId) || hidden.folders.some((entry) => entry.agent === session.agent && entry.cwd === session.cwd);
|
|
149678
|
+
}
|
|
149679
|
+
function getLocalNodeNativeSessions(nodeId, agent, limit, storagePath) {
|
|
149680
|
+
const hidden = readHiddenFile(storagePath);
|
|
149586
149681
|
return {
|
|
149587
149682
|
nodeId,
|
|
149588
149683
|
agent,
|
|
149589
|
-
sessions: listNativeSessions({ agent, limit })
|
|
149684
|
+
sessions: listNativeSessions({ agent, limit }).filter((session) => !isHiddenSession(session, hidden))
|
|
149590
149685
|
};
|
|
149591
149686
|
}
|
|
149687
|
+
function hideLocalNodeNativeSession(input) {
|
|
149688
|
+
if (!input.storagePath) {
|
|
149689
|
+
return { ok: true, agent: input.agent, sessionId: input.sessionId, hidden: false };
|
|
149690
|
+
}
|
|
149691
|
+
const hidden = readHiddenFile(input.storagePath);
|
|
149692
|
+
const exists = hidden.sessions.some((entry) => entry.agent === input.agent && entry.sessionId === input.sessionId);
|
|
149693
|
+
if (!exists) {
|
|
149694
|
+
hidden.sessions.push({ agent: input.agent, sessionId: input.sessionId, hiddenAt: (/* @__PURE__ */ new Date()).toISOString() });
|
|
149695
|
+
writeHiddenFile(input.storagePath, hidden);
|
|
149696
|
+
}
|
|
149697
|
+
return { ok: true, agent: input.agent, sessionId: input.sessionId, hidden: true };
|
|
149698
|
+
}
|
|
149699
|
+
function hideLocalNodeNativeSessionFolder(input) {
|
|
149700
|
+
const visibleCount = getLocalNodeNativeSessions("local", input.agent, 100, input.storagePath).sessions.filter((session) => session.cwd === input.cwd).length;
|
|
149701
|
+
if (!input.storagePath) {
|
|
149702
|
+
return { ok: true, agent: input.agent, cwd: input.cwd, hidden: false, hiddenCount: 0 };
|
|
149703
|
+
}
|
|
149704
|
+
const hidden = readHiddenFile(input.storagePath);
|
|
149705
|
+
const exists = hidden.folders.some((entry) => entry.agent === input.agent && entry.cwd === input.cwd);
|
|
149706
|
+
if (!exists) {
|
|
149707
|
+
hidden.folders.push({ agent: input.agent, cwd: input.cwd, hiddenAt: (/* @__PURE__ */ new Date()).toISOString() });
|
|
149708
|
+
writeHiddenFile(input.storagePath, hidden);
|
|
149709
|
+
}
|
|
149710
|
+
return { ok: true, agent: input.agent, cwd: input.cwd, hidden: true, hiddenCount: visibleCount };
|
|
149711
|
+
}
|
|
149592
149712
|
|
|
149593
149713
|
// ../../packages/api/src/tasks/task-cancellation.ts
|
|
149594
149714
|
init_cjs_shims();
|
|
@@ -149652,8 +149772,8 @@ function cancelTaskOnCurrentNode(deps, taskId, options = {}) {
|
|
|
149652
149772
|
|
|
149653
149773
|
// ../../packages/api/src/tasks/task-output-service.ts
|
|
149654
149774
|
init_cjs_shims();
|
|
149655
|
-
var
|
|
149656
|
-
var
|
|
149775
|
+
var fs25 = __toESM(require("fs"), 1);
|
|
149776
|
+
var path30 = __toESM(require("path"), 1);
|
|
149657
149777
|
|
|
149658
149778
|
// ../../packages/api/src/preview/index.ts
|
|
149659
149779
|
init_cjs_shims();
|
|
@@ -149661,8 +149781,8 @@ init_cjs_shims();
|
|
|
149661
149781
|
// ../../packages/api/src/preview/preview-server.ts
|
|
149662
149782
|
init_cjs_shims();
|
|
149663
149783
|
var crypto5 = __toESM(require("crypto"), 1);
|
|
149664
|
-
var
|
|
149665
|
-
var
|
|
149784
|
+
var fs24 = __toESM(require("fs"), 1);
|
|
149785
|
+
var path29 = __toESM(require("path"), 1);
|
|
149666
149786
|
var http2 = __toESM(require("http"), 1);
|
|
149667
149787
|
var import_node_stream4 = require("stream");
|
|
149668
149788
|
var import_promises6 = require("stream/promises");
|
|
@@ -162060,7 +162180,7 @@ function transformGfmAutolinkLiterals(tree) {
|
|
|
162060
162180
|
{ ignore: ["link", "linkReference"] }
|
|
162061
162181
|
);
|
|
162062
162182
|
}
|
|
162063
|
-
function findUrl(_, protocol, domain2,
|
|
162183
|
+
function findUrl(_, protocol, domain2, path47, match) {
|
|
162064
162184
|
let prefix = "";
|
|
162065
162185
|
if (!previous(match)) {
|
|
162066
162186
|
return false;
|
|
@@ -162073,7 +162193,7 @@ function findUrl(_, protocol, domain2, path46, match) {
|
|
|
162073
162193
|
if (!isCorrectDomain(domain2)) {
|
|
162074
162194
|
return false;
|
|
162075
162195
|
}
|
|
162076
|
-
const parts = splitUrl(domain2 +
|
|
162196
|
+
const parts = splitUrl(domain2 + path47);
|
|
162077
162197
|
if (!parts[0]) return false;
|
|
162078
162198
|
const result = {
|
|
162079
162199
|
type: "link",
|
|
@@ -166023,7 +166143,7 @@ var domain = {
|
|
|
166023
166143
|
tokenize: tokenizeDomain,
|
|
166024
166144
|
partial: true
|
|
166025
166145
|
};
|
|
166026
|
-
var
|
|
166146
|
+
var path28 = {
|
|
166027
166147
|
tokenize: tokenizePath,
|
|
166028
166148
|
partial: true
|
|
166029
166149
|
};
|
|
@@ -166129,7 +166249,7 @@ function tokenizeWwwAutolink(effects, ok3, nok) {
|
|
|
166129
166249
|
}
|
|
166130
166250
|
effects.enter("literalAutolink");
|
|
166131
166251
|
effects.enter("literalAutolinkWww");
|
|
166132
|
-
return effects.check(wwwPrefix, effects.attempt(domain, effects.attempt(
|
|
166252
|
+
return effects.check(wwwPrefix, effects.attempt(domain, effects.attempt(path28, wwwAfter), nok), nok)(code4);
|
|
166133
166253
|
}
|
|
166134
166254
|
function wwwAfter(code4) {
|
|
166135
166255
|
effects.exit("literalAutolinkWww");
|
|
@@ -166179,7 +166299,7 @@ function tokenizeProtocolAutolink(effects, ok3, nok) {
|
|
|
166179
166299
|
return nok(code4);
|
|
166180
166300
|
}
|
|
166181
166301
|
function afterProtocol(code4) {
|
|
166182
|
-
return code4 === null || asciiControl(code4) || markdownLineEndingOrSpace(code4) || unicodeWhitespace(code4) || unicodePunctuation(code4) ? nok(code4) : effects.attempt(domain, effects.attempt(
|
|
166302
|
+
return code4 === null || asciiControl(code4) || markdownLineEndingOrSpace(code4) || unicodeWhitespace(code4) || unicodePunctuation(code4) ? nok(code4) : effects.attempt(domain, effects.attempt(path28, protocolAfter), nok)(code4);
|
|
166183
166303
|
}
|
|
166184
166304
|
function protocolAfter(code4) {
|
|
166185
166305
|
effects.exit("literalAutolinkHttp");
|
|
@@ -173396,13 +173516,13 @@ var VFile = class {
|
|
|
173396
173516
|
* @returns {undefined}
|
|
173397
173517
|
* Nothing.
|
|
173398
173518
|
*/
|
|
173399
|
-
set path(
|
|
173400
|
-
if (isUrl(
|
|
173401
|
-
|
|
173519
|
+
set path(path47) {
|
|
173520
|
+
if (isUrl(path47)) {
|
|
173521
|
+
path47 = (0, import_node_url.fileURLToPath)(path47);
|
|
173402
173522
|
}
|
|
173403
|
-
assertNonEmpty(
|
|
173404
|
-
if (this.path !==
|
|
173405
|
-
this.history.push(
|
|
173523
|
+
assertNonEmpty(path47, "path");
|
|
173524
|
+
if (this.path !== path47) {
|
|
173525
|
+
this.history.push(path47);
|
|
173406
173526
|
}
|
|
173407
173527
|
}
|
|
173408
173528
|
/**
|
|
@@ -173669,8 +173789,8 @@ function assertNonEmpty(part, name2) {
|
|
|
173669
173789
|
throw new Error("`" + name2 + "` cannot be empty");
|
|
173670
173790
|
}
|
|
173671
173791
|
}
|
|
173672
|
-
function assertPath(
|
|
173673
|
-
if (!
|
|
173792
|
+
function assertPath(path47, name2) {
|
|
173793
|
+
if (!path47) {
|
|
173674
173794
|
throw new Error("Setting `" + name2 + "` requires `path` to be set too");
|
|
173675
173795
|
}
|
|
173676
173796
|
}
|
|
@@ -174454,19 +174574,19 @@ function buildPreviewWorkerProxyHeaders(req) {
|
|
|
174454
174574
|
// ../../packages/api/src/preview/preview-server.ts
|
|
174455
174575
|
function resolvePreviewPath(rootPath, relativePath) {
|
|
174456
174576
|
const sanitizedPath = relativePath.replace(/\\/g, "/");
|
|
174457
|
-
const resolvedPath =
|
|
174458
|
-
const normalizedRoot =
|
|
174459
|
-
if (!resolvedPath.startsWith(normalizedRoot +
|
|
174577
|
+
const resolvedPath = path29.resolve(rootPath, sanitizedPath);
|
|
174578
|
+
const normalizedRoot = path29.resolve(rootPath);
|
|
174579
|
+
if (!resolvedPath.startsWith(normalizedRoot + path29.sep) && resolvedPath !== normalizedRoot) {
|
|
174460
174580
|
throw new Error("Invalid preview path");
|
|
174461
174581
|
}
|
|
174462
174582
|
return {
|
|
174463
174583
|
absolutePath: resolvedPath,
|
|
174464
|
-
normalizedPath:
|
|
174584
|
+
normalizedPath: path29.relative(normalizedRoot, resolvedPath).split(path29.sep).join("/")
|
|
174465
174585
|
};
|
|
174466
174586
|
}
|
|
174467
174587
|
function resolvePreviewEntryPath(rootPath, entryPath) {
|
|
174468
174588
|
const { absolutePath, normalizedPath } = resolvePreviewPath(rootPath, entryPath ?? "index.html");
|
|
174469
|
-
if (!
|
|
174589
|
+
if (!fs24.existsSync(absolutePath) || !fs24.statSync(absolutePath).isFile()) {
|
|
174470
174590
|
throw new Error("Preview entry not found");
|
|
174471
174591
|
}
|
|
174472
174592
|
return normalizedPath;
|
|
@@ -174568,7 +174688,7 @@ var MIME_MAP2 = {
|
|
|
174568
174688
|
".mdx": "text/markdown"
|
|
174569
174689
|
};
|
|
174570
174690
|
function getMime(filePath) {
|
|
174571
|
-
return MIME_MAP2[
|
|
174691
|
+
return MIME_MAP2[path29.extname(filePath).toLowerCase()] ?? "application/octet-stream";
|
|
174572
174692
|
}
|
|
174573
174693
|
function escapeHtml(value) {
|
|
174574
174694
|
return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
@@ -174870,14 +174990,14 @@ async function sendPreviewAssetResponse(sessionManager, token, requestedPath, re
|
|
|
174870
174990
|
res.end("Invalid path");
|
|
174871
174991
|
return;
|
|
174872
174992
|
}
|
|
174873
|
-
if (!
|
|
174993
|
+
if (!fs24.existsSync(resolved) || !fs24.statSync(resolved).isFile()) {
|
|
174874
174994
|
res.writeHead(404, { "Content-Type": "text/plain" });
|
|
174875
174995
|
res.end("File not found");
|
|
174876
174996
|
return;
|
|
174877
174997
|
}
|
|
174878
|
-
const ext =
|
|
174998
|
+
const ext = path29.extname(resolved).toLowerCase();
|
|
174879
174999
|
const mime = ext === ".md" || ext === ".mdx" ? "text/html" : getMime(resolved);
|
|
174880
|
-
const content3 = ext === ".md" || ext === ".mdx" ? renderMarkdownDocument(
|
|
175000
|
+
const content3 = ext === ".md" || ext === ".mdx" ? renderMarkdownDocument(fs24.readFileSync(resolved, "utf8"), path29.basename(resolved)) : fs24.readFileSync(resolved);
|
|
174881
175001
|
res.writeHead(200, {
|
|
174882
175002
|
"Content-Type": mime,
|
|
174883
175003
|
"Content-Length": content3.length,
|
|
@@ -175207,13 +175327,13 @@ function getLocalTaskOutputDownload(taskEngine, taskId, filePath) {
|
|
|
175207
175327
|
const rootPath = getTaskOutputRoot(taskEngine, taskId);
|
|
175208
175328
|
try {
|
|
175209
175329
|
const absolutePath = resolveOutputPath(rootPath, filePath);
|
|
175210
|
-
if (!
|
|
175330
|
+
if (!fs25.existsSync(absolutePath) || !fs25.statSync(absolutePath).isFile()) {
|
|
175211
175331
|
throw new MeshyError("TASK_NOT_FOUND", `File not found: ${filePath}`, 404);
|
|
175212
175332
|
}
|
|
175213
175333
|
const { mimeType } = classifyFile(absolutePath);
|
|
175214
|
-
const fileName =
|
|
175334
|
+
const fileName = path30.basename(absolutePath).replace(/"/g, "");
|
|
175215
175335
|
return {
|
|
175216
|
-
content:
|
|
175336
|
+
content: fs25.readFileSync(absolutePath),
|
|
175217
175337
|
headers: {
|
|
175218
175338
|
"Content-Type": mimeType,
|
|
175219
175339
|
"Content-Disposition": `inline; filename="${fileName}"`,
|
|
@@ -175299,8 +175419,8 @@ async function createNodePreviewSessionPayload(deps, nodeId, options, requestOri
|
|
|
175299
175419
|
|
|
175300
175420
|
// ../../packages/api/src/node/capability-service.ts
|
|
175301
175421
|
init_cjs_shims();
|
|
175302
|
-
var
|
|
175303
|
-
var
|
|
175422
|
+
var fs26 = __toESM(require("fs"), 1);
|
|
175423
|
+
var path31 = __toESM(require("path"), 1);
|
|
175304
175424
|
function getCapabilityService(deps) {
|
|
175305
175425
|
if (deps.capabilityService) return deps.capabilityService;
|
|
175306
175426
|
deps.capabilityService = createDefaultCapabilityService({
|
|
@@ -175310,8 +175430,8 @@ function getCapabilityService(deps) {
|
|
|
175310
175430
|
}
|
|
175311
175431
|
function createKnownProjectPredicate(deps) {
|
|
175312
175432
|
return (projectPath) => {
|
|
175313
|
-
const resolved =
|
|
175314
|
-
if (collectKnownProjectPaths(deps).has(resolved)) return
|
|
175433
|
+
const resolved = path31.resolve(projectPath);
|
|
175434
|
+
if (collectKnownProjectPaths(deps).has(resolved)) return fs26.existsSync(resolved);
|
|
175315
175435
|
const self2 = deps.nodeRegistry.getSelf();
|
|
175316
175436
|
const workDir = self2.workDir ?? deps.workDir;
|
|
175317
175437
|
if (!workDir) return false;
|
|
@@ -175326,15 +175446,15 @@ function collectKnownProjectPaths(deps) {
|
|
|
175326
175446
|
const paths = /* @__PURE__ */ new Set();
|
|
175327
175447
|
const workDir = self2.workDir ?? deps.workDir;
|
|
175328
175448
|
if (workDir) {
|
|
175329
|
-
const resolvedWorkDir =
|
|
175449
|
+
const resolvedWorkDir = path31.resolve(workDir);
|
|
175330
175450
|
paths.add(resolvedWorkDir);
|
|
175331
175451
|
for (const folder of self2.workDirFolders ?? []) {
|
|
175332
|
-
paths.add(
|
|
175452
|
+
paths.add(path31.resolve(resolvedWorkDir, folder));
|
|
175333
175453
|
}
|
|
175334
175454
|
}
|
|
175335
175455
|
const tasks = safeListTasks(deps);
|
|
175336
175456
|
for (const task of tasks) {
|
|
175337
|
-
if (task.effectiveProjectPath) paths.add(
|
|
175457
|
+
if (task.effectiveProjectPath) paths.add(path31.resolve(task.effectiveProjectPath));
|
|
175338
175458
|
}
|
|
175339
175459
|
return paths;
|
|
175340
175460
|
}
|
|
@@ -175346,13 +175466,13 @@ function safeListTasks(deps) {
|
|
|
175346
175466
|
}
|
|
175347
175467
|
}
|
|
175348
175468
|
function isPathInsideOrEqual(parentPath, childPath) {
|
|
175349
|
-
const relative6 =
|
|
175350
|
-
return relative6 === "" || !!relative6 && !relative6.startsWith("..") && !
|
|
175469
|
+
const relative6 = path31.relative(parentPath, childPath);
|
|
175470
|
+
return relative6 === "" || !!relative6 && !relative6.startsWith("..") && !path31.isAbsolute(relative6);
|
|
175351
175471
|
}
|
|
175352
175472
|
function realpathExistingDirectory(value) {
|
|
175353
175473
|
try {
|
|
175354
|
-
if (!
|
|
175355
|
-
return
|
|
175474
|
+
if (!fs26.statSync(value).isDirectory()) return null;
|
|
175475
|
+
return fs26.realpathSync(value);
|
|
175356
175476
|
} catch {
|
|
175357
175477
|
return null;
|
|
175358
175478
|
}
|
|
@@ -175527,11 +175647,38 @@ async function executeWorkerControlRequest(deps, request2) {
|
|
|
175527
175647
|
getLocalNodeNativeSessions(
|
|
175528
175648
|
self2.id,
|
|
175529
175649
|
agent === "claudecode" || agent === "copilot" ? agent : "codex",
|
|
175530
|
-
payloadValue(request2, "limit", 50)
|
|
175650
|
+
payloadValue(request2, "limit", 50),
|
|
175651
|
+
deps.storagePath
|
|
175531
175652
|
)
|
|
175532
175653
|
);
|
|
175533
175654
|
break;
|
|
175534
175655
|
}
|
|
175656
|
+
case "node.sessions.hide": {
|
|
175657
|
+
const self2 = deps.nodeRegistry.getSelf();
|
|
175658
|
+
const agent = payloadValue(request2, "agent", "codex");
|
|
175659
|
+
const normalizedAgent = agent === "claudecode" || agent === "copilot" ? agent : "codex";
|
|
175660
|
+
const sessionId = payloadValue(request2, "sessionId", "");
|
|
175661
|
+
response = jsonResponse(request2.id, 200, hideLocalNodeNativeSession({
|
|
175662
|
+
storagePath: deps.storagePath,
|
|
175663
|
+
agent: normalizedAgent,
|
|
175664
|
+
sessionId
|
|
175665
|
+
}));
|
|
175666
|
+
deps.eventBus.emit("node.nativeSessions.changed", { nodeId: self2.id, agent: normalizedAgent, sessionId });
|
|
175667
|
+
break;
|
|
175668
|
+
}
|
|
175669
|
+
case "node.sessions.hide-folder": {
|
|
175670
|
+
const self2 = deps.nodeRegistry.getSelf();
|
|
175671
|
+
const agent = payloadValue(request2, "agent", "codex");
|
|
175672
|
+
const normalizedAgent = agent === "claudecode" || agent === "copilot" ? agent : "codex";
|
|
175673
|
+
const cwd = payloadValue(request2, "cwd", "");
|
|
175674
|
+
response = jsonResponse(request2.id, 200, hideLocalNodeNativeSessionFolder({
|
|
175675
|
+
storagePath: deps.storagePath,
|
|
175676
|
+
agent: normalizedAgent,
|
|
175677
|
+
cwd
|
|
175678
|
+
}));
|
|
175679
|
+
deps.eventBus.emit("node.nativeSessions.changed", { nodeId: self2.id, agent: normalizedAgent, cwd });
|
|
175680
|
+
break;
|
|
175681
|
+
}
|
|
175535
175682
|
case "node.preview.create": {
|
|
175536
175683
|
const self2 = deps.nodeRegistry.getSelf();
|
|
175537
175684
|
const previewPath = payloadValue(request2, "path", void 0);
|
|
@@ -175819,14 +175966,127 @@ function sendWorkerControlResponse(res, response) {
|
|
|
175819
175966
|
// ../../packages/api/src/routes/node-native-sessions.ts
|
|
175820
175967
|
init_cjs_shims();
|
|
175821
175968
|
var import_express4 = __toESM(require_express2(), 1);
|
|
175822
|
-
|
|
175823
|
-
|
|
175969
|
+
var NODE_NATIVE_SESSIONS_PROXY_TIMEOUT_MS = 1e4;
|
|
175970
|
+
function describeProxyError2(error2) {
|
|
175971
|
+
if (error2 instanceof Error) {
|
|
175972
|
+
return {
|
|
175973
|
+
errorName: error2.name,
|
|
175974
|
+
errorMessage: error2.message,
|
|
175975
|
+
errorCategory: error2.name === "AbortError" || /timeout|aborted/i.test(error2.message) ? "timeout" : "network"
|
|
175976
|
+
};
|
|
175977
|
+
}
|
|
175978
|
+
return { errorName: "UnknownError", errorMessage: String(error2), errorCategory: "unknown" };
|
|
175979
|
+
}
|
|
175980
|
+
function createNativeSessionProxyTrace(log2, nodeId, proxyPath) {
|
|
175981
|
+
return {
|
|
175982
|
+
onAttempt: ({ attempt, endpoint, timeoutMs, totalEndpoints }) => {
|
|
175983
|
+
log2.debug("node native sessions proxy attempt", { nodeId, proxyPath, endpoint, attempt, totalEndpoints, timeoutMs });
|
|
175984
|
+
},
|
|
175985
|
+
onResponse: ({ attempt, endpoint, response, timeoutMs, totalEndpoints }) => {
|
|
175986
|
+
log2.info("node native sessions proxy response", { nodeId, proxyPath, endpoint, attempt, totalEndpoints, timeoutMs, ok: response.ok, statusCode: response.status });
|
|
175987
|
+
},
|
|
175988
|
+
onError: ({ attempt, endpoint, error: error2, timeoutMs, totalEndpoints }) => {
|
|
175989
|
+
log2.warn("node native sessions proxy attempt failed", { nodeId, proxyPath, endpoint, attempt, totalEndpoints, timeoutMs, ...describeProxyError2(error2) });
|
|
175990
|
+
}
|
|
175991
|
+
};
|
|
175992
|
+
}
|
|
175993
|
+
function emitNativeSessionsChanged(req, payload) {
|
|
175994
|
+
const deps = req.app.locals.deps;
|
|
175995
|
+
deps.eventBus?.emit("node.nativeSessions.changed", payload);
|
|
175996
|
+
}
|
|
175997
|
+
function getStoragePath(req) {
|
|
175998
|
+
const deps = req.app.locals.deps;
|
|
175999
|
+
return deps.storagePath;
|
|
176000
|
+
}
|
|
176001
|
+
function requireLocalNode(req, nodeId, options) {
|
|
175824
176002
|
const { nodeRegistry } = req.app.locals.deps;
|
|
175825
176003
|
const self2 = nodeRegistry.getSelf();
|
|
175826
176004
|
if (options.requireSelfNode && nodeId !== self2.id) {
|
|
175827
176005
|
throw new MeshyError("NODE_NOT_FOUND", `Node ${nodeId} not found`, 404);
|
|
175828
176006
|
}
|
|
175829
|
-
|
|
176007
|
+
return self2.id;
|
|
176008
|
+
}
|
|
176009
|
+
function sendLocalNodeNativeSessions(req, res, nodeId, options = {}) {
|
|
176010
|
+
const query = NodeNativeSessionsQuery.parse(req.query);
|
|
176011
|
+
const selfId = requireLocalNode(req, nodeId, options);
|
|
176012
|
+
res.json(getLocalNodeNativeSessions(selfId, query.agent, query.limit, getStoragePath(req)));
|
|
176013
|
+
}
|
|
176014
|
+
function sendLocalNodeNativeSessionHide(req, res, nodeId, options = {}) {
|
|
176015
|
+
const params = NodeNativeSessionParams.parse(req.params);
|
|
176016
|
+
const selfId = requireLocalNode(req, nodeId, options);
|
|
176017
|
+
const result = hideLocalNodeNativeSession({ storagePath: getStoragePath(req), agent: params.agent, sessionId: params.sessionId });
|
|
176018
|
+
emitNativeSessionsChanged(req, { nodeId: selfId, agent: params.agent, sessionId: params.sessionId });
|
|
176019
|
+
res.json(result);
|
|
176020
|
+
}
|
|
176021
|
+
function sendLocalNodeNativeSessionFolderHide(req, res, nodeId, options = {}) {
|
|
176022
|
+
const body3 = HideNodeNativeSessionFolderBody.parse(req.body);
|
|
176023
|
+
const selfId = requireLocalNode(req, nodeId, options);
|
|
176024
|
+
const result = hideLocalNodeNativeSessionFolder({ storagePath: getStoragePath(req), agent: body3.agent, cwd: body3.cwd });
|
|
176025
|
+
emitNativeSessionsChanged(req, { nodeId: selfId, agent: body3.agent, cwd: body3.cwd });
|
|
176026
|
+
res.json(result);
|
|
176027
|
+
}
|
|
176028
|
+
async function proxyOrFallbackRemoteNativeSessionRequest(req, res, nodeId, fallbackRequest, actionLabel, changedPayload) {
|
|
176029
|
+
const { nodeRegistry, heartbeat, logger: rootLogger } = req.app.locals.deps;
|
|
176030
|
+
const selfId = nodeRegistry.getSelf().id;
|
|
176031
|
+
if (nodeId === selfId) return false;
|
|
176032
|
+
const node2 = nodeRegistry.getNode(nodeId);
|
|
176033
|
+
if (!node2) throw new MeshyError("NODE_NOT_FOUND", `Node ${nodeId} not found`, 404);
|
|
176034
|
+
const log2 = rootLogger.child("nodes/native-sessions");
|
|
176035
|
+
const proxyPath = req.originalUrl ?? `/api/nodes/${nodeId}/native-sessions`;
|
|
176036
|
+
const canPushToNode = heartbeat?.canPushToNode?.(nodeId) ?? true;
|
|
176037
|
+
if (!canPushToNode && canRequestNodeMessage(heartbeat)) {
|
|
176038
|
+
log2.warn(`node native sessions ${actionLabel} falling back to keepalive control`, { nodeId, proxyPath });
|
|
176039
|
+
const controlResponse = await requestFallbackNodeMessage(heartbeat, nodeId, fallbackRequest);
|
|
176040
|
+
if (controlResponse.ok && changedPayload) emitNativeSessionsChanged(req, changedPayload);
|
|
176041
|
+
sendWorkerControlResponse(res, controlResponse);
|
|
176042
|
+
return true;
|
|
176043
|
+
}
|
|
176044
|
+
try {
|
|
176045
|
+
const body3 = req.method === "GET" || req.method === "DELETE" ? void 0 : JSON.stringify(req.body ?? {});
|
|
176046
|
+
const { endpoint, response } = await fetchNodeWithFallback(
|
|
176047
|
+
node2,
|
|
176048
|
+
proxyPath,
|
|
176049
|
+
body3 ? { method: req.method, headers: { "Content-Type": "application/json" }, body: body3 } : { method: req.method },
|
|
176050
|
+
NODE_NATIVE_SESSIONS_PROXY_TIMEOUT_MS,
|
|
176051
|
+
createNativeSessionProxyTrace(log2, nodeId, proxyPath),
|
|
176052
|
+
{ preferPublicEndpoint: true }
|
|
176053
|
+
);
|
|
176054
|
+
log2.debug(`proxying node native sessions ${actionLabel} request`, { nodeId, endpoint, proxyPath });
|
|
176055
|
+
if (response.ok && changedPayload) emitNativeSessionsChanged(req, changedPayload);
|
|
176056
|
+
await sendProxyResponse(res, response);
|
|
176057
|
+
return true;
|
|
176058
|
+
} catch (err) {
|
|
176059
|
+
const errorDetails2 = describeProxyError2(err);
|
|
176060
|
+
log2.warn(`node native sessions ${actionLabel} proxy error`, { nodeId, proxyPath, timeoutMs: NODE_NATIVE_SESSIONS_PROXY_TIMEOUT_MS, ...errorDetails2 });
|
|
176061
|
+
if (canRequestNodeMessage(heartbeat)) {
|
|
176062
|
+
const controlResponse = await requestFallbackNodeMessage(heartbeat, nodeId, fallbackRequest);
|
|
176063
|
+
if (controlResponse.ok && changedPayload) emitNativeSessionsChanged(req, changedPayload);
|
|
176064
|
+
sendWorkerControlResponse(res, controlResponse);
|
|
176065
|
+
return true;
|
|
176066
|
+
}
|
|
176067
|
+
throw new MeshyError("NODE_OFFLINE", `Cannot reach node ${nodeId} to ${actionLabel} its native sessions`, 502);
|
|
176068
|
+
}
|
|
176069
|
+
}
|
|
176070
|
+
async function maybeHandleRemoteNodeNativeSessionsRequest(req, res, nodeId) {
|
|
176071
|
+
const query = NodeNativeSessionsQuery.parse(req.query);
|
|
176072
|
+
return proxyOrFallbackRemoteNativeSessionRequest(req, res, nodeId, createNodeMessage("node.sessions.list", {
|
|
176073
|
+
agent: query.agent,
|
|
176074
|
+
limit: query.limit
|
|
176075
|
+
}, { expectsResponse: true }), "list");
|
|
176076
|
+
}
|
|
176077
|
+
async function maybeHandleRemoteNodeNativeSessionHide(req, res, nodeId) {
|
|
176078
|
+
const params = NodeNativeSessionParams.parse(req.params);
|
|
176079
|
+
return proxyOrFallbackRemoteNativeSessionRequest(req, res, nodeId, createNodeMessage("node.sessions.hide", {
|
|
176080
|
+
agent: params.agent,
|
|
176081
|
+
sessionId: params.sessionId
|
|
176082
|
+
}, { expectsResponse: true }), "hide", { nodeId, agent: params.agent, sessionId: params.sessionId });
|
|
176083
|
+
}
|
|
176084
|
+
async function maybeHandleRemoteNodeNativeSessionFolderHide(req, res, nodeId) {
|
|
176085
|
+
const body3 = HideNodeNativeSessionFolderBody.parse(req.body);
|
|
176086
|
+
return proxyOrFallbackRemoteNativeSessionRequest(req, res, nodeId, createNodeMessage("node.sessions.hide-folder", {
|
|
176087
|
+
agent: body3.agent,
|
|
176088
|
+
cwd: body3.cwd
|
|
176089
|
+
}, { expectsResponse: true }), "hide", { nodeId, agent: body3.agent, cwd: body3.cwd });
|
|
175830
176090
|
}
|
|
175831
176091
|
|
|
175832
176092
|
// ../../packages/api/src/routes/node-agent-upgrade.ts
|
|
@@ -176121,8 +176381,7 @@ async function sendNodeTerminalSessionStop(req, res, nodeId, sessionId) {
|
|
|
176121
176381
|
// ../../packages/api/src/routes/nodes.ts
|
|
176122
176382
|
var NODE_WORKDIR_PROXY_TIMEOUT_MS = 1e4;
|
|
176123
176383
|
var NODE_WORKDIR_BRANCH_PROXY_TIMEOUT_MS = 25e3;
|
|
176124
|
-
|
|
176125
|
-
function describeProxyError2(error2) {
|
|
176384
|
+
function describeProxyError3(error2) {
|
|
176126
176385
|
if (error2 instanceof Error) {
|
|
176127
176386
|
const errorCategory = error2.name === "AbortError" || /aborted/i.test(error2.message) ? "abort" : /timeout/i.test(error2.message) ? "timeout" : "network";
|
|
176128
176387
|
return {
|
|
@@ -176169,7 +176428,7 @@ function createNodeWorkdirProxyTrace(log2, nodeId, proxyPath) {
|
|
|
176169
176428
|
attempt,
|
|
176170
176429
|
totalEndpoints,
|
|
176171
176430
|
timeoutMs,
|
|
176172
|
-
...
|
|
176431
|
+
...describeProxyError3(error2)
|
|
176173
176432
|
});
|
|
176174
176433
|
}
|
|
176175
176434
|
};
|
|
@@ -176262,7 +176521,7 @@ async function maybeHandleRemoteNodeWorkDirRequest(req, res, nodeId) {
|
|
|
176262
176521
|
await sendProxyResponse(res, response);
|
|
176263
176522
|
return true;
|
|
176264
176523
|
} catch (err) {
|
|
176265
|
-
const errorDetails2 =
|
|
176524
|
+
const errorDetails2 = describeProxyError3(err);
|
|
176266
176525
|
log2.warn("node workdir proxy error", {
|
|
176267
176526
|
nodeId,
|
|
176268
176527
|
proxyPath,
|
|
@@ -176329,7 +176588,7 @@ async function maybeHandleRemoteNodeWorkDirBranchInfoRequest(req, res, nodeId) {
|
|
|
176329
176588
|
await sendProxyResponse(res, response);
|
|
176330
176589
|
return true;
|
|
176331
176590
|
} catch (err) {
|
|
176332
|
-
const errorDetails2 =
|
|
176591
|
+
const errorDetails2 = describeProxyError3(err);
|
|
176333
176592
|
log2.warn("node workdir branch proxy error", {
|
|
176334
176593
|
nodeId,
|
|
176335
176594
|
proxyPath,
|
|
@@ -176350,71 +176609,6 @@ async function maybeHandleRemoteNodeWorkDirBranchInfoRequest(req, res, nodeId) {
|
|
|
176350
176609
|
throw new MeshyError("NODE_OFFLINE", `Cannot reach node ${nodeId} to inspect its git branch`, 502);
|
|
176351
176610
|
}
|
|
176352
176611
|
}
|
|
176353
|
-
async function maybeHandleRemoteNodeNativeSessionsRequest(req, res, nodeId) {
|
|
176354
|
-
const query = NodeNativeSessionsQuery.parse(req.query);
|
|
176355
|
-
const { nodeRegistry, heartbeat, logger: rootLogger } = req.app.locals.deps;
|
|
176356
|
-
const selfId = nodeRegistry.getSelf().id;
|
|
176357
|
-
if (nodeId === selfId) {
|
|
176358
|
-
return false;
|
|
176359
|
-
}
|
|
176360
|
-
const node2 = nodeRegistry.getNode(nodeId);
|
|
176361
|
-
if (!node2) {
|
|
176362
|
-
throw new MeshyError("NODE_NOT_FOUND", `Node ${nodeId} not found`, 404);
|
|
176363
|
-
}
|
|
176364
|
-
const log2 = rootLogger.child("nodes/native-sessions");
|
|
176365
|
-
const proxyPath = req.originalUrl ?? `/api/nodes/${nodeId}/native-sessions`;
|
|
176366
|
-
const fallbackRequest = createNodeMessage("node.sessions.list", {
|
|
176367
|
-
agent: query.agent,
|
|
176368
|
-
limit: query.limit
|
|
176369
|
-
}, { expectsResponse: true });
|
|
176370
|
-
const canPushToNode = heartbeat?.canPushToNode?.(nodeId) ?? true;
|
|
176371
|
-
if (!canPushToNode && canRequestNodeMessage(heartbeat)) {
|
|
176372
|
-
log2.warn("node native sessions request falling back to keepalive control", {
|
|
176373
|
-
nodeId,
|
|
176374
|
-
proxyPath
|
|
176375
|
-
});
|
|
176376
|
-
const controlResponse = await requestFallbackNodeMessage(heartbeat, nodeId, fallbackRequest);
|
|
176377
|
-
sendWorkerControlResponse(res, controlResponse);
|
|
176378
|
-
return true;
|
|
176379
|
-
}
|
|
176380
|
-
try {
|
|
176381
|
-
const { endpoint, response } = await fetchNodeWithFallback(
|
|
176382
|
-
node2,
|
|
176383
|
-
proxyPath,
|
|
176384
|
-
void 0,
|
|
176385
|
-
NODE_NATIVE_SESSIONS_PROXY_TIMEOUT_MS,
|
|
176386
|
-
createNodeWorkdirProxyTrace(log2, nodeId, proxyPath),
|
|
176387
|
-
{ preferPublicEndpoint: true }
|
|
176388
|
-
);
|
|
176389
|
-
log2.debug("proxying node native sessions request", {
|
|
176390
|
-
nodeId,
|
|
176391
|
-
endpoint,
|
|
176392
|
-
proxyPath
|
|
176393
|
-
});
|
|
176394
|
-
await sendProxyResponse(res, response);
|
|
176395
|
-
return true;
|
|
176396
|
-
} catch (err) {
|
|
176397
|
-
const errorDetails2 = describeProxyError2(err);
|
|
176398
|
-
log2.warn("node native sessions proxy error", {
|
|
176399
|
-
nodeId,
|
|
176400
|
-
proxyPath,
|
|
176401
|
-
timeoutMs: NODE_NATIVE_SESSIONS_PROXY_TIMEOUT_MS,
|
|
176402
|
-
...errorDetails2
|
|
176403
|
-
});
|
|
176404
|
-
if (canRequestNodeMessage(heartbeat)) {
|
|
176405
|
-
log2.warn("node native sessions proxy failed, falling back to keepalive control", {
|
|
176406
|
-
nodeId,
|
|
176407
|
-
proxyPath,
|
|
176408
|
-
timeoutMs: NODE_NATIVE_SESSIONS_PROXY_TIMEOUT_MS,
|
|
176409
|
-
...errorDetails2
|
|
176410
|
-
});
|
|
176411
|
-
const controlResponse = await requestFallbackNodeMessage(heartbeat, nodeId, fallbackRequest);
|
|
176412
|
-
sendWorkerControlResponse(res, controlResponse);
|
|
176413
|
-
return true;
|
|
176414
|
-
}
|
|
176415
|
-
throw new MeshyError("NODE_OFFLINE", `Cannot reach node ${nodeId} to list its native sessions`, 502);
|
|
176416
|
-
}
|
|
176417
|
-
}
|
|
176418
176612
|
function createNodeRoutes() {
|
|
176419
176613
|
const router = (0, import_express5.Router)();
|
|
176420
176614
|
router.get("/", asyncHandler3(async (req, res) => {
|
|
@@ -176495,6 +176689,22 @@ function createNodeRoutes() {
|
|
|
176495
176689
|
}
|
|
176496
176690
|
sendLocalNodeNativeSessions(req, res, nodeId);
|
|
176497
176691
|
}));
|
|
176692
|
+
router.delete("/:id/native-sessions/:agent/:sessionId", asyncHandler3(async (req, res) => {
|
|
176693
|
+
const nodeId = req.params.id;
|
|
176694
|
+
const handled = await maybeHandleRemoteNodeNativeSessionHide(req, res, nodeId);
|
|
176695
|
+
if (handled) {
|
|
176696
|
+
return;
|
|
176697
|
+
}
|
|
176698
|
+
sendLocalNodeNativeSessionHide(req, res, nodeId);
|
|
176699
|
+
}));
|
|
176700
|
+
router.post("/:id/native-sessions/folders/hide", asyncHandler3(async (req, res) => {
|
|
176701
|
+
const nodeId = req.params.id;
|
|
176702
|
+
const handled = await maybeHandleRemoteNodeNativeSessionFolderHide(req, res, nodeId);
|
|
176703
|
+
if (handled) {
|
|
176704
|
+
return;
|
|
176705
|
+
}
|
|
176706
|
+
sendLocalNodeNativeSessionFolderHide(req, res, nodeId);
|
|
176707
|
+
}));
|
|
176498
176708
|
router.get("/:id/workdir/tree", asyncHandler3(async (req, res) => {
|
|
176499
176709
|
const nodeId = req.params.id;
|
|
176500
176710
|
const handled = await maybeHandleRemoteNodeWorkDirRequest(req, res, nodeId);
|
|
@@ -177126,7 +177336,7 @@ function getTaskLogsProxyRequestMetadata(req) {
|
|
|
177126
177336
|
const sourceNodeId = req.get(TASK_LOG_PROXY_SOURCE_HEADER) ?? void 0;
|
|
177127
177337
|
return { isProxy: purpose === TASK_LOG_PROXY_PURPOSE, sourceNodeId, task: decodeTaskSnapshot(req.get(TASK_LOG_PROXY_TASK_HEADER)) };
|
|
177128
177338
|
}
|
|
177129
|
-
function
|
|
177339
|
+
function describeProxyError4(error2) {
|
|
177130
177340
|
if (error2 instanceof Error) {
|
|
177131
177341
|
const errorCategory = error2.name === "AbortError" || /aborted/i.test(error2.message) ? "abort" : /timeout/i.test(error2.message) ? "timeout" : "network";
|
|
177132
177342
|
return {
|
|
@@ -177168,7 +177378,7 @@ function createTaskLogsProxyTrace(log2, taskId, nodeId, proxyPath) {
|
|
|
177168
177378
|
attempt,
|
|
177169
177379
|
totalEndpoints,
|
|
177170
177380
|
timeoutMs,
|
|
177171
|
-
...
|
|
177381
|
+
...describeProxyError4(error2)
|
|
177172
177382
|
});
|
|
177173
177383
|
}
|
|
177174
177384
|
};
|
|
@@ -177265,7 +177475,7 @@ async function sendTaskLogsResponse(req, res, taskId) {
|
|
|
177265
177475
|
log2.warn("failed to seed task snapshot before task logs proxy", {
|
|
177266
177476
|
taskId,
|
|
177267
177477
|
assignedTo: proxyNodeId,
|
|
177268
|
-
...
|
|
177478
|
+
...describeProxyError4(err)
|
|
177269
177479
|
});
|
|
177270
177480
|
return [];
|
|
177271
177481
|
});
|
|
@@ -177311,7 +177521,7 @@ async function sendTaskLogsResponse(req, res, taskId) {
|
|
|
177311
177521
|
taskId,
|
|
177312
177522
|
assignedTo: proxyNodeId,
|
|
177313
177523
|
timeoutMs: TASK_LOG_PROXY_TIMEOUT_MS,
|
|
177314
|
-
...
|
|
177524
|
+
...describeProxyError4(err)
|
|
177315
177525
|
});
|
|
177316
177526
|
const fallback = await requestTaskLogsOverKeepalive(heartbeat, proxyNodeId, task, after);
|
|
177317
177527
|
if (fallback) {
|
|
@@ -177634,7 +177844,7 @@ function buildTaskListResult(tasks, nodeRegistry, options) {
|
|
|
177634
177844
|
init_cjs_shims();
|
|
177635
177845
|
var import_express9 = __toESM(require_express2(), 1);
|
|
177636
177846
|
var TASK_OUTPUT_PROXY_TIMEOUT_MS = 1e4;
|
|
177637
|
-
function
|
|
177847
|
+
function describeProxyError5(error2) {
|
|
177638
177848
|
if (error2 instanceof Error) {
|
|
177639
177849
|
const errorCategory = error2.name === "AbortError" || /aborted/i.test(error2.message) ? "abort" : /timeout/i.test(error2.message) ? "timeout" : "network";
|
|
177640
177850
|
return {
|
|
@@ -177687,7 +177897,7 @@ function createTaskOutputProxyTrace(log2, taskId, assignedTo, kind, proxyPath) {
|
|
|
177687
177897
|
attempt,
|
|
177688
177898
|
totalEndpoints,
|
|
177689
177899
|
timeoutMs,
|
|
177690
|
-
...
|
|
177900
|
+
...describeProxyError5(error2)
|
|
177691
177901
|
});
|
|
177692
177902
|
}
|
|
177693
177903
|
};
|
|
@@ -177805,7 +178015,7 @@ async function maybeHandleRemoteTaskOutputRequest(req, res, taskId, subPath, ini
|
|
|
177805
178015
|
assignedTo: assignedNodeId,
|
|
177806
178016
|
kind: hydratedFallbackRequest.kind,
|
|
177807
178017
|
timeoutMs: TASK_OUTPUT_PROXY_TIMEOUT_MS,
|
|
177808
|
-
...
|
|
178018
|
+
...describeProxyError5(err)
|
|
177809
178019
|
});
|
|
177810
178020
|
const controlResponse = await requestFallbackNodeMessage(heartbeat, assignedNodeId, hydratedFallbackRequest);
|
|
177811
178021
|
if (hydratedFallbackRequest.kind === "task.preview.create" && controlResponse.bodyEncoding === "json" && isPreviewSessionPayload2(controlResponse.body)) {
|
|
@@ -177822,7 +178032,7 @@ async function maybeHandleRemoteTaskOutputRequest(req, res, taskId, subPath, ini
|
|
|
177822
178032
|
assignedTo: assignedNodeId,
|
|
177823
178033
|
kind: messageKind,
|
|
177824
178034
|
timeoutMs: TASK_OUTPUT_PROXY_TIMEOUT_MS,
|
|
177825
|
-
...
|
|
178035
|
+
...describeProxyError5(err)
|
|
177826
178036
|
});
|
|
177827
178037
|
throw new MeshyError("NODE_OFFLINE", "Cannot reach worker for task output", 502);
|
|
177828
178038
|
}
|
|
@@ -178877,8 +179087,8 @@ var import_express13 = __toESM(require_express2(), 1);
|
|
|
178877
179087
|
|
|
178878
179088
|
// ../../packages/api/src/node/quick-chat-store.ts
|
|
178879
179089
|
init_cjs_shims();
|
|
178880
|
-
var
|
|
178881
|
-
var
|
|
179090
|
+
var fs27 = __toESM(require("fs"), 1);
|
|
179091
|
+
var path32 = __toESM(require("path"), 1);
|
|
178882
179092
|
var QUICK_CHATS_FILE = "quick-chats.json";
|
|
178883
179093
|
var QUICK_CHAT_ALIAS_PATTERN = /^[a-z0-9][a-z0-9_-]{0,63}$/;
|
|
178884
179094
|
function normalizeQuickChatAlias(value) {
|
|
@@ -178917,20 +179127,20 @@ var FileQuickChatStore = class {
|
|
|
178917
179127
|
}
|
|
178918
179128
|
replace(quickChats) {
|
|
178919
179129
|
this.quickChats = normalizeQuickChats(quickChats);
|
|
178920
|
-
|
|
178921
|
-
|
|
179130
|
+
fs27.mkdirSync(this.storagePath, { recursive: true });
|
|
179131
|
+
fs27.writeFileSync(this.filePath, JSON.stringify({ quickChats: this.quickChats }, null, 2) + "\n", "utf8");
|
|
178922
179132
|
return this.list();
|
|
178923
179133
|
}
|
|
178924
179134
|
load() {
|
|
178925
179135
|
try {
|
|
178926
|
-
const parsed = JSON.parse(
|
|
179136
|
+
const parsed = JSON.parse(fs27.readFileSync(this.filePath, "utf8"));
|
|
178927
179137
|
return normalizeQuickChats(parsed.quickChats);
|
|
178928
179138
|
} catch {
|
|
178929
179139
|
return [];
|
|
178930
179140
|
}
|
|
178931
179141
|
}
|
|
178932
179142
|
get filePath() {
|
|
178933
|
-
return
|
|
179143
|
+
return path32.join(this.storagePath, QUICK_CHATS_FILE);
|
|
178934
179144
|
}
|
|
178935
179145
|
};
|
|
178936
179146
|
function createQuickChatStore(storagePath) {
|
|
@@ -179067,6 +179277,7 @@ var ALL_EVENT_NAMES = [
|
|
|
179067
179277
|
"node.status",
|
|
179068
179278
|
"node.operation.created",
|
|
179069
179279
|
"node.operation.updated",
|
|
179280
|
+
"node.nativeSessions.changed",
|
|
179070
179281
|
"task.created",
|
|
179071
179282
|
"task.assigned",
|
|
179072
179283
|
"task.status",
|
|
@@ -179181,8 +179392,14 @@ function asyncHandler13(fn) {
|
|
|
179181
179392
|
});
|
|
179182
179393
|
};
|
|
179183
179394
|
}
|
|
179184
|
-
function getService(req) {
|
|
179185
|
-
const
|
|
179395
|
+
function getService(req, options = {}) {
|
|
179396
|
+
const deps = req.app.locals.deps;
|
|
179397
|
+
const ensured = deps.mobilePairingInvitations ? null : options.allowInitialize ? deps.ensureMobilePairing?.() : null;
|
|
179398
|
+
if (ensured) {
|
|
179399
|
+
deps.mobilePairingInvitations = ensured.service;
|
|
179400
|
+
deps.mobileAadValidator = ensured.validator;
|
|
179401
|
+
}
|
|
179402
|
+
const service = deps.mobilePairingInvitations;
|
|
179186
179403
|
if (!service) {
|
|
179187
179404
|
throw new MeshyError("VALIDATION_ERROR", "mobile pairing is not enabled on this node", 404);
|
|
179188
179405
|
}
|
|
@@ -179218,7 +179435,7 @@ function createMobileRoutes() {
|
|
|
179218
179435
|
"/pairings",
|
|
179219
179436
|
asyncHandler13(async (req, res) => {
|
|
179220
179437
|
const body3 = req.body ?? {};
|
|
179221
|
-
const created = getService(req).createInvitation({
|
|
179438
|
+
const created = getService(req, { allowInitialize: true }).createInvitation({
|
|
179222
179439
|
ttlMs: optionalPositiveInteger(body3.ttlMs),
|
|
179223
179440
|
maxUses: optionalPositiveInteger(body3.maxUses),
|
|
179224
179441
|
createdBy: optionalString(body3.createdBy) ?? "local-node-user"
|
|
@@ -179481,8 +179698,8 @@ function hasAuthorizationHeader(req) {
|
|
|
179481
179698
|
function resolveRuntimeBaseDir() {
|
|
179482
179699
|
const entryPath = process.argv[1];
|
|
179483
179700
|
if (typeof entryPath === "string" && entryPath.length > 0) {
|
|
179484
|
-
const resolved =
|
|
179485
|
-
return
|
|
179701
|
+
const resolved = fs28.realpathSync(path33.resolve(entryPath));
|
|
179702
|
+
return path33.dirname(resolved);
|
|
179486
179703
|
}
|
|
179487
179704
|
return process.cwd();
|
|
179488
179705
|
}
|
|
@@ -179490,18 +179707,18 @@ function resolveStaticDir(baseDir) {
|
|
|
179490
179707
|
const envStaticDir = process.env.MESHY_STATIC_DIR;
|
|
179491
179708
|
const candidateDirs = [
|
|
179492
179709
|
envStaticDir,
|
|
179493
|
-
|
|
179494
|
-
|
|
179495
|
-
|
|
179496
|
-
|
|
179497
|
-
|
|
179498
|
-
|
|
179499
|
-
|
|
179500
|
-
|
|
179501
|
-
|
|
179710
|
+
path33.resolve(baseDir, "dashboard"),
|
|
179711
|
+
path33.resolve(baseDir, "../dashboard"),
|
|
179712
|
+
path33.resolve(baseDir, "../../dashboard/dist"),
|
|
179713
|
+
path33.resolve(baseDir, "../../../packages/dashboard/dist"),
|
|
179714
|
+
path33.resolve(baseDir, "../public"),
|
|
179715
|
+
path33.resolve(baseDir, "../../packages/api/public"),
|
|
179716
|
+
path33.resolve(baseDir, "../../../packages/api/public"),
|
|
179717
|
+
path33.resolve(process.cwd(), "packages/dashboard/dist"),
|
|
179718
|
+
path33.resolve(process.cwd(), "packages/api/public")
|
|
179502
179719
|
].filter((value) => typeof value === "string" && value.length > 0);
|
|
179503
179720
|
for (const candidate of candidateDirs) {
|
|
179504
|
-
if (
|
|
179721
|
+
if (fs28.existsSync(candidate)) {
|
|
179505
179722
|
return candidate;
|
|
179506
179723
|
}
|
|
179507
179724
|
}
|
|
@@ -179518,11 +179735,15 @@ function createServer2(deps) {
|
|
|
179518
179735
|
const authConfig = {
|
|
179519
179736
|
apiKey: deps.config.apiKey,
|
|
179520
179737
|
validateBearerToken: deps.config.validateBearerToken,
|
|
179521
|
-
validateMobileBearerToken:
|
|
179738
|
+
validateMobileBearerToken: async (header) => {
|
|
179739
|
+
const validator = deps.mobileAadValidator;
|
|
179740
|
+
if (!validator) {
|
|
179741
|
+
return { ok: false, reason: "mobile-auth-unavailable" };
|
|
179742
|
+
}
|
|
179522
179743
|
const value = Array.isArray(header) ? header[0] : header;
|
|
179523
|
-
const result = await
|
|
179744
|
+
const result = await validator.validate(value);
|
|
179524
179745
|
return result.ok ? { ok: true, reason: "mobile-aad", identity: result.identity } : { ok: false, reason: result.reason };
|
|
179525
|
-
}
|
|
179746
|
+
},
|
|
179526
179747
|
allowMobileBearerAuth: (req) => isMobileBearerAuthPath(req.path),
|
|
179527
179748
|
getTrustedHosts: () => {
|
|
179528
179749
|
const trustedHosts = [];
|
|
@@ -179637,8 +179858,8 @@ function createServer2(deps) {
|
|
|
179637
179858
|
app.use("/api/telemetry", createTelemetryRoutes());
|
|
179638
179859
|
app.use("/api/events", createEventRoutes());
|
|
179639
179860
|
if (staticDir) {
|
|
179640
|
-
const indexPath =
|
|
179641
|
-
if (
|
|
179861
|
+
const indexPath = path33.join(staticDir, "index.html");
|
|
179862
|
+
if (fs28.existsSync(indexPath)) {
|
|
179642
179863
|
app.get("*", (req, res, next2) => {
|
|
179643
179864
|
if (isApiRequest(req)) {
|
|
179644
179865
|
next2();
|
|
@@ -179812,8 +180033,8 @@ var DirectTransport = class {
|
|
|
179812
180033
|
// ../../packages/transport/src/devtunnel.ts
|
|
179813
180034
|
init_cjs_shims();
|
|
179814
180035
|
var import_node_child_process12 = require("child_process");
|
|
179815
|
-
var
|
|
179816
|
-
var
|
|
180036
|
+
var fs29 = __toESM(require("fs"), 1);
|
|
180037
|
+
var path34 = __toESM(require("path"), 1);
|
|
179817
180038
|
function hiddenPipeOptions() {
|
|
179818
180039
|
return { stdio: "pipe", windowsHide: true };
|
|
179819
180040
|
}
|
|
@@ -179825,8 +180046,8 @@ function hiddenTextOptions() {
|
|
|
179825
180046
|
}
|
|
179826
180047
|
var DEV_TUNNEL_COMMAND_ENV = "MESHY_DEVTUNNEL_PATH";
|
|
179827
180048
|
function isInstalled(cmd) {
|
|
179828
|
-
if (
|
|
179829
|
-
return
|
|
180049
|
+
if (path34.isAbsolute(cmd)) {
|
|
180050
|
+
return fs29.existsSync(cmd);
|
|
179830
180051
|
}
|
|
179831
180052
|
try {
|
|
179832
180053
|
(0, import_node_child_process12.execFileSync)(process.platform === "win32" ? "where.exe" : "which", [cmd], hiddenPipeOptions());
|
|
@@ -179845,17 +180066,17 @@ function normalizeConfiguredCommand(value) {
|
|
|
179845
180066
|
function windowsLocalAppDataRoots() {
|
|
179846
180067
|
const roots = [
|
|
179847
180068
|
process.env.LOCALAPPDATA,
|
|
179848
|
-
process.env.USERPROFILE ?
|
|
180069
|
+
process.env.USERPROFILE ? path34.join(process.env.USERPROFILE, "AppData", "Local") : void 0
|
|
179849
180070
|
].filter((value) => Boolean(value));
|
|
179850
|
-
return [...new Set(roots.map((root7) =>
|
|
180071
|
+
return [...new Set(roots.map((root7) => path34.resolve(root7)))];
|
|
179851
180072
|
}
|
|
179852
180073
|
function findWindowsDevTunnelPackageExecutable() {
|
|
179853
180074
|
const candidates = [];
|
|
179854
180075
|
for (const localAppData of windowsLocalAppDataRoots()) {
|
|
179855
|
-
const packageRoot =
|
|
180076
|
+
const packageRoot = path34.join(localAppData, "Microsoft", "WinGet", "Packages");
|
|
179856
180077
|
let entries;
|
|
179857
180078
|
try {
|
|
179858
|
-
entries =
|
|
180079
|
+
entries = fs29.readdirSync(packageRoot, { withFileTypes: true });
|
|
179859
180080
|
} catch {
|
|
179860
180081
|
continue;
|
|
179861
180082
|
}
|
|
@@ -179863,8 +180084,8 @@ function findWindowsDevTunnelPackageExecutable() {
|
|
|
179863
180084
|
if (!entry.isDirectory() || !entry.name.toLowerCase().startsWith("microsoft.devtunnel_")) {
|
|
179864
180085
|
continue;
|
|
179865
180086
|
}
|
|
179866
|
-
const executable =
|
|
179867
|
-
if (
|
|
180087
|
+
const executable = path34.join(packageRoot, entry.name, "devtunnel.exe");
|
|
180088
|
+
if (fs29.existsSync(executable)) {
|
|
179868
180089
|
candidates.push(executable);
|
|
179869
180090
|
}
|
|
179870
180091
|
}
|
|
@@ -180246,13 +180467,13 @@ var terminalWriter = {
|
|
|
180246
180467
|
};
|
|
180247
180468
|
|
|
180248
180469
|
// src/startup.ts
|
|
180249
|
-
var
|
|
180470
|
+
var fs31 = __toESM(require("fs"), 1);
|
|
180250
180471
|
var readline2 = __toESM(require("readline/promises"), 1);
|
|
180251
180472
|
|
|
180252
180473
|
// src/startup-tools/index.ts
|
|
180253
180474
|
init_cjs_shims();
|
|
180254
|
-
var
|
|
180255
|
-
var
|
|
180475
|
+
var fs30 = __toESM(require("fs"), 1);
|
|
180476
|
+
var path35 = __toESM(require("path"), 1);
|
|
180256
180477
|
var readline = __toESM(require("readline/promises"), 1);
|
|
180257
180478
|
var import_node_child_process13 = require("child_process");
|
|
180258
180479
|
var STARTUP_REQUIREMENTS = ["az", "devtunnel", "claude", "codex", "copilot"];
|
|
@@ -180317,19 +180538,19 @@ function createDefaultCommandRunner(platform6) {
|
|
|
180317
180538
|
};
|
|
180318
180539
|
}
|
|
180319
180540
|
function getNodeMetadataPath2(storagePath) {
|
|
180320
|
-
return
|
|
180541
|
+
return path35.join(storagePath, "metadata.json");
|
|
180321
180542
|
}
|
|
180322
180543
|
function readStartupMetadataFile(storagePath) {
|
|
180323
180544
|
try {
|
|
180324
|
-
const raw3 = JSON.parse(
|
|
180545
|
+
const raw3 = JSON.parse(fs30.readFileSync(getNodeMetadataPath2(storagePath), "utf-8"));
|
|
180325
180546
|
return typeof raw3 === "object" && raw3 !== null ? raw3 : {};
|
|
180326
180547
|
} catch {
|
|
180327
180548
|
return {};
|
|
180328
180549
|
}
|
|
180329
180550
|
}
|
|
180330
180551
|
function writeStartupMetadataFile(storagePath, metadata) {
|
|
180331
|
-
|
|
180332
|
-
|
|
180552
|
+
fs30.mkdirSync(storagePath, { recursive: true });
|
|
180553
|
+
fs30.writeFileSync(getNodeMetadataPath2(storagePath), JSON.stringify(metadata, null, 2) + "\n", "utf-8");
|
|
180333
180554
|
}
|
|
180334
180555
|
function formatLocalDate2(now) {
|
|
180335
180556
|
const year = now.getFullYear();
|
|
@@ -180834,9 +181055,9 @@ function createRuntimeDefaultConfig(fileConfig, options = {}) {
|
|
|
180834
181055
|
else if (isDevBoxEnvironment()) config2.node.devbox = { enabled: true };
|
|
180835
181056
|
return config2;
|
|
180836
181057
|
}
|
|
180837
|
-
function loadConfigFile(
|
|
181058
|
+
function loadConfigFile(path47) {
|
|
180838
181059
|
try {
|
|
180839
|
-
const raw3 =
|
|
181060
|
+
const raw3 = fs31.readFileSync(path47, "utf-8");
|
|
180840
181061
|
return JSON.parse(raw3);
|
|
180841
181062
|
} catch {
|
|
180842
181063
|
return {};
|
|
@@ -181016,26 +181237,26 @@ function formatLoadedStartMetadata(info, authEnabled) {
|
|
|
181016
181237
|
|
|
181017
181238
|
// src/runtime-metadata.ts
|
|
181018
181239
|
init_cjs_shims();
|
|
181019
|
-
var
|
|
181020
|
-
var
|
|
181240
|
+
var fs32 = __toESM(require("fs"), 1);
|
|
181241
|
+
var path36 = __toESM(require("path"), 1);
|
|
181021
181242
|
var import_node_child_process14 = require("child_process");
|
|
181022
181243
|
var runtimeDir = resolveRuntimeDir();
|
|
181023
181244
|
var appRoot = resolveAppRoot(runtimeDir);
|
|
181024
|
-
var repoRoot =
|
|
181245
|
+
var repoRoot = path36.resolve(appRoot, "../..");
|
|
181025
181246
|
function resolveRuntimeDir() {
|
|
181026
181247
|
const entryPath = process.argv[1];
|
|
181027
181248
|
if (typeof entryPath === "string" && entryPath.length > 0) {
|
|
181028
181249
|
try {
|
|
181029
|
-
return
|
|
181250
|
+
return path36.dirname(fs32.realpathSync(path36.resolve(entryPath)));
|
|
181030
181251
|
} catch {
|
|
181031
|
-
return
|
|
181252
|
+
return path36.dirname(path36.resolve(entryPath));
|
|
181032
181253
|
}
|
|
181033
181254
|
}
|
|
181034
181255
|
return process.cwd();
|
|
181035
181256
|
}
|
|
181036
181257
|
function readJsonFile(filePath) {
|
|
181037
181258
|
try {
|
|
181038
|
-
return JSON.parse(
|
|
181259
|
+
return JSON.parse(fs32.readFileSync(filePath, "utf-8"));
|
|
181039
181260
|
} catch {
|
|
181040
181261
|
return null;
|
|
181041
181262
|
}
|
|
@@ -181045,9 +181266,9 @@ function readPackageManifest(filePath) {
|
|
|
181045
181266
|
}
|
|
181046
181267
|
function readEmbeddedRuntimeMetadata() {
|
|
181047
181268
|
const candidates = [
|
|
181048
|
-
|
|
181049
|
-
|
|
181050
|
-
|
|
181269
|
+
path36.join(appRoot, "runtime-metadata.json"),
|
|
181270
|
+
path36.join(runtimeDir, "runtime-metadata.json"),
|
|
181271
|
+
path36.resolve(process.cwd(), "apps/node/dist/runtime-metadata.json")
|
|
181051
181272
|
];
|
|
181052
181273
|
for (const candidate of candidates) {
|
|
181053
181274
|
const metadata = readJsonFile(candidate);
|
|
@@ -181060,23 +181281,23 @@ function readEmbeddedRuntimeMetadata() {
|
|
|
181060
181281
|
function resolveAppRoot(baseDir) {
|
|
181061
181282
|
const candidates = [
|
|
181062
181283
|
baseDir,
|
|
181063
|
-
|
|
181064
|
-
|
|
181065
|
-
|
|
181284
|
+
path36.resolve(baseDir, ".."),
|
|
181285
|
+
path36.resolve(process.cwd(), "apps/node/dist"),
|
|
181286
|
+
path36.resolve(process.cwd(), "apps/node"),
|
|
181066
181287
|
process.cwd()
|
|
181067
181288
|
];
|
|
181068
181289
|
for (const candidate of candidates) {
|
|
181069
|
-
const manifest = readPackageManifest(
|
|
181290
|
+
const manifest = readPackageManifest(path36.join(candidate, "package.json"));
|
|
181070
181291
|
if (manifest?.name === "@meshy/node" || manifest?.name === "meshy-node") {
|
|
181071
181292
|
return candidate;
|
|
181072
181293
|
}
|
|
181073
181294
|
}
|
|
181074
181295
|
for (const candidate of candidates) {
|
|
181075
|
-
if (
|
|
181296
|
+
if (fs32.existsSync(path36.join(candidate, "package.json"))) {
|
|
181076
181297
|
return candidate;
|
|
181077
181298
|
}
|
|
181078
181299
|
}
|
|
181079
|
-
return
|
|
181300
|
+
return path36.resolve(baseDir, "..");
|
|
181080
181301
|
}
|
|
181081
181302
|
function toPackageInfo(filePath) {
|
|
181082
181303
|
const manifest = readPackageManifest(filePath);
|
|
@@ -181136,8 +181357,8 @@ function buildRuntimeMetadata(storagePath) {
|
|
|
181136
181357
|
components: startupRequirements.components
|
|
181137
181358
|
};
|
|
181138
181359
|
}
|
|
181139
|
-
const appPackage = toPackageInfo(
|
|
181140
|
-
const workspaceManifest = readPackageManifest(
|
|
181360
|
+
const appPackage = toPackageInfo(path36.join(appRoot, "package.json"));
|
|
181361
|
+
const workspaceManifest = readPackageManifest(path36.join(repoRoot, "package.json"));
|
|
181141
181362
|
return {
|
|
181142
181363
|
packageName: appPackage?.name ?? "meshy",
|
|
181143
181364
|
packageVersion: appPackage?.version ?? "0.1.0",
|
|
@@ -181145,11 +181366,11 @@ function buildRuntimeMetadata(storagePath) {
|
|
|
181145
181366
|
startupRequirementsLastCheckedOn: startupRequirements.lastCheckedOn,
|
|
181146
181367
|
components: startupRequirements.components,
|
|
181147
181368
|
packages: {
|
|
181148
|
-
workspace: toPackageInfo(
|
|
181369
|
+
workspace: toPackageInfo(path36.join(repoRoot, "package.json")),
|
|
181149
181370
|
node: appPackage,
|
|
181150
|
-
core: toPackageInfo(
|
|
181151
|
-
dashboard: toPackageInfo(
|
|
181152
|
-
api: toPackageInfo(
|
|
181371
|
+
core: toPackageInfo(path36.join(repoRoot, "packages/core/package.json")),
|
|
181372
|
+
dashboard: toPackageInfo(path36.join(repoRoot, "packages/dashboard/package.json")),
|
|
181373
|
+
api: toPackageInfo(path36.join(repoRoot, "packages/api/package.json"))
|
|
181153
181374
|
},
|
|
181154
181375
|
repository: {
|
|
181155
181376
|
url: normalizeRepositoryUrl(readGitValue(["config", "--get", "remote.upstream.url"])) ?? normalizeRepositoryUrl(readGitValue(["config", "--get", "remote.origin.url"])) ?? readRepositoryUrlFromManifest(workspaceManifest),
|
|
@@ -181159,465 +181380,9 @@ function buildRuntimeMetadata(storagePath) {
|
|
|
181159
181380
|
};
|
|
181160
181381
|
}
|
|
181161
181382
|
|
|
181162
|
-
// src/bootstrap/mobile-connection-qr.ts
|
|
181163
|
-
init_cjs_shims();
|
|
181164
|
-
var import_node_module = require("module");
|
|
181165
|
-
|
|
181166
|
-
// ../../packages/client-sdk/src/index.ts
|
|
181167
|
-
init_cjs_shims();
|
|
181168
|
-
|
|
181169
|
-
// ../../packages/client-sdk/src/client.ts
|
|
181170
|
-
init_cjs_shims();
|
|
181171
|
-
|
|
181172
|
-
// ../../packages/client-sdk/src/config.ts
|
|
181173
|
-
init_cjs_shims();
|
|
181174
|
-
function normalizeBaseUrl(baseUrl) {
|
|
181175
|
-
if (!baseUrl) return "";
|
|
181176
|
-
return baseUrl.replace(/\/+$/, "");
|
|
181177
|
-
}
|
|
181178
|
-
function normalizeApiPrefix(apiPrefix) {
|
|
181179
|
-
const value = apiPrefix ?? "/api";
|
|
181180
|
-
if (!value) return "";
|
|
181181
|
-
return value.startsWith("/") ? value.replace(/\/+$/, "") : `/${value.replace(/\/+$/, "")}`;
|
|
181182
|
-
}
|
|
181183
|
-
function mergeHeaders(...sources) {
|
|
181184
|
-
const merged = new Headers();
|
|
181185
|
-
for (const source of sources) {
|
|
181186
|
-
if (!source) continue;
|
|
181187
|
-
const headers = new Headers(source);
|
|
181188
|
-
headers.forEach((value, key2) => merged.set(key2, value));
|
|
181189
|
-
}
|
|
181190
|
-
return merged;
|
|
181191
|
-
}
|
|
181192
|
-
|
|
181193
|
-
// ../../packages/client-sdk/src/errors.ts
|
|
181194
|
-
init_cjs_shims();
|
|
181195
|
-
var MeshyApiError = class extends Error {
|
|
181196
|
-
status;
|
|
181197
|
-
statusText;
|
|
181198
|
-
code;
|
|
181199
|
-
details;
|
|
181200
|
-
body;
|
|
181201
|
-
constructor(message, options) {
|
|
181202
|
-
super(message);
|
|
181203
|
-
this.name = "MeshyApiError";
|
|
181204
|
-
this.status = options.status;
|
|
181205
|
-
this.statusText = options.statusText;
|
|
181206
|
-
this.code = options.code;
|
|
181207
|
-
this.details = options.details;
|
|
181208
|
-
this.body = options.body;
|
|
181209
|
-
}
|
|
181210
|
-
};
|
|
181211
|
-
function getErrorMessage3(body3, fallback) {
|
|
181212
|
-
if (typeof body3 === "string" && body3) {
|
|
181213
|
-
return { message: body3 };
|
|
181214
|
-
}
|
|
181215
|
-
if (body3 && typeof body3 === "object") {
|
|
181216
|
-
const record2 = body3;
|
|
181217
|
-
const errorObject = typeof record2.error === "object" && record2.error !== null ? record2.error : void 0;
|
|
181218
|
-
if (typeof record2.error === "string" && record2.error) {
|
|
181219
|
-
return { message: record2.error };
|
|
181220
|
-
}
|
|
181221
|
-
if (typeof errorObject?.message === "string" && errorObject.message) {
|
|
181222
|
-
return { message: errorObject.message, code: errorObject.code, details: errorObject.details };
|
|
181223
|
-
}
|
|
181224
|
-
if (typeof record2.message === "string" && record2.message) {
|
|
181225
|
-
return { message: record2.message };
|
|
181226
|
-
}
|
|
181227
|
-
}
|
|
181228
|
-
return { message: fallback };
|
|
181229
|
-
}
|
|
181230
|
-
|
|
181231
|
-
// ../../packages/client-sdk/src/client.ts
|
|
181232
|
-
function appendSearch(url3, search3) {
|
|
181233
|
-
const qs = search3.toString();
|
|
181234
|
-
return qs ? `${url3}?${qs}` : url3;
|
|
181235
|
-
}
|
|
181236
|
-
function setOptionalParam(search3, key2, value) {
|
|
181237
|
-
if (value !== void 0) search3.set(key2, String(value));
|
|
181238
|
-
}
|
|
181239
|
-
function isJsonBody(body3) {
|
|
181240
|
-
return body3 === null || Array.isArray(body3) || typeof body3 === "object" && body3 !== null && !(body3 instanceof ArrayBuffer);
|
|
181241
|
-
}
|
|
181242
|
-
function buildPreviewSessionBody(options) {
|
|
181243
|
-
if (!options) return {};
|
|
181244
|
-
if (typeof options === "string") return { path: options };
|
|
181245
|
-
return {
|
|
181246
|
-
...options.path ? { path: options.path } : {},
|
|
181247
|
-
...options.port !== void 0 ? { port: options.port } : {}
|
|
181248
|
-
};
|
|
181249
|
-
}
|
|
181250
|
-
var MeshyClient = class {
|
|
181251
|
-
baseUrl;
|
|
181252
|
-
apiPrefix;
|
|
181253
|
-
defaultHeaders;
|
|
181254
|
-
credentials;
|
|
181255
|
-
fetchImpl;
|
|
181256
|
-
config;
|
|
181257
|
-
constructor(config2 = {}) {
|
|
181258
|
-
const fetchImpl = config2.fetchImpl ?? ((input, init) => globalThis.fetch(input, init));
|
|
181259
|
-
if (!fetchImpl) {
|
|
181260
|
-
throw new Error("MeshyClient requires a fetch implementation");
|
|
181261
|
-
}
|
|
181262
|
-
this.fetchImpl = fetchImpl;
|
|
181263
|
-
this.baseUrl = normalizeBaseUrl(config2.baseUrl);
|
|
181264
|
-
this.apiPrefix = normalizeApiPrefix(config2.apiPrefix);
|
|
181265
|
-
this.defaultHeaders = mergeHeaders(config2.defaultHeaders);
|
|
181266
|
-
this.credentials = config2.credentials;
|
|
181267
|
-
this.config = config2;
|
|
181268
|
-
}
|
|
181269
|
-
buildApiUrl(path46) {
|
|
181270
|
-
const normalizedPath = path46.startsWith("/") ? path46 : `/${path46}`;
|
|
181271
|
-
return `${this.baseUrl}${this.apiPrefix}${normalizedPath}`;
|
|
181272
|
-
}
|
|
181273
|
-
/** @deprecated Use buildApiUrl. Kept for older dashboard bundles. */
|
|
181274
|
-
buildApiurl(path46) {
|
|
181275
|
-
return this.buildApiUrl(path46);
|
|
181276
|
-
}
|
|
181277
|
-
async request(path46, options = {}) {
|
|
181278
|
-
const timeoutMs = options.timeoutMs ?? this.config.timeoutMs;
|
|
181279
|
-
const controller = timeoutMs ? new AbortController() : null;
|
|
181280
|
-
let timeout = null;
|
|
181281
|
-
if (controller) {
|
|
181282
|
-
timeout = setTimeout(() => controller.abort(), timeoutMs);
|
|
181283
|
-
}
|
|
181284
|
-
const token = await this.config.tokenProvider?.();
|
|
181285
|
-
const providedHeaders = await this.config.headersProvider?.();
|
|
181286
|
-
const credentials = options.credentials ?? this.config.credentials;
|
|
181287
|
-
const headers = mergeHeaders(
|
|
181288
|
-
{ Accept: "application/json" },
|
|
181289
|
-
isJsonBody(options.body) ? { "Content-Type": "application/json" } : void 0,
|
|
181290
|
-
this.config.defaultHeaders,
|
|
181291
|
-
providedHeaders,
|
|
181292
|
-
token ? { Authorization: `Bearer ${token}` } : void 0,
|
|
181293
|
-
options.headers
|
|
181294
|
-
);
|
|
181295
|
-
const body3 = isJsonBody(options.body) ? JSON.stringify(options.body) : options.body;
|
|
181296
|
-
try {
|
|
181297
|
-
const res = await this.fetchImpl(this.buildApiUrl(path46), {
|
|
181298
|
-
...options,
|
|
181299
|
-
headers,
|
|
181300
|
-
body: body3,
|
|
181301
|
-
credentials,
|
|
181302
|
-
signal: options.signal ?? controller?.signal
|
|
181303
|
-
});
|
|
181304
|
-
if (!res.ok) {
|
|
181305
|
-
const parsed = await res.json().catch(() => res.statusText);
|
|
181306
|
-
const error2 = getErrorMessage3(parsed, `HTTP ${res.status}`);
|
|
181307
|
-
throw new MeshyApiError(error2.message, {
|
|
181308
|
-
status: res.status,
|
|
181309
|
-
statusText: res.statusText,
|
|
181310
|
-
code: error2.code,
|
|
181311
|
-
details: error2.details,
|
|
181312
|
-
body: parsed
|
|
181313
|
-
});
|
|
181314
|
-
}
|
|
181315
|
-
if (res.status === 204) {
|
|
181316
|
-
return void 0;
|
|
181317
|
-
}
|
|
181318
|
-
return await res.json();
|
|
181319
|
-
} finally {
|
|
181320
|
-
if (timeout) clearTimeout(timeout);
|
|
181321
|
-
}
|
|
181322
|
-
}
|
|
181323
|
-
getSystemInfo() {
|
|
181324
|
-
return this.request("/system/info");
|
|
181325
|
-
}
|
|
181326
|
-
getSystemMetrics() {
|
|
181327
|
-
return this.request("/system/metrics");
|
|
181328
|
-
}
|
|
181329
|
-
switchTransport(type) {
|
|
181330
|
-
return this.request("/system/transport", { method: "POST", body: { type } });
|
|
181331
|
-
}
|
|
181332
|
-
restartRuntime(body3) {
|
|
181333
|
-
return this.request("/system/runtime/restart", { method: "POST", body: body3 });
|
|
181334
|
-
}
|
|
181335
|
-
stopRuntime() {
|
|
181336
|
-
return this.request("/system/runtime/stop", { method: "POST" });
|
|
181337
|
-
}
|
|
181338
|
-
getClusterState() {
|
|
181339
|
-
return this.request("/cluster/state");
|
|
181340
|
-
}
|
|
181341
|
-
promoteToLeader() {
|
|
181342
|
-
return this.request("/cluster/promote", { method: "POST" });
|
|
181343
|
-
}
|
|
181344
|
-
joinCluster(body3) {
|
|
181345
|
-
return this.request("/cluster/join", { method: "POST", body: body3 });
|
|
181346
|
-
}
|
|
181347
|
-
connectToCluster(body3) {
|
|
181348
|
-
return this.request("/cluster/connect", { method: "POST", body: body3 });
|
|
181349
|
-
}
|
|
181350
|
-
disconnectFromCluster() {
|
|
181351
|
-
return this.request("/cluster/disconnect", { method: "POST" });
|
|
181352
|
-
}
|
|
181353
|
-
async getNodes(params = {}) {
|
|
181354
|
-
const search3 = new URLSearchParams();
|
|
181355
|
-
setOptionalParam(search3, "status", params.status);
|
|
181356
|
-
setOptionalParam(search3, "capability", params.capability);
|
|
181357
|
-
const result = await this.request(appendSearch("/nodes", search3));
|
|
181358
|
-
return result.nodes;
|
|
181359
|
-
}
|
|
181360
|
-
getNode(id) {
|
|
181361
|
-
return this.request(`/nodes/${encodeURIComponent(id)}`);
|
|
181362
|
-
}
|
|
181363
|
-
getNodeStatus(id) {
|
|
181364
|
-
return this.request(`/nodes/${encodeURIComponent(id)}/status`);
|
|
181365
|
-
}
|
|
181366
|
-
removeNode(id) {
|
|
181367
|
-
return this.request(`/nodes/${encodeURIComponent(id)}`, { method: "DELETE" });
|
|
181368
|
-
}
|
|
181369
|
-
leaveCluster(nodeId) {
|
|
181370
|
-
return this.request("/cluster/leave", { method: "POST", body: { nodeId } });
|
|
181371
|
-
}
|
|
181372
|
-
updateNode(id, body3) {
|
|
181373
|
-
return this.request(`/nodes/${encodeURIComponent(id)}`, { method: "PATCH", body: body3 });
|
|
181374
|
-
}
|
|
181375
|
-
toggleNodeDevTunnel(nodeId, enabled2) {
|
|
181376
|
-
return this.request(`/nodes/${encodeURIComponent(nodeId)}/devtunnel`, { method: "POST", body: { enabled: enabled2 } });
|
|
181377
|
-
}
|
|
181378
|
-
getNodeOperation(id) {
|
|
181379
|
-
return this.request(`/node-operations/${encodeURIComponent(id)}`);
|
|
181380
|
-
}
|
|
181381
|
-
async listNodeOperations(params = {}) {
|
|
181382
|
-
const search3 = new URLSearchParams();
|
|
181383
|
-
setOptionalParam(search3, "nodeId", params.nodeId);
|
|
181384
|
-
setOptionalParam(search3, "status", params.status);
|
|
181385
|
-
setOptionalParam(search3, "kind", params.kind);
|
|
181386
|
-
const result = await this.request(appendSearch("/node-operations", search3));
|
|
181387
|
-
return result.operations;
|
|
181388
|
-
}
|
|
181389
|
-
upgradeNodeAgent(nodeId, agent) {
|
|
181390
|
-
return this.request(`/nodes/${encodeURIComponent(nodeId)}/agents/${agent}/upgrade`, { method: "POST" });
|
|
181391
|
-
}
|
|
181392
|
-
restartNodeRuntime(nodeId, body3) {
|
|
181393
|
-
return this.request(`/nodes/${encodeURIComponent(nodeId)}/runtime/restart`, { method: "POST", body: body3 });
|
|
181394
|
-
}
|
|
181395
|
-
getNodeWorkDirTree(nodeId, params = {}) {
|
|
181396
|
-
const search3 = new URLSearchParams();
|
|
181397
|
-
setOptionalParam(search3, "path", params.path);
|
|
181398
|
-
if (params.limit !== void 0) search3.set("limit", String(Math.min(Math.max(1, params.limit), 100)));
|
|
181399
|
-
if (params.offset !== void 0) search3.set("offset", String(Math.max(0, params.offset)));
|
|
181400
|
-
setOptionalParam(search3, "directoriesOnly", params.directoriesOnly);
|
|
181401
|
-
setOptionalParam(search3, "allowAbsolute", params.allowAbsolute);
|
|
181402
|
-
return this.request(appendSearch(`/nodes/${encodeURIComponent(nodeId)}/workdir/tree`, search3));
|
|
181403
|
-
}
|
|
181404
|
-
getNodeWorkDirBranchInfo(nodeId, params = {}) {
|
|
181405
|
-
const search3 = new URLSearchParams();
|
|
181406
|
-
setOptionalParam(search3, "path", params.path);
|
|
181407
|
-
if (params.limit !== void 0) search3.set("limit", String(Math.min(Math.max(1, params.limit), 20)));
|
|
181408
|
-
if (params.offset !== void 0) search3.set("offset", String(Math.max(0, params.offset)));
|
|
181409
|
-
setOptionalParam(search3, "allowAbsolute", params.allowAbsolute);
|
|
181410
|
-
return this.request(appendSearch(`/nodes/${encodeURIComponent(nodeId)}/workdir/branch`, search3));
|
|
181411
|
-
}
|
|
181412
|
-
createNodeWorkDirBranch(nodeId, body3) {
|
|
181413
|
-
return this.request(`/nodes/${encodeURIComponent(nodeId)}/workdir/branch`, { method: "POST", body: body3 });
|
|
181414
|
-
}
|
|
181415
|
-
getNodeNativeSessions(nodeId, params) {
|
|
181416
|
-
const search3 = new URLSearchParams();
|
|
181417
|
-
search3.set("agent", params.agent);
|
|
181418
|
-
if (params.limit !== void 0) search3.set("limit", String(Math.min(Math.max(1, params.limit), 100)));
|
|
181419
|
-
return this.request(`/nodes/${encodeURIComponent(nodeId)}/native-sessions?${search3.toString()}`);
|
|
181420
|
-
}
|
|
181421
|
-
startNodeTerminalSession(nodeId, body3) {
|
|
181422
|
-
return this.request(`/nodes/${encodeURIComponent(nodeId)}/terminal/sessions`, { method: "POST", body: body3 });
|
|
181423
|
-
}
|
|
181424
|
-
listNodeTerminalSessions(nodeId) {
|
|
181425
|
-
return this.request(`/nodes/${encodeURIComponent(nodeId)}/terminal/sessions`);
|
|
181426
|
-
}
|
|
181427
|
-
getNodeTerminalSession(nodeId, sessionId) {
|
|
181428
|
-
return this.request(`/nodes/${encodeURIComponent(nodeId)}/terminal/sessions/${encodeURIComponent(sessionId)}`);
|
|
181429
|
-
}
|
|
181430
|
-
stopNodeTerminalSession(nodeId, sessionId) {
|
|
181431
|
-
return this.request(`/nodes/${encodeURIComponent(nodeId)}/terminal/sessions/${encodeURIComponent(sessionId)}/stop`, { method: "POST" });
|
|
181432
|
-
}
|
|
181433
|
-
async getTasks(params = {}) {
|
|
181434
|
-
const search3 = new URLSearchParams();
|
|
181435
|
-
setOptionalParam(search3, "status", params.status);
|
|
181436
|
-
setOptionalParam(search3, "assignedTo", params.assignedTo);
|
|
181437
|
-
setOptionalParam(search3, "priority", params.priority);
|
|
181438
|
-
if (params.limit) search3.set("limit", String(Math.min(Math.max(1, params.limit), 100)));
|
|
181439
|
-
if (params.offset) search3.set("offset", String(params.offset));
|
|
181440
|
-
const result = await this.request(appendSearch("/tasks", search3));
|
|
181441
|
-
return result.tasks;
|
|
181442
|
-
}
|
|
181443
|
-
getTask(id) {
|
|
181444
|
-
return this.request(`/tasks/${encodeURIComponent(id)}`);
|
|
181445
|
-
}
|
|
181446
|
-
createTask(body3) {
|
|
181447
|
-
return this.request("/tasks", { method: "POST", body: body3 });
|
|
181448
|
-
}
|
|
181449
|
-
attachNativeSession(body3) {
|
|
181450
|
-
return this.request("/tasks/import-session", { method: "POST", body: body3 });
|
|
181451
|
-
}
|
|
181452
|
-
deleteTask(id) {
|
|
181453
|
-
return this.request(`/tasks/${encodeURIComponent(id)}`, { method: "DELETE" });
|
|
181454
|
-
}
|
|
181455
|
-
batchDeleteTasks(ids) {
|
|
181456
|
-
return this.request("/tasks/batch/delete", { method: "POST", body: { ids } });
|
|
181457
|
-
}
|
|
181458
|
-
batchArchiveTasks(ids) {
|
|
181459
|
-
return this.request("/tasks/batch/archive", { method: "POST", body: { ids } });
|
|
181460
|
-
}
|
|
181461
|
-
archiveTask(id) {
|
|
181462
|
-
return this.request(`/tasks/${encodeURIComponent(id)}`, { method: "PATCH", body: { status: "archived" } });
|
|
181463
|
-
}
|
|
181464
|
-
cancelTask(id) {
|
|
181465
|
-
return this.request(`/tasks/${encodeURIComponent(id)}/cancel`, { method: "POST" });
|
|
181466
|
-
}
|
|
181467
|
-
retryTask(id) {
|
|
181468
|
-
return this.request(`/tasks/${encodeURIComponent(id)}/retry`, { method: "POST" });
|
|
181469
|
-
}
|
|
181470
|
-
assignTask(id, nodeId) {
|
|
181471
|
-
return this.request(`/tasks/${encodeURIComponent(id)}/assign`, { method: "POST", body: { nodeId } });
|
|
181472
|
-
}
|
|
181473
|
-
getTaskLogs(id, after) {
|
|
181474
|
-
return this.request(`/tasks/${encodeURIComponent(id)}/logs${after !== void 0 ? `?after=${after}` : ""}`);
|
|
181475
|
-
}
|
|
181476
|
-
sendTaskMessage(id, content3) {
|
|
181477
|
-
return this.request(`/tasks/${encodeURIComponent(id)}/message`, { method: "POST", body: { content: content3 } });
|
|
181478
|
-
}
|
|
181479
|
-
createTaskShare(id, options) {
|
|
181480
|
-
return this.request(`/tasks/${encodeURIComponent(id)}/share`, { method: "POST", body: options });
|
|
181481
|
-
}
|
|
181482
|
-
deleteTaskShare(id) {
|
|
181483
|
-
return this.request(`/tasks/${encodeURIComponent(id)}/share`, { method: "DELETE" });
|
|
181484
|
-
}
|
|
181485
|
-
getSharedConversation(shareId) {
|
|
181486
|
-
return this.request(`/shared/conversations/${encodeURIComponent(shareId)}`);
|
|
181487
|
-
}
|
|
181488
|
-
getSharedConversationLogs(shareId, after) {
|
|
181489
|
-
return this.request(`/shared/conversations/${encodeURIComponent(shareId)}/logs${after !== void 0 ? `?after=${after}` : ""}`);
|
|
181490
|
-
}
|
|
181491
|
-
getSharedTaskOutput(shareId) {
|
|
181492
|
-
return this.request(`/shared/conversations/${encodeURIComponent(shareId)}/output`);
|
|
181493
|
-
}
|
|
181494
|
-
getSharedTaskOutputTree(shareId, dirPath = ".") {
|
|
181495
|
-
return this.request(`/shared/conversations/${encodeURIComponent(shareId)}/output/tree?path=${encodeURIComponent(dirPath)}`);
|
|
181496
|
-
}
|
|
181497
|
-
getSharedTaskOutputContent(shareId, filePath) {
|
|
181498
|
-
return this.request(`/shared/conversations/${encodeURIComponent(shareId)}/output/content?path=${encodeURIComponent(filePath)}`);
|
|
181499
|
-
}
|
|
181500
|
-
createSharedTaskPreviewSession(shareId, entryPath) {
|
|
181501
|
-
return this.request(`/shared/conversations/${encodeURIComponent(shareId)}/output/preview-sessions`, { method: "POST", body: entryPath ? { path: entryPath } : {} });
|
|
181502
|
-
}
|
|
181503
|
-
getTaskOutput(id) {
|
|
181504
|
-
return this.request(`/tasks/${encodeURIComponent(id)}/output`);
|
|
181505
|
-
}
|
|
181506
|
-
getTaskOutputTree(id, dirPath = ".") {
|
|
181507
|
-
return this.request(`/tasks/${encodeURIComponent(id)}/output/tree?path=${encodeURIComponent(dirPath)}`);
|
|
181508
|
-
}
|
|
181509
|
-
getTaskOutputContent(id, filePath) {
|
|
181510
|
-
return this.request(`/tasks/${encodeURIComponent(id)}/output/content?path=${encodeURIComponent(filePath)}`);
|
|
181511
|
-
}
|
|
181512
|
-
createTaskPreviewSession(id, options) {
|
|
181513
|
-
return this.request(`/tasks/${encodeURIComponent(id)}/output/preview-sessions`, { method: "POST", body: buildPreviewSessionBody(options) });
|
|
181514
|
-
}
|
|
181515
|
-
getTaskOutputDiff(id) {
|
|
181516
|
-
return this.request(`/tasks/${encodeURIComponent(id)}/output/diff`);
|
|
181517
|
-
}
|
|
181518
|
-
};
|
|
181519
|
-
var defaultClient = new MeshyClient();
|
|
181520
|
-
|
|
181521
|
-
// ../../packages/client-sdk/src/connection-qr.ts
|
|
181522
|
-
init_cjs_shims();
|
|
181523
|
-
var MESHY_CONNECTION_QR_TYPE = "meshy.mobile.connection";
|
|
181524
|
-
function createMobileConnectionQrPayload({
|
|
181525
|
-
name: name2,
|
|
181526
|
-
baseUrl
|
|
181527
|
-
}) {
|
|
181528
|
-
return {
|
|
181529
|
-
type: MESHY_CONNECTION_QR_TYPE,
|
|
181530
|
-
version: 1,
|
|
181531
|
-
name: name2,
|
|
181532
|
-
baseUrl
|
|
181533
|
-
};
|
|
181534
|
-
}
|
|
181535
|
-
function createNodeMobileConnectionQrPayload({
|
|
181536
|
-
nodeName,
|
|
181537
|
-
nodeEndpoint
|
|
181538
|
-
}) {
|
|
181539
|
-
return createMobileConnectionQrPayload({
|
|
181540
|
-
name: `${nodeName} Node`,
|
|
181541
|
-
baseUrl: nodeEndpoint
|
|
181542
|
-
});
|
|
181543
|
-
}
|
|
181544
|
-
|
|
181545
|
-
// ../../packages/client-sdk/src/events.ts
|
|
181546
|
-
init_cjs_shims();
|
|
181547
|
-
|
|
181548
|
-
// ../../packages/client-sdk/src/types.ts
|
|
181549
|
-
init_cjs_shims();
|
|
181550
|
-
|
|
181551
|
-
// ../../packages/client-sdk/src/mobile/index.ts
|
|
181552
|
-
init_cjs_shims();
|
|
181553
|
-
|
|
181554
|
-
// ../../packages/client-sdk/src/mobile/protocol/index.ts
|
|
181555
|
-
init_cjs_shims();
|
|
181556
|
-
|
|
181557
|
-
// ../../packages/client-sdk/src/mobile/protocol/qr.ts
|
|
181558
|
-
init_cjs_shims();
|
|
181559
|
-
|
|
181560
|
-
// src/bootstrap/mobile-connection-qr.ts
|
|
181561
|
-
var require2 = (0, import_node_module.createRequire)(importMetaUrl);
|
|
181562
|
-
function printMobileConnectionQrs(writer, options) {
|
|
181563
|
-
for (const qr of createMobileConnectionQrs(options)) {
|
|
181564
|
-
writer.line("");
|
|
181565
|
-
writer.line(`Mobile Connection QR (${qr.label}): ${qr.endpoint}`);
|
|
181566
|
-
writer.line(qr.qrCode);
|
|
181567
|
-
}
|
|
181568
|
-
}
|
|
181569
|
-
function createMobileConnectionQrs(options) {
|
|
181570
|
-
if (!options.enabled) return [];
|
|
181571
|
-
const qrs = [];
|
|
181572
|
-
appendMobileConnectionQr(qrs, {
|
|
181573
|
-
label: "Node",
|
|
181574
|
-
name: options.nodeName,
|
|
181575
|
-
endpoint: options.nodeEndpoint
|
|
181576
|
-
});
|
|
181577
|
-
return qrs;
|
|
181578
|
-
}
|
|
181579
|
-
function appendMobileConnectionQr(qrs, options) {
|
|
181580
|
-
if (!isDevTunnelOrigin(options.endpoint) || !options.endpoint) return;
|
|
181581
|
-
const payload = createNodeMobileConnectionQrPayload({
|
|
181582
|
-
nodeName: options.name,
|
|
181583
|
-
nodeEndpoint: options.endpoint
|
|
181584
|
-
});
|
|
181585
|
-
const qrCode = renderQrCode(JSON.stringify(payload));
|
|
181586
|
-
if (!qrCode) return;
|
|
181587
|
-
qrs.push({
|
|
181588
|
-
label: options.label,
|
|
181589
|
-
endpoint: options.endpoint,
|
|
181590
|
-
qrCode
|
|
181591
|
-
});
|
|
181592
|
-
}
|
|
181593
|
-
function renderQrCode(payload) {
|
|
181594
|
-
let rendered = "";
|
|
181595
|
-
try {
|
|
181596
|
-
const qrcodeTerminal = requireQrcodeTerminal();
|
|
181597
|
-
qrcodeTerminal.generate(payload, { small: true }, (output) => {
|
|
181598
|
-
rendered = output;
|
|
181599
|
-
});
|
|
181600
|
-
} catch {
|
|
181601
|
-
return null;
|
|
181602
|
-
}
|
|
181603
|
-
return rendered || null;
|
|
181604
|
-
}
|
|
181605
|
-
function requireQrcodeTerminal() {
|
|
181606
|
-
return require2("qrcode-terminal");
|
|
181607
|
-
}
|
|
181608
|
-
function isDevTunnelOrigin(value) {
|
|
181609
|
-
if (!value) return false;
|
|
181610
|
-
try {
|
|
181611
|
-
const hostname6 = new URL(value).hostname.toLowerCase().replace(/\.$/, "");
|
|
181612
|
-
return hostname6 === "devtunnels.ms" || hostname6.endsWith(".devtunnels.ms");
|
|
181613
|
-
} catch {
|
|
181614
|
-
return false;
|
|
181615
|
-
}
|
|
181616
|
-
}
|
|
181617
|
-
|
|
181618
181383
|
// src/bootstrap/mobile-pairing.ts
|
|
181619
181384
|
init_cjs_shims();
|
|
181620
|
-
var
|
|
181385
|
+
var import_node_module = require("module");
|
|
181621
181386
|
function setupMobilePairing(options) {
|
|
181622
181387
|
const service = new MobilePairingInvitationService({
|
|
181623
181388
|
nodeId: options.nodeId,
|
|
@@ -181638,9 +181403,9 @@ function setupMobilePairing(options) {
|
|
|
181638
181403
|
nodeName: options.nodeName
|
|
181639
181404
|
};
|
|
181640
181405
|
}
|
|
181641
|
-
function
|
|
181406
|
+
function renderQrCode(payload) {
|
|
181642
181407
|
try {
|
|
181643
|
-
const localRequire = (0,
|
|
181408
|
+
const localRequire = (0, import_node_module.createRequire)(importMetaUrl);
|
|
181644
181409
|
const qrcodeTerminal = localRequire("qrcode-terminal");
|
|
181645
181410
|
let rendered = null;
|
|
181646
181411
|
qrcodeTerminal.generate(payload, { small: true }, (output) => {
|
|
@@ -181668,7 +181433,7 @@ function printMobilePairingQr(writer, pairing) {
|
|
|
181668
181433
|
}
|
|
181669
181434
|
const created = pairing.service.createInvitation({ createdBy: "node-startup" });
|
|
181670
181435
|
const serialized = serializePairingQrPayload(created.qr);
|
|
181671
|
-
const qr =
|
|
181436
|
+
const qr = renderQrCode(serialized);
|
|
181672
181437
|
writer.line("");
|
|
181673
181438
|
writer.line(`Mobile Pairing QR (scan in the Meshy app, expires ${created.invitation.expiresAt}, max uses ${created.invitation.maxUses}):`);
|
|
181674
181439
|
if (qr) {
|
|
@@ -181682,7 +181447,7 @@ function printMobilePairingQr(writer, pairing) {
|
|
|
181682
181447
|
|
|
181683
181448
|
// src/bootstrap/runtime-restart.ts
|
|
181684
181449
|
init_cjs_shims();
|
|
181685
|
-
var
|
|
181450
|
+
var fs33 = __toESM(require("fs"), 1);
|
|
181686
181451
|
var nodePath2 = __toESM(require("path"), 1);
|
|
181687
181452
|
var import_node_child_process15 = require("child_process");
|
|
181688
181453
|
var RUNTIME_UPDATE_CHECK_INTERVAL_MS = 6 * 60 * 60 * 1e3;
|
|
@@ -181926,8 +181691,8 @@ function createRuntimeRestartLaunchPlan(options) {
|
|
|
181926
181691
|
};
|
|
181927
181692
|
}
|
|
181928
181693
|
function scheduleRuntimeRestart(plan, options = {}) {
|
|
181929
|
-
|
|
181930
|
-
const logFd =
|
|
181694
|
+
fs33.mkdirSync(nodePath2.dirname(plan.logPath), { recursive: true });
|
|
181695
|
+
const logFd = fs33.openSync(plan.logPath, "a");
|
|
181931
181696
|
const spawnImpl = options.spawnImpl ?? import_node_child_process15.spawn;
|
|
181932
181697
|
const env4 = {
|
|
181933
181698
|
...process.env,
|
|
@@ -182442,7 +182207,7 @@ init_cjs_shims();
|
|
|
182442
182207
|
|
|
182443
182208
|
// ../../node_modules/.pnpm/@opentelemetry+resource-detector-azure@0.25.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/resource-detector-azure/build/esm/detectors/AzureAksDetector.js
|
|
182444
182209
|
init_cjs_shims();
|
|
182445
|
-
var
|
|
182210
|
+
var fs40 = __toESM(require("fs"));
|
|
182446
182211
|
init_esm8();
|
|
182447
182212
|
|
|
182448
182213
|
// ../../node_modules/.pnpm/@opentelemetry+resource-detector-azure@0.25.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/resource-detector-azure/build/esm/semconv.js
|
|
@@ -182542,10 +182307,10 @@ var AzureAksDetector = class {
|
|
|
182542
182307
|
}
|
|
182543
182308
|
getAksMetadataFromFile() {
|
|
182544
182309
|
try {
|
|
182545
|
-
if (!
|
|
182310
|
+
if (!fs40.existsSync(AKS_METADATA_FILE_PATH)) {
|
|
182546
182311
|
return void 0;
|
|
182547
182312
|
}
|
|
182548
|
-
const content3 =
|
|
182313
|
+
const content3 = fs40.readFileSync(AKS_METADATA_FILE_PATH, "utf8");
|
|
182549
182314
|
const metadata = {};
|
|
182550
182315
|
const lines = content3.split("\n");
|
|
182551
182316
|
for (const line of lines) {
|
|
@@ -183334,12 +183099,12 @@ var import_node_path5 = __toESM(require("path"), 1);
|
|
|
183334
183099
|
|
|
183335
183100
|
// ../../node_modules/.pnpm/@azure+monitor-opentelemetry@1.18.1/node_modules/@azure/monitor-opentelemetry/dist/esm/shared/module.js
|
|
183336
183101
|
init_cjs_shims();
|
|
183337
|
-
var
|
|
183102
|
+
var import_node_module2 = require("module");
|
|
183338
183103
|
var import_node_path4 = require("path");
|
|
183339
183104
|
var import_node_url2 = require("url");
|
|
183340
183105
|
function loadAzureFunctionCore() {
|
|
183341
183106
|
try {
|
|
183342
|
-
return (0,
|
|
183107
|
+
return (0, import_node_module2.createRequire)(importMetaUrl)("@azure/functions-core");
|
|
183343
183108
|
} catch (e) {
|
|
183344
183109
|
return void 0;
|
|
183345
183110
|
}
|
|
@@ -185671,13 +185436,13 @@ function normalizeUnreserved(uri) {
|
|
|
185671
185436
|
// ../../node_modules/.pnpm/@azure+monitor-opentelemetry@1.18.1/node_modules/@azure/monitor-opentelemetry/dist/esm/generated/api/operations.js
|
|
185672
185437
|
init_esm32();
|
|
185673
185438
|
function _publishSend(context4, ikey, options = { requestOptions: {} }) {
|
|
185674
|
-
const
|
|
185439
|
+
const path47 = expandUrlTemplate("/QuickPulseService.svc/post{?api%2Dversion,ikey}", {
|
|
185675
185440
|
"api%2Dversion": context4.apiVersion ?? "2024-04-01-preview",
|
|
185676
185441
|
ikey
|
|
185677
185442
|
}, {
|
|
185678
185443
|
allowReserved: options?.requestOptions?.skipUrlEncoding
|
|
185679
185444
|
});
|
|
185680
|
-
return context4.path(
|
|
185445
|
+
return context4.path(path47).post({
|
|
185681
185446
|
...operationOptionsToRequestParameters2(options),
|
|
185682
185447
|
contentType: "application/json",
|
|
185683
185448
|
headers: {
|
|
@@ -185703,13 +185468,13 @@ async function publish(context4, ikey, options = { requestOptions: {} }) {
|
|
|
185703
185468
|
return _publishDeserialize(result);
|
|
185704
185469
|
}
|
|
185705
185470
|
function _isSubscribedSend(context4, ikey, options = { requestOptions: {} }) {
|
|
185706
|
-
const
|
|
185471
|
+
const path47 = expandUrlTemplate("/QuickPulseService.svc/ping{?api%2Dversion,ikey}", {
|
|
185707
185472
|
"api%2Dversion": context4.apiVersion ?? "2024-04-01-preview",
|
|
185708
185473
|
ikey
|
|
185709
185474
|
}, {
|
|
185710
185475
|
allowReserved: options?.requestOptions?.skipUrlEncoding
|
|
185711
185476
|
});
|
|
185712
|
-
return context4.path(
|
|
185477
|
+
return context4.path(path47).post({
|
|
185713
185478
|
...operationOptionsToRequestParameters2(options),
|
|
185714
185479
|
contentType: "application/json",
|
|
185715
185480
|
headers: {
|
|
@@ -187780,7 +187545,7 @@ init_cjs_shims();
|
|
|
187780
187545
|
|
|
187781
187546
|
// ../../node_modules/.pnpm/@opentelemetry+instrumentation@0.211.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/instrumentation/build/esm/platform/node/instrumentation.js
|
|
187782
187547
|
init_cjs_shims();
|
|
187783
|
-
var
|
|
187548
|
+
var path44 = __toESM(require("path"));
|
|
187784
187549
|
var import_util14 = require("util");
|
|
187785
187550
|
|
|
187786
187551
|
// ../../node_modules/.pnpm/@opentelemetry+instrumentation@0.211.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/instrumentation/build/esm/semver.js
|
|
@@ -188370,7 +188135,7 @@ var InstrumentationAbstract2 = class {
|
|
|
188370
188135
|
// ../../node_modules/.pnpm/@opentelemetry+instrumentation@0.211.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/instrumentation/build/esm/platform/node/RequireInTheMiddleSingleton.js
|
|
188371
188136
|
init_cjs_shims();
|
|
188372
188137
|
var import_require_in_the_middle3 = __toESM(require_require_in_the_middle());
|
|
188373
|
-
var
|
|
188138
|
+
var path43 = __toESM(require("path"));
|
|
188374
188139
|
|
|
188375
188140
|
// ../../node_modules/.pnpm/@opentelemetry+instrumentation@0.211.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/instrumentation/build/esm/platform/node/ModuleNameTrie.js
|
|
188376
188141
|
init_cjs_shims();
|
|
@@ -188500,7 +188265,7 @@ var RequireInTheMiddleSingleton2 = class _RequireInTheMiddleSingleton {
|
|
|
188500
188265
|
}
|
|
188501
188266
|
};
|
|
188502
188267
|
function normalizePathSeparators2(moduleNameOrPath) {
|
|
188503
|
-
return
|
|
188268
|
+
return path43.sep !== ModuleNameSeparator2 ? moduleNameOrPath.split(path43.sep).join(ModuleNameSeparator2) : moduleNameOrPath;
|
|
188504
188269
|
}
|
|
188505
188270
|
|
|
188506
188271
|
// ../../node_modules/.pnpm/@opentelemetry+instrumentation@0.211.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/instrumentation/build/esm/platform/node/instrumentation.js
|
|
@@ -188603,7 +188368,7 @@ var InstrumentationBase2 = class extends InstrumentationAbstract2 {
|
|
|
188603
188368
|
}
|
|
188604
188369
|
_extractPackageVersion(baseDir) {
|
|
188605
188370
|
try {
|
|
188606
|
-
const json = (0, import_fs6.readFileSync)(
|
|
188371
|
+
const json = (0, import_fs6.readFileSync)(path44.join(baseDir, "package.json"), {
|
|
188607
188372
|
encoding: "utf8"
|
|
188608
188373
|
});
|
|
188609
188374
|
const version3 = JSON.parse(json).version;
|
|
@@ -188645,7 +188410,7 @@ var InstrumentationBase2 = class extends InstrumentationAbstract2 {
|
|
|
188645
188410
|
return exports2;
|
|
188646
188411
|
}
|
|
188647
188412
|
const files = module2.files ?? [];
|
|
188648
|
-
const normalizedName =
|
|
188413
|
+
const normalizedName = path44.normalize(name2);
|
|
188649
188414
|
const supportedFileInstrumentations = files.filter((f) => f.name === normalizedName && isSupported2(f.supportedVersions, version3, module2.includePrerelease));
|
|
188650
188415
|
return supportedFileInstrumentations.reduce((patchedExports, file) => {
|
|
188651
188416
|
file.moduleExports = patchedExports;
|
|
@@ -188691,8 +188456,8 @@ var InstrumentationBase2 = class extends InstrumentationAbstract2 {
|
|
|
188691
188456
|
this._warnOnPreloadedModules();
|
|
188692
188457
|
for (const module2 of this._modules) {
|
|
188693
188458
|
const hookFn = (exports2, name2, baseDir) => {
|
|
188694
|
-
if (!baseDir &&
|
|
188695
|
-
const parsedPath =
|
|
188459
|
+
if (!baseDir && path44.isAbsolute(name2)) {
|
|
188460
|
+
const parsedPath = path44.parse(name2);
|
|
188696
188461
|
name2 = parsedPath.name;
|
|
188697
188462
|
baseDir = parsedPath.dir;
|
|
188698
188463
|
}
|
|
@@ -188701,7 +188466,7 @@ var InstrumentationBase2 = class extends InstrumentationAbstract2 {
|
|
|
188701
188466
|
const onRequire = (exports2, name2, baseDir) => {
|
|
188702
188467
|
return this._onRequire(module2, exports2, name2, baseDir);
|
|
188703
188468
|
};
|
|
188704
|
-
const hook =
|
|
188469
|
+
const hook = path44.isAbsolute(module2.name) ? new import_require_in_the_middle4.Hook([module2.name], { internals: true }, onRequire) : this._requireInTheMiddleSingleton.register(module2.name, onRequire);
|
|
188705
188470
|
this._hooks.push(hook);
|
|
188706
188471
|
const esmHook = new import_import_in_the_middle2.Hook([module2.name], { internals: false }, hookFn);
|
|
188707
188472
|
this._hooks.push(esmHook);
|
|
@@ -190733,6 +190498,17 @@ function splitEnvList(value) {
|
|
|
190733
190498
|
}
|
|
190734
190499
|
var DEFAULT_MOBILE_AAD_CLIENT_ID = "195fbb50-69da-45d8-b811-10d18264270b";
|
|
190735
190500
|
var DEFAULT_MOBILE_AAD_TENANT_ID = "72f988bf-86f1-41af-91ab-2d7cd011db47";
|
|
190501
|
+
function normalizeGuidBasedSelfScope(scope, clientId) {
|
|
190502
|
+
const selfApiPrefix = `api://${clientId}/`;
|
|
190503
|
+
if (scope.toLowerCase().startsWith(selfApiPrefix.toLowerCase())) {
|
|
190504
|
+
return `${clientId}/${scope.slice(selfApiPrefix.length)}`;
|
|
190505
|
+
}
|
|
190506
|
+
return scope;
|
|
190507
|
+
}
|
|
190508
|
+
function resolveMobileAadScopes(env4, clientId) {
|
|
190509
|
+
const configuredScopes = splitEnvList(env4.MESHY_MOBILE_AAD_SCOPES) ?? [`${clientId}/.default`];
|
|
190510
|
+
return configuredScopes.map((scope) => normalizeGuidBasedSelfScope(scope, clientId));
|
|
190511
|
+
}
|
|
190736
190512
|
function isTruthyEnv(value) {
|
|
190737
190513
|
return ["1", "true", "yes", "on"].includes((value ?? "").trim().toLowerCase());
|
|
190738
190514
|
}
|
|
@@ -190742,7 +190518,7 @@ function resolveMobileAadConfig(env4) {
|
|
|
190742
190518
|
}
|
|
190743
190519
|
const tenantId = env4.MESHY_MOBILE_AAD_TENANT_ID?.trim() || DEFAULT_MOBILE_AAD_TENANT_ID;
|
|
190744
190520
|
const clientId = env4.MESHY_MOBILE_AAD_CLIENT_ID?.trim() || DEFAULT_MOBILE_AAD_CLIENT_ID;
|
|
190745
|
-
const scopes =
|
|
190521
|
+
const scopes = resolveMobileAadScopes(env4, clientId);
|
|
190746
190522
|
const audiences = splitEnvList(env4.MESHY_MOBILE_AAD_AUDIENCES) ?? [`api://${clientId}`, clientId];
|
|
190747
190523
|
const allowedTenants = splitEnvList(env4.MESHY_MOBILE_AAD_ALLOWED_TENANTS) ?? [tenantId];
|
|
190748
190524
|
const allowedUpns = splitEnvList(env4.MESHY_MOBILE_AAD_ALLOWED_UPNS);
|
|
@@ -190763,6 +190539,9 @@ function resolveMobileAadConfigForStartup(args, env4) {
|
|
|
190763
190539
|
}
|
|
190764
190540
|
return resolveMobileAadConfig(env4);
|
|
190765
190541
|
}
|
|
190542
|
+
function resolveMobileAadConfigForExplicitPairing(env4) {
|
|
190543
|
+
return resolveMobileAadConfig(env4);
|
|
190544
|
+
}
|
|
190766
190545
|
function buildTelemetryBaseDimensions(options) {
|
|
190767
190546
|
return {
|
|
190768
190547
|
appVersion: options.runtimeMetadata.packageVersion,
|
|
@@ -190994,18 +190773,29 @@ async function startNode(args) {
|
|
|
190994
190773
|
const previewProxyManager = new PreviewProxyManager();
|
|
190995
190774
|
let deps;
|
|
190996
190775
|
let requestShutdownForRestart;
|
|
190997
|
-
|
|
190998
|
-
const
|
|
190999
|
-
|
|
191000
|
-
|
|
191001
|
-
|
|
191002
|
-
|
|
191003
|
-
|
|
191004
|
-
|
|
191005
|
-
|
|
191006
|
-
|
|
191007
|
-
|
|
191008
|
-
|
|
190776
|
+
let mobilePairing = null;
|
|
190777
|
+
const ensureMobilePairing = () => {
|
|
190778
|
+
if (mobilePairing) return mobilePairing;
|
|
190779
|
+
const mobileAad = hydratedArgs.args.qrCode === true ? resolveMobileAadConfigForStartup(hydratedArgs.args, process.env) : resolveMobileAadConfigForExplicitPairing(process.env);
|
|
190780
|
+
if (!mobileAad) {
|
|
190781
|
+
logger33.child("mobile-auth").info("mobile pairing disabled via MESHY_MOBILE_PAIRING_DISABLED");
|
|
190782
|
+
return null;
|
|
190783
|
+
}
|
|
190784
|
+
mobilePairing = setupMobilePairing({
|
|
190785
|
+
nodeId: self2.id,
|
|
190786
|
+
nodeName: self2.name,
|
|
190787
|
+
logger: logger33,
|
|
190788
|
+
getEndpoint: () => meshyNode.getNodeRegistry().getSelf().endpoint,
|
|
190789
|
+
aad: mobileAad.aad,
|
|
190790
|
+
aadValidation: mobileAad.validation
|
|
190791
|
+
});
|
|
190792
|
+
if (deps) {
|
|
190793
|
+
deps.mobilePairingInvitations = mobilePairing.service;
|
|
190794
|
+
deps.mobileAadValidator = mobilePairing.validator;
|
|
190795
|
+
}
|
|
190796
|
+
return mobilePairing;
|
|
190797
|
+
};
|
|
190798
|
+
const startupMobilePairing = hydratedArgs.args.qrCode === true ? ensureMobilePairing() : null;
|
|
191009
190799
|
const tunnelManager = createTunnelManager({
|
|
191010
190800
|
authMetadata,
|
|
191011
190801
|
config: config2,
|
|
@@ -191130,8 +190920,12 @@ async function startNode(args) {
|
|
|
191130
190920
|
previewSessionManager,
|
|
191131
190921
|
previewProxyManager,
|
|
191132
190922
|
quickChatStore: createQuickChatStore(config2.storage.path),
|
|
191133
|
-
mobilePairingInvitations:
|
|
191134
|
-
mobileAadValidator:
|
|
190923
|
+
mobilePairingInvitations: startupMobilePairing?.service,
|
|
190924
|
+
mobileAadValidator: startupMobilePairing?.validator,
|
|
190925
|
+
ensureMobilePairing: () => {
|
|
190926
|
+
const pairing = ensureMobilePairing();
|
|
190927
|
+
return pairing ? { service: pairing.service, validator: pairing.validator } : null;
|
|
190928
|
+
}
|
|
191135
190929
|
};
|
|
191136
190930
|
meshyNode.getLogger().info("configured node auth mode", {
|
|
191137
190931
|
authEnabled: authMetadata.enabled,
|
|
@@ -191154,7 +190948,6 @@ async function startNode(args) {
|
|
|
191154
190948
|
});
|
|
191155
190949
|
terminalWriter.line(`
|
|
191156
190950
|
${banner}`);
|
|
191157
|
-
printMobileConnectionQrs(terminalWriter, { enabled: hydratedArgs.args.qrCode === true, nodeName: self3.name, nodeEndpoint: self3.endpoint });
|
|
191158
190951
|
if (mobilePairing) {
|
|
191159
190952
|
printMobilePairingQr(terminalWriter, mobilePairing);
|
|
191160
190953
|
}
|