@toothfairyai/tfcode 1.0.37 → 1.0.38

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/bin/tfcode CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toothfairyai/tfcode",
3
- "version": "1.0.37",
3
+ "version": "1.0.38",
4
4
  "bin": {
5
5
  "tfcode": "./bin/tfcode.js"
6
6
  },
@@ -9,18 +9,18 @@
9
9
  },
10
10
  "license": "MIT",
11
11
  "optionalDependencies": {
12
- "@toothfairyai/tfcode-linux-arm64": "1.0.37",
13
- "@toothfairyai/tfcode-windows-x64": "1.0.37",
14
- "@toothfairyai/tfcode-linux-x64-baseline-musl": "1.0.37",
15
- "@toothfairyai/tfcode-darwin-x64-baseline": "1.0.37",
16
- "@toothfairyai/tfcode-linux-x64-musl": "1.0.37",
17
- "@toothfairyai/tfcode-windows-x64-baseline": "1.0.37",
18
- "@toothfairyai/tfcode-linux-arm64-musl": "1.0.37",
19
- "@toothfairyai/tfcode-windows-arm64": "1.0.37",
20
- "@toothfairyai/tfcode-linux-x64": "1.0.37",
21
- "@toothfairyai/tfcode-darwin-x64": "1.0.37",
22
- "@toothfairyai/tfcode-linux-x64-baseline": "1.0.37",
23
- "@toothfairyai/tfcode-darwin-arm64": "1.0.37"
12
+ "@toothfairyai/tfcode-linux-arm64": "1.0.38",
13
+ "@toothfairyai/tfcode-windows-x64": "1.0.38",
14
+ "@toothfairyai/tfcode-linux-x64-baseline-musl": "1.0.38",
15
+ "@toothfairyai/tfcode-darwin-x64-baseline": "1.0.38",
16
+ "@toothfairyai/tfcode-linux-x64-musl": "1.0.38",
17
+ "@toothfairyai/tfcode-windows-x64-baseline": "1.0.38",
18
+ "@toothfairyai/tfcode-linux-arm64-musl": "1.0.38",
19
+ "@toothfairyai/tfcode-windows-arm64": "1.0.38",
20
+ "@toothfairyai/tfcode-linux-x64": "1.0.38",
21
+ "@toothfairyai/tfcode-darwin-x64": "1.0.38",
22
+ "@toothfairyai/tfcode-linux-x64-baseline": "1.0.38",
23
+ "@toothfairyai/tfcode-darwin-arm64": "1.0.38"
24
24
  },
25
25
  "engines": {
26
26
  "node": ">=18"
package/postinstall.mjs CHANGED
@@ -93,6 +93,25 @@ async function downloadBinary() {
93
93
 
94
94
  if (fs.existsSync(existingBinary)) {
95
95
  console.log(`✓ Binary already exists at ${existingBinary}`)
96
+ // Still need to copy app dir from platform package if missing
97
+ const targetAppDir = path.join(binDir, "app")
98
+ if (!fs.existsSync(path.join(targetAppDir, "dist", "index.html"))) {
99
+ let target = `tfcode-${platform}-${arch}`
100
+ if (needsBaseline) target += "-baseline"
101
+ if (abi) target += `-${abi}`
102
+ const pkgName = `@toothfairyai/${target}`
103
+ try {
104
+ const pkgUrl = import.meta.resolve(`${pkgName}/package.json`)
105
+ const pkgDir = path.dirname(fileURLToPath(pkgUrl))
106
+ const srcAppDir = path.join(pkgDir, "bin", "app")
107
+ if (fs.existsSync(path.join(srcAppDir, "dist", "index.html"))) {
108
+ fs.cpSync(srcAppDir, targetAppDir, { recursive: true })
109
+ console.log("✓ Web app copied from platform package")
110
+ }
111
+ } catch (e) {
112
+ console.log(`! Could not copy web app: ${e.message}`)
113
+ }
114
+ }
96
115
  return
97
116
  }
98
117