input analyticsImplementations -> implementations
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
This commit is contained in:
+1
-1
@@ -35,7 +35,7 @@ describe('AnalyticsBlueprint', () => {
|
||||
"attachTo": [
|
||||
{
|
||||
"id": "api:app/analytics",
|
||||
"input": "analyticsImplementations",
|
||||
"input": "implementations",
|
||||
},
|
||||
],
|
||||
"configSchema": undefined,
|
||||
|
||||
@@ -41,7 +41,7 @@ const factoryDataRef =
|
||||
*/
|
||||
export const AnalyticsImplementationBlueprint = createExtensionBlueprint({
|
||||
kind: 'analytics',
|
||||
attachTo: [{ id: 'api:app/analytics', input: 'analyticsImplementations' }],
|
||||
attachTo: [{ id: 'api:app/analytics', input: 'implementations' }],
|
||||
output: [factoryDataRef],
|
||||
dataRefs: {
|
||||
factory: factoryDataRef,
|
||||
|
||||
@@ -238,7 +238,7 @@ const appPlugin: FrontendPlugin<
|
||||
{}
|
||||
>;
|
||||
inputs: {
|
||||
analyticsImplementations: ExtensionInput<
|
||||
implementations: ExtensionInput<
|
||||
ConfigurableExtensionDataRef<
|
||||
AnalyticsImplementationFactory<{}>,
|
||||
'core.analytics.factory',
|
||||
|
||||
@@ -37,7 +37,7 @@ describe('AnalyticsApi', () => {
|
||||
const captureEventSpy1 = jest.fn();
|
||||
const MockImplementation1 = createExtension({
|
||||
name: 'mock-implementation-1',
|
||||
attachTo: { id: 'api:analytics', input: 'analyticsImplementations' },
|
||||
attachTo: { id: 'api:analytics', input: 'implementations' },
|
||||
output: [AnalyticsImplementationBlueprint.dataRefs.factory],
|
||||
factory() {
|
||||
return [
|
||||
@@ -53,7 +53,7 @@ describe('AnalyticsApi', () => {
|
||||
const captureEventSpy2 = jest.fn();
|
||||
const MockImplementation2 = createExtension({
|
||||
name: 'mock-implementation-2',
|
||||
attachTo: { id: 'api:analytics', input: 'analyticsImplementations' },
|
||||
attachTo: { id: 'api:analytics', input: 'implementations' },
|
||||
output: [AnalyticsImplementationBlueprint.dataRefs.factory],
|
||||
factory() {
|
||||
return [
|
||||
|
||||
@@ -25,7 +25,7 @@ import {
|
||||
export const AnalyticsApi = ApiBlueprint.makeWithOverrides({
|
||||
name: 'analytics',
|
||||
inputs: {
|
||||
analyticsImplementations: createExtensionInput([
|
||||
implementations: createExtensionInput([
|
||||
AnalyticsImplementationBlueprint.dataRefs.factory,
|
||||
]),
|
||||
},
|
||||
@@ -33,7 +33,7 @@ export const AnalyticsApi = ApiBlueprint.makeWithOverrides({
|
||||
// Pull out and aggregate deps from every implementation input into an
|
||||
// object keyed by the apiRef ID to be passed to this API implementation as
|
||||
// if they were its own deps.
|
||||
const aggregatedDeps = inputs.analyticsImplementations
|
||||
const aggregatedDeps = inputs.implementations
|
||||
.flatMap<ApiRef<unknown>>(impls =>
|
||||
Object.values(
|
||||
impls.get(AnalyticsImplementationBlueprint.dataRefs.factory).deps,
|
||||
@@ -49,7 +49,7 @@ export const AnalyticsApi = ApiBlueprint.makeWithOverrides({
|
||||
api: analyticsApiRef,
|
||||
deps: aggregatedDeps,
|
||||
factory: analyticsApiDeps => {
|
||||
const actualApis = inputs.analyticsImplementations
|
||||
const actualApis = inputs.implementations
|
||||
.map(impl =>
|
||||
impl.get(AnalyticsImplementationBlueprint.dataRefs.factory),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user