create-prisma 0.5.0 → 0.5.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/README.md +1 -0
- package/dist/cli.mjs +1 -1
- package/dist/{create-DH7xp0g_.mjs → create-QmR9Scj8.mjs} +17 -8
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -145,6 +145,7 @@ Prisma Compute deployment is currently supported for:
|
|
|
145
145
|
- Prisma IDE extension install
|
|
146
146
|
|
|
147
147
|
These can be selected interactively or enabled with flags.
|
|
148
|
+
When Prisma Compute deploy is selected, the skills add-on recommends the `prisma-compute` skill too.
|
|
148
149
|
|
|
149
150
|
## Deploy to Prisma Compute
|
|
150
151
|
|
package/dist/cli.mjs
CHANGED
|
@@ -107,6 +107,7 @@ const extensionTargets = [
|
|
|
107
107
|
const prismaSkillNames = [
|
|
108
108
|
"prisma-cli",
|
|
109
109
|
"prisma-client-api",
|
|
110
|
+
"prisma-compute",
|
|
110
111
|
"prisma-database-setup",
|
|
111
112
|
"prisma-upgrade-v7",
|
|
112
113
|
"prisma-postgres"
|
|
@@ -1382,8 +1383,9 @@ const SHARED_PRISMA_SKILLS = [
|
|
|
1382
1383
|
"prisma-upgrade-v7"
|
|
1383
1384
|
];
|
|
1384
1385
|
function getAvailablePrismaSkills(provider) {
|
|
1385
|
-
|
|
1386
|
-
return [...
|
|
1386
|
+
const skills = [...SHARED_PRISMA_SKILLS, "prisma-compute"];
|
|
1387
|
+
if (provider === "postgresql") return [...skills, "prisma-postgres"];
|
|
1388
|
+
return skills;
|
|
1387
1389
|
}
|
|
1388
1390
|
function getSkillOptions(provider) {
|
|
1389
1391
|
const available = getAvailablePrismaSkills(provider);
|
|
@@ -1398,6 +1400,11 @@ function getSkillOptions(provider) {
|
|
|
1398
1400
|
label: "prisma-client-api",
|
|
1399
1401
|
hint: "Prisma Client query patterns"
|
|
1400
1402
|
},
|
|
1403
|
+
"prisma-compute": {
|
|
1404
|
+
value: "prisma-compute",
|
|
1405
|
+
label: "prisma-compute",
|
|
1406
|
+
hint: "Prisma Compute deploy and hosting workflows"
|
|
1407
|
+
},
|
|
1401
1408
|
"prisma-database-setup": {
|
|
1402
1409
|
value: "prisma-database-setup",
|
|
1403
1410
|
label: "prisma-database-setup",
|
|
@@ -1443,9 +1450,10 @@ const EXTENSION_TARGET_OPTIONS = [
|
|
|
1443
1450
|
function uniqueValues(values) {
|
|
1444
1451
|
return Array.from(new Set(values));
|
|
1445
1452
|
}
|
|
1446
|
-
function getRecommendedPrismaSkills(provider, shouldUsePrismaPostgres) {
|
|
1447
|
-
const skills = [...
|
|
1448
|
-
if (
|
|
1453
|
+
function getRecommendedPrismaSkills(provider, shouldUsePrismaPostgres, shouldUseComputeDeploy) {
|
|
1454
|
+
const skills = [...SHARED_PRISMA_SKILLS];
|
|
1455
|
+
if (provider === "postgresql" && shouldUsePrismaPostgres) skills.push("prisma-postgres");
|
|
1456
|
+
if (shouldUseComputeDeploy) skills.push("prisma-compute");
|
|
1449
1457
|
return uniqueValues(skills);
|
|
1450
1458
|
}
|
|
1451
1459
|
async function promptForAddons() {
|
|
@@ -1543,7 +1551,7 @@ async function collectCreateAddonSetupContext(input, options) {
|
|
|
1543
1551
|
if (addons.length === 0) return null;
|
|
1544
1552
|
const scope = addons.includes("skills") || addons.includes("mcp") ? options.useDefaults ? DEFAULT_ADDON_SCOPE : await promptForAddonScope() : DEFAULT_ADDON_SCOPE;
|
|
1545
1553
|
if (!scope) return;
|
|
1546
|
-
const recommendedSkills = getRecommendedPrismaSkills(options.provider, options.shouldUsePrismaPostgres);
|
|
1554
|
+
const recommendedSkills = getRecommendedPrismaSkills(options.provider, options.shouldUsePrismaPostgres, options.shouldUseComputeDeploy);
|
|
1547
1555
|
const skills = !addons.includes("skills") ? [] : options.useDefaults ? recommendedSkills : await promptForPrismaSkills(options.provider, recommendedSkills);
|
|
1548
1556
|
if (!skills) return;
|
|
1549
1557
|
const skillsAgents = !addons.includes("skills") ? [] : options.useDefaults ? [...DEFAULT_SKILLS_AGENTS] : await promptForSkillsAgents();
|
|
@@ -2030,7 +2038,7 @@ async function getAnonymousId() {
|
|
|
2030
2038
|
}
|
|
2031
2039
|
function getCommonProperties() {
|
|
2032
2040
|
return {
|
|
2033
|
-
"cli-version": "0.5.
|
|
2041
|
+
"cli-version": "0.5.1",
|
|
2034
2042
|
"node-version": process.version,
|
|
2035
2043
|
platform: process.platform,
|
|
2036
2044
|
arch: process.arch
|
|
@@ -2325,7 +2333,8 @@ async function collectCreateContext(input) {
|
|
|
2325
2333
|
const addonSetupContext = await collectCreateAddonSetupContext(input, {
|
|
2326
2334
|
useDefaults,
|
|
2327
2335
|
provider: prismaSetupContext.databaseProvider,
|
|
2328
|
-
shouldUsePrismaPostgres: prismaSetupContext.shouldUsePrismaPostgres
|
|
2336
|
+
shouldUsePrismaPostgres: prismaSetupContext.shouldUsePrismaPostgres,
|
|
2337
|
+
shouldUseComputeDeploy: Boolean(computeDeployContext)
|
|
2329
2338
|
});
|
|
2330
2339
|
if (addonSetupContext === void 0) return;
|
|
2331
2340
|
return {
|
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-
|
|
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-QmR9Scj8.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.5.
|
|
7
|
+
const CLI_VERSION = "0.5.1";
|
|
8
8
|
const router = os.router({ create: os.meta({
|
|
9
9
|
description: "Create a new project with Prisma setup",
|
|
10
10
|
default: true,
|