create-prisma 0.11.7-pr.95.325.1 → 0.11.7
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 { a as ApplicationLayer } from "./json-output-
|
|
2
|
+
import { a as ApplicationLayer } from "./json-output-Cow6mEVn.mjs";
|
|
3
3
|
import { runCreatePrismaCli } from "./index.mjs";
|
|
4
4
|
import { Effect } from "effect";
|
|
5
5
|
import { NodeRuntime } from "@effect/platform-node-shared";
|
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { _ as databaseProviderInputs, c as CreateCommandResultSchema, d as CreateCommandInputSchema, f as CreateTemplateSchema, g as createTemplates, h as authoringStyles, i as getErrorMessage, l as createCommandFailureResult, m as PackageManagerSchema, n as writeJsonResult, o as applicationRuntime, p as DatabaseProviderSchema, r as runCreateCommandEffect, s as CREATE_PRISMA_RESULT_SCHEMA_VERSION, t as isJsonOutputRequested, u as AuthoringStyleSchema, v as normalizeDatabaseProvider, y as packageManagers } from "./json-output-
|
|
2
|
+
import { _ as databaseProviderInputs, c as CreateCommandResultSchema, d as CreateCommandInputSchema, f as CreateTemplateSchema, g as createTemplates, h as authoringStyles, i as getErrorMessage, l as createCommandFailureResult, m as PackageManagerSchema, n as writeJsonResult, o as applicationRuntime, p as DatabaseProviderSchema, r as runCreateCommandEffect, s as CREATE_PRISMA_RESULT_SCHEMA_VERSION, t as isJsonOutputRequested, u as AuthoringStyleSchema, v as normalizeDatabaseProvider, y as packageManagers } from "./json-output-Cow6mEVn.mjs";
|
|
3
3
|
import { Console, Effect, Option } from "effect";
|
|
4
4
|
import { Argument, CliError, Command, Flag } from "effect/unstable/cli";
|
|
5
5
|
|
|
6
6
|
//#region src/index.ts
|
|
7
|
-
const CLI_VERSION = "0.11.7
|
|
7
|
+
const CLI_VERSION = "0.11.7";
|
|
8
8
|
const optionalArgument = (name, description) => Argument.string(name).pipe(Argument.withDescription(description), Argument.optional, Argument.map(Option.getOrUndefined));
|
|
9
9
|
const optionalBoolean = (name, description) => Flag.boolean(name).pipe(Flag.withDescription(description), Flag.optional, Flag.map(Option.getOrUndefined));
|
|
10
10
|
const optionalString = (name, description) => Flag.string(name).pipe(Flag.withDescription(description), Flag.optional, Flag.map(Option.getOrUndefined));
|
|
@@ -310,14 +310,20 @@ const applicationRuntime = ManagedRuntime.make(ApplicationLayer);
|
|
|
310
310
|
|
|
311
311
|
//#endregion
|
|
312
312
|
//#region src/telemetry/client.ts
|
|
313
|
-
const TELEMETRY_API_KEY = "";
|
|
313
|
+
const TELEMETRY_API_KEY = "phc_cmc85avbWyuJ2JyKdGPdv7dxXli8xLdWDBPbvIXWJfs";
|
|
314
314
|
const TELEMETRY_HOST = "https://us.i.posthog.com";
|
|
315
315
|
const TELEMETRY_CONFIG_FILE = "telemetry.json";
|
|
316
316
|
const TELEMETRY_TIMEOUT_MS = 2e3;
|
|
317
317
|
const AnonymousId = Schema.String.check(Schema.isUUID(4));
|
|
318
318
|
const decodeAnonymousId = Schema.decodeUnknownExit(AnonymousId);
|
|
319
|
+
const isTruthyEnvValue = (value) => [
|
|
320
|
+
"1",
|
|
321
|
+
"true",
|
|
322
|
+
"yes",
|
|
323
|
+
"on"
|
|
324
|
+
].includes(String(value ?? "").trim().toLowerCase());
|
|
319
325
|
function shouldDisableTelemetry() {
|
|
320
|
-
return
|
|
326
|
+
return isTruthyEnvValue(process.env.CI) || isTruthyEnvValue(process.env.GITHUB_ACTIONS) || process.env.CREATE_PRISMA_DISABLE_TELEMETRY !== void 0 || process.env.CREATE_PRISMA_TELEMETRY_DISABLED !== void 0 || process.env.DO_NOT_TRACK !== void 0;
|
|
321
327
|
}
|
|
322
328
|
function getTelemetryConfigDir() {
|
|
323
329
|
if (process.platform === "darwin") return path.join(os.homedir(), "Library", "Application Support", "create-prisma");
|
|
@@ -340,7 +346,7 @@ const getAnonymousIdEffect = Effect.fn("Telemetry.getAnonymousId")(function* ()
|
|
|
340
346
|
return anonymousId;
|
|
341
347
|
});
|
|
342
348
|
const getCommonProperties = () => ({
|
|
343
|
-
"cli-version": "0.11.7
|
|
349
|
+
"cli-version": "0.11.7",
|
|
344
350
|
"node-version": process.version,
|
|
345
351
|
platform: process.platform,
|
|
346
352
|
arch: process.arch
|
package/package.json
CHANGED