@presolve/cli 0.2.0-beta.3 → 0.2.0-beta.6
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/diagnostic.mjs +6 -0
- package/bin/presolve.mjs +3 -4
- package/package.json +8 -5
package/bin/presolve.mjs
CHANGED
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import { existsSync } from "node:fs";
|
|
4
4
|
import { spawnSync } from "node:child_process";
|
|
5
|
+
import { unsupportedPlatformDiagnostic } from "./diagnostic.mjs";
|
|
5
6
|
|
|
6
7
|
const require = createRequire(import.meta.url);
|
|
8
|
+
const { version } = require("../package.json");
|
|
7
9
|
const platformPackage = new Map([
|
|
8
10
|
["darwin-arm64", "@presolve/cli-darwin-arm64"],
|
|
9
11
|
["darwin-x64", "@presolve/cli-darwin-x64"],
|
|
@@ -13,10 +15,7 @@ const platformPackage = new Map([
|
|
|
13
15
|
|
|
14
16
|
const binary = process.env.PRESOLVE_BINARY || resolvePlatformBinary(platformPackage);
|
|
15
17
|
if (!binary) {
|
|
16
|
-
console.error(
|
|
17
|
-
`Presolve 0.1 alpha does not include a CLI binary for ${process.platform}-${process.arch}. ` +
|
|
18
|
-
"See https://github.com/fierstdev/presolve#supported-platforms."
|
|
19
|
-
);
|
|
18
|
+
console.error(unsupportedPlatformDiagnostic(version, process.platform, process.arch));
|
|
20
19
|
process.exit(1);
|
|
21
20
|
}
|
|
22
21
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@presolve/cli",
|
|
3
|
-
"version": "0.2.0-beta.
|
|
3
|
+
"version": "0.2.0-beta.6",
|
|
4
4
|
"description": "The Presolve compiler command-line interface.",
|
|
5
5
|
"license": "MIT OR Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
"README.md"
|
|
13
13
|
],
|
|
14
14
|
"optionalDependencies": {
|
|
15
|
-
"@presolve/cli-darwin-arm64": "0.2.0-beta.
|
|
16
|
-
"@presolve/cli-
|
|
17
|
-
"@presolve/cli-win32-x64": "0.2.0-beta.
|
|
18
|
-
"@presolve/cli-
|
|
15
|
+
"@presolve/cli-darwin-arm64": "0.2.0-beta.6",
|
|
16
|
+
"@presolve/cli-linux-x64": "0.2.0-beta.6",
|
|
17
|
+
"@presolve/cli-win32-x64": "0.2.0-beta.6",
|
|
18
|
+
"@presolve/cli-darwin-x64": "0.2.0-beta.6"
|
|
19
19
|
},
|
|
20
20
|
"repository": {
|
|
21
21
|
"type": "git",
|
|
@@ -25,5 +25,8 @@
|
|
|
25
25
|
"publishConfig": {
|
|
26
26
|
"access": "public",
|
|
27
27
|
"tag": "beta"
|
|
28
|
+
},
|
|
29
|
+
"scripts": {
|
|
30
|
+
"test": "node --test"
|
|
28
31
|
}
|
|
29
32
|
}
|