@swmansion/argent 0.24.1-next.3 → 0.24.1-next.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli-cmds.mjs CHANGED
@@ -17822,6 +17822,11 @@ function asString(raw) {
17822
17822
  function asNumber(raw) {
17823
17823
  return typeof raw === "number" && Number.isFinite(raw) ? raw : void 0;
17824
17824
  }
17825
+ function asPositiveInteger(raw) {
17826
+ return typeof raw === "number" && Number.isSafeInteger(raw) && raw > 0 ? raw : void 0;
17827
+ }
17828
+ var MIN_SCRIPT_HEAP_LIMIT_MB = 32;
17829
+ var MIN_SCRIPT_TIMEOUT_MS = 100;
17825
17830
  function asStringArray(raw) {
17826
17831
  if (!Array.isArray(raw)) return void 0;
17827
17832
  const out = [];
@@ -17834,6 +17839,7 @@ var PARSER_EXPECTATIONS = /* @__PURE__ */ new Map([
17834
17839
  [asBoolean, "a boolean (true or false)"],
17835
17840
  [asString, "a non-empty string"],
17836
17841
  [asNumber, "a number"],
17842
+ [asPositiveInteger, "a whole number greater than zero"],
17837
17843
  [asStringArray, "an array of strings"]
17838
17844
  ]);
17839
17845
  function describeExpectedValue(def) {
@@ -17889,6 +17895,35 @@ var CONFIG_SCHEMA = [
17889
17895
  // remote `argent link` tool-server it is the *client's* config that decides.
17890
17896
  merge: "prioritize-local",
17891
17897
  example: "~/Movies/argent"
17898
+ },
17899
+ // Global-scope only: a checked-in `.argent/config.json` must not raise the
17900
+ // ceiling on how much of the machine a script step may occupy. `merge` is
17901
+ // nominal here — the project scope of a global-only key is never read.
17902
+ {
17903
+ key: "scripts.maxTimeoutMs",
17904
+ description: `Upper bound, in milliseconds, on the time limit a flow \`script\` step may ask for (default 300000 \u2014 five minutes). Bounds how long one script can occupy the host. Values below ${MIN_SCRIPT_TIMEOUT_MS} ms are refused: the step starts a Node process before the script runs, so a smaller ceiling ends a script that did nothing wrong.`,
17905
+ scopes: ["global"],
17906
+ parse: (raw) => {
17907
+ const value = asPositiveInteger(raw);
17908
+ return value !== void 0 && value >= MIN_SCRIPT_TIMEOUT_MS ? value : void 0;
17909
+ },
17910
+ expected: `a whole number of milliseconds, at least ${MIN_SCRIPT_TIMEOUT_MS}`,
17911
+ merge: "prioritize-global",
17912
+ default: 5 * 6e4,
17913
+ example: "300000"
17914
+ },
17915
+ {
17916
+ key: "scripts.heapLimitMb",
17917
+ description: `Old-space heap limit, in MiB, given to each flow \`script\` process (default 512). Values below ${MIN_SCRIPT_HEAP_LIMIT_MB} MiB are refused: that is already below what importing a real npm dependency needs, and under about 5 MiB the process dies inside V8's own startup before any script runs.`,
17918
+ scopes: ["global"],
17919
+ parse: (raw) => {
17920
+ const value = asPositiveInteger(raw);
17921
+ return value !== void 0 && value >= MIN_SCRIPT_HEAP_LIMIT_MB ? value : void 0;
17922
+ },
17923
+ expected: `a whole number of MiB, at least ${MIN_SCRIPT_HEAP_LIMIT_MB}`,
17924
+ merge: "prioritize-global",
17925
+ default: 512,
17926
+ example: "512"
17892
17927
  }
17893
17928
  ];
17894
17929
  function getConfigDefinition(key, registry2 = CONFIG_SCHEMA) {
@@ -21055,6 +21090,13 @@ var PLATFORMS = [
21055
21090
  "tvos",
21056
21091
  "android-tv"
21057
21092
  ];
21093
+ var DEVICE_KINDS = [
21094
+ "simulator",
21095
+ "emulator",
21096
+ "vvd",
21097
+ "device",
21098
+ "app"
21099
+ ];
21058
21100
  var DEBUGGER_NOT_CONNECTED_REASONS = [
21059
21101
  "metro_not_running",
21060
21102
  "no_app_connected",
@@ -21098,6 +21140,7 @@ var arrayOf = (elem, maxLen = 16) => (v) => {
21098
21140
  };
21099
21141
  var TOOL_NAME = matches(/^[a-z][a-z0-9_-]{0,63}$/, 64);
21100
21142
  var PLATFORM = oneOf(PLATFORMS);
21143
+ var DEVICE_KIND = oneOf(DEVICE_KINDS);
21101
21144
  var UUID = matches(
21102
21145
  /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/,
21103
21146
  36
@@ -21241,6 +21284,7 @@ var ALLOWED = {
21241
21284
  tool: TOOL_NAME,
21242
21285
  tool_invocation_id: UUID,
21243
21286
  platform: PLATFORM,
21287
+ device_kind: DEVICE_KIND,
21244
21288
  ...AI_TELEMETRY
21245
21289
  },
21246
21290
  "tool:complete": {
@@ -21248,6 +21292,7 @@ var ALLOWED = {
21248
21292
  tool: TOOL_NAME,
21249
21293
  tool_invocation_id: UUID,
21250
21294
  platform: PLATFORM,
21295
+ device_kind: DEVICE_KIND,
21251
21296
  duration_ms: DURATION_MS,
21252
21297
  ...AI_TELEMETRY
21253
21298
  },
@@ -21256,6 +21301,7 @@ var ALLOWED = {
21256
21301
  tool: TOOL_NAME,
21257
21302
  tool_invocation_id: UUID,
21258
21303
  platform: PLATFORM,
21304
+ device_kind: DEVICE_KIND,
21259
21305
  duration_ms: DURATION_MS,
21260
21306
  // Emit side sends only names declared in the tool's zod shape, capped at 16
21261
21307
  // because arrayOf voids the whole array once it is longer.
@@ -21790,7 +21836,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
21790
21836
  var SESSION_ID2 = randomUUID5();
21791
21837
  function readCliVersion() {
21792
21838
  if (true) {
21793
- return "0.24.1-next.3";
21839
+ return "0.24.1-next.5";
21794
21840
  }
21795
21841
  return "0.0.0";
21796
21842
  }