@sponsoredai/cli 0.1.10 → 0.1.11
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/package.json +8 -4
- package/scripts/preinstall.js +18 -0
package/package.json
CHANGED
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sponsoredai/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
4
4
|
"description": "SAI CLI launcher.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://sponsoredai.dev",
|
|
7
7
|
"bin": {
|
|
8
8
|
"sai": "bin/sai.js"
|
|
9
9
|
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"preinstall": "node scripts/preinstall.js"
|
|
12
|
+
},
|
|
10
13
|
"files": [
|
|
11
14
|
"bin/",
|
|
15
|
+
"scripts/preinstall.js",
|
|
12
16
|
"README.md"
|
|
13
17
|
],
|
|
14
18
|
"optionalDependencies": {
|
|
15
|
-
"@sponsoredai/cli-darwin-arm64": "0.1.
|
|
16
|
-
"@sponsoredai/cli-linux-x64": "0.1.
|
|
17
|
-
"@sponsoredai/cli-win32-x64": "0.1.
|
|
19
|
+
"@sponsoredai/cli-darwin-arm64": "0.1.11",
|
|
20
|
+
"@sponsoredai/cli-linux-x64": "0.1.11",
|
|
21
|
+
"@sponsoredai/cli-win32-x64": "0.1.11"
|
|
18
22
|
},
|
|
19
23
|
"os": [
|
|
20
24
|
"darwin",
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
const SUPPORTED_TARGETS = new Set([
|
|
5
|
+
"darwin-arm64",
|
|
6
|
+
"linux-x64",
|
|
7
|
+
"win32-x64"
|
|
8
|
+
]);
|
|
9
|
+
|
|
10
|
+
const target = `${process.platform}-${process.arch}`;
|
|
11
|
+
|
|
12
|
+
if (!SUPPORTED_TARGETS.has(target)) {
|
|
13
|
+
console.error(
|
|
14
|
+
`@sponsoredai/cli does not ship a binary for ${process.platform}/${process.arch}. ` +
|
|
15
|
+
"Supported targets: macOS arm64, Linux x64, Windows x64."
|
|
16
|
+
);
|
|
17
|
+
process.exit(1);
|
|
18
|
+
}
|