@friggframework/core 2.0.0--canary.382.cb1e673.0 → 2.0.0--canary.383.80abc88.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/package.json +5 -5
- package/utils/backend-path.js +13 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@friggframework/core",
|
|
3
3
|
"prettier": "@friggframework/prettier-config",
|
|
4
|
-
"version": "2.0.0--canary.
|
|
4
|
+
"version": "2.0.0--canary.383.80abc88.0",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@hapi/boom": "^10.0.1",
|
|
7
7
|
"aws-sdk": "^2.1200.0",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"uuid": "^9.0.1"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@friggframework/eslint-config": "2.0.0--canary.
|
|
24
|
-
"@friggframework/prettier-config": "2.0.0--canary.
|
|
25
|
-
"@friggframework/test": "2.0.0--canary.
|
|
23
|
+
"@friggframework/eslint-config": "2.0.0--canary.383.80abc88.0",
|
|
24
|
+
"@friggframework/prettier-config": "2.0.0--canary.383.80abc88.0",
|
|
25
|
+
"@friggframework/test": "2.0.0--canary.383.80abc88.0",
|
|
26
26
|
"@types/lodash": "4.17.15",
|
|
27
27
|
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
28
28
|
"chai": "^4.3.6",
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
},
|
|
52
52
|
"homepage": "https://github.com/friggframework/frigg#readme",
|
|
53
53
|
"description": "",
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "80abc886c25def2f80265007b66766ce28da04fe"
|
|
55
55
|
}
|
package/utils/backend-path.js
CHANGED
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
const fs = require('fs-extra');
|
|
2
|
-
const path = require('path');
|
|
2
|
+
const path = require('node:path');
|
|
3
3
|
const PACKAGE_JSON = 'package.json';
|
|
4
4
|
|
|
5
5
|
function findNearestBackendPackageJson() {
|
|
6
6
|
let currentDir = process.cwd();
|
|
7
|
+
|
|
8
|
+
// First check if we're in production by looking for package.json in the current directory
|
|
9
|
+
const rootPackageJson = path.join(currentDir, PACKAGE_JSON);
|
|
10
|
+
if (fs.existsSync(rootPackageJson)) {
|
|
11
|
+
// In production environment, check for index.js in the same directory
|
|
12
|
+
const indexJs = path.join(currentDir, 'index.js');
|
|
13
|
+
if (fs.existsSync(indexJs)) {
|
|
14
|
+
return rootPackageJson;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// If not found at root or not in production, look for it in the backend directory
|
|
7
19
|
while (currentDir !== path.parse(currentDir).root) {
|
|
8
20
|
const packageJsonPath = path.join(currentDir, 'backend', PACKAGE_JSON);
|
|
9
21
|
if (fs.existsSync(packageJsonPath)) {
|