@mavogel/awscdk-rootmail 0.1.59 → 0.1.61
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 +7 -7
- package/lib/rootmail.js +1 -1
- package/lib/ses-receive.js +1 -1
- package/node_modules/@aws-sdk/checksums/package.json +3 -3
- package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-cloudwatch-logs/package.json +4 -4
- package/node_modules/@aws-sdk/client-route-53/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-route-53/package.json +4 -4
- package/node_modules/@aws-sdk/client-s3/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-s3/package.json +7 -7
- package/node_modules/@aws-sdk/client-ses/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-ses/package.json +4 -4
- package/node_modules/@aws-sdk/client-ssm/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-ssm/package.json +4 -4
- package/node_modules/@aws-sdk/core/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-env/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-http/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +10 -10
- package/node_modules/@aws-sdk/credential-provider-login/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-node/package.json +8 -8
- package/node_modules/@aws-sdk/credential-provider-process/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +4 -4
- package/node_modules/@aws-sdk/middleware-sdk-s3/package.json +3 -3
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +2 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +66 -3
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/models/enums.js +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/models/errors.js +13 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/schemas/schemas_0.js +48 -3
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/models/enums.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/models/models_0.d.ts +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/commands/AssumeRoleCommand.d.ts +12 -7
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/commands/AssumeRoleWithWebIdentityCommand.d.ts +20 -14
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/models/errors.d.ts +22 -7
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/models/models_0.d.ts +109 -53
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/schemas/schemas_0.d.ts +4 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/models/enums.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/models/errors.d.ts +6 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/models/models_0.d.ts +14 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/schemas/schemas_0.d.ts +4 -0
- package/node_modules/@aws-sdk/nested-clients/package.json +3 -3
- package/node_modules/@aws-sdk/token-providers/package.json +4 -4
- package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +600 -328
- package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.browser.js +12 -3
- package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.js +12 -3
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.browser.js +9 -4
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +9 -4
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.native.js +9 -4
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingNormalizedSchema.js +215 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js +223 -195
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +22 -23
- package/node_modules/@smithy/core/dist-es/submodules/protocols/extended-encode-uri-component.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/serde/FromStringShapeDeserializer.js +54 -47
- package/node_modules/@smithy/core/dist-es/submodules/protocols/serde/HttpInterceptingShapeDeserializer.js +23 -18
- package/node_modules/@smithy/core/dist-es/submodules/protocols/serde/HttpInterceptingShapeSerializer.js +12 -5
- package/node_modules/@smithy/core/dist-es/submodules/protocols/serde/ToStringShapeSerializer.js +33 -27
- package/node_modules/@smithy/core/dist-es/submodules/protocols/serde/determineTimestampFormat.js +5 -5
- package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/retryMiddleware.js +4 -1
- package/node_modules/@smithy/core/dist-es/submodules/retry/util-retry/race.js +8 -2
- package/node_modules/@smithy/core/dist-es/submodules/serde/quote-header.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/serde/schema-serde-lib/schema-date-utils.js +4 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/split-header.js +4 -3
- package/node_modules/@smithy/core/dist-types/submodules/protocols/HttpBindingNormalizedSchema.d.ts +75 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/HttpBindingProtocol.d.ts +11 -8
- package/node_modules/@smithy/core/dist-types/submodules/protocols/HttpProtocol.d.ts +2 -2
- package/node_modules/@smithy/core/dist-types/submodules/protocols/serde/FromStringShapeDeserializer.d.ts +2 -1
- package/node_modules/@smithy/core/dist-types/submodules/protocols/serde/HttpInterceptingShapeDeserializer.d.ts +4 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/serde/HttpInterceptingShapeSerializer.d.ts +3 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/serde/ToStringShapeSerializer.d.ts +2 -0
- package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/NormalizedSchema.d.ts +1 -1
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/HttpBindingNormalizedSchema.d.ts +81 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/HttpBindingProtocol.d.ts +11 -8
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/HttpProtocol.d.ts +1 -1
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/serde/FromStringShapeDeserializer.d.ts +2 -1
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/serde/HttpInterceptingShapeDeserializer.d.ts +4 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/serde/HttpInterceptingShapeSerializer.d.ts +3 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/serde/ToStringShapeSerializer.d.ts +2 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/NormalizedSchema.d.ts +1 -1
- package/node_modules/@smithy/core/package.json +1 -1
- package/node_modules/bowser/README.md +1 -1
- package/node_modules/bowser/bowser.mjs +49 -6
- package/node_modules/bowser/bundled.js +1 -1
- package/node_modules/bowser/es5.js +2 -2
- package/node_modules/bowser/index.d.ts +2 -2
- package/node_modules/bowser/package.json +1 -1
- package/node_modules/bowser/src/constants.js +4 -0
- package/node_modules/bowser/src/parser-browsers.js +50 -5
- package/node_modules/bowser/src/parser-engines.js +14 -1
- package/node_modules/bowser/src/parser-os.js +8 -1
- package/node_modules/bowser/src/parser-platforms.js +12 -0
- package/package.json +6 -6
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { NormalizedSchema } from "@smithy/core/schema";
|
|
2
|
+
import { OperationSchema, StaticStructureSchema } from "@smithy/types";
|
|
3
|
+
export type HttpBody = 32;
|
|
4
|
+
export type HttpLabel = 33;
|
|
5
|
+
export type HttpQuery = 34;
|
|
6
|
+
export type HttpQueryParams = 35;
|
|
7
|
+
export type HttpPayload = 36;
|
|
8
|
+
export type HttpResponseCode = 37;
|
|
9
|
+
export type HttpHeader = 38;
|
|
10
|
+
export type HttpPrefixHeaders = 39;
|
|
11
|
+
export type HttpBindingLocation = HttpBody | HttpHeader | HttpQuery | HttpLabel | HttpPayload | HttpPrefixHeaders | HttpQueryParams | HttpResponseCode;
|
|
12
|
+
/**
|
|
13
|
+
* The low byte is the schema type. Higher bits cache HTTP serde traits.
|
|
14
|
+
*
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
export type HttpBindingValue = readonly [
|
|
18
|
+
/*schema*/ HttpBindingNormalizedSchema,
|
|
19
|
+
/*flags*/ number,
|
|
20
|
+
/*collectionValue*/ HttpBindingValue
|
|
21
|
+
];
|
|
22
|
+
export type HttpBinding = readonly [
|
|
23
|
+
/*memberName*/ string,
|
|
24
|
+
/*value*/ HttpBindingValue,
|
|
25
|
+
/*location*/ HttpBindingLocation,
|
|
26
|
+
/*wireName*/ string
|
|
27
|
+
];
|
|
28
|
+
export type HttpPathSegment = readonly [
|
|
29
|
+
/*value*/ string,
|
|
30
|
+
/*kind*/ 0 | 1 | 2
|
|
31
|
+
];
|
|
32
|
+
export type HttpOperationBindings = readonly [
|
|
33
|
+
/*method*/ string | undefined,
|
|
34
|
+
/*path*/ string | undefined,
|
|
35
|
+
/*query*/ readonly (readonly [
|
|
36
|
+
string,
|
|
37
|
+
string
|
|
38
|
+
])[],
|
|
39
|
+
/*pathSegments*/ readonly HttpPathSegment[] | undefined,
|
|
40
|
+
/*hostPrefix*/ string | undefined
|
|
41
|
+
];
|
|
42
|
+
export type HttpBindingIndex = {
|
|
43
|
+
request: {
|
|
44
|
+
memberBindings: HttpBinding[];
|
|
45
|
+
byName: Record<string, HttpBinding>;
|
|
46
|
+
hasIdempotency?: boolean;
|
|
47
|
+
hasPrefixHeaders?: boolean;
|
|
48
|
+
syntheticBodySchema?: StaticStructureSchema;
|
|
49
|
+
contentTypeInstruction?: string | null;
|
|
50
|
+
};
|
|
51
|
+
response: {
|
|
52
|
+
bodyMemberNames: string[];
|
|
53
|
+
syntheticBodySchema?: StaticStructureSchema;
|
|
54
|
+
bindings: {
|
|
55
|
+
payload?: HttpBinding;
|
|
56
|
+
statusCode?: HttpBinding;
|
|
57
|
+
headers: Record<string, HttpBinding>;
|
|
58
|
+
prefixHeaders: HttpBinding[];
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* A normalized schema with lazily cached HTTP binding metadata.
|
|
64
|
+
*
|
|
65
|
+
* @internal
|
|
66
|
+
*/
|
|
67
|
+
export declare class HttpBindingNormalizedSchema extends NormalizedSchema {
|
|
68
|
+
private static readonly identity;
|
|
69
|
+
private readonly identity;
|
|
70
|
+
private bindings?;
|
|
71
|
+
private constructor();
|
|
72
|
+
static of(schema: Parameters<typeof NormalizedSchema.of>[0]): HttpBindingNormalizedSchema;
|
|
73
|
+
getHttpBindingLocation(traits: ReturnType<NormalizedSchema["getMergedTraits"]>): HttpBindingLocation;
|
|
74
|
+
getHttpBindingValue(location: HttpBindingLocation, traits: ReturnType<NormalizedSchema["getMergedTraits"]>, nested?: boolean): HttpBindingValue;
|
|
75
|
+
getHttpBindingCollectionValue(location: HttpBindingLocation, traits?: import("@smithy/types").SchemaTraitsObject): HttpBindingValue;
|
|
76
|
+
getHttpBindings(): HttpBindingIndex;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* @internal
|
|
80
|
+
*/
|
|
81
|
+
export declare const getHttpOperationBindings: (schema: OperationSchema) => HttpOperationBindings;
|
package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/HttpBindingProtocol.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import { NormalizedSchema, TypeRegistry } from "@smithy/core/schema";
|
|
2
1
|
import { HttpRequest } from "@smithy/core/transport";
|
|
2
|
+
import { TypeRegistry } from "@smithy/core/schema";
|
|
3
3
|
import { EndpointBearer, HandlerExecutionContext, HttpRequest as IHttpRequest, HttpResponse as IHttpResponse, MetadataBearer, OperationSchema, Schema, SerdeFunctions } from "@smithy/types";
|
|
4
|
+
import { HttpBindingValue } from "./HttpBindingNormalizedSchema";
|
|
4
5
|
import { HttpProtocol } from "./HttpProtocol";
|
|
6
|
+
import { HttpInterceptingShapeSerializer } from "./serde/HttpInterceptingShapeSerializer";
|
|
7
|
+
type HttpBindingSerializer = Pick<HttpInterceptingShapeSerializer<any>, "writeHttpBinding" | "writeCodec">;
|
|
5
8
|
/**
|
|
6
9
|
* Base for HTTP-binding protocols. Downstream examples
|
|
7
10
|
* include AWS REST JSON and AWS REST XML.
|
|
@@ -14,7 +17,10 @@ export declare abstract class HttpBindingProtocol extends HttpProtocol {
|
|
|
14
17
|
*/
|
|
15
18
|
protected compositeErrorRegistry: TypeRegistry;
|
|
16
19
|
serializeRequest<Input extends object>(operationSchema: OperationSchema, _input: Input, context: HandlerExecutionContext & SerdeFunctions & EndpointBearer): Promise<IHttpRequest>;
|
|
17
|
-
|
|
20
|
+
private serializeHttpBindings;
|
|
21
|
+
protected serializeQuery(value: HttpBindingValue, data: any, wireName: string | undefined, query: HttpRequest["query"], directSerializer?: HttpBindingSerializer): void;
|
|
22
|
+
private serializeHttpValue;
|
|
23
|
+
private serializePath;
|
|
18
24
|
deserializeResponse<Output extends MetadataBearer>(operationSchema: OperationSchema, context: HandlerExecutionContext & SerdeFunctions, response: IHttpResponse): Promise<Output>;
|
|
19
25
|
/**
|
|
20
26
|
* The base method ignores HTTP bindings.
|
|
@@ -22,10 +28,7 @@ export declare abstract class HttpBindingProtocol extends HttpProtocol {
|
|
|
22
28
|
* @deprecated (only this signature) use signature without headerBindings.
|
|
23
29
|
* @override
|
|
24
30
|
*/
|
|
25
|
-
protected deserializeHttpMessage(schema: Schema, context: HandlerExecutionContext & SerdeFunctions, response: IHttpResponse, headerBindings: Set<string>, dataObject: any): Promise<string[]
|
|
26
|
-
|
|
27
|
-
}>;
|
|
28
|
-
protected deserializeHttpMessage(schema: Schema, context: HandlerExecutionContext & SerdeFunctions, response: IHttpResponse, dataObject: any): Promise<string[] & {
|
|
29
|
-
discardResponseBody?: boolean;
|
|
30
|
-
}>;
|
|
31
|
+
protected deserializeHttpMessage(schema: Schema, context: HandlerExecutionContext & SerdeFunctions, response: IHttpResponse, headerBindings: Set<string>, dataObject: any): Promise<string[]>;
|
|
32
|
+
protected deserializeHttpMessage(schema: Schema, context: HandlerExecutionContext & SerdeFunctions, response: IHttpResponse, dataObject: any): Promise<string[]>;
|
|
31
33
|
}
|
|
34
|
+
export {};
|
|
@@ -40,7 +40,7 @@ export declare abstract class HttpProtocol extends SerdeContext implements Clien
|
|
|
40
40
|
abstract serializeRequest<Input extends object>(operationSchema: OperationSchema, input: Input, context: HandlerExecutionContext & SerdeFunctions & EndpointBearer): Promise<IHttpRequest>;
|
|
41
41
|
updateServiceEndpoint(request: IHttpRequest, endpoint: EndpointV2 | Endpoint): IHttpRequest;
|
|
42
42
|
abstract deserializeResponse<Output extends MetadataBearer>(operationSchema: OperationSchema, context: HandlerExecutionContext & SerdeFunctions, response: IHttpResponse): Promise<Output>;
|
|
43
|
-
protected setHostPrefix<Input extends object>(request: IHttpRequest, operationSchema: OperationSchema, input: Input): void;
|
|
43
|
+
protected setHostPrefix<Input extends object>(request: IHttpRequest, operationSchema: OperationSchema, input: Input, operation?: import("./HttpBindingNormalizedSchema").HttpOperationBindings): void;
|
|
44
44
|
protected abstract handleError(operationSchema: OperationSchema, context: HandlerExecutionContext & SerdeFunctions, response: IHttpResponse, dataObject: any, metadata: ResponseMetadata): Promise<never>;
|
|
45
45
|
protected deserializeMetadata(output: IHttpResponse): ResponseMetadata;
|
|
46
46
|
/**
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CodecSettings, Schema, ShapeDeserializer } from "@smithy/types";
|
|
2
|
+
import { HttpBindingLocation, HttpBindingValue } from "../HttpBindingNormalizedSchema";
|
|
2
3
|
import { SerdeContext } from "../SerdeContext";
|
|
3
4
|
/**
|
|
4
5
|
* This deserializer reads strings.
|
|
@@ -9,5 +10,5 @@ export declare class FromStringShapeDeserializer extends SerdeContext implements
|
|
|
9
10
|
private settings;
|
|
10
11
|
constructor(settings: CodecSettings);
|
|
11
12
|
read(_schema: Schema, data: string): any;
|
|
12
|
-
|
|
13
|
+
readHttpBinding([ns, flags, collectionValue]: HttpBindingValue, data: string, location: HttpBindingLocation): any;
|
|
13
14
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CodecSettings, Schema, SerdeFunctions, ShapeDeserializer } from "@smithy/types";
|
|
2
|
+
import { HttpBindingLocation, HttpBindingValue } from "../HttpBindingNormalizedSchema";
|
|
2
3
|
import { SerdeContext } from "../SerdeContext";
|
|
3
4
|
/**
|
|
4
5
|
* This deserializer is a dispatcher that decides whether to use a string deserializer
|
|
@@ -18,4 +19,7 @@ export declare class HttpInterceptingShapeDeserializer<CodecShapeDeserializer ex
|
|
|
18
19
|
*/
|
|
19
20
|
setSerdeContext(serdeContext: SerdeFunctions): void;
|
|
20
21
|
read(schema: Schema, data: string | Uint8Array): any | Promise<any>;
|
|
22
|
+
readHttpBinding(binding: HttpBindingValue, data: string | Uint8Array, location: HttpBindingLocation): any;
|
|
23
|
+
readPayload([schema, flags]: HttpBindingValue, data: string | Uint8Array): any | Promise<any>;
|
|
24
|
+
readCodec(schema: Schema, data: string | Uint8Array): any | Promise<any>;
|
|
21
25
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CodecSettings, ConfigurableSerdeContext, Schema as ISchema, SerdeFunctions, ShapeSerializer } from "@smithy/types";
|
|
2
|
+
import { HttpBindingLocation, HttpBindingValue } from "../HttpBindingNormalizedSchema";
|
|
2
3
|
import { ToStringShapeSerializer } from "./ToStringShapeSerializer";
|
|
3
4
|
/**
|
|
4
5
|
* This serializer decides whether to dispatch to a string serializer or a codec serializer
|
|
@@ -19,5 +20,7 @@ export declare class HttpInterceptingShapeSerializer<CodecShapeSerializer extend
|
|
|
19
20
|
*/
|
|
20
21
|
setSerdeContext(serdeContext: SerdeFunctions): void;
|
|
21
22
|
write(schema: ISchema, value: unknown): void;
|
|
23
|
+
writeHttpBinding(binding: HttpBindingValue, value: unknown, location: HttpBindingLocation): void;
|
|
24
|
+
writeCodec(schema: ISchema, value: unknown): void;
|
|
22
25
|
flush(): string | Uint8Array;
|
|
23
26
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CodecSettings, Schema, ShapeSerializer } from "@smithy/types";
|
|
2
|
+
import { HttpBindingLocation, HttpBindingValue } from "../HttpBindingNormalizedSchema";
|
|
2
3
|
import { SerdeContext } from "../SerdeContext";
|
|
3
4
|
/**
|
|
4
5
|
* Serializes a shape to string.
|
|
@@ -10,5 +11,6 @@ export declare class ToStringShapeSerializer extends SerdeContext implements Sha
|
|
|
10
11
|
private stringBuffer;
|
|
11
12
|
constructor(settings: CodecSettings);
|
|
12
13
|
write(schema: Schema, value: unknown): void;
|
|
14
|
+
writeHttpBinding([ns, flags, collectionValue]: HttpBindingValue, value: unknown, location: HttpBindingLocation): void;
|
|
13
15
|
flush(): string;
|
|
14
16
|
}
|
package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/NormalizedSchema.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ export declare class NormalizedSchema implements INormalizedSchema {
|
|
|
31
31
|
* @param ref - a polymorphic SchemaRef to be dereferenced/normalized.
|
|
32
32
|
* @param memberName - optional memberName if this NormalizedSchema should be considered a member schema.
|
|
33
33
|
*/
|
|
34
|
-
|
|
34
|
+
protected constructor(ref: $SchemaRef, memberName?: string | undefined);
|
|
35
35
|
static [Symbol.hasInstance](lhs: unknown): lhs is NormalizedSchema;
|
|
36
36
|
/**
|
|
37
37
|
* Static constructor that attempts to avoid wrapping a NormalizedSchema within another.
|
|
@@ -21,7 +21,7 @@ The library is made to help to detect what browser your user has and gives you a
|
|
|
21
21
|
|
|
22
22
|
### ⚠️ Version 2.0 breaking changes ⚠️
|
|
23
23
|
|
|
24
|
-
Version 2.0 has drastically changed the API. All available methods are on the [docs page](https://bowser-js.github.io/bowser/
|
|
24
|
+
Version 2.0 has drastically changed the API. All available methods are on the [docs page](https://bowser-js.github.io/bowser/).
|
|
25
25
|
|
|
26
26
|
_For legacy code, check out the [1.x](https://github.com/bowser-js/bowser/tree/v1.x) branch and install it through `npm install bowser@1.9.4`._
|
|
27
27
|
|
|
@@ -11,6 +11,7 @@ var BROWSER_ALIASES_MAP = {
|
|
|
11
11
|
"Android Browser": "android",
|
|
12
12
|
BaiduSpider: "baiduspider",
|
|
13
13
|
Bada: "bada",
|
|
14
|
+
"Bertina Browser": "bertina",
|
|
14
15
|
BingCrawler: "bingcrawler",
|
|
15
16
|
Brave: "brave",
|
|
16
17
|
BlackBerry: "blackberry",
|
|
@@ -25,6 +26,7 @@ var BROWSER_ALIASES_MAP = {
|
|
|
25
26
|
Epiphany: "epiphany",
|
|
26
27
|
FacebookExternalHit: "facebookexternalhit",
|
|
27
28
|
Firefox: "firefox",
|
|
29
|
+
Freebox: "freebox",
|
|
28
30
|
Focus: "focus",
|
|
29
31
|
Generic: "generic",
|
|
30
32
|
"Google Search": "google_search",
|
|
@@ -84,6 +86,7 @@ var BROWSER_MAP = {
|
|
|
84
86
|
android: "Android Browser",
|
|
85
87
|
baiduspider: "BaiduSpider",
|
|
86
88
|
bada: "Bada",
|
|
89
|
+
bertina: "Bertina Browser",
|
|
87
90
|
bingcrawler: "BingCrawler",
|
|
88
91
|
blackberry: "BlackBerry",
|
|
89
92
|
brave: "Brave",
|
|
@@ -99,6 +102,7 @@ var BROWSER_MAP = {
|
|
|
99
102
|
epiphany: "Epiphany",
|
|
100
103
|
facebookexternalhit: "FacebookExternalHit",
|
|
101
104
|
firefox: "Firefox",
|
|
105
|
+
freebox: "Freebox",
|
|
102
106
|
focus: "Focus",
|
|
103
107
|
generic: "Generic",
|
|
104
108
|
google_search: "Google Search",
|
|
@@ -653,7 +657,7 @@ var browsersList = [{
|
|
|
653
657
|
var browser = {
|
|
654
658
|
name: "Opera"
|
|
655
659
|
};
|
|
656
|
-
var version = Utils.getFirstMatch(/(?:opr|opios)[\s/](\
|
|
660
|
+
var version = Utils.getFirstMatch(/(?:opr|opios)[\s/](\d+(?:\.\d+)*)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
|
|
657
661
|
if (version) browser.version = version;
|
|
658
662
|
return browser;
|
|
659
663
|
}
|
|
@@ -757,6 +761,16 @@ var browsersList = [{
|
|
|
757
761
|
if (version) browser.version = version;
|
|
758
762
|
return browser;
|
|
759
763
|
}
|
|
764
|
+
}, {
|
|
765
|
+
test: [/\sbertina\//i],
|
|
766
|
+
describe: function describe(ua) {
|
|
767
|
+
var browser = {
|
|
768
|
+
name: "Bertina Browser"
|
|
769
|
+
};
|
|
770
|
+
var version = Utils.getFirstMatch(/(?:bertina)\/(\d+(\.?_?\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
|
|
771
|
+
if (version) browser.version = version;
|
|
772
|
+
return browser;
|
|
773
|
+
}
|
|
760
774
|
}, {
|
|
761
775
|
test: [/yabrowser/i],
|
|
762
776
|
describe: function describe(ua) {
|
|
@@ -768,12 +782,12 @@ var browsersList = [{
|
|
|
768
782
|
return browser;
|
|
769
783
|
}
|
|
770
784
|
}, {
|
|
771
|
-
test: [/ucbrowser
|
|
785
|
+
test: [/ucbrowser|ucmobile\//i, /\bucpc\//i, /\bubrowser\//i],
|
|
772
786
|
describe: function describe(ua) {
|
|
773
787
|
var browser = {
|
|
774
788
|
name: "UC Browser"
|
|
775
789
|
};
|
|
776
|
-
var version = Utils.getFirstMatch(
|
|
790
|
+
var version = Utils.getFirstMatch(/(?:ucbrowser[\s/]?|ucmobile\/|\bucpc\/|\bubrowser\/)(\d+(\.?_?\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
|
|
777
791
|
if (version) browser.version = version;
|
|
778
792
|
return browser;
|
|
779
793
|
}
|
|
@@ -1093,7 +1107,7 @@ var browsersList = [{
|
|
|
1093
1107
|
var browser = {
|
|
1094
1108
|
name: "Chromium"
|
|
1095
1109
|
};
|
|
1096
|
-
var version = Utils.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
|
|
1110
|
+
var version = Utils.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua) || Utils.getFirstMatch(/(?:chrome)\/(\d+(\.?_?\d+)+)/i, ua);
|
|
1097
1111
|
if (version) browser.version = version;
|
|
1098
1112
|
return browser;
|
|
1099
1113
|
}
|
|
@@ -1118,7 +1132,7 @@ var browsersList = [{
|
|
|
1118
1132
|
return browser;
|
|
1119
1133
|
}
|
|
1120
1134
|
}, {
|
|
1121
|
-
test: [
|
|
1135
|
+
test: [/\bGSA\//i],
|
|
1122
1136
|
describe: function describe(ua) {
|
|
1123
1137
|
var browser = {
|
|
1124
1138
|
name: "Google Search"
|
|
@@ -1151,6 +1165,16 @@ var browsersList = [{
|
|
|
1151
1165
|
if (version) browser.version = version;
|
|
1152
1166
|
return browser;
|
|
1153
1167
|
}
|
|
1168
|
+
}, {
|
|
1169
|
+
test: [/freebox/i],
|
|
1170
|
+
describe: function describe(ua) {
|
|
1171
|
+
var browser = {
|
|
1172
|
+
name: "Freebox"
|
|
1173
|
+
};
|
|
1174
|
+
var version = Utils.getFirstMatch(/navigateur web\/(\d+(\.\d+)+)/i, ua);
|
|
1175
|
+
if (version) browser.version = version;
|
|
1176
|
+
return browser;
|
|
1177
|
+
}
|
|
1154
1178
|
}, {
|
|
1155
1179
|
test: [/safari|applewebkit/i],
|
|
1156
1180
|
describe: function describe(ua) {
|
|
@@ -1231,6 +1255,8 @@ var parser_os_default = [{
|
|
|
1231
1255
|
test: [/(ipod|iphone|ipad)/i],
|
|
1232
1256
|
describe: function describe(ua) {
|
|
1233
1257
|
var version = Utils.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i, ua).replace(/[_\s]/g, ".");
|
|
1258
|
+
var safariVersion = Utils.getFirstMatch(/version\/(\d+(\.\d+)*) mobile\/\w+ safari\//i, ua);
|
|
1259
|
+
if (/^18(\.|$)/.test(version) && parseInt(safariVersion, 10) >= 26) version = safariVersion;
|
|
1234
1260
|
return {
|
|
1235
1261
|
name: OS_MAP.iOS,
|
|
1236
1262
|
version: version
|
|
@@ -1718,6 +1744,15 @@ var parser_platforms_default = [{
|
|
|
1718
1744
|
type: PLATFORMS_MAP.desktop
|
|
1719
1745
|
};
|
|
1720
1746
|
}
|
|
1747
|
+
}, {
|
|
1748
|
+
test: function test(parser) {
|
|
1749
|
+
return parser.getOSName(true) === "chrome os";
|
|
1750
|
+
},
|
|
1751
|
+
describe: function describe() {
|
|
1752
|
+
return {
|
|
1753
|
+
type: PLATFORMS_MAP.desktop
|
|
1754
|
+
};
|
|
1755
|
+
}
|
|
1721
1756
|
}, {
|
|
1722
1757
|
test: function test(parser) {
|
|
1723
1758
|
return parser.getOSName(true) === "playstation 4";
|
|
@@ -1745,7 +1780,15 @@ var parser_engines_default = [{
|
|
|
1745
1780
|
return parser.getBrowserName(true) === "microsoft edge";
|
|
1746
1781
|
},
|
|
1747
1782
|
describe: function describe(ua) {
|
|
1748
|
-
if (/\
|
|
1783
|
+
if (/\sedgios\//i.test(ua)) {
|
|
1784
|
+
var engine = {
|
|
1785
|
+
name: ENGINE_MAP.WebKit
|
|
1786
|
+
};
|
|
1787
|
+
var _version = Utils.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i, ua);
|
|
1788
|
+
if (_version) engine.version = _version;
|
|
1789
|
+
return engine;
|
|
1790
|
+
}
|
|
1791
|
+
if (/\sedga?\//i.test(ua)) return {
|
|
1749
1792
|
name: ENGINE_MAP.Blink
|
|
1750
1793
|
};
|
|
1751
1794
|
var version = Utils.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i, ua);
|