create-prisma 0.4.2-pr.55.207.1 → 0.4.2-pr.55.209.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 +1 -1
- package/dist/{create-DWIaBT8s.mjs → create-D-eNQ-nG.mjs} +11 -2
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
- package/templates/create/_shared/prisma.config.ts.hbs +1 -3
- package/templates/create/astro/tsconfig.json +3 -0
- package/templates/create/elysia/tsconfig.json +2 -1
- package/templates/create/hono/tsconfig.json +2 -1
- package/templates/create/minimal/tsconfig.json +2 -1
- package/templates/create/nest/tsconfig.json +2 -1
- package/templates/create/next/tsconfig.json +1 -0
- package/templates/create/nuxt/tsconfig.json +3 -0
- package/templates/create/svelte/tsconfig.json +2 -1
- package/templates/create/tanstack-start/tsconfig.json +1 -1
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.55.
|
|
43
|
+
"cli-version": "0.4.2-pr.55.209.1",
|
|
44
44
|
"node-version": process.version,
|
|
45
45
|
platform: process.platform,
|
|
46
46
|
arch: process.arch
|
|
@@ -603,6 +603,15 @@ function getErrorMessage(error) {
|
|
|
603
603
|
if (error instanceof Error) return redactSecrets(error.message);
|
|
604
604
|
return redactSecrets(String(error));
|
|
605
605
|
}
|
|
606
|
+
function stripResourcePrefix(id, prefix) {
|
|
607
|
+
const marker = `${prefix}_`;
|
|
608
|
+
return id.startsWith(marker) ? id.slice(marker.length) : id;
|
|
609
|
+
}
|
|
610
|
+
function getConsoleProjectUrl(workspaceId, projectId) {
|
|
611
|
+
const consoleWorkspaceId = stripResourcePrefix(workspaceId, "wksp");
|
|
612
|
+
const consoleProjectId = stripResourcePrefix(projectId, "proj");
|
|
613
|
+
return `https://console.prisma.io/${encodeURIComponent(consoleWorkspaceId)}/${encodeURIComponent(consoleProjectId)}`;
|
|
614
|
+
}
|
|
606
615
|
function parsePrismaCliEnvelope(output) {
|
|
607
616
|
const lines = output.split(/\r?\n/).map((line) => line.trim()).filter(Boolean).reverse();
|
|
608
617
|
for (const line of lines) try {
|
|
@@ -758,7 +767,7 @@ async function getProjectDetails(options) {
|
|
|
758
767
|
project: {
|
|
759
768
|
id: result.project.id,
|
|
760
769
|
name: result.project.name,
|
|
761
|
-
consoleUrl:
|
|
770
|
+
consoleUrl: getConsoleProjectUrl(result.workspace.id, result.project.id)
|
|
762
771
|
}
|
|
763
772
|
};
|
|
764
773
|
} catch {
|
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-D-eNQ-nG.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.55.
|
|
8
|
+
const CLI_VERSION = "0.4.2-pr.55.209.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,5 +1,3 @@
|
|
|
1
|
-
import { env } from "node:process";
|
|
2
|
-
|
|
3
1
|
import { definePrismaConfig } from "@prisma/cli-engine";
|
|
4
2
|
import { defineConfig as ormConfig } from "@prisma/orm-{{#if (eq provider "postgres")}}postgres{{else}}mongo{{/if}}/config";
|
|
5
3
|
|
|
@@ -10,7 +8,7 @@ export default definePrismaConfig({
|
|
|
10
8
|
output: "./src/prisma/generated",
|
|
11
9
|
{{/if}}
|
|
12
10
|
db: {
|
|
13
|
-
connection: env.{{#if (eq provider "postgres")}}DATABASE_URL{{else}}MONGODB_URL{{/if}}!,
|
|
11
|
+
connection: process.env.{{#if (eq provider "postgres")}}DATABASE_URL{{else}}MONGODB_URL{{/if}}!,
|
|
14
12
|
},
|
|
15
13
|
}),
|
|
16
14
|
composer: {
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
"skipLibCheck": true,
|
|
11
11
|
"sourceMap": true,
|
|
12
12
|
"strict": true,
|
|
13
|
-
"moduleResolution": "bundler"
|
|
13
|
+
"moduleResolution": "bundler",
|
|
14
|
+
"types": ["node"]
|
|
14
15
|
}
|
|
15
16
|
// Path aliases are handled by https://svelte.dev/docs/kit/configuration#alias
|
|
16
17
|
// except $lib which is handled by https://svelte.dev/docs/kit/configuration#files
|