ignitify 1.2.0 → 1.2.1

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/ignitify.cjs CHANGED
@@ -942,10 +942,25 @@ function bareValueFlag(args, valueFlags2) {
942
942
  function needsValueMessage(flag) {
943
943
  return `--${flag} needs a value`;
944
944
  }
945
+ function strOpt(args, key) {
946
+ let bare = bareValueFlag(args, [key]);
947
+ if (bare !== void 0) throw new Error(needsValueMessage(bare));
948
+ let v = args.options[key];
949
+ return typeof v == "string" ? v : void 0;
950
+ }
951
+ function flagParams(args, map2) {
952
+ return Object.fromEntries(Object.entries(map2).flatMap(([flag, param]) => {
953
+ let v = strOpt(args, flag);
954
+ return v === void 0 ? [] : [[param, v]];
955
+ }));
956
+ }
945
957
  var init_args = __esm({ "../../packages/http-client/args.ts"() {
946
958
  "use strict";
947
959
  init_define_IGNITIFY_CLIENT_FILES();
948
960
  } });
961
+ function boolFlagSpec(flags) {
962
+ return { boolFlags: new Set(Object.keys(flags).filter((flag) => flags[flag] === "bool")) };
963
+ }
949
964
  function unknownFlagText(flag, command) {
950
965
  return `unknown flag ${flag} for ${command}`;
951
966
  }
@@ -978,13 +993,49 @@ function shapeRefusal(command, args, flags, maxPositionals) {
978
993
  function isHelpRequest(args) {
979
994
  return HELP_TOKENS.includes(args.command) || args.options.help === true;
980
995
  }
981
- var didYouMean, itsFlags, flagTakesNoValue, tooManyArgs, HELP_TOKENS, init_invocation = __esm({ "../../packages/http-client/invocation.ts"() {
996
+ var looksShort, didYouMean, itsFlags, flagTakesNoValue, tooManyArgs, HELP_TOKENS, init_invocation = __esm({ "../../packages/http-client/invocation.ts"() {
982
997
  "use strict";
983
998
  init_define_IGNITIFY_CLIENT_FILES();
984
999
  init_args();
1000
+ looksShort = (tok) => tok.length > 1 && tok.startsWith("-") && !tok.startsWith("--");
985
1001
  didYouMean = (flag) => `Did you mean --${flag}?`, itsFlags = (own, global) => `Its flags: ${own.length === 0 ? "(none)" : own.map((f) => `--${f}`).join(" ")}. Global: ${global.map((f) => `--${f}`).join(" ")}.`, flagTakesNoValue = (flag) => `--${flag} takes no value`, tooManyArgs = (command, max, extra, got) => `${command} takes ${max} argument${max === 1 ? "" : "s"}; got ${got} (${extra.map((e) => JSON.stringify(e)).join(", ")} ${extra.length === 1 ? "is" : "are"} extra)`;
986
1002
  HELP_TOKENS = ["", "help", "--help", "-h"];
987
1003
  } });
1004
+ function isLoopbackHost(hostname) {
1005
+ return hostname === "localhost" || hostname === "[::1]" || /^127(?:\.\d{1,3}){3}$/.test(hostname);
1006
+ }
1007
+ function keyUrlRefusal(url) {
1008
+ let u;
1009
+ try {
1010
+ u = new URL(url);
1011
+ } catch {
1012
+ return "not-url";
1013
+ }
1014
+ return u.protocol === "https:" || u.protocol === "http:" && isLoopbackHost(u.hostname) ? null : "insecure";
1015
+ }
1016
+ var init_key_url = __esm({ "../../packages/http-client/key-url.ts"() {
1017
+ "use strict";
1018
+ init_define_IGNITIFY_CLIENT_FILES();
1019
+ } });
1020
+ function scale(n, units) {
1021
+ let step = (v, i) => v >= 1024 && i < units.length - 1 ? step(v / 1024, i + 1) : i === 0 ? `${n} ${units[0]}` : `${v.toFixed(1)} ${units[i]}`;
1022
+ return step(n, 0);
1023
+ }
1024
+ function duration(ms) {
1025
+ if (ms < 1e3) return `${ms} ms`;
1026
+ let s = Math.round(ms / 1e3);
1027
+ if (s < 60) return `${s} s`;
1028
+ let m = Math.floor(s / 60);
1029
+ return m < 60 ? `${m}m ${s % 60}s` : `${Math.floor(m / 60)}h ${m % 60}m`;
1030
+ }
1031
+ function formatUsageQuantity(n, unit) {
1032
+ return unit === "bytes" ? scale(n, BYTE_UNITS) : unit === "ms" ? duration(n) : unit === "byte-hours" ? scale(n, BYTE_HOUR_UNITS) : `${n}`;
1033
+ }
1034
+ var BYTE_UNITS, BYTE_HOUR_UNITS, init_usage_format = __esm({ "../../packages/http-client/usage-format.ts"() {
1035
+ "use strict";
1036
+ init_define_IGNITIFY_CLIENT_FILES();
1037
+ BYTE_UNITS = ["B", "KiB", "MiB", "GiB", "TiB"], BYTE_HOUR_UNITS = ["B\xB7h", "KiB\xB7h", "MiB\xB7h", "GiB\xB7h", "TiB\xB7h", "PiB\xB7h"];
1038
+ } });
988
1039
  function csvRow(values) {
989
1040
  return values.map((v) => `"${v.replace(/"/g, '""')}"`).join(",");
990
1041
  }
@@ -1027,6 +1078,16 @@ var PAGE_CURSOR_FLAG, PAGE_FLAG_PARAMS, init_page = __esm({ "../../packages/http
1027
1078
  init_define_IGNITIFY_CLIENT_FILES();
1028
1079
  PAGE_CURSOR_FLAG = "after-id", PAGE_FLAG_PARAMS = { limit: "limit", after: "after", "after-id": "after_id" };
1029
1080
  } });
1081
+ function httpErrorJson(e) {
1082
+ if (!(e instanceof HttpError)) return null;
1083
+ let body;
1084
+ try {
1085
+ body = JSON.parse(e.body);
1086
+ } catch {
1087
+ return null;
1088
+ }
1089
+ return typeof body != "object" || body === null || Array.isArray(body) ? null : { status: e.status, body };
1090
+ }
1030
1091
  async function parseJson(res) {
1031
1092
  let text = await res.text();
1032
1093
  if (!res.ok) throw new HttpError(res.status, text, res.statusText, res.headers.get(TRACE_HEADER));
@@ -1052,6 +1113,8 @@ var DEFAULT_REQUEST_TIMEOUT_MS, TRACE_HEADER, HttpError, init_http_client = __es
1052
1113
  init_define_IGNITIFY_CLIENT_FILES();
1053
1114
  init_args();
1054
1115
  init_invocation();
1116
+ init_key_url();
1117
+ init_usage_format();
1055
1118
  init_csv();
1056
1119
  init_page();
1057
1120
  DEFAULT_REQUEST_TIMEOUT_MS = 12e4, TRACE_HEADER = "x-correlation-id", HttpError = class extends Error {
@@ -1073,11 +1136,14 @@ function fill(pattern, ...params) {
1073
1136
  if (i !== params.length) throw new Error(`route ${pattern}: takes ${i} parameter(s), given ${params.length}`);
1074
1137
  return out2;
1075
1138
  }
1076
- var DOT_SEGMENTS, TENANT_ROUTES, KEY_EXPIRED_ERROR, TENANT_PATHS, API_VERSION, API_VERSION_HEADER, CLIENT_FLOOR_HEADER, CLI_VERSION_HEADER, init_api_routes = __esm({ "../../packages/contract/api-routes.ts"() {
1139
+ function isTerminalRunStatus(status) {
1140
+ return TERMINAL_RUN_STATUSES.includes(status);
1141
+ }
1142
+ var DOT_SEGMENTS, TENANT_ROUTES, KEY_EXPIRED_ERROR, TENANT_PATHS, API_VERSION, API_VERSION_HEADER, CLIENT_FLOOR_HEADER, CLI_VERSION_HEADER, TERMINAL_RUN_STATUSES, init_api_routes = __esm({ "../../packages/contract/api-routes.ts"() {
1077
1143
  "use strict";
1078
1144
  init_define_IGNITIFY_CLIENT_FILES();
1079
1145
  DOT_SEGMENTS = /* @__PURE__ */ new Set([".", ".."]);
1080
- TENANT_ROUTES = { TASKS: "/tasks", TASK_BY_ID: "/tasks/:id", TASK_DELETION_PREVIEW: "/tasks/:id/deletion-preview", DEPLOYMENTS: "/deployments", DEPLOYMENT_BY_ID: "/deployments/:id", RUNS: "/runs", RUN_BY_ID: "/runs/:id", RUN_CANCEL: "/runs/:id/cancel", WHOAMI: "/whoami", PACKAGE_ADVICE: "/packages/advice", VMS: "/vms", VM_BY_ID: "/vms/:id", HOOKS: "/hooks", TRIGGER: "/hooks/trigger", TRIGGER_HOOK: "/hooks/trigger/:hookId", SECRETS: "/secrets", SECRET_BY_NAME: "/secrets/:name", SCHEDULES: "/schedules", SCHEDULE_BY_ID: "/schedules/:id", USAGE: "/usage", RUN_LOGS: "/runs/:id/logs", DEPLOYMENT_LOGS: "/deployments/:id/logs", DEPLOYMENT_HOOKS: "/deployments/:id/hooks", DEPLOYMENT_NOTIFY: "/deployments/:id/notify", HOOK_BY_ID: "/hooks/:id", READYZ: "/readyz", LIVEZ: "/livez", AUTH_DEVICE: "/auth/device", AUTH_DEVICE_TOKEN: "/auth/device/token", AUTH_KEY: "/auth/key" }, KEY_EXPIRED_ERROR = "API key has expired", TENANT_PATHS = { TASKS: TENANT_ROUTES.TASKS, TASK_BY_ID: (id) => fill(TENANT_ROUTES.TASK_BY_ID, id), TASK_DELETION_PREVIEW: (id) => fill(TENANT_ROUTES.TASK_DELETION_PREVIEW, id), DEPLOYMENTS: TENANT_ROUTES.DEPLOYMENTS, DEPLOYMENT_BY_ID: (id) => fill(TENANT_ROUTES.DEPLOYMENT_BY_ID, id), DEPLOYMENT_LOGS: (id) => fill(TENANT_ROUTES.DEPLOYMENT_LOGS, id), RUNS: TENANT_ROUTES.RUNS, RUN_BY_ID: (id) => fill(TENANT_ROUTES.RUN_BY_ID, id), RUN_CANCEL: (id) => fill(TENANT_ROUTES.RUN_CANCEL, id), RUN_LOGS: (id) => fill(TENANT_ROUTES.RUN_LOGS, id), WHOAMI: TENANT_ROUTES.WHOAMI, PACKAGE_ADVICE: TENANT_ROUTES.PACKAGE_ADVICE, VMS: TENANT_ROUTES.VMS, VM_BY_ID: (id) => fill(TENANT_ROUTES.VM_BY_ID, id), HOOKS: TENANT_ROUTES.HOOKS, TRIGGER: TENANT_ROUTES.TRIGGER, TRIGGER_HOOK: (hookId) => fill(TENANT_ROUTES.TRIGGER_HOOK, hookId), SECRETS: TENANT_ROUTES.SECRETS, SECRET_BY_NAME: (name) => fill(TENANT_ROUTES.SECRET_BY_NAME, name), SCHEDULES: TENANT_ROUTES.SCHEDULES, SCHEDULE_BY_ID: (id) => fill(TENANT_ROUTES.SCHEDULE_BY_ID, id), USAGE: TENANT_ROUTES.USAGE, DEPLOYMENT_HOOKS: (id) => fill(TENANT_ROUTES.DEPLOYMENT_HOOKS, id), DEPLOYMENT_NOTIFY: (id) => fill(TENANT_ROUTES.DEPLOYMENT_NOTIFY, id), HOOK_BY_ID: (id) => fill(TENANT_ROUTES.HOOK_BY_ID, id), READYZ: TENANT_ROUTES.READYZ, LIVEZ: TENANT_ROUTES.LIVEZ, AUTH_DEVICE: TENANT_ROUTES.AUTH_DEVICE, AUTH_DEVICE_TOKEN: TENANT_ROUTES.AUTH_DEVICE_TOKEN, AUTH_KEY: TENANT_ROUTES.AUTH_KEY }, API_VERSION = "1", API_VERSION_HEADER = "X-Api-Version", CLIENT_FLOOR_HEADER = "X-Client-Floor", CLI_VERSION_HEADER = "X-Ignitify-Cli";
1146
+ TENANT_ROUTES = { TASKS: "/tasks", TASK_BY_ID: "/tasks/:id", TASK_DELETION_PREVIEW: "/tasks/:id/deletion-preview", DEPLOYMENTS: "/deployments", DEPLOYMENT_BY_ID: "/deployments/:id", RUNS: "/runs", RUN_BY_ID: "/runs/:id", RUN_CANCEL: "/runs/:id/cancel", WHOAMI: "/whoami", PACKAGE_ADVICE: "/packages/advice", VMS: "/vms", VM_BY_ID: "/vms/:id", HOOKS: "/hooks", TRIGGER: "/hooks/trigger", TRIGGER_HOOK: "/hooks/trigger/:hookId", SECRETS: "/secrets", SECRET_BY_NAME: "/secrets/:name", SCHEDULES: "/schedules", SCHEDULE_BY_ID: "/schedules/:id", USAGE: "/usage", RUN_LOGS: "/runs/:id/logs", DEPLOYMENT_LOGS: "/deployments/:id/logs", DEPLOYMENT_HOOKS: "/deployments/:id/hooks", DEPLOYMENT_NOTIFY: "/deployments/:id/notify", HOOK_BY_ID: "/hooks/:id", READYZ: "/readyz", LIVEZ: "/livez", AUTH_DEVICE: "/auth/device", AUTH_DEVICE_TOKEN: "/auth/device/token", AUTH_KEY: "/auth/key" }, KEY_EXPIRED_ERROR = "API key has expired", TENANT_PATHS = { TASKS: TENANT_ROUTES.TASKS, TASK_BY_ID: (id) => fill(TENANT_ROUTES.TASK_BY_ID, id), TASK_DELETION_PREVIEW: (id) => fill(TENANT_ROUTES.TASK_DELETION_PREVIEW, id), DEPLOYMENTS: TENANT_ROUTES.DEPLOYMENTS, DEPLOYMENT_BY_ID: (id) => fill(TENANT_ROUTES.DEPLOYMENT_BY_ID, id), DEPLOYMENT_LOGS: (id) => fill(TENANT_ROUTES.DEPLOYMENT_LOGS, id), RUNS: TENANT_ROUTES.RUNS, RUN_BY_ID: (id) => fill(TENANT_ROUTES.RUN_BY_ID, id), RUN_CANCEL: (id) => fill(TENANT_ROUTES.RUN_CANCEL, id), RUN_LOGS: (id) => fill(TENANT_ROUTES.RUN_LOGS, id), WHOAMI: TENANT_ROUTES.WHOAMI, PACKAGE_ADVICE: TENANT_ROUTES.PACKAGE_ADVICE, VMS: TENANT_ROUTES.VMS, VM_BY_ID: (id) => fill(TENANT_ROUTES.VM_BY_ID, id), HOOKS: TENANT_ROUTES.HOOKS, TRIGGER: TENANT_ROUTES.TRIGGER, TRIGGER_HOOK: (hookId) => fill(TENANT_ROUTES.TRIGGER_HOOK, hookId), SECRETS: TENANT_ROUTES.SECRETS, SECRET_BY_NAME: (name) => fill(TENANT_ROUTES.SECRET_BY_NAME, name), SCHEDULES: TENANT_ROUTES.SCHEDULES, SCHEDULE_BY_ID: (id) => fill(TENANT_ROUTES.SCHEDULE_BY_ID, id), USAGE: TENANT_ROUTES.USAGE, DEPLOYMENT_HOOKS: (id) => fill(TENANT_ROUTES.DEPLOYMENT_HOOKS, id), DEPLOYMENT_NOTIFY: (id) => fill(TENANT_ROUTES.DEPLOYMENT_NOTIFY, id), HOOK_BY_ID: (id) => fill(TENANT_ROUTES.HOOK_BY_ID, id), READYZ: TENANT_ROUTES.READYZ, LIVEZ: TENANT_ROUTES.LIVEZ, AUTH_DEVICE: TENANT_ROUTES.AUTH_DEVICE, AUTH_DEVICE_TOKEN: TENANT_ROUTES.AUTH_DEVICE_TOKEN, AUTH_KEY: TENANT_ROUTES.AUTH_KEY }, API_VERSION = "1", API_VERSION_HEADER = "X-Api-Version", CLIENT_FLOOR_HEADER = "X-Client-Floor", CLI_VERSION_HEADER = "X-Ignitify-Cli", TERMINAL_RUN_STATUSES = ["COMPLETED", "FAILED", "CANCELLED"];
1081
1147
  } });
1082
1148
  var CALLBACK_PATH_PREFIX, init_callback_path = __esm({ "../../packages/contract/callback-path.ts"() {
1083
1149
  "use strict";
@@ -1097,14 +1163,42 @@ var TASK_CONFIG_FILENAMES, RUNTIME_REGISTRY, RUNTIME_IDS, LIVE_RUNTIME_IDS, isRu
1097
1163
  init_define_IGNITIFY_CLIENT_FILES();
1098
1164
  TASK_CONFIG_FILENAMES = ["task.yaml", "task.yml", "task.json"], RUNTIME_REGISTRY = Object.freeze({ node: Object.freeze({ entryFile: "index.ts", depManifest: "package.json", lockfile: "package-lock.json", wireRuntime: "node22", status: "live" }), python: Object.freeze({ entryFile: "main.py", depManifest: "requirements.txt", lockfile: "requirements.txt", wireRuntime: "python3.11", status: "live" }), go: Object.freeze({ entryFile: "main.go", depManifest: "go.mod", lockfile: "go.sum", wireRuntime: "go", status: "live" }), rust: Object.freeze({ entryFile: "src/main.rs", depManifest: "Cargo.toml", lockfile: "Cargo.lock", wireRuntime: "rust", status: "live" }) }), RUNTIME_IDS = Object.keys(RUNTIME_REGISTRY), LIVE_RUNTIME_IDS = RUNTIME_IDS.filter((id) => RUNTIME_REGISTRY[id].status === "live"), isRuntimeId = (v) => typeof v == "string" && Object.prototype.hasOwnProperty.call(RUNTIME_REGISTRY, v), TASK_CONFIG_AJV_OPTIONS = Object.freeze({ allErrors: true, strict: true, useDefaults: false }), TASK_CONFIG_SCHEMA = Object.freeze({ $schema: "https://json-schema.org/draft/2020-12/schema", $id: "https://ignitify.dev/schemas/task-config/v1.json", title: "Ignitify task configuration", type: "object", required: ["schema_version", "slug", "runtime"], additionalProperties: false, properties: { schema_version: { const: 1 }, slug: { type: "string", minLength: 1 }, runtime: { enum: [...RUNTIME_IDS] }, entry: { type: "string", minLength: 1 }, execution: { type: "object" }, secrets: { type: "array", items: { type: "string", minLength: 1 }, uniqueItems: true }, run: { type: "object", additionalProperties: false, properties: { payload: { type: "object" }, preset: { type: "string", minLength: 1 }, timeout_sec: { type: "integer", exclusiveMinimum: 0 } } }, build: { type: "object", additionalProperties: false, properties: { allowed_hosts: { type: "array", items: { type: "string", minLength: 1 }, uniqueItems: true }, ship: { type: "array", items: { type: "string", minLength: 1 }, uniqueItems: true }, system_packages: { type: "array", items: { type: "string", minLength: 1 } } } } } }), BUILD_REFUSAL_STAGES = ["read", "fetch", "build", "smoke"], BUILD_STAGES = ["done", ...BUILD_REFUSAL_STAGES, "builder", "image", "cap"];
1099
1165
  } });
1166
+ var isRecord, init_wire_json = __esm({ "../../packages/contract/wire-json.ts"() {
1167
+ "use strict";
1168
+ init_define_IGNITIFY_CLIENT_FILES();
1169
+ isRecord = (v) => typeof v == "object" && v !== null && !Array.isArray(v);
1170
+ } });
1171
+ function errText(err2) {
1172
+ if (err2 instanceof Error) return err2.message;
1173
+ try {
1174
+ return String(err2);
1175
+ } catch {
1176
+ return "unprintable error";
1177
+ }
1178
+ }
1179
+ function errCode(err2) {
1180
+ let code = isRecord(err2) ? err2.code : void 0;
1181
+ return typeof code == "string" ? code : "error";
1182
+ }
1183
+ var isMissing, init_err_text = __esm({ "../../packages/contract/err-text.ts"() {
1184
+ "use strict";
1185
+ init_define_IGNITIFY_CLIENT_FILES();
1186
+ init_wire_json();
1187
+ isMissing = (err2) => errCode(err2) === "ENOENT";
1188
+ } });
1189
+ var SHA256_HEX, SHA256_PREFIX, isSha256Hex, stripSha256Prefix, init_digest = __esm({ "../../packages/contract/digest.ts"() {
1190
+ "use strict";
1191
+ init_define_IGNITIFY_CLIENT_FILES();
1192
+ SHA256_HEX = /^[0-9a-f]{64}$/, SHA256_PREFIX = "sha256:", isSha256Hex = (v) => typeof v == "string" && SHA256_HEX.test(v), stripSha256Prefix = (s) => s.startsWith(SHA256_PREFIX) ? s.slice(SHA256_PREFIX.length) : s;
1193
+ } });
1100
1194
  function rootConfigName(paths) {
1101
1195
  return TASK_CONFIG_FILENAMES.find((n) => paths.includes(n)) ?? null;
1102
1196
  }
1103
1197
  function configKeyText(value) {
1104
- let top = value !== null && typeof value == "object" && !Array.isArray(value) ? Object.fromEntries(Object.entries(value).filter(([k]) => !RUN_ONLY_CONFIG_KEYS.includes(k))) : value, parts = [], bytes2 = 0, over = () => {
1198
+ let top = value !== null && typeof value == "object" && !Array.isArray(value) ? Object.fromEntries(Object.entries(value).filter(([k]) => !RUN_ONLY_CONFIG_KEYS.includes(k))) : value, parts = [], bytes = 0, over = () => {
1105
1199
  throw new Error(`its build settings are over ${CONFIG_KEY_TEXT_MAX_BYTES / 1024} KiB as canonical JSON (a YAML alias is expanded each time it is used)`);
1106
1200
  }, emit2 = (s) => {
1107
- bytes2 += utf8Bytes(s), bytes2 > CONFIG_KEY_TEXT_MAX_BYTES && over(), parts.push(s);
1201
+ bytes += utf8Bytes(s), bytes > CONFIG_KEY_TEXT_MAX_BYTES && over(), parts.push(s);
1108
1202
  }, walk = (v, depth) => {
1109
1203
  if (depth > CONFIG_KEY_MAX_DEPTH) throw new Error(`it is nested deeper than ${CONFIG_KEY_MAX_DEPTH} levels`);
1110
1204
  if (v === null || typeof v == "boolean") return emit2(String(v));
@@ -1157,7 +1251,7 @@ function sourceManifest(entries, config) {
1157
1251
  if (config !== null) try {
1158
1252
  configLine = [`config ${config.name} ${configKeyText(config.value)}`];
1159
1253
  } catch (e) {
1160
- throw new Error(`source manifest: ${config.name}: ${e.message}`, { cause: e });
1254
+ throw new Error(`source manifest: ${config.name}: ${errText(e)}`, { cause: e });
1161
1255
  }
1162
1256
  let seen = /* @__PURE__ */ new Set();
1163
1257
  for (let e of entries) {
@@ -1168,7 +1262,7 @@ function sourceManifest(entries, config) {
1168
1262
  if (e.path.includes(`
1169
1263
  `) || e.path.includes(" ")) throw new Error(`source manifest: path contains a tab or newline: ${JSON.stringify(e.path)}`);
1170
1264
  if (!Number.isSafeInteger(e.size) || e.size < 0) throw new Error(`source manifest: bad size for ${e.path}: ${String(e.size)}`);
1171
- if (!HEX64.test(e.sha256)) throw new Error(`source manifest: sha256 for ${e.path} must be 64 lowercase hex chars`);
1265
+ if (!isSha256Hex(e.sha256)) throw new Error(`source manifest: sha256 for ${e.path} must be 64 lowercase hex chars`);
1172
1266
  if (seen.has(e.path)) throw new Error(`source manifest: duplicate path: ${e.path}`);
1173
1267
  seen.add(e.path);
1174
1268
  }
@@ -1176,13 +1270,15 @@ function sourceManifest(entries, config) {
1176
1270
  return [`ignitify-source/${SOURCE_MANIFEST_VERSION}`, ...configLine, ...lines, ""].join(`
1177
1271
  `);
1178
1272
  }
1179
- var SOURCE_MANIFEST_VERSION, RUN_ONLY_CONFIG_KEYS, CONFIG_KEY_TEXT_MAX_BYTES, UPLOAD_MAX_BYTES, CONFIG_KEY_MAX_DEPTH, SOURCE_EXCLUDED_DIRS, SOURCE_EXCLUDED_ROOT_DIRS, SOURCE_EXCLUDED_FILE_PREFIXES, CREDENTIAL_KEYS, CREDENTIAL_CHECKED_FILES, HEX64, isCanonicalRelativePath, init_source_manifest = __esm({ "../../packages/contract/source-manifest.ts"() {
1273
+ var SOURCE_MANIFEST_VERSION, RUN_ONLY_CONFIG_KEYS, CONFIG_KEY_TEXT_MAX_BYTES, UPLOAD_MAX_BYTES, CONFIG_KEY_MAX_DEPTH, SOURCE_EXCLUDED_DIRS, SOURCE_EXCLUDED_ROOT_DIRS, SOURCE_EXCLUDED_FILE_PREFIXES, CREDENTIAL_KEYS, CREDENTIAL_CHECKED_FILES, isCanonicalRelativePath, init_source_manifest = __esm({ "../../packages/contract/source-manifest.ts"() {
1180
1274
  "use strict";
1181
1275
  init_define_IGNITIFY_CLIENT_FILES();
1182
1276
  init_task_config();
1277
+ init_err_text();
1278
+ init_digest();
1183
1279
  SOURCE_MANIFEST_VERSION = "v2", RUN_ONLY_CONFIG_KEYS = Object.freeze(["execution", "secrets", "run"]), CONFIG_KEY_TEXT_MAX_BYTES = 64 * 1024, UPLOAD_MAX_BYTES = 64 * 1024 * 1024, CONFIG_KEY_MAX_DEPTH = 64;
1184
1280
  SOURCE_EXCLUDED_DIRS = Object.freeze([".git", ".ignitify", "node_modules", "__pycache__", ".venv", "venv", ".mypy_cache", ".pytest_cache"]), SOURCE_EXCLUDED_ROOT_DIRS = Object.freeze(["target", "dist"]), SOURCE_EXCLUDED_FILE_PREFIXES = Object.freeze([".env"]), CREDENTIAL_KEYS = Object.freeze({ ".npmrc": /^[ \t]*(?![#;])[^=\n]*_(?:authToken|auth|password)[ \t]*=[ \t]*(?!\$\{\w+\}[ \t]*$)\S/m, ".yarnrc.yml": /^[ \t]*npmAuth(?:Token|Ident)[ \t]*:[ \t]*(?!["']?\$\{\w+\}["']?[ \t]*$)\S/m }), CREDENTIAL_CHECKED_FILES = Object.freeze(Object.keys(CREDENTIAL_KEYS));
1185
- HEX64 = /^[0-9a-f]{64}$/, isCanonicalRelativePath = (p) => !p.startsWith("/") && !p.includes("\\") && p.split("/").every((seg) => seg !== "" && seg !== "." && seg !== "..");
1281
+ isCanonicalRelativePath = (p) => !p.startsWith("/") && !p.includes("\\") && p.split("/").every((seg) => seg !== "" && seg !== "." && seg !== "..");
1186
1282
  } });
1187
1283
  function normaliseSystemPackages(declared) {
1188
1284
  return [...new Set(declared)].sort();
@@ -1206,6 +1302,23 @@ var USAGE_AXES, USAGE_DETAIL_COMMAND, RESETS_AT_NEXT_RENEWAL, init_usage = __esm
1206
1302
  init_define_IGNITIFY_CLIENT_FILES();
1207
1303
  USAGE_AXES = ["compute", "network", "network_in", "disk", "scratch", "runs", "pin", "build"], USAGE_DETAIL_COMMAND = "ignitify quota", RESETS_AT_NEXT_RENEWAL = "your next paid renewal";
1208
1304
  } });
1305
+ function formatUserCode(code) {
1306
+ if (code.length !== 8) return code;
1307
+ let half = 8 / 2;
1308
+ return `${code.slice(0, half)}-${code.slice(half)}`;
1309
+ }
1310
+ var init_device_code = __esm({ "../../packages/contract/device-code.ts"() {
1311
+ "use strict";
1312
+ init_define_IGNITIFY_CLIENT_FILES();
1313
+ } });
1314
+ function cappedExponentialMs(step, baseMs, maxMs) {
1315
+ let n = Number.isNaN(step) ? 0 : Math.min(Math.max(0, Math.floor(step)), 32);
1316
+ return Math.min(baseMs * 2 ** n, maxMs);
1317
+ }
1318
+ var init_backoff = __esm({ "../../packages/contract/backoff.ts"() {
1319
+ "use strict";
1320
+ init_define_IGNITIFY_CLIENT_FILES();
1321
+ } });
1209
1322
  var init_tenant = __esm({ "../../packages/contract/tenant/index.ts"() {
1210
1323
  "use strict";
1211
1324
  init_define_IGNITIFY_CLIENT_FILES();
@@ -1217,23 +1330,26 @@ var init_tenant = __esm({ "../../packages/contract/tenant/index.ts"() {
1217
1330
  init_system_packages();
1218
1331
  init_package_advice();
1219
1332
  init_usage();
1333
+ init_wire_json();
1334
+ init_err_text();
1335
+ init_digest();
1336
+ init_device_code();
1337
+ init_backoff();
1220
1338
  } });
1221
1339
  function valueFlags(map2) {
1222
1340
  return Object.fromEntries(Object.keys(map2).map((flag) => [flag, "value"]));
1223
1341
  }
1224
- function isTerminalRunStatus(status) {
1225
- return TERMINAL_RUN_STATUSES.includes(status);
1226
- }
1227
- var COMMANDS, IGNORE_FILE, STATE, CREDENTIALS, LOGIN, LOGIN_VIEW, NETWORK, ENV, DEFAULT_TASKS_DIR, DEFAULTS, UPGRADE_COMMAND, PAYLOAD_LIMIT_FALLBACK_BYTES, RESULT_LIMIT_FALLBACK_BYTES, RUN_LIST_FLAG_PARAMS, VM_LIST_FLAG_PARAMS, GLOBAL_FLAGS, SERVER_FLAGS, HIDDEN_FLAGS, SHORT_FLAGS, VERSION_TOKENS, VALIDATE, ADVICE, INTEGRATION, NO_FLAGS, DIR, PAGE, YES, RAW, USAGE_FILTERS, COMMAND_META, VERSION_META, MESSAGES, RUN_STATUS, TERMINAL_RUN_STATUSES, ACTIVE_RUN_STATUSES, DEPLOYMENT_STATUS, POLL, WAIT, init_constants = __esm({ "src/constants/index.ts"() {
1342
+ var COMMANDS, IGNORE_FILE, STATE, CREDENTIALS, LOGIN, LOGIN_VIEW, NETWORK, ENV, DEFAULT_TASKS_DIR, DEFAULTS, UPGRADE_COMMAND, PAYLOAD_LIMIT_FALLBACK_BYTES, RESULT_LIMIT_FALLBACK_BYTES, RUN_LIST_FLAG_PARAMS, VM_LIST_FLAG_PARAMS, GLOBAL_FLAGS, SERVER_FLAGS, HIDDEN_FLAGS, SHORT_FLAGS, VERSION_TOKENS, VALIDATE, ADVICE, INTEGRATION, NO_FLAGS, DIR, PAGE, YES, RAW, USAGE_FLAG_PARAMS, USAGE_FILTERS, COMMAND_META, VERSION_META, MESSAGES, RUN_STATUS, ACTIVE_RUN_STATUSES, DEPLOYMENT_STATUS, POLL, WAIT, init_constants = __esm({ "src/constants/index.ts"() {
1228
1343
  "use strict";
1229
1344
  init_define_IGNITIFY_CLIENT_FILES();
1230
1345
  init_http_client();
1231
1346
  init_tenant();
1232
1347
  init_tenant();
1348
+ init_tenant();
1233
1349
  COMMANDS = { HELP: "help", LOGIN: "login", LOGOUT: "logout", WHOAMI: "whoami", QUOTA: "quota", TASK_CREATE: "task:create", TASK_LIST: "task:list", TASK_GET: "task:get", TASK_DELETE: "task:delete", TASK_VALIDATE: "task:validate", TASK_PACK: "task:pack", TASK_DEPLOY: "task:deploy", TASK_RUN: "task:run", DEPLOYMENT_LIST: "deployment:list", DEPLOYMENT_GET: "deployment:get", DEPLOYMENT_LOGS: "deployment:logs", DEPLOYMENT_DELETE: "deployment:delete", RUN_LIST: "run:list", RUN_GET: "run:get", RUN_LOGS: "run:logs", RUN_DELETE: "run:delete", RUN_CANCEL: "run:cancel", VM_LIST: "vm:list", VM_GET: "vm:get", VM_DELETE: "vm:delete", SECRET_SET: "secret:set", SECRET_LIST: "secret:list", SECRET_DELETE: "secret:delete", SCHEDULE_LIST: "schedule:list", SCHEDULE_CANCEL: "schedule:cancel", HOOK_CREATE: "hook:create", HOOK_LIST: "hook:list", HOOK_DELETE: "hook:delete", NOTIFY_SET: "notify:set", INTEGRATION_ADD: "integration:add", USAGE: "usage", USAGE_EXPORT: "usage:export" }, IGNORE_FILE = ".ignitifyignore", STATE = { DIR: ".ignitify", FILE: "state.json", GITIGNORE_FILE: ".gitignore", GITIGNORE_TEXT: `# written by ignitify: local state, never commit
1234
1350
  *
1235
1351
  ` }, CREDENTIALS = { DIR_NAME: "ignitify", FILE_NAME: "credentials.json", DIR_MODE: 448, FILE_MODE: 384 }, LOGIN = { MAX_RETRIES: 3, KEY_TTL_DAYS: 90, MIN_POLL_INTERVAL_SEC: 5, BROWSER_SCHEMES: ["https:", "http:"] }, LOGIN_VIEW = { TITLE: "Sign in to Ignitify", OPEN_PAGE: "Open this page:", ASK_OPERATOR: "Give this code to your operator, who approves it:", CHECK_CODE: "Check this code", SAME_CODE: "The page must show the same code.", WAITING_STATIC: (minutes) => `Waiting for approval. The code expires in ${minutes} minutes.`, WAITING_LIVE: (left) => `Waiting for approval... code expires in ${left}`, CANCELLED: "Sign-in cancelled. Nothing was saved.", SIGNED_IN: "Signed in", SIGNED_OUT: "Signed out", KEY_EXPIRES: (days) => `${days} days after last use; each use renews it`, YES: "yes", ROWS: { ACCOUNT: "Account", ACCOUNT_ID: "Account id", KEY_LABEL: "Key label", KEY_EXPIRES: "Key expires", SAVED_TO: "Saved to", REVOKED: "Revoked", DELETED: "Deleted" } }, NETWORK = { REASONS: { ECONNREFUSED: "nothing accepts connections there", ENOTFOUND: "the host name is unknown", EAI_AGAIN: "the host name lookup failed", ETIMEDOUT: "the connection timed out", UND_ERR_CONNECT_TIMEOUT: "the connection timed out", ECONNRESET: "the connection was reset" }, TLS_WORDS: "the TLS certificate was not accepted", TLS_CODES: ["CERT_HAS_EXPIRED", "CERT_NOT_YET_VALID", "DEPTH_ZERO_SELF_SIGNED_CERT", "SELF_SIGNED_CERT_IN_CHAIN", "UNABLE_TO_VERIFY_LEAF_SIGNATURE", "UNABLE_TO_GET_ISSUER_CERT_LOCALLY"], TLS_CODE_PREFIXES: ["ERR_TLS_", "ERR_SSL_"], CODE_PATTERN: /^[A-Z][A-Z0-9_]*$/, DETAIL_MAX_CHARS: 80 }, ENV = { TASKS_DIR: "IGNITIFY_TASKS_DIR", KEY: "IGNITIFY_API_KEY" }, DEFAULT_TASKS_DIR = "tasks", DEFAULTS = { API_URL: "https://api.ignitify.dev" }, UPGRADE_COMMAND = "npm install --global ignitify@latest", PAYLOAD_LIMIT_FALLBACK_BYTES = 10240, RESULT_LIMIT_FALLBACK_BYTES = 10240, RUN_LIST_FLAG_PARAMS = { status: "status", "deployment-id": "deployment_id", "task-name": "task_name", preset: "preset", "correlation-id": "correlation_id", "vm-id": "vm_id", ...PAGE_FLAG_PARAMS }, VM_LIST_FLAG_PARAMS = { "deployment-id": "deployment_id", "task-name": "task_name", preset: "preset", "older-than": "older_than", ...PAGE_FLAG_PARAMS }, GLOBAL_FLAGS = { json: "bool", help: "bool" }, SERVER_FLAGS = { api: "value" }, HIDDEN_FLAGS = ["api"], SHORT_FLAGS = { h: "help", y: "yes" }, VERSION_TOKENS = ["--version", "-v"];
1236
- VALIDATE = { VALID: "task config valid" }, ADVICE = { FLAG: "review-packages", TIMEOUT_MS: 6e4, FAULT_STATUSES: [400, 401, 403], SECONDS_ONLY_BELOW: 60, SECONDS_PER_MINUTE: 60, NO_PACKAGES: "this task lists no build.system_packages", SKIPPED: (reason) => `AI check skipped: ${reason}`, RATE_LIMITED: (retryAfterS) => `rate limited, try again in ${retryAfterS} s`, UNAVAILABLE: (reason) => `the review is unavailable (${reason})`, NO_ANSWER: (status, message) => status === null ? message : `server answered ${status}`, FAULT: (status, body) => `AI check failed (HTTP ${status}): ${body}`, BAD_NAMES: (bad) => `not valid package names: ${bad.join(", ")}`, TOO_MANY: (count, max) => `${count} packages listed, the most is ${max}`, BASIS: { measured: "measured", model: "model estimate" }, NO_FIT: (driveMib, capMib) => `does not fit: ${driveMib} MiB of packages against the ${capMib} MiB image store of your tier`, TITLE: "Package review", NOTE: "AI advice only. A suggestion is not checked against Debian.", COLUMNS: { PACKAGE: "Package", VERDICT: "Verdict", SIZE: "Size", NOTE: "Note", SUGGEST: "Suggest" }, NOT_DOUBLE_CHECKED: "not double-checked by the second model", RESULT_CLEAN: (total) => `No concerns found in ${total} package${total === 1 ? "" : "s"}.`, RESULT_FLAGGED: (total, flagged) => `${total} package${total === 1 ? "" : "s"} checked, ${flagged} to look at.`, NOT_ANSWERED: (names) => `No AI answer for: ${names.join(", ")}. The review could not judge ${names.length === 1 ? "it" : "them"}.`, BUILD_TITLE: "Build time", BUILD_LABELS: { ADDED: "Added", APPLIES: "Applies to", SIZE: "Packages size", LEFT_OUT: "Left out" }, BUILD_NONE: "nothing: your tenant already holds the drive for this list", BUILD_ADDED: (range, basis) => `about ${range} (${basis})`, BUILD_APPLIES: "the first deploy of this list. A later code-only redeploy reuses the drive.", BUILD_SIZE: (mib, capMib) => capMib === null ? `${mib} MiB` : `${mib} MiB of ${capMib} MiB (the image store of your tier)`, BUILD_LEFT_OUT: (names) => `${names.join(", ")} (unusable, or size unknown)` }, INTEGRATION = { PACKAGE_JSON: "package.json", NODE_MODULES: "node_modules", RUNTIME: "node", NPM: "npm", TARBALL_EXT: ".tgz", PACKED_ROOT: "package", PACK_TMP_PREFIX: "ignitify-integration-pack-", PACK_ARGS: (pkg, destDir, taskDir) => ["pack", pkg, "--pack-destination", destDir, "--prefix", taskDir], INSTALL_ARGS: (spec, taskDir) => ["install", spec, "--save-prod", "--ignore-scripts", "--prefix", taskDir], PACKED_MAX_BYTES: 8 * 1024 * 1024, ZLIB_TOO_BIG: "ERR_BUFFER_TOO_LARGE", VERSION_PATTERN: /^\d+\.\d+\.\d+(-[0-9A-Za-z.-]+)?$/, QUESTION: "Apply?", REGISTRY_URL: "https://registry.npmjs.org", REGISTRY_ACCEPT: "application/vnd.npm.install-v1+json", REGISTRY_TIMEOUT_MS: 5e3, NOTED_FIELDS: ["execution.network.type", "run.preset"], USAGE: "usage: ignitify integration:add <name> --task <slug> [--yes | --dry-run] [--dir <base-dir>]", TASK_REQUIRED: "--task <slug> is required: the task folder to add the integration to", YES_WITH_DRY_RUN: "--yes and --dry-run cannot be used together", BAD_NAME: (name, pattern) => `integration name ${JSON.stringify(name)} must match ${pattern}`, NOT_NODE: (runtime) => `integrations work with Node tasks only; this task has runtime "${runtime}"`, NO_PACKAGE_JSON: (taskDir) => `${taskDir} has no package.json: run npm init in the task folder first; nothing was changed`, NOT_INTERACTIVE: "Refusing to proceed: not a TTY. Re-run with --yes to apply the plan, or with --dry-run to see it.", PACK_FAILED: (pkg, code) => `npm pack ${pkg} failed${code === null ? "" : ` (exit ${code})`}; nothing in the task was changed`, INSTALL_FAILED: (spec, code) => `npm install ${spec} failed${code === null ? "" : ` (exit ${code})`}; task.yaml was not changed`, INSTALLED: (spec) => `${spec} installed`, BAD_VERSION: (pkg, version2) => `${pkg}: its package.json version ${JSON.stringify(version2)} is not a plain x.y.z version; nothing in the task was changed`, PACKED_TOO_BIG: (file, max) => `${file} unpacks to more than ${max} bytes: refused, nothing in the task was changed`, INSTALL_ONLY: (spec) => `installs ${spec}; task.yaml unchanged`, NOT_AN_INTEGRATION: (pkg, file) => `${pkg} has no ${file}: it is not an integration package`, BAD_MANIFEST: (pkg, issue) => `${pkg} integration.yaml: ${issue}`, UNREADABLE: (file, reason) => `cannot read ${file}: ${reason}`, WRITE_MISMATCH: (file) => `the edited ${file} does not read back as the plan; nothing was written`, YOU_ADD: "you add:", NO_CHANGES: "task.yaml already has every setting this integration needs; nothing to write", DRY_RUN: "dry run: task.yaml was not changed", WRITTEN: (file) => `${file} updated`, NOT_INSTALLED: (pkgs) => `${pkgs.join(", ")} ${pkgs.length === 1 ? "is" : "are"} in package.json but not in node_modules: run npm install, then task:validate again`, OBSOLETE: (pkg, version2, latest) => `${pkg}@${version2} is obsolete: use ${latest}`, OBSOLETE_SKIPPED: (reason) => `obsolete-version check skipped: ${reason}`, REGISTRY_UNREACHABLE: "the npm registry did not answer (offline?)", REGISTRY_NOT_FOUND: (pkg) => `${pkg} is not on the npm registry` }, NO_FLAGS = {}, DIR = { dir: "value" }, PAGE = valueFlags(PAGE_FLAG_PARAMS), YES = { yes: "bool" }, RAW = { raw: "bool" }, USAGE_FILTERS = { period: "value", axis: "value", vm: "value", run: "value" }, COMMAND_META = { [COMMANDS.HELP]: { flags: NO_FLAGS, positionals: 1, confirms: false }, [COMMANDS.LOGIN]: { flags: { ...SERVER_FLAGS, "no-browser": "bool", name: "value" }, positionals: 0, confirms: false }, [COMMANDS.LOGOUT]: { flags: NO_FLAGS, positionals: 0, confirms: false }, [COMMANDS.WHOAMI]: { flags: SERVER_FLAGS, positionals: 0, confirms: false }, [COMMANDS.QUOTA]: { flags: SERVER_FLAGS, positionals: 0, confirms: false }, [COMMANDS.TASK_CREATE]: { flags: { ...SERVER_FLAGS, ...DIR, lang: "value", local: "bool", "no-init": "bool", "no-scaffold": "bool" }, positionals: 1, confirms: false }, [COMMANDS.TASK_LIST]: { flags: { ...SERVER_FLAGS, ...PAGE }, positionals: 0, confirms: false }, [COMMANDS.TASK_GET]: { flags: { ...SERVER_FLAGS, ...DIR }, positionals: 1, confirms: false }, [COMMANDS.TASK_DELETE]: { flags: { ...SERVER_FLAGS, ...DIR, ...YES }, positionals: 1, confirms: true }, [COMMANDS.TASK_VALIDATE]: { flags: { ...SERVER_FLAGS, ...DIR, [ADVICE.FLAG]: "bool" }, positionals: 1, confirms: false }, [COMMANDS.TASK_PACK]: { flags: DIR, positionals: 1, confirms: false }, [COMMANDS.TASK_DEPLOY]: { flags: { ...SERVER_FLAGS, ...DIR, check: "bool" }, positionals: 1, confirms: false }, [COMMANDS.TASK_RUN]: { flags: { deployment: "value", payload: "value", "timeout-sec": "value", "on-busy": "value", at: "value", wait: "bool", ...DIR, ...SERVER_FLAGS }, positionals: 1, confirms: false }, [COMMANDS.DEPLOYMENT_LIST]: { flags: { ...SERVER_FLAGS, ...PAGE }, positionals: 0, confirms: false }, [COMMANDS.DEPLOYMENT_GET]: { flags: SERVER_FLAGS, positionals: 1, confirms: false }, [COMMANDS.DEPLOYMENT_LOGS]: { flags: { ...SERVER_FLAGS, ...RAW }, positionals: 1, confirms: false }, [COMMANDS.DEPLOYMENT_DELETE]: { flags: { ...SERVER_FLAGS, ...YES }, positionals: 1, confirms: true }, [COMMANDS.RUN_LIST]: { flags: { ...SERVER_FLAGS, ...valueFlags(RUN_LIST_FLAG_PARAMS) }, positionals: 0, confirms: false }, [COMMANDS.RUN_GET]: { flags: { ...SERVER_FLAGS, full: "bool" }, positionals: 1, confirms: false }, [COMMANDS.RUN_LOGS]: { flags: { ...SERVER_FLAGS, ...RAW }, positionals: 1, confirms: false }, [COMMANDS.RUN_DELETE]: { flags: { ...SERVER_FLAGS, ...YES }, positionals: 1, confirms: true }, [COMMANDS.RUN_CANCEL]: { flags: { ...SERVER_FLAGS, ...YES, force: "bool", grace: "value" }, positionals: 1, confirms: true }, [COMMANDS.VM_LIST]: { flags: { ...SERVER_FLAGS, ...valueFlags(VM_LIST_FLAG_PARAMS), pinned: "bool" }, positionals: 0, confirms: false }, [COMMANDS.VM_GET]: { flags: SERVER_FLAGS, positionals: 1, confirms: false }, [COMMANDS.VM_DELETE]: { flags: { ...SERVER_FLAGS, ...YES, force: "bool" }, positionals: 1, confirms: true }, [COMMANDS.SECRET_SET]: { flags: { ...SERVER_FLAGS, stdin: "bool", value: "value" }, positionals: 1, confirms: false, secretArgv: true }, [COMMANDS.SECRET_LIST]: { flags: SERVER_FLAGS, positionals: 0, confirms: false }, [COMMANDS.SECRET_DELETE]: { flags: { ...SERVER_FLAGS, ...YES }, positionals: 1, confirms: true }, [COMMANDS.SCHEDULE_LIST]: { flags: SERVER_FLAGS, positionals: 0, confirms: false }, [COMMANDS.SCHEDULE_CANCEL]: { flags: { ...SERVER_FLAGS, ...YES }, positionals: 1, confirms: true }, [COMMANDS.HOOK_CREATE]: { flags: { ...SERVER_FLAGS, "task-name": "value" }, positionals: 1, confirms: false }, [COMMANDS.HOOK_LIST]: { flags: { ...SERVER_FLAGS, ...PAGE }, positionals: 1, confirms: false }, [COMMANDS.HOOK_DELETE]: { flags: { ...SERVER_FLAGS, ...YES }, positionals: 1, confirms: true }, [COMMANDS.NOTIFY_SET]: { flags: { ...SERVER_FLAGS, url: "value", clear: "bool", "secret-stdin": "bool", secret: "value" }, positionals: 1, confirms: false, secretArgv: true }, [COMMANDS.INTEGRATION_ADD]: { flags: { ...DIR, ...YES, task: "value", "dry-run": "bool" }, positionals: 1, confirms: true }, [COMMANDS.USAGE]: { flags: { ...SERVER_FLAGS, ...USAGE_FILTERS, runs: "bool", vms: "bool" }, positionals: 0, confirms: false }, [COMMANDS.USAGE_EXPORT]: { flags: { ...SERVER_FLAGS, ...USAGE_FILTERS, csv: "bool" }, positionals: 0, confirms: false } }, VERSION_META = { flags: SERVER_FLAGS, positionals: 0, confirms: false }, MESSAGES = { NOT_SIGNED_IN: "Not signed in. Run 'ignitify login', or set the IGNITIFY_API_KEY environment variable.", CREDENTIALS_SYMLINK: (file) => `${file} is a symbolic link. Remove it and run 'ignitify login' again.`, CREDENTIALS_NOT_FILE: (file) => `${file} is not a regular file. Remove it and run 'ignitify login' again.`, CREDENTIALS_NOT_OWNED: (file) => `${file} belongs to another user. Remove it and run 'ignitify login' again.`, CREDENTIALS_TOO_OPEN: (file, mode) => `${file} can be read by other users (mode 0${mode}). Run: chmod 600 ${file}`, CREDENTIALS_UNREADABLE: (file) => `${file} is not a valid credentials file. Remove it and run 'ignitify login' again.`, CREDENTIALS_OTHER_URL: (fileUrl, url) => `The saved key is for ${fileUrl}, not ${url}. Run 'ignitify login --api ${url}'.`, CREDENTIALS_DIR_NOT_DIR: (dir) => `${dir} is not a folder. Remove it and run 'ignitify login' again.`, API_URL_NOT_URL: (url) => `The API address "${url}" is not a URL.`, API_URL_NOT_HTTPS: (url) => `The API address ${url} is not https. The CLI sends your key only over https, or over plain http to this machine (localhost, 127.0.0.1, ::1).`, LOGIN_REPLACED: (label) => `Note: replaced the key "${label}" of another machine. Use 'ignitify login --name <other-label>' to keep both.`, LOGIN_EXPIRED: (code) => `The code ${code} expired before it was approved. Run 'ignitify login' again.`, LOGIN_REFUSED: (reason) => `The sign-in was refused: ${reason}.`, LOGIN_UNKNOWN: "The sign-in code is unknown or was already used. Run 'ignitify login' again.", LOGIN_BAD_ANSWER: "The server sent a sign-in answer with no usable key. Nothing was saved.", LOGIN_BAD_START: "The server sent a sign-in start that the CLI cannot use (no code, or no wait times). Nothing was started.", ENV_KEY_OVERRIDES_LOGIN: "Note: the IGNITIFY_API_KEY environment variable is set, so it is used instead of your saved login.", KEY_EXPIRED_HINT: "Run 'ignitify login' to sign in again.", LOGIN_TOO_MANY: "Too many sign-in attempts from this network. Try again later.", LOGIN_CAP: (limit) => `This account already has the most API keys its plan allows${limit === null ? "" : ` (${limit})`}. Remove one, or approve with "replace", then run 'ignitify login' again.`, CANNOT_REACH: (url, detail) => `Cannot reach ${url}${detail === null ? "" : ` (${detail})`}. Check your network and run 'ignitify login' again.`, UNREACHABLE: (origin, detail) => `Cannot reach ${origin}${detail === null ? "" : ` (${detail})`}.`, LOGOUT_NOTHING: "Not signed in. There are no saved credentials.", LOGOUT_ENV_NOTE: "Note: the IGNITIFY_API_KEY environment variable is still set. Logout does not change it.", LOGOUT_NOT_REVOKED: (label) => `Warning: the server did not revoke the key, so it may still work. The saved credentials were deleted. Ask your operator to revoke the key "${label}".`, SLUG_MISSING: (source) => `'slug' is required in ${source}`, SLUG_INVALID: (source, reason) => `${source}: 'slug' ${reason}`, PRESET_INVALID: "run.preset must be a non-empty string", PRESET_UNKNOWN: (source, name, valid) => `${source}: unknown run.preset "${name}" (valid: ${valid.join(", ")}). An unrecognised preset would silently fall back to the platform default, giving you a different instance class than you declared.`, TIMEOUT_INVALID: "run.timeout_sec must be a positive number", TASK_ID_REQUIRED: "a <task-id> is required", TASK_ID_INVALID: (id, reason) => `task id ${JSON.stringify(id)} ${reason}`, ERROR: (message) => `Error: ${message}`, ERROR_PREFIX: "Error:", SERVER_TRACE_ID: (id) => `server trace id: ${id}`, ARG_REQUIRED: (label) => `${label} is required`, UNKNOWN_COMMAND: "unknown command", SEE_HELP: "Run 'ignitify help' to see every command.", UNKNOWN_SHORT_FLAG: (short, long, command) => `unknown flag ${short} (--${long}) for ${command}`, GRACE_INVALID: (got) => `--grace must be a whole number of milliseconds, 0 or more (got ${JSON.stringify(got)})`, GRACE_WITH_FORCE: "--grace has no effect with --force (force stops the run now)", TASK_LIMITS: (payload, result) => `payload max ${payload}, result max ${result}; over the limit the run fails`, PAYLOAD_OVER_LIMIT: (bytes2, limit) => `payload is ${bytes2} bytes; the limit is ${limit} bytes`, PAYLOAD_REFUSED_BY_SERVER: (limit) => `the server refused the payload as too large; the limit is ${limit} bytes`, DEFAULT_PAYLOAD_OVER_LIMIT: (source, bytes2, limit) => `${source}: run.payload is ${bytes2} bytes; the offline limit is ${limit} bytes (the server may allow more)`, IGNORED_BY_FILE: `ignored by ${IGNORE_FILE}`, IGNORED_COUNT: (n) => `${n} path(s) left out by ${IGNORE_FILE}`, TASK_DELETED: "task deleted", TASK_LINK_REMOVED: "Removed local link", TASK_LINK_NOT_REMOVED: (link, reason) => `Warning: the task is deleted, but its local link was not removed (${reason}). Remove ${link} by hand.`, DEPLOY_DELETED: "deployment deleted", RUN_DELETED: "run deleted", ABORTED: "Aborted.", CONFIRM_PROCEED: "Proceed?", SECRET_SET_USAGE: "usage: ignitify secret:set <NAME> --stdin (the value is read from stdin)", SECRET_VALUE_EMPTY: "secret:set read an empty value from stdin \u2014 nothing was stored (pipe the value in: `--stdin < value-file`)", SECRET_VALUE_ON_ARGV: `secret:set takes no value on argv: it is visible in \`ps\` and is written to your shell history. Pipe it on stdin, e.g.
1352
+ VALIDATE = { VALID: "task config valid" }, ADVICE = { FLAG: "review-packages", TIMEOUT_MS: 6e4, FAULT_STATUSES: [400, 401, 403], SECONDS_ONLY_BELOW: 60, SECONDS_PER_MINUTE: 60, NO_PACKAGES: "this task lists no build.system_packages", SKIPPED: (reason) => `AI check skipped: ${reason}`, RATE_LIMITED: (retryAfterS) => `rate limited, try again in ${retryAfterS} s`, UNAVAILABLE: (reason) => `the review is unavailable (${reason})`, NO_ANSWER: (status, message) => status === null ? message : `server answered ${status}`, FAULT: (status, body) => `AI check failed (HTTP ${status}): ${body}`, BAD_NAMES: (bad) => `not valid package names: ${bad.join(", ")}`, TOO_MANY: (count, max) => `${count} packages listed, the most is ${max}`, BASIS: { measured: "measured", model: "model estimate" }, NO_FIT: (driveMib, capMib) => `does not fit: ${driveMib} MiB of packages against the ${capMib} MiB image store of your tier`, TITLE: "Package review", NOTE: "AI advice only. A suggestion is not checked against Debian.", COLUMNS: { PACKAGE: "Package", VERDICT: "Verdict", SIZE: "Size", NOTE: "Note", SUGGEST: "Suggest" }, NOT_DOUBLE_CHECKED: "not double-checked by the second model", RESULT_CLEAN: (total) => `No concerns found in ${total} package${total === 1 ? "" : "s"}.`, RESULT_FLAGGED: (total, flagged) => `${total} package${total === 1 ? "" : "s"} checked, ${flagged} to look at.`, NOT_ANSWERED: (names) => `No AI answer for: ${names.join(", ")}. The review could not judge ${names.length === 1 ? "it" : "them"}.`, BUILD_TITLE: "Build time", BUILD_LABELS: { ADDED: "Added", APPLIES: "Applies to", SIZE: "Packages size", LEFT_OUT: "Left out" }, BUILD_NONE: "nothing: your tenant already holds the drive for this list", BUILD_ADDED: (range, basis) => `about ${range} (${basis})`, BUILD_APPLIES: "the first deploy of this list. A later code-only redeploy reuses the drive.", BUILD_SIZE: (mib, capMib) => capMib === null ? `${mib} MiB` : `${mib} MiB of ${capMib} MiB (the image store of your tier)`, BUILD_LEFT_OUT: (names) => `${names.join(", ")} (unusable, or size unknown)` }, INTEGRATION = { PACKAGE_JSON: "package.json", NODE_MODULES: "node_modules", RUNTIME: "node", NPM: "npm", TARBALL_EXT: ".tgz", PACKED_ROOT: "package", PACK_TMP_PREFIX: "ignitify-integration-pack-", PACK_ARGS: (pkg, destDir, taskDir) => ["pack", pkg, "--pack-destination", destDir, "--prefix", taskDir], INSTALL_ARGS: (spec, taskDir) => ["install", spec, "--save-prod", "--ignore-scripts", "--prefix", taskDir], PACKED_MAX_BYTES: 8 * 1024 * 1024, ZLIB_TOO_BIG: "ERR_BUFFER_TOO_LARGE", VERSION_PATTERN: /^\d+\.\d+\.\d+(-[0-9A-Za-z.-]+)?$/, QUESTION: "Apply?", REGISTRY_URL: "https://registry.npmjs.org", REGISTRY_ACCEPT: "application/vnd.npm.install-v1+json", REGISTRY_TIMEOUT_MS: 5e3, NOTED_FIELDS: ["execution.network.type", "run.preset"], USAGE: "usage: ignitify integration:add <name> --task <slug> [--yes | --dry-run] [--dir <base-dir>]", TASK_REQUIRED: "--task <slug> is required: the task folder to add the integration to", YES_WITH_DRY_RUN: "--yes and --dry-run cannot be used together", BAD_NAME: (name, pattern) => `integration name ${JSON.stringify(name)} must match ${pattern}`, NOT_NODE: (runtime) => `integrations work with Node tasks only; this task has runtime "${runtime}"`, NO_PACKAGE_JSON: (taskDir) => `${taskDir} has no package.json: run npm init in the task folder first; nothing was changed`, NOT_INTERACTIVE: "Refusing to proceed: not a TTY. Re-run with --yes to apply the plan, or with --dry-run to see it.", PACK_FAILED: (pkg, code) => `npm pack ${pkg} failed${code === null ? "" : ` (exit ${code})`}; nothing in the task was changed`, INSTALL_FAILED: (spec, code) => `npm install ${spec} failed${code === null ? "" : ` (exit ${code})`}; task.yaml was not changed`, INSTALLED: (spec) => `${spec} installed`, BAD_VERSION: (pkg, version2) => `${pkg}: its package.json version ${JSON.stringify(version2)} is not a plain x.y.z version; nothing in the task was changed`, PACKED_TOO_BIG: (file, max) => `${file} unpacks to more than ${max} bytes: refused, nothing in the task was changed`, INSTALL_ONLY: (spec) => `installs ${spec}; task.yaml unchanged`, NOT_AN_INTEGRATION: (pkg, file) => `${pkg} has no ${file}: it is not an integration package`, BAD_MANIFEST: (pkg, issue) => `${pkg} integration.yaml: ${issue}`, UNREADABLE: (file, reason) => `cannot read ${file}: ${reason}`, WRITE_MISMATCH: (file) => `the edited ${file} does not read back as the plan; nothing was written`, YOU_ADD: "you add:", NO_CHANGES: "task.yaml already has every setting this integration needs; nothing to write", DRY_RUN: "dry run: task.yaml was not changed", WRITTEN: (file) => `${file} updated`, NOT_INSTALLED: (pkgs) => `${pkgs.join(", ")} ${pkgs.length === 1 ? "is" : "are"} in package.json but not in node_modules: run npm install, then task:validate again`, OBSOLETE: (pkg, version2, latest) => `${pkg}@${version2} is obsolete: use ${latest}`, OBSOLETE_SKIPPED: (reason) => `obsolete-version check skipped: ${reason}`, REGISTRY_UNREACHABLE: "the npm registry did not answer (offline?)", REGISTRY_NOT_FOUND: (pkg) => `${pkg} is not on the npm registry` }, NO_FLAGS = {}, DIR = { dir: "value" }, PAGE = valueFlags(PAGE_FLAG_PARAMS), YES = { yes: "bool" }, RAW = { raw: "bool" }, USAGE_FLAG_PARAMS = { period: "period", axis: "axis", vm: "vm", run: "run" }, USAGE_FILTERS = valueFlags(USAGE_FLAG_PARAMS), COMMAND_META = { [COMMANDS.HELP]: { flags: NO_FLAGS, positionals: 1, confirms: false }, [COMMANDS.LOGIN]: { flags: { ...SERVER_FLAGS, "no-browser": "bool", name: "value" }, positionals: 0, confirms: false }, [COMMANDS.LOGOUT]: { flags: NO_FLAGS, positionals: 0, confirms: false }, [COMMANDS.WHOAMI]: { flags: SERVER_FLAGS, positionals: 0, confirms: false }, [COMMANDS.QUOTA]: { flags: SERVER_FLAGS, positionals: 0, confirms: false }, [COMMANDS.TASK_CREATE]: { flags: { ...SERVER_FLAGS, ...DIR, lang: "value", local: "bool", "no-init": "bool", "no-scaffold": "bool" }, positionals: 1, confirms: false }, [COMMANDS.TASK_LIST]: { flags: { ...SERVER_FLAGS, ...PAGE }, positionals: 0, confirms: false }, [COMMANDS.TASK_GET]: { flags: { ...SERVER_FLAGS, ...DIR }, positionals: 1, confirms: false }, [COMMANDS.TASK_DELETE]: { flags: { ...SERVER_FLAGS, ...DIR, ...YES }, positionals: 1, confirms: true }, [COMMANDS.TASK_VALIDATE]: { flags: { ...SERVER_FLAGS, ...DIR, [ADVICE.FLAG]: "bool" }, positionals: 1, confirms: false }, [COMMANDS.TASK_PACK]: { flags: DIR, positionals: 1, confirms: false }, [COMMANDS.TASK_DEPLOY]: { flags: { ...SERVER_FLAGS, ...DIR, check: "bool" }, positionals: 1, confirms: false }, [COMMANDS.TASK_RUN]: { flags: { deployment: "value", payload: "value", "timeout-sec": "value", "on-busy": "value", at: "value", wait: "bool", ...DIR, ...SERVER_FLAGS }, positionals: 1, confirms: false }, [COMMANDS.DEPLOYMENT_LIST]: { flags: { ...SERVER_FLAGS, ...PAGE }, positionals: 0, confirms: false }, [COMMANDS.DEPLOYMENT_GET]: { flags: SERVER_FLAGS, positionals: 1, confirms: false }, [COMMANDS.DEPLOYMENT_LOGS]: { flags: { ...SERVER_FLAGS, ...RAW }, positionals: 1, confirms: false }, [COMMANDS.DEPLOYMENT_DELETE]: { flags: { ...SERVER_FLAGS, ...YES }, positionals: 1, confirms: true }, [COMMANDS.RUN_LIST]: { flags: { ...SERVER_FLAGS, ...valueFlags(RUN_LIST_FLAG_PARAMS) }, positionals: 0, confirms: false }, [COMMANDS.RUN_GET]: { flags: { ...SERVER_FLAGS, full: "bool" }, positionals: 1, confirms: false }, [COMMANDS.RUN_LOGS]: { flags: { ...SERVER_FLAGS, ...RAW }, positionals: 1, confirms: false }, [COMMANDS.RUN_DELETE]: { flags: { ...SERVER_FLAGS, ...YES }, positionals: 1, confirms: true }, [COMMANDS.RUN_CANCEL]: { flags: { ...SERVER_FLAGS, ...YES, force: "bool", grace: "value" }, positionals: 1, confirms: true }, [COMMANDS.VM_LIST]: { flags: { ...SERVER_FLAGS, ...valueFlags(VM_LIST_FLAG_PARAMS), pinned: "bool" }, positionals: 0, confirms: false }, [COMMANDS.VM_GET]: { flags: SERVER_FLAGS, positionals: 1, confirms: false }, [COMMANDS.VM_DELETE]: { flags: { ...SERVER_FLAGS, ...YES, force: "bool" }, positionals: 1, confirms: true }, [COMMANDS.SECRET_SET]: { flags: { ...SERVER_FLAGS, stdin: "bool", value: "value" }, positionals: 1, confirms: false, secretArgv: true }, [COMMANDS.SECRET_LIST]: { flags: SERVER_FLAGS, positionals: 0, confirms: false }, [COMMANDS.SECRET_DELETE]: { flags: { ...SERVER_FLAGS, ...YES }, positionals: 1, confirms: true }, [COMMANDS.SCHEDULE_LIST]: { flags: SERVER_FLAGS, positionals: 0, confirms: false }, [COMMANDS.SCHEDULE_CANCEL]: { flags: { ...SERVER_FLAGS, ...YES }, positionals: 1, confirms: true }, [COMMANDS.HOOK_CREATE]: { flags: { ...SERVER_FLAGS, "task-name": "value" }, positionals: 1, confirms: false }, [COMMANDS.HOOK_LIST]: { flags: { ...SERVER_FLAGS, ...PAGE }, positionals: 1, confirms: false }, [COMMANDS.HOOK_DELETE]: { flags: { ...SERVER_FLAGS, ...YES }, positionals: 1, confirms: true }, [COMMANDS.NOTIFY_SET]: { flags: { ...SERVER_FLAGS, url: "value", clear: "bool", "secret-stdin": "bool", secret: "value" }, positionals: 1, confirms: false, secretArgv: true }, [COMMANDS.INTEGRATION_ADD]: { flags: { ...DIR, ...YES, task: "value", "dry-run": "bool" }, positionals: 1, confirms: true }, [COMMANDS.USAGE]: { flags: { ...SERVER_FLAGS, ...USAGE_FILTERS, runs: "bool", vms: "bool" }, positionals: 0, confirms: false }, [COMMANDS.USAGE_EXPORT]: { flags: { ...SERVER_FLAGS, ...USAGE_FILTERS, csv: "bool" }, positionals: 0, confirms: false } }, VERSION_META = { flags: SERVER_FLAGS, positionals: 0, confirms: false }, MESSAGES = { NOT_SIGNED_IN: "Not signed in. Run 'ignitify login', or set the IGNITIFY_API_KEY environment variable.", CREDENTIALS_SYMLINK: (file) => `${file} is a symbolic link. Remove it and run 'ignitify login' again.`, CREDENTIALS_NOT_FILE: (file) => `${file} is not a regular file. Remove it and run 'ignitify login' again.`, CREDENTIALS_NOT_OWNED: (file) => `${file} belongs to another user. Remove it and run 'ignitify login' again.`, CREDENTIALS_TOO_OPEN: (file, mode) => `${file} can be read by other users (mode 0${mode}). Run: chmod 600 ${file}`, CREDENTIALS_UNREADABLE: (file) => `${file} is not a valid credentials file. Remove it and run 'ignitify login' again.`, CREDENTIALS_OTHER_URL: (fileUrl, url) => `The saved key is for ${fileUrl}, not ${url}. Run 'ignitify login --api ${url}'.`, CREDENTIALS_DIR_NOT_DIR: (dir) => `${dir} is not a folder. Remove it and run 'ignitify login' again.`, API_URL_NOT_URL: (url) => `The API address "${url}" is not a URL.`, API_URL_NOT_HTTPS: (url) => `The API address ${url} is not https. The CLI sends your key only over https, or over plain http to this machine (localhost, 127.0.0.1, ::1).`, LOGIN_REPLACED: (label) => `Note: replaced the key "${label}" of another machine. Use 'ignitify login --name <other-label>' to keep both.`, LOGIN_EXPIRED: (code) => `The code ${code} expired before it was approved. Run 'ignitify login' again.`, LOGIN_REFUSED: (reason) => `The sign-in was refused: ${reason}.`, LOGIN_UNKNOWN: "The sign-in code is unknown or was already used. Run 'ignitify login' again.", LOGIN_BAD_ANSWER: "The server sent a sign-in answer with no usable key. Nothing was saved.", LOGIN_BAD_START: "The server sent a sign-in start that the CLI cannot use (no code, or no wait times). Nothing was started.", ENV_KEY_OVERRIDES_LOGIN: "Note: the IGNITIFY_API_KEY environment variable is set, so it is used instead of your saved login.", KEY_EXPIRED_HINT: "Run 'ignitify login' to sign in again.", LOGIN_TOO_MANY: "Too many sign-in attempts from this network. Try again later.", LOGIN_CAP: (limit) => `This account already has the most API keys its plan allows${limit === null ? "" : ` (${limit})`}. Remove one, or approve with "replace", then run 'ignitify login' again.`, CANNOT_REACH: (url, detail) => `Cannot reach ${url}${detail === null ? "" : ` (${detail})`}. Check your network and run 'ignitify login' again.`, UNREACHABLE: (origin, detail) => `Cannot reach ${origin}${detail === null ? "" : ` (${detail})`}.`, LOGOUT_NOTHING: "Not signed in. There are no saved credentials.", LOGOUT_ENV_NOTE: "Note: the IGNITIFY_API_KEY environment variable is still set. Logout does not change it.", LOGOUT_NOT_REVOKED: (label) => `Warning: the server did not revoke the key, so it may still work. The saved credentials were deleted. Ask your operator to revoke the key "${label}".`, SLUG_MISSING: (source) => `'slug' is required in ${source}`, SLUG_INVALID: (source, reason) => `${source}: 'slug' ${reason}`, PRESET_INVALID: "run.preset must be a non-empty string", PRESET_UNKNOWN: (source, name, valid) => `${source}: unknown run.preset "${name}" (valid: ${valid.join(", ")}). An unrecognised preset would silently fall back to the platform default, giving you a different instance class than you declared.`, TIMEOUT_INVALID: "run.timeout_sec must be a positive number", TASK_ID_REQUIRED: "a <task-id> is required", TASK_ID_INVALID: (id, reason) => `task id ${JSON.stringify(id)} ${reason}`, ERROR: (message) => `Error: ${message}`, ERROR_PREFIX: "Error:", SERVER_TRACE_ID: (id) => `server trace id: ${id}`, ARG_REQUIRED: (label) => `${label} is required`, UNKNOWN_COMMAND: "unknown command", SEE_HELP: "Run 'ignitify help' to see every command.", UNKNOWN_SHORT_FLAG: (short, long, command) => `unknown flag ${short} (--${long}) for ${command}`, GRACE_INVALID: (got) => `--grace must be a whole number of milliseconds, 0 or more (got ${JSON.stringify(got)})`, GRACE_WITH_FORCE: "--grace has no effect with --force (force stops the run now)", TASK_LIMITS: (payload, result) => `payload max ${payload}, result max ${result}; over the limit the run fails`, PAYLOAD_OVER_LIMIT: (bytes, limit) => `payload is ${bytes} bytes; the limit is ${limit} bytes`, PAYLOAD_REFUSED_BY_SERVER: (limit) => `the server refused the payload as too large; the limit is ${limit} bytes`, DEFAULT_PAYLOAD_OVER_LIMIT: (source, bytes, limit) => `${source}: run.payload is ${bytes} bytes; the offline limit is ${limit} bytes (the server may allow more)`, IGNORED_BY_FILE: `ignored by ${IGNORE_FILE}`, IGNORED_COUNT: (n) => `${n} path(s) left out by ${IGNORE_FILE}`, TASK_DELETED: "task deleted", TASK_LINK_REMOVED: "Removed local link", TASK_LINK_NOT_REMOVED: (link, reason) => `Warning: the task is deleted, but its local link was not removed (${reason}). Remove ${link} by hand.`, DEPLOY_DELETED: "deployment deleted", RUN_DELETED: "run deleted", ABORTED: "Aborted.", CONFIRM_PROCEED: "Proceed?", SECRET_SET_USAGE: "usage: ignitify secret:set <NAME> --stdin (the value is read from stdin)", SECRET_VALUE_EMPTY: "secret:set read an empty value from stdin \u2014 nothing was stored (pipe the value in: `--stdin < value-file`)", SECRET_VALUE_ON_ARGV: `secret:set takes no value on argv: it is visible in \`ps\` and is written to your shell history. Pipe it on stdin, e.g.
1237
1353
  ignitify secret:set <NAME> --stdin < value-file
1238
1354
  printf %s "$VALUE" | ignitify secret:set <NAME> --stdin
1239
1355
  \u26A0\uFE0F The value you just typed is already in your history \u2014 rotate it.`, NOTIFY_SECRET_ON_ARGV: '--secret is not accepted: a value on argv is visible in `ps` and is written to your shell history. Use --secret-stdin, e.g.\n printf %s "$SECRET" | ignitify notify:set <deployment-id> --url <https://\u2026> --secret-stdin\n\u26A0\uFE0F The value you just typed is already in your history \u2014 rotate it.', HOOK_CREATE_USAGE: "usage: ignitify hook:create <deployment-id> --task-name <name>", HOOK_TASK_NAME_REQUIRED: `--task-name <name> is required: a hook starts a run of ONE task in the deployment, and a run without a task name fails.
@@ -1241,15 +1357,14 @@ usage: ignitify hook:create <deployment-id> --task-name <name>`, HOOK_LIST_USAGE
1241
1357
  ignitify notify:set <deployment-id> --clear
1242
1358
  --secret-stdin reads the signing secret (at least ${32} characters) from stdin; it is
1243
1359
  required with --url. There is no --secret flag: a value on argv is visible in \`ps\`
1244
- and lands in your shell history.`, NOTIFY_URL_NEEDS_SECRET: "--url needs --secret-stdin: the server refuses a notify target with no signing secret.", NOTIFY_SECRET_EMPTY: "--secret-stdin read an empty value from stdin.", NOTIFY_URL_WITH_CLEAR: "--url and --clear cannot be used together.", NOTIFY_SECRET_STDIN_VALUE: "--secret-stdin takes no value: pipe the secret on stdin.", HOOK_SECRET_SHOWN_ONCE: "\u26A0\uFE0F The secret below is shown ONCE and cannot be read back \u2014 hook:list never returns it. Store it now; if it is lost, delete the hook and create a new one.", HOOK_PAYLOAD_LIMIT: (limit) => `A webhook body over ${limit} is refused with 413 before the signature is checked.`, SECRET_DELETE_USAGE: "usage: ignitify secret:delete <NAME>", USAGE_EXPORT_USAGE: "usage: ignitify usage:export [--period YYYY-MM] (--json|--csv) (name exactly one format)", LATEST_DEPLOY_BUILDING: (task, deploymentId) => `the latest deploy of ${task} is still building (${deploymentId}). Wait for it ('ignitify deployment:get ${deploymentId}'), or pass --deployment <id> to run an older one.`, LATEST_DEPLOY_FAILED: (task, reason) => `the latest deploy of ${task} failed: ${reason ?? "no reason recorded"}. Fix the task and run 'ignitify task:deploy ${task}' again, or pass --deployment <id> to run an older one.`, RUN_AT_WITH_WAIT: "--wait cannot be used with --at: a scheduled run has no run id until it fires. Drop --wait; follow it later with 'ignitify schedule:list' and 'ignitify run:list'.", SECRET_STORED: (name) => `secret ${name} stored`, SECRET_REMOVED: (name) => `secret ${name} removed` }, RUN_STATUS = { PENDING: "PENDING", PROVISIONING: "PROVISIONING", RUNNING: "RUNNING", RETRYING: "RETRYING", COMPLETED: "COMPLETED", FAILED: "FAILED", CANCELLED: "CANCELLED" }, TERMINAL_RUN_STATUSES = [RUN_STATUS.COMPLETED, RUN_STATUS.FAILED, RUN_STATUS.CANCELLED];
1245
- ACTIVE_RUN_STATUSES = /* @__PURE__ */ new Set([RUN_STATUS.PENDING, RUN_STATUS.PROVISIONING, RUN_STATUS.RUNNING, RUN_STATUS.RETRYING]), DEPLOYMENT_STATUS = { BUILDING: "BUILDING", READY: "READY", FAILED: "FAILED", ARCHIVED: "ARCHIVED" }, POLL = { DEPLOY: { BASE_MS: 500, MAX_MS: 1e3, TIMEOUT_MS: 900 * 1e3 }, RUN: { BASE_MS: 500, MAX_MS: 3e3, TIMEOUT_MS: 1800 * 1e3 }, ERROR: { MIN_TRIES: 3, GRACE_MS: 6e4 } }, WAIT = { UPLOADING: (slug2, size) => `Uploading ${slug2}${size ? ` (${size})` : ""}`, UPLOAD_FAILED: "Upload failed", BUILDING: (deploymentId) => `Building image ${deploymentId}`, BUILT: "Image built", REUSED: "Image already built \u2014 reused", BUILD_FAILED: "Build failed", BUILD_FAILED_DETAIL: (deploymentId, reason) => `deployment ${deploymentId} failed to build \u2014 ${reason}`, BUILD_TIMEOUT: "Still building after 15 minutes \u2014 stopped waiting", BUILD_TIMEOUT_DETAIL: (deploymentId) => `deployment ${deploymentId} is still building after 15 minutes. The build has NOT been cancelled \u2014 check it with 'ignitify deployment:get ${deploymentId}'.`, RUN: (runId, status) => `Run ${runId} ${status}`, RUN_SUBMITTED: (runId) => `Run ${runId} submitted`, RUN_ENDED: (status) => `Run ${status}`, RUN_TIMEOUT: (status) => `Run is still ${status} after 30 minutes \u2014 stopped waiting`, RUN_TIMEOUT_DETAIL: (runId) => `The run has NOT been cancelled \u2014 check it with 'ignitify run:get ${runId}'.`, HINT_RETRYING: "lost contact with the server \u2014 retrying", LOST: "Lost contact with the server \u2014 stopped waiting", LOST_BUILD_DETAIL: (deploymentId, cause) => `stopped waiting for deployment ${deploymentId}: ${cause}. The build has NOT been cancelled \u2014 check it with 'ignitify deployment:get ${deploymentId}'.`, LOST_RUN_DETAIL: (runId, cause) => `stopped waiting for run ${runId}: ${cause}. The run has NOT been cancelled \u2014 check it with 'ignitify run:get ${runId}'.`, HINT_BUILD: "Ctrl+C stops waiting, not the build", HINT_RUN: "Ctrl+C stops waiting, not the run", INTERRUPTED_BUILD: (deploymentId, started) => `Stopped waiting. The build ${started ? "keeps running" : "is queued"} on the server \u2014 nothing was cancelled.
1360
+ and lands in your shell history.`, NOTIFY_URL_NEEDS_SECRET: "--url needs --secret-stdin: the server refuses a notify target with no signing secret.", NOTIFY_SECRET_EMPTY: "--secret-stdin read an empty value from stdin.", NOTIFY_URL_WITH_CLEAR: "--url and --clear cannot be used together.", NOTIFY_SECRET_STDIN_VALUE: "--secret-stdin takes no value: pipe the secret on stdin.", HOOK_SECRET_SHOWN_ONCE: "\u26A0\uFE0F The secret below is shown ONCE and cannot be read back \u2014 hook:list never returns it. Store it now; if it is lost, delete the hook and create a new one.", HOOK_PAYLOAD_LIMIT: (limit) => `A webhook body over ${limit} is refused with 413 before the signature is checked.`, SECRET_DELETE_USAGE: "usage: ignitify secret:delete <NAME>", USAGE_EXPORT_USAGE: "usage: ignitify usage:export [--period YYYY-MM] (--json|--csv) (name exactly one format)", LATEST_DEPLOY_BUILDING: (task, deploymentId) => `the latest deploy of ${task} is still building (${deploymentId}). Wait for it ('ignitify deployment:get ${deploymentId}'), or pass --deployment <id> to run an older one.`, LATEST_DEPLOY_FAILED: (task, reason) => `the latest deploy of ${task} failed: ${reason ?? "no reason recorded"}. Fix the task and run 'ignitify task:deploy ${task}' again, or pass --deployment <id> to run an older one.`, RUN_AT_WITH_WAIT: "--wait cannot be used with --at: a scheduled run has no run id until it fires. Drop --wait; follow it later with 'ignitify schedule:list' and 'ignitify run:list'.", SECRET_STORED: (name) => `secret ${name} stored`, SECRET_REMOVED: (name) => `secret ${name} removed` }, RUN_STATUS = { PENDING: "PENDING", PROVISIONING: "PROVISIONING", RUNNING: "RUNNING", RETRYING: "RETRYING", COMPLETED: "COMPLETED", FAILED: "FAILED", CANCELLED: "CANCELLED" }, ACTIVE_RUN_STATUSES = /* @__PURE__ */ new Set([RUN_STATUS.PENDING, RUN_STATUS.PROVISIONING, RUN_STATUS.RUNNING, RUN_STATUS.RETRYING]), DEPLOYMENT_STATUS = { BUILDING: "BUILDING", READY: "READY", FAILED: "FAILED", ARCHIVED: "ARCHIVED" }, POLL = { DEPLOY: { BASE_MS: 500, MAX_MS: 1e3, TIMEOUT_MS: 900 * 1e3 }, RUN: { BASE_MS: 500, MAX_MS: 3e3, TIMEOUT_MS: 1800 * 1e3 }, ERROR: { MIN_TRIES: 3, GRACE_MS: 6e4 } }, WAIT = { UPLOADING: (slug2, size) => `Uploading ${slug2}${size ? ` (${size})` : ""}`, UPLOAD_FAILED: "Upload failed", BUILDING: (deploymentId) => `Building image ${deploymentId}`, BUILT: "Image built", REUSED: "Image already built \u2014 reused", BUILD_FAILED: "Build failed", BUILD_FAILED_DETAIL: (deploymentId, reason) => `deployment ${deploymentId} failed to build \u2014 ${reason}`, BUILD_TIMEOUT: "Still building after 15 minutes \u2014 stopped waiting", BUILD_TIMEOUT_DETAIL: (deploymentId) => `deployment ${deploymentId} is still building after 15 minutes. The build has NOT been cancelled \u2014 check it with 'ignitify deployment:get ${deploymentId}'.`, RUN: (runId, status) => `Run ${runId} ${status}`, RUN_SUBMITTED: (runId) => `Run ${runId} submitted`, RUN_ENDED: (status) => `Run ${status}`, RUN_TIMEOUT: (status) => `Run is still ${status} after 30 minutes \u2014 stopped waiting`, RUN_TIMEOUT_DETAIL: (runId) => `The run has NOT been cancelled \u2014 check it with 'ignitify run:get ${runId}'.`, HINT_RETRYING: "lost contact with the server \u2014 retrying", LOST: "Lost contact with the server \u2014 stopped waiting", LOST_BUILD_DETAIL: (deploymentId, cause) => `stopped waiting for deployment ${deploymentId}: ${cause}. The build has NOT been cancelled \u2014 check it with 'ignitify deployment:get ${deploymentId}'.`, LOST_RUN_DETAIL: (runId, cause) => `stopped waiting for run ${runId}: ${cause}. The run has NOT been cancelled \u2014 check it with 'ignitify run:get ${runId}'.`, HINT_BUILD: "Ctrl+C stops waiting, not the build", HINT_RUN: "Ctrl+C stops waiting, not the run", INTERRUPTED_BUILD: (deploymentId, started) => `Stopped waiting. The build ${started ? "keeps running" : "is queued"} on the server \u2014 nothing was cancelled.
1246
1361
  Check it with: ignitify deployment:get ${deploymentId}`, INTERRUPTED_RUN: (runId) => `Stopped waiting. The run keeps going on the server \u2014 nothing was cancelled.
1247
1362
  Check it with: ignitify run:get ${runId}` };
1248
1363
  } });
1249
1364
  var ANSI, GLYPHS, LAYOUT, LABELS, EMPTY_LISTS, DISPLAY_CAPS, TITLES, PER_BRAIN_MARKER, PER_BRAIN_FOOTNOTE, POLICY_UNIT_NOTES, HIDDEN_FIELDS, RESULT_MESSAGES, RUN_CANCEL_OUTCOME, init_constants2 = __esm({ "src/output/constants.ts"() {
1250
1365
  "use strict";
1251
1366
  init_define_IGNITIFY_CLIENT_FILES();
1252
- ANSI = { reset: "\x1B[0m", bold: "\x1B[1m", dim: "\x1B[2m", underline: "\x1B[4m", red: "\x1B[31m", green: "\x1B[32m", yellow: "\x1B[33m", cyan: "\x1B[36m", clearLine: "\r\x1B[2K", hideCursor: "\x1B[?25l", showCursor: "\x1B[?25h" }, GLYPHS = { unicode: { ok: "\u2713", err: "\u2717", warn: "\u26A0", bullet: "\u2022", ellipsis: "\u2026", dash: "\u2014", rule: "\u2500", box: { tl: "\u250C", tr: "\u2510", bl: "\u2514", br: "\u2518", h: "\u2500", v: "\u2502" }, frames: ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"] }, ascii: { ok: "OK", err: "x", warn: "!", bullet: "*", ellipsis: "...", dash: "-", rule: "-", box: { tl: "+", tr: "+", bl: "+", br: "+", h: "-", v: "|" }, frames: ["-", "\\", "|", "/"] } }, LAYOUT = { MAX_WIDTH: 80, INDENT: " ", GAP: " ", MIN_COLUMN: 8, SPINNER_MS: 100, NO_UNICODE_TERMS: ["dumb", "linux"] }, LABELS = { NEXT_STEP: "Next Step:", SYSTEM_RESOURCES: "System Resources:", RESULT: "Result:", MORE_LINES: (n) => `\u2026 ${n} more lines (run:get --full shows all)`, BUILD_LOG: "Build log:", PLATFORM_BUILT_IMAGE: "Image: built and stored by the platform; there is nothing for you to download.", EARLIER_LINES: (n) => `\u2026 ${n} earlier lines (deployment:get <id> shows all)`, NO_RESULTS: "(No results)", EMPTY: "(empty)" }, EMPTY_LISTS = { ANY: { message: "(No results)" }, TASKS: { message: "No tasks yet.", next: "Create one with: ignitify task:create <task-id>" }, DEPLOYMENTS: { message: "No deployments yet.", next: "Build one with: ignitify task:deploy <task-id>" }, RUNS: { message: "No runs yet.", next: "Start one with: ignitify task:run <task-id>" }, VMS: { message: "No live VMs." }, SCHEDULES: { message: "No scheduled runs.", next: "Schedule one with: ignitify task:run <task-id> --at <iso>" }, HOOKS: { message: "No webhooks yet.", next: "Create one with: ignitify hook:create <deployment-id> --task-name <name>" } }, DISPLAY_CAPS = { RESULT_MAX_LINES: 40, BUILD_LOG_TAIL_LINES: 30, ERROR_MAX_CHARS: 2e3 }, TITLES = { TENANT_PROFILE: "Tenant Profile", TASK_REGISTERED: "Task Registered", SOURCE_PACK: "Source Upload (nothing built, nothing sent)", DEPLOYMENT_CREATED: "Deployment Created", RUN_SUBMITTED: "Run Submitted", RUN_DETAILS: "Run Details", DEPLOYMENT_DETAILS: "Deployment Details", VM_DETAILS: "VM Details", USAGE: "Usage & Limits", UNIT_WEIGHTS: "Units per run (by preset)", ENTITLEMENTS: "Entitlements (tier policy)", ENFORCED: "Enforced Limits (what this server applies)" }, PER_BRAIN_MARKER = "(per server)", PER_BRAIN_FOOTNOTE = " (per server) \u2014 each server applies this limit on its own, so the limit across all servers is at least this.", POLICY_UNIT_NOTES = { max_compute_seconds_month: "(run seconds, not the VM time `usage` shows as compute)" }, HIDDEN_FIELDS = { SCALAR: ["payload", "result", "slug"], LIST: ["payload", "result", "execution"] }, RESULT_MESSAGES = { TASK_GET_OFFLINE: (reason) => `Note: ${reason.replace(/\.$/, "")}. The server sections show UNKNOWN.`, TASK_CREATED_LOCAL: (lang, taskId, dir) => `Created ${lang} task ${taskId} at ${dir} (local only \u2014 not registered)`, HOOK_CREATED_TITLE: "Webhook Created", HOOK_SECRET_KEY: "secret (shown ONCE)", HOOK_DELETED: (id) => `Webhook deleted: ${id}`, NOTIFY_SET: (deploymentId, url) => `Notify URL for ${deploymentId} set to ${url}`, NOTIFY_CLEARED: (deploymentId) => `Notify URL for ${deploymentId} cleared`, SCHEDULE_CANCELLED: (id) => `Schedule cancelled: ${id}`, NO_SECRETS: "(no secrets)", NO_SECRETS_NEXT: "Store one with: ignitify secret:set <NAME> --stdin" }, RUN_CANCEL_OUTCOME = { ALREADY_TERMINAL: "already-terminal", DRAINING: "draining", CANCELLED: "cancelled" };
1367
+ ANSI = { reset: "\x1B[0m", bold: "\x1B[1m", dim: "\x1B[2m", underline: "\x1B[4m", red: "\x1B[31m", green: "\x1B[32m", yellow: "\x1B[33m", cyan: "\x1B[36m", clearLine: "\r\x1B[2K", hideCursor: "\x1B[?25l", showCursor: "\x1B[?25h" }, GLYPHS = { unicode: { ok: "\u2713", err: "\u2717", warn: "\u26A0", bullet: "\u2022", ellipsis: "\u2026", dash: "\u2014", rule: "\u2500", box: { tl: "\u250C", tr: "\u2510", bl: "\u2514", br: "\u2518", h: "\u2500", v: "\u2502" }, frames: ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"] }, ascii: { ok: "OK", err: "x", warn: "!", bullet: "*", ellipsis: "...", dash: "-", rule: "-", box: { tl: "+", tr: "+", bl: "+", br: "+", h: "-", v: "|" }, frames: ["-", "\\", "|", "/"] } }, LAYOUT = { MAX_WIDTH: 80, INDENT: " ", GAP: " ", MIN_COLUMN: 8, SPINNER_MS: 100, NO_UNICODE_TERMS: ["dumb", "linux"] }, LABELS = { NEXT_STEP: "Next Step:", SYSTEM_RESOURCES: "System Resources:", RESULT: "Result:", MORE_LINES: (n) => `\u2026 ${n} more lines (run:get --full shows all)`, BUILD_LOG: "Build log:", PLATFORM_BUILT_IMAGE: "Image: built and stored by the platform; there is nothing for you to download.", EARLIER_LINES: (n) => `\u2026 ${n} earlier lines (deployment:get <id> shows all)`, NO_RESULTS: "(No results)", EMPTY: "(empty)" }, EMPTY_LISTS = { ANY: { message: "(No results)" }, TASKS: { message: "No tasks yet.", next: "Create one with: ignitify task:create <task-id>" }, DEPLOYMENTS: { message: "No deployments yet.", next: "Build one with: ignitify task:deploy <task-id>" }, RUNS: { message: "No runs yet.", next: "Start one with: ignitify task:run <task-id>" }, VMS: { message: "No live VMs." }, SCHEDULES: { message: "No scheduled runs.", next: "Schedule one with: ignitify task:run <task-id> --at <iso>" }, HOOKS: { message: "No webhooks yet.", next: "Create one with: ignitify hook:create <deployment-id> --task-name <name>" } }, DISPLAY_CAPS = { RESULT_MAX_LINES: 40, BUILD_LOG_TAIL_LINES: 30, ERROR_MAX_CHARS: 2e3 }, TITLES = { TENANT_PROFILE: "Tenant Profile", TASK_REGISTERED: "Task Registered", SOURCE_PACK: "Source Upload (nothing built, nothing sent)", DEPLOYMENT_CREATED: "Deployment Created", RUN_SUBMITTED: "Run Submitted", RUN_DETAILS: "Run Details", DEPLOYMENT_DETAILS: "Deployment Details", VM_DETAILS: "VM Details", USAGE: "Usage & Limits", UNIT_WEIGHTS: "Units per run (by preset)", ENTITLEMENTS: "Entitlements (tier policy)", ENFORCED: "Enforced Limits (what this server applies)" }, PER_BRAIN_MARKER = "(per server)", PER_BRAIN_FOOTNOTE = " (per server) \u2014 each server applies this limit on its own, so the limit across all servers is at least this.", POLICY_UNIT_NOTES = { max_compute_seconds_month: "(run seconds, not the VM time `usage` shows as compute)" }, HIDDEN_FIELDS = { SCALAR: ["payload", "result", "slug"], LIST: ["payload", "result", "execution"] }, RESULT_MESSAGES = { TASK_GET_OFFLINE: (reason) => `Note: ${reason.replace(/\.$/, "")}. The server sections show UNKNOWN.`, TASK_CREATED_LOCAL: (lang, taskId, dir) => `Created ${lang} task ${taskId} at ${dir} (local only \u2014 not registered)`, HOOK_CREATED_TITLE: "Webhook Created", HOOK_SECRET_KEY: "secret (shown ONCE)", HOOK_DELETED: (id) => `Webhook deleted: ${id}`, NOTIFY_SET: (deploymentId, url) => `Notify URL for ${deploymentId} set to ${url}`, NOTIFY_CLEARED: (deploymentId) => `Notify URL for ${deploymentId} cleared`, SCHEDULE_CANCELLED: (id) => `Schedule cancelled: ${id}`, SCHEDULE_CANCEL_PREVIEW: (id) => `Will cancel schedule ${id} \u2014 it will never fire.`, SCHEDULE_NOT_CANCELLED: (id) => `Schedule ${id} was NOT cancelled: not found, already fired, or currently firing.`, HOOK_DELETE_PREVIEW: (id) => `Will delete webhook ${id}. A sender that posts to it is refused from then on.`, SECRET_DELETE_PREVIEW: (name) => `Will delete secret ${name}. Its value cannot be read back.`, DEPLOYMENT_DELETE_PREVIEW: (id) => `Will soft-delete deployment ${id} and all its runs (cascade).`, RUN_DELETE_PREVIEW: (id) => `Will soft-delete run ${id}.`, RUN_ALREADY_OVER: (id, status) => `Run ${id} is already ${status} \u2014 nothing to cancel.`, RUN_CANCEL_PREVIEW: (id, force) => force ? `Will cancel run ${id} immediately (force: destroys the VM even if it is pinned).` : `Will ask run ${id} to stop gracefully; it is killed if it does not finish in time.`, RUN_STOPPING: (id, grace, was) => `Run ${id} is stopping${grace}${was} \u2014 still RUNNING until it finishes or the grace expires.`, RUN_CANCELLED: (id, was) => `Run cancelled: ${id}${was}`, LOG_TRUNCATED: (lines) => `truncated \u2014 ${lines} line(s) shown; the log was cut at the size cap.`, NO_SECRETS: "(no secrets)", NO_SECRETS_NEXT: "Store one with: ignitify secret:set <NAME> --stdin" }, RUN_CANCEL_OUTCOME = { ALREADY_TERMINAL: "already-terminal", DRAINING: "draining", CANCELLED: "cancelled" };
1253
1368
  } });
1254
1369
  function makeStyle(o) {
1255
1370
  let p = (...codes) => paint(o.colour, ...codes), columns = Math.max(o.width, 1);
@@ -1509,7 +1624,7 @@ var init_execution = __esm({ "../../packages/execution/index.ts"() {
1509
1624
  init_egress_match();
1510
1625
  init_ingress_hostname();
1511
1626
  } });
1512
- var sectionHeader, layout, filterScalars, filterDisplayKeys, BYTE_UNITS, formatBytes, quotaLine, storeLine, renderWhoami, hasUnits, renderUnitWeights, showEnforced, renderEnforcedBlock, renderPolicyValue, renderPolicyBlock, renderUsageBlocks, renderUsage, renderTaskCreate, renderPack, renderDeploy, renderRunSubmit, renderRunNotices, renderCapacity, capacityBlock, renderRunGet, renderList, imageSize, renderDeploymentList, packagesLine, renderDeploymentGet, formatDuration, renderVmList, pinLines, renderVmRows, renderVmGet, nextStepBanner, init_formatters = __esm({ "src/output/formatters.ts"() {
1627
+ var sectionHeader, layout, filterScalars, filterDisplayKeys, BYTE_UNITS2, formatBytes, quotaLine, storeLine, renderWhoami, hasUnits, renderUnitWeights, showEnforced, renderEnforcedBlock, renderPolicyValue, renderPolicyBlock, renderUsageBlocks, renderUsage, renderTaskCreate, renderPack, renderDeploy, renderRunSubmit, renderRunNotices, isStorageClamped, renderCapacity, capacityBlock, renderRunGet, renderList, imageSize, renderDeploymentList, packagesLine, renderDeploymentGet, formatDuration, renderVmList, pinLines, renderVmRows, renderVmGet, nextStepBanner, init_formatters = __esm({ "src/output/formatters.ts"() {
1513
1628
  "use strict";
1514
1629
  init_define_IGNITIFY_CLIENT_FILES();
1515
1630
  init_constants();
@@ -1523,17 +1638,13 @@ var sectionHeader, layout, filterScalars, filterDisplayKeys, BYTE_UNITS, formatB
1523
1638
  ${heading(st, title, success)}
1524
1639
  `, layout = (header, content, footer = "") => `${header}${content}${footer ? `
1525
1640
  ` + footer : `
1526
- `}`, filterScalars = (data) => {
1527
- let filtered = {};
1528
- for (let [k, v] of Object.entries(data)) typeof v != "object" && !HIDDEN_FIELDS.SCALAR.includes(k) && (filtered[k] = v);
1529
- return filtered;
1530
- }, filterDisplayKeys = (data) => {
1641
+ `}`, filterScalars = (data) => Object.fromEntries(Object.entries(data).filter(([k, v]) => typeof v != "object" && !HIDDEN_FIELDS.SCALAR.includes(k))), filterDisplayKeys = (data) => {
1531
1642
  let { slug: _slug, ...rest } = data;
1532
1643
  return rest;
1533
- }, BYTE_UNITS = ["B", "KiB", "MiB", "GiB", "TiB"], formatBytes = (bytes2) => {
1534
- if (!Number.isFinite(bytes2) || bytes2 <= 0) return "0 B";
1535
- let exp = Math.min(Math.floor(Math.log2(bytes2) / 10), BYTE_UNITS.length - 1), value = bytes2 / 2 ** (10 * exp);
1536
- return `${exp === 0 ? value : value.toFixed(1)} ${BYTE_UNITS[exp]}`;
1644
+ }, BYTE_UNITS2 = ["B", "KiB", "MiB", "GiB", "TiB"], formatBytes = (bytes) => {
1645
+ if (!Number.isFinite(bytes) || bytes <= 0) return "0 B";
1646
+ let exp = Math.min(Math.floor(Math.log2(bytes) / 10), BYTE_UNITS2.length - 1), value = bytes / 2 ** (10 * exp);
1647
+ return `${exp === 0 ? value : value.toFixed(1)} ${BYTE_UNITS2[exp]}`;
1537
1648
  }, quotaLine = (used, max) => `${used} / ${max ?? "unlimited"}`, storeLine = (used, max) => max === void 0 ? formatBytes(used) : `${formatBytes(used)} / ${max === null ? "unlimited" : formatBytes(max)}`, renderWhoami = (data, st = PLAIN) => {
1538
1649
  if (!data) return "";
1539
1650
  let { limits, usage, tier, policy, bound_by, status_reason, policy_scope, enforced, unit_weights, capacity, ...identity } = data, identityRows = { ...identity };
@@ -1541,20 +1652,16 @@ ${heading(st, title, success)}
1541
1652
  let out2 = layout(sectionHeader(st, TITLES.TENANT_PROFILE), renderFields(st, filterDisplayKeys(identityRows)));
1542
1653
  return (limits || usage) && (out2 += renderUsageBlocks(st, limits, usage)), out2 += capacityBlock(st, capacity), hasUnits(limits) && unit_weights && (out2 += renderUnitWeights(st, unit_weights)), policy && (out2 += renderPolicyBlock(st, policy, policy_scope?.per_brain ?? [])), enforced && enforced.length > 0 && (out2 += renderEnforcedBlock(st, enforced)), out2;
1543
1654
  }, hasUnits = (limits) => typeof limits?.max_units == "number", renderUnitWeights = (st, weights) => layout(sectionHeader(st, TITLES.UNIT_WEIGHTS), renderFields(st, Object.fromEntries(Object.entries(weights).map(([p, w]) => [p, String(w)])))), showEnforced = (v) => v === null ? "\u2014" : String(v), renderEnforcedBlock = (st, rows) => {
1544
- let out2 = {};
1545
- for (let r of rows) {
1655
+ let enforcedText = (r) => {
1546
1656
  let value = showEnforced(r.enforced);
1547
- out2[r.column] = r.winner === "host-clamp" ? `${value} (platform cap; tier asked ${showEnforced(r.tier)})` : r.winner === "host-default" ? `${value} (platform default)` : value;
1548
- }
1657
+ return r.winner === "host-clamp" ? `${value} (platform cap; tier asked ${showEnforced(r.tier)})` : r.winner === "host-default" ? `${value} (platform default)` : value;
1658
+ }, out2 = Object.fromEntries(rows.map((r) => [r.column, enforcedText(r)]));
1549
1659
  return layout(sectionHeader(st, TITLES.ENFORCED), renderFields(st, out2));
1550
1660
  }, renderPolicyValue = (key, v) => key === "allowed_presets" ? Array.isArray(v) ? v.join(", ") : "all" : v == null ? "unlimited" : typeof v == "boolean" ? v ? "yes" : "no" : String(v), renderPolicyBlock = (st, policy, perBrain = []) => {
1551
- let scoped = new Set(perBrain), rows = {};
1552
- for (let [k, v] of Object.entries(policy)) {
1553
- if (k === "tier_id" || k === "tier_name" || k === "tier_version") continue;
1661
+ let scoped = new Set(perBrain), policyText = (k, v) => {
1554
1662
  let value = POLICY_UNIT_NOTES[k] ? `${renderPolicyValue(k, v)} ${POLICY_UNIT_NOTES[k]}` : renderPolicyValue(k, v);
1555
- rows[k] = scoped.has(k) ? `${value} ${PER_BRAIN_MARKER}` : value;
1556
- }
1557
- let block = layout(sectionHeader(st, TITLES.ENTITLEMENTS), renderFields(st, rows));
1663
+ return scoped.has(k) ? `${value} ${PER_BRAIN_MARKER}` : value;
1664
+ }, rows = Object.fromEntries(Object.entries(policy).filter(([k]) => k !== "tier_id" && k !== "tier_name" && k !== "tier_version").map(([k, v]) => [k, policyText(k, v)])), block = layout(sectionHeader(st, TITLES.ENTITLEMENTS), renderFields(st, rows));
1558
1665
  return scoped.size === 0 ? block : `${block}
1559
1666
  ${st.dim(PER_BRAIN_FOOTNOTE)}
1560
1667
  `;
@@ -1581,12 +1688,13 @@ ${bullets(st, [LABELS.PLATFORM_BUILT_IMAGE])}
1581
1688
  return layout(sectionHeader(st, TITLES.RUN_SUBMITTED, true), renderFields(st, filterDisplayKeys(rest))) + (noticeText ? `
1582
1689
  ${st.yellow(noticeText)}
1583
1690
  ` : "") + capacityBlock(st, capacity);
1584
- }, renderRunNotices = (notices) => Array.isArray(notices) ? notices.map((n) => n.code === "storage-clamped" ? STORAGE_MESSAGES.clamped(n.requested, n.preset, n.effective) : "").filter((line) => line !== "").join(`
1585
- `) : "", renderCapacity = (capacity, st = PLAIN) => {
1586
- let c = capacity;
1587
- if (!c || !Array.isArray(c.limits) || c.limits.length === 0) return "";
1588
- let lines = c.limits.map((l) => `Monthly ${l.text}`), since = typeof c.period_start == "string" ? `Since ${c.period_start} \xB7 ` : "";
1589
- return lines.push(st.dim(`${since}Resets ${c.resets_at ?? `at ${RESETS_AT_NEXT_RENEWAL}`} \xB7 details: ${c.usage_command ?? USAGE_DETAIL_COMMAND}`)), lines.join(`
1691
+ }, renderRunNotices = (notices) => Array.isArray(notices) ? notices.filter(isStorageClamped).map((n) => STORAGE_MESSAGES.clamped(n.requested, n.preset, n.effective)).join(`
1692
+ `) : "", isStorageClamped = (n) => isRecord(n) && n.code === "storage-clamped" && typeof n.preset == "string" && typeof n.requested == "number" && typeof n.effective == "number", renderCapacity = (capacity, st = PLAIN) => {
1693
+ if (!isRecord(capacity) || !Array.isArray(capacity.limits)) return "";
1694
+ let texts = capacity.limits.flatMap((l) => isRecord(l) && typeof l.text == "string" ? [l.text] : []);
1695
+ if (texts.length === 0) return "";
1696
+ let { period_start: periodStart, resets_at: resetsAt, usage_command: usageCommand } = capacity, since = typeof periodStart == "string" ? `Since ${periodStart} \xB7 ` : "", resets = typeof resetsAt == "string" ? resetsAt : `at ${RESETS_AT_NEXT_RENEWAL}`, details = typeof usageCommand == "string" ? usageCommand : USAGE_DETAIL_COMMAND;
1697
+ return [...texts.map((t) => `Monthly ${t}`), st.dim(`${since}Resets ${resets} \xB7 details: ${details}`)].join(`
1590
1698
  `);
1591
1699
  }, capacityBlock = (st, capacity) => {
1592
1700
  let text = renderCapacity(capacity, st);
@@ -1608,7 +1716,7 @@ ${emptyState(st, empty.message, empty.next)}
1608
1716
  return `
1609
1717
  ${renderTable(st, columns, rows)}
1610
1718
  `;
1611
- }, imageSize = (bytes2, present) => present === false ? "(missing)" : bytes2 === null ? "unknown" : formatBytes(Number(bytes2)), renderDeploymentList = (data, st = PLAIN) => {
1719
+ }, imageSize = (bytes, present) => present === false ? "(missing)" : bytes === null ? "unknown" : formatBytes(Number(bytes)), renderDeploymentList = (data, st = PLAIN) => {
1612
1720
  let rows = data.deployments ?? [], total = data.tenant_total_bytes, limit = data.tenant_limit_bytes, display = rows.map(({ image_bytes, image_present, ...rest }) => ({ ...rest, ...image_bytes !== void 0 ? { size: imageSize(image_bytes, image_present) } : {} })), out2 = renderList(display, st, EMPTY_LISTS.DEPLOYMENTS);
1613
1721
  if (total !== void 0 && rows.length > 0) {
1614
1722
  let of = typeof limit == "number" ? ` of ${formatBytes(limit)}` : "";
@@ -1617,10 +1725,10 @@ ${renderTable(st, columns, rows)}
1617
1725
  }
1618
1726
  return out2;
1619
1727
  }, packagesLine = (v) => {
1620
- if (typeof v != "object" || v === null) return;
1728
+ if (!isRecord(v)) return;
1621
1729
  let { names, drive } = v;
1622
1730
  if (!Array.isArray(names) || names.length === 0) return;
1623
- let d = drive, size = d != null && typeof d.bytes == "number" ? `drive ${formatBytes(d.bytes)} (snapshot ${String(d.snapshot)})` : "drive not built yet";
1731
+ let size = isRecord(drive) && typeof drive.bytes == "number" ? `drive ${formatBytes(drive.bytes)} (snapshot ${String(drive.snapshot)})` : "drive not built yet";
1624
1732
  return `${names.join(", ")} \xB7 ${size}`;
1625
1733
  }, renderDeploymentGet = (data, st = PLAIN) => {
1626
1734
  if (!data) return "";
@@ -1647,10 +1755,11 @@ ${st.dim("Command template for next step:")} ${st.bold(LABELS.NEXT_STEP)} ${temp
1647
1755
  ${st.dim("Full command:")} ${st.cyan(actual)}
1648
1756
  `;
1649
1757
  } });
1650
- var str, slug, WORKFLOW, isRecord, resolveNextStep, init_next_step = __esm({ "src/output/next-step.ts"() {
1758
+ var str, slug, WORKFLOW, resolveNextStep, init_next_step = __esm({ "src/output/next-step.ts"() {
1651
1759
  "use strict";
1652
1760
  init_define_IGNITIFY_CLIENT_FILES();
1653
- str = (v) => typeof v == "string" && v !== "" ? v : void 0, slug = (data) => str(data.slug) ?? str(data.task_id) ?? "<task_id>", WORKFLOW = { "task:create": { template: "ignitify task:deploy <task_id>", resolve: (d) => `ignitify task:deploy ${slug(d)}` }, "task:pack": { template: "ignitify task:deploy <task_id>", resolve: (d) => `ignitify task:deploy ${slug(d)}` }, "task:deploy": { template: "ignitify task:run <task_id>", resolve: (d) => `ignitify task:run ${slug(d)}` }, "task:run": { template: "ignitify run:get <run_id>", resolve: (d) => `ignitify run:get ${str(d.resource_id) ?? str(d.run_id) ?? "<run_id>"}` } }, isRecord = (v) => typeof v == "object" && v !== null && !Array.isArray(v), resolveNextStep = (command, data) => {
1761
+ init_tenant();
1762
+ str = (v) => typeof v == "string" && v !== "" ? v : void 0, slug = (data) => str(data.slug) ?? str(data.task_id) ?? "<task_id>", WORKFLOW = { "task:create": { template: "ignitify task:deploy <task_id>", resolve: (d) => `ignitify task:deploy ${slug(d)}` }, "task:pack": { template: "ignitify task:deploy <task_id>", resolve: (d) => `ignitify task:deploy ${slug(d)}` }, "task:deploy": { template: "ignitify task:run <task_id>", resolve: (d) => `ignitify task:run ${slug(d)}` }, "task:run": { template: "ignitify run:get <run_id>", resolve: (d) => `ignitify run:get ${str(d.resource_id) ?? str(d.run_id) ?? "<run_id>"}` } }, resolveNextStep = (command, data) => {
1654
1763
  let step = WORKFLOW[command];
1655
1764
  return step ? { template: step.template, actual: step.resolve(isRecord(data) ? data : {}) } : null;
1656
1765
  };
@@ -1696,8 +1805,8 @@ var RENDERERS, jsonMode, sayStream, outStyle, errStyle, writeRaw, out, sayOk, wa
1696
1805
  RENDERERS = { whoami: renderWhoami, quota: renderUsage, "task:create": renderTaskCreate, "task:pack": renderPack, "task:deploy": renderDeploy, "task:run": renderRunSubmit, "run:get": renderRunGet, "task:list": (d, st) => renderList(d, st, EMPTY_LISTS.TASKS), "deployment:list": renderDeploymentList, "deployment:get": renderDeploymentGet, "run:list": (d, st) => renderList(d, st, EMPTY_LISTS.RUNS), "vm:list": renderVmList, "vm:get": renderVmGet, "schedule:list": (d, st) => renderList(d, st, EMPTY_LISTS.SCHEDULES) }, jsonMode = false;
1697
1806
  sayStream = () => jsonMode ? process.stderr : process.stdout;
1698
1807
  outStyle = () => streamStyle(process.stdout), errStyle = () => streamStyle(process.stderr);
1699
- writeRaw = (bytes2) => {
1700
- process.stdout.write(bytes2);
1808
+ writeRaw = (bytes) => {
1809
+ process.stdout.write(bytes);
1701
1810
  }, out = (text) => console.log(text), sayOk = (text) => say(successLine(screenStyle(), text));
1702
1811
  warn = (text) => console.error(noteLine(errStyle(), text)), tell = (text) => console.error(text), printWarnings = (ws) => ws.forEach((w) => console.error(warnMark(errStyle(), w))), printErrors = (es) => es.forEach((e) => console.error(errorMark(errStyle(), e)));
1703
1812
  CliOutputManager = { render(command, data) {
@@ -1936,66 +2045,38 @@ var FATE_TEXT, printDeletionPlan, init_deletion_plan = __esm({ "src/output/delet
1936
2045
  FATE_TEXT = { "cancelled-via-vm-teardown": "its VM is destroyed and the run is recorded as CANCELLED", "deleted-while-pending": "never dispatched \u2014 deleted before it could start", "unknown-status": "unrecognised status; this CLI cannot say what happens to it" };
1937
2046
  printDeletionPlan = (plan) => say(renderDeletionPlan(screenStyle(), plan));
1938
2047
  } });
1939
- function explainRunRefusal(message) {
1940
- let body = apiErrorBody(message)?.body, pinned = body?.reason === "bidirectional-busy" ? body.pinned === true : message.includes("bidirectional deployment runs one VM at a time") ? message.includes("PINNED") : null;
2048
+ function explainRunRefusal(e) {
2049
+ let body = httpErrorJson(e)?.body, message = errText(e), pinned = body?.reason === "bidirectional-busy" ? body.pinned === true : message.includes("bidirectional deployment runs one VM at a time") ? message.includes("PINNED") : null;
1941
2050
  if (pinned === null) return null;
1942
2051
  let lines = ["\u2717 Run refused \u2014 this bidirectional deployment already has a live VM.", "", " Concurrent VMs for bidirectional-network tasks are not supported", " (one VM at a time)."];
1943
2052
  if (pinned) {
1944
- let vmId = typeof body?.vm_id == "string" && body.vm_id !== "" ? body.vm_id : "<vm-id>";
2053
+ let vmField = body?.vm_id, vmId = typeof vmField == "string" && vmField !== "" ? vmField : "<vm-id>";
1945
2054
  lines.push("", " Why it was not queued, even if you asked for --on-busy=queue:", " A PINNED VM has no idle timeout \u2014 it stays up until it is explicitly", " removed, so queueing behind it could wait forever.", "", " What you can do now:", " \u2022 Reuse the pinned VM \u2014 submit the run against it instead", ' \u2022 Use network.type "egress" if this task needs no inbound traffic', ` \u2022 Remove it yourself: ignitify vm:delete ${vmId} --force`);
1946
2055
  } else lines.push("", " Retry when the live VM finishes, or omit --on-busy=reject to queue instead.");
1947
2056
  return lines.join(`
1948
2057
  `);
1949
2058
  }
1950
- function explainLimitRefusal(message) {
1951
- let refused = apiErrorBody(message);
2059
+ function explainLimitRefusal(e) {
2060
+ let refused = httpErrorJson(e);
1952
2061
  if (!refused || refused.status !== 429) return null;
1953
- let body = refused.body;
1954
- return typeof body.summary != "string" || body.summary === "" ? null : [`\u2717 Run refused \u2014 a monthly limit is reached (${body.reason ?? "429"}).`, ` ${body.summary}`].join(`
2062
+ let { summary, reason } = refused.body;
2063
+ return typeof summary != "string" || summary === "" ? null : [`\u2717 Run refused \u2014 a monthly limit is reached (${typeof reason == "string" ? reason : "429"}).`, ` ${summary}`].join(`
1955
2064
  `);
1956
2065
  }
1957
- function apiErrorBody(message) {
1958
- let m = /^API (\d{3}): (\{[\s\S]*\})$/.exec(message.trim());
1959
- if (!m) return null;
1960
- try {
1961
- let body = JSON.parse(m[2]);
1962
- return typeof body != "object" || body === null || Array.isArray(body) ? null : { status: Number(m[1]), body };
1963
- } catch {
1964
- return null;
1965
- }
1966
- }
1967
2066
  var isPayloadTooLarge, init_run_refusal = __esm({ "src/output/run-refusal.ts"() {
1968
2067
  "use strict";
1969
2068
  init_define_IGNITIFY_CLIENT_FILES();
1970
- isPayloadTooLarge = (message) => apiErrorBody(message)?.status === 413;
2069
+ init_http_client();
2070
+ init_tenant();
2071
+ isPayloadTooLarge = (e) => e instanceof HttpError && e.status === 413;
1971
2072
  } });
1972
- function quantity(n, unit) {
1973
- return unit === "bytes" ? bytes(n) : unit === "ms" ? duration(n) : unit === "byte-hours" ? byteHours(n) : `${n}`;
1974
- }
1975
- function byteHours(n) {
1976
- let u = ["B\xB7h", "KiB\xB7h", "MiB\xB7h", "GiB\xB7h", "TiB\xB7h", "PiB\xB7h"], i = 0, v = n;
1977
- for (; v >= 1024 && i < u.length - 1; ) v /= 1024, i += 1;
1978
- return i === 0 ? `${n} B\xB7h` : `${v.toFixed(1)} ${u[i]}`;
1979
- }
1980
- function bytes(n) {
1981
- let u = ["B", "KB", "MB", "GB", "TB"], i = 0, v = n;
1982
- for (; v >= 1024 && i < u.length - 1; ) v /= 1024, i += 1;
1983
- return i === 0 ? `${n} B` : `${v.toFixed(1)} ${u[i]}`;
1984
- }
1985
- function duration(ms) {
1986
- if (ms < 1e3) return `${ms} ms`;
1987
- let s = Math.round(ms / 1e3);
1988
- if (s < 60) return `${s} s`;
1989
- let m = Math.floor(s / 60);
1990
- return m < 60 ? `${m}m ${s % 60}s` : `${Math.floor(m / 60)}h ${m % 60}m`;
1991
- }
1992
2073
  function renderUsageReport(st, r, opts = { lines: false }) {
1993
2074
  let I2 = LAYOUT.INDENT, out2 = [`${heading(st, `usage for ${r.period}`)}${r.filtered ? st.dim(" (filtered)") : ""}`, ""];
1994
- return out2.push(renderTable(st, [{ header: "AXIS", keep: true }, { header: "QUANTITY", keep: true }, { header: "LINES", keep: true }, { header: "RECONCILIATION" }], r.totals.map((t) => [t.axis, quantity(t.quantity, t.unit), t.lines, reconcileNote(t)]), { indent: I2 })), r.totals.some((t) => t.axis === "disk" || t.axis === "scratch") && (out2.push("", st.dim(`${I2}note: \`disk\` = your build images \xD7 the hours each was held this month (still-held images included);`)), out2.push(st.dim(`${I2} \`scratch\` = each VM's scratch drive \xD7 the hours the VM ran. 1 GiB\xB7h = 1 GiB for one hour.`))), r.totals.some((t) => t.axis === "compute") && out2.push("", st.dim(`${I2}note: \`compute\` = VM time (boot to teardown). Your monthly compute limit counts run seconds instead.`)), out2.push("", `${I2}runs started ${r.counters.runs_started} deployments created ${r.counters.deployments_created} API requests ${r.counters.api_requests_approx} (approx)`), opts.lines && out2.push("", renderTable(st, [{ header: "AXIS", keep: true }, { header: "QUANTITY", keep: true }, { header: "VM / RUN", keep: true }, { header: "DETAIL" }], r.lines.map((l) => [l.axis, quantity(l.quantity, l.unit), l.run_id ?? l.vm_id ?? l.deployment_id ?? st.glyphs.dash, l.detail ?? ""]), { indent: I2 })), out2.join(`
2075
+ return out2.push(renderTable(st, [{ header: "AXIS", keep: true }, { header: "QUANTITY", keep: true }, { header: "LINES", keep: true }, { header: "RECONCILIATION" }], r.totals.map((t) => [t.axis, formatUsageQuantity(t.quantity, t.unit), t.lines, reconcileNote(t)]), { indent: I2 })), r.totals.some((t) => t.axis === "disk" || t.axis === "scratch") && (out2.push("", st.dim(`${I2}note: \`disk\` = your build images \xD7 the hours each was held this month (still-held images included);`)), out2.push(st.dim(`${I2} \`scratch\` = each VM's scratch drive \xD7 the hours the VM ran. 1 GiB\xB7h = 1 GiB for one hour.`))), r.totals.some((t) => t.axis === "compute") && out2.push("", st.dim(`${I2}note: \`compute\` = VM time (boot to teardown). Your monthly compute limit counts run seconds instead.`)), out2.push("", `${I2}runs started ${r.counters.runs_started} deployments created ${r.counters.deployments_created} API requests ${r.counters.api_requests_approx} (approx)`), opts.lines && out2.push("", renderTable(st, [{ header: "AXIS", keep: true }, { header: "QUANTITY", keep: true }, { header: "VM / RUN", keep: true }, { header: "DETAIL" }], r.lines.map((l) => [l.axis, formatUsageQuantity(l.quantity, l.unit), l.run_id ?? l.vm_id ?? l.deployment_id ?? st.glyphs.dash, l.detail ?? ""]), { indent: I2 })), out2.join(`
1995
2076
  `);
1996
2077
  }
1997
2078
  function reconcileNote(t) {
1998
- return !t.reconcilable || t.counter === null || t.drift === null ? t.reconciliation === "none" ? "\u2014" : "not checked (filtered)" : t.drift === 0 ? "agrees with the meter" : t.reconciliation === "inequality" && t.drift > 0 ? `${t.drift} still in flight` : `meter differs by ${quantity(Math.abs(t.drift), t.unit)}`;
2079
+ return !t.reconcilable || t.counter === null || t.drift === null ? t.reconciliation === "none" ? "\u2014" : "not checked (filtered)" : t.drift === 0 ? "agrees with the meter" : t.reconciliation === "inequality" && t.drift > 0 ? `${t.drift} still in flight` : `meter differs by ${formatUsageQuantity(Math.abs(t.drift), t.unit)}`;
1999
2080
  }
2000
2081
  function toCsv(r) {
2001
2082
  let head = "axis,vm_id,run_id,deployment_id,window_start,window_end,quantity,unit,detail", rows = r.lines.map((l) => csvRow([l.axis, l.vm_id ?? "", l.run_id ?? "", l.deployment_id ?? "", l.window_start ?? "", l.window_end ?? "", String(l.quantity), l.unit, l.detail ?? ""]));
@@ -2034,50 +2115,27 @@ function planAdvice(config) {
2034
2115
  let checked = checkSystemPackages(declared);
2035
2116
  return checked.ok ? { kind: "call", request: { names: checked.names, runtime: config.runtime } } : { kind: "skip", reason: checked.reason === "bad-names" ? ADVICE.BAD_NAMES(checked.bad) : ADVICE.TOO_MANY(checked.count, 64) };
2036
2117
  }
2037
- function jsonBody(body) {
2038
- try {
2039
- let v = JSON.parse(body);
2040
- return typeof v == "object" && v !== null ? v : {};
2041
- } catch {
2042
- return {};
2043
- }
2044
- }
2045
- function adviceFailure(status, body) {
2046
- let parsed = jsonBody(body);
2118
+ function adviceFailure(e) {
2119
+ let { status, body } = e, parsed = httpErrorJson(e)?.body ?? {};
2047
2120
  return status === 429 && typeof parsed.retry_after_s == "number" ? { kind: "rate-limited", retryAfterS: parsed.retry_after_s } : status === 503 && typeof parsed.reason == "string" ? { kind: "unavailable", reason: parsed.reason } : { kind: "error", status, message: body };
2048
2121
  }
2049
2122
  var init_package_advice3 = __esm({ "src/core/package-advice.ts"() {
2050
2123
  "use strict";
2051
2124
  init_define_IGNITIFY_CLIENT_FILES();
2125
+ init_http_client();
2052
2126
  init_tenant();
2053
2127
  init_constants();
2054
2128
  } });
2055
2129
  var version, init_package = __esm({ "package.json"() {
2056
- version = "1.2.0";
2130
+ version = "1.2.1";
2057
2131
  } });
2058
2132
  var byCreatedAtDesc, init_sort = __esm({ "src/utils/sort.ts"() {
2059
2133
  "use strict";
2060
2134
  init_define_IGNITIFY_CLIENT_FILES();
2061
2135
  byCreatedAtDesc = (rows) => [...rows].sort((a, b) => (b.created_at ?? "").localeCompare(a.created_at ?? ""));
2062
2136
  } });
2063
- var normalizeContentHash, init_hash = __esm({ "src/utils/hash.ts"() {
2064
- "use strict";
2065
- init_define_IGNITIFY_CLIENT_FILES();
2066
- normalizeContentHash = (hash) => hash.replace(/^sha256:/, "");
2067
- } });
2068
- function strOpt(args, key) {
2069
- let bare = bareValueFlag(args, [key]);
2070
- if (bare !== void 0) throw new Error(needsValueMessage(bare));
2071
- let v = args.options[key];
2072
- return typeof v == "string" ? v : void 0;
2073
- }
2074
- function flagParams(args, map2) {
2075
- let params = {};
2076
- for (let [flag, param] of Object.entries(map2)) {
2077
- let v = strOpt(args, flag);
2078
- v !== void 0 && (params[param] = v);
2079
- }
2080
- return params;
2137
+ function apiUrlOf(args) {
2138
+ return strOpt(args, "api") ?? DEFAULTS.API_URL;
2081
2139
  }
2082
2140
  function boolFlag(args, key) {
2083
2141
  return args.options[key] === true;
@@ -2092,33 +2150,23 @@ function requireArg(args, label) {
2092
2150
  var init_args2 = __esm({ "src/utils/args.ts"() {
2093
2151
  "use strict";
2094
2152
  init_define_IGNITIFY_CLIENT_FILES();
2095
- init_http_client();
2096
2153
  init_constants();
2097
2154
  init_output();
2155
+ init_http_client();
2156
+ init_http_client();
2098
2157
  } });
2099
- function errorMessage(e) {
2100
- return e instanceof Error ? e.message : String(e);
2101
- }
2102
2158
  function traceLine(e) {
2103
2159
  return e instanceof HttpError && e.traceId ? MESSAGES.SERVER_TRACE_ID(e.traceId) : null;
2104
2160
  }
2105
2161
  function keyExpiredHint(e) {
2106
- if (!(e instanceof HttpError) || e.status !== 401) return null;
2107
- try {
2108
- return JSON.parse(e.body)?.error === KEY_EXPIRED_ERROR ? MESSAGES.KEY_EXPIRED_HINT : null;
2109
- } catch {
2110
- return null;
2111
- }
2162
+ let refused = httpErrorJson(e);
2163
+ return refused?.status === 401 && refused.body.error === KEY_EXPIRED_ERROR ? MESSAGES.KEY_EXPIRED_HINT : null;
2112
2164
  }
2113
2165
  function printError(e) {
2114
- fail(errorMessage(e), { hint: keyExpiredHint(e), trace: traceLine(e) });
2166
+ fail(errText(e), { hint: keyExpiredHint(e), trace: traceLine(e) });
2115
2167
  }
2116
2168
  async function guard(body) {
2117
- try {
2118
- return await body();
2119
- } catch (e) {
2120
- return printError(e), 1;
2121
- }
2169
+ return await guardValue(body) ?? 1;
2122
2170
  }
2123
2171
  async function guardValue(body) {
2124
2172
  try {
@@ -2194,7 +2242,6 @@ var init_utils = __esm({ "src/utils/index.ts"() {
2194
2242
  "use strict";
2195
2243
  init_define_IGNITIFY_CLIENT_FILES();
2196
2244
  init_sort();
2197
- init_hash();
2198
2245
  init_args2();
2199
2246
  init_guard();
2200
2247
  init_prompt_flow();
@@ -2229,7 +2276,7 @@ async function describeServer(baseUrl, fetchImpl = fetch, check = noteServerVers
2229
2276
  return `API: ${api} at ${baseUrl}${floor ? ` (minimum client ${floor})` : ""}`;
2230
2277
  }
2231
2278
  async function runVersion(args, fetchImpl = fetch) {
2232
- let baseUrl = strOpt(args, "api") ?? DEFAULTS.API_URL, st = outStyle();
2279
+ let baseUrl = apiUrlOf(args), st = outStyle();
2233
2280
  return out(`${st.bold(`ignitify ${CLIENT_VERSION}`)} ${st.dim(`(built for API ${API_VERSION})`)}`), out(st.dim(await describeServer(baseUrl, fetchImpl))), 0;
2234
2281
  }
2235
2282
  var CLIENT_VERSION, PROBE_TIMEOUT_MS, noteServerVersion, init_version = __esm({ "src/io/version.ts"() {
@@ -2249,7 +2296,7 @@ function openNoFollow(file, fsx = import_node_fs.default) {
2249
2296
  try {
2250
2297
  fd = fsx.openSync(file, NO_FOLLOW_READ_FLAGS);
2251
2298
  } catch (e) {
2252
- let code = e?.code;
2299
+ let code = errCode(e);
2253
2300
  if (code === "ENOENT") return { kind: "missing" };
2254
2301
  if (code === "ELOOP") return { kind: "symlink" };
2255
2302
  throw e;
@@ -2263,7 +2310,9 @@ function openNoFollow(file, fsx = import_node_fs.default) {
2263
2310
  var import_node_fs, NO_FOLLOW_READ_FLAGS, init_no_follow = __esm({ "src/io/no-follow.ts"() {
2264
2311
  "use strict";
2265
2312
  init_define_IGNITIFY_CLIENT_FILES();
2266
- import_node_fs = __toESM(require("node:fs"), 1), NO_FOLLOW_READ_FLAGS = import_node_fs.default.constants.O_RDONLY | (import_node_fs.default.constants.O_NOFOLLOW ?? 0) | (import_node_fs.default.constants.O_NONBLOCK ?? 0);
2313
+ import_node_fs = __toESM(require("node:fs"), 1);
2314
+ init_tenant();
2315
+ NO_FOLLOW_READ_FLAGS = import_node_fs.default.constants.O_RDONLY | (import_node_fs.default.constants.O_NOFOLLOW ?? 0) | (import_node_fs.default.constants.O_NONBLOCK ?? 0);
2267
2316
  } });
2268
2317
  function credentialsPath(env = process.env, home = import_node_os.default.homedir()) {
2269
2318
  let xdg = env.XDG_CONFIG_HOME, base = xdg && import_node_path.default.isAbsolute(xdg) ? xdg : import_node_path.default.join(home, ".config");
@@ -2288,10 +2337,9 @@ function parseCredentials(text) {
2288
2337
  } catch {
2289
2338
  return null;
2290
2339
  }
2291
- let d = doc;
2292
- if (!d || typeof d != "object" || d.version !== 1) return null;
2293
- for (let k of ["api_url", "api_key", "key_id", "label", "saved_at"]) if (typeof d[k] != "string" || d[k] === "") return null;
2294
- return d;
2340
+ if (!isRecord(doc) || doc.version !== 1) return null;
2341
+ let { api_url, api_key, key_id, label, saved_at } = doc;
2342
+ return !isFilled(api_url) || !isFilled(api_key) || !isFilled(key_id) || !isFilled(label) || !isFilled(saved_at) ? null : { version: 1, api_url, api_key, key_id, label, saved_at };
2295
2343
  }
2296
2344
  function readCredentials(file = credentialsPath(), fsx = import_node_fs2.default) {
2297
2345
  let opened = openNoFollow(file, fsx);
@@ -2331,13 +2379,15 @@ function deleteCredentials(file = credentialsPath(), fsx = import_node_fs2.defau
2331
2379
  throw e;
2332
2380
  }
2333
2381
  }
2334
- var import_node_fs2, import_node_os, import_node_path, import_node_crypto, myUid, isMissing, init_credentials = __esm({ "src/io/credentials.ts"() {
2382
+ var import_node_fs2, import_node_os, import_node_path, import_node_crypto, isFilled, myUid, init_credentials = __esm({ "src/io/credentials.ts"() {
2335
2383
  "use strict";
2336
2384
  init_define_IGNITIFY_CLIENT_FILES();
2337
2385
  import_node_fs2 = __toESM(require("node:fs"), 1), import_node_os = __toESM(require("node:os"), 1), import_node_path = __toESM(require("node:path"), 1), import_node_crypto = require("node:crypto");
2386
+ init_tenant();
2338
2387
  init_constants();
2339
2388
  init_no_follow();
2340
- myUid = () => typeof process.getuid == "function" ? process.getuid() : null, isMissing = (e) => e?.code === "ENOENT";
2389
+ isFilled = (v) => typeof v == "string" && v !== "";
2390
+ myUid = () => typeof process.getuid == "function" ? process.getuid() : null;
2341
2391
  } });
2342
2392
  function codeOf(cause) {
2343
2393
  let code = cause?.code;
@@ -2385,17 +2435,15 @@ var UnreachableError, init_unreachable = __esm({ "src/core/unreachable.ts"() {
2385
2435
  }
2386
2436
  };
2387
2437
  } });
2388
- function isLoopbackHost(hostname) {
2389
- return hostname === "localhost" || hostname === "[::1]" || /^127(?:\.\d{1,3}){3}$/.test(hostname);
2390
- }
2391
2438
  function apiUrlRefusal(url) {
2392
- let u;
2393
- try {
2394
- u = new URL(url);
2395
- } catch {
2396
- return MESSAGES.API_URL_NOT_URL(url);
2439
+ switch (keyUrlRefusal(url)) {
2440
+ case "not-url":
2441
+ return MESSAGES.API_URL_NOT_URL(url);
2442
+ case "insecure":
2443
+ return MESSAGES.API_URL_NOT_HTTPS(url);
2444
+ case null:
2445
+ return null;
2397
2446
  }
2398
- return u.protocol === "https:" || u.protocol === "http:" && isLoopbackHost(u.hostname) ? null : MESSAGES.API_URL_NOT_HTTPS(url);
2399
2447
  }
2400
2448
  function assertApiUrl(url) {
2401
2449
  let refusal = apiUrlRefusal(url);
@@ -2405,6 +2453,7 @@ function assertApiUrl(url) {
2405
2453
  var init_api_url = __esm({ "src/core/api-url.ts"() {
2406
2454
  "use strict";
2407
2455
  init_define_IGNITIFY_CLIENT_FILES();
2456
+ init_http_client();
2408
2457
  init_constants();
2409
2458
  } });
2410
2459
  function resolveApiConfig(apiOverride, env = process.env, read = () => readCredentials(), note = noteEnvOverride) {
@@ -2456,7 +2505,7 @@ async function pollDeviceLogin(cfg, deviceCode, fetchImpl) {
2456
2505
  try {
2457
2506
  body = await request(`${cfg.baseUrl}${TENANT_PATHS.AUTH_DEVICE_TOKEN}`, { method: "POST", headers: { "content-type": "application/json", ...versionHeader }, body: { device_code: deviceCode }, fetchImpl: viaApi(fetchImpl), ...readHeaders });
2458
2507
  } catch (e) {
2459
- let wait = e instanceof HttpError && e.status === 429 ? slowDownOf(e.body) : null;
2508
+ let wait = slowDownOf(e);
2460
2509
  if (wait === null) throw e;
2461
2510
  return { kind: "wait", interval: wait };
2462
2511
  }
@@ -2466,13 +2515,11 @@ async function pollDeviceLogin(cfg, deviceCode, fetchImpl) {
2466
2515
  if (!key || typeof key.api_key != "string" || key.api_key === "" || typeof key.key_id != "string" || typeof key.label != "string" || typeof key.tenant?.resource_id != "string") throw new BadAnswerError(MESSAGES.LOGIN_BAD_ANSWER);
2467
2516
  return { kind: "key", key };
2468
2517
  }
2469
- function slowDownOf(text) {
2470
- try {
2471
- let b = JSON.parse(text);
2472
- return b.status === "slow_down" && typeof b.interval == "number" ? b.interval : null;
2473
- } catch {
2474
- return null;
2475
- }
2518
+ function slowDownOf(e) {
2519
+ let refused = httpErrorJson(e);
2520
+ if (refused?.status !== 429 || refused.body.status !== "slow_down") return null;
2521
+ let interval = refused.body.interval;
2522
+ return typeof interval == "number" ? interval : null;
2476
2523
  }
2477
2524
  function revokeOwnKey(cfg, fetchImpl) {
2478
2525
  return apiDelete(cfg, TENANT_PATHS.AUTH_KEY, fetchImpl);
@@ -2484,8 +2531,9 @@ async function postDeployment(cfg, taskId, manifest, tar, fetchImpl) {
2484
2531
  let form = new FormData();
2485
2532
  return form.set("task_id", taskId), form.set("manifest", JSON.stringify(manifest)), form.set("bundle", new Blob([new Uint8Array(tar)], { type: "application/x-tar" }), "bundle.tar"), await request(`${cfg.baseUrl}${TENANT_PATHS.DEPLOYMENTS}`, { method: "POST", headers: authHeaders(cfg), body: form, fetchImpl: viaApi(fetchImpl), timeoutMs: 3e5, ...readHeaders });
2486
2533
  }
2487
- async function postRun(cfg, run2, fetchImpl) {
2488
- return await request(`${cfg.baseUrl}${TENANT_PATHS.RUNS}`, { method: "POST", headers: { ...authHeaders(cfg), "content-type": "application/json" }, body: { deployment_id: run2.deploymentId, task_name: run2.taskName, payload: run2.payload, preset: run2.preset, timeout_sec: run2.timeoutSec, execution: run2.execution, at: run2.at }, fetchImpl: viaApi(fetchImpl), ...readHeaders });
2534
+ function postRun(cfg, run2, fetchImpl) {
2535
+ let body = { deployment_id: run2.deploymentId, task_name: run2.taskName, payload: run2.payload, preset: run2.preset, timeout_sec: run2.timeoutSec, execution: run2.execution, at: run2.at };
2536
+ return apiPost(cfg, TENANT_PATHS.RUNS, body, fetchImpl);
2489
2537
  }
2490
2538
  async function listSchedules(cfg, fetchImpl) {
2491
2539
  return apiGet(cfg, TENANT_PATHS.SCHEDULES, fetchImpl);
@@ -2536,7 +2584,7 @@ async function postPackageAdvice(cfg, body, fetchImpl) {
2536
2584
  try {
2537
2585
  return { kind: "ok", response: await apiPost(cfg, TENANT_PATHS.PACKAGE_ADVICE, body, fetchImpl, ADVICE.TIMEOUT_MS) };
2538
2586
  } catch (e) {
2539
- return e instanceof HttpError ? adviceFailure(e.status, e.body) : { kind: "error", status: null, message: e instanceof Error ? e.message : String(e) };
2587
+ return e instanceof HttpError ? adviceFailure(e) : { kind: "error", status: null, message: errText(e) };
2540
2588
  }
2541
2589
  }
2542
2590
  async function createTask(cfg, slug2, fetchImpl) {
@@ -2621,8 +2669,8 @@ var readHeaders, noteEnvOverride, versionHeader, BadAnswerError, init_api = __es
2621
2669
  };
2622
2670
  } });
2623
2671
  function payloadRefusal(payload, limit) {
2624
- let bytes2 = payloadBytes(payload);
2625
- return bytes2 > limit ? MESSAGES.PAYLOAD_OVER_LIMIT(bytes2, limit) : null;
2672
+ let bytes = payloadBytes(payload);
2673
+ return bytes > limit ? MESSAGES.PAYLOAD_OVER_LIMIT(bytes, limit) : null;
2626
2674
  }
2627
2675
  var payloadBytes, limitOrFallback, formatLimit, limitsNote, init_payload_limit = __esm({ "src/core/payload-limit.ts"() {
2628
2676
  "use strict";
@@ -2630,7 +2678,7 @@ var payloadBytes, limitOrFallback, formatLimit, limitsNote, init_payload_limit =
2630
2678
  init_constants();
2631
2679
  init_output();
2632
2680
  payloadBytes = (payload) => Buffer.byteLength(JSON.stringify(payload) ?? "", "utf8"), limitOrFallback = (limit, fallback) => typeof limit == "number" && Number.isFinite(limit) && limit > 0 ? limit : fallback;
2633
- formatLimit = (bytes2) => formatBytes(bytes2).replace(/\.0 /, " "), limitsNote = () => MESSAGES.TASK_LIMITS(formatLimit(PAYLOAD_LIMIT_FALLBACK_BYTES), formatLimit(RESULT_LIMIT_FALLBACK_BYTES));
2681
+ formatLimit = (bytes) => formatBytes(bytes).replace(/\.0 /, " "), limitsNote = () => MESSAGES.TASK_LIMITS(formatLimit(PAYLOAD_LIMIT_FALLBACK_BYTES), formatLimit(RESULT_LIMIT_FALLBACK_BYTES));
2634
2682
  } });
2635
2683
  function apiConfig(args) {
2636
2684
  return resolveApiConfig(strOpt(args, "api"));
@@ -2639,20 +2687,27 @@ async function payloadLimit(cfg) {
2639
2687
  let whoami = await getWhoami(cfg).catch(() => null);
2640
2688
  return limitOrFallback(whoami?.limits.max_payload_bytes, PAYLOAD_LIMIT_FALLBACK_BYTES);
2641
2689
  }
2642
- function consoleLogText(bytes2, out2) {
2643
- return out2.raw ? bytes2 : terminalSafe(bytes2, out2.colour);
2690
+ function consoleLogText(bytes, out2) {
2691
+ return out2.raw ? bytes : terminalSafe(bytes, out2.colour);
2644
2692
  }
2645
2693
  function printConsoleLog(data, raw, colour = outStyle().colour) {
2646
2694
  if (writeRaw(consoleLogText(typeof data?.bytes == "string" ? data.bytes : "", { raw, colour })), data?.truncated === true) {
2647
2695
  let lines = typeof data.lines == "number" ? data.lines : 0;
2648
2696
  tell(`
2649
- ${warnMark(errStyle(), `truncated \u2014 ${lines} line(s) shown; the log was cut at the size cap.`)}`);
2697
+ ${warnMark(errStyle(), RESULT_MESSAGES.LOG_TRUNCATED(lines))}`);
2650
2698
  }
2651
2699
  }
2652
2700
  function noteNextPage(args, list2, rows) {
2653
2701
  let note = nextPageNoteFor2(args, list2, rows);
2654
2702
  note !== void 0 && warn(note);
2655
2703
  }
2704
+ async function runPagedList(args, verb) {
2705
+ let badLimit = limitRefusal(args);
2706
+ return badLimit !== null ? (fail(badLimit), 1) : guard(async () => {
2707
+ let data = await verb.fetchPage(apiConfig(args), { ...flagParams(args, verb.list.flags), ...verb.extra });
2708
+ return verb.show(data), noteNextPage(args, verb.list, verb.rowsOf(data)), 0;
2709
+ });
2710
+ }
2656
2711
  var init_shared = __esm({ "src/commands/shared.ts"() {
2657
2712
  "use strict";
2658
2713
  init_define_IGNITIFY_CLIENT_FILES();
@@ -2682,6 +2737,41 @@ var init_identity = __esm({ "src/commands/identity.ts"() {
2682
2737
  init_output();
2683
2738
  init_shared();
2684
2739
  } });
2740
+ function backoffDelayMs(attempt, cadence) {
2741
+ return cappedExponentialMs(attempt, cadence.BASE_MS, cadence.MAX_MS);
2742
+ }
2743
+ function isTransientError(e) {
2744
+ return e instanceof HttpError ? e.status === 408 || e.status === 429 || e.status >= 500 && e.status <= 599 : e instanceof TypeError ? true : e instanceof Error && isRecord(e.cause) && e.cause.name === "TimeoutError";
2745
+ }
2746
+ function decidePollError(e, failuresInARow, failingForMs) {
2747
+ return isTransientError(e) ? failuresInARow >= POLL.ERROR.MIN_TRIES && failingForMs >= POLL.ERROR.GRACE_MS ? "give-up" : "retry" : "give-up";
2748
+ }
2749
+ async function pollUntil(loop) {
2750
+ let sleep = loop.clock?.sleep ?? REAL_CLOCK.sleep, now = loop.clock?.now ?? REAL_CLOCK.now, startedAt = now(), failures = 0, firstFailureAt = 0;
2751
+ for (let attempt = 0; ; ) {
2752
+ let view;
2753
+ try {
2754
+ view = await loop.fetch();
2755
+ } catch (error) {
2756
+ if (failures === 0 && (firstFailureAt = now()), failures += 1, decidePollError(error, failures, now() - firstFailureAt) === "give-up") return { kind: "lost", error };
2757
+ loop.onRetry?.(error), await sleep(loop.retryDelayMs);
2758
+ continue;
2759
+ }
2760
+ failures = 0, loop.onView?.(view);
2761
+ let action = loop.decide(view, now() - startedAt, attempt);
2762
+ if (!isWait(action)) return { action, view };
2763
+ loop.onWait?.(view, attempt), await sleep(action.delayMs), attempt += 1;
2764
+ }
2765
+ }
2766
+ var isWait, isLost, init_poll = __esm({ "src/core/poll.ts"() {
2767
+ "use strict";
2768
+ init_define_IGNITIFY_CLIENT_FILES();
2769
+ init_http_client();
2770
+ init_tenant();
2771
+ init_constants();
2772
+ init_utils();
2773
+ isWait = (action) => action.kind === "wait", isLost = (end) => "kind" in end && end.kind === "lost";
2774
+ } });
2685
2775
  function shortenHome(file, home) {
2686
2776
  if (home === "" || !file.startsWith(home)) return file;
2687
2777
  let rest = file.slice(home.length);
@@ -2710,9 +2800,6 @@ var INDENT, renderWaitingStatic, init_login_view = __esm({ "src/commands/login-v
2710
2800
  INDENT = " ";
2711
2801
  renderWaitingStatic = (minutes) => LOGIN_VIEW.WAITING_STATIC(minutes);
2712
2802
  } });
2713
- function formatUserCode(code) {
2714
- return code.length === 8 ? `${code.slice(0, 4)}-${code.slice(4)}` : code;
2715
- }
2716
2803
  function replacedKeyNote(replacedKeyId, ownKeyId, label) {
2717
2804
  return !replacedKeyId || replacedKeyId === ownKeyId ? null : MESSAGES.LOGIN_REPLACED(label);
2718
2805
  }
@@ -2745,15 +2832,8 @@ async function withRetries(baseUrl, clock, waitMs, call) {
2745
2832
  await clock.sleep(waitMs);
2746
2833
  }
2747
2834
  }
2748
- function bodyOf(e) {
2749
- try {
2750
- return JSON.parse(e.body);
2751
- } catch {
2752
- return {};
2753
- }
2754
- }
2755
2835
  function pollFailure(e, userCode) {
2756
- let body = bodyOf(e);
2836
+ let body = httpErrorJson(e)?.body ?? {};
2757
2837
  switch (e.status) {
2758
2838
  case 410:
2759
2839
  return MESSAGES.LOGIN_EXPIRED(formatUserCode(userCode));
@@ -2782,7 +2862,7 @@ async function pollForKey(baseUrl, started, deadline, deps) {
2782
2862
  }
2783
2863
  async function runLogin(args, deps = {}) {
2784
2864
  return guard(async () => {
2785
- let clock = deps.clock ?? REAL_CLOCK, baseUrl = assertApiUrl(strOpt(args, "api") ?? DEFAULTS.API_URL), label = strOpt(args, "name") ?? (deps.hostname ?? import_node_os2.default.hostname)(), file = deps.file ?? credentialsPath(deps.env), started = await withRetries(baseUrl, clock, START_RETRY_MS, () => startDeviceLogin({ baseUrl }, { label, cli_version: CLIENT_VERSION }, deps.fetchImpl)).catch((e) => {
2865
+ let clock = deps.clock ?? REAL_CLOCK, baseUrl = assertApiUrl(apiUrlOf(args)), label = strOpt(args, "name") ?? (deps.hostname ?? import_node_os2.default.hostname)(), file = deps.file ?? credentialsPath(deps.env), started = await withRetries(baseUrl, clock, START_RETRY_MS, () => startDeviceLogin({ baseUrl }, { label, cli_version: CLIENT_VERSION }, deps.fetchImpl)).catch((e) => {
2786
2866
  throw e instanceof HttpError && e.status === 429 ? new Error(MESSAGES.LOGIN_TOO_MANY, { cause: e }) : e;
2787
2867
  }), env = deps.env ?? process.env, st = screenStyle(deps.screen, env), url = started.verification_uri_complete;
2788
2868
  if (say(renderLoginStart(st, { code: formatUserCode(started.user_code), url })), say(""), url !== null) {
@@ -2830,35 +2910,28 @@ var import_node_os2, import_node_child_process, START_RETRY_MS, retryable, reach
2830
2910
  "use strict";
2831
2911
  init_define_IGNITIFY_CLIENT_FILES();
2832
2912
  import_node_os2 = __toESM(require("node:os"), 1), import_node_child_process = require("node:child_process");
2913
+ init_tenant();
2833
2914
  init_http_client();
2915
+ init_tenant();
2834
2916
  init_api();
2835
2917
  init_credentials();
2836
2918
  init_version();
2837
2919
  init_unreachable();
2920
+ init_poll();
2838
2921
  init_api_url();
2839
2922
  init_constants();
2840
2923
  init_utils();
2841
2924
  init_output();
2842
2925
  init_login_view();
2843
- START_RETRY_MS = 1e3, retryable = (e) => !(e instanceof BadAnswerError) && (!(e instanceof HttpError) || e.status >= 500), reachDetail = (e) => e instanceof UnreachableError ? e.detail : null;
2844
- } });
2845
- function filters(args) {
2846
- let q = {}, period = strOpt(args, "period");
2847
- period !== void 0 && (q.period = period);
2848
- let axis = strOpt(args, "axis");
2849
- axis !== void 0 && (q.axis = axis);
2850
- let vm = strOpt(args, "vm");
2851
- vm !== void 0 && (q.vm = vm);
2852
- let run2 = strOpt(args, "run");
2853
- return run2 !== void 0 && (q.run = run2), q;
2854
- }
2926
+ START_RETRY_MS = 1e3, retryable = (e) => isTransientError(e) && !(e instanceof HttpError && e.status === 429), reachDetail = (e) => e instanceof UnreachableError ? e.detail : isTransientError(e) && !(e instanceof HttpError) && !(e instanceof TypeError) ? errText(e) : null;
2927
+ } });
2855
2928
  function selectLines(lines, runs, vms) {
2856
2929
  return lines.filter((l) => runs && l.run_id !== null || vms && l.vm_id !== null);
2857
2930
  }
2858
2931
  async function runUsageShow(args) {
2859
2932
  return guard(async () => {
2860
2933
  let report = await getUsage(apiConfig(args), filters(args));
2861
- if (boolFlag(args, "json")) return out(JSON.stringify(report, null, 2)), 0;
2934
+ if (boolFlag(args, "json")) return emit(report), 0;
2862
2935
  let runs = boolFlag(args, "runs"), vms = boolFlag(args, "vms"), shown = { ...report, lines: selectLines(report.lines, runs, vms) };
2863
2936
  return out(renderUsageReport(outStyle(), shown, { lines: runs || vms })), 0;
2864
2937
  });
@@ -2871,7 +2944,7 @@ async function runUsageExport(args) {
2871
2944
  return out(json2 ? JSON.stringify(report.lines, null, 2) : toCsv(report)), 0;
2872
2945
  });
2873
2946
  }
2874
- var init_usage_report = __esm({ "src/commands/usage-report.ts"() {
2947
+ var filters, init_usage_report = __esm({ "src/commands/usage-report.ts"() {
2875
2948
  "use strict";
2876
2949
  init_define_IGNITIFY_CLIENT_FILES();
2877
2950
  init_api();
@@ -2880,10 +2953,10 @@ var init_usage_report = __esm({ "src/commands/usage-report.ts"() {
2880
2953
  init_usage2();
2881
2954
  init_output();
2882
2955
  init_constants();
2956
+ filters = (args) => flagParams(args, USAGE_FLAG_PARAMS);
2883
2957
  } });
2884
2958
  function planTaskDeletion(input) {
2885
- let affected = [];
2886
- for (let run2 of input.runs) isTerminalRunStatus(run2.status) || affected.push({ runId: run2.id, status: run2.status, ...run2.vm_id ? { vmId: run2.vm_id } : {}, fate: fateOf(run2.status) });
2959
+ let affected = input.runs.filter((run2) => !isTerminalRunStatus(run2.status)).map((run2) => ({ runId: run2.id, status: run2.status, ...run2.vm_id ? { vmId: run2.vm_id } : {}, fate: fateOf(run2.status) }));
2887
2960
  return { taskSlug: input.taskSlug, deploymentCount: input.deploymentCount, runCount: input.runCount, affected, unlinkDirs: linkedDirs(input.taskId, input.folders), hasInFlight: affected.length > 0 };
2888
2961
  }
2889
2962
  function linkedDirs(taskId, folders) {
@@ -2941,6 +3014,19 @@ var VALUE_FLAGS, init_run_options = __esm({ "src/core/run-options.ts"() {
2941
3014
  init_utils();
2942
3015
  VALUE_FLAGS = Object.entries(COMMAND_META[COMMANDS.TASK_RUN].flags).filter(([, kind]) => kind === "value").map(([flag]) => flag);
2943
3016
  } });
3017
+ function writeFileAtomic(file, text) {
3018
+ let exists = import_node_fs3.default.existsSync(file), target = exists ? import_node_fs3.default.realpathSync(file) : file, mode = exists ? import_node_fs3.default.statSync(target).mode & 511 : NEW_FILE_MODE, name = `.${import_node_path2.default.basename(target)}.${process.pid}.${(0, import_node_crypto2.randomBytes)(6).toString("hex")}.tmp`, tmp = import_node_path2.default.join(import_node_path2.default.dirname(target), name);
3019
+ try {
3020
+ import_node_fs3.default.writeFileSync(tmp, text, { mode, flag: "wx" }), exists && import_node_fs3.default.chmodSync(tmp, mode), import_node_fs3.default.renameSync(tmp, target);
3021
+ } finally {
3022
+ import_node_fs3.default.rmSync(tmp, { force: true });
3023
+ }
3024
+ }
3025
+ var import_node_crypto2, import_node_fs3, import_node_path2, NEW_FILE_MODE, init_fs_atomic = __esm({ "src/io/fs-atomic.ts"() {
3026
+ "use strict";
3027
+ init_define_IGNITIFY_CLIENT_FILES();
3028
+ import_node_crypto2 = require("node:crypto"), import_node_fs3 = __toESM(require("node:fs"), 1), import_node_path2 = __toESM(require("node:path"), 1), NEW_FILE_MODE = 438;
3029
+ } });
2944
3030
  function parseState(raw) {
2945
3031
  let parsed;
2946
3032
  try {
@@ -2948,9 +3034,12 @@ function parseState(raw) {
2948
3034
  } catch {
2949
3035
  return {};
2950
3036
  }
2951
- if (typeof parsed != "object" || parsed === null) return {};
2952
- let obj = parsed, out2 = {};
2953
- for (let key of STATE_KEYS) typeof obj[key] == "string" && (out2[key] = obj[key]);
3037
+ if (!isRecord(parsed)) return {};
3038
+ let out2 = {};
3039
+ for (let key of STATE_KEYS) {
3040
+ let value = parsed[key];
3041
+ typeof value == "string" && (out2[key] = value);
3042
+ }
2954
3043
  return out2;
2955
3044
  }
2956
3045
  function serializeState(state) {
@@ -2964,19 +3053,19 @@ function writeState(taskDir, patch2) {
2964
3053
  let merged = { ...readState(taskDir), ...patch2 }, statePath = import_path.default.join(taskDir, STATE.DIR, STATE.FILE);
2965
3054
  import_fs.default.mkdirSync(import_path.default.dirname(statePath), { recursive: true });
2966
3055
  let ignorePath = import_path.default.join(import_path.default.dirname(statePath), STATE.GITIGNORE_FILE);
2967
- import_fs.default.existsSync(ignorePath) || import_fs.default.writeFileSync(ignorePath, STATE.GITIGNORE_TEXT);
2968
- let tmpPath = `${statePath}.tmp`;
2969
- return import_fs.default.writeFileSync(tmpPath, serializeState(merged)), import_fs.default.renameSync(tmpPath, statePath), merged;
3056
+ return import_fs.default.existsSync(ignorePath) || import_fs.default.writeFileSync(ignorePath, STATE.GITIGNORE_TEXT), writeFileAtomic(statePath, serializeState(merged)), merged;
2970
3057
  }
2971
3058
  var import_fs, import_path, STATE_KEYS, init_state = __esm({ "src/io/state.ts"() {
2972
3059
  "use strict";
2973
3060
  init_define_IGNITIFY_CLIENT_FILES();
2974
3061
  import_fs = __toESM(require("fs"), 1), import_path = __toESM(require("path"), 1);
3062
+ init_tenant();
3063
+ init_fs_atomic();
2975
3064
  init_constants();
2976
3065
  STATE_KEYS = ["task_id", "task_resource_id", "deployment_id"];
2977
3066
  } });
2978
3067
  function buildTaskReport(inputs) {
2979
- let { slug: slug2, deployments, runs, usage } = inputs, taskDeployments = deployments === null ? null : deployments.filter((d) => d.task_slug === slug2), firstPage = (rows) => rows.length >= inputs.pageLimit ? ` (first ${inputs.pageLimit} shown; more may exist)` : "", newDeployment = decideNewDeployment(inputs.localContentHash, taskDeployments), newVm = decideNewVm(inputs.declared, inputs.declaredPreset, inputs.stateDeploymentId, newDeployment, runs), deployed = taskDeployments === null ? { yes: "unknown", detail: inputs.stateDeploymentId ? `server unreachable; .ignitify/state.json points at ${inputs.stateDeploymentId}` : "server unreachable; no local deployment pointer either" } : taskDeployments.length > 0 ? { yes: true, detail: `${taskDeployments.length} live deployment(s)${firstPage(taskDeployments)}${inputs.stateDeploymentId && !taskDeployments.some((d) => d.id === inputs.stateDeploymentId) ? ` \u2014 WARNING: state.json points at ${inputs.stateDeploymentId}, which is not among them (deleted?)` : ""}` } : { yes: false, detail: "no live deployments for this task" }, deploymentSummaries = taskDeployments === null ? "unknown" : byCreatedAtDesc(taskDeployments).map((d) => ({ id: d.id ?? "?", created_at: d.created_at ?? "?", status: d.status ?? "?", content_hash: normalizeContentHash(d.content_hash ?? "").slice(0, 12), image_bytes: d.image_bytes ?? 0, detailCommand: `ignitify deployment:get ${d.id ?? "<id>"}` })), runsSummary = runs === null ? "unknown" : { total: runs.length, firstPageOnly: runs.length >= inputs.pageLimit, byStatus: runs.reduce((acc, r) => {
3068
+ let { slug: slug2, deployments, runs, usage } = inputs, taskDeployments = deployments === null ? null : deployments.filter((d) => d.task_slug === slug2), firstPage = (rows) => rows.length >= inputs.pageLimit ? ` (first ${inputs.pageLimit} shown; more may exist)` : "", newDeployment = decideNewDeployment(inputs.localContentHash, taskDeployments), newVm = decideNewVm(inputs.declared, inputs.declaredPreset, inputs.stateDeploymentId, newDeployment, runs), deployed = taskDeployments === null ? { yes: "unknown", detail: inputs.stateDeploymentId ? `server unreachable; .ignitify/state.json points at ${inputs.stateDeploymentId}` : "server unreachable; no local deployment pointer either" } : taskDeployments.length > 0 ? { yes: true, detail: `${taskDeployments.length} live deployment(s)${firstPage(taskDeployments)}${inputs.stateDeploymentId && !taskDeployments.some((d) => d.id === inputs.stateDeploymentId) ? ` \u2014 WARNING: state.json points at ${inputs.stateDeploymentId}, which is not among them (deleted?)` : ""}` } : { yes: false, detail: "no live deployments for this task" }, deploymentSummaries = taskDeployments === null ? "unknown" : byCreatedAtDesc(taskDeployments).map((d) => ({ id: d.id ?? "?", created_at: d.created_at ?? "?", status: d.status ?? "?", content_hash: stripSha256Prefix(d.content_hash ?? "").slice(0, 12), image_bytes: d.image_bytes ?? 0, detailCommand: `ignitify deployment:get ${d.id ?? "<id>"}` })), runsSummary = runs === null ? "unknown" : { total: runs.length, firstPageOnly: runs.length >= inputs.pageLimit, byStatus: runs.reduce((acc, r) => {
2980
3069
  let s = r.status ?? "?";
2981
3070
  return acc[s] = (acc[s] ?? 0) + 1, acc;
2982
3071
  }, /* @__PURE__ */ Object.create(null)), recent: byCreatedAtDesc(runs).slice(0, 5).map((r) => ({ id: r.id ?? "?", created_at: r.created_at ?? "?", status: r.status ?? "?", detailCommand: `ignitify run:get ${r.id ?? "<id>"}` })), listCommand: `ignitify run:list --task-name ${slug2}` };
@@ -3014,20 +3103,18 @@ function formatTaskReport(r) {
3014
3103
  return lines.join(`
3015
3104
  `);
3016
3105
  }
3017
- var FINGERPRINT_AXES, resolveOrNull, runNature, fingerprintDiffs, presetIndeterminate, decideNewDeployment, decideNewVm, decideInbound, verdictLine, init_report = __esm({ "src/core/report.ts"() {
3106
+ var FINGERPRINT_AXES, resolveOrNull, DEFAULT_NATURE, runNature, fingerprintDiffs, presetIndeterminate, decideNewDeployment, decideNewVm, decideInbound, verdictLine, init_report = __esm({ "src/core/report.ts"() {
3018
3107
  "use strict";
3019
3108
  init_define_IGNITIFY_CLIENT_FILES();
3020
3109
  init_execution();
3021
3110
  init_output();
3111
+ init_tenant();
3022
3112
  init_utils();
3023
3113
  init_constants();
3024
3114
  FINGERPRINT_AXES = ["network", "storage_mib", "cardinality", "state", "interaction", "duration", "residency"], resolveOrNull = (declared) => {
3025
3115
  let r = resolveNature(declared, PLATFORM_DEFAULT_NATURE);
3026
3116
  return r.ok ? r.nature : null;
3027
- }, runNature = (run2) => {
3028
- let declared = run2.execution ?? void 0;
3029
- return resolveOrNull(declared) ?? resolveNature(void 0, PLATFORM_DEFAULT_NATURE).nature;
3030
- }, fingerprintDiffs = (prev, next, prevPreset, nextPreset) => {
3117
+ }, DEFAULT_NATURE = resolveOrNull(void 0) ?? PLATFORM_DEFAULT_NATURE, runNature = (run2) => resolveOrNull(run2.execution ?? void 0) ?? DEFAULT_NATURE, fingerprintDiffs = (prev, next, prevPreset, nextPreset) => {
3031
3118
  let diffs = [];
3032
3119
  prevPreset !== void 0 && nextPreset !== void 0 && prevPreset !== nextPreset && diffs.push(`preset ${prevPreset}\u2192${nextPreset}`);
3033
3120
  for (let axis of FINGERPRINT_AXES) prev[axis] !== next[axis] && diffs.push(`${axis} ${String(prev[axis] ?? "default")}\u2192${String(next[axis] ?? "default")}`);
@@ -3036,7 +3123,7 @@ var FINGERPRINT_AXES, resolveOrNull, runNature, fingerprintDiffs, presetIndeterm
3036
3123
  if (taskDeployments === null) return { needed: "unknown", reasons: ["server unreachable \u2014 cannot compare against live deployments"] };
3037
3124
  if (taskDeployments.length === 0) return { needed: true, reasons: ["no live deployment exists for this task (never deployed, or all deleted)"] };
3038
3125
  if (localContentHash === null) return { needed: "unknown", reasons: ["the local content hash could not be computed \u2014 the upload would be refused (run `ignitify task:pack` to see why)"] };
3039
- let localHash = normalizeContentHash(localContentHash), match = taskDeployments.find((d) => normalizeContentHash(d.content_hash ?? "") === localHash);
3126
+ let localHash = stripSha256Prefix(localContentHash), match = taskDeployments.find((d) => stripSha256Prefix(d.content_hash ?? "") === localHash);
3040
3127
  if (match) {
3041
3128
  let rebuild = match.image_present === false;
3042
3129
  return { needed: false, reasons: [`local code is identical to deployment ${match.id ?? "?"} (content_hash dedup \u2014 deploy would return reused: true)`, ...rebuild ? ["note: its image is no longer in the store (archived by the GC) \u2014 a deploy would rebuild the image under the SAME deployment id"] : []] };
@@ -3057,7 +3144,7 @@ var FINGERPRINT_AXES, resolveOrNull, runNature, fingerprintDiffs, presetIndeterm
3057
3144
  }, decideInbound = (declared, taskDeployments, runs) => {
3058
3145
  let nature = resolveOrNull(declared);
3059
3146
  if (nature === null || nature.network !== "bidirectional" || nature.inbound_port === void 0) return null;
3060
- let serving = (runs ?? []).some((r) => ACTIVE_RUN_STATUSES.has(r.status ?? "")), routes = taskDeployments === null ? "unknown" : taskDeployments.filter((d) => d.id).map((d) => ({ deploymentId: d.id, routeId: deriveRouteId(d.id) }));
3147
+ let serving = (runs ?? []).some((r) => ACTIVE_RUN_STATUSES.has(r.status ?? "")), routes = taskDeployments === null ? "unknown" : taskDeployments.flatMap((d) => d.id ? [{ deploymentId: d.id, routeId: deriveRouteId(d.id) }] : []);
3061
3148
  return { port: nature.inbound_port, serving, routes };
3062
3149
  };
3063
3150
  verdictLine = (v) => v.needed === "unknown" ? "UNKNOWN" : v.needed ? "YES" : "NO";
@@ -3721,7 +3808,7 @@ function requireLoader() {
3721
3808
  function mergeMappings(state, destination, source, overridableKeys) {
3722
3809
  common2.isObject(source) || throwError(state, "cannot merge mappings; the provided source object is unacceptable"), chargeMergeWork(state);
3723
3810
  let sourceKeys = Object.keys(source);
3724
- for (let index = 0, quantity2 = sourceKeys.length; index < quantity2; index += 1) {
3811
+ for (let index = 0, quantity = sourceKeys.length; index < quantity; index += 1) {
3725
3812
  let key = sourceKeys[index];
3726
3813
  chargeMergeWork(state), _hasOwnProperty.call(destination, key) || (setProperty(destination, key, source[key]), overridableKeys[key] = true);
3727
3814
  }
@@ -3729,11 +3816,11 @@ function requireLoader() {
3729
3816
  function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startLineStart, startPos) {
3730
3817
  if (Array.isArray(keyNode)) {
3731
3818
  keyNode = Array.prototype.slice.call(keyNode);
3732
- for (let index = 0, quantity2 = keyNode.length; index < quantity2; index += 1) Array.isArray(keyNode[index]) && throwError(state, "nested arrays are not supported inside keys"), typeof keyNode == "object" && _class(keyNode[index]) === "[object Object]" && (keyNode[index] = "[object Object]");
3819
+ for (let index = 0, quantity = keyNode.length; index < quantity; index += 1) Array.isArray(keyNode[index]) && throwError(state, "nested arrays are not supported inside keys"), typeof keyNode == "object" && _class(keyNode[index]) === "[object Object]" && (keyNode[index] = "[object Object]");
3733
3820
  }
3734
3821
  if (typeof keyNode == "object" && _class(keyNode) === "[object Object]" && (keyNode = "[object Object]"), keyNode = String(keyNode), _result === null && (_result = {}), keyTag === "tag:yaml.org,2002:merge") if (Array.isArray(valueNode)) {
3735
3822
  valueNode.length > 100 && throwError(state, "abnormal merge sequence size");
3736
- for (let index = 0, quantity2 = valueNode.length; index < quantity2; index += 1) mergeMappings(state, _result, valueNode[index], overridableKeys);
3823
+ for (let index = 0, quantity = valueNode.length; index < quantity; index += 1) mergeMappings(state, _result, valueNode[index], overridableKeys);
3737
3824
  } else mergeMappings(state, _result, valueNode, overridableKeys);
3738
3825
  else !state.json && !_hasOwnProperty.call(overridableKeys, keyNode) && _hasOwnProperty.call(_result, keyNode) && (state.line = startLine || state.line, state.lineStart = startLineStart || state.lineStart, state.position = startPos || state.position, throwError(state, "duplicated mapping key")), setProperty(_result, keyNode, valueNode), delete overridableKeys[keyNode];
3739
3826
  return _result;
@@ -4319,13 +4406,13 @@ function requireJsYaml() {
4319
4406
  }
4320
4407
  return jsYaml.Type = requireType(), jsYaml.Schema = requireSchema(), jsYaml.FAILSAFE_SCHEMA = requireFailsafe(), jsYaml.JSON_SCHEMA = requireJson(), jsYaml.CORE_SCHEMA = requireCore(), jsYaml.DEFAULT_SCHEMA = require_default(), jsYaml.load = loader2.load, jsYaml.loadAll = loader2.loadAll, jsYaml.dump = dumper2.dump, jsYaml.YAMLException = requireException(), jsYaml.types = { binary: requireBinary(), float: requireFloat(), map: requireMap(), null: require_null(), pairs: requirePairs(), set: requireSet(), timestamp: requireTimestamp(), bool: requireBool(), int: requireInt(), merge: requireMerge(), omap: requireOmap(), seq: requireSeq(), str: requireStr() }, jsYaml.safeLoad = renamed("safeLoad", "load"), jsYaml.safeLoadAll = renamed("safeLoadAll", "loadAll"), jsYaml.safeDump = renamed("safeDump", "dump"), jsYaml;
4321
4408
  }
4322
- var jsYaml, loader, common, hasRequiredCommon, exception, hasRequiredException, snippet, hasRequiredSnippet, type, hasRequiredType, schema, hasRequiredSchema, str2, hasRequiredStr, seq, hasRequiredSeq, map, hasRequiredMap, failsafe, hasRequiredFailsafe, _null, hasRequired_null, bool, hasRequiredBool, int, hasRequiredInt, float, hasRequiredFloat, json, hasRequiredJson, core, hasRequiredCore, timestamp, hasRequiredTimestamp, merge, hasRequiredMerge, binary, hasRequiredBinary, omap, hasRequiredOmap, pairs2, hasRequiredPairs, set, hasRequiredSet, _default, hasRequired_default, hasRequiredLoader, dumper, hasRequiredDumper, hasRequiredJsYaml, jsYamlExports, yaml, Type, Schema, FAILSAFE_SCHEMA, JSON_SCHEMA, CORE_SCHEMA, DEFAULT_SCHEMA, load, loadAll, dump, YAMLException, types, safeLoad, safeLoadAll, safeDump, init_js_yaml = __esm({ "../../node_modules/js-yaml/dist/js-yaml.mjs"() {
4409
+ var jsYaml, loader, common, hasRequiredCommon, exception, hasRequiredException, snippet, hasRequiredSnippet, type, hasRequiredType, schema, hasRequiredSchema, str2, hasRequiredStr, seq, hasRequiredSeq, map, hasRequiredMap, failsafe, hasRequiredFailsafe, _null, hasRequired_null, bool, hasRequiredBool, int, hasRequiredInt, float, hasRequiredFloat, json, hasRequiredJson, core, hasRequiredCore, timestamp, hasRequiredTimestamp, merge, hasRequiredMerge, binary, hasRequiredBinary, omap, hasRequiredOmap, pairs2, hasRequiredPairs, set, hasRequiredSet, _default, hasRequired_default, hasRequiredLoader, dumper, hasRequiredDumper, hasRequiredJsYaml, jsYamlExports, yaml, Type, Schema, FAILSAFE_SCHEMA, JSON_SCHEMA, CORE_SCHEMA, DEFAULT_SCHEMA, load, loadAll, dump, YAMLException, types, safeLoad, safeLoadAll, safeDump, init_js_yaml = __esm({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/js-yaml/dist/js-yaml.mjs"() {
4323
4410
  init_define_IGNITIFY_CLIENT_FILES();
4324
4411
  jsYaml = {}, loader = {}, common = {};
4325
4412
  dumper = {};
4326
4413
  jsYamlExports = requireJsYaml(), yaml = getDefaultExportFromCjs(jsYamlExports), { Type, Schema, FAILSAFE_SCHEMA, JSON_SCHEMA, CORE_SCHEMA, DEFAULT_SCHEMA, load, loadAll, dump, YAMLException, types, safeLoad, safeLoadAll, safeDump } = yaml;
4327
4414
  } });
4328
- var require_code = __commonJS({ "../../node_modules/ajv/dist/compile/codegen/code.js"(exports2) {
4415
+ var require_code = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/compile/codegen/code.js"(exports2) {
4329
4416
  "use strict";
4330
4417
  init_define_IGNITIFY_CLIENT_FILES();
4331
4418
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -4439,7 +4526,7 @@ var require_code = __commonJS({ "../../node_modules/ajv/dist/compile/codegen/cod
4439
4526
  }
4440
4527
  exports2.regexpCode = regexpCode;
4441
4528
  } });
4442
- var require_scope = __commonJS({ "../../node_modules/ajv/dist/compile/codegen/scope.js"(exports2) {
4529
+ var require_scope = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/compile/codegen/scope.js"(exports2) {
4443
4530
  "use strict";
4444
4531
  init_define_IGNITIFY_CLIENT_FILES();
4445
4532
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -4544,7 +4631,7 @@ var require_scope = __commonJS({ "../../node_modules/ajv/dist/compile/codegen/sc
4544
4631
  };
4545
4632
  exports2.ValueScope = ValueScope;
4546
4633
  } });
4547
- var require_codegen = __commonJS({ "../../node_modules/ajv/dist/compile/codegen/index.js"(exports2) {
4634
+ var require_codegen = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/compile/codegen/index.js"(exports2) {
4548
4635
  "use strict";
4549
4636
  init_define_IGNITIFY_CLIENT_FILES();
4550
4637
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -5033,7 +5120,7 @@ var require_codegen = __commonJS({ "../../node_modules/ajv/dist/compile/codegen/
5033
5120
  return x instanceof code_1.Name ? x : (0, code_1._)`(${x})`;
5034
5121
  }
5035
5122
  } });
5036
- var require_util = __commonJS({ "../../node_modules/ajv/dist/compile/util.js"(exports2) {
5123
+ var require_util = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/compile/util.js"(exports2) {
5037
5124
  "use strict";
5038
5125
  init_define_IGNITIFY_CLIENT_FILES();
5039
5126
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -5143,14 +5230,14 @@ var require_util = __commonJS({ "../../node_modules/ajv/dist/compile/util.js"(ex
5143
5230
  }
5144
5231
  exports2.checkStrictMode = checkStrictMode;
5145
5232
  } });
5146
- var require_names = __commonJS({ "../../node_modules/ajv/dist/compile/names.js"(exports2) {
5233
+ var require_names = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/compile/names.js"(exports2) {
5147
5234
  "use strict";
5148
5235
  init_define_IGNITIFY_CLIENT_FILES();
5149
5236
  Object.defineProperty(exports2, "__esModule", { value: true });
5150
5237
  var codegen_1 = require_codegen(), names = { data: new codegen_1.Name("data"), valCxt: new codegen_1.Name("valCxt"), instancePath: new codegen_1.Name("instancePath"), parentData: new codegen_1.Name("parentData"), parentDataProperty: new codegen_1.Name("parentDataProperty"), rootData: new codegen_1.Name("rootData"), dynamicAnchors: new codegen_1.Name("dynamicAnchors"), vErrors: new codegen_1.Name("vErrors"), errors: new codegen_1.Name("errors"), this: new codegen_1.Name("this"), self: new codegen_1.Name("self"), scope: new codegen_1.Name("scope"), json: new codegen_1.Name("json"), jsonPos: new codegen_1.Name("jsonPos"), jsonLen: new codegen_1.Name("jsonLen"), jsonPart: new codegen_1.Name("jsonPart") };
5151
5238
  exports2.default = names;
5152
5239
  } });
5153
- var require_errors = __commonJS({ "../../node_modules/ajv/dist/compile/errors.js"(exports2) {
5240
+ var require_errors = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/compile/errors.js"(exports2) {
5154
5241
  "use strict";
5155
5242
  init_define_IGNITIFY_CLIENT_FILES();
5156
5243
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -5210,7 +5297,7 @@ var require_errors = __commonJS({ "../../node_modules/ajv/dist/compile/errors.js
5210
5297
  keyValues.push([E.keyword, keyword], [E.params, typeof params == "function" ? params(cxt) : params || (0, codegen_1._)`{}`]), opts.messages && keyValues.push([E.message, typeof message == "function" ? message(cxt) : message]), opts.verbose && keyValues.push([E.schema, schemaValue], [E.parentSchema, (0, codegen_1._)`${topSchemaRef}${schemaPath}`], [names_1.default.data, data]), propertyName && keyValues.push([E.propertyName, propertyName]);
5211
5298
  }
5212
5299
  } });
5213
- var require_boolSchema = __commonJS({ "../../node_modules/ajv/dist/compile/validate/boolSchema.js"(exports2) {
5300
+ var require_boolSchema = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/compile/validate/boolSchema.js"(exports2) {
5214
5301
  "use strict";
5215
5302
  init_define_IGNITIFY_CLIENT_FILES();
5216
5303
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -5231,7 +5318,7 @@ var require_boolSchema = __commonJS({ "../../node_modules/ajv/dist/compile/valid
5231
5318
  (0, errors_1.reportError)(cxt, boolError, void 0, overrideAllErrors);
5232
5319
  }
5233
5320
  } });
5234
- var require_rules = __commonJS({ "../../node_modules/ajv/dist/compile/rules.js"(exports2) {
5321
+ var require_rules = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/compile/rules.js"(exports2) {
5235
5322
  "use strict";
5236
5323
  init_define_IGNITIFY_CLIENT_FILES();
5237
5324
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -5247,7 +5334,7 @@ var require_rules = __commonJS({ "../../node_modules/ajv/dist/compile/rules.js"(
5247
5334
  }
5248
5335
  exports2.getRules = getRules;
5249
5336
  } });
5250
- var require_applicability = __commonJS({ "../../node_modules/ajv/dist/compile/validate/applicability.js"(exports2) {
5337
+ var require_applicability = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/compile/validate/applicability.js"(exports2) {
5251
5338
  "use strict";
5252
5339
  init_define_IGNITIFY_CLIENT_FILES();
5253
5340
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -5267,7 +5354,7 @@ var require_applicability = __commonJS({ "../../node_modules/ajv/dist/compile/va
5267
5354
  }
5268
5355
  exports2.shouldUseRule = shouldUseRule;
5269
5356
  } });
5270
- var require_dataType = __commonJS({ "../../node_modules/ajv/dist/compile/validate/dataType.js"(exports2) {
5357
+ var require_dataType = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/compile/validate/dataType.js"(exports2) {
5271
5358
  "use strict";
5272
5359
  init_define_IGNITIFY_CLIENT_FILES();
5273
5360
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -5392,7 +5479,7 @@ var require_dataType = __commonJS({ "../../node_modules/ajv/dist/compile/validat
5392
5479
  return { gen, keyword: "type", data, schema: schema2.type, schemaCode, schemaValue: schemaCode, parentSchema: schema2, params: {}, it };
5393
5480
  }
5394
5481
  } });
5395
- var require_defaults = __commonJS({ "../../node_modules/ajv/dist/compile/validate/defaults.js"(exports2) {
5482
+ var require_defaults = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/compile/validate/defaults.js"(exports2) {
5396
5483
  "use strict";
5397
5484
  init_define_IGNITIFY_CLIENT_FILES();
5398
5485
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -5416,7 +5503,7 @@ var require_defaults = __commonJS({ "../../node_modules/ajv/dist/compile/validat
5416
5503
  opts.useDefaults === "empty" && (condition = (0, codegen_1._)`${condition} || ${childData} === null || ${childData} === ""`), gen.if(condition, (0, codegen_1._)`${childData} = ${(0, codegen_1.stringify)(defaultValue)}`);
5417
5504
  }
5418
5505
  } });
5419
- var require_code2 = __commonJS({ "../../node_modules/ajv/dist/vocabularies/code.js"(exports2) {
5506
+ var require_code2 = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/vocabularies/code.js"(exports2) {
5420
5507
  "use strict";
5421
5508
  init_define_IGNITIFY_CLIENT_FILES();
5422
5509
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -5503,7 +5590,7 @@ var require_code2 = __commonJS({ "../../node_modules/ajv/dist/vocabularies/code.
5503
5590
  }
5504
5591
  exports2.validateUnion = validateUnion;
5505
5592
  } });
5506
- var require_keyword = __commonJS({ "../../node_modules/ajv/dist/compile/validate/keyword.js"(exports2) {
5593
+ var require_keyword = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/compile/validate/keyword.js"(exports2) {
5507
5594
  "use strict";
5508
5595
  init_define_IGNITIFY_CLIENT_FILES();
5509
5596
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -5580,7 +5667,7 @@ var require_keyword = __commonJS({ "../../node_modules/ajv/dist/compile/validate
5580
5667
  }
5581
5668
  exports2.validateKeywordUsage = validateKeywordUsage;
5582
5669
  } });
5583
- var require_subschema = __commonJS({ "../../node_modules/ajv/dist/compile/validate/subschema.js"(exports2) {
5670
+ var require_subschema = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/compile/validate/subschema.js"(exports2) {
5584
5671
  "use strict";
5585
5672
  init_define_IGNITIFY_CLIENT_FILES();
5586
5673
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -5621,7 +5708,7 @@ var require_subschema = __commonJS({ "../../node_modules/ajv/dist/compile/valida
5621
5708
  }
5622
5709
  exports2.extendSubschemaMode = extendSubschemaMode;
5623
5710
  } });
5624
- var require_fast_deep_equal = __commonJS({ "../../node_modules/fast-deep-equal/index.js"(exports2, module2) {
5711
+ var require_fast_deep_equal = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/fast-deep-equal/index.js"(exports2, module2) {
5625
5712
  "use strict";
5626
5713
  init_define_IGNITIFY_CLIENT_FILES();
5627
5714
  module2.exports = function equal(a, b) {
@@ -5648,7 +5735,7 @@ var require_fast_deep_equal = __commonJS({ "../../node_modules/fast-deep-equal/i
5648
5735
  return a !== a && b !== b;
5649
5736
  };
5650
5737
  } });
5651
- var require_json_schema_traverse = __commonJS({ "../../node_modules/json-schema-traverse/index.js"(exports2, module2) {
5738
+ var require_json_schema_traverse = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/json-schema-traverse/index.js"(exports2, module2) {
5652
5739
  "use strict";
5653
5740
  init_define_IGNITIFY_CLIENT_FILES();
5654
5741
  var traverse = module2.exports = function(schema2, opts, cb) {
@@ -5680,7 +5767,7 @@ var require_json_schema_traverse = __commonJS({ "../../node_modules/json-schema-
5680
5767
  return str3.replace(/~/g, "~0").replace(/\//g, "~1");
5681
5768
  }
5682
5769
  } });
5683
- var require_resolve = __commonJS({ "../../node_modules/ajv/dist/compile/resolve.js"(exports2) {
5770
+ var require_resolve = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/compile/resolve.js"(exports2) {
5684
5771
  "use strict";
5685
5772
  init_define_IGNITIFY_CLIENT_FILES();
5686
5773
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -5757,7 +5844,7 @@ var require_resolve = __commonJS({ "../../node_modules/ajv/dist/compile/resolve.
5757
5844
  }
5758
5845
  exports2.getSchemaRefs = getSchemaRefs;
5759
5846
  } });
5760
- var require_validate = __commonJS({ "../../node_modules/ajv/dist/compile/validate/index.js"(exports2) {
5847
+ var require_validate = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/compile/validate/index.js"(exports2) {
5761
5848
  "use strict";
5762
5849
  init_define_IGNITIFY_CLIENT_FILES();
5763
5850
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -6047,7 +6134,7 @@ var require_validate = __commonJS({ "../../node_modules/ajv/dist/compile/validat
6047
6134
  }
6048
6135
  exports2.getData = getData;
6049
6136
  } });
6050
- var require_validation_error = __commonJS({ "../../node_modules/ajv/dist/runtime/validation_error.js"(exports2) {
6137
+ var require_validation_error = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/runtime/validation_error.js"(exports2) {
6051
6138
  "use strict";
6052
6139
  init_define_IGNITIFY_CLIENT_FILES();
6053
6140
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -6058,7 +6145,7 @@ var require_validation_error = __commonJS({ "../../node_modules/ajv/dist/runtime
6058
6145
  };
6059
6146
  exports2.default = ValidationError;
6060
6147
  } });
6061
- var require_ref_error = __commonJS({ "../../node_modules/ajv/dist/compile/ref_error.js"(exports2) {
6148
+ var require_ref_error = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/compile/ref_error.js"(exports2) {
6062
6149
  "use strict";
6063
6150
  init_define_IGNITIFY_CLIENT_FILES();
6064
6151
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -6069,7 +6156,7 @@ var require_ref_error = __commonJS({ "../../node_modules/ajv/dist/compile/ref_er
6069
6156
  };
6070
6157
  exports2.default = MissingRefError;
6071
6158
  } });
6072
- var require_compile = __commonJS({ "../../node_modules/ajv/dist/compile/index.js"(exports2) {
6159
+ var require_compile = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/compile/index.js"(exports2) {
6073
6160
  "use strict";
6074
6161
  init_define_IGNITIFY_CLIENT_FILES();
6075
6162
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -6174,10 +6261,10 @@ var require_compile = __commonJS({ "../../node_modules/ajv/dist/compile/index.js
6174
6261
  if (env = env || new SchemaEnv({ schema: schema2, schemaId, root, baseId }), env.schema !== env.root.schema) return env;
6175
6262
  }
6176
6263
  } });
6177
- var require_data = __commonJS({ "../../node_modules/ajv/dist/refs/data.json"(exports2, module2) {
6264
+ var require_data = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/refs/data.json"(exports2, module2) {
6178
6265
  module2.exports = { $id: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#", description: "Meta-schema for $data reference (JSON AnySchema extension proposal)", type: "object", required: ["$data"], properties: { $data: { type: "string", anyOf: [{ format: "relative-json-pointer" }, { format: "json-pointer" }] } }, additionalProperties: false };
6179
6266
  } });
6180
- var require_utils = __commonJS({ "../../node_modules/fast-uri/lib/utils.js"(exports2, module2) {
6267
+ var require_utils = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/fast-uri/lib/utils.js"(exports2, module2) {
6181
6268
  "use strict";
6182
6269
  init_define_IGNITIFY_CLIENT_FILES();
6183
6270
  var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu), isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u), isPort = RegExp.prototype.test.bind(/^\d*$/u), isHexPair = RegExp.prototype.test.bind(/^[\da-f]{2}$/iu), isUnreserved = RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu), isPathCharacter = RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/]$/u), isQueryFragmentCharacter = RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/?]$/u), isUserinfoCharacter = RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:]$/u), BYTE_HEX = new Array(256);
@@ -6490,7 +6577,7 @@ var require_utils = __commonJS({ "../../node_modules/fast-uri/lib/utils.js"(expo
6490
6577
  }
6491
6578
  module2.exports = { nonSimpleDomain, recomposeAuthority, reescapeHostDelimiters, normalizePercentEncoding, normalizePathEncoding, serializePathEncoding, normalizeQueryFragmentEncoding, encodeUserinfo, encodeQuery, encodeFragment, escapePreservingEscapes, removeDotSegments, removeDotSegmentsRelative, isIPv4, isUUID, normalizeIPv6, stringArrayToHexStripped };
6492
6579
  } });
6493
- var require_schemes = __commonJS({ "../../node_modules/fast-uri/lib/schemes.js"(exports2, module2) {
6580
+ var require_schemes = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/fast-uri/lib/schemes.js"(exports2, module2) {
6494
6581
  "use strict";
6495
6582
  init_define_IGNITIFY_CLIENT_FILES();
6496
6583
  var { isUUID } = require_utils(), URN_REG = /^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu, supportedSchemeNames = ["http", "https", "ws", "wss", "urn", "urn:uuid"];
@@ -6550,7 +6637,7 @@ var require_schemes = __commonJS({ "../../node_modules/fast-uri/lib/schemes.js"(
6550
6637
  }
6551
6638
  module2.exports = { wsIsSecure, SCHEMES, isValidSchemeName, getSchemeHandler };
6552
6639
  } });
6553
- var require_fast_uri = __commonJS({ "../../node_modules/fast-uri/index.js"(exports2, module2) {
6640
+ var require_fast_uri = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/fast-uri/index.js"(exports2, module2) {
6554
6641
  "use strict";
6555
6642
  init_define_IGNITIFY_CLIENT_FILES();
6556
6643
  var { normalizeIPv6, removeDotSegments, removeDotSegmentsRelative, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, serializePathEncoding, normalizeQueryFragmentEncoding, encodeQuery, encodeFragment, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils(), { SCHEMES, getSchemeHandler } = require_schemes(), VALID_SCHEME = /^[A-Za-z][A-Za-z0-9+.-]*$/u, MALFORMED_SCHEME_ERROR = "URI scheme is malformed.", MALFORMED_HOST_ERROR = "URI host is malformed.", FORBIDDEN_DOMAIN_HOST_CHARACTER = /[\0-\x20"#/:<>?@[\\\]^`{|}\x7F]/u;
@@ -6706,7 +6793,7 @@ var require_fast_uri = __commonJS({ "../../node_modules/fast-uri/index.js"(expor
6706
6793
  module2.exports.default = fastUri;
6707
6794
  module2.exports.fastUri = fastUri;
6708
6795
  } });
6709
- var require_uri = __commonJS({ "../../node_modules/ajv/dist/runtime/uri.js"(exports2) {
6796
+ var require_uri = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/runtime/uri.js"(exports2) {
6710
6797
  "use strict";
6711
6798
  init_define_IGNITIFY_CLIENT_FILES();
6712
6799
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -6714,7 +6801,7 @@ var require_uri = __commonJS({ "../../node_modules/ajv/dist/runtime/uri.js"(expo
6714
6801
  uri.code = 'require("ajv/dist/runtime/uri").default';
6715
6802
  exports2.default = uri;
6716
6803
  } });
6717
- var require_core = __commonJS({ "../../node_modules/ajv/dist/core.js"(exports2) {
6804
+ var require_core = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/core.js"(exports2) {
6718
6805
  "use strict";
6719
6806
  init_define_IGNITIFY_CLIENT_FILES();
6720
6807
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -7039,7 +7126,7 @@ var require_core = __commonJS({ "../../node_modules/ajv/dist/core.js"(exports2)
7039
7126
  return { anyOf: [schema2, $dataRef] };
7040
7127
  }
7041
7128
  } });
7042
- var require_id = __commonJS({ "../../node_modules/ajv/dist/vocabularies/core/id.js"(exports2) {
7129
+ var require_id = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/vocabularies/core/id.js"(exports2) {
7043
7130
  "use strict";
7044
7131
  init_define_IGNITIFY_CLIENT_FILES();
7045
7132
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -7048,7 +7135,7 @@ var require_id = __commonJS({ "../../node_modules/ajv/dist/vocabularies/core/id.
7048
7135
  } };
7049
7136
  exports2.default = def;
7050
7137
  } });
7051
- var require_ref = __commonJS({ "../../node_modules/ajv/dist/vocabularies/core/ref.js"(exports2) {
7138
+ var require_ref = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/vocabularies/core/ref.js"(exports2) {
7052
7139
  "use strict";
7053
7140
  init_define_IGNITIFY_CLIENT_FILES();
7054
7141
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -7117,14 +7204,14 @@ var require_ref = __commonJS({ "../../node_modules/ajv/dist/vocabularies/core/re
7117
7204
  exports2.callRef = callRef;
7118
7205
  exports2.default = def;
7119
7206
  } });
7120
- var require_core2 = __commonJS({ "../../node_modules/ajv/dist/vocabularies/core/index.js"(exports2) {
7207
+ var require_core2 = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/vocabularies/core/index.js"(exports2) {
7121
7208
  "use strict";
7122
7209
  init_define_IGNITIFY_CLIENT_FILES();
7123
7210
  Object.defineProperty(exports2, "__esModule", { value: true });
7124
7211
  var id_1 = require_id(), ref_1 = require_ref(), core2 = ["$schema", "$id", "$defs", "$vocabulary", { keyword: "$comment" }, "definitions", id_1.default, ref_1.default];
7125
7212
  exports2.default = core2;
7126
7213
  } });
7127
- var require_limitNumber = __commonJS({ "../../node_modules/ajv/dist/vocabularies/validation/limitNumber.js"(exports2) {
7214
+ var require_limitNumber = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/vocabularies/validation/limitNumber.js"(exports2) {
7128
7215
  "use strict";
7129
7216
  init_define_IGNITIFY_CLIENT_FILES();
7130
7217
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -7134,7 +7221,7 @@ var require_limitNumber = __commonJS({ "../../node_modules/ajv/dist/vocabularies
7134
7221
  } };
7135
7222
  exports2.default = def;
7136
7223
  } });
7137
- var require_multipleOf = __commonJS({ "../../node_modules/ajv/dist/vocabularies/validation/multipleOf.js"(exports2) {
7224
+ var require_multipleOf = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/vocabularies/validation/multipleOf.js"(exports2) {
7138
7225
  "use strict";
7139
7226
  init_define_IGNITIFY_CLIENT_FILES();
7140
7227
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -7144,7 +7231,7 @@ var require_multipleOf = __commonJS({ "../../node_modules/ajv/dist/vocabularies/
7144
7231
  } };
7145
7232
  exports2.default = def;
7146
7233
  } });
7147
- var require_ucs2length = __commonJS({ "../../node_modules/ajv/dist/runtime/ucs2length.js"(exports2) {
7234
+ var require_ucs2length = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/runtime/ucs2length.js"(exports2) {
7148
7235
  "use strict";
7149
7236
  init_define_IGNITIFY_CLIENT_FILES();
7150
7237
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -7156,7 +7243,7 @@ var require_ucs2length = __commonJS({ "../../node_modules/ajv/dist/runtime/ucs2l
7156
7243
  exports2.default = ucs2length;
7157
7244
  ucs2length.code = 'require("ajv/dist/runtime/ucs2length").default';
7158
7245
  } });
7159
- var require_limitLength = __commonJS({ "../../node_modules/ajv/dist/vocabularies/validation/limitLength.js"(exports2) {
7246
+ var require_limitLength = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/vocabularies/validation/limitLength.js"(exports2) {
7160
7247
  "use strict";
7161
7248
  init_define_IGNITIFY_CLIENT_FILES();
7162
7249
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -7169,7 +7256,7 @@ var require_limitLength = __commonJS({ "../../node_modules/ajv/dist/vocabularies
7169
7256
  } };
7170
7257
  exports2.default = def;
7171
7258
  } });
7172
- var require_pattern = __commonJS({ "../../node_modules/ajv/dist/vocabularies/validation/pattern.js"(exports2) {
7259
+ var require_pattern = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/vocabularies/validation/pattern.js"(exports2) {
7173
7260
  "use strict";
7174
7261
  init_define_IGNITIFY_CLIENT_FILES();
7175
7262
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -7185,7 +7272,7 @@ var require_pattern = __commonJS({ "../../node_modules/ajv/dist/vocabularies/val
7185
7272
  } };
7186
7273
  exports2.default = def;
7187
7274
  } });
7188
- var require_limitProperties = __commonJS({ "../../node_modules/ajv/dist/vocabularies/validation/limitProperties.js"(exports2) {
7275
+ var require_limitProperties = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/vocabularies/validation/limitProperties.js"(exports2) {
7189
7276
  "use strict";
7190
7277
  init_define_IGNITIFY_CLIENT_FILES();
7191
7278
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -7198,7 +7285,7 @@ var require_limitProperties = __commonJS({ "../../node_modules/ajv/dist/vocabula
7198
7285
  } };
7199
7286
  exports2.default = def;
7200
7287
  } });
7201
- var require_required = __commonJS({ "../../node_modules/ajv/dist/vocabularies/validation/required.js"(exports2) {
7288
+ var require_required = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/vocabularies/validation/required.js"(exports2) {
7202
7289
  "use strict";
7203
7290
  init_define_IGNITIFY_CLIENT_FILES();
7204
7291
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -7239,7 +7326,7 @@ var require_required = __commonJS({ "../../node_modules/ajv/dist/vocabularies/va
7239
7326
  } };
7240
7327
  exports2.default = def;
7241
7328
  } });
7242
- var require_limitItems = __commonJS({ "../../node_modules/ajv/dist/vocabularies/validation/limitItems.js"(exports2) {
7329
+ var require_limitItems = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/vocabularies/validation/limitItems.js"(exports2) {
7243
7330
  "use strict";
7244
7331
  init_define_IGNITIFY_CLIENT_FILES();
7245
7332
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -7252,7 +7339,7 @@ var require_limitItems = __commonJS({ "../../node_modules/ajv/dist/vocabularies/
7252
7339
  } };
7253
7340
  exports2.default = def;
7254
7341
  } });
7255
- var require_equal = __commonJS({ "../../node_modules/ajv/dist/runtime/equal.js"(exports2) {
7342
+ var require_equal = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/runtime/equal.js"(exports2) {
7256
7343
  "use strict";
7257
7344
  init_define_IGNITIFY_CLIENT_FILES();
7258
7345
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -7260,7 +7347,7 @@ var require_equal = __commonJS({ "../../node_modules/ajv/dist/runtime/equal.js"(
7260
7347
  equal.code = 'require("ajv/dist/runtime/equal").default';
7261
7348
  exports2.default = equal;
7262
7349
  } });
7263
- var require_uniqueItems = __commonJS({ "../../node_modules/ajv/dist/vocabularies/validation/uniqueItems.js"(exports2) {
7350
+ var require_uniqueItems = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js"(exports2) {
7264
7351
  "use strict";
7265
7352
  init_define_IGNITIFY_CLIENT_FILES();
7266
7353
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -7293,7 +7380,7 @@ var require_uniqueItems = __commonJS({ "../../node_modules/ajv/dist/vocabularies
7293
7380
  } };
7294
7381
  exports2.default = def;
7295
7382
  } });
7296
- var require_const = __commonJS({ "../../node_modules/ajv/dist/vocabularies/validation/const.js"(exports2) {
7383
+ var require_const = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/vocabularies/validation/const.js"(exports2) {
7297
7384
  "use strict";
7298
7385
  init_define_IGNITIFY_CLIENT_FILES();
7299
7386
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -7303,7 +7390,7 @@ var require_const = __commonJS({ "../../node_modules/ajv/dist/vocabularies/valid
7303
7390
  } };
7304
7391
  exports2.default = def;
7305
7392
  } });
7306
- var require_enum = __commonJS({ "../../node_modules/ajv/dist/vocabularies/validation/enum.js"(exports2) {
7393
+ var require_enum = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/vocabularies/validation/enum.js"(exports2) {
7307
7394
  "use strict";
7308
7395
  init_define_IGNITIFY_CLIENT_FILES();
7309
7396
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -7328,14 +7415,14 @@ var require_enum = __commonJS({ "../../node_modules/ajv/dist/vocabularies/valida
7328
7415
  } };
7329
7416
  exports2.default = def;
7330
7417
  } });
7331
- var require_validation = __commonJS({ "../../node_modules/ajv/dist/vocabularies/validation/index.js"(exports2) {
7418
+ var require_validation = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/vocabularies/validation/index.js"(exports2) {
7332
7419
  "use strict";
7333
7420
  init_define_IGNITIFY_CLIENT_FILES();
7334
7421
  Object.defineProperty(exports2, "__esModule", { value: true });
7335
7422
  var limitNumber_1 = require_limitNumber(), multipleOf_1 = require_multipleOf(), limitLength_1 = require_limitLength(), pattern_1 = require_pattern(), limitProperties_1 = require_limitProperties(), required_1 = require_required(), limitItems_1 = require_limitItems(), uniqueItems_1 = require_uniqueItems(), const_1 = require_const(), enum_1 = require_enum(), validation = [limitNumber_1.default, multipleOf_1.default, limitLength_1.default, pattern_1.default, limitProperties_1.default, required_1.default, limitItems_1.default, uniqueItems_1.default, { keyword: "type", schemaType: ["string", "array"] }, { keyword: "nullable", schemaType: "boolean" }, const_1.default, enum_1.default];
7336
7423
  exports2.default = validation;
7337
7424
  } });
7338
- var require_additionalItems = __commonJS({ "../../node_modules/ajv/dist/vocabularies/applicator/additionalItems.js"(exports2) {
7425
+ var require_additionalItems = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js"(exports2) {
7339
7426
  "use strict";
7340
7427
  init_define_IGNITIFY_CLIENT_FILES();
7341
7428
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -7366,7 +7453,7 @@ var require_additionalItems = __commonJS({ "../../node_modules/ajv/dist/vocabula
7366
7453
  exports2.validateAdditionalItems = validateAdditionalItems;
7367
7454
  exports2.default = def;
7368
7455
  } });
7369
- var require_items = __commonJS({ "../../node_modules/ajv/dist/vocabularies/applicator/items.js"(exports2) {
7456
+ var require_items = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/vocabularies/applicator/items.js"(exports2) {
7370
7457
  "use strict";
7371
7458
  init_define_IGNITIFY_CLIENT_FILES();
7372
7459
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -7394,14 +7481,14 @@ var require_items = __commonJS({ "../../node_modules/ajv/dist/vocabularies/appli
7394
7481
  exports2.validateTuple = validateTuple;
7395
7482
  exports2.default = def;
7396
7483
  } });
7397
- var require_prefixItems = __commonJS({ "../../node_modules/ajv/dist/vocabularies/applicator/prefixItems.js"(exports2) {
7484
+ var require_prefixItems = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js"(exports2) {
7398
7485
  "use strict";
7399
7486
  init_define_IGNITIFY_CLIENT_FILES();
7400
7487
  Object.defineProperty(exports2, "__esModule", { value: true });
7401
7488
  var items_1 = require_items(), def = { keyword: "prefixItems", type: "array", schemaType: ["array"], before: "uniqueItems", code: (cxt) => (0, items_1.validateTuple)(cxt, "items") };
7402
7489
  exports2.default = def;
7403
7490
  } });
7404
- var require_items2020 = __commonJS({ "../../node_modules/ajv/dist/vocabularies/applicator/items2020.js"(exports2) {
7491
+ var require_items2020 = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/vocabularies/applicator/items2020.js"(exports2) {
7405
7492
  "use strict";
7406
7493
  init_define_IGNITIFY_CLIENT_FILES();
7407
7494
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -7411,7 +7498,7 @@ var require_items2020 = __commonJS({ "../../node_modules/ajv/dist/vocabularies/a
7411
7498
  } };
7412
7499
  exports2.default = def;
7413
7500
  } });
7414
- var require_contains = __commonJS({ "../../node_modules/ajv/dist/vocabularies/applicator/contains.js"(exports2) {
7501
+ var require_contains = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/vocabularies/applicator/contains.js"(exports2) {
7415
7502
  "use strict";
7416
7503
  init_define_IGNITIFY_CLIENT_FILES();
7417
7504
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -7450,7 +7537,7 @@ var require_contains = __commonJS({ "../../node_modules/ajv/dist/vocabularies/ap
7450
7537
  } };
7451
7538
  exports2.default = def;
7452
7539
  } });
7453
- var require_dependencies = __commonJS({ "../../node_modules/ajv/dist/vocabularies/applicator/dependencies.js"(exports2) {
7540
+ var require_dependencies = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/vocabularies/applicator/dependencies.js"(exports2) {
7454
7541
  "use strict";
7455
7542
  init_define_IGNITIFY_CLIENT_FILES();
7456
7543
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -7500,7 +7587,7 @@ var require_dependencies = __commonJS({ "../../node_modules/ajv/dist/vocabularie
7500
7587
  exports2.validateSchemaDeps = validateSchemaDeps;
7501
7588
  exports2.default = def;
7502
7589
  } });
7503
- var require_propertyNames = __commonJS({ "../../node_modules/ajv/dist/vocabularies/applicator/propertyNames.js"(exports2) {
7590
+ var require_propertyNames = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js"(exports2) {
7504
7591
  "use strict";
7505
7592
  init_define_IGNITIFY_CLIENT_FILES();
7506
7593
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -7516,7 +7603,7 @@ var require_propertyNames = __commonJS({ "../../node_modules/ajv/dist/vocabulari
7516
7603
  } };
7517
7604
  exports2.default = def;
7518
7605
  } });
7519
- var require_additionalProperties = __commonJS({ "../../node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js"(exports2) {
7606
+ var require_additionalProperties = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js"(exports2) {
7520
7607
  "use strict";
7521
7608
  init_define_IGNITIFY_CLIENT_FILES();
7522
7609
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -7566,7 +7653,7 @@ var require_additionalProperties = __commonJS({ "../../node_modules/ajv/dist/voc
7566
7653
  } };
7567
7654
  exports2.default = def;
7568
7655
  } });
7569
- var require_properties = __commonJS({ "../../node_modules/ajv/dist/vocabularies/applicator/properties.js"(exports2) {
7656
+ var require_properties = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/vocabularies/applicator/properties.js"(exports2) {
7570
7657
  "use strict";
7571
7658
  init_define_IGNITIFY_CLIENT_FILES();
7572
7659
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -7589,7 +7676,7 @@ var require_properties = __commonJS({ "../../node_modules/ajv/dist/vocabularies/
7589
7676
  } };
7590
7677
  exports2.default = def;
7591
7678
  } });
7592
- var require_patternProperties = __commonJS({ "../../node_modules/ajv/dist/vocabularies/applicator/patternProperties.js"(exports2) {
7679
+ var require_patternProperties = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js"(exports2) {
7593
7680
  "use strict";
7594
7681
  init_define_IGNITIFY_CLIENT_FILES();
7595
7682
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -7617,7 +7704,7 @@ var require_patternProperties = __commonJS({ "../../node_modules/ajv/dist/vocabu
7617
7704
  } };
7618
7705
  exports2.default = def;
7619
7706
  } });
7620
- var require_not = __commonJS({ "../../node_modules/ajv/dist/vocabularies/applicator/not.js"(exports2) {
7707
+ var require_not = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/vocabularies/applicator/not.js"(exports2) {
7621
7708
  "use strict";
7622
7709
  init_define_IGNITIFY_CLIENT_FILES();
7623
7710
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -7632,14 +7719,14 @@ var require_not = __commonJS({ "../../node_modules/ajv/dist/vocabularies/applica
7632
7719
  }, error: { message: "must NOT be valid" } };
7633
7720
  exports2.default = def;
7634
7721
  } });
7635
- var require_anyOf = __commonJS({ "../../node_modules/ajv/dist/vocabularies/applicator/anyOf.js"(exports2) {
7722
+ var require_anyOf = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/vocabularies/applicator/anyOf.js"(exports2) {
7636
7723
  "use strict";
7637
7724
  init_define_IGNITIFY_CLIENT_FILES();
7638
7725
  Object.defineProperty(exports2, "__esModule", { value: true });
7639
7726
  var code_1 = require_code2(), def = { keyword: "anyOf", schemaType: "array", trackErrors: true, code: code_1.validateUnion, error: { message: "must match a schema in anyOf" } };
7640
7727
  exports2.default = def;
7641
7728
  } });
7642
- var require_oneOf = __commonJS({ "../../node_modules/ajv/dist/vocabularies/applicator/oneOf.js"(exports2) {
7729
+ var require_oneOf = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/vocabularies/applicator/oneOf.js"(exports2) {
7643
7730
  "use strict";
7644
7731
  init_define_IGNITIFY_CLIENT_FILES();
7645
7732
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -7660,7 +7747,7 @@ var require_oneOf = __commonJS({ "../../node_modules/ajv/dist/vocabularies/appli
7660
7747
  } };
7661
7748
  exports2.default = def;
7662
7749
  } });
7663
- var require_allOf = __commonJS({ "../../node_modules/ajv/dist/vocabularies/applicator/allOf.js"(exports2) {
7750
+ var require_allOf = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/vocabularies/applicator/allOf.js"(exports2) {
7664
7751
  "use strict";
7665
7752
  init_define_IGNITIFY_CLIENT_FILES();
7666
7753
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -7676,7 +7763,7 @@ var require_allOf = __commonJS({ "../../node_modules/ajv/dist/vocabularies/appli
7676
7763
  } };
7677
7764
  exports2.default = def;
7678
7765
  } });
7679
- var require_if = __commonJS({ "../../node_modules/ajv/dist/vocabularies/applicator/if.js"(exports2) {
7766
+ var require_if = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/vocabularies/applicator/if.js"(exports2) {
7680
7767
  "use strict";
7681
7768
  init_define_IGNITIFY_CLIENT_FILES();
7682
7769
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -7708,7 +7795,7 @@ var require_if = __commonJS({ "../../node_modules/ajv/dist/vocabularies/applicat
7708
7795
  }
7709
7796
  exports2.default = def;
7710
7797
  } });
7711
- var require_thenElse = __commonJS({ "../../node_modules/ajv/dist/vocabularies/applicator/thenElse.js"(exports2) {
7798
+ var require_thenElse = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/vocabularies/applicator/thenElse.js"(exports2) {
7712
7799
  "use strict";
7713
7800
  init_define_IGNITIFY_CLIENT_FILES();
7714
7801
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -7717,7 +7804,7 @@ var require_thenElse = __commonJS({ "../../node_modules/ajv/dist/vocabularies/ap
7717
7804
  } };
7718
7805
  exports2.default = def;
7719
7806
  } });
7720
- var require_applicator = __commonJS({ "../../node_modules/ajv/dist/vocabularies/applicator/index.js"(exports2) {
7807
+ var require_applicator = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/vocabularies/applicator/index.js"(exports2) {
7721
7808
  "use strict";
7722
7809
  init_define_IGNITIFY_CLIENT_FILES();
7723
7810
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -7728,7 +7815,7 @@ var require_applicator = __commonJS({ "../../node_modules/ajv/dist/vocabularies/
7728
7815
  }
7729
7816
  exports2.default = getApplicator;
7730
7817
  } });
7731
- var require_dynamicAnchor = __commonJS({ "../../node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js"(exports2) {
7818
+ var require_dynamicAnchor = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js"(exports2) {
7732
7819
  "use strict";
7733
7820
  init_define_IGNITIFY_CLIENT_FILES();
7734
7821
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -7747,7 +7834,7 @@ var require_dynamicAnchor = __commonJS({ "../../node_modules/ajv/dist/vocabulari
7747
7834
  }
7748
7835
  exports2.default = def;
7749
7836
  } });
7750
- var require_dynamicRef = __commonJS({ "../../node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js"(exports2) {
7837
+ var require_dynamicRef = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js"(exports2) {
7751
7838
  "use strict";
7752
7839
  init_define_IGNITIFY_CLIENT_FILES();
7753
7840
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -7777,7 +7864,7 @@ var require_dynamicRef = __commonJS({ "../../node_modules/ajv/dist/vocabularies/
7777
7864
  exports2.dynamicRef = dynamicRef;
7778
7865
  exports2.default = def;
7779
7866
  } });
7780
- var require_recursiveAnchor = __commonJS({ "../../node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js"(exports2) {
7867
+ var require_recursiveAnchor = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js"(exports2) {
7781
7868
  "use strict";
7782
7869
  init_define_IGNITIFY_CLIENT_FILES();
7783
7870
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -7786,35 +7873,35 @@ var require_recursiveAnchor = __commonJS({ "../../node_modules/ajv/dist/vocabula
7786
7873
  } };
7787
7874
  exports2.default = def;
7788
7875
  } });
7789
- var require_recursiveRef = __commonJS({ "../../node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js"(exports2) {
7876
+ var require_recursiveRef = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js"(exports2) {
7790
7877
  "use strict";
7791
7878
  init_define_IGNITIFY_CLIENT_FILES();
7792
7879
  Object.defineProperty(exports2, "__esModule", { value: true });
7793
7880
  var dynamicRef_1 = require_dynamicRef(), def = { keyword: "$recursiveRef", schemaType: "string", code: (cxt) => (0, dynamicRef_1.dynamicRef)(cxt, cxt.schema) };
7794
7881
  exports2.default = def;
7795
7882
  } });
7796
- var require_dynamic = __commonJS({ "../../node_modules/ajv/dist/vocabularies/dynamic/index.js"(exports2) {
7883
+ var require_dynamic = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/vocabularies/dynamic/index.js"(exports2) {
7797
7884
  "use strict";
7798
7885
  init_define_IGNITIFY_CLIENT_FILES();
7799
7886
  Object.defineProperty(exports2, "__esModule", { value: true });
7800
7887
  var dynamicAnchor_1 = require_dynamicAnchor(), dynamicRef_1 = require_dynamicRef(), recursiveAnchor_1 = require_recursiveAnchor(), recursiveRef_1 = require_recursiveRef(), dynamic = [dynamicAnchor_1.default, dynamicRef_1.default, recursiveAnchor_1.default, recursiveRef_1.default];
7801
7888
  exports2.default = dynamic;
7802
7889
  } });
7803
- var require_dependentRequired = __commonJS({ "../../node_modules/ajv/dist/vocabularies/validation/dependentRequired.js"(exports2) {
7890
+ var require_dependentRequired = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js"(exports2) {
7804
7891
  "use strict";
7805
7892
  init_define_IGNITIFY_CLIENT_FILES();
7806
7893
  Object.defineProperty(exports2, "__esModule", { value: true });
7807
7894
  var dependencies_1 = require_dependencies(), def = { keyword: "dependentRequired", type: "object", schemaType: "object", error: dependencies_1.error, code: (cxt) => (0, dependencies_1.validatePropertyDeps)(cxt) };
7808
7895
  exports2.default = def;
7809
7896
  } });
7810
- var require_dependentSchemas = __commonJS({ "../../node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js"(exports2) {
7897
+ var require_dependentSchemas = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js"(exports2) {
7811
7898
  "use strict";
7812
7899
  init_define_IGNITIFY_CLIENT_FILES();
7813
7900
  Object.defineProperty(exports2, "__esModule", { value: true });
7814
7901
  var dependencies_1 = require_dependencies(), def = { keyword: "dependentSchemas", type: "object", schemaType: "object", code: (cxt) => (0, dependencies_1.validateSchemaDeps)(cxt) };
7815
7902
  exports2.default = def;
7816
7903
  } });
7817
- var require_limitContains = __commonJS({ "../../node_modules/ajv/dist/vocabularies/validation/limitContains.js"(exports2) {
7904
+ var require_limitContains = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/vocabularies/validation/limitContains.js"(exports2) {
7818
7905
  "use strict";
7819
7906
  init_define_IGNITIFY_CLIENT_FILES();
7820
7907
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -7823,14 +7910,14 @@ var require_limitContains = __commonJS({ "../../node_modules/ajv/dist/vocabulari
7823
7910
  } };
7824
7911
  exports2.default = def;
7825
7912
  } });
7826
- var require_next = __commonJS({ "../../node_modules/ajv/dist/vocabularies/next.js"(exports2) {
7913
+ var require_next = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/vocabularies/next.js"(exports2) {
7827
7914
  "use strict";
7828
7915
  init_define_IGNITIFY_CLIENT_FILES();
7829
7916
  Object.defineProperty(exports2, "__esModule", { value: true });
7830
7917
  var dependentRequired_1 = require_dependentRequired(), dependentSchemas_1 = require_dependentSchemas(), limitContains_1 = require_limitContains(), next = [dependentRequired_1.default, dependentSchemas_1.default, limitContains_1.default];
7831
7918
  exports2.default = next;
7832
7919
  } });
7833
- var require_unevaluatedProperties = __commonJS({ "../../node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js"(exports2) {
7920
+ var require_unevaluatedProperties = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js"(exports2) {
7834
7921
  "use strict";
7835
7922
  init_define_IGNITIFY_CLIENT_FILES();
7836
7923
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -7860,7 +7947,7 @@ var require_unevaluatedProperties = __commonJS({ "../../node_modules/ajv/dist/vo
7860
7947
  } };
7861
7948
  exports2.default = def;
7862
7949
  } });
7863
- var require_unevaluatedItems = __commonJS({ "../../node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js"(exports2) {
7950
+ var require_unevaluatedItems = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js"(exports2) {
7864
7951
  "use strict";
7865
7952
  init_define_IGNITIFY_CLIENT_FILES();
7866
7953
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -7882,14 +7969,14 @@ var require_unevaluatedItems = __commonJS({ "../../node_modules/ajv/dist/vocabul
7882
7969
  } };
7883
7970
  exports2.default = def;
7884
7971
  } });
7885
- var require_unevaluated = __commonJS({ "../../node_modules/ajv/dist/vocabularies/unevaluated/index.js"(exports2) {
7972
+ var require_unevaluated = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/vocabularies/unevaluated/index.js"(exports2) {
7886
7973
  "use strict";
7887
7974
  init_define_IGNITIFY_CLIENT_FILES();
7888
7975
  Object.defineProperty(exports2, "__esModule", { value: true });
7889
7976
  var unevaluatedProperties_1 = require_unevaluatedProperties(), unevaluatedItems_1 = require_unevaluatedItems(), unevaluated = [unevaluatedProperties_1.default, unevaluatedItems_1.default];
7890
7977
  exports2.default = unevaluated;
7891
7978
  } });
7892
- var require_format = __commonJS({ "../../node_modules/ajv/dist/vocabularies/format/format.js"(exports2) {
7979
+ var require_format = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/vocabularies/format/format.js"(exports2) {
7893
7980
  "use strict";
7894
7981
  init_define_IGNITIFY_CLIENT_FILES();
7895
7982
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -7942,14 +8029,14 @@ var require_format = __commonJS({ "../../node_modules/ajv/dist/vocabularies/form
7942
8029
  } };
7943
8030
  exports2.default = def;
7944
8031
  } });
7945
- var require_format2 = __commonJS({ "../../node_modules/ajv/dist/vocabularies/format/index.js"(exports2) {
8032
+ var require_format2 = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/vocabularies/format/index.js"(exports2) {
7946
8033
  "use strict";
7947
8034
  init_define_IGNITIFY_CLIENT_FILES();
7948
8035
  Object.defineProperty(exports2, "__esModule", { value: true });
7949
8036
  var format_1 = require_format(), format = [format_1.default];
7950
8037
  exports2.default = format;
7951
8038
  } });
7952
- var require_metadata = __commonJS({ "../../node_modules/ajv/dist/vocabularies/metadata.js"(exports2) {
8039
+ var require_metadata = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/vocabularies/metadata.js"(exports2) {
7953
8040
  "use strict";
7954
8041
  init_define_IGNITIFY_CLIENT_FILES();
7955
8042
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -7957,14 +8044,14 @@ var require_metadata = __commonJS({ "../../node_modules/ajv/dist/vocabularies/me
7957
8044
  exports2.metadataVocabulary = ["title", "description", "default", "deprecated", "readOnly", "writeOnly", "examples"];
7958
8045
  exports2.contentVocabulary = ["contentMediaType", "contentEncoding", "contentSchema"];
7959
8046
  } });
7960
- var require_draft2020 = __commonJS({ "../../node_modules/ajv/dist/vocabularies/draft2020.js"(exports2) {
8047
+ var require_draft2020 = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/vocabularies/draft2020.js"(exports2) {
7961
8048
  "use strict";
7962
8049
  init_define_IGNITIFY_CLIENT_FILES();
7963
8050
  Object.defineProperty(exports2, "__esModule", { value: true });
7964
8051
  var core_1 = require_core2(), validation_1 = require_validation(), applicator_1 = require_applicator(), dynamic_1 = require_dynamic(), next_1 = require_next(), unevaluated_1 = require_unevaluated(), format_1 = require_format2(), metadata_1 = require_metadata(), draft2020Vocabularies = [dynamic_1.default, core_1.default, validation_1.default, (0, applicator_1.default)(true), format_1.default, metadata_1.metadataVocabulary, metadata_1.contentVocabulary, next_1.default, unevaluated_1.default];
7965
8052
  exports2.default = draft2020Vocabularies;
7966
8053
  } });
7967
- var require_types = __commonJS({ "../../node_modules/ajv/dist/vocabularies/discriminator/types.js"(exports2) {
8054
+ var require_types = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/vocabularies/discriminator/types.js"(exports2) {
7968
8055
  "use strict";
7969
8056
  init_define_IGNITIFY_CLIENT_FILES();
7970
8057
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -7974,7 +8061,7 @@ var require_types = __commonJS({ "../../node_modules/ajv/dist/vocabularies/discr
7974
8061
  DiscrError2.Tag = "tag", DiscrError2.Mapping = "mapping";
7975
8062
  })(DiscrError || (exports2.DiscrError = DiscrError = {}));
7976
8063
  } });
7977
- var require_discriminator = __commonJS({ "../../node_modules/ajv/dist/vocabularies/discriminator/index.js"(exports2) {
8064
+ var require_discriminator = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/vocabularies/discriminator/index.js"(exports2) {
7978
8065
  "use strict";
7979
8066
  init_define_IGNITIFY_CLIENT_FILES();
7980
8067
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -8028,31 +8115,31 @@ var require_discriminator = __commonJS({ "../../node_modules/ajv/dist/vocabulari
8028
8115
  } };
8029
8116
  exports2.default = def;
8030
8117
  } });
8031
- var require_schema = __commonJS({ "../../node_modules/ajv/dist/refs/json-schema-2020-12/schema.json"(exports2, module2) {
8118
+ var require_schema = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/refs/json-schema-2020-12/schema.json"(exports2, module2) {
8032
8119
  module2.exports = { $schema: "https://json-schema.org/draft/2020-12/schema", $id: "https://json-schema.org/draft/2020-12/schema", $vocabulary: { "https://json-schema.org/draft/2020-12/vocab/core": true, "https://json-schema.org/draft/2020-12/vocab/applicator": true, "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, "https://json-schema.org/draft/2020-12/vocab/validation": true, "https://json-schema.org/draft/2020-12/vocab/meta-data": true, "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, "https://json-schema.org/draft/2020-12/vocab/content": true }, $dynamicAnchor: "meta", title: "Core and Validation specifications meta-schema", allOf: [{ $ref: "meta/core" }, { $ref: "meta/applicator" }, { $ref: "meta/unevaluated" }, { $ref: "meta/validation" }, { $ref: "meta/meta-data" }, { $ref: "meta/format-annotation" }, { $ref: "meta/content" }], type: ["object", "boolean"], $comment: "This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.", properties: { definitions: { $comment: '"definitions" has been replaced by "$defs".', type: "object", additionalProperties: { $dynamicRef: "#meta" }, deprecated: true, default: {} }, dependencies: { $comment: '"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.', type: "object", additionalProperties: { anyOf: [{ $dynamicRef: "#meta" }, { $ref: "meta/validation#/$defs/stringArray" }] }, deprecated: true, default: {} }, $recursiveAnchor: { $comment: '"$recursiveAnchor" has been replaced by "$dynamicAnchor".', $ref: "meta/core#/$defs/anchorString", deprecated: true }, $recursiveRef: { $comment: '"$recursiveRef" has been replaced by "$dynamicRef".', $ref: "meta/core#/$defs/uriReferenceString", deprecated: true } } };
8033
8120
  } });
8034
- var require_applicator2 = __commonJS({ "../../node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.json"(exports2, module2) {
8121
+ var require_applicator2 = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.json"(exports2, module2) {
8035
8122
  module2.exports = { $schema: "https://json-schema.org/draft/2020-12/schema", $id: "https://json-schema.org/draft/2020-12/meta/applicator", $vocabulary: { "https://json-schema.org/draft/2020-12/vocab/applicator": true }, $dynamicAnchor: "meta", title: "Applicator vocabulary meta-schema", type: ["object", "boolean"], properties: { prefixItems: { $ref: "#/$defs/schemaArray" }, items: { $dynamicRef: "#meta" }, contains: { $dynamicRef: "#meta" }, additionalProperties: { $dynamicRef: "#meta" }, properties: { type: "object", additionalProperties: { $dynamicRef: "#meta" }, default: {} }, patternProperties: { type: "object", additionalProperties: { $dynamicRef: "#meta" }, propertyNames: { format: "regex" }, default: {} }, dependentSchemas: { type: "object", additionalProperties: { $dynamicRef: "#meta" }, default: {} }, propertyNames: { $dynamicRef: "#meta" }, if: { $dynamicRef: "#meta" }, then: { $dynamicRef: "#meta" }, else: { $dynamicRef: "#meta" }, allOf: { $ref: "#/$defs/schemaArray" }, anyOf: { $ref: "#/$defs/schemaArray" }, oneOf: { $ref: "#/$defs/schemaArray" }, not: { $dynamicRef: "#meta" } }, $defs: { schemaArray: { type: "array", minItems: 1, items: { $dynamicRef: "#meta" } } } };
8036
8123
  } });
8037
- var require_unevaluated2 = __commonJS({ "../../node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json"(exports2, module2) {
8124
+ var require_unevaluated2 = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json"(exports2, module2) {
8038
8125
  module2.exports = { $schema: "https://json-schema.org/draft/2020-12/schema", $id: "https://json-schema.org/draft/2020-12/meta/unevaluated", $vocabulary: { "https://json-schema.org/draft/2020-12/vocab/unevaluated": true }, $dynamicAnchor: "meta", title: "Unevaluated applicator vocabulary meta-schema", type: ["object", "boolean"], properties: { unevaluatedItems: { $dynamicRef: "#meta" }, unevaluatedProperties: { $dynamicRef: "#meta" } } };
8039
8126
  } });
8040
- var require_content = __commonJS({ "../../node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json"(exports2, module2) {
8127
+ var require_content = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json"(exports2, module2) {
8041
8128
  module2.exports = { $schema: "https://json-schema.org/draft/2020-12/schema", $id: "https://json-schema.org/draft/2020-12/meta/content", $vocabulary: { "https://json-schema.org/draft/2020-12/vocab/content": true }, $dynamicAnchor: "meta", title: "Content vocabulary meta-schema", type: ["object", "boolean"], properties: { contentEncoding: { type: "string" }, contentMediaType: { type: "string" }, contentSchema: { $dynamicRef: "#meta" } } };
8042
8129
  } });
8043
- var require_core3 = __commonJS({ "../../node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json"(exports2, module2) {
8130
+ var require_core3 = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json"(exports2, module2) {
8044
8131
  module2.exports = { $schema: "https://json-schema.org/draft/2020-12/schema", $id: "https://json-schema.org/draft/2020-12/meta/core", $vocabulary: { "https://json-schema.org/draft/2020-12/vocab/core": true }, $dynamicAnchor: "meta", title: "Core vocabulary meta-schema", type: ["object", "boolean"], properties: { $id: { $ref: "#/$defs/uriReferenceString", $comment: "Non-empty fragments not allowed.", pattern: "^[^#]*#?$" }, $schema: { $ref: "#/$defs/uriString" }, $ref: { $ref: "#/$defs/uriReferenceString" }, $anchor: { $ref: "#/$defs/anchorString" }, $dynamicRef: { $ref: "#/$defs/uriReferenceString" }, $dynamicAnchor: { $ref: "#/$defs/anchorString" }, $vocabulary: { type: "object", propertyNames: { $ref: "#/$defs/uriString" }, additionalProperties: { type: "boolean" } }, $comment: { type: "string" }, $defs: { type: "object", additionalProperties: { $dynamicRef: "#meta" } } }, $defs: { anchorString: { type: "string", pattern: "^[A-Za-z_][-A-Za-z0-9._]*$" }, uriString: { type: "string", format: "uri" }, uriReferenceString: { type: "string", format: "uri-reference" } } };
8045
8132
  } });
8046
- var require_format_annotation = __commonJS({ "../../node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json"(exports2, module2) {
8133
+ var require_format_annotation = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json"(exports2, module2) {
8047
8134
  module2.exports = { $schema: "https://json-schema.org/draft/2020-12/schema", $id: "https://json-schema.org/draft/2020-12/meta/format-annotation", $vocabulary: { "https://json-schema.org/draft/2020-12/vocab/format-annotation": true }, $dynamicAnchor: "meta", title: "Format vocabulary meta-schema for annotation results", type: ["object", "boolean"], properties: { format: { type: "string" } } };
8048
8135
  } });
8049
- var require_meta_data = __commonJS({ "../../node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json"(exports2, module2) {
8136
+ var require_meta_data = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json"(exports2, module2) {
8050
8137
  module2.exports = { $schema: "https://json-schema.org/draft/2020-12/schema", $id: "https://json-schema.org/draft/2020-12/meta/meta-data", $vocabulary: { "https://json-schema.org/draft/2020-12/vocab/meta-data": true }, $dynamicAnchor: "meta", title: "Meta-data vocabulary meta-schema", type: ["object", "boolean"], properties: { title: { type: "string" }, description: { type: "string" }, default: true, deprecated: { type: "boolean", default: false }, readOnly: { type: "boolean", default: false }, writeOnly: { type: "boolean", default: false }, examples: { type: "array", items: true } } };
8051
8138
  } });
8052
- var require_validation2 = __commonJS({ "../../node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json"(exports2, module2) {
8139
+ var require_validation2 = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json"(exports2, module2) {
8053
8140
  module2.exports = { $schema: "https://json-schema.org/draft/2020-12/schema", $id: "https://json-schema.org/draft/2020-12/meta/validation", $vocabulary: { "https://json-schema.org/draft/2020-12/vocab/validation": true }, $dynamicAnchor: "meta", title: "Validation vocabulary meta-schema", type: ["object", "boolean"], properties: { type: { anyOf: [{ $ref: "#/$defs/simpleTypes" }, { type: "array", items: { $ref: "#/$defs/simpleTypes" }, minItems: 1, uniqueItems: true }] }, const: true, enum: { type: "array", items: true }, multipleOf: { type: "number", exclusiveMinimum: 0 }, maximum: { type: "number" }, exclusiveMaximum: { type: "number" }, minimum: { type: "number" }, exclusiveMinimum: { type: "number" }, maxLength: { $ref: "#/$defs/nonNegativeInteger" }, minLength: { $ref: "#/$defs/nonNegativeIntegerDefault0" }, pattern: { type: "string", format: "regex" }, maxItems: { $ref: "#/$defs/nonNegativeInteger" }, minItems: { $ref: "#/$defs/nonNegativeIntegerDefault0" }, uniqueItems: { type: "boolean", default: false }, maxContains: { $ref: "#/$defs/nonNegativeInteger" }, minContains: { $ref: "#/$defs/nonNegativeInteger", default: 1 }, maxProperties: { $ref: "#/$defs/nonNegativeInteger" }, minProperties: { $ref: "#/$defs/nonNegativeIntegerDefault0" }, required: { $ref: "#/$defs/stringArray" }, dependentRequired: { type: "object", additionalProperties: { $ref: "#/$defs/stringArray" } } }, $defs: { nonNegativeInteger: { type: "integer", minimum: 0 }, nonNegativeIntegerDefault0: { $ref: "#/$defs/nonNegativeInteger", default: 0 }, simpleTypes: { enum: ["array", "boolean", "integer", "null", "number", "object", "string"] }, stringArray: { type: "array", items: { type: "string" }, uniqueItems: true, default: [] } } };
8054
8141
  } });
8055
- var require_json_schema_2020_12 = __commonJS({ "../../node_modules/ajv/dist/refs/json-schema-2020-12/index.js"(exports2) {
8142
+ var require_json_schema_2020_12 = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/refs/json-schema-2020-12/index.js"(exports2) {
8056
8143
  "use strict";
8057
8144
  init_define_IGNITIFY_CLIENT_FILES();
8058
8145
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -8065,7 +8152,7 @@ var require_json_schema_2020_12 = __commonJS({ "../../node_modules/ajv/dist/refs
8065
8152
  }
8066
8153
  exports2.default = addMetaSchema2020;
8067
8154
  } });
8068
- var require__ = __commonJS({ "../../node_modules/ajv/dist/2020.js"(exports2, module2) {
8155
+ var require__ = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/ajv/dist/2020.js"(exports2, module2) {
8069
8156
  "use strict";
8070
8157
  init_define_IGNITIFY_CLIENT_FILES();
8071
8158
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -8200,8 +8287,8 @@ function validateConfig(config, source = "task.yaml", payloadLimit2 = PAYLOAD_LI
8200
8287
  let run2 = config.run;
8201
8288
  if (run2) {
8202
8289
  run2.preset !== void 0 && (typeof run2.preset != "string" || run2.preset.trim() === "") ? errors.push(MESSAGES.PRESET_INVALID) : run2.preset !== void 0 && !isKnownPreset(run2.preset) && errors.push(MESSAGES.PRESET_UNKNOWN(source, run2.preset, PRESET_NAMES)), run2.timeout_sec !== void 0 && !(typeof run2.timeout_sec == "number" && run2.timeout_sec > 0) && errors.push(MESSAGES.TIMEOUT_INVALID);
8203
- let bytes2 = run2.payload === void 0 ? 0 : payloadBytes(run2.payload);
8204
- bytes2 > payloadLimit2 && errors.push(MESSAGES.DEFAULT_PAYLOAD_OVER_LIMIT(source, bytes2, payloadLimit2));
8290
+ let bytes = run2.payload === void 0 ? 0 : payloadBytes(run2.payload);
8291
+ bytes > payloadLimit2 && errors.push(MESSAGES.DEFAULT_PAYLOAD_OVER_LIMIT(source, bytes, payloadLimit2));
8205
8292
  }
8206
8293
  let resolved = resolveNature(config.execution, PLATFORM_DEFAULT_NATURE);
8207
8294
  return resolved.ok ? warnings.push(...resolved.warnings) : errors.push(resolved.error), { ok: errors.length === 0, errors, warnings };
@@ -8223,26 +8310,26 @@ function checkTaskConfigText(text, source) {
8223
8310
  return errors.push(...shared.errors), errors.length > 0 ? { ok: false, errors, warnings: shared.warnings } : { ok: true, config, errors, warnings: shared.warnings };
8224
8311
  }
8225
8312
  function slugDirRefusal(slug2, taskDir) {
8226
- let dirName = import_node_path2.default.basename(taskDir);
8313
+ let dirName = import_node_path3.default.basename(taskDir);
8227
8314
  return slug2 === dirName ? null : `task.yaml slug "${slug2}" must match the task directory name "${dirName}". Every local lookup names the task by its directory, but runs dispatch by slug. Set slug: "${dirName}" or rename the directory.`;
8228
8315
  }
8229
8316
  function findTaskConfigFile(taskDir) {
8230
- let name = import_node_fs3.default.existsSync(taskDir) ? rootConfigName(import_node_fs3.default.readdirSync(taskDir)) : null;
8231
- return name === null ? null : import_node_path2.default.join(taskDir, name);
8317
+ let name = import_node_fs4.default.existsSync(taskDir) ? rootConfigName(import_node_fs4.default.readdirSync(taskDir)) : null;
8318
+ return name === null ? null : import_node_path3.default.join(taskDir, name);
8232
8319
  }
8233
8320
  function readTaskConfigFile(taskDir) {
8234
8321
  let file = findTaskConfigFile(taskDir);
8235
8322
  if (!file) return { ok: false, file: null, errors: [`No ${TASK_CONFIG_FILENAMES.join(" / ")} found in ${taskDir}`], warnings: [] };
8236
- let parsed = checkTaskConfigText(import_node_fs3.default.readFileSync(file, "utf8"), import_node_path2.default.basename(file)), slugError = parsed.ok ? slugDirRefusal(parsed.config.slug, taskDir) : null;
8323
+ let parsed = checkTaskConfigText(import_node_fs4.default.readFileSync(file, "utf8"), import_node_path3.default.basename(file)), slugError = parsed.ok ? slugDirRefusal(parsed.config.slug, taskDir) : null;
8237
8324
  return slugError !== null ? { ok: false, file, errors: [slugError], warnings: parsed.warnings } : { ...parsed, file };
8238
8325
  }
8239
8326
  function resolvedEntry(config) {
8240
8327
  return config.entry ?? RUNTIME_REGISTRY[config.runtime].entryFile;
8241
8328
  }
8242
- var import_node_fs3, import_node_path2, init_task_config3 = __esm({ "src/io/task-config.ts"() {
8329
+ var import_node_fs4, import_node_path3, init_task_config3 = __esm({ "src/io/task-config.ts"() {
8243
8330
  "use strict";
8244
8331
  init_define_IGNITIFY_CLIENT_FILES();
8245
- import_node_fs3 = __toESM(require("node:fs"), 1), import_node_path2 = __toESM(require("node:path"), 1);
8332
+ import_node_fs4 = __toESM(require("node:fs"), 1), import_node_path3 = __toESM(require("node:path"), 1);
8246
8333
  init_tenant();
8247
8334
  init_task_config2();
8248
8335
  init_validate2();
@@ -8256,7 +8343,7 @@ function readTaskFolders(baseDir) {
8256
8343
  try {
8257
8344
  return { dir, state: readState(dir) };
8258
8345
  } catch (e) {
8259
- throw new Error(`cannot read ${taskLinkPath(dir)}: ${errorMessage(e)}`, { cause: e });
8346
+ throw new Error(`cannot read ${taskLinkPath(dir)}: ${errText(e)}`, { cause: e });
8260
8347
  }
8261
8348
  }) : [];
8262
8349
  }
@@ -8279,7 +8366,7 @@ async function prepareTask(args, cwd, taskId = requiredArg(args)) {
8279
8366
  for (let e of read.errors) fail(e);
8280
8367
  return null;
8281
8368
  }
8282
- return { taskDir, config: read.config, warnings: read.warnings };
8369
+ return { taskDir, config: read.config, slug: read.config.slug ?? import_path2.default.basename(taskDir), warnings: read.warnings };
8283
8370
  }
8284
8371
  var import_fs2, import_path2, init_task_path = __esm({ "src/io/task-path.ts"() {
8285
8372
  "use strict";
@@ -8290,7 +8377,7 @@ var import_fs2, import_path2, init_task_path = __esm({ "src/io/task-path.ts"() {
8290
8377
  init_output();
8291
8378
  init_constants();
8292
8379
  init_args2();
8293
- init_guard();
8380
+ init_tenant();
8294
8381
  } });
8295
8382
  function compile(body, anchored) {
8296
8383
  let segs = body.split("/");
@@ -8337,11 +8424,11 @@ var UNSUPPORTED_CHARS, escapeRegex, segmentSource, init_ignore_file = __esm({ "s
8337
8424
  } });
8338
8425
  function scanSourceTree(root, maxBytes = UPLOAD_MAX_BYTES, ignoreRules = []) {
8339
8426
  let entries = [], data = /* @__PURE__ */ new Map(), errors = [], warnings = [], ignored = [], totalBytes = 0, over = false;
8340
- if (!import_node_fs4.default.existsSync(root)) return { entries, data, errors: [`Task directory does not exist: ${root}`], warnings, ignored, totalBytes, truncated: false };
8427
+ if (!import_node_fs5.default.existsSync(root)) return { entries, data, errors: [`Task directory does not exist: ${root}`], warnings, ignored, totalBytes, truncated: false };
8341
8428
  let walk = (dir) => {
8342
- for (let dirent of import_node_fs4.default.readdirSync(dir, { withFileTypes: true }).sort((a, b) => a.name < b.name ? -1 : 1)) {
8429
+ for (let dirent of import_node_fs5.default.readdirSync(dir, { withFileTypes: true }).sort((a, b) => a.name < b.name ? -1 : 1)) {
8343
8430
  if (over) return;
8344
- let abs = import_node_path3.default.join(dir, dirent.name), rel = import_node_path3.default.relative(root, abs).split(import_node_path3.default.sep).join("/"), skip = excludeReason(rel);
8431
+ let abs = import_node_path4.default.join(dir, dirent.name), rel = import_node_path4.default.relative(root, abs).split(import_node_path4.default.sep).join("/"), skip = excludeReason(rel);
8345
8432
  if (skip) {
8346
8433
  dirent.isDirectory() || warnings.push(`excluded ${rel} \u2014 ${skip}`);
8347
8434
  continue;
@@ -8369,7 +8456,7 @@ function scanSourceTree(root, maxBytes = UPLOAD_MAX_BYTES, ignoreRules = []) {
8369
8456
  errors.push(symlinkRefusal(rel));
8370
8457
  continue;
8371
8458
  }
8372
- let { fd, st } = opened, bytes2;
8459
+ let { fd, st } = opened, bytes;
8373
8460
  try {
8374
8461
  if (!st.isFile()) {
8375
8462
  errors.push(notRegularRefusal(rel));
@@ -8379,34 +8466,34 @@ function scanSourceTree(root, maxBytes = UPLOAD_MAX_BYTES, ignoreRules = []) {
8379
8466
  over = true, errors.push(`the task directory holds more than ${maxBytes / MIB} MiB of files (reached at ${rel}); the server refuses a larger upload`);
8380
8467
  return;
8381
8468
  }
8382
- bytes2 = import_node_fs4.default.readFileSync(fd);
8469
+ bytes = import_node_fs5.default.readFileSync(fd);
8383
8470
  } finally {
8384
- import_node_fs4.default.closeSync(fd);
8471
+ import_node_fs5.default.closeSync(fd);
8385
8472
  }
8386
8473
  if (CREDENTIAL_CHECKED_FILES.includes(dirent.name)) {
8387
- let cred = credentialReason(rel, bytes2.toString("utf8"));
8474
+ let cred = credentialReason(rel, bytes.toString("utf8"));
8388
8475
  if (cred !== null) {
8389
8476
  errors.push(cred);
8390
8477
  continue;
8391
8478
  }
8392
8479
  }
8393
8480
  let keyWarning = privateKeyFileWarning(rel);
8394
- keyWarning !== null && warnings.push(keyWarning), entries.push({ path: rel, exec: (st.mode & 73) !== 0, size: bytes2.length, sha256: import_node_crypto2.default.createHash("sha256").update(bytes2).digest("hex") }), data.set(rel, bytes2), totalBytes += bytes2.length;
8481
+ keyWarning !== null && warnings.push(keyWarning), entries.push({ path: rel, exec: (st.mode & 73) !== 0, size: bytes.length, sha256: import_node_crypto3.default.createHash("sha256").update(bytes).digest("hex") }), data.set(rel, bytes), totalBytes += bytes.length;
8395
8482
  }
8396
8483
  };
8397
8484
  return walk(root), { entries, data, errors, warnings, ignored, totalBytes, truncated: over };
8398
8485
  }
8399
8486
  function computeSourceHash(entries, config) {
8400
- return `sha256:${import_node_crypto2.default.createHash("sha256").update(sourceManifest(entries, config), "utf8").digest("hex")}`;
8487
+ return `sha256:${import_node_crypto3.default.createHash("sha256").update(sourceManifest(entries, config), "utf8").digest("hex")}`;
8401
8488
  }
8402
8489
  function checkLockfile(entries, runtime) {
8403
8490
  let required = RUNTIME_REGISTRY[runtime].lockfile;
8404
8491
  return entries.some((e) => e.path === required) ? null : `${required} is missing. A ${runtime} task must upload its lockfile: without one the build is not reproducible and two deployments of the same source can resolve different versions.`;
8405
8492
  }
8406
- var import_node_fs4, import_node_path3, import_node_crypto2, MIB, symlinkRefusal, notRegularRefusal, init_source_tree = __esm({ "src/io/source-tree.ts"() {
8493
+ var import_node_fs5, import_node_path4, import_node_crypto3, MIB, symlinkRefusal, notRegularRefusal, init_source_tree = __esm({ "src/io/source-tree.ts"() {
8407
8494
  "use strict";
8408
8495
  init_define_IGNITIFY_CLIENT_FILES();
8409
- import_node_fs4 = __toESM(require("node:fs"), 1), import_node_path3 = __toESM(require("node:path"), 1), import_node_crypto2 = __toESM(require("node:crypto"), 1);
8496
+ import_node_fs5 = __toESM(require("node:fs"), 1), import_node_path4 = __toESM(require("node:path"), 1), import_node_crypto3 = __toESM(require("node:crypto"), 1);
8410
8497
  init_tenant();
8411
8498
  init_ignore_file();
8412
8499
  init_constants();
@@ -8504,8 +8591,8 @@ var NAME_BYTES, MODE_FILE, MODE_EXEC, TYPE_FILE, TYPE_PAX, PAX_HEADER_NAME, TarF
8504
8591
  };
8505
8592
  } });
8506
8593
  function readIgnoreRules(taskDir, protectedPaths) {
8507
- let file = import_node_path4.default.join(taskDir, IGNORE_FILE);
8508
- return import_node_fs5.default.existsSync(file) ? parseIgnoreFile(import_node_fs5.default.readFileSync(file, "utf8"), IGNORE_FILE, protectedPaths) : { ok: true, rules: [] };
8594
+ let file = import_node_path5.default.join(taskDir, IGNORE_FILE);
8595
+ return import_node_fs6.default.existsSync(file) ? parseIgnoreFile(import_node_fs6.default.readFileSync(file, "utf8"), IGNORE_FILE, protectedPaths) : { ok: true, rules: [] };
8509
8596
  }
8510
8597
  function checkSourceUpload(taskDir) {
8511
8598
  let read = readTaskConfigFile(taskDir), warnings = [...read.warnings];
@@ -8522,9 +8609,9 @@ function checkSourceUpload(taskDir) {
8522
8609
  if (errors.length > 0) return { ok: false, errors, warnings };
8523
8610
  let contentHash;
8524
8611
  try {
8525
- contentHash = computeSourceHash(scan.entries, { name: import_node_path4.default.basename(read.file ?? ""), value: config });
8612
+ contentHash = computeSourceHash(scan.entries, { name: import_node_path5.default.basename(read.file ?? ""), value: config });
8526
8613
  } catch (e) {
8527
- return { ok: false, errors: [e.message.replace(/^source manifest: /, "")], warnings };
8614
+ return { ok: false, errors: [errText(e).replace(/^source manifest: /, "")], warnings };
8528
8615
  }
8529
8616
  return { ok: true, source: { config, entries: scan.entries, data: scan.data, totalBytes: scan.totalBytes, ignored: scan.ignored, contentHash }, warnings };
8530
8617
  }
@@ -8534,10 +8621,10 @@ function prepareSourceUpload(taskDir) {
8534
8621
  let { warnings } = check, { config, entries, data, totalBytes, ignored, contentHash } = check.source, tar = packTarball(entries.map((e) => ({ name: e.path, data: data.get(e.path), exec: e.exec })));
8535
8622
  return { ok: true, upload: { manifest: { contentHash, format: "source", ...config.execution ? { execution: config.execution } : {}, ...config.secrets?.length ? { secrets: [...config.secrets] } : {} }, tar, slug: config.slug, files: entries.length, totalBytes, ignored }, warnings };
8536
8623
  }
8537
- var import_node_fs5, import_node_path4, init_source_upload = __esm({ "src/io/source-upload.ts"() {
8624
+ var import_node_fs6, import_node_path5, init_source_upload = __esm({ "src/io/source-upload.ts"() {
8538
8625
  "use strict";
8539
8626
  init_define_IGNITIFY_CLIENT_FILES();
8540
- import_node_fs5 = __toESM(require("node:fs"), 1), import_node_path4 = __toESM(require("node:path"), 1);
8627
+ import_node_fs6 = __toESM(require("node:fs"), 1), import_node_path5 = __toESM(require("node:path"), 1);
8541
8628
  init_tenant();
8542
8629
  init_ignore_file();
8543
8630
  init_constants();
@@ -8798,9 +8885,9 @@ function packagesRoot() {
8798
8885
  }
8799
8886
  function checkoutReader(root = packagesRoot()) {
8800
8887
  return (pkg, rel) => {
8801
- let abs = import_node_path5.default.join(root, pkg, rel);
8888
+ let abs = import_node_path6.default.join(root, pkg, rel);
8802
8889
  try {
8803
- return import_node_fs6.default.readFileSync(abs, "utf8");
8890
+ return import_node_fs7.default.readFileSync(abs, "utf8");
8804
8891
  } catch {
8805
8892
  throw new Error(`the runtime client source ${abs} is not readable. A Go or Rust scaffold carries the client from packages/${pkg}, so this CLI must run from a checkout of the repository.`);
8806
8893
  }
@@ -8878,10 +8965,10 @@ function rustScaffoldLock(pkgName, read = clientReader()) {
8878
8965
  `) + `
8879
8966
  `;
8880
8967
  }
8881
- var import_node_fs6, import_node_path5, import_node_sea, import_node_url, VENDOR_DIR, CLIENT_FILES, CARGO_RESERVED, init_vendor = __esm({ "src/scaffold/vendor.ts"() {
8968
+ var import_node_fs7, import_node_path6, import_node_sea, import_node_url, VENDOR_DIR, CLIENT_FILES, CARGO_RESERVED, init_vendor = __esm({ "src/scaffold/vendor.ts"() {
8882
8969
  "use strict";
8883
8970
  init_define_IGNITIFY_CLIENT_FILES();
8884
- import_node_fs6 = __toESM(require("node:fs"), 1), import_node_path5 = __toESM(require("node:path"), 1), import_node_sea = __toESM(require("node:sea"), 1), import_node_url = require("node:url"), VENDOR_DIR = "ignitify", CLIENT_FILES = { go: { pkg: "runtime-go", files: ["go.mod", "runtime.go"] }, rust: { pkg: "runtime-rust", files: ["Cargo.toml", "src/lib.rs"] } };
8971
+ import_node_fs7 = __toESM(require("node:fs"), 1), import_node_path6 = __toESM(require("node:path"), 1), import_node_sea = __toESM(require("node:sea"), 1), import_node_url = require("node:url"), VENDOR_DIR = "ignitify", CLIENT_FILES = { go: { pkg: "runtime-go", files: ["go.mod", "runtime.go"] }, rust: { pkg: "runtime-rust", files: ["Cargo.toml", "src/lib.rs"] } };
8885
8972
  CARGO_RESERVED = /* @__PURE__ */ new Set(["build", "deps", "examples", "incremental"]);
8886
8973
  } });
8887
8974
  function templateFiles(taskId, runtime, withInit, dirFlag) {
@@ -8906,7 +8993,7 @@ function scaffoldTaskFiles(taskId, taskDir, withInit, dirFlag, runtime = "node")
8906
8993
  try {
8907
8994
  files = templateFiles(taskId, runtime, withInit, dirFlag);
8908
8995
  } catch (e) {
8909
- return e instanceof Error ? e.message : String(e);
8996
+ return errText(e);
8910
8997
  }
8911
8998
  if (import_fs3.default.existsSync(taskDir)) {
8912
8999
  let clashes = [.../* @__PURE__ */ new Set([...TASK_CONFIG_FILENAMES, ...Object.keys(files)])].filter((f) => import_fs3.default.existsSync(import_path3.default.join(taskDir, f)));
@@ -8926,40 +9013,6 @@ var import_fs3, import_path3, init_scaffold = __esm({ "src/scaffold/index.ts"()
8926
9013
  init_templates();
8927
9014
  init_vendor();
8928
9015
  } });
8929
- function backoffDelayMs(attempt, cadence) {
8930
- return Math.min(cadence.BASE_MS * 2 ** Math.max(0, attempt), cadence.MAX_MS);
8931
- }
8932
- function isTransientPollError(e) {
8933
- return e instanceof HttpError ? e.status === 408 || e.status === 429 || e.status >= 500 && e.status <= 599 : e instanceof TypeError ? true : e instanceof Error && e.cause?.name === "TimeoutError";
8934
- }
8935
- function decidePollError(e, failuresInARow, failingForMs) {
8936
- return isTransientPollError(e) ? failuresInARow >= POLL.ERROR.MIN_TRIES && failingForMs >= POLL.ERROR.GRACE_MS ? "give-up" : "retry" : "give-up";
8937
- }
8938
- async function pollUntil(loop) {
8939
- let sleep = loop.clock?.sleep ?? REAL_CLOCK.sleep, now = loop.clock?.now ?? REAL_CLOCK.now, startedAt = now(), failures = 0, firstFailureAt = 0;
8940
- for (let attempt = 0; ; ) {
8941
- let view;
8942
- try {
8943
- view = await loop.fetch();
8944
- } catch (error) {
8945
- if (failures === 0 && (firstFailureAt = now()), failures += 1, decidePollError(error, failures, now() - firstFailureAt) === "give-up") return { kind: "lost", error };
8946
- loop.onRetry?.(error), await sleep(loop.retryDelayMs);
8947
- continue;
8948
- }
8949
- failures = 0, loop.onView?.(view);
8950
- let action = loop.decide(view, now() - startedAt, attempt);
8951
- if (!isWait(action)) return { action, view };
8952
- loop.onWait?.(view, attempt), await sleep(action.delayMs), attempt += 1;
8953
- }
8954
- }
8955
- var isWait, isLost, init_poll = __esm({ "src/core/poll.ts"() {
8956
- "use strict";
8957
- init_define_IGNITIFY_CLIENT_FILES();
8958
- init_http_client();
8959
- init_constants();
8960
- init_utils();
8961
- isWait = (action) => action.kind === "wait", isLost = (end) => "kind" in end && end.kind === "lost";
8962
- } });
8963
9016
  function decidePoll(status, elapsedMs, attempt, failureReason) {
8964
9017
  return status === READY ? { kind: "ready" } : status === FAILED ? { kind: "failed", reason: failureReason ?? "the build failed without recording a reason" } : status !== BUILDING ? { kind: "failed", reason: `deployment entered an unexpected status: ${status}` } : elapsedMs >= POLL.DEPLOY.TIMEOUT_MS ? { kind: "timeout" } : { kind: "wait", delayMs: nextDelayMs(attempt) };
8965
9018
  }
@@ -9001,14 +9054,14 @@ async function waitForBuild(cfg, deploymentId, progress, reused = false) {
9001
9054
  let view = await getApiDeploymentStatus(cfg, deploymentId);
9002
9055
  return retrying && (retrying = false, progress.update(WAIT.BUILDING(deploymentId), WAIT.HINT_BUILD)), view;
9003
9056
  }, fetchLog: async () => {
9004
- let { bytes: bytes2 } = await getApiDeploymentLogs(cfg, deploymentId);
9005
- return typeof bytes2 == "string" && bytes2 !== "" ? bytes2 : null;
9057
+ let { bytes } = await getApiDeploymentLogs(cfg, deploymentId);
9058
+ return typeof bytes == "string" && bytes !== "" ? bytes : null;
9006
9059
  }, onBuilding: () => {
9007
9060
  building = true, progress.update(WAIT.BUILDING(deploymentId), WAIT.HINT_BUILD);
9008
9061
  }, onRetry: () => {
9009
9062
  retrying = true, progress.update(WAIT.BUILDING(deploymentId), WAIT.HINT_RETRYING);
9010
9063
  } }));
9011
- if (built.kind === "lost") return progress.fail(WAIT.LOST), fail(WAIT.LOST_BUILD_DETAIL(deploymentId, errorMessage(built.error))), 1;
9064
+ if (built.kind === "lost") return progress.fail(WAIT.LOST), fail(WAIT.LOST_BUILD_DETAIL(deploymentId, errText(built.error))), 1;
9012
9065
  if (built.kind === "failed") {
9013
9066
  if (progress.fail(WAIT.BUILD_FAILED), fail(WAIT.BUILD_FAILED_DETAIL(deploymentId, built.reason)), built.log) {
9014
9067
  let st = errStyle();
@@ -9024,7 +9077,7 @@ async function waitForRun(cfg, runId) {
9024
9077
  let progress = startProgress(WAIT.RUN_SUBMITTED(runId)), lastStatus, settled = await withInterruptNotice(progress, () => WAIT.INTERRUPTED_RUN(runId), () => pollUntilSettled({ fetchRun: () => getApiRun(cfg, runId), onStatus: (status) => {
9025
9078
  lastStatus = status, progress.update(WAIT.RUN(runId, status), WAIT.HINT_RUN);
9026
9079
  }, onRetry: () => progress.update(lastStatus === void 0 ? WAIT.RUN_SUBMITTED(runId) : WAIT.RUN(runId, lastStatus), WAIT.HINT_RETRYING) }));
9027
- if (isLost(settled)) return progress.fail(WAIT.LOST), fail(WAIT.LOST_RUN_DETAIL(runId, errorMessage(settled.error))), 1;
9080
+ if (isLost(settled)) return progress.fail(WAIT.LOST), fail(WAIT.LOST_RUN_DETAIL(runId, errText(settled.error))), 1;
9028
9081
  let { action, run: run2 } = settled;
9029
9082
  if (action.kind === "timeout") return progress.fail(WAIT.RUN_TIMEOUT(action.status)), warn(WAIT.RUN_TIMEOUT_DETAIL(runId)), 1;
9030
9083
  let completed = action.status === RUN_STATUS.COMPLETED;
@@ -9039,13 +9092,13 @@ var init_wait = __esm({ "src/commands/wait.ts"() {
9039
9092
  init_poll();
9040
9093
  init_output();
9041
9094
  init_constants();
9042
- init_utils();
9095
+ init_tenant();
9043
9096
  } });
9044
- var MANIFEST_FILE, PACKAGE_SCOPE, RUNTIMES, NETWORK_TYPES, PRESETS, DURATIONS, INTERACTIONS, NAME_PATTERN, CALLBACK_ROUTE_PREFIX, EGRESS_HINT_PATTERN, DNS_LABEL, HOST_PATTERN, HOST_MAX_LENGTH, init_constants3 = __esm({ "../../node_modules/@ignitify-integrations/core/dist/constants.js"() {
9097
+ var MANIFEST_FILE, PACKAGE_SCOPE, RUNTIMES, NETWORK_TYPES, PRESETS, DURATIONS, INTERACTIONS, NAME_PATTERN, CALLBACK_ROUTE_PREFIX, EGRESS_HINT_PATTERN, DNS_LABEL, HOST_PATTERN, HOST_MAX_LENGTH, init_constants3 = __esm({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/apps/cli/node_modules/@ignitify-integrations/core/dist/constants.js"() {
9045
9098
  init_define_IGNITIFY_CLIENT_FILES();
9046
9099
  MANIFEST_FILE = "integration.yaml", PACKAGE_SCOPE = "@ignitify-integrations", RUNTIMES = ["node"], NETWORK_TYPES = ["none", "egress", "bidirectional"], PRESETS = ["std.micro", "std.small", "std.medium", "std.large", "std.xlarge"], DURATIONS = ["short", "long"], INTERACTIONS = ["boundary-only", "continuous"], NAME_PATTERN = "^[a-z][a-z0-9-]*[a-z0-9]$", CALLBACK_ROUTE_PREFIX = "/__callback/", EGRESS_HINT_PATTERN = "^[^\\r\\n]*$", DNS_LABEL = "[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?", HOST_PATTERN = new RegExp(`^${DNS_LABEL}(?:\\.${DNS_LABEL})+$`), HOST_MAX_LENGTH = 253;
9047
9100
  } });
9048
- var require_identity = __commonJS({ "../../node_modules/yaml/dist/nodes/identity.js"(exports2) {
9101
+ var require_identity = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/nodes/identity.js"(exports2) {
9049
9102
  "use strict";
9050
9103
  init_define_IGNITIFY_CLIENT_FILES();
9051
9104
  var ALIAS = /* @__PURE__ */ Symbol.for("yaml.alias"), DOC = /* @__PURE__ */ Symbol.for("yaml.document"), MAP = /* @__PURE__ */ Symbol.for("yaml.map"), PAIR = /* @__PURE__ */ Symbol.for("yaml.pair"), SCALAR = /* @__PURE__ */ Symbol.for("yaml.scalar"), SEQ = /* @__PURE__ */ Symbol.for("yaml.seq"), NODE_TYPE = /* @__PURE__ */ Symbol.for("yaml.node.type"), isAlias = (node) => !!node && typeof node == "object" && node[NODE_TYPE] === ALIAS, isDocument = (node) => !!node && typeof node == "object" && node[NODE_TYPE] === DOC, isMap2 = (node) => !!node && typeof node == "object" && node[NODE_TYPE] === MAP, isPair = (node) => !!node && typeof node == "object" && node[NODE_TYPE] === PAIR, isScalar2 = (node) => !!node && typeof node == "object" && node[NODE_TYPE] === SCALAR, isSeq2 = (node) => !!node && typeof node == "object" && node[NODE_TYPE] === SEQ;
@@ -9085,7 +9138,7 @@ var require_identity = __commonJS({ "../../node_modules/yaml/dist/nodes/identity
9085
9138
  exports2.isScalar = isScalar2;
9086
9139
  exports2.isSeq = isSeq2;
9087
9140
  } });
9088
- var require_visit = __commonJS({ "../../node_modules/yaml/dist/visit.js"(exports2) {
9141
+ var require_visit = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/visit.js"(exports2) {
9089
9142
  "use strict";
9090
9143
  init_define_IGNITIFY_CLIENT_FILES();
9091
9144
  var identity = require_identity(), BREAK = /* @__PURE__ */ Symbol("break visit"), SKIP = /* @__PURE__ */ Symbol("skip children"), REMOVE = /* @__PURE__ */ Symbol("remove node");
@@ -9179,7 +9232,7 @@ var require_visit = __commonJS({ "../../node_modules/yaml/dist/visit.js"(exports
9179
9232
  exports2.visit = visit;
9180
9233
  exports2.visitAsync = visitAsync;
9181
9234
  } });
9182
- var require_directives = __commonJS({ "../../node_modules/yaml/dist/doc/directives.js"(exports2) {
9235
+ var require_directives = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/doc/directives.js"(exports2) {
9183
9236
  "use strict";
9184
9237
  init_define_IGNITIFY_CLIENT_FILES();
9185
9238
  var identity = require_identity(), visit = require_visit(), escapeChars = { "!": "%21", ",": "%2C", "[": "%5B", "]": "%5D", "{": "%7B", "}": "%7D" }, escapeTagName = (tn) => tn.replace(/[!,[\]{}]/g, (ch) => escapeChars[ch]), Directives = class _Directives {
@@ -9262,7 +9315,7 @@ var require_directives = __commonJS({ "../../node_modules/yaml/dist/doc/directiv
9262
9315
  Directives.defaultTags = { "!!": "tag:yaml.org,2002:" };
9263
9316
  exports2.Directives = Directives;
9264
9317
  } });
9265
- var require_anchors = __commonJS({ "../../node_modules/yaml/dist/doc/anchors.js"(exports2) {
9318
+ var require_anchors = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/doc/anchors.js"(exports2) {
9266
9319
  "use strict";
9267
9320
  init_define_IGNITIFY_CLIENT_FILES();
9268
9321
  var identity = require_identity(), visit = require_visit();
@@ -9307,7 +9360,7 @@ var require_anchors = __commonJS({ "../../node_modules/yaml/dist/doc/anchors.js"
9307
9360
  exports2.createNodeAnchors = createNodeAnchors;
9308
9361
  exports2.findNewAnchor = findNewAnchor;
9309
9362
  } });
9310
- var require_applyReviver = __commonJS({ "../../node_modules/yaml/dist/doc/applyReviver.js"(exports2) {
9363
+ var require_applyReviver = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/doc/applyReviver.js"(exports2) {
9311
9364
  "use strict";
9312
9365
  init_define_IGNITIFY_CLIENT_FILES();
9313
9366
  function applyReviver(reviver, obj, key, val) {
@@ -9331,7 +9384,7 @@ var require_applyReviver = __commonJS({ "../../node_modules/yaml/dist/doc/applyR
9331
9384
  }
9332
9385
  exports2.applyReviver = applyReviver;
9333
9386
  } });
9334
- var require_toJS = __commonJS({ "../../node_modules/yaml/dist/nodes/toJS.js"(exports2) {
9387
+ var require_toJS = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/nodes/toJS.js"(exports2) {
9335
9388
  "use strict";
9336
9389
  init_define_IGNITIFY_CLIENT_FILES();
9337
9390
  var identity = require_identity();
@@ -9350,7 +9403,7 @@ var require_toJS = __commonJS({ "../../node_modules/yaml/dist/nodes/toJS.js"(exp
9350
9403
  }
9351
9404
  exports2.toJS = toJS;
9352
9405
  } });
9353
- var require_Node = __commonJS({ "../../node_modules/yaml/dist/nodes/Node.js"(exports2) {
9406
+ var require_Node = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/nodes/Node.js"(exports2) {
9354
9407
  "use strict";
9355
9408
  init_define_IGNITIFY_CLIENT_FILES();
9356
9409
  var applyReviver = require_applyReviver(), identity = require_identity(), toJS = require_toJS(), NodeBase = class {
@@ -9370,7 +9423,7 @@ var require_Node = __commonJS({ "../../node_modules/yaml/dist/nodes/Node.js"(exp
9370
9423
  };
9371
9424
  exports2.NodeBase = NodeBase;
9372
9425
  } });
9373
- var require_Alias = __commonJS({ "../../node_modules/yaml/dist/nodes/Alias.js"(exports2) {
9426
+ var require_Alias = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/nodes/Alias.js"(exports2) {
9374
9427
  "use strict";
9375
9428
  init_define_IGNITIFY_CLIENT_FILES();
9376
9429
  var anchors = require_anchors(), visit = require_visit(), identity = require_identity(), Node = require_Node(), toJS = require_toJS(), Alias = class extends Node.NodeBase {
@@ -9443,7 +9496,7 @@ var require_Alias = __commonJS({ "../../node_modules/yaml/dist/nodes/Alias.js"(e
9443
9496
  }
9444
9497
  exports2.Alias = Alias;
9445
9498
  } });
9446
- var require_Scalar = __commonJS({ "../../node_modules/yaml/dist/nodes/Scalar.js"(exports2) {
9499
+ var require_Scalar = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/nodes/Scalar.js"(exports2) {
9447
9500
  "use strict";
9448
9501
  init_define_IGNITIFY_CLIENT_FILES();
9449
9502
  var identity = require_identity(), Node = require_Node(), toJS = require_toJS(), isScalarValue = (value) => !value || typeof value != "function" && typeof value != "object", Scalar = class extends Node.NodeBase {
@@ -9465,7 +9518,7 @@ var require_Scalar = __commonJS({ "../../node_modules/yaml/dist/nodes/Scalar.js"
9465
9518
  exports2.Scalar = Scalar;
9466
9519
  exports2.isScalarValue = isScalarValue;
9467
9520
  } });
9468
- var require_createNode = __commonJS({ "../../node_modules/yaml/dist/doc/createNode.js"(exports2) {
9521
+ var require_createNode = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/doc/createNode.js"(exports2) {
9469
9522
  "use strict";
9470
9523
  init_define_IGNITIFY_CLIENT_FILES();
9471
9524
  var Alias = require_Alias(), identity = require_identity(), Scalar = require_Scalar(), defaultTagPrefix = "tag:yaml.org,2002:";
@@ -9504,7 +9557,7 @@ var require_createNode = __commonJS({ "../../node_modules/yaml/dist/doc/createNo
9504
9557
  }
9505
9558
  exports2.createNode = createNode;
9506
9559
  } });
9507
- var require_Collection = __commonJS({ "../../node_modules/yaml/dist/nodes/Collection.js"(exports2) {
9560
+ var require_Collection = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/nodes/Collection.js"(exports2) {
9508
9561
  "use strict";
9509
9562
  init_define_IGNITIFY_CLIENT_FILES();
9510
9563
  var createNode = require_createNode(), identity = require_identity(), Node = require_Node();
@@ -9577,7 +9630,7 @@ var require_Collection = __commonJS({ "../../node_modules/yaml/dist/nodes/Collec
9577
9630
  exports2.collectionFromPath = collectionFromPath;
9578
9631
  exports2.isEmptyPath = isEmptyPath;
9579
9632
  } });
9580
- var require_stringifyComment = __commonJS({ "../../node_modules/yaml/dist/stringify/stringifyComment.js"(exports2) {
9633
+ var require_stringifyComment = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/stringify/stringifyComment.js"(exports2) {
9581
9634
  "use strict";
9582
9635
  init_define_IGNITIFY_CLIENT_FILES();
9583
9636
  var stringifyComment = (str3) => str3.replace(/^(?!$)(?: $)?/gm, "#");
@@ -9592,7 +9645,7 @@ var require_stringifyComment = __commonJS({ "../../node_modules/yaml/dist/string
9592
9645
  exports2.lineComment = lineComment;
9593
9646
  exports2.stringifyComment = stringifyComment;
9594
9647
  } });
9595
- var require_foldFlowLines = __commonJS({ "../../node_modules/yaml/dist/stringify/foldFlowLines.js"(exports2) {
9648
+ var require_foldFlowLines = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/stringify/foldFlowLines.js"(exports2) {
9596
9649
  "use strict";
9597
9650
  init_define_IGNITIFY_CLIENT_FILES();
9598
9651
  var FOLD_FLOW = "flow", FOLD_BLOCK = "block", FOLD_QUOTED = "quoted";
@@ -9669,7 +9722,7 @@ ${indent}${text.slice(fold + 1, end2)}`);
9669
9722
  exports2.FOLD_QUOTED = FOLD_QUOTED;
9670
9723
  exports2.foldFlowLines = foldFlowLines;
9671
9724
  } });
9672
- var require_stringifyString = __commonJS({ "../../node_modules/yaml/dist/stringify/stringifyString.js"(exports2) {
9725
+ var require_stringifyString = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/stringify/stringifyString.js"(exports2) {
9673
9726
  "use strict";
9674
9727
  init_define_IGNITIFY_CLIENT_FILES();
9675
9728
  var Scalar = require_Scalar(), foldFlowLines = require_foldFlowLines(), getFoldOptions = (ctx, isBlock) => ({ indentAtStart: isBlock ? ctx.indent.length : ctx.indentAtStart, lineWidth: ctx.options.lineWidth, minContentWidth: ctx.options.minContentWidth }), containsDocumentMarker = (str3) => /^(%|---|\.\.\.)/m.test(str3);
@@ -9851,7 +9904,7 @@ ${indent}`);
9851
9904
  }
9852
9905
  exports2.stringifyString = stringifyString;
9853
9906
  } });
9854
- var require_stringify = __commonJS({ "../../node_modules/yaml/dist/stringify/stringify.js"(exports2) {
9907
+ var require_stringify = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/stringify/stringify.js"(exports2) {
9855
9908
  "use strict";
9856
9909
  init_define_IGNITIFY_CLIENT_FILES();
9857
9910
  var anchors = require_anchors(), identity = require_identity(), stringifyComment = require_stringifyComment(), stringifyString = require_stringifyString();
@@ -9915,7 +9968,7 @@ ${ctx.indent}${str3}` : str3;
9915
9968
  exports2.createStringifyContext = createStringifyContext;
9916
9969
  exports2.stringify = stringify;
9917
9970
  } });
9918
- var require_stringifyPair = __commonJS({ "../../node_modules/yaml/dist/stringify/stringifyPair.js"(exports2) {
9971
+ var require_stringifyPair = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/stringify/stringifyPair.js"(exports2) {
9919
9972
  "use strict";
9920
9973
  init_define_IGNITIFY_CLIENT_FILES();
9921
9974
  var identity = require_identity(), Scalar = require_Scalar(), stringify = require_stringify(), stringifyComment = require_stringifyComment();
@@ -9973,7 +10026,7 @@ ${ctx.indent}`);
9973
10026
  }
9974
10027
  exports2.stringifyPair = stringifyPair;
9975
10028
  } });
9976
- var require_log = __commonJS({ "../../node_modules/yaml/dist/log.js"(exports2) {
10029
+ var require_log = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/log.js"(exports2) {
9977
10030
  "use strict";
9978
10031
  init_define_IGNITIFY_CLIENT_FILES();
9979
10032
  var node_process = require("process");
@@ -9986,7 +10039,7 @@ var require_log = __commonJS({ "../../node_modules/yaml/dist/log.js"(exports2) {
9986
10039
  exports2.debug = debug;
9987
10040
  exports2.warn = warn2;
9988
10041
  } });
9989
- var require_merge = __commonJS({ "../../node_modules/yaml/dist/schema/yaml-1.1/merge.js"(exports2) {
10042
+ var require_merge = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/schema/yaml-1.1/merge.js"(exports2) {
9990
10043
  "use strict";
9991
10044
  init_define_IGNITIFY_CLIENT_FILES();
9992
10045
  var identity = require_identity(), Scalar = require_Scalar(), MERGE_KEY = "<<", merge2 = { identify: (value) => value === MERGE_KEY || typeof value == "symbol" && value.description === MERGE_KEY, default: "key", tag: "tag:yaml.org,2002:merge", test: /^<<$/, resolve: () => Object.assign(new Scalar.Scalar(Symbol(MERGE_KEY)), { addToJSMap: addMergeToJSMap }), stringify: () => MERGE_KEY }, isMergeKey = (ctx, key) => (merge2.identify(key) || identity.isScalar(key) && (!key.type || key.type === Scalar.Scalar.PLAIN) && merge2.identify(key.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge2.tag && tag.default);
@@ -10010,7 +10063,7 @@ var require_merge = __commonJS({ "../../node_modules/yaml/dist/schema/yaml-1.1/m
10010
10063
  exports2.isMergeKey = isMergeKey;
10011
10064
  exports2.merge = merge2;
10012
10065
  } });
10013
- var require_addPairToJSMap = __commonJS({ "../../node_modules/yaml/dist/nodes/addPairToJSMap.js"(exports2) {
10066
+ var require_addPairToJSMap = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/nodes/addPairToJSMap.js"(exports2) {
10014
10067
  "use strict";
10015
10068
  init_define_IGNITIFY_CLIENT_FILES();
10016
10069
  var log = require_log(), merge2 = require_merge(), stringify = require_stringify(), identity = require_identity(), toJS = require_toJS();
@@ -10047,7 +10100,7 @@ var require_addPairToJSMap = __commonJS({ "../../node_modules/yaml/dist/nodes/ad
10047
10100
  }
10048
10101
  exports2.addPairToJSMap = addPairToJSMap;
10049
10102
  } });
10050
- var require_Pair = __commonJS({ "../../node_modules/yaml/dist/nodes/Pair.js"(exports2) {
10103
+ var require_Pair = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/nodes/Pair.js"(exports2) {
10051
10104
  "use strict";
10052
10105
  init_define_IGNITIFY_CLIENT_FILES();
10053
10106
  var createNode = require_createNode(), stringifyPair = require_stringifyPair(), addPairToJSMap = require_addPairToJSMap(), identity = require_identity();
@@ -10074,7 +10127,7 @@ var require_Pair = __commonJS({ "../../node_modules/yaml/dist/nodes/Pair.js"(exp
10074
10127
  exports2.Pair = Pair;
10075
10128
  exports2.createPair = createPair;
10076
10129
  } });
10077
- var require_stringifyCollection = __commonJS({ "../../node_modules/yaml/dist/stringify/stringifyCollection.js"(exports2) {
10130
+ var require_stringifyCollection = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/stringify/stringifyCollection.js"(exports2) {
10078
10131
  "use strict";
10079
10132
  init_define_IGNITIFY_CLIENT_FILES();
10080
10133
  var identity = require_identity(), stringify = require_stringify(), stringifyComment = require_stringifyComment();
@@ -10149,7 +10202,7 @@ ${indent}${end}`;
10149
10202
  }
10150
10203
  exports2.stringifyCollection = stringifyCollection;
10151
10204
  } });
10152
- var require_YAMLMap = __commonJS({ "../../node_modules/yaml/dist/nodes/YAMLMap.js"(exports2) {
10205
+ var require_YAMLMap = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/nodes/YAMLMap.js"(exports2) {
10153
10206
  "use strict";
10154
10207
  init_define_IGNITIFY_CLIENT_FILES();
10155
10208
  var stringifyCollection = require_stringifyCollection(), addPairToJSMap = require_addPairToJSMap(), Collection = require_Collection(), identity = require_identity(), Pair = require_Pair(), Scalar = require_Scalar();
@@ -10215,7 +10268,7 @@ var require_YAMLMap = __commonJS({ "../../node_modules/yaml/dist/nodes/YAMLMap.j
10215
10268
  exports2.YAMLMap = YAMLMap;
10216
10269
  exports2.findPair = findPair;
10217
10270
  } });
10218
- var require_map = __commonJS({ "../../node_modules/yaml/dist/schema/common/map.js"(exports2) {
10271
+ var require_map = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/schema/common/map.js"(exports2) {
10219
10272
  "use strict";
10220
10273
  init_define_IGNITIFY_CLIENT_FILES();
10221
10274
  var identity = require_identity(), YAMLMap = require_YAMLMap(), map2 = { collection: "map", default: true, nodeClass: YAMLMap.YAMLMap, tag: "tag:yaml.org,2002:map", resolve(map3, onError) {
@@ -10223,7 +10276,7 @@ var require_map = __commonJS({ "../../node_modules/yaml/dist/schema/common/map.j
10223
10276
  }, createNode: (schema2, obj, ctx) => YAMLMap.YAMLMap.from(schema2, obj, ctx) };
10224
10277
  exports2.map = map2;
10225
10278
  } });
10226
- var require_YAMLSeq = __commonJS({ "../../node_modules/yaml/dist/nodes/YAMLSeq.js"(exports2) {
10279
+ var require_YAMLSeq = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/nodes/YAMLSeq.js"(exports2) {
10227
10280
  "use strict";
10228
10281
  init_define_IGNITIFY_CLIENT_FILES();
10229
10282
  var createNode = require_createNode(), stringifyCollection = require_stringifyCollection(), Collection = require_Collection(), identity = require_identity(), Scalar = require_Scalar(), toJS = require_toJS(), YAMLSeq = class extends Collection.Collection {
@@ -10287,7 +10340,7 @@ var require_YAMLSeq = __commonJS({ "../../node_modules/yaml/dist/nodes/YAMLSeq.j
10287
10340
  }
10288
10341
  exports2.YAMLSeq = YAMLSeq;
10289
10342
  } });
10290
- var require_seq = __commonJS({ "../../node_modules/yaml/dist/schema/common/seq.js"(exports2) {
10343
+ var require_seq = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/schema/common/seq.js"(exports2) {
10291
10344
  "use strict";
10292
10345
  init_define_IGNITIFY_CLIENT_FILES();
10293
10346
  var identity = require_identity(), YAMLSeq = require_YAMLSeq(), seq2 = { collection: "seq", default: true, nodeClass: YAMLSeq.YAMLSeq, tag: "tag:yaml.org,2002:seq", resolve(seq3, onError) {
@@ -10295,7 +10348,7 @@ var require_seq = __commonJS({ "../../node_modules/yaml/dist/schema/common/seq.j
10295
10348
  }, createNode: (schema2, obj, ctx) => YAMLSeq.YAMLSeq.from(schema2, obj, ctx) };
10296
10349
  exports2.seq = seq2;
10297
10350
  } });
10298
- var require_string = __commonJS({ "../../node_modules/yaml/dist/schema/common/string.js"(exports2) {
10351
+ var require_string = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/schema/common/string.js"(exports2) {
10299
10352
  "use strict";
10300
10353
  init_define_IGNITIFY_CLIENT_FILES();
10301
10354
  var stringifyString = require_stringifyString(), string = { identify: (value) => typeof value == "string", default: true, tag: "tag:yaml.org,2002:str", resolve: (str3) => str3, stringify(item, ctx, onComment, onChompKeep) {
@@ -10303,13 +10356,13 @@ var require_string = __commonJS({ "../../node_modules/yaml/dist/schema/common/st
10303
10356
  } };
10304
10357
  exports2.string = string;
10305
10358
  } });
10306
- var require_null2 = __commonJS({ "../../node_modules/yaml/dist/schema/common/null.js"(exports2) {
10359
+ var require_null2 = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/schema/common/null.js"(exports2) {
10307
10360
  "use strict";
10308
10361
  init_define_IGNITIFY_CLIENT_FILES();
10309
10362
  var Scalar = require_Scalar(), nullTag = { identify: (value) => value == null, createNode: () => new Scalar.Scalar(null), default: true, tag: "tag:yaml.org,2002:null", test: /^(?:~|[Nn]ull|NULL)?$/, resolve: () => new Scalar.Scalar(null), stringify: ({ source }, ctx) => typeof source == "string" && nullTag.test.test(source) ? source : ctx.options.nullStr };
10310
10363
  exports2.nullTag = nullTag;
10311
10364
  } });
10312
- var require_bool = __commonJS({ "../../node_modules/yaml/dist/schema/core/bool.js"(exports2) {
10365
+ var require_bool = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/schema/core/bool.js"(exports2) {
10313
10366
  "use strict";
10314
10367
  init_define_IGNITIFY_CLIENT_FILES();
10315
10368
  var Scalar = require_Scalar(), boolTag = { identify: (value) => typeof value == "boolean", default: true, tag: "tag:yaml.org,2002:bool", test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/, resolve: (str3) => new Scalar.Scalar(str3[0] === "t" || str3[0] === "T"), stringify({ source, value }, ctx) {
@@ -10321,7 +10374,7 @@ var require_bool = __commonJS({ "../../node_modules/yaml/dist/schema/core/bool.j
10321
10374
  } };
10322
10375
  exports2.boolTag = boolTag;
10323
10376
  } });
10324
- var require_stringifyNumber = __commonJS({ "../../node_modules/yaml/dist/stringify/stringifyNumber.js"(exports2) {
10377
+ var require_stringifyNumber = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/stringify/stringifyNumber.js"(exports2) {
10325
10378
  "use strict";
10326
10379
  init_define_IGNITIFY_CLIENT_FILES();
10327
10380
  function stringifyNumber({ format, minFractionDigits, tag, value }) {
@@ -10339,7 +10392,7 @@ var require_stringifyNumber = __commonJS({ "../../node_modules/yaml/dist/stringi
10339
10392
  }
10340
10393
  exports2.stringifyNumber = stringifyNumber;
10341
10394
  } });
10342
- var require_float = __commonJS({ "../../node_modules/yaml/dist/schema/core/float.js"(exports2) {
10395
+ var require_float = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/schema/core/float.js"(exports2) {
10343
10396
  "use strict";
10344
10397
  init_define_IGNITIFY_CLIENT_FILES();
10345
10398
  var Scalar = require_Scalar(), stringifyNumber = require_stringifyNumber(), floatNaN = { identify: (value) => typeof value == "number", default: true, tag: "tag:yaml.org,2002:float", test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/, resolve: (str3) => str3.slice(-3).toLowerCase() === "nan" ? NaN : str3[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY, stringify: stringifyNumber.stringifyNumber }, floatExp = { identify: (value) => typeof value == "number", default: true, tag: "tag:yaml.org,2002:float", format: "EXP", test: /^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/, resolve: (str3) => parseFloat(str3), stringify(node) {
@@ -10353,7 +10406,7 @@ var require_float = __commonJS({ "../../node_modules/yaml/dist/schema/core/float
10353
10406
  exports2.floatExp = floatExp;
10354
10407
  exports2.floatNaN = floatNaN;
10355
10408
  } });
10356
- var require_int = __commonJS({ "../../node_modules/yaml/dist/schema/core/int.js"(exports2) {
10409
+ var require_int = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/schema/core/int.js"(exports2) {
10357
10410
  "use strict";
10358
10411
  init_define_IGNITIFY_CLIENT_FILES();
10359
10412
  var stringifyNumber = require_stringifyNumber(), intIdentify = (value) => typeof value == "bigint" || Number.isInteger(value), intResolve = (str3, offset, radix, { intAsBigInt }) => intAsBigInt ? BigInt(str3) : parseInt(str3.substring(offset), radix);
@@ -10366,13 +10419,13 @@ var require_int = __commonJS({ "../../node_modules/yaml/dist/schema/core/int.js"
10366
10419
  exports2.intHex = intHex;
10367
10420
  exports2.intOct = intOct;
10368
10421
  } });
10369
- var require_schema2 = __commonJS({ "../../node_modules/yaml/dist/schema/core/schema.js"(exports2) {
10422
+ var require_schema2 = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/schema/core/schema.js"(exports2) {
10370
10423
  "use strict";
10371
10424
  init_define_IGNITIFY_CLIENT_FILES();
10372
10425
  var map2 = require_map(), _null2 = require_null2(), seq2 = require_seq(), string = require_string(), bool2 = require_bool(), float2 = require_float(), int2 = require_int(), schema2 = [map2.map, seq2.seq, string.string, _null2.nullTag, bool2.boolTag, int2.intOct, int2.int, int2.intHex, float2.floatNaN, float2.floatExp, float2.float];
10373
10426
  exports2.schema = schema2;
10374
10427
  } });
10375
- var require_schema3 = __commonJS({ "../../node_modules/yaml/dist/schema/json/schema.js"(exports2) {
10428
+ var require_schema3 = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/schema/json/schema.js"(exports2) {
10376
10429
  "use strict";
10377
10430
  init_define_IGNITIFY_CLIENT_FILES();
10378
10431
  var Scalar = require_Scalar(), map2 = require_map(), seq2 = require_seq();
@@ -10384,7 +10437,7 @@ var require_schema3 = __commonJS({ "../../node_modules/yaml/dist/schema/json/sch
10384
10437
  } }, schema2 = [map2.map, seq2.seq].concat(jsonScalars, jsonError);
10385
10438
  exports2.schema = schema2;
10386
10439
  } });
10387
- var require_binary = __commonJS({ "../../node_modules/yaml/dist/schema/yaml-1.1/binary.js"(exports2) {
10440
+ var require_binary = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/schema/yaml-1.1/binary.js"(exports2) {
10388
10441
  "use strict";
10389
10442
  init_define_IGNITIFY_CLIENT_FILES();
10390
10443
  var node_buffer = require("buffer"), Scalar = require_Scalar(), stringifyString = require_stringifyString(), binary2 = { identify: (value) => value instanceof Uint8Array, default: false, tag: "tag:yaml.org,2002:binary", resolve(src, onError) {
@@ -10413,7 +10466,7 @@ var require_binary = __commonJS({ "../../node_modules/yaml/dist/schema/yaml-1.1/
10413
10466
  } };
10414
10467
  exports2.binary = binary2;
10415
10468
  } });
10416
- var require_pairs = __commonJS({ "../../node_modules/yaml/dist/schema/yaml-1.1/pairs.js"(exports2) {
10469
+ var require_pairs = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/schema/yaml-1.1/pairs.js"(exports2) {
10417
10470
  "use strict";
10418
10471
  init_define_IGNITIFY_CLIENT_FILES();
10419
10472
  var identity = require_identity(), Pair = require_Pair(), Scalar = require_Scalar(), YAMLSeq = require_YAMLSeq();
@@ -10461,7 +10514,7 @@ ${cn.comment}` : item.comment;
10461
10514
  exports2.pairs = pairs3;
10462
10515
  exports2.resolvePairs = resolvePairs;
10463
10516
  } });
10464
- var require_omap = __commonJS({ "../../node_modules/yaml/dist/schema/yaml-1.1/omap.js"(exports2) {
10517
+ var require_omap = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/schema/yaml-1.1/omap.js"(exports2) {
10465
10518
  "use strict";
10466
10519
  init_define_IGNITIFY_CLIENT_FILES();
10467
10520
  var identity = require_identity(), toJS = require_toJS(), YAMLMap = require_YAMLMap(), YAMLSeq = require_YAMLSeq(), pairs3 = require_pairs(), YAMLOMap = class _YAMLOMap extends YAMLSeq.YAMLSeq {
@@ -10493,7 +10546,7 @@ var require_omap = __commonJS({ "../../node_modules/yaml/dist/schema/yaml-1.1/om
10493
10546
  exports2.YAMLOMap = YAMLOMap;
10494
10547
  exports2.omap = omap2;
10495
10548
  } });
10496
- var require_bool2 = __commonJS({ "../../node_modules/yaml/dist/schema/yaml-1.1/bool.js"(exports2) {
10549
+ var require_bool2 = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/schema/yaml-1.1/bool.js"(exports2) {
10497
10550
  "use strict";
10498
10551
  init_define_IGNITIFY_CLIENT_FILES();
10499
10552
  var Scalar = require_Scalar();
@@ -10504,7 +10557,7 @@ var require_bool2 = __commonJS({ "../../node_modules/yaml/dist/schema/yaml-1.1/b
10504
10557
  exports2.falseTag = falseTag;
10505
10558
  exports2.trueTag = trueTag;
10506
10559
  } });
10507
- var require_float2 = __commonJS({ "../../node_modules/yaml/dist/schema/yaml-1.1/float.js"(exports2) {
10560
+ var require_float2 = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/schema/yaml-1.1/float.js"(exports2) {
10508
10561
  "use strict";
10509
10562
  init_define_IGNITIFY_CLIENT_FILES();
10510
10563
  var Scalar = require_Scalar(), stringifyNumber = require_stringifyNumber(), floatNaN = { identify: (value) => typeof value == "number", default: true, tag: "tag:yaml.org,2002:float", test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/, resolve: (str3) => str3.slice(-3).toLowerCase() === "nan" ? NaN : str3[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY, stringify: stringifyNumber.stringifyNumber }, floatExp = { identify: (value) => typeof value == "number", default: true, tag: "tag:yaml.org,2002:float", format: "EXP", test: /^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/, resolve: (str3) => parseFloat(str3.replace(/_/g, "")), stringify(node) {
@@ -10522,7 +10575,7 @@ var require_float2 = __commonJS({ "../../node_modules/yaml/dist/schema/yaml-1.1/
10522
10575
  exports2.floatExp = floatExp;
10523
10576
  exports2.floatNaN = floatNaN;
10524
10577
  } });
10525
- var require_int2 = __commonJS({ "../../node_modules/yaml/dist/schema/yaml-1.1/int.js"(exports2) {
10578
+ var require_int2 = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/schema/yaml-1.1/int.js"(exports2) {
10526
10579
  "use strict";
10527
10580
  init_define_IGNITIFY_CLIENT_FILES();
10528
10581
  var stringifyNumber = require_stringifyNumber(), intIdentify = (value) => typeof value == "bigint" || Number.isInteger(value);
@@ -10560,7 +10613,7 @@ var require_int2 = __commonJS({ "../../node_modules/yaml/dist/schema/yaml-1.1/in
10560
10613
  exports2.intHex = intHex;
10561
10614
  exports2.intOct = intOct;
10562
10615
  } });
10563
- var require_set = __commonJS({ "../../node_modules/yaml/dist/schema/yaml-1.1/set.js"(exports2) {
10616
+ var require_set = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/schema/yaml-1.1/set.js"(exports2) {
10564
10617
  "use strict";
10565
10618
  init_define_IGNITIFY_CLIENT_FILES();
10566
10619
  var identity = require_identity(), Pair = require_Pair(), YAMLMap = require_YAMLMap(), YAMLSet = class _YAMLSet extends YAMLMap.YAMLMap {
@@ -10605,7 +10658,7 @@ var require_set = __commonJS({ "../../node_modules/yaml/dist/schema/yaml-1.1/set
10605
10658
  exports2.YAMLSet = YAMLSet;
10606
10659
  exports2.set = set2;
10607
10660
  } });
10608
- var require_timestamp = __commonJS({ "../../node_modules/yaml/dist/schema/yaml-1.1/timestamp.js"(exports2) {
10661
+ var require_timestamp = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js"(exports2) {
10609
10662
  "use strict";
10610
10663
  init_define_IGNITIFY_CLIENT_FILES();
10611
10664
  var stringifyNumber = require_stringifyNumber();
@@ -10636,13 +10689,13 @@ var require_timestamp = __commonJS({ "../../node_modules/yaml/dist/schema/yaml-1
10636
10689
  exports2.intTime = intTime;
10637
10690
  exports2.timestamp = timestamp2;
10638
10691
  } });
10639
- var require_schema4 = __commonJS({ "../../node_modules/yaml/dist/schema/yaml-1.1/schema.js"(exports2) {
10692
+ var require_schema4 = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/schema/yaml-1.1/schema.js"(exports2) {
10640
10693
  "use strict";
10641
10694
  init_define_IGNITIFY_CLIENT_FILES();
10642
10695
  var map2 = require_map(), _null2 = require_null2(), seq2 = require_seq(), string = require_string(), binary2 = require_binary(), bool2 = require_bool2(), float2 = require_float2(), int2 = require_int2(), merge2 = require_merge(), omap2 = require_omap(), pairs3 = require_pairs(), set2 = require_set(), timestamp2 = require_timestamp(), schema2 = [map2.map, seq2.seq, string.string, _null2.nullTag, bool2.trueTag, bool2.falseTag, int2.intBin, int2.intOct, int2.int, int2.intHex, float2.floatNaN, float2.floatExp, float2.float, binary2.binary, merge2.merge, omap2.omap, pairs3.pairs, set2.set, timestamp2.intTime, timestamp2.floatTime, timestamp2.timestamp];
10643
10696
  exports2.schema = schema2;
10644
10697
  } });
10645
- var require_tags = __commonJS({ "../../node_modules/yaml/dist/schema/tags.js"(exports2) {
10698
+ var require_tags = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/schema/tags.js"(exports2) {
10646
10699
  "use strict";
10647
10700
  init_define_IGNITIFY_CLIENT_FILES();
10648
10701
  var map2 = require_map(), _null2 = require_null2(), seq2 = require_seq(), string = require_string(), bool2 = require_bool(), float2 = require_float(), int2 = require_int(), schema2 = require_schema2(), schema$1 = require_schema3(), binary2 = require_binary(), merge2 = require_merge(), omap2 = require_omap(), pairs3 = require_pairs(), schema$2 = require_schema4(), set2 = require_set(), timestamp2 = require_timestamp(), schemas = /* @__PURE__ */ new Map([["core", schema2.schema], ["failsafe", [map2.map, seq2.seq, string.string]], ["json", schema$1.schema], ["yaml11", schema$2.schema], ["yaml-1.1", schema$2.schema]]), tagsByName = { binary: binary2.binary, bool: bool2.boolTag, float: float2.float, floatExp: float2.floatExp, floatNaN: float2.floatNaN, floatTime: timestamp2.floatTime, int: int2.int, intHex: int2.intHex, intOct: int2.intOct, intTime: timestamp2.intTime, map: map2.map, merge: merge2.merge, null: _null2.nullTag, omap: omap2.omap, pairs: pairs3.pairs, seq: seq2.seq, set: set2.set, timestamp: timestamp2.timestamp }, coreKnownTags = { "tag:yaml.org,2002:binary": binary2.binary, "tag:yaml.org,2002:merge": merge2.merge, "tag:yaml.org,2002:omap": omap2.omap, "tag:yaml.org,2002:pairs": pairs3.pairs, "tag:yaml.org,2002:set": set2.set, "tag:yaml.org,2002:timestamp": timestamp2.timestamp };
@@ -10669,7 +10722,7 @@ var require_tags = __commonJS({ "../../node_modules/yaml/dist/schema/tags.js"(ex
10669
10722
  exports2.coreKnownTags = coreKnownTags;
10670
10723
  exports2.getTags = getTags;
10671
10724
  } });
10672
- var require_Schema = __commonJS({ "../../node_modules/yaml/dist/schema/Schema.js"(exports2) {
10725
+ var require_Schema = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/schema/Schema.js"(exports2) {
10673
10726
  "use strict";
10674
10727
  init_define_IGNITIFY_CLIENT_FILES();
10675
10728
  var identity = require_identity(), map2 = require_map(), seq2 = require_seq(), string = require_string(), tags = require_tags(), sortMapEntriesByKey = (a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0, Schema2 = class _Schema {
@@ -10683,7 +10736,7 @@ var require_Schema = __commonJS({ "../../node_modules/yaml/dist/schema/Schema.js
10683
10736
  };
10684
10737
  exports2.Schema = Schema2;
10685
10738
  } });
10686
- var require_stringifyDocument = __commonJS({ "../../node_modules/yaml/dist/stringify/stringifyDocument.js"(exports2) {
10739
+ var require_stringifyDocument = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/stringify/stringifyDocument.js"(exports2) {
10687
10740
  "use strict";
10688
10741
  init_define_IGNITIFY_CLIENT_FILES();
10689
10742
  var identity = require_identity(), stringify = require_stringify(), stringifyComment = require_stringifyComment();
@@ -10727,7 +10780,7 @@ var require_stringifyDocument = __commonJS({ "../../node_modules/yaml/dist/strin
10727
10780
  }
10728
10781
  exports2.stringifyDocument = stringifyDocument;
10729
10782
  } });
10730
- var require_Document = __commonJS({ "../../node_modules/yaml/dist/doc/Document.js"(exports2) {
10783
+ var require_Document = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/doc/Document.js"(exports2) {
10731
10784
  "use strict";
10732
10785
  init_define_IGNITIFY_CLIENT_FILES();
10733
10786
  var Alias = require_Alias(), Collection = require_Collection(), identity = require_identity(), Pair = require_Pair(), toJS = require_toJS(), Schema2 = require_Schema(), stringifyDocument = require_stringifyDocument(), anchors = require_anchors(), applyReviver = require_applyReviver(), createNode = require_createNode(), directives = require_directives(), Document = class _Document {
@@ -10841,7 +10894,7 @@ var require_Document = __commonJS({ "../../node_modules/yaml/dist/doc/Document.j
10841
10894
  }
10842
10895
  exports2.Document = Document;
10843
10896
  } });
10844
- var require_errors2 = __commonJS({ "../../node_modules/yaml/dist/errors.js"(exports2) {
10897
+ var require_errors2 = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/errors.js"(exports2) {
10845
10898
  "use strict";
10846
10899
  init_define_IGNITIFY_CLIENT_FILES();
10847
10900
  var YAMLError = class extends Error {
@@ -10887,7 +10940,7 @@ ${pointer}
10887
10940
  exports2.YAMLWarning = YAMLWarning;
10888
10941
  exports2.prettifyError = prettifyError;
10889
10942
  } });
10890
- var require_resolve_props = __commonJS({ "../../node_modules/yaml/dist/compose/resolve-props.js"(exports2) {
10943
+ var require_resolve_props = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/compose/resolve-props.js"(exports2) {
10891
10944
  "use strict";
10892
10945
  init_define_IGNITIFY_CLIENT_FILES();
10893
10946
  function resolveProps(tokens, { flow, indicator, next, offset, onError, parentIndent, startOnNewline }) {
@@ -10928,7 +10981,7 @@ var require_resolve_props = __commonJS({ "../../node_modules/yaml/dist/compose/r
10928
10981
  }
10929
10982
  exports2.resolveProps = resolveProps;
10930
10983
  } });
10931
- var require_util_contains_newline = __commonJS({ "../../node_modules/yaml/dist/compose/util-contains-newline.js"(exports2) {
10984
+ var require_util_contains_newline = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/compose/util-contains-newline.js"(exports2) {
10932
10985
  "use strict";
10933
10986
  init_define_IGNITIFY_CLIENT_FILES();
10934
10987
  function containsNewline(key) {
@@ -10959,7 +11012,7 @@ var require_util_contains_newline = __commonJS({ "../../node_modules/yaml/dist/c
10959
11012
  }
10960
11013
  exports2.containsNewline = containsNewline;
10961
11014
  } });
10962
- var require_util_flow_indent_check = __commonJS({ "../../node_modules/yaml/dist/compose/util-flow-indent-check.js"(exports2) {
11015
+ var require_util_flow_indent_check = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/compose/util-flow-indent-check.js"(exports2) {
10963
11016
  "use strict";
10964
11017
  init_define_IGNITIFY_CLIENT_FILES();
10965
11018
  var utilContainsNewline = require_util_contains_newline();
@@ -10971,7 +11024,7 @@ var require_util_flow_indent_check = __commonJS({ "../../node_modules/yaml/dist/
10971
11024
  }
10972
11025
  exports2.flowIndentCheck = flowIndentCheck;
10973
11026
  } });
10974
- var require_util_map_includes = __commonJS({ "../../node_modules/yaml/dist/compose/util-map-includes.js"(exports2) {
11027
+ var require_util_map_includes = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/compose/util-map-includes.js"(exports2) {
10975
11028
  "use strict";
10976
11029
  init_define_IGNITIFY_CLIENT_FILES();
10977
11030
  var identity = require_identity();
@@ -10983,7 +11036,7 @@ var require_util_map_includes = __commonJS({ "../../node_modules/yaml/dist/compo
10983
11036
  }
10984
11037
  exports2.mapIncludes = mapIncludes;
10985
11038
  } });
10986
- var require_resolve_block_map = __commonJS({ "../../node_modules/yaml/dist/compose/resolve-block-map.js"(exports2) {
11039
+ var require_resolve_block_map = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/compose/resolve-block-map.js"(exports2) {
10987
11040
  "use strict";
10988
11041
  init_define_IGNITIFY_CLIENT_FILES();
10989
11042
  var Pair = require_Pair(), YAMLMap = require_YAMLMap(), resolveProps = require_resolve_props(), utilContainsNewline = require_util_contains_newline(), utilFlowIndentCheck = require_util_flow_indent_check(), utilMapIncludes = require_util_map_includes(), startColMsg = "All mapping items must start at the same column";
@@ -11022,7 +11075,7 @@ var require_resolve_block_map = __commonJS({ "../../node_modules/yaml/dist/compo
11022
11075
  }
11023
11076
  exports2.resolveBlockMap = resolveBlockMap;
11024
11077
  } });
11025
- var require_resolve_block_seq = __commonJS({ "../../node_modules/yaml/dist/compose/resolve-block-seq.js"(exports2) {
11078
+ var require_resolve_block_seq = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/compose/resolve-block-seq.js"(exports2) {
11026
11079
  "use strict";
11027
11080
  init_define_IGNITIFY_CLIENT_FILES();
11028
11081
  var YAMLSeq = require_YAMLSeq(), resolveProps = require_resolve_props(), utilFlowIndentCheck = require_util_flow_indent_check();
@@ -11044,7 +11097,7 @@ var require_resolve_block_seq = __commonJS({ "../../node_modules/yaml/dist/compo
11044
11097
  }
11045
11098
  exports2.resolveBlockSeq = resolveBlockSeq;
11046
11099
  } });
11047
- var require_resolve_end = __commonJS({ "../../node_modules/yaml/dist/compose/resolve-end.js"(exports2) {
11100
+ var require_resolve_end = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/compose/resolve-end.js"(exports2) {
11048
11101
  "use strict";
11049
11102
  init_define_IGNITIFY_CLIENT_FILES();
11050
11103
  function resolveEnd(end, offset, reqSpace, onError) {
@@ -11076,7 +11129,7 @@ var require_resolve_end = __commonJS({ "../../node_modules/yaml/dist/compose/res
11076
11129
  }
11077
11130
  exports2.resolveEnd = resolveEnd;
11078
11131
  } });
11079
- var require_resolve_flow_collection = __commonJS({ "../../node_modules/yaml/dist/compose/resolve-flow-collection.js"(exports2) {
11132
+ var require_resolve_flow_collection = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/compose/resolve-flow-collection.js"(exports2) {
11080
11133
  "use strict";
11081
11134
  init_define_IGNITIFY_CLIENT_FILES();
11082
11135
  var identity = require_identity(), Pair = require_Pair(), YAMLMap = require_YAMLMap(), YAMLSeq = require_YAMLSeq(), resolveEnd = require_resolve_end(), resolveProps = require_resolve_props(), utilContainsNewline = require_util_contains_newline(), utilMapIncludes = require_util_map_includes(), blockMsg = "Block collections are not allowed within flow collections", isBlock = (token) => token && (token.type === "block-map" || token.type === "block-seq");
@@ -11166,7 +11219,7 @@ var require_resolve_flow_collection = __commonJS({ "../../node_modules/yaml/dist
11166
11219
  }
11167
11220
  exports2.resolveFlowCollection = resolveFlowCollection;
11168
11221
  } });
11169
- var require_compose_collection = __commonJS({ "../../node_modules/yaml/dist/compose/compose-collection.js"(exports2) {
11222
+ var require_compose_collection = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/compose/compose-collection.js"(exports2) {
11170
11223
  "use strict";
11171
11224
  init_define_IGNITIFY_CLIENT_FILES();
11172
11225
  var identity = require_identity(), Scalar = require_Scalar(), YAMLMap = require_YAMLMap(), YAMLSeq = require_YAMLSeq(), resolveBlockMap = require_resolve_block_map(), resolveBlockSeq = require_resolve_block_seq(), resolveFlowCollection = require_resolve_flow_collection();
@@ -11193,7 +11246,7 @@ var require_compose_collection = __commonJS({ "../../node_modules/yaml/dist/comp
11193
11246
  }
11194
11247
  exports2.composeCollection = composeCollection;
11195
11248
  } });
11196
- var require_resolve_block_scalar = __commonJS({ "../../node_modules/yaml/dist/compose/resolve-block-scalar.js"(exports2) {
11249
+ var require_resolve_block_scalar = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/compose/resolve-block-scalar.js"(exports2) {
11197
11250
  "use strict";
11198
11251
  init_define_IGNITIFY_CLIENT_FILES();
11199
11252
  var Scalar = require_Scalar();
@@ -11305,7 +11358,7 @@ var require_resolve_block_scalar = __commonJS({ "../../node_modules/yaml/dist/co
11305
11358
  }
11306
11359
  exports2.resolveBlockScalar = resolveBlockScalar;
11307
11360
  } });
11308
- var require_resolve_flow_scalar = __commonJS({ "../../node_modules/yaml/dist/compose/resolve-flow-scalar.js"(exports2) {
11361
+ var require_resolve_flow_scalar = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/compose/resolve-flow-scalar.js"(exports2) {
11309
11362
  "use strict";
11310
11363
  init_define_IGNITIFY_CLIENT_FILES();
11311
11364
  var Scalar = require_Scalar(), resolveEnd = require_resolve_end();
@@ -11429,7 +11482,7 @@ var require_resolve_flow_scalar = __commonJS({ "../../node_modules/yaml/dist/com
11429
11482
  }
11430
11483
  exports2.resolveFlowScalar = resolveFlowScalar;
11431
11484
  } });
11432
- var require_compose_scalar = __commonJS({ "../../node_modules/yaml/dist/compose/compose-scalar.js"(exports2) {
11485
+ var require_compose_scalar = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/compose/compose-scalar.js"(exports2) {
11433
11486
  "use strict";
11434
11487
  init_define_IGNITIFY_CLIENT_FILES();
11435
11488
  var identity = require_identity(), Scalar = require_Scalar(), resolveBlockScalar = require_resolve_block_scalar(), resolveFlowScalar = require_resolve_flow_scalar();
@@ -11468,7 +11521,7 @@ var require_compose_scalar = __commonJS({ "../../node_modules/yaml/dist/compose/
11468
11521
  }
11469
11522
  exports2.composeScalar = composeScalar;
11470
11523
  } });
11471
- var require_util_empty_scalar_position = __commonJS({ "../../node_modules/yaml/dist/compose/util-empty-scalar-position.js"(exports2) {
11524
+ var require_util_empty_scalar_position = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/compose/util-empty-scalar-position.js"(exports2) {
11472
11525
  "use strict";
11473
11526
  init_define_IGNITIFY_CLIENT_FILES();
11474
11527
  function emptyScalarPosition(offset, before, pos) {
@@ -11491,7 +11544,7 @@ var require_util_empty_scalar_position = __commonJS({ "../../node_modules/yaml/d
11491
11544
  }
11492
11545
  exports2.emptyScalarPosition = emptyScalarPosition;
11493
11546
  } });
11494
- var require_compose_node = __commonJS({ "../../node_modules/yaml/dist/compose/compose-node.js"(exports2) {
11547
+ var require_compose_node = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/compose/compose-node.js"(exports2) {
11495
11548
  "use strict";
11496
11549
  init_define_IGNITIFY_CLIENT_FILES();
11497
11550
  var Alias = require_Alias(), identity = require_identity(), composeCollection = require_compose_collection(), composeScalar = require_compose_scalar(), resolveEnd = require_resolve_end(), utilEmptyScalarPosition = require_util_empty_scalar_position(), CN = { composeNode, composeEmptyNode };
@@ -11537,7 +11590,7 @@ var require_compose_node = __commonJS({ "../../node_modules/yaml/dist/compose/co
11537
11590
  exports2.composeEmptyNode = composeEmptyNode;
11538
11591
  exports2.composeNode = composeNode;
11539
11592
  } });
11540
- var require_compose_doc = __commonJS({ "../../node_modules/yaml/dist/compose/compose-doc.js"(exports2) {
11593
+ var require_compose_doc = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/compose/compose-doc.js"(exports2) {
11541
11594
  "use strict";
11542
11595
  init_define_IGNITIFY_CLIENT_FILES();
11543
11596
  var Document = require_Document(), composeNode = require_compose_node(), resolveEnd = require_resolve_end(), resolveProps = require_resolve_props();
@@ -11549,7 +11602,7 @@ var require_compose_doc = __commonJS({ "../../node_modules/yaml/dist/compose/com
11549
11602
  }
11550
11603
  exports2.composeDoc = composeDoc;
11551
11604
  } });
11552
- var require_composer = __commonJS({ "../../node_modules/yaml/dist/compose/composer.js"(exports2) {
11605
+ var require_composer = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/compose/composer.js"(exports2) {
11553
11606
  "use strict";
11554
11607
  init_define_IGNITIFY_CLIENT_FILES();
11555
11608
  var node_process = require("process"), directives = require_directives(), Document = require_Document(), errors = require_errors2(), identity = require_identity(), composeDoc = require_compose_doc(), resolveEnd = require_resolve_end();
@@ -11673,7 +11726,7 @@ ${end.comment}` : end.comment;
11673
11726
  };
11674
11727
  exports2.Composer = Composer;
11675
11728
  } });
11676
- var require_cst_scalar = __commonJS({ "../../node_modules/yaml/dist/parse/cst-scalar.js"(exports2) {
11729
+ var require_cst_scalar = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/parse/cst-scalar.js"(exports2) {
11677
11730
  "use strict";
11678
11731
  init_define_IGNITIFY_CLIENT_FILES();
11679
11732
  var resolveBlockScalar = require_resolve_block_scalar(), resolveFlowScalar = require_resolve_flow_scalar(), errors = require_errors2(), stringifyString = require_stringifyString();
@@ -11808,7 +11861,7 @@ var require_cst_scalar = __commonJS({ "../../node_modules/yaml/dist/parse/cst-sc
11808
11861
  exports2.resolveAsScalar = resolveAsScalar;
11809
11862
  exports2.setScalarValue = setScalarValue;
11810
11863
  } });
11811
- var require_cst_stringify = __commonJS({ "../../node_modules/yaml/dist/parse/cst-stringify.js"(exports2) {
11864
+ var require_cst_stringify = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/parse/cst-stringify.js"(exports2) {
11812
11865
  "use strict";
11813
11866
  init_define_IGNITIFY_CLIENT_FILES();
11814
11867
  var stringify = (cst) => "type" in cst ? stringifyToken(cst) : stringifyItem(cst);
@@ -11851,7 +11904,7 @@ var require_cst_stringify = __commonJS({ "../../node_modules/yaml/dist/parse/cst
11851
11904
  }
11852
11905
  exports2.stringify = stringify;
11853
11906
  } });
11854
- var require_cst_visit = __commonJS({ "../../node_modules/yaml/dist/parse/cst-visit.js"(exports2) {
11907
+ var require_cst_visit = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/parse/cst-visit.js"(exports2) {
11855
11908
  "use strict";
11856
11909
  init_define_IGNITIFY_CLIENT_FILES();
11857
11910
  var BREAK = /* @__PURE__ */ Symbol("break visit"), SKIP = /* @__PURE__ */ Symbol("skip children"), REMOVE = /* @__PURE__ */ Symbol("remove item");
@@ -11896,7 +11949,7 @@ var require_cst_visit = __commonJS({ "../../node_modules/yaml/dist/parse/cst-vis
11896
11949
  }
11897
11950
  exports2.visit = visit;
11898
11951
  } });
11899
- var require_cst = __commonJS({ "../../node_modules/yaml/dist/parse/cst.js"(exports2) {
11952
+ var require_cst = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/parse/cst.js"(exports2) {
11900
11953
  "use strict";
11901
11954
  init_define_IGNITIFY_CLIENT_FILES();
11902
11955
  var cstScalar = require_cst_scalar(), cstStringify = require_cst_stringify(), cstVisit = require_cst_visit(), BOM = "\uFEFF", DOCUMENT = "", FLOW_END = "", SCALAR = "", isCollection = (token) => !!token && "items" in token, isScalar2 = (token) => !!token && (token.type === "scalar" || token.type === "single-quoted-scalar" || token.type === "double-quoted-scalar" || token.type === "block-scalar");
@@ -11989,7 +12042,7 @@ var require_cst = __commonJS({ "../../node_modules/yaml/dist/parse/cst.js"(expor
11989
12042
  exports2.prettyToken = prettyToken;
11990
12043
  exports2.tokenType = tokenType;
11991
12044
  } });
11992
- var require_lexer = __commonJS({ "../../node_modules/yaml/dist/parse/lexer.js"(exports2) {
12045
+ var require_lexer = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/parse/lexer.js"(exports2) {
11993
12046
  "use strict";
11994
12047
  init_define_IGNITIFY_CLIENT_FILES();
11995
12048
  var cst = require_cst();
@@ -12366,7 +12419,7 @@ var require_lexer = __commonJS({ "../../node_modules/yaml/dist/parse/lexer.js"(e
12366
12419
  };
12367
12420
  exports2.Lexer = Lexer;
12368
12421
  } });
12369
- var require_line_counter = __commonJS({ "../../node_modules/yaml/dist/parse/line-counter.js"(exports2) {
12422
+ var require_line_counter = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/parse/line-counter.js"(exports2) {
12370
12423
  "use strict";
12371
12424
  init_define_IGNITIFY_CLIENT_FILES();
12372
12425
  var LineCounter = class {
@@ -12386,7 +12439,7 @@ var require_line_counter = __commonJS({ "../../node_modules/yaml/dist/parse/line
12386
12439
  };
12387
12440
  exports2.LineCounter = LineCounter;
12388
12441
  } });
12389
- var require_parser = __commonJS({ "../../node_modules/yaml/dist/parse/parser.js"(exports2) {
12442
+ var require_parser = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/parse/parser.js"(exports2) {
12390
12443
  "use strict";
12391
12444
  init_define_IGNITIFY_CLIENT_FILES();
12392
12445
  var node_process = require("process"), cst = require_cst(), lexer = require_lexer();
@@ -12715,8 +12768,8 @@ var require_parser = __commonJS({ "../../node_modules/yaml/dist/parse/parser.js"
12715
12768
  case "scalar":
12716
12769
  case "single-quoted-scalar":
12717
12770
  case "double-quoted-scalar": {
12718
- let fs13 = this.flowScalar(this.type);
12719
- atNextItem || it.value ? (map2.items.push({ start, key: fs13, sep: [] }), this.onKeyLine = true) : it.sep ? this.stack.push(fs13) : (Object.assign(it, { key: fs13, sep: [] }), this.onKeyLine = true);
12771
+ let fs14 = this.flowScalar(this.type);
12772
+ atNextItem || it.value ? (map2.items.push({ start, key: fs14, sep: [] }), this.onKeyLine = true) : it.sep ? this.stack.push(fs14) : (Object.assign(it, { key: fs14, sep: [] }), this.onKeyLine = true);
12720
12773
  return;
12721
12774
  }
12722
12775
  default: {
@@ -12805,8 +12858,8 @@ var require_parser = __commonJS({ "../../node_modules/yaml/dist/parse/parser.js"
12805
12858
  case "scalar":
12806
12859
  case "single-quoted-scalar":
12807
12860
  case "double-quoted-scalar": {
12808
- let fs13 = this.flowScalar(this.type);
12809
- !it || it.value ? fc.items.push({ start: [], key: fs13, sep: [] }) : it.sep ? this.stack.push(fs13) : Object.assign(it, { key: fs13, sep: [] });
12861
+ let fs14 = this.flowScalar(this.type);
12862
+ !it || it.value ? fc.items.push({ start: [], key: fs14, sep: [] }) : it.sep ? this.stack.push(fs14) : Object.assign(it, { key: fs14, sep: [] });
12810
12863
  return;
12811
12864
  }
12812
12865
  case "flow-map-end":
@@ -12890,7 +12943,7 @@ var require_parser = __commonJS({ "../../node_modules/yaml/dist/parse/parser.js"
12890
12943
  };
12891
12944
  exports2.Parser = Parser;
12892
12945
  } });
12893
- var require_public_api = __commonJS({ "../../node_modules/yaml/dist/public-api.js"(exports2) {
12946
+ var require_public_api = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/public-api.js"(exports2) {
12894
12947
  "use strict";
12895
12948
  init_define_IGNITIFY_CLIENT_FILES();
12896
12949
  var composer = require_composer(), Document = require_Document(), errors = require_errors2(), log = require_log(), identity = require_identity(), lineCounter = require_line_counter(), parser = require_parser();
@@ -12940,7 +12993,7 @@ var require_public_api = __commonJS({ "../../node_modules/yaml/dist/public-api.j
12940
12993
  exports2.parseDocument = parseDocument2;
12941
12994
  exports2.stringify = stringify;
12942
12995
  } });
12943
- var require_dist = __commonJS({ "../../node_modules/yaml/dist/index.js"(exports2) {
12996
+ var require_dist = __commonJS({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/node_modules/yaml/dist/index.js"(exports2) {
12944
12997
  "use strict";
12945
12998
  init_define_IGNITIFY_CLIENT_FILES();
12946
12999
  var composer = require_composer(), Document = require_Document(), Schema2 = require_Schema(), errors = require_errors2(), Alias = require_Alias(), identity = require_identity(), Pair = require_Pair(), Scalar = require_Scalar(), YAMLMap = require_YAMLMap(), YAMLSeq = require_YAMLSeq(), cst = require_cst(), lexer = require_lexer(), lineCounter = require_line_counter(), parser = require_parser(), publicApi = require_public_api(), visit = require_visit();
@@ -12974,41 +13027,41 @@ var require_dist = __commonJS({ "../../node_modules/yaml/dist/index.js"(exports2
12974
13027
  exports2.visit = visit.visit;
12975
13028
  exports2.visitAsync = visit.visitAsync;
12976
13029
  } });
12977
- var ok, err, init_result2 = __esm({ "../../node_modules/@ignitify-integrations/runtime/dist/result.js"() {
13030
+ var ok, err, init_result2 = __esm({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/apps/cli/node_modules/@ignitify-integrations/runtime/dist/result.js"() {
12978
13031
  init_define_IGNITIFY_CLIENT_FILES();
12979
13032
  ok = (value) => ({ ok: true, value }), err = (error) => ({ ok: false, error });
12980
13033
  } });
12981
- var init_ctx = __esm({ "../../node_modules/@ignitify-integrations/runtime/dist/ctx.js"() {
13034
+ var init_ctx = __esm({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/apps/cli/node_modules/@ignitify-integrations/runtime/dist/ctx.js"() {
12982
13035
  init_define_IGNITIFY_CLIENT_FILES();
12983
13036
  } });
12984
- var SECRET_NAME_PATTERN, init_secrets = __esm({ "../../node_modules/@ignitify-integrations/runtime/dist/secrets.js"() {
13037
+ var SECRET_NAME_MAX_LENGTH, SECRET_NAME_PATTERN, init_secrets = __esm({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/apps/cli/node_modules/@ignitify-integrations/runtime/dist/secrets.js"() {
12985
13038
  init_define_IGNITIFY_CLIENT_FILES();
12986
13039
  init_result2();
12987
- SECRET_NAME_PATTERN = /^[A-Z][A-Z0-9_]*$/;
13040
+ SECRET_NAME_MAX_LENGTH = 64, SECRET_NAME_PATTERN = new RegExp(`^[A-Z][A-Z0-9_]{0,${SECRET_NAME_MAX_LENGTH - 1}}$`);
12988
13041
  } });
12989
- var ROUTE_PREFIX_PATTERN, init_platform = __esm({ "../../node_modules/@ignitify-integrations/runtime/dist/platform.js"() {
13042
+ var ROUTE_PREFIX_PATTERN, init_platform = __esm({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/apps/cli/node_modules/@ignitify-integrations/runtime/dist/platform.js"() {
12990
13043
  init_define_IGNITIFY_CLIENT_FILES();
12991
13044
  ROUTE_PREFIX_PATTERN = "^/[a-z0-9._~-]+(/[a-z0-9._~-]+)*/$";
12992
13045
  } });
12993
- var init_dist = __esm({ "../../node_modules/@ignitify-integrations/runtime/dist/index.js"() {
13046
+ var init_dist = __esm({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/apps/cli/node_modules/@ignitify-integrations/runtime/dist/index.js"() {
12994
13047
  init_define_IGNITIFY_CLIENT_FILES();
12995
13048
  init_result2();
12996
13049
  init_ctx();
12997
13050
  init_secrets();
12998
13051
  init_platform();
12999
13052
  } });
13000
- var list, MANIFEST_MESSAGES, PLAN_MESSAGES, COVERAGE_MESSAGES, init_messages = __esm({ "../../node_modules/@ignitify-integrations/core/dist/messages.js"() {
13053
+ var list, MANIFEST_MESSAGES, PLAN_MESSAGES, COVERAGE_MESSAGES, init_messages = __esm({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/apps/cli/node_modules/@ignitify-integrations/core/dist/messages.js"() {
13001
13054
  init_define_IGNITIFY_CLIENT_FILES();
13002
13055
  init_constants3();
13003
13056
  list = (items) => items.join(", "), MANIFEST_MESSAGES = { yaml: (reason) => `not valid YAML: ${reason}`, schema: (path12, message) => `${path12}: ${message}`, badHost: (host) => `network.egress_allow: "${host}" is not a lower-case DNS name with at least two labels and no wildcard (hosts that vary go in network.egress_hint)`, egressNeedsNic: (key) => `network.${key}: needs network.type "egress" or "bidirectional"`, inboundNeedsBidirectional: (key) => `network.${key}: needs network.type "bidirectional"`, shadowsCallback: (prefix) => `network.inbound_routes: "${prefix}" would shadow the platform callback route ${CALLBACK_ROUTE_PREFIX}` }, PLAN_MESSAGES = { settingsOnly: "settings only", settingsAndCode: "settings + code", runs: (packages) => `runs ${list(packages)}`, conflict: (field, current, wanted, label) => `${field} is ${String(current)} but ${label} needs ${String(wanted)}: change it by hand or use another task`, tooManyHosts: (count) => `execution.network.egress_allow would list ${count} hosts; the platform allows at most ${32}`, networkRaised: (from, to) => `execution.network.type: ${from} -> ${to}`, egressAnywhere: (hosts) => `execution.network.egress_allow is absent (any host), so it stays absent; this integration needs: ${list(hosts)}`, presetRaised: (from, to) => `run.preset: ${from ?? "(default)"} -> ${to}`, presetUnknown: (preset, min) => `run.preset ${preset} is not a known preset; left as is (this integration needs at least ${min})`, setSecret: (name, isNew) => `secret ${name}${isNew ? " (new)" : ""}: ignitify secret:set ${name} --stdin`, addHost: (hint) => `egress host: ${hint}` }, COVERAGE_MESSAGES = { secretMissing: (label, name) => `${label}: secret ${name} is missing from secrets`, hostMissing: (label, host) => `${label}: host ${host} is missing from execution.network.egress_allow`, networkTooSmall: (label, have, need) => `${label}: execution.network.type is ${have}, needs ${need}`, fieldMismatch: (label, field, have, need) => `${label}: ${field} is ${have === void 0 ? "(absent)" : String(have)}, needs ${String(need)}`, packageMissing: (label, name) => `${label}: system package ${name} is missing from build.system_packages`, presetTooSmall: (label, have, need) => `${label}: run.preset is ${have ?? "(default)"}, needs at least ${need}`, routeMissing: (label, prefix) => `${label}: route ${prefix} is missing from execution.network.inbound_routes` };
13004
13057
  } });
13005
- var nonEmptyString, uniqueStrings, closed, network, MANIFEST_SCHEMA, init_schema = __esm({ "../../node_modules/@ignitify-integrations/core/dist/schema.js"() {
13058
+ var nonEmptyString, uniqueStrings, closed, network, MANIFEST_SCHEMA, init_schema = __esm({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/apps/cli/node_modules/@ignitify-integrations/core/dist/schema.js"() {
13006
13059
  init_define_IGNITIFY_CLIENT_FILES();
13007
13060
  init_dist();
13008
13061
  init_constants3();
13009
- nonEmptyString = { type: "string", minLength: 1 }, uniqueStrings = { type: "array", items: nonEmptyString, uniqueItems: true }, closed = (properties, required = []) => ({ type: "object", additionalProperties: false, properties, required }), network = closed({ type: { enum: NETWORK_TYPES }, egress_allow: { type: "array", items: { type: "string", minLength: 1, maxLength: HOST_MAX_LENGTH }, uniqueItems: true, maxItems: 32 }, egress_hint: { type: "string", minLength: 1, maxLength: 200, pattern: EGRESS_HINT_PATTERN }, inbound_port: { type: "integer", minimum: 1024, maximum: 65535 }, inbound_routes: { type: "array", minItems: 1, items: closed({ prefix: { type: "string", pattern: ROUTE_PREFIX_PATTERN } }, ["prefix"]) }, inbound_max_concurrent: { type: "integer", minimum: 1 } }, ["type"]), MANIFEST_SCHEMA = { $schema: "https://json-schema.org/draft/2020-12/schema", title: "ignitify integration manifest", ...closed({ schema_version: { const: 1 }, name: { type: "string", pattern: NAME_PATTERN }, runtimes: { type: "array", items: { enum: RUNTIMES }, minItems: 1, uniqueItems: true }, secrets: { type: "array", items: { type: "string", pattern: SECRET_NAME_PATTERN.source }, uniqueItems: true }, network, execution: closed({ duration: { enum: DURATIONS }, interaction: { enum: INTERACTIONS } }), system_packages: uniqueStrings, min_preset: { enum: PRESETS } }, ["schema_version", "name", "runtimes"]) };
13062
+ nonEmptyString = { type: "string", minLength: 1 }, uniqueStrings = { type: "array", items: nonEmptyString, uniqueItems: true }, closed = (properties, required = []) => ({ type: "object", additionalProperties: false, properties, required }), network = closed({ type: { enum: NETWORK_TYPES }, egress_allow: { type: "array", items: { type: "string", minLength: 1, maxLength: HOST_MAX_LENGTH }, uniqueItems: true, maxItems: 32 }, egress_hint: { type: "string", minLength: 1, maxLength: 200, pattern: EGRESS_HINT_PATTERN }, inbound_port: { type: "integer", minimum: 1024, maximum: 65535 }, inbound_routes: { type: "array", minItems: 1, maxItems: 32, items: closed({ prefix: { type: "string", maxLength: 256, pattern: ROUTE_PREFIX_PATTERN } }, ["prefix"]) }, inbound_max_concurrent: { type: "integer", minimum: 1 } }, ["type"]), MANIFEST_SCHEMA = { $schema: "https://json-schema.org/draft/2020-12/schema", title: "ignitify integration manifest", ...closed({ schema_version: { const: 1 }, name: { type: "string", pattern: NAME_PATTERN }, runtimes: { type: "array", items: { enum: RUNTIMES }, minItems: 1, uniqueItems: true }, secrets: { type: "array", items: { type: "string", maxLength: SECRET_NAME_MAX_LENGTH, pattern: SECRET_NAME_PATTERN.source }, uniqueItems: true }, network, execution: closed({ duration: { enum: DURATIONS }, interaction: { enum: INTERACTIONS } }), system_packages: uniqueStrings, min_preset: { enum: PRESETS } }, ["schema_version", "name", "runtimes"]) };
13010
13063
  } });
13011
- var import__2, import_yaml, INBOUND_KEYS, EGRESS_KEYS, ROOT_PATH, NUMERIC_LABEL, validate, isHostName, loadYaml, formatError, semanticIssues, parseManifest, init_manifest = __esm({ "../../node_modules/@ignitify-integrations/core/dist/manifest.js"() {
13064
+ var import__2, import_yaml, INBOUND_KEYS, EGRESS_KEYS, ROOT_PATH, NUMERIC_LABEL, validate, isHostName, loadYaml, formatError, semanticIssues, parseManifest, init_manifest = __esm({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/apps/cli/node_modules/@ignitify-integrations/core/dist/manifest.js"() {
13012
13065
  init_define_IGNITIFY_CLIENT_FILES();
13013
13066
  import__2 = __toESM(require__(), 1), import_yaml = __toESM(require_dist(), 1);
13014
13067
  init_dist();
@@ -13036,12 +13089,12 @@ var import__2, import_yaml, INBOUND_KEYS, EGRESS_KEYS, ROOT_PATH, NUMERIC_LABEL,
13036
13089
  return issues.length > 0 ? err(issues) : ok(data);
13037
13090
  };
13038
13091
  } });
13039
- var packageName, hasCode, rank, maxOf, union, optional, init_utils2 = __esm({ "../../node_modules/@ignitify-integrations/core/dist/utils.js"() {
13092
+ var packageName, hasCode, rank, maxOf, union, optional, init_utils2 = __esm({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/apps/cli/node_modules/@ignitify-integrations/core/dist/utils.js"() {
13040
13093
  init_define_IGNITIFY_CLIENT_FILES();
13041
13094
  init_constants3();
13042
13095
  packageName = (name) => `${PACKAGE_SCOPE}/${name}`, hasCode = (packageJson) => typeof packageJson == "object" && packageJson !== null && "exports" in packageJson, rank = (order, value) => order.indexOf(value), maxOf = (order, a, b) => rank(order, a) >= rank(order, b) ? a : b, union = (a, b) => [.../* @__PURE__ */ new Set([...a, ...b])], optional = (key, value) => value === void 0 ? {} : { [key]: value };
13043
13096
  } });
13044
- var EXECUTION_FIELDS, INBOUND_FIELDS, needsOf, planHeadline, pick, unionRoutes, egressFor, networkFor, presetFor, planAdd, coverageIssues, checkCoverage, init_plan = __esm({ "../../node_modules/@ignitify-integrations/core/dist/plan.js"() {
13097
+ var EXECUTION_FIELDS, INBOUND_FIELDS, needsOf, planHeadline, pick, unionRoutes, egressFor, networkFor, presetFor, planAdd, coverageIssues, checkCoverage, init_plan = __esm({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/apps/cli/node_modules/@ignitify-integrations/core/dist/plan.js"() {
13045
13098
  init_define_IGNITIFY_CLIENT_FILES();
13046
13099
  init_dist();
13047
13100
  init_constants3();
@@ -13091,7 +13144,7 @@ var EXECUTION_FIELDS, INBOUND_FIELDS, needsOf, planHeadline, pick, unionRoutes,
13091
13144
  }), ...needs.inboundRoutes.filter((route2) => !routes.some((present) => present.prefix === route2.prefix)).map((route2) => COVERAGE_MESSAGES.routeMissing(label, route2.prefix)), ...needs.systemPackages.filter((name) => !packages.includes(name)).map((name) => COVERAGE_MESSAGES.packageMissing(label, name)), ...needs.minPreset !== void 0 && (preset === void 0 || presetRank >= 0 && presetRank < rank(PRESETS, needs.minPreset)) ? [COVERAGE_MESSAGES.presetTooSmall(label, preset, needs.minPreset)] : []];
13092
13145
  }, checkCoverage = (config, manifests) => manifests.flatMap((manifest) => coverageIssues(config, packageName(manifest.name), needsOf(manifest)));
13093
13146
  } });
13094
- var init_dist2 = __esm({ "../../node_modules/@ignitify-integrations/core/dist/index.js"() {
13147
+ var init_dist2 = __esm({ "../../../../../../../../../Users/saeed/Projects/repos/mitra/apps/cli/node_modules/@ignitify-integrations/core/dist/index.js"() {
13095
13148
  init_define_IGNITIFY_CLIENT_FILES();
13096
13149
  init_constants3();
13097
13150
  init_manifest();
@@ -13105,11 +13158,11 @@ function diffLines(before, after, path12 = []) {
13105
13158
  let had = Array.isArray(before) ? before : [], added = after.filter((item) => !had.some((old2) => (0, import_node_util.isDeepStrictEqual)(old2, item)));
13106
13159
  return added.length > 0 ? [`+ ${here}: ${added.map(itemText).join(", ")}`] : [];
13107
13160
  }
13108
- if (!isPlainObject(after)) return before === void 0 || (0, import_node_util.isDeepStrictEqual)(before, after) || INTEGRATION.NOTED_FIELDS.includes(here) ? [] : [`${here}: ${String(before)} -> ${String(after)}`];
13109
- let old = isPlainObject(before) ? before : {}, newScalars = [], nested = [];
13161
+ if (!isRecord(after)) return before === void 0 || (0, import_node_util.isDeepStrictEqual)(before, after) || INTEGRATION.NOTED_FIELDS.includes(here) ? [] : [`${here}: ${String(before)} -> ${String(after)}`];
13162
+ let old = isRecord(before) ? before : {}, newScalars = [], nested = [];
13110
13163
  for (let [key, value] of Object.entries(after)) {
13111
13164
  let fieldPath = [...path12, key];
13112
- old[key] === void 0 && !Array.isArray(value) && !isPlainObject(value) ? INTEGRATION.NOTED_FIELDS.includes(fieldPath.join(".")) || newScalars.push(`${key} ${String(value)}`) : nested.push(...diffLines(old[key], value, fieldPath));
13165
+ old[key] === void 0 && !Array.isArray(value) && !isRecord(value) ? INTEGRATION.NOTED_FIELDS.includes(fieldPath.join(".")) || newScalars.push(`${key} ${String(value)}`) : nested.push(...diffLines(old[key], value, fieldPath));
13113
13166
  }
13114
13167
  return [...newScalars.length > 0 ? [`+ ${here}: ${newScalars.join(", ")}`] : [], ...nested];
13115
13168
  }
@@ -13122,13 +13175,14 @@ function planIntegrationAdd(config, manifest, version2, hasCode2) {
13122
13175
  function renderAddPlan(plan) {
13123
13176
  return [plan.headline, ...plan.changes.map((line) => ` ${line}`), ...plan.youAdd.length > 0 ? [INTEGRATION.YOU_ADD, ...plan.youAdd.map((line) => ` ${line}`)] : []];
13124
13177
  }
13125
- var import_node_util, asCoreConfig, isPlainObject, itemText, init_integration_plan = __esm({ "src/core/integration-plan.ts"() {
13178
+ var import_node_util, asCoreConfig, itemText, init_integration_plan = __esm({ "src/core/integration-plan.ts"() {
13126
13179
  "use strict";
13127
13180
  init_define_IGNITIFY_CLIENT_FILES();
13128
13181
  import_node_util = require("node:util");
13129
13182
  init_dist2();
13183
+ init_tenant();
13130
13184
  init_constants();
13131
- asCoreConfig = (config) => config, isPlainObject = (v) => typeof v == "object" && v !== null && !Array.isArray(v), itemText = (item) => isPlainObject(item) && typeof item.prefix == "string" ? item.prefix : typeof item == "string" ? item : JSON.stringify(item);
13185
+ asCoreConfig = (config) => config, itemText = (item) => isRecord(item) && typeof item.prefix == "string" ? item.prefix : typeof item == "string" ? item : JSON.stringify(item);
13132
13186
  } });
13133
13187
  function integrationDeps(packageJson) {
13134
13188
  let deps = packageJson?.dependencies;
@@ -13151,7 +13205,7 @@ var init_integration_coverage = __esm({ "src/core/integration-coverage.ts"() {
13151
13205
  function patch(doc, before, after, path12) {
13152
13206
  if ((0, import_node_util2.isDeepStrictEqual)(before, after)) return;
13153
13207
  let node = path12.length === 0 ? doc.contents : doc.getIn(path12, true);
13154
- if (isPlainObject2(after) && isPlainObject2(before) && (0, import_yaml2.isMap)(node)) {
13208
+ if (isRecord(after) && isRecord(before) && (0, import_yaml2.isMap)(node)) {
13155
13209
  for (let [key, value] of Object.entries(after)) patch(doc, before[key], value, [...path12, key]);
13156
13210
  return;
13157
13211
  }
@@ -13159,7 +13213,7 @@ function patch(doc, before, after, path12) {
13159
13213
  for (let item of after.slice(before.length)) node.add(doc.createNode(item));
13160
13214
  return;
13161
13215
  }
13162
- (0, import_yaml2.isScalar)(node) && !Array.isArray(after) && !isPlainObject2(after) ? node.value = after : doc.setIn(path12, doc.createNode(after));
13216
+ (0, import_yaml2.isScalar)(node) && !Array.isArray(after) && !isRecord(after) ? node.value = after : doc.setIn(path12, doc.createNode(after));
13163
13217
  }
13164
13218
  function renderTaskConfigText(text, before, after, isJson) {
13165
13219
  if ((0, import_node_util2.isDeepStrictEqual)(before, after)) return text;
@@ -13168,10 +13222,11 @@ function renderTaskConfigText(text, before, after, isJson) {
13168
13222
  let doc = (0, import_yaml2.parseDocument)(text, { schema: "core" });
13169
13223
  return patch(doc, before, after, []), doc.toString({ flowCollectionPadding: false });
13170
13224
  }
13171
- var import_node_util2, import_yaml2, isPlainObject2, init_task_yaml_edit = __esm({ "src/core/task-yaml-edit.ts"() {
13225
+ var import_node_util2, import_yaml2, init_task_yaml_edit = __esm({ "src/core/task-yaml-edit.ts"() {
13172
13226
  "use strict";
13173
13227
  init_define_IGNITIFY_CLIENT_FILES();
13174
- import_node_util2 = require("node:util"), import_yaml2 = __toESM(require_dist(), 1), isPlainObject2 = (v) => typeof v == "object" && v !== null && !Array.isArray(v);
13228
+ import_node_util2 = require("node:util"), import_yaml2 = __toESM(require_dist(), 1);
13229
+ init_tenant();
13175
13230
  } });
13176
13231
  function integrationPackage(manifestText, packageJson) {
13177
13232
  if (manifestText === null) return { kind: "not-integration" };
@@ -13180,25 +13235,25 @@ function integrationPackage(manifestText, packageJson) {
13180
13235
  }
13181
13236
  function readInstalledPackage(taskDir, pkg) {
13182
13237
  let dir = packageDir(taskDir, pkg);
13183
- if (!import_node_fs7.default.existsSync(dir)) return { kind: "missing" };
13184
- let manifestFile = import_node_path6.default.join(dir, MANIFEST_FILE);
13185
- return import_node_fs7.default.existsSync(manifestFile) ? integrationPackage(readText(manifestFile), readJson(import_node_path6.default.join(dir, INTEGRATION.PACKAGE_JSON))) : { kind: "not-integration" };
13238
+ if (!import_node_fs8.default.existsSync(dir)) return { kind: "missing" };
13239
+ let manifestFile = import_node_path7.default.join(dir, MANIFEST_FILE);
13240
+ return import_node_fs8.default.existsSync(manifestFile) ? integrationPackage(readText(manifestFile), readJson(import_node_path7.default.join(dir, INTEGRATION.PACKAGE_JSON))) : { kind: "not-integration" };
13186
13241
  }
13187
13242
  function readPackedPackage(packDir) {
13188
- let tarball = import_node_fs7.default.readdirSync(packDir).find((f) => f.endsWith(INTEGRATION.TARBALL_EXT));
13243
+ let tarball = import_node_fs8.default.readdirSync(packDir).find((f) => f.endsWith(INTEGRATION.TARBALL_EXT));
13189
13244
  if (tarball === void 0) return { kind: "missing" };
13190
- let file = import_node_path6.default.join(packDir, tarball);
13245
+ let file = import_node_path7.default.join(packDir, tarball);
13191
13246
  try {
13192
- let members = readTar((0, import_node_zlib.gunzipSync)(import_node_fs7.default.readFileSync(file), { maxOutputLength: INTEGRATION.PACKED_MAX_BYTES })), text = (name) => members.find((m) => m.kind === "file" && m.name === `${INTEGRATION.PACKED_ROOT}/${name}`)?.data.toString("utf8") ?? null, packageJson = text(INTEGRATION.PACKAGE_JSON);
13247
+ let members = readTar((0, import_node_zlib.gunzipSync)(import_node_fs8.default.readFileSync(file), { maxOutputLength: INTEGRATION.PACKED_MAX_BYTES })), text = (name) => members.find((m) => m.kind === "file" && m.name === `${INTEGRATION.PACKED_ROOT}/${name}`)?.data.toString("utf8") ?? null, packageJson = text(INTEGRATION.PACKAGE_JSON);
13193
13248
  return integrationPackage(text(MANIFEST_FILE), packageJson === null ? null : JSON.parse(packageJson));
13194
13249
  } catch (e) {
13195
13250
  let tooBig = e.code === INTEGRATION.ZLIB_TOO_BIG;
13196
- throw new Error(tooBig ? INTEGRATION.PACKED_TOO_BIG(file, INTEGRATION.PACKED_MAX_BYTES) : INTEGRATION.UNREADABLE(file, errorMessage(e)), { cause: e });
13251
+ throw new Error(tooBig ? INTEGRATION.PACKED_TOO_BIG(file, INTEGRATION.PACKED_MAX_BYTES) : INTEGRATION.UNREADABLE(file, errText(e)), { cause: e });
13197
13252
  }
13198
13253
  }
13199
13254
  function readTaskPackageJson(taskDir) {
13200
- let file = import_node_path6.default.join(taskDir, INTEGRATION.PACKAGE_JSON);
13201
- return import_node_fs7.default.existsSync(file) ? readJson(file) : null;
13255
+ let file = import_node_path7.default.join(taskDir, INTEGRATION.PACKAGE_JSON);
13256
+ return import_node_fs8.default.existsSync(file) ? readJson(file) : null;
13202
13257
  }
13203
13258
  async function fetchPackument(pkg, fetchImpl = fetch) {
13204
13259
  try {
@@ -13208,19 +13263,11 @@ async function fetchPackument(pkg, fetchImpl = fetch) {
13208
13263
  return { ok: false, reason: INTEGRATION.REGISTRY_UNREACHABLE };
13209
13264
  }
13210
13265
  }
13211
- function writeFileAtomic(file, text) {
13212
- let target = import_node_fs7.default.realpathSync(file), mode = import_node_fs7.default.statSync(target).mode & 511, name = `.${import_node_path6.default.basename(target)}.${process.pid}.${(0, import_node_crypto3.randomBytes)(6).toString("hex")}.tmp`, tmp = import_node_path6.default.join(import_node_path6.default.dirname(target), name);
13213
- try {
13214
- import_node_fs7.default.writeFileSync(tmp, text, { mode, flag: "wx" }), import_node_fs7.default.chmodSync(tmp, mode), import_node_fs7.default.renameSync(tmp, target);
13215
- } finally {
13216
- import_node_fs7.default.rmSync(tmp, { force: true });
13217
- }
13218
- }
13219
13266
  function readText(file) {
13220
13267
  try {
13221
- return import_node_fs7.default.readFileSync(file, "utf8");
13268
+ return import_node_fs8.default.readFileSync(file, "utf8");
13222
13269
  } catch (e) {
13223
- throw new Error(INTEGRATION.UNREADABLE(file, errorMessage(e)), { cause: e });
13270
+ throw new Error(INTEGRATION.UNREADABLE(file, errText(e)), { cause: e });
13224
13271
  }
13225
13272
  }
13226
13273
  function readJson(file) {
@@ -13228,19 +13275,23 @@ function readJson(file) {
13228
13275
  try {
13229
13276
  return JSON.parse(text);
13230
13277
  } catch (e) {
13231
- throw new Error(INTEGRATION.UNREADABLE(file, errorMessage(e)), { cause: e });
13278
+ throw new Error(INTEGRATION.UNREADABLE(file, errText(e)), { cause: e });
13232
13279
  }
13233
13280
  }
13234
- var import_node_child_process2, import_node_crypto3, import_node_fs7, import_node_path6, import_node_zlib, spawnNpm, packageDir, init_integrations = __esm({ "src/io/integrations.ts"() {
13281
+ var import_node_child_process2, import_node_fs8, import_node_path7, import_node_zlib, NPM_OUTPUT_MAX_BYTES, npmOutputToShow, spawnNpm, packageDir, init_integrations = __esm({ "src/io/integrations.ts"() {
13235
13282
  "use strict";
13236
13283
  init_define_IGNITIFY_CLIENT_FILES();
13237
- import_node_child_process2 = require("node:child_process"), import_node_crypto3 = require("node:crypto"), import_node_fs7 = __toESM(require("node:fs"), 1), import_node_path6 = __toESM(require("node:path"), 1), import_node_zlib = require("node:zlib");
13284
+ import_node_child_process2 = require("node:child_process"), import_node_fs8 = __toESM(require("node:fs"), 1), import_node_path7 = __toESM(require("node:path"), 1), import_node_zlib = require("node:zlib");
13238
13285
  init_dist2();
13239
13286
  init_tar();
13240
13287
  init_constants();
13241
13288
  init_integration_coverage();
13242
- init_guard();
13243
- spawnNpm = (cwd, args) => (0, import_node_child_process2.spawnSync)(INTEGRATION.NPM, args, { cwd, stdio: ["ignore", 2, 2] }).status, packageDir = (taskDir, pkg) => import_node_path6.default.join(taskDir, INTEGRATION.NODE_MODULES, ...pkg.split("/"));
13289
+ init_manager();
13290
+ init_tenant();
13291
+ NPM_OUTPUT_MAX_BYTES = 16 * 1024 * 1024, npmOutputToShow = (status, output) => status === 0 ? "" : output, spawnNpm = (cwd, args) => {
13292
+ let r = (0, import_node_child_process2.spawnSync)(INTEGRATION.NPM, args, { cwd, stdio: ["ignore", "pipe", "pipe"], encoding: "utf8", maxBuffer: NPM_OUTPUT_MAX_BYTES }), shown = npmOutputToShow(r.status, `${r.stdout ?? ""}${r.stderr ?? ""}`);
13293
+ return shown !== "" && tell(shown.trimEnd()), r.status;
13294
+ }, packageDir = (taskDir, pkg) => import_node_path7.default.join(taskDir, INTEGRATION.NODE_MODULES, ...pkg.split("/"));
13244
13295
  } });
13245
13296
  async function runIntegrationAdd(args, cwd = process.cwd(), deps = REAL_INTEGRATION_ADD_DEPS) {
13246
13297
  let name = requiredArg(args);
@@ -13259,11 +13310,11 @@ async function runIntegrationAdd(args, cwd = process.cwd(), deps = REAL_INTEGRAT
13259
13310
  return guard(() => withPackDir((packDir) => addIntegration(args, task.taskDir, task.config, pkg, packDir, dryRun, deps)));
13260
13311
  }
13261
13312
  async function withPackDir(fn) {
13262
- let packDir = import_node_fs8.default.mkdtempSync(import_node_path7.default.join(import_node_os3.default.tmpdir(), INTEGRATION.PACK_TMP_PREFIX));
13313
+ let packDir = import_node_fs9.default.mkdtempSync(import_node_path8.default.join(import_node_os3.default.tmpdir(), INTEGRATION.PACK_TMP_PREFIX));
13263
13314
  try {
13264
13315
  return await fn(packDir);
13265
13316
  } finally {
13266
- import_node_fs8.default.rmSync(packDir, { recursive: true, force: true });
13317
+ import_node_fs9.default.rmSync(packDir, { recursive: true, force: true });
13267
13318
  }
13268
13319
  }
13269
13320
  async function addIntegration(args, taskDir, config, pkg, packDir, dryRun, deps) {
@@ -13288,12 +13339,12 @@ async function addIntegration(args, taskDir, config, pkg, packDir, dryRun, deps)
13288
13339
  if (installCode !== 0) return fail(INTEGRATION.INSTALL_FAILED(spec, installCode)), 1;
13289
13340
  sayOk(INTEGRATION.INSTALLED(spec));
13290
13341
  }
13291
- return edit === null ? (emit({ ...result, written: false }), 0) : (writeFileAtomic(edit.file, edit.text), sayOk(INTEGRATION.WRITTEN(import_node_path7.default.basename(edit.file))), emit({ ...result, written: true }), 0);
13342
+ return edit === null ? (emit({ ...result, written: false }), 0) : (writeFileAtomic(edit.file, edit.text), sayOk(INTEGRATION.WRITTEN(import_node_path8.default.basename(edit.file))), emit({ ...result, written: true }), 0);
13292
13343
  }
13293
13344
  function taskConfigEdit(taskDir, config, planned) {
13294
13345
  let file = findTaskConfigFile(taskDir);
13295
13346
  if (file === null) throw new Error(INTEGRATION.UNREADABLE(taskDir, "no task.yaml"));
13296
- let source = import_node_path7.default.basename(file), text = renderTaskConfigText(import_node_fs8.default.readFileSync(file, "utf8"), config, planned, source.endsWith(".json")), check = checkTaskConfigText(text, source);
13347
+ let source = import_node_path8.default.basename(file), text = renderTaskConfigText(import_node_fs9.default.readFileSync(file, "utf8"), config, planned, source.endsWith(".json")), check = checkTaskConfigText(text, source);
13297
13348
  return !check.ok || !(0, import_node_util3.isDeepStrictEqual)(check.config, planned) ? (printErrors(check.errors), fail(INTEGRATION.WRITE_MISMATCH(source)), { ok: false }) : { ok: true, file, text };
13298
13349
  }
13299
13350
  async function checkIntegrations(taskDir, config, fetchImpl) {
@@ -13321,16 +13372,17 @@ async function warnObsolete(versions, fetchImpl) {
13321
13372
  }
13322
13373
  for (let reason of skipped) warn(INTEGRATION.OBSOLETE_SKIPPED(reason));
13323
13374
  }
13324
- var import_node_fs8, import_node_os3, import_node_path7, import_node_util3, REAL_INTEGRATION_ADD_DEPS, NAME_RE, init_integration = __esm({ "src/commands/integration.ts"() {
13375
+ var import_node_fs9, import_node_os3, import_node_path8, import_node_util3, REAL_INTEGRATION_ADD_DEPS, NAME_RE, init_integration = __esm({ "src/commands/integration.ts"() {
13325
13376
  "use strict";
13326
13377
  init_define_IGNITIFY_CLIENT_FILES();
13327
- import_node_fs8 = __toESM(require("node:fs"), 1), import_node_os3 = __toESM(require("node:os"), 1), import_node_path7 = __toESM(require("node:path"), 1), import_node_util3 = require("node:util");
13378
+ import_node_fs9 = __toESM(require("node:fs"), 1), import_node_os3 = __toESM(require("node:os"), 1), import_node_path8 = __toESM(require("node:path"), 1), import_node_util3 = require("node:util");
13328
13379
  init_dist2();
13329
13380
  init_constants();
13330
13381
  init_integration_plan();
13331
13382
  init_integration_coverage();
13332
13383
  init_task_yaml_edit();
13333
13384
  init_integrations();
13385
+ init_fs_atomic();
13334
13386
  init_prompt();
13335
13387
  init_task_config3();
13336
13388
  init_task_path();
@@ -13345,24 +13397,24 @@ async function printPackageAdvice(args, config, fetchImpl) {
13345
13397
  let outcome = await postPackageAdvice(apiConfig(args), plan.request, fetchImpl), { lines, fault } = renderAdvice(outcome, screenStyle());
13346
13398
  for (let line of lines) (fault ? tell : say)(line);
13347
13399
  } catch (e) {
13348
- fail(errorMessage(e));
13400
+ fail(errText(e));
13349
13401
  }
13350
13402
  }
13351
13403
  async function runTaskValidate(args, cwd = process.cwd(), fetchImpl) {
13352
13404
  let task = await prepareTask(args, cwd);
13353
- return !task || (printWarnings([...task.warnings]), !await checkIntegrations(task.taskDir, task.config, fetchImpl)) ? 1 : (emit({ task_id: task.config.slug ?? import_path4.default.basename(task.taskDir), valid: true }, (st) => successLine(st, VALIDATE.VALID)), boolFlag(args, ADVICE.FLAG) && await printPackageAdvice(args, task.config, fetchImpl), 0);
13405
+ return !task || (printWarnings([...task.warnings]), !await checkIntegrations(task.taskDir, task.config, fetchImpl)) ? 1 : (emit({ task_id: task.slug, valid: true }, (st) => successLine(st, VALIDATE.VALID)), boolFlag(args, ADVICE.FLAG) && await printPackageAdvice(args, task.config, fetchImpl), 0);
13354
13406
  }
13355
13407
  async function runTaskGet(args, cwd = process.cwd()) {
13356
13408
  let task = await prepareTask(args, cwd);
13357
13409
  if (!task) return 1;
13358
- let slug2 = task.config.slug ?? import_path4.default.basename(task.taskDir), state = readState(task.taskDir), check = checkSourceUpload(task.taskDir), localContentHash = check.ok ? check.source.contentHash : null, cfg = offlineTolerantConfig(args), orNull = (p) => p.catch(() => null), [whoami, deploymentsRes, runsRes] = cfg ? await Promise.all([orNull(getWhoami(cfg)), orNull(listApiDeploymentsForTask(cfg, slug2, void 0, { limit: TASK_REPORT_PAGE })), orNull(listApiRuns(cfg, { task_name: slug2, limit: String(TASK_REPORT_PAGE) }))]) : [null, null, null], report = buildTaskReport({ slug: slug2, declared: task.config.execution, declaredPreset: task.config.run?.preset, stateDeploymentId: state.deployment_id ?? null, localContentHash, deployments: deploymentsRes?.deployments ?? null, runs: runsRes?.runs ?? null, pageLimit: TASK_REPORT_PAGE, usage: whoami?.usage ?? null });
13410
+ let { slug: slug2 } = task, state = readState(task.taskDir), check = checkSourceUpload(task.taskDir), localContentHash = check.ok ? check.source.contentHash : null, cfg = offlineTolerantConfig(args), orNull = (p) => p.catch(() => null), [whoami, deploymentsRes, runsRes] = cfg ? await Promise.all([orNull(getWhoami(cfg)), orNull(listApiDeploymentsForTask(cfg, slug2, void 0, { limit: TASK_REPORT_PAGE })), orNull(listApiRuns(cfg, { task_name: slug2, limit: String(TASK_REPORT_PAGE) }))]) : [null, null, null], report = buildTaskReport({ slug: slug2, declared: task.config.execution, declaredPreset: task.config.run?.preset, stateDeploymentId: state.deployment_id ?? null, localContentHash, deployments: deploymentsRes?.deployments ?? null, runs: runsRes?.runs ?? null, pageLimit: TASK_REPORT_PAGE, usage: whoami?.usage ?? null });
13359
13411
  return emit(snakeCaseKeys(report), () => formatTaskReport(report)), 0;
13360
13412
  }
13361
13413
  function offlineTolerantConfig(args) {
13362
13414
  try {
13363
13415
  return apiConfig(args);
13364
13416
  } catch (e) {
13365
- return warn(RESULT_MESSAGES.TASK_GET_OFFLINE(errorMessage(e))), null;
13417
+ return warn(RESULT_MESSAGES.TASK_GET_OFFLINE(errText(e))), null;
13366
13418
  }
13367
13419
  }
13368
13420
  async function surveyTaskContents(cfg, taskRef) {
@@ -13409,7 +13461,7 @@ async function runTaskRun(args, cwd = process.cwd()) {
13409
13461
  printWarnings([...task.warnings]);
13410
13462
  let opts = parseRunOptions(args, task.config);
13411
13463
  if (!opts.ok) return fail(opts.error), 1;
13412
- let { run: run2 } = opts, taskName = task.config.slug ?? import_path4.default.basename(task.taskDir), cfg = apiConfig(args);
13464
+ let { run: run2 } = opts, taskName = task.slug, cfg = apiConfig(args);
13413
13465
  if (payloadBytes(run2.payload) > PAYLOAD_LIMIT_FALLBACK_BYTES) {
13414
13466
  let refusal = payloadRefusal(run2.payload, await payloadLimit(cfg));
13415
13467
  if (refusal !== null) return fail(refusal), 1;
@@ -13428,8 +13480,8 @@ async function runTaskRun(args, cwd = process.cwd()) {
13428
13480
  } catch (e) {
13429
13481
  if (isJsonOutput()) throw e;
13430
13482
  let trace = traceLine(e);
13431
- if (isPayloadTooLarge(errorMessage(e))) return fail(MESSAGES.PAYLOAD_REFUSED_BY_SERVER(await payloadLimit(cfg)), { trace }), 1;
13432
- let explained = explainRunRefusal(errorMessage(e)) ?? explainLimitRefusal(errorMessage(e));
13483
+ if (isPayloadTooLarge(e)) return fail(MESSAGES.PAYLOAD_REFUSED_BY_SERVER(await payloadLimit(cfg)), { trace }), 1;
13484
+ let explained = explainRunRefusal(e) ?? explainLimitRefusal(e);
13433
13485
  if (!explained) throw e;
13434
13486
  return tell(explained), trace !== null && tell(errStyle().dim(trace)), 1;
13435
13487
  }
@@ -13473,12 +13525,8 @@ async function runTaskCreate(args, cwd = process.cwd()) {
13473
13525
  return CliOutputManager.render("task:create", { ...res, slug: taskId, ...local_dir ? { local_dir } : {} }), say(screenStyle().dim(limitsNote())), 0;
13474
13526
  });
13475
13527
  }
13476
- async function runTaskList(args, _cwd = process.cwd()) {
13477
- let badLimit = limitRefusal(args);
13478
- return badLimit !== null ? (fail(badLimit), 1) : guard(async () => {
13479
- let cfg = apiConfig(args), data = await listApiTasks(cfg, flagParams(args, PAGE_FLAG_PARAMS));
13480
- return CliOutputManager.render("task:list", data.tasks), noteNextPage(args, { command: COMMANDS.TASK_LIST, flags: PAGE_FLAG_PARAMS }, data.tasks), 0;
13481
- });
13528
+ function runTaskList(args, _cwd = process.cwd()) {
13529
+ return runPagedList(args, { list: { command: COMMANDS.TASK_LIST, flags: PAGE_FLAG_PARAMS }, fetchPage: listApiTasks, rowsOf: (data) => data.tasks, show: (data) => CliOutputManager.render("task:list", data.tasks) });
13482
13530
  }
13483
13531
  async function runTaskDelete(args, cwd = process.cwd(), prompter = ttyPrompter) {
13484
13532
  let id = requiredArg(args);
@@ -13495,16 +13543,16 @@ async function runTaskDelete(args, cwd = process.cwd(), prompter = ttyPrompter)
13495
13543
  try {
13496
13544
  import_fs4.default.rmSync(link, { recursive: true, force: true }), say(`${MESSAGES.TASK_LINK_REMOVED}: ${link}`);
13497
13545
  } catch (e) {
13498
- warn(MESSAGES.TASK_LINK_NOT_REMOVED(link, errorMessage(e)));
13546
+ warn(MESSAGES.TASK_LINK_NOT_REMOVED(link, errText(e)));
13499
13547
  }
13500
13548
  }
13501
13549
  return emit({ plan: snakeCaseKeys(plan), deleted: d ?? null }), 0;
13502
13550
  });
13503
13551
  }
13504
- var import_fs4, import_path4, TASK_REPORT_PAGE, init_task = __esm({ "src/commands/task.ts"() {
13552
+ var import_fs4, TASK_REPORT_PAGE, init_task = __esm({ "src/commands/task.ts"() {
13505
13553
  "use strict";
13506
13554
  init_define_IGNITIFY_CLIENT_FILES();
13507
- import_fs4 = __toESM(require("fs"), 1), import_path4 = __toESM(require("path"), 1);
13555
+ import_fs4 = __toESM(require("fs"), 1);
13508
13556
  init_prompt();
13509
13557
  init_api();
13510
13558
  init_plan_task_delete();
@@ -13527,12 +13575,8 @@ var import_fs4, import_path4, TASK_REPORT_PAGE, init_task = __esm({ "src/command
13527
13575
  init_shared();
13528
13576
  TASK_REPORT_PAGE = 100;
13529
13577
  } });
13530
- async function runDeploymentList(args) {
13531
- let badLimit = limitRefusal(args);
13532
- return badLimit !== null ? (fail(badLimit), 1) : guard(async () => {
13533
- let cfg = apiConfig(args), data = await listApiDeployments(cfg, flagParams(args, PAGE_FLAG_PARAMS));
13534
- return CliOutputManager.render("deployment:list", data), noteNextPage(args, { command: COMMANDS.DEPLOYMENT_LIST, flags: PAGE_FLAG_PARAMS }, data.deployments), 0;
13535
- });
13578
+ function runDeploymentList(args) {
13579
+ return runPagedList(args, { list: { command: COMMANDS.DEPLOYMENT_LIST, flags: PAGE_FLAG_PARAMS }, fetchPage: listApiDeployments, rowsOf: (data) => data.deployments, show: (data) => CliOutputManager.render("deployment:list", data) });
13536
13580
  }
13537
13581
  async function runDeploymentGet(args) {
13538
13582
  let id = requireArg(args, "deployment-id");
@@ -13549,7 +13593,7 @@ async function runDeploymentDelete(args, prompter = ttyPrompter) {
13549
13593
  let id = requireArg(args, "deployment-id");
13550
13594
  return id ? guard(async () => {
13551
13595
  let cfg = apiConfig(args);
13552
- if (say(`Will soft-delete deployment ${id} and all its runs (cascade).`), !await confirmOrAbort(args, prompter)) return 1;
13596
+ if (say(RESULT_MESSAGES.DEPLOYMENT_DELETE_PREVIEW(id)), !await confirmOrAbort(args, prompter)) return 1;
13553
13597
  let res = await deleteDeployment(cfg, id);
13554
13598
  emit(res);
13555
13599
  let d = res.deleted;
@@ -13577,12 +13621,8 @@ var WHOLE_MS, init_grace = __esm({ "src/core/grace.ts"() {
13577
13621
  init_constants();
13578
13622
  WHOLE_MS = /^\d+$/;
13579
13623
  } });
13580
- async function runRunList(args) {
13581
- let badLimit = limitRefusal(args);
13582
- return badLimit !== null ? (fail(badLimit), 1) : guard(async () => {
13583
- let cfg = apiConfig(args), data = await listApiRuns(cfg, flagParams(args, RUN_LIST_FLAG_PARAMS));
13584
- return CliOutputManager.render("run:list", data.runs), noteNextPage(args, { command: COMMANDS.RUN_LIST, flags: RUN_LIST_FLAG_PARAMS }, data.runs), 0;
13585
- });
13624
+ function runRunList(args) {
13625
+ return runPagedList(args, { list: { command: COMMANDS.RUN_LIST, flags: RUN_LIST_FLAG_PARAMS }, fetchPage: listApiRuns, rowsOf: (data) => data.runs, show: (data) => CliOutputManager.render("run:list", data.runs) });
13586
13626
  }
13587
13627
  async function runRunGet(args) {
13588
13628
  let id = requireArg(args, "run-id");
@@ -13602,7 +13642,7 @@ async function runRunDelete(args, prompter = ttyPrompter) {
13602
13642
  let id = requireArg(args, "run-id");
13603
13643
  return id ? guard(async () => {
13604
13644
  let cfg = apiConfig(args);
13605
- return say(`Will soft-delete run ${id}.`), await confirmOrAbort(args, prompter) ? (emit(await deleteRun(cfg, id)), sayOk(`${MESSAGES.RUN_DELETED}: ${id}`), 0) : 1;
13645
+ return say(RESULT_MESSAGES.RUN_DELETE_PREVIEW(id)), await confirmOrAbort(args, prompter) ? (emit(await deleteRun(cfg, id)), sayOk(`${MESSAGES.RUN_DELETED}: ${id}`), 0) : 1;
13606
13646
  }) : 1;
13607
13647
  }
13608
13648
  async function runRunCancel(args, prompter = ttyPrompter) {
@@ -13613,16 +13653,16 @@ async function runRunCancel(args, prompter = ttyPrompter) {
13613
13653
  let grace = parseGraceMs(strOpt(args, "grace"), force);
13614
13654
  if (!grace.ok) return fail(grace.error), 1;
13615
13655
  let graceMs = grace.graceMs, cfg = apiConfig(args), run2 = await getApiRun(cfg, id);
13616
- if (run2?.status && isTerminalRunStatus(run2.status)) return emit({ run_id: id, outcome: RUN_CANCEL_OUTCOME.ALREADY_TERMINAL, status: run2.status }), say(`Run ${id} is already ${run2.status} \u2014 nothing to cancel.`), 0;
13617
- if (say(force ? `Will cancel run ${id} immediately (force: destroys the VM even if it is pinned).` : `Will ask run ${id} to stop gracefully; it is killed if it does not finish in time.`), !await confirmOrAbort(args, prompter)) return 1;
13656
+ if (run2?.status && isTerminalRunStatus(run2.status)) return emit({ run_id: id, outcome: RUN_CANCEL_OUTCOME.ALREADY_TERMINAL, status: run2.status }), say(RESULT_MESSAGES.RUN_ALREADY_OVER(id, run2.status)), 0;
13657
+ if (say(RESULT_MESSAGES.RUN_CANCEL_PREVIEW(id, force)), !await confirmOrAbort(args, prompter)) return 1;
13618
13658
  let res = await cancelApiRun(cfg, id, force, graceMs);
13619
13659
  emit({ run_id: id, outcome: res?.cancelled?.draining ? RUN_CANCEL_OUTCOME.DRAINING : RUN_CANCEL_OUTCOME.CANCELLED, ...res });
13620
13660
  let prior = res?.cancelled?.prior_state, was = prior ? ` (was ${prior})` : "";
13621
13661
  if (res?.cancelled?.draining) {
13622
13662
  let armed = res.cancelled.grace_ms, window = armed === void 0 ? "" : ` (grace ${armed} ms)`;
13623
- return say(`Run ${id} is stopping${window}${was} \u2014 still RUNNING until it finishes or the grace expires.`), 0;
13663
+ return say(RESULT_MESSAGES.RUN_STOPPING(id, window, was)), 0;
13624
13664
  }
13625
- return sayOk(`Run cancelled: ${id}${was}`), 0;
13665
+ return sayOk(RESULT_MESSAGES.RUN_CANCELLED(id, was)), 0;
13626
13666
  });
13627
13667
  }
13628
13668
  var init_run = __esm({ "src/commands/run.ts"() {
@@ -13638,8 +13678,8 @@ var init_run = __esm({ "src/commands/run.ts"() {
13638
13678
  } });
13639
13679
  function decideVmDelete(vm, force, vmId) {
13640
13680
  if (vm.residency === "pinned" && !force) {
13641
- let ageH = vm.age_ms !== void 0 ? (vm.age_ms / 36e5).toFixed(1) : "?";
13642
- return { refuse: true, message: `Refusing to delete ${vmId}: this VM is PINNED (permanent standby, alive ${ageH}h).
13681
+ let age = vm.age_ms !== void 0 ? formatDuration(vm.age_ms) : "?";
13682
+ return { refuse: true, message: `Refusing to delete ${vmId}: this VM is PINNED (permanent standby, alive ${age}).
13643
13683
  Deleting it is exactly what "permanent" protects against \u2014 re-run with --force if you mean it.` };
13644
13684
  }
13645
13685
  let pinnedNote = vm.residency === "pinned" ? " (PINNED \u2014 --force given)" : "", busyNote = vm.state === "busy" ? " \u2014 BUSY: its in-flight run will FAIL" : "";
@@ -13648,15 +13688,10 @@ Deleting it is exactly what "permanent" protects against \u2014 re-run with --fo
13648
13688
  var init_decide_vm_delete = __esm({ "src/core/decide-vm-delete.ts"() {
13649
13689
  "use strict";
13650
13690
  init_define_IGNITIFY_CLIENT_FILES();
13691
+ init_output();
13651
13692
  } });
13652
- async function runVmList(args) {
13653
- let badLimit = limitRefusal(args);
13654
- return badLimit !== null ? (fail(badLimit), 1) : guard(async () => {
13655
- let cfg = apiConfig(args), params = flagParams(args, VM_LIST_FLAG_PARAMS);
13656
- boolFlag(args, "pinned") && (params.residency = "pinned");
13657
- let data = await listApiVms(cfg, params);
13658
- return CliOutputManager.render("vm:list", data), noteNextPage(args, VM_LIST_PAGE, data.vms ?? []), 0;
13659
- });
13693
+ function runVmList(args) {
13694
+ return runPagedList(args, { list: VM_LIST_PAGE, fetchPage: listApiVms, extra: boolFlag(args, "pinned") ? { residency: "pinned" } : {}, rowsOf: (data) => data.vms ?? [], show: (data) => CliOutputManager.render("vm:list", data) });
13660
13695
  }
13661
13696
  async function runVmGet(args) {
13662
13697
  let id = requireArg(args, "vm-id");
@@ -13712,7 +13747,7 @@ async function runSecretDelete(args, prompter = ttyPrompter) {
13712
13747
  let name = args.positionals[0];
13713
13748
  return name ? guard(async () => {
13714
13749
  let cfg = apiConfig(args);
13715
- if (tell(`Will delete secret ${name}. Its value cannot be read back.`), !await confirmOrAbort(args, prompter)) return 1;
13750
+ if (tell(RESULT_MESSAGES.SECRET_DELETE_PREVIEW(name)), !await confirmOrAbort(args, prompter)) return 1;
13716
13751
  let res = await rmSecret(cfg, name);
13717
13752
  return emit(res), sayOk(MESSAGES.SECRET_REMOVED(name)), 0;
13718
13753
  }) : (tell(MESSAGES.SECRET_DELETE_USAGE), 1);
@@ -13739,11 +13774,11 @@ async function runScheduleCancel(args, prompter = ttyPrompter) {
13739
13774
  let id = requireArg(args, "schedule-id");
13740
13775
  return id ? guard(async () => {
13741
13776
  let cfg = apiConfig(args);
13742
- if (say(`Will cancel schedule ${id} \u2014 it will never fire.`), !await confirmOrAbort(args, prompter)) return 1;
13777
+ if (say(RESULT_MESSAGES.SCHEDULE_CANCEL_PREVIEW(id)), !await confirmOrAbort(args, prompter)) return 1;
13743
13778
  try {
13744
13779
  await deleteSchedule(cfg, id);
13745
13780
  } catch (e) {
13746
- if (e instanceof HttpError && e.status === 404) return fail(`Schedule ${id} was NOT cancelled: not found, already fired, or currently firing.`), 1;
13781
+ if (e instanceof HttpError && e.status === 404) return fail(RESULT_MESSAGES.SCHEDULE_NOT_CANCELLED(id)), 1;
13747
13782
  throw e;
13748
13783
  }
13749
13784
  return emit({ schedule_id: id, cancelled: true }), sayOk(RESULT_MESSAGES.SCHEDULE_CANCELLED(id)), 0;
@@ -13760,11 +13795,11 @@ var init_schedule = __esm({ "src/commands/schedule.ts"() {
13760
13795
  init_shared();
13761
13796
  } });
13762
13797
  function withAbsoluteUrl(created, baseUrl) {
13763
- let url = created.url;
13798
+ let { url } = created;
13764
13799
  return typeof url != "string" || !url.startsWith("/") ? created : { ...created, url: `${baseUrl.replace(/\/+$/, "")}${url}` };
13765
13800
  }
13766
13801
  function renderHookCreated(st, created) {
13767
- let { secret, ...rest } = created, rows = secret === void 0 ? rest : { ...rest, [RESULT_MESSAGES.HOOK_SECRET_KEY]: secret }, paint2 = { [RESULT_MESSAGES.HOOK_SECRET_KEY]: (s) => st.bold(st.yellow(s)) };
13802
+ let { secret, ...rest } = created, rows = { ...rest, [RESULT_MESSAGES.HOOK_SECRET_KEY]: secret }, paint2 = { [RESULT_MESSAGES.HOOK_SECRET_KEY]: (s) => st.bold(st.yellow(s)) };
13768
13803
  return `
13769
13804
  ${heading(st, RESULT_MESSAGES.HOOK_CREATED_TITLE, true)}
13770
13805
  ${renderFields(st, rows, void 0, paint2)}
@@ -13775,7 +13810,7 @@ async function runHookCreate(args) {
13775
13810
  if (!deploymentId) return tell(MESSAGES.HOOK_CREATE_USAGE), 1;
13776
13811
  let taskName = args.options["task-name"];
13777
13812
  return typeof taskName != "string" || taskName.trim() === "" ? (fail(MESSAGES.HOOK_TASK_NAME_REQUIRED), 1) : guard(async () => {
13778
- let cfg = apiConfig(args), created = withAbsoluteUrl(asRecord(await createHook(cfg, deploymentId, { task_name: taskName })), cfg.baseUrl);
13813
+ let cfg = apiConfig(args), created = withAbsoluteUrl(await createHook(cfg, deploymentId, { task_name: taskName }), cfg.baseUrl);
13779
13814
  return warn(MESSAGES.HOOK_SECRET_SHOWN_ONCE), tell(MESSAGES.HOOK_PAYLOAD_LIMIT(formatLimit(await payloadLimit(cfg)))), emit(created, (st) => renderHookCreated(st, created)), 0;
13780
13815
  });
13781
13816
  }
@@ -13784,15 +13819,15 @@ async function runHookList(args) {
13784
13819
  if (!deploymentId) return tell(MESSAGES.HOOK_LIST_USAGE), 1;
13785
13820
  let badLimit = limitRefusal(args);
13786
13821
  return badLimit !== null ? (fail(badLimit), 1) : guard(async () => {
13787
- let cfg = apiConfig(args), res = asRecord(await listHooks(cfg, deploymentId, flagParams(args, PAGE_FLAG_PARAMS))), hooks = Array.isArray(res.hooks) ? res.hooks : [];
13788
- return emit(res, (st) => renderList(hooks, st, EMPTY_LISTS.HOOKS)), noteNextPage(args, { command: COMMANDS.HOOK_LIST, flags: PAGE_FLAG_PARAMS }, hooks), 0;
13822
+ let cfg = apiConfig(args), res = await listHooks(cfg, deploymentId, flagParams(args, PAGE_FLAG_PARAMS)), hooks = Array.isArray(res.hooks) ? res.hooks : [];
13823
+ return emit(res, (st) => renderList(hooks.map((h) => ({ ...h })), st, EMPTY_LISTS.HOOKS)), noteNextPage(args, { command: COMMANDS.HOOK_LIST, flags: PAGE_FLAG_PARAMS }, hooks), 0;
13789
13824
  });
13790
13825
  }
13791
13826
  async function runHookDelete(args, prompter = ttyPrompter) {
13792
13827
  let hookId = args.positionals[0];
13793
13828
  return hookId ? guard(async () => {
13794
13829
  let cfg = apiConfig(args);
13795
- return tell(`Will delete webhook ${hookId}. A sender that posts to it is refused from then on.`), await confirmOrAbort(args, prompter) ? (emit(await deleteHook(cfg, hookId)), sayOk(RESULT_MESSAGES.HOOK_DELETED(hookId)), 0) : 1;
13830
+ return tell(RESULT_MESSAGES.HOOK_DELETE_PREVIEW(hookId)), await confirmOrAbort(args, prompter) ? (emit(await deleteHook(cfg, hookId)), sayOk(RESULT_MESSAGES.HOOK_DELETED(hookId)), 0) : 1;
13796
13831
  }) : (tell(MESSAGES.HOOK_DELETE_USAGE), 1);
13797
13832
  }
13798
13833
  async function runNotifySet(args) {
@@ -13801,10 +13836,10 @@ async function runNotifySet(args) {
13801
13836
  if (args.options.secret !== void 0) return fail(MESSAGES.NOTIFY_SECRET_ON_ARGV), 1;
13802
13837
  let refusal = notifySetRefusal(args, url !== void 0, clear);
13803
13838
  if (refusal !== null) return refuseNotifySet(refusal);
13804
- let secret;
13805
- return args.options["secret-stdin"] === true && (secret = import_fs6.default.readFileSync(0, "utf8").replace(/\n$/, ""), secret === "") ? refuseNotifySet(MESSAGES.NOTIFY_SECRET_EMPTY) : guard(async () => {
13806
- let cfg = apiConfig(args), body = { url: clear ? null : url };
13807
- return secret !== void 0 && (body.secret = secret), emit(await setNotify(cfg, deploymentId, body)), sayOk(body.url === null ? RESULT_MESSAGES.NOTIFY_CLEARED(deploymentId) : RESULT_MESSAGES.NOTIFY_SET(deploymentId, body.url)), 0;
13839
+ let secret = args.options["secret-stdin"] === true ? import_fs6.default.readFileSync(0, "utf8").replace(/\n$/, "") : void 0;
13840
+ return secret === "" ? refuseNotifySet(MESSAGES.NOTIFY_SECRET_EMPTY) : guard(async () => {
13841
+ let cfg = apiConfig(args), target = clear || typeof url != "string" ? null : url;
13842
+ return emit(await setNotify(cfg, deploymentId, { url: target, ...secret !== void 0 ? { secret } : {} })), sayOk(target === null ? RESULT_MESSAGES.NOTIFY_CLEARED(deploymentId) : RESULT_MESSAGES.NOTIFY_SET(deploymentId, target)), 0;
13808
13843
  });
13809
13844
  }
13810
13845
  function notifySetRefusal(args, hasUrl, clear) {
@@ -13814,7 +13849,7 @@ function notifySetRefusal(args, hasUrl, clear) {
13814
13849
  function refuseNotifySet(reason) {
13815
13850
  return fail(reason), tell(MESSAGES.NOTIFY_SET_USAGE), 1;
13816
13851
  }
13817
- var import_fs6, asRecord, init_hook = __esm({ "src/commands/hook.ts"() {
13852
+ var import_fs6, init_hook = __esm({ "src/commands/hook.ts"() {
13818
13853
  "use strict";
13819
13854
  init_define_IGNITIFY_CLIENT_FILES();
13820
13855
  import_fs6 = __toESM(require("fs"), 1);
@@ -13825,7 +13860,6 @@ var import_fs6, asRecord, init_hook = __esm({ "src/commands/hook.ts"() {
13825
13860
  init_utils();
13826
13861
  init_shared();
13827
13862
  init_output();
13828
- asRecord = (v) => typeof v == "object" && v !== null && !Array.isArray(v) ? v : {};
13829
13863
  } });
13830
13864
  var init_commands = __esm({ "src/commands/index.ts"() {
13831
13865
  "use strict";
@@ -13850,9 +13884,7 @@ function allowedFlags(meta) {
13850
13884
  return { ...meta.flags, ...GLOBAL_FLAGS };
13851
13885
  }
13852
13886
  function parserSpec(meta) {
13853
- let bools = new Set(Object.keys(GLOBAL_FLAGS));
13854
- if (meta !== void 0 && meta.secretArgv !== true) for (let [flag, kind] of Object.entries(meta.flags)) kind === "bool" && bools.add(flag);
13855
- return { boolFlags: bools };
13887
+ return boolFlagSpec(meta === void 0 || meta.secretArgv === true ? GLOBAL_FLAGS : { ...meta.flags, ...GLOBAL_FLAGS });
13856
13888
  }
13857
13889
  function parseInvocation(argv) {
13858
13890
  return parseArgs([...argv], parserSpec(metaFor(argv[0] ?? "")));
@@ -13893,12 +13925,11 @@ function planInvocation(argv) {
13893
13925
  let refusal = checkInvocation(command, meta, pass);
13894
13926
  return refusal === null ? { kind: "run", command, args } : { kind: "error", message: refusal };
13895
13927
  }
13896
- var looksShort, init_invocation2 = __esm({ "src/core/invocation.ts"() {
13928
+ var init_invocation2 = __esm({ "src/core/invocation.ts"() {
13897
13929
  "use strict";
13898
13930
  init_define_IGNITIFY_CLIENT_FILES();
13899
13931
  init_http_client();
13900
13932
  init_constants();
13901
- looksShort = (tok) => tok.length > 1 && tok.startsWith("-") && !tok.startsWith("--");
13902
13933
  } });
13903
13934
  var index_exports = {};
13904
13935
  __export(index_exports, { main: () => main, run: () => run });