create-prisma 0.11.4 → 0.11.5-pr.90.313.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 { a as ApplicationLayer } from "./json-output-
|
|
2
|
+
import { a as ApplicationLayer } from "./json-output-E8egB6FB.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-E8egB6FB.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
|
+
const CLI_VERSION = "0.11.5-pr.90.313.1";
|
|
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));
|
|
@@ -309,20 +309,14 @@ const applicationRuntime = ManagedRuntime.make(ApplicationLayer);
|
|
|
309
309
|
|
|
310
310
|
//#endregion
|
|
311
311
|
//#region src/telemetry/client.ts
|
|
312
|
-
const TELEMETRY_API_KEY = "
|
|
312
|
+
const TELEMETRY_API_KEY = "";
|
|
313
313
|
const TELEMETRY_HOST = "https://us.i.posthog.com";
|
|
314
314
|
const TELEMETRY_CONFIG_FILE = "telemetry.json";
|
|
315
315
|
const TELEMETRY_TIMEOUT_MS = 2e3;
|
|
316
316
|
const AnonymousId = Schema.String.check(Schema.isUUID(4));
|
|
317
317
|
const decodeAnonymousId = Schema.decodeUnknownExit(AnonymousId);
|
|
318
|
-
const isTruthyEnvValue = (value) => [
|
|
319
|
-
"1",
|
|
320
|
-
"true",
|
|
321
|
-
"yes",
|
|
322
|
-
"on"
|
|
323
|
-
].includes(String(value ?? "").trim().toLowerCase());
|
|
324
318
|
function shouldDisableTelemetry() {
|
|
325
|
-
return
|
|
319
|
+
return true;
|
|
326
320
|
}
|
|
327
321
|
function getTelemetryConfigDir() {
|
|
328
322
|
if (process.platform === "darwin") return path.join(os.homedir(), "Library", "Application Support", "create-prisma");
|
|
@@ -345,7 +339,7 @@ const getAnonymousIdEffect = Effect.fn("Telemetry.getAnonymousId")(function* ()
|
|
|
345
339
|
return anonymousId;
|
|
346
340
|
});
|
|
347
341
|
const getCommonProperties = () => ({
|
|
348
|
-
"cli-version": "0.11.
|
|
342
|
+
"cli-version": "0.11.5-pr.90.313.1",
|
|
349
343
|
"node-version": process.version,
|
|
350
344
|
platform: process.platform,
|
|
351
345
|
arch: process.arch
|
|
@@ -738,6 +732,13 @@ const scaffoldCreateSharedTemplatesEffect = Effect.fn("Templates.scaffoldShared"
|
|
|
738
732
|
context: createTemplateContext(options)
|
|
739
733
|
});
|
|
740
734
|
});
|
|
735
|
+
const scaffoldCreatePackageManagerTemplatesEffect = Effect.fn("Templates.scaffoldPackageManager")(function* (options) {
|
|
736
|
+
yield* renderTemplateTreeEffect({
|
|
737
|
+
templateRoot: yield* resolveTemplatesDirEffect("templates/create/_package-manager"),
|
|
738
|
+
outputDir: options.projectDir,
|
|
739
|
+
context: createTemplateContext(options)
|
|
740
|
+
});
|
|
741
|
+
});
|
|
741
742
|
const scaffoldCreateFrameworkTemplateEffect = Effect.fn("Templates.scaffoldFramework")(function* (options) {
|
|
742
743
|
yield* renderTemplateTreeEffect({
|
|
743
744
|
templateRoot: yield* resolveTemplatesDirEffect(`templates/create/${options.template}`),
|
|
@@ -747,6 +748,7 @@ const scaffoldCreateFrameworkTemplateEffect = Effect.fn("Templates.scaffoldFrame
|
|
|
747
748
|
});
|
|
748
749
|
const scaffoldCreateTemplateEffect = Effect.fn("Templates.scaffold")(function* (options) {
|
|
749
750
|
yield* scaffoldCreateFrameworkTemplateEffect(options);
|
|
751
|
+
yield* scaffoldCreatePackageManagerTemplatesEffect(options);
|
|
750
752
|
yield* scaffoldCreateSharedTemplatesEffect(options);
|
|
751
753
|
});
|
|
752
754
|
|
|
@@ -1696,6 +1698,14 @@ const executePrismaSetupContextEffect = Effect.fn("PrismaSetup.execute")(functio
|
|
|
1696
1698
|
let gitInitialization;
|
|
1697
1699
|
if (ownsProgress) yield* Effect.sync(() => progress.start("Creating Prisma 8 project..."));
|
|
1698
1700
|
yield* Effect.gen(function* () {
|
|
1701
|
+
yield* atCreateStage(scaffoldCreatePackageManagerTemplatesEffect({
|
|
1702
|
+
projectDir,
|
|
1703
|
+
projectName,
|
|
1704
|
+
template,
|
|
1705
|
+
provider: context.databaseProvider,
|
|
1706
|
+
authoring: context.authoring,
|
|
1707
|
+
packageManager: context.packageManager
|
|
1708
|
+
}), "configure_project", "project_configuration_failed");
|
|
1699
1709
|
yield* atCreateStage(writePrismaDependenciesEffect(context.databaseProvider, context.packageManager, context.authoring, projectDir), "configure_project", "project_configuration_failed");
|
|
1700
1710
|
yield* Effect.sync(() => progress?.message(`Installing dependencies with ${getInstallCommand(context.packageManager)}...`));
|
|
1701
1711
|
yield* atCreateStage(installProjectDependenciesEffect(context.packageManager, projectDir, {
|
package/package.json
CHANGED
|
File without changes
|