@friggframework/core 1.1.8 → 1.1.9--canary.324.a5372e7.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/README.md ADDED
@@ -0,0 +1,80 @@
1
+ # Frigg Core
2
+
3
+ The `frigg-core` package is the heart of the Frigg Framework. It contains the core functionality and essential modules required to build and maintain integrations at scale.
4
+
5
+ ## Table of Contents
6
+
7
+ - [Introduction](#introduction)
8
+ - [Features](#features)
9
+ - [Installation](#installation)
10
+ - [Usage](#usage)
11
+ - [Modules](#modules)
12
+ - [Contributing](#contributing)
13
+ - [License](#license)
14
+
15
+ ## Introduction
16
+
17
+ The Frigg Core package provides the foundational components and utilities for the Frigg Framework. It is designed to be modular, extensible, and easy to integrate with other packages in the Frigg ecosystem.
18
+
19
+ ## Features
20
+
21
+ - **Associations**: Manage relationships between different entities.
22
+ - **Database**: Database utilities and connectors.
23
+ - **Encryption**: Secure data encryption and decryption.
24
+ - **Error Handling**: Standardized error handling mechanisms.
25
+ - **Integrations**: Tools for building and managing integrations.
26
+ - **Lambda**: Utilities for AWS Lambda functions.
27
+ - **Logging**: Structured logging utilities.
28
+ - **Module Plugin**: Plugin system for extending core functionality.
29
+ - **Syncs**: Synchronization utilities for data consistency.
30
+
31
+ ## Installation
32
+
33
+ To install the `frigg-core` package, use npm or yarn:
34
+
35
+ ```sh
36
+ npm install @friggframework/core
37
+ # or
38
+ yarn add @friggframework/core
39
+ ```
40
+ ## Usage
41
+ Here's a basic example of how to use the frigg-core package:
42
+ ```javascript
43
+ const { encrypt, decrypt } = require('@friggframework/core/encrypt');
44
+ const { logInfo } = require('@friggframework/core/logs');
45
+
46
+ const secret = 'mySecret';
47
+ const encrypted = encrypt(secret);
48
+ const decrypted = decrypt(encrypted);
49
+
50
+ logInfo(`Encrypted: ${encrypted}`);
51
+ logInfo(`Decrypted: ${decrypted}`);
52
+ ```
53
+
54
+ ## Modules
55
+
56
+ The frigg-core package is organized into several modules:
57
+
58
+ - **Associations**: @friggframework/core/associations
59
+ - **Database**: @friggframework/core/database
60
+ - **Encryption**: @friggframework/core/encrypt
61
+ - **Errors**: @friggframework/core/errors
62
+ - **Integrations**: @friggframework/core/integrations
63
+ - **Lambda**: @friggframework/core/lambda
64
+ - **Logs**: @friggframework/core/logs
65
+ - **Module Plugin**: @friggframework/core/module-plugin
66
+ - **Syncs**: @friggframework/core/syncs
67
+
68
+
69
+ Each module provides specific functionality and can be imported individually as needed.
70
+
71
+ ## Contributing
72
+
73
+ We welcome contributions from the community! Please read our contributing guide to get started. Make sure to follow our code of conduct and use the provided pull request template.
74
+
75
+ ## License
76
+
77
+ This project is licensed under the MIT License. See the LICENSE.md file for details.
78
+
79
+ ---
80
+ Thank you for using Frigg Core! If you have any questions or need further assistance, feel free to reach out to our community on Slack or check out our GitHub issues page.
@@ -87,18 +87,6 @@ class IntegrationFactory {
87
87
  }
88
88
 
89
89
  async createIntegration(entities, userId, config) {
90
- // verify entity ids belong to the user
91
- // for (const id of entities) {
92
- // const entity = await Entity.findById(id);
93
- // if (!entity) {
94
- // throw new Error(`Entity with ID ${id} does not exist.`);
95
- // }
96
- // if (entity.user.toString() !== userId.toString()) {
97
- // throw new Error('one or more the entities do not belong to the user');
98
- // }
99
- // }
100
-
101
- // build integration
102
90
  const integrationRecord = await IntegrationModel.create({
103
91
  entities: entities,
104
92
  user: userId,
@@ -80,7 +80,6 @@ function setIntegrationRoutes(router, factory, getUserId) {
80
80
  params.entities,
81
81
  getUserId(req),
82
82
  params.config,
83
- moduleFactory
84
83
  );
85
84
 
86
85
  // post integration initialization
@@ -2,7 +2,8 @@ const _ = require('lodash');
2
2
  const { mongoose } = require('../../database/mongoose');
3
3
  const { expect } = require('chai');
4
4
  const { IntegrationBase } = require("../integration-base");
5
- const {Credential, Entity} = require('../../module-plugin');
5
+ const {Credential} = require('../../module-plugin/credential');
6
+ const {Entity} = require('../../module-plugin/entity');
6
7
  const { IntegrationMapping } = require('../integration-mapping')
7
8
  const {IntegrationModel} = require("../integration-model");
8
9
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@friggframework/core",
3
3
  "prettier": "@friggframework/prettier-config",
4
- "version": "1.1.8",
4
+ "version": "1.1.9--canary.324.a5372e7.0",
5
5
  "dependencies": {
6
6
  "@hapi/boom": "^10.0.1",
7
7
  "aws-sdk": "^2.1200.0",
@@ -15,22 +15,21 @@
15
15
  "node-fetch": "^2.6.7"
16
16
  },
17
17
  "devDependencies": {
18
- "@friggframework/eslint-config": "^1.1.8",
19
- "@friggframework/prettier-config": "^1.1.8",
20
- "@friggframework/test": "^1.1.8",
18
+ "@friggframework/eslint-config": "1.1.9--canary.324.a5372e7.0",
19
+ "@friggframework/prettier-config": "1.1.9--canary.324.a5372e7.0",
20
+ "@friggframework/test": "1.1.9--canary.324.a5372e7.0",
21
21
  "@types/lodash": "^4.14.191",
22
- "@typescript-eslint/eslint-plugin": "^5.55.0",
22
+ "@typescript-eslint/eslint-plugin": "^8.0.0",
23
23
  "chai": "^4.3.6",
24
- "eslint": "^8.36.0",
25
- "eslint-config-standard-with-typescript": "^34.0.1",
26
- "eslint-plugin-import": "^2.27.5",
27
- "eslint-plugin-n": "^15.6.1",
28
- "eslint-plugin-promise": "^6.1.1",
29
- "jest": "^28.1.3",
24
+ "eslint": "^8.22.0",
25
+ "eslint-plugin-import": "^2.29.1",
26
+ "eslint-plugin-n": "^17.10.2",
27
+ "eslint-plugin-promise": "^7.0.0",
28
+ "jest": "^29.7.0",
30
29
  "jest-runner-groups": "^2.2.0",
31
30
  "mongodb-memory-server": "^8.9.0",
32
31
  "prettier": "^2.8.5",
33
- "sinon": "^14.0.0",
32
+ "sinon": "^16.1.1",
34
33
  "typescript": "^5.0.2"
35
34
  },
36
35
  "scripts": {
@@ -49,5 +48,5 @@
49
48
  },
50
49
  "homepage": "https://github.com/friggframework/frigg#readme",
51
50
  "description": "",
52
- "gitHead": "ef09bf33aca3bc2df5c9f0049524a8c7e17df0d4"
51
+ "gitHead": "a5372e7d4ed67b00fe89a6ffc0dfa98128ab5b9f"
53
52
  }