@frumu/tandem 0.3.4 → 0.3.5
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/tandem-engine.js +17 -0
- package/package.json +5 -5
- package/scripts/install.js +2 -2
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const path = require("path");
|
|
4
|
+
const { spawnSync } = require("child_process");
|
|
5
|
+
|
|
6
|
+
const binaryName = process.platform === "win32" ? "tandem-engine.exe" : "tandem-engine";
|
|
7
|
+
const binaryPath = path.join(__dirname, "native", binaryName);
|
|
8
|
+
|
|
9
|
+
const child = spawnSync(binaryPath, process.argv.slice(2), { stdio: "inherit" });
|
|
10
|
+
|
|
11
|
+
if (child.error) {
|
|
12
|
+
console.error("tandem-engine binary is missing. Reinstall with: npm i -g @frumu/tandem");
|
|
13
|
+
console.error(child.error.message);
|
|
14
|
+
process.exit(1);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
process.exit(child.status ?? 1);
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frumu/tandem",
|
|
3
|
-
"version": "0.3.
|
|
4
|
-
"description": "Tandem Engine binary distribution",
|
|
5
|
-
"homepage": "https://tandem.frumu.ai",
|
|
3
|
+
"version": "0.3.5",
|
|
4
|
+
"description": "Tandem Engine binary distribution",
|
|
5
|
+
"homepage": "https://tandem.frumu.ai",
|
|
6
6
|
"bin": {
|
|
7
|
-
"tandem-engine": "bin/tandem-engine"
|
|
7
|
+
"tandem-engine": "bin/tandem-engine.js"
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
|
-
"postinstall": "node
|
|
10
|
+
"postinstall": "node scripts/install.js"
|
|
11
11
|
},
|
|
12
12
|
"files": [
|
|
13
13
|
"bin",
|
package/scripts/install.js
CHANGED
|
@@ -45,8 +45,8 @@ function getArtifactInfo() {
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
const { artifactName, binaryName, isWindows } = getArtifactInfo();
|
|
48
|
-
const binDir = path.join(__dirname, '..', 'bin');
|
|
49
|
-
const destPath = path.join(binDir, binaryName);
|
|
48
|
+
const binDir = path.join(__dirname, '..', 'bin', 'native');
|
|
49
|
+
const destPath = path.join(binDir, binaryName);
|
|
50
50
|
|
|
51
51
|
if (!fs.existsSync(binDir)) {
|
|
52
52
|
fs.mkdirSync(binDir, { recursive: true });
|