@geekmidas/cli 0.50.0 → 0.51.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/dist/index.cjs +6 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +6 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
- package/src/deploy/index.ts +5 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geekmidas/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.51.0",
|
|
4
4
|
"description": "CLI tools for building Lambda handlers, server applications, and generating OpenAPI specs",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
@@ -49,11 +49,11 @@
|
|
|
49
49
|
"openapi-typescript": "^7.4.2",
|
|
50
50
|
"pg": "~8.17.1",
|
|
51
51
|
"prompts": "~2.4.2",
|
|
52
|
-
"@geekmidas/
|
|
53
|
-
"@geekmidas/errors": "~0.1.0",
|
|
54
|
-
"@geekmidas/schema": "~0.1.0",
|
|
52
|
+
"@geekmidas/envkit": "~0.7.0",
|
|
55
53
|
"@geekmidas/constructs": "~0.8.0",
|
|
56
|
-
"@geekmidas/
|
|
54
|
+
"@geekmidas/errors": "~0.1.0",
|
|
55
|
+
"@geekmidas/logger": "~0.4.0",
|
|
56
|
+
"@geekmidas/schema": "~0.1.0"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@types/lodash.kebabcase": "^4.1.9",
|
package/src/deploy/index.ts
CHANGED
|
@@ -338,9 +338,11 @@ async function initializePostgresUsers(
|
|
|
338
338
|
// Create or update user (handles existing users)
|
|
339
339
|
await client.query(`
|
|
340
340
|
DO $$ BEGIN
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
341
|
+
IF NOT EXISTS (SELECT FROM pg_roles WHERE rolname = '${user.name}') THEN
|
|
342
|
+
CREATE USER "${user.name}" WITH PASSWORD '${user.password}';
|
|
343
|
+
ELSE
|
|
344
|
+
ALTER USER "${user.name}" WITH PASSWORD '${user.password}';
|
|
345
|
+
END IF;
|
|
344
346
|
END $$;
|
|
345
347
|
`);
|
|
346
348
|
|