create-prisma 0.11.2 → 0.11.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 +5 -57
- package/dist/index.d.mts +198 -334
- package/dist/index.mjs +65 -29
- package/dist/json-output-DzDD1nb9.mjs +2131 -0
- package/package.json +5 -8
- package/dist/create-TR_gtjND.mjs +0 -1987
package/dist/cli.mjs
CHANGED
|
@@ -1,63 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { a as ApplicationLayer } from "./json-output-DzDD1nb9.mjs";
|
|
3
|
+
import { runCreatePrismaCli } from "./index.mjs";
|
|
4
|
+
import { Effect } from "effect";
|
|
5
|
+
import { NodeRuntime } from "@effect/platform-node-shared";
|
|
4
6
|
|
|
5
|
-
//#region src/ui/json-output.ts
|
|
6
|
-
function isCreateCommandResult(value) {
|
|
7
|
-
if (typeof value !== "object" || value === null) return false;
|
|
8
|
-
return Reflect.get(value, "schemaVersion") === 1 && typeof Reflect.get(value, "ok") === "boolean";
|
|
9
|
-
}
|
|
10
|
-
function formatLoggerMessage(values) {
|
|
11
|
-
return values.map((value) => {
|
|
12
|
-
if (value instanceof Error) return value.message;
|
|
13
|
-
if (typeof value === "string") return value.trim();
|
|
14
|
-
try {
|
|
15
|
-
return JSON.stringify(value);
|
|
16
|
-
} catch {
|
|
17
|
-
return String(value);
|
|
18
|
-
}
|
|
19
|
-
}).filter(Boolean).join(" ");
|
|
20
|
-
}
|
|
21
|
-
function isJsonOutputRequested(argv) {
|
|
22
|
-
let requested = false;
|
|
23
|
-
for (const [index, argument] of argv.entries()) {
|
|
24
|
-
if (argument === "--json") requested = argv[index + 1]?.toLowerCase() !== "false";
|
|
25
|
-
if (argument.startsWith("--json=")) requested = argument.slice(7).toLowerCase() !== "false";
|
|
26
|
-
if (argument === "--no-json") requested = false;
|
|
27
|
-
}
|
|
28
|
-
return requested;
|
|
29
|
-
}
|
|
30
|
-
function createJsonOutputLogger(write = (output) => process.stdout.write(output)) {
|
|
31
|
-
let didWrite = false;
|
|
32
|
-
const writeResult = (result) => {
|
|
33
|
-
if (didWrite) return;
|
|
34
|
-
didWrite = true;
|
|
35
|
-
write(`${JSON.stringify(result)}\n`);
|
|
36
|
-
};
|
|
37
|
-
return {
|
|
38
|
-
info(...values) {
|
|
39
|
-
const result = values.length === 1 ? values[0] : void 0;
|
|
40
|
-
if (isCreateCommandResult(result)) {
|
|
41
|
-
writeResult(result);
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
writeResult(createCommandFailureResult("parse_arguments", formatLoggerMessage(values) || "The CLI returned an unexpected result."));
|
|
45
|
-
},
|
|
46
|
-
error(...values) {
|
|
47
|
-
writeResult(createCommandFailureResult("parse_arguments", formatLoggerMessage(values) || "Could not parse command arguments."));
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
//#endregion
|
|
53
7
|
//#region src/cli.ts
|
|
54
|
-
|
|
55
|
-
...isJsonOutputRequested(process.argv) ? { logger: createJsonOutputLogger() } : {},
|
|
56
|
-
process: { exit(code) {
|
|
57
|
-
const commandExitCode = typeof process.exitCode === "number" && process.exitCode !== 0 ? process.exitCode : code;
|
|
58
|
-
process.exit(commandExitCode);
|
|
59
|
-
} }
|
|
60
|
-
});
|
|
8
|
+
runCreatePrismaCli().pipe(Effect.provide(ApplicationLayer), NodeRuntime.runMain({ disableErrorReporting: true }));
|
|
61
9
|
|
|
62
10
|
//#endregion
|
|
63
11
|
export { };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,348 +1,212 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
2
|
+
import { Context, Effect, Layer, Schema } from "effect";
|
|
3
|
+
import { Command } from "effect/unstable/cli";
|
|
4
|
+
import * as effect_FileSystem0 from "effect/FileSystem";
|
|
5
|
+
import * as effect_Cause0 from "effect/Cause";
|
|
6
6
|
|
|
7
|
-
//#region src/
|
|
8
|
-
type
|
|
9
|
-
|
|
7
|
+
//#region src/services/command-runner.d.ts
|
|
8
|
+
type CommandSpec = {
|
|
9
|
+
command: string;
|
|
10
|
+
args: readonly string[];
|
|
11
|
+
cwd: string;
|
|
12
|
+
env?: NodeJS.ProcessEnv;
|
|
13
|
+
stdio?: "pipe" | "inherit";
|
|
14
|
+
onStderrLine?: (line: string) => void;
|
|
15
|
+
};
|
|
16
|
+
type CommandResult = {
|
|
17
|
+
exitCode: number;
|
|
18
|
+
stdout: string;
|
|
19
|
+
stderr: string;
|
|
20
|
+
};
|
|
21
|
+
declare const CommandExecutionError_base: Schema.Class<CommandExecutionError, Schema.TaggedStruct<"CommandExecutionError", {
|
|
22
|
+
readonly command: Schema.String;
|
|
23
|
+
readonly args: Schema.$Array<Schema.String>;
|
|
24
|
+
readonly exitCode: Schema.optionalKey<Schema.Number>;
|
|
25
|
+
readonly stdout: Schema.String;
|
|
26
|
+
readonly stderr: Schema.String;
|
|
27
|
+
readonly cause: Schema.optionalKey<Schema.Defect>;
|
|
28
|
+
}>, effect_Cause0.YieldableError>;
|
|
29
|
+
declare class CommandExecutionError extends CommandExecutionError_base {
|
|
30
|
+
get message(): string;
|
|
31
|
+
}
|
|
32
|
+
declare const CommandRunner_base: Context.ServiceClass<CommandRunner, "create-prisma/services/CommandRunner", {
|
|
33
|
+
run(spec: CommandSpec): Effect.Effect<CommandResult, CommandExecutionError>;
|
|
34
|
+
runChecked(spec: CommandSpec): Effect.Effect<CommandResult, CommandExecutionError>;
|
|
35
|
+
}>;
|
|
36
|
+
declare class CommandRunner extends CommandRunner_base {
|
|
37
|
+
static readonly layer: Layer.Layer<CommandRunner, never, never>;
|
|
38
|
+
}
|
|
10
39
|
//#endregion
|
|
11
40
|
//#region src/types.d.ts
|
|
12
|
-
declare const DatabaseProviderSchema:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
psl: "psl";
|
|
29
|
-
typescript: "typescript";
|
|
30
|
-
}>;
|
|
31
|
-
type AuthoringStyle = z.infer<typeof AuthoringStyleSchema>;
|
|
32
|
-
declare const CreateTemplateSchema: z.ZodEnum<{
|
|
33
|
-
minimal: "minimal";
|
|
34
|
-
hono: "hono";
|
|
35
|
-
elysia: "elysia";
|
|
36
|
-
nest: "nest";
|
|
37
|
-
next: "next";
|
|
38
|
-
svelte: "svelte";
|
|
39
|
-
astro: "astro";
|
|
40
|
-
nuxt: "nuxt";
|
|
41
|
-
"tanstack-start": "tanstack-start";
|
|
41
|
+
declare const DatabaseProviderSchema: Schema.Literals<readonly ["postgres", "mongo"]>;
|
|
42
|
+
declare const PackageManagerSchema: Schema.Literals<readonly ["npm", "pnpm", "yarn", "bun", "deno"]>;
|
|
43
|
+
declare const AuthoringStyleSchema: Schema.Literals<readonly ["psl", "typescript"]>;
|
|
44
|
+
declare const CreateTemplateSchema: Schema.Literals<readonly ["minimal", "hono", "elysia", "nest", "next", "svelte", "astro", "nuxt", "tanstack-start"]>;
|
|
45
|
+
declare const CreateCommandInputSchema: Schema.Struct<{
|
|
46
|
+
readonly name: Schema.optionalKey<Schema.Trim>;
|
|
47
|
+
readonly template: Schema.optionalKey<Schema.Literals<readonly ["minimal", "hono", "elysia", "nest", "next", "svelte", "astro", "nuxt", "tanstack-start"]>>;
|
|
48
|
+
readonly force: Schema.optionalKey<Schema.Boolean>;
|
|
49
|
+
readonly provider: Schema.optionalKey<Schema.Literals<readonly ["postgres", "mongo"]>>;
|
|
50
|
+
readonly authoring: Schema.optionalKey<Schema.Literals<readonly ["psl", "typescript"]>>;
|
|
51
|
+
readonly packageManager: Schema.optionalKey<Schema.Literals<readonly ["npm", "pnpm", "yarn", "bun", "deno"]>>;
|
|
52
|
+
readonly deploy: Schema.optionalKey<Schema.Boolean>;
|
|
53
|
+
readonly workspace: Schema.optionalKey<Schema.decodeTo<Schema.NonEmptyString, Schema.Trim, never, never>>;
|
|
54
|
+
readonly yes: Schema.optionalKey<Schema.Boolean>;
|
|
55
|
+
readonly verbose: Schema.optionalKey<Schema.Boolean>;
|
|
56
|
+
readonly json: Schema.optionalKey<Schema.Boolean>;
|
|
42
57
|
}>;
|
|
43
|
-
type
|
|
44
|
-
declare const CreateCommandInputSchema: z.ZodObject<{
|
|
45
|
-
yes: z.ZodOptional<z.ZodBoolean>;
|
|
46
|
-
verbose: z.ZodOptional<z.ZodBoolean>;
|
|
47
|
-
json: z.ZodOptional<z.ZodBoolean>;
|
|
48
|
-
provider: z.ZodOptional<z.ZodPipe<z.ZodEnum<{
|
|
49
|
-
postgres: "postgres";
|
|
50
|
-
postgresql: "postgresql";
|
|
51
|
-
mongo: "mongo";
|
|
52
|
-
mongodb: "mongodb";
|
|
53
|
-
}>, z.ZodTransform<"postgres" | "mongo", "postgres" | "postgresql" | "mongo" | "mongodb">>>;
|
|
54
|
-
authoring: z.ZodOptional<z.ZodEnum<{
|
|
55
|
-
psl: "psl";
|
|
56
|
-
typescript: "typescript";
|
|
57
|
-
}>>;
|
|
58
|
-
packageManager: z.ZodOptional<z.ZodEnum<{
|
|
59
|
-
npm: "npm";
|
|
60
|
-
pnpm: "pnpm";
|
|
61
|
-
yarn: "yarn";
|
|
62
|
-
bun: "bun";
|
|
63
|
-
deno: "deno";
|
|
64
|
-
}>>;
|
|
65
|
-
deploy: z.ZodOptional<z.ZodBoolean>;
|
|
66
|
-
workspace: z.ZodOptional<z.ZodString>;
|
|
67
|
-
name: z.ZodOptional<z.ZodString>;
|
|
68
|
-
template: z.ZodOptional<z.ZodEnum<{
|
|
69
|
-
minimal: "minimal";
|
|
70
|
-
hono: "hono";
|
|
71
|
-
elysia: "elysia";
|
|
72
|
-
nest: "nest";
|
|
73
|
-
next: "next";
|
|
74
|
-
svelte: "svelte";
|
|
75
|
-
astro: "astro";
|
|
76
|
-
nuxt: "nuxt";
|
|
77
|
-
"tanstack-start": "tanstack-start";
|
|
78
|
-
}>>;
|
|
79
|
-
force: z.ZodOptional<z.ZodBoolean>;
|
|
80
|
-
}, z.core.$strip>;
|
|
81
|
-
type CreateCommandInput = z.infer<typeof CreateCommandInputSchema>;
|
|
58
|
+
type CreateCommandInput = typeof CreateCommandInputSchema.Type;
|
|
82
59
|
//#endregion
|
|
83
|
-
//#region src/
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
type ComposerDeployResult = {
|
|
89
|
-
appName: string;
|
|
90
|
-
appUrl?: string;
|
|
91
|
-
serviceId?: string;
|
|
92
|
-
workspace?: PrismaWorkspace;
|
|
93
|
-
project: {
|
|
94
|
-
id?: string;
|
|
95
|
-
name: string;
|
|
96
|
-
consoleUrl?: string;
|
|
97
|
-
};
|
|
98
|
-
};
|
|
60
|
+
//#region src/create-outcome.d.ts
|
|
61
|
+
declare const CreateFailureStageSchema: Schema.Literals<readonly ["validate_input", "collect_context", "scaffold_template", "initialize_prisma", "configure_project", "install_dependencies", "initialize_agent_skills", "emit_contract", "plan_migration", "initialize_git", "authenticate", "select_workspace", "check_project_name", "build", "composer_deploy", "unknown"]>;
|
|
62
|
+
type CreateFailureStage = typeof CreateFailureStageSchema.Type;
|
|
63
|
+
declare const CreateCancellationStageSchema: Schema.Literals<readonly ["project_name", "template", "database_provider", "authoring_style", "package_manager", "deployment_intent", "select_workspace"]>;
|
|
64
|
+
type CreateCancellationStage = typeof CreateCancellationStageSchema.Type;
|
|
99
65
|
//#endregion
|
|
100
66
|
//#region src/result.d.ts
|
|
101
67
|
declare const CREATE_PRISMA_RESULT_SCHEMA_VERSION: 1;
|
|
102
|
-
|
|
103
|
-
command:
|
|
104
|
-
description:
|
|
105
|
-
}
|
|
106
|
-
type
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
68
|
+
declare const CreateNextStepSchema: Schema.Struct<{
|
|
69
|
+
readonly command: Schema.String;
|
|
70
|
+
readonly description: Schema.String;
|
|
71
|
+
}>;
|
|
72
|
+
type CreateNextStep = typeof CreateNextStepSchema.Type;
|
|
73
|
+
declare const CreateProjectResultSchema: Schema.Struct<{
|
|
74
|
+
readonly name: Schema.String;
|
|
75
|
+
readonly path: Schema.String;
|
|
76
|
+
readonly template: Schema.Literals<readonly ["minimal", "hono", "elysia", "nest", "next", "svelte", "astro", "nuxt", "tanstack-start"]>;
|
|
77
|
+
readonly databaseProvider: Schema.Literals<readonly ["postgres", "mongo"]>;
|
|
78
|
+
readonly authoring: Schema.Literals<readonly ["psl", "typescript"]>;
|
|
79
|
+
readonly packageManager: Schema.Literals<readonly ["npm", "pnpm", "yarn", "bun", "deno"]>;
|
|
80
|
+
}>;
|
|
81
|
+
type CreateProjectResult = typeof CreateProjectResultSchema.Type;
|
|
114
82
|
type CreateCommandFailureStage = CreateFailureStage | CreateCancellationStage | "parse_arguments";
|
|
115
|
-
|
|
116
|
-
schemaVersion:
|
|
117
|
-
ok: true
|
|
118
|
-
project:
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
//#endregion
|
|
134
|
-
//#region node_modules/@orpc/client/dist/index.d.mts
|
|
135
|
-
declare const COMMON_ORPC_ERROR_DEFS: {
|
|
136
|
-
readonly BAD_REQUEST: {
|
|
137
|
-
readonly status: 400;
|
|
138
|
-
readonly message: "Bad Request";
|
|
139
|
-
};
|
|
140
|
-
readonly UNAUTHORIZED: {
|
|
141
|
-
readonly status: 401;
|
|
142
|
-
readonly message: "Unauthorized";
|
|
143
|
-
};
|
|
144
|
-
readonly FORBIDDEN: {
|
|
145
|
-
readonly status: 403;
|
|
146
|
-
readonly message: "Forbidden";
|
|
147
|
-
};
|
|
148
|
-
readonly NOT_FOUND: {
|
|
149
|
-
readonly status: 404;
|
|
150
|
-
readonly message: "Not Found";
|
|
151
|
-
};
|
|
152
|
-
readonly METHOD_NOT_SUPPORTED: {
|
|
153
|
-
readonly status: 405;
|
|
154
|
-
readonly message: "Method Not Supported";
|
|
155
|
-
};
|
|
156
|
-
readonly NOT_ACCEPTABLE: {
|
|
157
|
-
readonly status: 406;
|
|
158
|
-
readonly message: "Not Acceptable";
|
|
159
|
-
};
|
|
160
|
-
readonly TIMEOUT: {
|
|
161
|
-
readonly status: 408;
|
|
162
|
-
readonly message: "Request Timeout";
|
|
163
|
-
};
|
|
164
|
-
readonly CONFLICT: {
|
|
165
|
-
readonly status: 409;
|
|
166
|
-
readonly message: "Conflict";
|
|
167
|
-
};
|
|
168
|
-
readonly PRECONDITION_FAILED: {
|
|
169
|
-
readonly status: 412;
|
|
170
|
-
readonly message: "Precondition Failed";
|
|
171
|
-
};
|
|
172
|
-
readonly PAYLOAD_TOO_LARGE: {
|
|
173
|
-
readonly status: 413;
|
|
174
|
-
readonly message: "Payload Too Large";
|
|
175
|
-
};
|
|
176
|
-
readonly UNSUPPORTED_MEDIA_TYPE: {
|
|
177
|
-
readonly status: 415;
|
|
178
|
-
readonly message: "Unsupported Media Type";
|
|
179
|
-
};
|
|
180
|
-
readonly UNPROCESSABLE_CONTENT: {
|
|
181
|
-
readonly status: 422;
|
|
182
|
-
readonly message: "Unprocessable Content";
|
|
183
|
-
};
|
|
184
|
-
readonly TOO_MANY_REQUESTS: {
|
|
185
|
-
readonly status: 429;
|
|
186
|
-
readonly message: "Too Many Requests";
|
|
187
|
-
};
|
|
188
|
-
readonly CLIENT_CLOSED_REQUEST: {
|
|
189
|
-
readonly status: 499;
|
|
190
|
-
readonly message: "Client Closed Request";
|
|
191
|
-
};
|
|
192
|
-
readonly INTERNAL_SERVER_ERROR: {
|
|
193
|
-
readonly status: 500;
|
|
194
|
-
readonly message: "Internal Server Error";
|
|
195
|
-
};
|
|
196
|
-
readonly NOT_IMPLEMENTED: {
|
|
197
|
-
readonly status: 501;
|
|
198
|
-
readonly message: "Not Implemented";
|
|
199
|
-
};
|
|
200
|
-
readonly BAD_GATEWAY: {
|
|
201
|
-
readonly status: 502;
|
|
202
|
-
readonly message: "Bad Gateway";
|
|
203
|
-
};
|
|
204
|
-
readonly SERVICE_UNAVAILABLE: {
|
|
205
|
-
readonly status: 503;
|
|
206
|
-
readonly message: "Service Unavailable";
|
|
207
|
-
};
|
|
208
|
-
readonly GATEWAY_TIMEOUT: {
|
|
209
|
-
readonly status: 504;
|
|
210
|
-
readonly message: "Gateway Timeout";
|
|
211
|
-
};
|
|
212
|
-
};
|
|
213
|
-
type CommonORPCErrorCode = keyof typeof COMMON_ORPC_ERROR_DEFS;
|
|
214
|
-
type ORPCErrorCode = CommonORPCErrorCode | (string & {});
|
|
215
|
-
//#endregion
|
|
216
|
-
//#region node_modules/@standard-schema/spec/dist/index.d.ts
|
|
217
|
-
/** The Standard Typed interface. This is a base type extended by other specs. */
|
|
218
|
-
interface StandardTypedV1<Input = unknown, Output = Input> {
|
|
219
|
-
/** The Standard properties. */
|
|
220
|
-
readonly "~standard": StandardTypedV1.Props<Input, Output>;
|
|
221
|
-
}
|
|
222
|
-
declare namespace StandardTypedV1 {
|
|
223
|
-
/** The Standard Typed properties interface. */
|
|
224
|
-
interface Props<Input = unknown, Output = Input> {
|
|
225
|
-
/** The version number of the standard. */
|
|
226
|
-
readonly version: 1;
|
|
227
|
-
/** The vendor name of the schema library. */
|
|
228
|
-
readonly vendor: string;
|
|
229
|
-
/** Inferred types associated with the schema. */
|
|
230
|
-
readonly types?: Types<Input, Output> | undefined;
|
|
231
|
-
}
|
|
232
|
-
/** The Standard Typed types interface. */
|
|
233
|
-
interface Types<Input = unknown, Output = Input> {
|
|
234
|
-
/** The input type of the schema. */
|
|
235
|
-
readonly input: Input;
|
|
236
|
-
/** The output type of the schema. */
|
|
237
|
-
readonly output: Output;
|
|
238
|
-
}
|
|
239
|
-
/** Infers the input type of a Standard Typed. */
|
|
240
|
-
type InferInput<Schema extends StandardTypedV1> = NonNullable<Schema["~standard"]["types"]>["input"];
|
|
241
|
-
/** Infers the output type of a Standard Typed. */
|
|
242
|
-
type InferOutput<Schema extends StandardTypedV1> = NonNullable<Schema["~standard"]["types"]>["output"];
|
|
243
|
-
}
|
|
244
|
-
/** The Standard Schema interface. */
|
|
245
|
-
interface StandardSchemaV1<Input = unknown, Output = Input> {
|
|
246
|
-
/** The Standard Schema properties. */
|
|
247
|
-
readonly "~standard": StandardSchemaV1.Props<Input, Output>;
|
|
248
|
-
}
|
|
249
|
-
declare namespace StandardSchemaV1 {
|
|
250
|
-
/** The Standard Schema properties interface. */
|
|
251
|
-
interface Props<Input = unknown, Output = Input> extends StandardTypedV1.Props<Input, Output> {
|
|
252
|
-
/** Validates unknown input values. */
|
|
253
|
-
readonly validate: (value: unknown, options?: StandardSchemaV1.Options | undefined) => Result<Output> | Promise<Result<Output>>;
|
|
254
|
-
}
|
|
255
|
-
/** The result interface of the validate function. */
|
|
256
|
-
type Result<Output> = SuccessResult<Output> | FailureResult;
|
|
257
|
-
/** The result interface if validation succeeds. */
|
|
258
|
-
interface SuccessResult<Output> {
|
|
259
|
-
/** The typed output value. */
|
|
260
|
-
readonly value: Output;
|
|
261
|
-
/** A falsy value for `issues` indicates success. */
|
|
262
|
-
readonly issues?: undefined;
|
|
263
|
-
}
|
|
264
|
-
interface Options {
|
|
265
|
-
/** Explicit support for additional vendor-specific parameters, if needed. */
|
|
266
|
-
readonly libraryOptions?: Record<string, unknown> | undefined;
|
|
267
|
-
}
|
|
268
|
-
/** The result interface if validation fails. */
|
|
269
|
-
interface FailureResult {
|
|
270
|
-
/** The issues of failed validation. */
|
|
271
|
-
readonly issues: ReadonlyArray<Issue>;
|
|
272
|
-
}
|
|
273
|
-
/** The issue interface of the failure output. */
|
|
274
|
-
interface Issue {
|
|
275
|
-
/** The error message of the issue. */
|
|
276
|
-
readonly message: string;
|
|
277
|
-
/** The path of the issue, if any. */
|
|
278
|
-
readonly path?: ReadonlyArray<PropertyKey | PathSegment> | undefined;
|
|
279
|
-
}
|
|
280
|
-
/** The path segment interface of the issue. */
|
|
281
|
-
interface PathSegment {
|
|
282
|
-
/** The key representing a path segment. */
|
|
283
|
-
readonly key: PropertyKey;
|
|
284
|
-
}
|
|
285
|
-
/** The Standard types interface. */
|
|
286
|
-
interface Types<Input = unknown, Output = Input> extends StandardTypedV1.Types<Input, Output> {}
|
|
287
|
-
/** Infers the input type of a Standard. */
|
|
288
|
-
type InferInput<Schema extends StandardTypedV1> = StandardTypedV1.InferInput<Schema>;
|
|
289
|
-
/** Infers the output type of a Standard. */
|
|
290
|
-
type InferOutput<Schema extends StandardTypedV1> = StandardTypedV1.InferOutput<Schema>;
|
|
291
|
-
}
|
|
292
|
-
/** The Standard JSON Schema interface. */
|
|
293
|
-
//#endregion
|
|
294
|
-
//#region node_modules/@orpc/contract/dist/shared/contract.TuRtB1Ca.d.mts
|
|
295
|
-
type Schema<TInput, TOutput> = StandardSchemaV1<TInput, TOutput>;
|
|
296
|
-
type AnySchema = Schema<any, any>;
|
|
297
|
-
interface ErrorMapItem<TDataSchema extends AnySchema> {
|
|
298
|
-
status?: number;
|
|
299
|
-
message?: string;
|
|
300
|
-
data?: TDataSchema;
|
|
301
|
-
}
|
|
302
|
-
type ErrorMap = { [key in ORPCErrorCode]?: ErrorMapItem<AnySchema> };
|
|
303
|
-
type MergedErrorMap<T1 extends ErrorMap, T2 extends ErrorMap> = Omit<T1, keyof T2> & T2;
|
|
304
|
-
//#endregion
|
|
305
|
-
//#region src/index.d.ts
|
|
306
|
-
declare const router: {
|
|
307
|
-
create: _orpc_server0.Procedure<_orpc_server0.MergedInitialContext<Record<never, never>, Record<never, never>, Record<never, never>>, Record<never, never>, z.ZodTuple<[z.ZodOptional<z.ZodString>, z.ZodObject<{
|
|
308
|
-
yes: z.ZodOptional<z.ZodBoolean>;
|
|
309
|
-
verbose: z.ZodOptional<z.ZodBoolean>;
|
|
310
|
-
json: z.ZodOptional<z.ZodBoolean>;
|
|
311
|
-
provider: z.ZodOptional<z.ZodPipe<z.ZodEnum<{
|
|
312
|
-
postgres: "postgres";
|
|
313
|
-
postgresql: "postgresql";
|
|
314
|
-
mongo: "mongo";
|
|
315
|
-
mongodb: "mongodb";
|
|
316
|
-
}>, z.ZodTransform<"postgres" | "mongo", "postgres" | "postgresql" | "mongo" | "mongodb">>>;
|
|
317
|
-
authoring: z.ZodOptional<z.ZodEnum<{
|
|
318
|
-
psl: "psl";
|
|
319
|
-
typescript: "typescript";
|
|
320
|
-
}>>;
|
|
321
|
-
packageManager: z.ZodOptional<z.ZodEnum<{
|
|
322
|
-
npm: "npm";
|
|
323
|
-
pnpm: "pnpm";
|
|
324
|
-
yarn: "yarn";
|
|
325
|
-
bun: "bun";
|
|
326
|
-
deno: "deno";
|
|
83
|
+
declare const CreateCommandSuccessResultSchema: Schema.Struct<{
|
|
84
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
85
|
+
readonly ok: Schema.Literal<true>;
|
|
86
|
+
readonly project: Schema.Struct<{
|
|
87
|
+
readonly name: Schema.String;
|
|
88
|
+
readonly path: Schema.String;
|
|
89
|
+
readonly template: Schema.Literals<readonly ["minimal", "hono", "elysia", "nest", "next", "svelte", "astro", "nuxt", "tanstack-start"]>;
|
|
90
|
+
readonly databaseProvider: Schema.Literals<readonly ["postgres", "mongo"]>;
|
|
91
|
+
readonly authoring: Schema.Literals<readonly ["psl", "typescript"]>;
|
|
92
|
+
readonly packageManager: Schema.Literals<readonly ["npm", "pnpm", "yarn", "bun", "deno"]>;
|
|
93
|
+
}>;
|
|
94
|
+
readonly deployment: Schema.NullOr<Schema.Struct<{
|
|
95
|
+
readonly appName: Schema.String;
|
|
96
|
+
readonly appUrl: Schema.optionalKey<Schema.String>;
|
|
97
|
+
readonly serviceId: Schema.optionalKey<Schema.String>;
|
|
98
|
+
readonly workspace: Schema.optionalKey<Schema.Struct<{
|
|
99
|
+
readonly id: Schema.String;
|
|
100
|
+
readonly name: Schema.NullOr<Schema.String>;
|
|
327
101
|
}>>;
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
102
|
+
readonly project: Schema.Struct<{
|
|
103
|
+
readonly id: Schema.optionalKey<Schema.String>;
|
|
104
|
+
readonly name: Schema.String;
|
|
105
|
+
readonly consoleUrl: Schema.optionalKey<Schema.String>;
|
|
106
|
+
}>;
|
|
107
|
+
}>>;
|
|
108
|
+
readonly nextSteps: Schema.$Array<Schema.Struct<{
|
|
109
|
+
readonly command: Schema.String;
|
|
110
|
+
readonly description: Schema.String;
|
|
111
|
+
}>>;
|
|
112
|
+
readonly warnings: Schema.$Array<Schema.String>;
|
|
113
|
+
}>;
|
|
114
|
+
type CreateCommandSuccessResult = typeof CreateCommandSuccessResultSchema.Type;
|
|
115
|
+
declare const CreateCommandFailureResultSchema: Schema.Struct<{
|
|
116
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
117
|
+
readonly ok: Schema.Literal<false>;
|
|
118
|
+
readonly error: Schema.Struct<{
|
|
119
|
+
readonly stage: Schema.Union<readonly [Schema.Literals<readonly ["validate_input", "collect_context", "scaffold_template", "initialize_prisma", "configure_project", "install_dependencies", "initialize_agent_skills", "emit_contract", "plan_migration", "initialize_git", "authenticate", "select_workspace", "check_project_name", "build", "composer_deploy", "unknown"]>, Schema.Literals<readonly ["project_name", "template", "database_provider", "authoring_style", "package_manager", "deployment_intent", "select_workspace"]>, Schema.Literal<"parse_arguments">]>;
|
|
120
|
+
readonly message: Schema.String;
|
|
121
|
+
}>;
|
|
122
|
+
readonly project: Schema.optionalKey<Schema.Struct<{
|
|
123
|
+
readonly name: Schema.String;
|
|
124
|
+
readonly path: Schema.String;
|
|
125
|
+
readonly template: Schema.Literals<readonly ["minimal", "hono", "elysia", "nest", "next", "svelte", "astro", "nuxt", "tanstack-start"]>;
|
|
126
|
+
readonly databaseProvider: Schema.Literals<readonly ["postgres", "mongo"]>;
|
|
127
|
+
readonly authoring: Schema.Literals<readonly ["psl", "typescript"]>;
|
|
128
|
+
readonly packageManager: Schema.Literals<readonly ["npm", "pnpm", "yarn", "bun", "deno"]>;
|
|
129
|
+
}>>;
|
|
130
|
+
}>;
|
|
131
|
+
type CreateCommandFailureResult = typeof CreateCommandFailureResultSchema.Type;
|
|
132
|
+
declare const CreateCommandResultSchema: Schema.Union<readonly [Schema.Struct<{
|
|
133
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
134
|
+
readonly ok: Schema.Literal<true>;
|
|
135
|
+
readonly project: Schema.Struct<{
|
|
136
|
+
readonly name: Schema.String;
|
|
137
|
+
readonly path: Schema.String;
|
|
138
|
+
readonly template: Schema.Literals<readonly ["minimal", "hono", "elysia", "nest", "next", "svelte", "astro", "nuxt", "tanstack-start"]>;
|
|
139
|
+
readonly databaseProvider: Schema.Literals<readonly ["postgres", "mongo"]>;
|
|
140
|
+
readonly authoring: Schema.Literals<readonly ["psl", "typescript"]>;
|
|
141
|
+
readonly packageManager: Schema.Literals<readonly ["npm", "pnpm", "yarn", "bun", "deno"]>;
|
|
142
|
+
}>;
|
|
143
|
+
readonly deployment: Schema.NullOr<Schema.Struct<{
|
|
144
|
+
readonly appName: Schema.String;
|
|
145
|
+
readonly appUrl: Schema.optionalKey<Schema.String>;
|
|
146
|
+
readonly serviceId: Schema.optionalKey<Schema.String>;
|
|
147
|
+
readonly workspace: Schema.optionalKey<Schema.Struct<{
|
|
148
|
+
readonly id: Schema.String;
|
|
149
|
+
readonly name: Schema.NullOr<Schema.String>;
|
|
341
150
|
}>>;
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
151
|
+
readonly project: Schema.Struct<{
|
|
152
|
+
readonly id: Schema.optionalKey<Schema.String>;
|
|
153
|
+
readonly name: Schema.String;
|
|
154
|
+
readonly consoleUrl: Schema.optionalKey<Schema.String>;
|
|
155
|
+
}>;
|
|
156
|
+
}>>;
|
|
157
|
+
readonly nextSteps: Schema.$Array<Schema.Struct<{
|
|
158
|
+
readonly command: Schema.String;
|
|
159
|
+
readonly description: Schema.String;
|
|
160
|
+
}>>;
|
|
161
|
+
readonly warnings: Schema.$Array<Schema.String>;
|
|
162
|
+
}>, Schema.Struct<{
|
|
163
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
164
|
+
readonly ok: Schema.Literal<false>;
|
|
165
|
+
readonly error: Schema.Struct<{
|
|
166
|
+
readonly stage: Schema.Union<readonly [Schema.Literals<readonly ["validate_input", "collect_context", "scaffold_template", "initialize_prisma", "configure_project", "install_dependencies", "initialize_agent_skills", "emit_contract", "plan_migration", "initialize_git", "authenticate", "select_workspace", "check_project_name", "build", "composer_deploy", "unknown"]>, Schema.Literals<readonly ["project_name", "template", "database_provider", "authoring_style", "package_manager", "deployment_intent", "select_workspace"]>, Schema.Literal<"parse_arguments">]>;
|
|
167
|
+
readonly message: Schema.String;
|
|
168
|
+
}>;
|
|
169
|
+
readonly project: Schema.optionalKey<Schema.Struct<{
|
|
170
|
+
readonly name: Schema.String;
|
|
171
|
+
readonly path: Schema.String;
|
|
172
|
+
readonly template: Schema.Literals<readonly ["minimal", "hono", "elysia", "nest", "next", "svelte", "astro", "nuxt", "tanstack-start"]>;
|
|
173
|
+
readonly databaseProvider: Schema.Literals<readonly ["postgres", "mongo"]>;
|
|
174
|
+
readonly authoring: Schema.Literals<readonly ["psl", "typescript"]>;
|
|
175
|
+
readonly packageManager: Schema.Literals<readonly ["npm", "pnpm", "yarn", "bun", "deno"]>;
|
|
176
|
+
}>>;
|
|
177
|
+
}>]>;
|
|
178
|
+
type CreateCommandResult = typeof CreateCommandResultSchema.Type;
|
|
179
|
+
//#endregion
|
|
180
|
+
//#region src/index.d.ts
|
|
181
|
+
declare const createPrismaCommand: Command.Command<"create-prisma", {
|
|
182
|
+
readonly projectName: string | undefined;
|
|
183
|
+
readonly name: string | undefined;
|
|
184
|
+
readonly template: "minimal" | "hono" | "elysia" | "nest" | "next" | "svelte" | "astro" | "nuxt" | "tanstack-start" | undefined;
|
|
185
|
+
readonly provider: "postgres" | "mongo" | undefined;
|
|
186
|
+
readonly authoring: "psl" | "typescript" | undefined;
|
|
187
|
+
readonly packageManager: "npm" | "pnpm" | "yarn" | "bun" | "deno" | undefined;
|
|
188
|
+
readonly deploy: boolean | undefined;
|
|
189
|
+
readonly workspace: string | undefined;
|
|
190
|
+
readonly force: boolean | undefined;
|
|
191
|
+
readonly yes: boolean | undefined;
|
|
192
|
+
readonly verbose: boolean | undefined;
|
|
193
|
+
readonly json: boolean | undefined;
|
|
194
|
+
}, {}, never, effect_FileSystem0.FileSystem | CommandRunner>;
|
|
195
|
+
declare function createCreatePrismaCli(): Command.Command<"create-prisma", {
|
|
196
|
+
readonly projectName: string | undefined;
|
|
197
|
+
readonly name: string | undefined;
|
|
198
|
+
readonly template: "minimal" | "hono" | "elysia" | "nest" | "next" | "svelte" | "astro" | "nuxt" | "tanstack-start" | undefined;
|
|
199
|
+
readonly provider: "postgres" | "mongo" | undefined;
|
|
200
|
+
readonly authoring: "psl" | "typescript" | undefined;
|
|
201
|
+
readonly packageManager: "npm" | "pnpm" | "yarn" | "bun" | "deno" | undefined;
|
|
202
|
+
readonly deploy: boolean | undefined;
|
|
203
|
+
readonly workspace: string | undefined;
|
|
204
|
+
readonly force: boolean | undefined;
|
|
205
|
+
readonly yes: boolean | undefined;
|
|
206
|
+
readonly verbose: boolean | undefined;
|
|
207
|
+
readonly json: boolean | undefined;
|
|
208
|
+
}, {}, never, effect_FileSystem0.FileSystem | CommandRunner>;
|
|
209
|
+
declare function runCreatePrismaCli(argv?: readonly string[]): Effect.Effect<void, never, Command.Environment | CommandRunner>;
|
|
346
210
|
declare function create(input?: CreateCommandInput): Promise<void>;
|
|
347
211
|
//#endregion
|
|
348
|
-
export { AuthoringStyleSchema, CREATE_PRISMA_RESULT_SCHEMA_VERSION, type CreateCommandFailureResult, type CreateCommandFailureStage, type CreateCommandInput, CreateCommandInputSchema, type CreateCommandResult, type CreateCommandSuccessResult, type CreateNextStep, type CreateProjectResult, CreateTemplateSchema, DatabaseProviderSchema, PackageManagerSchema, create, createCreatePrismaCli,
|
|
212
|
+
export { AuthoringStyleSchema, CREATE_PRISMA_RESULT_SCHEMA_VERSION, type CreateCommandFailureResult, type CreateCommandFailureStage, type CreateCommandInput, CreateCommandInputSchema, type CreateCommandResult, CreateCommandResultSchema, type CreateCommandSuccessResult, type CreateNextStep, type CreateProjectResult, CreateTemplateSchema, DatabaseProviderSchema, PackageManagerSchema, create, createCreatePrismaCli, createPrismaCommand, runCreatePrismaCli };
|