@aws-sdk/client-codeartifact 3.282.0 → 3.288.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/README.md +16 -0
- package/dist-cjs/Codeartifact.js +15 -0
- package/dist-cjs/commands/PublishPackageVersionCommand.js +46 -0
- package/dist-cjs/commands/index.js +1 -0
- package/dist-cjs/endpoint/ruleset.js +3 -3
- package/dist-cjs/models/models_0.js +10 -1
- package/dist-cjs/pagination/ListDomainsPaginator.js +1 -8
- package/dist-cjs/pagination/ListPackageVersionAssetsPaginator.js +1 -8
- package/dist-cjs/pagination/ListPackageVersionsPaginator.js +1 -8
- package/dist-cjs/pagination/ListPackagesPaginator.js +1 -8
- package/dist-cjs/pagination/ListRepositoriesInDomainPaginator.js +1 -8
- package/dist-cjs/pagination/ListRepositoriesPaginator.js +1 -8
- package/dist-cjs/protocols/Aws_restJson1.js +106 -2
- package/dist-es/Codeartifact.js +15 -0
- package/dist-es/commands/PublishPackageVersionCommand.js +42 -0
- package/dist-es/commands/index.js +1 -0
- package/dist-es/endpoint/ruleset.js +3 -3
- package/dist-es/models/models_0.js +7 -0
- package/dist-es/pagination/ListDomainsPaginator.js +1 -8
- package/dist-es/pagination/ListPackageVersionAssetsPaginator.js +1 -8
- package/dist-es/pagination/ListPackageVersionsPaginator.js +1 -8
- package/dist-es/pagination/ListPackagesPaginator.js +1 -8
- package/dist-es/pagination/ListRepositoriesInDomainPaginator.js +1 -8
- package/dist-es/pagination/ListRepositoriesPaginator.js +1 -8
- package/dist-es/protocols/Aws_restJson1.js +102 -0
- package/dist-types/Codeartifact.d.ts +20 -1
- package/dist-types/CodeartifactClient.d.ts +11 -2
- package/dist-types/commands/DeletePackageVersionsCommand.d.ts +1 -1
- package/dist-types/commands/PublishPackageVersionCommand.d.ts +58 -0
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/endpoint/EndpointParameters.d.ts +1 -1
- package/dist-types/models/models_0.d.ts +194 -10
- package/dist-types/pagination/Interfaces.d.ts +1 -2
- package/dist-types/protocols/Aws_restJson1.d.ts +3 -0
- package/dist-types/ts3.4/Codeartifact.d.ts +17 -0
- package/dist-types/ts3.4/CodeartifactClient.d.ts +6 -0
- package/dist-types/ts3.4/commands/PublishPackageVersionCommand.d.ts +52 -0
- package/dist-types/ts3.4/commands/index.d.ts +1 -0
- package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +1 -1
- package/dist-types/ts3.4/models/models_0.d.ts +29 -0
- package/dist-types/ts3.4/pagination/Interfaces.d.ts +1 -2
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +12 -0
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -126,6 +126,10 @@ repositories. </p>
|
|
|
126
126
|
</li>
|
|
127
127
|
<li>
|
|
128
128
|
<p>
|
|
129
|
+
<code>DeletePackage</code>: Deletes a package and all associated package versions.</p>
|
|
130
|
+
</li>
|
|
131
|
+
<li>
|
|
132
|
+
<p>
|
|
129
133
|
<code>DeletePackageVersions</code>: Deletes versions of a package. After a package has
|
|
130
134
|
been deleted, it can be republished, but its assets and metadata cannot be restored
|
|
131
135
|
because they have been permanently removed from storage.</p>
|
|
@@ -254,6 +258,10 @@ package in a repository.</p>
|
|
|
254
258
|
</li>
|
|
255
259
|
<li>
|
|
256
260
|
<p>
|
|
261
|
+
<code>PublishPackageVersion</code>: Creates a new package version containing one or more assets.</p>
|
|
262
|
+
</li>
|
|
263
|
+
<li>
|
|
264
|
+
<p>
|
|
257
265
|
<code>PutDomainPermissionsPolicy</code>: Attaches a resource policy to a domain.</p>
|
|
258
266
|
</li>
|
|
259
267
|
<li>
|
|
@@ -710,6 +718,14 @@ ListTagsForResource
|
|
|
710
718
|
|
|
711
719
|
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-codeartifact/classes/listtagsforresourcecommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-codeartifact/interfaces/listtagsforresourcecommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-codeartifact/interfaces/listtagsforresourcecommandoutput.html)
|
|
712
720
|
|
|
721
|
+
</details>
|
|
722
|
+
<details>
|
|
723
|
+
<summary>
|
|
724
|
+
PublishPackageVersion
|
|
725
|
+
</summary>
|
|
726
|
+
|
|
727
|
+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-codeartifact/classes/publishpackageversioncommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-codeartifact/interfaces/publishpackageversioncommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-codeartifact/interfaces/publishpackageversioncommandoutput.html)
|
|
728
|
+
|
|
713
729
|
</details>
|
|
714
730
|
<details>
|
|
715
731
|
<summary>
|
package/dist-cjs/Codeartifact.js
CHANGED
|
@@ -32,6 +32,7 @@ const ListPackageVersionsCommand_1 = require("./commands/ListPackageVersionsComm
|
|
|
32
32
|
const ListRepositoriesCommand_1 = require("./commands/ListRepositoriesCommand");
|
|
33
33
|
const ListRepositoriesInDomainCommand_1 = require("./commands/ListRepositoriesInDomainCommand");
|
|
34
34
|
const ListTagsForResourceCommand_1 = require("./commands/ListTagsForResourceCommand");
|
|
35
|
+
const PublishPackageVersionCommand_1 = require("./commands/PublishPackageVersionCommand");
|
|
35
36
|
const PutDomainPermissionsPolicyCommand_1 = require("./commands/PutDomainPermissionsPolicyCommand");
|
|
36
37
|
const PutPackageOriginConfigurationCommand_1 = require("./commands/PutPackageOriginConfigurationCommand");
|
|
37
38
|
const PutRepositoryPermissionsPolicyCommand_1 = require("./commands/PutRepositoryPermissionsPolicyCommand");
|
|
@@ -460,6 +461,20 @@ class Codeartifact extends CodeartifactClient_1.CodeartifactClient {
|
|
|
460
461
|
return this.send(command, optionsOrCb);
|
|
461
462
|
}
|
|
462
463
|
}
|
|
464
|
+
publishPackageVersion(args, optionsOrCb, cb) {
|
|
465
|
+
const command = new PublishPackageVersionCommand_1.PublishPackageVersionCommand(args);
|
|
466
|
+
if (typeof optionsOrCb === "function") {
|
|
467
|
+
this.send(command, optionsOrCb);
|
|
468
|
+
}
|
|
469
|
+
else if (typeof cb === "function") {
|
|
470
|
+
if (typeof optionsOrCb !== "object")
|
|
471
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
472
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
473
|
+
}
|
|
474
|
+
else {
|
|
475
|
+
return this.send(command, optionsOrCb);
|
|
476
|
+
}
|
|
477
|
+
}
|
|
463
478
|
putDomainPermissionsPolicy(args, optionsOrCb, cb) {
|
|
464
479
|
const command = new PutDomainPermissionsPolicyCommand_1.PutDomainPermissionsPolicyCommand(args);
|
|
465
480
|
if (typeof optionsOrCb === "function") {
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PublishPackageVersionCommand = void 0;
|
|
4
|
+
const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint");
|
|
5
|
+
const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
6
|
+
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
7
|
+
const models_0_1 = require("../models/models_0");
|
|
8
|
+
const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
|
|
9
|
+
class PublishPackageVersionCommand extends smithy_client_1.Command {
|
|
10
|
+
constructor(input) {
|
|
11
|
+
super();
|
|
12
|
+
this.input = input;
|
|
13
|
+
}
|
|
14
|
+
static getEndpointParameterInstructions() {
|
|
15
|
+
return {
|
|
16
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
17
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
18
|
+
Region: { type: "builtInParams", name: "region" },
|
|
19
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
23
|
+
this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
|
|
24
|
+
this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, PublishPackageVersionCommand.getEndpointParameterInstructions()));
|
|
25
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
26
|
+
const { logger } = configuration;
|
|
27
|
+
const clientName = "CodeartifactClient";
|
|
28
|
+
const commandName = "PublishPackageVersionCommand";
|
|
29
|
+
const handlerExecutionContext = {
|
|
30
|
+
logger,
|
|
31
|
+
clientName,
|
|
32
|
+
commandName,
|
|
33
|
+
inputFilterSensitiveLog: models_0_1.PublishPackageVersionRequestFilterSensitiveLog,
|
|
34
|
+
outputFilterSensitiveLog: models_0_1.PublishPackageVersionResultFilterSensitiveLog,
|
|
35
|
+
};
|
|
36
|
+
const { requestHandler } = configuration;
|
|
37
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
38
|
+
}
|
|
39
|
+
serialize(input, context) {
|
|
40
|
+
return (0, Aws_restJson1_1.serializeAws_restJson1PublishPackageVersionCommand)(input, context);
|
|
41
|
+
}
|
|
42
|
+
deserialize(output, context) {
|
|
43
|
+
return (0, Aws_restJson1_1.deserializeAws_restJson1PublishPackageVersionCommand)(output, context);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
exports.PublishPackageVersionCommand = PublishPackageVersionCommand;
|
|
@@ -31,6 +31,7 @@ tslib_1.__exportStar(require("./ListPackagesCommand"), exports);
|
|
|
31
31
|
tslib_1.__exportStar(require("./ListRepositoriesCommand"), exports);
|
|
32
32
|
tslib_1.__exportStar(require("./ListRepositoriesInDomainCommand"), exports);
|
|
33
33
|
tslib_1.__exportStar(require("./ListTagsForResourceCommand"), exports);
|
|
34
|
+
tslib_1.__exportStar(require("./PublishPackageVersionCommand"), exports);
|
|
34
35
|
tslib_1.__exportStar(require("./PutDomainPermissionsPolicyCommand"), exports);
|
|
35
36
|
tslib_1.__exportStar(require("./PutPackageOriginConfigurationCommand"), exports);
|
|
36
37
|
tslib_1.__exportStar(require("./PutRepositoryPermissionsPolicyCommand"), exports);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ruleSet = void 0;
|
|
4
|
-
const q = "
|
|
5
|
-
const a =
|
|
6
|
-
const _data = { version: "1.0", parameters: { Region:
|
|
4
|
+
const q = "required", r = "fn", s = "argv", t = "ref";
|
|
5
|
+
const a = "isSet", b = "tree", c = "error", d = "endpoint", e = "PartitionResult", f = { [q]: false, "type": "String" }, g = { [q]: true, "default": false, "type": "Boolean" }, h = { [t]: "Endpoint" }, i = { [r]: "booleanEquals", [s]: [{ [t]: "UseFIPS" }, true] }, j = { [r]: "booleanEquals", [s]: [{ [t]: "UseDualStack" }, true] }, k = {}, l = { [r]: "booleanEquals", [s]: [true, { [r]: "getAttr", [s]: [{ [t]: e }, "supportsFIPS"] }] }, m = { [r]: "booleanEquals", [s]: [true, { [r]: "getAttr", [s]: [{ [t]: e }, "supportsDualStack"] }] }, n = [i], o = [j], p = [{ [t]: "Region" }];
|
|
6
|
+
const _data = { version: "1.0", parameters: { Region: f, UseDualStack: g, UseFIPS: g, Endpoint: f }, rules: [{ conditions: [{ [r]: a, [s]: [h] }], type: b, rules: [{ conditions: n, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: c }, { type: b, rules: [{ conditions: o, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: c }, { endpoint: { url: h, properties: k, headers: k }, type: d }] }] }, { type: b, rules: [{ conditions: [{ [r]: a, [s]: p }], type: b, rules: [{ conditions: [{ [r]: "aws.partition", [s]: p, assign: e }], type: b, rules: [{ conditions: [i, j], type: b, rules: [{ conditions: [l, m], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://codeartifact-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: c }] }, { conditions: n, type: b, rules: [{ conditions: [l], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://codeartifact-fips.{Region}.{PartitionResult#dnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "FIPS is enabled but this partition does not support FIPS", type: c }] }, { conditions: o, type: b, rules: [{ conditions: [m], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://codeartifact.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "DualStack is enabled but this partition does not support DualStack", type: c }] }, { type: b, rules: [{ endpoint: { url: "https://codeartifact.{Region}.{PartitionResult#dnsSuffix}", properties: k, headers: k }, type: d }] }] }] }, { error: "Invalid Configuration: Missing Region", type: c }] }] };
|
|
7
7
|
exports.ruleSet = _data;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DeleteRepositoryResultFilterSensitiveLog = exports.DeleteRepositoryRequestFilterSensitiveLog = exports.DeletePackageVersionsResultFilterSensitiveLog = exports.DeletePackageVersionsRequestFilterSensitiveLog = exports.DeletePackageResultFilterSensitiveLog = exports.PackageSummaryFilterSensitiveLog = exports.PackageOriginConfigurationFilterSensitiveLog = exports.PackageOriginRestrictionsFilterSensitiveLog = exports.DeletePackageRequestFilterSensitiveLog = exports.DeleteDomainPermissionsPolicyResultFilterSensitiveLog = exports.ResourcePolicyFilterSensitiveLog = exports.DeleteDomainPermissionsPolicyRequestFilterSensitiveLog = exports.DeleteDomainResultFilterSensitiveLog = exports.DeleteDomainRequestFilterSensitiveLog = exports.CreateRepositoryResultFilterSensitiveLog = exports.CreateRepositoryRequestFilterSensitiveLog = exports.UpstreamRepositoryFilterSensitiveLog = exports.CreateDomainResultFilterSensitiveLog = exports.DomainDescriptionFilterSensitiveLog = exports.CreateDomainRequestFilterSensitiveLog = exports.TagFilterSensitiveLog = exports.CopyPackageVersionsResultFilterSensitiveLog = exports.SuccessfulPackageVersionInfoFilterSensitiveLog = exports.PackageVersionErrorFilterSensitiveLog = exports.CopyPackageVersionsRequestFilterSensitiveLog = exports.AssociateExternalConnectionResultFilterSensitiveLog = exports.RepositoryDescriptionFilterSensitiveLog = exports.UpstreamRepositoryInfoFilterSensitiveLog = exports.RepositoryExternalConnectionInfoFilterSensitiveLog = exports.AssociateExternalConnectionRequestFilterSensitiveLog = exports.AssetSummaryFilterSensitiveLog = exports.PackageVersionSortType = exports.PackageVersionOriginType = exports.DomainStatus = exports.PackageVersionStatus = exports.PackageVersionErrorCode = exports.ValidationException = exports.ValidationExceptionReason = exports.ThrottlingException = exports.ServiceQuotaExceededException = exports.ResourceNotFoundException = exports.InternalServerException = exports.ConflictException = exports.ResourceType = exports.ExternalConnectionStatus = exports.PackageFormat = exports.HashAlgorithm = exports.AllowUpstream = exports.AllowPublish = exports.AccessDeniedException = void 0;
|
|
4
4
|
exports.ListTagsForResourceRequestFilterSensitiveLog = exports.ListRepositoriesInDomainResultFilterSensitiveLog = exports.ListRepositoriesInDomainRequestFilterSensitiveLog = exports.ListRepositoriesResultFilterSensitiveLog = exports.RepositorySummaryFilterSensitiveLog = exports.ListRepositoriesRequestFilterSensitiveLog = exports.ListPackageVersionsResultFilterSensitiveLog = exports.PackageVersionSummaryFilterSensitiveLog = exports.ListPackageVersionsRequestFilterSensitiveLog = exports.ListPackageVersionDependenciesResultFilterSensitiveLog = exports.PackageDependencyFilterSensitiveLog = exports.ListPackageVersionDependenciesRequestFilterSensitiveLog = exports.ListPackageVersionAssetsResultFilterSensitiveLog = exports.ListPackageVersionAssetsRequestFilterSensitiveLog = exports.ListPackagesResultFilterSensitiveLog = exports.ListPackagesRequestFilterSensitiveLog = exports.ListDomainsResultFilterSensitiveLog = exports.DomainSummaryFilterSensitiveLog = exports.ListDomainsRequestFilterSensitiveLog = exports.GetRepositoryPermissionsPolicyResultFilterSensitiveLog = exports.GetRepositoryPermissionsPolicyRequestFilterSensitiveLog = exports.GetRepositoryEndpointResultFilterSensitiveLog = exports.GetRepositoryEndpointRequestFilterSensitiveLog = exports.GetPackageVersionReadmeResultFilterSensitiveLog = exports.GetPackageVersionReadmeRequestFilterSensitiveLog = exports.GetPackageVersionAssetResultFilterSensitiveLog = exports.GetPackageVersionAssetRequestFilterSensitiveLog = exports.GetDomainPermissionsPolicyResultFilterSensitiveLog = exports.GetDomainPermissionsPolicyRequestFilterSensitiveLog = exports.GetAuthorizationTokenResultFilterSensitiveLog = exports.GetAuthorizationTokenRequestFilterSensitiveLog = exports.DisposePackageVersionsResultFilterSensitiveLog = exports.DisposePackageVersionsRequestFilterSensitiveLog = exports.DisassociateExternalConnectionResultFilterSensitiveLog = exports.DisassociateExternalConnectionRequestFilterSensitiveLog = exports.DescribeRepositoryResultFilterSensitiveLog = exports.DescribeRepositoryRequestFilterSensitiveLog = exports.DescribePackageVersionResultFilterSensitiveLog = exports.PackageVersionDescriptionFilterSensitiveLog = exports.PackageVersionOriginFilterSensitiveLog = exports.DomainEntryPointFilterSensitiveLog = exports.LicenseInfoFilterSensitiveLog = exports.DescribePackageVersionRequestFilterSensitiveLog = exports.DescribePackageResultFilterSensitiveLog = exports.PackageDescriptionFilterSensitiveLog = exports.DescribePackageRequestFilterSensitiveLog = exports.DescribeDomainResultFilterSensitiveLog = exports.DescribeDomainRequestFilterSensitiveLog = exports.DeleteRepositoryPermissionsPolicyResultFilterSensitiveLog = exports.DeleteRepositoryPermissionsPolicyRequestFilterSensitiveLog = void 0;
|
|
5
|
-
exports.UpdateRepositoryResultFilterSensitiveLog = exports.UpdateRepositoryRequestFilterSensitiveLog = exports.UpdatePackageVersionsStatusResultFilterSensitiveLog = exports.UpdatePackageVersionsStatusRequestFilterSensitiveLog = exports.UntagResourceResultFilterSensitiveLog = exports.UntagResourceRequestFilterSensitiveLog = exports.TagResourceResultFilterSensitiveLog = exports.TagResourceRequestFilterSensitiveLog = exports.PutRepositoryPermissionsPolicyResultFilterSensitiveLog = exports.PutRepositoryPermissionsPolicyRequestFilterSensitiveLog = exports.PutPackageOriginConfigurationResultFilterSensitiveLog = exports.PutPackageOriginConfigurationRequestFilterSensitiveLog = exports.PutDomainPermissionsPolicyResultFilterSensitiveLog = exports.PutDomainPermissionsPolicyRequestFilterSensitiveLog = exports.ListTagsForResourceResultFilterSensitiveLog = void 0;
|
|
5
|
+
exports.UpdateRepositoryResultFilterSensitiveLog = exports.UpdateRepositoryRequestFilterSensitiveLog = exports.UpdatePackageVersionsStatusResultFilterSensitiveLog = exports.UpdatePackageVersionsStatusRequestFilterSensitiveLog = exports.UntagResourceResultFilterSensitiveLog = exports.UntagResourceRequestFilterSensitiveLog = exports.TagResourceResultFilterSensitiveLog = exports.TagResourceRequestFilterSensitiveLog = exports.PutRepositoryPermissionsPolicyResultFilterSensitiveLog = exports.PutRepositoryPermissionsPolicyRequestFilterSensitiveLog = exports.PutPackageOriginConfigurationResultFilterSensitiveLog = exports.PutPackageOriginConfigurationRequestFilterSensitiveLog = exports.PutDomainPermissionsPolicyResultFilterSensitiveLog = exports.PutDomainPermissionsPolicyRequestFilterSensitiveLog = exports.PublishPackageVersionResultFilterSensitiveLog = exports.PublishPackageVersionRequestFilterSensitiveLog = exports.ListTagsForResourceResultFilterSensitiveLog = void 0;
|
|
6
6
|
const CodeartifactServiceException_1 = require("./CodeartifactServiceException");
|
|
7
7
|
class AccessDeniedException extends CodeartifactServiceException_1.CodeartifactServiceException {
|
|
8
8
|
constructor(opts) {
|
|
@@ -36,6 +36,7 @@ var HashAlgorithm;
|
|
|
36
36
|
})(HashAlgorithm = exports.HashAlgorithm || (exports.HashAlgorithm = {}));
|
|
37
37
|
var PackageFormat;
|
|
38
38
|
(function (PackageFormat) {
|
|
39
|
+
PackageFormat["GENERIC"] = "generic";
|
|
39
40
|
PackageFormat["MAVEN"] = "maven";
|
|
40
41
|
PackageFormat["NPM"] = "npm";
|
|
41
42
|
PackageFormat["NUGET"] = "nuget";
|
|
@@ -508,6 +509,14 @@ const ListTagsForResourceResultFilterSensitiveLog = (obj) => ({
|
|
|
508
509
|
...obj,
|
|
509
510
|
});
|
|
510
511
|
exports.ListTagsForResourceResultFilterSensitiveLog = ListTagsForResourceResultFilterSensitiveLog;
|
|
512
|
+
const PublishPackageVersionRequestFilterSensitiveLog = (obj) => ({
|
|
513
|
+
...obj,
|
|
514
|
+
});
|
|
515
|
+
exports.PublishPackageVersionRequestFilterSensitiveLog = PublishPackageVersionRequestFilterSensitiveLog;
|
|
516
|
+
const PublishPackageVersionResultFilterSensitiveLog = (obj) => ({
|
|
517
|
+
...obj,
|
|
518
|
+
});
|
|
519
|
+
exports.PublishPackageVersionResultFilterSensitiveLog = PublishPackageVersionResultFilterSensitiveLog;
|
|
511
520
|
const PutDomainPermissionsPolicyRequestFilterSensitiveLog = (obj) => ({
|
|
512
521
|
...obj,
|
|
513
522
|
});
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.paginateListDomains = void 0;
|
|
4
|
-
const Codeartifact_1 = require("../Codeartifact");
|
|
5
4
|
const CodeartifactClient_1 = require("../CodeartifactClient");
|
|
6
5
|
const ListDomainsCommand_1 = require("../commands/ListDomainsCommand");
|
|
7
6
|
const makePagedClientRequest = async (client, input, ...args) => {
|
|
8
7
|
return await client.send(new ListDomainsCommand_1.ListDomainsCommand(input), ...args);
|
|
9
8
|
};
|
|
10
|
-
const makePagedRequest = async (client, input, ...args) => {
|
|
11
|
-
return await client.listDomains(input, ...args);
|
|
12
|
-
};
|
|
13
9
|
async function* paginateListDomains(config, input, ...additionalArguments) {
|
|
14
10
|
let token = config.startingToken || undefined;
|
|
15
11
|
let hasNext = true;
|
|
@@ -17,10 +13,7 @@ async function* paginateListDomains(config, input, ...additionalArguments) {
|
|
|
17
13
|
while (hasNext) {
|
|
18
14
|
input.nextToken = token;
|
|
19
15
|
input["maxResults"] = config.pageSize;
|
|
20
|
-
if (config.client instanceof
|
|
21
|
-
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
22
|
-
}
|
|
23
|
-
else if (config.client instanceof CodeartifactClient_1.CodeartifactClient) {
|
|
16
|
+
if (config.client instanceof CodeartifactClient_1.CodeartifactClient) {
|
|
24
17
|
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
25
18
|
}
|
|
26
19
|
else {
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.paginateListPackageVersionAssets = void 0;
|
|
4
|
-
const Codeartifact_1 = require("../Codeartifact");
|
|
5
4
|
const CodeartifactClient_1 = require("../CodeartifactClient");
|
|
6
5
|
const ListPackageVersionAssetsCommand_1 = require("../commands/ListPackageVersionAssetsCommand");
|
|
7
6
|
const makePagedClientRequest = async (client, input, ...args) => {
|
|
8
7
|
return await client.send(new ListPackageVersionAssetsCommand_1.ListPackageVersionAssetsCommand(input), ...args);
|
|
9
8
|
};
|
|
10
|
-
const makePagedRequest = async (client, input, ...args) => {
|
|
11
|
-
return await client.listPackageVersionAssets(input, ...args);
|
|
12
|
-
};
|
|
13
9
|
async function* paginateListPackageVersionAssets(config, input, ...additionalArguments) {
|
|
14
10
|
let token = config.startingToken || undefined;
|
|
15
11
|
let hasNext = true;
|
|
@@ -17,10 +13,7 @@ async function* paginateListPackageVersionAssets(config, input, ...additionalArg
|
|
|
17
13
|
while (hasNext) {
|
|
18
14
|
input.nextToken = token;
|
|
19
15
|
input["maxResults"] = config.pageSize;
|
|
20
|
-
if (config.client instanceof
|
|
21
|
-
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
22
|
-
}
|
|
23
|
-
else if (config.client instanceof CodeartifactClient_1.CodeartifactClient) {
|
|
16
|
+
if (config.client instanceof CodeartifactClient_1.CodeartifactClient) {
|
|
24
17
|
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
25
18
|
}
|
|
26
19
|
else {
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.paginateListPackageVersions = void 0;
|
|
4
|
-
const Codeartifact_1 = require("../Codeartifact");
|
|
5
4
|
const CodeartifactClient_1 = require("../CodeartifactClient");
|
|
6
5
|
const ListPackageVersionsCommand_1 = require("../commands/ListPackageVersionsCommand");
|
|
7
6
|
const makePagedClientRequest = async (client, input, ...args) => {
|
|
8
7
|
return await client.send(new ListPackageVersionsCommand_1.ListPackageVersionsCommand(input), ...args);
|
|
9
8
|
};
|
|
10
|
-
const makePagedRequest = async (client, input, ...args) => {
|
|
11
|
-
return await client.listPackageVersions(input, ...args);
|
|
12
|
-
};
|
|
13
9
|
async function* paginateListPackageVersions(config, input, ...additionalArguments) {
|
|
14
10
|
let token = config.startingToken || undefined;
|
|
15
11
|
let hasNext = true;
|
|
@@ -17,10 +13,7 @@ async function* paginateListPackageVersions(config, input, ...additionalArgument
|
|
|
17
13
|
while (hasNext) {
|
|
18
14
|
input.nextToken = token;
|
|
19
15
|
input["maxResults"] = config.pageSize;
|
|
20
|
-
if (config.client instanceof
|
|
21
|
-
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
22
|
-
}
|
|
23
|
-
else if (config.client instanceof CodeartifactClient_1.CodeartifactClient) {
|
|
16
|
+
if (config.client instanceof CodeartifactClient_1.CodeartifactClient) {
|
|
24
17
|
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
25
18
|
}
|
|
26
19
|
else {
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.paginateListPackages = void 0;
|
|
4
|
-
const Codeartifact_1 = require("../Codeartifact");
|
|
5
4
|
const CodeartifactClient_1 = require("../CodeartifactClient");
|
|
6
5
|
const ListPackagesCommand_1 = require("../commands/ListPackagesCommand");
|
|
7
6
|
const makePagedClientRequest = async (client, input, ...args) => {
|
|
8
7
|
return await client.send(new ListPackagesCommand_1.ListPackagesCommand(input), ...args);
|
|
9
8
|
};
|
|
10
|
-
const makePagedRequest = async (client, input, ...args) => {
|
|
11
|
-
return await client.listPackages(input, ...args);
|
|
12
|
-
};
|
|
13
9
|
async function* paginateListPackages(config, input, ...additionalArguments) {
|
|
14
10
|
let token = config.startingToken || undefined;
|
|
15
11
|
let hasNext = true;
|
|
@@ -17,10 +13,7 @@ async function* paginateListPackages(config, input, ...additionalArguments) {
|
|
|
17
13
|
while (hasNext) {
|
|
18
14
|
input.nextToken = token;
|
|
19
15
|
input["maxResults"] = config.pageSize;
|
|
20
|
-
if (config.client instanceof
|
|
21
|
-
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
22
|
-
}
|
|
23
|
-
else if (config.client instanceof CodeartifactClient_1.CodeartifactClient) {
|
|
16
|
+
if (config.client instanceof CodeartifactClient_1.CodeartifactClient) {
|
|
24
17
|
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
25
18
|
}
|
|
26
19
|
else {
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.paginateListRepositoriesInDomain = void 0;
|
|
4
|
-
const Codeartifact_1 = require("../Codeartifact");
|
|
5
4
|
const CodeartifactClient_1 = require("../CodeartifactClient");
|
|
6
5
|
const ListRepositoriesInDomainCommand_1 = require("../commands/ListRepositoriesInDomainCommand");
|
|
7
6
|
const makePagedClientRequest = async (client, input, ...args) => {
|
|
8
7
|
return await client.send(new ListRepositoriesInDomainCommand_1.ListRepositoriesInDomainCommand(input), ...args);
|
|
9
8
|
};
|
|
10
|
-
const makePagedRequest = async (client, input, ...args) => {
|
|
11
|
-
return await client.listRepositoriesInDomain(input, ...args);
|
|
12
|
-
};
|
|
13
9
|
async function* paginateListRepositoriesInDomain(config, input, ...additionalArguments) {
|
|
14
10
|
let token = config.startingToken || undefined;
|
|
15
11
|
let hasNext = true;
|
|
@@ -17,10 +13,7 @@ async function* paginateListRepositoriesInDomain(config, input, ...additionalArg
|
|
|
17
13
|
while (hasNext) {
|
|
18
14
|
input.nextToken = token;
|
|
19
15
|
input["maxResults"] = config.pageSize;
|
|
20
|
-
if (config.client instanceof
|
|
21
|
-
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
22
|
-
}
|
|
23
|
-
else if (config.client instanceof CodeartifactClient_1.CodeartifactClient) {
|
|
16
|
+
if (config.client instanceof CodeartifactClient_1.CodeartifactClient) {
|
|
24
17
|
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
25
18
|
}
|
|
26
19
|
else {
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.paginateListRepositories = void 0;
|
|
4
|
-
const Codeartifact_1 = require("../Codeartifact");
|
|
5
4
|
const CodeartifactClient_1 = require("../CodeartifactClient");
|
|
6
5
|
const ListRepositoriesCommand_1 = require("../commands/ListRepositoriesCommand");
|
|
7
6
|
const makePagedClientRequest = async (client, input, ...args) => {
|
|
8
7
|
return await client.send(new ListRepositoriesCommand_1.ListRepositoriesCommand(input), ...args);
|
|
9
8
|
};
|
|
10
|
-
const makePagedRequest = async (client, input, ...args) => {
|
|
11
|
-
return await client.listRepositories(input, ...args);
|
|
12
|
-
};
|
|
13
9
|
async function* paginateListRepositories(config, input, ...additionalArguments) {
|
|
14
10
|
let token = config.startingToken || undefined;
|
|
15
11
|
let hasNext = true;
|
|
@@ -17,10 +13,7 @@ async function* paginateListRepositories(config, input, ...additionalArguments)
|
|
|
17
13
|
while (hasNext) {
|
|
18
14
|
input.nextToken = token;
|
|
19
15
|
input["maxResults"] = config.pageSize;
|
|
20
|
-
if (config.client instanceof
|
|
21
|
-
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
22
|
-
}
|
|
23
|
-
else if (config.client instanceof CodeartifactClient_1.CodeartifactClient) {
|
|
16
|
+
if (config.client instanceof CodeartifactClient_1.CodeartifactClient) {
|
|
24
17
|
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
25
18
|
}
|
|
26
19
|
else {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.deserializeAws_restJson1UpdateRepositoryCommand = exports.deserializeAws_restJson1UpdatePackageVersionsStatusCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1PutRepositoryPermissionsPolicyCommand = exports.deserializeAws_restJson1PutPackageOriginConfigurationCommand = exports.deserializeAws_restJson1PutDomainPermissionsPolicyCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListRepositoriesInDomainCommand = exports.deserializeAws_restJson1ListRepositoriesCommand = exports.deserializeAws_restJson1ListPackageVersionsCommand = exports.deserializeAws_restJson1ListPackageVersionDependenciesCommand = exports.deserializeAws_restJson1ListPackageVersionAssetsCommand = exports.deserializeAws_restJson1ListPackagesCommand = exports.deserializeAws_restJson1ListDomainsCommand = exports.deserializeAws_restJson1GetRepositoryPermissionsPolicyCommand = exports.deserializeAws_restJson1GetRepositoryEndpointCommand = exports.deserializeAws_restJson1GetPackageVersionReadmeCommand = exports.deserializeAws_restJson1GetPackageVersionAssetCommand = exports.deserializeAws_restJson1GetDomainPermissionsPolicyCommand = exports.deserializeAws_restJson1GetAuthorizationTokenCommand = exports.deserializeAws_restJson1DisposePackageVersionsCommand = exports.deserializeAws_restJson1DisassociateExternalConnectionCommand = exports.deserializeAws_restJson1DescribeRepositoryCommand = void 0;
|
|
3
|
+
exports.deserializeAws_restJson1DescribePackageCommand = exports.deserializeAws_restJson1DescribeDomainCommand = exports.deserializeAws_restJson1DeleteRepositoryPermissionsPolicyCommand = exports.deserializeAws_restJson1DeleteRepositoryCommand = exports.deserializeAws_restJson1DeletePackageVersionsCommand = exports.deserializeAws_restJson1DeletePackageCommand = exports.deserializeAws_restJson1DeleteDomainPermissionsPolicyCommand = exports.deserializeAws_restJson1DeleteDomainCommand = exports.deserializeAws_restJson1CreateRepositoryCommand = exports.deserializeAws_restJson1CreateDomainCommand = exports.deserializeAws_restJson1CopyPackageVersionsCommand = exports.deserializeAws_restJson1AssociateExternalConnectionCommand = exports.serializeAws_restJson1UpdateRepositoryCommand = exports.serializeAws_restJson1UpdatePackageVersionsStatusCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1PutRepositoryPermissionsPolicyCommand = exports.serializeAws_restJson1PutPackageOriginConfigurationCommand = exports.serializeAws_restJson1PutDomainPermissionsPolicyCommand = exports.serializeAws_restJson1PublishPackageVersionCommand = exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1ListRepositoriesInDomainCommand = exports.serializeAws_restJson1ListRepositoriesCommand = exports.serializeAws_restJson1ListPackageVersionsCommand = exports.serializeAws_restJson1ListPackageVersionDependenciesCommand = exports.serializeAws_restJson1ListPackageVersionAssetsCommand = exports.serializeAws_restJson1ListPackagesCommand = exports.serializeAws_restJson1ListDomainsCommand = exports.serializeAws_restJson1GetRepositoryPermissionsPolicyCommand = exports.serializeAws_restJson1GetRepositoryEndpointCommand = exports.serializeAws_restJson1GetPackageVersionReadmeCommand = exports.serializeAws_restJson1GetPackageVersionAssetCommand = exports.serializeAws_restJson1GetDomainPermissionsPolicyCommand = exports.serializeAws_restJson1GetAuthorizationTokenCommand = exports.serializeAws_restJson1DisposePackageVersionsCommand = exports.serializeAws_restJson1DisassociateExternalConnectionCommand = exports.serializeAws_restJson1DescribeRepositoryCommand = exports.serializeAws_restJson1DescribePackageVersionCommand = exports.serializeAws_restJson1DescribePackageCommand = exports.serializeAws_restJson1DescribeDomainCommand = exports.serializeAws_restJson1DeleteRepositoryPermissionsPolicyCommand = exports.serializeAws_restJson1DeleteRepositoryCommand = exports.serializeAws_restJson1DeletePackageVersionsCommand = exports.serializeAws_restJson1DeletePackageCommand = exports.serializeAws_restJson1DeleteDomainPermissionsPolicyCommand = exports.serializeAws_restJson1DeleteDomainCommand = exports.serializeAws_restJson1CreateRepositoryCommand = exports.serializeAws_restJson1CreateDomainCommand = exports.serializeAws_restJson1CopyPackageVersionsCommand = exports.serializeAws_restJson1AssociateExternalConnectionCommand = void 0;
|
|
4
|
+
exports.deserializeAws_restJson1UpdateRepositoryCommand = exports.deserializeAws_restJson1UpdatePackageVersionsStatusCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1PutRepositoryPermissionsPolicyCommand = exports.deserializeAws_restJson1PutPackageOriginConfigurationCommand = exports.deserializeAws_restJson1PutDomainPermissionsPolicyCommand = exports.deserializeAws_restJson1PublishPackageVersionCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListRepositoriesInDomainCommand = exports.deserializeAws_restJson1ListRepositoriesCommand = exports.deserializeAws_restJson1ListPackageVersionsCommand = exports.deserializeAws_restJson1ListPackageVersionDependenciesCommand = exports.deserializeAws_restJson1ListPackageVersionAssetsCommand = exports.deserializeAws_restJson1ListPackagesCommand = exports.deserializeAws_restJson1ListDomainsCommand = exports.deserializeAws_restJson1GetRepositoryPermissionsPolicyCommand = exports.deserializeAws_restJson1GetRepositoryEndpointCommand = exports.deserializeAws_restJson1GetPackageVersionReadmeCommand = exports.deserializeAws_restJson1GetPackageVersionAssetCommand = exports.deserializeAws_restJson1GetDomainPermissionsPolicyCommand = exports.deserializeAws_restJson1GetAuthorizationTokenCommand = exports.deserializeAws_restJson1DisposePackageVersionsCommand = exports.deserializeAws_restJson1DisassociateExternalConnectionCommand = exports.deserializeAws_restJson1DescribeRepositoryCommand = exports.deserializeAws_restJson1DescribePackageVersionCommand = void 0;
|
|
5
5
|
const protocol_http_1 = require("@aws-sdk/protocol-http");
|
|
6
6
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
7
7
|
const CodeartifactServiceException_1 = require("../models/CodeartifactServiceException");
|
|
@@ -762,6 +762,40 @@ const serializeAws_restJson1ListTagsForResourceCommand = async (input, context)
|
|
|
762
762
|
});
|
|
763
763
|
};
|
|
764
764
|
exports.serializeAws_restJson1ListTagsForResourceCommand = serializeAws_restJson1ListTagsForResourceCommand;
|
|
765
|
+
const serializeAws_restJson1PublishPackageVersionCommand = async (input, context) => {
|
|
766
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
767
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
768
|
+
"content-type": "application/octet-stream",
|
|
769
|
+
"x-amz-content-sha256": input.assetSHA256,
|
|
770
|
+
});
|
|
771
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/package/version/publish";
|
|
772
|
+
const query = map({
|
|
773
|
+
domain: [, (0, smithy_client_1.expectNonNull)(input.domain, `domain`)],
|
|
774
|
+
"domain-owner": [, input.domainOwner],
|
|
775
|
+
repository: [, (0, smithy_client_1.expectNonNull)(input.repository, `repository`)],
|
|
776
|
+
format: [, (0, smithy_client_1.expectNonNull)(input.format, `format`)],
|
|
777
|
+
namespace: [, input.namespace],
|
|
778
|
+
package: [, (0, smithy_client_1.expectNonNull)(input.package, `package`)],
|
|
779
|
+
version: [, (0, smithy_client_1.expectNonNull)(input.packageVersion, `packageVersion`)],
|
|
780
|
+
asset: [, (0, smithy_client_1.expectNonNull)(input.assetName, `assetName`)],
|
|
781
|
+
unfinished: [() => input.unfinished !== void 0, () => input.unfinished.toString()],
|
|
782
|
+
});
|
|
783
|
+
let body;
|
|
784
|
+
if (input.assetContent !== undefined) {
|
|
785
|
+
body = input.assetContent;
|
|
786
|
+
}
|
|
787
|
+
return new protocol_http_1.HttpRequest({
|
|
788
|
+
protocol,
|
|
789
|
+
hostname,
|
|
790
|
+
port,
|
|
791
|
+
method: "POST",
|
|
792
|
+
headers,
|
|
793
|
+
path: resolvedPath,
|
|
794
|
+
query,
|
|
795
|
+
body,
|
|
796
|
+
});
|
|
797
|
+
};
|
|
798
|
+
exports.serializeAws_restJson1PublishPackageVersionCommand = serializeAws_restJson1PublishPackageVersionCommand;
|
|
765
799
|
const serializeAws_restJson1PutDomainPermissionsPolicyCommand = async (input, context) => {
|
|
766
800
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
767
801
|
const headers = {
|
|
@@ -2478,6 +2512,76 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
|
|
|
2478
2512
|
});
|
|
2479
2513
|
}
|
|
2480
2514
|
};
|
|
2515
|
+
const deserializeAws_restJson1PublishPackageVersionCommand = async (output, context) => {
|
|
2516
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2517
|
+
return deserializeAws_restJson1PublishPackageVersionCommandError(output, context);
|
|
2518
|
+
}
|
|
2519
|
+
const contents = map({
|
|
2520
|
+
$metadata: deserializeMetadata(output),
|
|
2521
|
+
});
|
|
2522
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
2523
|
+
if (data.asset != null) {
|
|
2524
|
+
contents.asset = deserializeAws_restJson1AssetSummary(data.asset, context);
|
|
2525
|
+
}
|
|
2526
|
+
if (data.format != null) {
|
|
2527
|
+
contents.format = (0, smithy_client_1.expectString)(data.format);
|
|
2528
|
+
}
|
|
2529
|
+
if (data.namespace != null) {
|
|
2530
|
+
contents.namespace = (0, smithy_client_1.expectString)(data.namespace);
|
|
2531
|
+
}
|
|
2532
|
+
if (data.package != null) {
|
|
2533
|
+
contents.package = (0, smithy_client_1.expectString)(data.package);
|
|
2534
|
+
}
|
|
2535
|
+
if (data.status != null) {
|
|
2536
|
+
contents.status = (0, smithy_client_1.expectString)(data.status);
|
|
2537
|
+
}
|
|
2538
|
+
if (data.version != null) {
|
|
2539
|
+
contents.version = (0, smithy_client_1.expectString)(data.version);
|
|
2540
|
+
}
|
|
2541
|
+
if (data.versionRevision != null) {
|
|
2542
|
+
contents.versionRevision = (0, smithy_client_1.expectString)(data.versionRevision);
|
|
2543
|
+
}
|
|
2544
|
+
return contents;
|
|
2545
|
+
};
|
|
2546
|
+
exports.deserializeAws_restJson1PublishPackageVersionCommand = deserializeAws_restJson1PublishPackageVersionCommand;
|
|
2547
|
+
const deserializeAws_restJson1PublishPackageVersionCommandError = async (output, context) => {
|
|
2548
|
+
const parsedOutput = {
|
|
2549
|
+
...output,
|
|
2550
|
+
body: await parseErrorBody(output.body, context),
|
|
2551
|
+
};
|
|
2552
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2553
|
+
switch (errorCode) {
|
|
2554
|
+
case "AccessDeniedException":
|
|
2555
|
+
case "com.amazonaws.codeartifact#AccessDeniedException":
|
|
2556
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
2557
|
+
case "ConflictException":
|
|
2558
|
+
case "com.amazonaws.codeartifact#ConflictException":
|
|
2559
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
2560
|
+
case "InternalServerException":
|
|
2561
|
+
case "com.amazonaws.codeartifact#InternalServerException":
|
|
2562
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
2563
|
+
case "ResourceNotFoundException":
|
|
2564
|
+
case "com.amazonaws.codeartifact#ResourceNotFoundException":
|
|
2565
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
2566
|
+
case "ServiceQuotaExceededException":
|
|
2567
|
+
case "com.amazonaws.codeartifact#ServiceQuotaExceededException":
|
|
2568
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
2569
|
+
case "ThrottlingException":
|
|
2570
|
+
case "com.amazonaws.codeartifact#ThrottlingException":
|
|
2571
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
2572
|
+
case "ValidationException":
|
|
2573
|
+
case "com.amazonaws.codeartifact#ValidationException":
|
|
2574
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2575
|
+
default:
|
|
2576
|
+
const parsedBody = parsedOutput.body;
|
|
2577
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
2578
|
+
output,
|
|
2579
|
+
parsedBody,
|
|
2580
|
+
exceptionCtor: CodeartifactServiceException_1.CodeartifactServiceException,
|
|
2581
|
+
errorCode,
|
|
2582
|
+
});
|
|
2583
|
+
}
|
|
2584
|
+
};
|
|
2481
2585
|
const deserializeAws_restJson1PutDomainPermissionsPolicyCommand = async (output, context) => {
|
|
2482
2586
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2483
2587
|
return deserializeAws_restJson1PutDomainPermissionsPolicyCommandError(output, context);
|
package/dist-es/Codeartifact.js
CHANGED
|
@@ -29,6 +29,7 @@ import { ListPackageVersionsCommand, } from "./commands/ListPackageVersionsComma
|
|
|
29
29
|
import { ListRepositoriesCommand, } from "./commands/ListRepositoriesCommand";
|
|
30
30
|
import { ListRepositoriesInDomainCommand, } from "./commands/ListRepositoriesInDomainCommand";
|
|
31
31
|
import { ListTagsForResourceCommand, } from "./commands/ListTagsForResourceCommand";
|
|
32
|
+
import { PublishPackageVersionCommand, } from "./commands/PublishPackageVersionCommand";
|
|
32
33
|
import { PutDomainPermissionsPolicyCommand, } from "./commands/PutDomainPermissionsPolicyCommand";
|
|
33
34
|
import { PutPackageOriginConfigurationCommand, } from "./commands/PutPackageOriginConfigurationCommand";
|
|
34
35
|
import { PutRepositoryPermissionsPolicyCommand, } from "./commands/PutRepositoryPermissionsPolicyCommand";
|
|
@@ -457,6 +458,20 @@ export class Codeartifact extends CodeartifactClient {
|
|
|
457
458
|
return this.send(command, optionsOrCb);
|
|
458
459
|
}
|
|
459
460
|
}
|
|
461
|
+
publishPackageVersion(args, optionsOrCb, cb) {
|
|
462
|
+
const command = new PublishPackageVersionCommand(args);
|
|
463
|
+
if (typeof optionsOrCb === "function") {
|
|
464
|
+
this.send(command, optionsOrCb);
|
|
465
|
+
}
|
|
466
|
+
else if (typeof cb === "function") {
|
|
467
|
+
if (typeof optionsOrCb !== "object")
|
|
468
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
469
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
470
|
+
}
|
|
471
|
+
else {
|
|
472
|
+
return this.send(command, optionsOrCb);
|
|
473
|
+
}
|
|
474
|
+
}
|
|
460
475
|
putDomainPermissionsPolicy(args, optionsOrCb, cb) {
|
|
461
476
|
const command = new PutDomainPermissionsPolicyCommand(args);
|
|
462
477
|
if (typeof optionsOrCb === "function") {
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
|
|
2
|
+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
|
+
import { PublishPackageVersionRequestFilterSensitiveLog, PublishPackageVersionResultFilterSensitiveLog, } from "../models/models_0";
|
|
5
|
+
import { deserializeAws_restJson1PublishPackageVersionCommand, serializeAws_restJson1PublishPackageVersionCommand, } from "../protocols/Aws_restJson1";
|
|
6
|
+
export class PublishPackageVersionCommand extends $Command {
|
|
7
|
+
constructor(input) {
|
|
8
|
+
super();
|
|
9
|
+
this.input = input;
|
|
10
|
+
}
|
|
11
|
+
static getEndpointParameterInstructions() {
|
|
12
|
+
return {
|
|
13
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
14
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
15
|
+
Region: { type: "builtInParams", name: "region" },
|
|
16
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
20
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
21
|
+
this.middlewareStack.use(getEndpointPlugin(configuration, PublishPackageVersionCommand.getEndpointParameterInstructions()));
|
|
22
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
23
|
+
const { logger } = configuration;
|
|
24
|
+
const clientName = "CodeartifactClient";
|
|
25
|
+
const commandName = "PublishPackageVersionCommand";
|
|
26
|
+
const handlerExecutionContext = {
|
|
27
|
+
logger,
|
|
28
|
+
clientName,
|
|
29
|
+
commandName,
|
|
30
|
+
inputFilterSensitiveLog: PublishPackageVersionRequestFilterSensitiveLog,
|
|
31
|
+
outputFilterSensitiveLog: PublishPackageVersionResultFilterSensitiveLog,
|
|
32
|
+
};
|
|
33
|
+
const { requestHandler } = configuration;
|
|
34
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
35
|
+
}
|
|
36
|
+
serialize(input, context) {
|
|
37
|
+
return serializeAws_restJson1PublishPackageVersionCommand(input, context);
|
|
38
|
+
}
|
|
39
|
+
deserialize(output, context) {
|
|
40
|
+
return deserializeAws_restJson1PublishPackageVersionCommand(output, context);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -28,6 +28,7 @@ export * from "./ListPackagesCommand";
|
|
|
28
28
|
export * from "./ListRepositoriesCommand";
|
|
29
29
|
export * from "./ListRepositoriesInDomainCommand";
|
|
30
30
|
export * from "./ListTagsForResourceCommand";
|
|
31
|
+
export * from "./PublishPackageVersionCommand";
|
|
31
32
|
export * from "./PutDomainPermissionsPolicyCommand";
|
|
32
33
|
export * from "./PutPackageOriginConfigurationCommand";
|
|
33
34
|
export * from "./PutRepositoryPermissionsPolicyCommand";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const q = "
|
|
2
|
-
const a =
|
|
3
|
-
const _data = { version: "1.0", parameters: { Region:
|
|
1
|
+
const q = "required", r = "fn", s = "argv", t = "ref";
|
|
2
|
+
const a = "isSet", b = "tree", c = "error", d = "endpoint", e = "PartitionResult", f = { [q]: false, "type": "String" }, g = { [q]: true, "default": false, "type": "Boolean" }, h = { [t]: "Endpoint" }, i = { [r]: "booleanEquals", [s]: [{ [t]: "UseFIPS" }, true] }, j = { [r]: "booleanEquals", [s]: [{ [t]: "UseDualStack" }, true] }, k = {}, l = { [r]: "booleanEquals", [s]: [true, { [r]: "getAttr", [s]: [{ [t]: e }, "supportsFIPS"] }] }, m = { [r]: "booleanEquals", [s]: [true, { [r]: "getAttr", [s]: [{ [t]: e }, "supportsDualStack"] }] }, n = [i], o = [j], p = [{ [t]: "Region" }];
|
|
3
|
+
const _data = { version: "1.0", parameters: { Region: f, UseDualStack: g, UseFIPS: g, Endpoint: f }, rules: [{ conditions: [{ [r]: a, [s]: [h] }], type: b, rules: [{ conditions: n, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: c }, { type: b, rules: [{ conditions: o, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: c }, { endpoint: { url: h, properties: k, headers: k }, type: d }] }] }, { type: b, rules: [{ conditions: [{ [r]: a, [s]: p }], type: b, rules: [{ conditions: [{ [r]: "aws.partition", [s]: p, assign: e }], type: b, rules: [{ conditions: [i, j], type: b, rules: [{ conditions: [l, m], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://codeartifact-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: c }] }, { conditions: n, type: b, rules: [{ conditions: [l], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://codeartifact-fips.{Region}.{PartitionResult#dnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "FIPS is enabled but this partition does not support FIPS", type: c }] }, { conditions: o, type: b, rules: [{ conditions: [m], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://codeartifact.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "DualStack is enabled but this partition does not support DualStack", type: c }] }, { type: b, rules: [{ endpoint: { url: "https://codeartifact.{Region}.{PartitionResult#dnsSuffix}", properties: k, headers: k }, type: d }] }] }] }, { error: "Invalid Configuration: Missing Region", type: c }] }] };
|
|
4
4
|
export const ruleSet = _data;
|