@friggframework/devtools 2.0.0--canary.380.c98f800.0 → 2.0.0--canary.382.cb1e673.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,10 +1,7 @@
1
1
  const { Command } = require('commander');
2
2
  const { installCommand } = require('./index');
3
3
  const { validatePackageExists } = require('./install-command/validate-package');
4
- const {
5
- findNearestBackendPackageJson,
6
- validateBackendPath,
7
- } = require('./utils/backend-path');
4
+ const { findNearestBackendPackageJson, validateBackendPath } = require('@friggframework/core');
8
5
  const { installPackage } = require('./install-command/install-package');
9
6
  const { createIntegrationFile } = require('./install-command/integration-file');
10
7
  const { updateBackendJsFile } = require('./install-command/backend-js');
@@ -4,15 +4,12 @@ const { resolve } = require('node:path');
4
4
  const { updateBackendJsFile } = require('./backend-js');
5
5
  const { logInfo, logError } = require('./logger');
6
6
  const { commitChanges } = require('./commit-changes');
7
- const {
8
- findNearestBackendPackageJson,
9
- validateBackendPath,
10
- } = require('../utils/backend-path');
11
7
  const { handleEnvVariables } = require('./environment-variables');
12
8
  const {
13
9
  validatePackageExists,
14
10
  searchAndSelectPackage,
15
11
  } = require('./validate-package');
12
+ const { findNearestBackendPackageJson, validateBackendPath } = require('@friggframework/core');
16
13
 
17
14
  const installCommand = async (apiModuleName) => {
18
15
  try {
@@ -2,9 +2,7 @@ const path = require('path');
2
2
  const fs = require('fs-extra');
3
3
  const { composeServerlessDefinition } = require('./serverless-template');
4
4
 
5
- const {
6
- findNearestBackendPackageJson,
7
- } = require('../frigg-cli/utils/backend-path');
5
+ const { findNearestBackendPackageJson } = require('@friggframework/core');
8
6
 
9
7
  function createFriggInfrastructure() {
10
8
  const backendPath = findNearestBackendPackageJson();
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@friggframework/devtools",
3
3
  "prettier": "@friggframework/prettier-config",
4
- "version": "2.0.0--canary.380.c98f800.0",
4
+ "version": "2.0.0--canary.382.cb1e673.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.380.c98f800.0",
10
- "@hapi/boom": "^7.4.11",
9
+ "@friggframework/test": "2.0.0--canary.382.cb1e673.0",
10
+ "@hapi/boom": "^10.0.1",
11
11
  "@inquirer/prompts": "^5.3.8",
12
12
  "axios": "^1.7.2",
13
13
  "body-parser": "^1.20.2",
@@ -23,12 +23,13 @@
23
23
  "express": "^4.19.2",
24
24
  "express-async-handler": "^1.2.0",
25
25
  "fs-extra": "^11.2.0",
26
- "lodash": "^4.17.21",
26
+ "lodash": "4.17.21",
27
27
  "serverless-http": "^2.7.0"
28
28
  },
29
29
  "devDependencies": {
30
- "@friggframework/eslint-config": "2.0.0--canary.380.c98f800.0",
31
- "@friggframework/prettier-config": "2.0.0--canary.380.c98f800.0",
30
+ "@friggframework/eslint-config": "2.0.0--canary.382.cb1e673.0",
31
+ "@friggframework/prettier-config": "2.0.0--canary.382.cb1e673.0",
32
+ "prettier": "^2.7.1",
32
33
  "serverless": "3.39.0",
33
34
  "serverless-dotenv-plugin": "^6.0.0",
34
35
  "serverless-jetpack": "^0.11.2",
@@ -58,5 +59,5 @@
58
59
  "publishConfig": {
59
60
  "access": "public"
60
61
  },
61
- "gitHead": "c98f800f923c49012b32df0ce50028832c3fb4af"
62
+ "gitHead": "cb1e6739347dc7b9408a4484842d3491c9bd7d28"
62
63
  }
@@ -1,26 +0,0 @@
1
- const fs = require('fs-extra');
2
- const path = require('path');
3
- const PACKAGE_JSON = 'package.json';
4
-
5
- function findNearestBackendPackageJson() {
6
- let currentDir = process.cwd();
7
- while (currentDir !== path.parse(currentDir).root) {
8
- const packageJsonPath = path.join(currentDir, 'backend', PACKAGE_JSON);
9
- if (fs.existsSync(packageJsonPath)) {
10
- return packageJsonPath;
11
- }
12
- currentDir = path.dirname(currentDir);
13
- }
14
- return null;
15
- }
16
-
17
- function validateBackendPath(backendPath) {
18
- if (!backendPath) {
19
- throw new Error('Could not find a backend package.json file.');
20
- }
21
- }
22
-
23
- module.exports = {
24
- findNearestBackendPackageJson,
25
- validateBackendPath,
26
- };