Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this.container = new ComponentContainer(config.name!);
// add itself to container
this._addComponent(new Component('app', () => this, ComponentType.PUBLIC));
this._addComponent(
new Component(
'platform-logger',
container => new PlatformLoggerService(container),
ComponentType.PRIVATE
)
);
this._addComponent(
new Component(
'app-version',
() => new VersionService('app', version),
ComponentType.VERSION
)
);
this._addComponent(
new Component(
'platform-identifier',
// Adds a string identifying version header as belonging to JS SDK
() => new VersionService('fire-js', ''),
ComponentType.VERSION
)
);
// populate ComponentContainer with existing components
for (const component of this.firebase_.INTERNAL.components.values()) {
this._addComponent(component);
}
}
ComponentType.PRIVATE
)
);
this._addComponent(
new Component(
'app-version',
() => new VersionService('app', version),
ComponentType.VERSION
)
);
this._addComponent(
new Component(
'platform-identifier',
// Adds a string identifying version header as belonging to JS SDK
() => new VersionService('fire-js', ''),
ComponentType.VERSION
)
);
// populate ComponentContainer with existing components
for (const component of this.firebase_.INTERNAL.components.values()) {
this._addComponent(component);
}
}
function isVersionServiceProvider(
provider: Provider
): provider is Provider<'app-version'> {
const component = provider.getComponent();
return component?.type === ComponentType.VERSION;
}
if (libraryMismatch && versionMismatch) {
warning.push('and');
}
if (versionMismatch) {
warning.push(
`version name "${version}" contains illegal characters (whitespace or "/")`
);
}
logger.warn(warning.join(' '));
return;
}
registerComponent(
new Component(
`${library}-version` as Name,
() => ({ library, version }),
ComponentType.VERSION
)
);
}
if (libraryMismatch && versionMismatch) {
warning.push('and');
}
if (versionMismatch) {
warning.push(
`version name "${version}" contains illegal characters (whitespace or "/")`
);
}
logger.warn(warning.join(' '));
return;
}
registerComponent(
new Component(
`${library}-version` as Name,
() => ({ library, version }),
ComponentType.VERSION
)
);
}