@alienplatform/commands 3.3.39 → 3.3.41

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.
Files changed (2) hide show
  1. package/dist/index.js +29 -54
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { AlienError, AlienError as AlienError$1, CommandStatusResponseSchema, CreateCommandResponseSchema, LeaseResponseSchema, defineError, defineError as defineError$1 } from "@alienplatform/core";
2
2
  import { readFile } from "node:fs/promises";
3
- //#region ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/util.js
3
+ // ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/util.js
4
4
  function getEnumValues(entries) {
5
5
  const numericValues = Object.values(entries).filter((v) => typeof v === "number");
6
6
  return Object.entries(entries).filter(([k, _]) => numericValues.indexOf(+k) === -1).map(([_, v]) => v);
@@ -475,8 +475,7 @@ function constantCatch(value) {
475
475
  fn[CONSTANT_CATCH] = true;
476
476
  return fn;
477
477
  }
478
- //#endregion
479
- //#region ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/core.js
478
+ // ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/core.js
480
479
  var _a$1;
481
480
  const _zodDesc$1 = {
482
481
  value: void 0,
@@ -503,6 +502,7 @@ function newError(Definition) {
503
502
  }
504
503
  return new Definition();
505
504
  }
505
+ /* @__NO_SIDE_EFFECTS__ */
506
506
  function $constructor(name, initializer, proto, params) {
507
507
  const zodProto = {};
508
508
  function Internals(def) {
@@ -582,8 +582,7 @@ function config(newConfig) {
582
582
  if (newConfig) Object.assign(globalConfig, newConfig);
583
583
  return globalConfig;
584
584
  }
585
- //#endregion
586
- //#region ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/errors.js
585
+ // ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/errors.js
587
586
  function _getMessage() {
588
587
  const internals = this._zod;
589
588
  internals.message ?? (internals.message = JSON.stringify(internals.def, jsonStringifyReplacer, 2));
@@ -641,8 +640,8 @@ const initializer$1 = (inst, def) => {
641
640
  });
642
641
  }
643
642
  };
644
- const $ZodError = $constructor("$ZodError", initializer$1);
645
- const $ZodRealError = $constructor("$ZodError", initializer$1, void 0, { Parent: Error });
643
+ const $ZodError = /* @__PURE__ */ $constructor("$ZodError", initializer$1);
644
+ const $ZodRealError = /* @__PURE__ */ $constructor("$ZodError", initializer$1, void 0, { Parent: Error });
646
645
  /** Get-or-create `obj[key]` as an own data property. A path segment naming an inherited member
647
646
  * ("toString", "constructor") would otherwise read through to the prototype, and assigning
648
647
  * "__proto__" would hit the setter instead of creating a key. */
@@ -705,8 +704,7 @@ function formatError(error, mapper = (issue) => issue.message) {
705
704
  processError(error);
706
705
  return fieldErrors;
707
706
  }
708
- //#endregion
709
- //#region ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/parse.js
707
+ // ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/parse.js
710
708
  function finalizeParams(callee, params) {
711
709
  return {
712
710
  callee: params?.callee ?? callee,
@@ -847,8 +845,7 @@ const _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {
847
845
  const _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
848
846
  return _safeParseAsync(_Err)(schema, value, _ctx);
849
847
  };
850
- //#endregion
851
- //#region ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/regexes.js
848
+ // ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/regexes.js
852
849
  /**
853
850
  * @deprecated CUID v1 is deprecated by its authors due to information leakage
854
851
  * (timestamps embedded in the id). Use {@link cuid2} instead.
@@ -922,8 +919,7 @@ const number$1 = /^-?\d+(?:\.\d+)?$/;
922
919
  const _undefined$2 = /^undefined$/i;
923
920
  const lowercase = /^[^A-Z]*$/;
924
921
  const uppercase = /^[^a-z]*$/;
925
- //#endregion
926
- //#region ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/checks.js
922
+ // ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/checks.js
927
923
  const $ZodCheck = /*@__PURE__*/ $constructor("$ZodCheck", (inst, def) => {
928
924
  var _a;
929
925
  inst._zod ?? (inst._zod = {});
@@ -1283,8 +1279,7 @@ const $ZodCheckOverwrite = /*@__PURE__*/ $constructor("$ZodCheckOverwrite", (ins
1283
1279
  payload.value = def.tx(payload.value);
1284
1280
  };
1285
1281
  });
1286
- //#endregion
1287
- //#region ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/doc.js
1282
+ // ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/doc.js
1288
1283
  var Doc = class {
1289
1284
  constructor(args = [], closed = {}) {
1290
1285
  this.content = [];
@@ -1314,15 +1309,13 @@ var Doc = class {
1314
1309
  return new F(...Object.keys(this.closed), `return function (${this.args.join(", ")}) {\n${content.join("\n")}\n};`)(...Object.values(this.closed));
1315
1310
  }
1316
1311
  };
1317
- //#endregion
1318
- //#region ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/versions.js
1312
+ // ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/versions.js
1319
1313
  const version = {
1320
1314
  major: 4,
1321
1315
  minor: 5,
1322
1316
  patch: 2
1323
1317
  };
1324
- //#endregion
1325
- //#region ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/schemas.js
1318
+ // ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/schemas.js
1326
1319
  const $ZodType = /*@__PURE__*/ $constructor("$ZodType", (inst, def) => {
1327
1320
  var _a;
1328
1321
  inst ?? (inst = {});
@@ -2491,8 +2484,7 @@ function handleRefineResult(result, payload, input, inst) {
2491
2484
  payload.issues.push(issue(_iss));
2492
2485
  }
2493
2486
  }
2494
- //#endregion
2495
- //#region ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/memoizer.js
2487
+ // ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/memoizer.js
2496
2488
  var $ZodCyclicError = class extends Error {
2497
2489
  constructor() {
2498
2490
  super(`Cannot parse a reference cycle that closes through a transform`);
@@ -2643,8 +2635,7 @@ function isBackEdge(ctx, value) {
2643
2635
  const backEdges = ctx[STATE]?.backEdges;
2644
2636
  return backEdges !== void 0 && value !== null && typeof value === "object" && backEdges.has(value);
2645
2637
  }
2646
- //#endregion
2647
- //#region ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/locales/en.js
2638
+ // ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/locales/en.js
2648
2639
  const error = () => {
2649
2640
  const Sizable = {
2650
2641
  string: {
@@ -2749,8 +2740,7 @@ const error = () => {
2749
2740
  function en_default() {
2750
2741
  return { localeError: error() };
2751
2742
  }
2752
- //#endregion
2753
- //#region ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/registries.js
2743
+ // ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/registries.js
2754
2744
  var _a;
2755
2745
  var $ZodRegistry = class {
2756
2746
  constructor() {
@@ -2796,8 +2786,7 @@ function registry() {
2796
2786
  }
2797
2787
  (_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());
2798
2788
  const globalRegistry = globalThis.__zod_globalRegistry;
2799
- //#endregion
2800
- //#region ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/api.js
2789
+ // ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/api.js
2801
2790
  // @__NO_SIDE_EFFECTS__
2802
2791
  function _string(Class, params) {
2803
2792
  return new Class({
@@ -3301,8 +3290,7 @@ function _check(fn, params) {
3301
3290
  ch._zod.check = fn;
3302
3291
  return ch;
3303
3292
  }
3304
- //#endregion
3305
- //#region ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/to-json-schema.js
3293
+ // ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/to-json-schema.js
3306
3294
  function assignProps(target, ...sources) {
3307
3295
  for (const source of sources) for (const key of Reflect.ownKeys(source)) if (Object.prototype.propertyIsEnumerable.call(source, key)) assignProp(target, key, source[key]);
3308
3296
  return target;
@@ -3746,8 +3734,7 @@ const createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params)
3746
3734
  extractDefs(ctx, schema);
3747
3735
  return finalize(ctx, schema);
3748
3736
  };
3749
- //#endregion
3750
- //#region ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/json-schema-processors.js
3737
+ // ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/json-schema-processors.js
3751
3738
  const formatMap = {
3752
3739
  guid: "uuid",
3753
3740
  url: "uri",
@@ -3991,8 +3978,7 @@ const optionalProcessor = (schema, ctx, _json, params) => {
3991
3978
  const seen = ctx.seen.get(schema);
3992
3979
  seen.ref = def.innerType;
3993
3980
  };
3994
- //#endregion
3995
- //#region ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/classic/errors.js
3981
+ // ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/classic/errors.js
3996
3982
  const _installedErrorProtos = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);
3997
3983
  function _lazyMethod(proto, key, make) {
3998
3984
  Object.defineProperty(proto, key, {
@@ -4041,8 +4027,7 @@ const initializer = (inst, issues) => {
4041
4027
  });
4042
4028
  };
4043
4029
  const ZodRealError = /*@__PURE__*/ $constructor("ZodError", initializer, void 0, { Parent: Error });
4044
- //#endregion
4045
- //#region ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/classic/parse.js
4030
+ // ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/classic/parse.js
4046
4031
  const parse = /* @__PURE__ */ _parse(ZodRealError);
4047
4032
  const parseAsync = /* @__PURE__ */ _parseAsync(ZodRealError);
4048
4033
  const safeParse = /* @__PURE__ */ _safeParse(ZodRealError);
@@ -4055,8 +4040,7 @@ const safeEncode = /* @__PURE__ */ _safeEncode(ZodRealError);
4055
4040
  const safeDecode = /* @__PURE__ */ _safeDecode(ZodRealError);
4056
4041
  const safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
4057
4042
  const safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
4058
- //#endregion
4059
- //#region ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/classic/schemas.js
4043
+ // ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/classic/schemas.js
4060
4044
  function _ensureDefaultLocale() {
4061
4045
  if (!globalConfig.localeError) config(en_default());
4062
4046
  }
@@ -4889,13 +4873,11 @@ function refine(fn, _params = {}) {
4889
4873
  function superRefine(fn, params) {
4890
4874
  return /* @__PURE__ */ _superRefine(fn, params);
4891
4875
  }
4892
- //#endregion
4893
- //#region ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/classic/iso.js
4876
+ // ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/classic/iso.js
4894
4877
  function datetime(params) {
4895
4878
  return /* @__PURE__ */ _isoDateTime(ZodISODateTime, params);
4896
4879
  }
4897
- //#endregion
4898
- //#region src/errors.ts
4880
+ // src/errors.ts
4899
4881
  /**
4900
4882
  * Command sender error definitions.
4901
4883
  *
@@ -5131,8 +5113,7 @@ const MalformedResponseError = defineError$1({
5131
5113
  internal: false,
5132
5114
  httpStatusCode: 502
5133
5115
  });
5134
- //#endregion
5135
- //#region src/wire.ts
5116
+ // src/wire.ts
5136
5117
  /**
5137
5118
  * Wire-response validation.
5138
5119
  *
@@ -5156,8 +5137,7 @@ function parseWireResponse(schema, value, method, url) {
5156
5137
  reason: result.error.message
5157
5138
  }));
5158
5139
  }
5159
- //#endregion
5160
- //#region src/bootstrap.ts
5140
+ // src/bootstrap.ts
5161
5141
  const DEFAULT_PLATFORM_URL = "https://api.alien.dev";
5162
5142
  const BOOTSTRAP_PATH = "/v1/commands/bootstrap";
5163
5143
  const BOOTSTRAP_TIMEOUT_MS = 3e4;
@@ -5351,8 +5331,7 @@ function invalidConfig(field, reason) {
5351
5331
  reason
5352
5332
  }));
5353
5333
  }
5354
- //#endregion
5355
- //#region src/presigned.ts
5334
+ // src/presigned.ts
5356
5335
  /**
5357
5336
  * Presigned-transfer mechanics shared by the sender and the receiver:
5358
5337
  * expiration check, http vs local backend dispatch, and the `..` traversal
@@ -5492,8 +5471,7 @@ async function uploadPresigned(request, bytes, options) {
5492
5471
  const { writeFile } = await import("node:fs/promises");
5493
5472
  await writeFile(filePath, bytes);
5494
5473
  }
5495
- //#endregion
5496
- //#region src/client.ts
5474
+ // src/client.ts
5497
5475
  /**
5498
5476
  * Command sender — invoke commands on remote Alien deployments.
5499
5477
  *
@@ -5819,8 +5797,7 @@ var TargetedCommands = class {
5819
5797
  });
5820
5798
  }
5821
5799
  };
5822
- //#endregion
5823
- //#region src/receiver-config.ts
5800
+ // src/receiver-config.ts
5824
5801
  const DEFAULT_POLL_INTERVAL_MS = 5e3;
5825
5802
  const DEFAULT_MAX_LEASES = 1;
5826
5803
  const DEFAULT_LEASE_SECONDS = 60;
@@ -6025,8 +6002,7 @@ var HostedReceiverConnectionProvider = class {
6025
6002
  };
6026
6003
  }
6027
6004
  };
6028
- //#endregion
6029
- //#region src/receiver.ts
6005
+ // src/receiver.ts
6030
6006
  /**
6031
6007
  * Pull command receiver — the app-owned lease loop for Containers and Daemons.
6032
6008
  *
@@ -6688,5 +6664,4 @@ function safeTransportErrorDetails(error) {
6688
6664
  function safeDiagnosticToken(value) {
6689
6665
  return typeof value === "string" && /^[A-Za-z0-9_.-]{1,64}$/.test(value) ? value : void 0;
6690
6666
  }
6691
- //#endregion
6692
6667
  export { AlienError, CommandBootstrapConfigInvalidError, CommandBootstrapFailedError, CommandCreationFailedError, CommandExpiredError, CommandReceiverConfigInvalidError, CommandStatusFailedError, CommandTimeoutError, CommandsClient, DeploymentCommandError, InvalidEnvelopeError, MalformedResponseError, ManagerHttpError, PlatformHttpError, ResponseDecodingFailedError, StorageOperationFailedError, TargetedCommands, createCommandReceiver, defineError };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alienplatform/commands",
3
- "version": "3.3.39",
3
+ "version": "3.3.41",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "types": "./dist/index.d.ts",
@@ -47,7 +47,7 @@
47
47
  "@alienplatform/typescript-config": "^1.0.0"
48
48
  },
49
49
  "dependencies": {
50
- "@alienplatform/core": "^3.3.39"
50
+ "@alienplatform/core": "^3.3.41"
51
51
  },
52
52
  "scripts": {
53
53
  "build": "tsdown && tsc -p tsconfig.build.json --emitDeclarationOnly",