@friggframework/core 2.0.0--canary.454.15f637e.0 → 2.0.0--canary.454.dc05b2f.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.
Files changed (45) hide show
  1. package/package.json +95 -66
  2. package/.eslintrc.json +0 -3
  3. package/CHANGELOG.md +0 -191
  4. package/CLAUDE.md +0 -693
  5. package/application/commands/integration-commands.test.js +0 -123
  6. package/database/encryption/encryption-integration.test.js +0 -553
  7. package/database/encryption/encryption-schema-registry.test.js +0 -392
  8. package/database/encryption/field-encryption-service.test.js +0 -525
  9. package/database/encryption/mongo-decryption-fix-verification.test.js +0 -348
  10. package/database/encryption/postgres-decryption-fix-verification.test.js +0 -371
  11. package/database/encryption/postgres-relation-decryption.test.js +0 -245
  12. package/database/encryption/prisma-encryption-extension.test.js +0 -439
  13. package/database/use-cases/run-database-migration-use-case.test.js +0 -310
  14. package/errors/base-error.test.js +0 -32
  15. package/errors/fetch-error.test.js +0 -79
  16. package/errors/halt-error.test.js +0 -11
  17. package/errors/validation-errors.test.js +0 -120
  18. package/handlers/auth-flow.integration.test.js +0 -147
  19. package/handlers/integration-event-dispatcher.test.js +0 -141
  20. package/handlers/routers/health.test.js +0 -210
  21. package/handlers/workers/db-migration.test.js +0 -437
  22. package/integrations/tests/use-cases/create-integration.test.js +0 -131
  23. package/integrations/tests/use-cases/delete-integration-for-user.test.js +0 -150
  24. package/integrations/tests/use-cases/find-integration-context-by-external-entity-id.test.js +0 -92
  25. package/integrations/tests/use-cases/get-integration-for-user.test.js +0 -150
  26. package/integrations/tests/use-cases/get-integration-instance.test.js +0 -176
  27. package/integrations/tests/use-cases/get-integrations-for-user.test.js +0 -176
  28. package/integrations/tests/use-cases/get-possible-integrations.test.js +0 -188
  29. package/integrations/tests/use-cases/update-integration-messages.test.js +0 -142
  30. package/integrations/tests/use-cases/update-integration-status.test.js +0 -103
  31. package/integrations/tests/use-cases/update-integration.test.js +0 -141
  32. package/integrations/use-cases/load-integration-context-full.test.js +0 -329
  33. package/integrations/use-cases/load-integration-context.test.js +0 -114
  34. package/lambda/TimeoutCatcher.test.js +0 -68
  35. package/logs/logger.test.js +0 -76
  36. package/modules/module-hydration.test.js +0 -205
  37. package/modules/requester/requester.test.js +0 -28
  38. package/modules/test/mock-api/api.js +0 -34
  39. package/modules/test/mock-api/definition.js +0 -52
  40. package/modules/test/mock-api/mocks/hubspot.js +0 -43
  41. package/user/tests/use-cases/create-individual-user.test.js +0 -24
  42. package/user/tests/use-cases/create-organization-user.test.js +0 -28
  43. package/user/tests/use-cases/create-token-for-user-id.test.js +0 -19
  44. package/user/tests/use-cases/get-user-from-bearer-token.test.js +0 -64
  45. package/user/tests/use-cases/login-user.test.js +0 -140
package/package.json CHANGED
@@ -1,68 +1,97 @@
1
1
  {
2
- "name": "@friggframework/core",
3
- "prettier": "@friggframework/prettier-config",
4
- "version": "2.0.0--canary.454.15f637e.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
- "prisma": "^6.16.3",
23
- "serverless-http": "^2.7.0",
24
- "uuid": "^9.0.1"
25
- },
26
- "devDependencies": {
27
- "@friggframework/eslint-config": "2.0.0--canary.454.15f637e.0",
28
- "@friggframework/prettier-config": "2.0.0--canary.454.15f637e.0",
29
- "@friggframework/test": "2.0.0--canary.454.15f637e.0",
30
- "@types/lodash": "4.17.15",
31
- "@typescript-eslint/eslint-plugin": "^8.0.0",
32
- "chai": "^4.3.6",
33
- "eslint": "^8.22.0",
34
- "eslint-plugin-import": "^2.29.1",
35
- "eslint-plugin-n": "^17.10.2",
36
- "eslint-plugin-promise": "^7.0.0",
37
- "jest": "^29.7.0",
38
- "prettier": "^2.7.1",
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": "15f637ef408869244080cab68677013d159d8e1b"
2
+ "name": "@friggframework/core",
3
+ "prettier": "@friggframework/prettier-config",
4
+ "version": "2.0.0--canary.454.dc05b2f.0",
5
+ "files": [
6
+ "*.js",
7
+ "*.d.ts",
8
+ "application/",
9
+ "assertions/",
10
+ "associations/",
11
+ "core/",
12
+ "credential/",
13
+ "database/",
14
+ "encrypt/",
15
+ "errors/",
16
+ "handlers/",
17
+ "integrations/",
18
+ "lambda/",
19
+ "logs/",
20
+ "modules/",
21
+ "queues/",
22
+ "syncs/",
23
+ "token/",
24
+ "types/",
25
+ "user/",
26
+ "utils/",
27
+ "websocket/",
28
+ "prisma-mongodb/",
29
+ "prisma-postgresql/",
30
+ "!**/*.test.js",
31
+ "!**/__tests__/",
32
+ "!**/test/"
33
+ ],
34
+ "dependencies": {
35
+ "@hapi/boom": "^10.0.1",
36
+ "@prisma/client": "^6.16.3",
37
+ "aws-sdk": "^2.1200.0",
38
+ "bcryptjs": "^2.4.3",
39
+ "body-parser": "^1.20.2",
40
+ "common-tags": "^1.8.2",
41
+ "cors": "^2.8.5",
42
+ "dotenv": "^16.4.7",
43
+ "express": "^4.19.2",
44
+ "express-async-handler": "^1.2.0",
45
+ "form-data": "^4.0.0",
46
+ "fs-extra": "^11.2.0",
47
+ "lodash": "4.17.21",
48
+ "lodash.get": "^4.4.2",
49
+ "mongoose": "6.11.6",
50
+ "node-fetch": "^2.6.7",
51
+ "prisma": "^6.16.3",
52
+ "serverless-http": "^2.7.0",
53
+ "uuid": "^9.0.1"
54
+ },
55
+ "devDependencies": {
56
+ "@friggframework/eslint-config": "2.0.0--canary.454.dc05b2f.0",
57
+ "@friggframework/prettier-config": "2.0.0--canary.454.dc05b2f.0",
58
+ "@friggframework/test": "2.0.0--canary.454.dc05b2f.0",
59
+ "@types/lodash": "4.17.15",
60
+ "@typescript-eslint/eslint-plugin": "^8.0.0",
61
+ "chai": "^4.3.6",
62
+ "eslint": "^8.22.0",
63
+ "eslint-plugin-import": "^2.29.1",
64
+ "eslint-plugin-n": "^17.10.2",
65
+ "eslint-plugin-promise": "^7.0.0",
66
+ "jest": "^29.7.0",
67
+ "prettier": "^2.7.1",
68
+ "sinon": "^16.1.1",
69
+ "typescript": "^5.0.2"
70
+ },
71
+ "scripts": {
72
+ "lint:fix": "prettier --write --loglevel error . && eslint . --fix",
73
+ "test": "jest --passWithNoTests # TODO",
74
+ "prisma:generate:mongo": "npx prisma generate --schema ./prisma-mongodb/schema.prisma",
75
+ "prisma:generate:postgres": "npx prisma generate --schema ./prisma-postgresql/schema.prisma",
76
+ "prisma:generate": "npm run prisma:generate:mongo && npm run prisma:generate:postgres",
77
+ "prisma:push:mongo": "npx prisma db push --schema ./prisma-mongodb/schema.prisma",
78
+ "prisma:migrate:postgres": "npx prisma migrate dev --schema ./prisma-postgresql/schema.prisma",
79
+ "postinstall": "npm run prisma:generate"
80
+ },
81
+ "author": "",
82
+ "license": "MIT",
83
+ "main": "index.js",
84
+ "repository": {
85
+ "type": "git",
86
+ "url": "git+https://github.com/friggframework/frigg.git"
87
+ },
88
+ "bugs": {
89
+ "url": "https://github.com/friggframework/frigg/issues"
90
+ },
91
+ "homepage": "https://github.com/friggframework/frigg#readme",
92
+ "description": "",
93
+ "publishConfig": {
94
+ "access": "public"
95
+ },
96
+ "gitHead": "dc05b2f560edc9f63630fd4e71fe3c57894dff8e"
68
97
  }
package/.eslintrc.json DELETED
@@ -1,3 +0,0 @@
1
- {
2
- "extends": "@friggframework/eslint-config"
3
- }
package/CHANGELOG.md DELETED
@@ -1,191 +0,0 @@
1
- # v1.2.2 (Fri Aug 09 2024)
2
-
3
- #### 🐛 Bug Fix
4
-
5
- - Add support for secrets loading from SECRET_ARN [#327](https://github.com/friggframework/frigg/pull/327) ([@seanspeaks](https://github.com/seanspeaks))
6
- - Adding support for secrets loading ([@seanspeaks](https://github.com/seanspeaks))
7
-
8
- #### Authors: 1
9
-
10
- - Sean Matthews ([@seanspeaks](https://github.com/seanspeaks))
11
-
12
- ---
13
-
14
- # v1.2.1 (Thu Aug 08 2024)
15
-
16
- #### 🐛 Bug Fix
17
-
18
- - Fix bug during local running [#326](https://github.com/friggframework/frigg/pull/326) ([@seanspeaks](https://github.com/seanspeaks))
19
- - Adding toJSON so that the descriminator decorator will be evaluated/added to the mongoose model (currently undefined on initialization and first invocation) ([@seanspeaks](https://github.com/seanspeaks))
20
-
21
- #### Authors: 1
22
-
23
- - Sean Matthews ([@seanspeaks](https://github.com/seanspeaks))
24
-
25
- ---
26
-
27
- # v1.2.0 (Tue Aug 06 2024)
28
-
29
- :tada: This release contains work from a new contributor! :tada:
30
-
31
- Thank you, Daniel Klotz ([@d-klotz](https://github.com/d-klotz)), for all your work!
32
-
33
- #### 🐛 Bug Fix
34
-
35
- - Add READMEs that will need updating, but for version releasing [#324](https://github.com/friggframework/frigg/pull/324) ([@seanspeaks](https://github.com/seanspeaks))
36
- - Add READMEs that will need updating, but for version releasing ([@seanspeaks](https://github.com/seanspeaks))
37
- - small update to integration testing / tooling [#304](https://github.com/friggframework/frigg/pull/304) ([@MichaelRyanWebber](https://github.com/MichaelRyanWebber))
38
- - chore: bump deprecated npm package versions [#323](https://github.com/friggframework/frigg/pull/323) ([@d-klotz](https://github.com/d-klotz) [@seanspeaks](https://github.com/seanspeaks))
39
- - chore: bump deprecated package versions ([@d-klotz](https://github.com/d-klotz))
40
- - Bump version to: v1.1.8 \[skip ci\] ([@seanspeaks](https://github.com/seanspeaks))
41
- - remove comment ([@MichaelRyanWebber](https://github.com/MichaelRyanWebber))
42
- - use the factory methods for creating the mock integration so that everything is set up (mostly events and userActions) ([@MichaelRyanWebber](https://github.com/MichaelRyanWebber))
43
- - fix imports to not inadvertently call loadInstalledModules ([@MichaelRyanWebber](https://github.com/MichaelRyanWebber))
44
- - Bump version to: v1.1.5 \[skip ci\] ([@seanspeaks](https://github.com/seanspeaks))
45
-
46
- #### Authors: 3
47
-
48
- - [@MichaelRyanWebber](https://github.com/MichaelRyanWebber)
49
- - Daniel Klotz ([@d-klotz](https://github.com/d-klotz))
50
- - Sean Matthews ([@seanspeaks](https://github.com/seanspeaks))
51
-
52
- ---
53
-
54
- # v1.1.8 (Thu Jul 18 2024)
55
-
56
- #### 🐛 Bug Fix
57
-
58
- - Revert open to support commonjs [#319](https://github.com/friggframework/frigg/pull/319) ([@MichaelRyanWebber](https://github.com/MichaelRyanWebber))
59
- - Bump version to: v1.1.6 \[skip ci\] ([@seanspeaks](https://github.com/seanspeaks))
60
-
61
- #### Authors: 2
62
-
63
- - [@MichaelRyanWebber](https://github.com/MichaelRyanWebber)
64
- - Sean Matthews ([@seanspeaks](https://github.com/seanspeaks))
65
-
66
- ---
67
-
68
- # v1.1.7 (Mon Jul 15 2024)
69
-
70
- #### 🐛 Bug Fix
71
-
72
- - getAuthorizationRequirements() async [#318](https://github.com/friggframework/frigg/pull/318) ([@MichaelRyanWebber](https://github.com/MichaelRyanWebber))
73
- - getAuthorizationRequirements should be async, though it will only occasionally need to make requests ([@MichaelRyanWebber](https://github.com/MichaelRyanWebber))
74
- - Bump version to: v1.1.6 \[skip ci\] ([@seanspeaks](https://github.com/seanspeaks))
75
-
76
- #### Authors: 2
77
-
78
- - [@MichaelRyanWebber](https://github.com/MichaelRyanWebber)
79
- - Sean Matthews ([@seanspeaks](https://github.com/seanspeaks))
80
-
81
- ---
82
-
83
- # v1.1.6 (Fri Apr 26 2024)
84
-
85
- #### 🐛 Bug Fix
86
-
87
- - Small fix to validation errors and cleanup [#307](https://github.com/friggframework/frigg/pull/307) ([@MichaelRyanWebber](https://github.com/MichaelRyanWebber))
88
- - remove excess files to centralize jest config and cleanup ([@MichaelRyanWebber](https://github.com/MichaelRyanWebber))
89
- - Bump version to: v1.1.5 \[skip ci\] ([@seanspeaks](https://github.com/seanspeaks))
90
-
91
- #### Authors: 2
92
-
93
- - [@MichaelRyanWebber](https://github.com/MichaelRyanWebber)
94
- - Sean Matthews ([@seanspeaks](https://github.com/seanspeaks))
95
-
96
- ---
97
-
98
- # v1.1.5 (Tue Apr 09 2024)
99
-
100
- #### 🐛 Bug Fix
101
-
102
- - update router to include options and refresh [#301](https://github.com/friggframework/frigg/pull/301) ([@MichaelRyanWebber](https://github.com/MichaelRyanWebber))
103
- - consistent spacing ([@MichaelRyanWebber](https://github.com/MichaelRyanWebber))
104
- - add back the /api/entity POST of a credential with a tentative adjustment to implementation ([@MichaelRyanWebber](https://github.com/MichaelRyanWebber))
105
- - be consistent about not using redundant variables for the response json ([@MichaelRyanWebber](https://github.com/MichaelRyanWebber))
106
- - remove accidental newline ([@MichaelRyanWebber](https://github.com/MichaelRyanWebber))
107
- - fixes to router and stubs ([@MichaelRyanWebber](https://github.com/MichaelRyanWebber))
108
- - update router to include options and refresh for entities, integration config, and integration user actions ([@MichaelRyanWebber](https://github.com/MichaelRyanWebber))
109
- - Bump version to: v1.1.4 \[skip ci\] ([@seanspeaks](https://github.com/seanspeaks))
110
- - Bump version to: v1.1.3 \[skip ci\] ([@seanspeaks](https://github.com/seanspeaks))
111
-
112
- #### Authors: 2
113
-
114
- - [@MichaelRyanWebber](https://github.com/MichaelRyanWebber)
115
- - Sean Matthews ([@seanspeaks](https://github.com/seanspeaks))
116
-
117
- ---
118
-
119
- # v1.1.4 (Fri Apr 05 2024)
120
-
121
- #### 🐛 Bug Fix
122
-
123
- - Socket hang up / ECONNRESET error retry for requester [#297](https://github.com/friggframework/frigg/pull/297) ([@seanspeaks](https://github.com/seanspeaks))
124
- - Check linear task description for offending error. Unclear if this is the best approach. ([@seanspeaks](https://github.com/seanspeaks))
125
-
126
- #### Authors: 1
127
-
128
- - Sean Matthews ([@seanspeaks](https://github.com/seanspeaks))
129
-
130
- ---
131
-
132
- # v1.1.3 (Tue Apr 02 2024)
133
-
134
- #### 🐛 Bug Fix
135
-
136
- - test release [#296](https://github.com/friggframework/frigg/pull/296) ([@MichaelRyanWebber](https://github.com/MichaelRyanWebber))
137
- - add a commit to fix canary and workaround auto bug ([@MichaelRyanWebber](https://github.com/MichaelRyanWebber))
138
- - bump to test release ([@MichaelRyanWebber](https://github.com/MichaelRyanWebber))
139
-
140
- #### Authors: 1
141
-
142
- - [@MichaelRyanWebber](https://github.com/MichaelRyanWebber)
143
-
144
- ---
145
-
146
- # v2.0.0 (Sat Mar 30 2024)
147
-
148
- #### 🚀 Enhancement
149
-
150
- - Package redo [#294](https://github.com/friggframework/frigg/pull/294) ([@MichaelRyanWebber](https://github.com/MichaelRyanWebber))
151
-
152
- #### 🐛 Bug Fix
153
-
154
- - update test related imports in core ([@MichaelRyanWebber](https://github.com/MichaelRyanWebber))
155
- - missed one ([@MichaelRyanWebber](https://github.com/MichaelRyanWebber))
156
- - create test, eslint-config and prettier-config packages as base shared dependencies ([@MichaelRyanWebber](https://github.com/MichaelRyanWebber))
157
- - Publish ([@seanspeaks](https://github.com/seanspeaks))
158
- - Bump node and npm version for the whole repo (Fix CI) [#274](https://github.com/friggframework/frigg/pull/274) ([@seanspeaks](https://github.com/seanspeaks))
159
- - Bump independent versions \[skip ci\] ([@seanspeaks](https://github.com/seanspeaks))
160
-
161
- #### Authors: 2
162
-
163
- - [@MichaelRyanWebber](https://github.com/MichaelRyanWebber)
164
- - Sean Matthews ([@seanspeaks](https://github.com/seanspeaks))
165
-
166
- ---
167
-
168
- # v1.1.0 (Wed Mar 20 2024)
169
-
170
- :tada: This release contains work from new contributors! :tada:
171
-
172
- Thanks for all your work!
173
-
174
- :heart: Nicolas Leal ([@nicolasmelo1](https://github.com/nicolasmelo1))
175
-
176
- :heart: nmilcoff ([@nmilcoff](https://github.com/nmilcoff))
177
-
178
- #### 🚀 Enhancement
179
-
180
-
181
- #### 🐛 Bug Fix
182
-
183
- - correct some bad automated edits, though they are not in relevant files ([@MichaelRyanWebber](https://github.com/MichaelRyanWebber))
184
- - Bump independent versions \[skip ci\] ([@seanspeaks](https://github.com/seanspeaks))
185
-
186
- #### Authors: 4
187
-
188
- - [@MichaelRyanWebber](https://github.com/MichaelRyanWebber)
189
- - Nicolas Leal ([@nicolasmelo1](https://github.com/nicolasmelo1))
190
- - nmilcoff ([@nmilcoff](https://github.com/nmilcoff))
191
- - Sean Matthews ([@seanspeaks](https://github.com/seanspeaks))