@friggframework/devtools 2.0.0--canary.454.d57d533.0 → 2.0.0--canary.454.16de0f8.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.
|
@@ -24,11 +24,33 @@ const fs = require('fs-extra');
|
|
|
24
24
|
const path = require('path');
|
|
25
25
|
const { execSync } = require('child_process');
|
|
26
26
|
|
|
27
|
+
/**
|
|
28
|
+
* Find @friggframework/core package, handling workspace hoisting
|
|
29
|
+
* Searches up the directory tree to find node_modules/@friggframework/core
|
|
30
|
+
*/
|
|
31
|
+
function findCorePackage(startDir) {
|
|
32
|
+
let currentDir = startDir;
|
|
33
|
+
const root = path.parse(currentDir).root;
|
|
34
|
+
|
|
35
|
+
while (currentDir !== root) {
|
|
36
|
+
const candidatePath = path.join(currentDir, 'node_modules/@friggframework/core');
|
|
37
|
+
if (fs.existsSync(candidatePath)) {
|
|
38
|
+
return candidatePath;
|
|
39
|
+
}
|
|
40
|
+
currentDir = path.dirname(currentDir);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
throw new Error(
|
|
44
|
+
'@friggframework/core not found in node_modules.\n' +
|
|
45
|
+
'Run "npm install" to install dependencies.'
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
|
|
27
49
|
// Configuration
|
|
28
50
|
// Script runs from integration project root (e.g., backend/)
|
|
29
51
|
// and reads Prisma packages from @friggframework/core
|
|
30
52
|
const PROJECT_ROOT = process.cwd();
|
|
31
|
-
const CORE_PACKAGE_PATH =
|
|
53
|
+
const CORE_PACKAGE_PATH = findCorePackage(PROJECT_ROOT);
|
|
32
54
|
const LAYER_OUTPUT_PATH = path.join(PROJECT_ROOT, 'layers/prisma');
|
|
33
55
|
const LAYER_NODE_MODULES = path.join(LAYER_OUTPUT_PATH, 'nodejs/node_modules');
|
|
34
56
|
|
|
@@ -123,13 +145,18 @@ async function createLayerStructure() {
|
|
|
123
145
|
async function copyPrismaPackages() {
|
|
124
146
|
logStep(3, 'Copying Prisma packages from @friggframework/core');
|
|
125
147
|
|
|
126
|
-
//
|
|
127
|
-
//
|
|
128
|
-
//
|
|
148
|
+
// Build search paths, handling workspace hoisting
|
|
149
|
+
// Packages can be in:
|
|
150
|
+
// 1. Core's own node_modules (if not hoisted)
|
|
151
|
+
// 2. Project root node_modules (if hoisted from project)
|
|
152
|
+
// 3. Workspace root node_modules (where core is located - handles hoisting)
|
|
153
|
+
// 4. Core package itself (for generated/ directories)
|
|
154
|
+
const workspaceNodeModules = path.join(path.dirname(CORE_PACKAGE_PATH), '..');
|
|
129
155
|
const searchPaths = [
|
|
130
156
|
path.join(CORE_PACKAGE_PATH, 'node_modules'), // Core's own node_modules
|
|
131
|
-
path.join(PROJECT_ROOT, 'node_modules'), // Project
|
|
132
|
-
|
|
157
|
+
path.join(PROJECT_ROOT, 'node_modules'), // Project node_modules
|
|
158
|
+
workspaceNodeModules, // Workspace root node_modules
|
|
159
|
+
CORE_PACKAGE_PATH, // Core package itself (for generated/)
|
|
133
160
|
];
|
|
134
161
|
|
|
135
162
|
let copiedCount = 0;
|
|
@@ -160,7 +187,7 @@ async function copyPrismaPackages() {
|
|
|
160
187
|
? 'core package (generated)'
|
|
161
188
|
: sourcePath.includes('@friggframework/core/node_modules')
|
|
162
189
|
? 'core node_modules'
|
|
163
|
-
: '
|
|
190
|
+
: 'workspace';
|
|
164
191
|
logSuccess(`Copied ${pkg} (from ${fromLocation})`);
|
|
165
192
|
copiedCount++;
|
|
166
193
|
} else {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@friggframework/devtools",
|
|
3
3
|
"prettier": "@friggframework/prettier-config",
|
|
4
|
-
"version": "2.0.0--canary.454.
|
|
4
|
+
"version": "2.0.0--canary.454.16de0f8.0",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@aws-sdk/client-ec2": "^3.835.0",
|
|
7
7
|
"@aws-sdk/client-kms": "^3.835.0",
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
"@babel/eslint-parser": "^7.18.9",
|
|
12
12
|
"@babel/parser": "^7.25.3",
|
|
13
13
|
"@babel/traverse": "^7.25.3",
|
|
14
|
-
"@friggframework/schemas": "2.0.0--canary.454.
|
|
15
|
-
"@friggframework/test": "2.0.0--canary.454.
|
|
14
|
+
"@friggframework/schemas": "2.0.0--canary.454.16de0f8.0",
|
|
15
|
+
"@friggframework/test": "2.0.0--canary.454.16de0f8.0",
|
|
16
16
|
"@hapi/boom": "^10.0.1",
|
|
17
17
|
"@inquirer/prompts": "^5.3.8",
|
|
18
18
|
"axios": "^1.7.2",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"serverless-http": "^2.7.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@friggframework/eslint-config": "2.0.0--canary.454.
|
|
38
|
-
"@friggframework/prettier-config": "2.0.0--canary.454.
|
|
37
|
+
"@friggframework/eslint-config": "2.0.0--canary.454.16de0f8.0",
|
|
38
|
+
"@friggframework/prettier-config": "2.0.0--canary.454.16de0f8.0",
|
|
39
39
|
"aws-sdk-client-mock": "^4.1.0",
|
|
40
40
|
"aws-sdk-client-mock-jest": "^4.1.0",
|
|
41
41
|
"jest": "^30.1.3",
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"publishConfig": {
|
|
71
71
|
"access": "public"
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "16de0f8e421d3d1b83cc686c3c1d3629169bc9a6"
|
|
74
74
|
}
|