create-prisma 0.4.2-next.37.204.1 → 0.4.2-next.37.212.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 +6 -1
- package/dist/cli.mjs +1 -1
- package/dist/{create-DO0KhezB.mjs → create-4KBOFn2z.mjs} +235 -38
- package/dist/index.d.mts +2 -0
- package/dist/index.mjs +2 -2
- package/package.json +2 -2
- package/templates/create/astro/tsconfig.json +3 -0
- package/templates/create/elysia/tsconfig.json +2 -1
- package/templates/create/hono/tsconfig.json +2 -1
- package/templates/create/minimal/tsconfig.json +2 -1
- package/templates/create/nest/tsconfig.json +2 -1
- package/templates/create/next/tsconfig.json +1 -0
- package/templates/create/nuxt/tsconfig.json +3 -0
- package/templates/create/svelte/tsconfig.json +2 -1
- package/templates/create/tanstack-start/tsconfig.json +1 -1
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@ bunx create-prisma@next my-app
|
|
|
15
15
|
|
|
16
16
|
The CLI initializes Prisma 8 with `prisma@next`, installs dependencies, emits the contract, and generates a deployable Composer app. PostgreSQL projects use Composer's native Prisma Postgres provider, including migrations and a typed runtime client.
|
|
17
17
|
|
|
18
|
-
The
|
|
18
|
+
The deployment prompt is:
|
|
19
19
|
|
|
20
20
|
```text
|
|
21
21
|
Deploy to Prisma now?
|
|
@@ -23,6 +23,10 @@ Deploy to Prisma now?
|
|
|
23
23
|
|
|
24
24
|
Choose no to deploy later with the generated `deploy` script.
|
|
25
25
|
|
|
26
|
+
When multiple Prisma workspace sessions are available, the CLI asks which workspace should receive
|
|
27
|
+
the deployment. For unattended usage, pass `--workspace <id-or-name>` or omit it to use the active
|
|
28
|
+
workspace. Choosing another workspace also updates the Prisma CLI's active workspace session.
|
|
29
|
+
|
|
26
30
|
## Templates
|
|
27
31
|
|
|
28
32
|
- `minimal`
|
|
@@ -45,6 +49,7 @@ PostgreSQL and MongoDB are supported with PSL or TypeScript contract authoring.
|
|
|
45
49
|
- `--authoring psl|typescript`
|
|
46
50
|
- `--package-manager npm|pnpm|yarn|bun`
|
|
47
51
|
- `--deploy` / `--no-deploy`
|
|
52
|
+
- `--workspace <id-or-name>`
|
|
48
53
|
- `--yes`
|
|
49
54
|
- `--force`
|
|
50
55
|
- `--verbose`
|
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.212.1",
|
|
53
53
|
"node-version": process.version,
|
|
54
54
|
platform: process.platform,
|
|
55
55
|
arch: process.arch
|
|
@@ -178,7 +178,8 @@ const PrismaSetupOptionsSchema = z.object({
|
|
|
178
178
|
provider: DatabaseProviderSchema.optional().describe("Prisma 8 database target: PostgreSQL relational models or MongoDB document models"),
|
|
179
179
|
authoring: AuthoringStyleSchema.optional().describe("Contract authoring style"),
|
|
180
180
|
packageManager: PackageManagerSchema.optional().describe("Package manager used for dependency installation"),
|
|
181
|
-
deploy: z.boolean().optional().describe("Deploy the generated app to Prisma immediately")
|
|
181
|
+
deploy: z.boolean().optional().describe("Deploy the generated app to Prisma immediately"),
|
|
182
|
+
workspace: z.string().trim().min(1, "Please enter a valid workspace id or name").optional().describe("Prisma workspace id or name to deploy into")
|
|
182
183
|
});
|
|
183
184
|
const PrismaSetupCommandInputSchema = CommonCommandOptionsSchema.extend(PrismaSetupOptionsSchema.shape);
|
|
184
185
|
const CreateScaffoldOptionsSchema = z.object({
|
|
@@ -611,6 +612,15 @@ function getErrorMessage(error) {
|
|
|
611
612
|
if (error instanceof Error) return redactSecrets(error.message);
|
|
612
613
|
return redactSecrets(String(error));
|
|
613
614
|
}
|
|
615
|
+
function stripResourcePrefix(id, prefix) {
|
|
616
|
+
const marker = `${prefix}_`;
|
|
617
|
+
return id.startsWith(marker) ? id.slice(marker.length) : id;
|
|
618
|
+
}
|
|
619
|
+
function getConsoleProjectUrl(workspaceId, projectId) {
|
|
620
|
+
const consoleWorkspaceId = stripResourcePrefix(workspaceId, "wksp");
|
|
621
|
+
const consoleProjectId = stripResourcePrefix(projectId, "proj");
|
|
622
|
+
return `https://console.prisma.io/${encodeURIComponent(consoleWorkspaceId)}/${encodeURIComponent(consoleProjectId)}`;
|
|
623
|
+
}
|
|
614
624
|
function parsePrismaCliEnvelope(output) {
|
|
615
625
|
const lines = output.split(/\r?\n/).map((line) => line.trim()).filter(Boolean).reverse();
|
|
616
626
|
for (const line of lines) try {
|
|
@@ -622,37 +632,49 @@ function parsePrismaCliEnvelope(output) {
|
|
|
622
632
|
} catch {}
|
|
623
633
|
throw new Error("Prisma CLI returned output that is not a valid result envelope.");
|
|
624
634
|
}
|
|
625
|
-
function extractDeploymentUrl(output) {
|
|
626
|
-
return output.match(/https:\/\/[a-z0-9.-]+\.prisma\.build\/?/gi)?.at(-1)?.replace(/\/$/, "");
|
|
627
|
-
}
|
|
628
635
|
function getPrismaCliArgs(packageManager, args) {
|
|
629
636
|
return getPackageExecutionArgs(packageManager, [PRISMA_PLATFORM_CLI_PACKAGE, ...args]);
|
|
630
637
|
}
|
|
631
|
-
async function
|
|
632
|
-
const invocation = getPrismaCliArgs(packageManager, [
|
|
633
|
-
|
|
634
|
-
"whoami",
|
|
638
|
+
async function runPrismaJsonCommand(options) {
|
|
639
|
+
const invocation = getPrismaCliArgs(options.packageManager, [
|
|
640
|
+
...options.args,
|
|
635
641
|
"--json",
|
|
636
642
|
"--no-interactive"
|
|
637
643
|
]);
|
|
638
644
|
const result = await execa(invocation.command, invocation.args, {
|
|
639
|
-
cwd: projectDir,
|
|
645
|
+
cwd: options.projectDir,
|
|
640
646
|
env: process.env,
|
|
641
647
|
reject: false
|
|
642
648
|
});
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
649
|
+
if (options.forwardStderr && result.stderr) process.stderr.write(result.stderr.endsWith("\n") ? result.stderr : `${result.stderr}\n`);
|
|
650
|
+
let envelope;
|
|
651
|
+
try {
|
|
652
|
+
envelope = parsePrismaCliEnvelope(result.stdout);
|
|
653
|
+
} catch (error) {
|
|
654
|
+
if (result.exitCode !== 0 && result.stderr.trim()) throw new Error(result.stderr.trim());
|
|
655
|
+
throw error;
|
|
656
|
+
}
|
|
657
|
+
if (result.exitCode !== 0 || !envelope.ok || envelope.result === void 0) {
|
|
658
|
+
const summary = envelope.error?.summary ?? envelope.error?.message;
|
|
659
|
+
throw new Error([summary, envelope.error?.why].filter(Boolean).join(": ") || result.stderr.trim() || "Prisma CLI command failed.");
|
|
660
|
+
}
|
|
661
|
+
return envelope.result;
|
|
647
662
|
}
|
|
648
|
-
async function ensureAuthentication(packageManager, projectDir) {
|
|
649
|
-
|
|
663
|
+
async function ensureAuthentication(packageManager, projectDir, beforeInteractiveLogin) {
|
|
664
|
+
const whoami = () => runPrismaJsonCommand({
|
|
665
|
+
packageManager,
|
|
666
|
+
projectDir,
|
|
667
|
+
args: ["auth", "whoami"]
|
|
668
|
+
});
|
|
669
|
+
const authState = await whoami();
|
|
670
|
+
if (authState.authenticated) return authState;
|
|
650
671
|
const loginCommand = getPackageExecutionCommand(packageManager, [
|
|
651
672
|
PRISMA_PLATFORM_CLI_PACKAGE,
|
|
652
673
|
"auth",
|
|
653
674
|
"login"
|
|
654
675
|
]);
|
|
655
676
|
if (process.stdin.isTTY !== true) throw new Error(`Sign in first with ${loginCommand}, then run ${getRunScriptCommand(packageManager, "deploy")}.`);
|
|
677
|
+
beforeInteractiveLogin?.();
|
|
656
678
|
log.info("Sign in to Prisma to deploy.");
|
|
657
679
|
const login = getPrismaCliArgs(packageManager, ["auth", "login"]);
|
|
658
680
|
await execa(login.command, login.args, {
|
|
@@ -660,30 +682,180 @@ async function ensureAuthentication(packageManager, projectDir) {
|
|
|
660
682
|
env: process.env,
|
|
661
683
|
stdio: "inherit"
|
|
662
684
|
});
|
|
663
|
-
|
|
685
|
+
const authenticatedState = await whoami();
|
|
686
|
+
if (!authenticatedState.authenticated) throw new Error("Prisma sign-in completed without an active workspace session.");
|
|
687
|
+
return authenticatedState;
|
|
688
|
+
}
|
|
689
|
+
function workspaceLabel(workspace) {
|
|
690
|
+
return workspace.name ?? workspace.id;
|
|
691
|
+
}
|
|
692
|
+
async function useWorkspace(options) {
|
|
693
|
+
return (await runPrismaJsonCommand({
|
|
694
|
+
packageManager: options.packageManager,
|
|
695
|
+
projectDir: options.projectDir,
|
|
696
|
+
args: [
|
|
697
|
+
"auth",
|
|
698
|
+
"workspace",
|
|
699
|
+
"use",
|
|
700
|
+
options.workspace
|
|
701
|
+
]
|
|
702
|
+
})).workspace;
|
|
703
|
+
}
|
|
704
|
+
async function selectDeploymentWorkspace(options) {
|
|
705
|
+
const activeWorkspace = options.authState.workspace;
|
|
706
|
+
if (!activeWorkspace) throw new Error("The active Prisma credential does not specify a workspace.");
|
|
707
|
+
if (options.workspace) {
|
|
708
|
+
if (options.authState.source === "environment") {
|
|
709
|
+
if (options.workspace === activeWorkspace.id || options.workspace === activeWorkspace.name) return activeWorkspace;
|
|
710
|
+
throw new Error(`The environment credential is fixed to workspace ${workspaceLabel(activeWorkspace)}. Unset it before using --workspace ${options.workspace}.`);
|
|
711
|
+
}
|
|
712
|
+
return useWorkspace({
|
|
713
|
+
packageManager: options.packageManager,
|
|
714
|
+
projectDir: options.projectDir,
|
|
715
|
+
workspace: options.workspace
|
|
716
|
+
});
|
|
717
|
+
}
|
|
718
|
+
if (!options.shouldPrompt || process.stdin.isTTY !== true) return activeWorkspace;
|
|
719
|
+
const available = await runPrismaJsonCommand({
|
|
720
|
+
packageManager: options.packageManager,
|
|
721
|
+
projectDir: options.projectDir,
|
|
722
|
+
args: [
|
|
723
|
+
"auth",
|
|
724
|
+
"workspace",
|
|
725
|
+
"list"
|
|
726
|
+
]
|
|
727
|
+
});
|
|
728
|
+
if (available.items.length <= 1) return activeWorkspace;
|
|
729
|
+
options.beforePrompt?.();
|
|
730
|
+
const selectedWorkspaceId = await select({
|
|
731
|
+
message: "Select Prisma workspace for deployment",
|
|
732
|
+
initialValue: activeWorkspace.id,
|
|
733
|
+
options: available.items.map((workspace) => ({
|
|
734
|
+
value: workspace.workspaceId,
|
|
735
|
+
label: workspace.workspaceName ?? workspace.workspaceId,
|
|
736
|
+
hint: workspace.current ? `${workspace.workspaceId}, current` : workspace.workspaceId
|
|
737
|
+
}))
|
|
738
|
+
});
|
|
739
|
+
if (isCancel(selectedWorkspaceId)) {
|
|
740
|
+
cancel("Operation cancelled.");
|
|
741
|
+
return;
|
|
742
|
+
}
|
|
743
|
+
options.afterPrompt?.();
|
|
744
|
+
if (selectedWorkspaceId === activeWorkspace.id) return activeWorkspace;
|
|
745
|
+
return useWorkspace({
|
|
746
|
+
packageManager: options.packageManager,
|
|
747
|
+
projectDir: options.projectDir,
|
|
748
|
+
workspace: selectedWorkspaceId
|
|
749
|
+
});
|
|
750
|
+
}
|
|
751
|
+
function parseComposerDeployResult(result) {
|
|
752
|
+
const summary = result.summary;
|
|
753
|
+
if (!summary) return;
|
|
754
|
+
const computeService = summary.nodes.flatMap((node) => node.entities).find((entity) => entity.kind === "compute-service");
|
|
755
|
+
return {
|
|
756
|
+
appName: summary.app,
|
|
757
|
+
...computeService?.url ? { appUrl: computeService.url.replace(/\/$/, "") } : {}
|
|
758
|
+
};
|
|
759
|
+
}
|
|
760
|
+
async function getProjectDetails(options) {
|
|
761
|
+
try {
|
|
762
|
+
const result = await runPrismaJsonCommand({
|
|
763
|
+
packageManager: options.packageManager,
|
|
764
|
+
projectDir: options.projectDir,
|
|
765
|
+
args: [
|
|
766
|
+
"project",
|
|
767
|
+
"show",
|
|
768
|
+
"--project",
|
|
769
|
+
options.appName
|
|
770
|
+
]
|
|
771
|
+
});
|
|
772
|
+
if (!result.project) return;
|
|
773
|
+
return {
|
|
774
|
+
workspace: result.workspace,
|
|
775
|
+
project: {
|
|
776
|
+
id: result.project.id,
|
|
777
|
+
name: result.project.name,
|
|
778
|
+
consoleUrl: getConsoleProjectUrl(result.workspace.id, result.project.id)
|
|
779
|
+
}
|
|
780
|
+
};
|
|
781
|
+
} catch {
|
|
782
|
+
return;
|
|
783
|
+
}
|
|
664
784
|
}
|
|
665
785
|
async function deployWithComposer(options) {
|
|
666
786
|
const progress = options.verbose ? void 0 : spinner();
|
|
787
|
+
let progressRunning = false;
|
|
788
|
+
const showProgress = (message) => {
|
|
789
|
+
if (!progress) return;
|
|
790
|
+
if (progressRunning) progress.message(message);
|
|
791
|
+
else {
|
|
792
|
+
progress.start(message);
|
|
793
|
+
progressRunning = true;
|
|
794
|
+
}
|
|
795
|
+
};
|
|
796
|
+
const clearProgress = () => {
|
|
797
|
+
if (!progress || !progressRunning) return;
|
|
798
|
+
progress.clear();
|
|
799
|
+
progressRunning = false;
|
|
800
|
+
};
|
|
667
801
|
try {
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
const
|
|
671
|
-
|
|
802
|
+
showProgress("Checking Prisma account...");
|
|
803
|
+
if (options.verbose) log.step("Checking Prisma account.");
|
|
804
|
+
const authState = await ensureAuthentication(options.packageManager, options.projectDir, clearProgress);
|
|
805
|
+
showProgress("Checking Prisma workspace...");
|
|
806
|
+
if (options.verbose) log.step("Checking Prisma workspace.");
|
|
807
|
+
const selectedWorkspace = await selectDeploymentWorkspace({
|
|
808
|
+
packageManager: options.packageManager,
|
|
809
|
+
projectDir: options.projectDir,
|
|
810
|
+
shouldPrompt: options.shouldPromptForWorkspace,
|
|
811
|
+
authState,
|
|
812
|
+
beforePrompt: clearProgress,
|
|
813
|
+
afterPrompt: () => showProgress("Selecting Prisma workspace..."),
|
|
814
|
+
...options.workspace ? { workspace: options.workspace } : {}
|
|
815
|
+
});
|
|
816
|
+
if (!selectedWorkspace) return;
|
|
817
|
+
showProgress("Building for deployment...");
|
|
818
|
+
if (options.verbose) log.step("Building for deployment.");
|
|
819
|
+
const build = getRunScriptArgs(options.packageManager, "build");
|
|
820
|
+
await execa(build.command, build.args, {
|
|
672
821
|
cwd: options.projectDir,
|
|
673
822
|
env: process.env,
|
|
674
823
|
stdio: options.verbose ? "inherit" : "pipe"
|
|
675
824
|
});
|
|
825
|
+
showProgress("Deploying to Prisma...");
|
|
826
|
+
if (options.verbose) log.step("Deploying to Prisma.");
|
|
827
|
+
const deployment = parseComposerDeployResult(await runPrismaJsonCommand({
|
|
828
|
+
packageManager: options.packageManager,
|
|
829
|
+
projectDir: options.projectDir,
|
|
830
|
+
args: [
|
|
831
|
+
"composer",
|
|
832
|
+
"deploy",
|
|
833
|
+
"module.ts"
|
|
834
|
+
],
|
|
835
|
+
forwardStderr: options.verbose
|
|
836
|
+
}));
|
|
837
|
+
const appName = deployment?.appName ?? options.appName;
|
|
838
|
+
showProgress("Loading deployment details...");
|
|
839
|
+
const details = await getProjectDetails({
|
|
840
|
+
packageManager: options.packageManager,
|
|
841
|
+
projectDir: options.projectDir,
|
|
842
|
+
appName
|
|
843
|
+
});
|
|
676
844
|
progress?.stop("Deployed to Prisma.");
|
|
845
|
+
progressRunning = false;
|
|
677
846
|
if (options.verbose) log.success("Deployed to Prisma.");
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
847
|
+
const workspace = details?.workspace ?? selectedWorkspace;
|
|
848
|
+
return {
|
|
849
|
+
appName,
|
|
850
|
+
...deployment?.appUrl ? { appUrl: deployment.appUrl } : {},
|
|
851
|
+
...workspace ? { workspace } : {},
|
|
852
|
+
project: details?.project ?? { name: appName }
|
|
853
|
+
};
|
|
683
854
|
} catch (error) {
|
|
684
|
-
progress?.
|
|
855
|
+
progress?.error("Deployment failed.");
|
|
856
|
+
progressRunning = false;
|
|
685
857
|
log.error(`Deploy failed: ${getErrorMessage(error)}`);
|
|
686
|
-
return
|
|
858
|
+
return;
|
|
687
859
|
}
|
|
688
860
|
}
|
|
689
861
|
|
|
@@ -790,7 +962,9 @@ async function collectPrismaSetupContext(input, options = {}) {
|
|
|
790
962
|
databaseProvider,
|
|
791
963
|
authoring,
|
|
792
964
|
packageManager,
|
|
793
|
-
shouldDeploy
|
|
965
|
+
shouldDeploy,
|
|
966
|
+
shouldPromptForWorkspace: !useDefaults,
|
|
967
|
+
...input.workspace ? { workspace: input.workspace } : {}
|
|
794
968
|
};
|
|
795
969
|
}
|
|
796
970
|
function getCommandErrorMessage(error) {
|
|
@@ -870,6 +1044,20 @@ async function emitContract(context, projectDir) {
|
|
|
870
1044
|
function formatNextSteps(steps) {
|
|
871
1045
|
return steps.map((step) => `${step.command}\n ${step.description}`).join("\n\n");
|
|
872
1046
|
}
|
|
1047
|
+
function formatPlatformTarget(name, id) {
|
|
1048
|
+
return name ? `${name} (${id})` : id;
|
|
1049
|
+
}
|
|
1050
|
+
function formatProjectSummary(options) {
|
|
1051
|
+
const lines = [];
|
|
1052
|
+
if (options.createdProjectPath) lines.push(`Path: ${path.resolve(options.createdProjectPath)}`);
|
|
1053
|
+
if (options.deployment?.workspace) lines.push(`Workspace: ${formatPlatformTarget(options.deployment.workspace.name, options.deployment.workspace.id)}`);
|
|
1054
|
+
if (options.deployment) {
|
|
1055
|
+
lines.push(`Project: ${options.deployment.project.id ? formatPlatformTarget(options.deployment.project.name, options.deployment.project.id) : options.deployment.project.name}`);
|
|
1056
|
+
lines.push(`App: ${options.deployment.appUrl ?? options.deployment.appName}`);
|
|
1057
|
+
if (options.deployment.project.consoleUrl) lines.push(`Console: ${options.deployment.project.consoleUrl}`);
|
|
1058
|
+
}
|
|
1059
|
+
return lines.join("\n");
|
|
1060
|
+
}
|
|
873
1061
|
function buildNextSteps(context, options) {
|
|
874
1062
|
const nextSteps = [...options.prependNextSteps ?? []];
|
|
875
1063
|
if (context.databaseProvider === "mongo") nextSteps.push({
|
|
@@ -912,20 +1100,29 @@ async function executePrismaSetupContext(context, options = {}) {
|
|
|
912
1100
|
await emitContract(context, projectDir);
|
|
913
1101
|
progress?.stop("Prisma 8 project ready.");
|
|
914
1102
|
} catch (error) {
|
|
915
|
-
progress?.
|
|
1103
|
+
progress?.error("Could not create Prisma 8 project.");
|
|
916
1104
|
cancel(getCommandErrorMessage(error));
|
|
917
1105
|
return false;
|
|
918
1106
|
}
|
|
1107
|
+
let deployment;
|
|
919
1108
|
if (context.shouldDeploy) {
|
|
920
|
-
|
|
1109
|
+
deployment = await deployWithComposer({
|
|
1110
|
+
appName: projectName,
|
|
921
1111
|
packageManager: context.packageManager,
|
|
922
1112
|
projectDir,
|
|
923
|
-
|
|
924
|
-
|
|
1113
|
+
shouldPromptForWorkspace: context.shouldPromptForWorkspace,
|
|
1114
|
+
verbose: context.verbose,
|
|
1115
|
+
...context.workspace ? { workspace: context.workspace } : {}
|
|
1116
|
+
});
|
|
1117
|
+
if (!deployment) return false;
|
|
925
1118
|
}
|
|
926
|
-
|
|
1119
|
+
const projectSummary = formatProjectSummary({
|
|
1120
|
+
createdProjectPath: options.createdProjectPath,
|
|
1121
|
+
deployment
|
|
1122
|
+
});
|
|
1123
|
+
if (projectSummary) note(projectSummary, context.shouldDeploy ? "Deployment" : "Project");
|
|
927
1124
|
note(formatNextSteps(buildNextSteps(context, options)), "Next steps");
|
|
928
|
-
outro(context.shouldDeploy ? "Prisma 8 app deployed." : "Prisma 8
|
|
1125
|
+
outro(context.shouldDeploy ? "Prisma 8 app deployed." : "Prisma 8 project ready.");
|
|
929
1126
|
return true;
|
|
930
1127
|
}
|
|
931
1128
|
|
|
@@ -1167,7 +1364,7 @@ async function executeCreateContext(context) {
|
|
|
1167
1364
|
});
|
|
1168
1365
|
if (context.prismaSetupContext.verbose) log.success("Starter files scaffolded.");
|
|
1169
1366
|
} catch (error) {
|
|
1170
|
-
createSpinner?.
|
|
1367
|
+
createSpinner?.error("Could not create Prisma 8 project.");
|
|
1171
1368
|
return {
|
|
1172
1369
|
ok: false,
|
|
1173
1370
|
stage: "scaffold_template",
|
|
@@ -1181,7 +1378,7 @@ async function executeCreateContext(context) {
|
|
|
1181
1378
|
projectDir: context.targetDirectory
|
|
1182
1379
|
});
|
|
1183
1380
|
} catch (error) {
|
|
1184
|
-
createSpinner?.
|
|
1381
|
+
createSpinner?.error("Could not create Prisma 8 project.");
|
|
1185
1382
|
return {
|
|
1186
1383
|
ok: false,
|
|
1187
1384
|
stage: "scaffold_template",
|
|
@@ -1207,7 +1404,7 @@ async function executeCreateContext(context) {
|
|
|
1207
1404
|
stage: "prisma_setup"
|
|
1208
1405
|
};
|
|
1209
1406
|
} catch (error) {
|
|
1210
|
-
createSpinner?.
|
|
1407
|
+
createSpinner?.error("Could not create Prisma 8 project.");
|
|
1211
1408
|
return {
|
|
1212
1409
|
ok: false,
|
|
1213
1410
|
stage: "prisma_setup",
|
package/dist/index.d.mts
CHANGED
|
@@ -222,6 +222,7 @@ declare const CreateCommandInputSchema: z.ZodObject<{
|
|
|
222
222
|
bun: "bun";
|
|
223
223
|
}>>;
|
|
224
224
|
deploy: z.ZodOptional<z.ZodBoolean>;
|
|
225
|
+
workspace: z.ZodOptional<z.ZodString>;
|
|
225
226
|
name: z.ZodOptional<z.ZodString>;
|
|
226
227
|
template: z.ZodOptional<z.ZodEnum<{
|
|
227
228
|
minimal: "minimal";
|
|
@@ -260,6 +261,7 @@ declare const router: {
|
|
|
260
261
|
bun: "bun";
|
|
261
262
|
}>>;
|
|
262
263
|
deploy: z.ZodOptional<z.ZodBoolean>;
|
|
264
|
+
workspace: z.ZodOptional<z.ZodString>;
|
|
263
265
|
name: z.ZodOptional<z.ZodString>;
|
|
264
266
|
template: z.ZodOptional<z.ZodEnum<{
|
|
265
267
|
minimal: "minimal";
|
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-4KBOFn2z.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.4.2-next.37.
|
|
8
|
+
const CLI_VERSION = "0.4.2-next.37.212.1";
|
|
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;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-prisma",
|
|
3
|
-
"version": "0.4.2-next.37.
|
|
3
|
+
"version": "0.4.2-next.37.212.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Create Prisma 8 projects with first-party templates and great DX.",
|
|
6
6
|
"homepage": "https://github.com/prisma/create-prisma",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"release-notes": "bunx changelogithub"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@clack/prompts": "^1.0
|
|
53
|
+
"@clack/prompts": "^1.7.0",
|
|
54
54
|
"@orpc/server": "^1.13.5",
|
|
55
55
|
"execa": "^9.6.1",
|
|
56
56
|
"fs-extra": "^11.3.3",
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
"skipLibCheck": true,
|
|
11
11
|
"sourceMap": true,
|
|
12
12
|
"strict": true,
|
|
13
|
-
"moduleResolution": "bundler"
|
|
13
|
+
"moduleResolution": "bundler",
|
|
14
|
+
"types": ["node"]
|
|
14
15
|
}
|
|
15
16
|
// Path aliases are handled by https://svelte.dev/docs/kit/configuration#alias
|
|
16
17
|
// except $lib which is handled by https://svelte.dev/docs/kit/configuration#files
|