create-prisma 0.4.2-pr.34.113.1 → 0.4.2-pr.34.114.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 CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import "./create-BBykW9GC.mjs";
2
+ import "./create-CzguBCmV.mjs";
3
3
  import { createCreatePrismaCli } from "./index.mjs";
4
4
 
5
5
  //#region src/cli.ts
@@ -1722,6 +1722,26 @@ const DEPLOY_OPTIONS_BY_TEMPLATE = {
1722
1722
  function getPrismaCliCommand(packageManager) {
1723
1723
  return getPackageExecutionCommand(getPrismaCliExecutionPackageManager(packageManager), [PRISMA_CLI_PACKAGE]);
1724
1724
  }
1725
+ function getPrismaCliAppDeployCommand(packageManager) {
1726
+ return getPackageExecutionCommand(getPrismaCliExecutionPackageManager(packageManager), [
1727
+ PRISMA_CLI_PACKAGE,
1728
+ "app",
1729
+ "deploy"
1730
+ ]);
1731
+ }
1732
+ function getComputeDeployScriptMap(context) {
1733
+ const deployArgs = [
1734
+ "--prod",
1735
+ "--framework",
1736
+ context.framework,
1737
+ ...context.httpPort ? ["--http-port", String(context.httpPort)] : []
1738
+ ];
1739
+ const deployCommand = [getPrismaCliAppDeployCommand(context.packageManager), ...deployArgs].join(" ");
1740
+ return {
1741
+ "compute:deploy": deployCommand,
1742
+ "compute:deploy:ci": `${deployCommand} --yes`
1743
+ };
1744
+ }
1725
1745
  function runPrismaCli(packageManager, args, options = {}) {
1726
1746
  const execution = getPackageExecutionArgs(getPrismaCliExecutionPackageManager(packageManager), [PRISMA_CLI_PACKAGE, ...args]);
1727
1747
  return execa(execution.command, execution.args, options);
@@ -1940,7 +1960,7 @@ async function getAnonymousId() {
1940
1960
  }
1941
1961
  function getCommonProperties() {
1942
1962
  return {
1943
- "cli-version": "0.4.2-pr.34.113.1",
1963
+ "cli-version": "0.4.2-pr.34.114.1",
1944
1964
  "node-version": process.version,
1945
1965
  platform: process.platform,
1946
1966
  arch: process.arch
@@ -2274,6 +2294,11 @@ async function executeCreateContext(context) {
2274
2294
  packageManager: context.prismaSetupContext.packageManager,
2275
2295
  projectDir: context.targetDirectory
2276
2296
  });
2297
+ if (context.computeDeployContext) await addPackageDependency({
2298
+ scripts: getComputeDeployScriptMap(context.computeDeployContext),
2299
+ scriptMode: "if-missing",
2300
+ projectDir: context.targetDirectory
2301
+ });
2277
2302
  } catch (error) {
2278
2303
  return {
2279
2304
  ok: false,
@@ -2327,7 +2352,10 @@ async function executeCreateContext(context) {
2327
2352
  stage: "compute_deploy",
2328
2353
  error: result.error
2329
2354
  };
2330
- if (result.ok) deployResult = result.result;
2355
+ if (result.ok) {
2356
+ deployResult = result.result;
2357
+ prismaResult.nextSteps.push(`- ${getRunScriptCommand(context.prismaSetupContext.packageManager, "compute:deploy")}`);
2358
+ }
2331
2359
  } catch (error) {
2332
2360
  return {
2333
2361
  ok: false,
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-BBykW9GC.mjs";
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-CzguBCmV.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-pr.34.113.1";
7
+ const CLI_VERSION = "0.4.2-pr.34.114.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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-prisma",
3
- "version": "0.4.2-pr.34.113.1",
3
+ "version": "0.4.2-pr.34.114.1",
4
4
  "private": false,
5
5
  "description": "Create Prisma 7 projects with first-party templates and great DX.",
6
6
  "homepage": "https://github.com/prisma/create-prisma",