Skip to content

Comments

feat: support include-ims-credentials annotation#157

Draft
moritzraho wants to merge 4 commits intomainfrom
feat/support-include-ims-credentials
Draft

feat: support include-ims-credentials annotation#157
moritzraho wants to merge 4 commits intomainfrom
feat/support-include-ims-credentials

Conversation

@moritzraho
Copy link
Member

@moritzraho moritzraho commented Jan 22, 2026

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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@moritzraho moritzraho marked this pull request as draft January 22, 2026 20:40
@moritzraho moritzraho marked this pull request as ready for review February 9, 2026 13:24
@moritzraho moritzraho marked this pull request as draft February 20, 2026 17:32
@moritzraho
Copy link
Member Author

converting to draft to not merge before pre-release revert (aio-lib-runtime@next dependency)

@codecov
Copy link

codecov bot commented Feb 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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",
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

  1. If the required functionality is in a stable release, use a specific version or version range (e.g., "^7.1.0")
  2. If you need a pre-release for testing, use the specific version number of the pre-release (e.g., "7.1.0-beta.1")
  3. 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.

Suggested change
"@adobe/aio-lib-runtime": "next",
"@adobe/aio-lib-runtime": "^6",

Copilot uses AI. Check for mistakes.
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