@aibexhq/aibex-link 0.0.5 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -101,7 +101,13 @@ const TYPES = /* @__PURE__ */ new Set([
101
101
  "host",
102
102
  "shutdown"
103
103
  ]);
104
- const SIGNALS = /* @__PURE__ */ new Set(["SIGHUP", "SIGINT", "SIGQUIT", "SIGTERM", "SIGKILL"]);
104
+ const TERMINAL_SIGNALS = /* @__PURE__ */ new Set([
105
+ "SIGHUP",
106
+ "SIGINT",
107
+ "SIGQUIT",
108
+ "SIGTERM",
109
+ "SIGKILL"
110
+ ]);
105
111
  const TERMINAL_ID = /^term_[a-z2-7]{16}$/u;
106
112
  const BASE64 = /^[A-Za-z0-9+/]*={0,2}$/u;
107
113
  class RequestError extends Error {
@@ -352,10 +358,10 @@ function parseFields(id, type, fields) {
352
358
  case "kill": {
353
359
  const terminal = fields.terminal(true);
354
360
  const signal = fields.string("signal", false) ?? TERMINAL_DEFAULTS.signal;
355
- if (!SIGNALS.has(signal)) {
361
+ if (!TERMINAL_SIGNALS.has(signal)) {
356
362
  throw new RequestError(
357
363
  "bad-request",
358
- `signal must be one of ${[...SIGNALS].join(", ")}`
364
+ `signal must be one of ${[...TERMINAL_SIGNALS].join(", ")}`
359
365
  );
360
366
  }
361
367
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aibexhq/aibex-link",
3
- "version": "0.0.5",
3
+ "version": "0.0.7",
4
4
  "description": "The process aibexd runs to link a machine to an Aibex herd",
5
5
  "homepage": "https://github.com/aibexhq",
6
6
  "bugs": {