@isograph/compiler 0.0.0-main-1cd3db6d → 0.0.0-main-2c275831
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.
Binary file
|
Binary file
|
Binary file
|
Binary file
|
package/cli.js
CHANGED
@@ -1,15 +1,13 @@
|
|
1
1
|
#!/usr/bin/env node
|
2
|
-
|
2
|
+
'use strict';
|
3
3
|
|
4
|
-
var bin = require(
|
5
|
-
var spawn = require(
|
4
|
+
var bin = require('.');
|
5
|
+
var spawn = require('child_process').spawn;
|
6
6
|
|
7
7
|
var input = process.argv.slice(2);
|
8
8
|
|
9
9
|
if (bin !== null) {
|
10
|
-
spawn(bin, input, { stdio:
|
10
|
+
spawn(bin, input, { stdio: 'inherit' }).on('exit', process.exit);
|
11
11
|
} else {
|
12
|
-
throw new Error(
|
13
|
-
`Platform "${process.platform} (${process.arch})" not supported.`,
|
14
|
-
);
|
12
|
+
throw new Error(`Platform "${process.platform} (${process.arch})" not supported.`);
|
15
13
|
}
|
package/index.js
CHANGED
@@ -1,21 +1,21 @@
|
|
1
|
-
|
1
|
+
'use strict';
|
2
2
|
|
3
|
-
const path = require(
|
3
|
+
const path = require('path');
|
4
4
|
|
5
5
|
let binary;
|
6
|
-
if (process.platform ===
|
7
|
-
binary = path.join(__dirname,
|
8
|
-
} else if (process.platform ===
|
9
|
-
binary = path.join(__dirname,
|
10
|
-
} else if (process.platform ===
|
11
|
-
binary = path.join(__dirname,
|
12
|
-
} else if (process.platform ===
|
13
|
-
binary = path.join(__dirname,
|
14
|
-
} else if (process.platform ===
|
15
|
-
throw new Error(
|
6
|
+
if (process.platform === 'darwin' && process.arch === 'x64') {
|
7
|
+
binary = path.join(__dirname, 'artifacts', 'macos-x64', 'isograph_cli');
|
8
|
+
} else if (process.platform === 'darwin' && process.arch === 'arm64') {
|
9
|
+
binary = path.join(__dirname, 'artifacts', 'macos-arm64', 'isograph_cli');
|
10
|
+
} else if (process.platform === 'linux' && process.arch === 'x64') {
|
11
|
+
binary = path.join(__dirname, 'artifacts', 'linux-x64', 'isograph_cli');
|
12
|
+
} else if (process.platform === 'linux' && process.arch === 'arm64') {
|
13
|
+
binary = path.join(__dirname, 'artifacts', 'linux-arm64', 'isograph_cli');
|
14
|
+
} else if (process.platform === 'win32' && process.arch === 'x64') {
|
15
|
+
throw new Error('Platform not supported yet');
|
16
16
|
// binary = path.join(__dirname, "artifacts", "win-x64", "isograph_cli.exe");
|
17
17
|
} else {
|
18
|
-
throw new Error(
|
18
|
+
throw new Error('Platform not supported yet');
|
19
19
|
// binary = null;
|
20
20
|
}
|
21
21
|
|