create-prisma 0.4.2-next.37.89.1 → 0.4.2-next.37.91.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-C6SFJkUe.mjs → create-Bd-xQ87g.mjs} +21 -2
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
- package/templates/create/astro/README.md.hbs +1 -1
- package/templates/create/elysia/README.md.hbs +1 -1
- package/templates/create/hono/README.md.hbs +1 -1
- package/templates/create/nest/README.md.hbs +1 -1
- package/templates/create/next/README.md.hbs +1 -1
- package/templates/create/nuxt/README.md.hbs +1 -1
- package/templates/create/svelte/README.md.hbs +1 -1
- package/templates/create/tanstack-start/README.md.hbs +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -49,7 +49,7 @@ async function getAnonymousId() {
|
|
|
49
49
|
}
|
|
50
50
|
function getCommonProperties() {
|
|
51
51
|
return {
|
|
52
|
-
"cli-version": "0.4.2-next.37.
|
|
52
|
+
"cli-version": "0.4.2-next.37.91.1",
|
|
53
53
|
"node-version": process.version,
|
|
54
54
|
platform: process.platform,
|
|
55
55
|
arch: process.arch
|
|
@@ -833,6 +833,7 @@ const DEFAULT_INSTALL = true;
|
|
|
833
833
|
const DEFAULT_EMIT = true;
|
|
834
834
|
const DEFAULT_INTERACTIVE_PRISMA_POSTGRES = true;
|
|
835
835
|
const DEFAULT_AUTOMATED_PRISMA_POSTGRES = false;
|
|
836
|
+
const CLAUDE_SKILLS_DIR = ".claude/skills";
|
|
836
837
|
const MONGO_DOCKER_COMPOSE = `services:
|
|
837
838
|
mongodb:
|
|
838
839
|
image: mongo:latest
|
|
@@ -1295,6 +1296,7 @@ function getSkillsSyncCliArgs(packageManager) {
|
|
|
1295
1296
|
}
|
|
1296
1297
|
async function syncAgentSkillsForContext(context, projectDir) {
|
|
1297
1298
|
if (!context.shouldInstall) return { didSyncAgentSkills: false };
|
|
1299
|
+
const claudeDirectory = await prepareClaudeSkillsDirectory(projectDir);
|
|
1298
1300
|
const syncCommand = getSkillsSyncCliCommand(context.packageManager);
|
|
1299
1301
|
if (context.verbose) log.step(`Running ${syncCommand}`);
|
|
1300
1302
|
try {
|
|
@@ -1311,12 +1313,29 @@ async function syncAgentSkillsForContext(context, projectDir) {
|
|
|
1311
1313
|
return { didSyncAgentSkills: true };
|
|
1312
1314
|
} catch (error) {
|
|
1313
1315
|
if (context.verbose) log.warn("Could not sync Prisma Next agent skills.");
|
|
1316
|
+
if (claudeDirectory.didCreateClaudeRoot) await removeEmptyClaudeSkillsDirectory(projectDir);
|
|
1314
1317
|
return {
|
|
1315
1318
|
didSyncAgentSkills: false,
|
|
1316
1319
|
warning: `Agent skill sync failed: ${getCommandErrorMessage(error)}`
|
|
1317
1320
|
};
|
|
1318
1321
|
}
|
|
1319
1322
|
}
|
|
1323
|
+
async function prepareClaudeSkillsDirectory(projectDir) {
|
|
1324
|
+
const claudeRoot = path.join(projectDir, ".claude");
|
|
1325
|
+
const didCreateClaudeRoot = !await fs.pathExists(claudeRoot);
|
|
1326
|
+
try {
|
|
1327
|
+
await fs.ensureDir(path.join(projectDir, CLAUDE_SKILLS_DIR));
|
|
1328
|
+
return { didCreateClaudeRoot };
|
|
1329
|
+
} catch {
|
|
1330
|
+
return { didCreateClaudeRoot: false };
|
|
1331
|
+
}
|
|
1332
|
+
}
|
|
1333
|
+
async function removeEmptyClaudeSkillsDirectory(projectDir) {
|
|
1334
|
+
const claudeSkillsDir = path.join(projectDir, CLAUDE_SKILLS_DIR);
|
|
1335
|
+
const claudeRoot = path.dirname(claudeSkillsDir);
|
|
1336
|
+
if (await fs.pathExists(claudeSkillsDir) && (await fs.readdir(claudeSkillsDir)).length === 0) await fs.remove(claudeSkillsDir);
|
|
1337
|
+
if (await fs.pathExists(claudeRoot) && (await fs.readdir(claudeRoot)).length === 0) await fs.remove(claudeRoot);
|
|
1338
|
+
}
|
|
1320
1339
|
async function finalizePrismaFilesForContext(context, projectDir, provisionResult) {
|
|
1321
1340
|
try {
|
|
1322
1341
|
await finalizePrismaFiles({
|
|
@@ -1389,7 +1408,7 @@ function buildNextStepsForContext(opts) {
|
|
|
1389
1408
|
});
|
|
1390
1409
|
if (!didSyncAgentSkills) nextSteps.push({
|
|
1391
1410
|
command: getRunScriptCommand(context.packageManager, "skills:sync"),
|
|
1392
|
-
description: "Sync the Prisma Next agent skills
|
|
1411
|
+
description: "Sync the Prisma Next agent skills from installed packages."
|
|
1393
1412
|
});
|
|
1394
1413
|
if (!didEmitContract || !context.shouldEmit) nextSteps.push({
|
|
1395
1414
|
command: getRunScriptCommand(context.packageManager, "contract:emit"),
|
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as DatabaseProviderSchema, i as CreateTemplateSchema, n as AuthoringStyleSchema, o as DatabaseUrlSchema, r as CreateCommandInputSchema, s as PackageManagerSchema, t as runCreateCommand } from "./create-
|
|
2
|
+
import { a as DatabaseProviderSchema, i as CreateTemplateSchema, n as AuthoringStyleSchema, o as DatabaseUrlSchema, r as CreateCommandInputSchema, s as PackageManagerSchema, t as runCreateCommand } from "./create-Bd-xQ87g.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.4.2-next.37.
|
|
7
|
+
const CLI_VERSION = "0.4.2-next.37.91.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
|
@@ -35,7 +35,7 @@ Database helper scripts are added to `package.json`:
|
|
|
35
35
|
|
|
36
36
|
- `{{runScriptCommand packageManager "db:seed"}}` - insert sample users manually
|
|
37
37
|
|
|
38
|
-
For provider-specific Prisma Next reference docs, see `prisma-next.md`. Agent-specific project guidance
|
|
38
|
+
For provider-specific Prisma Next reference docs, see `prisma-next.md`. Agent-specific project guidance starts in `.agents/skills/prisma-next/SKILL.md`.
|
|
39
39
|
The Astro Vite dev server also auto-emits Prisma Next contract artifacts when the contract changes.
|
|
40
40
|
|
|
41
41
|
Node-based Prisma Next projects expect Node.js 24 LTS or newer.
|
|
@@ -33,7 +33,7 @@ Database helper scripts are added to `package.json`:
|
|
|
33
33
|
|
|
34
34
|
- `{{runScriptCommand packageManager "db:seed"}}` - insert sample users manually
|
|
35
35
|
|
|
36
|
-
For provider-specific Prisma Next reference docs, see `prisma-next.md`. Agent-specific project guidance
|
|
36
|
+
For provider-specific Prisma Next reference docs, see `prisma-next.md`. Agent-specific project guidance starts in `.agents/skills/prisma-next/SKILL.md`.
|
|
37
37
|
|
|
38
38
|
Node-based Prisma Next projects expect Node.js 24 LTS or newer.
|
|
39
39
|
|
|
@@ -33,7 +33,7 @@ Database helper scripts are added to `package.json`:
|
|
|
33
33
|
|
|
34
34
|
- `{{runScriptCommand packageManager "db:seed"}}` - insert sample users manually
|
|
35
35
|
|
|
36
|
-
For provider-specific Prisma Next reference docs, see `prisma-next.md`. Agent-specific project guidance
|
|
36
|
+
For provider-specific Prisma Next reference docs, see `prisma-next.md`. Agent-specific project guidance starts in `.agents/skills/prisma-next/SKILL.md`.
|
|
37
37
|
|
|
38
38
|
Node-based Prisma Next projects expect Node.js 24 LTS or newer.
|
|
39
39
|
|
|
@@ -34,7 +34,7 @@ Database helper scripts are added to `package.json`:
|
|
|
34
34
|
|
|
35
35
|
- `{{runScriptCommand packageManager "db:seed"}}` - insert sample users manually
|
|
36
36
|
|
|
37
|
-
For provider-specific Prisma Next reference docs, see `prisma-next.md`. Agent-specific project guidance
|
|
37
|
+
For provider-specific Prisma Next reference docs, see `prisma-next.md`. Agent-specific project guidance starts in `.agents/skills/prisma-next/SKILL.md`.
|
|
38
38
|
|
|
39
39
|
Node-based Prisma Next projects expect Node.js 24 LTS or newer.
|
|
40
40
|
|
|
@@ -33,7 +33,7 @@ Database helper scripts are added to `package.json`:
|
|
|
33
33
|
|
|
34
34
|
- `{{runScriptCommand packageManager "db:seed"}}` - insert sample users manually
|
|
35
35
|
|
|
36
|
-
For provider-specific Prisma Next reference docs, see `prisma-next.md`. Agent-specific project guidance
|
|
36
|
+
For provider-specific Prisma Next reference docs, see `prisma-next.md`. Agent-specific project guidance starts in `.agents/skills/prisma-next/SKILL.md`.
|
|
37
37
|
|
|
38
38
|
Node-based Prisma Next projects expect Node.js 24 LTS or newer.
|
|
39
39
|
|
|
@@ -35,7 +35,7 @@ Database helper scripts are added to `package.json`:
|
|
|
35
35
|
|
|
36
36
|
- `{{runScriptCommand packageManager "db:seed"}}` - insert sample users manually
|
|
37
37
|
|
|
38
|
-
For provider-specific Prisma Next reference docs, see `prisma-next.md`. Agent-specific project guidance
|
|
38
|
+
For provider-specific Prisma Next reference docs, see `prisma-next.md`. Agent-specific project guidance starts in `.agents/skills/prisma-next/SKILL.md`.
|
|
39
39
|
The Nuxt Vite dev server also auto-emits Prisma Next contract artifacts when the contract changes.
|
|
40
40
|
|
|
41
41
|
Node-based Prisma Next projects expect Node.js 24 LTS or newer.
|
|
@@ -34,7 +34,7 @@ Database helper scripts are added to `package.json`:
|
|
|
34
34
|
|
|
35
35
|
- `{{runScriptCommand packageManager "db:seed"}}` - insert sample users manually
|
|
36
36
|
|
|
37
|
-
For provider-specific Prisma Next reference docs, see `prisma-next.md`. Agent-specific project guidance
|
|
37
|
+
For provider-specific Prisma Next reference docs, see `prisma-next.md`. Agent-specific project guidance starts in `.agents/skills/prisma-next/SKILL.md`.
|
|
38
38
|
The SvelteKit Vite dev server also auto-emits Prisma Next contract artifacts when the contract changes.
|
|
39
39
|
|
|
40
40
|
Node-based Prisma Next projects expect Node.js 24 LTS or newer.
|
|
@@ -34,7 +34,7 @@ Database helper scripts are added to `package.json`:
|
|
|
34
34
|
|
|
35
35
|
- `{{runScriptCommand packageManager "db:seed"}}` - insert sample users manually
|
|
36
36
|
|
|
37
|
-
For provider-specific Prisma Next reference docs, see `prisma-next.md`. Agent-specific project guidance
|
|
37
|
+
For provider-specific Prisma Next reference docs, see `prisma-next.md`. Agent-specific project guidance starts in `.agents/skills/prisma-next/SKILL.md`.
|
|
38
38
|
The TanStack Start Vite dev server also auto-emits Prisma Next contract artifacts when the contract changes.
|
|
39
39
|
|
|
40
40
|
Node-based Prisma Next projects expect Node.js 24 LTS or newer.
|