Skip to content

Commit

Permalink
Fix build.
Browse files Browse the repository at this point in the history
  • Loading branch information
kinyoklion committed Sep 30, 2024
1 parent 47b6b70 commit ddeb130
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 21 deletions.
8 changes: 7 additions & 1 deletion packages/shared/common/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import AttributeReference from './AttributeReference';
import Context from './Context';
import ContextFilter from './ContextFilter';
import { DataSourceErrorKind, LDPollingError, LDStreamingError } from './datasource';
import {
DataSourceErrorKind,
LDFileDataSourceError,
LDPollingError,
LDStreamingError,
} from './datasource';

export * from './api';
export * from './validators';
Expand All @@ -19,4 +24,5 @@ export {
DataSourceErrorKind,
LDPollingError,
LDStreamingError,
LDFileDataSourceError,
};
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { DataSourceErrorKind } from '@launchdarkly/js-sdk-common';

import LDEmitter from '../LDEmitter';
import DataSourceStatus, { DataSourceState } from './DataSourceStatus';
import DataSourceStatusErrorInfo from './DataSourceStatusErrorInfo';
Expand Down
7 changes: 3 additions & 4 deletions packages/shared/sdk-client/src/polling/PollingProcessor.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import {
DataSourceErrorKind,
Encoding,
getPollingUri,
httpErrorMessage,
HttpErrorResponse,
internal,
isHttpRecoverable,
LDLogger,
LDPollingError,
Requests,
subsystem,
} from '@launchdarkly/js-sdk-common';
Expand All @@ -14,9 +15,7 @@ import { PollingDataSourceConfig } from '../streaming/DataSourceConfig';
import { Flags } from '../types';
import Requestor, { LDRequestError } from './Requestor';

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

/**
* @internal
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {
DataSourceErrorKind,
Encoding,
EventName,
EventSource,
Expand All @@ -7,6 +8,7 @@ import {
HttpErrorResponse,
internal,
LDLogger,
LDStreamingError,
ProcessStreamResponse,
Requests,
shouldRetry,
Expand All @@ -15,9 +17,6 @@ import {

import { StreamingDataSourceConfig } from './DataSourceConfig';

// TODO: revisit usage of internal and figure out best practice
const { DataSourceErrorKind, LDStreamingError } = internal;

const reportJsonError = (
type: string,
data: string,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {
Filesystem,
internal,
LDFileDataSourceError,
LDLogger,
subsystem,
VoidFunction,
Expand All @@ -14,8 +14,6 @@ import { processFlag, processSegment } from '../store/serialization';
import VersionedDataKinds from '../store/VersionedDataKinds';
import FileLoader from './FileLoader';

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

function makeFlagWithValue(key: string, value: any, version: number): Flag {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import {
DataSourceErrorKind,
httpErrorMessage,
internal,
isHttpRecoverable,
LDLogger,
LDPollingError,
subsystem,
VoidFunction,
} from '@launchdarkly/js-sdk-common';
Expand All @@ -13,9 +14,7 @@ import { deserializePoll } from '../store';
import VersionedDataKinds from '../store/VersionedDataKinds';
import Requestor from './Requestor';

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

/**
* @internal
Expand Down
8 changes: 2 additions & 6 deletions packages/shared/sdk-server/src/data_sources/Requestor.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import {
DataSourceErrorKind,
getPollingUri,
internal,
LDHeaders,
LDPollingError,
Options,
Requests,
Response,
Expand All @@ -10,11 +11,6 @@ import {
import { LDFeatureRequestor } from '../api/subsystems';
import Configuration from '../options/Configuration';

const { DataSourceErrorKind } = internal;

// TODO: revisit usage of internal and figure out best practice
const { LDPollingError } = internal;

/**
* @internal
*/
Expand Down

0 comments on commit ddeb130

Please sign in to comment.