create-db 1.0.8-pr51-DC-4933-env-flag-17282129083.0 → 1.0.8-pr51-DC-4933-env-flag-17283424880.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 +6 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -194,7 +194,7 @@ Options:
|
|
|
194
194
|
${chalk.yellow("--json, -j")} Output machine-readable JSON and exit
|
|
195
195
|
${chalk.yellow("--list-regions")} List available regions and exit
|
|
196
196
|
${chalk.yellow("--help, -h")} Show this help message
|
|
197
|
-
${chalk.yellow("--env, -e")}
|
|
197
|
+
${chalk.yellow("--env, -e")} Prints DATABASE_URL to the terminal
|
|
198
198
|
|
|
199
199
|
Examples:
|
|
200
200
|
${chalk.gray(`npx ${CLI_NAME} --region us-east-1`)}
|
|
@@ -202,6 +202,7 @@ Examples:
|
|
|
202
202
|
${chalk.gray(`npx ${CLI_NAME} --interactive`)}
|
|
203
203
|
${chalk.gray(`npx ${CLI_NAME} -i`)}
|
|
204
204
|
${chalk.gray(`npx ${CLI_NAME} --json --region us-east-1`)}
|
|
205
|
+
${chalk.gray(`npx ${CLI_NAME} --env --region us-east-1`)}
|
|
205
206
|
`);
|
|
206
207
|
process.exit(0);
|
|
207
208
|
}
|
|
@@ -303,6 +304,8 @@ function validateFlagCombinations(flags) {
|
|
|
303
304
|
["list-regions", "json"],
|
|
304
305
|
["list-regions", "interactive"],
|
|
305
306
|
["list-regions", "region"],
|
|
307
|
+
["interactive", "env"],
|
|
308
|
+
["interactive", "json"],
|
|
306
309
|
];
|
|
307
310
|
|
|
308
311
|
for (const [flag1, flag2] of conflictingFlags) {
|
|
@@ -537,6 +540,7 @@ async function createDatabase(name, region, userAgent, silent = false) {
|
|
|
537
540
|
error: "api_error",
|
|
538
541
|
message: result.error.message || "Unknown error",
|
|
539
542
|
details: result.error,
|
|
543
|
+
status: result.error.status,
|
|
540
544
|
};
|
|
541
545
|
}
|
|
542
546
|
|
|
@@ -635,6 +639,7 @@ async function main() {
|
|
|
635
639
|
"has-help-flag": rawArgs.includes("--help") || rawArgs.includes("-h"),
|
|
636
640
|
"has-list-regions-flag": rawArgs.includes("--list-regions"),
|
|
637
641
|
"has-json-flag": rawArgs.includes("--json") || rawArgs.includes("-j"),
|
|
642
|
+
"has-env-flag": rawArgs.includes("--env") || rawArgs.includes("-e"),
|
|
638
643
|
"has-user-agent-from-env": !!userAgent,
|
|
639
644
|
"node-version": process.version,
|
|
640
645
|
platform: process.platform,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-db",
|
|
3
|
-
"version": "1.0.8-pr51-DC-4933-env-flag-
|
|
3
|
+
"version": "1.0.8-pr51-DC-4933-env-flag-17283424880.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": "",
|