Skip to content

Commit

Permalink
fix: use-domain-name keyword to define remotes URL
Browse files Browse the repository at this point in the history
  • Loading branch information
steven-pribilinskiy committed Jul 25, 2022
1 parent 780361c commit 0d9b349
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ To enable verbose logging add folowing in webpack config:
|-----------------------------------------:|:--------------------:|:-------------------:|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `disableTypeCompilation` | `boolean` | `false` | Disable compilation of types |
| `disableDownladingRemoteTypes` | `boolean` | `false` | Disable downloading of remote types |
| `cloudbedsRemoteManifestsBaseUrl` | `string` | `'/remotes/dev-ga'` | Base URL for remote manifest files (a.k.a remote entry configs) that is specific to Cloudbeds microapps <br><br> _ Examples:_ <br> `http://localhost:4480/remotes/dev` <br> `https://cb-front.cloudbeds-dev.com/remotes/[env]` <br> `use-devbox-name` |
| `cloudbedsRemoteManifestsBaseUrl` | `string` | `'/remotes/dev-ga'` | Base URL for remote manifest files (a.k.a remote entry configs) that is specific to Cloudbeds microapps <br><br> _ Examples:_ <br> `http://localhost:4480/remotes/dev` <br> `https://cb-front.cloudbeds-dev.com/remotes/[env]` <br> `use-domain-name` |
| `doNotUseCloudbedsRemoteManifests` | `boolean` | `false` | Disable downloading default remote manifest files for Cloudbeds microapps (`mfd-common-remote-entry.json` and `mfd-remote-entries.json` files) and download only those provided via `remoteManifestUrls` |
| `downloadTypesWhenIdleIntervalInSeconds` | `number`, `-1` | `60` | Synchronize types continusouly - compile types after every compilation, download when idle with a specified delay value in seconds. <br><br> `-1` - disables continuous synchronization (compile and download will happen only on startup). |
| `remoteManifestUrls` | `RemoteManifestUrls` | `{}` | URLs to remote manifest files. A manifest contains a URL to a remote entry that is substituted in runtime. Multiple remote entries is supported via `registry` field. <br><br> More details available in [this section](#templated-remote-urls) |
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/cloudbedsRemoteManifests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { ModuleFederationTypesPluginOptions, RemoteManifestUrls } from '../types
export function getRemoteManifestUrls(options?: ModuleFederationTypesPluginOptions): RemoteManifestUrls | undefined {
if (!options?.doNotUseCloudbedsRemoteManifests) {
let baseUrl = options?.cloudbedsRemoteManifestsBaseUrl;
if (!baseUrl || baseUrl === 'use-devbox-name') {
if (!baseUrl || baseUrl === 'use-domain-name') {
baseUrl = `${CLOUDBEDS_DEV_FRONTEND_ASSETS_DOMAIN}/remotes/dev-ga`;
}
return {
Expand Down
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export type RemoteManifestUrls = Record<'registry' | string, string>;
export type ModuleFederationPluginOptions = ConstructorParameters<typeof container.ModuleFederationPlugin>[0];

export type ModuleFederationTypesPluginOptions = {
cloudbedsRemoteManifestsBaseUrl?: string | 'use-devbox-name',
cloudbedsRemoteManifestsBaseUrl?: string | 'use-domain-name',
disableDownladingRemoteTypes?: boolean,
disableTypeCompilation?: boolean,
doNotUseCloudbedsRemoteManifests?: boolean,
Expand Down

0 comments on commit 0d9b349

Please sign in to comment.