@friggframework/core 2.0.0--canary.461.d9e6ed3.0 → 2.0.0--canary.461.4e09240.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.
@@ -53,9 +53,15 @@ async function runPrismaGenerate(dbType, verbose = false) {
53
53
  const generatedClientPath = path.join(path.dirname(path.dirname(schemaPath)), 'generated', `prisma-${dbType}`, 'client.js');
54
54
  const isLambdaEnvironment = !!process.env.AWS_LAMBDA_FUNCTION_NAME || !!process.env.LAMBDA_TASK_ROOT;
55
55
 
56
- if (fs.existsSync(generatedClientPath)) {
56
+ // In Lambda, also check the layer path (/opt/nodejs/node_modules)
57
+ const lambdaLayerClientPath = `/opt/nodejs/node_modules/generated/prisma-${dbType}/client.js`;
58
+
59
+ const clientExists = fs.existsSync(generatedClientPath) || (isLambdaEnvironment && fs.existsSync(lambdaLayerClientPath));
60
+
61
+ if (clientExists) {
62
+ const foundPath = fs.existsSync(generatedClientPath) ? generatedClientPath : lambdaLayerClientPath;
57
63
  if (verbose) {
58
- console.log(chalk.gray(`✓ Prisma client already generated at: ${generatedClientPath}`));
64
+ console.log(chalk.gray(`✓ Prisma client already generated at: ${foundPath}`));
59
65
  }
60
66
  if (isLambdaEnvironment) {
61
67
  if (verbose) {
@@ -100,7 +100,7 @@ function sanitizeDatabaseUrl(url) {
100
100
  function extractMigrationParams(event) {
101
101
  let migrationId = null;
102
102
  let stage = null;
103
-
103
+
104
104
  // Migration infrastructure is PostgreSQL-only, so hardcode dbType
105
105
  const dbType = 'postgresql';
106
106
 
@@ -298,8 +298,8 @@ exports.handler = async (event, context) => {
298
298
  ...(stage === 'dev' || stage === 'local' || stage === 'test' ? { stack: error.stack } : {}),
299
299
  };
300
300
 
301
- if (processId) {
302
- errorBody.processId = processId;
301
+ if (migrationId) {
302
+ errorBody.migrationId = migrationId;
303
303
  }
304
304
 
305
305
  return {
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.461.d9e6ed3.0",
4
+ "version": "2.0.0--canary.461.4e09240.0",
5
5
  "dependencies": {
6
6
  "@aws-sdk/client-apigatewaymanagementapi": "^3.588.0",
7
7
  "@aws-sdk/client-kms": "^3.588.0",
@@ -37,9 +37,9 @@
37
37
  }
38
38
  },
39
39
  "devDependencies": {
40
- "@friggframework/eslint-config": "2.0.0--canary.461.d9e6ed3.0",
41
- "@friggframework/prettier-config": "2.0.0--canary.461.d9e6ed3.0",
42
- "@friggframework/test": "2.0.0--canary.461.d9e6ed3.0",
40
+ "@friggframework/eslint-config": "2.0.0--canary.461.4e09240.0",
41
+ "@friggframework/prettier-config": "2.0.0--canary.461.4e09240.0",
42
+ "@friggframework/test": "2.0.0--canary.461.4e09240.0",
43
43
  "@prisma/client": "^6.17.0",
44
44
  "@types/lodash": "4.17.15",
45
45
  "@typescript-eslint/eslint-plugin": "^8.0.0",
@@ -79,5 +79,5 @@
79
79
  "publishConfig": {
80
80
  "access": "public"
81
81
  },
82
- "gitHead": "d9e6ed3383bf057b4114c45c96e99a461f73bd17"
82
+ "gitHead": "4e09240e0c5cabdae1d5b824194a9f8516aa3473"
83
83
  }