squawk-cli 1.1.2 → 1.4.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 +3 -4
- package/js/install.js +12 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -13,13 +13,12 @@ Also it seemed like a nice project to spend more time with Rust.
|
|
|
13
13
|
|
|
14
14
|
## Install
|
|
15
15
|
|
|
16
|
-
Note: due to `squawk`'s dependency on
|
|
17
|
-
[`libpg_query`](https://github.com/lfittl/libpg_query/issues/44), `squawk`
|
|
18
|
-
only supports Linux and macOS
|
|
19
|
-
|
|
20
16
|
```shell
|
|
21
17
|
npm install -g squawk-cli
|
|
22
18
|
|
|
19
|
+
# or via PYPI
|
|
20
|
+
pip install squawk-cli
|
|
21
|
+
|
|
23
22
|
# or install binaries directly via the releases page
|
|
24
23
|
https://github.com/sbdchd/squawk/releases
|
|
25
24
|
```
|
package/js/install.js
CHANGED
|
@@ -46,7 +46,14 @@ 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
|
+
"linux-arm64",
|
|
54
|
+
"win32-x64",
|
|
55
|
+
])
|
|
56
|
+
const BINARY_NAME_OVERRIDE = new Map([["win32-x64", "squawk-windows-x64.exe"]])
|
|
50
57
|
|
|
51
58
|
/**
|
|
52
59
|
* @param {string} platform
|
|
@@ -56,7 +63,10 @@ function getDownloadUrl(platform, arch) {
|
|
|
56
63
|
if (!SUPPORTED_PLATFORMS.has(`${platform}-${arch}`)) {
|
|
57
64
|
return null
|
|
58
65
|
}
|
|
59
|
-
|
|
66
|
+
const name =
|
|
67
|
+
BINARY_NAME_OVERRIDE.get(`${platform}-${arch}`) ||
|
|
68
|
+
`squawk-${platform}-${arch}`
|
|
69
|
+
return `${RELEASES_BASE_URL}/v${pkgInfo.version}/${name}`
|
|
60
70
|
}
|
|
61
71
|
|
|
62
72
|
function getNpmCache() {
|