@swmansion/argent 0.34.1-next.0 → 0.34.1-next.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/dist/cli-cmds.mjs CHANGED
@@ -32311,7 +32311,7 @@ function configuredRecordingsDir() {
32311
32311
  const expanded = trimmed === "~" ? home : trimmed.startsWith("~/") || trimmed.startsWith(`~${sep4}`) ? join13(home, trimmed.slice(2)) : trimmed;
32312
32312
  return resolve8(durableBaseDir(), expanded);
32313
32313
  }
32314
- var MAX_DURABLE_BYTES = 2 * 1024 * 1024 * 1024;
32314
+ var MAX_ARTIFACT_BYTES = 2 * 1024 * 1024 * 1024;
32315
32315
  async function readCapped(res, cap) {
32316
32316
  const headers = res.headers;
32317
32317
  const declared = Number(headers?.get?.("content-length"));
@@ -32452,7 +32452,7 @@ async function materializeArtifacts(result, ctx) {
32452
32452
  }
32453
32453
  return finalPath2;
32454
32454
  }
32455
- if (!Number.isInteger(value.size) || value.size <= 0 || value.size > MAX_DURABLE_BYTES) {
32455
+ if (!Number.isInteger(value.size) || value.size <= 0 || value.size > MAX_ARTIFACT_BYTES) {
32456
32456
  return null;
32457
32457
  }
32458
32458
  const res = await fetchFn(`${ctx.toolsUrl}/artifacts/${value.id}`, {
@@ -32491,7 +32491,9 @@ async function materializeArtifacts(result, ctx) {
32491
32491
  signal: ctx.signal
32492
32492
  });
32493
32493
  if (!res.ok) return null;
32494
- const data = Buffer.from(await res.arrayBuffer());
32494
+ const cap = !value.archive && Number.isInteger(value.size) && value.size > 0 ? Math.min(value.size, MAX_ARTIFACT_BYTES) : MAX_ARTIFACT_BYTES;
32495
+ const data = await readCapped(res, cap);
32496
+ if (!data) return null;
32495
32497
  await ensureDir();
32496
32498
  if (value.archive === "tar.gz") {
32497
32499
  return await downloadAndExtractArchive(value, data, dir);
@@ -36072,7 +36074,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
36072
36074
  var SESSION_ID2 = randomUUID5();
36073
36075
  function readCliVersion() {
36074
36076
  if (true) {
36075
- return "0.34.1-next.0";
36077
+ return "0.34.1-next.1";
36076
36078
  }
36077
36079
  return "0.0.0";
36078
36080
  }
package/dist/client.js CHANGED
@@ -11057,7 +11057,7 @@ function configuredRecordingsDir() {
11057
11057
  const expanded = trimmed === "~" ? home : trimmed.startsWith("~/") || trimmed.startsWith(`~${sep4}`) ? join13(home, trimmed.slice(2)) : trimmed;
11058
11058
  return resolve8(durableBaseDir(), expanded);
11059
11059
  }
11060
- var MAX_DURABLE_BYTES = 2 * 1024 * 1024 * 1024;
11060
+ var MAX_ARTIFACT_BYTES = 2 * 1024 * 1024 * 1024;
11061
11061
  async function readCapped(res, cap) {
11062
11062
  const headers = res.headers;
11063
11063
  const declared = Number(headers?.get?.("content-length"));
@@ -11198,7 +11198,7 @@ async function materializeArtifacts(result, ctx) {
11198
11198
  }
11199
11199
  return finalPath2;
11200
11200
  }
11201
- if (!Number.isInteger(value.size) || value.size <= 0 || value.size > MAX_DURABLE_BYTES) {
11201
+ if (!Number.isInteger(value.size) || value.size <= 0 || value.size > MAX_ARTIFACT_BYTES) {
11202
11202
  return null;
11203
11203
  }
11204
11204
  const res = await fetchFn(`${ctx.toolsUrl}/artifacts/${value.id}`, {
@@ -11237,7 +11237,9 @@ async function materializeArtifacts(result, ctx) {
11237
11237
  signal: ctx.signal
11238
11238
  });
11239
11239
  if (!res.ok) return null;
11240
- const data = Buffer.from(await res.arrayBuffer());
11240
+ const cap = !value.archive && Number.isInteger(value.size) && value.size > 0 ? Math.min(value.size, MAX_ARTIFACT_BYTES) : MAX_ARTIFACT_BYTES;
11241
+ const data = await readCapped(res, cap);
11242
+ if (!data) return null;
11241
11243
  await ensureDir();
11242
11244
  if (value.archive === "tar.gz") {
11243
11245
  return await downloadAndExtractArchive(value, data, dir);
@@ -16989,7 +16989,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
16989
16989
  var SESSION_ID = randomUUID4();
16990
16990
  function readCliVersion() {
16991
16991
  if (true) {
16992
- return "0.34.1-next.0";
16992
+ return "0.34.1-next.1";
16993
16993
  }
16994
16994
  return "0.0.0";
16995
16995
  }
@@ -24222,7 +24222,7 @@ import { basename as basename7, dirname as dirname17, extname as extname2, isAbs
24222
24222
  import { createHash as createHash5 } from "node:crypto";
24223
24223
  var ALLOWED_SAVE_DIRS = /* @__PURE__ */ new Set([normalize2(".argent/recordings")]);
24224
24224
  var RECORDINGS_SAVE_DIR = normalize2(".argent/recordings");
24225
- var MAX_DURABLE_BYTES = 2 * 1024 * 1024 * 1024;
24225
+ var MAX_ARTIFACT_BYTES = 2 * 1024 * 1024 * 1024;
24226
24226
 
24227
24227
  // ../argent-installer/src/update.ts
24228
24228
  function getRequestedVersion(args) {
@@ -27811,7 +27811,7 @@ function configuredRecordingsDir() {
27811
27811
  const expanded = trimmed === "~" ? home : trimmed.startsWith("~/") || trimmed.startsWith(`~${sep4}`) ? join13(home, trimmed.slice(2)) : trimmed;
27812
27812
  return resolve8(durableBaseDir(), expanded);
27813
27813
  }
27814
- var MAX_DURABLE_BYTES = 2 * 1024 * 1024 * 1024;
27814
+ var MAX_ARTIFACT_BYTES = 2 * 1024 * 1024 * 1024;
27815
27815
  async function readCapped(res, cap) {
27816
27816
  const headers = res.headers;
27817
27817
  const declared = Number(headers?.get?.("content-length"));
@@ -27952,7 +27952,7 @@ async function materializeArtifacts(result, ctx) {
27952
27952
  }
27953
27953
  return finalPath2;
27954
27954
  }
27955
- if (!Number.isInteger(value.size) || value.size <= 0 || value.size > MAX_DURABLE_BYTES) {
27955
+ if (!Number.isInteger(value.size) || value.size <= 0 || value.size > MAX_ARTIFACT_BYTES) {
27956
27956
  return null;
27957
27957
  }
27958
27958
  const res = await fetchFn(`${ctx.toolsUrl}/artifacts/${value.id}`, {
@@ -27991,7 +27991,9 @@ async function materializeArtifacts(result, ctx) {
27991
27991
  signal: ctx.signal
27992
27992
  });
27993
27993
  if (!res.ok) return null;
27994
- const data = Buffer.from(await res.arrayBuffer());
27994
+ const cap = !value.archive && Number.isInteger(value.size) && value.size > 0 ? Math.min(value.size, MAX_ARTIFACT_BYTES) : MAX_ARTIFACT_BYTES;
27995
+ const data = await readCapped(res, cap);
27996
+ if (!data) return null;
27995
27997
  await ensureDir();
27996
27998
  if (value.archive === "tar.gz") {
27997
27999
  return await downloadAndExtractArchive(value, data, dir);
@@ -101281,7 +101281,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
101281
101281
  var SESSION_ID = (0, import_node_crypto3.randomUUID)();
101282
101282
  function readCliVersion() {
101283
101283
  if (true) {
101284
- return "0.34.1-next.0";
101284
+ return "0.34.1-next.1";
101285
101285
  }
101286
101286
  return "0.0.0";
101287
101287
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swmansion/argent",
3
- "version": "0.34.1-next.0",
3
+ "version": "0.34.1-next.1",
4
4
  "mcpName": "io.github.software-mansion/argent",
5
5
  "description": "MCP server for iOS Simulator, Android Emulator, Chromium app and Mac app control",
6
6
  "license": "Apache-2.0",