@aws-sdk/client-codecommit 3.388.0 → 3.395.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 +30 -32
- package/dist-cjs/CodeCommit.js +2 -0
- package/dist-cjs/CodeCommitClient.js +4 -2
- package/dist-cjs/clientConfiguration.js +2 -0
- package/dist-cjs/commands/ListFileCommitHistoryCommand.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 +1 -27
- package/dist-cjs/models/models_1.js +27 -1
- package/dist-cjs/pagination/ListFileCommitHistoryPaginator.js +29 -0
- package/dist-cjs/pagination/index.js +1 -0
- package/dist-cjs/protocols/Aws_json1_1.js +85 -6
- package/dist-cjs/runtimeConfig.shared.js +1 -0
- package/dist-cjs/runtimeExtensions.js +16 -0
- package/dist-es/CodeCommit.js +2 -0
- package/dist-es/CodeCommitClient.js +4 -2
- package/dist-es/clientConfiguration.js +1 -0
- package/dist-es/commands/ListFileCommitHistoryCommand.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 +0 -24
- package/dist-es/models/models_1.js +24 -0
- package/dist-es/pagination/ListFileCommitHistoryPaginator.js +25 -0
- package/dist-es/pagination/index.js +1 -0
- package/dist-es/protocols/Aws_json1_1.js +79 -2
- package/dist-es/runtimeConfig.shared.js +1 -0
- package/dist-es/runtimeExtensions.js +12 -0
- package/dist-types/CodeCommit.d.ts +100 -109
- package/dist-types/CodeCommitClient.d.ts +102 -112
- package/dist-types/clientConfiguration.d.ts +6 -0
- package/dist-types/commands/AssociateApprovalRuleTemplateWithRepositoryCommand.d.ts +4 -6
- package/dist-types/commands/BatchAssociateApprovalRuleTemplateWithRepositoriesCommand.d.ts +3 -4
- package/dist-types/commands/BatchDescribeMergeConflictsCommand.d.ts +12 -13
- package/dist-types/commands/BatchDisassociateApprovalRuleTemplateFromRepositoriesCommand.d.ts +3 -4
- package/dist-types/commands/BatchGetCommitsCommand.d.ts +1 -2
- package/dist-types/commands/BatchGetRepositoriesCommand.d.ts +2 -3
- package/dist-types/commands/CreateApprovalRuleTemplateCommand.d.ts +7 -9
- package/dist-types/commands/CreateBranchCommand.d.ts +3 -3
- package/dist-types/commands/CreateCommitCommand.d.ts +6 -7
- package/dist-types/commands/CreatePullRequestCommand.d.ts +4 -5
- package/dist-types/commands/CreateRepositoryCommand.d.ts +2 -3
- package/dist-types/commands/CreateUnreferencedMergeCommitCommand.d.ts +8 -9
- package/dist-types/commands/DeleteApprovalRuleTemplateCommand.d.ts +2 -3
- package/dist-types/commands/DeleteBranchCommand.d.ts +1 -2
- package/dist-types/commands/DeleteFileCommand.d.ts +1 -2
- package/dist-types/commands/DeleteRepositoryCommand.d.ts +2 -3
- package/dist-types/commands/DescribeMergeConflictsCommand.d.ts +12 -13
- package/dist-types/commands/DescribePullRequestEventsCommand.d.ts +7 -7
- package/dist-types/commands/DisassociateApprovalRuleTemplateFromRepositoryCommand.d.ts +4 -6
- package/dist-types/commands/GetApprovalRuleTemplateCommand.d.ts +3 -4
- package/dist-types/commands/GetBlobCommand.d.ts +3 -4
- package/dist-types/commands/GetBranchCommand.d.ts +1 -2
- package/dist-types/commands/GetCommentCommand.d.ts +1 -1
- package/dist-types/commands/GetCommentsForComparedCommitCommand.d.ts +3 -4
- package/dist-types/commands/GetCommentsForPullRequestCommand.d.ts +3 -4
- package/dist-types/commands/GetCommitCommand.d.ts +1 -2
- package/dist-types/commands/GetDifferencesCommand.d.ts +2 -3
- package/dist-types/commands/GetFileCommand.d.ts +4 -5
- package/dist-types/commands/GetFolderCommand.d.ts +3 -4
- package/dist-types/commands/GetMergeCommitCommand.d.ts +3 -4
- package/dist-types/commands/GetMergeConflictsCommand.d.ts +12 -13
- package/dist-types/commands/GetMergeOptionsCommand.d.ts +4 -5
- package/dist-types/commands/GetPullRequestApprovalStatesCommand.d.ts +1 -1
- package/dist-types/commands/GetPullRequestCommand.d.ts +2 -2
- package/dist-types/commands/GetRepositoryCommand.d.ts +2 -4
- package/dist-types/commands/GetRepositoryTriggersCommand.d.ts +2 -3
- package/dist-types/commands/ListApprovalRuleTemplatesCommand.d.ts +2 -2
- package/dist-types/commands/ListAssociatedApprovalRuleTemplatesForRepositoryCommand.d.ts +1 -2
- package/dist-types/commands/ListBranchesCommand.d.ts +1 -2
- package/dist-types/commands/ListFileCommitHistoryCommand.d.ts +153 -0
- package/dist-types/commands/ListPullRequestsCommand.d.ts +5 -5
- package/dist-types/commands/ListRepositoriesCommand.d.ts +2 -2
- package/dist-types/commands/ListRepositoriesForApprovalRuleTemplateCommand.d.ts +3 -4
- package/dist-types/commands/ListTagsForResourceCommand.d.ts +6 -8
- package/dist-types/commands/MergeBranchesByFastForwardCommand.d.ts +1 -2
- package/dist-types/commands/MergeBranchesBySquashCommand.d.ts +6 -7
- package/dist-types/commands/MergeBranchesByThreeWayCommand.d.ts +6 -7
- package/dist-types/commands/MergePullRequestByFastForwardCommand.d.ts +3 -4
- package/dist-types/commands/MergePullRequestBySquashCommand.d.ts +8 -9
- package/dist-types/commands/MergePullRequestByThreeWayCommand.d.ts +8 -9
- package/dist-types/commands/OverridePullRequestApprovalRulesCommand.d.ts +1 -1
- package/dist-types/commands/PostCommentForComparedCommitCommand.d.ts +4 -5
- package/dist-types/commands/PostCommentForPullRequestCommand.d.ts +4 -5
- package/dist-types/commands/PostCommentReplyCommand.d.ts +1 -1
- package/dist-types/commands/PutCommentReactionCommand.d.ts +1 -1
- package/dist-types/commands/PutFileCommand.d.ts +3 -4
- package/dist-types/commands/PutRepositoryTriggersCommand.d.ts +4 -5
- package/dist-types/commands/TagResourceCommand.d.ts +8 -9
- package/dist-types/commands/TestRepositoryTriggersCommand.d.ts +4 -5
- package/dist-types/commands/UntagResourceCommand.d.ts +7 -9
- package/dist-types/commands/UpdateApprovalRuleTemplateContentCommand.d.ts +3 -4
- package/dist-types/commands/UpdateApprovalRuleTemplateDescriptionCommand.d.ts +5 -7
- package/dist-types/commands/UpdateApprovalRuleTemplateNameCommand.d.ts +4 -5
- package/dist-types/commands/UpdateCommentCommand.d.ts +1 -1
- package/dist-types/commands/UpdateDefaultBranchCommand.d.ts +2 -3
- package/dist-types/commands/UpdatePullRequestApprovalStateCommand.d.ts +1 -1
- package/dist-types/commands/UpdatePullRequestDescriptionCommand.d.ts +2 -2
- package/dist-types/commands/UpdatePullRequestStatusCommand.d.ts +3 -3
- package/dist-types/commands/UpdatePullRequestTitleCommand.d.ts +2 -2
- package/dist-types/commands/UpdateRepositoryDescriptionCommand.d.ts +2 -3
- package/dist-types/commands/UpdateRepositoryNameCommand.d.ts +4 -5
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/index.d.ts +93 -109
- package/dist-types/models/models_0.d.ts +153 -114
- package/dist-types/models/models_1.d.ts +68 -30
- package/dist-types/pagination/ListFileCommitHistoryPaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +1 -0
- package/dist-types/protocols/Aws_json1_1.d.ts +9 -0
- package/dist-types/runtimeConfig.browser.d.ts +1 -0
- package/dist-types/runtimeConfig.d.ts +1 -0
- package/dist-types/runtimeConfig.native.d.ts +1 -0
- package/dist-types/runtimeConfig.shared.d.ts +1 -0
- package/dist-types/runtimeExtensions.d.ts +17 -0
- package/dist-types/ts3.4/CodeCommit.d.ts +17 -0
- package/dist-types/ts3.4/CodeCommitClient.d.ts +9 -0
- package/dist-types/ts3.4/clientConfiguration.d.ts +3 -0
- package/dist-types/ts3.4/commands/ListFileCommitHistoryCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/ListPullRequestsCommand.d.ts +2 -4
- package/dist-types/ts3.4/commands/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +17 -18
- package/dist-types/ts3.4/models/models_1.d.ts +18 -0
- package/dist-types/ts3.4/pagination/ListFileCommitHistoryPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +1 -0
- package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +12 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +1 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +1 -0
- package/dist-types/ts3.4/runtimeExtensions.d.ts +11 -0
- package/package.json +28 -28
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolveRuntimeExtensions = void 0;
|
|
4
|
+
const types_1 = require("@smithy/types");
|
|
5
|
+
const asPartial = (t) => t;
|
|
6
|
+
const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
7
|
+
const clientConfiguration = {
|
|
8
|
+
...asPartial((0, types_1.getDefaultClientConfiguration)(runtimeConfig)),
|
|
9
|
+
};
|
|
10
|
+
extensions.forEach((extension) => extension.configureClient(clientConfiguration));
|
|
11
|
+
return {
|
|
12
|
+
...runtimeConfig,
|
|
13
|
+
...(0, types_1.resolveDefaultRuntimeConfig)(clientConfiguration),
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
exports.resolveRuntimeExtensions = resolveRuntimeExtensions;
|
package/dist-es/CodeCommit.js
CHANGED
|
@@ -45,6 +45,7 @@ import { GetRepositoryTriggersCommand, } from "./commands/GetRepositoryTriggersC
|
|
|
45
45
|
import { ListApprovalRuleTemplatesCommand, } from "./commands/ListApprovalRuleTemplatesCommand";
|
|
46
46
|
import { ListAssociatedApprovalRuleTemplatesForRepositoryCommand, } from "./commands/ListAssociatedApprovalRuleTemplatesForRepositoryCommand";
|
|
47
47
|
import { ListBranchesCommand, } from "./commands/ListBranchesCommand";
|
|
48
|
+
import { ListFileCommitHistoryCommand, } from "./commands/ListFileCommitHistoryCommand";
|
|
48
49
|
import { ListPullRequestsCommand, } from "./commands/ListPullRequestsCommand";
|
|
49
50
|
import { ListRepositoriesCommand, } from "./commands/ListRepositoriesCommand";
|
|
50
51
|
import { ListRepositoriesForApprovalRuleTemplateCommand, } from "./commands/ListRepositoriesForApprovalRuleTemplateCommand";
|
|
@@ -123,6 +124,7 @@ const commands = {
|
|
|
123
124
|
ListApprovalRuleTemplatesCommand,
|
|
124
125
|
ListAssociatedApprovalRuleTemplatesForRepositoryCommand,
|
|
125
126
|
ListBranchesCommand,
|
|
127
|
+
ListFileCommitHistoryCommand,
|
|
126
128
|
ListPullRequestsCommand,
|
|
127
129
|
ListRepositoriesCommand,
|
|
128
130
|
ListRepositoriesForApprovalRuleTemplateCommand,
|
|
@@ -10,6 +10,7 @@ import { getRetryPlugin, resolveRetryConfig } from "@smithy/middleware-retry";
|
|
|
10
10
|
import { Client as __Client, } from "@smithy/smithy-client";
|
|
11
11
|
import { resolveClientEndpointParameters, } from "./endpoint/EndpointParameters";
|
|
12
12
|
import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
|
|
13
|
+
import { resolveRuntimeExtensions } from "./runtimeExtensions";
|
|
13
14
|
export { __Client };
|
|
14
15
|
export class CodeCommitClient extends __Client {
|
|
15
16
|
constructor(...[configuration]) {
|
|
@@ -21,8 +22,9 @@ export class CodeCommitClient extends __Client {
|
|
|
21
22
|
const _config_5 = resolveHostHeaderConfig(_config_4);
|
|
22
23
|
const _config_6 = resolveAwsAuthConfig(_config_5);
|
|
23
24
|
const _config_7 = resolveUserAgentConfig(_config_6);
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
|
|
26
|
+
super(_config_8);
|
|
27
|
+
this.config = _config_8;
|
|
26
28
|
this.middlewareStack.use(getRetryPlugin(this.config));
|
|
27
29
|
this.middlewareStack.use(getContentLengthPlugin(this.config));
|
|
28
30
|
this.middlewareStack.use(getHostHeaderPlugin(this.config));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
import { de_ListFileCommitHistoryCommand, se_ListFileCommitHistoryCommand } from "../protocols/Aws_json1_1";
|
|
5
|
+
export { $Command };
|
|
6
|
+
export class ListFileCommitHistoryCommand extends $Command {
|
|
7
|
+
static getEndpointParameterInstructions() {
|
|
8
|
+
return {
|
|
9
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
10
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
11
|
+
Region: { type: "builtInParams", name: "region" },
|
|
12
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
constructor(input) {
|
|
16
|
+
super();
|
|
17
|
+
this.input = input;
|
|
18
|
+
}
|
|
19
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
20
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
21
|
+
this.middlewareStack.use(getEndpointPlugin(configuration, ListFileCommitHistoryCommand.getEndpointParameterInstructions()));
|
|
22
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
23
|
+
const { logger } = configuration;
|
|
24
|
+
const clientName = "CodeCommitClient";
|
|
25
|
+
const commandName = "ListFileCommitHistoryCommand";
|
|
26
|
+
const handlerExecutionContext = {
|
|
27
|
+
logger,
|
|
28
|
+
clientName,
|
|
29
|
+
commandName,
|
|
30
|
+
inputFilterSensitiveLog: (_) => _,
|
|
31
|
+
outputFilterSensitiveLog: (_) => _,
|
|
32
|
+
};
|
|
33
|
+
const { requestHandler } = configuration;
|
|
34
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
35
|
+
}
|
|
36
|
+
serialize(input, context) {
|
|
37
|
+
return se_ListFileCommitHistoryCommand(input, context);
|
|
38
|
+
}
|
|
39
|
+
deserialize(output, context) {
|
|
40
|
+
return de_ListFileCommitHistoryCommand(output, context);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -43,6 +43,7 @@ export * from "./GetRepositoryTriggersCommand";
|
|
|
43
43
|
export * from "./ListApprovalRuleTemplatesCommand";
|
|
44
44
|
export * from "./ListAssociatedApprovalRuleTemplatesForRepositoryCommand";
|
|
45
45
|
export * from "./ListBranchesCommand";
|
|
46
|
+
export * from "./ListFileCommitHistoryCommand";
|
|
46
47
|
export * from "./ListPullRequestsCommand";
|
|
47
48
|
export * from "./ListRepositoriesCommand";
|
|
48
49
|
export * from "./ListRepositoriesForApprovalRuleTemplateCommand";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
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 }, { conditions: o, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: c }, { endpoint: { url: h, properties: k, headers: k }, type: d }] }, { 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: [{ endpoint: { url: "https://codecommit-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: [{ endpoint: { url: "https://codecommit-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: [{ endpoint: { url: "https://codecommit.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: k, headers: k }, type: d }] }, { error: "DualStack is enabled but this partition does not support DualStack", type: c }] }, { endpoint: { url: "https://codecommit.{Region}.{PartitionResult#dnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "Invalid Configuration: Missing Region", type: c }] };
|
|
4
4
|
export const ruleSet = _data;
|
|
@@ -1773,27 +1773,3 @@ export class InvalidPullRequestStatusException extends __BaseException {
|
|
|
1773
1773
|
Object.setPrototypeOf(this, InvalidPullRequestStatusException.prototype);
|
|
1774
1774
|
}
|
|
1775
1775
|
}
|
|
1776
|
-
export class InvalidOrderException extends __BaseException {
|
|
1777
|
-
constructor(opts) {
|
|
1778
|
-
super({
|
|
1779
|
-
name: "InvalidOrderException",
|
|
1780
|
-
$fault: "client",
|
|
1781
|
-
...opts,
|
|
1782
|
-
});
|
|
1783
|
-
this.name = "InvalidOrderException";
|
|
1784
|
-
this.$fault = "client";
|
|
1785
|
-
Object.setPrototypeOf(this, InvalidOrderException.prototype);
|
|
1786
|
-
}
|
|
1787
|
-
}
|
|
1788
|
-
export class InvalidSortByException extends __BaseException {
|
|
1789
|
-
constructor(opts) {
|
|
1790
|
-
super({
|
|
1791
|
-
name: "InvalidSortByException",
|
|
1792
|
-
$fault: "client",
|
|
1793
|
-
...opts,
|
|
1794
|
-
});
|
|
1795
|
-
this.name = "InvalidSortByException";
|
|
1796
|
-
this.$fault = "client";
|
|
1797
|
-
Object.setPrototypeOf(this, InvalidSortByException.prototype);
|
|
1798
|
-
}
|
|
1799
|
-
}
|
|
@@ -1,4 +1,28 @@
|
|
|
1
1
|
import { CodeCommitServiceException as __BaseException } from "./CodeCommitServiceException";
|
|
2
|
+
export class InvalidOrderException extends __BaseException {
|
|
3
|
+
constructor(opts) {
|
|
4
|
+
super({
|
|
5
|
+
name: "InvalidOrderException",
|
|
6
|
+
$fault: "client",
|
|
7
|
+
...opts,
|
|
8
|
+
});
|
|
9
|
+
this.name = "InvalidOrderException";
|
|
10
|
+
this.$fault = "client";
|
|
11
|
+
Object.setPrototypeOf(this, InvalidOrderException.prototype);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export class InvalidSortByException extends __BaseException {
|
|
15
|
+
constructor(opts) {
|
|
16
|
+
super({
|
|
17
|
+
name: "InvalidSortByException",
|
|
18
|
+
$fault: "client",
|
|
19
|
+
...opts,
|
|
20
|
+
});
|
|
21
|
+
this.name = "InvalidSortByException";
|
|
22
|
+
this.$fault = "client";
|
|
23
|
+
Object.setPrototypeOf(this, InvalidSortByException.prototype);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
2
26
|
export const OrderEnum = {
|
|
3
27
|
ASCENDING: "ascending",
|
|
4
28
|
DESCENDING: "descending",
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { CodeCommitClient } from "../CodeCommitClient";
|
|
2
|
+
import { ListFileCommitHistoryCommand, } from "../commands/ListFileCommitHistoryCommand";
|
|
3
|
+
const makePagedClientRequest = async (client, input, ...args) => {
|
|
4
|
+
return await client.send(new ListFileCommitHistoryCommand(input), ...args);
|
|
5
|
+
};
|
|
6
|
+
export async function* paginateListFileCommitHistory(config, input, ...additionalArguments) {
|
|
7
|
+
let token = config.startingToken || undefined;
|
|
8
|
+
let hasNext = true;
|
|
9
|
+
let page;
|
|
10
|
+
while (hasNext) {
|
|
11
|
+
input.nextToken = token;
|
|
12
|
+
input["maxResults"] = config.pageSize;
|
|
13
|
+
if (config.client instanceof CodeCommitClient) {
|
|
14
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
throw new Error("Invalid client, expected CodeCommit | CodeCommitClient");
|
|
18
|
+
}
|
|
19
|
+
yield page;
|
|
20
|
+
const prevToken = token;
|
|
21
|
+
token = page.nextToken;
|
|
22
|
+
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
23
|
+
}
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
@@ -9,6 +9,7 @@ export * from "./Interfaces";
|
|
|
9
9
|
export * from "./ListApprovalRuleTemplatesPaginator";
|
|
10
10
|
export * from "./ListAssociatedApprovalRuleTemplatesForRepositoryPaginator";
|
|
11
11
|
export * from "./ListBranchesPaginator";
|
|
12
|
+
export * from "./ListFileCommitHistoryPaginator";
|
|
12
13
|
export * from "./ListPullRequestsPaginator";
|
|
13
14
|
export * from "./ListRepositoriesForApprovalRuleTemplatePaginator";
|
|
14
15
|
export * from "./ListRepositoriesPaginator";
|
|
@@ -2,8 +2,8 @@ import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
|
|
|
2
2
|
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
|
|
3
3
|
import { v4 as generateIdempotencyToken } from "uuid";
|
|
4
4
|
import { CodeCommitServiceException as __BaseException } from "../models/CodeCommitServiceException";
|
|
5
|
-
import { ActorDoesNotExistException, ApprovalRuleContentRequiredException, ApprovalRuleDoesNotExistException, ApprovalRuleNameAlreadyExistsException, ApprovalRuleNameRequiredException, ApprovalRuleTemplateContentRequiredException, ApprovalRuleTemplateDoesNotExistException, ApprovalRuleTemplateInUseException, ApprovalRuleTemplateNameAlreadyExistsException, ApprovalRuleTemplateNameRequiredException, ApprovalStateRequiredException, AuthorDoesNotExistException, BeforeCommitIdAndAfterCommitIdAreSameException, BlobIdDoesNotExistException, BlobIdRequiredException, BranchDoesNotExistException, BranchNameExistsException, BranchNameIsTagNameException, BranchNameRequiredException, CannotDeleteApprovalRuleFromTemplateException, CannotModifyApprovalRuleFromTemplateException, ClientRequestTokenRequiredException, CommentDeletedException, CommentDoesNotExistException, CommentIdRequiredException, CommitDoesNotExistException, CommitIdDoesNotExistException, CommitIdRequiredException, CommitIdsLimitExceededException, CommitIdsListRequiredException, CommitMessageLengthExceededException, CommitRequiredException, ConcurrentReferenceUpdateException, DefaultBranchCannotBeDeletedException, DirectoryNameConflictsWithFileNameException, EncryptionIntegrityChecksFailedException, EncryptionKeyAccessDeniedException, EncryptionKeyDisabledException, EncryptionKeyNotFoundException, EncryptionKeyUnavailableException, FileContentAndSourceFileSpecifiedException, FileContentSizeLimitExceededException, FileDoesNotExistException, FileEntryRequiredException, FileModeRequiredException, FileNameConflictsWithDirectoryNameException, FilePathConflictsWithSubmodulePathException, FileTooLargeException, FolderContentSizeLimitExceededException, FolderDoesNotExistException, IdempotencyParameterMismatchException, InvalidActorArnException, InvalidApprovalRuleContentException, InvalidApprovalRuleNameException, InvalidApprovalRuleTemplateContentException, InvalidApprovalRuleTemplateDescriptionException, InvalidApprovalRuleTemplateNameException, InvalidAuthorArnException, InvalidBlobIdException, InvalidBranchNameException, InvalidClientRequestTokenException, InvalidCommentIdException, InvalidCommitException, InvalidCommitIdException, InvalidConflictDetailLevelException, InvalidConflictResolutionException, InvalidConflictResolutionStrategyException, InvalidContinuationTokenException, InvalidDeletionParameterException, InvalidDescriptionException, InvalidDestinationCommitSpecifierException, InvalidEmailException, InvalidFileModeException, InvalidMaxConflictFilesException, InvalidMaxMergeHunksException, InvalidMaxResultsException, InvalidMergeOptionException,
|
|
6
|
-
import { CommentContentRequiredException, CommentContentSizeLimitExceededException, CommentNotCreatedByCallerException, FileContentRequiredException, InvalidApprovalStateException, InvalidFileLocationException, InvalidFilePositionException, InvalidOverrideStatusException, InvalidPullRequestStatusUpdateException, InvalidReactionValueException, InvalidRelativeFileVersionEnumException, InvalidRepositoryTriggerBranchNameException, InvalidRepositoryTriggerCustomDataException, InvalidRepositoryTriggerDestinationArnException, InvalidRepositoryTriggerEventsException, InvalidRepositoryTriggerNameException, InvalidRepositoryTriggerRegionException, InvalidResourceArnException, InvalidRuleContentSha256Exception, InvalidTagKeysListException, InvalidTargetBranchException, MaximumBranchesExceededException, MaximumNumberOfApprovalsExceededException, MaximumRepositoryTriggersExceededException, OverrideAlreadySetException, OverrideStatusRequiredException, PullRequestApprovalRulesNotSatisfiedException, PullRequestCannotBeApprovedByAuthorException, PullRequestStatusRequiredException, ReactionLimitExceededException, ReactionValueRequiredException, RepositoryTriggerBranchNameListRequiredException, RepositoryTriggerDestinationArnRequiredException, RepositoryTriggerEventsListRequiredException, RepositoryTriggerNameRequiredException, RepositoryTriggersListRequiredException, ResourceArnRequiredException, SameFileContentException, TagKeysListRequiredException, TagsMapRequiredException, TipOfSourceReferenceIsDifferentException, } from "../models/models_1";
|
|
5
|
+
import { ActorDoesNotExistException, ApprovalRuleContentRequiredException, ApprovalRuleDoesNotExistException, ApprovalRuleNameAlreadyExistsException, ApprovalRuleNameRequiredException, ApprovalRuleTemplateContentRequiredException, ApprovalRuleTemplateDoesNotExistException, ApprovalRuleTemplateInUseException, ApprovalRuleTemplateNameAlreadyExistsException, ApprovalRuleTemplateNameRequiredException, ApprovalStateRequiredException, AuthorDoesNotExistException, BeforeCommitIdAndAfterCommitIdAreSameException, BlobIdDoesNotExistException, BlobIdRequiredException, BranchDoesNotExistException, BranchNameExistsException, BranchNameIsTagNameException, BranchNameRequiredException, CannotDeleteApprovalRuleFromTemplateException, CannotModifyApprovalRuleFromTemplateException, ClientRequestTokenRequiredException, CommentDeletedException, CommentDoesNotExistException, CommentIdRequiredException, CommitDoesNotExistException, CommitIdDoesNotExistException, CommitIdRequiredException, CommitIdsLimitExceededException, CommitIdsListRequiredException, CommitMessageLengthExceededException, CommitRequiredException, ConcurrentReferenceUpdateException, DefaultBranchCannotBeDeletedException, DirectoryNameConflictsWithFileNameException, EncryptionIntegrityChecksFailedException, EncryptionKeyAccessDeniedException, EncryptionKeyDisabledException, EncryptionKeyNotFoundException, EncryptionKeyUnavailableException, FileContentAndSourceFileSpecifiedException, FileContentSizeLimitExceededException, FileDoesNotExistException, FileEntryRequiredException, FileModeRequiredException, FileNameConflictsWithDirectoryNameException, FilePathConflictsWithSubmodulePathException, FileTooLargeException, FolderContentSizeLimitExceededException, FolderDoesNotExistException, IdempotencyParameterMismatchException, InvalidActorArnException, InvalidApprovalRuleContentException, InvalidApprovalRuleNameException, InvalidApprovalRuleTemplateContentException, InvalidApprovalRuleTemplateDescriptionException, InvalidApprovalRuleTemplateNameException, InvalidAuthorArnException, InvalidBlobIdException, InvalidBranchNameException, InvalidClientRequestTokenException, InvalidCommentIdException, InvalidCommitException, InvalidCommitIdException, InvalidConflictDetailLevelException, InvalidConflictResolutionException, InvalidConflictResolutionStrategyException, InvalidContinuationTokenException, InvalidDeletionParameterException, InvalidDescriptionException, InvalidDestinationCommitSpecifierException, InvalidEmailException, InvalidFileModeException, InvalidMaxConflictFilesException, InvalidMaxMergeHunksException, InvalidMaxResultsException, InvalidMergeOptionException, InvalidParentCommitIdException, InvalidPathException, InvalidPullRequestEventTypeException, InvalidPullRequestIdException, InvalidPullRequestStatusException, InvalidReactionUserArnException, InvalidReferenceNameException, InvalidReplacementContentException, InvalidReplacementTypeException, InvalidRepositoryDescriptionException, InvalidRepositoryNameException, InvalidRevisionIdException, InvalidSourceCommitSpecifierException, InvalidSystemTagUsageException, InvalidTagsMapException, InvalidTargetException, InvalidTargetsException, InvalidTitleException, ManualMergeRequiredException, MaximumConflictResolutionEntriesExceededException, MaximumFileContentToLoadExceededException, MaximumFileEntriesExceededException, MaximumItemsToCompareExceededException, MaximumOpenPullRequestsExceededException, MaximumRepositoryNamesExceededException, MaximumRuleTemplatesAssociatedWithRepositoryException, MergeOptionRequiredException, MultipleConflictResolutionEntriesException, MultipleRepositoriesInPullRequestException, NameLengthExceededException, NoChangeException, NumberOfRulesExceededException, NumberOfRuleTemplatesExceededException, ParentCommitDoesNotExistException, ParentCommitIdOutdatedException, ParentCommitIdRequiredException, PathDoesNotExistException, PathRequiredException, PullRequestAlreadyClosedException, PullRequestDoesNotExistException, PullRequestIdRequiredException, PutFileEntryConflictException, ReferenceDoesNotExistException, ReferenceNameRequiredException, ReferenceTypeNotSupportedException, ReplacementContentRequiredException, ReplacementTypeRequiredException, RepositoryDoesNotExistException, RepositoryLimitExceededException, RepositoryNameExistsException, RepositoryNameRequiredException, RepositoryNamesRequiredException, RepositoryNotAssociatedWithPullRequestException, RestrictedSourceFileException, RevisionIdRequiredException, RevisionNotCurrentException, SamePathRequestException, SourceAndDestinationAreSameException, SourceFileOrContentRequiredException, TagPolicyException, TargetRequiredException, TargetsRequiredException, TipsDivergenceExceededException, TitleRequiredException, TooManyTagsException, } from "../models/models_0";
|
|
6
|
+
import { CommentContentRequiredException, CommentContentSizeLimitExceededException, CommentNotCreatedByCallerException, FileContentRequiredException, InvalidApprovalStateException, InvalidFileLocationException, InvalidFilePositionException, InvalidOrderException, InvalidOverrideStatusException, InvalidPullRequestStatusUpdateException, InvalidReactionValueException, InvalidRelativeFileVersionEnumException, InvalidRepositoryTriggerBranchNameException, InvalidRepositoryTriggerCustomDataException, InvalidRepositoryTriggerDestinationArnException, InvalidRepositoryTriggerEventsException, InvalidRepositoryTriggerNameException, InvalidRepositoryTriggerRegionException, InvalidResourceArnException, InvalidRuleContentSha256Exception, InvalidSortByException, InvalidTagKeysListException, InvalidTargetBranchException, MaximumBranchesExceededException, MaximumNumberOfApprovalsExceededException, MaximumRepositoryTriggersExceededException, OverrideAlreadySetException, OverrideStatusRequiredException, PullRequestApprovalRulesNotSatisfiedException, PullRequestCannotBeApprovedByAuthorException, PullRequestStatusRequiredException, ReactionLimitExceededException, ReactionValueRequiredException, RepositoryTriggerBranchNameListRequiredException, RepositoryTriggerDestinationArnRequiredException, RepositoryTriggerEventsListRequiredException, RepositoryTriggerNameRequiredException, RepositoryTriggersListRequiredException, ResourceArnRequiredException, SameFileContentException, TagKeysListRequiredException, TagsMapRequiredException, TipOfSourceReferenceIsDifferentException, } from "../models/models_1";
|
|
7
7
|
export const se_AssociateApprovalRuleTemplateWithRepositoryCommand = async (input, context) => {
|
|
8
8
|
const headers = sharedHeaders("AssociateApprovalRuleTemplateWithRepository");
|
|
9
9
|
let body;
|
|
@@ -274,6 +274,12 @@ export const se_ListBranchesCommand = async (input, context) => {
|
|
|
274
274
|
body = JSON.stringify(_json(input));
|
|
275
275
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
276
276
|
};
|
|
277
|
+
export const se_ListFileCommitHistoryCommand = async (input, context) => {
|
|
278
|
+
const headers = sharedHeaders("ListFileCommitHistory");
|
|
279
|
+
let body;
|
|
280
|
+
body = JSON.stringify(_json(input));
|
|
281
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
282
|
+
};
|
|
277
283
|
export const se_ListPullRequestsCommand = async (input, context) => {
|
|
278
284
|
const headers = sharedHeaders("ListPullRequests");
|
|
279
285
|
let body;
|
|
@@ -3499,6 +3505,77 @@ const de_ListBranchesCommandError = async (output, context) => {
|
|
|
3499
3505
|
});
|
|
3500
3506
|
}
|
|
3501
3507
|
};
|
|
3508
|
+
export const de_ListFileCommitHistoryCommand = async (output, context) => {
|
|
3509
|
+
if (output.statusCode >= 300) {
|
|
3510
|
+
return de_ListFileCommitHistoryCommandError(output, context);
|
|
3511
|
+
}
|
|
3512
|
+
const data = await parseBody(output.body, context);
|
|
3513
|
+
let contents = {};
|
|
3514
|
+
contents = _json(data);
|
|
3515
|
+
const response = {
|
|
3516
|
+
$metadata: deserializeMetadata(output),
|
|
3517
|
+
...contents,
|
|
3518
|
+
};
|
|
3519
|
+
return response;
|
|
3520
|
+
};
|
|
3521
|
+
const de_ListFileCommitHistoryCommandError = async (output, context) => {
|
|
3522
|
+
const parsedOutput = {
|
|
3523
|
+
...output,
|
|
3524
|
+
body: await parseErrorBody(output.body, context),
|
|
3525
|
+
};
|
|
3526
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3527
|
+
switch (errorCode) {
|
|
3528
|
+
case "CommitDoesNotExistException":
|
|
3529
|
+
case "com.amazonaws.codecommit#CommitDoesNotExistException":
|
|
3530
|
+
throw await de_CommitDoesNotExistExceptionRes(parsedOutput, context);
|
|
3531
|
+
case "CommitRequiredException":
|
|
3532
|
+
case "com.amazonaws.codecommit#CommitRequiredException":
|
|
3533
|
+
throw await de_CommitRequiredExceptionRes(parsedOutput, context);
|
|
3534
|
+
case "EncryptionIntegrityChecksFailedException":
|
|
3535
|
+
case "com.amazonaws.codecommit#EncryptionIntegrityChecksFailedException":
|
|
3536
|
+
throw await de_EncryptionIntegrityChecksFailedExceptionRes(parsedOutput, context);
|
|
3537
|
+
case "EncryptionKeyAccessDeniedException":
|
|
3538
|
+
case "com.amazonaws.codecommit#EncryptionKeyAccessDeniedException":
|
|
3539
|
+
throw await de_EncryptionKeyAccessDeniedExceptionRes(parsedOutput, context);
|
|
3540
|
+
case "EncryptionKeyDisabledException":
|
|
3541
|
+
case "com.amazonaws.codecommit#EncryptionKeyDisabledException":
|
|
3542
|
+
throw await de_EncryptionKeyDisabledExceptionRes(parsedOutput, context);
|
|
3543
|
+
case "EncryptionKeyNotFoundException":
|
|
3544
|
+
case "com.amazonaws.codecommit#EncryptionKeyNotFoundException":
|
|
3545
|
+
throw await de_EncryptionKeyNotFoundExceptionRes(parsedOutput, context);
|
|
3546
|
+
case "EncryptionKeyUnavailableException":
|
|
3547
|
+
case "com.amazonaws.codecommit#EncryptionKeyUnavailableException":
|
|
3548
|
+
throw await de_EncryptionKeyUnavailableExceptionRes(parsedOutput, context);
|
|
3549
|
+
case "InvalidCommitException":
|
|
3550
|
+
case "com.amazonaws.codecommit#InvalidCommitException":
|
|
3551
|
+
throw await de_InvalidCommitExceptionRes(parsedOutput, context);
|
|
3552
|
+
case "InvalidContinuationTokenException":
|
|
3553
|
+
case "com.amazonaws.codecommit#InvalidContinuationTokenException":
|
|
3554
|
+
throw await de_InvalidContinuationTokenExceptionRes(parsedOutput, context);
|
|
3555
|
+
case "InvalidMaxResultsException":
|
|
3556
|
+
case "com.amazonaws.codecommit#InvalidMaxResultsException":
|
|
3557
|
+
throw await de_InvalidMaxResultsExceptionRes(parsedOutput, context);
|
|
3558
|
+
case "InvalidRepositoryNameException":
|
|
3559
|
+
case "com.amazonaws.codecommit#InvalidRepositoryNameException":
|
|
3560
|
+
throw await de_InvalidRepositoryNameExceptionRes(parsedOutput, context);
|
|
3561
|
+
case "RepositoryDoesNotExistException":
|
|
3562
|
+
case "com.amazonaws.codecommit#RepositoryDoesNotExistException":
|
|
3563
|
+
throw await de_RepositoryDoesNotExistExceptionRes(parsedOutput, context);
|
|
3564
|
+
case "RepositoryNameRequiredException":
|
|
3565
|
+
case "com.amazonaws.codecommit#RepositoryNameRequiredException":
|
|
3566
|
+
throw await de_RepositoryNameRequiredExceptionRes(parsedOutput, context);
|
|
3567
|
+
case "TipsDivergenceExceededException":
|
|
3568
|
+
case "com.amazonaws.codecommit#TipsDivergenceExceededException":
|
|
3569
|
+
throw await de_TipsDivergenceExceededExceptionRes(parsedOutput, context);
|
|
3570
|
+
default:
|
|
3571
|
+
const parsedBody = parsedOutput.body;
|
|
3572
|
+
return throwDefaultError({
|
|
3573
|
+
output,
|
|
3574
|
+
parsedBody,
|
|
3575
|
+
errorCode,
|
|
3576
|
+
});
|
|
3577
|
+
}
|
|
3578
|
+
};
|
|
3502
3579
|
export const de_ListPullRequestsCommand = async (output, context) => {
|
|
3503
3580
|
if (output.statusCode >= 300) {
|
|
3504
3581
|
return de_ListPullRequestsCommandError(output, context);
|
|
@@ -9,6 +9,7 @@ export const getRuntimeConfig = (config) => ({
|
|
|
9
9
|
base64Encoder: config?.base64Encoder ?? toBase64,
|
|
10
10
|
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
11
11
|
endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
|
|
12
|
+
extensions: config?.extensions ?? [],
|
|
12
13
|
logger: config?.logger ?? new NoOpLogger(),
|
|
13
14
|
serviceId: config?.serviceId ?? "CodeCommit",
|
|
14
15
|
urlParser: config?.urlParser ?? parseUrl,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { getDefaultClientConfiguration, resolveDefaultRuntimeConfig } from "@smithy/types";
|
|
2
|
+
const asPartial = (t) => t;
|
|
3
|
+
export const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
4
|
+
const clientConfiguration = {
|
|
5
|
+
...asPartial(getDefaultClientConfiguration(runtimeConfig)),
|
|
6
|
+
};
|
|
7
|
+
extensions.forEach((extension) => extension.configureClient(clientConfiguration));
|
|
8
|
+
return {
|
|
9
|
+
...runtimeConfig,
|
|
10
|
+
...resolveDefaultRuntimeConfig(clientConfiguration),
|
|
11
|
+
};
|
|
12
|
+
};
|