create-prisma 0.4.2-pr.53.185.1 → 0.4.2-pr.53.187.1
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/cli.mjs
CHANGED
|
@@ -40,7 +40,7 @@ async function getAnonymousId() {
|
|
|
40
40
|
}
|
|
41
41
|
function getCommonProperties() {
|
|
42
42
|
return {
|
|
43
|
-
"cli-version": "0.4.2-pr.53.
|
|
43
|
+
"cli-version": "0.4.2-pr.53.187.1",
|
|
44
44
|
"node-version": process.version,
|
|
45
45
|
platform: process.platform,
|
|
46
46
|
arch: process.arch
|
|
@@ -659,6 +659,9 @@ function parsePrismaCliEnvelope(output) {
|
|
|
659
659
|
} catch {}
|
|
660
660
|
throw new Error("Prisma CLI returned output that is not a valid result envelope.");
|
|
661
661
|
}
|
|
662
|
+
function extractDeploymentUrl(output) {
|
|
663
|
+
return output.match(/https:\/\/[a-z0-9.-]+\.prisma\.build\/?/gi)?.at(-1)?.replace(/\/$/, "");
|
|
664
|
+
}
|
|
662
665
|
function getPrismaCliArgs(packageManager, args) {
|
|
663
666
|
return getPackageExecutionArgs(packageManager, [PRISMA_PLATFORM_CLI_PACKAGE, ...args]);
|
|
664
667
|
}
|
|
@@ -702,13 +705,17 @@ async function deployWithComposer(options) {
|
|
|
702
705
|
await ensureAuthentication(options.packageManager, options.projectDir);
|
|
703
706
|
progress?.start("Deploying to Prisma...");
|
|
704
707
|
const command = getRunScriptArgs(options.packageManager, "deploy");
|
|
705
|
-
await execa(command.command, command.args, {
|
|
708
|
+
const result = await execa(command.command, command.args, {
|
|
706
709
|
cwd: options.projectDir,
|
|
707
710
|
env: process.env,
|
|
708
711
|
stdio: options.verbose ? "inherit" : "pipe"
|
|
709
712
|
});
|
|
710
713
|
progress?.stop("Deployed to Prisma.");
|
|
711
714
|
if (options.verbose) log.success("Deployed to Prisma.");
|
|
715
|
+
else {
|
|
716
|
+
const deploymentUrl = extractDeploymentUrl([result.stdout, result.stderr].filter((value) => typeof value === "string").join("\n"));
|
|
717
|
+
if (deploymentUrl) log.info(`App: ${deploymentUrl}`);
|
|
718
|
+
}
|
|
712
719
|
return true;
|
|
713
720
|
} catch (error) {
|
|
714
721
|
progress?.stop("Deployment failed.");
|
package/dist/index.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as DatabaseProviderSchema, i as CreateTemplateSchema, n as AuthoringStyleSchema, o as PackageManagerSchema, r as CreateCommandInputSchema, t as runCreateCommand } from "./create-
|
|
2
|
+
import { a as DatabaseProviderSchema, i as CreateTemplateSchema, n as AuthoringStyleSchema, o as PackageManagerSchema, r as CreateCommandInputSchema, t as runCreateCommand } from "./create-CjddOGe4.mjs";
|
|
3
3
|
import { os } from "@orpc/server";
|
|
4
4
|
import { createCli } from "trpc-cli";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
|
|
7
7
|
//#region src/index.ts
|
|
8
|
-
const CLI_VERSION = "0.4.2-pr.53.
|
|
8
|
+
const CLI_VERSION = "0.4.2-pr.53.187.1";
|
|
9
9
|
const CreateCliInputSchema = z.tuple([z.string().trim().min(1, "Please enter a valid project name").optional().describe("Project name / directory"), CreateCommandInputSchema]);
|
|
10
10
|
function normalizeCreateCliInput(input) {
|
|
11
11
|
const [projectName, options] = input;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-prisma",
|
|
3
|
-
"version": "0.4.2-pr.53.
|
|
3
|
+
"version": "0.4.2-pr.53.187.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Create Prisma Next projects with first-party templates and great DX.",
|
|
6
6
|
"homepage": "https://github.com/prisma/create-prisma",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"dev": "tsdown --watch",
|
|
38
38
|
"start": "bun run ./dist/cli.mjs",
|
|
39
39
|
"test": "bun run test:unit && bun run test:e2e",
|
|
40
|
-
"test:unit": "bun test ./tests/dependencies.test.ts ./tests/install.test.ts ./tests/node-version.test.ts ./tests/setup-prisma.test.ts ./tests/telemetry.test.ts",
|
|
40
|
+
"test:unit": "bun test ./tests/dependencies.test.ts ./tests/deploy-with-composer.test.ts ./tests/install.test.ts ./tests/node-version.test.ts ./tests/setup-prisma.test.ts ./tests/telemetry.test.ts",
|
|
41
41
|
"test:e2e": "bun test --timeout 180000 ./tests/e2e/create-prisma.e2e.test.ts",
|
|
42
42
|
"check": "bun run format:check && bun run lint",
|
|
43
43
|
"lint": "oxlint . --deny-warnings",
|