@cdk8s/awscdk-resolver 0.0.713 → 0.0.715

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.
Files changed (79) hide show
  1. package/.jsii +3 -3
  2. package/lib/resolve.js +1 -1
  3. package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/index.js +1 -1
  4. package/node_modules/@aws-sdk/client-cloudformation/package.json +4 -4
  5. package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +94 -1589
  6. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/index.js +1 -7
  7. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJsonRpcProtocol.js +1 -3
  8. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsRestJsonProtocol.js +1 -3
  9. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/index.d.ts +2 -8
  10. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJson1_0Protocol.d.ts +1 -2
  11. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJson1_1Protocol.d.ts +1 -2
  12. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJsonRpcProtocol.d.ts +2 -3
  13. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsRestJsonProtocol.d.ts +2 -3
  14. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/index.d.ts +10 -10
  15. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJson1_0Protocol.d.ts +1 -2
  16. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJson1_1Protocol.d.ts +1 -2
  17. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJsonRpcProtocol.d.ts +2 -3
  18. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsRestJsonProtocol.d.ts +2 -3
  19. package/node_modules/@aws-sdk/core/package.json +2 -2
  20. package/node_modules/@aws-sdk/credential-provider-env/package.json +3 -3
  21. package/node_modules/@aws-sdk/credential-provider-http/package.json +3 -3
  22. package/node_modules/@aws-sdk/credential-provider-ini/package.json +10 -10
  23. package/node_modules/@aws-sdk/credential-provider-login/package.json +4 -4
  24. package/node_modules/@aws-sdk/credential-provider-node/package.json +8 -8
  25. package/node_modules/@aws-sdk/credential-provider-process/package.json +3 -3
  26. package/node_modules/@aws-sdk/credential-provider-sso/package.json +5 -5
  27. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +4 -4
  28. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +1 -1
  29. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +1 -1
  30. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +1 -1
  31. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +1 -1
  32. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +1 -1
  33. package/node_modules/@aws-sdk/nested-clients/package.json +3 -3
  34. package/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +37 -19
  35. package/node_modules/@aws-sdk/token-providers/dist-es/fromSso.js +37 -19
  36. package/node_modules/@aws-sdk/token-providers/package.json +4 -4
  37. package/package.json +7 -7
  38. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonSettings.js +0 -1
  39. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v1/JsonCodec.js +0 -20
  40. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v1/JsonSettings.js +0 -1
  41. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v1/JsonShapeDeserializer.js +0 -160
  42. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v1/JsonShapeSerializer.js +0 -193
  43. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.js +0 -103
  44. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v2/JsonCodec2.js +0 -20
  45. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.js +0 -200
  46. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v2/JsonShapeSerializer2.js +0 -519
  47. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/detectBufferParsing.js +0 -18
  48. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/jsonReplacer.js +0 -46
  49. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/jsonReviver.js +0 -121
  50. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/needsReviver.js +0 -41
  51. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/parseJsonBody.js +0 -89
  52. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/JsonSettings.d.ts +0 -7
  53. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/codec-v1/JsonCodec.d.ts +0 -15
  54. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/codec-v1/JsonSettings.d.ts +0 -7
  55. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/codec-v1/JsonShapeDeserializer.d.ts +0 -14
  56. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/codec-v1/JsonShapeSerializer.d.ts +0 -29
  57. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.d.ts +0 -51
  58. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/codec-v2/JsonCodec2.d.ts +0 -13
  59. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.d.ts +0 -30
  60. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/codec-v2/JsonShapeSerializer2.d.ts +0 -60
  61. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/detectBufferParsing.d.ts +0 -1
  62. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/jsonReplacer.d.ts +0 -21
  63. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/jsonReviver.d.ts +0 -15
  64. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/needsReviver.d.ts +0 -11
  65. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/parseJsonBody.d.ts +0 -22
  66. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/JsonSettings.d.ts +0 -4
  67. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonCodec.d.ts +0 -11
  68. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonSettings.d.ts +0 -4
  69. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonShapeDeserializer.d.ts +0 -13
  70. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonShapeSerializer.d.ts +0 -18
  71. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.d.ts +0 -27
  72. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonCodec2.d.ts +0 -9
  73. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.d.ts +0 -15
  74. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonShapeSerializer2.d.ts +0 -39
  75. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/detectBufferParsing.d.ts +0 -1
  76. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/jsonReplacer.d.ts +0 -7
  77. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/jsonReviver.d.ts +0 -7
  78. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/needsReviver.d.ts +0 -2
  79. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/parseJsonBody.d.ts +0 -14
@@ -1,41 +0,0 @@
1
- import { NormalizedSchema } from "@smithy/core/schema";
2
- const REVIVER_SYMBOL = Symbol.for("@aws-sdk/reviver");
3
- export function needsReviver(schema) {
4
- const ns = NormalizedSchema.of(schema);
5
- const raw = ns.getSchema();
6
- if (Array.isArray(raw) && ns.isStructSchema()) {
7
- if (REVIVER_SYMBOL in raw) {
8
- return raw[REVIVER_SYMBOL];
9
- }
10
- const result = _check(ns, new Set());
11
- raw[REVIVER_SYMBOL] = result;
12
- return result;
13
- }
14
- return _check(ns, new Set());
15
- }
16
- function _check(ns, seen) {
17
- const raw = ns.getSchema();
18
- if (seen.has(raw)) {
19
- return false;
20
- }
21
- seen.add(raw);
22
- if (ns.isBigIntegerSchema() || ns.isBigDecimalSchema()) {
23
- return true;
24
- }
25
- if (ns.isStructSchema()) {
26
- for (const [, memberSchema] of ns.structIterator()) {
27
- if (_check(memberSchema, seen)) {
28
- return true;
29
- }
30
- }
31
- }
32
- else if (ns.isListSchema() || ns.isMapSchema()) {
33
- if (_check(ns.getValueSchema(), seen)) {
34
- return true;
35
- }
36
- }
37
- else if (ns.isDocumentSchema()) {
38
- return true;
39
- }
40
- return false;
41
- }
@@ -1,89 +0,0 @@
1
- import { collectBody } from "@smithy/core/protocols";
2
- import { collectBodyString } from "../common";
3
- import { detectBufferParsing } from "./detectBufferParsing";
4
- import { jsonReviver } from "./jsonReviver";
5
- import { needsReviver } from "./needsReviver";
6
- export async function parseJsonBody(streamBody, context, schema) {
7
- let parsingInput;
8
- if (detectBufferParsing() && typeof streamBody?.[Symbol.asyncIterator] === "function") {
9
- const buffer = await collectBody(streamBody, context);
10
- if (typeof Buffer === "function") {
11
- if (Buffer.isBuffer(buffer)) {
12
- parsingInput = buffer;
13
- }
14
- else {
15
- parsingInput = Buffer.from(buffer.buffer, buffer.byteOffset, buffer.byteLength);
16
- }
17
- }
18
- }
19
- if (!parsingInput) {
20
- parsingInput = await collectBodyString(streamBody, context);
21
- }
22
- if (parsingInput.length === 0) {
23
- return {};
24
- }
25
- const reviver = schema && needsReviver(schema) ? jsonReviver : undefined;
26
- try {
27
- return JSON.parse(parsingInput, reviver);
28
- }
29
- catch (e) {
30
- if (e?.name === "SyntaxError") {
31
- Object.defineProperty(e, "$responseBodyText", {
32
- value: typeof parsingInput === "string" ? parsingInput : parsingInput.toString("utf8"),
33
- });
34
- }
35
- throw e;
36
- }
37
- }
38
- export const parseJsonErrorBody = async (errorBody, context) => {
39
- const value = await parseJsonBody(errorBody, context);
40
- value.message = value.message ?? value.Message;
41
- return value;
42
- };
43
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
44
- const sanitizeErrorCode = (rawValue) => {
45
- let cleanValue = rawValue;
46
- if (typeof cleanValue === "number") {
47
- cleanValue = cleanValue.toString();
48
- }
49
- if (cleanValue.indexOf(",") >= 0) {
50
- cleanValue = cleanValue.split(",")[0];
51
- }
52
- if (cleanValue.indexOf(":") >= 0) {
53
- cleanValue = cleanValue.split(":")[0];
54
- }
55
- if (cleanValue.indexOf("#") >= 0) {
56
- cleanValue = cleanValue.split("#")[1];
57
- }
58
- return cleanValue;
59
- };
60
- export const loadRestJsonErrorCode = (output, data) => {
61
- return loadErrorCode(output, data, ["header", "code", "type"]);
62
- };
63
- export const loadJsonRpcErrorCode = (output, data, queryCompat = false) => {
64
- return loadErrorCode(output, data, queryCompat ? ["code", "header", "type"] : ["type", "code", "header"]);
65
- };
66
- const loadErrorCode = ({ headers }, data, order) => {
67
- while (order.length > 0) {
68
- const location = order.shift();
69
- switch (location) {
70
- case "header":
71
- const headerKey = findKey(headers ?? {}, "x-amzn-errortype");
72
- if (headerKey !== undefined) {
73
- return sanitizeErrorCode(headers[headerKey]);
74
- }
75
- break;
76
- case "code":
77
- const codeKey = findKey(data ?? {}, "code");
78
- if (codeKey && data[codeKey] !== undefined) {
79
- return sanitizeErrorCode(data[codeKey]);
80
- }
81
- break;
82
- case "type":
83
- if (data?.__type !== undefined) {
84
- return sanitizeErrorCode(data.__type);
85
- }
86
- break;
87
- }
88
- }
89
- };
@@ -1,7 +0,0 @@
1
- import type { CodecSettings } from "@smithy/types";
2
- /**
3
- * @public
4
- */
5
- export type JsonSettings = CodecSettings & {
6
- jsonName: boolean;
7
- };
@@ -1,15 +0,0 @@
1
- import type { Codec } from "@smithy/types";
2
- import { SerdeContextConfig } from "../../ConfigurableSerdeContext";
3
- import { JsonShapeDeserializer } from "./JsonShapeDeserializer";
4
- import { JsonShapeSerializer } from "./JsonShapeSerializer";
5
- import type { JsonSettings } from "./JsonSettings";
6
- /**
7
- * @deprecated use JsonCodec2.
8
- * @public
9
- */
10
- export declare class JsonCodec extends SerdeContextConfig implements Codec<string, string> {
11
- readonly settings: JsonSettings;
12
- constructor(settings: JsonSettings);
13
- createSerializer(): JsonShapeSerializer;
14
- createDeserializer(): JsonShapeDeserializer;
15
- }
@@ -1,7 +0,0 @@
1
- import type { CodecSettings } from "@smithy/types";
2
- /**
3
- * @public
4
- */
5
- export type JsonSettings = CodecSettings & {
6
- jsonName: boolean;
7
- };
@@ -1,14 +0,0 @@
1
- import type { DocumentType, Schema, ShapeDeserializer } from "@smithy/types";
2
- import { SerdeContextConfig } from "../../ConfigurableSerdeContext";
3
- import type { JsonSettings } from "./JsonSettings";
4
- /**
5
- * @deprecated prefer JsonShapeDeserializer in codec-v2.
6
- * @public
7
- */
8
- export declare class JsonShapeDeserializer extends SerdeContextConfig implements ShapeDeserializer<string> {
9
- readonly settings: JsonSettings;
10
- constructor(settings: JsonSettings);
11
- read(schema: Schema, data: string | Uint8Array | unknown): Promise<any>;
12
- readObject(schema: Schema, data: DocumentType): any;
13
- protected _read(schema: Schema, value: unknown): any;
14
- }
@@ -1,29 +0,0 @@
1
- import { NormalizedSchema } from "@smithy/core/schema";
2
- import type { Schema, ShapeSerializer } from "@smithy/types";
3
- import { SerdeContextConfig } from "../../ConfigurableSerdeContext";
4
- import type { JsonSettings } from "./JsonSettings";
5
- /**
6
- * @deprecated prefer byte-targeting JsonShapeSerializer or its string adapter StringJsonShapeSerializer in codec-v2.
7
- * @public
8
- */
9
- export declare class JsonShapeSerializer extends SerdeContextConfig implements ShapeSerializer<string> {
10
- readonly settings: JsonSettings;
11
- /**
12
- * Write buffer. Reused per value serialization pass.
13
- * In the initial implementation, this is not an incremental buffer.
14
- */
15
- protected buffer: any;
16
- protected useReplacer: boolean;
17
- protected rootSchema: NormalizedSchema | undefined;
18
- constructor(settings: JsonSettings);
19
- write(schema: Schema, value: unknown): void;
20
- flush(): string;
21
- /**
22
- * @internal
23
- */
24
- writeDiscriminatedDocument(schema: Schema, value: unknown): void;
25
- /**
26
- * Order if-statements by likelihood.
27
- */
28
- protected _write(schema: Schema, value: unknown, container?: NormalizedSchema): any;
29
- }
@@ -1,51 +0,0 @@
1
- /**
2
- * A Uint8Array subclass holding serialized JSON bytes that provides
3
- * string method compatibility for customer middleware.
4
- *
5
- * Middleware historically observed `request.body` as a string for JSON
6
- * protocol services. This class preserves that contract: string methods
7
- * and coercion (template literals, `+` operator) lazily decode the bytes
8
- * to a cached string. The HTTP transport layer still sees a Uint8Array
9
- * and sends raw bytes without conversion.
10
- *
11
- * @internal
12
- * @deprecated this adapter will be removed in a future version.
13
- */
14
- export declare class JsonBytesStringAdapter extends Uint8Array {
15
- private string;
16
- static allocUnsafe(bytes: number): JsonBytesStringAdapter;
17
- /**
18
- * Enables string coercion via template literals and `+` operator.
19
- */
20
- toString(): string;
21
- /**
22
- * Enables string coercion in comparison and arithmetic contexts.
23
- * @returns a string. The signature is set to avoid incompatibility with extending Uint8Array.
24
- */
25
- valueOf(): any;
26
- includes(searchString: string | number, position?: number): boolean;
27
- indexOf(searchString: string | number, position?: number): number;
28
- lastIndexOf(searchString: string | number, position?: number): number;
29
- startsWith(searchString: string, position?: number): boolean;
30
- endsWith(searchString: string, endPosition?: number): boolean;
31
- match(regexp: string | RegExp): RegExpMatchArray | null;
32
- replace(searchValue: string | RegExp, replaceValue: string): string;
33
- search(regexp: string | RegExp): number;
34
- split(separator: string | RegExp, limit?: number): string[];
35
- substring(start: number, end?: number): string;
36
- trim(): string;
37
- trimStart(): string;
38
- trimEnd(): string;
39
- charAt(pos: number): string;
40
- charCodeAt(index: number): number;
41
- padStart(maxLength: number, fillString?: string): string;
42
- padEnd(maxLength: number, fillString?: string): string;
43
- repeat(count: number): string;
44
- toUpperCase(): string;
45
- toLowerCase(): string;
46
- /**
47
- * Decodes the bytes to a UTF-8 string on first access, then caches.
48
- * Subsequent calls return the cached string with zero cost.
49
- */
50
- private s;
51
- }
@@ -1,13 +0,0 @@
1
- import type { $ShapeSerializer, $Codec, $ShapeDeserializer } from "@smithy/types";
2
- import { SerdeContextConfig } from "../../ConfigurableSerdeContext";
3
- import type { JsonSettings } from "../JsonSettings";
4
- /**
5
- * Codec grouping the v2 serializer and deserializer.
6
- * @public
7
- */
8
- export declare class JsonCodec2 extends SerdeContextConfig implements $Codec<Uint8Array, string> {
9
- readonly settings: JsonSettings;
10
- constructor(settings: JsonSettings);
11
- createSerializer(): $ShapeSerializer<Uint8Array>;
12
- createDeserializer(): $ShapeDeserializer<string>;
13
- }
@@ -1,30 +0,0 @@
1
- import type { DocumentType, Schema, ShapeDeserializer } from "@smithy/types";
2
- import { SerdeContextConfig } from "../../ConfigurableSerdeContext";
3
- import type { JsonSettings } from "../JsonSettings";
4
- /**
5
- * Performance-optimized JSON deserializer.
6
- *
7
- * Skips UTF-8 decoding when the runtime supports JSON.parse(Buffer) (Node 22+).
8
- *
9
- * After JSON.parse, lists, maps, and document containers are mutated in place
10
- * (element values are overwritten with their deserialized form) rather than
11
- * copied into new arrays/objects. Structs allocate a fresh object because
12
- * jsonName traits require key renaming, and building the output object
13
- * incrementally lets V8 assign a stable hidden class rather than
14
- * deoptimizing from repeated property deletion/addition on an existing shape.
15
- *
16
- * In-place mutation is safe here because the parsed tree is locally owned
17
- * after JSON.parse with no external references, so rewriting values avoids
18
- * redundant allocation and GC pressure.
19
- *
20
- * @public
21
- */
22
- export declare class JsonShapeDeserializer2 extends SerdeContextConfig implements ShapeDeserializer<string> {
23
- readonly settings: JsonSettings;
24
- constructor(settings: JsonSettings);
25
- read(schema: Schema, data: string | Uint8Array | unknown): Promise<any>;
26
- readObject(schema: Schema, data: DocumentType): any;
27
- protected _read(schema: Schema, value: unknown): any;
28
- private _readStruct;
29
- private needsTransform;
30
- }
@@ -1,60 +0,0 @@
1
- import { NormalizedSchema } from "@smithy/core/schema";
2
- import type { Schema, ShapeSerializer } from "@smithy/types";
3
- import { SerdeContextConfig } from "../../ConfigurableSerdeContext";
4
- import type { JsonSettings } from "../JsonSettings";
5
- /**
6
- * Single-pass JSON serializer that writes directly to a Uint8Array buffer.
7
- * Fewer intermediate states as when compared to the initial multi-pass implementation.
8
- *
9
- * @public
10
- */
11
- export declare class JsonShapeSerializer2 extends SerdeContextConfig implements ShapeSerializer<Uint8Array> {
12
- readonly settings: JsonSettings;
13
- private json;
14
- private i;
15
- private rootSchema;
16
- private rawValue;
17
- private passthrough;
18
- constructor(settings: JsonSettings);
19
- write(schema: Schema, value: unknown): void;
20
- /**
21
- * @internal
22
- */
23
- writeDiscriminatedDocument(schema: Schema, value: unknown): void;
24
- /**
25
- * Returns the serialized JSON as a Uint8Array (UTF-8 bytes).
26
- * This is the primary output — pass directly to request.body.
27
- */
28
- flush(): Uint8Array;
29
- protected ensure(byteCount: number): void;
30
- /**
31
- * Write a raw ASCII string (no JSON escaping). Used for pre-validated content
32
- * like numeric literals and pre-encoded base64.
33
- */
34
- protected writeAscii(s: string): void;
35
- /**
36
- * Write a quoted ASCII string with no escape checking.
37
- * Used for struct member keys (jsonName or model names) which are
38
- * guaranteed to be safe ASCII identifiers. No control chars, quotes,
39
- * backslashes, or non-ASCII.
40
- * Ensures extra room for surrounding structural chars (comma, colon).
41
- */
42
- protected writeAsciiQuoted(s: string): void;
43
- /**
44
- * Write a JSON-escaped string including the surrounding quotes.
45
- * Fast-path for ASCII, falls back to TextEncoder for multi-byte.
46
- */
47
- protected writeJsonString(s: string): void;
48
- protected writeUnicodeEscape(code: number): void;
49
- protected static readonly B64: Uint8Array;
50
- /**
51
- * Write a Uint8Array as a quoted base64 string directly into the buffer.
52
- * No intermediate JS string, no escape checking (base64 alphabet is safe ASCII).
53
- */
54
- protected writeBase64(data: Uint8Array): void;
55
- protected writeValue(schema: Schema, value: unknown, container: NormalizedSchema | undefined): void;
56
- protected writeStruct(ns: NormalizedSchema, value: Record<string, unknown>): void;
57
- protected writeList(ns: NormalizedSchema, value: unknown[], isDocument?: boolean): void;
58
- protected writeMap(ns: NormalizedSchema, value: Record<string, unknown>, isDocument?: boolean): void;
59
- protected writeTimestamp(ns: NormalizedSchema, value: Date): void;
60
- }
@@ -1 +0,0 @@
1
- export declare function detectBufferParsing(): boolean;
@@ -1,21 +0,0 @@
1
- /**
2
- * Serializes BigInt and NumericValue to JSON-number.
3
- * @internal
4
- */
5
- export declare class JsonReplacer {
6
- /**
7
- * Stores placeholder key to true serialized value lookup.
8
- */
9
- private readonly values;
10
- private counter;
11
- private stage;
12
- /**
13
- * Creates a jsonReplacer function that reserves big integer and big decimal values
14
- * for later replacement.
15
- */
16
- createReplacer(): (key: string, value: unknown) => unknown;
17
- /**
18
- * Replaces placeholder keys with their true values.
19
- */
20
- replaceInJson(json: string): string;
21
- }
@@ -1,15 +0,0 @@
1
- /**
2
- * @param key - JSON object key.
3
- * @param value - parsed value.
4
- * @param context - original JSON string for reference. Not available until Node.js 21 and unavailable in Safari as
5
- * of April 2025.
6
- *
7
- * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse#browser_compatibility
8
- *
9
- * @internal
10
- *
11
- * @returns transformed value.
12
- */
13
- export declare function jsonReviver(key: string, value: any, context?: {
14
- source?: string;
15
- }): any;
@@ -1,11 +0,0 @@
1
- import type { Schema } from "@smithy/types";
2
- /**
3
- * Determines whether a schema tree contains BigInteger or BigDecimal members,
4
- * which require a JSON.parse reviver to preserve numeric precision.
5
- *
6
- * The result is cached on the root static schema array (struct schemas) via a Symbol key,
7
- * so subsequent calls for the same schema are O(1).
8
- *
9
- * @internal
10
- */
11
- export declare function needsReviver(schema: Schema): boolean;
@@ -1,22 +0,0 @@
1
- import type { HttpResponse, Schema, SerdeFunctions } from "@smithy/types";
2
- /**
3
- * @deprecated new calls to parseJsonBody must pass schema.
4
- * @internal
5
- */
6
- export declare function parseJsonBody(streamBody: any, context: SerdeFunctions): Promise<any>;
7
- /**
8
- * @internal
9
- */
10
- export declare function parseJsonBody(streamBody: any, context: SerdeFunctions, schema: Schema): Promise<any>;
11
- /**
12
- * @internal
13
- */
14
- export declare const parseJsonErrorBody: (errorBody: any, context: SerdeFunctions) => Promise<any>;
15
- /**
16
- * @internal
17
- */
18
- export declare const loadRestJsonErrorCode: (output: HttpResponse, data: any) => string | undefined;
19
- /**
20
- * @internal
21
- */
22
- export declare const loadJsonRpcErrorCode: (output: HttpResponse, data: any, queryCompat?: boolean) => string | undefined;
@@ -1,4 +0,0 @@
1
- import { CodecSettings } from "@smithy/types";
2
- export type JsonSettings = CodecSettings & {
3
- jsonName: boolean;
4
- };
@@ -1,11 +0,0 @@
1
- import { Codec } from "@smithy/types";
2
- import { SerdeContextConfig } from "../../ConfigurableSerdeContext";
3
- import { JsonShapeDeserializer } from "./JsonShapeDeserializer";
4
- import { JsonShapeSerializer } from "./JsonShapeSerializer";
5
- import { JsonSettings } from "./JsonSettings";
6
- export declare class JsonCodec extends SerdeContextConfig implements Codec<string, string> {
7
- readonly settings: JsonSettings;
8
- constructor(settings: JsonSettings);
9
- createSerializer(): JsonShapeSerializer;
10
- createDeserializer(): JsonShapeDeserializer;
11
- }
@@ -1,4 +0,0 @@
1
- import { CodecSettings } from "@smithy/types";
2
- export type JsonSettings = CodecSettings & {
3
- jsonName: boolean;
4
- };
@@ -1,13 +0,0 @@
1
- import { DocumentType, Schema, ShapeDeserializer } from "@smithy/types";
2
- import { SerdeContextConfig } from "../../ConfigurableSerdeContext";
3
- import { JsonSettings } from "./JsonSettings";
4
- export declare class JsonShapeDeserializer
5
- extends SerdeContextConfig
6
- implements ShapeDeserializer<string>
7
- {
8
- readonly settings: JsonSettings;
9
- constructor(settings: JsonSettings);
10
- read(schema: Schema, data: string | Uint8Array | unknown): Promise<any>;
11
- readObject(schema: Schema, data: DocumentType): any;
12
- protected _read(schema: Schema, value: unknown): any;
13
- }
@@ -1,18 +0,0 @@
1
- import { NormalizedSchema } from "@smithy/core/schema";
2
- import { Schema, ShapeSerializer } from "@smithy/types";
3
- import { SerdeContextConfig } from "../../ConfigurableSerdeContext";
4
- import { JsonSettings } from "./JsonSettings";
5
- export declare class JsonShapeSerializer
6
- extends SerdeContextConfig
7
- implements ShapeSerializer<string>
8
- {
9
- readonly settings: JsonSettings;
10
- protected buffer: any;
11
- protected useReplacer: boolean;
12
- protected rootSchema: NormalizedSchema | undefined;
13
- constructor(settings: JsonSettings);
14
- write(schema: Schema, value: unknown): void;
15
- flush(): string;
16
- writeDiscriminatedDocument(schema: Schema, value: unknown): void;
17
- protected _write(schema: Schema, value: unknown, container?: NormalizedSchema): any;
18
- }
@@ -1,27 +0,0 @@
1
- export declare class JsonBytesStringAdapter extends Uint8Array {
2
- private string;
3
- static allocUnsafe(bytes: number): JsonBytesStringAdapter;
4
- toString(): string;
5
- valueOf(): any;
6
- includes(searchString: string | number, position?: number): boolean;
7
- indexOf(searchString: string | number, position?: number): number;
8
- lastIndexOf(searchString: string | number, position?: number): number;
9
- startsWith(searchString: string, position?: number): boolean;
10
- endsWith(searchString: string, endPosition?: number): boolean;
11
- match(regexp: string | RegExp): RegExpMatchArray | null;
12
- replace(searchValue: string | RegExp, replaceValue: string): string;
13
- search(regexp: string | RegExp): number;
14
- split(separator: string | RegExp, limit?: number): string[];
15
- substring(start: number, end?: number): string;
16
- trim(): string;
17
- trimStart(): string;
18
- trimEnd(): string;
19
- charAt(pos: number): string;
20
- charCodeAt(index: number): number;
21
- padStart(maxLength: number, fillString?: string): string;
22
- padEnd(maxLength: number, fillString?: string): string;
23
- repeat(count: number): string;
24
- toUpperCase(): string;
25
- toLowerCase(): string;
26
- private s;
27
- }
@@ -1,9 +0,0 @@
1
- import { $ShapeSerializer, $Codec, $ShapeDeserializer } from "@smithy/types";
2
- import { SerdeContextConfig } from "../../ConfigurableSerdeContext";
3
- import { JsonSettings } from "../JsonSettings";
4
- export declare class JsonCodec2 extends SerdeContextConfig implements $Codec<Uint8Array, string> {
5
- readonly settings: JsonSettings;
6
- constructor(settings: JsonSettings);
7
- createSerializer(): $ShapeSerializer<Uint8Array>;
8
- createDeserializer(): $ShapeDeserializer<string>;
9
- }
@@ -1,15 +0,0 @@
1
- import { DocumentType, Schema, ShapeDeserializer } from "@smithy/types";
2
- import { SerdeContextConfig } from "../../ConfigurableSerdeContext";
3
- import { JsonSettings } from "../JsonSettings";
4
- export declare class JsonShapeDeserializer2
5
- extends SerdeContextConfig
6
- implements ShapeDeserializer<string>
7
- {
8
- readonly settings: JsonSettings;
9
- constructor(settings: JsonSettings);
10
- read(schema: Schema, data: string | Uint8Array | unknown): Promise<any>;
11
- readObject(schema: Schema, data: DocumentType): any;
12
- protected _read(schema: Schema, value: unknown): any;
13
- private _readStruct;
14
- private needsTransform;
15
- }
@@ -1,39 +0,0 @@
1
- import { NormalizedSchema } from "@smithy/core/schema";
2
- import { Schema, ShapeSerializer } from "@smithy/types";
3
- import { SerdeContextConfig } from "../../ConfigurableSerdeContext";
4
- import { JsonSettings } from "../JsonSettings";
5
- export declare class JsonShapeSerializer2
6
- extends SerdeContextConfig
7
- implements ShapeSerializer<Uint8Array>
8
- {
9
- readonly settings: JsonSettings;
10
- private json;
11
- private i;
12
- private rootSchema;
13
- private rawValue;
14
- private passthrough;
15
- constructor(settings: JsonSettings);
16
- write(schema: Schema, value: unknown): void;
17
- writeDiscriminatedDocument(schema: Schema, value: unknown): void;
18
- flush(): Uint8Array;
19
- protected ensure(byteCount: number): void;
20
- protected writeAscii(s: string): void;
21
- protected writeAsciiQuoted(s: string): void;
22
- protected writeJsonString(s: string): void;
23
- protected writeUnicodeEscape(code: number): void;
24
- protected static readonly B64: Uint8Array;
25
- protected writeBase64(data: Uint8Array): void;
26
- protected writeValue(
27
- schema: Schema,
28
- value: unknown,
29
- container: NormalizedSchema | undefined,
30
- ): void;
31
- protected writeStruct(ns: NormalizedSchema, value: Record<string, unknown>): void;
32
- protected writeList(ns: NormalizedSchema, value: unknown[], isDocument?: boolean): void;
33
- protected writeMap(
34
- ns: NormalizedSchema,
35
- value: Record<string, unknown>,
36
- isDocument?: boolean,
37
- ): void;
38
- protected writeTimestamp(ns: NormalizedSchema, value: Date): void;
39
- }
@@ -1 +0,0 @@
1
- export declare function detectBufferParsing(): boolean;
@@ -1,7 +0,0 @@
1
- export declare class JsonReplacer {
2
- private readonly values;
3
- private counter;
4
- private stage;
5
- createReplacer(): (key: string, value: unknown) => unknown;
6
- replaceInJson(json: string): string;
7
- }
@@ -1,7 +0,0 @@
1
- export declare function jsonReviver(
2
- key: string,
3
- value: any,
4
- context?: {
5
- source?: string;
6
- },
7
- ): any;
@@ -1,2 +0,0 @@
1
- import { Schema } from "@smithy/types";
2
- export declare function needsReviver(schema: Schema): boolean;
@@ -1,14 +0,0 @@
1
- import { HttpResponse, Schema, SerdeFunctions } from "@smithy/types";
2
- export declare function parseJsonBody(streamBody: any, context: SerdeFunctions): Promise<any>;
3
- export declare function parseJsonBody(
4
- streamBody: any,
5
- context: SerdeFunctions,
6
- schema: Schema,
7
- ): Promise<any>;
8
- export declare const parseJsonErrorBody: (errorBody: any, context: SerdeFunctions) => Promise<any>;
9
- export declare const loadRestJsonErrorCode: (output: HttpResponse, data: any) => string | undefined;
10
- export declare const loadJsonRpcErrorCode: (
11
- output: HttpResponse,
12
- data: any,
13
- queryCompat?: boolean,
14
- ) => string | undefined;