diff --git a/package-lock.json b/package-lock.json index 469db1f..be921a5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,12 +15,12 @@ "markdown-toc": "^1.2.0" }, "devDependencies": { - "@prisma/client": "5.8.1", + "@prisma/client": "5.9.0", "@types/node": "^20.0.0", "husky": "8.0.3", "prettier": "2.8.8", "pretty-quick": "3.1.3", - "prisma": "5.8.1", + "prisma": "5.9.0", "rimraf": "^5.0.0", "typescript": "5.3.3" } @@ -1387,9 +1387,9 @@ } }, "node_modules/@prisma/client": { - "version": "5.8.1", - "resolved": "https://registry.npmjs.org/@prisma/client/-/client-5.8.1.tgz", - "integrity": "sha512-xQtMPfbIwLlbm0VVIVQY2yqQVOxPwRQhvIp7Z3m2900g1bu/zRHKhYZJQWELqmjl6d8YwBy0K2NvMqh47v1ubw==", + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/@prisma/client/-/client-5.9.0.tgz", + "integrity": "sha512-dHvFZgCT0BpRS+gRhk3S+50DstXMmVowxbrPeUJaK7sjNq5OhzfpT/OGE1kq9z5Q8WmOwIXJXyxP8O2CmP+nSg==", "hasInstallScript": true, "engines": { "node": ">=16.13" @@ -1404,72 +1404,72 @@ } }, "node_modules/@prisma/debug": { - "version": "5.8.1", - "resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-5.8.1.tgz", - "integrity": "sha512-tjuw7eA0Us3T42jx9AmAgL58rzwzpFGYc3R7Y4Ip75EBYrKMBA1YihuWMcBC92ILmjlQ/u3p8VxcIE0hr+fZfg==" + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-5.9.0.tgz", + "integrity": "sha512-3Uhj5YSPqaIfzJQ6JQzCNBXeBTy0x803fGIoo2tvP/KIEd+o4o49JxCQtKtP8aeef5iNh5Nn9Z25wDrdLjS80A==" }, "node_modules/@prisma/engines": { - "version": "5.8.1", - "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-5.8.1.tgz", - "integrity": "sha512-TJgYLRrZr56uhqcXO4GmP5be+zjCIHtLDK20Cnfg+o9d905hsN065QOL+3Z0zQAy6YD31Ol4u2kzSfRmbJv/uA==", + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-5.9.0.tgz", + "integrity": "sha512-BH1fpXbMH09TwfZH5FVMJwRp6afEhKzqwebbCLdaEkJDuhxA//iwbILLqGFtGTgZbdBNUOThIK+UC3++5kWMTg==", "hasInstallScript": true, "dependencies": { - "@prisma/debug": "5.8.1", - "@prisma/engines-version": "5.8.1-1.78caf6feeaed953168c64e15a249c3e9a033ebe2", - "@prisma/fetch-engine": "5.8.1", - "@prisma/get-platform": "5.8.1" + "@prisma/debug": "5.9.0", + "@prisma/engines-version": "5.9.0-32.23fdc5965b1e05fc54e5f26ed3de66776b93de64", + "@prisma/fetch-engine": "5.9.0", + "@prisma/get-platform": "5.9.0" } }, "node_modules/@prisma/engines-version": { - "version": "5.8.1-1.78caf6feeaed953168c64e15a249c3e9a033ebe2", - "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-5.8.1-1.78caf6feeaed953168c64e15a249c3e9a033ebe2.tgz", - "integrity": "sha512-f5C3JM3l9yhGr3cr4FMqWloFaSCpNpMi58Om22rjD2DOz3owci2mFdFXMgnAGazFPKrCbbEhcxdsRfspEYRoFQ==" + "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==" }, "node_modules/@prisma/fetch-engine": { - "version": "5.8.1", - "resolved": "https://registry.npmjs.org/@prisma/fetch-engine/-/fetch-engine-5.8.1.tgz", - "integrity": "sha512-+bgjjoSFa6uYEbAPlklfoVSStOEfcpheOjoBoNsNNSQdSzcwE2nM4Q0prun0+P8/0sCHo18JZ9xqa8gObvgOUw==", + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/@prisma/fetch-engine/-/fetch-engine-5.9.0.tgz", + "integrity": "sha512-NL8Vm8Vl2d6NOSkkPGN5TTTz4s6cyCleXOzqtOFWzfKFJ4wtN2Shu7llOT+ykf6nDzh1lCN2JHUt1S6FGFZGig==", "dependencies": { - "@prisma/debug": "5.8.1", - "@prisma/engines-version": "5.8.1-1.78caf6feeaed953168c64e15a249c3e9a033ebe2", - "@prisma/get-platform": "5.8.1" + "@prisma/debug": "5.9.0", + "@prisma/engines-version": "5.9.0-32.23fdc5965b1e05fc54e5f26ed3de66776b93de64", + "@prisma/get-platform": "5.9.0" } }, "node_modules/@prisma/generator-helper": { - "version": "5.8.1", - "resolved": "https://registry.npmjs.org/@prisma/generator-helper/-/generator-helper-5.8.1.tgz", - "integrity": "sha512-2EDd0o+GHfbX1dtw5BnfOz3hQB7AtYrwe4YNiKfo2UDBvB/ne/ChZa3b/vBm/GKpjW2Xaymct8D9oIHev3juzQ==", + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/@prisma/generator-helper/-/generator-helper-5.9.0.tgz", + "integrity": "sha512-MNeJ6Rso387Tw6ciWLmQY2KOklrqMg1t45DCeiz+a1uFe9PpDxb0dwFZRGET7+1NkbbqFI28TZ4Y3z2fDvs7/A==", "dependencies": { - "@prisma/debug": "5.8.1" + "@prisma/debug": "5.9.0" } }, "node_modules/@prisma/get-platform": { - "version": "5.8.1", - "resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-5.8.1.tgz", - "integrity": "sha512-wnA+6HTFcY+tkykMokix9GiAkaauPC5W/gg0O5JB0J8tCTNWrqpnQ7AsaGRfkYUbeOIioh6woDjQrGTTRf1Zag==", + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-5.9.0.tgz", + "integrity": "sha512-8CatX+E6eZxcOjJZe5hF8EXxdb5GsQTA/u7pdmUJSxGLacW9K3r5vDdgV8s22PubObQQ6979/rkCMItbCrG4Yg==", "dependencies": { - "@prisma/debug": "5.8.1" + "@prisma/debug": "5.9.0" } }, "node_modules/@prisma/internals": { - "version": "5.8.1", - "resolved": "https://registry.npmjs.org/@prisma/internals/-/internals-5.8.1.tgz", - "integrity": "sha512-9okoCgLeMqql58IbEG3YmzgNLRUQdN+qZUYp2DojWC7VAmL9TSOKQ5Dcc0588cKAsCBBDUQ2jfdflorYkzeFKw==", - "dependencies": { - "@prisma/debug": "5.8.1", - "@prisma/engines": "5.8.1", - "@prisma/fetch-engine": "5.8.1", - "@prisma/generator-helper": "5.8.1", - "@prisma/get-platform": "5.8.1", - "@prisma/prisma-schema-wasm": "5.8.1-1.78caf6feeaed953168c64e15a249c3e9a033ebe2", + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/@prisma/internals/-/internals-5.9.0.tgz", + "integrity": "sha512-0cZuAtg1xvXOh9jVXbAvUw9QS19w+UqnkF00RJD00YObzd0U+AwV2PJ5Zhowy3sup8qZpXvcVaKzqQ8qWoLsSA==", + "dependencies": { + "@prisma/debug": "5.9.0", + "@prisma/engines": "5.9.0", + "@prisma/fetch-engine": "5.9.0", + "@prisma/generator-helper": "5.9.0", + "@prisma/get-platform": "5.9.0", + "@prisma/prisma-schema-wasm": "5.9.0-32.23fdc5965b1e05fc54e5f26ed3de66776b93de64", "arg": "5.0.2", "prompts": "2.4.2" } }, - "node_modules/@prisma/prisma-schema-wasm": { - "version": "5.8.1-1.78caf6feeaed953168c64e15a249c3e9a033ebe2", - "resolved": "https://registry.npmjs.org/@prisma/prisma-schema-wasm/-/prisma-schema-wasm-5.8.1-1.78caf6feeaed953168c64e15a249c3e9a033ebe2.tgz", - "integrity": "sha512-UAJANliORe2V/s7yDMx5EKOCj2PIbwX7yusKckxMBDb+ozaQF31c3CBwnZW/ZEdhBoZjrKw8bQlqwZudWXmiKA==" + "node_modules/@prisma/internals/node_modules/@prisma/prisma-schema-wasm": { + "version": "5.9.0-32.23fdc5965b1e05fc54e5f26ed3de66776b93de64", + "resolved": "https://registry.npmjs.org/@prisma/prisma-schema-wasm/-/prisma-schema-wasm-5.9.0-32.23fdc5965b1e05fc54e5f26ed3de66776b93de64.tgz", + "integrity": "sha512-IuqMy9uI6bax2TiKPfwEOdAsdG8g0+F+1JD28ugUL4q40Q2iLHBgqUgyavSev1z/TUIA/cYJm3ObEUWz9pNnBQ==" }, "node_modules/@quramy/jest-prisma-core": { "version": "1.1.2", @@ -4588,13 +4588,13 @@ } }, "node_modules/prisma": { - "version": "5.8.1", - "resolved": "https://registry.npmjs.org/prisma/-/prisma-5.8.1.tgz", - "integrity": "sha512-N6CpjzECnUHZ5beeYpDzkt2rYpEdAeqXX2dweu6BoQaeYkNZrC/WJHM+5MO/uidFHTak8QhkPKBWck1o/4MD4A==", + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/prisma/-/prisma-5.9.0.tgz", + "integrity": "sha512-0UcOofjNuAnd227JMaPqZvP01dsUXw9EXB9iC8fyoZtfv7zkQ0ozxyjY1g+vcjFPOnNLICMnLHx+lM5BJZYqOQ==", "devOptional": true, "hasInstallScript": true, "dependencies": { - "@prisma/engines": "5.8.1" + "@prisma/engines": "5.9.0" }, "bin": { "prisma": "build/index.js" @@ -5559,7 +5559,7 @@ "packages/artifact-testing": { "version": "2.1.0", "devDependencies": { - "@prisma/internals": "5.8.1", + "@prisma/internals": "5.9.0", "@types/jest": "29.5.11", "jest": "29.7.0", "ts-jest": "29.1.2", @@ -5571,8 +5571,8 @@ "version": "2.1.0", "license": "MIT", "dependencies": { - "@prisma/generator-helper": "^5.0.0", - "@prisma/internals": "^5.0.0", + "@prisma/generator-helper": "^5.9.0", + "@prisma/internals": "^5.9.0", "short-uuid": "4.2.2", "talt": "2.4.4" }, @@ -6565,78 +6565,80 @@ "optional": true }, "@prisma/client": { - "version": "5.8.1", - "resolved": "https://registry.npmjs.org/@prisma/client/-/client-5.8.1.tgz", - "integrity": "sha512-xQtMPfbIwLlbm0VVIVQY2yqQVOxPwRQhvIp7Z3m2900g1bu/zRHKhYZJQWELqmjl6d8YwBy0K2NvMqh47v1ubw==", + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/@prisma/client/-/client-5.9.0.tgz", + "integrity": "sha512-dHvFZgCT0BpRS+gRhk3S+50DstXMmVowxbrPeUJaK7sjNq5OhzfpT/OGE1kq9z5Q8WmOwIXJXyxP8O2CmP+nSg==", "requires": {} }, "@prisma/debug": { - "version": "5.8.1", - "resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-5.8.1.tgz", - "integrity": "sha512-tjuw7eA0Us3T42jx9AmAgL58rzwzpFGYc3R7Y4Ip75EBYrKMBA1YihuWMcBC92ILmjlQ/u3p8VxcIE0hr+fZfg==" + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-5.9.0.tgz", + "integrity": "sha512-3Uhj5YSPqaIfzJQ6JQzCNBXeBTy0x803fGIoo2tvP/KIEd+o4o49JxCQtKtP8aeef5iNh5Nn9Z25wDrdLjS80A==" }, "@prisma/engines": { - "version": "5.8.1", - "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-5.8.1.tgz", - "integrity": "sha512-TJgYLRrZr56uhqcXO4GmP5be+zjCIHtLDK20Cnfg+o9d905hsN065QOL+3Z0zQAy6YD31Ol4u2kzSfRmbJv/uA==", + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-5.9.0.tgz", + "integrity": "sha512-BH1fpXbMH09TwfZH5FVMJwRp6afEhKzqwebbCLdaEkJDuhxA//iwbILLqGFtGTgZbdBNUOThIK+UC3++5kWMTg==", "requires": { - "@prisma/debug": "5.8.1", - "@prisma/engines-version": "5.8.1-1.78caf6feeaed953168c64e15a249c3e9a033ebe2", - "@prisma/fetch-engine": "5.8.1", - "@prisma/get-platform": "5.8.1" + "@prisma/debug": "5.9.0", + "@prisma/engines-version": "5.9.0-32.23fdc5965b1e05fc54e5f26ed3de66776b93de64", + "@prisma/fetch-engine": "5.9.0", + "@prisma/get-platform": "5.9.0" } }, "@prisma/engines-version": { - "version": "5.8.1-1.78caf6feeaed953168c64e15a249c3e9a033ebe2", - "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-5.8.1-1.78caf6feeaed953168c64e15a249c3e9a033ebe2.tgz", - "integrity": "sha512-f5C3JM3l9yhGr3cr4FMqWloFaSCpNpMi58Om22rjD2DOz3owci2mFdFXMgnAGazFPKrCbbEhcxdsRfspEYRoFQ==" + "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==" }, "@prisma/fetch-engine": { - "version": "5.8.1", - "resolved": "https://registry.npmjs.org/@prisma/fetch-engine/-/fetch-engine-5.8.1.tgz", - "integrity": "sha512-+bgjjoSFa6uYEbAPlklfoVSStOEfcpheOjoBoNsNNSQdSzcwE2nM4Q0prun0+P8/0sCHo18JZ9xqa8gObvgOUw==", + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/@prisma/fetch-engine/-/fetch-engine-5.9.0.tgz", + "integrity": "sha512-NL8Vm8Vl2d6NOSkkPGN5TTTz4s6cyCleXOzqtOFWzfKFJ4wtN2Shu7llOT+ykf6nDzh1lCN2JHUt1S6FGFZGig==", "requires": { - "@prisma/debug": "5.8.1", - "@prisma/engines-version": "5.8.1-1.78caf6feeaed953168c64e15a249c3e9a033ebe2", - "@prisma/get-platform": "5.8.1" + "@prisma/debug": "5.9.0", + "@prisma/engines-version": "5.9.0-32.23fdc5965b1e05fc54e5f26ed3de66776b93de64", + "@prisma/get-platform": "5.9.0" } }, "@prisma/generator-helper": { - "version": "5.8.1", - "resolved": "https://registry.npmjs.org/@prisma/generator-helper/-/generator-helper-5.8.1.tgz", - "integrity": "sha512-2EDd0o+GHfbX1dtw5BnfOz3hQB7AtYrwe4YNiKfo2UDBvB/ne/ChZa3b/vBm/GKpjW2Xaymct8D9oIHev3juzQ==", + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/@prisma/generator-helper/-/generator-helper-5.9.0.tgz", + "integrity": "sha512-MNeJ6Rso387Tw6ciWLmQY2KOklrqMg1t45DCeiz+a1uFe9PpDxb0dwFZRGET7+1NkbbqFI28TZ4Y3z2fDvs7/A==", "requires": { - "@prisma/debug": "5.8.1" + "@prisma/debug": "5.9.0" } }, "@prisma/get-platform": { - "version": "5.8.1", - "resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-5.8.1.tgz", - "integrity": "sha512-wnA+6HTFcY+tkykMokix9GiAkaauPC5W/gg0O5JB0J8tCTNWrqpnQ7AsaGRfkYUbeOIioh6woDjQrGTTRf1Zag==", + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-5.9.0.tgz", + "integrity": "sha512-8CatX+E6eZxcOjJZe5hF8EXxdb5GsQTA/u7pdmUJSxGLacW9K3r5vDdgV8s22PubObQQ6979/rkCMItbCrG4Yg==", "requires": { - "@prisma/debug": "5.8.1" + "@prisma/debug": "5.9.0" } }, "@prisma/internals": { - "version": "5.8.1", - "resolved": "https://registry.npmjs.org/@prisma/internals/-/internals-5.8.1.tgz", - "integrity": "sha512-9okoCgLeMqql58IbEG3YmzgNLRUQdN+qZUYp2DojWC7VAmL9TSOKQ5Dcc0588cKAsCBBDUQ2jfdflorYkzeFKw==", - "requires": { - "@prisma/debug": "5.8.1", - "@prisma/engines": "5.8.1", - "@prisma/fetch-engine": "5.8.1", - "@prisma/generator-helper": "5.8.1", - "@prisma/get-platform": "5.8.1", - "@prisma/prisma-schema-wasm": "5.8.1-1.78caf6feeaed953168c64e15a249c3e9a033ebe2", + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/@prisma/internals/-/internals-5.9.0.tgz", + "integrity": "sha512-0cZuAtg1xvXOh9jVXbAvUw9QS19w+UqnkF00RJD00YObzd0U+AwV2PJ5Zhowy3sup8qZpXvcVaKzqQ8qWoLsSA==", + "requires": { + "@prisma/debug": "5.9.0", + "@prisma/engines": "5.9.0", + "@prisma/fetch-engine": "5.9.0", + "@prisma/generator-helper": "5.9.0", + "@prisma/get-platform": "5.9.0", + "@prisma/prisma-schema-wasm": "5.9.0-32.23fdc5965b1e05fc54e5f26ed3de66776b93de64", "arg": "5.0.2", "prompts": "2.4.2" + }, + "dependencies": { + "@prisma/prisma-schema-wasm": { + "version": "5.9.0-32.23fdc5965b1e05fc54e5f26ed3de66776b93de64", + "resolved": "https://registry.npmjs.org/@prisma/prisma-schema-wasm/-/prisma-schema-wasm-5.9.0-32.23fdc5965b1e05fc54e5f26ed3de66776b93de64.tgz", + "integrity": "sha512-IuqMy9uI6bax2TiKPfwEOdAsdG8g0+F+1JD28ugUL4q40Q2iLHBgqUgyavSev1z/TUIA/cYJm3ObEUWz9pNnBQ==" + } } }, - "@prisma/prisma-schema-wasm": { - "version": "5.8.1-1.78caf6feeaed953168c64e15a249c3e9a033ebe2", - "resolved": "https://registry.npmjs.org/@prisma/prisma-schema-wasm/-/prisma-schema-wasm-5.8.1-1.78caf6feeaed953168c64e15a249c3e9a033ebe2.tgz", - "integrity": "sha512-UAJANliORe2V/s7yDMx5EKOCj2PIbwX7yusKckxMBDb+ozaQF31c3CBwnZW/ZEdhBoZjrKw8bQlqwZudWXmiKA==" - }, "@quramy/jest-prisma-core": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@quramy/jest-prisma-core/-/jest-prisma-core-1.1.2.tgz", @@ -6670,8 +6672,8 @@ "@quramy/prisma-fabbrica": { "version": "file:packages/prisma-fabbrica", "requires": { - "@prisma/generator-helper": "^5.0.0", - "@prisma/internals": "^5.0.0", + "@prisma/generator-helper": "5.9.0", + "@prisma/internals": "5.9.0", "@types/jest": "29.5.11", "jest": "29.7.0", "short-uuid": "4.2.2", @@ -6963,7 +6965,7 @@ "artifact-testing": { "version": "file:packages/artifact-testing", "requires": { - "@prisma/internals": "5.8.1", + "@prisma/internals": "5.9.0", "@types/jest": "29.5.11", "jest": "29.7.0", "ts-jest": "29.1.2", @@ -9060,12 +9062,12 @@ } }, "prisma": { - "version": "5.8.1", - "resolved": "https://registry.npmjs.org/prisma/-/prisma-5.8.1.tgz", - "integrity": "sha512-N6CpjzECnUHZ5beeYpDzkt2rYpEdAeqXX2dweu6BoQaeYkNZrC/WJHM+5MO/uidFHTak8QhkPKBWck1o/4MD4A==", + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/prisma/-/prisma-5.9.0.tgz", + "integrity": "sha512-0UcOofjNuAnd227JMaPqZvP01dsUXw9EXB9iC8fyoZtfv7zkQ0ozxyjY1g+vcjFPOnNLICMnLHx+lM5BJZYqOQ==", "devOptional": true, "requires": { - "@prisma/engines": "5.8.1" + "@prisma/engines": "5.9.0" } }, "process-nextick-args": { diff --git a/package.json b/package.json index 0ba558f..e0057d0 100644 --- a/package.json +++ b/package.json @@ -22,12 +22,12 @@ "author": "Quramy", "license": "MIT", "devDependencies": { - "@prisma/client": "5.8.1", + "@prisma/client": "5.9.0", "@types/node": "^20.0.0", "husky": "8.0.3", "prettier": "2.8.8", "pretty-quick": "3.1.3", - "prisma": "5.8.1", + "prisma": "5.9.0", "rimraf": "^5.0.0", "typescript": "5.3.3" }, diff --git a/packages/artifact-testing/package.json b/packages/artifact-testing/package.json index bf0b335..a2c4cde 100644 --- a/packages/artifact-testing/package.json +++ b/packages/artifact-testing/package.json @@ -13,7 +13,7 @@ "test:functions": "jest" }, "devDependencies": { - "@prisma/internals": "5.8.1", + "@prisma/internals": "5.9.0", "@types/jest": "29.5.11", "jest": "29.7.0", "ts-jest": "29.1.2", diff --git a/packages/prisma-fabbrica/src/relations/screen.ts b/packages/prisma-fabbrica/src/relations/screen.ts index 2073d00..133a615 100644 --- a/packages/prisma-fabbrica/src/relations/screen.ts +++ b/packages/prisma-fabbrica/src/relations/screen.ts @@ -28,7 +28,7 @@ function isCorCChildrenList( return typeof def.connectOrCreate === "object" && Array.isArray(def.connectOrCreate); } -export function createFieldDefinitions(models: DMMF.Model[]): ModelWithFields[] { +export function createFieldDefinitions(models: readonly DMMF.Model[]): ModelWithFields[] { return models.map(m => ({ name: m.name, fields: m.fields diff --git a/packages/prisma-fabbrica/src/templates/index.ts b/packages/prisma-fabbrica/src/templates/index.ts index 68a194e..d99da7f 100644 --- a/packages/prisma-fabbrica/src/templates/index.ts +++ b/packages/prisma-fabbrica/src/templates/index.ts @@ -67,7 +67,7 @@ function filterEnumFields(inputType: DMMF.InputType) { ); } -function extractFirstEnumValue(enums: DMMF.SchemaEnum[], field: DMMF.SchemaArg) { +function extractFirstEnumValue(enums: readonly DMMF.SchemaEnum[], field: DMMF.SchemaArg) { const typeName = field.inputTypes[0].type; const found = enums.find(byName(typeName)); if (!found) { @@ -117,7 +117,7 @@ export const symbols = () => const factoryFor = Symbol("factoryFor"); `(); -export const modelFieldDefinitions = (models: DMMF.Model[]) => +export const modelFieldDefinitions = (models: readonly DMMF.Model[]) => template.statement` const modelFieldDefinitions: ModelWithFields[] = ${() => createJSONLiteral(createFieldDefinitions(models))}; `(); @@ -317,7 +317,7 @@ export const isModelAssociationFactory = (fieldType: DMMF.SchemaArg, model: DMMF export const autoGenerateModelScalarsOrEnumsFieldArgs = ( model: DMMF.Model, field: DMMF.SchemaArg, - enums: DMMF.SchemaEnum[], + enums: readonly DMMF.SchemaEnum[], ) => // Note: In Json sclar filed, inputTypes[0].location is not scalar but enumType field.inputTypes[field.inputTypes.length - 1].location === "scalar" @@ -341,7 +341,7 @@ export const autoGenerateModelScalarsOrEnumsFieldArgs = ( export const autoGenerateModelScalarsOrEnums = ( model: DMMF.Model, inputType: DMMF.InputType, - enums: DMMF.SchemaEnum[], + enums: readonly DMMF.SchemaEnum[], ) => template.statement` function AUTO_GENERATE_MODEL_SCALARS_OR_ENUMS({ seq }: { readonly seq: number }): MODEL_SCALAR_OR_ENUM_FIELDS {