@adobe/alloy 2.30.1-beta.9 → 2.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/libEs5/components/Advertising/createComponent.js +7 -3
- package/libEs5/components/Advertising/handlers/onBeforeSendEventHandler.js +8 -2
- package/libEs5/components/Advertising/handlers/sendAdConversion.js +11 -6
- package/libEs5/components/Advertising/handlers/viewThroughHandler.js +8 -2
- package/libEs5/components/Advertising/identities/collectSurferId.js +8 -1
- package/libEs5/components/Advertising/index.js +2 -1
- package/libEs5/components/BrandConcierge/configValidators.js +25 -0
- package/libEs5/components/BrandConcierge/constants.js +16 -0
- package/libEs5/components/BrandConcierge/createBuildEndpointUrl.js +33 -0
- package/libEs5/components/BrandConcierge/createConversationServiceRequest.js +35 -0
- package/libEs5/components/BrandConcierge/createSendConversationEvent.js +148 -0
- package/libEs5/components/BrandConcierge/createSendConversationServiceRequest.js +85 -0
- package/libEs5/components/BrandConcierge/createStreamParser.js +131 -0
- package/libEs5/components/BrandConcierge/createTimeoutWrapper.js +79 -0
- package/libEs5/components/BrandConcierge/index.js +102 -0
- package/libEs5/components/BrandConcierge/utils.js +33 -0
- package/libEs5/components/BrandConcierge/validateMessage.js +44 -0
- package/libEs5/components/Consent/types.js +12 -0
- package/libEs5/components/Context/createComponent.js +1 -2
- package/libEs5/components/Context/implementationDetails.js +7 -9
- package/libEs5/components/Context/index.js +4 -1
- package/libEs5/components/Context/injectDevice.js +2 -2
- package/libEs5/components/Context/injectEnvironment.js +2 -2
- package/libEs5/components/Context/injectHighEntropyUserAgentHints.js +2 -2
- package/libEs5/components/Context/injectOneTimeAnalyticsReferrer.js +52 -0
- package/libEs5/components/Context/injectPlaceContext.js +2 -2
- package/libEs5/components/Context/injectTimestamp.js +2 -3
- package/libEs5/components/Context/injectWeb.js +9 -11
- package/libEs5/components/EventMerge/createEventMergeId.js +1 -1
- package/libEs5/components/Personalization/createComponent.js +3 -1
- package/libEs5/components/Personalization/createFetchDataHandler.js +10 -4
- package/libEs5/components/Personalization/createNotificationHandler.js +5 -3
- package/libEs5/components/Personalization/createOnDecisionHandler.js +4 -3
- package/libEs5/components/Personalization/createPersonalizationDetails.js +1 -1
- package/libEs5/components/Personalization/dom-actions/initDomActionsModules.js +1 -1
- package/libEs5/components/Personalization/dom-actions/remapHeadOffers.js +5 -0
- package/libEs5/components/Personalization/handlers/createProcessInAppMessage.js +2 -1
- package/libEs5/components/Personalization/handlers/createProcessRedirect.js +2 -1
- package/libEs5/components/Personalization/handlers/injectCreateProposition.js +4 -1
- package/libEs5/components/Personalization/in-app-message-actions/actions/displayIframeContent.js +4 -2
- package/libEs5/components/Personalization/index.js +2 -2
- package/libEs5/components/PushNotifications/types.js +12 -0
- package/libEs5/components/RulesEngine/createApplyResponse.js +3 -1
- package/libEs5/components/RulesEngine/types.js +12 -0
- package/libEs5/components/StreamingMedia/createMediaEventManager.js +1 -1
- package/libEs5/constants/libraryVersion.js +1 -1
- package/libEs5/constants/surface.js +19 -0
- package/libEs5/core/componentCreators.js +8 -1
- package/libEs5/core/consent/types.js +12 -0
- package/libEs5/core/createEvent.js +7 -0
- package/libEs5/core/edgeNetwork/injectSendEdgeNetworkRequest.js +23 -0
- package/libEs5/core/edgeNetwork/types.js +12 -0
- package/libEs5/core/identity/types.js +12 -0
- package/libEs5/core/index.js +5 -1
- package/libEs5/core/types.js +12 -0
- package/libEs5/utils/clamp.js +25 -0
- package/libEs5/utils/createCollect.js +4 -2
- package/libEs5/utils/deepAssign.js +5 -0
- package/libEs5/utils/dom/createGetPageLocation.js +20 -0
- package/libEs5/utils/filterObject.js +1 -1
- package/libEs5/utils/index.js +8 -1
- package/libEs5/utils/prepareConfigOverridesForEdge.js +4 -2
- package/libEs5/utils/request/createDataCollectionRequestPayload.js +3 -0
- package/libEs5/utils/request/createRequest.js +5 -1
- package/libEs5/utils/request/createRequestParams.js +1 -0
- package/libEs5/utils/request/createRequestPayload.js +11 -1
- package/libEs5/utils/request/types.js +13 -0
- package/libEs5/utils/surfaceUtils.js +82 -0
- package/libEs5/utils/types.js +12 -0
- package/libEs6/components/Advertising/createComponent.js +7 -3
- package/libEs6/components/Advertising/handlers/onBeforeSendEventHandler.js +8 -2
- package/libEs6/components/Advertising/handlers/sendAdConversion.js +11 -6
- package/libEs6/components/Advertising/handlers/viewThroughHandler.js +8 -2
- package/libEs6/components/Advertising/identities/collectSurferId.js +8 -1
- package/libEs6/components/Advertising/index.js +2 -1
- package/libEs6/components/BrandConcierge/configValidators.js +22 -0
- package/libEs6/components/BrandConcierge/constants.js +13 -0
- package/libEs6/components/BrandConcierge/createBuildEndpointUrl.js +30 -0
- package/libEs6/components/BrandConcierge/createConversationServiceRequest.js +31 -0
- package/libEs6/components/BrandConcierge/createSendConversationEvent.js +144 -0
- package/libEs6/components/BrandConcierge/createSendConversationServiceRequest.js +81 -0
- package/libEs6/components/BrandConcierge/createStreamParser.js +127 -0
- package/libEs6/components/BrandConcierge/createTimeoutWrapper.js +76 -0
- package/libEs6/components/BrandConcierge/index.js +98 -0
- package/libEs6/components/BrandConcierge/utils.js +27 -0
- package/libEs6/components/BrandConcierge/validateMessage.js +40 -0
- package/libEs6/components/Consent/types.js +12 -0
- package/libEs6/components/Context/createComponent.js +1 -2
- package/libEs6/components/Context/implementationDetails.js +7 -9
- package/libEs6/components/Context/index.js +4 -1
- package/libEs6/components/Context/injectDevice.js +3 -3
- package/libEs6/components/Context/injectEnvironment.js +3 -3
- package/libEs6/components/Context/injectHighEntropyUserAgentHints.js +3 -3
- package/libEs6/components/Context/injectOneTimeAnalyticsReferrer.js +48 -0
- package/libEs6/components/Context/injectPlaceContext.js +3 -3
- package/libEs6/components/Context/injectTimestamp.js +2 -3
- package/libEs6/components/Context/injectWeb.js +9 -11
- package/libEs6/components/EventMerge/createEventMergeId.js +1 -1
- package/libEs6/components/Personalization/createComponent.js +3 -1
- package/libEs6/components/Personalization/createFetchDataHandler.js +10 -4
- package/libEs6/components/Personalization/createNotificationHandler.js +5 -3
- package/libEs6/components/Personalization/createOnDecisionHandler.js +4 -3
- package/libEs6/components/Personalization/createPersonalizationDetails.js +1 -1
- package/libEs6/components/Personalization/dom-actions/initDomActionsModules.js +1 -1
- package/libEs6/components/Personalization/dom-actions/remapHeadOffers.js +6 -1
- package/libEs6/components/Personalization/handlers/createProcessInAppMessage.js +2 -1
- package/libEs6/components/Personalization/handlers/createProcessRedirect.js +2 -1
- package/libEs6/components/Personalization/handlers/injectCreateProposition.js +4 -1
- package/libEs6/components/Personalization/in-app-message-actions/actions/displayIframeContent.js +4 -2
- package/libEs6/components/Personalization/index.js +2 -2
- package/libEs6/components/PushNotifications/types.js +12 -0
- package/libEs6/components/RulesEngine/createApplyResponse.js +3 -1
- package/libEs6/components/RulesEngine/types.js +12 -0
- package/libEs6/components/StreamingMedia/createMediaEventManager.js +1 -1
- package/libEs6/constants/libraryVersion.js +1 -1
- package/libEs6/constants/surface.js +16 -0
- package/libEs6/core/componentCreators.js +2 -1
- package/libEs6/core/consent/types.js +12 -0
- package/libEs6/core/createEvent.js +7 -0
- package/libEs6/core/edgeNetwork/injectSendEdgeNetworkRequest.js +23 -0
- package/libEs6/core/edgeNetwork/types.js +12 -0
- package/libEs6/core/identity/types.js +12 -0
- package/libEs6/core/index.js +5 -1
- package/libEs6/core/types.js +12 -0
- package/libEs6/utils/clamp.js +22 -0
- package/libEs6/utils/createCollect.js +4 -2
- package/libEs6/utils/deepAssign.js +6 -0
- package/libEs6/utils/dom/createGetPageLocation.js +17 -0
- package/libEs6/utils/filterObject.js +1 -1
- package/libEs6/utils/index.js +2 -1
- package/libEs6/utils/prepareConfigOverridesForEdge.js +4 -2
- package/libEs6/utils/request/createDataCollectionRequestPayload.js +3 -0
- package/libEs6/utils/request/createRequest.js +5 -1
- package/libEs6/utils/request/createRequestParams.js +1 -0
- package/libEs6/utils/request/createRequestPayload.js +11 -1
- package/libEs6/utils/request/types.js +13 -0
- package/libEs6/utils/surfaceUtils.js +76 -0
- package/libEs6/utils/types.js +12 -0
- package/package.json +32 -36
- package/scripts/helpers/path.js +12 -0
- package/scripts/helpers/versionBabelPlugin.js +12 -0
- package/types/components/Advertising/createComponent.d.ts +3 -2
- package/types/components/Advertising/createComponent.d.ts.map +1 -1
- package/types/components/Advertising/handlers/onBeforeSendEventHandler.d.ts.map +1 -1
- package/types/components/Advertising/handlers/sendAdConversion.d.ts +2 -1
- package/types/components/Advertising/handlers/sendAdConversion.d.ts.map +1 -1
- package/types/components/Advertising/handlers/viewThroughHandler.d.ts.map +1 -1
- package/types/components/Advertising/identities/collectSurferId.d.ts.map +1 -1
- package/types/components/Advertising/index.d.ts +1 -1
- package/types/components/Advertising/index.d.ts.map +1 -1
- package/types/components/BrandConcierge/configValidators.d.ts +3 -0
- package/types/components/BrandConcierge/configValidators.d.ts.map +1 -0
- package/types/components/BrandConcierge/constants.d.ts +3 -0
- package/types/components/BrandConcierge/constants.d.ts.map +1 -0
- package/types/components/BrandConcierge/createBuildEndpointUrl.d.ts +9 -0
- package/types/components/BrandConcierge/createBuildEndpointUrl.d.ts.map +1 -0
- package/types/components/BrandConcierge/createConversationServiceRequest.d.ts +7 -0
- package/types/components/BrandConcierge/createConversationServiceRequest.d.ts.map +1 -0
- package/types/components/BrandConcierge/createSendConversationEvent.d.ts +15 -0
- package/types/components/BrandConcierge/createSendConversationEvent.d.ts.map +1 -0
- package/types/components/BrandConcierge/createSendConversationServiceRequest.d.ts +11 -0
- package/types/components/BrandConcierge/createSendConversationServiceRequest.d.ts.map +1 -0
- package/types/components/BrandConcierge/createStreamParser.d.ts +7 -0
- package/types/components/BrandConcierge/createStreamParser.d.ts.map +1 -0
- package/types/components/BrandConcierge/createTimeoutWrapper.d.ts +6 -0
- package/types/components/BrandConcierge/createTimeoutWrapper.d.ts.map +1 -0
- package/types/components/BrandConcierge/index.d.ts +32 -0
- package/types/components/BrandConcierge/index.d.ts.map +1 -0
- package/types/components/BrandConcierge/utils.d.ts +6 -0
- package/types/components/BrandConcierge/utils.d.ts.map +1 -0
- package/types/components/BrandConcierge/validateMessage.d.ts +5 -0
- package/types/components/BrandConcierge/validateMessage.d.ts.map +1 -0
- package/types/components/Consent/types.d.ts.map +1 -1
- package/types/components/Context/createComponent.d.ts +1 -1
- package/types/components/Context/createComponent.d.ts.map +1 -1
- package/types/components/Context/implementationDetails.d.ts +1 -1
- package/types/components/Context/implementationDetails.d.ts.map +1 -1
- package/types/components/Context/index.d.ts +1 -1
- package/types/components/Context/index.d.ts.map +1 -1
- package/types/components/Context/injectDevice.d.ts +1 -1
- package/types/components/Context/injectDevice.d.ts.map +1 -1
- package/types/components/Context/injectEnvironment.d.ts +1 -1
- package/types/components/Context/injectEnvironment.d.ts.map +1 -1
- package/types/components/Context/injectHighEntropyUserAgentHints.d.ts +1 -1
- package/types/components/Context/injectHighEntropyUserAgentHints.d.ts.map +1 -1
- package/types/components/Context/injectOneTimeAnalyticsReferrer.d.ts +3 -0
- package/types/components/Context/injectOneTimeAnalyticsReferrer.d.ts.map +1 -0
- package/types/components/Context/injectPlaceContext.d.ts +1 -1
- package/types/components/Context/injectPlaceContext.d.ts.map +1 -1
- package/types/components/Context/injectTimestamp.d.ts +1 -1
- package/types/components/Context/injectTimestamp.d.ts.map +1 -1
- package/types/components/Context/injectWeb.d.ts +1 -1
- package/types/components/Context/injectWeb.d.ts.map +1 -1
- package/types/components/Personalization/createComponent.d.ts.map +1 -1
- package/types/components/Personalization/createFetchDataHandler.d.ts +2 -1
- package/types/components/Personalization/createFetchDataHandler.d.ts.map +1 -1
- package/types/components/Personalization/createNotificationHandler.d.ts +1 -1
- package/types/components/Personalization/createNotificationHandler.d.ts.map +1 -1
- package/types/components/Personalization/createOnDecisionHandler.d.ts +2 -1
- package/types/components/Personalization/createOnDecisionHandler.d.ts.map +1 -1
- package/types/components/Personalization/createPersonalizationDetails.d.ts.map +1 -1
- package/types/components/Personalization/dom-actions/remapHeadOffers.d.ts.map +1 -1
- package/types/components/Personalization/handlers/createProcessInAppMessage.d.ts.map +1 -1
- package/types/components/Personalization/handlers/createProcessRedirect.d.ts.map +1 -1
- package/types/components/Personalization/handlers/injectCreateProposition.d.ts +2 -1
- package/types/components/Personalization/handlers/injectCreateProposition.d.ts.map +1 -1
- package/types/components/Personalization/in-app-message-actions/actions/displayIframeContent.d.ts.map +1 -1
- package/types/components/Personalization/index.d.ts.map +1 -1
- package/types/components/PushNotifications/types.d.ts.map +1 -1
- package/types/components/RulesEngine/createApplyResponse.d.ts.map +1 -1
- package/types/components/RulesEngine/index.d.ts.map +1 -1
- package/types/components/RulesEngine/types.d.ts.map +1 -1
- package/types/constants/surface.d.ts +5 -0
- package/types/constants/surface.d.ts.map +1 -0
- package/types/core/componentCreators.d.ts +1 -0
- package/types/core/consent/types.d.ts.map +1 -1
- package/types/core/createEvent.d.ts +2 -0
- package/types/core/createEvent.d.ts.map +1 -1
- package/types/core/edgeNetwork/injectSendEdgeNetworkRequest.d.ts.map +1 -1
- package/types/core/edgeNetwork/types.d.ts.map +1 -1
- package/types/core/identity/types.d.ts.map +1 -1
- package/types/core/index.d.ts.map +1 -1
- package/types/core/types.d.ts.map +1 -1
- package/types/utils/clamp.d.ts +3 -0
- package/types/utils/clamp.d.ts.map +1 -0
- package/types/utils/createCollect.d.ts +2 -1
- package/types/utils/createCollect.d.ts.map +1 -1
- package/types/utils/deepAssign.d.ts.map +1 -1
- package/types/utils/dom/createGetPageLocation.d.ts +5 -0
- package/types/utils/dom/createGetPageLocation.d.ts.map +1 -0
- package/types/utils/index.d.ts +1 -0
- package/types/utils/prepareConfigOverridesForEdge.d.ts.map +1 -1
- package/types/utils/request/createDataCollectionRequestPayload.d.ts.map +1 -1
- package/types/utils/request/createRequest.d.ts.map +1 -1
- package/types/utils/request/createRequestParams.d.ts.map +1 -1
- package/types/utils/request/createRequestPayload.d.ts.map +1 -1
- package/types/utils/request/types.d.ts +2 -0
- package/types/utils/request/types.d.ts.map +1 -1
- package/types/utils/surfaceUtils.d.ts +4 -0
- package/types/utils/surfaceUtils.d.ts.map +1 -0
- package/types/utils/types.d.ts.map +1 -1
package/libEs6/components/Personalization/in-app-message-actions/actions/displayIframeContent.js
CHANGED
|
@@ -271,7 +271,8 @@ export const displayHTMLContentInIframe = (settings = {}, interact) => {
|
|
|
271
271
|
export default (settings, collect) => {
|
|
272
272
|
return new Promise(resolve => {
|
|
273
273
|
const {
|
|
274
|
-
meta
|
|
274
|
+
meta,
|
|
275
|
+
identityMap
|
|
275
276
|
} = settings;
|
|
276
277
|
displayHTMLContentInIframe(settings, (action, propositionAction) => {
|
|
277
278
|
const propositionEventTypes = {};
|
|
@@ -283,7 +284,8 @@ export default (settings, collect) => {
|
|
|
283
284
|
decisionsMeta: [meta],
|
|
284
285
|
propositionAction,
|
|
285
286
|
eventType: INTERACT,
|
|
286
|
-
propositionEventTypes: Object.keys(propositionEventTypes)
|
|
287
|
+
propositionEventTypes: Object.keys(propositionEventTypes),
|
|
288
|
+
identityMap
|
|
287
289
|
});
|
|
288
290
|
});
|
|
289
291
|
resolve({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Copyright
|
|
2
|
+
Copyright 2025 Adobe. All rights reserved.
|
|
3
3
|
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
4
|
you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
5
|
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
@@ -34,7 +34,7 @@ import injectCreateProposition from "./handlers/injectCreateProposition.js";
|
|
|
34
34
|
import createAsyncArray from "./utils/createAsyncArray.js";
|
|
35
35
|
import * as schema from "../../constants/schema.js";
|
|
36
36
|
import processDefaultContent from "./handlers/processDefaultContent.js";
|
|
37
|
-
import { isPageWideSurface } from "
|
|
37
|
+
import { isPageWideSurface } from "../../utils/surfaceUtils.js";
|
|
38
38
|
import createProcessDomAction from "./handlers/createProcessDomAction.js";
|
|
39
39
|
import createProcessHtmlContent from "./handlers/createProcessHtmlContent.js";
|
|
40
40
|
import createProcessRedirect from "./handlers/createProcessRedirect.js";
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2025 Adobe. All rights reserved.
|
|
3
|
+
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
|
|
7
|
+
Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
1
13
|
/** @import { Identity } from '../../utils/request/types.js' */
|
|
2
14
|
|
|
3
15
|
/**
|
|
@@ -26,11 +26,13 @@ export default ({
|
|
|
26
26
|
// We extract them and add the events to the event registry.
|
|
27
27
|
const eventPayloads = extractPayloadsFromEventHistoryOperations(propositions);
|
|
28
28
|
eventRegistry.addEventPayloads(eventPayloads);
|
|
29
|
+
const identityMap = event?.getUserIdentityMap();
|
|
29
30
|
lifecycle.onDecision({
|
|
30
31
|
renderDecisions,
|
|
31
32
|
propositions,
|
|
32
33
|
event,
|
|
33
|
-
personalization
|
|
34
|
+
personalization,
|
|
35
|
+
identityMap
|
|
34
36
|
});
|
|
35
37
|
}
|
|
36
38
|
return {
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2025 Adobe. All rights reserved.
|
|
3
|
+
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
|
|
7
|
+
Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
1
13
|
/**
|
|
2
14
|
* @typedef {Record<string, EventRecord>} EventRegistry
|
|
3
15
|
*/
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2022 Adobe. All rights reserved.
|
|
3
|
+
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
|
|
7
|
+
Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
export const WEB = "web";
|
|
14
|
+
export const WEBAPP = "webapp";
|
|
15
|
+
export const SURFACE_TYPE_DELIMITER = "://";
|
|
16
|
+
export const FRAGMENT_DELIMITER = "#";
|
|
@@ -23,4 +23,5 @@ export { default as personalization } from "../components/Personalization/index.
|
|
|
23
23
|
export { default as rulesEngine } from "../components/RulesEngine/index.js";
|
|
24
24
|
export { default as streamingMedia } from "../components/StreamingMedia/index.js";
|
|
25
25
|
export { default as advertising } from "../components/Advertising/index.js";
|
|
26
|
-
export { default as pushNotifications } from "../components/PushNotifications/index.js";
|
|
26
|
+
export { default as pushNotifications } from "../components/PushNotifications/index.js";
|
|
27
|
+
export { default as brandConcierge } from "../components/BrandConcierge/index.js";
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2025 Adobe. All rights reserved.
|
|
3
|
+
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
|
|
7
|
+
Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
1
13
|
/**
|
|
2
14
|
* @typedef {Object} ConsentStateMachine
|
|
3
15
|
* @property {function(string): void} in
|
|
@@ -24,6 +24,7 @@ const getXdmPropositions = xdm => {
|
|
|
24
24
|
};
|
|
25
25
|
export default () => {
|
|
26
26
|
const content = {};
|
|
27
|
+
const createdAt = Date.now();
|
|
27
28
|
let userXdm;
|
|
28
29
|
let userData;
|
|
29
30
|
let documentMayUnload = false;
|
|
@@ -138,6 +139,9 @@ export default () => {
|
|
|
138
139
|
getDocumentMayUnload() {
|
|
139
140
|
return documentMayUnload;
|
|
140
141
|
},
|
|
142
|
+
getCreatedAt() {
|
|
143
|
+
return createdAt;
|
|
144
|
+
},
|
|
141
145
|
isEmpty() {
|
|
142
146
|
return isEmptyObject(content) && (!userXdm || isEmptyObject(userXdm)) && (!userData || isEmptyObject(userData));
|
|
143
147
|
},
|
|
@@ -150,6 +154,9 @@ export default () => {
|
|
|
150
154
|
}
|
|
151
155
|
return userXdm.web.webPageDetails.viewName;
|
|
152
156
|
},
|
|
157
|
+
getUserIdentityMap() {
|
|
158
|
+
return userXdm?.identityMap;
|
|
159
|
+
},
|
|
153
160
|
toJSON() {
|
|
154
161
|
if (!isFinalized) {
|
|
155
162
|
throw new Error("toJSON called before finalize");
|
|
@@ -17,8 +17,25 @@ import { ID_THIRD_PARTY as ID_THIRD_PARTY_DOMAIN } from "../../constants/domain.
|
|
|
17
17
|
import apiVersion from "../../constants/apiVersion.js";
|
|
18
18
|
import { createCallbackAggregator, noop } from "../../utils/index.js";
|
|
19
19
|
import { isNetworkError } from "../../utils/networkErrors.js";
|
|
20
|
+
import clamp from "../../utils/clamp.js";
|
|
20
21
|
import mergeLifecycleResponses from "./mergeLifecycleResponses.js";
|
|
21
22
|
import handleRequestFailure from "./handleRequestFailure.js";
|
|
23
|
+
const MAX_QUEUE_TIME_MILLIS = 300000; // 5 minutes
|
|
24
|
+
|
|
25
|
+
const calculateQueueTimeMillis = payload => {
|
|
26
|
+
if (typeof payload.getEvents !== "function") {
|
|
27
|
+
return undefined;
|
|
28
|
+
}
|
|
29
|
+
const events = payload.getEvents();
|
|
30
|
+
if (events.length === 0) {
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// In practice, there should only be one event in the payload, in the future if this changes we'll need to
|
|
35
|
+
// evaluate what timestamp to use (earliest, average, latest), or move the queueTime to the event meta
|
|
36
|
+
const earliestCreatedAt = Math.min(...events.map(event => event.getCreatedAt()));
|
|
37
|
+
return clamp(Date.now() - earliestCreatedAt, 0, MAX_QUEUE_TIME_MILLIS);
|
|
38
|
+
};
|
|
22
39
|
const isDemdexBlockedError = (error, request) => {
|
|
23
40
|
return request.getUseIdThirdPartyDomain() && isNetworkError(error);
|
|
24
41
|
};
|
|
@@ -94,6 +111,12 @@ export default ({
|
|
|
94
111
|
const endpointDomain = hasDemdexFailed || !request.getUseIdThirdPartyDomain() ? edgeDomain : ID_THIRD_PARTY_DOMAIN;
|
|
95
112
|
const url = buildEndpointUrl(endpointDomain, request);
|
|
96
113
|
const payload = request.getPayload();
|
|
114
|
+
const queueTimeMillis = calculateQueueTimeMillis(payload);
|
|
115
|
+
if (queueTimeMillis !== undefined) {
|
|
116
|
+
payload.mergeMeta({
|
|
117
|
+
queueTimeMillis
|
|
118
|
+
});
|
|
119
|
+
}
|
|
97
120
|
cookieTransfer.cookiesToPayload(payload, endpointDomain);
|
|
98
121
|
return sendNetworkRequest({
|
|
99
122
|
requestId: request.getId(),
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2025 Adobe. All rights reserved.
|
|
3
|
+
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
|
|
7
|
+
Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
1
13
|
/** @import { Request } from '../../utils/request/types.js' */
|
|
2
14
|
|
|
3
15
|
/**
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2025 Adobe. All rights reserved.
|
|
3
|
+
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
|
|
7
|
+
Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
1
13
|
/** @import { Logger } from '../../core/types.js' */
|
|
2
14
|
/** @import { CookieJar } from '../../utils/types.js' */
|
|
3
15
|
|
package/libEs6/core/index.js
CHANGED
|
@@ -181,6 +181,8 @@ export const createExecuteCommand = ({
|
|
|
181
181
|
getImmediatelyAvailableTools(componentName) {
|
|
182
182
|
const componentLogger = createComponentLogger(componentName);
|
|
183
183
|
return {
|
|
184
|
+
loggingCookieJar,
|
|
185
|
+
instanceName,
|
|
184
186
|
config,
|
|
185
187
|
componentRegistry,
|
|
186
188
|
consent,
|
|
@@ -196,7 +198,9 @@ export const createExecuteCommand = ({
|
|
|
196
198
|
}),
|
|
197
199
|
createNamespacedStorage,
|
|
198
200
|
apexDomain,
|
|
199
|
-
getBrowser
|
|
201
|
+
getBrowser,
|
|
202
|
+
cookieTransfer,
|
|
203
|
+
createResponse
|
|
200
204
|
};
|
|
201
205
|
}
|
|
202
206
|
});
|
package/libEs6/core/types.js
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2025 Adobe. All rights reserved.
|
|
3
|
+
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
|
|
7
|
+
Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
1
13
|
/**
|
|
2
14
|
* @typedef {object} AlloyMonitor
|
|
3
15
|
* @property {function(any): void} [onBeforeLog]
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2025 Adobe. All rights reserved.
|
|
3
|
+
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
|
|
7
|
+
Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Clamps a value between a minimum and maximum value.
|
|
15
|
+
* @param {number} value - The value to clamp.
|
|
16
|
+
* @param {number} min - The minimum value.
|
|
17
|
+
* @param {number} max - The maximum value.
|
|
18
|
+
* @returns {number} The clamped value.
|
|
19
|
+
*/
|
|
20
|
+
export default (value, min, max) => {
|
|
21
|
+
return Math.max(min, Math.min(value, max));
|
|
22
|
+
};
|
|
@@ -23,11 +23,13 @@ export default ({
|
|
|
23
23
|
documentMayUnload = false,
|
|
24
24
|
eventType = DISPLAY,
|
|
25
25
|
propositionEventTypes = [getPropositionEventType(eventType)],
|
|
26
|
-
viewName
|
|
26
|
+
viewName,
|
|
27
|
+
identityMap
|
|
27
28
|
}) => {
|
|
28
29
|
const event = eventManager.createEvent();
|
|
29
30
|
const data = {
|
|
30
|
-
eventType
|
|
31
|
+
eventType,
|
|
32
|
+
identityMap
|
|
31
33
|
};
|
|
32
34
|
if (viewName) {
|
|
33
35
|
data.web = {
|
|
@@ -12,8 +12,14 @@ governing permissions and limitations under the License.
|
|
|
12
12
|
|
|
13
13
|
import isNil from "./isNil.js";
|
|
14
14
|
import isObject from "./isObject.js";
|
|
15
|
+
|
|
16
|
+
// Keys that should never be copied to prevent prototype pollution.
|
|
17
|
+
const DANGEROUS_KEYS = ["__proto__", "constructor", "prototype"];
|
|
15
18
|
const deepAssignObject = (target, source) => {
|
|
16
19
|
Object.keys(source).forEach(key => {
|
|
20
|
+
if (DANGEROUS_KEYS.includes(key)) {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
17
23
|
if (isObject(target[key]) && isObject(source[key])) {
|
|
18
24
|
deepAssignObject(target[key], source[key]);
|
|
19
25
|
return;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2022 Adobe. All rights reserved.
|
|
3
|
+
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
|
|
7
|
+
Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
export default ({
|
|
14
|
+
window
|
|
15
|
+
}) => () => {
|
|
16
|
+
return window.location;
|
|
17
|
+
};
|
package/libEs6/utils/index.js
CHANGED
|
@@ -61,4 +61,5 @@ export { default as toISOStringLocal } from "./toISOStringLocal.js";
|
|
|
61
61
|
export { default as uuid } from "./uuid.js";
|
|
62
62
|
export { default as updateErrorMessage } from "./updateErrorMessage.js";
|
|
63
63
|
export { default as validateIdentityMap } from "./validateIdentityMap.js";
|
|
64
|
-
export { default as validateConfigOverride } from "./validateConfigOverride.js";
|
|
64
|
+
export { default as validateConfigOverride } from "./validateConfigOverride.js";
|
|
65
|
+
export { default as createGetPageLocation } from "./dom/createGetPageLocation.js";
|
|
@@ -25,11 +25,13 @@ export default configuration => {
|
|
|
25
25
|
return null;
|
|
26
26
|
}
|
|
27
27
|
// remove entries that are empty strings or arrays
|
|
28
|
-
const configOverrides = filterObject(configuration, value => {
|
|
28
|
+
const configOverrides = filterObject(configuration, (value, key) => {
|
|
29
29
|
if (isNil(value)) {
|
|
30
30
|
return false;
|
|
31
31
|
}
|
|
32
|
-
|
|
32
|
+
// We want to remove all the { enabled: true } values, but leave any other boolean values.
|
|
33
|
+
// Experience Edge will not accept { enabled: true } values as true is the default for "enabled".
|
|
34
|
+
if (isBoolean(value) && (key !== "enabled" || value === false)) {
|
|
33
35
|
return true;
|
|
34
36
|
}
|
|
35
37
|
if (isNumber(value)) {
|
|
@@ -34,6 +34,9 @@ export default () => {
|
|
|
34
34
|
content.events = content.events || [];
|
|
35
35
|
content.events.push(event);
|
|
36
36
|
},
|
|
37
|
+
getEvents: () => {
|
|
38
|
+
return content.events || [];
|
|
39
|
+
},
|
|
37
40
|
getDocumentMayUnload: () => {
|
|
38
41
|
return (content.events || []).some(event => event.getDocumentMayUnload());
|
|
39
42
|
}
|
|
@@ -47,7 +47,8 @@ export default options => {
|
|
|
47
47
|
getAction,
|
|
48
48
|
getUseSendBeacon,
|
|
49
49
|
datastreamIdOverride,
|
|
50
|
-
edgeSubPath
|
|
50
|
+
edgeSubPath,
|
|
51
|
+
requestParams = {}
|
|
51
52
|
} = options;
|
|
52
53
|
const id = uuid();
|
|
53
54
|
let shouldUseThirdPartyDomain = false;
|
|
@@ -86,6 +87,9 @@ export default options => {
|
|
|
86
87
|
},
|
|
87
88
|
setIsIdentityEstablished() {
|
|
88
89
|
isIdentityEstablished = true;
|
|
90
|
+
},
|
|
91
|
+
getRequestParams() {
|
|
92
|
+
return requestParams;
|
|
89
93
|
}
|
|
90
94
|
};
|
|
91
95
|
};
|
|
@@ -42,5 +42,6 @@ export default ({
|
|
|
42
42
|
if (localConfigOverridesWithoutDatastreamId && !isEmptyObject(localConfigOverridesWithoutDatastreamId)) {
|
|
43
43
|
payload.mergeConfigOverride(localConfigOverridesWithoutDatastreamId);
|
|
44
44
|
}
|
|
45
|
+
payload.finalizeConfigOverrides();
|
|
45
46
|
return requestParams;
|
|
46
47
|
};
|
|
@@ -88,7 +88,17 @@ export default options => {
|
|
|
88
88
|
mergeMeta: createMerger(content, "meta"),
|
|
89
89
|
mergeState: createMerger(content, "meta.state"),
|
|
90
90
|
mergeQuery: createMerger(content, "query"),
|
|
91
|
-
mergeConfigOverride: updates => mergeConfigOverrides(
|
|
91
|
+
mergeConfigOverride: updates => mergeConfigOverrides(updates),
|
|
92
|
+
finalizeConfigOverrides: () => {
|
|
93
|
+
if (content.meta?.configOverrides) {
|
|
94
|
+
const prepared = prepareConfigOverridesForEdge(content.meta.configOverrides);
|
|
95
|
+
if (prepared === null) {
|
|
96
|
+
delete content.meta.configOverrides;
|
|
97
|
+
} else {
|
|
98
|
+
content.meta.configOverrides = prepared;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
},
|
|
92
102
|
addIdentity,
|
|
93
103
|
hasIdentity,
|
|
94
104
|
toJSON() {
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2025 Adobe. All rights reserved.
|
|
3
|
+
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
|
|
7
|
+
Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
1
13
|
/**
|
|
2
14
|
* Request object with methods to access and modify request properties.
|
|
3
15
|
*
|
|
@@ -37,6 +49,7 @@
|
|
|
37
49
|
* @property {function(string, Identity): void} options.addIdentity
|
|
38
50
|
* @property {function(string): boolean} options.hasIdentity
|
|
39
51
|
* @property {function(object): void} addEvent
|
|
52
|
+
* @property {function(): Array} getEvents
|
|
40
53
|
* @property {function(): boolean} getDocumentMayUnload
|
|
41
54
|
* @property {function(): object} toJSON
|
|
42
55
|
*/
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2022 Adobe. All rights reserved.
|
|
3
|
+
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
|
|
7
|
+
Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { WEB, WEBAPP, SURFACE_TYPE_DELIMITER, FRAGMENT_DELIMITER } from "../constants/surface.js";
|
|
14
|
+
import { isNil, isNonEmptyString } from "./index.js";
|
|
15
|
+
const SURFACE_REGEX = /^(\w+):\/\/([^/#]+)(\/[^#]*)?(#.*)?$/;
|
|
16
|
+
const AUTHORITY_REGEX = /^(?:.*@)?(?:[a-z\d\u00a1-\uffff.-]+|\[[a-f\d:]+])(?::\d+)?$/;
|
|
17
|
+
const PATH_REGEX = /^\/(?:[/\w\u00a1-\uffff-.~]|%[a-fA-F\d]{2})*$/;
|
|
18
|
+
const FRAGMENT_REGEX = /^#(?:[/\w\u00a1-\uffff-.~]|%[a-fA-F\d]{2})+$/;
|
|
19
|
+
const normalizePath = (path = "/") => {
|
|
20
|
+
let end = path.length;
|
|
21
|
+
while (end > 0 && "/".indexOf(path.charAt(end - 1)) !== -1) {
|
|
22
|
+
end -= 1;
|
|
23
|
+
}
|
|
24
|
+
return path.substring(0, end) || "/";
|
|
25
|
+
};
|
|
26
|
+
const getSurfaceType = surfaceTypeMatch => isNonEmptyString(surfaceTypeMatch) ? surfaceTypeMatch.toLowerCase() : "";
|
|
27
|
+
const getAuthority = authorityMatch => isNonEmptyString(authorityMatch) ? authorityMatch.toLowerCase() : "";
|
|
28
|
+
const getPath = pathMatch => isNonEmptyString(pathMatch) ? normalizePath(pathMatch) : "/";
|
|
29
|
+
const parseSurface = surfaceString => {
|
|
30
|
+
const matched = surfaceString.match(SURFACE_REGEX);
|
|
31
|
+
return matched ? {
|
|
32
|
+
surfaceType: getSurfaceType(matched[1]),
|
|
33
|
+
authority: getAuthority(matched[2]),
|
|
34
|
+
path: getPath(matched[3]),
|
|
35
|
+
fragment: matched[4]
|
|
36
|
+
} : null;
|
|
37
|
+
};
|
|
38
|
+
const stringifySurface = surface => `${surface.surfaceType}${SURFACE_TYPE_DELIMITER}${surface.authority}${surface.path || ""}${surface.fragment || ""}`;
|
|
39
|
+
export const buildPageSurface = getPageLocation => {
|
|
40
|
+
const location = getPageLocation();
|
|
41
|
+
const host = location.host.toLowerCase();
|
|
42
|
+
const path = location.pathname;
|
|
43
|
+
return WEB + SURFACE_TYPE_DELIMITER + host + normalizePath(path);
|
|
44
|
+
};
|
|
45
|
+
const expandFragmentSurface = (surface, getPageLocation) => surface.startsWith(FRAGMENT_DELIMITER) ? buildPageSurface(getPageLocation) + surface : surface;
|
|
46
|
+
const validateSurface = (surface, getPageLocation, logger) => {
|
|
47
|
+
const invalidateSurface = validationError => {
|
|
48
|
+
logger.warn(validationError);
|
|
49
|
+
return null;
|
|
50
|
+
};
|
|
51
|
+
if (!isNonEmptyString(surface)) {
|
|
52
|
+
return invalidateSurface(`Invalid surface: ${surface}`);
|
|
53
|
+
}
|
|
54
|
+
const expanded = expandFragmentSurface(surface, getPageLocation);
|
|
55
|
+
const parsed = parseSurface(expanded);
|
|
56
|
+
if (parsed === null) {
|
|
57
|
+
return invalidateSurface(`Invalid surface: ${surface}`);
|
|
58
|
+
}
|
|
59
|
+
if (![WEB, WEBAPP].includes(parsed.surfaceType)) {
|
|
60
|
+
return invalidateSurface(`Unsupported surface type ${parsed.surfaceType} in surface: ${surface}`);
|
|
61
|
+
}
|
|
62
|
+
if (!parsed.authority || !AUTHORITY_REGEX.test(parsed.authority)) {
|
|
63
|
+
return invalidateSurface(`Invalid authority ${parsed.authority} in surface: ${surface}`);
|
|
64
|
+
}
|
|
65
|
+
if (parsed.path && !PATH_REGEX.test(parsed.path)) {
|
|
66
|
+
return invalidateSurface(`Invalid path ${parsed.path} in surface: ${surface}`);
|
|
67
|
+
}
|
|
68
|
+
if (parsed.fragment && !FRAGMENT_REGEX.test(parsed.fragment)) {
|
|
69
|
+
return invalidateSurface(`Invalid fragment ${parsed.fragment} in surface: ${surface}`);
|
|
70
|
+
}
|
|
71
|
+
return parsed;
|
|
72
|
+
};
|
|
73
|
+
export const isPageWideSurface = scope => !!scope && scope.indexOf(WEB + SURFACE_TYPE_DELIMITER) === 0 && scope.indexOf(FRAGMENT_DELIMITER) === -1;
|
|
74
|
+
|
|
75
|
+
// eslint-disable-next-line default-param-last
|
|
76
|
+
export const normalizeSurfaces = (surfaces = [], getPageLocation, logger) => surfaces.map(surface => validateSurface(surface, getPageLocation, logger)).filter(surface => !isNil(surface)).map(stringifySurface);
|
package/libEs6/utils/types.js
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2025 Adobe. All rights reserved.
|
|
3
|
+
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
|
|
7
|
+
Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
1
13
|
/**
|
|
2
14
|
* @typedef {Object} Storage
|
|
3
15
|
* @property {function(string): string|null} getItem
|