Skip to content

Commit ddeb130

Browse files
committed
Fix build.
1 parent 47b6b70 commit ddeb130

File tree

7 files changed

+20
-21
lines changed

7 files changed

+20
-21
lines changed

packages/shared/common/src/index.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
import AttributeReference from './AttributeReference';
22
import Context from './Context';
33
import ContextFilter from './ContextFilter';
4-
import { DataSourceErrorKind, LDPollingError, LDStreamingError } from './datasource';
4+
import {
5+
DataSourceErrorKind,
6+
LDFileDataSourceError,
7+
LDPollingError,
8+
LDStreamingError,
9+
} from './datasource';
510

611
export * from './api';
712
export * from './validators';
@@ -19,4 +24,5 @@ export {
1924
DataSourceErrorKind,
2025
LDPollingError,
2126
LDStreamingError,
27+
LDFileDataSourceError,
2228
};

packages/shared/sdk-client/src/datasource/DataSourceStatusManager.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { DataSourceErrorKind } from '@launchdarkly/js-sdk-common';
2+
13
import LDEmitter from '../LDEmitter';
24
import DataSourceStatus, { DataSourceState } from './DataSourceStatus';
35
import DataSourceStatusErrorInfo from './DataSourceStatusErrorInfo';

packages/shared/sdk-client/src/polling/PollingProcessor.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import {
2+
DataSourceErrorKind,
23
Encoding,
34
getPollingUri,
45
httpErrorMessage,
56
HttpErrorResponse,
6-
internal,
77
isHttpRecoverable,
88
LDLogger,
9+
LDPollingError,
910
Requests,
1011
subsystem,
1112
} from '@launchdarkly/js-sdk-common';
@@ -14,9 +15,7 @@ import { PollingDataSourceConfig } from '../streaming/DataSourceConfig';
1415
import { Flags } from '../types';
1516
import Requestor, { LDRequestError } from './Requestor';
1617

17-
// TODO: revisit usage of internal and figure out best practice
18-
const { DataSourceErrorKind, LDPollingError } = internal;
19-
export type PollingErrorHandler = (err: internal.LDPollingError) => void;
18+
export type PollingErrorHandler = (err: LDPollingError) => void;
2019

2120
/**
2221
* @internal

packages/shared/sdk-client/src/streaming/StreamingProcessor.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import {
2+
DataSourceErrorKind,
23
Encoding,
34
EventName,
45
EventSource,
@@ -7,6 +8,7 @@ import {
78
HttpErrorResponse,
89
internal,
910
LDLogger,
11+
LDStreamingError,
1012
ProcessStreamResponse,
1113
Requests,
1214
shouldRetry,
@@ -15,9 +17,6 @@ import {
1517

1618
import { StreamingDataSourceConfig } from './DataSourceConfig';
1719

18-
// TODO: revisit usage of internal and figure out best practice
19-
const { DataSourceErrorKind, LDStreamingError } = internal;
20-
2120
const reportJsonError = (
2221
type: string,
2322
data: string,

packages/shared/sdk-server/src/data_sources/FileDataSource.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {
22
Filesystem,
3-
internal,
3+
LDFileDataSourceError,
44
LDLogger,
55
subsystem,
66
VoidFunction,
@@ -14,8 +14,6 @@ import { processFlag, processSegment } from '../store/serialization';
1414
import VersionedDataKinds from '../store/VersionedDataKinds';
1515
import FileLoader from './FileLoader';
1616

17-
// TODO: revisit usage of internal and figure out best practice
18-
type LDFileDataSourceError = internal.LDFileDataSourceError;
1917
export type FileDataSourceErrorHandler = (err: LDFileDataSourceError) => void;
2018

2119
function makeFlagWithValue(key: string, value: any, version: number): Flag {

packages/shared/sdk-server/src/data_sources/PollingProcessor.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import {
2+
DataSourceErrorKind,
23
httpErrorMessage,
3-
internal,
44
isHttpRecoverable,
55
LDLogger,
6+
LDPollingError,
67
subsystem,
78
VoidFunction,
89
} from '@launchdarkly/js-sdk-common';
@@ -13,9 +14,7 @@ import { deserializePoll } from '../store';
1314
import VersionedDataKinds from '../store/VersionedDataKinds';
1415
import Requestor from './Requestor';
1516

16-
// TODO: revisit usage of internal and figure out best practice
17-
const { DataSourceErrorKind, LDPollingError } = internal;
18-
export type PollingErrorHandler = (err: internal.LDPollingError) => void;
17+
export type PollingErrorHandler = (err: LDPollingError) => void;
1918

2019
/**
2120
* @internal

packages/shared/sdk-server/src/data_sources/Requestor.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import {
2+
DataSourceErrorKind,
23
getPollingUri,
3-
internal,
44
LDHeaders,
5+
LDPollingError,
56
Options,
67
Requests,
78
Response,
@@ -10,11 +11,6 @@ import {
1011
import { LDFeatureRequestor } from '../api/subsystems';
1112
import Configuration from '../options/Configuration';
1213

13-
const { DataSourceErrorKind } = internal;
14-
15-
// TODO: revisit usage of internal and figure out best practice
16-
const { LDPollingError } = internal;
17-
1814
/**
1915
* @internal
2016
*/

0 commit comments

Comments
 (0)