@feature-hub/core
Advanced tools
Comparing version 1.4.0 to 1.5.0-alpha.0
@@ -26,2 +26,6 @@ import { AsyncValue } from './async-value'; | ||
readonly idSpecifier: string | undefined; | ||
/** | ||
* The absolute or relative base URL of the Feature App's assets and/or BFF. | ||
*/ | ||
readonly baseUrl: string | undefined; | ||
} | ||
@@ -42,2 +46,6 @@ export interface FeatureAppDefinition<TFeatureApp, TConfig = unknown, TInstanceConfig = unknown, TFeatureServices extends FeatureServices = FeatureServices> extends FeatureServiceConsumerDefinition { | ||
/** | ||
* The absolute or relative base URL of the Feature App's assets and/or BFF. | ||
*/ | ||
readonly baseUrl?: string; | ||
/** | ||
* A specifier to distinguish the Feature App instances from others created | ||
@@ -44,0 +52,0 @@ * from the same definition. |
@@ -64,3 +64,3 @@ "use strict"; | ||
getFeatureAppScope(featureAppDefinition, options = {}) { | ||
const { idSpecifier, instanceConfig } = options; | ||
const { baseUrl, idSpecifier, instanceConfig } = options; | ||
const { id: featureAppId } = featureAppDefinition; | ||
@@ -71,4 +71,3 @@ const featureAppUid = create_uid_1.createUid(featureAppId, idSpecifier); | ||
this.registerOwnFeatureServices(featureAppDefinition); | ||
const deleteFeatureAppScope = () => this.featureAppScopes.delete(featureAppUid); | ||
featureAppScope = this.createFeatureAppScope(featureAppDefinition, idSpecifier, instanceConfig, deleteFeatureAppScope); | ||
featureAppScope = this.createFeatureAppScope(featureAppDefinition, () => this.featureAppScopes.delete(featureAppUid), { baseUrl, idSpecifier, instanceConfig }); | ||
this.featureAppScopes.set(featureAppUid, featureAppScope); | ||
@@ -113,4 +112,5 @@ } | ||
} | ||
createFeatureAppScope(featureAppDefinition, idSpecifier, instanceConfig, deleteFeatureAppScope) { | ||
createFeatureAppScope(featureAppDefinition, deleteFeatureAppScope, options) { | ||
this.validateExternals(featureAppDefinition); | ||
const { baseUrl, idSpecifier, instanceConfig } = options; | ||
const { configs } = this.options; | ||
@@ -121,2 +121,3 @@ const config = configs && configs[featureAppDefinition.id]; | ||
const featureApp = featureAppDefinition.create({ | ||
baseUrl, | ||
config, | ||
@@ -123,0 +124,0 @@ instanceConfig, |
{ | ||
"name": "@feature-hub/core", | ||
"version": "1.4.0", | ||
"version": "1.5.0-alpha.0", | ||
"description": "Create scalable web applications using micro frontends.", | ||
@@ -42,3 +42,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "22322272fb6a02f87f526ff42c9bd31799e5d120" | ||
"gitHead": "eda06e05efa2a73459f3007eecc2f3f83c365e62" | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
115471
37
998
1
1