From cd8e0a07fc93d847b4f8bab54e0c7820c45835cb Mon Sep 17 00:00:00 2001 From: Ankur Datta <64993082+ankur-arch@users.noreply.github.com> Date: Tue, 29 Oct 2024 15:10:03 +0600 Subject: [PATCH] fix: ensure pulse api key is extracted --- src/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 59ab831..e4538db 100644 --- a/src/index.ts +++ b/src/index.ts @@ -8,6 +8,7 @@ import logger from "./helpers/logger"; import vscodeExtensionSuggestion from "./helpers/vscodeExtensionSuggestion"; import chalk from "chalk"; + const main = async () => { const cli = new CLI(); await cli.initialize(); @@ -62,7 +63,8 @@ const main = async () => { if (input.databaseUrl) { fs.writeFileSync(`${input.path}/${input.name}/.env`, `DATABASE_URL="${input.databaseUrl}"\n`, { flag: "a" }) - if (input.databaseUrl.startsWith("prisma://")) { + + if (input.databaseUrl.startsWith("prisma://") || input.databaseUrl.startsWith("prisma+postgres://")) { const queryParams = input.databaseUrl.split("?")[1] const urlParams = new URLSearchParams(queryParams) const apiKey = urlParams.get("api_key")