kinetic-sql 1.0.3 → 1.0.4
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 +4 -2
- package/scripts/postinstall.js +44 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kinetic-sql",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "Zero-config, type-safe Postgres & MySQL client with Realtime subscriptions.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
"build": "tsup",
|
|
10
10
|
"prepublishOnly": "npm run build",
|
|
11
11
|
"dev": "tsup --watch",
|
|
12
|
-
"gen": "node dist/cli/generate.cjs"
|
|
12
|
+
"gen": "node dist/cli/generate.cjs",
|
|
13
|
+
"postinstall": "node scripts/postinstall.js"
|
|
13
14
|
},
|
|
14
15
|
"exports": {
|
|
15
16
|
".": {
|
|
@@ -23,6 +24,7 @@
|
|
|
23
24
|
},
|
|
24
25
|
"files": [
|
|
25
26
|
"dist",
|
|
27
|
+
"scripts",
|
|
26
28
|
"README.md",
|
|
27
29
|
"LICENSE"
|
|
28
30
|
],
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// ANSI Color Codes for the "Bling"
|
|
4
|
+
const RESET = "\x1b[0m";
|
|
5
|
+
const BRIGHT = "\x1b[1m";
|
|
6
|
+
const DIM = "\x1b[2m";
|
|
7
|
+
const CYAN = "\x1b[36m";
|
|
8
|
+
const GREEN = "\x1b[32m";
|
|
9
|
+
const YELLOW = "\x1b[33m";
|
|
10
|
+
const MAGENTA = "\x1b[35m";
|
|
11
|
+
const WHITE = "\x1b[37m";
|
|
12
|
+
|
|
13
|
+
const banner = `
|
|
14
|
+
${ CYAN }${ BRIGHT }
|
|
15
|
+
_ __ _ _ _ ${ MAGENTA } ____ ___ _
|
|
16
|
+
${ CYAN } | |/ /(_) | | (_) ${ MAGENTA }/ ___| / _ \\| |
|
|
17
|
+
${ CYAN } | ' / _ _ __ ___| |_ _ ___ ${ MAGENTA }\\___ \\| | | | |
|
|
18
|
+
${ CYAN } | < | | '_ \\ / _ \\ __| |/ __| ${ MAGENTA }___) | |_| | |___
|
|
19
|
+
${ CYAN } | . \\ | | | | | __/ |_| | (__ ${ MAGENTA }|____/ \\__\\_\\_____|
|
|
20
|
+
${ CYAN } |_|\\_\\|_|_| |_|\\___|\\__|_|\\___| ${ RESET }
|
|
21
|
+
`;
|
|
22
|
+
|
|
23
|
+
console.log(banner);
|
|
24
|
+
console.log(`${ GREEN }${ BRIGHT } Package successfully Installed ✨${ RESET }\n`);
|
|
25
|
+
|
|
26
|
+
console.log(`${ WHITE }Please auto generate the schema using the following commands:${ RESET }\n`);
|
|
27
|
+
|
|
28
|
+
console.log(`${ YELLOW }# PostgreSQL (Default)${ RESET }`);
|
|
29
|
+
console.log(` ${ DIM }npx k-sql gen --connection "{CONNECTION_URL}"${ RESET }`);
|
|
30
|
+
console.log(` ${ DIM }OR${ RESET }`);
|
|
31
|
+
console.log(` ${ DIM }npx k-sql gen --type pg --host localhost --user postgres --db mydb${ RESET }\n`);
|
|
32
|
+
|
|
33
|
+
console.log(`${ YELLOW }# MySQL${ RESET }`);
|
|
34
|
+
console.log(` ${ DIM }npx k-sql gen --type mysql --host localhost --user root --db mydb${ RESET }\n`);
|
|
35
|
+
|
|
36
|
+
console.log(`${ YELLOW }# SQLite${ RESET }`);
|
|
37
|
+
console.log(` ${ DIM }npx k-sql gen --type sqlite --db ./dev.db${ RESET }\n`);
|
|
38
|
+
|
|
39
|
+
console.log(`${ DIM }-----------------------------------------------------------${ RESET }`);
|
|
40
|
+
console.log(`${ CYAN }Thanks for installing Kinetic-SQL 🙏${ RESET }`);
|
|
41
|
+
console.log(`${ WHITE }Please consider donating to our open collective to help me`);
|
|
42
|
+
console.log(`maintain this package and others that I am working on constantly.${ RESET }`);
|
|
43
|
+
console.log(`${ MAGENTA }🍻 Donate: https://opencollective.com/kinetic-ai ${ RESET }`);
|
|
44
|
+
console.log(`${ DIM }-----------------------------------------------------------${ RESET }\n`);
|