bdy 1.25.37-dev → 1.25.38-dev
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/distTs/package.json +1 -1
- package/distTs/src/agent/agent.js +65 -6
- package/distTs/src/command/tunnel/http.js +1 -1
- package/distTs/src/command/tunnel/start.js +1 -1
- package/distTs/src/command/tunnel/tcp.js +1 -1
- package/distTs/src/command/tunnel/tls.js +1 -1
- package/distTs/src/output.js +11 -4
- package/distTs/src/tunnel/output/interactive/tunnel.js +14 -1
- package/distTs/src/tunnel/output/noninteractive/tunnel.js +14 -0
- package/distTs/src/tunnel/output/noninteractive/tunnelJsonl.js +8 -0
- package/distTs/src/types/tunnel.js +6 -1
- package/distTs/src/utils.js +4 -3
- package/package.json +1 -1
package/distTs/package.json
CHANGED
|
@@ -26,6 +26,9 @@ class Agent extends events_1.default {
|
|
|
26
26
|
socket;
|
|
27
27
|
manager;
|
|
28
28
|
updateStatusExpiry;
|
|
29
|
+
replaceTunnelExpiry;
|
|
30
|
+
replacedTunnelId;
|
|
31
|
+
replacementTunnelId;
|
|
29
32
|
onRefresh;
|
|
30
33
|
constructor(id, host, token, service, target, tunneling, proxy, tags, api, disabled) {
|
|
31
34
|
super();
|
|
@@ -43,6 +46,9 @@ class Agent extends events_1.default {
|
|
|
43
46
|
this.api = api;
|
|
44
47
|
this.manager = null;
|
|
45
48
|
this.updateStatusExpiry = null;
|
|
49
|
+
this.replaceTunnelExpiry = null;
|
|
50
|
+
this.replacedTunnelId = null;
|
|
51
|
+
this.replacementTunnelId = null;
|
|
46
52
|
this.onRefresh = null;
|
|
47
53
|
this.socket = new client_1.default(host, id, token);
|
|
48
54
|
this.socket.on(tunnel_1.TUNNEL_SOCKET_EVENT.FETCH_SUCCESS, (data) => this._onSocketFetch(data));
|
|
@@ -62,6 +68,7 @@ class Agent extends events_1.default {
|
|
|
62
68
|
if (this.updateStatusExpiry)
|
|
63
69
|
clearTimeout(this.updateStatusExpiry);
|
|
64
70
|
this.updateStatusExpiry = null;
|
|
71
|
+
this.clearTunnelReplacement();
|
|
65
72
|
this.manager = null;
|
|
66
73
|
this.onRefresh = null;
|
|
67
74
|
this.api = null;
|
|
@@ -70,11 +77,25 @@ class Agent extends events_1.default {
|
|
|
70
77
|
}
|
|
71
78
|
_onSocketTunnel(data, action) {
|
|
72
79
|
if (action === 'DEL') {
|
|
73
|
-
this.
|
|
74
|
-
|
|
75
|
-
|
|
80
|
+
if (this.service) {
|
|
81
|
+
this.destroyTunnel(data.id);
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
// A rename or a region change arrives as DEL of the old tunnel and ADD of its
|
|
85
|
+
// replacement. The session survives it: the old tunnel stops quietly and waits for
|
|
86
|
+
// the ADD; without one in time the tunnel was deleted for good.
|
|
87
|
+
if (!this.destroyTunnel(data.id, false))
|
|
88
|
+
return;
|
|
89
|
+
if (this.tunnels.length > 0)
|
|
90
|
+
return;
|
|
91
|
+
this.awaitTunnelReplacement(data.id);
|
|
76
92
|
}
|
|
77
93
|
else {
|
|
94
|
+
// The ADD names the replacement - the fetch alone cannot tell it from any other
|
|
95
|
+
// tunnel of the agent
|
|
96
|
+
if (this.replacedTunnelId && action === 'ADD' && data.id !== this.replacedTunnelId) {
|
|
97
|
+
this.replacementTunnelId = data.id;
|
|
98
|
+
}
|
|
78
99
|
logger_1.default.debug('Socket fetch tunnel after sync push');
|
|
79
100
|
if (this.socket) {
|
|
80
101
|
this.socket.fetch(!this.disabled, null, null, false, [], false, 1000);
|
|
@@ -141,7 +162,10 @@ class Agent extends events_1.default {
|
|
|
141
162
|
await this.makeAction(data.agent.action);
|
|
142
163
|
this.reclearLostUpdateStatus(data.agent.action);
|
|
143
164
|
const filtered = (data.tunnels || []).filter((t) => !!t.domain);
|
|
144
|
-
this.
|
|
165
|
+
if (this.replacedTunnelId)
|
|
166
|
+
this.resolveTunnelReplacement(filtered);
|
|
167
|
+
else
|
|
168
|
+
this.refreshTunnels(filtered);
|
|
145
169
|
}
|
|
146
170
|
catch (err) {
|
|
147
171
|
logger_1.default.error('Fetch error');
|
|
@@ -483,14 +507,49 @@ class Agent extends events_1.default {
|
|
|
483
507
|
tunnel.on(tunnel_1.TUNNEL_EVENT.STOPPED, () => this.update());
|
|
484
508
|
tunnel.on(tunnel_1.TUNNEL_EVENT.HTTP_REQUEST, (t, logRequest) => this.httpRequest(t.id, logRequest));
|
|
485
509
|
}
|
|
486
|
-
destroyTunnel(id) {
|
|
510
|
+
destroyTunnel(id, emitStopped = true) {
|
|
487
511
|
const tunnel = this.tunnels.find((t) => t.id === id);
|
|
488
512
|
if (!tunnel)
|
|
489
513
|
return null;
|
|
490
514
|
this.tunnels = this.tunnels.filter((t) => t.id !== tunnel.id);
|
|
491
|
-
tunnel.stop();
|
|
515
|
+
tunnel.stop(emitStopped);
|
|
492
516
|
tunnel.removeAllListeners();
|
|
493
517
|
return tunnel;
|
|
494
518
|
}
|
|
519
|
+
// No fetch of its own: the ADD that names the replacement triggers one.
|
|
520
|
+
awaitTunnelReplacement(id) {
|
|
521
|
+
this.clearTunnelReplacement();
|
|
522
|
+
this.replacedTunnelId = id;
|
|
523
|
+
this.replaceTunnelExpiry = setTimeout(() => this.tunnelRemoved(), utils_1.AGENT_TUNNEL_REPLACE_TIMEOUT_MS);
|
|
524
|
+
}
|
|
525
|
+
resolveTunnelReplacement(tunnels) {
|
|
526
|
+
// A fetch answered before the ADD (one from the refresh loop, a stale one listing the
|
|
527
|
+
// old tunnel, or one that caught the backend between the delete and the create)
|
|
528
|
+
// decides nothing - only the one listing the tunnel the ADD named does.
|
|
529
|
+
const replacementId = this.replacementTunnelId;
|
|
530
|
+
if (!replacementId || !tunnels.some((t) => t.id === replacementId))
|
|
531
|
+
return;
|
|
532
|
+
const replacedId = this.replacedTunnelId;
|
|
533
|
+
this.clearTunnelReplacement();
|
|
534
|
+
this.refreshTunnels(tunnels.filter((t) => t.id !== replacedId));
|
|
535
|
+
const replacement = this.tunnels.find((t) => t.id === replacementId);
|
|
536
|
+
if (!replacement)
|
|
537
|
+
return this.tunnelRemoved();
|
|
538
|
+
this.emit(tunnel_1.AGENT_EVENT.TUNNEL_REPLACED, replacement);
|
|
539
|
+
}
|
|
540
|
+
// Ends the session the way a stopped tunnel always has (the output's own exit, a
|
|
541
|
+
// `stopped` record in jsonl); the error exit is only for a session nothing renders.
|
|
542
|
+
tunnelRemoved() {
|
|
543
|
+
this.clearTunnelReplacement();
|
|
544
|
+
if (!this.emit(tunnel_1.AGENT_EVENT.TUNNEL_REMOVED))
|
|
545
|
+
output_1.default.exitError(texts_1.ERR_TUNNEL_REMOVED);
|
|
546
|
+
}
|
|
547
|
+
clearTunnelReplacement() {
|
|
548
|
+
if (this.replaceTunnelExpiry)
|
|
549
|
+
clearTimeout(this.replaceTunnelExpiry);
|
|
550
|
+
this.replaceTunnelExpiry = null;
|
|
551
|
+
this.replacedTunnelId = null;
|
|
552
|
+
this.replacementTunnelId = null;
|
|
553
|
+
}
|
|
495
554
|
}
|
|
496
555
|
exports.default = Agent;
|
|
@@ -32,6 +32,6 @@ commandHttp.action(async (target, options) => {
|
|
|
32
32
|
agent.startRefreshingConfiguration();
|
|
33
33
|
const tunnel = await ApiBuddy.addTunnel(agent.id, agent.host, agent.token, prepared);
|
|
34
34
|
agent.addTunnel(tunnel);
|
|
35
|
-
output_1.default.tunnel(tunnel, jsonl);
|
|
35
|
+
output_1.default.tunnel(tunnel, jsonl, agent);
|
|
36
36
|
});
|
|
37
37
|
exports.default = commandHttp;
|
|
@@ -33,6 +33,6 @@ commandStart.action(async (name, options) => {
|
|
|
33
33
|
agent.startRefreshingConfiguration();
|
|
34
34
|
const tunnel = await ApiBuddy.addTunnel(agent.id, agent.host, agent.token, prepared);
|
|
35
35
|
agent.addTunnel(tunnel);
|
|
36
|
-
output_1.default.tunnel(tunnel, jsonl);
|
|
36
|
+
output_1.default.tunnel(tunnel, jsonl, agent);
|
|
37
37
|
});
|
|
38
38
|
exports.default = commandStart;
|
|
@@ -28,6 +28,6 @@ commandTcp.action(async (target, options) => {
|
|
|
28
28
|
agent.startRefreshingConfiguration();
|
|
29
29
|
const tunnel = await ApiBuddy.addTunnel(agent.id, agent.host, agent.token, prepared);
|
|
30
30
|
agent.addTunnel(tunnel);
|
|
31
|
-
output_1.default.tunnel(tunnel, jsonl);
|
|
31
|
+
output_1.default.tunnel(tunnel, jsonl, agent);
|
|
32
32
|
});
|
|
33
33
|
exports.default = commandTcp;
|
|
@@ -28,6 +28,6 @@ commandTls.action(async (target, options) => {
|
|
|
28
28
|
agent.startRefreshingConfiguration();
|
|
29
29
|
const tunnel = await ApiBuddy.addTunnel(agent.id, agent.host, agent.token, prepared);
|
|
30
30
|
agent.addTunnel(tunnel);
|
|
31
|
-
output_1.default.tunnel(tunnel, jsonl);
|
|
31
|
+
output_1.default.tunnel(tunnel, jsonl, agent);
|
|
32
32
|
});
|
|
33
33
|
exports.default = commandTls;
|
package/distTs/src/output.js
CHANGED
|
@@ -41,6 +41,7 @@ const utils_1 = require("./utils");
|
|
|
41
41
|
const chalk_1 = __importDefault(require("chalk"));
|
|
42
42
|
const node_http_1 = require("node:http");
|
|
43
43
|
const cliError_1 = __importStar(require("./cliError"));
|
|
44
|
+
const tunnel_1 = require("./types/tunnel");
|
|
44
45
|
let _terminal = null;
|
|
45
46
|
function getTerminal() {
|
|
46
47
|
if (!_terminal) {
|
|
@@ -391,12 +392,14 @@ class Output {
|
|
|
391
392
|
const OutputInteractiveTunnel = require('./tunnel/output/interactive/tunnel').default;
|
|
392
393
|
const oi = new OutputInteractiveTunnel(getTerminal(), tunnel);
|
|
393
394
|
oi.start();
|
|
395
|
+
return oi;
|
|
394
396
|
}
|
|
395
397
|
static tunnelNonInteractive(tunnel) {
|
|
396
398
|
this.killSpinner();
|
|
397
399
|
const OutputNoninteractiveTunnel = require('./tunnel/output/noninteractive/tunnel').default;
|
|
398
400
|
const on = new OutputNoninteractiveTunnel(getTerminal(), tunnel);
|
|
399
401
|
on.start();
|
|
402
|
+
return on;
|
|
400
403
|
}
|
|
401
404
|
static newCliVersion(version) {
|
|
402
405
|
getTerminal().gray(`New version available (${version}). Run `);
|
|
@@ -423,14 +426,18 @@ class Output {
|
|
|
423
426
|
const OutputJsonlTunnel = require('./tunnel/output/noninteractive/tunnelJsonl').default;
|
|
424
427
|
const on = new OutputJsonlTunnel(getTerminal(), tunnel);
|
|
425
428
|
on.start();
|
|
429
|
+
return on;
|
|
426
430
|
}
|
|
427
|
-
static tunnel(tunnel, jsonl = false) {
|
|
431
|
+
static tunnel(tunnel, jsonl = false, agent) {
|
|
432
|
+
let output;
|
|
428
433
|
if (jsonl)
|
|
429
|
-
this.tunnelJsonl(tunnel);
|
|
434
|
+
output = this.tunnelJsonl(tunnel);
|
|
430
435
|
else if (this.isTTY())
|
|
431
|
-
this.tunnelInteractive(tunnel);
|
|
436
|
+
output = this.tunnelInteractive(tunnel);
|
|
432
437
|
else
|
|
433
|
-
this.tunnelNonInteractive(tunnel);
|
|
438
|
+
output = this.tunnelNonInteractive(tunnel);
|
|
439
|
+
agent?.on(tunnel_1.AGENT_EVENT.TUNNEL_REPLACED, (replacement) => output.replaceTunnel(replacement));
|
|
440
|
+
agent?.on(tunnel_1.AGENT_EVENT.TUNNEL_REMOVED, () => output.tunnelRemoved());
|
|
434
441
|
}
|
|
435
442
|
static object(data) {
|
|
436
443
|
const table = [...Object.entries(data)];
|
|
@@ -572,7 +572,9 @@ class OutputInteractiveTunnel {
|
|
|
572
572
|
updateSpriteDns(y) {
|
|
573
573
|
let text;
|
|
574
574
|
let color;
|
|
575
|
-
|
|
575
|
+
// No checker on a stopped tunnel: the one a rename or a region change replaced stays on
|
|
576
|
+
// screen until its replacement arrives
|
|
577
|
+
const { checking, valid } = this.tunnel.dns || { checking: true, valid: false };
|
|
576
578
|
if (valid) {
|
|
577
579
|
text = 'OK';
|
|
578
580
|
color = COLOR_GREEN;
|
|
@@ -876,10 +878,21 @@ class OutputInteractiveTunnel {
|
|
|
876
878
|
this.terminal.on('resize', () => {
|
|
877
879
|
this.draw();
|
|
878
880
|
});
|
|
881
|
+
this.watchTunnel();
|
|
882
|
+
}
|
|
883
|
+
watchTunnel() {
|
|
879
884
|
this.tunnel.on(tunnel_1.TUNNEL_EVENT.STOPPED, () => {
|
|
880
885
|
this.terminate();
|
|
881
886
|
});
|
|
882
887
|
}
|
|
888
|
+
replaceTunnel(tunnel) {
|
|
889
|
+
this.tunnel = tunnel;
|
|
890
|
+
this.selectedRequest = null;
|
|
891
|
+
this.watchTunnel();
|
|
892
|
+
}
|
|
893
|
+
tunnelRemoved() {
|
|
894
|
+
this.terminate();
|
|
895
|
+
}
|
|
883
896
|
terminate() {
|
|
884
897
|
output_1.default.exitNormal();
|
|
885
898
|
}
|
|
@@ -50,6 +50,20 @@ class OutputNoninteractiveTunnel {
|
|
|
50
50
|
onStopped() {
|
|
51
51
|
output_1.default.exitNormal();
|
|
52
52
|
}
|
|
53
|
+
// Called before this.tunnel is swapped, so it still holds the replaced tunnel.
|
|
54
|
+
onReplaced(t) {
|
|
55
|
+
this.status(t, `recreated with a new address. Entry: ${format_1.default.entry(t)}`);
|
|
56
|
+
}
|
|
57
|
+
replaceTunnel(tunnel) {
|
|
58
|
+
this.onReplaced(tunnel);
|
|
59
|
+
this.tunnel = tunnel;
|
|
60
|
+
this.start();
|
|
61
|
+
}
|
|
62
|
+
// The removed tunnel was stopped without its STOPPED event (a replacement could still
|
|
63
|
+
// follow), so the end of the session is reported here instead.
|
|
64
|
+
tunnelRemoved() {
|
|
65
|
+
this.onStopped();
|
|
66
|
+
}
|
|
53
67
|
start() {
|
|
54
68
|
this.tunnel.on(tunnel_1.TUNNEL_EVENT.OPEN, (t) => this.onOpen(t));
|
|
55
69
|
this.tunnel.on(tunnel_1.TUNNEL_EVENT.CLOSED, (t) => this.onClosed(t));
|
|
@@ -54,6 +54,14 @@ class OutputJsonlTunnel extends tunnel_1.default {
|
|
|
54
54
|
time_ms: logRequest.time,
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
|
+
onReplaced(t) {
|
|
58
|
+
this.record(t, 'replaced', {
|
|
59
|
+
previous_tunnel: this.tunnel.id,
|
|
60
|
+
tunnel_type: t.type,
|
|
61
|
+
target: t.serve || t.target,
|
|
62
|
+
entry: format_1.default.entry(t),
|
|
63
|
+
});
|
|
64
|
+
}
|
|
57
65
|
onStopped() {
|
|
58
66
|
this.record(this.tunnel, 'stopped');
|
|
59
67
|
super.onStopped();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TUNNEL_AGENT_UPDATE_STATUS = exports.TUNNEL_AGENT_ACTION = exports.TUNNEL_AGENT_STATUS = exports.TUNNEL_TERMINATE_AT = exports.TUNNEL_REGION = exports.TUNNEL_SOCKET_TYPE = exports.TUNNEL_EVENT_LATENCY = exports.TUNNEL_EVENT_TCP = exports.TUNNEL_EVENT_HTTP = exports.TUNNEL_EVENT = exports.TUNNEL_SOCKET_MESSAGE = exports.TUNNEL_SOCKET_EVENT = exports.TUNNEL_COMPRESSION_METHOD = exports.TUNNEL_HTTP_SOCKET = exports.TUNNEL_SSH_EVENT = exports.TUNNEL_HTTP_IDENTIFY = exports.TUNNEL_STATUS = exports.TUNNEL_HTTP_AUTH_TYPE = exports.TUNNEL_TYPE = void 0;
|
|
3
|
+
exports.TUNNEL_AGENT_UPDATE_STATUS = exports.TUNNEL_AGENT_ACTION = exports.TUNNEL_AGENT_STATUS = exports.TUNNEL_TERMINATE_AT = exports.TUNNEL_REGION = exports.TUNNEL_SOCKET_TYPE = exports.TUNNEL_EVENT_LATENCY = exports.TUNNEL_EVENT_TCP = exports.TUNNEL_EVENT_HTTP = exports.AGENT_EVENT = exports.TUNNEL_EVENT = exports.TUNNEL_SOCKET_MESSAGE = exports.TUNNEL_SOCKET_EVENT = exports.TUNNEL_COMPRESSION_METHOD = exports.TUNNEL_HTTP_SOCKET = exports.TUNNEL_SSH_EVENT = exports.TUNNEL_HTTP_IDENTIFY = exports.TUNNEL_STATUS = exports.TUNNEL_HTTP_AUTH_TYPE = exports.TUNNEL_TYPE = void 0;
|
|
4
4
|
var TUNNEL_TYPE;
|
|
5
5
|
(function (TUNNEL_TYPE) {
|
|
6
6
|
TUNNEL_TYPE["TCP"] = "TCP";
|
|
@@ -91,6 +91,11 @@ var TUNNEL_EVENT;
|
|
|
91
91
|
TUNNEL_EVENT["IDENTIFIED"] = "tunnel identified";
|
|
92
92
|
TUNNEL_EVENT["TLS_SOCKET"] = "tls socket";
|
|
93
93
|
})(TUNNEL_EVENT || (exports.TUNNEL_EVENT = TUNNEL_EVENT = {}));
|
|
94
|
+
var AGENT_EVENT;
|
|
95
|
+
(function (AGENT_EVENT) {
|
|
96
|
+
AGENT_EVENT["TUNNEL_REPLACED"] = "tunnel replaced";
|
|
97
|
+
AGENT_EVENT["TUNNEL_REMOVED"] = "tunnel removed";
|
|
98
|
+
})(AGENT_EVENT || (exports.AGENT_EVENT = AGENT_EVENT = {}));
|
|
94
99
|
var TUNNEL_EVENT_HTTP;
|
|
95
100
|
(function (TUNNEL_EVENT_HTTP) {
|
|
96
101
|
TUNNEL_EVENT_HTTP["NEW_REQUEST"] = "new request";
|
package/distTs/src/utils.js
CHANGED
|
@@ -36,9 +36,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
36
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.
|
|
40
|
-
exports.
|
|
41
|
-
exports.findArtifactReadme = exports.isPathInside = exports.getComposerReadmePath = exports.parseComposerJson = exports.ARTIFACT_README_NAMES = exports.ARTIFACT_README_SIZE_LIMIT = exports.filterIgnoredEntries = exports.parseIgnorePatterns = exports.ARTIFACT_IGNORE_DEFAULT = exports.createZip = exports.getGitName = exports.getGitEmail = exports.MCP_TOOL_CATEGORIES = exports.getBasicCommandTls = void 0;
|
|
39
|
+
exports.ApiErrorAgentNotFound = exports.ARTIFACT_AUTH_TYPE = exports.TARGET_EXEC_STATUS = exports.VARIABLE_SCOPE = exports.TARGET_SCOPE = exports.PROJECT_SOURCE_INTEGRATION_TYPES = exports.PROJECT_SOURCE_ALIASES = exports.PROJECT_SOURCE = exports.PROJECT_STATUS = exports.PROJECT_ACCESS = exports.DOMAIN_TYPE = exports.ARTIFACT_TYPE = exports.SANDBOX_SNAPSHOT_STATUS = exports.SANDBOX_APP_STATUS = exports.SANDBOX_SETUP_STATUS = exports.SANDBOX_EXEC_STATUS = exports.SANDBOX_EXEC_RUNTIME = exports.SANDBOX_STATUS = exports.REST_API_ENDPOINT = exports.REST_API_REGION = exports.DEFAULT_SANDBOX_CP_USER = exports.ARTIFACT_DEFAULT_VERSION = exports.SUGGESTED_BROWSER_VERSION = exports.AGENT_TUNNEL_REPLACE_TIMEOUT_MS = exports.AGENT_UPDATE_STATUS_TTL_MS = exports.AGENT_UPDATE_PROBATION_MS = exports.AGENT_UPDATE_MAX_ATTEMPTS = exports.AGENT_FETCH_RETRY_MAX = exports.AGENT_FETCH_RETRY_MIN = exports.SSH_HANDSHAKE_TIMEOUT = exports.DEFAULT_TIMEOUT = exports.getSshIdent = exports.TUNNEL_SSH_IDENT_SHARED_H1 = exports.TUNNEL_SSH_IDENT_SHARED_H2 = exports.TUNNEL_CLIENT_IP_HEADER = exports.TUNNEL_H2_WINDOW_SIZE = exports.TUNNEL_HTTP2_SHED_LOG_INTERVAL = exports.TUNNEL_HTTP2_MAX_SESSIONS = exports.TUNNEL_HTTP1_CHANNEL_KEEPALIVE = exports.TUNNEL_HTTP2_SESSION_IDLE_TIMEOUT = exports.TUNNEL_HTTP_RETRY_AFTER = exports.TUNNEL_HTTP_MAX_INFLIGHT = exports.TUNNEL_HTTP_CB_MIN_REQUESTS = exports.TUNNEL_HTTP_CB_WINDOW = exports.TUNNEL_MAX_REQUEST_SIZE_TO_SYNC = exports.TUNNEL_HTTP_LOG_MAX_REQUESTS = exports.TUNNEL_HTTP_LOG_MAX_BODY = exports.TUNNEL_HTTP_RATE_WINDOW = exports.TUNNEL_HTTP_RATE_LIMIT = exports.REST_API_SCOPE = void 0;
|
|
40
|
+
exports.getBasicCommandSandboxEndpoint = exports.getBasicCommandTcp = exports.getCurrentUser = exports.getServiceUser = exports.getRealTargetHost = exports.isWindows = exports.isLinux = exports.isOsx = exports.isDocker = exports.truncate = exports.sleep = exports.getLatestVersion = exports.getVersionEnv = exports.getCurrentVersionWithoutEnv = exports.isVersionNewer = exports.getVersionWithoutEnv = exports.parseVersion = exports.getVersion = exports.isInstalledByChoco = exports.isInstalledByApt = exports.isInstalledByBrew = exports.isInstalledByNpm = exports.isNpmGlobalWritable = exports.isPathWritable = exports.tryGetEmail = exports.execLocally = exports.getHomeDirectory = exports.HOME_DIR_NAME = exports.chownToHomeOwner = exports.isDomainAvailable = exports.sandboxScopeOptions = exports.newCommand = exports.formatBytes = exports.formatHelp = exports.getPlatform = exports.getHostname = exports.isStringRegExp = exports.getWorkingDir = exports.getRootDir = exports.TARGET_ONLY_PORT_REGEX = exports.TARGET_HTTP_REGEX = exports.TARGET_TCP_TLS_REGEX = exports.ApiErrorTunnelsDisabled = exports.ApiErrorWorkspaceFlagged = exports.ApiErrorTunnelLimitReached = exports.ApiErrorAgentLimitReached = exports.ApiErrorDomainRestricted = exports.ApiErrorTargetInvalid = exports.ApiErrorWrongToken = exports.ApiErrorFailedToConnect = void 0;
|
|
41
|
+
exports.findArtifactReadme = exports.isPathInside = exports.getComposerReadmePath = exports.parseComposerJson = exports.ARTIFACT_README_NAMES = exports.ARTIFACT_README_SIZE_LIMIT = exports.filterIgnoredEntries = exports.parseIgnorePatterns = exports.ARTIFACT_IGNORE_DEFAULT = exports.createZip = exports.getGitName = exports.getGitEmail = exports.MCP_TOOL_CATEGORIES = exports.getBasicCommandTls = exports.getBasicCommandHttp = void 0;
|
|
42
42
|
exports.executionExitCode = executionExitCode;
|
|
43
43
|
exports.apiErrorCodeToClass = apiErrorCodeToClass;
|
|
44
44
|
exports.isFile = isFile;
|
|
@@ -213,6 +213,7 @@ exports.AGENT_UPDATE_PROBATION_MS = 30 * 60 * 1000;
|
|
|
213
213
|
// 15s; anything past it waits for the one at 60s, so a longer ttl here shows the outcome for
|
|
214
214
|
// four times as long as it says.
|
|
215
215
|
exports.AGENT_UPDATE_STATUS_TTL_MS = 10 * 1000;
|
|
216
|
+
exports.AGENT_TUNNEL_REPLACE_TIMEOUT_MS = 15 * 1000;
|
|
216
217
|
exports.SUGGESTED_BROWSER_VERSION = '151.0.7922.77';
|
|
217
218
|
exports.ARTIFACT_DEFAULT_VERSION = 'latest';
|
|
218
219
|
exports.DEFAULT_SANDBOX_CP_USER = 'buddy';
|