diff --git a/package-lock.json b/package-lock.json index b81538fd..378f587c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1522,9 +1522,9 @@ } }, "node_modules/@prisma/client": { - "version": "5.9.1", - "resolved": "https://registry.npmjs.org/@prisma/client/-/client-5.9.1.tgz", - "integrity": "sha512-caSOnG4kxcSkhqC/2ShV7rEoWwd3XrftokxJqOCMVvia4NYV/TPtJlS9C2os3Igxw/Qyxumj9GBQzcStzECvtQ==", + "version": "5.22.0", + "resolved": "https://registry.npmjs.org/@prisma/client/-/client-5.22.0.tgz", + "integrity": "sha512-M0SVXfyHnQREBKxCgyo7sffrKttwE6R8PMq330MIUF0pTwjUhLbW84pFDlf06B27XyCR++VtjugEnIHdr07SVA==", "hasInstallScript": true, "engines": { "node": ">=16.13" @@ -1539,35 +1539,35 @@ } }, "node_modules/@prisma/debug": { - "version": "5.9.1", - "resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-5.9.1.tgz", - "integrity": "sha512-yAHFSFCg8KVoL0oRUno3m60GAjsUKYUDkQ+9BA2X2JfVR3kRVSJFc/GpQ2fSORi4pSHZR9orfM4UC9OVXIFFTA==" + "version": "5.22.0", + "resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-5.22.0.tgz", + "integrity": "sha512-AUt44v3YJeggO2ZU5BkXI7M4hu9BF2zzH2iF2V5pyXT/lRTyWiElZ7It+bRH1EshoMRxHgpYg4VB6rCM+mG5jQ==" }, "node_modules/@prisma/engines": { - "version": "5.9.1", - "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-5.9.1.tgz", - "integrity": "sha512-gkdXmjxQ5jktxWNdDA5aZZ6R8rH74JkoKq6LD5mACSvxd2vbqWeWIOV0Py5wFC8vofOYShbt6XUeCIUmrOzOnQ==", + "version": "5.22.0", + "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-5.22.0.tgz", + "integrity": "sha512-UNjfslWhAt06kVL3CjkuYpHAWSO6L4kDCVPegV6itt7nD1kSJavd3vhgAEhjglLJJKEdJ7oIqDJ+yHk6qO8gPA==", "hasInstallScript": true, "dependencies": { - "@prisma/debug": "5.9.1", - "@prisma/engines-version": "5.9.0-32.23fdc5965b1e05fc54e5f26ed3de66776b93de64", - "@prisma/fetch-engine": "5.9.1", - "@prisma/get-platform": "5.9.1" + "@prisma/debug": "5.22.0", + "@prisma/engines-version": "5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2", + "@prisma/fetch-engine": "5.22.0", + "@prisma/get-platform": "5.22.0" } }, "node_modules/@prisma/engines-version": { - "version": "5.9.0-32.23fdc5965b1e05fc54e5f26ed3de66776b93de64", - "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-5.9.0-32.23fdc5965b1e05fc54e5f26ed3de66776b93de64.tgz", - "integrity": "sha512-HFl7275yF0FWbdcNvcSRbbu9JCBSLMcurYwvWc8WGDnpu7APxQo2ONtZrUggU3WxLxUJ2uBX+0GOFIcJeVeOOQ==" + "version": "5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2", + "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2.tgz", + "integrity": "sha512-2PTmxFR2yHW/eB3uqWtcgRcgAbG1rwG9ZriSvQw+nnb7c4uCr3RAcGMb6/zfE88SKlC1Nj2ziUvc96Z379mHgQ==" }, "node_modules/@prisma/fetch-engine": { - "version": "5.9.1", - "resolved": "https://registry.npmjs.org/@prisma/fetch-engine/-/fetch-engine-5.9.1.tgz", - "integrity": "sha512-l0goQOMcNVOJs1kAcwqpKq3ylvkD9F04Ioe1oJoCqmz05mw22bNAKKGWuDd3zTUoUZr97va0c/UfLNru+PDmNA==", + "version": "5.22.0", + "resolved": "https://registry.npmjs.org/@prisma/fetch-engine/-/fetch-engine-5.22.0.tgz", + "integrity": "sha512-bkrD/Mc2fSvkQBV5EpoFcZ87AvOgDxbG99488a5cexp5Ccny+UM6MAe/UFkUC0wLYD9+9befNOqGiIJhhq+HbA==", "dependencies": { - "@prisma/debug": "5.9.1", - "@prisma/engines-version": "5.9.0-32.23fdc5965b1e05fc54e5f26ed3de66776b93de64", - "@prisma/get-platform": "5.9.1" + "@prisma/debug": "5.22.0", + "@prisma/engines-version": "5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2", + "@prisma/get-platform": "5.22.0" } }, "node_modules/@prisma/generator-helper": { @@ -1584,11 +1584,11 @@ "integrity": "sha512-xBs8M4bGIBUqJ/9lZM+joEJkrNaGPKMUcK3a5JqUDQtwPDaWDTq24wOpkHfoJtvNbmGtlDl9Ky5HAbctN5+x7g==" }, "node_modules/@prisma/get-platform": { - "version": "5.9.1", - "resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-5.9.1.tgz", - "integrity": "sha512-6OQsNxTyhvG+T2Ksr8FPFpuPeL4r9u0JF0OZHUBI/Uy9SS43sPyAIutt4ZEAyqWQt104ERh70EZedkHZKsnNbg==", + "version": "5.22.0", + "resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-5.22.0.tgz", + "integrity": "sha512-pHhpQdr1UPFpt+zFfnPazhulaZYCUqeIcPpJViYoq9R+D/yw4fjE+CtnsnKzPYm0ddUbeXUzjGVGIRVgPDCk4Q==", "dependencies": { - "@prisma/debug": "5.9.1" + "@prisma/debug": "5.22.0" } }, "node_modules/@remix-run/web-blob": { @@ -7214,18 +7214,21 @@ } }, "node_modules/prisma": { - "version": "5.9.1", - "resolved": "https://registry.npmjs.org/prisma/-/prisma-5.9.1.tgz", - "integrity": "sha512-Hy/8KJZz0ELtkw4FnG9MS9rNWlXcJhf98Z2QMqi0QiVMoS8PzsBkpla0/Y5hTlob8F3HeECYphBjqmBxrluUrQ==", + "version": "5.22.0", + "resolved": "https://registry.npmjs.org/prisma/-/prisma-5.22.0.tgz", + "integrity": "sha512-vtpjW3XuYCSnMsNVBjLMNkTj6OZbudcPPTPYHqX0CJfpcdWciI1dM8uHETwmDxxiqEwCIE6WvXucWUetJgfu/A==", "hasInstallScript": true, "dependencies": { - "@prisma/engines": "5.9.1" + "@prisma/engines": "5.22.0" }, "bin": { "prisma": "build/index.js" }, "engines": { "node": ">=16.13" + }, + "optionalDependencies": { + "fsevents": "2.3.3" } }, "node_modules/prisma-generator-accel-record": { diff --git a/packages/accel-record-core/src/model/field.ts b/packages/accel-record-core/src/model/field.ts index 98064fa2..13113495 100644 --- a/packages/accel-record-core/src/model/field.ts +++ b/packages/accel-record-core/src/model/field.ts @@ -92,7 +92,7 @@ export class Field { * @returns True if the default value is "uuid", false otherwise. */ get defaultIsUuid() { - return this.default != undefined && this.default.name === "uuid"; + return this.default != undefined && this.default.name?.startsWith("uuid"); } /** diff --git a/packages/prisma-generator-accel-record/src/generators/wrapper.ts b/packages/prisma-generator-accel-record/src/generators/wrapper.ts index b69c78bb..98e1aed5 100644 --- a/packages/prisma-generator-accel-record/src/generators/wrapper.ts +++ b/packages/prisma-generator-accel-record/src/generators/wrapper.ts @@ -31,7 +31,7 @@ export class FieldWrapper { get hasScalarDefault() { if (typeof this.field.default === "object" && "name" in this.field.default) { - return ["uuid", "cuid"].includes(this.field.default.name); + return /^(uuid|cuid)/.test(this.field.default.name); } return this.field.default != undefined && typeof this.field.default !== "object"; }