@adobe/alloy 2.18.0-beta.1 → 2.18.0-beta.3

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.
@@ -15,5 +15,5 @@ governing permissions and limitations under the License.
15
15
  */
16
16
  // The __VERSION__ keyword will be replace at alloy build time with the package.json version.
17
17
  // see babel-plugin-version
18
- var _default = "2.18.0-beta.1";
18
+ var _default = "2.18.0-beta.3";
19
19
  exports.default = _default;
@@ -61,12 +61,24 @@ var _default = function _default(_ref) {
61
61
  var locationHint = getLocationHint();
62
62
  var edgeBasePathWithLocationHint = locationHint ? edgeBasePath + "/" + locationHint : edgeBasePath;
63
63
  var configId = request.getDatastreamIdOverride() || datastreamId;
64
+ var payload = request.getPayload();
65
+
66
+ if (configId !== datastreamId) {
67
+ payload.mergeMeta({
68
+ sdkConfig: {
69
+ datastream: {
70
+ original: datastreamId
71
+ }
72
+ }
73
+ });
74
+ }
75
+
64
76
  var url = "https://" + endpointDomain + "/" + edgeBasePathWithLocationHint + "/" + _apiVersion.default + "/" + request.getAction() + "?configId=" + configId + "&requestId=" + request.getId() + getAssuranceValidationTokenParams();
65
- cookieTransfer.cookiesToPayload(request.getPayload(), endpointDomain);
77
+ cookieTransfer.cookiesToPayload(payload, endpointDomain);
66
78
  return sendNetworkRequest({
67
79
  requestId: request.getId(),
68
80
  url: url,
69
- payload: request.getPayload(),
81
+ payload: payload,
70
82
  useSendBeacon: request.getUseSendBeacon()
71
83
  });
72
84
  }).then(function (networkResponse) {
@@ -11,4 +11,4 @@ governing permissions and limitations under the License.
11
11
  */
12
12
  // The __VERSION__ keyword will be replace at alloy build time with the package.json version.
13
13
  // see babel-plugin-version
14
- export default "2.18.0-beta.1";
14
+ export default "2.18.0-beta.3";
@@ -54,12 +54,24 @@ export default (({
54
54
  const locationHint = getLocationHint();
55
55
  const edgeBasePathWithLocationHint = locationHint ? `${edgeBasePath}/${locationHint}` : edgeBasePath;
56
56
  const configId = request.getDatastreamIdOverride() || datastreamId;
57
+ const payload = request.getPayload();
58
+
59
+ if (configId !== datastreamId) {
60
+ payload.mergeMeta({
61
+ sdkConfig: {
62
+ datastream: {
63
+ original: datastreamId
64
+ }
65
+ }
66
+ });
67
+ }
68
+
57
69
  const url = `https://${endpointDomain}/${edgeBasePathWithLocationHint}/${apiVersion}/${request.getAction()}?configId=${configId}&requestId=${request.getId()}${getAssuranceValidationTokenParams()}`;
58
- cookieTransfer.cookiesToPayload(request.getPayload(), endpointDomain);
70
+ cookieTransfer.cookiesToPayload(payload, endpointDomain);
59
71
  return sendNetworkRequest({
60
72
  requestId: request.getId(),
61
73
  url,
62
- payload: request.getPayload(),
74
+ payload,
63
75
  useSendBeacon: request.getUseSendBeacon()
64
76
  });
65
77
  }).then(networkResponse => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/alloy",
3
- "version": "2.18.0-beta.1",
3
+ "version": "2.18.0-beta.3",
4
4
  "description": "Adobe Experience Platform Web SDK",
5
5
  "main": "libEs5/index.js",
6
6
  "module": "libEs6/index.js",
@@ -66,7 +66,7 @@
66
66
  "uuid": "^3.3.2"
67
67
  },
68
68
  "devDependencies": {
69
- "@adobe/alloy": "^2.18.0-beta.0",
69
+ "@adobe/alloy": "^2.18.0-beta.1",
70
70
  "@babel/cli": "^7.12.8",
71
71
  "@babel/core": "^7.2.2",
72
72
  "@babel/plugin-proposal-object-rest-spread": "^7.3.2",