@friggframework/core 2.0.0--canary.395.495dc7d.0 → 2.0.0--canary.395.04851d8.0

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.
@@ -77,9 +77,9 @@ const prismaClientSingleton = () => {
77
77
  let PrismaClient;
78
78
 
79
79
  if (config.DB_TYPE === 'mongodb') {
80
- PrismaClient = require('@prisma-mongo/client').PrismaClient;
80
+ PrismaClient = require('@prisma-mongodb/client').PrismaClient;
81
81
  } else if (config.DB_TYPE === 'postgresql') {
82
- PrismaClient = require('@prisma-postgres/client').PrismaClient;
82
+ PrismaClient = require('@prisma-postgresql/client').PrismaClient;
83
83
  } else {
84
84
  throw new Error(
85
85
  `Unsupported database type: ${config.DB_TYPE}. Supported values: 'mongodb', 'postgresql'`
package/index.js CHANGED
@@ -28,7 +28,12 @@ const {
28
28
  TokenRepository,
29
29
  WebsocketConnectionRepository,
30
30
  } = require('./database/index');
31
- const { UserRepository } = require('./user/repositories/user-repository');
31
+ const {
32
+ createUserRepository,
33
+ UserRepositoryMongo,
34
+ UserRepositoryPostgres,
35
+ } = require('./user/repositories/user-repository-factory');
36
+
32
37
  const {
33
38
  CredentialRepository,
34
39
  } = require('./credential/repositories/credential-repository');
@@ -103,7 +108,9 @@ module.exports = {
103
108
  prisma,
104
109
  TokenRepository,
105
110
  WebsocketConnectionRepository,
106
- UserRepository,
111
+ createUserRepository,
112
+ UserRepositoryMongo,
113
+ UserRepositoryPostgres,
107
114
  CredentialRepository,
108
115
  ModuleRepository,
109
116
  IntegrationMappingRepository,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@friggframework/core",
3
3
  "prettier": "@friggframework/prettier-config",
4
- "version": "2.0.0--canary.395.495dc7d.0",
4
+ "version": "2.0.0--canary.395.04851d8.0",
5
5
  "dependencies": {
6
6
  "@hapi/boom": "^10.0.1",
7
7
  "@prisma/client": "^6.16.3",
@@ -23,9 +23,9 @@
23
23
  "uuid": "^9.0.1"
24
24
  },
25
25
  "devDependencies": {
26
- "@friggframework/eslint-config": "2.0.0--canary.395.495dc7d.0",
27
- "@friggframework/prettier-config": "2.0.0--canary.395.495dc7d.0",
28
- "@friggframework/test": "2.0.0--canary.395.495dc7d.0",
26
+ "@friggframework/eslint-config": "2.0.0--canary.395.04851d8.0",
27
+ "@friggframework/prettier-config": "2.0.0--canary.395.04851d8.0",
28
+ "@friggframework/test": "2.0.0--canary.395.04851d8.0",
29
29
  "@types/lodash": "4.17.15",
30
30
  "@typescript-eslint/eslint-plugin": "^8.0.0",
31
31
  "chai": "^4.3.6",
@@ -42,11 +42,11 @@
42
42
  "scripts": {
43
43
  "lint:fix": "prettier --write --loglevel error . && eslint . --fix",
44
44
  "test": "jest --passWithNoTests # TODO",
45
- "prisma:generate:mongo": "npx prisma generate --schema ./prisma-mongo/schema.prisma",
46
- "prisma:generate:postgres": "npx prisma generate --schema ./prisma-postgres/schema.prisma",
45
+ "prisma:generate:mongo": "npx prisma generate --schema ./prisma-mongodb/schema.prisma",
46
+ "prisma:generate:postgres": "npx prisma generate --schema ./prisma-postgresql/schema.prisma",
47
47
  "prisma:generate": "npm run prisma:generate:mongo && npm run prisma:generate:postgres",
48
- "prisma:push:mongo": "npx prisma db push --schema ./prisma-mongo/schema.prisma",
49
- "prisma:migrate:postgres": "npx prisma migrate dev --schema ./prisma-postgres/schema.prisma",
48
+ "prisma:push:mongo": "npx prisma db push --schema ./prisma-mongodb/schema.prisma",
49
+ "prisma:migrate:postgres": "npx prisma migrate dev --schema ./prisma-postgresql/schema.prisma",
50
50
  "postinstall": "npm run prisma:generate"
51
51
  },
52
52
  "author": "",
@@ -64,5 +64,5 @@
64
64
  "publishConfig": {
65
65
  "access": "public"
66
66
  },
67
- "gitHead": "495dc7d533e5d12c04e51dc04cb696f372682001"
67
+ "gitHead": "04851d8d253adc1abe6aeae2d8e26e9887d7334b"
68
68
  }
@@ -4,7 +4,7 @@
4
4
 
5
5
  generator client {
6
6
  provider = "prisma-client-js"
7
- output = "../node_modules/@prisma-mongo/client"
7
+ output = "../node_modules/@prisma-mongodb/client"
8
8
  }
9
9
 
10
10
  datasource db {
@@ -0,0 +1,9 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to drop the column `auth_is_valid` on the `Credential` table. All the data in the column will be lost.
5
+
6
+ */
7
+ -- AlterTable
8
+ ALTER TABLE "Credential" DROP COLUMN "auth_is_valid",
9
+ ADD COLUMN "authIsValid" BOOLEAN;
@@ -4,7 +4,7 @@
4
4
 
5
5
  generator client {
6
6
  provider = "prisma-client-js"
7
- output = "../node_modules/@prisma-postgres/client"
7
+ output = "../node_modules/@prisma-postgresql/client"
8
8
  }
9
9
 
10
10
  datasource db {