supabase 1.4.2 → 1.4.3
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 +15 -1
- package/package.json +1 -1
- package/scripts/preinstall.js +10 -8
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
[Supabase](https://supabase.io) is an open source Firebase alternative. We're building the features of Firebase using enterprise-grade open source tools.
|
|
6
6
|
|
|
7
|
-
This repository contains all the functionality for
|
|
7
|
+
This repository contains all the functionality for Supabase CLI.
|
|
8
8
|
|
|
9
9
|
- [x] Running Supabase locally
|
|
10
10
|
- [x] Managing database migrations
|
|
@@ -19,6 +19,20 @@ This repository contains all the functionality for our CLI.
|
|
|
19
19
|
|
|
20
20
|
### Install the CLI
|
|
21
21
|
|
|
22
|
+
#### NodeJS
|
|
23
|
+
|
|
24
|
+
Available via [NPM](https://www.npmjs.com). To install:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
npm i supabase
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
To run:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npx supabase -h
|
|
34
|
+
```
|
|
35
|
+
|
|
22
36
|
#### macOS
|
|
23
37
|
|
|
24
38
|
Available via [Homebrew](https://brew.sh). To install:
|
package/package.json
CHANGED
package/scripts/preinstall.js
CHANGED
|
@@ -73,11 +73,6 @@ async function parsePackageJson() {
|
|
|
73
73
|
url = url.replace(/{{version}}/g, version);
|
|
74
74
|
url = url.replace(/{{bin_name}}/g, binName);
|
|
75
75
|
|
|
76
|
-
// Binary name on Windows has .exe suffix
|
|
77
|
-
if (process.platform === "win32") {
|
|
78
|
-
binName += ".exe";
|
|
79
|
-
}
|
|
80
|
-
|
|
81
76
|
return { binName, binPath, url, version };
|
|
82
77
|
}
|
|
83
78
|
|
|
@@ -93,10 +88,11 @@ async function main() {
|
|
|
93
88
|
const opts = await parsePackageJson();
|
|
94
89
|
await fs.promises.mkdir(opts.binPath, { recursive: true });
|
|
95
90
|
|
|
96
|
-
// First we will Un-GZip, then we will untar.
|
|
97
|
-
// binary is downloaded into `downloadPath`. Verify the binary and call it good
|
|
91
|
+
// First we will Un-GZip, then we will untar.
|
|
98
92
|
const ungz = zlib.createGunzip();
|
|
99
|
-
|
|
93
|
+
// Binary name on Windows has .exe suffix
|
|
94
|
+
const ext = process.platform === "win32" ? ".exe" : "";
|
|
95
|
+
const untar = tar.x({ cwd: opts.binPath }, [opts.binName + ext]);
|
|
100
96
|
|
|
101
97
|
console.info("Downloading", opts.url);
|
|
102
98
|
const resp = await fetch(opts.url);
|
|
@@ -106,6 +102,12 @@ async function main() {
|
|
|
106
102
|
untar.on("end", () => resolve());
|
|
107
103
|
});
|
|
108
104
|
|
|
105
|
+
// Creates a hardlink for npm to find the binary on Windows
|
|
106
|
+
if (ext) {
|
|
107
|
+
const bin = path.join(opts.binPath, opts.binName);
|
|
108
|
+
await fs.promises.link(bin + ext, bin);
|
|
109
|
+
}
|
|
110
|
+
|
|
109
111
|
// TODO: verify checksums
|
|
110
112
|
console.info("Installed Supabase CLI successfully");
|
|
111
113
|
}
|