create-prisma 0.9.3 → 0.9.4
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
|
@@ -50,7 +50,7 @@ async function getAnonymousId() {
|
|
|
50
50
|
}
|
|
51
51
|
function getCommonProperties() {
|
|
52
52
|
return {
|
|
53
|
-
"cli-version": "0.9.
|
|
53
|
+
"cli-version": "0.9.4",
|
|
54
54
|
"node-version": process.version,
|
|
55
55
|
platform: process.platform,
|
|
56
56
|
arch: process.arch
|
|
@@ -480,9 +480,9 @@ async function scaffoldCreateFrameworkTemplate(opts) {
|
|
|
480
480
|
const dependencyVersionMap = {
|
|
481
481
|
"@astrojs/node": "^10.0.2",
|
|
482
482
|
"@elysiajs/node": "^1.4.5",
|
|
483
|
-
"@prisma/composer": "0.
|
|
484
|
-
"@prisma/composer-prisma-cloud": "0.
|
|
485
|
-
"@prisma/orm-mongo": "8.0.0-rc.
|
|
483
|
+
"@prisma/composer": "0.14.0",
|
|
484
|
+
"@prisma/composer-prisma-cloud": "0.14.0",
|
|
485
|
+
"@prisma/orm-mongo": "8.0.0-rc.6",
|
|
486
486
|
"@prisma/orm-postgres": "8.0.0-rc.4",
|
|
487
487
|
"@sveltejs/adapter-node": "^5.3.2",
|
|
488
488
|
"@types/node": "^25.6.2",
|
|
@@ -494,11 +494,11 @@ const dependencyVersionMap = {
|
|
|
494
494
|
mongodb: "^7.1.0",
|
|
495
495
|
"mongodb-memory-server": "^11.1.0",
|
|
496
496
|
nitro: "^3.0.260610-beta",
|
|
497
|
-
prisma: "
|
|
497
|
+
prisma: "8.0.0-rc.9",
|
|
498
498
|
tsx: "^4.21.0",
|
|
499
499
|
typescript: "^5.9.3"
|
|
500
500
|
};
|
|
501
|
-
const PRISMA_PLATFORM_CLI_PACKAGE = "prisma@
|
|
501
|
+
const PRISMA_PLATFORM_CLI_PACKAGE = "prisma@8.0.0-rc.9";
|
|
502
502
|
const PRISMA_DENO_CLI_PACKAGE = "prisma-next";
|
|
503
503
|
function getDependencyVersion(packageName) {
|
|
504
504
|
return dependencyVersionMap[packageName];
|
|
@@ -1228,14 +1228,29 @@ async function ensureComposerTypeScriptOptions(projectDir) {
|
|
|
1228
1228
|
if (updated === tsconfig) throw new Error("tsconfig.json is missing compilerOptions.");
|
|
1229
1229
|
await fs.writeFile(tsconfigPath, updated, "utf8");
|
|
1230
1230
|
}
|
|
1231
|
-
async function
|
|
1232
|
-
const invocation = getPrismaCliInvocation(context.packageManager,
|
|
1231
|
+
async function runPrismaCli(context, projectDir, args) {
|
|
1232
|
+
const invocation = getPrismaCliInvocation(context.packageManager, args);
|
|
1233
1233
|
if (context.verbose) log.step([invocation.command, ...invocation.args].join(" "));
|
|
1234
1234
|
await execa(invocation.command, invocation.args, {
|
|
1235
1235
|
cwd: projectDir,
|
|
1236
|
-
stdio: context.verbose ? "inherit" : "pipe"
|
|
1236
|
+
stdio: context.verbose ? "inherit" : "pipe",
|
|
1237
|
+
env: {
|
|
1238
|
+
...process.env,
|
|
1239
|
+
CI: "1"
|
|
1240
|
+
}
|
|
1237
1241
|
});
|
|
1238
1242
|
}
|
|
1243
|
+
async function emitContract(context, projectDir) {
|
|
1244
|
+
await runPrismaCli(context, projectDir, ["contract", "emit"]);
|
|
1245
|
+
}
|
|
1246
|
+
async function planBaselineMigration(context, projectDir) {
|
|
1247
|
+
await runPrismaCli(context, projectDir, [
|
|
1248
|
+
"migration",
|
|
1249
|
+
"plan",
|
|
1250
|
+
"--name",
|
|
1251
|
+
"init"
|
|
1252
|
+
]);
|
|
1253
|
+
}
|
|
1239
1254
|
function formatNextSteps(steps) {
|
|
1240
1255
|
return steps.map((step) => `${step.command}\n ${step.description}`).join("\n\n");
|
|
1241
1256
|
}
|
|
@@ -1302,6 +1317,10 @@ async function executePrismaSetupContext(context, options = {}) {
|
|
|
1302
1317
|
await initializeAgentSkills(context, projectDir);
|
|
1303
1318
|
progress?.message("Generating Prisma 8 contract artifacts...");
|
|
1304
1319
|
await emitContract(context, projectDir);
|
|
1320
|
+
if (context.databaseProvider === "postgres") {
|
|
1321
|
+
progress?.message("Authoring the baseline migration...");
|
|
1322
|
+
await planBaselineMigration(context, projectDir);
|
|
1323
|
+
}
|
|
1305
1324
|
if (options.initializeGit) {
|
|
1306
1325
|
progress?.message("Initializing Git repository...");
|
|
1307
1326
|
gitInitialization = await initializeGitRepository(projectDir);
|
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-Ba53NkCH.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.9.
|
|
8
|
+
const CLI_VERSION = "0.9.4";
|
|
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;
|