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 CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import "./create-DWIaBT8s.mjs";
2
+ import "./create-D-eNQ-nG.mjs";
3
3
  import { createCreatePrismaCli } from "./index.mjs";
4
4
 
5
5
  //#region src/cli.ts
@@ -40,7 +40,7 @@ async function getAnonymousId() {
40
40
  }
41
41
  function getCommonProperties() {
42
42
  return {
43
- "cli-version": "0.4.2-pr.55.207.1",
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: `https://console.prisma.io/${encodeURIComponent(result.workspace.id)}/${encodeURIComponent(result.project.id)}`
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-DWIaBT8s.mjs";
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.207.1";
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,6 +1,6 @@
1
1
  {
2
2
  "name": "create-prisma",
3
- "version": "0.4.2-pr.55.207.1",
3
+ "version": "0.4.2-pr.55.209.1",
4
4
  "private": false,
5
5
  "description": "Create Prisma 8 projects with first-party templates and great DX.",
6
6
  "homepage": "https://github.com/prisma/create-prisma",
@@ -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: {
@@ -1,5 +1,8 @@
1
1
  {
2
2
  "extends": "astro/tsconfigs/strict",
3
+ "compilerOptions": {
4
+ "types": ["astro/client", "node"]
5
+ },
3
6
  "include": [".astro/types.d.ts", "**/*"],
4
7
  "exclude": ["dist"]
5
8
  }
@@ -10,6 +10,7 @@
10
10
  "skipLibCheck": true,
11
11
  "forceConsistentCasingInFileNames": true,
12
12
  "outDir": "dist",
13
- "rootDir": "."
13
+ "rootDir": ".",
14
+ "types": ["node"]
14
15
  }
15
16
  }
@@ -10,6 +10,7 @@
10
10
  "skipLibCheck": true,
11
11
  "forceConsistentCasingInFileNames": true,
12
12
  "outDir": "dist",
13
- "rootDir": "."
13
+ "rootDir": ".",
14
+ "types": ["node"]
14
15
  }
15
16
  }
@@ -8,7 +8,8 @@
8
8
  "strict": true,
9
9
  "esModuleInterop": true,
10
10
  "skipLibCheck": true,
11
- "forceConsistentCasingInFileNames": true
11
+ "forceConsistentCasingInFileNames": true,
12
+ "types": ["node"]
12
13
  },
13
14
  "include": ["src/**/*.ts"]
14
15
  }
@@ -11,7 +11,8 @@
11
11
  "forceConsistentCasingInFileNames": true,
12
12
  "emitDecoratorMetadata": true,
13
13
  "experimentalDecorators": true,
14
- "outDir": "dist"
14
+ "outDir": "dist",
15
+ "types": ["node"]
15
16
  },
16
17
  "include": ["src/**/*.ts"]
17
18
  }
@@ -14,6 +14,7 @@
14
14
  "isolatedModules": true,
15
15
  "jsx": "react-jsx",
16
16
  "incremental": true,
17
+ "types": ["node"],
17
18
  "plugins": [
18
19
  {
19
20
  "name": "next"
@@ -1,4 +1,7 @@
1
1
  {
2
+ "compilerOptions": {
3
+ "types": ["node"]
4
+ },
2
5
  "files": [],
3
6
  "references": [
4
7
  {
@@ -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
@@ -17,7 +17,7 @@
17
17
  "@/*": ["./src/*"]
18
18
  },
19
19
  "lib": ["ES2022", "DOM", "DOM.Iterable"],
20
- "types": ["vite/client"]
20
+ "types": ["vite/client", "node"]
21
21
  },
22
22
  "include": ["src/**/*.ts", "src/**/*.tsx", "vite.config.ts"]
23
23
  }