bdy 1.23.22-dev → 1.24.0-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/manager.js +15 -6
- package/distTs/src/agent/system.js +25 -3
- package/distTs/src/agent/windows.js +357 -53
- package/distTs/src/texts.js +23 -15
- package/package.json +1 -1
package/distTs/package.json
CHANGED
|
@@ -79,8 +79,16 @@ class AgentManagerClass {
|
|
|
79
79
|
// Closes the listener before exiting. A self update depends on this: the supervisor
|
|
80
80
|
// starts the replacement as soon as we are gone, and a port still held by this
|
|
81
81
|
// process would meet it with EADDRINUSE.
|
|
82
|
-
|
|
82
|
+
//
|
|
83
|
+
// `restart` is what tells the supervisor to start us again, and it does so through the
|
|
84
|
+
// exit code: the windows service wrapper restarts on a non-zero exit only (<onfailure>
|
|
85
|
+
// in agent/windows.ts), where nssm used to restart on any exit at all. systemd and
|
|
86
|
+
// launchd restart either way, so this only makes the intent explicit there. A signal is
|
|
87
|
+
// the opposite case - an admin stopping the service - and has to exit clean, or the
|
|
88
|
+
// wrapper would put back what they just stopped.
|
|
89
|
+
shutdown(restart = false) {
|
|
83
90
|
this.exiting = true;
|
|
91
|
+
const exit = () => (restart ? output_1.default.exitCode(1) : output_1.default.exitNormal());
|
|
84
92
|
if (this.ws) {
|
|
85
93
|
this.ws.clients.forEach((client) => client.terminate());
|
|
86
94
|
this.ws.close();
|
|
@@ -90,10 +98,10 @@ class AgentManagerClass {
|
|
|
90
98
|
this.connections.forEach((socket) => socket.resetAndDestroy());
|
|
91
99
|
}
|
|
92
100
|
this.server.close(() => {
|
|
93
|
-
|
|
101
|
+
exit();
|
|
94
102
|
});
|
|
95
103
|
}
|
|
96
|
-
setTimeout(() =>
|
|
104
|
+
setTimeout(() => exit(), 1000);
|
|
97
105
|
}
|
|
98
106
|
// Called on every start. If the previous process swapped the binary, this is the
|
|
99
107
|
// first look at whether the new one works. Rolling back is keyed on how many times
|
|
@@ -124,7 +132,7 @@ class AgentManagerClass {
|
|
|
124
132
|
logger_1.default.error((0, texts_1.LOG_AGENT_UPDATE_ROLLED_BACK)(state.from, state.to));
|
|
125
133
|
// Exit rather than keep running: the restored binary only takes effect when the
|
|
126
134
|
// service starts it, and this process is still the new one.
|
|
127
|
-
this.shutdown();
|
|
135
|
+
this.shutdown(true);
|
|
128
136
|
return false;
|
|
129
137
|
}
|
|
130
138
|
// Triggered remotely through the agent's `action` field. Every path that does not
|
|
@@ -204,7 +212,7 @@ class AgentManagerClass {
|
|
|
204
212
|
// which is also what acks the request. Reporting an outcome now would claim one
|
|
205
213
|
// even if the restart never lands - STARTED is exactly the value that should be
|
|
206
214
|
// left behind if it does not.
|
|
207
|
-
this.shutdown();
|
|
215
|
+
this.shutdown(true);
|
|
208
216
|
}
|
|
209
217
|
catch (err) {
|
|
210
218
|
logger_1.default.error(texts_1.LOG_AGENT_UPDATE_FAILED);
|
|
@@ -770,7 +778,8 @@ class AgentManagerClass {
|
|
|
770
778
|
this.server.on('error', (err) => {
|
|
771
779
|
if (err.code === 'EADDRINUSE') {
|
|
772
780
|
// Exit and let the supervisor retry (systemd Restart=always, launchd
|
|
773
|
-
// KeepAlive,
|
|
781
|
+
// KeepAlive, winsw <onfailure> - and Output.exitError is non-zero, which
|
|
782
|
+
// is what that last one needs). Tearing the agent down here would
|
|
774
783
|
// unregister a working agent server-side over a port that is busy for
|
|
775
784
|
// a moment - a restart racing its own predecessor is enough - and the
|
|
776
785
|
// machine would then need a manual reinstall with a new token.
|
|
@@ -230,10 +230,32 @@ class AgentSystem {
|
|
|
230
230
|
// self-update probation is void afterwards - it would otherwise judge this binary and
|
|
231
231
|
// could roll back to one two versions old. `swapBinaryToVersion` does not come through
|
|
232
232
|
// here, so its own probation is not affected.
|
|
233
|
-
|
|
233
|
+
//
|
|
234
|
+
// The old binary is moved aside rather than deleted, and put back if the unpack fails.
|
|
235
|
+
// An archive holds more than the binary on windows - the service wrapper is in there
|
|
236
|
+
// too, and its image can still be locked for a moment after the service reports stopped
|
|
237
|
+
// - so an extraction that failed halfway used to leave a registered service with no
|
|
238
|
+
// binary at all, which no `agent update` can recover from. Renaming is also what makes
|
|
239
|
+
// this work there: windows refuses to delete a running executable but allows moving one.
|
|
240
|
+
async extractBinaryArchive() {
|
|
234
241
|
this.clearUpdateFiles();
|
|
235
|
-
|
|
236
|
-
|
|
242
|
+
const target = this.getSystemBinaryPath();
|
|
243
|
+
// Free by definition: clearUpdateFiles has just removed it, and a probation that could
|
|
244
|
+
// have claimed it is void along with it
|
|
245
|
+
const backup = this.getSystemBinaryBackupPath();
|
|
246
|
+
if ((0, node_fs_1.existsSync)(target))
|
|
247
|
+
(0, node_fs_1.renameSync)(target, backup);
|
|
248
|
+
try {
|
|
249
|
+
await this.extractArchive(this.getBinaryArchivePath(), this.getSystemConfigDir());
|
|
250
|
+
}
|
|
251
|
+
catch (err) {
|
|
252
|
+
// Only when the archive left nothing in its place - a partial extract that did write
|
|
253
|
+
// the binary is still the newer one of the two
|
|
254
|
+
if (!(0, node_fs_1.existsSync)(target) && (0, node_fs_1.existsSync)(backup))
|
|
255
|
+
(0, node_fs_1.renameSync)(backup, target);
|
|
256
|
+
throw err;
|
|
257
|
+
}
|
|
258
|
+
this.tryRemove(backup);
|
|
237
259
|
}
|
|
238
260
|
fixBinaryRights() {
|
|
239
261
|
return new Promise((resolve, reject) => {
|
|
@@ -9,13 +9,23 @@ const path_1 = __importDefault(require("path"));
|
|
|
9
9
|
const fs_1 = require("fs");
|
|
10
10
|
const logger_1 = __importDefault(require("../logger"));
|
|
11
11
|
const texts_1 = require("../texts");
|
|
12
|
+
const SERVICE_ID = 'bdy';
|
|
13
|
+
const SERVICE_NAME = 'Buddy Tunnel Agent';
|
|
14
|
+
// winsw resolves its configuration - and names its logs - after its own file name, so all
|
|
15
|
+
// of these are derived from one base rather than spelled out
|
|
16
|
+
const WRAPPER_BASE = 'bdy-service';
|
|
17
|
+
const WRAPPER_BINARY = `${WRAPPER_BASE}.exe`;
|
|
18
|
+
const WRAPPER_CONFIG = `${WRAPPER_BASE}.xml`;
|
|
19
|
+
// The live logs are `<base>.out.log`, `.err.log` and `.wrapper.log`, and `roll-by-size`
|
|
20
|
+
// keeps rolled copies of them under names this cannot spell out in advance
|
|
21
|
+
const WRAPPER_LOG = new RegExp(`^${WRAPPER_BASE}\\..*log$`, 'i');
|
|
22
|
+
const WRAPPER_LICENSE = 'LICENSE-winsw.txt';
|
|
23
|
+
// Where the previous wrapper is parked while the archive is unpacked over it, see
|
|
24
|
+
// extractBinaryArchive
|
|
25
|
+
const WRAPPER_STALE = `${WRAPPER_BINARY}.old`;
|
|
12
26
|
class AgentWindows extends system_1.default {
|
|
13
27
|
hasAdminRights() {
|
|
14
|
-
return
|
|
15
|
-
(0, child_process_1.exec)('net session', (err) => {
|
|
16
|
-
resolve(!err);
|
|
17
|
-
});
|
|
18
|
-
});
|
|
28
|
+
return this.net(['session']).then(() => true, () => false);
|
|
19
29
|
}
|
|
20
30
|
isSupported() {
|
|
21
31
|
return Promise.resolve(process.arch === 'x64');
|
|
@@ -29,36 +39,241 @@ class AgentWindows extends system_1.default {
|
|
|
29
39
|
getSystemConfigPath() {
|
|
30
40
|
return path_1.default.join(this.getSystemConfigDir(), 'agent.json');
|
|
31
41
|
}
|
|
32
|
-
|
|
33
|
-
return path_1.default.join(this.getSystemConfigDir(), '
|
|
34
|
-
}
|
|
35
|
-
downloadNssm() {
|
|
36
|
-
return this.downloadFile('https://es.buddy.works/bdy/nssm.zip', this.getNssmArchivePath());
|
|
42
|
+
getSystemBinaryPath() {
|
|
43
|
+
return path_1.default.join(this.getSystemConfigDir(), 'bdy.exe');
|
|
37
44
|
}
|
|
38
|
-
|
|
39
|
-
return
|
|
45
|
+
getServiceBinaryPath() {
|
|
46
|
+
return path_1.default.join(this.getSystemConfigDir(), WRAPPER_BINARY);
|
|
40
47
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
force: true,
|
|
44
|
-
recursive: true,
|
|
45
|
-
});
|
|
48
|
+
getServicePath() {
|
|
49
|
+
return path_1.default.join(this.getSystemConfigDir(), WRAPPER_CONFIG);
|
|
46
50
|
}
|
|
51
|
+
// An install made by a cli from before the wrapper changed. Nothing downloads nssm any
|
|
52
|
+
// more - this is only ever read to take such an install apart, see uninstall()
|
|
47
53
|
getNssmBinaryPath() {
|
|
48
54
|
return path_1.default.join(this.getSystemConfigDir(), 'nssm', 'win64', 'nssm.exe');
|
|
49
55
|
}
|
|
50
|
-
|
|
51
|
-
return
|
|
56
|
+
hasWrapper() {
|
|
57
|
+
return ((0, fs_1.existsSync)(this.getServiceBinaryPath()) &&
|
|
58
|
+
(0, fs_1.existsSync)(this.getServicePath()));
|
|
59
|
+
}
|
|
60
|
+
hasLegacyWrapper() {
|
|
61
|
+
return (0, fs_1.existsSync)(this.getNssmBinaryPath());
|
|
62
|
+
}
|
|
63
|
+
// The wrapper ships inside win-x64.zip next to bdy.exe, so it arrives with the release it
|
|
64
|
+
// was signed alongside and an `agent update` refreshes it for free - see build.ps1. An
|
|
65
|
+
// archive without it is a release built before that, or a partial extraction: either way
|
|
66
|
+
// there is nothing to register the service with, and saying so beats `install` failing
|
|
67
|
+
// with ENOENT on a path nobody recognises.
|
|
68
|
+
ensureWrapper() {
|
|
69
|
+
if ((0, fs_1.existsSync)(this.getServiceBinaryPath()))
|
|
70
|
+
return;
|
|
71
|
+
throw new Error((0, texts_1.ERR_AGENT_WRAPPER_MISSING)(this.getServiceBinaryPath()));
|
|
72
|
+
}
|
|
73
|
+
// Says that the file we just unpacked carries a signature nothing has broken since - a
|
|
74
|
+
// truncated download, a half-written extraction, bytes edited on disk. It runs on every
|
|
75
|
+
// install and every update, which is where the wrapper is written.
|
|
76
|
+
//
|
|
77
|
+
// What it deliberately does not do is say *who* signed it. Pinning the subject would mean
|
|
78
|
+
// carrying the certificate's CN in here, and that value is only known to be right until the
|
|
79
|
+
// next renewal changes it - at which point every install on every machine fails, in the
|
|
80
|
+
// month we can least afford it, over a substitution that needs write access to
|
|
81
|
+
// C:\ProgramData\bdy. Anyone who has that can rewrite bdy.exe next to it, which nothing
|
|
82
|
+
// checks at all, so the name would be a lock on the smaller of two doors. The signer is
|
|
83
|
+
// logged instead, so an install that went somewhere unexpected can be read back afterwards.
|
|
84
|
+
//
|
|
85
|
+
// A tampered or unsigned file is fatal; an inconclusive status is only logged, because
|
|
86
|
+
// 'UnknownError' and 'NotTrusted' are also what a machine with an outdated root store
|
|
87
|
+
// reports about a perfectly good signature, and refusing to install there would trade a
|
|
88
|
+
// real outage for a threat the transport already covers.
|
|
89
|
+
async verifyWrapperSignature() {
|
|
90
|
+
const p = this.getServiceBinaryPath();
|
|
91
|
+
let out;
|
|
92
|
+
try {
|
|
93
|
+
out = await this.run(this.getPowershellPath(), [
|
|
94
|
+
'-NoProfile',
|
|
95
|
+
'-NonInteractive',
|
|
96
|
+
'-Command',
|
|
97
|
+
`$s = Get-AuthenticodeSignature -LiteralPath '${p}'; ` +
|
|
98
|
+
'Write-Output "$($s.Status)|$($s.SignerCertificate.Subject)"',
|
|
99
|
+
]);
|
|
100
|
+
}
|
|
101
|
+
catch (err) {
|
|
102
|
+
// Not being able to run the check is not the same as failing it, and a machine without
|
|
103
|
+
// powershell is not a reason to refuse an install
|
|
104
|
+
logger_1.default.error(err);
|
|
105
|
+
logger_1.default.error((0, texts_1.LOG_AGENT_WRAPPER_SIGNATURE_UNKNOWN)('unavailable'));
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
const [status, subject] = out.trim().split('|');
|
|
109
|
+
if (status === 'NotSigned' || status === 'HashMismatch') {
|
|
110
|
+
throw new Error((0, texts_1.ERR_AGENT_WRAPPER_SIGNATURE)(status));
|
|
111
|
+
}
|
|
112
|
+
if (status !== 'Valid') {
|
|
113
|
+
logger_1.default.error((0, texts_1.LOG_AGENT_WRAPPER_SIGNATURE_UNKNOWN)(status));
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
logger_1.default.info((0, texts_1.LOG_AGENT_WRAPPER_SIGNED_BY)(subject || ''));
|
|
117
|
+
}
|
|
118
|
+
escapeXml(value) {
|
|
119
|
+
return String(value).replace(/[&<>"']/g, (c) => {
|
|
120
|
+
switch (c) {
|
|
121
|
+
case '&':
|
|
122
|
+
return '&';
|
|
123
|
+
case '<':
|
|
124
|
+
return '<';
|
|
125
|
+
case '>':
|
|
126
|
+
return '>';
|
|
127
|
+
case '"':
|
|
128
|
+
return '"';
|
|
129
|
+
default:
|
|
130
|
+
return ''';
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
// One command-line token, quoted the way CommandLineToArgvW reads it back: the whole thing
|
|
135
|
+
// in quotes, every `"` inside escaped with a backslash, and the backslashes that run into a
|
|
136
|
+
// quote doubled so they are not read as escaping each other.
|
|
137
|
+
//
|
|
138
|
+
// Always quoted, never conditionally, and that is what makes it safe: winsw appends a token
|
|
139
|
+
// that already starts and ends with a quote verbatim, and only reaches for quoting of its
|
|
140
|
+
// own on one that does not. Left to winsw, a token carrying a `"` would be passed through
|
|
141
|
+
// raw and the agent would come up with a value split in the wrong place.
|
|
142
|
+
winArg(value) {
|
|
143
|
+
const s = String(value);
|
|
144
|
+
let out = '"';
|
|
145
|
+
let slashes = 0;
|
|
146
|
+
for (const ch of s) {
|
|
147
|
+
if (ch === '\\') {
|
|
148
|
+
slashes += 1;
|
|
149
|
+
continue;
|
|
150
|
+
}
|
|
151
|
+
if (ch === '"') {
|
|
152
|
+
out += '\\'.repeat(slashes * 2 + 1) + '"';
|
|
153
|
+
slashes = 0;
|
|
154
|
+
continue;
|
|
155
|
+
}
|
|
156
|
+
out += '\\'.repeat(slashes) + ch;
|
|
157
|
+
slashes = 0;
|
|
158
|
+
}
|
|
159
|
+
// Trailing ones run into the closing quote, so they double as well
|
|
160
|
+
return `${out}${'\\'.repeat(slashes * 2)}"`;
|
|
161
|
+
}
|
|
162
|
+
// One <argument> per argument rather than a single <arguments> line. The two are not the
|
|
163
|
+
// same file with different formatting: <arguments> is one string that the child splits
|
|
164
|
+
// again, so an id or a token carrying a quote would break apart somewhere in the middle of
|
|
165
|
+
// itself - and xml-escaping it does not help, because the parser hands the quote straight
|
|
166
|
+
// back before anything reads it as a command line.
|
|
167
|
+
//
|
|
168
|
+
// The token goes on that command line, which is the same trade the systemd unit documents -
|
|
169
|
+
// except here it also sits in this file, and nssm kept it in the service's registry key.
|
|
170
|
+
// Both are readable by every local account, so this is not a step down; the fix is the agent
|
|
171
|
+
// reading the token from a file only it can read, not a mode on this one.
|
|
172
|
+
//
|
|
173
|
+
// No <serviceaccount> block: winsw would take the password from here, and that is a domain
|
|
174
|
+
// password in a world-readable file. `sc config obj=` hands it straight to the service
|
|
175
|
+
// control manager instead, which keeps it in LSA - the same place nssm's ObjectName put it.
|
|
176
|
+
//
|
|
177
|
+
// <onfailure> covers a non-zero exit only, where nssm restarted on any exit at all. That is
|
|
178
|
+
// why the agent exits non-zero whenever it wants to be restarted - see shutdown() in
|
|
179
|
+
// agent/manager.ts. A clean exit means "stay down", which is what an uninstall needs.
|
|
180
|
+
getServiceConfig(id, host, token, port) {
|
|
181
|
+
const cli = this.getSystemBinaryPath();
|
|
182
|
+
const dir = this.getSystemConfigDir();
|
|
183
|
+
const esc = (v) => this.escapeXml(v);
|
|
184
|
+
const args = [
|
|
185
|
+
'agent',
|
|
186
|
+
'run',
|
|
187
|
+
`--id=${id}`,
|
|
188
|
+
`--host=${host}`,
|
|
189
|
+
`--token=${token}`,
|
|
190
|
+
`--port=${port}`,
|
|
191
|
+
]
|
|
192
|
+
.map((arg) => ` <argument>${esc(this.winArg(arg))}</argument>`)
|
|
193
|
+
.join('\n');
|
|
194
|
+
return `<service>
|
|
195
|
+
<id>${SERVICE_ID}</id>
|
|
196
|
+
<name>${SERVICE_NAME}</name>
|
|
197
|
+
<description>${SERVICE_NAME}</description>
|
|
198
|
+
<executable>${esc(cli)}</executable>
|
|
199
|
+
${args}
|
|
200
|
+
<workingdirectory>${esc(dir)}</workingdirectory>
|
|
201
|
+
<startmode>Automatic</startmode>
|
|
202
|
+
<onfailure action="restart" delay="5 sec"/>
|
|
203
|
+
<resetfailure>1 hour</resetfailure>
|
|
204
|
+
<stoptimeout>15 sec</stoptimeout>
|
|
205
|
+
<log mode="roll-by-size">
|
|
206
|
+
<sizeThreshold>10240</sizeThreshold>
|
|
207
|
+
<keepFiles>2</keepFiles>
|
|
208
|
+
</log>
|
|
209
|
+
</service>`;
|
|
210
|
+
}
|
|
211
|
+
// Read off the directory rather than listed: `roll-by-size` keeps `keepFiles` copies of each
|
|
212
|
+
// log under names that depend on how often it has rolled, and an uninstall that removed only
|
|
213
|
+
// the three live ones would leave them behind in the one directory it is meant to empty.
|
|
214
|
+
clearWrapperLogs() {
|
|
215
|
+
const dir = this.getSystemConfigDir();
|
|
216
|
+
let entries;
|
|
217
|
+
try {
|
|
218
|
+
entries = (0, fs_1.readdirSync)(dir);
|
|
219
|
+
}
|
|
220
|
+
catch {
|
|
221
|
+
// Nothing to list is nothing to clear
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
entries
|
|
225
|
+
.filter((name) => WRAPPER_LOG.test(name))
|
|
226
|
+
.forEach((name) => this.tryRemove(path_1.default.join(dir, name)));
|
|
52
227
|
}
|
|
53
|
-
// The service half only:
|
|
54
|
-
// business removing it
|
|
228
|
+
// The service half only: the wrapper is what runs the service, so an `--app` uninstall has
|
|
229
|
+
// no business removing it
|
|
55
230
|
clearServiceFiles() {
|
|
56
231
|
super.clearServiceFiles();
|
|
57
|
-
|
|
232
|
+
const dir = this.getSystemConfigDir();
|
|
233
|
+
this.tryRemove(this.getServiceBinaryPath());
|
|
234
|
+
this.tryRemove(this.getServicePath());
|
|
235
|
+
this.tryRemove(path_1.default.join(dir, WRAPPER_STALE));
|
|
236
|
+
this.tryRemove(path_1.default.join(dir, WRAPPER_LICENSE));
|
|
237
|
+
this.clearWrapperLogs();
|
|
238
|
+
// What an install made by an older cli left here
|
|
239
|
+
(0, fs_1.rmSync)(path_1.default.join(dir, 'nssm'), {
|
|
58
240
|
force: true,
|
|
59
241
|
recursive: true,
|
|
60
242
|
});
|
|
61
243
|
}
|
|
244
|
+
// The wrapper *is* the service process, and `stopwait` returns when the service control
|
|
245
|
+
// manager sees STOPPED - which winsw reports just before it exits, so its image can still be
|
|
246
|
+
// locked for a moment afterwards. Unpacking the archive straight over it would fail the whole
|
|
247
|
+
// extraction on that one file, and the base class has already moved the binary aside by then.
|
|
248
|
+
// So the old wrapper is moved aside too: windows refuses to delete a running executable but
|
|
249
|
+
// allows renaming one, which leaves the archive a free path to write to either way.
|
|
250
|
+
async extractBinaryArchive() {
|
|
251
|
+
const wrapper = this.getServiceBinaryPath();
|
|
252
|
+
const stale = path_1.default.join(this.getSystemConfigDir(), WRAPPER_STALE);
|
|
253
|
+
this.tryRemove(stale);
|
|
254
|
+
if ((0, fs_1.existsSync)(wrapper)) {
|
|
255
|
+
try {
|
|
256
|
+
(0, fs_1.renameSync)(wrapper, stale);
|
|
257
|
+
}
|
|
258
|
+
catch (err) {
|
|
259
|
+
// Held by something that will not let go of the name either. Nothing to do but let the
|
|
260
|
+
// extraction below report what it runs into.
|
|
261
|
+
logger_1.default.error(err);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
try {
|
|
265
|
+
await super.extractBinaryArchive();
|
|
266
|
+
}
|
|
267
|
+
finally {
|
|
268
|
+
// Gone by now on any machine that has let go of it, and cleared by the next update or
|
|
269
|
+
// uninstall on one that has not
|
|
270
|
+
this.tryRemove(stale);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
// Refreshes the wrapper along with the binary, because both come out of the same archive.
|
|
274
|
+
// That works here and only here: the wrapper *is* the service process, so its exe can only
|
|
275
|
+
// be replaced while the service is stopped - which this path does and the remote self update
|
|
276
|
+
// (swapBinaryToVersion, running under the wrapper) cannot.
|
|
62
277
|
async update() {
|
|
63
278
|
try {
|
|
64
279
|
logger_1.default.info(texts_1.LOG_AGENT_STOPPING_SYSTEM);
|
|
@@ -74,6 +289,17 @@ class AgentWindows extends system_1.default {
|
|
|
74
289
|
await this.downloadBinaryArchive();
|
|
75
290
|
logger_1.default.info(texts_1.LOG_AGENT_EXTRACTING_ARCHIVE);
|
|
76
291
|
await this.extractBinaryArchive();
|
|
292
|
+
// The same two checks the install path runs, because this is the same download and it
|
|
293
|
+
// has just replaced the wrapper. Keyed on the xml rather than on the exe: that file is
|
|
294
|
+
// what says winsw registered this service, and an install an older cli made through
|
|
295
|
+
// nssm keeps running through nssm - a wrapper it never registered is not a reason to
|
|
296
|
+
// fail its update. Left to throw, so a wrapper that is not the one we signed stops the
|
|
297
|
+
// service from being started back up on top of it.
|
|
298
|
+
if ((0, fs_1.existsSync)(this.getServicePath())) {
|
|
299
|
+
this.ensureWrapper();
|
|
300
|
+
logger_1.default.info(texts_1.LOG_AGENT_WRAPPER_VERIFYING);
|
|
301
|
+
await this.verifyWrapperSignature();
|
|
302
|
+
}
|
|
77
303
|
try {
|
|
78
304
|
logger_1.default.info(texts_1.LOG_AGENT_STARTING_SYSTEM);
|
|
79
305
|
await this.start();
|
|
@@ -87,6 +313,9 @@ class AgentWindows extends system_1.default {
|
|
|
87
313
|
throw err;
|
|
88
314
|
}
|
|
89
315
|
}
|
|
316
|
+
// Goes through the service control manager rather than through either wrapper, so it works
|
|
317
|
+
// the same on a service this cli registered with winsw and on one an older cli registered
|
|
318
|
+
// with nssm
|
|
90
319
|
async changeUser(user, pass) {
|
|
91
320
|
try {
|
|
92
321
|
logger_1.default.info(texts_1.LOG_AGENT_STOPPING_SYSTEM);
|
|
@@ -97,11 +326,11 @@ class AgentWindows extends system_1.default {
|
|
|
97
326
|
// do nothing
|
|
98
327
|
}
|
|
99
328
|
if (user && pass) {
|
|
100
|
-
await this.
|
|
329
|
+
await this.setServiceUser(user, pass);
|
|
101
330
|
await this.grantAccess(user);
|
|
102
331
|
}
|
|
103
332
|
else {
|
|
104
|
-
await this.
|
|
333
|
+
await this.resetServiceUser();
|
|
105
334
|
}
|
|
106
335
|
try {
|
|
107
336
|
logger_1.default.info(texts_1.LOG_AGENT_STARTING_SYSTEM);
|
|
@@ -127,26 +356,19 @@ class AgentWindows extends system_1.default {
|
|
|
127
356
|
try {
|
|
128
357
|
logger_1.default.info(texts_1.LOG_AGENT_SYSTEM_DIR);
|
|
129
358
|
await this.ensureSystemConfigDir();
|
|
130
|
-
logger_1.default.info(texts_1.LOG_AGENT_NSSM_DOWNLOADING);
|
|
131
|
-
await this.downloadNssm();
|
|
132
|
-
logger_1.default.info(texts_1.LOG_AGENT_NSSM_EXTRACTING);
|
|
133
|
-
await this.extractNssm();
|
|
134
|
-
logger_1.default.info(texts_1.LOG_AGENT_NSSM_CLEARING);
|
|
135
|
-
this.clearNssmExtract();
|
|
136
359
|
logger_1.default.info(texts_1.LOG_AGENT_DOWNLOADING_ARCHIVE);
|
|
137
360
|
await this.downloadBinaryArchive();
|
|
138
361
|
logger_1.default.info(texts_1.LOG_AGENT_EXTRACTING_ARCHIVE);
|
|
139
362
|
await this.extractBinaryArchive();
|
|
363
|
+
this.ensureWrapper();
|
|
364
|
+
logger_1.default.info(texts_1.LOG_AGENT_WRAPPER_VERIFYING);
|
|
365
|
+
await this.verifyWrapperSignature();
|
|
366
|
+
logger_1.default.info(texts_1.LOG_AGENT_SYSTEM_SERVICE_CONFIG);
|
|
367
|
+
await this.saveFile(this.getServicePath(), this.getServiceConfig(id, host, token, port));
|
|
140
368
|
logger_1.default.info(texts_1.LOG_AGENT_ENABLING_SYSTEM);
|
|
141
|
-
await this.
|
|
142
|
-
await this.nssm(`set bdy AppParameters agent run --id="${id}" --host="${host}" --token="${token}" --port=${port}`);
|
|
143
|
-
await this.nssm('set bdy DisplayName Buddy Tunnel Agent');
|
|
144
|
-
await this.nssm('set bdy AppThrottle 5000');
|
|
145
|
-
await this.nssm('set bdy AppRestartDelay 0');
|
|
146
|
-
await this.nssm('set bdy AppExit Default Restart');
|
|
147
|
-
await this.nssm('set bdy Start SERVICE_AUTO_START');
|
|
369
|
+
await this.wrapper(['install']);
|
|
148
370
|
if (user && pass) {
|
|
149
|
-
await this.
|
|
371
|
+
await this.setServiceUser(user, pass);
|
|
150
372
|
await this.grantAccess(user);
|
|
151
373
|
}
|
|
152
374
|
if (start) {
|
|
@@ -164,11 +386,36 @@ class AgentWindows extends system_1.default {
|
|
|
164
386
|
throw err;
|
|
165
387
|
}
|
|
166
388
|
}
|
|
389
|
+
// Every one of these waits for the transition to finish, which is what the update path
|
|
390
|
+
// needs: it unpacks over bdy.exe and the wrapper right after stopping, and on windows a
|
|
391
|
+
// process that is still up holds both of those files open. Waiting is not the whole answer
|
|
392
|
+
// either - `stopwait` returns a moment before winsw's own process is gone, which is what
|
|
393
|
+
// extractBinaryArchive moves the wrapper aside for. Deliberately not `sc stop` plus a poll
|
|
394
|
+
// on `sc query` - that output is
|
|
395
|
+
// localized, so matching STOPPED in it would go wrong on the first machine that is not
|
|
396
|
+
// running an english windows, and go wrong by carrying on as if the agent had stopped.
|
|
167
397
|
async stop() {
|
|
168
|
-
|
|
398
|
+
if (this.hasWrapper()) {
|
|
399
|
+
await this.wrapper(['stopwait']);
|
|
400
|
+
return;
|
|
401
|
+
}
|
|
402
|
+
if (this.hasLegacyWrapper()) {
|
|
403
|
+
await this.nssm(['stop', SERVICE_ID]);
|
|
404
|
+
return;
|
|
405
|
+
}
|
|
406
|
+
// No wrapper left on disk to drive the service. `net`, not `sc`, because it waits.
|
|
407
|
+
await this.net(['stop', SERVICE_ID]);
|
|
169
408
|
}
|
|
170
409
|
async start() {
|
|
171
|
-
|
|
410
|
+
if (this.hasWrapper()) {
|
|
411
|
+
await this.wrapper(['start']);
|
|
412
|
+
return;
|
|
413
|
+
}
|
|
414
|
+
if (this.hasLegacyWrapper()) {
|
|
415
|
+
await this.nssm(['start', SERVICE_ID]);
|
|
416
|
+
return;
|
|
417
|
+
}
|
|
418
|
+
await this.net(['start', SERVICE_ID]);
|
|
172
419
|
}
|
|
173
420
|
async uninstall() {
|
|
174
421
|
try {
|
|
@@ -177,23 +424,80 @@ class AgentWindows extends system_1.default {
|
|
|
177
424
|
catch {
|
|
178
425
|
// do nothing
|
|
179
426
|
}
|
|
180
|
-
|
|
427
|
+
if (this.hasWrapper()) {
|
|
428
|
+
await this.wrapper(['uninstall']);
|
|
429
|
+
return;
|
|
430
|
+
}
|
|
431
|
+
if (this.hasLegacyWrapper()) {
|
|
432
|
+
logger_1.default.info(texts_1.LOG_AGENT_SERVICE_LEGACY_WRAPPER);
|
|
433
|
+
await this.nssm(['remove', SERVICE_ID, 'confirm']);
|
|
434
|
+
return;
|
|
435
|
+
}
|
|
436
|
+
// Neither wrapper is on disk, and the registration can still be there - an interrupted
|
|
437
|
+
// install, or files removed by hand. sc unmakes it whichever wrapper made it.
|
|
438
|
+
await this.sc(['delete', SERVICE_ID]);
|
|
181
439
|
}
|
|
182
|
-
|
|
183
|
-
return
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
440
|
+
wrapper(args) {
|
|
441
|
+
return this.run(this.getServiceBinaryPath(), args);
|
|
442
|
+
}
|
|
443
|
+
// Legacy only, for a service an older cli registered with nssm. It stores what it needs in
|
|
444
|
+
// that service's registry key, so nothing but nssm itself can remove it cleanly.
|
|
445
|
+
//
|
|
446
|
+
// Permanent, not a transition: such an install is never moved onto the wrapper. `agent
|
|
447
|
+
// update` refreshes its binary and leaves it running through nssm, and only a reinstall
|
|
448
|
+
// ever changes that - so this and the two hasLegacyWrapper() branches stay whatever the
|
|
449
|
+
// fleet looks like.
|
|
450
|
+
nssm(args) {
|
|
451
|
+
return this.run(this.getNssmBinaryPath(), args);
|
|
452
|
+
}
|
|
453
|
+
sc(args) {
|
|
454
|
+
return this.run(this.system32('sc.exe'), args);
|
|
455
|
+
}
|
|
456
|
+
net(args) {
|
|
457
|
+
return this.run(this.system32('net.exe'), args);
|
|
458
|
+
}
|
|
459
|
+
// Absolute rather than by name: with no shell, CreateProcess searches the directory the
|
|
460
|
+
// process was started from before it looks at PATH - and everything in here runs elevated,
|
|
461
|
+
// so an `sc.exe` dropped into whatever directory the user ran `bdy` from would be ours to
|
|
462
|
+
// execute as SYSTEM.
|
|
463
|
+
system32(exe) {
|
|
464
|
+
const root = process.env.SystemRoot || process.env.windir || 'C:\\Windows';
|
|
465
|
+
return path_1.default.join(root, 'System32', exe);
|
|
466
|
+
}
|
|
467
|
+
getPowershellPath() {
|
|
468
|
+
return this.system32(path_1.default.join('WindowsPowerShell', 'v1.0', 'powershell.exe'));
|
|
469
|
+
}
|
|
470
|
+
// The space in `obj= ` is part of sc's syntax, and each half is its own argument - which is
|
|
471
|
+
// also why this goes through execFile rather than a shell: a password is not something to
|
|
472
|
+
// hand to cmd for parsing
|
|
473
|
+
setServiceUser(user, pass) {
|
|
474
|
+
return this.sc(['config', SERVICE_ID, 'obj=', user, 'password=', pass]);
|
|
475
|
+
}
|
|
476
|
+
resetServiceUser() {
|
|
477
|
+
return this.sc([
|
|
478
|
+
'config',
|
|
479
|
+
SERVICE_ID,
|
|
480
|
+
'obj=',
|
|
481
|
+
'LocalSystem',
|
|
482
|
+
'password=',
|
|
483
|
+
'',
|
|
484
|
+
]);
|
|
485
|
+
}
|
|
486
|
+
async grantAccess(user) {
|
|
487
|
+
await this.run(this.system32('icacls.exe'), [
|
|
488
|
+
this.getSystemConfigDir(),
|
|
489
|
+
'/grant',
|
|
490
|
+
`${user}:(OI)(CI)F`,
|
|
491
|
+
'/T',
|
|
492
|
+
]);
|
|
191
493
|
}
|
|
192
|
-
|
|
494
|
+
// No shell: every caller here passes something that came off the wire - a token, a user
|
|
495
|
+
// name, a password - and a shell would take `&` in any of them as a command of its own
|
|
496
|
+
run(file, args) {
|
|
193
497
|
return new Promise((resolve, reject) => {
|
|
194
|
-
(0, child_process_1.
|
|
498
|
+
(0, child_process_1.execFile)(file, args, (err, stdout) => {
|
|
195
499
|
if (!err)
|
|
196
|
-
resolve();
|
|
500
|
+
resolve(stdout);
|
|
197
501
|
else
|
|
198
502
|
reject(err);
|
|
199
503
|
});
|
package/distTs/src/texts.js
CHANGED
|
@@ -9,18 +9,19 @@ exports.TXT_ARTIFACT_NO_ENTRIES_FOUND = exports.TXT_ARTIFACT_SCANNING_DIR = expo
|
|
|
9
9
|
exports.OPTION_ARTIFACT_DOWNLOAD_PATH = exports.OPTION_ARTIFACT_PUBLISH_PATH = exports.OPTION_ARTIFACT_COMPOSE_PUBLISH_PATH = exports.OPTION_PIPELINE_RUN_ACTION_ID = exports.OPTION_PIPELINE_RUN_ID = exports.OPTION_PIPELINE_YAML = exports.TXT_PIPELINE_DELETED = exports.TXT_PIPELINE_DELETE_CONFIRM = exports.TXT_PIPELINE_UPDATED = exports.TXT_PIPELINE_CREATED = exports.OPTION_PIPELINE_NAME = exports.OPTION_PIPELINE_IDENTIFIER = exports.OPTION_PIPELINE_RUN_ARTIFACT = exports.OPTION_PIPELINE_RUN_ENVIRONMENT = exports.OPTION_PIPELINE_RUN_DELAY = exports.OPTION_PIPELINE_RUN_PAYLOAD = exports.ERR_RUN_PAYLOAD_TOO_MANY_FILES = exports.ERR_RUN_PAYLOAD_NOT_UPLOADED = exports.ERR_RUN_PAYLOAD_TOO_LARGE = exports.ERR_RUN_PAYLOAD_NO_ENTRIES = exports.ERR_RUN_VAR_FILE_INVALID = exports.ERR_RUN_VAR_FILE_NOT_FOUND = exports.OPTION_RUN_SINGLE_VAR_FILE = exports.OPTION_RUN_VAR_FILE = exports.OPTION_RUN_VAR = exports.OPTION_PIPELINE_RUN_PRIORITY = exports.OPTION_PIPELINE_RUN_CLEAR_CACHE = exports.OPTION_PIPELINE_RUN_REFRESH = exports.OPTION_PIPELINE_RUN_COMMENT = exports.OPTION_PIPELINE_RUN_PULL_REQUEST = exports.OPTION_PIPELINE_RUN_REVISION = exports.OPTION_PIPELINE_RUN_TAG = exports.OPTION_PIPELINE_RUN_BRANCH = exports.OPTION_REST_API_REGION = exports.OPTION_REST_API_ENDPOINT = exports.OPTION_DEFAULT_REGION = exports.OPTION_REGION = exports.TXT_ARTIFACT_UNZIPPING_COUNT = exports.TXT_ARTIFACT_UNZIPPED = exports.TXT_ARTIFACT_UNZIPPING = exports.TXT_ARTIFACT_DOWNLOADED_ZIP = exports.TXT_ARTIFACT_DOWNLOADING_ZIP = exports.TXT_ARTIFACT_DOWNLOADED = exports.TXT_ARTIFACT_IGNORED_ENTRIES = exports.TXT_ARTIFACT_ENTRIES_FOUND = exports.TXT_ARTIFACT_UPLOADED = exports.TXT_ARTIFACT_UPLOADING = exports.TXT_ARTIFACT_ZIPPED = exports.TXT_ARTIFACT_ZIP_ENTRIES = exports.TXT_ARTIFACT_ONE_ENTRY_FOUND = void 0;
|
|
10
10
|
exports.OPTION_AGENT_TOKEN = exports.OPTION_AGENT_START = exports.OPTION_AGENT_ID = exports.OPTION_ID = exports.OPTION_NAME = exports.OPTION_TARGET = exports.OPTION_TLS_TERMINATE = exports.OPTION_TLS_CA = exports.OPTION_TLS_CERT = exports.OPTION_TLS_KEY = exports.OPTION_HTTP_CIRCUIT_BREAKER = exports.OPTION_HTTP_COMPRESSION = exports.OPTION_HTTP_2 = exports.OPTION_HTTP_VERIFY = exports.OPTION_HTTP_LOG = exports.OPTION_HTTP_AUTH_BUDDY = exports.OPTION_HTTP_AUTH = exports.OPTION_HTTP_HOST = exports.OPTION_CONFIRM_DOMAIN_BUY = exports.OPTION_CONFIRM_FORCE = exports.OPTION_FORCE = exports.OPTION_TOKEN = exports.OPTION_TIMEOUT = exports.OPTION_FOLLOW = exports.OPTION_SERVE_SANDBOX = exports.OPTION_SERVE = exports.OPTION_HEADER_USER_AGENT = exports.OPTION_RESPONSE_HEADER = exports.OPTION_HEADER = exports.OPTION_WHITELIST = exports.OPTION_REST_API_PER_PAGE = exports.OPTION_REST_API_PAGE = exports.OPTION_REST_API_PROJECT = exports.OPTION_REST_API_WORKSPACE = exports.OPTION_FORMAT_JSONL = exports.OPTION_FORMAT = exports.OPTION_VERSION = exports.OPTION_PIPELINE_RUN_NO_FOLLOW = exports.OPTION_PIPELINE_RUN_NO_WAIT = exports.OPTION_PIPELINE_RUN_ACTION = exports.OPTION_REST_API_TOKEN = exports.OPTION_ARTIFACT_DOWNLOAD_REPLACE = exports.OPTION_ARTIFACT_DOWNLOAD_MERGE = exports.OPTION_ARTIFACT_IGNORE = exports.OPTION_ARTIFACT_PUBLISH_OVERWRITE_VERSION = exports.OPTION_ARTIFACT_VERSION_AGENT_NOTE = exports.OPTION_ARTIFACT_VERSION_NOTE = exports.OPTION_ARTIFACT_VERSION_FROM = exports.OPTION_ARTIFACT_PUBLISH_CREATE = exports.OPTION_ARTIFACT_ID = void 0;
|
|
11
11
|
exports.LOG_AGENT_DOWNLOADING_ARCHIVE = exports.LOG_AGENT_SYSTEM_DIR = exports.LOG_ERROR_SAVING_AGENT_LOCAL_CONFIG = exports.LOG_ERROR_REMOVING_AGENT_STANDALONE_LOCK_FILE = exports.LOG_ERROR_SAVING_AGENT_STANDALONE_CONFIG = exports.LOG_ERROR_SAVING_AGENT_SYSTEM_CONFIG = exports.LOG_SAVING_AGENT_LOCAL_CONFIG = exports.LOG_REMOVING_AGENT_PROC_ID = exports.LOG_SAVING_AGENT_PROC_ID = exports.LOG_SAVING_AGENT_SYSTEM_CONFIG = exports.LOG_REGISTERING_AGENT = exports.OPTION_CRAWL_OUTPUT_TYPES = exports.OPTION_CRAWL_OUTPUT_DIR = exports.OPTION_CRAWL_DELAY = exports.OPTION_CRAWL_LOCAL_STORAGE = exports.OPTION_CRAWL_DEVICES = exports.OPTION_CRAWL_BROWSERS = exports.OPTION_CRAWL_COLOR_SCHEME = exports.OPTION_CRAWL_XPATH_SELECTOR = exports.OPTION_CRAWL_CSS_SELECTOR = exports.OPTION_CRAWL_FULL_PAGE = exports.OPTION_CRAWL_QUALITY = exports.OPTION_CRAWL_OUTPUT_TYPE = exports.OPTION_CRAWL_FOLLOW = exports.OPTION_CRAWL_URL = exports.OPTION_COMPARE_WAIT_FOR = exports.OPTION_COMPARE_DELAY = exports.OPTION_COMPARE_HEADER = exports.OPTION_COMPARE_COOKIE = exports.OPTION_COMPARE_IGNORE = exports.OPTION_COMPARE_IGNORE_URLS = exports.OPTION_COMPARE_DRY_RUN = exports.OPTION_COMPARE_URLS_FILE = exports.OPTION_COMPARE_SITEMAP = exports.OPTION_COMPARE_URLS = exports.OPTION_COMPARE_RESPECT_ROBOTS = exports.OPTION_COMPARE_FOLLOW = exports.OPTION_EXEC_PARALLEL = exports.OPTION_EXEC_ONE_BY_ONE = exports.OPTION_EXEC_SKIP_DISCOVERY = exports.OPTION_EXEC_COMMAND = exports.OPTION_AGENT_DEBUG = exports.OPTION_AGENT_PORT = exports.OPTION_AGENT_TAG = exports.OPTION_AGENT_TUNNELING = exports.OPTION_AGENT_PROXY = exports.OPTION_AGENT_TARGET = exports.OPTION_PASS = exports.OPTION_APP = exports.OPTION_USER = void 0;
|
|
12
|
-
exports.
|
|
13
|
-
exports.
|
|
14
|
-
exports.
|
|
15
|
-
exports.
|
|
16
|
-
exports.
|
|
17
|
-
exports.
|
|
18
|
-
exports.
|
|
19
|
-
exports.
|
|
20
|
-
exports.
|
|
21
|
-
exports.
|
|
22
|
-
exports.
|
|
23
|
-
exports.
|
|
12
|
+
exports.LOG_AGENT_UPDATE_STANDALONE = exports.LOG_AGENT_UPDATE_REQUESTED = exports.LOG_AGENT_RIGHTS_SKIPPED = exports.LOG_AGENT_RIGHTS_DIR_SKIPPED = exports.LOG_AGENT_SERVER_STARTED = exports.LOG_ERROR_STARTING_AGENT_SERVER = exports.LOG_SSH_CONNECTION = exports.LOG_LATE_TARGET_ERROR = exports.LOG_LATE_CHANNEL_ERROR = exports.LOG_HANDSHAKE_TIMEOUT = exports.LOG_WRONG_STREAM = exports.LOG_DETECTED_STREAM = exports.LOG_HTTP2_SESSION_TIMEOUT = exports.LOG_HTTP2_SESSION_SHED_TAIL = exports.LOG_HTTP2_SESSION_SHED = exports.LOG_HTTP2_REQUEST = exports.LOG_HTTP2_CONNECTION = exports.LOG_HTTP1_REQUEST = exports.LOG_HTTP1_CONNECTION = exports.LOG_ERROR = exports.LOG_STOPPING_TUNNEL = exports.LOG_STARTING_TUNNEL = exports.LOG_ENABLING_AGENT_TUNNELING = exports.LOG_ENABLING_AGENT_PROXY = exports.LOG_ENABLING_AGENT_TARGET = exports.LOG_DISABLING_AGENT_TUNNELING = exports.LOG_DISABLING_AGENT_PROXY = exports.LOG_DISABLING_AGENT_TARGET = exports.LOG_REMOVING_TUNNEL = exports.LOG_TUNNEL_REGISTERED = exports.LOG_ERROR_WHILE_REFRESHING_AGENT = exports.LOG_REGISTERING_TUNNEL = exports.LOG_GETTING_AGENT = exports.LOG_UNREGISTERING_AGENT = exports.LOG_REGION_DETECTED = exports.LOG_AGENT_REGISTERED = exports.LOG_SOCKET_DISCONNECTED = exports.LOG_SOCKET_CONNECTED = exports.ERR_AGENT_WRAPPER_SIGNATURE = exports.ERR_AGENT_WRAPPER_MISSING = exports.LOG_AGENT_SERVICE_LEGACY_WRAPPER = exports.LOG_AGENT_WRAPPER_SIGNATURE_UNKNOWN = exports.LOG_AGENT_WRAPPER_SIGNED_BY = exports.LOG_AGENT_WRAPPER_VERIFYING = exports.LOG_AGENT_ENABLED = exports.LOG_AGENT_STARTING_SYSTEM = exports.LOG_AGENT_STOPPING_SYSTEM = exports.LOG_AGENT_ENABLING_SYSTEM = exports.LOG_AGENT_SYSTEM_SERVICE_CONFIG = exports.LOG_AGENT_EXTRACTING_ARCHIVE = void 0;
|
|
13
|
+
exports.DESC_COMMAND_SANDBOX = exports.DEBUG_WAIT_FOR_IDLE_TIMEOUT = exports.DEBUG_WAIT_FOR_IDLE = exports.DEBUG_RESOURCE_DISCOVERY_TIMEOUT = exports.DEBUG_AUTO_WIDTH = exports.DEBUG_AUTO_SCROLL = exports.DEBUG_RESOURCE_CRAWLING_URL = exports.DEBUG_SNAPSHOT_PROCESSING = exports.DEBUG_SNAPSHOTS_PROCESSING = exports.DEBUG_EXEC_COMMAND = exports.DEBUG_EXEC_TEST_COMMAND = exports.LOG_INSTALLED_BROWSER = exports.LOG_SESSION_LINK = exports.LOG_SENDING_DATA = exports.LOG_SENDING_REQUEST = exports.LOG_PROCESSING_SNAPSHOTS = exports.LOG_RUNNING_EXEC_COMMAND = exports.LOG_TUNNEL_SSH_STREAM = exports.LOG_TUNNEL_TLS_AGENT_STREAM = exports.LOG_TUNNEL_TLS_REGION_STREAM = exports.LOG_TUNNEL_TLS_TARGET_STREAM = exports.LOG_TUNNEL_HTTP2_STREAM = exports.LOG_TUNNEL_HTTP1_STREAM = exports.LOG_TUNNEL_TCP_STREAM = exports.LOG_TUNNEL_HTTP_WRONG_USER_AGENTS = exports.LOG_TUNNEL_HTTP_CIRCUIT_BREAKER_OPEN = exports.LOG_TUNNEL_HTTP_MAX_INFLIGHT = exports.LOG_TUNNEL_HTTP_RATE_LIMIT = exports.LOG_TUNNEL_HTTP_WRON_AUTH = exports.LOG_TUNNEL_IDENTIFIED = exports.LOG_TUNNEL_DISCONNECTED = exports.LOG_TUNNEL_FAILED = exports.LOG_TUNNEL_CONNECTED = exports.LOG_AGENT_STARTED = exports.LOG_AGENT_DEBUG_NOT_PERSISTED = exports.LOG_AGENT_DEBUG_REMOTE = exports.LOG_AGENT_UPDATE_ROLLBACK_MISSING = exports.LOG_AGENT_UPDATE_NOT_AN_AGENT = exports.LOG_AGENT_UPDATE_ROLLBACK_ACKED = exports.LOG_AGENT_UPDATE_ROLLED_BACK = exports.LOG_AGENT_UPDATE_ATTEMPT = exports.LOG_AGENT_UPDATE_COMMITTED = exports.LOG_AGENT_UPDATE_BINARY_INVALID = exports.ERR_AGENT_UPDATE_IN_PROGRESS = exports.LOG_AGENT_UPDATE_UNINSTALLED = exports.LOG_AGENT_UPDATE_VERSION_MISMATCH = exports.LOG_AGENT_UPDATE_FAILED = exports.LOG_AGENT_UPDATE_SWAPPED = exports.LOG_AGENT_UPDATE_NOT_NEEDED = exports.LOG_AGENT_UPDATE_NO_ADMIN = void 0;
|
|
14
|
+
exports.OPTION_SANDBOX_WAIT_CONFIGURED = exports.OPTION_SANDBOX_WAIT_RUNNING = exports.ERR_SANDBOX_STOP_FAILED = exports.ERR_SANDBOX_SSH_MISSING = exports.ERR_SANDBOX_SSH_NO_ACCESS = exports.ERR_SANDBOX_NOT_RUNNING = exports.ERR_SANDBOX_NO_COMMANDS = exports.ERR_SANDBOX_RUNNING_FAILED = exports.ERR_SANDBOX_STOP_TIMEOUT = exports.ERR_SANDBOX_SNAPSHOT_TIMEOUT = exports.ERR_SANDBOX_RUNNING_TIMEOUT = exports.ERR_SANDBOX_APPS_TIMEOUT = exports.ERR_SANDBOX_SETUP_TIMEOUT = exports.ERR_SANDBOX_APP_FAILED = exports.ERR_SANDBOX_SETUP_FAILED = exports.ERR_SANDBOX_INVALID_RESOURCES = exports.ERR_SANDBOX_APP_NOT_FOUND = exports.ERR_SANDBOX_NOT_FOUND = exports.OPTION_SANDBOX_SSH_PRINT = exports.OPTION_SANDBOX_SSH_IDENTITY = exports.OPTION_SANDBOX_SSH_ARGS = exports.OPTION_SANDBOX_RUNTIME = exports.OPTION_SANDBOX_TIMEOUT = exports.OPTION_SANDBOX_FETCH = exports.OPTION_SANDBOX_APP_DIR = exports.OPTION_SANDBOX_APP_COMMAND = exports.OPTION_SANDBOX_YAML = exports.OPTION_SANDBOX_TAGS = exports.OPTION_SANDBOX_INSTALL_SCRIPT = exports.OPTION_SANDBOX_INSTALL_COMMANDS = exports.OPTION_SANDBOX_RESOURCES = exports.OPTION_SANDBOX_OS = exports.OPTION_SANDBOX_AGENT_NOTE = exports.OPTION_SANDBOX_NOTE = exports.OPTION_SANDBOX_NAME = exports.OPTION_SANDBOX_IDENTIFIER = exports.DESC_COMMAND_SANDBOX_SSH = exports.DESC_COMMAND_SANDBOX_APP = exports.DESC_COMMAND_SANDBOX_EXEC = exports.DESC_COMMAND_SANDBOX_STATUS = exports.DESC_COMMAND_SANDBOX_LOGS = exports.DESC_COMMAND_SANDBOX_RESTART = exports.DESC_COMMAND_SANDBOX_STOP = exports.DESC_COMMAND_SANDBOX_START = exports.DESC_COMMAND_SANDBOX_DESTROY = exports.DESC_COMMAND_SANDBOX_GET = exports.DESC_COMMAND_SANDBOX_LIST = exports.DESC_COMMAND_SANDBOX_UPDATE = exports.DESC_COMMAND_SANDBOX_GET_YAML = exports.DESC_COMMAND_SANDBOX_CREATE = void 0;
|
|
15
|
+
exports.DESC_COMMAND_SANDBOX_ENDPOINT_LIST = exports.DESC_COMMAND_SANDBOX_ENDPOINT = exports.ERR_SANDBOX_SNAPSHOT_OS_CONFLICT = exports.ERR_SANDBOX_SNAPSHOTS_NOT_FOUND = exports.ERR_SANDBOX_SNAPSHOT_NOT_FOUND = exports.ERR_SANDBOX_SNAPSHOT_FAILED = exports.TXT_SANDBOX_SNAPSHOT_WAITING = exports.TXT_SANDBOX_SNAPSHOT_DELETE_CONFIRM = exports.TXT_SANDBOX_SNAPSHOT_DELETED = exports.TXT_SANDBOX_SNAPSHOT_CREATED = exports.OPTION_SANDBOX_FROM_SNAPSHOT = exports.OPTION_SANDBOX_SNAPSHOT_NAME_ARG = exports.OPTION_SANDBOX_SNAPSHOT_NAME = exports.DESC_COMMAND_SANDBOX_SNAPSHOT_DELETE = exports.DESC_COMMAND_SANDBOX_SNAPSHOT_GET = exports.DESC_COMMAND_SANDBOX_SNAPSHOT_CREATE = exports.DESC_COMMAND_SANDBOX_SNAPSHOT_LIST = exports.DESC_COMMAND_SANDBOX_SNAPSHOT = exports.TXT_SANDBOX_COMMAND_KILLED = exports.OPTION_SANDBOX_COMMAND_KILL_CONFIRM = exports.OPTION_SANDBOX_LOGS_LIMIT = exports.OPTION_SANDBOX_APP_ID = exports.OPTION_SANDBOX_COMMAND_ID = exports.DESC_COMMAND_SANDBOX_EXEC_KILL = exports.DESC_COMMAND_SANDBOX_EXEC_LOGS = exports.DESC_COMMAND_SANDBOX_APP_START = exports.DESC_COMMAND_SANDBOX_APP_STOP = exports.DESC_COMMAND_SANDBOX_APP_STATUS = exports.DESC_COMMAND_SANDBOX_APP_LOGS = exports.DESC_COMMAND_SANDBOX_EXEC_STATUS = exports.DESC_COMMAND_SANDBOX_EXEC_LIST = exports.DESC_COMMAND_SANDBOX_APP_REMOVE = exports.DESC_COMMAND_SANDBOX_APP_ADD = exports.DESC_COMMAND_SANDBOX_APP_LIST = exports.TXT_SANDBOX_WAITING_START = exports.TXT_SANDBOX_WAITING_STOP = exports.TXT_SANDBOX_WAITING_APPS = exports.TXT_SANDBOX_WAITING_SETUP = exports.TXT_SANDBOX_WAITING_RUNNING = exports.TXT_SANDBOX_STOPPED = exports.TXT_SANDBOX_STARTED = exports.TXT_SANDBOX_DESTROYED = exports.TXT_SANDBOX_DESTROY_CONFIRM = exports.TXT_SANDBOX_UPDATED = exports.TXT_SANDBOX_CREATED = exports.TXT_SANDBOX_CREATING = exports.TXT_SANDBOX_APP_STARTED = exports.TXT_SANDBOX_APP_STOPPED = exports.OPTION_SANDBOX_WAIT = exports.OPTION_SANDBOX_WAIT_APPS = void 0;
|
|
16
|
+
exports.DESC_COMMAND_TARGET_DELETE = exports.DESC_COMMAND_TARGET_UPDATE = exports.DESC_COMMAND_TARGET_CREATE = exports.DESC_COMMAND_TARGET_GET = exports.DESC_COMMAND_TARGET_LIST = exports.DESC_COMMAND_TARGET = exports.TXT_SANDBOX_EXEC_FAILED = exports.TXT_SANDBOX_EXEC_INPROGRESS = exports.TXT_SANDBOX_EXEC_SUCCESS = exports.TXT_SANDBOX_EXEC_BACKGROUND = exports.TXT_SANDBOX_EXEC_ID = exports.ERR_SANDBOX_CP_INVALID_SOURCE = exports.ERR_SANDBOX_CP_INVALID_DEST = exports.ERR_SANDBOX_CP_REPLACE = exports.ERR_SANDBOX_CP_MKDIR = exports.ERR_SANDBOX_CP_PATH_EXISTS = exports.ERR_SANDBOX_CP_NOT_EMPTY_DIR = exports.ERR_SANDBOX_CP_READDIR = exports.ERR_SANDBOX_CP_DEST_NOT_FOLDER = exports.ERR_SANDBOX_CP_SOURCE_NOT_FOUND = exports.TXT_SANDBOX_CP_DONE = exports.TXT_SANDBOX_CP_PROGRESS = exports.TXT_SANDBOX_UNZIPPING_COUNT = exports.TXT_SANDBOX_UNZIP_DONE = exports.TXT_SANDBOX_UNZIP = exports.TXT_SANDBOX_CP_DOWNLOAD_DONE = exports.TXT_SANDBOX_CP_DOWNLOAD = exports.OPTION_SANDBOX_CP_IGNORE = exports.OPTION_SANDBOX_CP_USER = exports.OPTION_SANDBOX_CP_DOWNLOAD_REPLACE = exports.OPTION_SANDBOX_CP_DOWNLOAD_MERGE = exports.OPTION_SANDBOX_CP_DEST = exports.OPTION_SANDBOX_CP_SOURCE = exports.DESC_COMMAND_SANDBOX_CP = exports.ERR_SANDBOX_APPS_NOT_FOUND = exports.ERR_SANDBOX_ENDPOINTS_NOT_FOUND = exports.ERR_SANDBOX_ENDPOINT_NOT_FOUND = exports.ERR_SANDBOX_ENDPOINT_EXISTS = exports.TXT_SANDBOX_ENDPOINT_DELETED = exports.TXT_SANDBOX_ENDPOINT_DELETE_CONFIRM = exports.TXT_SANDBOX_ENDPOINT_ADDED = exports.TXT_SANDBOX_APP_REMOVED = exports.TXT_SANDBOX_APP_ADDED = exports.OPTION_SANDBOX_ENDPOINT_TYPE = exports.OPTION_SANDBOX_ENDPOINT_PORT = exports.OPTION_SANDBOX_ENDPOINT_NAME_ARG = exports.OPTION_SANDBOX_ENDPOINT_NAME = exports.DESC_COMMAND_SANDBOX_ENDPOINT_DELETE = exports.DESC_COMMAND_SANDBOX_ENDPOINT_ADD = exports.DESC_COMMAND_SANDBOX_ENDPOINT_GET = void 0;
|
|
17
|
+
exports.OPTION_ENVIRONMENT_CREATE_IDENTIFIER = exports.OPTION_ENVIRONMENT_NAME = exports.OPTION_ENVIRONMENT_IDENTIFIER = exports.DESC_COMMAND_ENVIRONMENT_DELETE = exports.DESC_COMMAND_ENVIRONMENT_UPDATE = exports.DESC_COMMAND_ENVIRONMENT_CREATE = exports.DESC_COMMAND_ENVIRONMENT_GET = exports.DESC_COMMAND_ENVIRONMENT_LIST = exports.DESC_COMMAND_ENVIRONMENT = exports.TXT_TARGET_EXEC_KILLED = exports.TXT_TARGET_EXEC_KILL_CONFIRM = exports.WARN_TARGET_EXEC_TRUNCATED = exports.TXT_TARGET_EXEC_CANCELLED = exports.TXT_TARGET_EXEC_FAILED = exports.TXT_TARGET_EXEC_SUCCESS = exports.TXT_TARGET_EXEC_BACKGROUND = exports.TXT_TARGET_EXEC_ID = exports.TXT_TARGET_DELETED = exports.TXT_TARGET_DELETE_CONFIRM = exports.TXT_TARGET_UPDATED = exports.TXT_TARGET_CREATED = exports.TXT_TARGET_NOT_FOUND = exports.ERR_TARGET_SCOPE_NO_ENVIRONMENT = exports.ERR_TARGET_SCOPE_NO_PIPELINE = exports.ERR_TARGET_PIPELINE_ENV_CONFLICT = exports.ERR_TARGET_PIPELINE_REQUIRES_PROJECT = exports.ERR_TARGET_SCOPE = exports.ERR_TARGET_ENVIRONMENT_NOT_FOUND = exports.ERR_TARGET_EXEC_FILE_NOT_FOUND = exports.ERR_TARGET_EXEC_COMMAND_CONFLICT = exports.ERR_TARGET_EXEC_NO_COMMAND = exports.ERR_TARGET_NO_EXECS = exports.ERR_TARGET_NOT_FOUND = exports.OPTION_TARGET_EXEC_FILE = exports.OPTION_TARGET_EXEC_ASYNC = exports.OPTION_TARGET_EXEC_COMMAND = exports.OPTION_TARGET_EXEC_LOG_LIMIT = exports.OPTION_TARGET_EXEC_LOG_OFFSET = exports.OPTION_TARGET_EXEC_LIMIT = exports.OPTION_TARGET_EXEC_ID = exports.OPTION_TARGET_YAML = exports.OPT_COMMAND_TARGET_SCOPE = exports.OPTION_TARGET_ENVIRONMENT = exports.OPTION_TARGET_PIPELINE = exports.OPTION_TARGET_IDENTIFIER = exports.DESC_COMMAND_TARGET_EXEC_LOGS = exports.DESC_COMMAND_TARGET_EXEC_LIST = exports.DESC_COMMAND_TARGET_EXEC_KILL = exports.DESC_COMMAND_TARGET_EXEC_STATUS = exports.DESC_COMMAND_TARGET_EXEC = void 0;
|
|
18
|
+
exports.ERR_MCP_TOOLS_CATEGORY = exports.OPT_COMMAND_MCP_TOOLS = exports.ERR_MCP_REFRESH_FAILED = exports.ERR_MCP_URL_INVALID = exports.ERR_MCP_ENDPOINT = exports.DESC_COMMAND_MCP = exports.ERR_API_MEDIA_TYPE_NOT_IMPLEMENTED = exports.ERR_API_PARAMETER_NOT_REPLACED = exports.TXT_API_ENDPOINT_REQUIRED_SCOPES = exports.ERR_API_ENDPOINT_NOT_FOUND = exports.ERR_API_WRONG_METHOD = exports.ERR_SCHEMA_FETCH_FAILED = exports.OPT_COMMAND_API_INFO_URL = exports.OPT_COMMAND_API_INFO_SCHEMA = exports.OPT_COMMAND_API_INFO_METHOD = exports.OPT_COMMAND_API_LIST_SEARCH = exports.OPT_COMMAND_API_LIST_METHOD = exports.ERR_API_REQUEST_BODY_VALUE = exports.ERR_API_REQUEST_QUERY_VALUE = exports.ERR_API_REQUEST_INVALID_JSON = exports.ERR_API_REQUEST_FILE_ERROR = exports.ERR_API_REQUEST_OUTPUT_EXISTS = exports.DESC_COMMAND_API_INFO = exports.DESC_COMMAND_API_FORM = exports.DESC_COMMAND_API_JSON = exports.DESC_COMMAND_API_DATA = exports.DESC_COMMAND_API_OUTPUT = exports.DESC_COMMAND_API_REQUEST_QUERY = exports.DESC_COMMAND_API_PROJECT = exports.DESC_COMMAND_API_WORKSPACE = exports.DESC_COMMAND_API_REQUEST_URL = exports.DESC_COMMAND_API_GET = exports.DESC_COMMAND_API_PATCH = exports.DESC_COMMAND_API_DELETE = exports.DESC_COMMAND_API_PUT = exports.DESC_COMMAND_API_POST = exports.DESC_COMMAND_API_LIST = exports.DESC_COMMAND_API = exports.ERR_WHOAMI_LOGOUT = exports.TXT_WHOAMI_NO_WORKSPACE = exports.DESC_COMMAND_WHOAMI = exports.TXT_ENVIRONMENT_DELETED = exports.TXT_ENVIRONMENT_DELETE_CONFIRM = exports.TXT_ENVIRONMENT_UPDATED = exports.TXT_ENVIRONMENT_CREATED = exports.TXT_ENVIRONMENT_NOT_FOUND = exports.ERR_ENVIRONMENT_NOT_FOUND = exports.OPTION_ENVIRONMENT_ICON = exports.OPTION_ENVIRONMENT_PUBLIC_URL = exports.OPTION_ENVIRONMENT_TAGS = void 0;
|
|
19
|
+
exports.DESC_COMMAND_ROUTE_UPDATE = exports.DESC_COMMAND_ROUTE_DELETE = exports.DESC_COMMAND_ROUTE_GET = exports.DESC_COMMAND_DISTRO_UPDATE = exports.DESC_COMMAND_DISTRO_GET = exports.DESC_COMMAND_ROUTE_LIST = exports.DESC_COMMAND_DISTRO_LIST = exports.DESC_COMMAND_DISTRO_DELETE = exports.DESC_COMMAND_ROUTE_CREATE = exports.DESC_COMMAND_DISTRO_CREATE = exports.DESC_COMMAND_DISTRO = exports.ERR_API_MESSAGE_REPLACER = exports.ERR_LOGIN_INVALID_BASE_URL = exports.ERR_LOGIN_NO_WORKSPACE_FOUND = exports.ERR_LOGIN_NO_WORKSPACES = exports.ERR_REGISTER_HTTP_CANCEL = exports.ERR_LOGIN_HTTP_CANCEL = exports.ERR_LOGIN_HTTP_FAILED = exports.ERR_LOGIN_HTTP_SERVER_PORT_TAKEN = exports.TXT_REGISTER_SUCCESS = exports.TXT_LOGIN_SUCCESS = exports.TXT_LOGIN_SELECT_WORKSPACE = exports.TXT_LOGIN_ENTER_BASE_URL = exports.TXT_LOGIN_PROVIDE_CODE = exports.TXT_REGISTER_OPEN_URL = exports.TXT_LOGIN_OPEN_URL = exports.TXT_REGISTER_OPENING_STAR = exports.TXT_LOGIN_OPENING_STAR = exports.TXT_REGISTER_OPENING = exports.TXT_LOGIN_OPENING = exports.TXT_LOGIN_SELECT_REGION = exports.TXT_WORKSPACE_NONE = exports.TXT_WORKSPACE_SET_SUCCESS = exports.ARG_COMMAND_WORKSPACE = exports.DESC_COMMAND_WORKSPACE_GET = exports.DESC_COMMAND_WORKSPACE_SET = exports.DESC_COMMAND_WORKSPACE_LIST = exports.DESC_COMMAND_WORKSPACE = exports.TXT_COMMAND_REGISTER_PROVIDE_NAME = exports.TXT_COMMAND_REGISTER_PROVIDE_EMAIL = exports.ERR_COMMAND_REGISTER_INVALID_NAME = exports.ERR_COMMAND_REGISTER_INVALID_EMAIL = exports.OPT_COMMAND_REGISTER_NAME = exports.OPT_COMMAND_REGISTER_EMAIL = exports.DESC_COMMAND_REGISTER = exports.TXT_LOGOUT_SUCCESS = exports.DESC_COMMAND_LOGOUT = exports.DESC_COMMAND_LOGIN = exports.HELP_COMMAND_MCP = exports.ERR_MCP_TOOL_FILTERED = void 0;
|
|
20
|
+
exports.OPT_COMMAND_DOMAIN_ONLY_AVAILABLE = exports.OPT_COMMAND_DOMAIN_SORT = exports.OPT_COMMAND_DOMAIN_PHRASE = exports.OPT_COMMAND_DOMAIN_BUY_OWNER = exports.OPT_COMMAND_DOMAIN_BUY_TLD = exports.DESC_COMMAND_DOMAIN_GET = exports.DESC_COMMAND_DOMAIN_LIST = exports.DESC_COMMAND_DOMAIN_SEARCH = exports.DESC_COMMAND_DOMAIN_BUY = exports.DESC_COMMAND_DOMAIN = exports.ERR_ROUTE_NO_DEFAULT = exports.ERR_WRONG_ROUTE_TARGET = exports.ERR_COMMAND_ROUTE_NO_TARGET = exports.ERR_COMMAND_ROUTE_TYPE = exports.TXT_COMMAND_ROUTES_NOT_FOUND = exports.TXT_COMMAND_DISTROS_NOT_FOUND = exports.TXT_COMMAND_ROUTE_DELETED = exports.TXT_COMMAND_DISTRO_DELETED = exports.TXT_COMMAND_ROUTE_DELETE_CONFIRM = exports.TXT_COMMAND_DISTRO_DELETE_CONFIRM = exports.ERR_COMMAND_DISTRO_ENABLE_DISABLE = exports.ERR_COMMAND_NO_UPDATE = exports.ERR_COMMAND_DISTRO_NOT_FOUND = exports.ERR_COMMAND_SCOPE = exports.TXT_COMMAND_DISTRO_UPDATED = exports.TXT_COMMAND_ROUTE_UPDATED = exports.TXT_ROUTE_SERVE = exports.TXT_COMMAND_ROUTE_CREATED = exports.TXT_COMMAND_DISTRO_CREATED = exports.ERR_COMMAND_SCOPE_NO_ENVIRONMENT = exports.ERR_COMMAND_SCOPE_NO_PROJECT = exports.OPT_COMMAND_DISTRO_DISABLE = exports.OPT_COMMAND_DISTRO_ENABLE = exports.OPT_COMMAND_DISTRO_AGENT_NOTE = exports.OPT_COMMAND_DISTRO_NOTE = exports.OPT_COMMAND_DISTRO_NAME = exports.OPT_COMMAND_ROUTE_TARGET = exports.OPT_COMMAND_ROUTE_AGENT_NOTE = exports.OPT_COMMAND_ROUTE_NOTE = exports.OPT_COMMAND_ROUTE_PATH = exports.OPT_COMMAND_ROUTE_DOMAIN = exports.OPT_COMMAND_ROUTE_SUBDOMAIN = exports.OPT_COMMAND_ROUTE_TYPE = exports.OPT_COMMAND_ROUTE_ID = exports.OPT_COMMAND_DISTRO_IDENTIFIER = exports.OPT_COMMAND_SCOPE_ENVIRONMENT = exports.OPT_COMMAND_SCOPE = exports.OPT_COMMAND_AGENT_NOTE = exports.OPT_COMMAND_NOTE = exports.DESC_COMMAND_ROUTE = void 0;
|
|
21
|
+
exports.TXT_COMMAND_PROJECT_LINK_GIT_REPO_INITIALIZED = exports.TXT_COMMAND_PROJECT_LINK_GIT_REPO = exports.TXT_COMMAND_PROJECT_LINK_DIR_CONFIRM = exports.TXT_COMMAND_PROJECT_LINK_DIR_LINKED = exports.ERR_COMMAND_PROJECT_LINK_DIR_CREATE = exports.OPT_COMMAND_PROJECT_LINK_TRY_NOW = exports.OPT_COMMAND_PROJECT_LINK_SET_GIT_REMOTE = exports.OPT_COMMAND_PROJECT_LINK_HAS_REMOTE = exports.OPT_COMMAND_PROJECT_LINK_DIRECTORY = exports.OPT_COMMAND_PROJECT_LINK_GIT = exports.OPT_COMMAND_PROJECT_LINK_RELINK = exports.DESC_COMMAND_PROJECT_LINK = exports.DESC_COMMAND_PROJECT_LIST = exports.DESC_COMMAND_PROJECT_GIT = exports.DESC_COMMAND_PROJECT_GIT_CREDENTIAL = exports.DESC_COMMAND_PROJECT = exports.TXT_ARTIFACT_VERSION_DOWNLOAD = exports.TXT_ARTIFACT_PUBLISH = exports.TXT_ARTIFACT_CREATED = exports.TXT_ARTIFACT_VERSION_DELETED = exports.TXT_ARTIFACT_DELETED = exports.ERR_COMMAND_ARTIFACT_TYPE = exports.OPT_COMMAND_ARTIFACT_VERSION = exports.OPT_COMMAND_ARTIFACT_IDENTIFIER = exports.OPT_COMMAND_ARTIFACT_CREATE_IDENTIFIER = exports.OPT_COMMAND_ARTIFACT_NAME = exports.OPT_COMMAND_ARTIFACT_TYPE = exports.DESC_COMMAND_ARTIFACT_CREATE = exports.DESC_COMMAND_ARTIFACT_COMPOSER_PUBLISH = exports.DESC_COMMAND_ARTIFACT_GET = exports.TXT_ARTIFACT_DOCKER_LOGIN_FAILED = exports.TXT_ARTIFACT_DOCKER_LOGIN_SUCCESS = exports.TXT_ARTIFACT_VERSION_DELETE_CONFIRM = exports.TXT_ARTIFACT_DELETE_CONFIRM = exports.DESC_COMMAND_ARTIFACT_DELETE = exports.ERR_COMMAND_ARTIFACT_NO_PROJECTS = exports.DESC_COMMAND_ARTIFACT_VERSION_GET = exports.DESC_COMMAND_ARTIFACT_VERSION_LIST = exports.DESC_COMMAND_ARTIFACT_VERSION_DELETE = exports.DESC_COMMAND_ARTIFACT_DOCKER_LOGIN = exports.DESC_COMMAND_ARTIFACT_LIST = exports.DESC_COMMAND_ARTIFACT_COMPOSER = exports.DESC_COMMAND_ARTIFACT_VERSION = exports.ERR_COMMAND_DOMAIN_UNAVAILABLE = exports.OPTION_COMMAND_DOMAIN_IDENTIFIER = exports.ERR_COMMAND_DOMAIN_NO_DOMAINS = exports.TXT_COMMAND_DOMAIN_PROMPT_REQUIRED = exports.TXT_COMMAND_DOMAIN_BUY_SELECT_DOMAIN = exports.TXT_COMMAND_DOMAIN_PROVIDE_PROMPT = exports.ERR_COMMAND_DOMAIN_NOT_FOUND = void 0;
|
|
22
|
+
exports.EXAMPLE_TARGET_LIST = exports.EXAMPLE_SANDBOX_SNAPSHOT_LIST = exports.EXAMPLE_SANDBOX_SNAPSHOT_GET = exports.EXAMPLE_SANDBOX_SNAPSHOT_DELETE = exports.EXAMPLE_SANDBOX_SNAPSHOT_CREATE = exports.EXAMPLE_SANDBOX_EXEC_STATUS = exports.EXAMPLE_SANDBOX_EXEC_LOGS = exports.EXAMPLE_SANDBOX_APP_STATUS = exports.EXAMPLE_SANDBOX_APP_STOP = exports.EXAMPLE_SANDBOX_APP_REMOVE = exports.EXAMPLE_SANDBOX_APP_ADD = exports.EXAMPLE_SANDBOX_APP_START = exports.EXAMPLE_SANDBOX_APP_LOGS = exports.EXAMPLE_SANDBOX_EXEC_LIST = exports.EXAMPLE_SANDBOX_APP_LIST = exports.EXAMPLE_SANDBOX_EXEC_KILL = exports.EXAMPLE_SANDBOX_SSH = exports.EXAMPLE_SANDBOX_EXEC_COMMAND = exports.EXAMPLE_TUNNEL_START = exports.EXAMPLE_TUNNEL_TCP = exports.EXAMPLE_TUNNEL_TLS = exports.EXAMPLE_AGENT_TUNNEL_START = exports.EXAMPLE_AGENT_TUNNEL_STATUS = exports.EXAMPLE_AGENT_TUNNEL_REMOVE = exports.EXAMPLE_AGENT_TUNNEL_LIST = exports.EXAMPLE_TUNNEL_HTTP = exports.EXAMPLE_SANDBOX_CREATE = exports.EXAMPLE_DISTRO_CREATE = exports.EXAMPLE_ROUTE_CREATE = exports.EXAMPLE_ROUTE_LIST = exports.EXAMPLE_ROUTE_UPDATE = exports.EXAMPLE_ROUTE_DELETE = exports.EXAMPLE_DISTRO_DELETE = exports.EXAMPLE_ROUTE_GET = exports.EXAMPLE_DISTRO_UPDATE = exports.EXAMPLE_DISTRO_GET = exports.EXAMPLE_DISTRO_LIST = exports.EXAMPLE_SANDBOX_CP = exports.ERR_PROJECT_NO_PROJECTS = exports.TXT_LOGIN_SELECT_PROJECT = exports.TXT_COMMAND_PROJECT_CREATED = exports.TXT_COMMAND_PROJECT_LINK_NOT_FOUND = exports.TXT_COMMAND_PROJECT_LINK_NAME = exports.TXT_COMMAND_PROJECT_LINK_SELECT_PROJECT = exports.TXT_COMMAND_PROJECT_LINK_TO = exports.TXT_COMMAND_PROJECT_LINK_EXISTING_DESC = exports.TXT_COMMAND_PROJECT_LINK_EXISTING = exports.TXT_COMMAND_PROJECT_LINK_CREATE_NEW_DESC = exports.TXT_COMMAND_PROJECT_LINK_CREATE_NEW = exports.ERR_COMMAND_PROJECT_LINK_DIR_NOT_DIR = void 0;
|
|
23
|
+
exports.EXAMPLE_CRAWL_RUN = exports.EXAMPLE_TESTS_CAPTURE = exports.EXAMPLE_TESTS_VISUAL_SESSION_CLOSE = exports.EXAMPLE_TESTS_VISUAL_SESSION_CREATE = exports.EXAMPLE_TESTS_VISUAL_LINK = exports.EXAMPLE_TESTS_VISUAL_UPLOAD = exports.EXAMPLE_TESTS_VISUAL_SETUP = exports.EXAMPLE_TESTS_UNIT_LINK = exports.EXAMPLE_TESTS_UNIT_UPLOAD = exports.EXAMPLE_ARTIFACT_VERSION_DELETE = exports.EXAMPLE_ARTIFACT_VERSION_GET = exports.EXAMPLE_ARTIFACT_VERSION_LIST = exports.EXAMPLE_ARTIFACT_CREATE = exports.EXAMPLE_ARTIFACT_DELETE = exports.EXAMPLE_ARTIFACT_DOWNLOAD = exports.EXAMPLE_ARTIFACT_PUBLISH = exports.EXAMPLE_ARTIFACT_COMPOSER_PUBLISH = exports.EXAMPLE_ARTIFACT_VERSION_CREATE = exports.EXAMPLE_PIPELINE_RUN_RETRY = exports.EXAMPLE_PIPELINE_RUN_LIST = exports.EXAMPLE_PIPELINE_LIST = exports.EXAMPLE_PIPELINE_YML = exports.EXAMPLE_PIPELINE_GET = exports.EXAMPLE_PIPELINE_UPDATE = exports.EXAMPLE_PIPELINE_DELETE = exports.EXAMPLE_PIPELINE_CREATE = exports.EXAMPLE_PIPELINE_RUN_CANCEL = exports.EXAMPLE_PIPELINE_RUN_APPLY = exports.EXAMPLE_PIPELINE_RUN_LOGS = exports.EXAMPLE_PIPELINE_RUN_JSONL = exports.EXAMPLE_PIPELINE_RUN_STATUS = exports.EXAMPLE_PIPELINE_RUN_START = exports.EXAMPLE_SANDBOX_ENDPOINT_LIST = exports.EXAMPLE_SANDBOX_ENDPOINT_GET = exports.EXAMPLE_SANDBOX_ENDPOINT_DELETE = exports.EXAMPLE_SANDBOX_ENDPOINT_CREATE = exports.EXAMPLE_ENVIRONMENT_DELETE = exports.EXAMPLE_ENVIRONMENT_UPDATE = exports.EXAMPLE_ENVIRONMENT_CREATE = exports.EXAMPLE_ENVIRONMENT_GET = exports.EXAMPLE_ENVIRONMENT_LIST = exports.EXAMPLE_TARGET_EXEC_LOGS = exports.EXAMPLE_TARGET_EXEC_LIST = exports.EXAMPLE_TARGET_EXEC_KILL = exports.EXAMPLE_TARGET_EXEC_STATUS = exports.EXAMPLE_TARGET_EXEC_COMMAND = exports.EXAMPLE_TARGET_DELETE = exports.EXAMPLE_TARGET_UPDATE = exports.EXAMPLE_TARGET_CREATE = exports.EXAMPLE_TARGET_GET = void 0;
|
|
24
|
+
exports.EXAMPLE_CRAWL_LINK = void 0;
|
|
24
25
|
const utils_1 = require("./utils");
|
|
25
26
|
exports.ERR_CANCELLED = 'Cancelled';
|
|
26
27
|
exports.ERR_REST_API_GENERAL_ERROR = 'Something went wrong';
|
|
@@ -561,9 +562,16 @@ exports.LOG_AGENT_ENABLING_SYSTEM = 'Installing agent in system...';
|
|
|
561
562
|
exports.LOG_AGENT_STOPPING_SYSTEM = 'Stopping agent in system...';
|
|
562
563
|
exports.LOG_AGENT_STARTING_SYSTEM = 'Starting agent in system...';
|
|
563
564
|
exports.LOG_AGENT_ENABLED = 'Agent installed in system';
|
|
564
|
-
exports.
|
|
565
|
-
|
|
566
|
-
exports.
|
|
565
|
+
exports.LOG_AGENT_WRAPPER_VERIFYING = 'Verifying agent service wrapper signature...';
|
|
566
|
+
const LOG_AGENT_WRAPPER_SIGNED_BY = (subject) => `Agent service wrapper signed by ${subject}`;
|
|
567
|
+
exports.LOG_AGENT_WRAPPER_SIGNED_BY = LOG_AGENT_WRAPPER_SIGNED_BY;
|
|
568
|
+
const LOG_AGENT_WRAPPER_SIGNATURE_UNKNOWN = (status) => `Could not confirm the agent service wrapper signature (${status})`;
|
|
569
|
+
exports.LOG_AGENT_WRAPPER_SIGNATURE_UNKNOWN = LOG_AGENT_WRAPPER_SIGNATURE_UNKNOWN;
|
|
570
|
+
exports.LOG_AGENT_SERVICE_LEGACY_WRAPPER = 'Removing a service registered by nssm...';
|
|
571
|
+
const ERR_AGENT_WRAPPER_MISSING = (p) => `The agent archive did not contain the service wrapper '${p}'`;
|
|
572
|
+
exports.ERR_AGENT_WRAPPER_MISSING = ERR_AGENT_WRAPPER_MISSING;
|
|
573
|
+
const ERR_AGENT_WRAPPER_SIGNATURE = (status) => `The downloaded agent service wrapper is not the one we signed (${status})`;
|
|
574
|
+
exports.ERR_AGENT_WRAPPER_SIGNATURE = ERR_AGENT_WRAPPER_SIGNATURE;
|
|
567
575
|
exports.LOG_SOCKET_CONNECTED = 'Socket connected';
|
|
568
576
|
exports.LOG_SOCKET_DISCONNECTED = 'Socket disconnected';
|
|
569
577
|
const LOG_AGENT_REGISTERED = (id) => `Agent registered with id '${id}'`;
|