supabase 1.18.1 → 1.19.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "supabase",
3
- "version": "1.18.1",
3
+ "version": "1.19.0",
4
4
  "description": "Supabase CLI",
5
5
  "repository": "supabase/cli",
6
6
  "homepage": "https://supabase.com/docs/reference/cli",
@@ -24,6 +24,10 @@ const PLATFORM_MAPPING = {
24
24
  };
25
25
 
26
26
  function validateConfiguration(packageJson) {
27
+ if (!packageJson.name) {
28
+ return "'name' property must be specified";
29
+ }
30
+
27
31
  if (!packageJson.version) {
28
32
  return "'version' property must be specified";
29
33
  }
@@ -59,6 +63,7 @@ async function parsePackageJson() {
59
63
  }
60
64
 
61
65
  // We have validated the config. It exists in all its glory
66
+ const pkgName = packageJson.name.toString();
62
67
  const bin = packageJson.bin.toString();
63
68
  const binName = path.basename(bin);
64
69
  const binPath = path.dirname(bin);
@@ -74,7 +79,7 @@ async function parsePackageJson() {
74
79
  url = url.replace(/{{version}}/g, version);
75
80
  url = url.replace(/{{bin_name}}/g, binName);
76
81
 
77
- return { binName, binPath, url, version };
82
+ return { pkgName, binName, binPath, url, version };
78
83
  }
79
84
 
80
85
  const errGlobal = `Installing Supabase CLI as a global module is not supported.
@@ -118,9 +123,9 @@ async function main() {
118
123
 
119
124
  // Copy binary because yarn runs as postinstall
120
125
  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);
126
+ const src = path.join("..", opts.pkgName, opts.binPath, opts.binName);
127
+ const dst = path.join("..", ".bin", opts.binName);
128
+ await fs.promises.symlink(src, dst);
124
129
  }
125
130
 
126
131
  // TODO: verify checksums