@adobe/alloy 2.34.1 → 2.34.2-beta.1
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/dist/alloy.js +329 -436
- package/dist/alloy.min.js +2 -2
- package/dist/types/browser/src/components/Advertising/index.d.ts +2 -1
- package/dist/types/browser/src/components/Advertising/utils/advertisingCookieManager.d.ts +2 -1
- package/dist/types/browser/src/components/PushNotifications/index.d.ts +4 -4
- package/dist/types/browser/src/index.d.ts +2 -1
- package/dist/types/browser/src/services/createBrowserGlobalsService.d.ts +0 -1
- package/dist/types/browser/src/services/createBrowserNetworkService.d.ts +1 -1
- package/dist/types/browser/src/services/createBrowserPlatformServices.d.ts +1 -4
- package/dist/types/core/src/components/Audiences/index.d.ts +2 -1
- package/dist/types/core/src/components/BrandConcierge/createSendConversationEvent.d.ts +2 -1
- package/dist/types/core/src/components/BrandConcierge/index.d.ts +2 -1
- package/dist/types/core/src/components/BrandConcierge/utils.d.ts +1 -1
- package/dist/types/core/src/components/Consent/createConsentHashStore.d.ts +2 -2
- package/dist/types/core/src/components/Consent/index.d.ts +2 -2
- package/dist/types/core/src/components/Identity/index.d.ts +2 -1
- package/dist/types/core/src/components/RulesEngine/createContextProvider.d.ts +2 -2
- package/dist/types/core/src/components/RulesEngine/index.d.ts +2 -2
- package/dist/types/core/src/components/RulesEngine/utils/storage.d.ts +1 -1
- package/dist/types/core/src/core/createLogController.d.ts +4 -4
- package/dist/types/core/src/core/index.d.ts +1 -3
- package/dist/types/core/src/index.d.ts +1 -4
- package/dist/types/core/src/services/types.d.ts +23 -3
- package/dist/types/core/src/utils/index.d.ts +2 -3
- package/dist/types/core/src/utils/injectDoesIdentityCookieExist.d.ts +2 -1
- package/dist/types/core/src/utils/request/createGetAssuranceValidationTokenParams.d.ts +2 -2
- package/package.json +3 -2
- package/src/components/Advertising/index.js +2 -0
- package/src/components/Advertising/utils/advertisingCookieManager.js +2 -2
- package/src/components/PushNotifications/index.js +4 -4
- package/src/components/PushNotifications/request/makeSendPushSubscriptionRequest.js +2 -1
- package/src/index.js +6 -1
- package/src/services/createBrowserCookieService.js +3 -2
- package/src/services/createBrowserGlobalsService.js +14 -0
- package/src/services/createBrowserNetworkService.js +3 -4
- package/src/services/createBrowserPlatformServices.js +2 -3
- package/src/services/injectSendBeaconRequest.js +32 -0
- package/src/services/injectSendFetchRequest.js +37 -0
- package/dist/types/core/src/components/Identity/visitorService/awaitVisitorOptIn.d.ts +0 -4
- package/dist/types/core/src/components/Identity/visitorService/getVisitor.d.ts +0 -2
- package/dist/types/core/src/components/Identity/visitorService/injectGetEcidFromVisitor.d.ts +0 -6
- package/dist/types/core/src/core/getMonitors.d.ts +0 -3
- package/dist/types/core/src/utils/cookieJar.d.ts +0 -7
- /package/dist/types/{core/src/core/network/requestMethods → browser/src/services}/injectSendBeaconRequest.d.ts +0 -0
- /package/dist/types/{core/src/core/network/requestMethods → browser/src/services}/injectSendFetchRequest.d.ts +0 -0
- /package/dist/types/core/src/utils/{fireImage.d.ts → dom/fireImage.d.ts} +0 -0
- /package/dist/types/core/src/utils/{injectFireReferrerHideableImage.d.ts → dom/injectFireReferrerHideableImage.d.ts} +0 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2019 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 ({ fetch }) => {
|
|
14
|
+
return (url, body) => {
|
|
15
|
+
return fetch(url, {
|
|
16
|
+
method: "POST",
|
|
17
|
+
cache: "no-cache",
|
|
18
|
+
credentials: "include", // To set the cookie header in the request.
|
|
19
|
+
headers: {
|
|
20
|
+
"Content-Type": "text/plain; charset=UTF-8",
|
|
21
|
+
},
|
|
22
|
+
referrerPolicy: "no-referrer-when-downgrade",
|
|
23
|
+
body,
|
|
24
|
+
}).then((response) => {
|
|
25
|
+
return response.text().then((responseBody) => ({
|
|
26
|
+
statusCode: response.status,
|
|
27
|
+
// We expose headers through a function instead of creating an object
|
|
28
|
+
// with all the headers up front largely because the native
|
|
29
|
+
// request.getResponseHeader method is case-insensitive.
|
|
30
|
+
getHeader(name) {
|
|
31
|
+
return response.headers.get(name);
|
|
32
|
+
},
|
|
33
|
+
body: responseBody,
|
|
34
|
+
}));
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|