Skip to content

Conversation

toddhainsworth
Copy link
Member

The resolveLambdaHandler function was not correctly resolving asset paths for Lambda handlers located in nested directories (e.g., runtime/handlers/prototype/salesforce/get-salesforce-object.ts).

The function was preserving the full directory structure in the asset path, but the build process creates a flat structure in the dist directory. This caused deployment failures with errors like: ValidationError: Cannot find asset at /path/to/services/catalog-dist/dist/prototype/get-salesforce-object

Changes:

  • Modified resolveLambdaHandler to extract only the filename from nested handler paths
  • Updated logic to correctly resolve runtime/handlers/prototype/get-salesforce-object.ts to ../dist/get-salesforce-object
  • Added clarifying comment about flat bundling structure
  • This maintains compatibility with the existing build process while allowing handlers to be organized in subdirectories.

kai-nguyen-aligent and others added 30 commits August 19, 2025 14:29
This will handle nested folders in a more predictable way when bundling and resolving paths
…path-for-bundled-handlers

Feature/mi 246 retain relative path for bundled handlers
…code

MI-246: Bundle lambda code using vite
Bumps [form-data](https://github.com/form-data/form-data) from 4.0.3 to 4.0.4.
- [Release notes](https://github.com/form-data/form-data/releases)
- [Changelog](https://github.com/form-data/form-data/blob/master/CHANGELOG.md)
- [Commits](form-data/form-data@v4.0.3...v4.0.4)

---
updated-dependencies:
- dependency-name: form-data
  dependency-version: 4.0.4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Passing `scope` means the service stacks don't inherit things like the stage tag.
MI-262: (fix) ensure example service instantiation works
Bump the patch version of Nx and associated plugins
…ta-4.0.4

Bump form-data from 4.0.3 to 4.0.4
…nd-audit-commands-in-setup

MI-259: Fix step 2 of setup documentation
…ries

The resolveLambdaHandler function was not correctly resolving asset paths for Lambda handlers located in nested directories (e.g., runtime/handlers/prototype/salesforce/get-salesforce-object.ts).

The function was preserving the full directory structure in the asset path, but the build process creates a flat structure in the dist directory. This caused deployment failures with errors like:
ValidationError: Cannot find asset at /path/to/services/catalog-dist/dist/prototype/get-salesforce-object

Changes:
- Modified resolveLambdaHandler to extract only the filename from nested handler paths
- Updated logic to correctly resolve runtime/handlers/prototype/get-salesforce-object.ts to ../dist/get-salesforce-object
- Added clarifying comment about flat bundling structure
- This maintains compatibility with the existing build process while allowing handlers to be organized in subdirectories.
@toddhainsworth
Copy link
Member Author

toddhainsworth commented Sep 12, 2025

@tvhees @kai-nguyen-aligent Repo might need some cleanup, 4.2.0 is behind main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants