feat: add mediaApiPrefix env var and backend.media.prefix config#21096
Merged
feat: add mediaApiPrefix env var and backend.media.prefix config#21096
Conversation
spartacus
|
||||||||||||||||||||||||||||
| Project |
spartacus
|
| Branch Review |
feature/CXSPA-12006-media-prefix
|
| Run status |
|
| Run duration | 03m 45s |
| Commit |
|
| Committer | Uros Lates |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
3
|
|
|
0
|
|
|
0
|
|
|
101
|
| View all changes introduced in this branch ↗︎ | |
Contributor
StanislavSukhanov
left a comment
There was a problem hiding this comment.
Hey @uroslates great job! Left some comments/suggestions
StanislavSukhanov
requested changes
Feb 3, 2026
StanislavSukhanov
requested changes
Feb 3, 2026
StanislavSukhanov
approved these changes
Feb 19, 2026
Platonn
added a commit
that referenced
this pull request
Mar 11, 2026
…ntralize common configs of b2b and b2c in one file; rename b2b and b2c files from '.module.ts' to '.providers.ts'" (#21181) This reverts commit 70bc432. **What:** We're moving the OCC backend (and Media backend) configuration in `storefrontapp` from `app.module.ts` to `spartacus-configuration.module.ts` - to mimic better the fresh apps which have this config in their `spartacus-configuration.module.ts`. And we extracting repeated config from `spartacus-b2b-...` and `spartacus-b2c-configuration.module.ts` to one `spartacus-configuration.module.ts` and moving the differing parts to renamed b2b and b2c `... .providers.ts` files. **Why:** In https://jira.tools.sap/browse/CXSPA-11890 we've modernized storefrontapp to look more like a fresh app - i.e. we moved around configs between app.module, spartacus-storefront.module, spartacus-b2b-storefront.module, spartacus-b2c-storefront.module But it turned our it broke our `ec-automate-pipelines` scripts, which caused deployment scripts to fail. So we quickly reverted those modernizations of storefrontapp in https://jira.tools.sap/browse/CXSPA-12046 (#21120) , to unblock the testing of the Feb2026 release, with the help of necessary deployment scripts But now, after we're done with Feb2026 release, we'd like to bring back the modernization of the storefrontapp, and then we'll adjust the `ec-automate-pipelines` script. **Conflicts resolved with recent changes in develop** While applying a revert I resolved 2 conflicts with changes that were added in the meantime on `develop`: - `backend.media` config has been added to `app.module.ts` in #21096 -> so I've moved it to `private.providers.ts` (near backend.occ` config - `pwa.enable` config has been disabled in github.com//issues/21116 -> so I also keep it disabled --- **Notes for adjusting `ec-automate-pipelines`:** (generated with Opus 4.5 and human-edited) OLD Expectations of ec-automate-pipelines: 1. OCC BaseUrl Configuration - **File:** `projects/storefrontapp/src/app/app.module.ts` - **Line pattern:** `baseUrl: environment.occBaseUrl` 2. B2B Configuration - **File:** `spartacus-b2b-configuration.module.ts` (NgModule with `@NgModule({ providers: [...] })`) - **Structure:** Has `providers: [` array inside NgModule decorator - **PWA config:** Located IN this file 3. B2C Configuration - **File:** `spartacus-b2c-configuration.module.ts` (NgModule) - **PWA config:** Located IN this file 4. PWA Configuration Location - **B2B:** In `spartacus-b2b-configuration.module.ts` - **B2C:** In `spartacus-b2c-configuration.module.ts` - PWA config enabled NEW Expectations of ec-automate-pipelines should be: 1. OCC BaseUrl Configuration⚠️ MOVED - **New File:** `projects/storefrontapp/src/app/private/private.providers.ts` - **Old File:** ~~`app.module.ts`~~ (no longer contains OCC config) - **Line pattern:** Same - `baseUrl: environment.occBaseUrl` 2. B2B Configuration⚠️ RENAMED & RESTRUCTURED - **New File:** `spartacus-b2b-configuration.providers.ts` - **Old File:** ~~`spartacus-b2b-configuration.module.ts`~~ (deleted) - **Structure:** Uses `makeEnvironmentProviders([...])` instead of NgModule - **PWA config:** NOT in this file anymore 3. B2C Configuration⚠️ RENAMED & RESTRUCTURED - **New File:** `spartacus-b2c-configuration.providers.ts` (standalone providers function) - **Old File:** ~~`spartacus-b2c-configuration.module.ts`~~ (deleted) - **PWA config:** NOT in this file anymore 4. PWA Configuration Location⚠️ CENTRALIZED - **New Location:** `spartacus-configuration.module.ts` (single location) - **Old Location:** ~~B2B and B2C modules separately~~ (removed) - PWA config IS ALREADY DISABLED (no need to disable it with ec-automate-pipelines)! fixes https://jira.tools.sap/browse/CXSPA-12047
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes: https://jira.tools.sap/browse/CXSPA-12005
Adding