@friggframework/core 2.0.0--canary.454.15f637e.0 → 2.0.0--canary.454.cbce887.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 (53) hide show
  1. package/package.json +91 -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/associations/association.js +0 -78
  7. package/associations/model.js +0 -54
  8. package/database/encryption/encryption-integration.test.js +0 -553
  9. package/database/encryption/encryption-schema-registry.test.js +0 -392
  10. package/database/encryption/field-encryption-service.test.js +0 -525
  11. package/database/encryption/mongo-decryption-fix-verification.test.js +0 -348
  12. package/database/encryption/postgres-decryption-fix-verification.test.js +0 -371
  13. package/database/encryption/postgres-relation-decryption.test.js +0 -245
  14. package/database/encryption/prisma-encryption-extension.test.js +0 -439
  15. package/database/use-cases/run-database-migration-use-case.test.js +0 -310
  16. package/errors/base-error.test.js +0 -32
  17. package/errors/fetch-error.test.js +0 -79
  18. package/errors/halt-error.test.js +0 -11
  19. package/errors/validation-errors.test.js +0 -120
  20. package/handlers/auth-flow.integration.test.js +0 -147
  21. package/handlers/integration-event-dispatcher.test.js +0 -141
  22. package/handlers/routers/health.test.js +0 -210
  23. package/handlers/workers/db-migration.test.js +0 -437
  24. package/integrations/tests/use-cases/create-integration.test.js +0 -131
  25. package/integrations/tests/use-cases/delete-integration-for-user.test.js +0 -150
  26. package/integrations/tests/use-cases/find-integration-context-by-external-entity-id.test.js +0 -92
  27. package/integrations/tests/use-cases/get-integration-for-user.test.js +0 -150
  28. package/integrations/tests/use-cases/get-integration-instance.test.js +0 -176
  29. package/integrations/tests/use-cases/get-integrations-for-user.test.js +0 -176
  30. package/integrations/tests/use-cases/get-possible-integrations.test.js +0 -188
  31. package/integrations/tests/use-cases/update-integration-messages.test.js +0 -142
  32. package/integrations/tests/use-cases/update-integration-status.test.js +0 -103
  33. package/integrations/tests/use-cases/update-integration.test.js +0 -141
  34. package/integrations/use-cases/load-integration-context-full.test.js +0 -329
  35. package/integrations/use-cases/load-integration-context.test.js +0 -114
  36. package/lambda/TimeoutCatcher.js +0 -43
  37. package/lambda/TimeoutCatcher.test.js +0 -68
  38. package/lambda/index.js +0 -3
  39. package/logs/logger.test.js +0 -76
  40. package/modules/module-hydration.test.js +0 -205
  41. package/modules/requester/requester.test.js +0 -28
  42. package/modules/test/mock-api/api.js +0 -34
  43. package/modules/test/mock-api/definition.js +0 -52
  44. package/modules/test/mock-api/mocks/hubspot.js +0 -43
  45. package/queues/index.js +0 -4
  46. package/queues/queuer-util.js +0 -61
  47. package/user/tests/use-cases/create-individual-user.test.js +0 -24
  48. package/user/tests/use-cases/create-organization-user.test.js +0 -28
  49. package/user/tests/use-cases/create-token-for-user-id.test.js +0 -19
  50. package/user/tests/use-cases/get-user-from-bearer-token.test.js +0 -64
  51. package/user/tests/use-cases/login-user.test.js +0 -140
  52. package/utils/backend-path.js +0 -38
  53. package/utils/index.js +0 -6
package/package.json CHANGED
@@ -1,68 +1,93 @@
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.cbce887.0",
5
+ "files": [
6
+ "*.js",
7
+ "*.d.ts",
8
+ "application/",
9
+ "assertions/",
10
+ "core/",
11
+ "credential/",
12
+ "database/",
13
+ "encrypt/",
14
+ "errors/",
15
+ "handlers/",
16
+ "integrations/",
17
+ "logs/",
18
+ "modules/",
19
+ "syncs/",
20
+ "token/",
21
+ "types/",
22
+ "user/",
23
+ "websocket/",
24
+ "prisma-mongodb/",
25
+ "prisma-postgresql/",
26
+ "!**/*.test.js",
27
+ "!**/__tests__/",
28
+ "!**/test/"
29
+ ],
30
+ "dependencies": {
31
+ "@hapi/boom": "^10.0.1",
32
+ "@prisma/client": "^6.16.3",
33
+ "aws-sdk": "^2.1200.0",
34
+ "bcryptjs": "^2.4.3",
35
+ "body-parser": "^1.20.2",
36
+ "common-tags": "^1.8.2",
37
+ "cors": "^2.8.5",
38
+ "dotenv": "^16.4.7",
39
+ "express": "^4.19.2",
40
+ "express-async-handler": "^1.2.0",
41
+ "form-data": "^4.0.0",
42
+ "fs-extra": "^11.2.0",
43
+ "lodash": "4.17.21",
44
+ "lodash.get": "^4.4.2",
45
+ "mongoose": "6.11.6",
46
+ "node-fetch": "^2.6.7",
47
+ "prisma": "^6.16.3",
48
+ "serverless-http": "^2.7.0",
49
+ "uuid": "^9.0.1"
50
+ },
51
+ "devDependencies": {
52
+ "@friggframework/eslint-config": "2.0.0--canary.454.cbce887.0",
53
+ "@friggframework/prettier-config": "2.0.0--canary.454.cbce887.0",
54
+ "@friggframework/test": "2.0.0--canary.454.cbce887.0",
55
+ "@types/lodash": "4.17.15",
56
+ "@typescript-eslint/eslint-plugin": "^8.0.0",
57
+ "chai": "^4.3.6",
58
+ "eslint": "^8.22.0",
59
+ "eslint-plugin-import": "^2.29.1",
60
+ "eslint-plugin-n": "^17.10.2",
61
+ "eslint-plugin-promise": "^7.0.0",
62
+ "jest": "^29.7.0",
63
+ "prettier": "^2.7.1",
64
+ "sinon": "^16.1.1",
65
+ "typescript": "^5.0.2"
66
+ },
67
+ "scripts": {
68
+ "lint:fix": "prettier --write --loglevel error . && eslint . --fix",
69
+ "test": "jest --passWithNoTests # TODO",
70
+ "prisma:generate:mongo": "npx prisma generate --schema ./prisma-mongodb/schema.prisma",
71
+ "prisma:generate:postgres": "npx prisma generate --schema ./prisma-postgresql/schema.prisma",
72
+ "prisma:generate": "npm run prisma:generate:mongo && npm run prisma:generate:postgres",
73
+ "prisma:push:mongo": "npx prisma db push --schema ./prisma-mongodb/schema.prisma",
74
+ "prisma:migrate:postgres": "npx prisma migrate dev --schema ./prisma-postgresql/schema.prisma",
75
+ "postinstall": "npm run prisma:generate"
76
+ },
77
+ "author": "",
78
+ "license": "MIT",
79
+ "main": "index.js",
80
+ "repository": {
81
+ "type": "git",
82
+ "url": "git+https://github.com/friggframework/frigg.git"
83
+ },
84
+ "bugs": {
85
+ "url": "https://github.com/friggframework/frigg/issues"
86
+ },
87
+ "homepage": "https://github.com/friggframework/frigg#readme",
88
+ "description": "",
89
+ "publishConfig": {
90
+ "access": "public"
91
+ },
92
+ "gitHead": "cbce8872aea93a375c1088a0dcb8d05a5d48d8b7"
68
93
  }
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))