becky-cli 0.2.12
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 +102 -0
- package/dist/ai/openai.d.ts +17 -0
- package/dist/ai/openai.js +67 -0
- package/dist/commands/config.d.ts +3 -0
- package/dist/commands/config.js +30 -0
- package/dist/commands/connect.d.ts +11 -0
- package/dist/commands/connect.js +36 -0
- package/dist/commands/doctor.d.ts +10 -0
- package/dist/commands/doctor.js +166 -0
- package/dist/commands/migrate.d.ts +9 -0
- package/dist/commands/migrate.js +208 -0
- package/dist/commands/postgres-setup.d.ts +12 -0
- package/dist/commands/postgres-setup.js +132 -0
- package/dist/commands/up.d.ts +13 -0
- package/dist/commands/up.js +58 -0
- package/dist/config/store.d.ts +19 -0
- package/dist/config/store.js +65 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +197 -0
- package/dist/platform/detect.d.ts +10 -0
- package/dist/platform/detect.js +47 -0
- package/dist/platform/linux-ubuntu.d.ts +2 -0
- package/dist/platform/linux-ubuntu.js +48 -0
- package/dist/postgres/admin.d.ts +19 -0
- package/dist/postgres/admin.js +77 -0
- package/dist/project/alembicScaffold.d.ts +7 -0
- package/dist/project/alembicScaffold.js +161 -0
- package/dist/project/env.d.ts +25 -0
- package/dist/project/env.js +124 -0
- package/dist/project/fastapiPins.d.ts +3 -0
- package/dist/project/fastapiPins.js +13 -0
- package/dist/project/identity.d.ts +13 -0
- package/dist/project/identity.js +37 -0
- package/dist/project/load.d.ts +27 -0
- package/dist/project/load.js +67 -0
- package/dist/util/exec.d.ts +15 -0
- package/dist/util/exec.js +45 -0
- package/dist/util/log.d.ts +6 -0
- package/dist/util/log.js +27 -0
- package/dist/util/prompt.d.ts +2 -0
- package/dist/util/prompt.js +22 -0
- package/package.json +49 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { createInterface } from "node:readline/promises";
|
|
2
|
+
import { stdin as input, stdout as output } from "node:process";
|
|
3
|
+
export async function promptHidden(label) {
|
|
4
|
+
const rl = createInterface({ input, output });
|
|
5
|
+
try {
|
|
6
|
+
return (await rl.question(`${label}: `)).trim();
|
|
7
|
+
}
|
|
8
|
+
finally {
|
|
9
|
+
rl.close();
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export async function promptText(label, defaultValue) {
|
|
13
|
+
const rl = createInterface({ input, output });
|
|
14
|
+
try {
|
|
15
|
+
const suffix = defaultValue ? ` [${defaultValue}]` : "";
|
|
16
|
+
const answer = (await rl.question(`${label}${suffix}: `)).trim();
|
|
17
|
+
return answer || defaultValue || "";
|
|
18
|
+
}
|
|
19
|
+
finally {
|
|
20
|
+
rl.close();
|
|
21
|
+
}
|
|
22
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "becky-cli",
|
|
3
|
+
"version": "0.2.12",
|
|
4
|
+
"description": "CLI for local Postgres setup, connecting Becky backends, migrate, and doctor",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"becky": "./dist/index.js",
|
|
8
|
+
"becky-cli": "./dist/index.js"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"dist",
|
|
12
|
+
"README.md"
|
|
13
|
+
],
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "tsc",
|
|
16
|
+
"prepublishOnly": "npm run build",
|
|
17
|
+
"dev": "tsx src/index.ts",
|
|
18
|
+
"start": "node dist/index.js",
|
|
19
|
+
"postgres:setup": "tsx src/index.ts postgres setup",
|
|
20
|
+
"postgres:status": "tsx src/index.ts postgres status"
|
|
21
|
+
},
|
|
22
|
+
"keywords": [
|
|
23
|
+
"postgres",
|
|
24
|
+
"postgresql",
|
|
25
|
+
"backend",
|
|
26
|
+
"cli",
|
|
27
|
+
"becky",
|
|
28
|
+
"database",
|
|
29
|
+
"openai",
|
|
30
|
+
"becky-cli"
|
|
31
|
+
],
|
|
32
|
+
"license": "MIT",
|
|
33
|
+
"engines": {
|
|
34
|
+
"node": ">=18"
|
|
35
|
+
},
|
|
36
|
+
"repository": {
|
|
37
|
+
"type": "git",
|
|
38
|
+
"url": "git+https://github.com/your-org/becky.git",
|
|
39
|
+
"directory": "cli"
|
|
40
|
+
},
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"commander": "^13.1.0"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@types/node": "^22.15.0",
|
|
46
|
+
"tsx": "^4.19.4",
|
|
47
|
+
"typescript": "~5.8.3"
|
|
48
|
+
}
|
|
49
|
+
}
|