@tscircuit/cli 0.1.1511 → 0.1.1512

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.
@@ -14448,7 +14448,7 @@ import {
14448
14448
  convertCircuitJsonToPcbSvg,
14449
14449
  convertCircuitJsonToSchematicSvg
14450
14450
  } from "circuit-to-svg";
14451
- import { renderGLTFToPNGBufferFromGLBBuffer } from "poppygl";
14451
+ import { renderGLTFToPNGFromGLB } from "poppygl";
14452
14452
 
14453
14453
  // node_modules/conf/dist/source/index.js
14454
14454
  import { isDeepStrictEqual } from "node:util";
@@ -16074,7 +16074,7 @@ var writeImageAssetsFromCircuitJson = async (circuitJson, options) => {
16074
16074
  const circuitJsonWithFileUrls = convertModelUrlsToFileUrls(circuitJson);
16075
16075
  const glbBuffer = await convertCircuitJsonToGltf(circuitJsonWithFileUrls, getCircuitJsonToGltfOptions({ format: "glb" }));
16076
16076
  const glbArrayBuffer = await normalizeToArrayBuffer(glbBuffer);
16077
- const pngBuffer = await renderGLTFToPNGBufferFromGLBBuffer(glbArrayBuffer, getBestCameraPosition(circuitJson));
16077
+ const pngBuffer = await renderGLTFToPNGFromGLB(glbArrayBuffer, getBestCameraPosition(circuitJson));
16078
16078
  fs9.writeFileSync(path13.join(outputDir, "3d.png"), Buffer.from(normalizeToUint8Array(pngBuffer)));
16079
16079
  }
16080
16080
  };
package/dist/cli/main.js CHANGED
@@ -100763,7 +100763,7 @@ var import_perfect_cli = __toESM2(require_dist2(), 1);
100763
100763
  // lib/getVersion.ts
100764
100764
  import { createRequire as createRequire2 } from "node:module";
100765
100765
  // package.json
100766
- var version = "0.1.1509";
100766
+ var version = "0.1.1511";
100767
100767
  var package_default = {
100768
100768
  name: "@tscircuit/cli",
100769
100769
  version,
@@ -100834,7 +100834,7 @@ var package_default = {
100834
100834
  md5: "^2.3.0",
100835
100835
  "perfect-cli": "^1.0.21",
100836
100836
  playwright: "^1.57.0",
100837
- poppygl: "^0.0.20",
100837
+ poppygl: "^0.0.24",
100838
100838
  prompts: "^2.4.2",
100839
100839
  redaxios: "^0.5.1",
100840
100840
  semver: "^7.6.3",
@@ -114416,7 +114416,7 @@ import {
114416
114416
  convertCircuitJsonToPcbSvg,
114417
114417
  convertCircuitJsonToSchematicSvg
114418
114418
  } from "circuit-to-svg";
114419
- import { renderGLTFToPNGBufferFromGLBBuffer } from "poppygl";
114419
+ import { renderGLTFToPNGFromGLB } from "poppygl";
114420
114420
 
114421
114421
  // cli/build/worker-binary-utils.ts
114422
114422
  var viewToArrayBuffer2 = (view) => {
@@ -114523,7 +114523,7 @@ var writeImageAssetsFromCircuitJson = async (circuitJson, options) => {
114523
114523
  const circuitJsonWithFileUrls = convertModelUrlsToFileUrls(circuitJson);
114524
114524
  const glbBuffer = await convertCircuitJsonToGltf2(circuitJsonWithFileUrls, getCircuitJsonToGltfOptions({ format: "glb" }));
114525
114525
  const glbArrayBuffer = await normalizeToArrayBuffer(glbBuffer);
114526
- const pngBuffer = await renderGLTFToPNGBufferFromGLBBuffer(glbArrayBuffer, getBestCameraPosition(circuitJson));
114526
+ const pngBuffer = await renderGLTFToPNGFromGLB(glbArrayBuffer, getBestCameraPosition(circuitJson));
114527
114527
  fs29.writeFileSync(path32.join(outputDir, "3d.png"), Buffer.from(normalizeToUint8Array2(pngBuffer)));
114528
114528
  }
114529
114529
  };
@@ -114620,7 +114620,7 @@ import {
114620
114620
  convertCircuitJsonToPcbSvg as convertCircuitJsonToPcbSvg2,
114621
114621
  convertCircuitJsonToSchematicSvg as convertCircuitJsonToSchematicSvg2
114622
114622
  } from "circuit-to-svg";
114623
- import { renderGLTFToPNGBufferFromGLBBuffer as renderGLTFToPNGBufferFromGLBBuffer2 } from "poppygl";
114623
+ import { renderGLTFToPNGFromGLB as renderGLTFToPNGFromGLB2 } from "poppygl";
114624
114624
  var viewToArrayBuffer3 = (view) => {
114625
114625
  const copy = new Uint8Array(view.byteLength);
114626
114626
  copy.set(new Uint8Array(view.buffer, view.byteOffset, view.byteLength));
@@ -114709,7 +114709,7 @@ var generatePreviewAssets = async ({
114709
114709
  const glbBuffer = await convertCircuitJsonToGltf4(circuitJsonWithFileUrls, getCircuitJsonToGltfOptions({ format: "glb" }));
114710
114710
  console.log(`${prefix}Rendering GLB to PNG buffer...`);
114711
114711
  const glbArrayBuffer = await normalizeToArrayBuffer2(glbBuffer);
114712
- const pngBuffer = await renderGLTFToPNGBufferFromGLBBuffer2(glbArrayBuffer, getBestCameraPosition2(circuitJson));
114712
+ const pngBuffer = await renderGLTFToPNGFromGLB2(glbArrayBuffer, getBestCameraPosition2(circuitJson));
114713
114713
  fs32.writeFileSync(path35.join(outputDir, "3d.png"), Buffer.from(normalizeToUint8Array3(pngBuffer)));
114714
114714
  console.log(`${prefix}Written 3d.png`);
114715
114715
  } catch (error) {
@@ -278268,7 +278268,7 @@ import {
278268
278268
  convertCircuitJsonToPcbSvg as convertCircuitJsonToPcbSvg5,
278269
278269
  convertCircuitJsonToSchematicSvg as convertCircuitJsonToSchematicSvg5
278270
278270
  } from "circuit-to-svg";
278271
- import { renderGLTFToPNGBufferFromGLBBuffer as renderGLTFToPNGBufferFromGLBBuffer3 } from "poppygl";
278271
+ import { renderGLTFToPNGFromGLB as renderGLTFToPNGFromGLB3 } from "poppygl";
278272
278272
 
278273
278273
  // node_modules/@tscircuit/image-utils/dist/looks-same.js
278274
278274
  import { readFile as readFile2, writeFile } from "fs/promises";
@@ -280967,15 +280967,17 @@ var looks_same_default = looksSame;
280967
280967
  // lib/shared/compare-images.ts
280968
280968
  import fs64 from "node:fs/promises";
280969
280969
  var compareAndCreateDiff = async (buffer1, buffer2, diffPath, createDiff2 = true) => {
280970
- const { equal: equal2 } = await looks_same_default(buffer1, buffer2, {
280970
+ const b12 = Buffer.from(buffer1);
280971
+ const b22 = Buffer.from(buffer2);
280972
+ const { equal: equal2 } = await looks_same_default(b12, b22, {
280971
280973
  strict: false,
280972
280974
  tolerance: 2
280973
280975
  });
280974
280976
  if (!equal2 && createDiff2) {
280975
280977
  if (diffPath.endsWith(".png")) {
280976
280978
  await looks_same_default.createDiff({
280977
- reference: buffer1,
280978
- current: buffer2,
280979
+ reference: b12,
280980
+ current: b22,
280979
280981
  diff: diffPath,
280980
280982
  highlightColor: "#ff00ff",
280981
280983
  tolerance: 2
@@ -281079,7 +281081,7 @@ var processSnapshotFile = async ({
281079
281081
  if (cameraPreset) {
281080
281082
  cameraOptions = applyCameraPreset(cameraPreset, cameraOptions);
281081
281083
  }
281082
- png3d = await renderGLTFToPNGBufferFromGLBBuffer3(glbBuffer, cameraOptions);
281084
+ png3d = await renderGLTFToPNGFromGLB3(glbBuffer, cameraOptions);
281083
281085
  } catch (error) {
281084
281086
  const errorMessage = error instanceof Error ? error.message : String(error);
281085
281087
  if (errorMessage.includes("No pcb_board found in circuit JSON")) {
@@ -13528,7 +13528,7 @@ function getCompletePlatformConfig(userConfig) {
13528
13528
  }
13529
13529
 
13530
13530
  // lib/shared/process-snapshot-file.ts
13531
- import { renderGLTFToPNGBufferFromGLBBuffer } from "poppygl";
13531
+ import { renderGLTFToPNGFromGLB } from "poppygl";
13532
13532
 
13533
13533
  // node_modules/@tscircuit/image-utils/dist/looks-same.js
13534
13534
  import { readFile, writeFile } from "fs/promises";
@@ -16227,15 +16227,17 @@ var looks_same_default = looksSame;
16227
16227
  // lib/shared/compare-images.ts
16228
16228
  import fs9 from "node:fs/promises";
16229
16229
  var compareAndCreateDiff = async (buffer1, buffer2, diffPath, createDiff2 = true) => {
16230
- const { equal } = await looks_same_default(buffer1, buffer2, {
16230
+ const b1 = Buffer.from(buffer1);
16231
+ const b2 = Buffer.from(buffer2);
16232
+ const { equal } = await looks_same_default(b1, b2, {
16231
16233
  strict: false,
16232
16234
  tolerance: 2
16233
16235
  });
16234
16236
  if (!equal && createDiff2) {
16235
16237
  if (diffPath.endsWith(".png")) {
16236
16238
  await looks_same_default.createDiff({
16237
- reference: buffer1,
16238
- current: buffer2,
16239
+ reference: b1,
16240
+ current: b2,
16239
16241
  diff: diffPath,
16240
16242
  highlightColor: "#ff00ff",
16241
16243
  tolerance: 2
@@ -16345,7 +16347,7 @@ var processSnapshotFile = async ({
16345
16347
  if (cameraPreset) {
16346
16348
  cameraOptions = applyCameraPreset(cameraPreset, cameraOptions);
16347
16349
  }
16348
- png3d = await renderGLTFToPNGBufferFromGLBBuffer(glbBuffer, cameraOptions);
16350
+ png3d = await renderGLTFToPNGFromGLB(glbBuffer, cameraOptions);
16349
16351
  } catch (error) {
16350
16352
  const errorMessage = error instanceof Error ? error.message : String(error);
16351
16353
  if (errorMessage.includes("No pcb_board found in circuit JSON")) {
package/dist/lib/index.js CHANGED
@@ -65364,7 +65364,7 @@ var getNodeHandler = (winterSpec, { port, middleware = [] }) => {
65364
65364
  }));
65365
65365
  };
65366
65366
  // package.json
65367
- var version = "0.1.1509";
65367
+ var version = "0.1.1511";
65368
65368
  var package_default = {
65369
65369
  name: "@tscircuit/cli",
65370
65370
  version,
@@ -65435,7 +65435,7 @@ var package_default = {
65435
65435
  md5: "^2.3.0",
65436
65436
  "perfect-cli": "^1.0.21",
65437
65437
  playwright: "^1.57.0",
65438
- poppygl: "^0.0.20",
65438
+ poppygl: "^0.0.24",
65439
65439
  prompts: "^2.4.2",
65440
65440
  redaxios: "^0.5.1",
65441
65441
  semver: "^7.6.3",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/cli",
3
- "version": "0.1.1511",
3
+ "version": "0.1.1512",
4
4
  "main": "dist/cli/main.js",
5
5
  "exports": {
6
6
  ".": "./dist/cli/main.js",
@@ -68,7 +68,7 @@
68
68
  "md5": "^2.3.0",
69
69
  "perfect-cli": "^1.0.21",
70
70
  "playwright": "^1.57.0",
71
- "poppygl": "^0.0.20",
71
+ "poppygl": "^0.0.24",
72
72
  "prompts": "^2.4.2",
73
73
  "redaxios": "^0.5.1",
74
74
  "semver": "^7.6.3",