supabase 1.17.7 → 1.18.1
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 +1 -1
- package/scripts/preinstall.js +12 -4
package/package.json
CHANGED
package/scripts/preinstall.js
CHANGED
|
@@ -59,10 +59,11 @@ async function parsePackageJson() {
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
// We have validated the config. It exists in all its glory
|
|
62
|
-
|
|
63
|
-
const
|
|
64
|
-
|
|
65
|
-
let
|
|
62
|
+
const bin = packageJson.bin.toString();
|
|
63
|
+
const binName = path.basename(bin);
|
|
64
|
+
const binPath = path.dirname(bin);
|
|
65
|
+
let url = packageJson.url.toString();
|
|
66
|
+
let version = packageJson.version.toString();
|
|
66
67
|
|
|
67
68
|
// strip the 'v' if necessary v0.0.1 => 0.0.1
|
|
68
69
|
if (version[0] === "v") version = version.substr(1);
|
|
@@ -115,6 +116,13 @@ async function main() {
|
|
|
115
116
|
await fs.promises.link(bin + ext, bin);
|
|
116
117
|
}
|
|
117
118
|
|
|
119
|
+
// Copy binary because yarn runs as postinstall
|
|
120
|
+
if (process.env.npm_config_user_agent.startsWith("yarn/")) {
|
|
121
|
+
const bin = path.join(opts.binPath, opts.binName);
|
|
122
|
+
const link = path.join("..", ".bin", opts.binName);
|
|
123
|
+
await fs.promises.symlink(bin, link);
|
|
124
|
+
}
|
|
125
|
+
|
|
118
126
|
// TODO: verify checksums
|
|
119
127
|
console.info("Installed Supabase CLI successfully");
|
|
120
128
|
}
|