squawk-cli 1.1.2 → 1.2.0
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/README.md +1 -1
- package/js/install.js +11 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@ Also it seemed like a nice project to spend more time with Rust.
|
|
|
15
15
|
|
|
16
16
|
Note: due to `squawk`'s dependency on
|
|
17
17
|
[`libpg_query`](https://github.com/lfittl/libpg_query/issues/44), `squawk`
|
|
18
|
-
|
|
18
|
+
supports Linux, macOS and Windows
|
|
19
19
|
|
|
20
20
|
```shell
|
|
21
21
|
npm install -g squawk-cli
|
package/js/install.js
CHANGED
|
@@ -46,7 +46,13 @@ const { binaryPath } = require("./helpers")
|
|
|
46
46
|
// e.g.: https://github.com/sbdchd/squawk/releases/download/v0.1.3/squawk-darwin-x86_64
|
|
47
47
|
const RELEASES_BASE_URL = "https://github.com/sbdchd/squawk/releases/download"
|
|
48
48
|
|
|
49
|
-
const SUPPORTED_PLATFORMS = new Set([
|
|
49
|
+
const SUPPORTED_PLATFORMS = new Set([
|
|
50
|
+
"darwin-x64",
|
|
51
|
+
"darwin-arm64",
|
|
52
|
+
"linux-x64",
|
|
53
|
+
"win32-x64",
|
|
54
|
+
])
|
|
55
|
+
const BINARY_NAME_OVERRIDE = new Map([["win32-x64", "squawk-windows-x64.exe"]])
|
|
50
56
|
|
|
51
57
|
/**
|
|
52
58
|
* @param {string} platform
|
|
@@ -56,7 +62,10 @@ function getDownloadUrl(platform, arch) {
|
|
|
56
62
|
if (!SUPPORTED_PLATFORMS.has(`${platform}-${arch}`)) {
|
|
57
63
|
return null
|
|
58
64
|
}
|
|
59
|
-
|
|
65
|
+
const name =
|
|
66
|
+
BINARY_NAME_OVERRIDE.get(`${platform}-${arch}`) ||
|
|
67
|
+
`squawk-${platform}-${arch}`
|
|
68
|
+
return `${RELEASES_BASE_URL}/v${pkgInfo.version}/${name}`
|
|
60
69
|
}
|
|
61
70
|
|
|
62
71
|
function getNpmCache() {
|