@tscircuit/cli 0.0.70 → 0.0.72

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.
@@ -7,6 +7,8 @@ import * as fs from "fs"
7
7
  import {
8
8
  stringifyGerberCommandLayers,
9
9
  convertSoupToGerberCommands,
10
+ convertSoupToExcellonDrillCommands,
11
+ stringifyExcellonDrill,
10
12
  } from "@tscircuit/builder"
11
13
  import kleur from "kleur"
12
14
  import archiver from "archiver"
@@ -31,15 +33,29 @@ export const exportGerbersToFile = async (
31
33
  console.log(kleur.gray("[soup to gerber json]..."))
32
34
  const gerber_layer_cmds = convertSoupToGerberCommands(soup)
33
35
 
36
+ console.log(kleur.gray("[soup to drl json]..."))
37
+ const drill_cmds = convertSoupToExcellonDrillCommands({
38
+ soup,
39
+ is_plated: true,
40
+ })
41
+
34
42
  console.log(kleur.gray("[stringify gerber json]..."))
35
43
  const gerber_file_contents = stringifyGerberCommandLayers(gerber_layer_cmds)
44
+ console.log(kleur.gray("[stringify drl json]..."))
45
+ const drill_file_contents = {
46
+ plated: stringifyExcellonDrill(drill_cmds),
47
+ }
36
48
 
37
49
  console.log(kleur.gray("[writing gerbers to tmp dir]..."))
38
50
  const tempDir = Path.join(".tscircuit", "tmp-gerber-export")
39
51
  fs.mkdirSync(tempDir, { recursive: true })
40
52
  for (const [fileName, fileContents] of Object.entries(gerber_file_contents)) {
41
53
  const filePath = Path.join(tempDir, fileName)
42
- await fs.writeFileSync(filePath, fileContents)
54
+ await fs.writeFileSync(`${filePath}.gbr`, fileContents)
55
+ }
56
+ for (const [fileName, fileContents] of Object.entries(drill_file_contents)) {
57
+ const filePath = Path.join(tempDir, fileName)
58
+ await fs.writeFileSync(`${filePath}.drl`, fileContents)
43
59
  }
44
60
 
45
61
  console.log(kleur.gray("[zipping tmp dir]..."))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/cli",
3
- "version": "0.0.70",
3
+ "version": "0.0.72",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Command line tool for developing, publishing and installing tscircuit circuits",
@@ -35,8 +35,8 @@
35
35
  "dependencies": {
36
36
  "@edge-runtime/primitives": "^4.1.0",
37
37
  "@hono/node-server": "^1.8.2",
38
- "@tscircuit/builder": "^1.5.60",
39
- "@tscircuit/react-fiber": "^1.0.34",
38
+ "@tscircuit/builder": "^1.5.66",
39
+ "@tscircuit/react-fiber": "^1.0.35",
40
40
  "archiver": "^7.0.1",
41
41
  "axios": "^1.6.7",
42
42
  "better-sqlite3": "^9.4.3",