create-db 1.0.10-pr65-DC-6214-accelerate-removed-19338564383.0 → 1.0.10-pr65-DC-6214-accelerate-removed-19338855744.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/index.js +13 -3
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -535,7 +535,6 @@ async function createDatabase(
|
|
|
535
535
|
|
|
536
536
|
const database = result.data ? result.data.database : result.databases?.[0];
|
|
537
537
|
const projectId = result.data ? result.data.id : result.id;
|
|
538
|
-
const prismaConn = database?.connectionString;
|
|
539
538
|
|
|
540
539
|
const directConnDetails = result.data
|
|
541
540
|
? database?.apiKeys?.[0]?.directConnection
|
|
@@ -628,7 +627,6 @@ async function createDatabase(
|
|
|
628
627
|
log.message("");
|
|
629
628
|
}
|
|
630
629
|
|
|
631
|
-
// prismaConn is still available as a variable but not displayed
|
|
632
630
|
|
|
633
631
|
// Claim database section
|
|
634
632
|
const clickableUrl = terminalLink(claimUrl, claimUrl, { fallback: false });
|
|
@@ -821,6 +819,18 @@ export async function main() {
|
|
|
821
819
|
}
|
|
822
820
|
|
|
823
821
|
// Run main() if this file is being executed directly
|
|
824
|
-
|
|
822
|
+
const isDirectExecution =
|
|
823
|
+
import.meta.url.endsWith("/index.js") ||
|
|
824
|
+
process.argv[1] === import.meta.url.replace("file://", "") ||
|
|
825
|
+
process.argv[1].includes("create-db") ||
|
|
826
|
+
process.argv[1].includes("create-pg") ||
|
|
827
|
+
process.argv[1].includes("create-postgres");
|
|
828
|
+
|
|
829
|
+
if (isDirectExecution && !process.env.__CREATE_DB_EXECUTING) {
|
|
830
|
+
process.env.__CREATE_DB_EXECUTING = "true";
|
|
825
831
|
main().catch(console.error);
|
|
826
832
|
}
|
|
833
|
+
|
|
834
|
+
// if (import.meta.url.endsWith('/index.js') || process.argv[1] === import.meta.url.replace('file://', '')) {
|
|
835
|
+
// main().catch(console.error);
|
|
836
|
+
// }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-db",
|
|
3
|
-
"version": "1.0.10-pr65-DC-6214-accelerate-removed-
|
|
3
|
+
"version": "1.0.10-pr65-DC-6214-accelerate-removed-19338855744.0",
|
|
4
4
|
"description": "Instantly create a temporary Prisma Postgres database with one command, then claim and persist it in your Prisma Data Platform project when ready.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": "prisma",
|