create-prisma 0.9.3-pr.64.236.1 → 0.9.3
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
|
@@ -14,12 +14,21 @@ import { createInterface } from "node:readline";
|
|
|
14
14
|
import { styleText } from "node:util";
|
|
15
15
|
|
|
16
16
|
//#region src/telemetry/client.ts
|
|
17
|
-
const TELEMETRY_API_KEY = "";
|
|
17
|
+
const TELEMETRY_API_KEY = "phc_cmc85avbWyuJ2JyKdGPdv7dxXli8xLdWDBPbvIXWJfs";
|
|
18
18
|
const TELEMETRY_HOST = "https://us.i.posthog.com";
|
|
19
19
|
const TELEMETRY_CONFIG_FILE = "telemetry.json";
|
|
20
20
|
const UUID_V4_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
21
|
+
function isTruthyEnvValue(value) {
|
|
22
|
+
return [
|
|
23
|
+
"1",
|
|
24
|
+
"true",
|
|
25
|
+
"yes",
|
|
26
|
+
"on"
|
|
27
|
+
].includes(String(value ?? "").trim().toLowerCase());
|
|
28
|
+
}
|
|
21
29
|
function shouldDisableTelemetry() {
|
|
22
|
-
return true;
|
|
30
|
+
if (isTruthyEnvValue(process.env.CI) || isTruthyEnvValue(process.env.GITHUB_ACTIONS)) return true;
|
|
31
|
+
return process.env.CREATE_PRISMA_DISABLE_TELEMETRY !== void 0 || process.env.CREATE_PRISMA_TELEMETRY_DISABLED !== void 0 || process.env.DO_NOT_TRACK !== void 0;
|
|
23
32
|
}
|
|
24
33
|
function getTelemetryConfigDir() {
|
|
25
34
|
if (process.platform === "darwin") return path.join(os.homedir(), "Library", "Application Support", "create-prisma");
|
|
@@ -41,7 +50,7 @@ async function getAnonymousId() {
|
|
|
41
50
|
}
|
|
42
51
|
function getCommonProperties() {
|
|
43
52
|
return {
|
|
44
|
-
"cli-version": "0.9.3
|
|
53
|
+
"cli-version": "0.9.3",
|
|
45
54
|
"node-version": process.version,
|
|
46
55
|
platform: process.platform,
|
|
47
56
|
arch: process.arch
|
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-CJa0JTWf.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.3
|
|
8
|
+
const CLI_VERSION = "0.9.3";
|
|
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