@friggframework/core 2.0.0--canary.464.f9d3fc0.0 → 2.0.0--canary.454.25d396a.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.
package/package.json CHANGED
@@ -1,68 +1,81 @@
1
1
  {
2
- "name": "@friggframework/core",
3
- "prettier": "@friggframework/prettier-config",
4
- "version": "2.0.0--canary.464.f9d3fc0.0",
5
- "dependencies": {
6
- "@hapi/boom": "^10.0.1",
7
- "@prisma/client": "^6.16.3",
8
- "aws-sdk": "^2.1200.0",
9
- "bcryptjs": "^2.4.3",
10
- "body-parser": "^1.20.2",
11
- "common-tags": "^1.8.2",
12
- "cors": "^2.8.5",
13
- "dotenv": "^16.4.7",
14
- "express": "^4.19.2",
15
- "express-async-handler": "^1.2.0",
16
- "form-data": "^4.0.0",
17
- "fs-extra": "^11.2.0",
18
- "lodash": "4.17.21",
19
- "lodash.get": "^4.4.2",
20
- "mongoose": "6.11.6",
21
- "node-fetch": "^2.6.7",
22
- "serverless-http": "^2.7.0",
23
- "uuid": "^9.0.1"
24
- },
25
- "devDependencies": {
26
- "@friggframework/eslint-config": "2.0.0--canary.464.f9d3fc0.0",
27
- "@friggframework/prettier-config": "2.0.0--canary.464.f9d3fc0.0",
28
- "@friggframework/test": "2.0.0--canary.464.f9d3fc0.0",
29
- "@types/lodash": "4.17.15",
30
- "@typescript-eslint/eslint-plugin": "^8.0.0",
31
- "chai": "^4.3.6",
32
- "eslint": "^8.22.0",
33
- "eslint-plugin-import": "^2.29.1",
34
- "eslint-plugin-n": "^17.10.2",
35
- "eslint-plugin-promise": "^7.0.0",
36
- "jest": "^29.7.0",
37
- "prettier": "^2.7.1",
38
- "prisma": "^6.16.3",
39
- "sinon": "^16.1.1",
40
- "typescript": "^5.0.2"
41
- },
42
- "scripts": {
43
- "lint:fix": "prettier --write --loglevel error . && eslint . --fix",
44
- "test": "jest --passWithNoTests # TODO",
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
- "prisma:generate": "npm run prisma:generate:mongo && npm run prisma:generate:postgres",
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
- "postinstall": "npm run prisma:generate"
51
- },
52
- "author": "",
53
- "license": "MIT",
54
- "main": "index.js",
55
- "repository": {
56
- "type": "git",
57
- "url": "git+https://github.com/friggframework/frigg.git"
58
- },
59
- "bugs": {
60
- "url": "https://github.com/friggframework/frigg/issues"
61
- },
62
- "homepage": "https://github.com/friggframework/frigg#readme",
63
- "description": "",
64
- "publishConfig": {
65
- "access": "public"
66
- },
67
- "gitHead": "f9d3fc0e7c7135c87a6b6b1befc7d7912966f86a"
2
+ "name": "@friggframework/core",
3
+ "prettier": "@friggframework/prettier-config",
4
+ "version": "2.0.0--canary.454.25d396a.0",
5
+ "dependencies": {
6
+ "@hapi/boom": "^10.0.1",
7
+ "aws-sdk": "^2.1200.0",
8
+ "bcryptjs": "^2.4.3",
9
+ "body-parser": "^1.20.2",
10
+ "chalk": "^4.1.2",
11
+ "common-tags": "^1.8.2",
12
+ "cors": "^2.8.5",
13
+ "dotenv": "^16.4.7",
14
+ "express": "^4.19.2",
15
+ "express-async-handler": "^1.2.0",
16
+ "form-data": "^4.0.0",
17
+ "fs-extra": "^11.2.0",
18
+ "lodash": "4.17.21",
19
+ "lodash.get": "^4.4.2",
20
+ "mongoose": "6.11.6",
21
+ "node-fetch": "^2.6.7",
22
+ "serverless-http": "^2.7.0",
23
+ "uuid": "^9.0.1"
24
+ },
25
+ "peerDependencies": {
26
+ "@prisma/client": "^6.16.3",
27
+ "prisma": "^6.16.3"
28
+ },
29
+ "peerDependenciesMeta": {
30
+ "@prisma/client": {
31
+ "optional": true
32
+ },
33
+ "prisma": {
34
+ "optional": true
35
+ }
36
+ },
37
+ "devDependencies": {
38
+ "@friggframework/eslint-config": "2.0.0--canary.454.25d396a.0",
39
+ "@friggframework/prettier-config": "2.0.0--canary.454.25d396a.0",
40
+ "@friggframework/test": "2.0.0--canary.454.25d396a.0",
41
+ "@prisma/client": "^6.17.0",
42
+ "@types/lodash": "4.17.15",
43
+ "@typescript-eslint/eslint-plugin": "^8.0.0",
44
+ "chai": "^4.3.6",
45
+ "eslint": "^8.22.0",
46
+ "eslint-plugin-import": "^2.29.1",
47
+ "eslint-plugin-n": "^17.10.2",
48
+ "eslint-plugin-promise": "^7.0.0",
49
+ "jest": "^29.7.0",
50
+ "prettier": "^2.7.1",
51
+ "prisma": "^6.17.0",
52
+ "sinon": "^16.1.1",
53
+ "typescript": "^5.0.2"
54
+ },
55
+ "scripts": {
56
+ "lint:fix": "prettier --write --loglevel error . && eslint . --fix",
57
+ "test": "jest --passWithNoTests # TODO",
58
+ "prisma:generate:mongo": "npx prisma generate --schema ./prisma-mongodb/schema.prisma",
59
+ "prisma:generate:postgres": "npx prisma generate --schema ./prisma-postgresql/schema.prisma",
60
+ "prisma:generate": "npm run prisma:generate:mongo && npm run prisma:generate:postgres",
61
+ "prisma:push:mongo": "npx prisma db push --schema ./prisma-mongodb/schema.prisma",
62
+ "prisma:migrate:postgres": "npx prisma migrate dev --schema ./prisma-postgresql/schema.prisma",
63
+ "prepublishOnly": "npm run prisma:generate"
64
+ },
65
+ "author": "",
66
+ "license": "MIT",
67
+ "main": "index.js",
68
+ "repository": {
69
+ "type": "git",
70
+ "url": "git+https://github.com/friggframework/frigg.git"
71
+ },
72
+ "bugs": {
73
+ "url": "https://github.com/friggframework/frigg/issues"
74
+ },
75
+ "homepage": "https://github.com/friggframework/frigg#readme",
76
+ "description": "",
77
+ "publishConfig": {
78
+ "access": "public"
79
+ },
80
+ "gitHead": "25d396ab0d73094bfab4853f9ff15a5500174ca7"
68
81
  }
@@ -3,8 +3,10 @@
3
3
  // Migration from Mongoose ODM to Prisma ORM
4
4
 
5
5
  generator client {
6
- provider = "prisma-client-js"
7
- output = "../node_modules/@prisma-mongodb/client"
6
+ provider = "prisma-client-js"
7
+ output = "../generated/prisma-mongodb"
8
+ binaryTargets = ["native", "rhel-openssl-3.0.x"] // native for local dev, rhel for Lambda deployment
9
+ engineType = "binary" // Use binary engines (smaller size)
8
10
  }
9
11
 
10
12
  datasource db {
@@ -19,8 +21,8 @@ datasource db {
19
21
  /// User model with discriminator pattern support
20
22
  /// Replaces Mongoose discriminators (IndividualUser, OrganizationUser)
21
23
  model User {
22
- id String @id @default(auto()) @map("_id") @db.ObjectId
23
- type UserType
24
+ id String @id @default(auto()) @map("_id") @db.ObjectId
25
+ type UserType
24
26
 
25
27
  // Timestamps
26
28
  createdAt DateTime @default(now())
@@ -87,12 +89,12 @@ model Token {
87
89
  /// OAuth credentials and API tokens
88
90
  /// All sensitive data encrypted with KMS at rest
89
91
  model Credential {
90
- id String @id @default(auto()) @map("_id") @db.ObjectId
91
- userId String? @db.ObjectId
92
- user User? @relation(fields: [userId], references: [id], onDelete: Cascade)
93
- subType String?
92
+ id String @id @default(auto()) @map("_id") @db.ObjectId
93
+ userId String? @db.ObjectId
94
+ user User? @relation(fields: [userId], references: [id], onDelete: Cascade)
95
+ subType String?
94
96
  authIsValid Boolean?
95
- externalId String?
97
+ externalId String?
96
98
 
97
99
  // Dynamic OAuth fields stored as JSON (encrypted via Prisma middleware)
98
100
  // Contains: access_token, refresh_token, domain, expires_in, token_type, etc.
@@ -125,11 +127,11 @@ model Entity {
125
127
  updatedAt DateTime @updatedAt
126
128
 
127
129
  // Relations - many-to-many with scalar lists
128
- integrations Integration[] @relation("IntegrationEntities", fields: [integrationIds], references: [id])
129
- integrationIds String[] @db.ObjectId
130
+ integrations Integration[] @relation("IntegrationEntities", fields: [integrationIds], references: [id])
131
+ integrationIds String[] @db.ObjectId
130
132
 
131
- syncs Sync[] @relation("SyncEntities", fields: [syncIds], references: [id])
132
- syncIds String[] @db.ObjectId
133
+ syncs Sync[] @relation("SyncEntities", fields: [syncIds], references: [id])
134
+ syncIds String[] @db.ObjectId
133
135
 
134
136
  dataIdentifiers DataIdentifier[]
135
137
  associationObjects AssociationObject[]
@@ -153,7 +155,7 @@ model Integration {
153
155
  status IntegrationStatus @default(ENABLED)
154
156
 
155
157
  // Configuration and version
156
- config Json? // Integration configuration object
158
+ config Json? // Integration configuration object
157
159
  version String?
158
160
 
159
161
  // Entity references (many-to-many via explicit scalar list)
@@ -320,11 +322,11 @@ model Association {
320
322
  /// Association object entry
321
323
  /// Replaces nested array structure in Mongoose
322
324
  model AssociationObject {
323
- id String @id @default(auto()) @map("_id") @db.ObjectId
324
- associationId String @db.ObjectId
325
- association Association @relation(fields: [associationId], references: [id], onDelete: Cascade)
326
- entityId String @db.ObjectId
327
- entity Entity @relation(fields: [entityId], references: [id], onDelete: Cascade)
325
+ id String @id @default(auto()) @map("_id") @db.ObjectId
326
+ associationId String @db.ObjectId
327
+ association Association @relation(fields: [associationId], references: [id], onDelete: Cascade)
328
+ entityId String @db.ObjectId
329
+ entity Entity @relation(fields: [entityId], references: [id], onDelete: Cascade)
328
330
  objectType String
329
331
  objId String
330
332
  metadata Json? // Optional metadata
@@ -359,4 +361,4 @@ model WebsocketConnection {
359
361
 
360
362
  @@index([connectionId])
361
363
  @@map("WebsocketConnection")
362
- }
364
+ }
@@ -3,8 +3,10 @@
3
3
  // Converted from MongoDB schema for relational database support
4
4
 
5
5
  generator client {
6
- provider = "prisma-client-js"
7
- output = "../node_modules/@prisma-postgresql/client"
6
+ provider = "prisma-client-js"
7
+ output = "../generated/prisma-postgresql"
8
+ binaryTargets = ["native", "rhel-openssl-3.0.x"] // native for local dev, rhel for Lambda deployment
9
+ engineType = "binary" // Use binary engines (smaller size)
8
10
  }
9
11
 
10
12
  datasource db {
@@ -19,8 +21,8 @@ datasource db {
19
21
  /// User model with discriminator pattern support
20
22
  /// Replaces Mongoose discriminators (IndividualUser, OrganizationUser)
21
23
  model User {
22
- id Int @id @default(autoincrement())
23
- type UserType
24
+ id Int @id @default(autoincrement())
25
+ type UserType
24
26
 
25
27
  // Timestamps
26
28
  createdAt DateTime @default(now())
@@ -85,12 +87,12 @@ model Token {
85
87
  /// OAuth credentials and API tokens
86
88
  /// All sensitive data encrypted with KMS at rest
87
89
  model Credential {
88
- id Int @id @default(autoincrement())
89
- userId Int?
90
- user User? @relation(fields: [userId], references: [id], onDelete: Cascade)
91
- subType String?
90
+ id Int @id @default(autoincrement())
91
+ userId Int?
92
+ user User? @relation(fields: [userId], references: [id], onDelete: Cascade)
93
+ subType String?
92
94
  authIsValid Boolean?
93
- externalId String?
95
+ externalId String?
94
96
 
95
97
  // Dynamic OAuth fields stored as JSON (encrypted via Prisma middleware)
96
98
  // Contains: access_token, refresh_token, domain, expires_in, token_type, etc.
@@ -146,7 +148,7 @@ model Integration {
146
148
  status IntegrationStatus @default(ENABLED)
147
149
 
148
150
  // Configuration and version
149
- config Json? // Integration configuration object
151
+ config Json? // Integration configuration object
150
152
  version String?
151
153
 
152
154
  // Entity references (many-to-many via implicit join table)
@@ -225,11 +227,11 @@ model Sync {
225
227
  /// Data identifier for sync operations
226
228
  /// Replaces nested array structure in Mongoose
227
229
  model DataIdentifier {
228
- id Int @id @default(autoincrement())
230
+ id Int @id @default(autoincrement())
229
231
  syncId Int?
230
- sync Sync? @relation(fields: [syncId], references: [id], onDelete: Cascade)
232
+ sync Sync? @relation(fields: [syncId], references: [id], onDelete: Cascade)
231
233
  entityId Int
232
- entity Entity @relation(fields: [entityId], references: [id], onDelete: Cascade)
234
+ entity Entity @relation(fields: [entityId], references: [id], onDelete: Cascade)
233
235
 
234
236
  // Identifier data (can be any structure)
235
237
  idData Json
@@ -332,7 +334,7 @@ model Process {
332
334
 
333
335
  /// Generic state storage
334
336
  model State {
335
- id Int @id @default(autoincrement())
337
+ id Int @id @default(autoincrement())
336
338
  state Json?
337
339
  }
338
340