feat: support include-ims-credentials annotation#157
feat: support include-ims-credentials annotation#157moritzraho wants to merge 4 commits intomainfrom
Conversation
|
converting to draft to not merge before pre-release revert (aio-lib-runtime@next dependency) |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Pull request overview
This pull request adds support for the include-ims-credentials annotation in the app dev server. When actions are configured with this annotation, the dev server will automatically inject IMS credentials (__ims_oauth_s2s and __ims_env) into action parameters, matching the behavior of the Adobe I/O Runtime production environment.
Changes:
- Added support for loading IMS credentials from environment variables during dev server initialization
- Modified action invocation to inject IMS credentials into action parameters when the annotation is present
- Added comprehensive test coverage for the new functionality
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| package.json | Updated @adobe/aio-lib-runtime dependency to "next" dist-tag to access new IMS credential utilities |
| src/lib/run-dev.js | Added module-level storage for IMS auth object and logic to inject credentials into actions with include-ims-credentials annotation |
| test/mocks/@adobe/aio-lib-runtime.js | Added mock for getIncludeIMSCredentialsAnnotationInputs function |
| test/lib/run-dev.test.js | Added tests for loadIMSCredentialsFromEnv invocation and IMS credential injection behavior |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "@adobe/aio-lib-core-logging": "^3", | ||
| "@adobe/aio-lib-env": "^3", | ||
| "@adobe/aio-lib-runtime": "^7.0.0", | ||
| "@adobe/aio-lib-runtime": "next", |
There was a problem hiding this comment.
Using the "next" dist-tag as a dependency version is not recommended for production code. The "next" tag points to a pre-release version that may be unstable, have breaking changes, or be withdrawn. This makes the build non-deterministic and could lead to unexpected failures.
Consider one of these alternatives:
- If the required functionality is in a stable release, use a specific version or version range (e.g., "^7.1.0")
- If you need a pre-release for testing, use the specific version number of the pre-release (e.g., "7.1.0-beta.1")
- If the dependencies haven't been released yet, consider coordinating the release of the dependent packages first
According to the PR description, this depends on a release of the aio-lib-runtime package. Once that release is published, this should be updated to use a stable version.
| "@adobe/aio-lib-runtime": "next", | |
| "@adobe/aio-lib-runtime": "^6", |
Description
depends on a release of adobe/aio-cli-plugin-app#899 and adobe/aio-lib-runtime#224
Add support for the annotation in app dev
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: