@toothfairyai/tfcode 1.0.35 → 1.0.37
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 +0 -0
- package/package.json +13 -13
- package/postinstall.mjs +19 -0
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.
|
|
3
|
+
"version": "1.0.37",
|
|
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.
|
|
13
|
-
"@toothfairyai/tfcode-windows-x64": "1.0.
|
|
14
|
-
"@toothfairyai/tfcode-linux-x64-baseline-musl": "1.0.
|
|
15
|
-
"@toothfairyai/tfcode-darwin-x64-baseline": "1.0.
|
|
16
|
-
"@toothfairyai/tfcode-linux-x64-musl": "1.0.
|
|
17
|
-
"@toothfairyai/tfcode-windows-x64-baseline": "1.0.
|
|
18
|
-
"@toothfairyai/tfcode-linux-arm64-musl": "1.0.
|
|
19
|
-
"@toothfairyai/tfcode-windows-arm64": "1.0.
|
|
20
|
-
"@toothfairyai/tfcode-linux-x64": "1.0.
|
|
21
|
-
"@toothfairyai/tfcode-darwin-x64": "1.0.
|
|
22
|
-
"@toothfairyai/tfcode-linux-x64-baseline": "1.0.
|
|
23
|
-
"@toothfairyai/tfcode-darwin-arm64": "1.0.
|
|
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"
|
|
24
24
|
},
|
|
25
25
|
"engines": {
|
|
26
26
|
"node": ">=18"
|
package/postinstall.mjs
CHANGED
|
@@ -181,6 +181,15 @@ async function downloadBinary() {
|
|
|
181
181
|
console.log(`Installed tfcode to ${targetBinary}`)
|
|
182
182
|
}
|
|
183
183
|
|
|
184
|
+
// Move app directory
|
|
185
|
+
const extractedAppDir = path.join(tmpDir, "app")
|
|
186
|
+
const targetAppDir = path.join(binDir, "app")
|
|
187
|
+
if (fs.existsSync(path.join(extractedAppDir, "dist", "index.html"))) {
|
|
188
|
+
if (fs.existsSync(targetAppDir)) fs.rmSync(targetAppDir, { recursive: true, force: true })
|
|
189
|
+
fs.cpSync(extractedAppDir, targetAppDir, { recursive: true })
|
|
190
|
+
console.log("Installed web app")
|
|
191
|
+
}
|
|
192
|
+
|
|
184
193
|
// Cleanup
|
|
185
194
|
fs.rmSync(tmpDir, { recursive: true, force: true })
|
|
186
195
|
}
|
|
@@ -202,6 +211,16 @@ function setupBinary(sourcePath, platform) {
|
|
|
202
211
|
|
|
203
212
|
fs.chmodSync(targetBinary, 0o755)
|
|
204
213
|
console.log(`tfcode installed to ${targetBinary}`)
|
|
214
|
+
|
|
215
|
+
// Also copy app dir from platform package
|
|
216
|
+
const sourceDir = path.dirname(sourcePath)
|
|
217
|
+
const srcAppDir = path.join(sourceDir, "app")
|
|
218
|
+
const targetAppDir = path.join(binDir, "app")
|
|
219
|
+
if (fs.existsSync(path.join(srcAppDir, "dist", "index.html"))) {
|
|
220
|
+
if (fs.existsSync(targetAppDir)) fs.rmSync(targetAppDir, { recursive: true, force: true })
|
|
221
|
+
fs.cpSync(srcAppDir, targetAppDir, { recursive: true })
|
|
222
|
+
console.log("Web app copied from platform package")
|
|
223
|
+
}
|
|
205
224
|
}
|
|
206
225
|
|
|
207
226
|
async function main() {
|