aiji42 / prisma-data-proxy-alt

This is a library to alternate and self-host the Prisma Data Proxy (cloud.prisma.io)
MIT License
201 stars 28 forks source link

Replace @prisma/sdk by @prisma/internals && Support Prometheus Metrics #36

Open zsnmwy opened 1 year ago

zsnmwy commented 1 year ago
  1. Replace @prisma/sdk by @prisma/internals
    Deprecated: @prisma/sdk was an internal package which doesn't follow semver and can include breaking changes without a warning. We renamed it to @prisma/internals to make it clearer. If you're using this package it would be helpful if you could help us understand where, how, and why you are using it by ginving us feedback in https://github.com/prisma/prisma/discussions/13877). Your feedback will be valuable to us in defining a better API.

I need to replace it because I need the relationMode.

yarn run v1.22.19                                                                                                                                                       │
│ warning package.json: No license field                                                                                                                                  │
│ $ /app/node_modules/.bin/pdp                                                                                                                                            │
│ prisma:info Starting a postgresql pool with 17 connections.                                                                                                             │
│ /app/node_modules/@prisma/sdk/dist/engine-commands/getDmmf.js:137                                                                                                       │
│       return new GetDmmfError({                                                                                                                                         │
│              ^                                                                                                                                                          │
│                                                                                                                                                                         │
│ GetDmmfError: Get DMMF: Schema parsing - Error while interacting with query-engine-node-api library                                                                     │
│ Error code: P1012                                                                                                                                                       │
│ error: Property not known: "relationMode".                                                                                                                              │
│   -->  schema.prisma:8                                                                                                                                                  │
│    |                                                                                                                                                                    │
│  7 |   url          = env("DATABASE_URL")                                                                                                                               │
│  8 |   relationMode = "prisma"                                                                                                                                          │
│  9 | }                                                                                                                                                                  │
│    |                                                                                                                                                                    │
│                                                                                                                                                                         │
│ Validation Error Count: 1                                                                                                                                               │
│                                                                                                                                                                         │
│ Prisma CLI Version : 4.0.0                                                                                                                                              │
│     at /app/node_modules/@prisma/sdk/dist/engine-commands/getDmmf.js:137:14                                                                                             │
│     at /app/node_modules/fp-ts/lib/Either.js:268:52                                                                                                                     │
│     at pipe (/app/node_modules/fp-ts/lib/function.js:288:23)                                                                                                            │
│     at /app/node_modules/@prisma/sdk/dist/engine-commands/getDmmf.js:126:50                                                                                             │
│     at n.e.run (/app/node_modules/ts-pattern/dist/index.cjs:1:4927)                                                                                                     │
│     at n.e.otherwise (/app/node_modules/ts-pattern/dist/index.cjs:1:4570)                                                                                               │
│     at getDmmfNodeAPI (/app/node_modules/@prisma/sdk/dist/engine-commands/getDmmf.js:145:6)                                                                             │
│     at async getDMMF (/app/node_modules/@prisma/sdk/dist/engine-commands/getDmmf.js:64:16)                                                                              │
│     at async /app/node_modules/prisma-data-proxy-alt/dist/server.js:26:18                                                                                               │
│ error Command failed with exit code 1.                                                                                                                                  │
│ info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.  
  1. Support Prometheus Metrics
  2. Update Deps Version
  3. Fix BigInt To String / To JSON https://github.com/aiji42/prisma-data-proxy-alt/issues/28