@adobe/alloy 2.35.1 → 2.36.0-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 +296 -65
- package/dist/alloy.min.js +2 -2
- package/dist/types/browser/src/services/injectSendFetchRequest.d.ts +1 -1
- package/dist/types/core/src/components/LibraryInfo/index.d.ts +3 -2
- package/dist/types/core/src/constants/domain.d.ts +2 -0
- package/dist/types/core/src/core/edgeNetwork/injectGetImsAccessToken.d.ts +12 -0
- package/dist/types/core/src/core/edgeNetwork/injectSendEdgeNetworkRequest.d.ts +4 -1
- package/dist/types/core/src/core/index.d.ts +4 -1
- package/dist/types/core/src/core/network/injectSendNetworkRequest.d.ts +2 -1
- package/dist/types/core/src/index.d.ts +2 -1
- package/dist/types/core/src/utils/index.d.ts +1 -0
- package/dist/types/core/src/utils/redactEdgeCredentials.d.ts +2 -0
- package/package.json +2 -2
- package/src/services/injectSendFetchRequest.js +2 -1
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
export default createLibraryInfo;
|
|
2
|
-
declare function createLibraryInfo({ config, componentRegistry }: {
|
|
2
|
+
declare function createLibraryInfo({ config, componentRegistry, platformServices }: {
|
|
3
3
|
config: any;
|
|
4
4
|
componentRegistry: any;
|
|
5
|
+
platformServices: any;
|
|
5
6
|
}): {
|
|
6
7
|
commands: {
|
|
7
8
|
getLibraryInfo: {
|
|
8
9
|
run: () => {
|
|
9
10
|
libraryInfo: {
|
|
10
|
-
version:
|
|
11
|
+
version: any;
|
|
11
12
|
configs: any;
|
|
12
13
|
commands: any[];
|
|
13
14
|
components: any;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare function _default({ edgeCredentials, dateProvider }: {
|
|
2
|
+
edgeCredentials: {
|
|
3
|
+
clientId: string;
|
|
4
|
+
clientSecret: string;
|
|
5
|
+
scopes: string[];
|
|
6
|
+
imsHost: string;
|
|
7
|
+
};
|
|
8
|
+
dateProvider?: (() => Date) | undefined;
|
|
9
|
+
}): {
|
|
10
|
+
getAccessToken: () => Promise<string>;
|
|
11
|
+
};
|
|
12
|
+
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare function _default({ config, lifecycle, cookieTransfer, sendNetworkRequest, createResponse, processWarningsAndErrors, getLocationHint, getAssuranceValidationTokenParams, }: {
|
|
1
|
+
declare function _default({ config, lifecycle, cookieTransfer, sendNetworkRequest, createResponse, processWarningsAndErrors, getLocationHint, getAssuranceValidationTokenParams, getImsAccessToken, }: {
|
|
2
2
|
config: {
|
|
3
3
|
edgeDomain: string;
|
|
4
4
|
edgeBasePath: string;
|
|
@@ -11,6 +11,9 @@ declare function _default({ config, lifecycle, cookieTransfer, sendNetworkReques
|
|
|
11
11
|
processWarningsAndErrors: (arg0: object) => void;
|
|
12
12
|
getLocationHint: () => string | undefined;
|
|
13
13
|
getAssuranceValidationTokenParams: () => string;
|
|
14
|
+
getImsAccessToken?: {
|
|
15
|
+
getAccessToken: () => Promise<string>;
|
|
16
|
+
} | undefined;
|
|
14
17
|
}): EdgeRequestExecutor;
|
|
15
18
|
export default _default;
|
|
16
19
|
import type { ResponseCreator } from '../types.js';
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
export function createExecuteCommand({ instanceName, monitors, components, createPlatformServices, coreConfigValidators, }: {
|
|
1
|
+
export function createExecuteCommand({ instanceName, monitors, components, createPlatformServices, coreConfigValidators, getImsAccessToken: sharedGetImsAccessToken, }: {
|
|
2
2
|
instanceName: string;
|
|
3
3
|
monitors?: import("./types.js").AlloyMonitor[] | undefined;
|
|
4
4
|
components: Array<Function>;
|
|
5
5
|
createPlatformServices: () => import("../services/index.js").PlatformServices;
|
|
6
6
|
coreConfigValidators?: import("../utils/validation/types.js").ObjectValidator | undefined;
|
|
7
|
+
getImsAccessToken?: {
|
|
8
|
+
getAccessToken: () => Promise<string>;
|
|
9
|
+
} | undefined;
|
|
7
10
|
}): (commandName: any, options?: {}) => Promise<any>;
|
|
@@ -4,10 +4,11 @@ declare function _default({ logger, sendFetchRequest, sendBeaconRequest, isReque
|
|
|
4
4
|
sendBeaconRequest: any;
|
|
5
5
|
isRequestRetryable: any;
|
|
6
6
|
getRequestRetryDelay: any;
|
|
7
|
-
}): ({ requestId, url, payload, useSendBeacon }: {
|
|
7
|
+
}): ({ requestId, url, payload, useSendBeacon, headers }: {
|
|
8
8
|
requestId: any;
|
|
9
9
|
url: any;
|
|
10
10
|
payload: any;
|
|
11
11
|
useSendBeacon: any;
|
|
12
|
+
headers: any;
|
|
12
13
|
}) => any;
|
|
13
14
|
export default _default;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
export { default as createCoreConfigs } from "./core/config/createCoreConfigs.js";
|
|
2
|
+
export { default as createGetImsAccessToken } from "./core/edgeNetwork/injectGetImsAccessToken.js";
|
|
2
3
|
export { default as consent } from "./components/Consent/index.js";
|
|
3
4
|
export function createCustomInstance(options?: {
|
|
4
5
|
name?: string | undefined;
|
|
5
6
|
monitors?: import("./core/types.js").AlloyMonitor[] | undefined;
|
|
6
7
|
components?: Function[] | undefined;
|
|
7
|
-
}, createPlatformServices?: CreatePlatformServices, coreConfigValidators?: ReturnType<typeof import("./core/config/createCoreConfigs.js").default>): (commandName: string, options?: Object) => Promise<any>;
|
|
8
|
+
}, createPlatformServices?: CreatePlatformServices, coreConfigValidators?: ReturnType<typeof import("./core/config/createCoreConfigs.js").default>, getImsAccessToken?: ReturnType<typeof import("./core/edgeNetwork/injectGetImsAccessToken.js").default>): (commandName: string, options?: Object) => Promise<any>;
|
|
8
9
|
export function createInstance(options?: {
|
|
9
10
|
name?: string | undefined;
|
|
10
11
|
monitors?: import("./core/types.js").AlloyMonitor[] | undefined;
|
|
@@ -35,6 +35,7 @@ export { default as noop } from "./noop.js";
|
|
|
35
35
|
export { default as parseUrl } from "./parseUrl.js";
|
|
36
36
|
export { default as prepareConfigOverridesForEdge } from "./prepareConfigOverridesForEdge.js";
|
|
37
37
|
export { default as queryString } from "./querystring.js";
|
|
38
|
+
export { default as redactEdgeCredentials } from "./redactEdgeCredentials.js";
|
|
38
39
|
export { default as sanitizeOrgIdForCookieName } from "./sanitizeOrgIdForCookieName.js";
|
|
39
40
|
export { default as sortObjectKeysRecursively } from "./sortObjectKeysRecursively.js";
|
|
40
41
|
export { default as stackError } from "./stackError.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/alloy",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.36.0-beta.1",
|
|
4
4
|
"description": "Adobe Experience Platform Web SDK",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"commander": "^14.0.2",
|
|
70
70
|
"rollup": "^4.60.3",
|
|
71
71
|
"rollup-plugin-license": "^3.7.1",
|
|
72
|
-
"@adobe/alloy-core": "^1.
|
|
72
|
+
"@adobe/alloy-core": "^1.3.0-beta.1"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
75
|
"glob": "^13.0.6",
|
|
@@ -11,13 +11,14 @@ governing permissions and limitations under the License.
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
export default ({ fetch }) => {
|
|
14
|
-
return (url, body) => {
|
|
14
|
+
return (url, body, headers) => {
|
|
15
15
|
return fetch(url, {
|
|
16
16
|
method: "POST",
|
|
17
17
|
cache: "no-cache",
|
|
18
18
|
credentials: "include", // To set the cookie header in the request.
|
|
19
19
|
headers: {
|
|
20
20
|
"Content-Type": "text/plain; charset=UTF-8",
|
|
21
|
+
...headers,
|
|
21
22
|
},
|
|
22
23
|
referrerPolicy: "no-referrer-when-downgrade",
|
|
23
24
|
body,
|