sim 2.2.32-preview.312.1 → 2.2.32-preview.314.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/index.js CHANGED
@@ -28593,7 +28593,9 @@ async function* snapshotChunks(stream, signal) {
28593
28593
  }
28594
28594
  async function stagePermissionCsvs(provider, paths, signal) {
28595
28595
  const directory = await mkdtemp2(join4(tmpdir(), "sim-permissions-")).catch((error) => {
28596
- throw new SimApiError(`Cannot stage permission CSVs: ${getErrorMessage(error)}`, 0);
28596
+ const failure = new SimApiError(`Cannot stage permission CSVs: ${getErrorMessage(error)}`, 0);
28597
+ failure.cause = error;
28598
+ throw failure;
28597
28599
  });
28598
28600
  const parts = [];
28599
28601
  const manifest = {};
@@ -28671,7 +28673,12 @@ async function stagePermissionCsvs(provider, paths, signal) {
28671
28673
  parts.push({ field, path: partPath });
28672
28674
  totalBytes += partBytes;
28673
28675
  };
28674
- const parser = parse({ bom: true, skip_empty_lines: true, max_record_size: 8192 });
28676
+ const parser = parse({
28677
+ bom: true,
28678
+ trim: true,
28679
+ skip_empty_lines: true,
28680
+ max_record_size: 8192
28681
+ });
28675
28682
  const decoded = Readable2.from(decode());
28676
28683
  decoded.on("error", (error) => parser.destroy(error));
28677
28684
  decoded.pipe(parser);
@@ -28732,8 +28739,11 @@ async function stagePermissionCsvs(provider, paths, signal) {
28732
28739
  await dispose();
28733
28740
  if (error instanceof SimApiError)
28734
28741
  throw error;
28735
- if (error instanceof Error && "code" in error && typeof error.code === "string")
28736
- throw new SimApiError(`Cannot stage permission CSVs: ${error.message}`, 0);
28742
+ if (error instanceof Error && "code" in error && typeof error.code === "string") {
28743
+ const failure = new SimApiError(`Cannot stage permission CSVs: ${error.message}`, 0);
28744
+ failure.cause = error;
28745
+ throw failure;
28746
+ }
28737
28747
  throw error;
28738
28748
  }
28739
28749
  }
package/dist/runtime.js CHANGED
@@ -28642,7 +28642,9 @@ async function* snapshotChunks(stream, signal) {
28642
28642
  }
28643
28643
  async function stagePermissionCsvs(provider, paths, signal) {
28644
28644
  const directory = await mkdtemp2(join4(tmpdir(), "sim-permissions-")).catch((error) => {
28645
- throw new SimApiError(`Cannot stage permission CSVs: ${getErrorMessage(error)}`, 0);
28645
+ const failure = new SimApiError(`Cannot stage permission CSVs: ${getErrorMessage(error)}`, 0);
28646
+ failure.cause = error;
28647
+ throw failure;
28646
28648
  });
28647
28649
  const parts = [];
28648
28650
  const manifest = {};
@@ -28720,7 +28722,12 @@ async function stagePermissionCsvs(provider, paths, signal) {
28720
28722
  parts.push({ field, path: partPath });
28721
28723
  totalBytes += partBytes;
28722
28724
  };
28723
- const parser = parse({ bom: true, skip_empty_lines: true, max_record_size: 8192 });
28725
+ const parser = parse({
28726
+ bom: true,
28727
+ trim: true,
28728
+ skip_empty_lines: true,
28729
+ max_record_size: 8192
28730
+ });
28724
28731
  const decoded = Readable2.from(decode());
28725
28732
  decoded.on("error", (error) => parser.destroy(error));
28726
28733
  decoded.pipe(parser);
@@ -28781,8 +28788,11 @@ async function stagePermissionCsvs(provider, paths, signal) {
28781
28788
  await dispose();
28782
28789
  if (error instanceof SimApiError)
28783
28790
  throw error;
28784
- if (error instanceof Error && "code" in error && typeof error.code === "string")
28785
- throw new SimApiError(`Cannot stage permission CSVs: ${error.message}`, 0);
28791
+ if (error instanceof Error && "code" in error && typeof error.code === "string") {
28792
+ const failure = new SimApiError(`Cannot stage permission CSVs: ${error.message}`, 0);
28793
+ failure.cause = error;
28794
+ throw failure;
28795
+ }
28786
28796
  throw error;
28787
28797
  }
28788
28798
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sim",
3
- "version": "2.2.32-preview.312.1",
3
+ "version": "2.2.32-preview.314.1",
4
4
  "description": "Sim CLI - talk to the Sim API from your terminal",
5
5
  "type": "module",
6
6
  "bin": {