@prisma/orm-toolchain 8.0.0-rc.21-dev.6 → 8.0.0-rc.21-dev.8
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
|
@@ -43,8 +43,8 @@ import stringWidth from "string-width";
|
|
|
43
43
|
import { bold, createColors, cyan, cyanBright, dim, green, yellow } from "colorette";
|
|
44
44
|
import { isCI } from "ci-info";
|
|
45
45
|
import { build } from "esbuild";
|
|
46
|
-
//#region ../../../1-framework/3-tooling/cli/dist/cli-
|
|
47
|
-
var version = "8.0.0-rc.21-dev.
|
|
46
|
+
//#region ../../../1-framework/3-tooling/cli/dist/cli-BtgLHMwy.mjs
|
|
47
|
+
var version = "8.0.0-rc.21-dev.8";
|
|
48
48
|
const ESCAPES = {
|
|
49
49
|
"\\": "\\\\",
|
|
50
50
|
" ": "\\t",
|
|
@@ -4203,23 +4203,23 @@ function starterSchemaPslPostgres() {
|
|
|
4203
4203
|
return `// use prisma-8
|
|
4204
4204
|
|
|
4205
4205
|
model User {
|
|
4206
|
-
id Int
|
|
4207
|
-
email String
|
|
4206
|
+
id Int @id @default(autoincrement())
|
|
4207
|
+
email String @unique
|
|
4208
4208
|
username String?
|
|
4209
4209
|
name String?
|
|
4210
4210
|
posts Post[]
|
|
4211
|
-
createdAt
|
|
4212
|
-
updatedAt temporal.
|
|
4211
|
+
createdAt DateTime @default(now()) @onCreate(now())
|
|
4212
|
+
updatedAt temporal.UpdatedAt
|
|
4213
4213
|
}
|
|
4214
4214
|
|
|
4215
4215
|
model Post {
|
|
4216
|
-
id Int
|
|
4216
|
+
id Int @id @default(autoincrement())
|
|
4217
4217
|
title String
|
|
4218
4218
|
content String?
|
|
4219
|
-
author User
|
|
4219
|
+
author User @relation(fields: [authorId], references: [id])
|
|
4220
4220
|
authorId Int
|
|
4221
|
-
createdAt
|
|
4222
|
-
updatedAt temporal.
|
|
4221
|
+
createdAt DateTime @default(now()) @onCreate(now())
|
|
4222
|
+
updatedAt temporal.UpdatedAt
|
|
4223
4223
|
}
|
|
4224
4224
|
`;
|
|
4225
4225
|
}
|
|
@@ -4246,7 +4246,7 @@ model Post {
|
|
|
4246
4246
|
`;
|
|
4247
4247
|
}
|
|
4248
4248
|
function starterSchemaTsPostgres(builder) {
|
|
4249
|
-
return `import { defineContract } from '${builder}';
|
|
4249
|
+
return `import { defineContract, now } from '${builder}';
|
|
4250
4250
|
|
|
4251
4251
|
export const contract = defineContract({}, ({ field, model, rel, gen, type }) => {
|
|
4252
4252
|
const User = model('User', {
|
|
@@ -4255,8 +4255,8 @@ export const contract = defineContract({}, ({ field, model, rel, gen, type }) =>
|
|
|
4255
4255
|
email: field.column(type.String()).unique(),
|
|
4256
4256
|
username: field.column(type.String()).optional(),
|
|
4257
4257
|
name: field.column(type.String()).optional(),
|
|
4258
|
-
createdAt: field.column(type.
|
|
4259
|
-
updatedAt: field.column(type.temporal.
|
|
4258
|
+
createdAt: field.column(type.DateTime()).default(now()).onCreate(gen.now()),
|
|
4259
|
+
updatedAt: field.column(type.temporal.UpdatedAt()),
|
|
4260
4260
|
},
|
|
4261
4261
|
});
|
|
4262
4262
|
|
|
@@ -4266,8 +4266,8 @@ export const contract = defineContract({}, ({ field, model, rel, gen, type }) =>
|
|
|
4266
4266
|
title: field.column(type.String()),
|
|
4267
4267
|
content: field.column(type.String()).optional(),
|
|
4268
4268
|
authorId: field.column(type.Uuid()),
|
|
4269
|
-
createdAt: field.column(type.
|
|
4270
|
-
updatedAt: field.column(type.temporal.
|
|
4269
|
+
createdAt: field.column(type.DateTime()).default(now()).onCreate(gen.now()),
|
|
4270
|
+
updatedAt: field.column(type.temporal.UpdatedAt()),
|
|
4271
4271
|
},
|
|
4272
4272
|
});
|
|
4273
4273
|
|
|
@@ -7093,7 +7093,7 @@ const lspCommand = defineServerCommand({
|
|
|
7093
7093
|
} },
|
|
7094
7094
|
handler: async (args, io) => {
|
|
7095
7095
|
const exitCode = await withoutClientProcessIdInArgv(async () => {
|
|
7096
|
-
const { startServer } = await import("./exports-
|
|
7096
|
+
const { startServer } = await import("./exports-Byp-xgRY.mjs");
|
|
7097
7097
|
return startServer({
|
|
7098
7098
|
stdin: io.stdin,
|
|
7099
7099
|
stdout: io.stdout,
|