Skip to content

[FSSDK-11090] use path alias for log message imports #987

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/core/audience_evaluator/index.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { sprintf } from '../../utils/fns';
import AudienceEvaluator, { createAudienceEvaluator } from './index';
import * as conditionTreeEvaluator from '../condition_tree_evaluator';
import * as customAttributeConditionEvaluator from '../custom_attribute_condition_evaluator';
import { AUDIENCE_EVALUATION_RESULT, EVALUATING_AUDIENCE } from '../../log_messages';
import { AUDIENCE_EVALUATION_RESULT, EVALUATING_AUDIENCE } from 'log_message';

var buildLogMessageFromArgs = args => sprintf(args[1], ...args.splice(2));
var mockLogger = {
Expand Down
4 changes: 2 additions & 2 deletions lib/core/audience_evaluator/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
import * as customAttributeConditionEvaluator from '../custom_attribute_condition_evaluator';
import * as odpSegmentsConditionEvaluator from './odp_segment_condition_evaluator';
import { Audience, Condition, OptimizelyUserContext } from '../../shared_types';
import { CONDITION_EVALUATOR_ERROR, UNKNOWN_CONDITION_TYPE } from '../../error_messages';
import { AUDIENCE_EVALUATION_RESULT, EVALUATING_AUDIENCE} from '../../log_messages';
import { CONDITION_EVALUATOR_ERROR, UNKNOWN_CONDITION_TYPE } from 'error_message';
import { AUDIENCE_EVALUATION_RESULT, EVALUATING_AUDIENCE} from 'log_message';
import { LoggerFacade } from '../../logging/logger';

export class AudienceEvaluator {
Expand All @@ -40,7 +40,7 @@
constructor(UNSTABLE_conditionEvaluators: unknown, logger?: LoggerFacade) {
this.logger = logger;
this.typeToEvaluatorMap = {
...UNSTABLE_conditionEvaluators as any,

Check warning on line 43 in lib/core/audience_evaluator/index.ts

View workflow job for this annotation

GitHub Actions / unit_tests (22)

Unexpected any. Specify a different type

Check warning on line 43 in lib/core/audience_evaluator/index.ts

View workflow job for this annotation

GitHub Actions / unit_tests (20)

Unexpected any. Specify a different type

Check warning on line 43 in lib/core/audience_evaluator/index.ts

View workflow job for this annotation

GitHub Actions / unit_tests (18)

Unexpected any. Specify a different type

Check warning on line 43 in lib/core/audience_evaluator/index.ts

View workflow job for this annotation

GitHub Actions / unit_tests (16)

Unexpected any. Specify a different type

Check warning on line 43 in lib/core/audience_evaluator/index.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
custom_attribute: customAttributeConditionEvaluator.getEvaluator(this.logger),
third_party_dimension: odpSegmentsConditionEvaluator.getEvaluator(this.logger),
};
Expand Down Expand Up @@ -104,7 +104,7 @@
}
try {
return evaluator.evaluate(condition, user);
} catch (err: any) {

Check warning on line 107 in lib/core/audience_evaluator/index.ts

View workflow job for this annotation

GitHub Actions / unit_tests (22)

Unexpected any. Specify a different type

Check warning on line 107 in lib/core/audience_evaluator/index.ts

View workflow job for this annotation

GitHub Actions / unit_tests (20)

Unexpected any. Specify a different type

Check warning on line 107 in lib/core/audience_evaluator/index.ts

View workflow job for this annotation

GitHub Actions / unit_tests (18)

Unexpected any. Specify a different type

Check warning on line 107 in lib/core/audience_evaluator/index.ts

View workflow job for this annotation

GitHub Actions / unit_tests (16)

Unexpected any. Specify a different type

Check warning on line 107 in lib/core/audience_evaluator/index.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
this.logger?.error(
CONDITION_EVALUATOR_ERROR, condition.type, err.message
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { sprintf } from '../../../utils/fns';

import { LOG_LEVEL } from '../../../utils/enums';
import * as odpSegmentEvalutor from './';
import { UNKNOWN_MATCH_TYPE } from '../../../error_messages';
import { UNKNOWN_MATCH_TYPE } from 'error_message';

var odpSegment1Condition = {
"value": "odp-segment-1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and *
* limitations under the License. *
***************************************************************************/
import { UNKNOWN_MATCH_TYPE } from '../../../error_messages';
import { UNKNOWN_MATCH_TYPE } from 'error_message';
import { LoggerFacade } from '../../../logging/logger';
import { Condition, OptimizelyUserContext } from '../../../shared_types';

Expand Down
2 changes: 1 addition & 1 deletion lib/core/bucketer/index.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import * as bucketer from './';
import { LOG_LEVEL } from '../../utils/enums';
import projectConfig from '../../project_config/project_config';
import { getTestProjectConfig } from '../../tests/test_data';
import { INVALID_BUCKETING_ID, INVALID_GROUP_ID } from '../../error_messages';
import { INVALID_BUCKETING_ID, INVALID_GROUP_ID } from 'error_message';
import {
USER_BUCKETED_INTO_EXPERIMENT_IN_GROUP,
USER_NOT_BUCKETED_INTO_EXPERIMENT_IN_GROUP,
Expand Down
2 changes: 1 addition & 1 deletion lib/core/bucketer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
Group,
} from '../../shared_types';

import { INVALID_BUCKETING_ID, INVALID_GROUP_ID } from '../../error_messages';
import { INVALID_BUCKETING_ID, INVALID_GROUP_ID } from 'error_message';
import { OptimizelyError } from '../../error/optimizly_error';

export const USER_NOT_IN_ANY_EXPERIMENT = 'User %s is not in any experiment of group %s.';
Expand Down Expand Up @@ -221,7 +221,7 @@
const hashValue = murmurhash.v3(bucketingKey, HASH_SEED);
const ratio = hashValue / MAX_HASH_VALUE;
return Math.floor(ratio * MAX_TRAFFIC_VALUE);
} catch (ex: any) {

Check warning on line 224 in lib/core/bucketer/index.ts

View workflow job for this annotation

GitHub Actions / unit_tests (22)

Unexpected any. Specify a different type

Check warning on line 224 in lib/core/bucketer/index.ts

View workflow job for this annotation

GitHub Actions / unit_tests (20)

Unexpected any. Specify a different type

Check warning on line 224 in lib/core/bucketer/index.ts

View workflow job for this annotation

GitHub Actions / unit_tests (18)

Unexpected any. Specify a different type

Check warning on line 224 in lib/core/bucketer/index.ts

View workflow job for this annotation

GitHub Actions / unit_tests (16)

Unexpected any. Specify a different type

Check warning on line 224 in lib/core/bucketer/index.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
throw new OptimizelyError(INVALID_BUCKETING_ID, bucketingKey, ex.message);
}
};
Expand Down
7 changes: 2 additions & 5 deletions lib/core/custom_attribute_condition_evaluator/index.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,17 @@ import sinon from 'sinon';
import { assert } from 'chai';
import { sprintf } from '../../utils/fns';

import {
LOG_LEVEL,
} from '../../utils/enums';
import * as customAttributeEvaluator from './';
import {
MISSING_ATTRIBUTE_VALUE,
UNEXPECTED_TYPE_NULL,
} from '../../log_messages';
} from 'log_message';
import {
UNKNOWN_MATCH_TYPE,
UNEXPECTED_TYPE,
OUT_OF_BOUNDS,
UNEXPECTED_CONDITION_VALUE,
} from '../../error_messages';
} from 'error_message';

var browserConditionSafari = {
name: 'browser_type',
Expand Down
4 changes: 2 additions & 2 deletions lib/core/custom_attribute_condition_evaluator/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
import {
MISSING_ATTRIBUTE_VALUE,
UNEXPECTED_TYPE_NULL,
} from '../../log_messages';
} from 'log_message';
import {
OUT_OF_BOUNDS,
UNEXPECTED_TYPE,
UNEXPECTED_CONDITION_VALUE,
UNKNOWN_MATCH_TYPE
} from '../../error_messages';
} from 'error_message';
import { LoggerFacade } from '../../logging/logger';

const EXACT_MATCH_TYPE = 'exact';
Expand Down Expand Up @@ -188,7 +188,7 @@
* 2) the user attribute value is neither null nor undefined
* Returns false otherwise
*/
function existsEvaluator(condition: Condition, user: OptimizelyUserContext, logger?: LoggerFacade): boolean {

Check warning on line 191 in lib/core/custom_attribute_condition_evaluator/index.ts

View workflow job for this annotation

GitHub Actions / unit_tests (22)

'logger' is defined but never used

Check warning on line 191 in lib/core/custom_attribute_condition_evaluator/index.ts

View workflow job for this annotation

GitHub Actions / unit_tests (20)

'logger' is defined but never used

Check warning on line 191 in lib/core/custom_attribute_condition_evaluator/index.ts

View workflow job for this annotation

GitHub Actions / unit_tests (18)

'logger' is defined but never used

Check warning on line 191 in lib/core/custom_attribute_condition_evaluator/index.ts

View workflow job for this annotation

GitHub Actions / unit_tests (16)

'logger' is defined but never used

Check warning on line 191 in lib/core/custom_attribute_condition_evaluator/index.ts

View workflow job for this annotation

GitHub Actions / lint

'logger' is defined but never used
const userAttributes = user.getAttributes();
const userValue = userAttributes[condition.name];
return typeof userValue !== 'undefined' && userValue !== null;
Expand Down Expand Up @@ -255,7 +255,7 @@
if (!validateValuesForNumericCondition(condition, user, logger) || conditionValue === null) {
return null;
}
return userValue! > conditionValue;

Check warning on line 258 in lib/core/custom_attribute_condition_evaluator/index.ts

View workflow job for this annotation

GitHub Actions / unit_tests (22)

Forbidden non-null assertion

Check warning on line 258 in lib/core/custom_attribute_condition_evaluator/index.ts

View workflow job for this annotation

GitHub Actions / unit_tests (20)

Forbidden non-null assertion

Check warning on line 258 in lib/core/custom_attribute_condition_evaluator/index.ts

View workflow job for this annotation

GitHub Actions / unit_tests (18)

Forbidden non-null assertion

Check warning on line 258 in lib/core/custom_attribute_condition_evaluator/index.ts

View workflow job for this annotation

GitHub Actions / unit_tests (16)

Forbidden non-null assertion

Check warning on line 258 in lib/core/custom_attribute_condition_evaluator/index.ts

View workflow job for this annotation

GitHub Actions / lint

Forbidden non-null assertion
}

/**
Expand All @@ -276,7 +276,7 @@
return null;
}

return userValue! >= conditionValue;

Check warning on line 279 in lib/core/custom_attribute_condition_evaluator/index.ts

View workflow job for this annotation

GitHub Actions / unit_tests (22)

Forbidden non-null assertion

Check warning on line 279 in lib/core/custom_attribute_condition_evaluator/index.ts

View workflow job for this annotation

GitHub Actions / unit_tests (20)

Forbidden non-null assertion

Check warning on line 279 in lib/core/custom_attribute_condition_evaluator/index.ts

View workflow job for this annotation

GitHub Actions / unit_tests (18)

Forbidden non-null assertion

Check warning on line 279 in lib/core/custom_attribute_condition_evaluator/index.ts

View workflow job for this annotation

GitHub Actions / unit_tests (16)

Forbidden non-null assertion

Check warning on line 279 in lib/core/custom_attribute_condition_evaluator/index.ts

View workflow job for this annotation

GitHub Actions / lint

Forbidden non-null assertion
}

/**
Expand All @@ -297,7 +297,7 @@
return null;
}

return userValue! < conditionValue;

Check warning on line 300 in lib/core/custom_attribute_condition_evaluator/index.ts

View workflow job for this annotation

GitHub Actions / unit_tests (22)

Forbidden non-null assertion

Check warning on line 300 in lib/core/custom_attribute_condition_evaluator/index.ts

View workflow job for this annotation

GitHub Actions / unit_tests (20)

Forbidden non-null assertion

Check warning on line 300 in lib/core/custom_attribute_condition_evaluator/index.ts

View workflow job for this annotation

GitHub Actions / unit_tests (18)

Forbidden non-null assertion

Check warning on line 300 in lib/core/custom_attribute_condition_evaluator/index.ts

View workflow job for this annotation

GitHub Actions / unit_tests (16)

Forbidden non-null assertion

Check warning on line 300 in lib/core/custom_attribute_condition_evaluator/index.ts

View workflow job for this annotation

GitHub Actions / lint

Forbidden non-null assertion
}

/**
Expand All @@ -318,7 +318,7 @@
return null;
}

return userValue! <= conditionValue;

Check warning on line 321 in lib/core/custom_attribute_condition_evaluator/index.ts

View workflow job for this annotation

GitHub Actions / unit_tests (22)

Forbidden non-null assertion

Check warning on line 321 in lib/core/custom_attribute_condition_evaluator/index.ts

View workflow job for this annotation

GitHub Actions / unit_tests (20)

Forbidden non-null assertion

Check warning on line 321 in lib/core/custom_attribute_condition_evaluator/index.ts

View workflow job for this annotation

GitHub Actions / unit_tests (18)

Forbidden non-null assertion

Check warning on line 321 in lib/core/custom_attribute_condition_evaluator/index.ts

View workflow job for this annotation

GitHub Actions / unit_tests (16)

Forbidden non-null assertion

Check warning on line 321 in lib/core/custom_attribute_condition_evaluator/index.ts

View workflow job for this annotation

GitHub Actions / lint

Forbidden non-null assertion
}

/**
Expand Down
4 changes: 2 additions & 2 deletions lib/core/decision_service/index.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ import {
VALID_BUCKETING_ID,
SAVED_USER_VARIATION,
SAVED_VARIATION_NOT_FOUND,
} from '../../log_messages';
} from 'log_message';

import {
EXPERIMENT_NOT_RUNNING,
Expand All @@ -64,7 +64,7 @@ import {
USER_MEETS_CONDITIONS_FOR_TARGETING_RULE,
} from '../decision_service/index';

import { BUCKETING_ID_NOT_STRING, USER_PROFILE_LOOKUP_ERROR, USER_PROFILE_SAVE_ERROR } from '../../error_messages';
import { BUCKETING_ID_NOT_STRING, USER_PROFILE_LOOKUP_ERROR, USER_PROFILE_SAVE_ERROR } from 'error_message';

var testData = getTestProjectConfig();
var testDataWithFeatures = getTestProjectConfigWithFeatures();
Expand Down
4 changes: 2 additions & 2 deletions lib/core/decision_service/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
USER_PROFILE_LOOKUP_ERROR,
USER_PROFILE_SAVE_ERROR,
BUCKETING_ID_NOT_STRING,
} from '../../error_messages';
} from 'error_message';

import {
SAVED_USER_VARIATION,
Expand All @@ -70,7 +70,7 @@
USER_HAS_NO_FORCED_VARIATION_FOR_EXPERIMENT,
VALID_BUCKETING_ID,
VARIATION_REMOVED_FOR_USER,
} from '../../log_messages';
} from 'log_message';
import { OptimizelyError } from '../../error/optimizly_error';

export const EXPERIMENT_NOT_RUNNING = 'Experiment %s is not running.';
Expand Down Expand Up @@ -342,7 +342,7 @@

const userProfile = this.getUserProfile(userId) || {} as UserProfile;
const attributeExperimentBucketMap = attributes[CONTROL_ATTRIBUTES.STICKY_BUCKETING_KEY];
return { ...userProfile.experiment_bucket_map, ...attributeExperimentBucketMap as any };

Check warning on line 345 in lib/core/decision_service/index.ts

View workflow job for this annotation

GitHub Actions / unit_tests (22)

Unexpected any. Specify a different type

Check warning on line 345 in lib/core/decision_service/index.ts

View workflow job for this annotation

GitHub Actions / unit_tests (20)

Unexpected any. Specify a different type

Check warning on line 345 in lib/core/decision_service/index.ts

View workflow job for this annotation

GitHub Actions / unit_tests (18)

Unexpected any. Specify a different type

Check warning on line 345 in lib/core/decision_service/index.ts

View workflow job for this annotation

GitHub Actions / unit_tests (16)

Unexpected any. Specify a different type

Check warning on line 345 in lib/core/decision_service/index.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
}

/**
Expand Down Expand Up @@ -538,7 +538,7 @@

try {
return this.userProfileService.lookup(userId);
} catch (ex: any) {

Check warning on line 541 in lib/core/decision_service/index.ts

View workflow job for this annotation

GitHub Actions / unit_tests (22)

Unexpected any. Specify a different type

Check warning on line 541 in lib/core/decision_service/index.ts

View workflow job for this annotation

GitHub Actions / unit_tests (20)

Unexpected any. Specify a different type

Check warning on line 541 in lib/core/decision_service/index.ts

View workflow job for this annotation

GitHub Actions / unit_tests (18)

Unexpected any. Specify a different type

Check warning on line 541 in lib/core/decision_service/index.ts

View workflow job for this annotation

GitHub Actions / unit_tests (16)

Unexpected any. Specify a different type

Check warning on line 541 in lib/core/decision_service/index.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
this.logger?.error(
USER_PROFILE_LOOKUP_ERROR,
userId,
Expand Down
2 changes: 1 addition & 1 deletion lib/event_processor/batch_event_processor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { isSuccessStatusCode } from "../utils/http_request_handler/http_util";
import { EventEmitter } from "../utils/event_emitter/event_emitter";
import { IdGenerator } from "../utils/id_generator";
import { areEventContextsEqual } from "./event_builder/user_event";
import { EVENT_PROCESSOR_STOPPED, FAILED_TO_DISPATCH_EVENTS, FAILED_TO_DISPATCH_EVENTS_WITH_ARG } from "../error_messages";
import { EVENT_PROCESSOR_STOPPED, FAILED_TO_DISPATCH_EVENTS, FAILED_TO_DISPATCH_EVENTS_WITH_ARG } from "error_message";
import { OptimizelyError } from "../error/optimizly_error";

export const DEFAULT_MIN_BACKOFF = 1000;
Expand Down
2 changes: 1 addition & 1 deletion lib/event_processor/event_dispatcher/default_dispatcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/
import { OptimizelyError } from '../../error/optimizly_error';
import { ONLY_POST_REQUESTS_ARE_SUPPORTED } from '../../error_messages';
import { ONLY_POST_REQUESTS_ARE_SUPPORTED } from 'error_message';
import { RequestHandler } from '../../utils/http_request_handler/http';
import { EventDispatcher, EventDispatcherResponse, LogEvent } from './event_dispatcher';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

import { OptimizelyError } from '../../error/optimizly_error';
import { SEND_BEACON_FAILED } from '../../error_messages';
import { SEND_BEACON_FAILED } from 'error_message';
import { EventDispatcher, EventDispatcherResponse } from './event_dispatcher';

export type Event = {
Expand Down
2 changes: 1 addition & 1 deletion lib/event_processor/forwarding_event_processor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { buildLogEvent } from './event_builder/log_event';
import { BaseService, ServiceState } from '../service';
import { EventEmitter } from '../utils/event_emitter/event_emitter';
import { Consumer, Fn } from '../utils/type';
import { SERVICE_STOPPED_BEFORE_IT_WAS_STARTED } from '../error_messages';
import { SERVICE_STOPPED_BEFORE_IT_WAS_STARTED } from 'error_message';
import { OptimizelyError } from '../error/optimizly_error';
class ForwardingEventProcessor extends BaseService implements EventProcessor {
private dispatcher: EventDispatcher;
Expand Down
2 changes: 1 addition & 1 deletion lib/index.browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import { createPollingProjectConfigManager } from './project_config/config_manag
import { createBatchEventProcessor, createForwardingEventProcessor } from './event_processor/event_processor_factory.browser';
import { createVuidManager } from './vuid/vuid_manager_factory.browser';
import { createOdpManager } from './odp/odp_manager_factory.browser';
import { ODP_DISABLED, UNABLE_TO_ATTACH_UNLOAD } from './log_messages';
import { UNABLE_TO_ATTACH_UNLOAD } from 'error_message';
import { extractLogger, createLogger } from './logging/logger_factory';
import { extractErrorNotifier, createErrorNotifier } from './error/error_notifier_factory';
import { LoggerFacade } from './logging/logger';
Expand Down
2 changes: 0 additions & 2 deletions lib/index.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ import { createPollingProjectConfigManager } from './project_config/config_manag
import { createForwardingEventProcessor, createBatchEventProcessor } from './event_processor/event_processor_factory.node';
import { createVuidManager } from './vuid/vuid_manager_factory.node';
import { createOdpManager } from './odp/odp_manager_factory.node';
import { ODP_DISABLED } from './log_messages';
import { create } from 'domain';
import { extractLogger, createLogger } from './logging/logger_factory';
import { extractErrorNotifier, createErrorNotifier } from './error/error_notifier_factory';
import { Maybe } from './utils/type';
Expand Down
2 changes: 1 addition & 1 deletion lib/error_messages.ts → lib/message/error_message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,6 @@ export const ODP_MANAGER_STOPPED_BEFORE_RUNNING = 'odp manager stopped before ru
export const ODP_EVENT_MANAGER_STOPPED = "ODP event manager stopped before it could start";
export const ONREADY_TIMEOUT_EXPIRED = 'onReady timeout expired after %s ms';
export const DATAFILE_MANAGER_FAILED_TO_START = 'Datafile manager failed to start';

export const UNABLE_TO_ATTACH_UNLOAD = 'unable to bind optimizely.close() to page unload event: "%s"';

export const messages: string[] = [];
1 change: 0 additions & 1 deletion lib/log_messages.ts → lib/message/log_message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ export const MISSING_ATTRIBUTE_VALUE =
export const UNEXPECTED_TYPE_NULL =
'Audience condition %s evaluated to UNKNOWN because a null value was passed for user attribute "%s".';
export const UPDATED_OPTIMIZELY_CONFIG = 'Updated Optimizely config to revision %s (project id %s)';
export const UNABLE_TO_ATTACH_UNLOAD = 'unable to bind optimizely.close() to page unload event: "%s"';
export const UNABLE_TO_PARSE_AND_SKIPPED_HEADER = 'Unable to parse & skipped header item';
export const ADDING_AUTHORIZATION_HEADER_WITH_BEARER_TOKEN = 'Adding Authorization header with Bearer Token';
export const MAKING_DATAFILE_REQ_TO_URL_WITH_HEADERS = 'Making datafile request to url %s with headers: %s';
Expand Down
4 changes: 2 additions & 2 deletions lib/message/message_resolver.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { messages as infoMessages } from '../log_messages';
import { messages as errorMessages } from '../error_messages';
import { messages as infoMessages } from 'log_message';
import { messages as errorMessages } from 'error_message';

export interface MessageResolver {
resolve(baseMessage: string): string;
Expand Down
2 changes: 1 addition & 1 deletion lib/notification_center/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { NOTIFICATION_TYPES } from './type';
import { NotificationType, NotificationPayload } from './type';
import { Consumer, Fn } from '../utils/type';
import { EventEmitter } from '../utils/event_emitter/event_emitter';
import { NOTIFICATION_LISTENER_EXCEPTION } from '../error_messages';
import { NOTIFICATION_LISTENER_EXCEPTION } from 'error_message';
import { ErrorReporter } from '../error/error_reporter';
import { ErrorNotifier } from '../error/error_notifier';

Expand Down
2 changes: 1 addition & 1 deletion lib/odp/event_manager/odp_event_manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import {
ODP_NOT_INTEGRATED,
FAILED_TO_DISPATCH_EVENTS_WITH_ARG,
ODP_EVENT_MANAGER_STOPPED
} from '../../error_messages';
} from 'error_message';
import { OptimizelyError } from '../../error/optimizly_error';

export interface OdpEventManager extends Service {
Expand Down
2 changes: 1 addition & 1 deletion lib/odp/odp_manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import { CLIENT_VERSION, JAVASCRIPT_CLIENT_ENGINE } from '../utils/enums';
import { ODP_DEFAULT_EVENT_TYPE, ODP_EVENT_ACTION, ODP_USER_KEY } from './constant';
import { isVuid } from '../vuid/vuid';
import { Maybe } from '../utils/type';
import { ODP_MANAGER_STOPPED_BEFORE_RUNNING } from '../error_messages';
import { ODP_MANAGER_STOPPED_BEFORE_RUNNING } from 'error_message';
import { OptimizelyError } from '../error/optimizly_error';

export interface OdpManager extends Service {
Expand Down
2 changes: 1 addition & 1 deletion lib/odp/segment_manager/odp_segment_manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { OdpIntegrationConfig } from '../odp_config';
import { OptimizelySegmentOption } from './optimizely_segment_option';
import { ODP_USER_KEY } from '../constant';
import { LoggerFacade } from '../../logging/logger';
import { ODP_CONFIG_NOT_AVAILABLE, ODP_NOT_INTEGRATED } from '../../error_messages';
import { ODP_CONFIG_NOT_AVAILABLE, ODP_NOT_INTEGRATED } from 'error_message';

export interface OdpSegmentManager {
fetchQualifiedSegments(
Expand Down
4 changes: 2 additions & 2 deletions lib/optimizely/index.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ import {
USER_RECEIVED_DEFAULT_VARIABLE_VALUE,
VALID_USER_PROFILE_SERVICE,
VARIATION_REMOVED_FOR_USER,
} from '../log_messages';
} from 'log_message';
import {
EXPERIMENT_KEY_NOT_IN_DATAFILE,
INVALID_ATTRIBUTES,
Expand All @@ -59,7 +59,7 @@ import {
USER_NOT_IN_FORCED_VARIATION,
INSTANCE_CLOSED,
ONREADY_TIMEOUT_EXPIRED,
} from '../error_messages';
} from 'error_message';

import {
AUDIENCE_EVALUATION_RESULT_COMBINED,
Expand Down
4 changes: 2 additions & 2 deletions lib/optimizely/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ import {
VARIABLE_REQUESTED_WITH_WRONG_TYPE,
ONREADY_TIMEOUT,
INSTANCE_CLOSED
} from '../error_messages';
} from 'error_message';

import {
FEATURE_ENABLED_FOR_USER,
Expand All @@ -96,7 +96,7 @@ import {
USER_RECEIVED_VARIABLE_VALUE,
VALID_USER_PROFILE_SERVICE,
VARIABLE_NOT_USED_RETURN_DEFAULT_VARIABLE_VALUE,
} from '../log_messages';
} from 'log_message';

import { ErrorNotifier } from '../error/error_notifier';
import { ErrorReporter } from '../error/error_reporter';
Expand Down
2 changes: 1 addition & 1 deletion lib/optimizely_user_context/index.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import {
USER_HAS_FORCED_DECISION_WITH_NO_RULE_SPECIFIED_BUT_INVALID,
USER_HAS_FORCED_DECISION_WITH_RULE_SPECIFIED,
USER_HAS_FORCED_DECISION_WITH_RULE_SPECIFIED_BUT_INVALID,
} from '../log_messages';
} from 'log_message';

const getMockEventDispatcher = () => {
const dispatcher = {
Expand Down
4 changes: 2 additions & 2 deletions lib/project_config/polling_datafile_manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ import {
DATAFILE_FETCH_REQUEST_FAILED,
ERROR_FETCHING_DATAFILE,
FAILED_TO_FETCH_DATAFILE,
} from '../error_messages';
} from 'error_message';
import {
ADDING_AUTHORIZATION_HEADER_WITH_BEARER_TOKEN,
MAKING_DATAFILE_REQ_TO_URL_WITH_HEADERS,
RESPONSE_STATUS_CODE,
SAVED_LAST_MODIFIED_HEADER_VALUE_FROM_RESPONSE,
} from '../log_messages';
} from 'log_message';
import { OptimizelyError } from '../error/optimizly_error';

export class PollingDatafileManager extends BaseService implements DatafileManager {
Expand Down
2 changes: 1 addition & 1 deletion lib/project_config/project_config.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import {
VARIABLE_KEY_NOT_IN_DATAFILE,
FEATURE_NOT_IN_DATAFILE,
UNABLE_TO_CAST_VALUE
} from '../error_messages';
} from 'error_message';

var createLogger = () => ({
debug: () => {},
Expand Down
4 changes: 2 additions & 2 deletions lib/project_config/project_config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ import {
UNRECOGNIZED_ATTRIBUTE,
VARIABLE_KEY_NOT_IN_DATAFILE,
VARIATION_ID_NOT_IN_DATAFILE_NO_EXPERIMENT,
} from '../error_messages';
import { SKIPPING_JSON_VALIDATION, VALID_DATAFILE } from '../log_messages';
} from 'error_message';
import { SKIPPING_JSON_VALIDATION, VALID_DATAFILE } from 'log_message';
import { OptimizelyError } from '../error/optimizly_error';

interface TryCreatingProjectConfigConfig {
Expand Down
2 changes: 1 addition & 1 deletion lib/project_config/project_config_manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { scheduleMicrotask } from '../utils/microtask';
import { Service, ServiceState, BaseService } from '../service';
import { Consumer, Fn, Transformer } from '../utils/type';
import { EventEmitter } from '../utils/event_emitter/event_emitter';
import { DATAFILE_MANAGER_STOPPED, NO_SDKKEY_OR_DATAFILE, DATAFILE_MANAGER_FAILED_TO_START } from '../error_messages';
import { DATAFILE_MANAGER_STOPPED, NO_SDKKEY_OR_DATAFILE, DATAFILE_MANAGER_FAILED_TO_START } from 'error_message';
import { OptimizelyError } from '../error/optimizly_error';

interface ProjectConfigManagerConfig {
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/attributes_validator/index.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { assert } from 'chai';
import { sprintf } from '../../utils/fns';

import * as attributesValidator from './';
import { INVALID_ATTRIBUTES, UNDEFINED_ATTRIBUTE } from '../../error_messages';
import { INVALID_ATTRIBUTES, UNDEFINED_ATTRIBUTE } from 'error_message';

describe('lib/utils/attributes_validator', function() {
describe('APIs', function() {
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/attributes_validator/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import { ObjectWithUnknownProperties } from '../../shared_types';

import fns from '../../utils/fns';
import { INVALID_ATTRIBUTES, UNDEFINED_ATTRIBUTE } from '../../error_messages';
import { INVALID_ATTRIBUTES, UNDEFINED_ATTRIBUTE } from 'error_message';
import { OptimizelyError } from '../../error/optimizly_error';

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/config_validator/index.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {
INVALID_EVENT_DISPATCHER,
INVALID_LOGGER,
NO_DATAFILE_SPECIFIED,
} from '../../error_messages';
} from 'error_message';

describe('lib/utils/config_validator', function() {
describe('APIs', function() {
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/config_validator/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {
INVALID_EVENT_DISPATCHER,
INVALID_LOGGER,
NO_DATAFILE_SPECIFIED,
} from '../../error_messages';
} from 'error_message';
import { OptimizelyError } from '../../error/optimizly_error';

const SUPPORTED_VERSIONS = [DATAFILE_VERSIONS.V2, DATAFILE_VERSIONS.V3, DATAFILE_VERSIONS.V4];
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/event_tag_utils/index.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { assert } from 'chai';
import { sprintf } from '../../utils/fns';

import * as eventTagUtils from './';
import { FAILED_TO_PARSE_REVENUE, PARSED_REVENUE_VALUE, PARSED_NUMERIC_VALUE, FAILED_TO_PARSE_VALUE } from '../../log_messages';
import { FAILED_TO_PARSE_REVENUE, PARSED_REVENUE_VALUE, PARSED_NUMERIC_VALUE, FAILED_TO_PARSE_VALUE } from 'log_message';

var buildLogMessageFromArgs = args => sprintf(args[1], ...args.splice(2));

Expand Down
2 changes: 1 addition & 1 deletion lib/utils/event_tag_utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
FAILED_TO_PARSE_VALUE,
PARSED_NUMERIC_VALUE,
PARSED_REVENUE_VALUE,
} from '../../log_messages';
} from 'log_message';
import { EventTags } from '../../event_processor/event_builder/user_event';
import { LoggerFacade } from '../../logging/logger';

Expand Down
Loading
Loading