create-prisma 0.4.2-next.37.89.1 → 0.4.2-next.37.90.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-DMLjT4OB.mjs} +41 -9
- 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.90.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
|
|
@@ -1294,7 +1295,11 @@ function getSkillsSyncCliArgs(packageManager) {
|
|
|
1294
1295
|
]);
|
|
1295
1296
|
}
|
|
1296
1297
|
async function syncAgentSkillsForContext(context, projectDir) {
|
|
1297
|
-
if (!context.shouldInstall) return {
|
|
1298
|
+
if (!context.shouldInstall) return {
|
|
1299
|
+
didSyncAgentSkills: false,
|
|
1300
|
+
didSyncClaudeSkills: false
|
|
1301
|
+
};
|
|
1302
|
+
const claudeDirectory = await prepareClaudeSkillsDirectory(projectDir);
|
|
1298
1303
|
const syncCommand = getSkillsSyncCliCommand(context.packageManager);
|
|
1299
1304
|
if (context.verbose) log.step(`Running ${syncCommand}`);
|
|
1300
1305
|
try {
|
|
@@ -1308,15 +1313,40 @@ async function syncAgentSkillsForContext(context, projectDir) {
|
|
|
1308
1313
|
}
|
|
1309
1314
|
});
|
|
1310
1315
|
if (context.verbose) log.success("Prisma Next agent skills synced.");
|
|
1311
|
-
return {
|
|
1316
|
+
return {
|
|
1317
|
+
didSyncAgentSkills: true,
|
|
1318
|
+
didSyncClaudeSkills: claudeDirectory.warning === void 0,
|
|
1319
|
+
warning: claudeDirectory.warning
|
|
1320
|
+
};
|
|
1312
1321
|
} catch (error) {
|
|
1313
1322
|
if (context.verbose) log.warn("Could not sync Prisma Next agent skills.");
|
|
1323
|
+
if (claudeDirectory.didCreateClaudeRoot) await removeEmptyClaudeSkillsDirectory(projectDir);
|
|
1314
1324
|
return {
|
|
1315
1325
|
didSyncAgentSkills: false,
|
|
1316
|
-
|
|
1326
|
+
didSyncClaudeSkills: false,
|
|
1327
|
+
warning: [claudeDirectory.warning, `Agent skill sync failed: ${getCommandErrorMessage(error)}`].filter(Boolean).join("\n")
|
|
1317
1328
|
};
|
|
1318
1329
|
}
|
|
1319
1330
|
}
|
|
1331
|
+
async function prepareClaudeSkillsDirectory(projectDir) {
|
|
1332
|
+
const claudeRoot = path.join(projectDir, ".claude");
|
|
1333
|
+
const didCreateClaudeRoot = !await fs.pathExists(claudeRoot);
|
|
1334
|
+
try {
|
|
1335
|
+
await fs.ensureDir(path.join(projectDir, CLAUDE_SKILLS_DIR));
|
|
1336
|
+
return { didCreateClaudeRoot };
|
|
1337
|
+
} catch (error) {
|
|
1338
|
+
return {
|
|
1339
|
+
didCreateClaudeRoot: false,
|
|
1340
|
+
warning: `Could not prepare ${CLAUDE_SKILLS_DIR}: ${getCommandErrorMessage(error)}`
|
|
1341
|
+
};
|
|
1342
|
+
}
|
|
1343
|
+
}
|
|
1344
|
+
async function removeEmptyClaudeSkillsDirectory(projectDir) {
|
|
1345
|
+
const claudeSkillsDir = path.join(projectDir, CLAUDE_SKILLS_DIR);
|
|
1346
|
+
const claudeRoot = path.dirname(claudeSkillsDir);
|
|
1347
|
+
if (await fs.pathExists(claudeSkillsDir) && (await fs.readdir(claudeSkillsDir)).length === 0) await fs.remove(claudeSkillsDir);
|
|
1348
|
+
if (await fs.pathExists(claudeRoot) && (await fs.readdir(claudeRoot)).length === 0) await fs.remove(claudeRoot);
|
|
1349
|
+
}
|
|
1320
1350
|
async function finalizePrismaFilesForContext(context, projectDir, provisionResult) {
|
|
1321
1351
|
try {
|
|
1322
1352
|
await finalizePrismaFiles({
|
|
@@ -1389,7 +1419,7 @@ function buildNextStepsForContext(opts) {
|
|
|
1389
1419
|
});
|
|
1390
1420
|
if (!didSyncAgentSkills) nextSteps.push({
|
|
1391
1421
|
command: getRunScriptCommand(context.packageManager, "skills:sync"),
|
|
1392
|
-
description: "Sync the Prisma Next agent skills
|
|
1422
|
+
description: "Sync the Prisma Next agent skills from installed packages."
|
|
1393
1423
|
});
|
|
1394
1424
|
if (!didEmitContract || !context.shouldEmit) nextSteps.push({
|
|
1395
1425
|
command: getRunScriptCommand(context.packageManager, "contract:emit"),
|
|
@@ -1424,15 +1454,17 @@ function buildNextStepsForContext(opts) {
|
|
|
1424
1454
|
function formatNextSteps(nextSteps) {
|
|
1425
1455
|
return nextSteps.map((step) => `${step.command}\n ${step.description}`).join("\n\n");
|
|
1426
1456
|
}
|
|
1427
|
-
function formatAgentPrompt(didSyncAgentSkills) {
|
|
1428
|
-
|
|
1457
|
+
function formatAgentPrompt(didSyncAgentSkills, didSyncClaudeSkills) {
|
|
1458
|
+
const promptLines = [
|
|
1429
1459
|
"Ask your agent:",
|
|
1430
1460
|
"What can I do with Prisma Next?",
|
|
1431
1461
|
"",
|
|
1432
1462
|
"Learn more:",
|
|
1433
1463
|
`Docs: prisma-next.md`,
|
|
1434
1464
|
`Skill: ${didSyncAgentSkills ? ".agents/skills/prisma-next/SKILL.md" : ".agents/skills/prisma-next/SKILL.md (after skills sync)"}`
|
|
1435
|
-
]
|
|
1465
|
+
];
|
|
1466
|
+
if (didSyncClaudeSkills) promptLines.push(`Claude: .claude/skills/prisma-next/SKILL.md`);
|
|
1467
|
+
return promptLines.join("\n");
|
|
1436
1468
|
}
|
|
1437
1469
|
async function executePrismaSetupContext(context, options = {}) {
|
|
1438
1470
|
const projectDir = path.resolve(options.projectDir ?? context.projectDir);
|
|
@@ -1483,7 +1515,7 @@ async function executePrismaSetupContext(context, options = {}) {
|
|
|
1483
1515
|
});
|
|
1484
1516
|
progressSpinner?.stop("Prisma Next project ready.");
|
|
1485
1517
|
if (warningLines.length > 0) note(warningLines.map((line) => line.replace(/^- /, "")).join("\n"), "Heads up");
|
|
1486
|
-
note(formatAgentPrompt(skillSyncResult.didSyncAgentSkills), "Agent prompt");
|
|
1518
|
+
note(formatAgentPrompt(skillSyncResult.didSyncAgentSkills, skillSyncResult.didSyncClaudeSkills), "Agent prompt");
|
|
1487
1519
|
if (context.verbose) note(formatNextSteps(nextSteps), "Next steps for Prisma Next");
|
|
1488
1520
|
outro("Prisma Next setup complete.");
|
|
1489
1521
|
return true;
|
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-DMLjT4OB.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.90.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`; after skills sync, Claude Code also gets `.claude/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`; after skills sync, Claude Code also gets `.claude/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`; after skills sync, Claude Code also gets `.claude/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`; after skills sync, Claude Code also gets `.claude/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`; after skills sync, Claude Code also gets `.claude/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`; after skills sync, Claude Code also gets `.claude/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`; after skills sync, Claude Code also gets `.claude/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`; after skills sync, Claude Code also gets `.claude/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.
|