From a9d23c264d4d5945420ef0b2d63f57e08ef9049d Mon Sep 17 00:00:00 2001 From: Peixun Zhang Date: Thu, 22 Aug 2024 14:51:49 +0200 Subject: [PATCH] rename and fix import --- .../externalIdSystem.js} | 2 +- .../liveIntentIdSystem.js => liveIntentId/idSystem.js} | 4 ++-- .../liveIntentIdSystemShared.js => liveIntentId/shared.js} | 0 modules/liveIntentIdSystem.js | 4 ++-- test/spec/modules/liveIntentExternalIdSystem_spec.js | 2 +- test/spec/modules/liveIntentIdMinimalSystem_spec.js | 2 +- test/spec/modules/liveIntentIdSystem_spec.js | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) rename libraries/{liveIntentIdSystem/liveIntentExternalIdSystem.js => liveIntentId/externalIdSystem.js} (98%) rename libraries/{liveIntentIdSystem/liveIntentIdSystem.js => liveIntentId/idSystem.js} (98%) rename libraries/{liveIntentIdSystem/liveIntentIdSystemShared.js => liveIntentId/shared.js} (100%) diff --git a/libraries/liveIntentIdSystem/liveIntentExternalIdSystem.js b/libraries/liveIntentId/externalIdSystem.js similarity index 98% rename from libraries/liveIntentIdSystem/liveIntentExternalIdSystem.js rename to libraries/liveIntentId/externalIdSystem.js index bf8f8a7b694..a12e813dc2e 100644 --- a/libraries/liveIntentIdSystem/liveIntentExternalIdSystem.js +++ b/libraries/liveIntentId/externalIdSystem.js @@ -1,7 +1,7 @@ import { logError } from '../../src/utils.js'; import { gdprDataHandler, uspDataHandler, gppDataHandler } from '../../src/adapterManager.js'; import { submodule } from '../../src/hook.js'; -import { DEFAULT_AJAX_TIMEOUT, MODULE_NAME, parseRequestedAttributes, composeIdObject, eids, GVLID } from './liveIntentIdSystemShared.js' +import { DEFAULT_AJAX_TIMEOUT, MODULE_NAME, parseRequestedAttributes, composeIdObject, eids, GVLID } from './shared.js' // reference to the client for the liQHub let cachedClientRef diff --git a/libraries/liveIntentIdSystem/liveIntentIdSystem.js b/libraries/liveIntentId/idSystem.js similarity index 98% rename from libraries/liveIntentIdSystem/liveIntentIdSystem.js rename to libraries/liveIntentId/idSystem.js index 80a3e796432..c21b6af9791 100644 --- a/libraries/liveIntentIdSystem/liveIntentIdSystem.js +++ b/libraries/liveIntentId/idSystem.js @@ -1,7 +1,7 @@ /** * This module adds LiveIntentId to the User ID module * The {@link module:modules/userId} module is required - * @module modules/liveIntentIdSystem + * @module modules/idSystem * @requires module:modules/userId */ import { triggerPixel, logError } from '../../src/utils.js'; @@ -11,7 +11,7 @@ import { submodule } from '../../src/hook.js'; import { LiveConnect } from 'live-connect-js'; // eslint-disable-line prebid/validate-imports import { getStorageManager } from '../../src/storageManager.js'; import { MODULE_TYPE_UID } from '../../src/activities/modules.js'; -import { DEFAULT_AJAX_TIMEOUT, MODULE_NAME, composeIdObject, eids, DEFAULT_DELAY, GVLID, parseRequestedAttributes } from './liveIntentIdSystemShared.js' +import { DEFAULT_AJAX_TIMEOUT, MODULE_NAME, composeIdObject, eids, DEFAULT_DELAY, GVLID, parseRequestedAttributes } from './shared.js' /** * @typedef {import('../modules/userId/index.js').Submodule} Submodule diff --git a/libraries/liveIntentIdSystem/liveIntentIdSystemShared.js b/libraries/liveIntentId/shared.js similarity index 100% rename from libraries/liveIntentIdSystem/liveIntentIdSystemShared.js rename to libraries/liveIntentId/shared.js diff --git a/modules/liveIntentIdSystem.js b/modules/liveIntentIdSystem.js index 434e4d442dc..2ccbb911478 100644 --- a/modules/liveIntentIdSystem.js +++ b/modules/liveIntentIdSystem.js @@ -4,10 +4,10 @@ function loadModule() { // eslint-disable-next-line no-constant-condition if ('$$LIVE_INTENT_MODULE_MODE$$' === 'external') { // eslint-disable-next-line no-restricted-globals - return require('../libraries/liveIntentIdSystem/liveIntentExternalIdSystem.js') + return require('../libraries/liveIntentId/externalIdSystem.js') } else { // eslint-disable-next-line no-restricted-globals - return require('../libraries/liveIntentIdSystem/liveIntentIdSystem.js') + return require('../libraries/liveIntentId/idSystem.js') } } diff --git a/test/spec/modules/liveIntentExternalIdSystem_spec.js b/test/spec/modules/liveIntentExternalIdSystem_spec.js index c5642f33ce1..1b5eeffecd2 100644 --- a/test/spec/modules/liveIntentExternalIdSystem_spec.js +++ b/test/spec/modules/liveIntentExternalIdSystem_spec.js @@ -1,4 +1,4 @@ -import { liveIntentExternalIdSubmodule, resetSubmodule } from 'libraries/liveIntentIdSystem/liveIntentExternalIdSystem.js'; +import { liveIntentExternalIdSubmodule, resetSubmodule } from 'libraries/liveIntentId/externalIdSystem.js'; import { gdprDataHandler, uspDataHandler, gppDataHandler, coppaDataHandler } from '../../../src/adapterManager.js'; import * as refererDetection from '../../../src/refererDetection.js'; const DEFAULT_AJAX_TIMEOUT = 5000 diff --git a/test/spec/modules/liveIntentIdMinimalSystem_spec.js b/test/spec/modules/liveIntentIdMinimalSystem_spec.js index e280d9108a0..1c9c19d51d7 100644 --- a/test/spec/modules/liveIntentIdMinimalSystem_spec.js +++ b/test/spec/modules/liveIntentIdMinimalSystem_spec.js @@ -1,7 +1,7 @@ import * as utils from 'src/utils.js'; import { gdprDataHandler, uspDataHandler } from '../../../src/adapterManager.js'; import { server } from 'test/mocks/xhr.js'; -import { liveIntentIdSubmodule, reset as resetLiveIntentIdSubmodule, storage } from 'modules/liveIntentIdSystem.js'; +import { liveIntentIdSubmodule, reset as resetLiveIntentIdSubmodule, storage } from '../../../libraries/liveIntentId/idSystem.js'; import * as refererDetection from '../../../src/refererDetection.js'; const PUBLISHER_ID = '89899'; diff --git a/test/spec/modules/liveIntentIdSystem_spec.js b/test/spec/modules/liveIntentIdSystem_spec.js index 6bd10713dfb..a630c73eb2b 100644 --- a/test/spec/modules/liveIntentIdSystem_spec.js +++ b/test/spec/modules/liveIntentIdSystem_spec.js @@ -1,4 +1,4 @@ -import { liveIntentIdSubmodule, reset as resetLiveIntentIdSubmodule, storage } from 'libraries/liveIntentIdSystem/liveIntentIdSystem.js'; +import { liveIntentIdSubmodule, reset as resetLiveIntentIdSubmodule, storage } from 'libraries/liveIntentId/idSystem.js'; import * as utils from 'src/utils.js'; import { gdprDataHandler, uspDataHandler, gppDataHandler, coppaDataHandler } from '../../../src/adapterManager.js'; import { server } from 'test/mocks/xhr.js';