@aws-sdk/client-codecommit 3.525.0 → 3.529.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/index.js +71 -111
- package/dist-es/protocols/Aws_json1_1.js +1 -40
- package/package.json +4 -4
package/dist-cjs/index.js
CHANGED
|
@@ -478,6 +478,7 @@ var import_middleware_serde = require("@smithy/middleware-serde");
|
|
|
478
478
|
var import_types = require("@smithy/types");
|
|
479
479
|
|
|
480
480
|
// src/protocols/Aws_json1_1.ts
|
|
481
|
+
var import_core2 = require("@aws-sdk/core");
|
|
481
482
|
|
|
482
483
|
|
|
483
484
|
var import_uuid = require("uuid");
|
|
@@ -4271,7 +4272,7 @@ var de_BatchAssociateApprovalRuleTemplateWithRepositoriesCommand = /* @__PURE__
|
|
|
4271
4272
|
if (output.statusCode >= 300) {
|
|
4272
4273
|
return de_CommandError(output, context);
|
|
4273
4274
|
}
|
|
4274
|
-
const data = await
|
|
4275
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
4275
4276
|
let contents = {};
|
|
4276
4277
|
contents = (0, import_smithy_client._json)(data);
|
|
4277
4278
|
const response = {
|
|
@@ -4284,7 +4285,7 @@ var de_BatchDescribeMergeConflictsCommand = /* @__PURE__ */ __name(async (output
|
|
|
4284
4285
|
if (output.statusCode >= 300) {
|
|
4285
4286
|
return de_CommandError(output, context);
|
|
4286
4287
|
}
|
|
4287
|
-
const data = await
|
|
4288
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
4288
4289
|
let contents = {};
|
|
4289
4290
|
contents = (0, import_smithy_client._json)(data);
|
|
4290
4291
|
const response = {
|
|
@@ -4297,7 +4298,7 @@ var de_BatchDisassociateApprovalRuleTemplateFromRepositoriesCommand = /* @__PURE
|
|
|
4297
4298
|
if (output.statusCode >= 300) {
|
|
4298
4299
|
return de_CommandError(output, context);
|
|
4299
4300
|
}
|
|
4300
|
-
const data = await
|
|
4301
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
4301
4302
|
let contents = {};
|
|
4302
4303
|
contents = (0, import_smithy_client._json)(data);
|
|
4303
4304
|
const response = {
|
|
@@ -4310,7 +4311,7 @@ var de_BatchGetCommitsCommand = /* @__PURE__ */ __name(async (output, context) =
|
|
|
4310
4311
|
if (output.statusCode >= 300) {
|
|
4311
4312
|
return de_CommandError(output, context);
|
|
4312
4313
|
}
|
|
4313
|
-
const data = await
|
|
4314
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
4314
4315
|
let contents = {};
|
|
4315
4316
|
contents = (0, import_smithy_client._json)(data);
|
|
4316
4317
|
const response = {
|
|
@@ -4323,7 +4324,7 @@ var de_BatchGetRepositoriesCommand = /* @__PURE__ */ __name(async (output, conte
|
|
|
4323
4324
|
if (output.statusCode >= 300) {
|
|
4324
4325
|
return de_CommandError(output, context);
|
|
4325
4326
|
}
|
|
4326
|
-
const data = await
|
|
4327
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
4327
4328
|
let contents = {};
|
|
4328
4329
|
contents = de_BatchGetRepositoriesOutput(data, context);
|
|
4329
4330
|
const response = {
|
|
@@ -4336,7 +4337,7 @@ var de_CreateApprovalRuleTemplateCommand = /* @__PURE__ */ __name(async (output,
|
|
|
4336
4337
|
if (output.statusCode >= 300) {
|
|
4337
4338
|
return de_CommandError(output, context);
|
|
4338
4339
|
}
|
|
4339
|
-
const data = await
|
|
4340
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
4340
4341
|
let contents = {};
|
|
4341
4342
|
contents = de_CreateApprovalRuleTemplateOutput(data, context);
|
|
4342
4343
|
const response = {
|
|
@@ -4359,7 +4360,7 @@ var de_CreateCommitCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
4359
4360
|
if (output.statusCode >= 300) {
|
|
4360
4361
|
return de_CommandError(output, context);
|
|
4361
4362
|
}
|
|
4362
|
-
const data = await
|
|
4363
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
4363
4364
|
let contents = {};
|
|
4364
4365
|
contents = (0, import_smithy_client._json)(data);
|
|
4365
4366
|
const response = {
|
|
@@ -4372,7 +4373,7 @@ var de_CreatePullRequestCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
4372
4373
|
if (output.statusCode >= 300) {
|
|
4373
4374
|
return de_CommandError(output, context);
|
|
4374
4375
|
}
|
|
4375
|
-
const data = await
|
|
4376
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
4376
4377
|
let contents = {};
|
|
4377
4378
|
contents = de_CreatePullRequestOutput(data, context);
|
|
4378
4379
|
const response = {
|
|
@@ -4385,7 +4386,7 @@ var de_CreatePullRequestApprovalRuleCommand = /* @__PURE__ */ __name(async (outp
|
|
|
4385
4386
|
if (output.statusCode >= 300) {
|
|
4386
4387
|
return de_CommandError(output, context);
|
|
4387
4388
|
}
|
|
4388
|
-
const data = await
|
|
4389
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
4389
4390
|
let contents = {};
|
|
4390
4391
|
contents = de_CreatePullRequestApprovalRuleOutput(data, context);
|
|
4391
4392
|
const response = {
|
|
@@ -4398,7 +4399,7 @@ var de_CreateRepositoryCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
4398
4399
|
if (output.statusCode >= 300) {
|
|
4399
4400
|
return de_CommandError(output, context);
|
|
4400
4401
|
}
|
|
4401
|
-
const data = await
|
|
4402
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
4402
4403
|
let contents = {};
|
|
4403
4404
|
contents = de_CreateRepositoryOutput(data, context);
|
|
4404
4405
|
const response = {
|
|
@@ -4411,7 +4412,7 @@ var de_CreateUnreferencedMergeCommitCommand = /* @__PURE__ */ __name(async (outp
|
|
|
4411
4412
|
if (output.statusCode >= 300) {
|
|
4412
4413
|
return de_CommandError(output, context);
|
|
4413
4414
|
}
|
|
4414
|
-
const data = await
|
|
4415
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
4415
4416
|
let contents = {};
|
|
4416
4417
|
contents = (0, import_smithy_client._json)(data);
|
|
4417
4418
|
const response = {
|
|
@@ -4424,7 +4425,7 @@ var de_DeleteApprovalRuleTemplateCommand = /* @__PURE__ */ __name(async (output,
|
|
|
4424
4425
|
if (output.statusCode >= 300) {
|
|
4425
4426
|
return de_CommandError(output, context);
|
|
4426
4427
|
}
|
|
4427
|
-
const data = await
|
|
4428
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
4428
4429
|
let contents = {};
|
|
4429
4430
|
contents = (0, import_smithy_client._json)(data);
|
|
4430
4431
|
const response = {
|
|
@@ -4437,7 +4438,7 @@ var de_DeleteBranchCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
4437
4438
|
if (output.statusCode >= 300) {
|
|
4438
4439
|
return de_CommandError(output, context);
|
|
4439
4440
|
}
|
|
4440
|
-
const data = await
|
|
4441
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
4441
4442
|
let contents = {};
|
|
4442
4443
|
contents = (0, import_smithy_client._json)(data);
|
|
4443
4444
|
const response = {
|
|
@@ -4450,7 +4451,7 @@ var de_DeleteCommentContentCommand = /* @__PURE__ */ __name(async (output, conte
|
|
|
4450
4451
|
if (output.statusCode >= 300) {
|
|
4451
4452
|
return de_CommandError(output, context);
|
|
4452
4453
|
}
|
|
4453
|
-
const data = await
|
|
4454
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
4454
4455
|
let contents = {};
|
|
4455
4456
|
contents = de_DeleteCommentContentOutput(data, context);
|
|
4456
4457
|
const response = {
|
|
@@ -4463,7 +4464,7 @@ var de_DeleteFileCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
4463
4464
|
if (output.statusCode >= 300) {
|
|
4464
4465
|
return de_CommandError(output, context);
|
|
4465
4466
|
}
|
|
4466
|
-
const data = await
|
|
4467
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
4467
4468
|
let contents = {};
|
|
4468
4469
|
contents = (0, import_smithy_client._json)(data);
|
|
4469
4470
|
const response = {
|
|
@@ -4476,7 +4477,7 @@ var de_DeletePullRequestApprovalRuleCommand = /* @__PURE__ */ __name(async (outp
|
|
|
4476
4477
|
if (output.statusCode >= 300) {
|
|
4477
4478
|
return de_CommandError(output, context);
|
|
4478
4479
|
}
|
|
4479
|
-
const data = await
|
|
4480
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
4480
4481
|
let contents = {};
|
|
4481
4482
|
contents = (0, import_smithy_client._json)(data);
|
|
4482
4483
|
const response = {
|
|
@@ -4489,7 +4490,7 @@ var de_DeleteRepositoryCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
4489
4490
|
if (output.statusCode >= 300) {
|
|
4490
4491
|
return de_CommandError(output, context);
|
|
4491
4492
|
}
|
|
4492
|
-
const data = await
|
|
4493
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
4493
4494
|
let contents = {};
|
|
4494
4495
|
contents = (0, import_smithy_client._json)(data);
|
|
4495
4496
|
const response = {
|
|
@@ -4502,7 +4503,7 @@ var de_DescribeMergeConflictsCommand = /* @__PURE__ */ __name(async (output, con
|
|
|
4502
4503
|
if (output.statusCode >= 300) {
|
|
4503
4504
|
return de_CommandError(output, context);
|
|
4504
4505
|
}
|
|
4505
|
-
const data = await
|
|
4506
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
4506
4507
|
let contents = {};
|
|
4507
4508
|
contents = (0, import_smithy_client._json)(data);
|
|
4508
4509
|
const response = {
|
|
@@ -4515,7 +4516,7 @@ var de_DescribePullRequestEventsCommand = /* @__PURE__ */ __name(async (output,
|
|
|
4515
4516
|
if (output.statusCode >= 300) {
|
|
4516
4517
|
return de_CommandError(output, context);
|
|
4517
4518
|
}
|
|
4518
|
-
const data = await
|
|
4519
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
4519
4520
|
let contents = {};
|
|
4520
4521
|
contents = de_DescribePullRequestEventsOutput(data, context);
|
|
4521
4522
|
const response = {
|
|
@@ -4538,7 +4539,7 @@ var de_EvaluatePullRequestApprovalRulesCommand = /* @__PURE__ */ __name(async (o
|
|
|
4538
4539
|
if (output.statusCode >= 300) {
|
|
4539
4540
|
return de_CommandError(output, context);
|
|
4540
4541
|
}
|
|
4541
|
-
const data = await
|
|
4542
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
4542
4543
|
let contents = {};
|
|
4543
4544
|
contents = (0, import_smithy_client._json)(data);
|
|
4544
4545
|
const response = {
|
|
@@ -4551,7 +4552,7 @@ var de_GetApprovalRuleTemplateCommand = /* @__PURE__ */ __name(async (output, co
|
|
|
4551
4552
|
if (output.statusCode >= 300) {
|
|
4552
4553
|
return de_CommandError(output, context);
|
|
4553
4554
|
}
|
|
4554
|
-
const data = await
|
|
4555
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
4555
4556
|
let contents = {};
|
|
4556
4557
|
contents = de_GetApprovalRuleTemplateOutput(data, context);
|
|
4557
4558
|
const response = {
|
|
@@ -4564,7 +4565,7 @@ var de_GetBlobCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
4564
4565
|
if (output.statusCode >= 300) {
|
|
4565
4566
|
return de_CommandError(output, context);
|
|
4566
4567
|
}
|
|
4567
|
-
const data = await
|
|
4568
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
4568
4569
|
let contents = {};
|
|
4569
4570
|
contents = de_GetBlobOutput(data, context);
|
|
4570
4571
|
const response = {
|
|
@@ -4577,7 +4578,7 @@ var de_GetBranchCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
4577
4578
|
if (output.statusCode >= 300) {
|
|
4578
4579
|
return de_CommandError(output, context);
|
|
4579
4580
|
}
|
|
4580
|
-
const data = await
|
|
4581
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
4581
4582
|
let contents = {};
|
|
4582
4583
|
contents = (0, import_smithy_client._json)(data);
|
|
4583
4584
|
const response = {
|
|
@@ -4590,7 +4591,7 @@ var de_GetCommentCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
4590
4591
|
if (output.statusCode >= 300) {
|
|
4591
4592
|
return de_CommandError(output, context);
|
|
4592
4593
|
}
|
|
4593
|
-
const data = await
|
|
4594
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
4594
4595
|
let contents = {};
|
|
4595
4596
|
contents = de_GetCommentOutput(data, context);
|
|
4596
4597
|
const response = {
|
|
@@ -4603,7 +4604,7 @@ var de_GetCommentReactionsCommand = /* @__PURE__ */ __name(async (output, contex
|
|
|
4603
4604
|
if (output.statusCode >= 300) {
|
|
4604
4605
|
return de_CommandError(output, context);
|
|
4605
4606
|
}
|
|
4606
|
-
const data = await
|
|
4607
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
4607
4608
|
let contents = {};
|
|
4608
4609
|
contents = (0, import_smithy_client._json)(data);
|
|
4609
4610
|
const response = {
|
|
@@ -4616,7 +4617,7 @@ var de_GetCommentsForComparedCommitCommand = /* @__PURE__ */ __name(async (outpu
|
|
|
4616
4617
|
if (output.statusCode >= 300) {
|
|
4617
4618
|
return de_CommandError(output, context);
|
|
4618
4619
|
}
|
|
4619
|
-
const data = await
|
|
4620
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
4620
4621
|
let contents = {};
|
|
4621
4622
|
contents = de_GetCommentsForComparedCommitOutput(data, context);
|
|
4622
4623
|
const response = {
|
|
@@ -4629,7 +4630,7 @@ var de_GetCommentsForPullRequestCommand = /* @__PURE__ */ __name(async (output,
|
|
|
4629
4630
|
if (output.statusCode >= 300) {
|
|
4630
4631
|
return de_CommandError(output, context);
|
|
4631
4632
|
}
|
|
4632
|
-
const data = await
|
|
4633
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
4633
4634
|
let contents = {};
|
|
4634
4635
|
contents = de_GetCommentsForPullRequestOutput(data, context);
|
|
4635
4636
|
const response = {
|
|
@@ -4642,7 +4643,7 @@ var de_GetCommitCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
4642
4643
|
if (output.statusCode >= 300) {
|
|
4643
4644
|
return de_CommandError(output, context);
|
|
4644
4645
|
}
|
|
4645
|
-
const data = await
|
|
4646
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
4646
4647
|
let contents = {};
|
|
4647
4648
|
contents = (0, import_smithy_client._json)(data);
|
|
4648
4649
|
const response = {
|
|
@@ -4655,7 +4656,7 @@ var de_GetDifferencesCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
4655
4656
|
if (output.statusCode >= 300) {
|
|
4656
4657
|
return de_CommandError(output, context);
|
|
4657
4658
|
}
|
|
4658
|
-
const data = await
|
|
4659
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
4659
4660
|
let contents = {};
|
|
4660
4661
|
contents = (0, import_smithy_client._json)(data);
|
|
4661
4662
|
const response = {
|
|
@@ -4668,7 +4669,7 @@ var de_GetFileCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
4668
4669
|
if (output.statusCode >= 300) {
|
|
4669
4670
|
return de_CommandError(output, context);
|
|
4670
4671
|
}
|
|
4671
|
-
const data = await
|
|
4672
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
4672
4673
|
let contents = {};
|
|
4673
4674
|
contents = de_GetFileOutput(data, context);
|
|
4674
4675
|
const response = {
|
|
@@ -4681,7 +4682,7 @@ var de_GetFolderCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
4681
4682
|
if (output.statusCode >= 300) {
|
|
4682
4683
|
return de_CommandError(output, context);
|
|
4683
4684
|
}
|
|
4684
|
-
const data = await
|
|
4685
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
4685
4686
|
let contents = {};
|
|
4686
4687
|
contents = (0, import_smithy_client._json)(data);
|
|
4687
4688
|
const response = {
|
|
@@ -4694,7 +4695,7 @@ var de_GetMergeCommitCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
4694
4695
|
if (output.statusCode >= 300) {
|
|
4695
4696
|
return de_CommandError(output, context);
|
|
4696
4697
|
}
|
|
4697
|
-
const data = await
|
|
4698
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
4698
4699
|
let contents = {};
|
|
4699
4700
|
contents = (0, import_smithy_client._json)(data);
|
|
4700
4701
|
const response = {
|
|
@@ -4707,7 +4708,7 @@ var de_GetMergeConflictsCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
4707
4708
|
if (output.statusCode >= 300) {
|
|
4708
4709
|
return de_CommandError(output, context);
|
|
4709
4710
|
}
|
|
4710
|
-
const data = await
|
|
4711
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
4711
4712
|
let contents = {};
|
|
4712
4713
|
contents = (0, import_smithy_client._json)(data);
|
|
4713
4714
|
const response = {
|
|
@@ -4720,7 +4721,7 @@ var de_GetMergeOptionsCommand = /* @__PURE__ */ __name(async (output, context) =
|
|
|
4720
4721
|
if (output.statusCode >= 300) {
|
|
4721
4722
|
return de_CommandError(output, context);
|
|
4722
4723
|
}
|
|
4723
|
-
const data = await
|
|
4724
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
4724
4725
|
let contents = {};
|
|
4725
4726
|
contents = (0, import_smithy_client._json)(data);
|
|
4726
4727
|
const response = {
|
|
@@ -4733,7 +4734,7 @@ var de_GetPullRequestCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
4733
4734
|
if (output.statusCode >= 300) {
|
|
4734
4735
|
return de_CommandError(output, context);
|
|
4735
4736
|
}
|
|
4736
|
-
const data = await
|
|
4737
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
4737
4738
|
let contents = {};
|
|
4738
4739
|
contents = de_GetPullRequestOutput(data, context);
|
|
4739
4740
|
const response = {
|
|
@@ -4746,7 +4747,7 @@ var de_GetPullRequestApprovalStatesCommand = /* @__PURE__ */ __name(async (outpu
|
|
|
4746
4747
|
if (output.statusCode >= 300) {
|
|
4747
4748
|
return de_CommandError(output, context);
|
|
4748
4749
|
}
|
|
4749
|
-
const data = await
|
|
4750
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
4750
4751
|
let contents = {};
|
|
4751
4752
|
contents = (0, import_smithy_client._json)(data);
|
|
4752
4753
|
const response = {
|
|
@@ -4759,7 +4760,7 @@ var de_GetPullRequestOverrideStateCommand = /* @__PURE__ */ __name(async (output
|
|
|
4759
4760
|
if (output.statusCode >= 300) {
|
|
4760
4761
|
return de_CommandError(output, context);
|
|
4761
4762
|
}
|
|
4762
|
-
const data = await
|
|
4763
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
4763
4764
|
let contents = {};
|
|
4764
4765
|
contents = (0, import_smithy_client._json)(data);
|
|
4765
4766
|
const response = {
|
|
@@ -4772,7 +4773,7 @@ var de_GetRepositoryCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
4772
4773
|
if (output.statusCode >= 300) {
|
|
4773
4774
|
return de_CommandError(output, context);
|
|
4774
4775
|
}
|
|
4775
|
-
const data = await
|
|
4776
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
4776
4777
|
let contents = {};
|
|
4777
4778
|
contents = de_GetRepositoryOutput(data, context);
|
|
4778
4779
|
const response = {
|
|
@@ -4785,7 +4786,7 @@ var de_GetRepositoryTriggersCommand = /* @__PURE__ */ __name(async (output, cont
|
|
|
4785
4786
|
if (output.statusCode >= 300) {
|
|
4786
4787
|
return de_CommandError(output, context);
|
|
4787
4788
|
}
|
|
4788
|
-
const data = await
|
|
4789
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
4789
4790
|
let contents = {};
|
|
4790
4791
|
contents = (0, import_smithy_client._json)(data);
|
|
4791
4792
|
const response = {
|
|
@@ -4798,7 +4799,7 @@ var de_ListApprovalRuleTemplatesCommand = /* @__PURE__ */ __name(async (output,
|
|
|
4798
4799
|
if (output.statusCode >= 300) {
|
|
4799
4800
|
return de_CommandError(output, context);
|
|
4800
4801
|
}
|
|
4801
|
-
const data = await
|
|
4802
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
4802
4803
|
let contents = {};
|
|
4803
4804
|
contents = (0, import_smithy_client._json)(data);
|
|
4804
4805
|
const response = {
|
|
@@ -4811,7 +4812,7 @@ var de_ListAssociatedApprovalRuleTemplatesForRepositoryCommand = /* @__PURE__ */
|
|
|
4811
4812
|
if (output.statusCode >= 300) {
|
|
4812
4813
|
return de_CommandError(output, context);
|
|
4813
4814
|
}
|
|
4814
|
-
const data = await
|
|
4815
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
4815
4816
|
let contents = {};
|
|
4816
4817
|
contents = (0, import_smithy_client._json)(data);
|
|
4817
4818
|
const response = {
|
|
@@ -4824,7 +4825,7 @@ var de_ListBranchesCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
4824
4825
|
if (output.statusCode >= 300) {
|
|
4825
4826
|
return de_CommandError(output, context);
|
|
4826
4827
|
}
|
|
4827
|
-
const data = await
|
|
4828
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
4828
4829
|
let contents = {};
|
|
4829
4830
|
contents = (0, import_smithy_client._json)(data);
|
|
4830
4831
|
const response = {
|
|
@@ -4837,7 +4838,7 @@ var de_ListFileCommitHistoryCommand = /* @__PURE__ */ __name(async (output, cont
|
|
|
4837
4838
|
if (output.statusCode >= 300) {
|
|
4838
4839
|
return de_CommandError(output, context);
|
|
4839
4840
|
}
|
|
4840
|
-
const data = await
|
|
4841
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
4841
4842
|
let contents = {};
|
|
4842
4843
|
contents = (0, import_smithy_client._json)(data);
|
|
4843
4844
|
const response = {
|
|
@@ -4850,7 +4851,7 @@ var de_ListPullRequestsCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
4850
4851
|
if (output.statusCode >= 300) {
|
|
4851
4852
|
return de_CommandError(output, context);
|
|
4852
4853
|
}
|
|
4853
|
-
const data = await
|
|
4854
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
4854
4855
|
let contents = {};
|
|
4855
4856
|
contents = (0, import_smithy_client._json)(data);
|
|
4856
4857
|
const response = {
|
|
@@ -4863,7 +4864,7 @@ var de_ListRepositoriesCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
4863
4864
|
if (output.statusCode >= 300) {
|
|
4864
4865
|
return de_CommandError(output, context);
|
|
4865
4866
|
}
|
|
4866
|
-
const data = await
|
|
4867
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
4867
4868
|
let contents = {};
|
|
4868
4869
|
contents = (0, import_smithy_client._json)(data);
|
|
4869
4870
|
const response = {
|
|
@@ -4876,7 +4877,7 @@ var de_ListRepositoriesForApprovalRuleTemplateCommand = /* @__PURE__ */ __name(a
|
|
|
4876
4877
|
if (output.statusCode >= 300) {
|
|
4877
4878
|
return de_CommandError(output, context);
|
|
4878
4879
|
}
|
|
4879
|
-
const data = await
|
|
4880
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
4880
4881
|
let contents = {};
|
|
4881
4882
|
contents = (0, import_smithy_client._json)(data);
|
|
4882
4883
|
const response = {
|
|
@@ -4889,7 +4890,7 @@ var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, contex
|
|
|
4889
4890
|
if (output.statusCode >= 300) {
|
|
4890
4891
|
return de_CommandError(output, context);
|
|
4891
4892
|
}
|
|
4892
|
-
const data = await
|
|
4893
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
4893
4894
|
let contents = {};
|
|
4894
4895
|
contents = (0, import_smithy_client._json)(data);
|
|
4895
4896
|
const response = {
|
|
@@ -4902,7 +4903,7 @@ var de_MergeBranchesByFastForwardCommand = /* @__PURE__ */ __name(async (output,
|
|
|
4902
4903
|
if (output.statusCode >= 300) {
|
|
4903
4904
|
return de_CommandError(output, context);
|
|
4904
4905
|
}
|
|
4905
|
-
const data = await
|
|
4906
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
4906
4907
|
let contents = {};
|
|
4907
4908
|
contents = (0, import_smithy_client._json)(data);
|
|
4908
4909
|
const response = {
|
|
@@ -4915,7 +4916,7 @@ var de_MergeBranchesBySquashCommand = /* @__PURE__ */ __name(async (output, cont
|
|
|
4915
4916
|
if (output.statusCode >= 300) {
|
|
4916
4917
|
return de_CommandError(output, context);
|
|
4917
4918
|
}
|
|
4918
|
-
const data = await
|
|
4919
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
4919
4920
|
let contents = {};
|
|
4920
4921
|
contents = (0, import_smithy_client._json)(data);
|
|
4921
4922
|
const response = {
|
|
@@ -4928,7 +4929,7 @@ var de_MergeBranchesByThreeWayCommand = /* @__PURE__ */ __name(async (output, co
|
|
|
4928
4929
|
if (output.statusCode >= 300) {
|
|
4929
4930
|
return de_CommandError(output, context);
|
|
4930
4931
|
}
|
|
4931
|
-
const data = await
|
|
4932
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
4932
4933
|
let contents = {};
|
|
4933
4934
|
contents = (0, import_smithy_client._json)(data);
|
|
4934
4935
|
const response = {
|
|
@@ -4941,7 +4942,7 @@ var de_MergePullRequestByFastForwardCommand = /* @__PURE__ */ __name(async (outp
|
|
|
4941
4942
|
if (output.statusCode >= 300) {
|
|
4942
4943
|
return de_CommandError(output, context);
|
|
4943
4944
|
}
|
|
4944
|
-
const data = await
|
|
4945
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
4945
4946
|
let contents = {};
|
|
4946
4947
|
contents = de_MergePullRequestByFastForwardOutput(data, context);
|
|
4947
4948
|
const response = {
|
|
@@ -4954,7 +4955,7 @@ var de_MergePullRequestBySquashCommand = /* @__PURE__ */ __name(async (output, c
|
|
|
4954
4955
|
if (output.statusCode >= 300) {
|
|
4955
4956
|
return de_CommandError(output, context);
|
|
4956
4957
|
}
|
|
4957
|
-
const data = await
|
|
4958
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
4958
4959
|
let contents = {};
|
|
4959
4960
|
contents = de_MergePullRequestBySquashOutput(data, context);
|
|
4960
4961
|
const response = {
|
|
@@ -4967,7 +4968,7 @@ var de_MergePullRequestByThreeWayCommand = /* @__PURE__ */ __name(async (output,
|
|
|
4967
4968
|
if (output.statusCode >= 300) {
|
|
4968
4969
|
return de_CommandError(output, context);
|
|
4969
4970
|
}
|
|
4970
|
-
const data = await
|
|
4971
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
4971
4972
|
let contents = {};
|
|
4972
4973
|
contents = de_MergePullRequestByThreeWayOutput(data, context);
|
|
4973
4974
|
const response = {
|
|
@@ -4990,7 +4991,7 @@ var de_PostCommentForComparedCommitCommand = /* @__PURE__ */ __name(async (outpu
|
|
|
4990
4991
|
if (output.statusCode >= 300) {
|
|
4991
4992
|
return de_CommandError(output, context);
|
|
4992
4993
|
}
|
|
4993
|
-
const data = await
|
|
4994
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
4994
4995
|
let contents = {};
|
|
4995
4996
|
contents = de_PostCommentForComparedCommitOutput(data, context);
|
|
4996
4997
|
const response = {
|
|
@@ -5003,7 +5004,7 @@ var de_PostCommentForPullRequestCommand = /* @__PURE__ */ __name(async (output,
|
|
|
5003
5004
|
if (output.statusCode >= 300) {
|
|
5004
5005
|
return de_CommandError(output, context);
|
|
5005
5006
|
}
|
|
5006
|
-
const data = await
|
|
5007
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
5007
5008
|
let contents = {};
|
|
5008
5009
|
contents = de_PostCommentForPullRequestOutput(data, context);
|
|
5009
5010
|
const response = {
|
|
@@ -5016,7 +5017,7 @@ var de_PostCommentReplyCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
5016
5017
|
if (output.statusCode >= 300) {
|
|
5017
5018
|
return de_CommandError(output, context);
|
|
5018
5019
|
}
|
|
5019
|
-
const data = await
|
|
5020
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
5020
5021
|
let contents = {};
|
|
5021
5022
|
contents = de_PostCommentReplyOutput(data, context);
|
|
5022
5023
|
const response = {
|
|
@@ -5039,7 +5040,7 @@ var de_PutFileCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
5039
5040
|
if (output.statusCode >= 300) {
|
|
5040
5041
|
return de_CommandError(output, context);
|
|
5041
5042
|
}
|
|
5042
|
-
const data = await
|
|
5043
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
5043
5044
|
let contents = {};
|
|
5044
5045
|
contents = (0, import_smithy_client._json)(data);
|
|
5045
5046
|
const response = {
|
|
@@ -5052,7 +5053,7 @@ var de_PutRepositoryTriggersCommand = /* @__PURE__ */ __name(async (output, cont
|
|
|
5052
5053
|
if (output.statusCode >= 300) {
|
|
5053
5054
|
return de_CommandError(output, context);
|
|
5054
5055
|
}
|
|
5055
|
-
const data = await
|
|
5056
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
5056
5057
|
let contents = {};
|
|
5057
5058
|
contents = (0, import_smithy_client._json)(data);
|
|
5058
5059
|
const response = {
|
|
@@ -5075,7 +5076,7 @@ var de_TestRepositoryTriggersCommand = /* @__PURE__ */ __name(async (output, con
|
|
|
5075
5076
|
if (output.statusCode >= 300) {
|
|
5076
5077
|
return de_CommandError(output, context);
|
|
5077
5078
|
}
|
|
5078
|
-
const data = await
|
|
5079
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
5079
5080
|
let contents = {};
|
|
5080
5081
|
contents = (0, import_smithy_client._json)(data);
|
|
5081
5082
|
const response = {
|
|
@@ -5098,7 +5099,7 @@ var de_UpdateApprovalRuleTemplateContentCommand = /* @__PURE__ */ __name(async (
|
|
|
5098
5099
|
if (output.statusCode >= 300) {
|
|
5099
5100
|
return de_CommandError(output, context);
|
|
5100
5101
|
}
|
|
5101
|
-
const data = await
|
|
5102
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
5102
5103
|
let contents = {};
|
|
5103
5104
|
contents = de_UpdateApprovalRuleTemplateContentOutput(data, context);
|
|
5104
5105
|
const response = {
|
|
@@ -5111,7 +5112,7 @@ var de_UpdateApprovalRuleTemplateDescriptionCommand = /* @__PURE__ */ __name(asy
|
|
|
5111
5112
|
if (output.statusCode >= 300) {
|
|
5112
5113
|
return de_CommandError(output, context);
|
|
5113
5114
|
}
|
|
5114
|
-
const data = await
|
|
5115
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
5115
5116
|
let contents = {};
|
|
5116
5117
|
contents = de_UpdateApprovalRuleTemplateDescriptionOutput(data, context);
|
|
5117
5118
|
const response = {
|
|
@@ -5124,7 +5125,7 @@ var de_UpdateApprovalRuleTemplateNameCommand = /* @__PURE__ */ __name(async (out
|
|
|
5124
5125
|
if (output.statusCode >= 300) {
|
|
5125
5126
|
return de_CommandError(output, context);
|
|
5126
5127
|
}
|
|
5127
|
-
const data = await
|
|
5128
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
5128
5129
|
let contents = {};
|
|
5129
5130
|
contents = de_UpdateApprovalRuleTemplateNameOutput(data, context);
|
|
5130
5131
|
const response = {
|
|
@@ -5137,7 +5138,7 @@ var de_UpdateCommentCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
5137
5138
|
if (output.statusCode >= 300) {
|
|
5138
5139
|
return de_CommandError(output, context);
|
|
5139
5140
|
}
|
|
5140
|
-
const data = await
|
|
5141
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
5141
5142
|
let contents = {};
|
|
5142
5143
|
contents = de_UpdateCommentOutput(data, context);
|
|
5143
5144
|
const response = {
|
|
@@ -5160,7 +5161,7 @@ var de_UpdatePullRequestApprovalRuleContentCommand = /* @__PURE__ */ __name(asyn
|
|
|
5160
5161
|
if (output.statusCode >= 300) {
|
|
5161
5162
|
return de_CommandError(output, context);
|
|
5162
5163
|
}
|
|
5163
|
-
const data = await
|
|
5164
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
5164
5165
|
let contents = {};
|
|
5165
5166
|
contents = de_UpdatePullRequestApprovalRuleContentOutput(data, context);
|
|
5166
5167
|
const response = {
|
|
@@ -5183,7 +5184,7 @@ var de_UpdatePullRequestDescriptionCommand = /* @__PURE__ */ __name(async (outpu
|
|
|
5183
5184
|
if (output.statusCode >= 300) {
|
|
5184
5185
|
return de_CommandError(output, context);
|
|
5185
5186
|
}
|
|
5186
|
-
const data = await
|
|
5187
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
5187
5188
|
let contents = {};
|
|
5188
5189
|
contents = de_UpdatePullRequestDescriptionOutput(data, context);
|
|
5189
5190
|
const response = {
|
|
@@ -5196,7 +5197,7 @@ var de_UpdatePullRequestStatusCommand = /* @__PURE__ */ __name(async (output, co
|
|
|
5196
5197
|
if (output.statusCode >= 300) {
|
|
5197
5198
|
return de_CommandError(output, context);
|
|
5198
5199
|
}
|
|
5199
|
-
const data = await
|
|
5200
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
5200
5201
|
let contents = {};
|
|
5201
5202
|
contents = de_UpdatePullRequestStatusOutput(data, context);
|
|
5202
5203
|
const response = {
|
|
@@ -5209,7 +5210,7 @@ var de_UpdatePullRequestTitleCommand = /* @__PURE__ */ __name(async (output, con
|
|
|
5209
5210
|
if (output.statusCode >= 300) {
|
|
5210
5211
|
return de_CommandError(output, context);
|
|
5211
5212
|
}
|
|
5212
|
-
const data = await
|
|
5213
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
5213
5214
|
let contents = {};
|
|
5214
5215
|
contents = de_UpdatePullRequestTitleOutput(data, context);
|
|
5215
5216
|
const response = {
|
|
@@ -5232,7 +5233,7 @@ var de_UpdateRepositoryEncryptionKeyCommand = /* @__PURE__ */ __name(async (outp
|
|
|
5232
5233
|
if (output.statusCode >= 300) {
|
|
5233
5234
|
return de_CommandError(output, context);
|
|
5234
5235
|
}
|
|
5235
|
-
const data = await
|
|
5236
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
5236
5237
|
let contents = {};
|
|
5237
5238
|
contents = (0, import_smithy_client._json)(data);
|
|
5238
5239
|
const response = {
|
|
@@ -5254,9 +5255,9 @@ var de_UpdateRepositoryNameCommand = /* @__PURE__ */ __name(async (output, conte
|
|
|
5254
5255
|
var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
5255
5256
|
const parsedOutput = {
|
|
5256
5257
|
...output,
|
|
5257
|
-
body: await
|
|
5258
|
+
body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
|
|
5258
5259
|
};
|
|
5259
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
5260
|
+
const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
|
|
5260
5261
|
switch (errorCode) {
|
|
5261
5262
|
case "ApprovalRuleTemplateDoesNotExistException":
|
|
5262
5263
|
case "com.amazonaws.codecommit#ApprovalRuleTemplateDoesNotExistException":
|
|
@@ -8008,7 +8009,6 @@ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
|
|
|
8008
8009
|
extendedRequestId: output.headers["x-amz-id-2"],
|
|
8009
8010
|
cfId: output.headers["x-amz-cf-id"]
|
|
8010
8011
|
}), "deserializeMetadata");
|
|
8011
|
-
var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
|
|
8012
8012
|
var throwDefaultError = (0, import_smithy_client.withBaseException)(CodeCommitServiceException);
|
|
8013
8013
|
var buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => {
|
|
8014
8014
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
@@ -8035,46 +8035,6 @@ function sharedHeaders(operation) {
|
|
|
8035
8035
|
};
|
|
8036
8036
|
}
|
|
8037
8037
|
__name(sharedHeaders, "sharedHeaders");
|
|
8038
|
-
var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
8039
|
-
if (encoded.length) {
|
|
8040
|
-
return JSON.parse(encoded);
|
|
8041
|
-
}
|
|
8042
|
-
return {};
|
|
8043
|
-
}), "parseBody");
|
|
8044
|
-
var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
|
|
8045
|
-
const value = await parseBody(errorBody, context);
|
|
8046
|
-
value.message = value.message ?? value.Message;
|
|
8047
|
-
return value;
|
|
8048
|
-
}, "parseErrorBody");
|
|
8049
|
-
var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
|
|
8050
|
-
const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
|
|
8051
|
-
const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
|
|
8052
|
-
let cleanValue = rawValue;
|
|
8053
|
-
if (typeof cleanValue === "number") {
|
|
8054
|
-
cleanValue = cleanValue.toString();
|
|
8055
|
-
}
|
|
8056
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
8057
|
-
cleanValue = cleanValue.split(",")[0];
|
|
8058
|
-
}
|
|
8059
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
8060
|
-
cleanValue = cleanValue.split(":")[0];
|
|
8061
|
-
}
|
|
8062
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
8063
|
-
cleanValue = cleanValue.split("#")[1];
|
|
8064
|
-
}
|
|
8065
|
-
return cleanValue;
|
|
8066
|
-
}, "sanitizeErrorCode");
|
|
8067
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
8068
|
-
if (headerKey !== void 0) {
|
|
8069
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
8070
|
-
}
|
|
8071
|
-
if (data.code !== void 0) {
|
|
8072
|
-
return sanitizeErrorCode(data.code);
|
|
8073
|
-
}
|
|
8074
|
-
if (data["__type"] !== void 0) {
|
|
8075
|
-
return sanitizeErrorCode(data["__type"]);
|
|
8076
|
-
}
|
|
8077
|
-
}, "loadRestJsonErrorCode");
|
|
8078
8038
|
|
|
8079
8039
|
// src/commands/AssociateApprovalRuleTemplateWithRepositoryCommand.ts
|
|
8080
8040
|
var _AssociateApprovalRuleTemplateWithRepositoryCommand = class _AssociateApprovalRuleTemplateWithRepositoryCommand extends import_smithy_client.Command.classBuilder().ep({
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
|
|
1
2
|
import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
|
|
2
3
|
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
4
|
import { v4 as generateIdempotencyToken } from "uuid";
|
|
@@ -4271,43 +4272,3 @@ function sharedHeaders(operation) {
|
|
|
4271
4272
|
"x-amz-target": `CodeCommit_20150413.${operation}`,
|
|
4272
4273
|
};
|
|
4273
4274
|
}
|
|
4274
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
4275
|
-
if (encoded.length) {
|
|
4276
|
-
return JSON.parse(encoded);
|
|
4277
|
-
}
|
|
4278
|
-
return {};
|
|
4279
|
-
});
|
|
4280
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
4281
|
-
const value = await parseBody(errorBody, context);
|
|
4282
|
-
value.message = value.message ?? value.Message;
|
|
4283
|
-
return value;
|
|
4284
|
-
};
|
|
4285
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
4286
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
4287
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
4288
|
-
let cleanValue = rawValue;
|
|
4289
|
-
if (typeof cleanValue === "number") {
|
|
4290
|
-
cleanValue = cleanValue.toString();
|
|
4291
|
-
}
|
|
4292
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
4293
|
-
cleanValue = cleanValue.split(",")[0];
|
|
4294
|
-
}
|
|
4295
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
4296
|
-
cleanValue = cleanValue.split(":")[0];
|
|
4297
|
-
}
|
|
4298
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
4299
|
-
cleanValue = cleanValue.split("#")[1];
|
|
4300
|
-
}
|
|
4301
|
-
return cleanValue;
|
|
4302
|
-
};
|
|
4303
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
4304
|
-
if (headerKey !== undefined) {
|
|
4305
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
4306
|
-
}
|
|
4307
|
-
if (data.code !== undefined) {
|
|
4308
|
-
return sanitizeErrorCode(data.code);
|
|
4309
|
-
}
|
|
4310
|
-
if (data["__type"] !== undefined) {
|
|
4311
|
-
return sanitizeErrorCode(data["__type"]);
|
|
4312
|
-
}
|
|
4313
|
-
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-codecommit",
|
|
3
3
|
"description": "AWS SDK for JavaScript Codecommit Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.529.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "node ../../scripts/compilation/inline client-codecommit",
|
|
@@ -20,9 +20,9 @@
|
|
|
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.
|
|
23
|
+
"@aws-sdk/client-sts": "3.529.0",
|
|
24
|
+
"@aws-sdk/core": "3.529.0",
|
|
25
|
+
"@aws-sdk/credential-provider-node": "3.529.0",
|
|
26
26
|
"@aws-sdk/middleware-host-header": "3.523.0",
|
|
27
27
|
"@aws-sdk/middleware-logger": "3.523.0",
|
|
28
28
|
"@aws-sdk/middleware-recursion-detection": "3.523.0",
|