@sidgaikwad/db-setup 1.2.2 → 1.3.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/bin/cli.js CHANGED
@@ -1,5 +1,20 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- // This file serves as the executable entry point
4
- // It imports and runs the compiled TypeScript code
5
- require("../dist/index.js");
3
+ import fs from "fs";
4
+ import path from "path";
5
+ import os from "os";
6
+
7
+ const hintFile = path.join(os.homedir(), ".db-setup-hint");
8
+
9
+ if (!fs.existsSync(hintFile)) {
10
+ console.log(`
11
+ ✨ @sidgaikwad/db-setup installed successfully!
12
+
13
+ 👉 Run using:
14
+ • bun run db-setup
15
+ • npx db-setup
16
+ `);
17
+ fs.writeFileSync(hintFile, "shown");
18
+ }
19
+
20
+ import("../dist/index.js");
package/dist/index.js CHANGED
@@ -5548,7 +5548,8 @@ var setupSupabase = async () => {
5548
5548
  });
5549
5549
  const dbPassword = genAlphanumericPassword(24);
5550
5550
  const { projectId, region } = await createSupabaseProject(projectName, dbPassword);
5551
- const databaseUrl = `postgresql://postgres.${projectId}:${dbPassword}@aws-0-${region}.pooler.supabase.com:6543/postgres`;
5551
+ const SESSION_POOLER_PORT = 5432;
5552
+ const databaseUrl = `postgresql://postgres.${projectId}:${dbPassword}@aws-1-${region}.pooler.supabase.com:${SESSION_POOLER_PORT}/postgres`;
5552
5553
  console.log(source_default.greenBright(`
5553
5554
  Generated DB password: ${dbPassword}
5554
5555
  `));
@@ -1 +1 @@
1
- {"version":3,"file":"supabase.d.ts","sourceRoot":"","sources":["../../src/providers/supabase.ts"],"names":[],"mappings":"AA4KA;;GAEG;AACH,eAAO,MAAM,aAAa,QAAa,OAAO,CAAC,MAAM,CA8CpD,CAAC"}
1
+ {"version":3,"file":"supabase.d.ts","sourceRoot":"","sources":["../../src/providers/supabase.ts"],"names":[],"mappings":"AA4KA;;GAEG;AACH,eAAO,MAAM,aAAa,QAAa,OAAO,CAAC,MAAM,CAgDpD,CAAC"}
package/package.json CHANGED
@@ -1,8 +1,7 @@
1
1
  {
2
2
  "name": "@sidgaikwad/db-setup",
3
- "version": "1.2.2",
3
+ "version": "1.3.0",
4
4
  "description": "Interactive CLI for setting up PostgreSQL databases with multiple providers (Neon, Supabase, Railway, Local)",
5
- "type": "module",
6
5
  "main": "dist/index.js",
7
6
  "types": "dist/index.d.ts",
8
7
  "bin": {
@@ -14,8 +13,7 @@
14
13
  "build:types": "tsc --emitDeclarationOnly",
15
14
  "prepublishOnly": "bun run build",
16
15
  "dev": "bun run src/index.ts",
17
- "test": "bun test",
18
- "postinstall": "node postinstall.js"
16
+ "test": "bun test"
19
17
  },
20
18
  "keywords": [
21
19
  "database",
@@ -29,9 +27,7 @@
29
27
  "docker",
30
28
  "database-setup",
31
29
  "postgres-setup",
32
- "interactive-cli",
33
- "bun",
34
- "env"
30
+ "interactive-cli"
35
31
  ],
36
32
  "author": "Siddharth Gaikwad <gaikwadsiddharth039@gmail.com>",
37
33
  "license": "MIT",
@@ -46,7 +42,6 @@
46
42
  "files": [
47
43
  "dist",
48
44
  "bin",
49
- "postinstall.js",
50
45
  "README.md",
51
46
  "LICENSE"
52
47
  ],
package/postinstall.js DELETED
@@ -1,57 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- // postinstall.js - Show helpful message after installation
4
-
5
- import chalk from "chalk";
6
-
7
- console.log(
8
- "\n" +
9
- chalk.bold.cyan(
10
- "╔════════════════════════════════════════════════════════════╗"
11
- )
12
- );
13
- console.log(
14
- chalk.bold.cyan("║") +
15
- " " +
16
- chalk.bold.white("🗄️ Database Setup CLI installed successfully!") +
17
- " " +
18
- chalk.bold.cyan("║")
19
- );
20
- console.log(
21
- chalk.bold.cyan(
22
- "╚════════════════════════════════════════════════════════════╝"
23
- ) + "\n"
24
- );
25
-
26
- console.log(chalk.bold.green("✨ Quick Start:\n"));
27
-
28
- console.log(chalk.cyan(" Run the setup wizard:"));
29
- console.log(chalk.white(" $ ") + chalk.yellow("bunx @sidgaikwad/db-setup"));
30
- console.log(chalk.gray(" or"));
31
- console.log(chalk.white(" $ ") + chalk.yellow("npx @sidgaikwad/db-setup"));
32
- console.log(chalk.gray(" or"));
33
- console.log(chalk.white(" $ ") + chalk.yellow("bun run create-db-setup"));
34
- console.log(chalk.gray(" or"));
35
- console.log(chalk.white(" $ ") + chalk.yellow("npm run create-db-setup\n"));
36
-
37
- console.log(chalk.cyan(" Add to your package.json scripts:"));
38
- console.log(chalk.white(" {"));
39
- console.log(chalk.white(' "scripts": {'));
40
- console.log(
41
- chalk.white(" ") +
42
- chalk.yellow('"db:setup"') +
43
- chalk.white(": ") +
44
- chalk.green('"create-db-setup"')
45
- );
46
- console.log(chalk.white(" }"));
47
- console.log(chalk.white(" }\n"));
48
-
49
- console.log(chalk.cyan(" Then run:"));
50
- console.log(chalk.white(" $ ") + chalk.yellow("bun run db:setup\n"));
51
-
52
- console.log(chalk.bold.blue("📚 Documentation:"));
53
- console.log(chalk.white(" https://github.com/sidgaikwad/db-setup#readme\n"));
54
-
55
- console.log(
56
- chalk.gray("────────────────────────────────────────────────────────────\n")
57
- );