@jjrawlins/cdk-iam-policy-builder-helper 0.0.52 → 0.0.54
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/.jsii +3 -3
- package/cdk-iam-policy-builder-helper/jsii/jsii.go +2 -2
- package/cdk-iam-policy-builder-helper/version +1 -1
- package/node_modules/@aws-sdk/client-iam/dist-cjs/index.js +13439 -13574
- package/node_modules/@aws-sdk/client-iam/package.json +6 -6
- package/node_modules/@aws-sdk/client-sso/dist-cjs/index.js +478 -596
- package/node_modules/@aws-sdk/client-sso/package.json +5 -5
- package/node_modules/@aws-sdk/core/dist-cjs/index.js +1969 -6
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/account-id-endpoint/index.js +48 -88
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.js +35 -74
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/httpAuthSchemes/index.js +273 -365
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +1581 -1863
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJsonRpcProtocol.js +2 -2
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsRestJsonProtocol.js +2 -2
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeDeserializer.js +4 -4
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeSerializer.js +4 -4
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsQueryProtocol.js +3 -3
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/QueryShapeSerializer.js +4 -4
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/AwsRestXmlProtocol.js +2 -2
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeSerializer.js +4 -4
- package/node_modules/@aws-sdk/core/dist-types/submodules/account-id-endpoint/AccountIdEndpointModeConfigResolver.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4ASigner.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4AConfig.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/ConfigurableSerdeContext.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/JsonCodec.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/JsonShapeDeserializer.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/JsonShapeSerializer.d.ts +2 -2
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/query/QuerySerializerSettings.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/xml/XmlCodec.d.ts +1 -1
- package/node_modules/@aws-sdk/core/package.json +1 -1
- package/node_modules/@aws-sdk/credential-provider-env/dist-cjs/index.js +38 -73
- package/node_modules/@aws-sdk/credential-provider-env/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-http/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js +194 -259
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +8 -8
- package/node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js +72 -132
- package/node_modules/@aws-sdk/credential-provider-node/package.json +7 -7
- package/node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js +71 -107
- package/node_modules/@aws-sdk/credential-provider-process/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js +176 -249
- package/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/loadSso-CVy8iqsZ.js +14 -0
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js +16 -25
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +3 -3
- package/node_modules/@aws-sdk/middleware-user-agent/dist-cjs/index.js +170 -203
- package/node_modules/@aws-sdk/middleware-user-agent/package.json +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/index.js +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +583 -858
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +795 -928
- package/node_modules/@aws-sdk/nested-clients/package.json +5 -5
- package/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +147 -222
- package/node_modules/@aws-sdk/token-providers/package.json +3 -3
- package/node_modules/@aws-sdk/util-user-agent-browser/README.md +22 -3
- package/node_modules/@aws-sdk/util-user-agent-browser/dist-cjs/createUserAgentStringParsingProvider.js +57 -0
- package/node_modules/@aws-sdk/util-user-agent-browser/dist-cjs/index.js +39 -8
- package/node_modules/@aws-sdk/util-user-agent-browser/dist-es/createUserAgentStringParsingProvider.js +20 -0
- package/node_modules/@aws-sdk/util-user-agent-browser/dist-es/index.js +37 -6
- package/node_modules/@aws-sdk/util-user-agent-browser/dist-types/createUserAgentStringParsingProvider.d.ts +14 -0
- package/node_modules/@aws-sdk/util-user-agent-browser/dist-types/index.d.ts +14 -4
- package/node_modules/@aws-sdk/util-user-agent-browser/dist-types/index.native.d.ts +4 -3
- package/node_modules/@aws-sdk/util-user-agent-browser/dist-types/ts3.4/createUserAgentStringParsingProvider.d.ts +9 -0
- package/node_modules/@aws-sdk/util-user-agent-browser/dist-types/ts3.4/index.d.ts +5 -0
- package/node_modules/@aws-sdk/util-user-agent-browser/package.json +1 -1
- package/node_modules/@aws-sdk/util-user-agent-node/dist-cjs/index.js +50 -94
- package/node_modules/@aws-sdk/util-user-agent-node/dist-types/crt-availability.d.ts +1 -2
- package/node_modules/@aws-sdk/util-user-agent-node/dist-types/defaultUserAgent.d.ts +10 -5
- package/node_modules/@aws-sdk/util-user-agent-node/package.json +2 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +1 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +5 -3
- package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +32 -30
- package/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +133 -202
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +126 -34
- package/node_modules/@smithy/core/dist-es/submodules/cbor/CborCodec.js +2 -2
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js +5 -3
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js +4 -4
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +3 -3
- package/node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js +2 -2
- package/node_modules/@smithy/core/dist-es/submodules/protocols/serde/FromStringShapeDeserializer.js +19 -17
- package/node_modules/@smithy/core/dist-es/submodules/protocols/serde/ToStringShapeSerializer.js +4 -4
- package/node_modules/@smithy/core/dist-es/submodules/protocols/serde/determineTimestampFormat.js +5 -6
- package/node_modules/@smithy/core/dist-es/submodules/schema/index.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js +82 -176
- package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/translateTraits.js +22 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/index.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/schema-serde-lib/schema-date-utils.js +110 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/value/NumericValue.js +4 -26
- package/node_modules/@smithy/core/dist-types/submodules/schema/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/NormalizedSchema.d.ts +5 -24
- package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/sentinels.d.ts +2 -0
- package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/translateTraits.d.ts +7 -0
- package/node_modules/@smithy/core/dist-types/submodules/serde/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/submodules/serde/schema-serde-lib/schema-date-utils.d.ts +47 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/NormalizedSchema.d.ts +5 -24
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/sentinels.d.ts +2 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/translateTraits.d.ts +7 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/schema-serde-lib/schema-date-utils.d.ts +47 -0
- package/node_modules/@smithy/core/package.json +3 -3
- package/node_modules/@smithy/fetch-http-handler/package.json +2 -2
- package/node_modules/@smithy/middleware-endpoint/package.json +2 -2
- package/node_modules/@smithy/middleware-retry/package.json +2 -2
- package/node_modules/@smithy/smithy-client/package.json +4 -4
- package/node_modules/@smithy/util-base64/dist-cjs/constants.browser.js +9 -32
- package/node_modules/@smithy/util-base64/dist-es/constants.browser.js +9 -28
- package/node_modules/@smithy/util-base64/dist-types/constants.browser.d.ts +5 -6
- package/node_modules/@smithy/util-base64/dist-types/ts3.4/constants.browser.d.ts +5 -6
- package/node_modules/@smithy/util-base64/package.json +1 -1
- package/node_modules/@smithy/util-body-length-node/dist-cjs/index.js +8 -6
- package/node_modules/@smithy/util-body-length-node/dist-es/calculateBodyLength.js +8 -6
- package/node_modules/@smithy/util-body-length-node/package.json +1 -1
- package/node_modules/@smithy/util-defaults-mode-browser/dist-cjs/resolveDefaultsModeConfig.js +11 -9
- package/node_modules/@smithy/util-defaults-mode-browser/dist-es/resolveDefaultsModeConfig.js +11 -8
- package/node_modules/@smithy/util-defaults-mode-browser/package.json +2 -3
- package/node_modules/@smithy/util-defaults-mode-node/package.json +2 -2
- package/node_modules/@smithy/util-stream/dist-cjs/index.js +3 -5
- package/node_modules/@smithy/util-stream/dist-es/blob/Uint8ArrayBlobAdapter.js +3 -5
- package/node_modules/@smithy/util-stream/dist-types/blob/Uint8ArrayBlobAdapter.d.ts +1 -0
- package/node_modules/@smithy/util-stream/dist-types/ts3.4/blob/Uint8ArrayBlobAdapter.d.ts +1 -0
- package/node_modules/@smithy/util-stream/package.json +3 -3
- package/package.json +3 -3
package/node_modules/@smithy/core/dist-es/submodules/serde/schema-serde-lib/schema-date-utils.js
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
const ddd = `(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?`;
|
|
2
|
+
const mmm = `(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)`;
|
|
3
|
+
const time = `(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?`;
|
|
4
|
+
const date = `(\\d?\\d)`;
|
|
5
|
+
const year = `(\\d{4})`;
|
|
6
|
+
const RFC3339_WITH_OFFSET = new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/);
|
|
7
|
+
const IMF_FIXDATE = new RegExp(`^${ddd}, ${date} ${mmm} ${year} ${time} GMT$`);
|
|
8
|
+
const RFC_850_DATE = new RegExp(`^${ddd}, ${date}-${mmm}-(\\d\\d) ${time} GMT$`);
|
|
9
|
+
const ASC_TIME = new RegExp(`^${ddd} ${mmm} ( [1-9]|\\d\\d) ${time} ${year}$`);
|
|
10
|
+
const months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
|
|
11
|
+
export const _parseEpochTimestamp = (value) => {
|
|
12
|
+
if (value == null) {
|
|
13
|
+
return void 0;
|
|
14
|
+
}
|
|
15
|
+
let num = NaN;
|
|
16
|
+
if (typeof value === "number") {
|
|
17
|
+
num = value;
|
|
18
|
+
}
|
|
19
|
+
else if (typeof value === "string") {
|
|
20
|
+
if (!/^-?\d*\.?\d+$/.test(value)) {
|
|
21
|
+
throw new TypeError(`parseEpochTimestamp - numeric string invalid.`);
|
|
22
|
+
}
|
|
23
|
+
num = Number.parseFloat(value);
|
|
24
|
+
}
|
|
25
|
+
else if (typeof value === "object" && value.tag === 1) {
|
|
26
|
+
num = value.value;
|
|
27
|
+
}
|
|
28
|
+
if (isNaN(num) || Math.abs(num) === Infinity) {
|
|
29
|
+
throw new TypeError("Epoch timestamps must be valid finite numbers.");
|
|
30
|
+
}
|
|
31
|
+
return new Date(Math.round(num * 1000));
|
|
32
|
+
};
|
|
33
|
+
export const _parseRfc3339DateTimeWithOffset = (value) => {
|
|
34
|
+
if (value == null) {
|
|
35
|
+
return void 0;
|
|
36
|
+
}
|
|
37
|
+
if (typeof value !== "string") {
|
|
38
|
+
throw new TypeError("RFC3339 timestamps must be strings");
|
|
39
|
+
}
|
|
40
|
+
const matches = RFC3339_WITH_OFFSET.exec(value);
|
|
41
|
+
if (!matches) {
|
|
42
|
+
throw new TypeError(`Invalid RFC3339 timestamp format ${value}`);
|
|
43
|
+
}
|
|
44
|
+
const [, yearStr, monthStr, dayStr, hours, minutes, seconds, , ms, offsetStr] = matches;
|
|
45
|
+
range(monthStr, 1, 12);
|
|
46
|
+
range(dayStr, 1, 31);
|
|
47
|
+
range(hours, 0, 23);
|
|
48
|
+
range(minutes, 0, 59);
|
|
49
|
+
range(seconds, 0, 60);
|
|
50
|
+
const date = new Date();
|
|
51
|
+
date.setUTCFullYear(Number(yearStr), Number(monthStr) - 1, Number(dayStr));
|
|
52
|
+
date.setUTCHours(Number(hours));
|
|
53
|
+
date.setUTCMinutes(Number(minutes));
|
|
54
|
+
date.setUTCSeconds(Number(seconds));
|
|
55
|
+
date.setUTCMilliseconds(Number(ms) ? Math.round(parseFloat(`0.${ms}`) * 1000) : 0);
|
|
56
|
+
if (offsetStr.toUpperCase() != "Z") {
|
|
57
|
+
const [, sign, offsetH, offsetM] = /([+-])(\d\d):(\d\d)/.exec(offsetStr) || [void 0, "+", 0, 0];
|
|
58
|
+
const scalar = sign === "-" ? 1 : -1;
|
|
59
|
+
date.setTime(date.getTime() + scalar * (Number(offsetH) * 60 * 60 * 1000 + Number(offsetM) * 60 * 1000));
|
|
60
|
+
}
|
|
61
|
+
return date;
|
|
62
|
+
};
|
|
63
|
+
export const _parseRfc7231DateTime = (value) => {
|
|
64
|
+
if (value == null) {
|
|
65
|
+
return void 0;
|
|
66
|
+
}
|
|
67
|
+
if (typeof value !== "string") {
|
|
68
|
+
throw new TypeError("RFC7231 timestamps must be strings.");
|
|
69
|
+
}
|
|
70
|
+
let day;
|
|
71
|
+
let month;
|
|
72
|
+
let year;
|
|
73
|
+
let hour;
|
|
74
|
+
let minute;
|
|
75
|
+
let second;
|
|
76
|
+
let fraction;
|
|
77
|
+
let matches;
|
|
78
|
+
if ((matches = IMF_FIXDATE.exec(value))) {
|
|
79
|
+
[, day, month, year, hour, minute, second, fraction] = matches;
|
|
80
|
+
}
|
|
81
|
+
else if ((matches = RFC_850_DATE.exec(value))) {
|
|
82
|
+
[, day, month, year, hour, minute, second, fraction] = matches;
|
|
83
|
+
year = (Number(year) + 1900).toString();
|
|
84
|
+
}
|
|
85
|
+
else if ((matches = ASC_TIME.exec(value))) {
|
|
86
|
+
[, month, day, hour, minute, second, fraction, year] = matches;
|
|
87
|
+
}
|
|
88
|
+
if (year && second) {
|
|
89
|
+
const date = new Date();
|
|
90
|
+
date.setUTCFullYear(Number(year));
|
|
91
|
+
date.setUTCMonth(months.indexOf(month));
|
|
92
|
+
range(day, 1, 31);
|
|
93
|
+
date.setUTCDate(Number(day));
|
|
94
|
+
range(hour, 0, 23);
|
|
95
|
+
date.setUTCHours(Number(hour));
|
|
96
|
+
range(minute, 0, 59);
|
|
97
|
+
date.setUTCMinutes(Number(minute));
|
|
98
|
+
range(second, 0, 60);
|
|
99
|
+
date.setUTCSeconds(Number(second));
|
|
100
|
+
date.setUTCMilliseconds(fraction ? Math.round(parseFloat(`0.${fraction}`) * 1000) : 0);
|
|
101
|
+
return date;
|
|
102
|
+
}
|
|
103
|
+
throw new TypeError(`Invalid RFC7231 date-time value ${value}.`);
|
|
104
|
+
};
|
|
105
|
+
function range(v, min, max) {
|
|
106
|
+
const _v = Number(v);
|
|
107
|
+
if (_v < min || _v > max) {
|
|
108
|
+
throw new Error(`Value ${_v} out of range [${min}, ${max}]`);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
@@ -1,25 +1,12 @@
|
|
|
1
|
+
const format = /^-?\d*(\.\d+)?$/;
|
|
1
2
|
export class NumericValue {
|
|
2
3
|
string;
|
|
3
4
|
type;
|
|
4
5
|
constructor(string, type) {
|
|
5
6
|
this.string = string;
|
|
6
7
|
this.type = type;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const char = string.charCodeAt(i);
|
|
10
|
-
if (i === 0 && char === 45) {
|
|
11
|
-
continue;
|
|
12
|
-
}
|
|
13
|
-
if (char === 46) {
|
|
14
|
-
if (dot) {
|
|
15
|
-
throw new Error("@smithy/core/serde - NumericValue must contain at most one decimal point.");
|
|
16
|
-
}
|
|
17
|
-
dot = 1;
|
|
18
|
-
continue;
|
|
19
|
-
}
|
|
20
|
-
if (char < 48 || char > 57) {
|
|
21
|
-
throw new Error(`@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".`);
|
|
22
|
-
}
|
|
8
|
+
if (!format.test(string)) {
|
|
9
|
+
throw new Error(`@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".`);
|
|
23
10
|
}
|
|
24
11
|
}
|
|
25
12
|
toString() {
|
|
@@ -30,16 +17,7 @@ export class NumericValue {
|
|
|
30
17
|
return false;
|
|
31
18
|
}
|
|
32
19
|
const _nv = object;
|
|
33
|
-
|
|
34
|
-
if (prototypeMatch) {
|
|
35
|
-
return prototypeMatch;
|
|
36
|
-
}
|
|
37
|
-
if (typeof _nv.string === "string" &&
|
|
38
|
-
typeof _nv.type === "string" &&
|
|
39
|
-
_nv.constructor?.name?.endsWith("NumericValue")) {
|
|
40
|
-
return true;
|
|
41
|
-
}
|
|
42
|
-
return prototypeMatch;
|
|
20
|
+
return NumericValue.prototype.isPrototypeOf(object) || (_nv.type === "bigDecimal" && format.test(_nv.string));
|
|
43
21
|
}
|
|
44
22
|
}
|
|
45
23
|
export function nv(input) {
|
package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/NormalizedSchema.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MemberSchema, NormalizedSchema as INormalizedSchema, Schema as ISchema, SchemaRef,
|
|
1
|
+
import type { MemberSchema, NormalizedSchema as INormalizedSchema, Schema as ISchema, SchemaRef, SchemaTraitsObject } from "@smithy/types";
|
|
2
2
|
/**
|
|
3
3
|
* Wraps both class instances, numeric sentinel values, and member schema pairs.
|
|
4
4
|
* Presents a consistent interface for interacting with polymorphic schema representations.
|
|
@@ -7,7 +7,7 @@ import type { MemberSchema, NormalizedSchema as INormalizedSchema, Schema as ISc
|
|
|
7
7
|
*/
|
|
8
8
|
export declare class NormalizedSchema implements INormalizedSchema {
|
|
9
9
|
readonly ref: SchemaRef;
|
|
10
|
-
private memberName?;
|
|
10
|
+
private readonly memberName?;
|
|
11
11
|
static readonly symbol: unique symbol;
|
|
12
12
|
protected readonly symbol: symbol;
|
|
13
13
|
private readonly name;
|
|
@@ -26,11 +26,6 @@ export declare class NormalizedSchema implements INormalizedSchema {
|
|
|
26
26
|
* Static constructor that attempts to avoid wrapping a NormalizedSchema within another.
|
|
27
27
|
*/
|
|
28
28
|
static of(ref: SchemaRef): NormalizedSchema;
|
|
29
|
-
/**
|
|
30
|
-
* @param indicator - numeric indicator for preset trait combination.
|
|
31
|
-
* @returns equivalent trait object.
|
|
32
|
-
*/
|
|
33
|
-
static translateTraits(indicator: SchemaTraits): SchemaTraitsObject;
|
|
34
29
|
/**
|
|
35
30
|
* @returns the underlying non-normalized schema.
|
|
36
31
|
*/
|
|
@@ -42,11 +37,9 @@ export declare class NormalizedSchema implements INormalizedSchema {
|
|
|
42
37
|
getName(withNamespace?: boolean): string | undefined;
|
|
43
38
|
/**
|
|
44
39
|
* @returns the member name if the schema is a member schema.
|
|
45
|
-
* @throws Error when the schema isn't a member schema.
|
|
46
40
|
*/
|
|
47
41
|
getMemberName(): string;
|
|
48
42
|
isMemberSchema(): boolean;
|
|
49
|
-
isUnitSchema(): boolean;
|
|
50
43
|
/**
|
|
51
44
|
* boolean methods on this class help control flow in shape serialization and deserialization.
|
|
52
45
|
*/
|
|
@@ -55,6 +48,7 @@ export declare class NormalizedSchema implements INormalizedSchema {
|
|
|
55
48
|
isStructSchema(): boolean;
|
|
56
49
|
isBlobSchema(): boolean;
|
|
57
50
|
isTimestampSchema(): boolean;
|
|
51
|
+
isUnitSchema(): boolean;
|
|
58
52
|
isDocumentSchema(): boolean;
|
|
59
53
|
isStringSchema(): boolean;
|
|
60
54
|
isBooleanSchema(): boolean;
|
|
@@ -94,20 +88,15 @@ export declare class NormalizedSchema implements INormalizedSchema {
|
|
|
94
88
|
* @throws Error if the schema is not a Map, List, nor Document.
|
|
95
89
|
*/
|
|
96
90
|
getValueSchema(): NormalizedSchema;
|
|
97
|
-
/**
|
|
98
|
-
* @param member - to query.
|
|
99
|
-
* @returns whether there is a memberSchema with the given member name. False if not a structure (or union).
|
|
100
|
-
*/
|
|
101
|
-
hasMemberSchema(member: string): boolean;
|
|
102
91
|
/**
|
|
103
92
|
* @returns the NormalizedSchema for the given member name. The returned instance will return true for `isMemberSchema()`
|
|
104
93
|
* and will have the member name given.
|
|
105
|
-
* @param
|
|
94
|
+
* @param memberName - which member to retrieve and wrap.
|
|
106
95
|
*
|
|
107
96
|
* @throws Error if member does not exist or the schema is neither a document nor structure.
|
|
108
97
|
* Note that errors are assumed to be structures and unions are considered structures for these purposes.
|
|
109
98
|
*/
|
|
110
|
-
getMemberSchema(
|
|
99
|
+
getMemberSchema(memberName: string): NormalizedSchema;
|
|
111
100
|
/**
|
|
112
101
|
* This can be used for checking the members as a hashmap.
|
|
113
102
|
* Prefer the structIterator method for iteration.
|
|
@@ -131,12 +120,4 @@ export declare class NormalizedSchema implements INormalizedSchema {
|
|
|
131
120
|
* This avoids the overhead of calling Object.entries(ns.getMemberSchemas()).
|
|
132
121
|
*/
|
|
133
122
|
structIterator(): Generator<[string, NormalizedSchema], undefined, undefined>;
|
|
134
|
-
/**
|
|
135
|
-
* Creates a normalized member schema from the given schema and member name.
|
|
136
|
-
*/
|
|
137
|
-
private memberFrom;
|
|
138
|
-
/**
|
|
139
|
-
* @returns a last-resort human-readable name for the schema if it has no other identifiers.
|
|
140
|
-
*/
|
|
141
|
-
private getSchemaName;
|
|
142
123
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { SchemaTraits, SchemaTraitsObject } from "@smithy/types";
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
* @param indicator - numeric indicator for preset trait combination.
|
|
5
|
+
* @returns equivalent trait object.
|
|
6
|
+
*/
|
|
7
|
+
export declare function translateTraits(indicator: SchemaTraits): SchemaTraitsObject;
|
|
@@ -4,6 +4,7 @@ export * from "./generateIdempotencyToken";
|
|
|
4
4
|
export * from "./lazy-json";
|
|
5
5
|
export * from "./parse-utils";
|
|
6
6
|
export * from "./quote-header";
|
|
7
|
+
export * from "./schema-serde-lib/schema-date-utils";
|
|
7
8
|
export * from "./split-every";
|
|
8
9
|
export * from "./split-header";
|
|
9
10
|
export * from "./value/NumericValue";
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
*
|
|
4
|
+
* Parses a value into a Date. Returns undefined if the input is null or
|
|
5
|
+
* undefined, throws an error if the input is not a number or a parseable string.
|
|
6
|
+
*
|
|
7
|
+
* Input strings must be an integer or floating point number. Fractional seconds are supported.
|
|
8
|
+
*
|
|
9
|
+
* @param value - the value to parse
|
|
10
|
+
* @returns a Date or undefined
|
|
11
|
+
*/
|
|
12
|
+
export declare const _parseEpochTimestamp: (value: unknown) => Date | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* @internal
|
|
15
|
+
*
|
|
16
|
+
* Parses a value into a Date. Returns undefined if the input is null or
|
|
17
|
+
* undefined, throws an error if the input is not a string that can be parsed
|
|
18
|
+
* as an RFC 3339 date.
|
|
19
|
+
*
|
|
20
|
+
* Input strings must conform to RFC3339 section 5.6, and can have a UTC
|
|
21
|
+
* offset. Fractional precision is supported.
|
|
22
|
+
*
|
|
23
|
+
* @see {@link https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14}
|
|
24
|
+
*
|
|
25
|
+
* @param value - the value to parse
|
|
26
|
+
* @returns a Date or undefined
|
|
27
|
+
*/
|
|
28
|
+
export declare const _parseRfc3339DateTimeWithOffset: (value: unknown) => Date | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* @internal
|
|
31
|
+
*
|
|
32
|
+
* Parses a value into a Date. Returns undefined if the input is null or
|
|
33
|
+
* undefined, throws an error if the input is not a string that can be parsed
|
|
34
|
+
* as an RFC 7231 date.
|
|
35
|
+
*
|
|
36
|
+
* Input strings must conform to RFC7231 section 7.1.1.1. Fractional seconds are supported.
|
|
37
|
+
*
|
|
38
|
+
* RFC 850 and unix asctime formats are also accepted.
|
|
39
|
+
* todo: practically speaking, are RFC 850 and asctime even used anymore?
|
|
40
|
+
* todo: can we remove those parts?
|
|
41
|
+
*
|
|
42
|
+
* @see {@link https://datatracker.ietf.org/doc/html/rfc7231.html#section-7.1.1.1}
|
|
43
|
+
*
|
|
44
|
+
* @param value - the value to parse.
|
|
45
|
+
* @returns a Date or undefined.
|
|
46
|
+
*/
|
|
47
|
+
export declare const _parseRfc7231DateTime: (value: unknown) => Date | undefined;
|
package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/NormalizedSchema.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MemberSchema, NormalizedSchema as INormalizedSchema, Schema as ISchema, SchemaRef,
|
|
1
|
+
import { MemberSchema, NormalizedSchema as INormalizedSchema, Schema as ISchema, SchemaRef, SchemaTraitsObject } from "@smithy/types";
|
|
2
2
|
/**
|
|
3
3
|
* Wraps both class instances, numeric sentinel values, and member schema pairs.
|
|
4
4
|
* Presents a consistent interface for interacting with polymorphic schema representations.
|
|
@@ -7,7 +7,7 @@ import { MemberSchema, NormalizedSchema as INormalizedSchema, Schema as ISchema,
|
|
|
7
7
|
*/
|
|
8
8
|
export declare class NormalizedSchema implements INormalizedSchema {
|
|
9
9
|
readonly ref: SchemaRef;
|
|
10
|
-
private memberName?;
|
|
10
|
+
private readonly memberName?;
|
|
11
11
|
static readonly symbol: unique symbol;
|
|
12
12
|
protected readonly symbol: symbol;
|
|
13
13
|
private readonly name;
|
|
@@ -26,11 +26,6 @@ export declare class NormalizedSchema implements INormalizedSchema {
|
|
|
26
26
|
* Static constructor that attempts to avoid wrapping a NormalizedSchema within another.
|
|
27
27
|
*/
|
|
28
28
|
static of(ref: SchemaRef): NormalizedSchema;
|
|
29
|
-
/**
|
|
30
|
-
* @param indicator - numeric indicator for preset trait combination.
|
|
31
|
-
* @returns equivalent trait object.
|
|
32
|
-
*/
|
|
33
|
-
static translateTraits(indicator: SchemaTraits): SchemaTraitsObject;
|
|
34
29
|
/**
|
|
35
30
|
* @returns the underlying non-normalized schema.
|
|
36
31
|
*/
|
|
@@ -42,11 +37,9 @@ export declare class NormalizedSchema implements INormalizedSchema {
|
|
|
42
37
|
getName(withNamespace?: boolean): string | undefined;
|
|
43
38
|
/**
|
|
44
39
|
* @returns the member name if the schema is a member schema.
|
|
45
|
-
* @throws Error when the schema isn't a member schema.
|
|
46
40
|
*/
|
|
47
41
|
getMemberName(): string;
|
|
48
42
|
isMemberSchema(): boolean;
|
|
49
|
-
isUnitSchema(): boolean;
|
|
50
43
|
/**
|
|
51
44
|
* boolean methods on this class help control flow in shape serialization and deserialization.
|
|
52
45
|
*/
|
|
@@ -55,6 +48,7 @@ export declare class NormalizedSchema implements INormalizedSchema {
|
|
|
55
48
|
isStructSchema(): boolean;
|
|
56
49
|
isBlobSchema(): boolean;
|
|
57
50
|
isTimestampSchema(): boolean;
|
|
51
|
+
isUnitSchema(): boolean;
|
|
58
52
|
isDocumentSchema(): boolean;
|
|
59
53
|
isStringSchema(): boolean;
|
|
60
54
|
isBooleanSchema(): boolean;
|
|
@@ -94,20 +88,15 @@ export declare class NormalizedSchema implements INormalizedSchema {
|
|
|
94
88
|
* @throws Error if the schema is not a Map, List, nor Document.
|
|
95
89
|
*/
|
|
96
90
|
getValueSchema(): NormalizedSchema;
|
|
97
|
-
/**
|
|
98
|
-
* @param member - to query.
|
|
99
|
-
* @returns whether there is a memberSchema with the given member name. False if not a structure (or union).
|
|
100
|
-
*/
|
|
101
|
-
hasMemberSchema(member: string): boolean;
|
|
102
91
|
/**
|
|
103
92
|
* @returns the NormalizedSchema for the given member name. The returned instance will return true for `isMemberSchema()`
|
|
104
93
|
* and will have the member name given.
|
|
105
|
-
* @param
|
|
94
|
+
* @param memberName - which member to retrieve and wrap.
|
|
106
95
|
*
|
|
107
96
|
* @throws Error if member does not exist or the schema is neither a document nor structure.
|
|
108
97
|
* Note that errors are assumed to be structures and unions are considered structures for these purposes.
|
|
109
98
|
*/
|
|
110
|
-
getMemberSchema(
|
|
99
|
+
getMemberSchema(memberName: string): NormalizedSchema;
|
|
111
100
|
/**
|
|
112
101
|
* This can be used for checking the members as a hashmap.
|
|
113
102
|
* Prefer the structIterator method for iteration.
|
|
@@ -134,12 +123,4 @@ export declare class NormalizedSchema implements INormalizedSchema {
|
|
|
134
123
|
string,
|
|
135
124
|
NormalizedSchema
|
|
136
125
|
], undefined, undefined>;
|
|
137
|
-
/**
|
|
138
|
-
* Creates a normalized member schema from the given schema and member name.
|
|
139
|
-
*/
|
|
140
|
-
private memberFrom;
|
|
141
|
-
/**
|
|
142
|
-
* @returns a last-resort human-readable name for the schema if it has no other identifiers.
|
|
143
|
-
*/
|
|
144
|
-
private getSchemaName;
|
|
145
126
|
}
|
package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/translateTraits.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SchemaTraits, SchemaTraitsObject } from "@smithy/types";
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
* @param indicator - numeric indicator for preset trait combination.
|
|
5
|
+
* @returns equivalent trait object.
|
|
6
|
+
*/
|
|
7
|
+
export declare function translateTraits(indicator: SchemaTraits): SchemaTraitsObject;
|
|
@@ -4,6 +4,7 @@ export * from "./generateIdempotencyToken";
|
|
|
4
4
|
export * from "./lazy-json";
|
|
5
5
|
export * from "./parse-utils";
|
|
6
6
|
export * from "./quote-header";
|
|
7
|
+
export * from "./schema-serde-lib/schema-date-utils";
|
|
7
8
|
export * from "./split-every";
|
|
8
9
|
export * from "./split-header";
|
|
9
10
|
export * from "./value/NumericValue";
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
*
|
|
4
|
+
* Parses a value into a Date. Returns undefined if the input is null or
|
|
5
|
+
* undefined, throws an error if the input is not a number or a parseable string.
|
|
6
|
+
*
|
|
7
|
+
* Input strings must be an integer or floating point number. Fractional seconds are supported.
|
|
8
|
+
*
|
|
9
|
+
* @param value - the value to parse
|
|
10
|
+
* @returns a Date or undefined
|
|
11
|
+
*/
|
|
12
|
+
export declare const _parseEpochTimestamp: (value: unknown) => Date | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* @internal
|
|
15
|
+
*
|
|
16
|
+
* Parses a value into a Date. Returns undefined if the input is null or
|
|
17
|
+
* undefined, throws an error if the input is not a string that can be parsed
|
|
18
|
+
* as an RFC 3339 date.
|
|
19
|
+
*
|
|
20
|
+
* Input strings must conform to RFC3339 section 5.6, and can have a UTC
|
|
21
|
+
* offset. Fractional precision is supported.
|
|
22
|
+
*
|
|
23
|
+
* @see {@link https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14}
|
|
24
|
+
*
|
|
25
|
+
* @param value - the value to parse
|
|
26
|
+
* @returns a Date or undefined
|
|
27
|
+
*/
|
|
28
|
+
export declare const _parseRfc3339DateTimeWithOffset: (value: unknown) => Date | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* @internal
|
|
31
|
+
*
|
|
32
|
+
* Parses a value into a Date. Returns undefined if the input is null or
|
|
33
|
+
* undefined, throws an error if the input is not a string that can be parsed
|
|
34
|
+
* as an RFC 7231 date.
|
|
35
|
+
*
|
|
36
|
+
* Input strings must conform to RFC7231 section 7.1.1.1. Fractional seconds are supported.
|
|
37
|
+
*
|
|
38
|
+
* RFC 850 and unix asctime formats are also accepted.
|
|
39
|
+
* todo: practically speaking, are RFC 850 and asctime even used anymore?
|
|
40
|
+
* todo: can we remove those parts?
|
|
41
|
+
*
|
|
42
|
+
* @see {@link https://datatracker.ietf.org/doc/html/rfc7231.html#section-7.1.1.1}
|
|
43
|
+
*
|
|
44
|
+
* @param value - the value to parse.
|
|
45
|
+
* @returns a Date or undefined.
|
|
46
|
+
*/
|
|
47
|
+
export declare const _parseRfc7231DateTime: (value: unknown) => Date | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.15.0",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "yarn lint && concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
|
|
6
6
|
"build:cjs": "node ../../scripts/inline core",
|
|
@@ -80,10 +80,10 @@
|
|
|
80
80
|
"@smithy/middleware-serde": "^4.2.0",
|
|
81
81
|
"@smithy/protocol-http": "^5.3.0",
|
|
82
82
|
"@smithy/types": "^4.6.0",
|
|
83
|
-
"@smithy/util-base64": "^4.
|
|
83
|
+
"@smithy/util-base64": "^4.3.0",
|
|
84
84
|
"@smithy/util-body-length-browser": "^4.2.0",
|
|
85
85
|
"@smithy/util-middleware": "^4.2.0",
|
|
86
|
-
"@smithy/util-stream": "^4.
|
|
86
|
+
"@smithy/util-stream": "^4.5.0",
|
|
87
87
|
"@smithy/util-utf8": "^4.2.0",
|
|
88
88
|
"@smithy/uuid": "^1.1.0",
|
|
89
89
|
"tslib": "^2.6.2"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/fetch-http-handler",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.1",
|
|
4
4
|
"description": "Provides a way to make requests",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@smithy/protocol-http": "^5.3.0",
|
|
32
32
|
"@smithy/querystring-builder": "^4.2.0",
|
|
33
33
|
"@smithy/types": "^4.6.0",
|
|
34
|
-
"@smithy/util-base64": "^4.
|
|
34
|
+
"@smithy/util-base64": "^4.3.0",
|
|
35
35
|
"tslib": "^2.6.2"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/middleware-endpoint",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.1",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
|
|
6
6
|
"build:cjs": "node ../../scripts/inline middleware-endpoint",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"license": "Apache-2.0",
|
|
26
26
|
"sideEffects": false,
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@smithy/core": "^3.
|
|
28
|
+
"@smithy/core": "^3.15.0",
|
|
29
29
|
"@smithy/middleware-serde": "^4.2.0",
|
|
30
30
|
"@smithy/node-config-provider": "^4.3.0",
|
|
31
31
|
"@smithy/shared-ini-file-loader": "^4.3.0",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/middleware-retry",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.1",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
|
|
6
6
|
"build:cjs": "node ../../scripts/inline middleware-retry",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@smithy/node-config-provider": "^4.3.0",
|
|
38
38
|
"@smithy/protocol-http": "^5.3.0",
|
|
39
39
|
"@smithy/service-error-classification": "^4.2.0",
|
|
40
|
-
"@smithy/smithy-client": "^4.7.
|
|
40
|
+
"@smithy/smithy-client": "^4.7.1",
|
|
41
41
|
"@smithy/types": "^4.6.0",
|
|
42
42
|
"@smithy/util-middleware": "^4.2.0",
|
|
43
43
|
"@smithy/util-retry": "^4.2.0",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/smithy-client",
|
|
3
|
-
"version": "4.7.
|
|
3
|
+
"version": "4.7.1",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
|
|
6
6
|
"build:cjs": "node ../../scripts/inline smithy-client",
|
|
@@ -25,12 +25,12 @@
|
|
|
25
25
|
"license": "Apache-2.0",
|
|
26
26
|
"sideEffects": false,
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@smithy/core": "^3.
|
|
29
|
-
"@smithy/middleware-endpoint": "^4.3.
|
|
28
|
+
"@smithy/core": "^3.15.0",
|
|
29
|
+
"@smithy/middleware-endpoint": "^4.3.1",
|
|
30
30
|
"@smithy/middleware-stack": "^4.2.0",
|
|
31
31
|
"@smithy/protocol-http": "^5.3.0",
|
|
32
32
|
"@smithy/types": "^4.6.0",
|
|
33
|
-
"@smithy/util-stream": "^4.
|
|
33
|
+
"@smithy/util-stream": "^4.5.0",
|
|
34
34
|
"tslib": "^2.6.2"
|
|
35
35
|
},
|
|
36
36
|
"engines": {
|
|
@@ -1,35 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.maxLetterValue = exports.bitsPerByte = exports.bitsPerLetter = exports.alphabetByValue = exports.alphabetByEncoding = void 0;
|
|
4
|
-
const
|
|
5
|
-
exports.alphabetByEncoding =
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
for (let i = 0, start = "a".charCodeAt(0), limit = "z".charCodeAt(0); i + start <= limit; i++) {
|
|
14
|
-
const char = String.fromCharCode(i + start);
|
|
15
|
-
const index = i + 26;
|
|
16
|
-
alphabetByEncoding[char] = index;
|
|
17
|
-
alphabetByValue[index] = char;
|
|
18
|
-
}
|
|
19
|
-
for (let i = 0; i < 10; i++) {
|
|
20
|
-
alphabetByEncoding[i.toString(10)] = i + 52;
|
|
21
|
-
const char = i.toString(10);
|
|
22
|
-
const index = i + 52;
|
|
23
|
-
alphabetByEncoding[char] = index;
|
|
24
|
-
alphabetByValue[index] = char;
|
|
25
|
-
}
|
|
26
|
-
alphabetByEncoding["+"] = 62;
|
|
27
|
-
alphabetByValue[62] = "+";
|
|
28
|
-
alphabetByEncoding["/"] = 63;
|
|
29
|
-
alphabetByValue[63] = "/";
|
|
30
|
-
const bitsPerLetter = 6;
|
|
31
|
-
exports.bitsPerLetter = bitsPerLetter;
|
|
32
|
-
const bitsPerByte = 8;
|
|
33
|
-
exports.bitsPerByte = bitsPerByte;
|
|
34
|
-
const maxLetterValue = 0b111111;
|
|
35
|
-
exports.maxLetterValue = maxLetterValue;
|
|
4
|
+
const chars = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`;
|
|
5
|
+
exports.alphabetByEncoding = Object.entries(chars).reduce((acc, [i, c]) => {
|
|
6
|
+
acc[c] = Number(i);
|
|
7
|
+
return acc;
|
|
8
|
+
}, {});
|
|
9
|
+
exports.alphabetByValue = chars.split("");
|
|
10
|
+
exports.bitsPerLetter = 6;
|
|
11
|
+
exports.bitsPerByte = 8;
|
|
12
|
+
exports.maxLetterValue = 0b111111;
|