create-db 1.0.1-pr43-DC-4828-json-flag-17106021047.0 → 1.0.1-pr43-DC-4828-json-flag-17106152047.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 +16 -3
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -485,10 +485,23 @@ async function main() {
|
|
|
485
485
|
if (chooseRegionPrompt) {
|
|
486
486
|
region = await promptForRegion(region);
|
|
487
487
|
}
|
|
488
|
+
|
|
489
|
+
try {
|
|
490
|
+
await validateRegion(region, true);
|
|
491
|
+
} catch (e) {
|
|
492
|
+
console.log(
|
|
493
|
+
JSON.stringify(
|
|
494
|
+
{ error: "invalid_region", message: e.message },
|
|
495
|
+
null,
|
|
496
|
+
2
|
|
497
|
+
)
|
|
498
|
+
);
|
|
499
|
+
process.exit(1);
|
|
500
|
+
}
|
|
488
501
|
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
502
|
+
const result = await createDatabase(name, region, true);
|
|
503
|
+
console.log(JSON.stringify(result, null, 2));
|
|
504
|
+
process.exit(0);
|
|
492
505
|
}
|
|
493
506
|
|
|
494
507
|
intro(chalk.cyan.bold("🚀 Creating a Prisma Postgres database"));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-db",
|
|
3
|
-
"version": "1.0.1-pr43-DC-4828-json-flag-
|
|
3
|
+
"version": "1.0.1-pr43-DC-4828-json-flag-17106152047.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": "",
|