@azure/communication-common 2.4.1 → 2.4.2-alpha.20251021.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/browser/credential/cryptoUtils-browser.mjs.map +1 -1
- package/dist/browser/credential/cryptoUtils.js +1 -1
- package/dist/browser/credential/encodeUtils-browser.d.mts +4 -0
- package/dist/browser/credential/encodeUtils-browser.d.mts.map +1 -0
- package/dist/{esm/credential/encodeUtils.browser.js → browser/credential/encodeUtils-browser.mjs} +1 -1
- package/dist/browser/credential/encodeUtils-browser.mjs.map +1 -0
- package/dist/commonjs/tsdoc-metadata.json +1 -1
- package/dist/esm/credential/encodeUtils-browser.d.mts +4 -0
- package/dist/esm/credential/encodeUtils-browser.d.mts.map +1 -0
- package/dist/{browser/credential/encodeUtils.browser.js → esm/credential/encodeUtils-browser.mjs} +1 -1
- package/dist/esm/credential/encodeUtils-browser.mjs.map +1 -0
- package/dist/react-native/credential/encodeUtils-browser.d.mts +4 -0
- package/dist/react-native/credential/encodeUtils-browser.d.mts.map +1 -0
- package/dist/react-native/credential/{encodeUtils.browser.js → encodeUtils-browser.mjs} +1 -1
- package/dist/react-native/credential/encodeUtils-browser.mjs.map +1 -0
- package/package.json +19 -16
- package/dist/browser/credential/encodeUtils.browser.d.ts +0 -4
- package/dist/browser/credential/encodeUtils.browser.d.ts.map +0 -1
- package/dist/browser/credential/encodeUtils.browser.js.map +0 -1
- package/dist/commonjs/credential/encodeUtils.browser.d.ts +0 -4
- package/dist/commonjs/credential/encodeUtils.browser.d.ts.map +0 -1
- package/dist/commonjs/credential/encodeUtils.browser.js +0 -25
- package/dist/commonjs/credential/encodeUtils.browser.js.map +0 -1
- package/dist/esm/credential/encodeUtils.browser.d.ts +0 -4
- package/dist/esm/credential/encodeUtils.browser.d.ts.map +0 -1
- package/dist/esm/credential/encodeUtils.browser.js.map +0 -1
- package/dist/react-native/credential/encodeUtils.browser.d.ts +0 -4
- package/dist/react-native/credential/encodeUtils.browser.d.ts.map +0 -1
- package/dist/react-native/credential/encodeUtils.browser.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cryptoUtils-browser.mjs","sourceRoot":"","sources":["../../../src/credential/cryptoUtils-browser.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,2BAA2B;AAE3B,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"cryptoUtils-browser.mjs","sourceRoot":"","sources":["../../../src/credential/cryptoUtils-browser.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,2BAA2B;AAE3B,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAE3F,MAAM,YAAY,GAAG,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC;AAE9C,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,EAAE,OAAe,EAAmB,EAAE;IAChE,MAAM,IAAI,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC;IACjC,MAAM,IAAI,GAAG,MAAM,YAAY,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IACxD,OAAO,YAAY,CAAC,IAAI,CAAC,CAAC;AAC5B,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,EAAE,MAAc,EAAE,OAAe,EAAmB,EAAE;IAChF,MAAM,YAAY,GAAqB,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,CAAC;IACnF,MAAM,cAAc,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC;IAC3C,MAAM,UAAU,GAAG,oBAAoB,CAAC,MAAM,CAAC,CAAC;IAChD,MAAM,SAAS,GAAG,MAAM,YAAY,CAAC,SAAS,CAAC,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IACjG,MAAM,SAAS,GAAG,MAAM,YAAY,CAAC,IAAI,CAAC,YAAY,EAAE,SAAS,EAAE,cAAc,CAAC,CAAC;IACnF,OAAO,YAAY,CAAC,SAAS,CAAC,CAAC;AACjC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/// <reference lib=\"dom\" />\n\nimport { encodeBase64, encodeUTF8, encodeUTF8fromBase64 } from \"./encodeUtils-browser.mjs\";\n\nconst subtleCrypto = globalThis.crypto.subtle;\n\nexport const shaHash = async (content: string): Promise<string> => {\n const data = encodeUTF8(content);\n const hash = await subtleCrypto.digest(\"SHA-256\", data);\n return encodeBase64(hash);\n};\n\nexport const shaHMAC = async (secret: string, content: string): Promise<string> => {\n const importParams: HmacImportParams = { name: \"HMAC\", hash: { name: \"SHA-256\" } };\n const encodedMessage = encodeUTF8(content);\n const encodedKey = encodeUTF8fromBase64(secret);\n const cryptoKey = await subtleCrypto.importKey(\"raw\", encodedKey, importParams, false, [\"sign\"]);\n const signature = await subtleCrypto.sign(importParams, cryptoKey, encodedMessage);\n return encodeBase64(signature);\n};\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
3
|
/// <reference lib="dom" />
|
|
4
|
-
import { encodeBase64, encodeUTF8, encodeUTF8fromBase64 } from "./encodeUtils
|
|
4
|
+
import { encodeBase64, encodeUTF8, encodeUTF8fromBase64 } from "./encodeUtils-browser.mjs";
|
|
5
5
|
const subtleCrypto = globalThis.crypto.subtle;
|
|
6
6
|
export const shaHash = async (content) => {
|
|
7
7
|
const data = encodeUTF8(content);
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const encodeUTF8: (str: string) => Uint8Array<ArrayBuffer>;
|
|
2
|
+
export declare function encodeUTF8fromBase64(str: string): Uint8Array<ArrayBuffer>;
|
|
3
|
+
export declare function encodeBase64(value: ArrayBuffer): string;
|
|
4
|
+
//# sourceMappingURL=encodeUtils-browser.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"encodeUtils-browser.d.mts","sourceRoot":"","sources":["../../../src/credential/encodeUtils-browser.mts"],"names":[],"mappings":"AAGA,eAAO,MAAM,UAAU,GAAI,KAAK,MAAM,KAAG,UAAU,CAAC,WAAW,CAAkC,CAAC;AAElG,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAAC,WAAW,CAAC,CAMzE;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAOvD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"encodeUtils-browser.mjs","sourceRoot":"","sources":["../../../src/credential/encodeUtils-browser.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,GAAW,EAA2B,EAAE,CAAC,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AAElG,MAAM,UAAU,oBAAoB,CAAC,GAAW;IAC9C,IAAI,OAAO,IAAI,KAAK,UAAU,EAAE,CAAC;QAC/B,MAAM,IAAI,KAAK,CAAC,gEAAgE,CAAC,CAAC;IACpF,CAAC;IACD,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;IACzB,OAAO,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/D,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,KAAkB;IAC7C,IAAI,OAAO,IAAI,KAAK,UAAU,EAAE,CAAC;QAC/B,MAAM,IAAI,KAAK,CAAC,gEAAgE,CAAC,CAAC;IACpF,CAAC;IACD,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC;IACpC,MAAM,MAAM,GAAG,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC;IAC3D,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC;AACtB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport const encodeUTF8 = (str: string): Uint8Array<ArrayBuffer> => new TextEncoder().encode(str);\n\nexport function encodeUTF8fromBase64(str: string): Uint8Array<ArrayBuffer> {\n if (typeof atob !== \"function\") {\n throw new Error(\"Your browser environment is missing the global `atob` function\");\n }\n const binary = atob(str);\n return Uint8Array.from(binary, (char) => char.charCodeAt(0));\n}\n\nexport function encodeBase64(value: ArrayBuffer): string {\n if (typeof btoa !== \"function\") {\n throw new Error(\"Your browser environment is missing the global `btoa` function\");\n }\n const bytes = new Uint8Array(value);\n const binary = String.fromCharCode.apply(null, [...bytes]);\n return btoa(binary);\n}\n"]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const encodeUTF8: (str: string) => Uint8Array<ArrayBuffer>;
|
|
2
|
+
export declare function encodeUTF8fromBase64(str: string): Uint8Array<ArrayBuffer>;
|
|
3
|
+
export declare function encodeBase64(value: ArrayBuffer): string;
|
|
4
|
+
//# sourceMappingURL=encodeUtils-browser.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"encodeUtils-browser.d.mts","sourceRoot":"","sources":["../../../src/credential/encodeUtils-browser.mts"],"names":[],"mappings":"AAGA,eAAO,MAAM,UAAU,GAAI,KAAK,MAAM,KAAG,UAAU,CAAC,WAAW,CAAkC,CAAC;AAElG,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAAC,WAAW,CAAC,CAMzE;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAOvD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"encodeUtils-browser.mjs","sourceRoot":"","sources":["../../../src/credential/encodeUtils-browser.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,GAAW,EAA2B,EAAE,CAAC,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AAElG,MAAM,UAAU,oBAAoB,CAAC,GAAW;IAC9C,IAAI,OAAO,IAAI,KAAK,UAAU,EAAE,CAAC;QAC/B,MAAM,IAAI,KAAK,CAAC,gEAAgE,CAAC,CAAC;IACpF,CAAC;IACD,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;IACzB,OAAO,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/D,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,KAAkB;IAC7C,IAAI,OAAO,IAAI,KAAK,UAAU,EAAE,CAAC;QAC/B,MAAM,IAAI,KAAK,CAAC,gEAAgE,CAAC,CAAC;IACpF,CAAC;IACD,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC;IACpC,MAAM,MAAM,GAAG,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC;IAC3D,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC;AACtB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport const encodeUTF8 = (str: string): Uint8Array<ArrayBuffer> => new TextEncoder().encode(str);\n\nexport function encodeUTF8fromBase64(str: string): Uint8Array<ArrayBuffer> {\n if (typeof atob !== \"function\") {\n throw new Error(\"Your browser environment is missing the global `atob` function\");\n }\n const binary = atob(str);\n return Uint8Array.from(binary, (char) => char.charCodeAt(0));\n}\n\nexport function encodeBase64(value: ArrayBuffer): string {\n if (typeof btoa !== \"function\") {\n throw new Error(\"Your browser environment is missing the global `btoa` function\");\n }\n const bytes = new Uint8Array(value);\n const binary = String.fromCharCode.apply(null, [...bytes]);\n return btoa(binary);\n}\n"]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const encodeUTF8: (str: string) => Uint8Array<ArrayBuffer>;
|
|
2
|
+
export declare function encodeUTF8fromBase64(str: string): Uint8Array<ArrayBuffer>;
|
|
3
|
+
export declare function encodeBase64(value: ArrayBuffer): string;
|
|
4
|
+
//# sourceMappingURL=encodeUtils-browser.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"encodeUtils-browser.d.mts","sourceRoot":"","sources":["../../../src/credential/encodeUtils-browser.mts"],"names":[],"mappings":"AAGA,eAAO,MAAM,UAAU,GAAI,KAAK,MAAM,KAAG,UAAU,CAAC,WAAW,CAAkC,CAAC;AAElG,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAAC,WAAW,CAAC,CAMzE;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAOvD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"encodeUtils-browser.mjs","sourceRoot":"","sources":["../../../src/credential/encodeUtils-browser.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,GAAW,EAA2B,EAAE,CAAC,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AAElG,MAAM,UAAU,oBAAoB,CAAC,GAAW;IAC9C,IAAI,OAAO,IAAI,KAAK,UAAU,EAAE,CAAC;QAC/B,MAAM,IAAI,KAAK,CAAC,gEAAgE,CAAC,CAAC;IACpF,CAAC;IACD,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;IACzB,OAAO,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/D,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,KAAkB;IAC7C,IAAI,OAAO,IAAI,KAAK,UAAU,EAAE,CAAC;QAC/B,MAAM,IAAI,KAAK,CAAC,gEAAgE,CAAC,CAAC;IACpF,CAAC;IACD,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC;IACpC,MAAM,MAAM,GAAG,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC;IAC3D,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC;AACtB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport const encodeUTF8 = (str: string): Uint8Array<ArrayBuffer> => new TextEncoder().encode(str);\n\nexport function encodeUTF8fromBase64(str: string): Uint8Array<ArrayBuffer> {\n if (typeof atob !== \"function\") {\n throw new Error(\"Your browser environment is missing the global `atob` function\");\n }\n const binary = atob(str);\n return Uint8Array.from(binary, (char) => char.charCodeAt(0));\n}\n\nexport function encodeBase64(value: ArrayBuffer): string {\n if (typeof btoa !== \"function\") {\n throw new Error(\"Your browser environment is missing the global `btoa` function\");\n }\n const bytes = new Uint8Array(value);\n const binary = String.fromCharCode.apply(null, [...bytes]);\n return btoa(binary);\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azure/communication-common",
|
|
3
|
-
"version": "2.4.1",
|
|
3
|
+
"version": "2.4.2-alpha.20251021.1",
|
|
4
4
|
"description": "Common package for Azure Communication services.",
|
|
5
5
|
"sdk-type": "client",
|
|
6
6
|
"main": "./dist/commonjs/index.js",
|
|
@@ -32,29 +32,33 @@
|
|
|
32
32
|
"sideEffects": false,
|
|
33
33
|
"prettier": "@azure/eslint-plugin-azure-sdk/prettier.json",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@azure-rest/core-client": "
|
|
36
|
-
"@azure/abort-controller": "
|
|
37
|
-
"@azure/core-auth": "
|
|
38
|
-
"@azure/core-rest-pipeline": "
|
|
39
|
-
"@azure/core-tracing": "
|
|
40
|
-
"@azure/core-util": "
|
|
35
|
+
"@azure-rest/core-client": ">=2.5.1-alpha <2.5.1-alphb",
|
|
36
|
+
"@azure/abort-controller": ">=2.1.3-alpha <2.1.3-alphb",
|
|
37
|
+
"@azure/core-auth": ">=1.10.1-alpha <1.10.1-alphb",
|
|
38
|
+
"@azure/core-rest-pipeline": ">=1.22.1-alpha <1.22.1-alphb",
|
|
39
|
+
"@azure/core-tracing": ">=1.3.1-alpha <1.3.1-alphb",
|
|
40
|
+
"@azure/core-util": ">=1.13.1-alpha <1.13.1-alphb",
|
|
41
41
|
"events": "^3.3.0",
|
|
42
42
|
"jwt-decode": "^4.0.0",
|
|
43
43
|
"tslib": "^2.8.1"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@azure/identity": "4.11.1",
|
|
47
|
-
"@azure/logger": "
|
|
47
|
+
"@azure/logger": ">=1.3.1-alpha <1.3.1-alphb",
|
|
48
48
|
"@types/node": "^20.19.0",
|
|
49
49
|
"@vitest/browser": "^3.2.3",
|
|
50
50
|
"@vitest/coverage-istanbul": "^3.2.3",
|
|
51
|
+
"cross-env": "^7.0.3",
|
|
51
52
|
"eslint": "^9.33.0",
|
|
52
53
|
"mockdate": "^3.0.5",
|
|
53
54
|
"nock": "^13.5.4",
|
|
54
55
|
"playwright": "^1.50.1",
|
|
55
|
-
"
|
|
56
|
+
"prettier": "^3.6.2",
|
|
57
|
+
"rimraf": "^6.0.1",
|
|
58
|
+
"tshy": "^3.0.0",
|
|
59
|
+
"typescript": "~5.9.3",
|
|
56
60
|
"vitest": "^3.2.3",
|
|
57
|
-
"@azure-tools/test-utils-vitest": "^
|
|
61
|
+
"@azure-tools/test-utils-vitest": "^2.0.1",
|
|
58
62
|
"@azure/eslint-plugin-azure-sdk": "^3.0.0",
|
|
59
63
|
"@azure/dev-tool": "^1.0.0"
|
|
60
64
|
},
|
|
@@ -99,19 +103,18 @@
|
|
|
99
103
|
"scripts": {
|
|
100
104
|
"build": "npm run clean && dev-tool run build-package && dev-tool run extract-api",
|
|
101
105
|
"build:samples": "echo Skipped.",
|
|
102
|
-
"check-format": "
|
|
103
|
-
"clean": "
|
|
106
|
+
"check-format": "prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"",
|
|
107
|
+
"clean": "rimraf --glob dist dist-* temp types *.tgz *.log",
|
|
104
108
|
"execute:samples": "echo skipped",
|
|
105
109
|
"extract-api": "dev-tool run build-package && dev-tool run extract-api",
|
|
106
|
-
"format": "
|
|
110
|
+
"format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"",
|
|
107
111
|
"lint": "eslint package.json src test",
|
|
108
112
|
"lint:fix": "eslint package.json src test --fix --fix-type [problem,suggestion]",
|
|
109
113
|
"pack": "pnpm pack 2>&1",
|
|
110
114
|
"test": "npm run test:node && npm run test:browser",
|
|
111
115
|
"test:browser": "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --no-test-proxy --browser",
|
|
112
|
-
"test:node": "dev-tool run test:vitest --no-test-proxy",
|
|
113
|
-
"test:node:
|
|
114
|
-
"test:node:live": "dev-tool run test:vitest --no-test-proxy --esm",
|
|
116
|
+
"test:node": "dev-tool run build-test --no-browser-test && dev-tool run test:vitest --no-test-proxy",
|
|
117
|
+
"test:node:live": "dev-tool run test:vitest --no-test-proxy",
|
|
115
118
|
"update-snippets": "dev-tool run update-snippets"
|
|
116
119
|
}
|
|
117
120
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"encodeUtils.browser.d.ts","sourceRoot":"","sources":["../../../src/credential/encodeUtils.browser.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,UAAU,GAAI,KAAK,MAAM,KAAG,UAA2C,CAAC;AAErF,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAM5D;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAOvD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"encodeUtils.browser.js","sourceRoot":"","sources":["../../../src/credential/encodeUtils.browser.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,GAAW,EAAc,EAAE,CAAC,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AAErF,MAAM,UAAU,oBAAoB,CAAC,GAAW;IAC9C,IAAI,OAAO,IAAI,KAAK,UAAU,EAAE,CAAC;QAC/B,MAAM,IAAI,KAAK,CAAC,gEAAgE,CAAC,CAAC;IACpF,CAAC;IACD,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;IACzB,OAAO,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/D,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,KAAkB;IAC7C,IAAI,OAAO,IAAI,KAAK,UAAU,EAAE,CAAC;QAC/B,MAAM,IAAI,KAAK,CAAC,gEAAgE,CAAC,CAAC;IACpF,CAAC;IACD,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC;IACpC,MAAM,MAAM,GAAG,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC;IAC3D,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC;AACtB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport const encodeUTF8 = (str: string): Uint8Array => new TextEncoder().encode(str);\n\nexport function encodeUTF8fromBase64(str: string): Uint8Array {\n if (typeof atob !== \"function\") {\n throw new Error(\"Your browser environment is missing the global `atob` function\");\n }\n const binary = atob(str);\n return Uint8Array.from(binary, (char) => char.charCodeAt(0));\n}\n\nexport function encodeBase64(value: ArrayBuffer): string {\n if (typeof btoa !== \"function\") {\n throw new Error(\"Your browser environment is missing the global `btoa` function\");\n }\n const bytes = new Uint8Array(value);\n const binary = String.fromCharCode.apply(null, [...bytes]);\n return btoa(binary);\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"encodeUtils.browser.d.ts","sourceRoot":"","sources":["../../../src/credential/encodeUtils.browser.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,UAAU,GAAI,KAAK,MAAM,KAAG,UAA2C,CAAC;AAErF,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAM5D;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAOvD"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright (c) Microsoft Corporation.
|
|
3
|
-
// Licensed under the MIT License.
|
|
4
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.encodeUTF8 = void 0;
|
|
6
|
-
exports.encodeUTF8fromBase64 = encodeUTF8fromBase64;
|
|
7
|
-
exports.encodeBase64 = encodeBase64;
|
|
8
|
-
const encodeUTF8 = (str) => new TextEncoder().encode(str);
|
|
9
|
-
exports.encodeUTF8 = encodeUTF8;
|
|
10
|
-
function encodeUTF8fromBase64(str) {
|
|
11
|
-
if (typeof atob !== "function") {
|
|
12
|
-
throw new Error("Your browser environment is missing the global `atob` function");
|
|
13
|
-
}
|
|
14
|
-
const binary = atob(str);
|
|
15
|
-
return Uint8Array.from(binary, (char) => char.charCodeAt(0));
|
|
16
|
-
}
|
|
17
|
-
function encodeBase64(value) {
|
|
18
|
-
if (typeof btoa !== "function") {
|
|
19
|
-
throw new Error("Your browser environment is missing the global `btoa` function");
|
|
20
|
-
}
|
|
21
|
-
const bytes = new Uint8Array(value);
|
|
22
|
-
const binary = String.fromCharCode.apply(null, [...bytes]);
|
|
23
|
-
return btoa(binary);
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=encodeUtils.browser.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"encodeUtils.browser.js","sourceRoot":"","sources":["../../../src/credential/encodeUtils.browser.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAIlC,oDAMC;AAED,oCAOC;AAjBM,MAAM,UAAU,GAAG,CAAC,GAAW,EAAc,EAAE,CAAC,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AAAxE,QAAA,UAAU,cAA8D;AAErF,SAAgB,oBAAoB,CAAC,GAAW;IAC9C,IAAI,OAAO,IAAI,KAAK,UAAU,EAAE,CAAC;QAC/B,MAAM,IAAI,KAAK,CAAC,gEAAgE,CAAC,CAAC;IACpF,CAAC;IACD,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;IACzB,OAAO,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/D,CAAC;AAED,SAAgB,YAAY,CAAC,KAAkB;IAC7C,IAAI,OAAO,IAAI,KAAK,UAAU,EAAE,CAAC;QAC/B,MAAM,IAAI,KAAK,CAAC,gEAAgE,CAAC,CAAC;IACpF,CAAC;IACD,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC;IACpC,MAAM,MAAM,GAAG,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC;IAC3D,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC;AACtB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport const encodeUTF8 = (str: string): Uint8Array => new TextEncoder().encode(str);\n\nexport function encodeUTF8fromBase64(str: string): Uint8Array {\n if (typeof atob !== \"function\") {\n throw new Error(\"Your browser environment is missing the global `atob` function\");\n }\n const binary = atob(str);\n return Uint8Array.from(binary, (char) => char.charCodeAt(0));\n}\n\nexport function encodeBase64(value: ArrayBuffer): string {\n if (typeof btoa !== \"function\") {\n throw new Error(\"Your browser environment is missing the global `btoa` function\");\n }\n const bytes = new Uint8Array(value);\n const binary = String.fromCharCode.apply(null, [...bytes]);\n return btoa(binary);\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"encodeUtils.browser.d.ts","sourceRoot":"","sources":["../../../src/credential/encodeUtils.browser.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,UAAU,GAAI,KAAK,MAAM,KAAG,UAA2C,CAAC;AAErF,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAM5D;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAOvD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"encodeUtils.browser.js","sourceRoot":"","sources":["../../../src/credential/encodeUtils.browser.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,GAAW,EAAc,EAAE,CAAC,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AAErF,MAAM,UAAU,oBAAoB,CAAC,GAAW;IAC9C,IAAI,OAAO,IAAI,KAAK,UAAU,EAAE,CAAC;QAC/B,MAAM,IAAI,KAAK,CAAC,gEAAgE,CAAC,CAAC;IACpF,CAAC;IACD,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;IACzB,OAAO,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/D,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,KAAkB;IAC7C,IAAI,OAAO,IAAI,KAAK,UAAU,EAAE,CAAC;QAC/B,MAAM,IAAI,KAAK,CAAC,gEAAgE,CAAC,CAAC;IACpF,CAAC;IACD,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC;IACpC,MAAM,MAAM,GAAG,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC;IAC3D,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC;AACtB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport const encodeUTF8 = (str: string): Uint8Array => new TextEncoder().encode(str);\n\nexport function encodeUTF8fromBase64(str: string): Uint8Array {\n if (typeof atob !== \"function\") {\n throw new Error(\"Your browser environment is missing the global `atob` function\");\n }\n const binary = atob(str);\n return Uint8Array.from(binary, (char) => char.charCodeAt(0));\n}\n\nexport function encodeBase64(value: ArrayBuffer): string {\n if (typeof btoa !== \"function\") {\n throw new Error(\"Your browser environment is missing the global `btoa` function\");\n }\n const bytes = new Uint8Array(value);\n const binary = String.fromCharCode.apply(null, [...bytes]);\n return btoa(binary);\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"encodeUtils.browser.d.ts","sourceRoot":"","sources":["../../../src/credential/encodeUtils.browser.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,UAAU,GAAI,KAAK,MAAM,KAAG,UAA2C,CAAC;AAErF,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAM5D;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAOvD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"encodeUtils.browser.js","sourceRoot":"","sources":["../../../src/credential/encodeUtils.browser.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,GAAW,EAAc,EAAE,CAAC,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AAErF,MAAM,UAAU,oBAAoB,CAAC,GAAW;IAC9C,IAAI,OAAO,IAAI,KAAK,UAAU,EAAE,CAAC;QAC/B,MAAM,IAAI,KAAK,CAAC,gEAAgE,CAAC,CAAC;IACpF,CAAC;IACD,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;IACzB,OAAO,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/D,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,KAAkB;IAC7C,IAAI,OAAO,IAAI,KAAK,UAAU,EAAE,CAAC;QAC/B,MAAM,IAAI,KAAK,CAAC,gEAAgE,CAAC,CAAC;IACpF,CAAC;IACD,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC;IACpC,MAAM,MAAM,GAAG,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC;IAC3D,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC;AACtB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport const encodeUTF8 = (str: string): Uint8Array => new TextEncoder().encode(str);\n\nexport function encodeUTF8fromBase64(str: string): Uint8Array {\n if (typeof atob !== \"function\") {\n throw new Error(\"Your browser environment is missing the global `atob` function\");\n }\n const binary = atob(str);\n return Uint8Array.from(binary, (char) => char.charCodeAt(0));\n}\n\nexport function encodeBase64(value: ArrayBuffer): string {\n if (typeof btoa !== \"function\") {\n throw new Error(\"Your browser environment is missing the global `btoa` function\");\n }\n const bytes = new Uint8Array(value);\n const binary = String.fromCharCode.apply(null, [...bytes]);\n return btoa(binary);\n}\n"]}
|