create-prisma 0.2.0 → 0.3.0-pr.24.34.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.
Files changed (32) hide show
  1. package/README.md +25 -4
  2. package/dist/cli.mjs +1 -1
  3. package/dist/{create-DgN5mAMV.mjs → create-Bk5ge4ei.mjs} +221 -17
  4. package/dist/index.d.mts +3 -0
  5. package/dist/index.mjs +2 -2
  6. package/package.json +27 -19
  7. package/templates/create/next/eslint.config.mjs +1 -6
  8. package/templates/create/next/src/app/globals.css +2 -8
  9. package/templates/create/svelte/.vscode/extensions.json +1 -1
  10. package/templates/create/svelte/src/app.d.ts +7 -7
  11. package/templates/create/svelte/src/app.html +8 -8
  12. package/templates/create/svelte/svelte.config.js +7 -7
  13. package/templates/create/svelte/tsconfig.json +18 -18
  14. package/templates/create/svelte/vite.config.ts +3 -3
  15. package/templates/create/tanstack-start/.yarnrc.yml.hbs +4 -0
  16. package/templates/create/tanstack-start/README.md.hbs +31 -0
  17. package/templates/create/tanstack-start/deno.json.hbs +13 -0
  18. package/templates/create/tanstack-start/package.json.hbs +33 -0
  19. package/templates/create/tanstack-start/prisma/schema.prisma.hbs +22 -0
  20. package/templates/create/tanstack-start/prisma/seed.ts.hbs +37 -0
  21. package/templates/create/tanstack-start/prisma.config.ts +13 -0
  22. package/templates/create/tanstack-start/src/lib/prisma.server.ts.hbs +53 -0
  23. package/templates/create/tanstack-start/src/routeTree.gen.ts +74 -0
  24. package/templates/create/tanstack-start/src/router.tsx +18 -0
  25. package/templates/create/tanstack-start/src/routes/__root.tsx.hbs +71 -0
  26. package/templates/create/tanstack-start/src/routes/index.tsx.hbs +145 -0
  27. package/templates/create/tanstack-start/src/styles.css +187 -0
  28. package/templates/create/tanstack-start/tsconfig.json +22 -0
  29. package/templates/create/tanstack-start/vite.config.ts +8 -0
  30. package/templates/create/turborepo/apps/api/tsconfig.json +1 -3
  31. package/templates/create/turborepo/packages/db/tsconfig.json +1 -5
  32. package/templates/create/turborepo/turbo.json +3 -9
package/README.md CHANGED
@@ -68,6 +68,12 @@ Create a Nuxt project non-interactively:
68
68
  create-prisma --name my-nuxt-app --template nuxt --provider postgresql
69
69
  ```
70
70
 
71
+ Create a TanStack Start project non-interactively:
72
+
73
+ ```bash
74
+ create-prisma --name my-start-app --template tanstack-start --provider postgresql
75
+ ```
76
+
71
77
  Create a Turborepo project with a `packages/db` Prisma package:
72
78
 
73
79
  ```bash
@@ -114,21 +120,24 @@ Or run locally:
114
120
 
115
121
  ```bash
116
122
  bun install
123
+ bun run check
117
124
  bun run build
118
125
  bun run start
119
126
  ```
120
127
 
121
128
  The CLI updates `package.json` with Prisma dependencies, optionally runs dependency installation with your selected package manager, and scaffolds Prisma 7 setup files directly inside each app template:
129
+
122
130
  - `prisma/schema.prisma`
123
131
  - `prisma/seed.ts`
124
- - `src/lib/prisma.ts` or `src/lib/server/prisma.ts`
132
+ - `src/lib/prisma.ts`, `src/lib/prisma.server.ts`, `src/lib/server/prisma.ts`, `server/utils/prisma.ts`, or `packages/db/src/client.ts`
125
133
  - `prisma.config.ts`
126
134
  - `src/generated/prisma` or `server/generated/prisma` (Nuxt) or `packages/db/src/generated/prisma` (Turborepo)
127
135
  - `.env` (creates or updates `DATABASE_URL`, and writes `CLAIM_URL` when Prisma Postgres is provisioned)
128
136
  - runs `prisma generate` automatically after scaffolding
129
137
 
130
138
  `create` is the default command and currently supports:
131
- - templates: `hono`, `next`, `svelte`, `astro`, `nuxt`, `turborepo`
139
+
140
+ - templates: `hono`, `next`, `svelte`, `astro`, `nuxt`, `tanstack-start`, `turborepo`
132
141
  - project name via `--name`
133
142
  - schema presets via `--schema-preset empty|basic` (default: `basic`)
134
143
 
@@ -145,11 +154,20 @@ When add-ons are enabled, `create` prompts for the relevant agent and IDE select
145
154
  When `postgresql` is selected, `create` can provision Prisma Postgres via `create-db --json` and auto-fill `DATABASE_URL`.
146
155
  Generated projects also include `db:seed` and configure Prisma's `migrations.seed` hook to run `tsx prisma/seed.ts`.
147
156
 
157
+ ## Telemetry
158
+
159
+ Published builds may send anonymous PostHog telemetry for `create` runs to help improve the CLI. It does not include project names, file paths, or database URLs. Disable it with `DO_NOT_TRACK`, `CREATE_PRISMA_DISABLE_TELEMETRY`, or `CREATE_PRISMA_TELEMETRY_DISABLED`.
160
+
148
161
  ## Scripts
149
162
 
150
163
  - `bun run build` - Build to `dist/`
164
+ - `bun run check` - Run formatting and lint checks
151
165
  - `bun run dev` - Watch mode build
152
166
  - `bun run start` - Run built CLI
167
+ - `bun run lint` - Run `oxlint` with warnings treated as failures
168
+ - `bun run lint:fix` - Apply safe `oxlint` fixes
169
+ - `bun run format` - Format the repo with `oxfmt`
170
+ - `bun run format:check` - Check formatting with `oxfmt`
153
171
  - `bun run typecheck` - TypeScript checks only
154
172
  - `bun run bump` - Create a release PR (interactive semver bump)
155
173
  - `bun run bump -- patch|minor|major|x.y.z` - Non-interactive bump
@@ -163,5 +181,8 @@ This repo uses a manual, script-driven release flow:
163
181
  1. Run `bun run bump` (or pass `patch|minor|major|x.y.z`).
164
182
  2. The script creates a `release/vX.Y.Z` branch and a PR with commit `chore(release): X.Y.Z`.
165
183
  3. Merge that PR to `main` with squash (keep commit title `chore(release): X.Y.Z`).
166
- 4. GitHub Actions creates the `vX.Y.Z` tag and GitHub Release notes via `changelogithub`.
167
- 5. GitHub Actions publishes only for `chore(release):` commits, using npm trusted publishing (OIDC, no npm token secret).
184
+ 4. GitHub Actions runs `bun run check`, `bun run typecheck`, and `bun run build` before publishing.
185
+ 5. GitHub Actions creates the `vX.Y.Z` tag and GitHub Release notes via `changelogithub`.
186
+ 6. GitHub Actions publishes only for `chore(release):` commits, using npm trusted publishing (OIDC, no npm token secret).
187
+
188
+ Every PR from a branch in this repository also publishes a preview package to npm using the dist-tag `pr<PR_NUMBER>`, so PR 3 is installable as `create-prisma@pr3`.
package/dist/cli.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import "./create-DgN5mAMV.mjs";
2
+ import "./create-Bk5ge4ei.mjs";
3
3
  import { createCreatePrismaCli } from "./index.mjs";
4
4
 
5
5
  //#region src/cli.ts
@@ -7,6 +7,9 @@ import { existsSync } from "node:fs";
7
7
  import { fileURLToPath } from "node:url";
8
8
  import { z } from "zod";
9
9
  import { execa } from "execa";
10
+ import { randomUUID } from "node:crypto";
11
+ import os from "node:os";
12
+ import { PostHog } from "posthog-node";
10
13
  import { styleText } from "node:util";
11
14
 
12
15
  //#region src/constants/dependencies.ts
@@ -44,6 +47,7 @@ const createTemplates = [
44
47
  "svelte",
45
48
  "astro",
46
49
  "nuxt",
50
+ "tanstack-start",
47
51
  "turborepo"
48
52
  ];
49
53
  const createAddons = [
@@ -529,6 +533,7 @@ const requiredPrismaFileGroups = [
529
533
  ["prisma.config.ts", "packages/db/prisma.config.ts"],
530
534
  [
531
535
  "src/lib/prisma.ts",
536
+ "src/lib/prisma.server.ts",
532
537
  "src/lib/server/prisma.ts",
533
538
  "server/utils/prisma.ts",
534
539
  "packages/db/src/client.ts"
@@ -803,7 +808,7 @@ async function finalizePrismaFiles(options) {
803
808
  const schemaPath = path.join(prismaProjectDir, "prisma/schema.prisma");
804
809
  const configPath = path.join(prismaProjectDir, "prisma.config.ts");
805
810
  await ensureRequiredPrismaFiles(projectDir);
806
- const singletonPath = await fs.pathExists(path.join(prismaProjectDir, "src/lib/prisma.ts")) ? path.join(prismaProjectDir, "src/lib/prisma.ts") : await fs.pathExists(path.join(prismaProjectDir, "src/lib/server/prisma.ts")) ? path.join(prismaProjectDir, "src/lib/server/prisma.ts") : await fs.pathExists(path.join(prismaProjectDir, "server/utils/prisma.ts")) ? path.join(prismaProjectDir, "server/utils/prisma.ts") : path.join(prismaProjectDir, "src/client.ts");
811
+ const singletonPath = await fs.pathExists(path.join(prismaProjectDir, "src/lib/prisma.ts")) ? path.join(prismaProjectDir, "src/lib/prisma.ts") : await fs.pathExists(path.join(prismaProjectDir, "src/lib/prisma.server.ts")) ? path.join(prismaProjectDir, "src/lib/prisma.server.ts") : await fs.pathExists(path.join(prismaProjectDir, "src/lib/server/prisma.ts")) ? path.join(prismaProjectDir, "src/lib/server/prisma.ts") : await fs.pathExists(path.join(prismaProjectDir, "server/utils/prisma.ts")) ? path.join(prismaProjectDir, "server/utils/prisma.ts") : path.join(prismaProjectDir, "src/client.ts");
807
812
  const generatedDir = await fs.pathExists(path.join(prismaProjectDir, "server/utils/prisma.ts")) ? "server/generated" : "src/generated";
808
813
  const envResult = await ensureEnvVarInEnv(prismaProjectDir, "DATABASE_URL", options.databaseUrl ?? getDefaultDatabaseUrl(options.provider), {
809
814
  mode: options.databaseUrl ? "upsert" : "keep-existing",
@@ -1493,6 +1498,148 @@ async function executeCreateAddonSetupContext(params) {
1493
1498
  addonSpinner.stop("Add-ons applied.");
1494
1499
  }
1495
1500
 
1501
+ //#endregion
1502
+ //#region src/telemetry/client.ts
1503
+ const TELEMETRY_API_KEY = "phc_cmc85avbWyuJ2JyKdGPdv7dxXli8xLdWDBPbvIXWJfs";
1504
+ const TELEMETRY_HOST = "https://us.i.posthog.com";
1505
+ const TELEMETRY_CONFIG_FILE = "telemetry.json";
1506
+ const TELEMETRY_REQUEST_TIMEOUT_MS = 800;
1507
+ const TELEMETRY_SHUTDOWN_TIMEOUT_MS = 800;
1508
+ const UUID_V4_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
1509
+ function isTruthyEnvValue(value) {
1510
+ return [
1511
+ "1",
1512
+ "true",
1513
+ "yes",
1514
+ "on"
1515
+ ].includes(String(value ?? "").trim().toLowerCase());
1516
+ }
1517
+ function shouldDisableTelemetry() {
1518
+ if (isTruthyEnvValue(process.env.CI) || isTruthyEnvValue(process.env.GITHUB_ACTIONS)) return true;
1519
+ return process.env.CREATE_PRISMA_DISABLE_TELEMETRY !== void 0 || process.env.CREATE_PRISMA_TELEMETRY_DISABLED !== void 0 || process.env.DO_NOT_TRACK !== void 0;
1520
+ }
1521
+ function getTelemetryConfigDir() {
1522
+ if (process.platform === "darwin") return path.join(os.homedir(), "Library", "Application Support", "create-prisma");
1523
+ if (process.platform === "win32") return path.join(process.env.APPDATA ?? path.join(os.homedir(), "AppData", "Roaming"), "create-prisma");
1524
+ return path.join(process.env.XDG_CONFIG_HOME ?? path.join(os.homedir(), ".config"), "create-prisma");
1525
+ }
1526
+ async function getAnonymousId() {
1527
+ const telemetryConfigPath = path.join(getTelemetryConfigDir(), TELEMETRY_CONFIG_FILE);
1528
+ try {
1529
+ const config = await fs.readJSON(telemetryConfigPath);
1530
+ if (typeof config.anonymousId === "string" && UUID_V4_REGEX.test(config.anonymousId)) return config.anonymousId;
1531
+ } catch {}
1532
+ const anonymousId = randomUUID();
1533
+ try {
1534
+ await fs.ensureDir(path.dirname(telemetryConfigPath));
1535
+ await fs.writeJSON(telemetryConfigPath, { anonymousId }, { spaces: 2 });
1536
+ } catch {}
1537
+ return anonymousId;
1538
+ }
1539
+ function getCommonProperties() {
1540
+ return {
1541
+ "cli-version": "0.3.0-pr.24.34.1",
1542
+ "node-version": process.version,
1543
+ platform: process.platform,
1544
+ arch: process.arch
1545
+ };
1546
+ }
1547
+ function sanitizeProperties(properties) {
1548
+ return Object.fromEntries(Object.entries(properties).filter(([, value]) => value !== void 0));
1549
+ }
1550
+ async function trackCliTelemetry(event, properties) {
1551
+ if (shouldDisableTelemetry()) return;
1552
+ let client;
1553
+ try {
1554
+ client = new PostHog(TELEMETRY_API_KEY, {
1555
+ host: TELEMETRY_HOST,
1556
+ captureMode: "json",
1557
+ disableGeoip: true,
1558
+ flushAt: 1,
1559
+ flushInterval: 0,
1560
+ persistence: "memory",
1561
+ requestTimeout: TELEMETRY_REQUEST_TIMEOUT_MS
1562
+ });
1563
+ await client.captureImmediate({
1564
+ distinctId: await getAnonymousId(),
1565
+ event,
1566
+ properties: sanitizeProperties({
1567
+ ...getCommonProperties(),
1568
+ ...properties,
1569
+ $process_person_profile: false
1570
+ }),
1571
+ disableGeoip: true
1572
+ });
1573
+ } catch {} finally {
1574
+ if (client) await client.shutdown(TELEMETRY_SHUTDOWN_TIMEOUT_MS).catch(() => {});
1575
+ }
1576
+ }
1577
+
1578
+ //#endregion
1579
+ //#region src/telemetry/create.ts
1580
+ function getRequestedAddons(input) {
1581
+ const addons = [];
1582
+ if (input.skills === true) addons.push("skills");
1583
+ if (input.mcp === true) addons.push("mcp");
1584
+ if (input.extension === true) addons.push("extension");
1585
+ return addons;
1586
+ }
1587
+ function getTargetDirectoryState(context) {
1588
+ if (!context.targetPathState.exists) return "new";
1589
+ if (context.targetPathState.isEmptyDirectory) return "empty_directory";
1590
+ return "non_empty_directory";
1591
+ }
1592
+ function getBaseCreateProperties(input, context) {
1593
+ const resolvedAddons = context?.addonSetupContext?.addons ?? getRequestedAddons(input);
1594
+ return {
1595
+ command: "create",
1596
+ "uses-defaults": input.yes === true,
1597
+ verbose: input.verbose === true,
1598
+ force: input.force === true,
1599
+ template: context?.template ?? input.template ?? null,
1600
+ "database-provider": context?.prismaSetupContext.databaseProvider ?? input.provider ?? null,
1601
+ "package-manager": context?.prismaSetupContext.packageManager ?? input.packageManager ?? null,
1602
+ "schema-preset": context?.schemaPreset ?? input.schemaPreset ?? null,
1603
+ "should-install": context?.prismaSetupContext.shouldInstall ?? input.install ?? null,
1604
+ "should-generate": context?.prismaSetupContext.shouldGenerate ?? input.generate ?? null,
1605
+ "uses-prisma-postgres": context?.prismaSetupContext.shouldUsePrismaPostgres ?? input.prismaPostgres ?? null,
1606
+ addons: resolvedAddons,
1607
+ "addon-count": resolvedAddons.length,
1608
+ "addon-scope": context?.addonSetupContext?.scope ?? null,
1609
+ "skills-count": context?.addonSetupContext?.skills.length ?? null,
1610
+ "skills-agents-count": context?.addonSetupContext?.skillsAgents.length ?? null,
1611
+ "mcp-agents-count": context?.addonSetupContext?.mcpAgents.length ?? null,
1612
+ "extension-target-count": context?.addonSetupContext?.extensionTargets.length ?? null,
1613
+ "target-directory-state": context ? getTargetDirectoryState(context) : null
1614
+ };
1615
+ }
1616
+ function getErrorName(error) {
1617
+ if (error instanceof Error) return error.name;
1618
+ return error === void 0 ? null : "UnknownError";
1619
+ }
1620
+ function getErrorCode(error) {
1621
+ if (typeof error !== "object" || error === null) return null;
1622
+ const exitCode = Reflect.get(error, "exitCode");
1623
+ if (typeof exitCode === "number") return exitCode;
1624
+ const code = Reflect.get(error, "code");
1625
+ return typeof code === "number" || typeof code === "string" ? code : null;
1626
+ }
1627
+ async function trackCreateCompleted(params) {
1628
+ await trackCliTelemetry("cli:create_command_completed", {
1629
+ ...getBaseCreateProperties(params.input, params.context),
1630
+ "duration-ms": params.durationMs
1631
+ });
1632
+ }
1633
+ async function trackCreateFailed(params) {
1634
+ await trackCliTelemetry("cli:create_command_failed", {
1635
+ ...getBaseCreateProperties(params.input, params.context),
1636
+ "duration-ms": params.durationMs,
1637
+ "failure-stage": params.stage,
1638
+ "error-name": getErrorName(params.error),
1639
+ "error-code": getErrorCode(params.error)
1640
+ });
1641
+ }
1642
+
1496
1643
  //#endregion
1497
1644
  //#region src/ui/branding.ts
1498
1645
  const prismaTitle = `${styleText(["bold", "cyan"], "Create")} ${styleText(["bold", "magenta"], "Prisma")}`;
@@ -1560,6 +1707,11 @@ async function promptForCreateTemplate() {
1560
1707
  label: "Nuxt",
1561
1708
  hint: "Official minimal Nuxt starter with Nitro API route example"
1562
1709
  },
1710
+ {
1711
+ value: "tanstack-start",
1712
+ label: "TanStack Start",
1713
+ hint: "TanStack Start React app with file routes and server functions"
1714
+ },
1563
1715
  {
1564
1716
  value: "turborepo",
1565
1717
  label: "Turborepo",
@@ -1591,14 +1743,43 @@ async function inspectTargetPath(targetPath) {
1591
1743
  };
1592
1744
  }
1593
1745
  async function runCreateCommand(rawInput = {}) {
1746
+ const startedAt = Date.now();
1747
+ let input = {};
1748
+ let context;
1749
+ let failureStage = "validate_input";
1594
1750
  try {
1595
- const input = CreateCommandInputSchema.parse(rawInput);
1751
+ input = CreateCommandInputSchema.parse(rawInput);
1596
1752
  intro(getCreatePrismaIntro());
1597
- const context = await collectCreateContext(input);
1753
+ failureStage = "collect_context";
1754
+ context = await collectCreateContext(input);
1598
1755
  if (!context) return;
1599
- await executeCreateContext(context);
1756
+ failureStage = "unknown";
1757
+ const executionResult = await executeCreateContext(context);
1758
+ if (!executionResult.ok) {
1759
+ if (executionResult.error) cancel(`Create command failed: ${executionResult.error instanceof Error ? executionResult.error.message : String(executionResult.error)}`);
1760
+ await trackCreateFailed({
1761
+ input,
1762
+ context,
1763
+ durationMs: Date.now() - startedAt,
1764
+ error: executionResult.error,
1765
+ stage: executionResult.stage
1766
+ });
1767
+ return;
1768
+ }
1769
+ await trackCreateCompleted({
1770
+ input,
1771
+ context,
1772
+ durationMs: Date.now() - startedAt
1773
+ });
1600
1774
  } catch (error) {
1601
1775
  cancel(`Create command failed: ${error instanceof Error ? error.message : String(error)}`);
1776
+ await trackCreateFailed({
1777
+ input,
1778
+ context,
1779
+ durationMs: Date.now() - startedAt,
1780
+ error,
1781
+ stage: failureStage
1782
+ });
1602
1783
  }
1603
1784
  }
1604
1785
  async function collectCreateContext(input) {
@@ -1655,22 +1836,45 @@ async function executeCreateContext(context) {
1655
1836
  scaffoldSpinner.stop("Project files scaffolded.");
1656
1837
  } catch (error) {
1657
1838
  scaffoldSpinner.stop("Could not scaffold project files.");
1658
- cancel(error instanceof Error ? error.message : String(error));
1659
- return;
1839
+ return {
1840
+ ok: false,
1841
+ stage: "scaffold_template",
1842
+ error
1843
+ };
1660
1844
  }
1661
1845
  if (context.targetPathState.exists && !context.targetPathState.isEmptyDirectory && context.force) log.warn(`Used --force in non-empty directory ${formatPathForDisplay(context.targetDirectory)}.`);
1662
1846
  const cdStep = `- cd ${formatPathForDisplay(context.targetDirectory)}`;
1663
- if (context.addonSetupContext) await executeCreateAddonSetupContext({
1664
- context: context.addonSetupContext,
1665
- packageManager: context.prismaSetupContext.packageManager,
1666
- projectDir: context.targetDirectory,
1667
- verbose: context.prismaSetupContext.verbose
1668
- });
1669
- await executePrismaSetupContext(context.prismaSetupContext, {
1670
- prependNextSteps: [cdStep],
1671
- projectDir: context.targetDirectory,
1672
- includeDevNextStep: true
1673
- });
1847
+ if (context.addonSetupContext) try {
1848
+ await executeCreateAddonSetupContext({
1849
+ context: context.addonSetupContext,
1850
+ packageManager: context.prismaSetupContext.packageManager,
1851
+ projectDir: context.targetDirectory,
1852
+ verbose: context.prismaSetupContext.verbose
1853
+ });
1854
+ } catch (error) {
1855
+ return {
1856
+ ok: false,
1857
+ stage: "addons",
1858
+ error
1859
+ };
1860
+ }
1861
+ try {
1862
+ if (!await executePrismaSetupContext(context.prismaSetupContext, {
1863
+ prependNextSteps: [cdStep],
1864
+ projectDir: context.targetDirectory,
1865
+ includeDevNextStep: true
1866
+ })) return {
1867
+ ok: false,
1868
+ stage: "prisma_setup"
1869
+ };
1870
+ } catch (error) {
1871
+ return {
1872
+ ok: false,
1873
+ stage: "prisma_setup",
1874
+ error
1875
+ };
1876
+ }
1877
+ return { ok: true };
1674
1878
  }
1675
1879
 
1676
1880
  //#endregion
package/dist/index.d.mts CHANGED
@@ -201,6 +201,7 @@ declare const CreateTemplateSchema: z.ZodEnum<{
201
201
  svelte: "svelte";
202
202
  astro: "astro";
203
203
  nuxt: "nuxt";
204
+ "tanstack-start": "tanstack-start";
204
205
  turborepo: "turborepo";
205
206
  }>;
206
207
  declare const DatabaseUrlSchema: z.ZodString;
@@ -236,6 +237,7 @@ declare const CreateCommandInputSchema: z.ZodObject<{
236
237
  svelte: "svelte";
237
238
  astro: "astro";
238
239
  nuxt: "nuxt";
240
+ "tanstack-start": "tanstack-start";
239
241
  turborepo: "turborepo";
240
242
  }>>;
241
243
  skills: z.ZodOptional<z.ZodBoolean>;
@@ -279,6 +281,7 @@ declare const router: {
279
281
  svelte: "svelte";
280
282
  astro: "astro";
281
283
  nuxt: "nuxt";
284
+ "tanstack-start": "tanstack-start";
282
285
  turborepo: "turborepo";
283
286
  }>>;
284
287
  skills: zod.ZodOptional<zod.ZodBoolean>;
package/dist/index.mjs CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
- import { a as DatabaseUrlSchema, i as DatabaseProviderSchema, n as CreateCommandInputSchema, o as PackageManagerSchema, r as CreateTemplateSchema, s as SchemaPresetSchema, t as runCreateCommand } from "./create-DgN5mAMV.mjs";
2
+ import { a as DatabaseUrlSchema, i as DatabaseProviderSchema, n as CreateCommandInputSchema, o as PackageManagerSchema, r as CreateTemplateSchema, s as SchemaPresetSchema, t as runCreateCommand } from "./create-Bk5ge4ei.mjs";
3
3
  import { os } from "@orpc/server";
4
4
  import { createCli } from "trpc-cli";
5
5
 
6
6
  //#region src/index.ts
7
- const CLI_VERSION = "0.2.0";
7
+ const CLI_VERSION = "0.3.0-pr.24.34.1";
8
8
  const router = os.router({ create: os.meta({
9
9
  description: "Create a new project with Prisma setup",
10
10
  default: true,
package/package.json CHANGED
@@ -1,20 +1,26 @@
1
1
  {
2
2
  "name": "create-prisma",
3
- "version": "0.2.0",
3
+ "version": "0.3.0-pr.24.34.1",
4
+ "private": false,
4
5
  "description": "Create Prisma 7 projects with first-party templates and great DX.",
5
- "repository": {
6
- "type": "git",
7
- "url": "https://github.com/prisma/create-prisma"
8
- },
9
6
  "homepage": "https://github.com/prisma/create-prisma",
10
7
  "bugs": {
11
8
  "url": "https://github.com/prisma/create-prisma/issues"
12
9
  },
13
- "private": false,
14
- "type": "module",
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "https://github.com/prisma/create-prisma"
13
+ },
15
14
  "bin": {
16
15
  "create-prisma": "dist/cli.mjs"
17
16
  },
17
+ "files": [
18
+ "dist",
19
+ "templates",
20
+ "README.md",
21
+ "CHANGELOG.md"
22
+ ],
23
+ "type": "module",
18
24
  "main": "./dist/index.mjs",
19
25
  "types": "./dist/index.d.mts",
20
26
  "exports": {
@@ -26,21 +32,15 @@
26
32
  "import": "./dist/cli.mjs"
27
33
  }
28
34
  },
29
- "files": [
30
- "dist",
31
- "templates",
32
- "README.md",
33
- "CHANGELOG.md"
34
- ],
35
- "engines": {
36
- "node": ">=18.0.0",
37
- "bun": ">=1.3.0"
38
- },
39
- "packageManager": "bun@1.3.9",
40
35
  "scripts": {
41
36
  "build": "tsdown",
42
37
  "dev": "tsdown --watch",
43
38
  "start": "bun run ./dist/cli.mjs",
39
+ "check": "bun run format:check && bun run lint",
40
+ "lint": "oxlint . --deny-warnings",
41
+ "lint:fix": "oxlint . --fix",
42
+ "format": "oxfmt --write .",
43
+ "format:check": "oxfmt --check .",
44
44
  "typecheck": "tsc --noEmit",
45
45
  "bump": "bun run scripts/bump-version.ts",
46
46
  "release": "bun run bump",
@@ -52,6 +52,7 @@
52
52
  "execa": "^9.6.1",
53
53
  "fs-extra": "^11.3.3",
54
54
  "handlebars": "^4.7.8",
55
+ "posthog-node": "4.18.0",
55
56
  "trpc-cli": "^0.12.4",
56
57
  "zod": "^4.3.6"
57
58
  },
@@ -60,7 +61,14 @@
60
61
  "@types/fs-extra": "^11.0.4",
61
62
  "@types/node": "^25.3.0",
62
63
  "changelogithub": "^14.0.0",
64
+ "oxfmt": "^0.37.0",
65
+ "oxlint": "^1.52.0",
63
66
  "tsdown": "^0.20.3",
64
67
  "typescript": "^5.9.3"
65
- }
68
+ },
69
+ "engines": {
70
+ "bun": ">=1.3.0",
71
+ "node": ">=18.0.0"
72
+ },
73
+ "packageManager": "bun@1.3.9"
66
74
  }
@@ -5,12 +5,7 @@ import nextTs from "eslint-config-next/typescript";
5
5
  const eslintConfig = defineConfig([
6
6
  ...nextVitals,
7
7
  ...nextTs,
8
- globalIgnores([
9
- ".next/**",
10
- "out/**",
11
- "build/**",
12
- "next-env.d.ts",
13
- ]),
8
+ globalIgnores([".next/**", "out/**", "build/**", "next-env.d.ts"]),
14
9
  ]);
15
10
 
16
11
  export default eslintConfig;
@@ -12,10 +12,7 @@ html {
12
12
 
13
13
  body {
14
14
  margin: 0;
15
- font-family:
16
- "Instrument Sans",
17
- "Segoe UI",
18
- sans-serif;
15
+ font-family: "Instrument Sans", "Segoe UI", sans-serif;
19
16
  background: #f7f8fb;
20
17
  color: #0f172a;
21
18
  }
@@ -116,10 +113,7 @@ code {
116
113
  padding: 0.15rem 0.4rem;
117
114
  border-radius: 0.35rem;
118
115
  background: #eef2f7;
119
- font-family:
120
- SFMono-Regular,
121
- Consolas,
122
- monospace;
116
+ font-family: SFMono-Regular, Consolas, monospace;
123
117
  font-size: 0.95em;
124
118
  }
125
119
 
@@ -1,3 +1,3 @@
1
1
  {
2
- "recommendations": ["svelte.svelte-vscode"]
2
+ "recommendations": ["svelte.svelte-vscode"]
3
3
  }
@@ -1,13 +1,13 @@
1
1
  // See https://svelte.dev/docs/kit/types#app.d.ts
2
2
  // for information about these interfaces
3
3
  declare global {
4
- namespace App {
5
- // interface Error {}
6
- // interface Locals {}
7
- // interface PageData {}
8
- // interface PageState {}
9
- // interface Platform {}
10
- }
4
+ namespace App {
5
+ // interface Error {}
6
+ // interface Locals {}
7
+ // interface PageData {}
8
+ // interface PageState {}
9
+ // interface Platform {}
10
+ }
11
11
  }
12
12
 
13
13
  export {};
@@ -1,11 +1,11 @@
1
1
  <!doctype html>
2
2
  <html lang="en">
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1" />
6
- %sveltekit.head%
7
- </head>
8
- <body data-sveltekit-preload-data="hover">
9
- <div style="display: contents">%sveltekit.body%</div>
10
- </body>
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
6
+ %sveltekit.head%
7
+ </head>
8
+ <body data-sveltekit-preload-data="hover">
9
+ <div style="display: contents">%sveltekit.body%</div>
10
+ </body>
11
11
  </html>
@@ -1,13 +1,13 @@
1
- import adapter from '@sveltejs/adapter-auto';
1
+ import adapter from "@sveltejs/adapter-auto";
2
2
 
3
3
  /** @type {import('@sveltejs/kit').Config} */
4
4
  const config = {
5
- kit: {
6
- // adapter-auto only supports some environments, see https://svelte.dev/docs/kit/adapter-auto for a list.
7
- // If your environment is not supported, or you settled on a specific environment, switch out the adapter.
8
- // See https://svelte.dev/docs/kit/adapters for more information about adapters.
9
- adapter: adapter()
10
- }
5
+ kit: {
6
+ // adapter-auto only supports some environments, see https://svelte.dev/docs/kit/adapter-auto for a list.
7
+ // If your environment is not supported, or you settled on a specific environment, switch out the adapter.
8
+ // See https://svelte.dev/docs/kit/adapters for more information about adapters.
9
+ adapter: adapter(),
10
+ },
11
11
  };
12
12
 
13
13
  export default config;
@@ -1,20 +1,20 @@
1
1
  {
2
- "extends": "./.svelte-kit/tsconfig.json",
3
- "compilerOptions": {
4
- "rewriteRelativeImportExtensions": true,
5
- "allowJs": true,
6
- "checkJs": true,
7
- "esModuleInterop": true,
8
- "forceConsistentCasingInFileNames": true,
9
- "resolveJsonModule": true,
10
- "skipLibCheck": true,
11
- "sourceMap": true,
12
- "strict": true,
13
- "moduleResolution": "bundler"
14
- }
15
- // Path aliases are handled by https://svelte.dev/docs/kit/configuration#alias
16
- // except $lib which is handled by https://svelte.dev/docs/kit/configuration#files
17
- //
18
- // To make changes to top-level options such as include and exclude, we recommend extending
19
- // the generated config; see https://svelte.dev/docs/kit/configuration#typescript
2
+ "extends": "./.svelte-kit/tsconfig.json",
3
+ "compilerOptions": {
4
+ "rewriteRelativeImportExtensions": true,
5
+ "allowJs": true,
6
+ "checkJs": true,
7
+ "esModuleInterop": true,
8
+ "forceConsistentCasingInFileNames": true,
9
+ "resolveJsonModule": true,
10
+ "skipLibCheck": true,
11
+ "sourceMap": true,
12
+ "strict": true,
13
+ "moduleResolution": "bundler"
14
+ }
15
+ // Path aliases are handled by https://svelte.dev/docs/kit/configuration#alias
16
+ // except $lib which is handled by https://svelte.dev/docs/kit/configuration#files
17
+ //
18
+ // To make changes to top-level options such as include and exclude, we recommend extending
19
+ // the generated config; see https://svelte.dev/docs/kit/configuration#typescript
20
20
  }
@@ -1,6 +1,6 @@
1
- import { sveltekit } from '@sveltejs/kit/vite';
2
- import { defineConfig } from 'vite';
1
+ import { sveltekit } from "@sveltejs/kit/vite";
2
+ import { defineConfig } from "vite";
3
3
 
4
4
  export default defineConfig({
5
- plugins: [sveltekit()]
5
+ plugins: [sveltekit()],
6
6
  });