create-prisma 0.3.2-pr.31.56.1 → 0.3.2-pr.31.57.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
|
@@ -276,7 +276,7 @@ function getRuntimeScriptCommand(packageManager, kind, options) {
|
|
|
276
276
|
switch (kind) {
|
|
277
277
|
case "dev": return `tsx watch ${sourceEntrypoint}`;
|
|
278
278
|
case "build": return "tsc";
|
|
279
|
-
case "start": return `
|
|
279
|
+
case "start": return builtEntrypoint ? `node ${builtEntrypoint}` : `tsx ${sourceEntrypoint}`;
|
|
280
280
|
}
|
|
281
281
|
}
|
|
282
282
|
function getInstallArgs(packageManager) {
|
|
@@ -1609,7 +1609,7 @@ async function getAnonymousId() {
|
|
|
1609
1609
|
}
|
|
1610
1610
|
function getCommonProperties() {
|
|
1611
1611
|
return {
|
|
1612
|
-
"cli-version": "0.3.2-pr.31.
|
|
1612
|
+
"cli-version": "0.3.2-pr.31.57.1",
|
|
1613
1613
|
"node-version": process.version,
|
|
1614
1614
|
platform: process.platform,
|
|
1615
1615
|
arch: process.arch
|
|
@@ -1866,7 +1866,7 @@ async function collectCreateContext(input) {
|
|
|
1866
1866
|
const useDefaults = input.yes === true;
|
|
1867
1867
|
const force = input.force === true;
|
|
1868
1868
|
const projectNameInput = input.name ?? (useDefaults ? DEFAULT_PROJECT_NAME : await promptForProjectName());
|
|
1869
|
-
if (
|
|
1869
|
+
if (projectNameInput === void 0) return;
|
|
1870
1870
|
const projectName = String(projectNameInput).trim();
|
|
1871
1871
|
const projectNameValidationError = validateProjectName(projectName);
|
|
1872
1872
|
if (projectNameValidationError) {
|
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-B39mwJIP.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.3.2-pr.31.
|
|
7
|
+
const CLI_VERSION = "0.3.2-pr.31.57.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
|
@@ -13,7 +13,7 @@ import { prisma } from "./lib/prisma{{#if (eq packageManager "deno")}}.ts{{/if}}
|
|
|
13
13
|
const rawPort = ({{#if (eq packageManager "deno")}}Deno.env.get("PORT"){{else}}process.env.PORT{{/if}} ?? "").trim();
|
|
14
14
|
const parsedPort = rawPort.length > 0 ? Number(rawPort) : Number.NaN;
|
|
15
15
|
const port =
|
|
16
|
-
Number.
|
|
16
|
+
Number.isInteger(parsedPort) && parsedPort >= 0 && parsedPort <= 65535 ? parsedPort : 3000;
|
|
17
17
|
|
|
18
18
|
const app = new Elysia({{#if (eq packageManager "deno")}}{{else}}{ adapter: node() }{{/if}})
|
|
19
19
|
.get("/", () => {
|
|
@@ -31,7 +31,7 @@ app.get("/users", async (c) => {
|
|
|
31
31
|
const rawPort = ({{#if (eq packageManager "deno")}}Deno.env.get("PORT"){{else}}process.env.PORT{{/if}} ?? "").trim();
|
|
32
32
|
const parsedPort = rawPort.length > 0 ? Number(rawPort) : Number.NaN;
|
|
33
33
|
const port =
|
|
34
|
-
Number.
|
|
34
|
+
Number.isInteger(parsedPort) && parsedPort >= 0 && parsedPort <= 65535 ? parsedPort : 3000;
|
|
35
35
|
serve({
|
|
36
36
|
fetch: app.fetch,
|
|
37
37
|
port,
|