Skip to content

Commit af5894d

Browse files
committed
remove remote-config-types exp
1 parent 90f5f34 commit af5894d

File tree

12 files changed

+14
-65
lines changed

12 files changed

+14
-65
lines changed

.changeset/config.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
"@firebase/performance-exp",
3030
"@firebase/performance-types-exp",
3131
"@firebase/remote-config-exp",
32-
"@firebase/remote-config-types-exp",
3332
"@firebase/remote-config-compat",
3433
"firebase-exp",
3534
"@firebase/app-compat",

packages-exp/remote-config-exp/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
"dependencies": {
3333
"@firebase/installations-exp": "0.0.900",
3434
"@firebase/logger": "0.2.6",
35-
"@firebase/remote-config-types-exp": "0.0.900",
3635
"@firebase/util": "0.3.4",
3736
"@firebase/component": "0.1.21",
3837
"tslib": "^1.11.1"

packages-exp/remote-config-exp/src/api.ts

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ import { _getProvider, FirebaseApp } from '@firebase/app-exp';
1919
import {
2020
LogLevel as RemoteConfigLogLevel,
2121
RemoteConfig,
22-
Value as ValueType
23-
} from '@firebase/remote-config-types-exp';
22+
Value
23+
} from './public_types';
2424
import { RemoteConfigAbortSignal } from './client/remote_config_fetch_client';
2525
import { RC_COMPONENT_NAME } from './constants';
2626
import { ErrorCode, hasErrorCode } from './errors';
2727
import { RemoteConfig as RemoteConfigImpl } from './remote_config';
28-
import { Value } from './value';
28+
import { Value as ValueImpl } from './value';
2929
import { LogLevel as FirebaseLogLevel } from '@firebase/logger';
3030

3131
/**
@@ -137,15 +137,15 @@ export async function fetchConfig(remoteConfig: RemoteConfig): Promise<void> {
137137
*
138138
* @public
139139
*/
140-
export function getAll(remoteConfig: RemoteConfig): Record<string, ValueType> {
140+
export function getAll(remoteConfig: RemoteConfig): Record<string, Value> {
141141
const rc = remoteConfig as RemoteConfigImpl;
142142
return getAllKeys(
143143
rc._storageCache.getActiveConfig(),
144144
rc.defaultConfig
145145
).reduce((allConfigs, key) => {
146146
allConfigs[key] = getValue(remoteConfig, key);
147147
return allConfigs;
148-
}, {} as Record<string, ValueType>);
148+
}, {} as Record<string, Value>);
149149
}
150150

151151
/**
@@ -204,7 +204,7 @@ export function getString(remoteConfig: RemoteConfig, key: string): string {
204204
*
205205
* @public
206206
*/
207-
export function getValue(remoteConfig: RemoteConfig, key: string): ValueType {
207+
export function getValue(remoteConfig: RemoteConfig, key: string): Value {
208208
const rc = remoteConfig as RemoteConfigImpl;
209209
if (!rc._isInitializationComplete) {
210210
rc._logger.debug(
@@ -214,15 +214,15 @@ export function getValue(remoteConfig: RemoteConfig, key: string): ValueType {
214214
}
215215
const activeConfig = rc._storageCache.getActiveConfig();
216216
if (activeConfig && activeConfig[key] !== undefined) {
217-
return new Value('remote', activeConfig[key]);
217+
return new ValueImpl('remote', activeConfig[key]);
218218
} else if (rc.defaultConfig && rc.defaultConfig[key] !== undefined) {
219-
return new Value('default', String(rc.defaultConfig[key]));
219+
return new ValueImpl('default', String(rc.defaultConfig[key]));
220220
}
221221
rc._logger.debug(
222222
`Returning static value for key "${key}".` +
223223
' Define a default or remote value if this is unintentional.'
224224
);
225-
return new Value('static');
225+
return new ValueImpl('static');
226226
}
227227

228228
/**
@@ -256,5 +256,3 @@ export function setLogLevel(
256256
function getAllKeys(obj1: {} = {}, obj2: {} = {}): string[] {
257257
return Object.keys({ ...obj1, ...obj2 });
258258
}
259-
260-
export { RemoteConfig, ValueType, RemoteConfigLogLevel };

packages-exp/remote-config-exp/src/api2.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*/
1717

18-
import { RemoteConfig } from '@firebase/remote-config-types-exp';
18+
import { RemoteConfig } from './public_types';
1919
import { activate, fetchConfig } from './api';
2020

2121
// This API is put in a separate file, so we can stub fetchConfig and activate in tests.

packages-exp/remote-config-types-exp/index.d.ts renamed to packages-exp/remote-config-exp/src/public_types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @license
3-
* Copyright 2019 Google LLC
3+
* Copyright 2020 Google LLC
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.

packages-exp/remote-config-exp/src/register.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import {
2525
ComponentContainer
2626
} from '@firebase/component';
2727
import { Logger, LogLevel as FirebaseLogLevel } from '@firebase/logger';
28-
import { RemoteConfig } from '@firebase/remote-config-types-exp';
28+
import { RemoteConfig } from './public_types';
2929
import { name as packageName, version } from '../package.json';
3030
import { ensureInitialized } from './api';
3131
import { CachingClient } from './client/caching_client';

packages-exp/remote-config-exp/src/remote_config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import {
2020
RemoteConfig as RemoteConfigType,
2121
FetchStatus,
2222
Settings
23-
} from '@firebase/remote-config-types-exp';
23+
} from './public_types';
2424
import { StorageCache } from './storage/storage_cache';
2525
import { RemoteConfigFetchClient } from './client/remote_config_fetch_client';
2626
import { Storage } from './storage/storage';

packages-exp/remote-config-exp/test/remote_config.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { FirebaseApp } from '@firebase/app-exp';
1919
import {
2020
RemoteConfig as RemoteConfigType,
2121
LogLevel as RemoteConfigLogLevel
22-
} from '@firebase/remote-config-types-exp';
22+
} from '../src/public_types';
2323
import { expect } from 'chai';
2424
import * as sinon from 'sinon';
2525
import { StorageCache } from '../src/storage/storage_cache';

packages-exp/remote-config-types-exp/README.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

packages-exp/remote-config-types-exp/api-extractor.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

packages-exp/remote-config-types-exp/package.json

Lines changed: 0 additions & 30 deletions
This file was deleted.

packages-exp/remote-config-types-exp/tsconfig.json

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)