@smithy/core 3.12.0 → 3.14.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/index.js +308 -412
- package/dist-cjs/submodules/cbor/index.js +957 -967
- package/dist-cjs/submodules/event-streams/index.js +198 -249
- package/dist-cjs/submodules/protocols/index.js +793 -895
- package/dist-cjs/submodules/schema/index.js +617 -798
- package/dist-cjs/submodules/serde/index.js +584 -680
- package/dist-es/submodules/cbor/CborCodec.js +4 -0
- package/dist-es/submodules/cbor/SmithyRpcV2CborProtocol.js +8 -6
- package/dist-es/submodules/cbor/cbor-decode.js +18 -18
- package/dist-es/submodules/cbor/cbor-encode.js +5 -5
- package/dist-es/submodules/event-streams/EventStreamSerde.js +5 -0
- package/dist-es/submodules/protocols/HttpProtocol.js +2 -0
- package/dist-es/submodules/protocols/requestBuilder.js +9 -7
- package/dist-es/submodules/protocols/serde/FromStringShapeDeserializer.js +2 -0
- package/dist-es/submodules/protocols/serde/HttpInterceptingShapeDeserializer.js +3 -0
- package/dist-es/submodules/protocols/serde/HttpInterceptingShapeSerializer.js +3 -0
- package/dist-es/submodules/protocols/serde/ToStringShapeSerializer.js +3 -2
- package/dist-es/submodules/schema/TypeRegistry.js +15 -6
- package/dist-es/submodules/schema/schemas/ErrorSchema.js +4 -6
- package/dist-es/submodules/schema/schemas/ListSchema.js +5 -5
- package/dist-es/submodules/schema/schemas/MapSchema.js +6 -5
- package/dist-es/submodules/schema/schemas/NormalizedSchema.js +16 -8
- package/dist-es/submodules/schema/schemas/OperationSchema.js +6 -5
- package/dist-es/submodules/schema/schemas/Schema.js +3 -0
- package/dist-es/submodules/schema/schemas/SimpleSchema.js +5 -5
- package/dist-es/submodules/schema/schemas/StructureSchema.js +6 -5
- package/dist-es/submodules/schema/schemas/sentinels.js +14 -14
- package/dist-es/submodules/serde/value/NumericValue.js +2 -0
- package/dist-es/util-identity-and-auth/DefaultIdentityProviderConfig.js +1 -1
- package/dist-es/util-identity-and-auth/memoizeIdentityProvider.js +4 -2
- package/dist-types/submodules/schema/TypeRegistry.d.ts +11 -1
- package/dist-types/submodules/schema/schemas/ErrorSchema.d.ts +8 -1
- package/dist-types/ts3.4/submodules/schema/TypeRegistry.d.ts +11 -1
- package/dist-types/ts3.4/submodules/schema/schemas/ErrorSchema.d.ts +8 -1
- package/package.json +11 -11
- package/dist-cjs/getSmithyContext.js +0 -1
- package/dist-cjs/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.js +0 -1
- package/dist-cjs/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js +0 -1
- package/dist-cjs/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js +0 -1
- package/dist-cjs/middleware-http-auth-scheme/index.js +0 -1
- package/dist-cjs/middleware-http-auth-scheme/resolveAuthOptions.js +0 -1
- package/dist-cjs/middleware-http-signing/getHttpSigningMiddleware.js +0 -1
- package/dist-cjs/middleware-http-signing/httpSigningMiddleware.js +0 -1
- package/dist-cjs/middleware-http-signing/index.js +0 -1
- package/dist-cjs/normalizeProvider.js +0 -1
- package/dist-cjs/pagination/createPaginator.js +0 -1
- package/dist-cjs/protocols/requestBuilder.js +0 -1
- package/dist-cjs/setFeature.js +0 -1
- package/dist-cjs/util-identity-and-auth/DefaultIdentityProviderConfig.js +0 -1
- package/dist-cjs/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js +0 -1
- package/dist-cjs/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js +0 -1
- package/dist-cjs/util-identity-and-auth/httpAuthSchemes/index.js +0 -1
- package/dist-cjs/util-identity-and-auth/httpAuthSchemes/noAuth.js +0 -1
- package/dist-cjs/util-identity-and-auth/index.js +0 -1
- package/dist-cjs/util-identity-and-auth/memoizeIdentityProvider.js +0 -1
|
@@ -10,6 +10,9 @@ import { StructureSchema } from "./StructureSchema";
|
|
|
10
10
|
*/
|
|
11
11
|
export declare class ErrorSchema extends StructureSchema {
|
|
12
12
|
static readonly symbol: unique symbol;
|
|
13
|
+
/**
|
|
14
|
+
* @deprecated - field unused.
|
|
15
|
+
*/
|
|
13
16
|
ctor: any;
|
|
14
17
|
protected readonly symbol: symbol;
|
|
15
18
|
}
|
|
@@ -25,4 +28,8 @@ export declare class ErrorSchema extends StructureSchema {
|
|
|
25
28
|
* @param memberList - list of schemaRef corresponding to each
|
|
26
29
|
* @param ctor - class reference for the existing Error extending class.
|
|
27
30
|
*/
|
|
28
|
-
export declare const error: (namespace: string, name: string, traits: SchemaTraits, memberNames: string[], memberList: SchemaRef[],
|
|
31
|
+
export declare const error: (namespace: string, name: string, traits: SchemaTraits, memberNames: string[], memberList: SchemaRef[],
|
|
32
|
+
/**
|
|
33
|
+
* @deprecated - field unused.
|
|
34
|
+
*/
|
|
35
|
+
ctor?: any) => ErrorSchema;
|
|
@@ -8,6 +8,7 @@ import { ErrorSchema } from "./schemas/ErrorSchema";
|
|
|
8
8
|
export declare class TypeRegistry {
|
|
9
9
|
readonly namespace: string;
|
|
10
10
|
private schemas;
|
|
11
|
+
private exceptions;
|
|
11
12
|
static readonly registries: Map<string, TypeRegistry>;
|
|
12
13
|
private constructor();
|
|
13
14
|
/**
|
|
@@ -27,6 +28,15 @@ export declare class TypeRegistry {
|
|
|
27
28
|
* @returns the schema.
|
|
28
29
|
*/
|
|
29
30
|
getSchema(shapeId: string): ISchema;
|
|
31
|
+
/**
|
|
32
|
+
* Associates an error schema with its constructor.
|
|
33
|
+
*/
|
|
34
|
+
registerError(errorSchema: ErrorSchema, ctor: any): void;
|
|
35
|
+
/**
|
|
36
|
+
* @param errorSchema - query.
|
|
37
|
+
* @returns Error constructor that extends the service's base exception.
|
|
38
|
+
*/
|
|
39
|
+
getErrorCtor(errorSchema: ErrorSchema): any;
|
|
30
40
|
/**
|
|
31
41
|
* The smithy-typescript code generator generates a synthetic (i.e. unmodeled) base exception,
|
|
32
42
|
* because generated SDKs before the introduction of schemas have the notion of a ServiceBaseException, which
|
|
@@ -49,7 +59,7 @@ export declare class TypeRegistry {
|
|
|
49
59
|
/**
|
|
50
60
|
* Unloads the current TypeRegistry.
|
|
51
61
|
*/
|
|
52
|
-
|
|
62
|
+
clear(): void;
|
|
53
63
|
private normalizeShapeId;
|
|
54
64
|
private getNamespace;
|
|
55
65
|
}
|
|
@@ -10,6 +10,9 @@ import { StructureSchema } from "./StructureSchema";
|
|
|
10
10
|
*/
|
|
11
11
|
export declare class ErrorSchema extends StructureSchema {
|
|
12
12
|
static readonly symbol: unique symbol;
|
|
13
|
+
/**
|
|
14
|
+
* @deprecated - field unused.
|
|
15
|
+
*/
|
|
13
16
|
ctor: any;
|
|
14
17
|
protected readonly symbol: symbol;
|
|
15
18
|
}
|
|
@@ -25,4 +28,8 @@ export declare class ErrorSchema extends StructureSchema {
|
|
|
25
28
|
* @param memberList - list of schemaRef corresponding to each
|
|
26
29
|
* @param ctor - class reference for the existing Error extending class.
|
|
27
30
|
*/
|
|
28
|
-
export declare const error: (namespace: string, name: string, traits: SchemaTraits, memberNames: string[], memberList: SchemaRef[],
|
|
31
|
+
export declare const error: (namespace: string, name: string, traits: SchemaTraits, memberNames: string[], memberList: SchemaRef[],
|
|
32
|
+
/**
|
|
33
|
+
* @deprecated - field unused.
|
|
34
|
+
*/
|
|
35
|
+
ctor?: any) => ErrorSchema;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.14.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",
|
|
@@ -77,15 +77,15 @@
|
|
|
77
77
|
"license": "Apache-2.0",
|
|
78
78
|
"sideEffects": false,
|
|
79
79
|
"dependencies": {
|
|
80
|
-
"@smithy/middleware-serde": "^4.
|
|
81
|
-
"@smithy/protocol-http": "^5.
|
|
82
|
-
"@smithy/types": "^4.
|
|
83
|
-
"@smithy/util-base64": "^4.
|
|
84
|
-
"@smithy/util-body-length-browser": "^4.
|
|
85
|
-
"@smithy/util-middleware": "^4.
|
|
86
|
-
"@smithy/util-stream": "^4.
|
|
87
|
-
"@smithy/util-utf8": "^4.
|
|
88
|
-
"@smithy/uuid": "^1.
|
|
80
|
+
"@smithy/middleware-serde": "^4.2.0",
|
|
81
|
+
"@smithy/protocol-http": "^5.3.0",
|
|
82
|
+
"@smithy/types": "^4.6.0",
|
|
83
|
+
"@smithy/util-base64": "^4.2.0",
|
|
84
|
+
"@smithy/util-body-length-browser": "^4.2.0",
|
|
85
|
+
"@smithy/util-middleware": "^4.2.0",
|
|
86
|
+
"@smithy/util-stream": "^4.4.0",
|
|
87
|
+
"@smithy/util-utf8": "^4.2.0",
|
|
88
|
+
"@smithy/uuid": "^1.1.0",
|
|
89
89
|
"tslib": "^2.6.2"
|
|
90
90
|
},
|
|
91
91
|
"engines": {
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
"directory": "packages/core"
|
|
119
119
|
},
|
|
120
120
|
"devDependencies": {
|
|
121
|
-
"@smithy/eventstream-serde-node": "^4.
|
|
121
|
+
"@smithy/eventstream-serde-node": "^4.2.0",
|
|
122
122
|
"@types/node": "^18.11.9",
|
|
123
123
|
"concurrently": "7.0.0",
|
|
124
124
|
"downlevel-dts": "0.10.1",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("./index.js");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../index.js");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../index.js");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../index.js");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../index.js");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../index.js");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../index.js");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../index.js");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../index.js");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("./index.js");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../index.js");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../index.js");
|
package/dist-cjs/setFeature.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("./index.js");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../index.js");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../../index.js");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../../index.js");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../../index.js");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../../index.js");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../index.js");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../index.js");
|