@friggframework/devtools 2.0.0--canary.396.0dd37aa.0 → 2.0.0--canary.397.216d54b.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.
@@ -1,7 +1,6 @@
1
1
  const path = require('path');
2
2
  const fs = require('fs-extra');
3
3
  const { composeServerlessDefinition } = require('./serverless-template');
4
-
5
4
  const { findNearestBackendPackageJson } = require('@friggframework/core');
6
5
 
7
6
  function createFriggInfrastructure() {
@@ -19,14 +18,7 @@ function createFriggInfrastructure() {
19
18
  const backend = require(backendFilePath);
20
19
  const appDefinition = backend.Definition;
21
20
 
22
- // const serverlessTemplate = require(path.resolve(
23
- // __dirname,
24
- // './serverless-template.js'
25
- // ));
26
- const definition = composeServerlessDefinition(
27
- appDefinition,
28
- backend.IntegrationFactory
29
- );
21
+ const definition = composeServerlessDefinition(appDefinition);
30
22
 
31
23
  return {
32
24
  ...definition,
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@friggframework/devtools",
3
3
  "prettier": "@friggframework/prettier-config",
4
- "version": "2.0.0--canary.396.0dd37aa.0",
4
+ "version": "2.0.0--canary.397.216d54b.0",
5
5
  "dependencies": {
6
6
  "@babel/eslint-parser": "^7.18.9",
7
7
  "@babel/parser": "^7.25.3",
8
8
  "@babel/traverse": "^7.25.3",
9
- "@friggframework/test": "2.0.0--canary.396.0dd37aa.0",
9
+ "@friggframework/test": "2.0.0--canary.397.216d54b.0",
10
10
  "@hapi/boom": "^10.0.1",
11
11
  "@inquirer/prompts": "^5.3.8",
12
12
  "axios": "^1.7.2",
@@ -27,8 +27,8 @@
27
27
  "serverless-http": "^2.7.0"
28
28
  },
29
29
  "devDependencies": {
30
- "@friggframework/eslint-config": "2.0.0--canary.396.0dd37aa.0",
31
- "@friggframework/prettier-config": "2.0.0--canary.396.0dd37aa.0",
30
+ "@friggframework/eslint-config": "2.0.0--canary.397.216d54b.0",
31
+ "@friggframework/prettier-config": "2.0.0--canary.397.216d54b.0",
32
32
  "prettier": "^2.7.1",
33
33
  "serverless": "3.39.0",
34
34
  "serverless-dotenv-plugin": "^6.0.0",
@@ -60,5 +60,5 @@
60
60
  "publishConfig": {
61
61
  "access": "public"
62
62
  },
63
- "gitHead": "0dd37aa78998c9291f90e3fdeb0e07096e2e140a"
63
+ "gitHead": "216d54b42aece5fa6473620fca6ee1ae11a46d8b"
64
64
  }
@@ -1,8 +1,4 @@
1
1
  const {
2
- Auther,
3
- Credential,
4
- Entity,
5
- IntegrationFactory,
6
2
  createObjectId,
7
3
  } = require('@friggframework/core');
8
4
 
@@ -11,7 +7,6 @@ async function createMockIntegration(
11
7
  userId = null,
12
8
  config = { type: IntegrationClass.Definition.name }
13
9
  ) {
14
- const integrationFactory = new IntegrationFactory([IntegrationClass]);
15
10
  userId = userId || createObjectId();
16
11
 
17
12
  const insertOptions = {
@@ -24,10 +19,8 @@ async function createMockIntegration(
24
19
  const entities = [];
25
20
  for (const moduleName in IntegrationClass.modules) {
26
21
  const ModuleDef = IntegrationClass.Definition.modules[moduleName];
27
- const module = await Auther.getInstance({
28
- definition: ModuleDef,
29
- userId: userId,
30
- });
22
+ // todo: create module using the new architecture
23
+ const module = {}
31
24
  const credential = await module.CredentialModel.findOneAndUpdate(
32
25
  user,
33
26
  { $set: user },
@@ -51,11 +44,8 @@ async function createMockIntegration(
51
44
  );
52
45
  }
53
46
 
54
- const integration = await integrationFactory.createIntegration(
55
- entities,
56
- userId,
57
- config
58
- );
47
+ // todo: create integration using the new architecture
48
+ const integration = {}
59
49
 
60
50
  integration.id = integration.record._id;
61
51