diff --git a/package-lock.json b/package-lock.json index beb0929..a0f0aeb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,19 +9,19 @@ "version": "0.10.0", "license": "MIT", "dependencies": { - "@prisma/generator-helper": "4.7.1", - "@prisma/internals": "4.7.1" + "@prisma/generator-helper": "4.13.0", + "@prisma/internals": "4.13.0" }, "bin": { "prisma-dbml-generator": "dist/generator.js" }, "devDependencies": { - "@prisma/client": "4.7.1", + "@prisma/client": "4.13.0", "@types/jest": "^29.2.4", "@types/node": "14.17.0", "jest": "29.3.1", "prettier": "2.8.1", - "prisma": "4.7.1", + "prisma": "4.13.0", "ts-jest": "29.0.3", "ts-toolbelt": "^9.6.0", "typescript": "4.9.4" @@ -1036,74 +1036,74 @@ } }, "node_modules/@opentelemetry/api": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.3.0.tgz", - "integrity": "sha512-YveTnGNsFFixTKJz09Oi4zYkiLT5af3WpZDu4aIUM7xX+2bHAkOJayFTVQd6zB8kkWPpbua4Ha6Ql00grdLlJQ==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.4.1.tgz", + "integrity": "sha512-O2yRJce1GOc6PAy3QxFM4NzFiWzvScDC1/5ihYBL6BUEVdq0XMWN01sppE+H6bBXbaFYipjwFLEWLg5PaSOThA==", "engines": { "node": ">=8.0.0" } }, "node_modules/@opentelemetry/core": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.8.0.tgz", - "integrity": "sha512-6SDjwBML4Am0AQmy7z1j6HGrWDgeK8awBRUvl1PGw6HayViMk4QpnUXvv4HTHisecgVBy43NE/cstWprm8tIfw==", + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.12.0.tgz", + "integrity": "sha512-4DWYNb3dLs2mSCGl65jY3aEgbvPWSHVQV/dmDWiYeWUrMakZQFcymqZOSUNZO0uDrEJoxMu8O5tZktX6UKFwag==", "dependencies": { - "@opentelemetry/semantic-conventions": "1.8.0" + "@opentelemetry/semantic-conventions": "1.12.0" }, "engines": { "node": ">=14" }, "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.4.0" + "@opentelemetry/api": ">=1.0.0 <1.5.0" } }, "node_modules/@opentelemetry/resources": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.8.0.tgz", - "integrity": "sha512-KSyMH6Jvss/PFDy16z5qkCK0ERlpyqixb1xwb73wLMvVq+j7i89lobDjw3JkpCcd1Ws0J6jAI4fw28Zufj2ssg==", + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.12.0.tgz", + "integrity": "sha512-gunMKXG0hJrR0LXrqh7BVbziA/+iJBL3ZbXCXO64uY+SrExkwoyJkpiq9l5ismkGF/A20mDEV7tGwh+KyPw00Q==", "dependencies": { - "@opentelemetry/core": "1.8.0", - "@opentelemetry/semantic-conventions": "1.8.0" + "@opentelemetry/core": "1.12.0", + "@opentelemetry/semantic-conventions": "1.12.0" }, "engines": { "node": ">=14" }, "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.4.0" + "@opentelemetry/api": ">=1.0.0 <1.5.0" } }, "node_modules/@opentelemetry/sdk-trace-base": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.8.0.tgz", - "integrity": "sha512-iH41m0UTddnCKJzZx3M85vlhKzRcmT48pUeBbnzsGrq4nIay1oWVHKM5nhB5r8qRDGvd/n7f/YLCXClxwM0tvA==", + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.12.0.tgz", + "integrity": "sha512-pfCOB3tNDlYVoWuz4D7Ji+Jmy9MHnATWHVpkERdCEiwUGEZ+4IvNPXUcPc37wJVmMpjGLeaWgPPrie0KIpWf1A==", "dependencies": { - "@opentelemetry/core": "1.8.0", - "@opentelemetry/resources": "1.8.0", - "@opentelemetry/semantic-conventions": "1.8.0" + "@opentelemetry/core": "1.12.0", + "@opentelemetry/resources": "1.12.0", + "@opentelemetry/semantic-conventions": "1.12.0" }, "engines": { "node": ">=14" }, "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.4.0" + "@opentelemetry/api": ">=1.0.0 <1.5.0" } }, "node_modules/@opentelemetry/semantic-conventions": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.8.0.tgz", - "integrity": "sha512-TYh1MRcm4JnvpqtqOwT9WYaBYY4KERHdToxs/suDTLviGRsQkIjS5yYROTYTSJQUnYLOn/TuOh5GoMwfLSU+Ew==", + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.12.0.tgz", + "integrity": "sha512-hO+bdeGOlJwqowUBoZF5LyP3ORUFOP1G0GRv8N45W/cztXbT2ZEXaAzfokRS9Xc9FWmYrDj32mF6SzH6wuoIyA==", "engines": { "node": ">=14" } }, "node_modules/@prisma/client": { - "version": "4.7.1", - "resolved": "https://registry.npmjs.org/@prisma/client/-/client-4.7.1.tgz", - "integrity": "sha512-/GbnOwIPtjiveZNUzGXOdp7RxTEkHL4DZP3vBaFNadfr6Sf0RshU5EULFzVaSi9i9PIK9PYd+1Rn7z2B2npb9w==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@prisma/client/-/client-4.13.0.tgz", + "integrity": "sha512-YaiiICcRB2hatxsbnfB66uWXjcRw3jsZdlAVxmx0cFcTc/Ad/sKdHCcWSnqyDX47vAewkjRFwiLwrOUjswVvmA==", "dev": true, "hasInstallScript": true, "dependencies": { - "@prisma/engines-version": "4.7.1-1.272861e07ab64f234d3ffc4094e32bd61775599c" + "@prisma/engines-version": "4.13.0-50.1e7af066ee9cb95cf3a403c78d9aab3e6b04f37a" }, "engines": { "node": ">=14.17" @@ -1118,9 +1118,9 @@ } }, "node_modules/@prisma/debug": { - "version": "4.7.1", - "resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-4.7.1.tgz", - "integrity": "sha512-oppjBRcTakJuAn0rANxWT9caxLKypSBT4Ajh7t+uPcO06CJOoN2Gt4VpFdw2i79U+klGAjTe/1yh8SCsTmxAhA==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-4.13.0.tgz", + "integrity": "sha512-JrltTewF/paRb5mcM5OvcEi9DtdX0sINOAswruxKQrwOLA7Phqb52OfY38MIzGrsrJ8iUGVqQ5bpYZYpxOGCsQ==", "dependencies": { "@types/debug": "4.1.7", "debug": "4.3.4", @@ -1128,16 +1128,16 @@ } }, "node_modules/@prisma/engine-core": { - "version": "4.7.1", - "resolved": "https://registry.npmjs.org/@prisma/engine-core/-/engine-core-4.7.1.tgz", - "integrity": "sha512-8NwCQcdB4OqOjpehChtKdVn6UVuDTwZewnRG13aeK+KmZurPqGO1LhwB3dTjlfLRlbYsLGb3Xzsai7Jl5QckBA==", - "dependencies": { - "@opentelemetry/api": "^1.1.0", - "@opentelemetry/sdk-trace-base": "^1.4.0", - "@prisma/debug": "4.7.1", - "@prisma/engines": "4.7.1", - "@prisma/generator-helper": "4.7.1", - "@prisma/get-platform": "4.7.1", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@prisma/engine-core/-/engine-core-4.13.0.tgz", + "integrity": "sha512-D+jooGRXKAZcsBanhvFhqXMvNEiNaP+OaOvFOM/eKQQXM0FwtKc27l7mQFv4dd/zOufr5T+fJyrTTQhWyV8oFg==", + "dependencies": { + "@opentelemetry/api": "^1.3.0", + "@opentelemetry/sdk-trace-base": "^1.8.0", + "@prisma/debug": "4.13.0", + "@prisma/engines": "4.13.0", + "@prisma/generator-helper": "4.13.0", + "@prisma/get-platform": "4.13.0", "chalk": "4.1.2", "execa": "5.1.1", "get-stream": "6.0.1", @@ -1145,36 +1145,37 @@ "new-github-issue-url": "0.2.1", "p-retry": "4.6.2", "strip-ansi": "6.0.1", - "undici": "5.11.0" + "ts-pattern": "4.2.2", + "undici": "5.21.0" } }, "node_modules/@prisma/engines": { - "version": "4.7.1", - "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-4.7.1.tgz", - "integrity": "sha512-zWabHosTdLpXXlMefHmnouhXMoTB1+SCbUU3t4FCmdrtIOZcarPKU3Alto7gm/pZ9vHlGOXHCfVZ1G7OIrSbog==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-4.13.0.tgz", + "integrity": "sha512-HrniowHRZXHuGT9XRgoXEaP2gJLXM5RMoItaY2PkjvuZ+iHc0Zjbm/302MB8YsPdWozAPHHn+jpFEcEn71OgPw==", "hasInstallScript": true }, "node_modules/@prisma/engines-version": { - "version": "4.7.1-1.272861e07ab64f234d3ffc4094e32bd61775599c", - "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-4.7.1-1.272861e07ab64f234d3ffc4094e32bd61775599c.tgz", - "integrity": "sha512-Bd4LZ+WAnUHOq31e9X/ihi5zPlr4SzTRwUZZYxvWOxlerIZ7HJlVa9zXpuKTKLpI9O1l8Ec4OYCKsivWCs5a3Q==", + "version": "4.13.0-50.1e7af066ee9cb95cf3a403c78d9aab3e6b04f37a", + "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-4.13.0-50.1e7af066ee9cb95cf3a403c78d9aab3e6b04f37a.tgz", + "integrity": "sha512-fsQlbkhPJf08JOzKoyoD9atdUijuGBekwoOPZC3YOygXEml1MTtgXVpnUNchQlRSY82OQ6pSGQ9PxUe4arcSLQ==", "dev": true }, "node_modules/@prisma/fetch-engine": { - "version": "4.7.1", - "resolved": "https://registry.npmjs.org/@prisma/fetch-engine/-/fetch-engine-4.7.1.tgz", - "integrity": "sha512-pZ3SiUV02FTMBJOwzoqGR4YcZ2jTo43Xw1QC/5YwmRkYa5NPydUnap5rvB84DgVNq5OnOrQxhWSsakOUPqcc6g==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@prisma/fetch-engine/-/fetch-engine-4.13.0.tgz", + "integrity": "sha512-khMMm3I8nMUgwd7DoM1wBFjMKn/Z5PZF27EMQGPtquM1nRt601blJbep0qodXR7oHioQolCK8gfbw5Hfdml1mg==", "dependencies": { - "@prisma/debug": "4.7.1", - "@prisma/get-platform": "4.7.1", + "@prisma/debug": "4.13.0", + "@prisma/get-platform": "4.13.0", "chalk": "4.1.2", "execa": "5.1.1", "find-cache-dir": "3.3.2", + "fs-extra": "11.1.1", "hasha": "5.2.2", "http-proxy-agent": "5.0.0", "https-proxy-agent": "5.0.1", - "make-dir": "3.1.0", - "node-fetch": "2.6.7", + "node-fetch": "2.6.9", "p-filter": "2.1.0", "p-map": "4.0.0", "p-retry": "4.6.2", @@ -1185,56 +1186,66 @@ } }, "node_modules/@prisma/generator-helper": { - "version": "4.7.1", - "resolved": "https://registry.npmjs.org/@prisma/generator-helper/-/generator-helper-4.7.1.tgz", - "integrity": "sha512-q9mjYOyLxkLWhqjvPB5sx5J1VRegWA2eC9mwrGgA0CSMo6SzZ7xwIe4rMJKnh4a7QMUO03+HQFdv/Nz7BOWCcg==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@prisma/generator-helper/-/generator-helper-4.13.0.tgz", + "integrity": "sha512-Zx9rtbsEIU/9DKnGRvmjLdyeyhzeeXNFp1alkRh1w//rQ5jTcobiay/jU4Qo+EQOs2bnWEfUeiBoOjfaysdLNg==", "dependencies": { - "@prisma/debug": "4.7.1", + "@prisma/debug": "4.13.0", "@types/cross-spawn": "6.0.2", "chalk": "4.1.2", "cross-spawn": "7.0.3" } }, "node_modules/@prisma/get-platform": { - "version": "4.7.1", - "resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-4.7.1.tgz", - "integrity": "sha512-p160ToD9j53TgSrg0O0q3GkGZTGwB30UqIu3B0bu/NIvhnhHOwuEo4tyDXYKblLOE2TL0e1t0PWOSQAvH3nKYw==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-4.13.0.tgz", + "integrity": "sha512-HWBgQNpRi1qEXj24w/qsWCpTW4vKP2/pdiYTyl2SSEVoK4o5izHUt0PQzNl5St5CGr4SDcSyi0C3fXINd46c6A==", "dependencies": { - "@prisma/debug": "4.7.1" + "@prisma/debug": "4.13.0", + "chalk": "4.1.2", + "escape-string-regexp": "4.0.0", + "execa": "5.1.1", + "fs-jetpack": "5.1.0", + "replace-string": "3.1.0", + "strip-ansi": "6.0.1", + "tempy": "1.0.1", + "terminal-link": "2.1.1", + "ts-pattern": "4.2.2" } }, "node_modules/@prisma/internals": { - "version": "4.7.1", - "resolved": "https://registry.npmjs.org/@prisma/internals/-/internals-4.7.1.tgz", - "integrity": "sha512-YgG+5zLZuKdVUPnNdw9XA0XGfW1vZaOqrcGgRnla0mSIIIB3Gg3noRuHv9ZQAXeHLWh2v7MHxal6fxKElMN0ug==", - "dependencies": { - "@prisma/debug": "4.7.1", - "@prisma/engine-core": "4.7.1", - "@prisma/engines": "4.7.1", - "@prisma/fetch-engine": "4.7.1", - "@prisma/generator-helper": "4.7.1", - "@prisma/get-platform": "4.7.1", - "@prisma/prisma-fmt-wasm": "4.7.1-1.272861e07ab64f234d3ffc4094e32bd61775599c", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@prisma/internals/-/internals-4.13.0.tgz", + "integrity": "sha512-TxdTQFJO0zMCx0Tgb6UZt3WsVt+etvtWx+LaSWf4Pk1ECGte5w+9iiuypwjiLortSn7qm6n5KVWTXFOnnZr4Ww==", + "dependencies": { + "@prisma/debug": "4.13.0", + "@prisma/engine-core": "4.13.0", + "@prisma/engines": "4.13.0", + "@prisma/fetch-engine": "4.13.0", + "@prisma/generator-helper": "4.13.0", + "@prisma/get-platform": "4.13.0", + "@prisma/ni": "4.13.0", + "@prisma/prisma-fmt-wasm": "4.13.0-50.1e7af066ee9cb95cf3a403c78d9aab3e6b04f37a", "archiver": "5.3.1", "arg": "5.0.2", "chalk": "4.1.2", - "checkpoint-client": "1.1.21", + "checkpoint-client": "1.1.23", "cli-truncate": "2.1.0", "dotenv": "16.0.3", "escape-string-regexp": "4.0.0", "execa": "5.1.1", "find-up": "5.0.0", "fp-ts": "2.13.1", - "fs-extra": "10.1.0", + "fs-extra": "11.1.1", "fs-jetpack": "5.1.0", - "global-dirs": "3.0.0", + "global-dirs": "3.0.1", "globby": "11.1.0", "has-yarn": "2.1.0", "is-windows": "^1.0.2", "is-wsl": "^2.2.0", - "make-dir": "3.1.0", "new-github-issue-url": "0.2.1", - "node-fetch": "2.6.7", + "node-fetch": "2.6.9", + "npm-packlist": "5.1.3", "open": "7", "ora": "5.4.1", "p-map": "4.0.0", @@ -1242,7 +1253,6 @@ "read-pkg-up": "7.0.1", "replace-string": "3.1.0", "resolve": "1.22.1", - "rimraf": "3.0.2", "string-width": "4.2.3", "strip-ansi": "6.0.1", "strip-indent": "3.0.0", @@ -1275,10 +1285,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/@prisma/ni": { + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@prisma/ni/-/ni-4.13.0.tgz", + "integrity": "sha512-FN1wV1I61P6WndheLpja5oQuzIW2WkYqFViPL5GS5dhrpsO69SlyOnAsxpfCKUa5HhXINi7fowgdcngK1QDW9w==" + }, "node_modules/@prisma/prisma-fmt-wasm": { - "version": "4.7.1-1.272861e07ab64f234d3ffc4094e32bd61775599c", - "resolved": "https://registry.npmjs.org/@prisma/prisma-fmt-wasm/-/prisma-fmt-wasm-4.7.1-1.272861e07ab64f234d3ffc4094e32bd61775599c.tgz", - "integrity": "sha512-o9oSp2c5yDWHn9TT2Ntv3cb6LuJKPBy32gTtipYH1D166KfKBy+1RkPySobWZCKV/TrkUGlcBn5vcQgRBHPvVA==" + "version": "4.13.0-50.1e7af066ee9cb95cf3a403c78d9aab3e6b04f37a", + "resolved": "https://registry.npmjs.org/@prisma/prisma-fmt-wasm/-/prisma-fmt-wasm-4.13.0-50.1e7af066ee9cb95cf3a403c78d9aab3e6b04f37a.tgz", + "integrity": "sha512-kEYSUa3XT1Oiu/MbdUkyjfVtAOQmZz69KGKFH/GWoQNLvkscrqy4J4XewEY80BrVuyC3vbV7un4kea0xklWhpA==" }, "node_modules/@sinclair/typebox": { "version": "0.24.51", @@ -1932,9 +1947,9 @@ } }, "node_modules/checkpoint-client": { - "version": "1.1.21", - "resolved": "https://registry.npmjs.org/checkpoint-client/-/checkpoint-client-1.1.21.tgz", - "integrity": "sha512-bcrcnJncn6uGhj06IIsWvUBPyJWK1ZezDbLCJ//IQEYXkUobhGvOOBlHe9K5x0ZMkAZGinPB4T+lTUmFz/acWQ==", + "version": "1.1.23", + "resolved": "https://registry.npmjs.org/checkpoint-client/-/checkpoint-client-1.1.23.tgz", + "integrity": "sha512-NrGvMiH1fUcZwrYc0Z+YTn7q9ysV0kPgVyDKZ5jrfIerFJuSllvyGsY7bHeQSEiljaIaUP1Q/xutZ8q1s7PGzg==", "dependencies": { "ci-info": "3.3.0", "env-paths": "2.2.1", @@ -1945,6 +1960,25 @@ "uuid": "8.3.2" } }, + "node_modules/checkpoint-client/node_modules/node-fetch": { + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, "node_modules/ci-info": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.0.tgz", @@ -2390,9 +2424,9 @@ "integrity": "sha512-WvJe06IfNYlr+6cO3uQkdKdy3Cb1LlCJSF8zRs2eT8yuhdbSlR9nIt+TgQ92RUxiRrQm+/S7RARnMfCs5iuAjw==" }, "node_modules/fastq": { - "version": "1.14.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.14.0.tgz", - "integrity": "sha512-eR2D+V9/ExcbF9ls441yIuN6TI2ED1Y2ZcA5BmMtJsOkWOFRJQ0Jt0g1UwqXJJVAb+V+umH5Dfr8oh4EVP7VVg==", + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", + "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", "dependencies": { "reusify": "^1.0.4" } @@ -2459,16 +2493,16 @@ "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" }, "node_modules/fs-extra": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", - "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.1.1.tgz", + "integrity": "sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==", "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", "universalify": "^2.0.0" }, "engines": { - "node": ">=12" + "node": ">=14.14" } }, "node_modules/fs-jetpack": { @@ -2591,9 +2625,9 @@ } }, "node_modules/global-dirs": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.0.tgz", - "integrity": "sha512-v8ho2DS5RiCjftj1nD9NmnfaOzTdud7RRnVd9kFNOjqZbISlx5DQ+OrTkywgd0dIt7oFCvKetZSHoHcP3sDdiA==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.1.tgz", + "integrity": "sha512-NBcGGFbBA9s1VzD41QXDG+3++t9Mn5t1FpLdhESY6oKY4gYTFpX4wO3sqGUa0Srjtbfj3szX0RnemmrVRUdULA==", "dependencies": { "ini": "2.0.0" }, @@ -2743,13 +2777,43 @@ ] }, "node_modules/ignore": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.1.tgz", - "integrity": "sha512-d2qQLzTJ9WxQftPAuEQpSPmKqzxePjzVbpAVv62AQ64NTL+wR4JkrVqR/LqFsFEUsHDAiId52mJteHDFuDkElA==", + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", "engines": { "node": ">= 4" } }, + "node_modules/ignore-walk": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-5.0.1.tgz", + "integrity": "sha512-yemi4pMf51WKT7khInJqAvsIGzoqYXblnsz0ql8tM+yi1EKYTY1evX4NAbJrLL/Aanr2HyZeluqU+Oi7MGHokw==", + "dependencies": { + "minimatch": "^5.0.1" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/ignore-walk/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/ignore-walk/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/import-local": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", @@ -3882,9 +3946,9 @@ } }, "node_modules/node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.9.tgz", + "integrity": "sha512-DJm/CJkZkRjKKj4Zi4BsKVZh3ValV5IR5s7LVZnW+6YMh0W1BfNA8XSs6DLMGYlId5F3KnA70uu2qepcR08Qqg==", "dependencies": { "whatwg-url": "^5.0.0" }, @@ -3900,25 +3964,6 @@ } } }, - "node_modules/node-fetch/node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" - }, - "node_modules/node-fetch/node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" - }, - "node_modules/node-fetch/node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, "node_modules/node-int64": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", @@ -3958,6 +4003,79 @@ "node": ">=0.10.0" } }, + "node_modules/npm-bundled": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-2.0.1.tgz", + "integrity": "sha512-gZLxXdjEzE/+mOstGDqR6b0EkhJ+kM6fxM6vUuckuctuVPh80Q6pw/rSZj9s4Gex9GxWtIicO1pc8DB9KZWudw==", + "dependencies": { + "npm-normalize-package-bin": "^2.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/npm-normalize-package-bin": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-2.0.0.tgz", + "integrity": "sha512-awzfKUO7v0FscrSpRoogyNm0sajikhBWpU0QMrW09AMi9n1PoKU6WaIqUzuJSQnpciZZmJ/jMZ2Egfmb/9LiWQ==", + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/npm-packlist": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-5.1.3.tgz", + "integrity": "sha512-263/0NGrn32YFYi4J533qzrQ/krmmrWwhKkzwTuM4f/07ug51odoaNjUexxO4vxlzURHcmYMH1QjvHjsNDKLVg==", + "dependencies": { + "glob": "^8.0.1", + "ignore-walk": "^5.0.1", + "npm-bundled": "^2.0.0", + "npm-normalize-package-bin": "^2.0.0" + }, + "bin": { + "npm-packlist": "bin/index.js" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/npm-packlist/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/npm-packlist/node_modules/glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/npm-packlist/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/npm-run-path": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", @@ -4290,13 +4408,13 @@ } }, "node_modules/prisma": { - "version": "4.7.1", - "resolved": "https://registry.npmjs.org/prisma/-/prisma-4.7.1.tgz", - "integrity": "sha512-CCQP+m+1qZOGIZlvnL6T3ZwaU0LAleIHYFPN9tFSzjs/KL6vH9rlYbGOkTuG9Q1s6Ki5D0LJlYlW18Z9EBUpGg==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/prisma/-/prisma-4.13.0.tgz", + "integrity": "sha512-L9mqjnSmvWIRCYJ9mQkwCtj4+JDYYTdhoyo8hlsHNDXaZLh/b4hR0IoKIBbTKxZuyHQzLopb/+0Rvb69uGV7uA==", "dev": true, "hasInstallScript": true, "dependencies": { - "@prisma/engines": "4.7.1" + "@prisma/engines": "4.13.0" }, "bin": { "prisma": "build/index.js", @@ -5027,6 +5145,11 @@ "node": ">=8.0" } }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, "node_modules/ts-jest": { "version": "29.0.3", "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.0.3.tgz", @@ -5086,9 +5209,9 @@ } }, "node_modules/ts-pattern": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/ts-pattern/-/ts-pattern-4.0.3.tgz", - "integrity": "sha512-OxQStbr1MKcYYz3YaXsFSBkMo3zjFODVkV8kaLfOak+sWSfx4B+jkOm/VoaWLhnMP+icnIcJ7ENYEnmpAv3jLg==" + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/ts-pattern/-/ts-pattern-4.2.2.tgz", + "integrity": "sha512-qzJMo2pbkUJWusRH5o8xR+xogn6RmvViyUgwBFTtRENLse470clCGjHDf6haWGZ1AOmk8XkEohUoBW8Uut6Scg==" }, "node_modules/ts-toolbelt": { "version": "9.6.0", @@ -5127,9 +5250,9 @@ } }, "node_modules/undici": { - "version": "5.11.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.11.0.tgz", - "integrity": "sha512-oWjWJHzFet0Ow4YZBkyiJwiK5vWqEYoH7BINzJAJOLedZ++JpAlCbUktW2GQ2DS2FpKmxD/JMtWUUWl1BtghGw==", + "version": "5.21.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.21.0.tgz", + "integrity": "sha512-HOjK8l6a57b2ZGXOcUsI5NLfoTrfmbOl90ixJDl0AEFG4wgHNDQxtZy15/ZQp7HhjkpaGlp/eneMgtsu1dIlUA==", "dependencies": { "busboy": "^1.6.0" }, @@ -5241,6 +5364,20 @@ "defaults": "^1.0.3" } }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -6130,55 +6267,55 @@ } }, "@opentelemetry/api": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.3.0.tgz", - "integrity": "sha512-YveTnGNsFFixTKJz09Oi4zYkiLT5af3WpZDu4aIUM7xX+2bHAkOJayFTVQd6zB8kkWPpbua4Ha6Ql00grdLlJQ==" + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.4.1.tgz", + "integrity": "sha512-O2yRJce1GOc6PAy3QxFM4NzFiWzvScDC1/5ihYBL6BUEVdq0XMWN01sppE+H6bBXbaFYipjwFLEWLg5PaSOThA==" }, "@opentelemetry/core": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.8.0.tgz", - "integrity": "sha512-6SDjwBML4Am0AQmy7z1j6HGrWDgeK8awBRUvl1PGw6HayViMk4QpnUXvv4HTHisecgVBy43NE/cstWprm8tIfw==", + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.12.0.tgz", + "integrity": "sha512-4DWYNb3dLs2mSCGl65jY3aEgbvPWSHVQV/dmDWiYeWUrMakZQFcymqZOSUNZO0uDrEJoxMu8O5tZktX6UKFwag==", "requires": { - "@opentelemetry/semantic-conventions": "1.8.0" + "@opentelemetry/semantic-conventions": "1.12.0" } }, "@opentelemetry/resources": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.8.0.tgz", - "integrity": "sha512-KSyMH6Jvss/PFDy16z5qkCK0ERlpyqixb1xwb73wLMvVq+j7i89lobDjw3JkpCcd1Ws0J6jAI4fw28Zufj2ssg==", + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.12.0.tgz", + "integrity": "sha512-gunMKXG0hJrR0LXrqh7BVbziA/+iJBL3ZbXCXO64uY+SrExkwoyJkpiq9l5ismkGF/A20mDEV7tGwh+KyPw00Q==", "requires": { - "@opentelemetry/core": "1.8.0", - "@opentelemetry/semantic-conventions": "1.8.0" + "@opentelemetry/core": "1.12.0", + "@opentelemetry/semantic-conventions": "1.12.0" } }, "@opentelemetry/sdk-trace-base": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.8.0.tgz", - "integrity": "sha512-iH41m0UTddnCKJzZx3M85vlhKzRcmT48pUeBbnzsGrq4nIay1oWVHKM5nhB5r8qRDGvd/n7f/YLCXClxwM0tvA==", + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.12.0.tgz", + "integrity": "sha512-pfCOB3tNDlYVoWuz4D7Ji+Jmy9MHnATWHVpkERdCEiwUGEZ+4IvNPXUcPc37wJVmMpjGLeaWgPPrie0KIpWf1A==", "requires": { - "@opentelemetry/core": "1.8.0", - "@opentelemetry/resources": "1.8.0", - "@opentelemetry/semantic-conventions": "1.8.0" + "@opentelemetry/core": "1.12.0", + "@opentelemetry/resources": "1.12.0", + "@opentelemetry/semantic-conventions": "1.12.0" } }, "@opentelemetry/semantic-conventions": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.8.0.tgz", - "integrity": "sha512-TYh1MRcm4JnvpqtqOwT9WYaBYY4KERHdToxs/suDTLviGRsQkIjS5yYROTYTSJQUnYLOn/TuOh5GoMwfLSU+Ew==" + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.12.0.tgz", + "integrity": "sha512-hO+bdeGOlJwqowUBoZF5LyP3ORUFOP1G0GRv8N45W/cztXbT2ZEXaAzfokRS9Xc9FWmYrDj32mF6SzH6wuoIyA==" }, "@prisma/client": { - "version": "4.7.1", - "resolved": "https://registry.npmjs.org/@prisma/client/-/client-4.7.1.tgz", - "integrity": "sha512-/GbnOwIPtjiveZNUzGXOdp7RxTEkHL4DZP3vBaFNadfr6Sf0RshU5EULFzVaSi9i9PIK9PYd+1Rn7z2B2npb9w==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@prisma/client/-/client-4.13.0.tgz", + "integrity": "sha512-YaiiICcRB2hatxsbnfB66uWXjcRw3jsZdlAVxmx0cFcTc/Ad/sKdHCcWSnqyDX47vAewkjRFwiLwrOUjswVvmA==", "dev": true, "requires": { - "@prisma/engines-version": "4.7.1-1.272861e07ab64f234d3ffc4094e32bd61775599c" + "@prisma/engines-version": "4.13.0-50.1e7af066ee9cb95cf3a403c78d9aab3e6b04f37a" } }, "@prisma/debug": { - "version": "4.7.1", - "resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-4.7.1.tgz", - "integrity": "sha512-oppjBRcTakJuAn0rANxWT9caxLKypSBT4Ajh7t+uPcO06CJOoN2Gt4VpFdw2i79U+klGAjTe/1yh8SCsTmxAhA==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-4.13.0.tgz", + "integrity": "sha512-JrltTewF/paRb5mcM5OvcEi9DtdX0sINOAswruxKQrwOLA7Phqb52OfY38MIzGrsrJ8iUGVqQ5bpYZYpxOGCsQ==", "requires": { "@types/debug": "4.1.7", "debug": "4.3.4", @@ -6186,16 +6323,16 @@ } }, "@prisma/engine-core": { - "version": "4.7.1", - "resolved": "https://registry.npmjs.org/@prisma/engine-core/-/engine-core-4.7.1.tgz", - "integrity": "sha512-8NwCQcdB4OqOjpehChtKdVn6UVuDTwZewnRG13aeK+KmZurPqGO1LhwB3dTjlfLRlbYsLGb3Xzsai7Jl5QckBA==", - "requires": { - "@opentelemetry/api": "^1.1.0", - "@opentelemetry/sdk-trace-base": "^1.4.0", - "@prisma/debug": "4.7.1", - "@prisma/engines": "4.7.1", - "@prisma/generator-helper": "4.7.1", - "@prisma/get-platform": "4.7.1", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@prisma/engine-core/-/engine-core-4.13.0.tgz", + "integrity": "sha512-D+jooGRXKAZcsBanhvFhqXMvNEiNaP+OaOvFOM/eKQQXM0FwtKc27l7mQFv4dd/zOufr5T+fJyrTTQhWyV8oFg==", + "requires": { + "@opentelemetry/api": "^1.3.0", + "@opentelemetry/sdk-trace-base": "^1.8.0", + "@prisma/debug": "4.13.0", + "@prisma/engines": "4.13.0", + "@prisma/generator-helper": "4.13.0", + "@prisma/get-platform": "4.13.0", "chalk": "4.1.2", "execa": "5.1.1", "get-stream": "6.0.1", @@ -6203,35 +6340,36 @@ "new-github-issue-url": "0.2.1", "p-retry": "4.6.2", "strip-ansi": "6.0.1", - "undici": "5.11.0" + "ts-pattern": "4.2.2", + "undici": "5.21.0" } }, "@prisma/engines": { - "version": "4.7.1", - "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-4.7.1.tgz", - "integrity": "sha512-zWabHosTdLpXXlMefHmnouhXMoTB1+SCbUU3t4FCmdrtIOZcarPKU3Alto7gm/pZ9vHlGOXHCfVZ1G7OIrSbog==" + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-4.13.0.tgz", + "integrity": "sha512-HrniowHRZXHuGT9XRgoXEaP2gJLXM5RMoItaY2PkjvuZ+iHc0Zjbm/302MB8YsPdWozAPHHn+jpFEcEn71OgPw==" }, "@prisma/engines-version": { - "version": "4.7.1-1.272861e07ab64f234d3ffc4094e32bd61775599c", - "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-4.7.1-1.272861e07ab64f234d3ffc4094e32bd61775599c.tgz", - "integrity": "sha512-Bd4LZ+WAnUHOq31e9X/ihi5zPlr4SzTRwUZZYxvWOxlerIZ7HJlVa9zXpuKTKLpI9O1l8Ec4OYCKsivWCs5a3Q==", + "version": "4.13.0-50.1e7af066ee9cb95cf3a403c78d9aab3e6b04f37a", + "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-4.13.0-50.1e7af066ee9cb95cf3a403c78d9aab3e6b04f37a.tgz", + "integrity": "sha512-fsQlbkhPJf08JOzKoyoD9atdUijuGBekwoOPZC3YOygXEml1MTtgXVpnUNchQlRSY82OQ6pSGQ9PxUe4arcSLQ==", "dev": true }, "@prisma/fetch-engine": { - "version": "4.7.1", - "resolved": "https://registry.npmjs.org/@prisma/fetch-engine/-/fetch-engine-4.7.1.tgz", - "integrity": "sha512-pZ3SiUV02FTMBJOwzoqGR4YcZ2jTo43Xw1QC/5YwmRkYa5NPydUnap5rvB84DgVNq5OnOrQxhWSsakOUPqcc6g==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@prisma/fetch-engine/-/fetch-engine-4.13.0.tgz", + "integrity": "sha512-khMMm3I8nMUgwd7DoM1wBFjMKn/Z5PZF27EMQGPtquM1nRt601blJbep0qodXR7oHioQolCK8gfbw5Hfdml1mg==", "requires": { - "@prisma/debug": "4.7.1", - "@prisma/get-platform": "4.7.1", + "@prisma/debug": "4.13.0", + "@prisma/get-platform": "4.13.0", "chalk": "4.1.2", "execa": "5.1.1", "find-cache-dir": "3.3.2", + "fs-extra": "11.1.1", "hasha": "5.2.2", "http-proxy-agent": "5.0.0", "https-proxy-agent": "5.0.1", - "make-dir": "3.1.0", - "node-fetch": "2.6.7", + "node-fetch": "2.6.9", "p-filter": "2.1.0", "p-map": "4.0.0", "p-retry": "4.6.2", @@ -6242,56 +6380,66 @@ } }, "@prisma/generator-helper": { - "version": "4.7.1", - "resolved": "https://registry.npmjs.org/@prisma/generator-helper/-/generator-helper-4.7.1.tgz", - "integrity": "sha512-q9mjYOyLxkLWhqjvPB5sx5J1VRegWA2eC9mwrGgA0CSMo6SzZ7xwIe4rMJKnh4a7QMUO03+HQFdv/Nz7BOWCcg==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@prisma/generator-helper/-/generator-helper-4.13.0.tgz", + "integrity": "sha512-Zx9rtbsEIU/9DKnGRvmjLdyeyhzeeXNFp1alkRh1w//rQ5jTcobiay/jU4Qo+EQOs2bnWEfUeiBoOjfaysdLNg==", "requires": { - "@prisma/debug": "4.7.1", + "@prisma/debug": "4.13.0", "@types/cross-spawn": "6.0.2", "chalk": "4.1.2", "cross-spawn": "7.0.3" } }, "@prisma/get-platform": { - "version": "4.7.1", - "resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-4.7.1.tgz", - "integrity": "sha512-p160ToD9j53TgSrg0O0q3GkGZTGwB30UqIu3B0bu/NIvhnhHOwuEo4tyDXYKblLOE2TL0e1t0PWOSQAvH3nKYw==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-4.13.0.tgz", + "integrity": "sha512-HWBgQNpRi1qEXj24w/qsWCpTW4vKP2/pdiYTyl2SSEVoK4o5izHUt0PQzNl5St5CGr4SDcSyi0C3fXINd46c6A==", "requires": { - "@prisma/debug": "4.7.1" + "@prisma/debug": "4.13.0", + "chalk": "4.1.2", + "escape-string-regexp": "4.0.0", + "execa": "5.1.1", + "fs-jetpack": "5.1.0", + "replace-string": "3.1.0", + "strip-ansi": "6.0.1", + "tempy": "1.0.1", + "terminal-link": "2.1.1", + "ts-pattern": "4.2.2" } }, "@prisma/internals": { - "version": "4.7.1", - "resolved": "https://registry.npmjs.org/@prisma/internals/-/internals-4.7.1.tgz", - "integrity": "sha512-YgG+5zLZuKdVUPnNdw9XA0XGfW1vZaOqrcGgRnla0mSIIIB3Gg3noRuHv9ZQAXeHLWh2v7MHxal6fxKElMN0ug==", - "requires": { - "@prisma/debug": "4.7.1", - "@prisma/engine-core": "4.7.1", - "@prisma/engines": "4.7.1", - "@prisma/fetch-engine": "4.7.1", - "@prisma/generator-helper": "4.7.1", - "@prisma/get-platform": "4.7.1", - "@prisma/prisma-fmt-wasm": "4.7.1-1.272861e07ab64f234d3ffc4094e32bd61775599c", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@prisma/internals/-/internals-4.13.0.tgz", + "integrity": "sha512-TxdTQFJO0zMCx0Tgb6UZt3WsVt+etvtWx+LaSWf4Pk1ECGte5w+9iiuypwjiLortSn7qm6n5KVWTXFOnnZr4Ww==", + "requires": { + "@prisma/debug": "4.13.0", + "@prisma/engine-core": "4.13.0", + "@prisma/engines": "4.13.0", + "@prisma/fetch-engine": "4.13.0", + "@prisma/generator-helper": "4.13.0", + "@prisma/get-platform": "4.13.0", + "@prisma/ni": "4.13.0", + "@prisma/prisma-fmt-wasm": "4.13.0-50.1e7af066ee9cb95cf3a403c78d9aab3e6b04f37a", "archiver": "5.3.1", "arg": "5.0.2", "chalk": "4.1.2", - "checkpoint-client": "1.1.21", + "checkpoint-client": "1.1.23", "cli-truncate": "2.1.0", "dotenv": "16.0.3", "escape-string-regexp": "4.0.0", "execa": "5.1.1", "find-up": "5.0.0", "fp-ts": "2.13.1", - "fs-extra": "10.1.0", + "fs-extra": "11.1.1", "fs-jetpack": "5.1.0", - "global-dirs": "3.0.0", + "global-dirs": "3.0.1", "globby": "11.1.0", "has-yarn": "2.1.0", "is-windows": "^1.0.2", "is-wsl": "^2.2.0", - "make-dir": "3.1.0", "new-github-issue-url": "0.2.1", - "node-fetch": "2.6.7", + "node-fetch": "2.6.9", + "npm-packlist": "5.1.3", "open": "7", "ora": "5.4.1", "p-map": "4.0.0", @@ -6299,7 +6447,6 @@ "read-pkg-up": "7.0.1", "replace-string": "3.1.0", "resolve": "1.22.1", - "rimraf": "3.0.2", "string-width": "4.2.3", "strip-ansi": "6.0.1", "strip-indent": "3.0.0", @@ -6328,10 +6475,15 @@ } } }, + "@prisma/ni": { + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@prisma/ni/-/ni-4.13.0.tgz", + "integrity": "sha512-FN1wV1I61P6WndheLpja5oQuzIW2WkYqFViPL5GS5dhrpsO69SlyOnAsxpfCKUa5HhXINi7fowgdcngK1QDW9w==" + }, "@prisma/prisma-fmt-wasm": { - "version": "4.7.1-1.272861e07ab64f234d3ffc4094e32bd61775599c", - "resolved": "https://registry.npmjs.org/@prisma/prisma-fmt-wasm/-/prisma-fmt-wasm-4.7.1-1.272861e07ab64f234d3ffc4094e32bd61775599c.tgz", - "integrity": "sha512-o9oSp2c5yDWHn9TT2Ntv3cb6LuJKPBy32gTtipYH1D166KfKBy+1RkPySobWZCKV/TrkUGlcBn5vcQgRBHPvVA==" + "version": "4.13.0-50.1e7af066ee9cb95cf3a403c78d9aab3e6b04f37a", + "resolved": "https://registry.npmjs.org/@prisma/prisma-fmt-wasm/-/prisma-fmt-wasm-4.13.0-50.1e7af066ee9cb95cf3a403c78d9aab3e6b04f37a.tgz", + "integrity": "sha512-kEYSUa3XT1Oiu/MbdUkyjfVtAOQmZz69KGKFH/GWoQNLvkscrqy4J4XewEY80BrVuyC3vbV7un4kea0xklWhpA==" }, "@sinclair/typebox": { "version": "0.24.51", @@ -6842,9 +6994,9 @@ "dev": true }, "checkpoint-client": { - "version": "1.1.21", - "resolved": "https://registry.npmjs.org/checkpoint-client/-/checkpoint-client-1.1.21.tgz", - "integrity": "sha512-bcrcnJncn6uGhj06IIsWvUBPyJWK1ZezDbLCJ//IQEYXkUobhGvOOBlHe9K5x0ZMkAZGinPB4T+lTUmFz/acWQ==", + "version": "1.1.23", + "resolved": "https://registry.npmjs.org/checkpoint-client/-/checkpoint-client-1.1.23.tgz", + "integrity": "sha512-NrGvMiH1fUcZwrYc0Z+YTn7q9ysV0kPgVyDKZ5jrfIerFJuSllvyGsY7bHeQSEiljaIaUP1Q/xutZ8q1s7PGzg==", "requires": { "ci-info": "3.3.0", "env-paths": "2.2.1", @@ -6853,6 +7005,16 @@ "ms": "2.1.3", "node-fetch": "2.6.7", "uuid": "8.3.2" + }, + "dependencies": { + "node-fetch": { + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "requires": { + "whatwg-url": "^5.0.0" + } + } } }, "ci-info": { @@ -7184,9 +7346,9 @@ "integrity": "sha512-WvJe06IfNYlr+6cO3uQkdKdy3Cb1LlCJSF8zRs2eT8yuhdbSlR9nIt+TgQ92RUxiRrQm+/S7RARnMfCs5iuAjw==" }, "fastq": { - "version": "1.14.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.14.0.tgz", - "integrity": "sha512-eR2D+V9/ExcbF9ls441yIuN6TI2ED1Y2ZcA5BmMtJsOkWOFRJQ0Jt0g1UwqXJJVAb+V+umH5Dfr8oh4EVP7VVg==", + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", + "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", "requires": { "reusify": "^1.0.4" } @@ -7238,9 +7400,9 @@ "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" }, "fs-extra": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", - "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.1.1.tgz", + "integrity": "sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==", "requires": { "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", @@ -7335,9 +7497,9 @@ } }, "global-dirs": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.0.tgz", - "integrity": "sha512-v8ho2DS5RiCjftj1nD9NmnfaOzTdud7RRnVd9kFNOjqZbISlx5DQ+OrTkywgd0dIt7oFCvKetZSHoHcP3sDdiA==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.1.tgz", + "integrity": "sha512-NBcGGFbBA9s1VzD41QXDG+3++t9Mn5t1FpLdhESY6oKY4gYTFpX4wO3sqGUa0Srjtbfj3szX0RnemmrVRUdULA==", "requires": { "ini": "2.0.0" } @@ -7434,9 +7596,35 @@ "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" }, "ignore": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.1.tgz", - "integrity": "sha512-d2qQLzTJ9WxQftPAuEQpSPmKqzxePjzVbpAVv62AQ64NTL+wR4JkrVqR/LqFsFEUsHDAiId52mJteHDFuDkElA==" + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==" + }, + "ignore-walk": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-5.0.1.tgz", + "integrity": "sha512-yemi4pMf51WKT7khInJqAvsIGzoqYXblnsz0ql8tM+yi1EKYTY1evX4NAbJrLL/Aanr2HyZeluqU+Oi7MGHokw==", + "requires": { + "minimatch": "^5.0.1" + }, + "dependencies": { + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "requires": { + "balanced-match": "^1.0.0" + } + }, + "minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "requires": { + "brace-expansion": "^2.0.1" + } + } + } }, "import-local": { "version": "3.1.0", @@ -8287,32 +8475,11 @@ "integrity": "sha512-md4cGoxuT4T4d/HDOXbrUHkTKrp/vp+m3aOA7XXVYwNsUNMK49g3SQicTSeV5GIz/5QVGAeYRAOlyp9OvlgsYA==" }, "node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.9.tgz", + "integrity": "sha512-DJm/CJkZkRjKKj4Zi4BsKVZh3ValV5IR5s7LVZnW+6YMh0W1BfNA8XSs6DLMGYlId5F3KnA70uu2qepcR08Qqg==", "requires": { "whatwg-url": "^5.0.0" - }, - "dependencies": { - "tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" - }, - "webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" - }, - "whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", - "requires": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - } } }, "node-int64": { @@ -8350,6 +8517,60 @@ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" }, + "npm-bundled": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-2.0.1.tgz", + "integrity": "sha512-gZLxXdjEzE/+mOstGDqR6b0EkhJ+kM6fxM6vUuckuctuVPh80Q6pw/rSZj9s4Gex9GxWtIicO1pc8DB9KZWudw==", + "requires": { + "npm-normalize-package-bin": "^2.0.0" + } + }, + "npm-normalize-package-bin": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-2.0.0.tgz", + "integrity": "sha512-awzfKUO7v0FscrSpRoogyNm0sajikhBWpU0QMrW09AMi9n1PoKU6WaIqUzuJSQnpciZZmJ/jMZ2Egfmb/9LiWQ==" + }, + "npm-packlist": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-5.1.3.tgz", + "integrity": "sha512-263/0NGrn32YFYi4J533qzrQ/krmmrWwhKkzwTuM4f/07ug51odoaNjUexxO4vxlzURHcmYMH1QjvHjsNDKLVg==", + "requires": { + "glob": "^8.0.1", + "ignore-walk": "^5.0.1", + "npm-bundled": "^2.0.0", + "npm-normalize-package-bin": "^2.0.0" + }, + "dependencies": { + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "requires": { + "balanced-match": "^1.0.0" + } + }, + "glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + } + }, + "minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "requires": { + "brace-expansion": "^2.0.1" + } + } + } + }, "npm-run-path": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", @@ -8574,12 +8795,12 @@ } }, "prisma": { - "version": "4.7.1", - "resolved": "https://registry.npmjs.org/prisma/-/prisma-4.7.1.tgz", - "integrity": "sha512-CCQP+m+1qZOGIZlvnL6T3ZwaU0LAleIHYFPN9tFSzjs/KL6vH9rlYbGOkTuG9Q1s6Ki5D0LJlYlW18Z9EBUpGg==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/prisma/-/prisma-4.13.0.tgz", + "integrity": "sha512-L9mqjnSmvWIRCYJ9mQkwCtj4+JDYYTdhoyo8hlsHNDXaZLh/b4hR0IoKIBbTKxZuyHQzLopb/+0Rvb69uGV7uA==", "dev": true, "requires": { - "@prisma/engines": "4.7.1" + "@prisma/engines": "4.13.0" } }, "process-nextick-args": { @@ -9088,6 +9309,11 @@ "is-number": "^7.0.0" } }, + "tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, "ts-jest": { "version": "29.0.3", "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.0.3.tgz", @@ -9116,9 +9342,9 @@ } }, "ts-pattern": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/ts-pattern/-/ts-pattern-4.0.3.tgz", - "integrity": "sha512-OxQStbr1MKcYYz3YaXsFSBkMo3zjFODVkV8kaLfOak+sWSfx4B+jkOm/VoaWLhnMP+icnIcJ7ENYEnmpAv3jLg==" + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/ts-pattern/-/ts-pattern-4.2.2.tgz", + "integrity": "sha512-qzJMo2pbkUJWusRH5o8xR+xogn6RmvViyUgwBFTtRENLse470clCGjHDf6haWGZ1AOmk8XkEohUoBW8Uut6Scg==" }, "ts-toolbelt": { "version": "9.6.0", @@ -9144,9 +9370,9 @@ "dev": true }, "undici": { - "version": "5.11.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.11.0.tgz", - "integrity": "sha512-oWjWJHzFet0Ow4YZBkyiJwiK5vWqEYoH7BINzJAJOLedZ++JpAlCbUktW2GQ2DS2FpKmxD/JMtWUUWl1BtghGw==", + "version": "5.21.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.21.0.tgz", + "integrity": "sha512-HOjK8l6a57b2ZGXOcUsI5NLfoTrfmbOl90ixJDl0AEFG4wgHNDQxtZy15/ZQp7HhjkpaGlp/eneMgtsu1dIlUA==", "requires": { "busboy": "^1.6.0" } @@ -9229,6 +9455,20 @@ "defaults": "^1.0.3" } }, + "webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + }, + "whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "requires": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, "which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", diff --git a/package.json b/package.json index 3288aa0..81f6b84 100644 --- a/package.json +++ b/package.json @@ -43,16 +43,16 @@ "url": "https://github.com/notiz-dev/prisma-dbml-generator/issues" }, "dependencies": { - "@prisma/generator-helper": "4.7.1", - "@prisma/internals": "4.7.1" + "@prisma/generator-helper": "4.13.0", + "@prisma/internals": "4.13.0" }, "devDependencies": { - "@prisma/client": "4.7.1", + "@prisma/client": "4.13.0", "@types/jest": "^29.2.4", "@types/node": "14.17.0", "jest": "29.3.1", "prettier": "2.8.1", - "prisma": "4.7.1", + "prisma": "4.13.0", "ts-jest": "29.0.3", "ts-toolbelt": "^9.6.0", "typescript": "4.9.4" diff --git a/src/generator/many-to-many-tables.ts b/src/generator/many-to-many-tables.ts index e71496a..8642c73 100644 --- a/src/generator/many-to-many-tables.ts +++ b/src/generator/many-to-many-tables.ts @@ -23,20 +23,25 @@ function generateTables( return manyToManyTables; } + // In the case of a manyMany, second field should be found const manySecond = manyToManyFields.find( (field) => field.relationName === manyFirst.relationName )!; - if (!manySecond) { - return manyToManyTables; + // If its a manyMany, generate the join table + // Else, it's a oneMany: ignore it and continue + if (manySecond) { + manyToManyTables.push( + `Table ${manyFirst?.relationName} {\n` + + `${generateJoinFields( + [manyFirst, manySecond], + models, + mapToDbSchema + )}` + + '\n}' + ); } - manyToManyTables.push( - `Table ${manyFirst?.relationName} {\n` + - `${generateJoinFields([manyFirst, manySecond], models, mapToDbSchema)}` + - '\n}' - ); - return generateTables( manyToManyFields.filter( (field) => field.relationName !== manyFirst.relationName @@ -48,11 +53,11 @@ function generateTables( } function generateJoinFields( - field: DMMF.Field[], + fields: [DMMF.Field, DMMF.Field], models: DMMF.Model[], mapToDbSchema: boolean = false ): string { - return field + return fields .map((field) => joinField(field, models, mapToDbSchema)) .join('\n'); } @@ -94,9 +99,16 @@ function filterManyToManyRelationFields(models: DMMF.Model[]): DMMF.Field[] { field.relationName && field.isList && field.relationFromFields?.length === 0 && - field.relationToFields?.length + // Updated this condition to match manyMany fields as defined in the new DMMF + field.relationToFields?.length === 0 ) - .map((field) => field) + // As the relationToFields is not populated in the DMMF, we need to populate it manually + .map((field) => ({ + ...field, + relationToFields: model.fields + .filter((f) => f.isId) + .map((f) => f.name), + })) ) .flat(); }