@prisma/orm-toolchain 8.0.0-rc.20-dev.14 → 8.0.0-rc.20-dev.15
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
|
@@ -40,7 +40,7 @@ import { applyEdits, modify, parse, printParseErrorCode } from "jsonc-parser";
|
|
|
40
40
|
import stringWidth from "string-width";
|
|
41
41
|
import { bold, createColors, cyan, cyanBright, dim, green, yellow } from "colorette";
|
|
42
42
|
import { build } from "esbuild";
|
|
43
|
-
//#region ../../../1-framework/3-tooling/cli/dist/load-config-
|
|
43
|
+
//#region ../../../1-framework/3-tooling/cli/dist/load-config-CYg-YEhv.mjs
|
|
44
44
|
const ESCAPES = {
|
|
45
45
|
"\\": "\\\\",
|
|
46
46
|
" ": "\\t",
|
|
@@ -4156,14 +4156,14 @@ import { defineContract } from '${builder}';
|
|
|
4156
4156
|
|
|
4157
4157
|
export const contract = defineContract(
|
|
4158
4158
|
{},
|
|
4159
|
-
({ field, model }) => ({
|
|
4159
|
+
({ field, model, gen, type }) => ({
|
|
4160
4160
|
models: {
|
|
4161
4161
|
User: model('User', {
|
|
4162
4162
|
fields: {
|
|
4163
|
-
id: field.id.
|
|
4164
|
-
email: field.
|
|
4165
|
-
username: field.
|
|
4166
|
-
name: field.
|
|
4163
|
+
id: field.column(type.Uuid()).id().onCreate(gen.uuid(7)),
|
|
4164
|
+
email: field.column(type.String()).unique(),
|
|
4165
|
+
username: field.column(type.String()).optional(),
|
|
4166
|
+
name: field.column(type.String()).optional(),
|
|
4167
4167
|
},
|
|
4168
4168
|
}),
|
|
4169
4169
|
},
|
|
@@ -4203,7 +4203,7 @@ model User {
|
|
|
4203
4203
|
name String?
|
|
4204
4204
|
posts Post[]
|
|
4205
4205
|
createdAt TimestamptzString @default(now())
|
|
4206
|
-
updatedAt temporal.
|
|
4206
|
+
updatedAt temporal.UpdatedAtString
|
|
4207
4207
|
}
|
|
4208
4208
|
|
|
4209
4209
|
model Post {
|
|
@@ -4213,7 +4213,7 @@ model Post {
|
|
|
4213
4213
|
author User @relation(fields: [authorId], references: [id])
|
|
4214
4214
|
authorId Int
|
|
4215
4215
|
createdAt TimestamptzString @default(now())
|
|
4216
|
-
updatedAt temporal.
|
|
4216
|
+
updatedAt temporal.UpdatedAtString
|
|
4217
4217
|
}
|
|
4218
4218
|
`;
|
|
4219
4219
|
}
|
|
@@ -4242,26 +4242,26 @@ model Post {
|
|
|
4242
4242
|
function starterSchemaTsPostgres(builder) {
|
|
4243
4243
|
return `import { defineContract } from '${builder}';
|
|
4244
4244
|
|
|
4245
|
-
export const contract = defineContract({}, ({ field, model, rel }) => {
|
|
4245
|
+
export const contract = defineContract({}, ({ field, model, rel, gen, type }) => {
|
|
4246
4246
|
const User = model('User', {
|
|
4247
4247
|
fields: {
|
|
4248
|
-
id: field.id.
|
|
4249
|
-
email: field.
|
|
4250
|
-
username: field.
|
|
4251
|
-
name: field.
|
|
4252
|
-
createdAt: field.temporal.
|
|
4253
|
-
updatedAt: field.temporal.
|
|
4248
|
+
id: field.column(type.Uuid()).id().onCreate(gen.uuid(7)),
|
|
4249
|
+
email: field.column(type.String()).unique(),
|
|
4250
|
+
username: field.column(type.String()).optional(),
|
|
4251
|
+
name: field.column(type.String()).optional(),
|
|
4252
|
+
createdAt: field.column(type.temporal.CreatedAtString()),
|
|
4253
|
+
updatedAt: field.column(type.temporal.UpdatedAtString()),
|
|
4254
4254
|
},
|
|
4255
4255
|
});
|
|
4256
4256
|
|
|
4257
4257
|
const Post = model('Post', {
|
|
4258
4258
|
fields: {
|
|
4259
|
-
id: field.id.
|
|
4260
|
-
title: field.
|
|
4261
|
-
content: field.
|
|
4262
|
-
authorId: field.
|
|
4263
|
-
createdAt: field.temporal.
|
|
4264
|
-
updatedAt: field.temporal.
|
|
4259
|
+
id: field.column(type.Uuid()).id().onCreate(gen.uuid(7)),
|
|
4260
|
+
title: field.column(type.String()),
|
|
4261
|
+
content: field.column(type.String()).optional(),
|
|
4262
|
+
authorId: field.column(type.Uuid()),
|
|
4263
|
+
createdAt: field.column(type.temporal.CreatedAtString()),
|
|
4264
|
+
updatedAt: field.column(type.temporal.UpdatedAtString()),
|
|
4265
4265
|
},
|
|
4266
4266
|
});
|
|
4267
4267
|
|
|
@@ -7087,7 +7087,7 @@ const lspCommand = defineServerCommand({
|
|
|
7087
7087
|
} },
|
|
7088
7088
|
handler: async (args, io) => {
|
|
7089
7089
|
const exitCode = await withoutClientProcessIdInArgv(async () => {
|
|
7090
|
-
const { startServer } = await import("./exports-
|
|
7090
|
+
const { startServer } = await import("./exports-CnTIYbnR.mjs");
|
|
7091
7091
|
return startServer({
|
|
7092
7092
|
stdin: io.stdin,
|
|
7093
7093
|
stdout: io.stdout,
|