@aws-sdk/client-inspector-scan 3.489.0 → 3.495.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/InspectorScan.js +1 -13
- package/dist-cjs/InspectorScanClient.js +1 -43
- package/dist-cjs/commands/ScanSbomCommand.js +1 -28
- package/dist-cjs/commands/index.js +1 -4
- package/dist-cjs/endpoint/EndpointParameters.js +1 -18
- package/dist-cjs/extensionConfiguration.js +1 -2
- package/dist-cjs/index.js +462 -10
- package/dist-cjs/models/InspectorScanServiceException.js +1 -12
- package/dist-cjs/models/index.js +1 -4
- package/dist-cjs/models/models_0.js +1 -80
- package/dist-cjs/protocols/Aws_restJson1.js +1 -185
- package/dist-cjs/runtimeExtensions.js +1 -22
- package/package.json +40 -40
|
@@ -1,13 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.InspectorScan = void 0;
|
|
4
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
5
|
-
const ScanSbomCommand_1 = require("./commands/ScanSbomCommand");
|
|
6
|
-
const InspectorScanClient_1 = require("./InspectorScanClient");
|
|
7
|
-
const commands = {
|
|
8
|
-
ScanSbomCommand: ScanSbomCommand_1.ScanSbomCommand,
|
|
9
|
-
};
|
|
10
|
-
class InspectorScan extends InspectorScanClient_1.InspectorScanClient {
|
|
11
|
-
}
|
|
12
|
-
exports.InspectorScan = InspectorScan;
|
|
13
|
-
(0, smithy_client_1.createAggregatedClient)(commands, InspectorScan);
|
|
1
|
+
module.exports = require("./index.js");
|
|
@@ -1,43 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.InspectorScanClient = exports.__Client = void 0;
|
|
4
|
-
const middleware_host_header_1 = require("@aws-sdk/middleware-host-header");
|
|
5
|
-
const middleware_logger_1 = require("@aws-sdk/middleware-logger");
|
|
6
|
-
const middleware_recursion_detection_1 = require("@aws-sdk/middleware-recursion-detection");
|
|
7
|
-
const middleware_signing_1 = require("@aws-sdk/middleware-signing");
|
|
8
|
-
const middleware_user_agent_1 = require("@aws-sdk/middleware-user-agent");
|
|
9
|
-
const config_resolver_1 = require("@smithy/config-resolver");
|
|
10
|
-
const middleware_content_length_1 = require("@smithy/middleware-content-length");
|
|
11
|
-
const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
|
|
12
|
-
const middleware_retry_1 = require("@smithy/middleware-retry");
|
|
13
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
14
|
-
Object.defineProperty(exports, "__Client", { enumerable: true, get: function () { return smithy_client_1.Client; } });
|
|
15
|
-
const EndpointParameters_1 = require("./endpoint/EndpointParameters");
|
|
16
|
-
const runtimeConfig_1 = require("./runtimeConfig");
|
|
17
|
-
const runtimeExtensions_1 = require("./runtimeExtensions");
|
|
18
|
-
class InspectorScanClient extends smithy_client_1.Client {
|
|
19
|
-
constructor(...[configuration]) {
|
|
20
|
-
const _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {});
|
|
21
|
-
const _config_1 = (0, EndpointParameters_1.resolveClientEndpointParameters)(_config_0);
|
|
22
|
-
const _config_2 = (0, config_resolver_1.resolveRegionConfig)(_config_1);
|
|
23
|
-
const _config_3 = (0, middleware_endpoint_1.resolveEndpointConfig)(_config_2);
|
|
24
|
-
const _config_4 = (0, middleware_retry_1.resolveRetryConfig)(_config_3);
|
|
25
|
-
const _config_5 = (0, middleware_host_header_1.resolveHostHeaderConfig)(_config_4);
|
|
26
|
-
const _config_6 = (0, middleware_signing_1.resolveAwsAuthConfig)(_config_5);
|
|
27
|
-
const _config_7 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_6);
|
|
28
|
-
const _config_8 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_7, configuration?.extensions || []);
|
|
29
|
-
super(_config_8);
|
|
30
|
-
this.config = _config_8;
|
|
31
|
-
this.middlewareStack.use((0, middleware_retry_1.getRetryPlugin)(this.config));
|
|
32
|
-
this.middlewareStack.use((0, middleware_content_length_1.getContentLengthPlugin)(this.config));
|
|
33
|
-
this.middlewareStack.use((0, middleware_host_header_1.getHostHeaderPlugin)(this.config));
|
|
34
|
-
this.middlewareStack.use((0, middleware_logger_1.getLoggerPlugin)(this.config));
|
|
35
|
-
this.middlewareStack.use((0, middleware_recursion_detection_1.getRecursionDetectionPlugin)(this.config));
|
|
36
|
-
this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(this.config));
|
|
37
|
-
this.middlewareStack.use((0, middleware_user_agent_1.getUserAgentPlugin)(this.config));
|
|
38
|
-
}
|
|
39
|
-
destroy() {
|
|
40
|
-
super.destroy();
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
exports.InspectorScanClient = InspectorScanClient;
|
|
1
|
+
module.exports = require("./index.js");
|
|
@@ -1,28 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ScanSbomCommand = exports.$Command = void 0;
|
|
4
|
-
const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
|
|
5
|
-
const middleware_serde_1 = require("@smithy/middleware-serde");
|
|
6
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
-
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
|
8
|
-
const EndpointParameters_1 = require("../endpoint/EndpointParameters");
|
|
9
|
-
const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
|
|
10
|
-
class ScanSbomCommand extends smithy_client_1.Command
|
|
11
|
-
.classBuilder()
|
|
12
|
-
.ep({
|
|
13
|
-
...EndpointParameters_1.commonParams,
|
|
14
|
-
})
|
|
15
|
-
.m(function (Command, cs, config, o) {
|
|
16
|
-
return [
|
|
17
|
-
(0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
18
|
-
(0, middleware_endpoint_1.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
|
|
19
|
-
];
|
|
20
|
-
})
|
|
21
|
-
.s("InspectorScan", "ScanSbom", {})
|
|
22
|
-
.n("InspectorScanClient", "ScanSbomCommand")
|
|
23
|
-
.f(void 0, void 0)
|
|
24
|
-
.ser(Aws_restJson1_1.se_ScanSbomCommand)
|
|
25
|
-
.de(Aws_restJson1_1.de_ScanSbomCommand)
|
|
26
|
-
.build() {
|
|
27
|
-
}
|
|
28
|
-
exports.ScanSbomCommand = ScanSbomCommand;
|
|
1
|
+
module.exports = require("../index.js");
|
|
@@ -1,18 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.commonParams = exports.resolveClientEndpointParameters = void 0;
|
|
4
|
-
const resolveClientEndpointParameters = (options) => {
|
|
5
|
-
return {
|
|
6
|
-
...options,
|
|
7
|
-
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
|
|
8
|
-
useFipsEndpoint: options.useFipsEndpoint ?? false,
|
|
9
|
-
defaultSigningName: "inspector-scan",
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
exports.resolveClientEndpointParameters = resolveClientEndpointParameters;
|
|
13
|
-
exports.commonParams = {
|
|
14
|
-
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
15
|
-
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
16
|
-
Region: { type: "builtInParams", name: "region" },
|
|
17
|
-
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
18
|
-
};
|
|
1
|
+
module.exports = require("../index.js");
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
module.exports = require("./index.js");
|
package/dist-cjs/index.js
CHANGED
|
@@ -1,11 +1,463 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/index.ts
|
|
22
|
+
var src_exports = {};
|
|
23
|
+
__export(src_exports, {
|
|
24
|
+
$Command: () => import_smithy_client.Command,
|
|
25
|
+
AccessDeniedException: () => AccessDeniedException,
|
|
26
|
+
InspectorScan: () => InspectorScan,
|
|
27
|
+
InspectorScanClient: () => InspectorScanClient,
|
|
28
|
+
InspectorScanServiceException: () => InspectorScanServiceException,
|
|
29
|
+
InternalServerException: () => InternalServerException,
|
|
30
|
+
InternalServerExceptionReason: () => InternalServerExceptionReason,
|
|
31
|
+
OutputFormat: () => OutputFormat,
|
|
32
|
+
ScanSbomCommand: () => ScanSbomCommand,
|
|
33
|
+
ThrottlingException: () => ThrottlingException,
|
|
34
|
+
ValidationException: () => ValidationException,
|
|
35
|
+
ValidationExceptionReason: () => ValidationExceptionReason,
|
|
36
|
+
__Client: () => import_smithy_client.Client,
|
|
37
|
+
__MetadataBearer: () => import_types.MetadataBearer
|
|
38
|
+
});
|
|
39
|
+
module.exports = __toCommonJS(src_exports);
|
|
40
|
+
|
|
41
|
+
// src/InspectorScanClient.ts
|
|
42
|
+
var import_middleware_host_header = require("@aws-sdk/middleware-host-header");
|
|
43
|
+
var import_middleware_logger = require("@aws-sdk/middleware-logger");
|
|
44
|
+
var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");
|
|
45
|
+
var import_middleware_signing = require("@aws-sdk/middleware-signing");
|
|
46
|
+
var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");
|
|
47
|
+
var import_config_resolver = require("@smithy/config-resolver");
|
|
48
|
+
var import_middleware_content_length = require("@smithy/middleware-content-length");
|
|
49
|
+
var import_middleware_endpoint = require("@smithy/middleware-endpoint");
|
|
50
|
+
var import_middleware_retry = require("@smithy/middleware-retry");
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
// src/endpoint/EndpointParameters.ts
|
|
54
|
+
var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
|
|
55
|
+
return {
|
|
56
|
+
...options,
|
|
57
|
+
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
|
|
58
|
+
useFipsEndpoint: options.useFipsEndpoint ?? false,
|
|
59
|
+
defaultSigningName: "inspector-scan"
|
|
60
|
+
};
|
|
61
|
+
}, "resolveClientEndpointParameters");
|
|
62
|
+
var commonParams = {
|
|
63
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
64
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
65
|
+
Region: { type: "builtInParams", name: "region" },
|
|
66
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
// src/InspectorScanClient.ts
|
|
70
|
+
var import_runtimeConfig = require("././runtimeConfig");
|
|
71
|
+
|
|
72
|
+
// src/runtimeExtensions.ts
|
|
73
|
+
var import_region_config_resolver = require("@aws-sdk/region-config-resolver");
|
|
74
|
+
var import_protocol_http = require("@smithy/protocol-http");
|
|
75
|
+
var import_smithy_client = require("@smithy/smithy-client");
|
|
76
|
+
var asPartial = /* @__PURE__ */ __name((t) => t, "asPartial");
|
|
77
|
+
var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
|
|
78
|
+
const extensionConfiguration = {
|
|
79
|
+
...asPartial((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig)),
|
|
80
|
+
...asPartial((0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig)),
|
|
81
|
+
...asPartial((0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig))
|
|
82
|
+
};
|
|
83
|
+
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
84
|
+
return {
|
|
85
|
+
...runtimeConfig,
|
|
86
|
+
...(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
|
|
87
|
+
...(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
|
|
88
|
+
...(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration)
|
|
89
|
+
};
|
|
90
|
+
}, "resolveRuntimeExtensions");
|
|
91
|
+
|
|
92
|
+
// src/InspectorScanClient.ts
|
|
93
|
+
var _InspectorScanClient = class _InspectorScanClient extends import_smithy_client.Client {
|
|
94
|
+
constructor(...[configuration]) {
|
|
95
|
+
const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
|
|
96
|
+
const _config_1 = resolveClientEndpointParameters(_config_0);
|
|
97
|
+
const _config_2 = (0, import_config_resolver.resolveRegionConfig)(_config_1);
|
|
98
|
+
const _config_3 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_2);
|
|
99
|
+
const _config_4 = (0, import_middleware_retry.resolveRetryConfig)(_config_3);
|
|
100
|
+
const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
|
|
101
|
+
const _config_6 = (0, import_middleware_signing.resolveAwsAuthConfig)(_config_5);
|
|
102
|
+
const _config_7 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_6);
|
|
103
|
+
const _config_8 = resolveRuntimeExtensions(_config_7, (configuration == null ? void 0 : configuration.extensions) || []);
|
|
104
|
+
super(_config_8);
|
|
105
|
+
this.config = _config_8;
|
|
106
|
+
this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
|
|
107
|
+
this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
|
|
108
|
+
this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
|
|
109
|
+
this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
|
|
110
|
+
this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
|
|
111
|
+
this.middlewareStack.use((0, import_middleware_signing.getAwsAuthPlugin)(this.config));
|
|
112
|
+
this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Destroy underlying resources, like sockets. It's usually not necessary to do this.
|
|
116
|
+
* However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
|
|
117
|
+
* Otherwise, sockets might stay open for quite a long time before the server terminates them.
|
|
118
|
+
*/
|
|
119
|
+
destroy() {
|
|
120
|
+
super.destroy();
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
__name(_InspectorScanClient, "InspectorScanClient");
|
|
124
|
+
var InspectorScanClient = _InspectorScanClient;
|
|
125
|
+
|
|
126
|
+
// src/InspectorScan.ts
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
// src/commands/ScanSbomCommand.ts
|
|
130
|
+
|
|
131
|
+
var import_middleware_serde = require("@smithy/middleware-serde");
|
|
132
|
+
|
|
133
|
+
var import_types = require("@smithy/types");
|
|
134
|
+
|
|
135
|
+
// src/protocols/Aws_restJson1.ts
|
|
136
|
+
var import_core = require("@smithy/core");
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
// src/models/InspectorScanServiceException.ts
|
|
140
|
+
|
|
141
|
+
var _InspectorScanServiceException = class _InspectorScanServiceException extends import_smithy_client.ServiceException {
|
|
142
|
+
/**
|
|
143
|
+
* @internal
|
|
144
|
+
*/
|
|
145
|
+
constructor(options) {
|
|
146
|
+
super(options);
|
|
147
|
+
Object.setPrototypeOf(this, _InspectorScanServiceException.prototype);
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
__name(_InspectorScanServiceException, "InspectorScanServiceException");
|
|
151
|
+
var InspectorScanServiceException = _InspectorScanServiceException;
|
|
152
|
+
|
|
153
|
+
// src/models/models_0.ts
|
|
154
|
+
var _AccessDeniedException = class _AccessDeniedException extends InspectorScanServiceException {
|
|
155
|
+
/**
|
|
156
|
+
* @internal
|
|
157
|
+
*/
|
|
158
|
+
constructor(opts) {
|
|
159
|
+
super({
|
|
160
|
+
name: "AccessDeniedException",
|
|
161
|
+
$fault: "client",
|
|
162
|
+
...opts
|
|
163
|
+
});
|
|
164
|
+
this.name = "AccessDeniedException";
|
|
165
|
+
this.$fault = "client";
|
|
166
|
+
Object.setPrototypeOf(this, _AccessDeniedException.prototype);
|
|
167
|
+
}
|
|
168
|
+
};
|
|
169
|
+
__name(_AccessDeniedException, "AccessDeniedException");
|
|
170
|
+
var AccessDeniedException = _AccessDeniedException;
|
|
171
|
+
var InternalServerExceptionReason = {
|
|
172
|
+
FAILED_TO_GENERATE_SBOM: "FAILED_TO_GENERATE_SBOM",
|
|
173
|
+
OTHER: "OTHER"
|
|
174
|
+
};
|
|
175
|
+
var _InternalServerException = class _InternalServerException extends InspectorScanServiceException {
|
|
176
|
+
/**
|
|
177
|
+
* @internal
|
|
178
|
+
*/
|
|
179
|
+
constructor(opts) {
|
|
180
|
+
super({
|
|
181
|
+
name: "InternalServerException",
|
|
182
|
+
$fault: "server",
|
|
183
|
+
...opts
|
|
184
|
+
});
|
|
185
|
+
this.name = "InternalServerException";
|
|
186
|
+
this.$fault = "server";
|
|
187
|
+
this.$retryable = {};
|
|
188
|
+
Object.setPrototypeOf(this, _InternalServerException.prototype);
|
|
189
|
+
this.reason = opts.reason;
|
|
190
|
+
this.retryAfterSeconds = opts.retryAfterSeconds;
|
|
191
|
+
}
|
|
192
|
+
};
|
|
193
|
+
__name(_InternalServerException, "InternalServerException");
|
|
194
|
+
var InternalServerException = _InternalServerException;
|
|
195
|
+
var OutputFormat = {
|
|
196
|
+
CYCLONE_DX_1_5: "CYCLONE_DX_1_5",
|
|
197
|
+
INSPECTOR: "INSPECTOR"
|
|
198
|
+
};
|
|
199
|
+
var _ThrottlingException = class _ThrottlingException extends InspectorScanServiceException {
|
|
200
|
+
/**
|
|
201
|
+
* @internal
|
|
202
|
+
*/
|
|
203
|
+
constructor(opts) {
|
|
204
|
+
super({
|
|
205
|
+
name: "ThrottlingException",
|
|
206
|
+
$fault: "client",
|
|
207
|
+
...opts
|
|
208
|
+
});
|
|
209
|
+
this.name = "ThrottlingException";
|
|
210
|
+
this.$fault = "client";
|
|
211
|
+
this.$retryable = {
|
|
212
|
+
throttling: true
|
|
213
|
+
};
|
|
214
|
+
Object.setPrototypeOf(this, _ThrottlingException.prototype);
|
|
215
|
+
this.retryAfterSeconds = opts.retryAfterSeconds;
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
__name(_ThrottlingException, "ThrottlingException");
|
|
219
|
+
var ThrottlingException = _ThrottlingException;
|
|
220
|
+
var ValidationExceptionReason = {
|
|
221
|
+
CANNOT_PARSE: "CANNOT_PARSE",
|
|
222
|
+
FIELD_VALIDATION_FAILED: "FIELD_VALIDATION_FAILED",
|
|
223
|
+
OTHER: "OTHER",
|
|
224
|
+
UNKNOWN_OPERATION: "UNKNOWN_OPERATION",
|
|
225
|
+
UNSUPPORTED_SBOM_TYPE: "UNSUPPORTED_SBOM_TYPE"
|
|
226
|
+
};
|
|
227
|
+
var _ValidationException = class _ValidationException extends InspectorScanServiceException {
|
|
228
|
+
/**
|
|
229
|
+
* @internal
|
|
230
|
+
*/
|
|
231
|
+
constructor(opts) {
|
|
232
|
+
super({
|
|
233
|
+
name: "ValidationException",
|
|
234
|
+
$fault: "client",
|
|
235
|
+
...opts
|
|
236
|
+
});
|
|
237
|
+
this.name = "ValidationException";
|
|
238
|
+
this.$fault = "client";
|
|
239
|
+
Object.setPrototypeOf(this, _ValidationException.prototype);
|
|
240
|
+
this.reason = opts.reason;
|
|
241
|
+
this.fields = opts.fields;
|
|
242
|
+
}
|
|
243
|
+
};
|
|
244
|
+
__name(_ValidationException, "ValidationException");
|
|
245
|
+
var ValidationException = _ValidationException;
|
|
246
|
+
|
|
247
|
+
// src/protocols/Aws_restJson1.ts
|
|
248
|
+
var se_ScanSbomCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
249
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
250
|
+
const headers = {
|
|
251
|
+
"content-type": "application/json"
|
|
252
|
+
};
|
|
253
|
+
b.bp("/scan/sbom");
|
|
254
|
+
let body;
|
|
255
|
+
body = JSON.stringify(
|
|
256
|
+
(0, import_smithy_client.take)(input, {
|
|
257
|
+
outputFormat: [],
|
|
258
|
+
sbom: (_) => se_Sbom(_, context)
|
|
259
|
+
})
|
|
260
|
+
);
|
|
261
|
+
b.m("POST").h(headers).b(body);
|
|
262
|
+
return b.build();
|
|
263
|
+
}, "se_ScanSbomCommand");
|
|
264
|
+
var de_ScanSbomCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
265
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
266
|
+
return de_ScanSbomCommandError(output, context);
|
|
267
|
+
}
|
|
268
|
+
const contents = (0, import_smithy_client.map)({
|
|
269
|
+
$metadata: deserializeMetadata(output)
|
|
270
|
+
});
|
|
271
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
|
|
272
|
+
const doc = (0, import_smithy_client.take)(data, {
|
|
273
|
+
sbom: (_) => de_Sbom(_, context)
|
|
274
|
+
});
|
|
275
|
+
Object.assign(contents, doc);
|
|
276
|
+
return contents;
|
|
277
|
+
}, "de_ScanSbomCommand");
|
|
278
|
+
var de_ScanSbomCommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
279
|
+
const parsedOutput = {
|
|
280
|
+
...output,
|
|
281
|
+
body: await parseErrorBody(output.body, context)
|
|
282
|
+
};
|
|
283
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
284
|
+
switch (errorCode) {
|
|
285
|
+
case "AccessDeniedException":
|
|
286
|
+
case "com.amazonaws.inspectorscan#AccessDeniedException":
|
|
287
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
288
|
+
case "InternalServerException":
|
|
289
|
+
case "com.amazonaws.inspectorscan#InternalServerException":
|
|
290
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
291
|
+
case "ThrottlingException":
|
|
292
|
+
case "com.amazonaws.inspectorscan#ThrottlingException":
|
|
293
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
294
|
+
case "ValidationException":
|
|
295
|
+
case "com.amazonaws.inspectorscan#ValidationException":
|
|
296
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
297
|
+
default:
|
|
298
|
+
const parsedBody = parsedOutput.body;
|
|
299
|
+
return throwDefaultError({
|
|
300
|
+
output,
|
|
301
|
+
parsedBody,
|
|
302
|
+
errorCode
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
}, "de_ScanSbomCommandError");
|
|
306
|
+
var throwDefaultError = (0, import_smithy_client.withBaseException)(InspectorScanServiceException);
|
|
307
|
+
var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
308
|
+
const contents = (0, import_smithy_client.map)({});
|
|
309
|
+
const data = parsedOutput.body;
|
|
310
|
+
const doc = (0, import_smithy_client.take)(data, {
|
|
311
|
+
message: import_smithy_client.expectString
|
|
312
|
+
});
|
|
313
|
+
Object.assign(contents, doc);
|
|
314
|
+
const exception = new AccessDeniedException({
|
|
315
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
316
|
+
...contents
|
|
317
|
+
});
|
|
318
|
+
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
|
|
319
|
+
}, "de_AccessDeniedExceptionRes");
|
|
320
|
+
var de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
321
|
+
const contents = (0, import_smithy_client.map)({
|
|
322
|
+
[_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => (0, import_smithy_client.strictParseInt32)(parsedOutput.headers[_ra])]
|
|
323
|
+
});
|
|
324
|
+
const data = parsedOutput.body;
|
|
325
|
+
const doc = (0, import_smithy_client.take)(data, {
|
|
326
|
+
message: import_smithy_client.expectString,
|
|
327
|
+
reason: import_smithy_client.expectString
|
|
328
|
+
});
|
|
329
|
+
Object.assign(contents, doc);
|
|
330
|
+
const exception = new InternalServerException({
|
|
331
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
332
|
+
...contents
|
|
333
|
+
});
|
|
334
|
+
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
|
|
335
|
+
}, "de_InternalServerExceptionRes");
|
|
336
|
+
var de_ThrottlingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
337
|
+
const contents = (0, import_smithy_client.map)({
|
|
338
|
+
[_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => (0, import_smithy_client.strictParseInt32)(parsedOutput.headers[_ra])]
|
|
339
|
+
});
|
|
340
|
+
const data = parsedOutput.body;
|
|
341
|
+
const doc = (0, import_smithy_client.take)(data, {
|
|
342
|
+
message: import_smithy_client.expectString
|
|
343
|
+
});
|
|
344
|
+
Object.assign(contents, doc);
|
|
345
|
+
const exception = new ThrottlingException({
|
|
346
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
347
|
+
...contents
|
|
348
|
+
});
|
|
349
|
+
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
|
|
350
|
+
}, "de_ThrottlingExceptionRes");
|
|
351
|
+
var de_ValidationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
352
|
+
const contents = (0, import_smithy_client.map)({});
|
|
353
|
+
const data = parsedOutput.body;
|
|
354
|
+
const doc = (0, import_smithy_client.take)(data, {
|
|
355
|
+
fields: import_smithy_client._json,
|
|
356
|
+
message: import_smithy_client.expectString,
|
|
357
|
+
reason: import_smithy_client.expectString
|
|
358
|
+
});
|
|
359
|
+
Object.assign(contents, doc);
|
|
360
|
+
const exception = new ValidationException({
|
|
361
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
362
|
+
...contents
|
|
363
|
+
});
|
|
364
|
+
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
|
|
365
|
+
}, "de_ValidationExceptionRes");
|
|
366
|
+
var se_Sbom = /* @__PURE__ */ __name((input, context) => {
|
|
367
|
+
return input;
|
|
368
|
+
}, "se_Sbom");
|
|
369
|
+
var de_Sbom = /* @__PURE__ */ __name((output, context) => {
|
|
370
|
+
return output;
|
|
371
|
+
}, "de_Sbom");
|
|
372
|
+
var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
|
|
373
|
+
httpStatusCode: output.statusCode,
|
|
374
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
375
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
376
|
+
cfId: output.headers["x-amz-cf-id"]
|
|
377
|
+
}), "deserializeMetadata");
|
|
378
|
+
var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
|
|
379
|
+
var _rAS = "retryAfterSeconds";
|
|
380
|
+
var _ra = "retry-after";
|
|
381
|
+
var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
382
|
+
if (encoded.length) {
|
|
383
|
+
return JSON.parse(encoded);
|
|
384
|
+
}
|
|
385
|
+
return {};
|
|
386
|
+
}), "parseBody");
|
|
387
|
+
var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
|
|
388
|
+
const value = await parseBody(errorBody, context);
|
|
389
|
+
value.message = value.message ?? value.Message;
|
|
390
|
+
return value;
|
|
391
|
+
}, "parseErrorBody");
|
|
392
|
+
var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
|
|
393
|
+
const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
|
|
394
|
+
const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
|
|
395
|
+
let cleanValue = rawValue;
|
|
396
|
+
if (typeof cleanValue === "number") {
|
|
397
|
+
cleanValue = cleanValue.toString();
|
|
398
|
+
}
|
|
399
|
+
if (cleanValue.indexOf(",") >= 0) {
|
|
400
|
+
cleanValue = cleanValue.split(",")[0];
|
|
401
|
+
}
|
|
402
|
+
if (cleanValue.indexOf(":") >= 0) {
|
|
403
|
+
cleanValue = cleanValue.split(":")[0];
|
|
404
|
+
}
|
|
405
|
+
if (cleanValue.indexOf("#") >= 0) {
|
|
406
|
+
cleanValue = cleanValue.split("#")[1];
|
|
407
|
+
}
|
|
408
|
+
return cleanValue;
|
|
409
|
+
}, "sanitizeErrorCode");
|
|
410
|
+
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
411
|
+
if (headerKey !== void 0) {
|
|
412
|
+
return sanitizeErrorCode(output.headers[headerKey]);
|
|
413
|
+
}
|
|
414
|
+
if (data.code !== void 0) {
|
|
415
|
+
return sanitizeErrorCode(data.code);
|
|
416
|
+
}
|
|
417
|
+
if (data["__type"] !== void 0) {
|
|
418
|
+
return sanitizeErrorCode(data["__type"]);
|
|
419
|
+
}
|
|
420
|
+
}, "loadRestJsonErrorCode");
|
|
421
|
+
|
|
422
|
+
// src/commands/ScanSbomCommand.ts
|
|
423
|
+
var _ScanSbomCommand = class _ScanSbomCommand extends import_smithy_client.Command.classBuilder().ep({
|
|
424
|
+
...commonParams
|
|
425
|
+
}).m(function(Command, cs, config, o) {
|
|
426
|
+
return [
|
|
427
|
+
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
428
|
+
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
|
|
429
|
+
];
|
|
430
|
+
}).s("InspectorScan", "ScanSbom", {}).n("InspectorScanClient", "ScanSbomCommand").f(void 0, void 0).ser(se_ScanSbomCommand).de(de_ScanSbomCommand).build() {
|
|
431
|
+
};
|
|
432
|
+
__name(_ScanSbomCommand, "ScanSbomCommand");
|
|
433
|
+
var ScanSbomCommand = _ScanSbomCommand;
|
|
434
|
+
|
|
435
|
+
// src/InspectorScan.ts
|
|
436
|
+
var commands = {
|
|
437
|
+
ScanSbomCommand
|
|
438
|
+
};
|
|
439
|
+
var _InspectorScan = class _InspectorScan extends InspectorScanClient {
|
|
440
|
+
};
|
|
441
|
+
__name(_InspectorScan, "InspectorScan");
|
|
442
|
+
var InspectorScan = _InspectorScan;
|
|
443
|
+
(0, import_smithy_client.createAggregatedClient)(commands, InspectorScan);
|
|
444
|
+
|
|
445
|
+
// src/index.ts
|
|
446
|
+
var import_util_endpoints = require("@aws-sdk/util-endpoints");
|
|
447
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
448
|
+
0 && (module.exports = {
|
|
449
|
+
$Command,
|
|
450
|
+
AccessDeniedException,
|
|
451
|
+
InspectorScan,
|
|
452
|
+
InspectorScanClient,
|
|
453
|
+
InspectorScanServiceException,
|
|
454
|
+
InternalServerException,
|
|
455
|
+
InternalServerExceptionReason,
|
|
456
|
+
OutputFormat,
|
|
457
|
+
ScanSbomCommand,
|
|
458
|
+
ThrottlingException,
|
|
459
|
+
ValidationException,
|
|
460
|
+
ValidationExceptionReason,
|
|
461
|
+
__Client,
|
|
462
|
+
__MetadataBearer
|
|
463
|
+
});
|
|
@@ -1,12 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.InspectorScanServiceException = exports.__ServiceException = void 0;
|
|
4
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
5
|
-
Object.defineProperty(exports, "__ServiceException", { enumerable: true, get: function () { return smithy_client_1.ServiceException; } });
|
|
6
|
-
class InspectorScanServiceException extends smithy_client_1.ServiceException {
|
|
7
|
-
constructor(options) {
|
|
8
|
-
super(options);
|
|
9
|
-
Object.setPrototypeOf(this, InspectorScanServiceException.prototype);
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
exports.InspectorScanServiceException = InspectorScanServiceException;
|
|
1
|
+
module.exports = require("../index.js");
|
package/dist-cjs/models/index.js
CHANGED
|
@@ -1,80 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ValidationException = exports.ValidationExceptionReason = exports.ThrottlingException = exports.OutputFormat = exports.InternalServerException = exports.InternalServerExceptionReason = exports.AccessDeniedException = void 0;
|
|
4
|
-
const InspectorScanServiceException_1 = require("./InspectorScanServiceException");
|
|
5
|
-
class AccessDeniedException extends InspectorScanServiceException_1.InspectorScanServiceException {
|
|
6
|
-
constructor(opts) {
|
|
7
|
-
super({
|
|
8
|
-
name: "AccessDeniedException",
|
|
9
|
-
$fault: "client",
|
|
10
|
-
...opts,
|
|
11
|
-
});
|
|
12
|
-
this.name = "AccessDeniedException";
|
|
13
|
-
this.$fault = "client";
|
|
14
|
-
Object.setPrototypeOf(this, AccessDeniedException.prototype);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
exports.AccessDeniedException = AccessDeniedException;
|
|
18
|
-
exports.InternalServerExceptionReason = {
|
|
19
|
-
FAILED_TO_GENERATE_SBOM: "FAILED_TO_GENERATE_SBOM",
|
|
20
|
-
OTHER: "OTHER",
|
|
21
|
-
};
|
|
22
|
-
class InternalServerException extends InspectorScanServiceException_1.InspectorScanServiceException {
|
|
23
|
-
constructor(opts) {
|
|
24
|
-
super({
|
|
25
|
-
name: "InternalServerException",
|
|
26
|
-
$fault: "server",
|
|
27
|
-
...opts,
|
|
28
|
-
});
|
|
29
|
-
this.name = "InternalServerException";
|
|
30
|
-
this.$fault = "server";
|
|
31
|
-
this.$retryable = {};
|
|
32
|
-
Object.setPrototypeOf(this, InternalServerException.prototype);
|
|
33
|
-
this.reason = opts.reason;
|
|
34
|
-
this.retryAfterSeconds = opts.retryAfterSeconds;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
exports.InternalServerException = InternalServerException;
|
|
38
|
-
exports.OutputFormat = {
|
|
39
|
-
CYCLONE_DX_1_5: "CYCLONE_DX_1_5",
|
|
40
|
-
INSPECTOR: "INSPECTOR",
|
|
41
|
-
};
|
|
42
|
-
class ThrottlingException extends InspectorScanServiceException_1.InspectorScanServiceException {
|
|
43
|
-
constructor(opts) {
|
|
44
|
-
super({
|
|
45
|
-
name: "ThrottlingException",
|
|
46
|
-
$fault: "client",
|
|
47
|
-
...opts,
|
|
48
|
-
});
|
|
49
|
-
this.name = "ThrottlingException";
|
|
50
|
-
this.$fault = "client";
|
|
51
|
-
this.$retryable = {
|
|
52
|
-
throttling: true,
|
|
53
|
-
};
|
|
54
|
-
Object.setPrototypeOf(this, ThrottlingException.prototype);
|
|
55
|
-
this.retryAfterSeconds = opts.retryAfterSeconds;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
exports.ThrottlingException = ThrottlingException;
|
|
59
|
-
exports.ValidationExceptionReason = {
|
|
60
|
-
CANNOT_PARSE: "CANNOT_PARSE",
|
|
61
|
-
FIELD_VALIDATION_FAILED: "FIELD_VALIDATION_FAILED",
|
|
62
|
-
OTHER: "OTHER",
|
|
63
|
-
UNKNOWN_OPERATION: "UNKNOWN_OPERATION",
|
|
64
|
-
UNSUPPORTED_SBOM_TYPE: "UNSUPPORTED_SBOM_TYPE",
|
|
65
|
-
};
|
|
66
|
-
class ValidationException extends InspectorScanServiceException_1.InspectorScanServiceException {
|
|
67
|
-
constructor(opts) {
|
|
68
|
-
super({
|
|
69
|
-
name: "ValidationException",
|
|
70
|
-
$fault: "client",
|
|
71
|
-
...opts,
|
|
72
|
-
});
|
|
73
|
-
this.name = "ValidationException";
|
|
74
|
-
this.$fault = "client";
|
|
75
|
-
Object.setPrototypeOf(this, ValidationException.prototype);
|
|
76
|
-
this.reason = opts.reason;
|
|
77
|
-
this.fields = opts.fields;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
exports.ValidationException = ValidationException;
|
|
1
|
+
module.exports = require("../index.js");
|
|
@@ -1,185 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_ScanSbomCommand = exports.se_ScanSbomCommand = void 0;
|
|
4
|
-
const core_1 = require("@smithy/core");
|
|
5
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
6
|
-
const InspectorScanServiceException_1 = require("../models/InspectorScanServiceException");
|
|
7
|
-
const models_0_1 = require("../models/models_0");
|
|
8
|
-
const se_ScanSbomCommand = async (input, context) => {
|
|
9
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
10
|
-
const headers = {
|
|
11
|
-
"content-type": "application/json",
|
|
12
|
-
};
|
|
13
|
-
b.bp("/scan/sbom");
|
|
14
|
-
let body;
|
|
15
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
16
|
-
outputFormat: [],
|
|
17
|
-
sbom: (_) => se_Sbom(_, context),
|
|
18
|
-
}));
|
|
19
|
-
b.m("POST").h(headers).b(body);
|
|
20
|
-
return b.build();
|
|
21
|
-
};
|
|
22
|
-
exports.se_ScanSbomCommand = se_ScanSbomCommand;
|
|
23
|
-
const de_ScanSbomCommand = async (output, context) => {
|
|
24
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
25
|
-
return de_ScanSbomCommandError(output, context);
|
|
26
|
-
}
|
|
27
|
-
const contents = (0, smithy_client_1.map)({
|
|
28
|
-
$metadata: deserializeMetadata(output),
|
|
29
|
-
});
|
|
30
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
31
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
32
|
-
sbom: (_) => de_Sbom(_, context),
|
|
33
|
-
});
|
|
34
|
-
Object.assign(contents, doc);
|
|
35
|
-
return contents;
|
|
36
|
-
};
|
|
37
|
-
exports.de_ScanSbomCommand = de_ScanSbomCommand;
|
|
38
|
-
const de_ScanSbomCommandError = async (output, context) => {
|
|
39
|
-
const parsedOutput = {
|
|
40
|
-
...output,
|
|
41
|
-
body: await parseErrorBody(output.body, context),
|
|
42
|
-
};
|
|
43
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
44
|
-
switch (errorCode) {
|
|
45
|
-
case "AccessDeniedException":
|
|
46
|
-
case "com.amazonaws.inspectorscan#AccessDeniedException":
|
|
47
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
48
|
-
case "InternalServerException":
|
|
49
|
-
case "com.amazonaws.inspectorscan#InternalServerException":
|
|
50
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
51
|
-
case "ThrottlingException":
|
|
52
|
-
case "com.amazonaws.inspectorscan#ThrottlingException":
|
|
53
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
54
|
-
case "ValidationException":
|
|
55
|
-
case "com.amazonaws.inspectorscan#ValidationException":
|
|
56
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
57
|
-
default:
|
|
58
|
-
const parsedBody = parsedOutput.body;
|
|
59
|
-
return throwDefaultError({
|
|
60
|
-
output,
|
|
61
|
-
parsedBody,
|
|
62
|
-
errorCode,
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
const throwDefaultError = (0, smithy_client_1.withBaseException)(InspectorScanServiceException_1.InspectorScanServiceException);
|
|
67
|
-
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
68
|
-
const contents = (0, smithy_client_1.map)({});
|
|
69
|
-
const data = parsedOutput.body;
|
|
70
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
71
|
-
message: smithy_client_1.expectString,
|
|
72
|
-
});
|
|
73
|
-
Object.assign(contents, doc);
|
|
74
|
-
const exception = new models_0_1.AccessDeniedException({
|
|
75
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
76
|
-
...contents,
|
|
77
|
-
});
|
|
78
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
79
|
-
};
|
|
80
|
-
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
81
|
-
const contents = (0, smithy_client_1.map)({
|
|
82
|
-
[_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers[_ra])],
|
|
83
|
-
});
|
|
84
|
-
const data = parsedOutput.body;
|
|
85
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
86
|
-
message: smithy_client_1.expectString,
|
|
87
|
-
reason: smithy_client_1.expectString,
|
|
88
|
-
});
|
|
89
|
-
Object.assign(contents, doc);
|
|
90
|
-
const exception = new models_0_1.InternalServerException({
|
|
91
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
92
|
-
...contents,
|
|
93
|
-
});
|
|
94
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
95
|
-
};
|
|
96
|
-
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
97
|
-
const contents = (0, smithy_client_1.map)({
|
|
98
|
-
[_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers[_ra])],
|
|
99
|
-
});
|
|
100
|
-
const data = parsedOutput.body;
|
|
101
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
102
|
-
message: smithy_client_1.expectString,
|
|
103
|
-
});
|
|
104
|
-
Object.assign(contents, doc);
|
|
105
|
-
const exception = new models_0_1.ThrottlingException({
|
|
106
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
107
|
-
...contents,
|
|
108
|
-
});
|
|
109
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
110
|
-
};
|
|
111
|
-
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
112
|
-
const contents = (0, smithy_client_1.map)({});
|
|
113
|
-
const data = parsedOutput.body;
|
|
114
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
115
|
-
fields: smithy_client_1._json,
|
|
116
|
-
message: smithy_client_1.expectString,
|
|
117
|
-
reason: smithy_client_1.expectString,
|
|
118
|
-
});
|
|
119
|
-
Object.assign(contents, doc);
|
|
120
|
-
const exception = new models_0_1.ValidationException({
|
|
121
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
122
|
-
...contents,
|
|
123
|
-
});
|
|
124
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
125
|
-
};
|
|
126
|
-
const se_Sbom = (input, context) => {
|
|
127
|
-
return input;
|
|
128
|
-
};
|
|
129
|
-
const de_Sbom = (output, context) => {
|
|
130
|
-
return output;
|
|
131
|
-
};
|
|
132
|
-
const deserializeMetadata = (output) => ({
|
|
133
|
-
httpStatusCode: output.statusCode,
|
|
134
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
135
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
136
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
137
|
-
});
|
|
138
|
-
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
139
|
-
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
140
|
-
value !== null &&
|
|
141
|
-
value !== "" &&
|
|
142
|
-
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
143
|
-
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
144
|
-
const _rAS = "retryAfterSeconds";
|
|
145
|
-
const _ra = "retry-after";
|
|
146
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
147
|
-
if (encoded.length) {
|
|
148
|
-
return JSON.parse(encoded);
|
|
149
|
-
}
|
|
150
|
-
return {};
|
|
151
|
-
});
|
|
152
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
153
|
-
const value = await parseBody(errorBody, context);
|
|
154
|
-
value.message = value.message ?? value.Message;
|
|
155
|
-
return value;
|
|
156
|
-
};
|
|
157
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
158
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
159
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
160
|
-
let cleanValue = rawValue;
|
|
161
|
-
if (typeof cleanValue === "number") {
|
|
162
|
-
cleanValue = cleanValue.toString();
|
|
163
|
-
}
|
|
164
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
165
|
-
cleanValue = cleanValue.split(",")[0];
|
|
166
|
-
}
|
|
167
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
168
|
-
cleanValue = cleanValue.split(":")[0];
|
|
169
|
-
}
|
|
170
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
171
|
-
cleanValue = cleanValue.split("#")[1];
|
|
172
|
-
}
|
|
173
|
-
return cleanValue;
|
|
174
|
-
};
|
|
175
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
176
|
-
if (headerKey !== undefined) {
|
|
177
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
178
|
-
}
|
|
179
|
-
if (data.code !== undefined) {
|
|
180
|
-
return sanitizeErrorCode(data.code);
|
|
181
|
-
}
|
|
182
|
-
if (data["__type"] !== undefined) {
|
|
183
|
-
return sanitizeErrorCode(data["__type"]);
|
|
184
|
-
}
|
|
185
|
-
};
|
|
1
|
+
module.exports = require("../index.js");
|
|
@@ -1,22 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.resolveRuntimeExtensions = void 0;
|
|
4
|
-
const region_config_resolver_1 = require("@aws-sdk/region-config-resolver");
|
|
5
|
-
const protocol_http_1 = require("@smithy/protocol-http");
|
|
6
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
-
const asPartial = (t) => t;
|
|
8
|
-
const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
9
|
-
const extensionConfiguration = {
|
|
10
|
-
...asPartial((0, region_config_resolver_1.getAwsRegionExtensionConfiguration)(runtimeConfig)),
|
|
11
|
-
...asPartial((0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig)),
|
|
12
|
-
...asPartial((0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig)),
|
|
13
|
-
};
|
|
14
|
-
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
15
|
-
return {
|
|
16
|
-
...runtimeConfig,
|
|
17
|
-
...(0, region_config_resolver_1.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
|
|
18
|
-
...(0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration),
|
|
19
|
-
...(0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
exports.resolveRuntimeExtensions = resolveRuntimeExtensions;
|
|
1
|
+
module.exports = require("./index.js");
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-inspector-scan",
|
|
3
3
|
"description": "AWS SDK for JavaScript Inspector Scan Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.495.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
|
-
"build:cjs": "
|
|
7
|
+
"build:cjs": "node ../../scripts/compilation/inline client-inspector-scan",
|
|
8
8
|
"build:es": "tsc -p tsconfig.es.json",
|
|
9
9
|
"build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build",
|
|
10
10
|
"build:types": "tsc -p tsconfig.types.json",
|
|
@@ -20,47 +20,47 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@aws-crypto/sha256-browser": "3.0.0",
|
|
22
22
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
23
|
-
"@aws-sdk/client-sts": "3.
|
|
24
|
-
"@aws-sdk/core": "3.
|
|
25
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
26
|
-
"@aws-sdk/middleware-host-header": "3.
|
|
27
|
-
"@aws-sdk/middleware-logger": "3.
|
|
28
|
-
"@aws-sdk/middleware-recursion-detection": "3.
|
|
29
|
-
"@aws-sdk/middleware-signing": "3.
|
|
30
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
31
|
-
"@aws-sdk/region-config-resolver": "3.
|
|
32
|
-
"@aws-sdk/types": "3.
|
|
33
|
-
"@aws-sdk/util-endpoints": "3.
|
|
34
|
-
"@aws-sdk/util-user-agent-browser": "3.
|
|
35
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
36
|
-
"@smithy/config-resolver": "^2.0
|
|
37
|
-
"@smithy/core": "^1.
|
|
38
|
-
"@smithy/fetch-http-handler": "^2.
|
|
39
|
-
"@smithy/hash-node": "^2.0
|
|
40
|
-
"@smithy/invalid-dependency": "^2.0
|
|
41
|
-
"@smithy/middleware-content-length": "^2.0
|
|
42
|
-
"@smithy/middleware-endpoint": "^2.
|
|
43
|
-
"@smithy/middleware-retry": "^2.0
|
|
44
|
-
"@smithy/middleware-serde": "^2.0
|
|
45
|
-
"@smithy/middleware-stack": "^2.0
|
|
46
|
-
"@smithy/node-config-provider": "^2.
|
|
47
|
-
"@smithy/node-http-handler": "^2.
|
|
48
|
-
"@smithy/protocol-http": "^3.0
|
|
49
|
-
"@smithy/smithy-client": "^2.
|
|
50
|
-
"@smithy/types": "^2.
|
|
51
|
-
"@smithy/url-parser": "^2.0
|
|
52
|
-
"@smithy/util-base64": "^2.0
|
|
53
|
-
"@smithy/util-body-length-browser": "^2.0
|
|
54
|
-
"@smithy/util-body-length-node": "^2.
|
|
55
|
-
"@smithy/util-defaults-mode-browser": "^2.0
|
|
56
|
-
"@smithy/util-defaults-mode-node": "^2.0
|
|
57
|
-
"@smithy/util-endpoints": "^1.0
|
|
58
|
-
"@smithy/util-retry": "^2.0
|
|
59
|
-
"@smithy/util-utf8": "^2.0
|
|
23
|
+
"@aws-sdk/client-sts": "3.495.0",
|
|
24
|
+
"@aws-sdk/core": "3.495.0",
|
|
25
|
+
"@aws-sdk/credential-provider-node": "3.495.0",
|
|
26
|
+
"@aws-sdk/middleware-host-header": "3.495.0",
|
|
27
|
+
"@aws-sdk/middleware-logger": "3.495.0",
|
|
28
|
+
"@aws-sdk/middleware-recursion-detection": "3.495.0",
|
|
29
|
+
"@aws-sdk/middleware-signing": "3.495.0",
|
|
30
|
+
"@aws-sdk/middleware-user-agent": "3.495.0",
|
|
31
|
+
"@aws-sdk/region-config-resolver": "3.495.0",
|
|
32
|
+
"@aws-sdk/types": "3.495.0",
|
|
33
|
+
"@aws-sdk/util-endpoints": "3.495.0",
|
|
34
|
+
"@aws-sdk/util-user-agent-browser": "3.495.0",
|
|
35
|
+
"@aws-sdk/util-user-agent-node": "3.495.0",
|
|
36
|
+
"@smithy/config-resolver": "^2.1.0",
|
|
37
|
+
"@smithy/core": "^1.3.0",
|
|
38
|
+
"@smithy/fetch-http-handler": "^2.4.0",
|
|
39
|
+
"@smithy/hash-node": "^2.1.0",
|
|
40
|
+
"@smithy/invalid-dependency": "^2.1.0",
|
|
41
|
+
"@smithy/middleware-content-length": "^2.1.0",
|
|
42
|
+
"@smithy/middleware-endpoint": "^2.4.0",
|
|
43
|
+
"@smithy/middleware-retry": "^2.1.0",
|
|
44
|
+
"@smithy/middleware-serde": "^2.1.0",
|
|
45
|
+
"@smithy/middleware-stack": "^2.1.0",
|
|
46
|
+
"@smithy/node-config-provider": "^2.2.0",
|
|
47
|
+
"@smithy/node-http-handler": "^2.3.0",
|
|
48
|
+
"@smithy/protocol-http": "^3.1.0",
|
|
49
|
+
"@smithy/smithy-client": "^2.3.0",
|
|
50
|
+
"@smithy/types": "^2.9.0",
|
|
51
|
+
"@smithy/url-parser": "^2.1.0",
|
|
52
|
+
"@smithy/util-base64": "^2.1.0",
|
|
53
|
+
"@smithy/util-body-length-browser": "^2.1.0",
|
|
54
|
+
"@smithy/util-body-length-node": "^2.2.0",
|
|
55
|
+
"@smithy/util-defaults-mode-browser": "^2.1.0",
|
|
56
|
+
"@smithy/util-defaults-mode-node": "^2.1.0",
|
|
57
|
+
"@smithy/util-endpoints": "^1.1.0",
|
|
58
|
+
"@smithy/util-retry": "^2.1.0",
|
|
59
|
+
"@smithy/util-utf8": "^2.1.0",
|
|
60
60
|
"tslib": "^2.5.0"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"@smithy/service-client-documentation-generator": "^2.
|
|
63
|
+
"@smithy/service-client-documentation-generator": "^2.1.0",
|
|
64
64
|
"@tsconfig/node14": "1.0.3",
|
|
65
65
|
"@types/node": "^14.14.31",
|
|
66
66
|
"concurrently": "7.0.0",
|