@studiometa/forge-core 0.4.3 → 0.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,33 +1,14 @@
1
1
  import { createWriteStream, mkdirSync } from "node:fs";
2
2
  import { homedir } from "node:os";
3
3
  import { dirname, join } from "node:path";
4
+ import pino from "pino";
4
5
  import { BackgroundProcessAttributesSchema, BackupConfigAttributesSchema, CertificateAttributesSchema, CommandAttributesSchema, DatabaseAttributesSchema, DatabaseUserAttributesSchema, DeploymentAttributesSchema, DeploymentOutputAttributesSchema, DeploymentScriptAttributesSchema, EnvironmentAttributesSchema, FirewallRuleAttributesSchema, MonitorAttributesSchema, NginxTemplateAttributesSchema, RecipeAttributesSchema, RedirectRuleAttributesSchema, ScheduledJobAttributesSchema, SecurityRuleAttributesSchema, ServerAttributesSchema, SiteAttributesSchema, SshKeyAttributesSchema, UserAttributesSchema, jsonApiDocumentSchema, jsonApiListDocumentSchema, unwrapDocument, unwrapListDocument } from "@studiometa/forge-api";
5
- var __create = Object.create;
6
- var __defProp = Object.defineProperty;
7
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
8
- var __getOwnPropNames = Object.getOwnPropertyNames;
9
- var __getProtoOf = Object.getPrototypeOf;
10
- var __hasOwnProp = Object.prototype.hasOwnProperty;
11
- var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
14
- key = keys[i];
15
- if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
- get: ((k) => from[k]).bind(null, key),
17
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
- });
19
- }
20
- return to;
21
- };
22
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
23
- value: mod,
24
- enumerable: true
25
- }) : target, mod));
6
+ //#region src/constants.ts
26
7
  /**
27
8
  * All supported resources.
28
9
  * Single source of truth — MCP schema and handlers derive from this.
29
10
  */
30
- const RESOURCES = [
11
+ var RESOURCES = [
31
12
  "servers",
32
13
  "sites",
33
14
  "deployments",
@@ -54,7 +35,7 @@ const RESOURCES = [
54
35
  * All supported actions.
55
36
  * Single source of truth — MCP schema and handlers derive from this.
56
37
  */
57
- const ACTIONS = [
38
+ var ACTIONS = [
58
39
  "list",
59
40
  "get",
60
41
  "create",
@@ -70,6 +51,8 @@ const ACTIONS = [
70
51
  "schema",
71
52
  "context"
72
53
  ];
54
+ //#endregion
55
+ //#region src/utils/name-matcher.ts
73
56
  /**
74
57
  * Match items by name using case-insensitive exact and partial matching.
75
58
  *
@@ -85,510 +68,8 @@ function matchByName(items, query, getName) {
85
68
  partial: items.filter((item) => getName(item).toLowerCase().includes(lower))
86
69
  };
87
70
  }
88
- var require_quick_format_unescaped = /* @__PURE__ */ __commonJSMin(((exports, module) => {
89
- function tryStringify(o) {
90
- try {
91
- return JSON.stringify(o);
92
- } catch (e) {
93
- return "\"[Circular]\"";
94
- }
95
- }
96
- module.exports = format;
97
- function format(f, args, opts) {
98
- var ss = opts && opts.stringify || tryStringify;
99
- var offset = 1;
100
- if (typeof f === "object" && f !== null) {
101
- var len = args.length + offset;
102
- if (len === 1) return f;
103
- var objects = new Array(len);
104
- objects[0] = ss(f);
105
- for (var index = 1; index < len; index++) objects[index] = ss(args[index]);
106
- return objects.join(" ");
107
- }
108
- if (typeof f !== "string") return f;
109
- var argLen = args.length;
110
- if (argLen === 0) return f;
111
- var str = "";
112
- var a = 1 - offset;
113
- var lastPos = -1;
114
- var flen = f && f.length || 0;
115
- for (var i = 0; i < flen;) {
116
- if (f.charCodeAt(i) === 37 && i + 1 < flen) {
117
- lastPos = lastPos > -1 ? lastPos : 0;
118
- switch (f.charCodeAt(i + 1)) {
119
- case 100:
120
- case 102:
121
- if (a >= argLen) break;
122
- if (args[a] == null) break;
123
- if (lastPos < i) str += f.slice(lastPos, i);
124
- str += Number(args[a]);
125
- lastPos = i + 2;
126
- i++;
127
- break;
128
- case 105:
129
- if (a >= argLen) break;
130
- if (args[a] == null) break;
131
- if (lastPos < i) str += f.slice(lastPos, i);
132
- str += Math.floor(Number(args[a]));
133
- lastPos = i + 2;
134
- i++;
135
- break;
136
- case 79:
137
- case 111:
138
- case 106:
139
- if (a >= argLen) break;
140
- if (args[a] === void 0) break;
141
- if (lastPos < i) str += f.slice(lastPos, i);
142
- var type = typeof args[a];
143
- if (type === "string") {
144
- str += "'" + args[a] + "'";
145
- lastPos = i + 2;
146
- i++;
147
- break;
148
- }
149
- if (type === "function") {
150
- str += args[a].name || "<anonymous>";
151
- lastPos = i + 2;
152
- i++;
153
- break;
154
- }
155
- str += ss(args[a]);
156
- lastPos = i + 2;
157
- i++;
158
- break;
159
- case 115:
160
- if (a >= argLen) break;
161
- if (lastPos < i) str += f.slice(lastPos, i);
162
- str += String(args[a]);
163
- lastPos = i + 2;
164
- i++;
165
- break;
166
- case 37:
167
- if (lastPos < i) str += f.slice(lastPos, i);
168
- str += "%";
169
- lastPos = i + 2;
170
- i++;
171
- a--;
172
- break;
173
- }
174
- ++a;
175
- }
176
- ++i;
177
- }
178
- if (lastPos === -1) return f;
179
- else if (lastPos < flen) str += f.slice(lastPos);
180
- return str;
181
- }
182
- }));
183
- var import_browser = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
184
- var format = require_quick_format_unescaped();
185
- module.exports = pino;
186
- var _console = pfGlobalThisOrFallback().console || {};
187
- var stdSerializers = {
188
- mapHttpRequest: mock,
189
- mapHttpResponse: mock,
190
- wrapRequestSerializer: passthrough,
191
- wrapResponseSerializer: passthrough,
192
- wrapErrorSerializer: passthrough,
193
- req: mock,
194
- res: mock,
195
- err: asErrValue,
196
- errWithCause: asErrValue
197
- };
198
- function levelToValue(level, logger) {
199
- return level === "silent" ? Infinity : logger.levels.values[level];
200
- }
201
- var baseLogFunctionSymbol = Symbol("pino.logFuncs");
202
- var hierarchySymbol = Symbol("pino.hierarchy");
203
- var logFallbackMap = {
204
- error: "log",
205
- fatal: "error",
206
- warn: "error",
207
- info: "log",
208
- debug: "log",
209
- trace: "log"
210
- };
211
- function appendChildLogger(parentLogger, childLogger) {
212
- childLogger[hierarchySymbol] = {
213
- logger: childLogger,
214
- parent: parentLogger[hierarchySymbol]
215
- };
216
- }
217
- function setupBaseLogFunctions(logger, levels, proto) {
218
- const logFunctions = {};
219
- levels.forEach((level) => {
220
- logFunctions[level] = proto[level] ? proto[level] : _console[level] || _console[logFallbackMap[level] || "log"] || noop;
221
- });
222
- logger[baseLogFunctionSymbol] = logFunctions;
223
- }
224
- function shouldSerialize(serialize, serializers) {
225
- if (Array.isArray(serialize)) return serialize.filter(function(k) {
226
- return k !== "!stdSerializers.err";
227
- });
228
- else if (serialize === true) return Object.keys(serializers);
229
- return false;
230
- }
231
- function pino(opts) {
232
- opts = opts || {};
233
- opts.browser = opts.browser || {};
234
- const transmit = opts.browser.transmit;
235
- if (transmit && typeof transmit.send !== "function") throw Error("pino: transmit option must have a send function");
236
- const proto = opts.browser.write || _console;
237
- if (opts.browser.write) opts.browser.asObject = true;
238
- const serializers = opts.serializers || {};
239
- const serialize = shouldSerialize(opts.browser.serialize, serializers);
240
- let stdErrSerialize = opts.browser.serialize;
241
- if (Array.isArray(opts.browser.serialize) && opts.browser.serialize.indexOf("!stdSerializers.err") > -1) stdErrSerialize = false;
242
- const customLevels = Object.keys(opts.customLevels || {});
243
- const levels = [
244
- "error",
245
- "fatal",
246
- "warn",
247
- "info",
248
- "debug",
249
- "trace"
250
- ].concat(customLevels);
251
- if (typeof proto === "function") levels.forEach(function(level) {
252
- proto[level] = proto;
253
- });
254
- if (opts.enabled === false || opts.browser.disabled) opts.level = "silent";
255
- const level = opts.level || "info";
256
- const logger = Object.create(proto);
257
- if (!logger.log) logger.log = noop;
258
- setupBaseLogFunctions(logger, levels, proto);
259
- appendChildLogger({}, logger);
260
- Object.defineProperty(logger, "levelVal", { get: getLevelVal });
261
- Object.defineProperty(logger, "level", {
262
- get: getLevel,
263
- set: setLevel
264
- });
265
- const setOpts = {
266
- transmit,
267
- serialize,
268
- asObject: opts.browser.asObject,
269
- asObjectBindingsOnly: opts.browser.asObjectBindingsOnly,
270
- formatters: opts.browser.formatters,
271
- reportCaller: opts.browser.reportCaller,
272
- levels,
273
- timestamp: getTimeFunction(opts),
274
- messageKey: opts.messageKey || "msg",
275
- onChild: opts.onChild || noop
276
- };
277
- logger.levels = getLevels(opts);
278
- logger.level = level;
279
- logger.isLevelEnabled = function(level) {
280
- if (!this.levels.values[level]) return false;
281
- return this.levels.values[level] >= this.levels.values[this.level];
282
- };
283
- logger.setMaxListeners = logger.getMaxListeners = logger.emit = logger.addListener = logger.on = logger.prependListener = logger.once = logger.prependOnceListener = logger.removeListener = logger.removeAllListeners = logger.listeners = logger.listenerCount = logger.eventNames = logger.write = logger.flush = noop;
284
- logger.serializers = serializers;
285
- logger._serialize = serialize;
286
- logger._stdErrSerialize = stdErrSerialize;
287
- logger.child = function(...args) {
288
- return child.call(this, setOpts, ...args);
289
- };
290
- if (transmit) logger._logEvent = createLogEventShape();
291
- function getLevelVal() {
292
- return levelToValue(this.level, this);
293
- }
294
- function getLevel() {
295
- return this._level;
296
- }
297
- function setLevel(level) {
298
- if (level !== "silent" && !this.levels.values[level]) throw Error("unknown level " + level);
299
- this._level = level;
300
- set(this, setOpts, logger, "error");
301
- set(this, setOpts, logger, "fatal");
302
- set(this, setOpts, logger, "warn");
303
- set(this, setOpts, logger, "info");
304
- set(this, setOpts, logger, "debug");
305
- set(this, setOpts, logger, "trace");
306
- customLevels.forEach((level) => {
307
- set(this, setOpts, logger, level);
308
- });
309
- }
310
- function child(setOpts, bindings, childOptions) {
311
- if (!bindings) throw new Error("missing bindings for child Pino");
312
- childOptions = childOptions || {};
313
- if (serialize && bindings.serializers) childOptions.serializers = bindings.serializers;
314
- const childOptionsSerializers = childOptions.serializers;
315
- if (serialize && childOptionsSerializers) {
316
- var childSerializers = Object.assign({}, serializers, childOptionsSerializers);
317
- var childSerialize = opts.browser.serialize === true ? Object.keys(childSerializers) : serialize;
318
- delete bindings.serializers;
319
- applySerializers([bindings], childSerialize, childSerializers, this._stdErrSerialize);
320
- }
321
- function Child(parent) {
322
- this._childLevel = (parent._childLevel | 0) + 1;
323
- this.bindings = bindings;
324
- if (childSerializers) {
325
- this.serializers = childSerializers;
326
- this._serialize = childSerialize;
327
- }
328
- if (transmit) this._logEvent = createLogEventShape([].concat(parent._logEvent.bindings, bindings));
329
- }
330
- Child.prototype = this;
331
- const newLogger = new Child(this);
332
- appendChildLogger(this, newLogger);
333
- newLogger.child = function(...args) {
334
- return child.call(this, setOpts, ...args);
335
- };
336
- newLogger.level = childOptions.level || this.level;
337
- setOpts.onChild(newLogger);
338
- return newLogger;
339
- }
340
- return logger;
341
- }
342
- function getLevels(opts) {
343
- const customLevels = opts.customLevels || {};
344
- return {
345
- values: Object.assign({}, pino.levels.values, customLevels),
346
- labels: Object.assign({}, pino.levels.labels, invertObject(customLevels))
347
- };
348
- }
349
- function invertObject(obj) {
350
- const inverted = {};
351
- Object.keys(obj).forEach(function(key) {
352
- inverted[obj[key]] = key;
353
- });
354
- return inverted;
355
- }
356
- pino.levels = {
357
- values: {
358
- fatal: 60,
359
- error: 50,
360
- warn: 40,
361
- info: 30,
362
- debug: 20,
363
- trace: 10
364
- },
365
- labels: {
366
- 10: "trace",
367
- 20: "debug",
368
- 30: "info",
369
- 40: "warn",
370
- 50: "error",
371
- 60: "fatal"
372
- }
373
- };
374
- pino.stdSerializers = stdSerializers;
375
- pino.stdTimeFunctions = Object.assign({}, {
376
- nullTime,
377
- epochTime,
378
- unixTime,
379
- isoTime
380
- });
381
- function getBindingChain(logger) {
382
- const bindings = [];
383
- if (logger.bindings) bindings.push(logger.bindings);
384
- let hierarchy = logger[hierarchySymbol];
385
- while (hierarchy.parent) {
386
- hierarchy = hierarchy.parent;
387
- if (hierarchy.logger.bindings) bindings.push(hierarchy.logger.bindings);
388
- }
389
- return bindings.reverse();
390
- }
391
- function set(self, opts, rootLogger, level) {
392
- Object.defineProperty(self, level, {
393
- value: levelToValue(self.level, rootLogger) > levelToValue(level, rootLogger) ? noop : rootLogger[baseLogFunctionSymbol][level],
394
- writable: true,
395
- enumerable: true,
396
- configurable: true
397
- });
398
- if (self[level] === noop) {
399
- if (!opts.transmit) return;
400
- const transmitValue = levelToValue(opts.transmit.level || self.level, rootLogger);
401
- if (levelToValue(level, rootLogger) < transmitValue) return;
402
- }
403
- self[level] = createWrap(self, opts, rootLogger, level);
404
- const bindings = getBindingChain(self);
405
- if (bindings.length === 0) return;
406
- self[level] = prependBindingsInArguments(bindings, self[level]);
407
- }
408
- function prependBindingsInArguments(bindings, logFunc) {
409
- return function() {
410
- return logFunc.apply(this, [...bindings, ...arguments]);
411
- };
412
- }
413
- function createWrap(self, opts, rootLogger, level) {
414
- return (function(write) {
415
- return function LOG() {
416
- const ts = opts.timestamp();
417
- const args = new Array(arguments.length);
418
- const proto = Object.getPrototypeOf && Object.getPrototypeOf(this) === _console ? _console : this;
419
- for (var i = 0; i < args.length; i++) args[i] = arguments[i];
420
- var argsIsSerialized = false;
421
- if (opts.serialize) {
422
- applySerializers(args, this._serialize, this.serializers, this._stdErrSerialize);
423
- argsIsSerialized = true;
424
- }
425
- if (opts.asObject || opts.formatters) {
426
- const out = asObject(this, level, args, ts, opts);
427
- if (opts.reportCaller && out && out.length > 0 && out[0] && typeof out[0] === "object") try {
428
- const caller = getCallerLocation();
429
- if (caller) out[0].caller = caller;
430
- } catch (e) {}
431
- write.call(proto, ...out);
432
- } else {
433
- if (opts.reportCaller) try {
434
- const caller = getCallerLocation();
435
- if (caller) args.push(caller);
436
- } catch (e) {}
437
- write.apply(proto, args);
438
- }
439
- if (opts.transmit) {
440
- const transmitLevel = opts.transmit.level || self._level;
441
- const transmitValue = levelToValue(transmitLevel, rootLogger);
442
- const methodValue = levelToValue(level, rootLogger);
443
- if (methodValue < transmitValue) return;
444
- transmit(this, {
445
- ts,
446
- methodLevel: level,
447
- methodValue,
448
- transmitLevel,
449
- transmitValue: rootLogger.levels.values[opts.transmit.level || self._level],
450
- send: opts.transmit.send,
451
- val: levelToValue(self._level, rootLogger)
452
- }, args, argsIsSerialized);
453
- }
454
- };
455
- })(self[baseLogFunctionSymbol][level]);
456
- }
457
- function asObject(logger, level, args, ts, opts) {
458
- const { level: levelFormatter, log: logObjectFormatter = (obj) => obj } = opts.formatters || {};
459
- const argsCloned = args.slice();
460
- let msg = argsCloned[0];
461
- const logObject = {};
462
- let lvl = (logger._childLevel | 0) + 1;
463
- if (lvl < 1) lvl = 1;
464
- if (ts) logObject.time = ts;
465
- if (levelFormatter) {
466
- const formattedLevel = levelFormatter(level, logger.levels.values[level]);
467
- Object.assign(logObject, formattedLevel);
468
- } else logObject.level = logger.levels.values[level];
469
- if (opts.asObjectBindingsOnly) {
470
- if (msg !== null && typeof msg === "object") while (lvl-- && typeof argsCloned[0] === "object") Object.assign(logObject, argsCloned.shift());
471
- return [logObjectFormatter(logObject), ...argsCloned];
472
- } else {
473
- if (msg !== null && typeof msg === "object") {
474
- while (lvl-- && typeof argsCloned[0] === "object") Object.assign(logObject, argsCloned.shift());
475
- msg = argsCloned.length ? format(argsCloned.shift(), argsCloned) : void 0;
476
- } else if (typeof msg === "string") msg = format(argsCloned.shift(), argsCloned);
477
- if (msg !== void 0) logObject[opts.messageKey] = msg;
478
- return [logObjectFormatter(logObject)];
479
- }
480
- }
481
- function applySerializers(args, serialize, serializers, stdErrSerialize) {
482
- for (const i in args) if (stdErrSerialize && args[i] instanceof Error) args[i] = pino.stdSerializers.err(args[i]);
483
- else if (typeof args[i] === "object" && !Array.isArray(args[i]) && serialize) {
484
- for (const k in args[i]) if (serialize.indexOf(k) > -1 && k in serializers) args[i][k] = serializers[k](args[i][k]);
485
- }
486
- }
487
- function transmit(logger, opts, args, argsIsSerialized = false) {
488
- const send = opts.send;
489
- const ts = opts.ts;
490
- const methodLevel = opts.methodLevel;
491
- const methodValue = opts.methodValue;
492
- const val = opts.val;
493
- const bindings = logger._logEvent.bindings;
494
- if (!argsIsSerialized) applySerializers(args, logger._serialize || Object.keys(logger.serializers), logger.serializers, logger._stdErrSerialize === void 0 ? true : logger._stdErrSerialize);
495
- logger._logEvent.ts = ts;
496
- logger._logEvent.messages = args.filter(function(arg) {
497
- return bindings.indexOf(arg) === -1;
498
- });
499
- logger._logEvent.level.label = methodLevel;
500
- logger._logEvent.level.value = methodValue;
501
- send(methodLevel, logger._logEvent, val);
502
- logger._logEvent = createLogEventShape(bindings);
503
- }
504
- function createLogEventShape(bindings) {
505
- return {
506
- ts: 0,
507
- messages: [],
508
- bindings: bindings || [],
509
- level: {
510
- label: "",
511
- value: 0
512
- }
513
- };
514
- }
515
- function asErrValue(err) {
516
- const obj = {
517
- type: err.constructor.name,
518
- msg: err.message,
519
- stack: err.stack
520
- };
521
- for (const key in err) if (obj[key] === void 0) obj[key] = err[key];
522
- return obj;
523
- }
524
- function getTimeFunction(opts) {
525
- if (typeof opts.timestamp === "function") return opts.timestamp;
526
- if (opts.timestamp === false) return nullTime;
527
- return epochTime;
528
- }
529
- function mock() {
530
- return {};
531
- }
532
- function passthrough(a) {
533
- return a;
534
- }
535
- function noop() {}
536
- function nullTime() {
537
- return false;
538
- }
539
- function epochTime() {
540
- return Date.now();
541
- }
542
- function unixTime() {
543
- return Math.round(Date.now() / 1e3);
544
- }
545
- function isoTime() {
546
- return new Date(Date.now()).toISOString();
547
- }
548
- /* istanbul ignore next */
549
- function pfGlobalThisOrFallback() {
550
- function defd(o) {
551
- return typeof o !== "undefined" && o;
552
- }
553
- try {
554
- if (typeof globalThis !== "undefined") return globalThis;
555
- Object.defineProperty(Object.prototype, "globalThis", {
556
- get: function() {
557
- delete Object.prototype.globalThis;
558
- return this.globalThis = this;
559
- },
560
- configurable: true
561
- });
562
- return globalThis;
563
- } catch (e) {
564
- return defd(self) || defd(window) || defd(this) || {};
565
- }
566
- }
567
- module.exports.default = pino;
568
- module.exports.pino = pino;
569
- /* istanbul ignore next */
570
- function getCallerLocation() {
571
- const stack = (/* @__PURE__ */ new Error()).stack;
572
- if (!stack) return null;
573
- const lines = stack.split("\n");
574
- for (let i = 1; i < lines.length; i++) {
575
- const l = lines[i].trim();
576
- if (/(^at\s+)?(createWrap|LOG|set\s*\(|asObject|Object\.apply|Function\.apply)/.test(l)) continue;
577
- if (l.indexOf("browser.js") !== -1) continue;
578
- if (l.indexOf("node:internal") !== -1) continue;
579
- if (l.indexOf("node_modules") !== -1) continue;
580
- let m = l.match(/\((.*?):(\d+):(\d+)\)/);
581
- if (!m) m = l.match(/at\s+(.*?):(\d+):(\d+)/);
582
- if (m) {
583
- const file = m[1];
584
- const line = m[2];
585
- const col = m[3];
586
- return file + ":" + line + ":" + col;
587
- }
588
- }
589
- return null;
590
- }
591
- })))(), 1);
71
+ //#endregion
72
+ //#region src/logger.ts
592
73
  /**
593
74
  * Sensitive fields to strip from logged args.
594
75
  * These are replaced with '[REDACTED]' to prevent token leakage.
@@ -632,7 +113,7 @@ function createAuditLogger(source) {
632
113
  try {
633
114
  const logPath = getAuditLogPath();
634
115
  mkdirSync(dirname(logPath), { recursive: true });
635
- logger = (0, import_browser.default)({ level: "info" }, createWriteStream(logPath, { flags: "a" }));
116
+ logger = pino({ level: "info" }, createWriteStream(logPath, { flags: "a" }));
636
117
  } catch {}
637
118
  return { log(entry) {
638
119
  try {
@@ -648,6 +129,8 @@ function createAuditLogger(source) {
648
129
  } catch {}
649
130
  } };
650
131
  }
132
+ //#endregion
133
+ //#region src/context.ts
651
134
  /**
652
135
  * Create a test executor context with a mock HTTP client.
653
136
  *
@@ -663,6 +146,8 @@ function createTestExecutorContext(overrides = {}) {
663
146
  ...overrides
664
147
  };
665
148
  }
149
+ //#endregion
150
+ //#region src/test-helpers.ts
666
151
  /**
667
152
  * Create a mock JSON:API resource.
668
153
  */
@@ -697,6 +182,8 @@ function mockListDocument(type, items) {
697
182
  }
698
183
  };
699
184
  }
185
+ //#endregion
186
+ //#region ../../node_modules/valibot/dist/index.mjs
700
187
  var store$4;
701
188
  /**
702
189
  * Returns the global configuration.
@@ -743,7 +230,9 @@ function parse(schema, input, config$1) {
743
230
  if (dataset.issues) throw new ValiError(dataset.issues);
744
231
  return dataset.value;
745
232
  }
746
- const ROUTES = {
233
+ //#endregion
234
+ //#region src/routes.ts
235
+ var ROUTES = {
747
236
  servers: {
748
237
  list: {
749
238
  method: "GET",
@@ -1211,6 +700,8 @@ async function request(route, ctx, params = {}, options) {
1211
700
  if (options?.schema) return parse(options.schema, response);
1212
701
  return response;
1213
702
  }
703
+ //#endregion
704
+ //#region src/executors/servers/create.ts
1214
705
  /**
1215
706
  * Create a new server.
1216
707
  */
@@ -1220,6 +711,8 @@ async function createServer(options, ctx) {
1220
711
  schema: jsonApiDocumentSchema(ServerAttributesSchema)
1221
712
  })) };
1222
713
  }
714
+ //#endregion
715
+ //#region src/executors/servers/delete.ts
1223
716
  /**
1224
717
  * Delete a server.
1225
718
  */
@@ -1227,18 +720,24 @@ async function deleteServer(options, ctx) {
1227
720
  await request(ROUTES.servers.delete, ctx, { server_id: options.server_id });
1228
721
  return { data: void 0 };
1229
722
  }
723
+ //#endregion
724
+ //#region src/executors/servers/get.ts
1230
725
  /**
1231
726
  * Get a specific server by ID.
1232
727
  */
1233
728
  async function getServer(options, ctx) {
1234
729
  return { data: unwrapDocument(await request(ROUTES.servers.get, ctx, { server_id: options.server_id }, { schema: jsonApiDocumentSchema(ServerAttributesSchema) })) };
1235
730
  }
731
+ //#endregion
732
+ //#region src/executors/servers/list.ts
1236
733
  /**
1237
734
  * List all servers.
1238
735
  */
1239
736
  async function listServers(_options, ctx) {
1240
737
  return { data: unwrapListDocument(await request(ROUTES.servers.list, ctx, {}, { schema: jsonApiListDocumentSchema(ServerAttributesSchema) })) };
1241
738
  }
739
+ //#endregion
740
+ //#region src/executors/servers/reboot.ts
1242
741
  /**
1243
742
  * Reboot a server.
1244
743
  */
@@ -1246,6 +745,8 @@ async function rebootServer(options, ctx) {
1246
745
  await request(ROUTES.servers.reboot, ctx, { server_id: options.server_id }, { body: { action: "reboot" } });
1247
746
  return { data: void 0 };
1248
747
  }
748
+ //#endregion
749
+ //#region src/executors/servers/resolve.ts
1249
750
  /**
1250
751
  * Resolve servers by name — partial, case-insensitive match.
1251
752
  *
@@ -1264,6 +765,8 @@ async function resolveServers(options, ctx) {
1264
765
  total: matches.length
1265
766
  } };
1266
767
  }
768
+ //#endregion
769
+ //#region src/executors/sites/create.ts
1267
770
  /**
1268
771
  * Create a new site on a server.
1269
772
  */
@@ -1274,6 +777,8 @@ async function createSite(options, ctx) {
1274
777
  schema: jsonApiDocumentSchema(SiteAttributesSchema)
1275
778
  })) };
1276
779
  }
780
+ //#endregion
781
+ //#region src/executors/sites/delete.ts
1277
782
  /**
1278
783
  * Delete a site.
1279
784
  */
@@ -1284,6 +789,8 @@ async function deleteSite(options, ctx) {
1284
789
  });
1285
790
  return { data: void 0 };
1286
791
  }
792
+ //#endregion
793
+ //#region src/executors/sites/get.ts
1287
794
  /**
1288
795
  * Get a specific site by ID.
1289
796
  *
@@ -1293,12 +800,16 @@ async function deleteSite(options, ctx) {
1293
800
  async function getSite(options, ctx) {
1294
801
  return { data: unwrapDocument(await request(ROUTES.sites.get, ctx, { site_id: options.site_id }, { schema: jsonApiDocumentSchema(SiteAttributesSchema) })) };
1295
802
  }
803
+ //#endregion
804
+ //#region src/executors/sites/list.ts
1296
805
  /**
1297
806
  * List all sites on a server.
1298
807
  */
1299
808
  async function listSites(options, ctx) {
1300
809
  return { data: unwrapListDocument(await request(ROUTES.sites.list, ctx, { server_id: options.server_id }, { schema: jsonApiListDocumentSchema(SiteAttributesSchema) })) };
1301
810
  }
811
+ //#endregion
812
+ //#region src/executors/sites/resolve.ts
1302
813
  /**
1303
814
  * Resolve sites by domain name — partial, case-insensitive match.
1304
815
  */
@@ -1314,6 +825,8 @@ async function resolveSites(options, ctx) {
1314
825
  total: matches.length
1315
826
  } };
1316
827
  }
828
+ //#endregion
829
+ //#region src/executors/sites/update.ts
1317
830
  /**
1318
831
  * Update an existing site on a server.
1319
832
  */
@@ -1327,6 +840,8 @@ async function updateSite(options, ctx) {
1327
840
  schema: jsonApiDocumentSchema(SiteAttributesSchema)
1328
841
  })) };
1329
842
  }
843
+ //#endregion
844
+ //#region src/executors/deployments/deploy.ts
1330
845
  /**
1331
846
  * Trigger a deployment for a site.
1332
847
  */
@@ -1337,6 +852,8 @@ async function deploySite(options, ctx) {
1337
852
  }, { body: {} });
1338
853
  return { data: void 0 };
1339
854
  }
855
+ //#endregion
856
+ //#region src/executors/deployments/deploy-and-wait.ts
1340
857
  /**
1341
858
  * Trigger a deployment and wait for it to complete, streaming logs in real time.
1342
859
  *
@@ -1430,6 +947,8 @@ async function deploySiteAndWait(options, ctx) {
1430
947
  elapsed_ms
1431
948
  } };
1432
949
  }
950
+ //#endregion
951
+ //#region src/executors/deployments/get-log.ts
1433
952
  /**
1434
953
  * Get the deployment log for a site.
1435
954
  */
@@ -1440,6 +959,8 @@ async function getDeploymentLog(options, ctx) {
1440
959
  id: options.deployment_id
1441
960
  }, { schema: jsonApiDocumentSchema(DeploymentOutputAttributesSchema) })).output };
1442
961
  }
962
+ //#endregion
963
+ //#region src/executors/deployments/get-script.ts
1443
964
  /**
1444
965
  * Get the deployment script for a site.
1445
966
  */
@@ -1449,6 +970,8 @@ async function getDeploymentScript(options, ctx) {
1449
970
  site_id: options.site_id
1450
971
  }, { schema: jsonApiDocumentSchema(DeploymentScriptAttributesSchema) })).content };
1451
972
  }
973
+ //#endregion
974
+ //#region src/executors/deployments/list.ts
1452
975
  /**
1453
976
  * List all deployments for a site.
1454
977
  */
@@ -1461,6 +984,8 @@ async function listDeployments(options, ctx) {
1461
984
  schema: jsonApiListDocumentSchema(DeploymentAttributesSchema)
1462
985
  })) };
1463
986
  }
987
+ //#endregion
988
+ //#region src/executors/deployments/update-script.ts
1464
989
  /**
1465
990
  * Update the deployment script for a site.
1466
991
  */
@@ -1471,6 +996,8 @@ async function updateDeploymentScript(options, ctx) {
1471
996
  }, { body: { content: options.content } });
1472
997
  return { data: void 0 };
1473
998
  }
999
+ //#endregion
1000
+ //#region src/executors/certificates/activate.ts
1474
1001
  /**
1475
1002
  * Activate the SSL certificate for a domain.
1476
1003
  */
@@ -1482,6 +1009,8 @@ async function activateCertificate(options, ctx) {
1482
1009
  }, { body: { action: "activate" } });
1483
1010
  return { data: void 0 };
1484
1011
  }
1012
+ //#endregion
1013
+ //#region src/executors/certificates/create.ts
1485
1014
  /**
1486
1015
  * Create an SSL certificate for a domain.
1487
1016
  */
@@ -1496,6 +1025,8 @@ async function createCertificate(options, ctx) {
1496
1025
  schema: jsonApiDocumentSchema(CertificateAttributesSchema)
1497
1026
  })) };
1498
1027
  }
1028
+ //#endregion
1029
+ //#region src/executors/certificates/delete.ts
1499
1030
  /**
1500
1031
  * Delete the SSL certificate for a domain.
1501
1032
  */
@@ -1507,6 +1038,8 @@ async function deleteCertificate(options, ctx) {
1507
1038
  });
1508
1039
  return { data: void 0 };
1509
1040
  }
1041
+ //#endregion
1042
+ //#region src/executors/certificates/get.ts
1510
1043
  /**
1511
1044
  * Get the SSL certificate for a domain.
1512
1045
  */
@@ -1517,6 +1050,8 @@ async function getCertificate(options, ctx) {
1517
1050
  domain_id: options.domain_id
1518
1051
  }, { schema: jsonApiDocumentSchema(CertificateAttributesSchema) })) };
1519
1052
  }
1053
+ //#endregion
1054
+ //#region src/executors/databases/create.ts
1520
1055
  /**
1521
1056
  * Create a new database.
1522
1057
  */
@@ -1527,6 +1062,8 @@ async function createDatabase(options, ctx) {
1527
1062
  schema: jsonApiDocumentSchema(DatabaseAttributesSchema)
1528
1063
  })) };
1529
1064
  }
1065
+ //#endregion
1066
+ //#region src/executors/databases/delete.ts
1530
1067
  /**
1531
1068
  * Delete a database.
1532
1069
  */
@@ -1537,6 +1074,8 @@ async function deleteDatabase(options, ctx) {
1537
1074
  });
1538
1075
  return { data: void 0 };
1539
1076
  }
1077
+ //#endregion
1078
+ //#region src/executors/databases/get.ts
1540
1079
  /**
1541
1080
  * Get a single database.
1542
1081
  */
@@ -1546,12 +1085,16 @@ async function getDatabase(options, ctx) {
1546
1085
  id: options.id
1547
1086
  }, { schema: jsonApiDocumentSchema(DatabaseAttributesSchema) })) };
1548
1087
  }
1088
+ //#endregion
1089
+ //#region src/executors/databases/list.ts
1549
1090
  /**
1550
1091
  * List databases on a server.
1551
1092
  */
1552
1093
  async function listDatabases(options, ctx) {
1553
1094
  return { data: unwrapListDocument(await request(ROUTES.databases.list, ctx, { server_id: options.server_id }, { schema: jsonApiListDocumentSchema(DatabaseAttributesSchema) })) };
1554
1095
  }
1096
+ //#endregion
1097
+ //#region src/executors/database-users/create.ts
1555
1098
  /**
1556
1099
  * Create a new database user.
1557
1100
  */
@@ -1562,6 +1105,8 @@ async function createDatabaseUser(options, ctx) {
1562
1105
  schema: jsonApiDocumentSchema(DatabaseUserAttributesSchema)
1563
1106
  })) };
1564
1107
  }
1108
+ //#endregion
1109
+ //#region src/executors/database-users/delete.ts
1565
1110
  /**
1566
1111
  * Delete a database user.
1567
1112
  */
@@ -1572,6 +1117,8 @@ async function deleteDatabaseUser(options, ctx) {
1572
1117
  });
1573
1118
  return { data: void 0 };
1574
1119
  }
1120
+ //#endregion
1121
+ //#region src/executors/database-users/get.ts
1575
1122
  /**
1576
1123
  * Get a single database user.
1577
1124
  */
@@ -1581,12 +1128,16 @@ async function getDatabaseUser(options, ctx) {
1581
1128
  id: options.id
1582
1129
  }, { schema: jsonApiDocumentSchema(DatabaseUserAttributesSchema) })) };
1583
1130
  }
1131
+ //#endregion
1132
+ //#region src/executors/database-users/list.ts
1584
1133
  /**
1585
1134
  * List database users on a server.
1586
1135
  */
1587
1136
  async function listDatabaseUsers(options, ctx) {
1588
1137
  return { data: unwrapListDocument(await request(ROUTES.databaseUsers.list, ctx, { server_id: options.server_id }, { schema: jsonApiListDocumentSchema(DatabaseUserAttributesSchema) })) };
1589
1138
  }
1139
+ //#endregion
1140
+ //#region src/executors/database-users/update.ts
1590
1141
  /**
1591
1142
  * Update an existing database user.
1592
1143
  */
@@ -1600,6 +1151,8 @@ async function updateDatabaseUser(options, ctx) {
1600
1151
  schema: jsonApiDocumentSchema(DatabaseUserAttributesSchema)
1601
1152
  })) };
1602
1153
  }
1154
+ //#endregion
1155
+ //#region src/executors/daemons/create.ts
1603
1156
  /**
1604
1157
  * Create a new daemon.
1605
1158
  */
@@ -1610,6 +1163,8 @@ async function createDaemon(options, ctx) {
1610
1163
  schema: jsonApiDocumentSchema(BackgroundProcessAttributesSchema)
1611
1164
  })) };
1612
1165
  }
1166
+ //#endregion
1167
+ //#region src/executors/daemons/delete.ts
1613
1168
  /**
1614
1169
  * Delete a daemon.
1615
1170
  */
@@ -1620,6 +1175,8 @@ async function deleteDaemon(options, ctx) {
1620
1175
  });
1621
1176
  return { data: void 0 };
1622
1177
  }
1178
+ //#endregion
1179
+ //#region src/executors/daemons/get.ts
1623
1180
  /**
1624
1181
  * Get a single daemon.
1625
1182
  */
@@ -1629,12 +1186,16 @@ async function getDaemon(options, ctx) {
1629
1186
  id: options.id
1630
1187
  }, { schema: jsonApiDocumentSchema(BackgroundProcessAttributesSchema) })) };
1631
1188
  }
1189
+ //#endregion
1190
+ //#region src/executors/daemons/list.ts
1632
1191
  /**
1633
1192
  * List daemons on a server.
1634
1193
  */
1635
1194
  async function listDaemons(options, ctx) {
1636
1195
  return { data: unwrapListDocument(await request(ROUTES.daemons.list, ctx, { server_id: options.server_id }, { schema: jsonApiListDocumentSchema(BackgroundProcessAttributesSchema) })) };
1637
1196
  }
1197
+ //#endregion
1198
+ //#region src/executors/daemons/restart.ts
1638
1199
  /**
1639
1200
  * Restart a daemon.
1640
1201
  */
@@ -1645,6 +1206,8 @@ async function restartDaemon(options, ctx) {
1645
1206
  }, { body: { action: "restart" } });
1646
1207
  return { data: void 0 };
1647
1208
  }
1209
+ //#endregion
1210
+ //#region src/executors/daemons/update.ts
1648
1211
  /**
1649
1212
  * Update an existing daemon.
1650
1213
  */
@@ -1658,6 +1221,8 @@ async function updateDaemon(options, ctx) {
1658
1221
  schema: jsonApiDocumentSchema(BackgroundProcessAttributesSchema)
1659
1222
  })) };
1660
1223
  }
1224
+ //#endregion
1225
+ //#region src/executors/firewall-rules/create.ts
1661
1226
  /**
1662
1227
  * Create a firewall rule.
1663
1228
  */
@@ -1666,6 +1231,8 @@ async function createFirewallRule(options, ctx) {
1666
1231
  await request(ROUTES.firewallRules.create, ctx, { server_id }, { body: data });
1667
1232
  return { data: void 0 };
1668
1233
  }
1234
+ //#endregion
1235
+ //#region src/executors/firewall-rules/delete.ts
1669
1236
  /**
1670
1237
  * Delete a firewall rule.
1671
1238
  */
@@ -1676,6 +1243,8 @@ async function deleteFirewallRule(options, ctx) {
1676
1243
  });
1677
1244
  return { data: void 0 };
1678
1245
  }
1246
+ //#endregion
1247
+ //#region src/executors/firewall-rules/get.ts
1679
1248
  /**
1680
1249
  * Get a single firewall rule.
1681
1250
  */
@@ -1685,12 +1254,16 @@ async function getFirewallRule(options, ctx) {
1685
1254
  id: options.id
1686
1255
  }, { schema: jsonApiDocumentSchema(FirewallRuleAttributesSchema) })) };
1687
1256
  }
1257
+ //#endregion
1258
+ //#region src/executors/firewall-rules/list.ts
1688
1259
  /**
1689
1260
  * List firewall rules on a server.
1690
1261
  */
1691
1262
  async function listFirewallRules(options, ctx) {
1692
1263
  return { data: unwrapListDocument(await request(ROUTES.firewallRules.list, ctx, { server_id: options.server_id }, { schema: jsonApiListDocumentSchema(FirewallRuleAttributesSchema) })) };
1693
1264
  }
1265
+ //#endregion
1266
+ //#region src/executors/ssh-keys/create.ts
1694
1267
  /**
1695
1268
  * Create an SSH key.
1696
1269
  */
@@ -1699,6 +1272,8 @@ async function createSshKey(options, ctx) {
1699
1272
  await request(ROUTES.sshKeys.create, ctx, { server_id }, { body: data });
1700
1273
  return { data: void 0 };
1701
1274
  }
1275
+ //#endregion
1276
+ //#region src/executors/ssh-keys/delete.ts
1702
1277
  /**
1703
1278
  * Delete an SSH key.
1704
1279
  */
@@ -1709,6 +1284,8 @@ async function deleteSshKey(options, ctx) {
1709
1284
  });
1710
1285
  return { data: void 0 };
1711
1286
  }
1287
+ //#endregion
1288
+ //#region src/executors/ssh-keys/get.ts
1712
1289
  /**
1713
1290
  * Get a single SSH key.
1714
1291
  */
@@ -1718,12 +1295,16 @@ async function getSshKey(options, ctx) {
1718
1295
  id: options.id
1719
1296
  }, { schema: jsonApiDocumentSchema(SshKeyAttributesSchema) })) };
1720
1297
  }
1298
+ //#endregion
1299
+ //#region src/executors/ssh-keys/list.ts
1721
1300
  /**
1722
1301
  * List SSH keys on a server.
1723
1302
  */
1724
1303
  async function listSshKeys(options, ctx) {
1725
1304
  return { data: unwrapListDocument(await request(ROUTES.sshKeys.list, ctx, { server_id: options.server_id }, { schema: jsonApiListDocumentSchema(SshKeyAttributesSchema) })) };
1726
1305
  }
1306
+ //#endregion
1307
+ //#region src/executors/security-rules/create.ts
1727
1308
  /**
1728
1309
  * Create a security rule.
1729
1310
  */
@@ -1737,6 +1318,8 @@ async function createSecurityRule(options, ctx) {
1737
1318
  schema: jsonApiDocumentSchema(SecurityRuleAttributesSchema)
1738
1319
  })) };
1739
1320
  }
1321
+ //#endregion
1322
+ //#region src/executors/security-rules/delete.ts
1740
1323
  /**
1741
1324
  * Delete a security rule.
1742
1325
  */
@@ -1748,6 +1331,8 @@ async function deleteSecurityRule(options, ctx) {
1748
1331
  });
1749
1332
  return { data: void 0 };
1750
1333
  }
1334
+ //#endregion
1335
+ //#region src/executors/security-rules/get.ts
1751
1336
  /**
1752
1337
  * Get a single security rule.
1753
1338
  */
@@ -1758,6 +1343,8 @@ async function getSecurityRule(options, ctx) {
1758
1343
  id: options.id
1759
1344
  }, { schema: jsonApiDocumentSchema(SecurityRuleAttributesSchema) })) };
1760
1345
  }
1346
+ //#endregion
1347
+ //#region src/executors/security-rules/list.ts
1761
1348
  /**
1762
1349
  * List security rules for a site.
1763
1350
  */
@@ -1767,6 +1354,8 @@ async function listSecurityRules(options, ctx) {
1767
1354
  site_id: options.site_id
1768
1355
  }, { schema: jsonApiListDocumentSchema(SecurityRuleAttributesSchema) })) };
1769
1356
  }
1357
+ //#endregion
1358
+ //#region src/executors/security-rules/update.ts
1770
1359
  /**
1771
1360
  * Update a security rule.
1772
1361
  */
@@ -1781,6 +1370,8 @@ async function updateSecurityRule(options, ctx) {
1781
1370
  schema: jsonApiDocumentSchema(SecurityRuleAttributesSchema)
1782
1371
  })) };
1783
1372
  }
1373
+ //#endregion
1374
+ //#region src/executors/redirect-rules/create.ts
1784
1375
  /**
1785
1376
  * Create a redirect rule.
1786
1377
  */
@@ -1792,6 +1383,8 @@ async function createRedirectRule(options, ctx) {
1792
1383
  }, { body: data });
1793
1384
  return { data: void 0 };
1794
1385
  }
1386
+ //#endregion
1387
+ //#region src/executors/redirect-rules/delete.ts
1795
1388
  /**
1796
1389
  * Delete a redirect rule.
1797
1390
  */
@@ -1803,6 +1396,8 @@ async function deleteRedirectRule(options, ctx) {
1803
1396
  });
1804
1397
  return { data: void 0 };
1805
1398
  }
1399
+ //#endregion
1400
+ //#region src/executors/redirect-rules/get.ts
1806
1401
  /**
1807
1402
  * Get a single redirect rule.
1808
1403
  */
@@ -1813,6 +1408,8 @@ async function getRedirectRule(options, ctx) {
1813
1408
  id: options.id
1814
1409
  }, { schema: jsonApiDocumentSchema(RedirectRuleAttributesSchema) })) };
1815
1410
  }
1411
+ //#endregion
1412
+ //#region src/executors/redirect-rules/list.ts
1816
1413
  /**
1817
1414
  * List redirect rules for a site.
1818
1415
  */
@@ -1822,6 +1419,8 @@ async function listRedirectRules(options, ctx) {
1822
1419
  site_id: options.site_id
1823
1420
  }, { schema: jsonApiListDocumentSchema(RedirectRuleAttributesSchema) })) };
1824
1421
  }
1422
+ //#endregion
1423
+ //#region src/executors/monitors/create.ts
1825
1424
  /**
1826
1425
  * Create a monitor.
1827
1426
  */
@@ -1832,6 +1431,8 @@ async function createMonitor(options, ctx) {
1832
1431
  schema: jsonApiDocumentSchema(MonitorAttributesSchema)
1833
1432
  })) };
1834
1433
  }
1434
+ //#endregion
1435
+ //#region src/executors/monitors/delete.ts
1835
1436
  /**
1836
1437
  * Delete a monitor.
1837
1438
  */
@@ -1842,6 +1443,8 @@ async function deleteMonitor(options, ctx) {
1842
1443
  });
1843
1444
  return { data: void 0 };
1844
1445
  }
1446
+ //#endregion
1447
+ //#region src/executors/monitors/get.ts
1845
1448
  /**
1846
1449
  * Get a single monitor.
1847
1450
  */
@@ -1851,12 +1454,16 @@ async function getMonitor(options, ctx) {
1851
1454
  id: options.id
1852
1455
  }, { schema: jsonApiDocumentSchema(MonitorAttributesSchema) })) };
1853
1456
  }
1457
+ //#endregion
1458
+ //#region src/executors/monitors/list.ts
1854
1459
  /**
1855
1460
  * List monitors on a server.
1856
1461
  */
1857
1462
  async function listMonitors(options, ctx) {
1858
1463
  return { data: unwrapListDocument(await request(ROUTES.monitors.list, ctx, { server_id: options.server_id }, { schema: jsonApiListDocumentSchema(MonitorAttributesSchema) })) };
1859
1464
  }
1465
+ //#endregion
1466
+ //#region src/executors/nginx-templates/create.ts
1860
1467
  /**
1861
1468
  * Create a Nginx template.
1862
1469
  */
@@ -1867,6 +1474,8 @@ async function createNginxTemplate(options, ctx) {
1867
1474
  schema: jsonApiDocumentSchema(NginxTemplateAttributesSchema)
1868
1475
  })) };
1869
1476
  }
1477
+ //#endregion
1478
+ //#region src/executors/nginx-templates/delete.ts
1870
1479
  /**
1871
1480
  * Delete a Nginx template.
1872
1481
  */
@@ -1877,6 +1486,8 @@ async function deleteNginxTemplate(options, ctx) {
1877
1486
  });
1878
1487
  return { data: void 0 };
1879
1488
  }
1489
+ //#endregion
1490
+ //#region src/executors/nginx-templates/get.ts
1880
1491
  /**
1881
1492
  * Get a single Nginx template.
1882
1493
  */
@@ -1886,12 +1497,16 @@ async function getNginxTemplate(options, ctx) {
1886
1497
  id: options.id
1887
1498
  }, { schema: jsonApiDocumentSchema(NginxTemplateAttributesSchema) })) };
1888
1499
  }
1500
+ //#endregion
1501
+ //#region src/executors/nginx-templates/list.ts
1889
1502
  /**
1890
1503
  * List Nginx templates on a server.
1891
1504
  */
1892
1505
  async function listNginxTemplates(options, ctx) {
1893
1506
  return { data: unwrapListDocument(await request(ROUTES.nginxTemplates.list, ctx, { server_id: options.server_id }, { schema: jsonApiListDocumentSchema(NginxTemplateAttributesSchema) })) };
1894
1507
  }
1508
+ //#endregion
1509
+ //#region src/executors/nginx-templates/update.ts
1895
1510
  /**
1896
1511
  * Update a Nginx template.
1897
1512
  */
@@ -1905,6 +1520,8 @@ async function updateNginxTemplate(options, ctx) {
1905
1520
  schema: jsonApiDocumentSchema(NginxTemplateAttributesSchema)
1906
1521
  })) };
1907
1522
  }
1523
+ //#endregion
1524
+ //#region src/executors/env/get.ts
1908
1525
  /**
1909
1526
  * Get environment variables for a site.
1910
1527
  */
@@ -1914,6 +1531,8 @@ async function getEnv(options, ctx) {
1914
1531
  site_id: options.site_id
1915
1532
  }, { schema: jsonApiDocumentSchema(EnvironmentAttributesSchema) })).content };
1916
1533
  }
1534
+ //#endregion
1535
+ //#region src/executors/env/update.ts
1917
1536
  /**
1918
1537
  * Update environment variables for a site.
1919
1538
  */
@@ -1924,6 +1543,8 @@ async function updateEnv(options, ctx) {
1924
1543
  }, { body: { content: options.content } });
1925
1544
  return { data: void 0 };
1926
1545
  }
1546
+ //#endregion
1547
+ //#region src/executors/nginx/get.ts
1927
1548
  /**
1928
1549
  * Get Nginx configuration for a site.
1929
1550
  */
@@ -1933,6 +1554,8 @@ async function getNginxConfig(options, ctx) {
1933
1554
  site_id: options.site_id
1934
1555
  }, { schema: jsonApiDocumentSchema(EnvironmentAttributesSchema) })).content };
1935
1556
  }
1557
+ //#endregion
1558
+ //#region src/executors/nginx/update.ts
1936
1559
  /**
1937
1560
  * Update Nginx configuration for a site.
1938
1561
  */
@@ -1943,6 +1566,8 @@ async function updateNginxConfig(options, ctx) {
1943
1566
  }, { body: { content: options.content } });
1944
1567
  return { data: void 0 };
1945
1568
  }
1569
+ //#endregion
1570
+ //#region src/executors/recipes/create.ts
1946
1571
  /**
1947
1572
  * Create a recipe.
1948
1573
  */
@@ -1952,6 +1577,8 @@ async function createRecipe(options, ctx) {
1952
1577
  schema: jsonApiDocumentSchema(RecipeAttributesSchema)
1953
1578
  })) };
1954
1579
  }
1580
+ //#endregion
1581
+ //#region src/executors/recipes/delete.ts
1955
1582
  /**
1956
1583
  * Delete a recipe.
1957
1584
  */
@@ -1959,18 +1586,24 @@ async function deleteRecipe(options, ctx) {
1959
1586
  await request(ROUTES.recipes.delete, ctx, { id: options.id });
1960
1587
  return { data: void 0 };
1961
1588
  }
1589
+ //#endregion
1590
+ //#region src/executors/recipes/get.ts
1962
1591
  /**
1963
1592
  * Get a single recipe.
1964
1593
  */
1965
1594
  async function getRecipe(options, ctx) {
1966
1595
  return { data: unwrapDocument(await request(ROUTES.recipes.get, ctx, { id: options.id }, { schema: jsonApiDocumentSchema(RecipeAttributesSchema) })) };
1967
1596
  }
1597
+ //#endregion
1598
+ //#region src/executors/recipes/list.ts
1968
1599
  /**
1969
1600
  * List all recipes.
1970
1601
  */
1971
1602
  async function listRecipes(_options, ctx) {
1972
1603
  return { data: unwrapListDocument(await request(ROUTES.recipes.list, ctx, {}, { schema: jsonApiListDocumentSchema(RecipeAttributesSchema) })) };
1973
1604
  }
1605
+ //#endregion
1606
+ //#region src/executors/recipes/run.ts
1974
1607
  /**
1975
1608
  * Run a recipe on specified servers.
1976
1609
  */
@@ -1978,6 +1611,8 @@ async function runRecipe(options, ctx) {
1978
1611
  await request(ROUTES.recipes.run, ctx, { id: options.id }, { body: { servers: options.servers } });
1979
1612
  return { data: void 0 };
1980
1613
  }
1614
+ //#endregion
1615
+ //#region src/executors/recipes/update.ts
1981
1616
  /**
1982
1617
  * Update a recipe.
1983
1618
  */
@@ -1988,6 +1623,8 @@ async function updateRecipe(options, ctx) {
1988
1623
  schema: jsonApiDocumentSchema(RecipeAttributesSchema)
1989
1624
  })) };
1990
1625
  }
1626
+ //#endregion
1627
+ //#region src/executors/backups/create.ts
1991
1628
  /**
1992
1629
  * Create a backup configuration.
1993
1630
  */
@@ -1996,6 +1633,8 @@ async function createBackupConfig(options, ctx) {
1996
1633
  await request(ROUTES.backups.create, ctx, { server_id }, { body: data });
1997
1634
  return { data: void 0 };
1998
1635
  }
1636
+ //#endregion
1637
+ //#region src/executors/backups/delete.ts
1999
1638
  /**
2000
1639
  * Delete a backup configuration.
2001
1640
  */
@@ -2006,6 +1645,8 @@ async function deleteBackupConfig(options, ctx) {
2006
1645
  });
2007
1646
  return { data: void 0 };
2008
1647
  }
1648
+ //#endregion
1649
+ //#region src/executors/backups/update.ts
2009
1650
  /**
2010
1651
  * Update a backup configuration.
2011
1652
  */
@@ -2017,6 +1658,8 @@ async function updateBackupConfig(options, ctx) {
2017
1658
  }, { body: data });
2018
1659
  return { data: void 0 };
2019
1660
  }
1661
+ //#endregion
1662
+ //#region src/executors/backups/get.ts
2020
1663
  /**
2021
1664
  * Get a single backup configuration.
2022
1665
  */
@@ -2026,12 +1669,16 @@ async function getBackupConfig(options, ctx) {
2026
1669
  id: options.id
2027
1670
  }, { schema: jsonApiDocumentSchema(BackupConfigAttributesSchema) })) };
2028
1671
  }
1672
+ //#endregion
1673
+ //#region src/executors/backups/list.ts
2029
1674
  /**
2030
1675
  * List backup configurations for a server.
2031
1676
  */
2032
1677
  async function listBackupConfigs(options, ctx) {
2033
1678
  return { data: unwrapListDocument(await request(ROUTES.backups.list, ctx, { server_id: options.server_id }, { schema: jsonApiListDocumentSchema(BackupConfigAttributesSchema) })) };
2034
1679
  }
1680
+ //#endregion
1681
+ //#region src/executors/commands/create.ts
2035
1682
  /**
2036
1683
  * Execute a command on a site.
2037
1684
  */
@@ -2042,6 +1689,8 @@ async function createCommand(options, ctx) {
2042
1689
  }, { body: { command: options.command } });
2043
1690
  return { data: void 0 };
2044
1691
  }
1692
+ //#endregion
1693
+ //#region src/executors/commands/get.ts
2045
1694
  /**
2046
1695
  * Get a specific command.
2047
1696
  */
@@ -2052,6 +1701,8 @@ async function getCommand(options, ctx) {
2052
1701
  id: options.id
2053
1702
  }, { schema: jsonApiDocumentSchema(CommandAttributesSchema) })) };
2054
1703
  }
1704
+ //#endregion
1705
+ //#region src/executors/commands/list.ts
2055
1706
  /**
2056
1707
  * List commands executed on a site.
2057
1708
  */
@@ -2061,6 +1712,8 @@ async function listCommands(options, ctx) {
2061
1712
  site_id: options.site_id
2062
1713
  }, { schema: jsonApiListDocumentSchema(CommandAttributesSchema) })) };
2063
1714
  }
1715
+ //#endregion
1716
+ //#region src/executors/scheduled-jobs/create.ts
2064
1717
  /**
2065
1718
  * Create a scheduled job.
2066
1719
  */
@@ -2074,6 +1727,8 @@ async function createScheduledJob(options, ctx) {
2074
1727
  schema: jsonApiDocumentSchema(ScheduledJobAttributesSchema)
2075
1728
  })) };
2076
1729
  }
1730
+ //#endregion
1731
+ //#region src/executors/scheduled-jobs/delete.ts
2077
1732
  /**
2078
1733
  * Delete a scheduled job.
2079
1734
  */
@@ -2087,6 +1742,8 @@ async function deleteScheduledJob(options, ctx) {
2087
1742
  await request(route, ctx, params);
2088
1743
  return { data: void 0 };
2089
1744
  }
1745
+ //#endregion
1746
+ //#region src/executors/scheduled-jobs/get.ts
2090
1747
  /**
2091
1748
  * Get a specific scheduled job.
2092
1749
  */
@@ -2099,6 +1756,8 @@ async function getScheduledJob(options, ctx) {
2099
1756
  if (options.site_id) params.site_id = options.site_id;
2100
1757
  return { data: unwrapDocument(await request(route, ctx, params, { schema: jsonApiDocumentSchema(ScheduledJobAttributesSchema) })) };
2101
1758
  }
1759
+ //#endregion
1760
+ //#region src/executors/scheduled-jobs/list.ts
2102
1761
  /**
2103
1762
  * List scheduled jobs on a server.
2104
1763
  */
@@ -2108,12 +1767,15 @@ async function listScheduledJobs(options, ctx) {
2108
1767
  if (options.site_id) params.site_id = options.site_id;
2109
1768
  return { data: unwrapListDocument(await request(route, ctx, params, { schema: jsonApiListDocumentSchema(ScheduledJobAttributesSchema) })) };
2110
1769
  }
1770
+ //#endregion
1771
+ //#region src/executors/user/get.ts
2111
1772
  /**
2112
1773
  * Get the currently authenticated user.
2113
1774
  */
2114
1775
  async function getUser(_options, ctx) {
2115
1776
  return { data: unwrapDocument(await request(ROUTES.user.get, ctx, {}, { schema: jsonApiDocumentSchema(UserAttributesSchema) })) };
2116
1777
  }
1778
+ //#endregion
2117
1779
  export { ACTIONS, RESOURCES, activateCertificate, createAuditLogger, createBackupConfig, createCertificate, createCommand, createDaemon, createDatabase, createDatabaseUser, createFirewallRule, createMonitor, createNginxTemplate, createRecipe, createRedirectRule, createScheduledJob, createSecurityRule, createServer, createSite, createSshKey, createTestExecutorContext, deleteBackupConfig, deleteCertificate, deleteDaemon, deleteDatabase, deleteDatabaseUser, deleteFirewallRule, deleteMonitor, deleteNginxTemplate, deleteRecipe, deleteRedirectRule, deleteScheduledJob, deleteSecurityRule, deleteServer, deleteSite, deleteSshKey, deploySite, deploySiteAndWait, getAuditLogPath, getBackupConfig, getCertificate, getCommand, getDaemon, getDatabase, getDatabaseUser, getDeploymentLog, getDeploymentScript, getEnv, getFirewallRule, getMonitor, getNginxConfig, getNginxTemplate, getRecipe, getRedirectRule, getScheduledJob, getSecurityRule, getServer, getSite, getSshKey, getUser, listBackupConfigs, listCommands, listDaemons, listDatabaseUsers, listDatabases, listDeployments, listFirewallRules, listMonitors, listNginxTemplates, listRecipes, listRedirectRules, listScheduledJobs, listSecurityRules, listServers, listSites, listSshKeys, matchByName, mockDocument, mockListDocument, mockResource, rebootServer, resolveServers, resolveSites, restartDaemon, runRecipe, sanitizeArgs, updateBackupConfig, updateDaemon, updateDatabaseUser, updateDeploymentScript, updateEnv, updateNginxConfig, updateNginxTemplate, updateRecipe, updateSecurityRule, updateSite };
2118
1780
 
2119
1781
  //# sourceMappingURL=index.js.map