@aws-amplify/core 6.3.13-unstable.969686f.0 → 6.3.13-unstable.ced891c.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/dist/cjs/Platform/version.js +1 -1
- package/dist/cjs/Platform/version.js.map +1 -1
- package/dist/cjs/utils/convert/base64/base64Encoder.js +20 -6
- package/dist/cjs/utils/convert/base64/base64Encoder.js.map +1 -1
- package/dist/esm/Platform/version.d.ts +1 -1
- package/dist/esm/Platform/version.mjs +1 -1
- package/dist/esm/Platform/version.mjs.map +1 -1
- package/dist/esm/utils/convert/base64/base64Encoder.d.ts +1 -1
- package/dist/esm/utils/convert/base64/base64Encoder.mjs +20 -6
- package/dist/esm/utils/convert/base64/base64Encoder.mjs.map +1 -1
- package/dist/esm/utils/convert/types.d.ts +1 -0
- package/package.json +3 -3
- package/src/Platform/version.ts +1 -1
- package/src/utils/convert/base64/base64Encoder.ts +26 -7
- package/src/utils/convert/types.ts +1 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sources":["../../../src/Platform/version.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.version = void 0;\n// generated by genversion\nexports.version = '6.5.4-unstable.
|
|
1
|
+
{"version":3,"file":"version.js","sources":["../../../src/Platform/version.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.version = void 0;\n// generated by genversion\nexports.version = '6.5.4-unstable.ced891c.0+ced891c';\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,OAAO,GAAG,KAAK,CAAC,CAAC;AACzB;AACA,OAAO,CAAC,OAAO,GAAG,kCAAkC;;"}
|
|
@@ -7,13 +7,27 @@ exports.base64Encoder = void 0;
|
|
|
7
7
|
const globalHelpers_1 = require("../../globalHelpers");
|
|
8
8
|
const bytesToString_1 = require("./bytesToString");
|
|
9
9
|
exports.base64Encoder = {
|
|
10
|
-
|
|
10
|
+
/**
|
|
11
|
+
* Convert input to base64-encoded string
|
|
12
|
+
* @param input - string to convert to base64
|
|
13
|
+
* @param options - encoding options that can optionally produce a base64url string
|
|
14
|
+
* @returns base64-encoded string
|
|
15
|
+
*/
|
|
16
|
+
convert(input, options = {
|
|
17
|
+
urlSafe: false,
|
|
18
|
+
skipPadding: false,
|
|
19
|
+
}) {
|
|
11
20
|
const inputStr = typeof input === 'string' ? input : (0, bytesToString_1.bytesToString)(input);
|
|
12
|
-
|
|
13
|
-
//
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
21
|
+
let encodedStr = (0, globalHelpers_1.getBtoa)()(inputStr);
|
|
22
|
+
// urlSafe char replacement and skipPadding options conform to the base64url spec
|
|
23
|
+
// https://datatracker.ietf.org/doc/html/rfc4648#section-5
|
|
24
|
+
if (options.urlSafe) {
|
|
25
|
+
encodedStr = encodedStr.replace(/\+/g, '-').replace(/\//g, '_');
|
|
26
|
+
}
|
|
27
|
+
if (options.skipPadding) {
|
|
28
|
+
encodedStr = encodedStr.replace(/=/g, '');
|
|
29
|
+
}
|
|
30
|
+
return encodedStr;
|
|
17
31
|
},
|
|
18
32
|
};
|
|
19
33
|
//# sourceMappingURL=base64Encoder.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base64Encoder.js","sources":["../../../../../src/utils/convert/base64/base64Encoder.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.base64Encoder = void 0;\nconst globalHelpers_1 = require(\"../../globalHelpers\");\nconst bytesToString_1 = require(\"./bytesToString\");\nexports.base64Encoder = {\n convert(input,
|
|
1
|
+
{"version":3,"file":"base64Encoder.js","sources":["../../../../../src/utils/convert/base64/base64Encoder.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.base64Encoder = void 0;\nconst globalHelpers_1 = require(\"../../globalHelpers\");\nconst bytesToString_1 = require(\"./bytesToString\");\nexports.base64Encoder = {\n /**\n * Convert input to base64-encoded string\n * @param input - string to convert to base64\n * @param options - encoding options that can optionally produce a base64url string\n * @returns base64-encoded string\n */\n convert(input, options = {\n urlSafe: false,\n skipPadding: false,\n }) {\n const inputStr = typeof input === 'string' ? input : (0, bytesToString_1.bytesToString)(input);\n let encodedStr = (0, globalHelpers_1.getBtoa)()(inputStr);\n // urlSafe char replacement and skipPadding options conform to the base64url spec\n // https://datatracker.ietf.org/doc/html/rfc4648#section-5\n if (options.urlSafe) {\n encodedStr = encodedStr.replace(/\\+/g, '-').replace(/\\//g, '_');\n }\n if (options.skipPadding) {\n encodedStr = encodedStr.replace(/=/g, '');\n }\n return encodedStr;\n },\n};\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,aAAa,GAAG,KAAK,CAAC,CAAC;AAC/B,MAAM,eAAe,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;AACvD,MAAM,eAAe,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AACnD,OAAO,CAAC,aAAa,GAAG;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG;AAC7B,QAAQ,OAAO,EAAE,KAAK;AACtB,QAAQ,WAAW,EAAE,KAAK;AAC1B,KAAK,EAAE;AACP,QAAQ,MAAM,QAAQ,GAAG,OAAO,KAAK,KAAK,QAAQ,GAAG,KAAK,GAAG,IAAI,eAAe,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;AACvG,QAAQ,IAAI,UAAU,GAAG,IAAI,eAAe,CAAC,OAAO,GAAG,CAAC,QAAQ,CAAC,CAAC;AAClE;AACA;AACA,QAAQ,IAAI,OAAO,CAAC,OAAO,EAAE;AAC7B,YAAY,UAAU,GAAG,UAAU,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;AAC5E,SAAS;AACT,QAAQ,IAAI,OAAO,CAAC,WAAW,EAAE;AACjC,YAAY,UAAU,GAAG,UAAU,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;AACtD,SAAS;AACT,QAAQ,OAAO,UAAU,CAAC;AAC1B,KAAK;AACL,CAAC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "6.5.4-unstable.
|
|
1
|
+
export declare const version = "6.5.4-unstable.ced891c.0+ced891c";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.mjs","sources":["../../../src/Platform/version.ts"],"sourcesContent":["// generated by genversion\nexport const version = '6.5.4-unstable.
|
|
1
|
+
{"version":3,"file":"version.mjs","sources":["../../../src/Platform/version.ts"],"sourcesContent":["// generated by genversion\nexport const version = '6.5.4-unstable.ced891c.0+ced891c';\n"],"names":[],"mappings":"AAAA;AACY,MAAC,OAAO,GAAG;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Base64Encoder } from '../types';
|
|
1
|
+
import type { Base64Encoder } from '../types';
|
|
2
2
|
export declare const base64Encoder: Base64Encoder;
|
|
@@ -4,13 +4,27 @@ import { bytesToString } from './bytesToString.mjs';
|
|
|
4
4
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
5
5
|
// SPDX-License-Identifier: Apache-2.0
|
|
6
6
|
const base64Encoder = {
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Convert input to base64-encoded string
|
|
9
|
+
* @param input - string to convert to base64
|
|
10
|
+
* @param options - encoding options that can optionally produce a base64url string
|
|
11
|
+
* @returns base64-encoded string
|
|
12
|
+
*/
|
|
13
|
+
convert(input, options = {
|
|
14
|
+
urlSafe: false,
|
|
15
|
+
skipPadding: false,
|
|
16
|
+
}) {
|
|
8
17
|
const inputStr = typeof input === 'string' ? input : bytesToString(input);
|
|
9
|
-
|
|
10
|
-
//
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
18
|
+
let encodedStr = getBtoa()(inputStr);
|
|
19
|
+
// urlSafe char replacement and skipPadding options conform to the base64url spec
|
|
20
|
+
// https://datatracker.ietf.org/doc/html/rfc4648#section-5
|
|
21
|
+
if (options.urlSafe) {
|
|
22
|
+
encodedStr = encodedStr.replace(/\+/g, '-').replace(/\//g, '_');
|
|
23
|
+
}
|
|
24
|
+
if (options.skipPadding) {
|
|
25
|
+
encodedStr = encodedStr.replace(/=/g, '');
|
|
26
|
+
}
|
|
27
|
+
return encodedStr;
|
|
14
28
|
},
|
|
15
29
|
};
|
|
16
30
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base64Encoder.mjs","sources":["../../../../../src/utils/convert/base64/base64Encoder.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { getBtoa } from '../../globalHelpers';\nimport { bytesToString } from './bytesToString';\nexport const base64Encoder = {\n convert(input,
|
|
1
|
+
{"version":3,"file":"base64Encoder.mjs","sources":["../../../../../src/utils/convert/base64/base64Encoder.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { getBtoa } from '../../globalHelpers';\nimport { bytesToString } from './bytesToString';\nexport const base64Encoder = {\n /**\n * Convert input to base64-encoded string\n * @param input - string to convert to base64\n * @param options - encoding options that can optionally produce a base64url string\n * @returns base64-encoded string\n */\n convert(input, options = {\n urlSafe: false,\n skipPadding: false,\n }) {\n const inputStr = typeof input === 'string' ? input : bytesToString(input);\n let encodedStr = getBtoa()(inputStr);\n // urlSafe char replacement and skipPadding options conform to the base64url spec\n // https://datatracker.ietf.org/doc/html/rfc4648#section-5\n if (options.urlSafe) {\n encodedStr = encodedStr.replace(/\\+/g, '-').replace(/\\//g, '_');\n }\n if (options.skipPadding) {\n encodedStr = encodedStr.replace(/=/g, '');\n }\n return encodedStr;\n },\n};\n"],"names":[],"mappings":";;;AAAA;AACA;AAGY,MAAC,aAAa,GAAG;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG;AAC7B,QAAQ,OAAO,EAAE,KAAK;AACtB,QAAQ,WAAW,EAAE,KAAK;AAC1B,KAAK,EAAE;AACP,QAAQ,MAAM,QAAQ,GAAG,OAAO,KAAK,KAAK,QAAQ,GAAG,KAAK,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;AAClF,QAAQ,IAAI,UAAU,GAAG,OAAO,EAAE,CAAC,QAAQ,CAAC,CAAC;AAC7C;AACA;AACA,QAAQ,IAAI,OAAO,CAAC,OAAO,EAAE;AAC7B,YAAY,UAAU,GAAG,UAAU,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;AAC5E,SAAS;AACT,QAAQ,IAAI,OAAO,CAAC,WAAW,EAAE;AACjC,YAAY,UAAU,GAAG,UAAU,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;AACtD,SAAS;AACT,QAAQ,OAAO,UAAU,CAAC;AAC1B,KAAK;AACL;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-amplify/core",
|
|
3
|
-
"version": "6.3.13-unstable.
|
|
3
|
+
"version": "6.3.13-unstable.ced891c.0+ced891c",
|
|
4
4
|
"description": "Core category of aws-amplify",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.mjs",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"uuid": "^9.0.0"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"@aws-amplify/react-native": "1.1.5-unstable.
|
|
63
|
+
"@aws-amplify/react-native": "1.1.5-unstable.ced891c.0+ced891c",
|
|
64
64
|
"@types/js-cookie": "3.0.2",
|
|
65
65
|
"genversion": "^2.2.0",
|
|
66
66
|
"typescript": "5.0.2"
|
|
@@ -192,5 +192,5 @@
|
|
|
192
192
|
]
|
|
193
193
|
}
|
|
194
194
|
},
|
|
195
|
-
"gitHead": "
|
|
195
|
+
"gitHead": "ced891c2e4f6b0f1fdeaf44ab80cae9d585b6d15"
|
|
196
196
|
}
|
package/src/Platform/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// generated by genversion
|
|
2
|
-
export const version = '6.5.4-unstable.
|
|
2
|
+
export const version = '6.5.4-unstable.ced891c.0+ced891c';
|
|
@@ -2,18 +2,37 @@
|
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
4
|
import { getBtoa } from '../../globalHelpers';
|
|
5
|
-
import { Base64Encoder } from '../types';
|
|
5
|
+
import type { Base64Encoder, Base64EncoderConvertOptions } from '../types';
|
|
6
6
|
|
|
7
7
|
import { bytesToString } from './bytesToString';
|
|
8
8
|
|
|
9
9
|
export const base64Encoder: Base64Encoder = {
|
|
10
|
-
|
|
10
|
+
/**
|
|
11
|
+
* Convert input to base64-encoded string
|
|
12
|
+
* @param input - string to convert to base64
|
|
13
|
+
* @param options - encoding options that can optionally produce a base64url string
|
|
14
|
+
* @returns base64-encoded string
|
|
15
|
+
*/
|
|
16
|
+
convert(
|
|
17
|
+
input,
|
|
18
|
+
options: Base64EncoderConvertOptions = {
|
|
19
|
+
urlSafe: false,
|
|
20
|
+
skipPadding: false,
|
|
21
|
+
},
|
|
22
|
+
) {
|
|
11
23
|
const inputStr = typeof input === 'string' ? input : bytesToString(input);
|
|
12
|
-
|
|
24
|
+
let encodedStr = getBtoa()(inputStr);
|
|
13
25
|
|
|
14
|
-
//
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
26
|
+
// urlSafe char replacement and skipPadding options conform to the base64url spec
|
|
27
|
+
// https://datatracker.ietf.org/doc/html/rfc4648#section-5
|
|
28
|
+
if (options.urlSafe) {
|
|
29
|
+
encodedStr = encodedStr.replace(/\+/g, '-').replace(/\//g, '_');
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
if (options.skipPadding) {
|
|
33
|
+
encodedStr = encodedStr.replace(/=/g, '');
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
return encodedStr;
|
|
18
37
|
},
|
|
19
38
|
};
|