@cloudant/couchbackup 2.9.9-SNAPSHOT.99 → 2.9.9
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/.scannerwork/report-task.txt +2 -2
- package/.scannerwork/scanner-report/analysis-warnings.pb +2 -2
- package/.scannerwork/scanner-report/analysis.log +1 -1
- package/.scannerwork/scanner-report/changesets-36.pb +1 -0
- package/.scannerwork/scanner-report/changesets-45.pb +1 -0
- package/.scannerwork/scanner-report/changesets-47.pb +1 -0
- package/.scannerwork/scanner-report/changesets-49.pb +1 -0
- package/.scannerwork/scanner-report/changesets-64.pb +1 -0
- package/.scannerwork/scanner-report/changesets-66.pb +1 -0
- package/.scannerwork/scanner-report/changesets-68.pb +1 -0
- package/.scannerwork/scanner-report/component-1.pb +1 -1
- package/.scannerwork/scanner-report/component-19.pb +1 -1
- package/.scannerwork/scanner-report/component-2.pb +1 -1
- package/.scannerwork/scanner-report/component-20.pb +1 -1
- package/.scannerwork/scanner-report/component-21.pb +1 -1
- package/.scannerwork/scanner-report/component-22.pb +1 -1
- package/.scannerwork/scanner-report/component-23.pb +1 -1
- package/.scannerwork/scanner-report/component-24.pb +1 -1
- package/.scannerwork/scanner-report/component-25.pb +1 -1
- package/.scannerwork/scanner-report/component-26.pb +1 -1
- package/.scannerwork/scanner-report/component-27.pb +1 -1
- package/.scannerwork/scanner-report/component-28.pb +1 -1
- package/.scannerwork/scanner-report/component-29.pb +1 -1
- package/.scannerwork/scanner-report/component-3.pb +1 -1
- package/.scannerwork/scanner-report/component-30.pb +1 -1
- package/.scannerwork/scanner-report/component-31.pb +1 -1
- package/.scannerwork/scanner-report/component-32.pb +1 -1
- package/.scannerwork/scanner-report/component-33.pb +1 -1
- package/.scannerwork/scanner-report/component-34.pb +1 -1
- package/.scannerwork/scanner-report/component-35.pb +1 -1
- package/.scannerwork/scanner-report/component-36.pb +1 -0
- package/.scannerwork/scanner-report/component-37.pb +1 -1
- package/.scannerwork/scanner-report/component-38.pb +1 -1
- package/.scannerwork/scanner-report/component-39.pb +1 -1
- package/.scannerwork/scanner-report/component-4.pb +1 -1
- package/.scannerwork/scanner-report/component-40.pb +1 -1
- package/.scannerwork/scanner-report/component-45.pb +1 -0
- package/.scannerwork/scanner-report/component-47.pb +1 -1
- package/.scannerwork/scanner-report/component-49.pb +1 -0
- package/.scannerwork/scanner-report/component-50.pb +1 -1
- package/.scannerwork/scanner-report/component-52.pb +1 -1
- package/.scannerwork/scanner-report/component-56.pb +1 -1
- package/.scannerwork/scanner-report/component-57.pb +1 -1
- package/.scannerwork/scanner-report/component-58.pb +1 -1
- package/.scannerwork/scanner-report/component-59.pb +1 -1
- package/.scannerwork/scanner-report/component-60.pb +1 -1
- package/.scannerwork/scanner-report/component-61.pb +1 -1
- package/.scannerwork/scanner-report/component-62.pb +1 -1
- package/.scannerwork/scanner-report/component-63.pb +1 -1
- package/.scannerwork/scanner-report/component-64.pb +1 -1
- package/.scannerwork/scanner-report/component-65.pb +1 -1
- package/.scannerwork/scanner-report/component-66.pb +1 -0
- package/.scannerwork/scanner-report/component-67.pb +1 -1
- package/.scannerwork/scanner-report/component-68.pb +1 -0
- package/.scannerwork/scanner-report/component-69.pb +1 -0
- package/.scannerwork/scanner-report/coverages-19.pb +0 -0
- package/.scannerwork/scanner-report/coverages-2.pb +0 -0
- package/.scannerwork/scanner-report/coverages-20.pb +0 -0
- package/.scannerwork/scanner-report/coverages-21.pb +0 -0
- package/.scannerwork/scanner-report/coverages-22.pb +0 -0
- package/.scannerwork/scanner-report/coverages-23.pb +0 -0
- package/.scannerwork/scanner-report/coverages-24.pb +0 -0
- package/.scannerwork/scanner-report/coverages-25.pb +0 -0
- package/.scannerwork/scanner-report/coverages-26.pb +0 -0
- package/.scannerwork/scanner-report/coverages-27.pb +0 -0
- package/.scannerwork/scanner-report/coverages-28.pb +0 -0
- package/.scannerwork/scanner-report/coverages-29.pb +0 -0
- package/.scannerwork/scanner-report/coverages-3.pb +0 -0
- package/.scannerwork/scanner-report/coverages-30.pb +0 -0
- package/.scannerwork/scanner-report/coverages-31.pb +0 -0
- package/.scannerwork/scanner-report/coverages-32.pb +0 -0
- package/.scannerwork/scanner-report/coverages-33.pb +0 -0
- package/.scannerwork/scanner-report/coverages-34.pb +0 -0
- package/.scannerwork/scanner-report/coverages-35.pb +0 -0
- package/.scannerwork/scanner-report/coverages-36.pb +0 -0
- package/.scannerwork/scanner-report/coverages-37.pb +0 -0
- package/.scannerwork/scanner-report/coverages-38.pb +0 -0
- package/.scannerwork/scanner-report/coverages-39.pb +0 -0
- package/.scannerwork/scanner-report/coverages-45.pb +0 -0
- package/.scannerwork/scanner-report/coverages-47.pb +0 -0
- package/.scannerwork/scanner-report/coverages-49.pb +0 -0
- package/.scannerwork/scanner-report/coverages-52.pb +0 -0
- package/.scannerwork/scanner-report/coverages-56.pb +0 -0
- package/.scannerwork/scanner-report/coverages-57.pb +0 -0
- package/.scannerwork/scanner-report/coverages-58.pb +0 -0
- package/.scannerwork/scanner-report/coverages-59.pb +0 -0
- package/.scannerwork/scanner-report/coverages-60.pb +0 -0
- package/.scannerwork/scanner-report/coverages-61.pb +0 -0
- package/.scannerwork/scanner-report/coverages-62.pb +0 -0
- package/.scannerwork/scanner-report/coverages-63.pb +0 -0
- package/.scannerwork/scanner-report/coverages-64.pb +0 -0
- package/.scannerwork/scanner-report/coverages-65.pb +0 -0
- package/.scannerwork/scanner-report/coverages-66.pb +0 -0
- package/.scannerwork/scanner-report/coverages-67.pb +0 -0
- package/.scannerwork/scanner-report/duplications-20.pb +0 -2
- package/.scannerwork/scanner-report/duplications-22.pb +3 -0
- package/.scannerwork/scanner-report/duplications-28.pb +3 -0
- package/.scannerwork/scanner-report/duplications-29.pb +2 -0
- package/.scannerwork/scanner-report/duplications-3.pb +0 -2
- package/.scannerwork/scanner-report/duplications-30.pb +2 -0
- package/.scannerwork/scanner-report/duplications-31.pb +0 -2
- package/.scannerwork/scanner-report/duplications-33.pb +0 -3
- package/.scannerwork/scanner-report/duplications-34.pb +3 -0
- package/.scannerwork/scanner-report/duplications-37.pb +2 -0
- package/.scannerwork/scanner-report/duplications-47.pb +2 -0
- package/.scannerwork/scanner-report/duplications-49.pb +2 -0
- package/.scannerwork/scanner-report/duplications-56.pb +2 -0
- package/.scannerwork/scanner-report/duplications-63.pb +2 -0
- package/.scannerwork/scanner-report/duplications-65.pb +0 -2
- package/.scannerwork/scanner-report/duplications-66.pb +0 -0
- package/.scannerwork/scanner-report/duplications-67.pb +0 -2
- package/.scannerwork/scanner-report/duplications-68.pb +0 -0
- package/.scannerwork/scanner-report/issues-28.pb +4 -0
- package/.scannerwork/scanner-report/issues-33.pb +2 -3
- package/.scannerwork/scanner-report/measures-19.pb +0 -0
- package/.scannerwork/scanner-report/measures-2.pb +0 -0
- package/.scannerwork/scanner-report/measures-20.pb +0 -0
- package/.scannerwork/scanner-report/measures-21.pb +0 -0
- package/.scannerwork/scanner-report/measures-22.pb +0 -0
- package/.scannerwork/scanner-report/measures-23.pb +0 -0
- package/.scannerwork/scanner-report/measures-24.pb +0 -0
- package/.scannerwork/scanner-report/measures-25.pb +0 -0
- package/.scannerwork/scanner-report/measures-26.pb +0 -0
- package/.scannerwork/scanner-report/measures-27.pb +0 -0
- package/.scannerwork/scanner-report/measures-28.pb +0 -0
- package/.scannerwork/scanner-report/measures-29.pb +0 -0
- package/.scannerwork/scanner-report/measures-3.pb +0 -0
- package/.scannerwork/scanner-report/measures-30.pb +0 -0
- package/.scannerwork/scanner-report/measures-31.pb +0 -0
- package/.scannerwork/scanner-report/measures-32.pb +0 -0
- package/.scannerwork/scanner-report/measures-33.pb +0 -0
- package/.scannerwork/scanner-report/measures-34.pb +0 -0
- package/.scannerwork/scanner-report/measures-35.pb +0 -0
- package/.scannerwork/scanner-report/measures-36.pb +0 -0
- package/.scannerwork/scanner-report/measures-37.pb +0 -0
- package/.scannerwork/scanner-report/measures-38.pb +0 -0
- package/.scannerwork/scanner-report/measures-39.pb +0 -0
- package/.scannerwork/scanner-report/measures-4.pb +0 -0
- package/.scannerwork/scanner-report/measures-40.pb +0 -0
- package/.scannerwork/scanner-report/measures-45.pb +0 -0
- package/.scannerwork/scanner-report/measures-47.pb +0 -0
- package/.scannerwork/scanner-report/measures-49.pb +0 -0
- package/.scannerwork/scanner-report/measures-50.pb +0 -0
- package/.scannerwork/scanner-report/measures-52.pb +0 -0
- package/.scannerwork/scanner-report/measures-56.pb +0 -0
- package/.scannerwork/scanner-report/measures-57.pb +0 -0
- package/.scannerwork/scanner-report/measures-58.pb +0 -0
- package/.scannerwork/scanner-report/measures-59.pb +0 -0
- package/.scannerwork/scanner-report/measures-60.pb +0 -0
- package/.scannerwork/scanner-report/measures-61.pb +0 -0
- package/.scannerwork/scanner-report/measures-62.pb +0 -0
- package/.scannerwork/scanner-report/measures-63.pb +0 -0
- package/.scannerwork/scanner-report/measures-64.pb +0 -0
- package/.scannerwork/scanner-report/measures-65.pb +0 -0
- package/.scannerwork/scanner-report/measures-66.pb +0 -0
- package/.scannerwork/scanner-report/measures-67.pb +0 -0
- package/.scannerwork/scanner-report/measures-68.pb +0 -0
- package/.scannerwork/scanner-report/metadata.pb +0 -0
- package/.scannerwork/scanner-report/source-19.txt +84 -18
- package/.scannerwork/scanner-report/source-2.txt +39 -401
- package/.scannerwork/scanner-report/source-20.txt +15 -274
- package/.scannerwork/scanner-report/source-21.txt +348 -18
- package/.scannerwork/scanner-report/source-22.txt +91 -35
- package/.scannerwork/scanner-report/source-23.txt +43 -346
- package/.scannerwork/scanner-report/source-24.txt +73 -16
- package/.scannerwork/scanner-report/source-25.txt +125 -51
- package/.scannerwork/scanner-report/source-26.txt +136 -9
- package/.scannerwork/scanner-report/source-27.txt +598 -41
- package/.scannerwork/scanner-report/source-28.txt +187 -99
- package/.scannerwork/scanner-report/source-29.txt +203 -25
- package/.scannerwork/scanner-report/source-3.txt +52 -200
- package/.scannerwork/scanner-report/source-30.txt +254 -108
- package/.scannerwork/scanner-report/source-31.txt +17 -127
- package/.scannerwork/scanner-report/source-32.txt +6 -96
- package/.scannerwork/scanner-report/source-33.txt +27 -224
- package/.scannerwork/scanner-report/source-34.txt +114 -125
- package/.scannerwork/scanner-report/source-35.txt +37 -61
- package/.scannerwork/scanner-report/source-36.txt +36 -0
- package/.scannerwork/scanner-report/source-37.txt +120 -52
- package/.scannerwork/scanner-report/source-38.txt +48 -36
- package/.scannerwork/scanner-report/source-39.txt +125 -92
- package/.scannerwork/scanner-report/source-4.txt +509 -625
- package/.scannerwork/scanner-report/source-40.txt +393 -51
- package/.scannerwork/scanner-report/source-45.txt +418 -0
- package/.scannerwork/scanner-report/source-47.txt +175 -509
- package/.scannerwork/scanner-report/source-49.txt +190 -0
- package/.scannerwork/scanner-report/source-50.txt +167 -281
- package/.scannerwork/scanner-report/source-52.txt +94 -21
- package/.scannerwork/scanner-report/source-56.txt +73 -35
- package/.scannerwork/scanner-report/source-57.txt +111 -93
- package/.scannerwork/scanner-report/source-58.txt +88 -74
- package/.scannerwork/scanner-report/source-59.txt +94 -14
- package/.scannerwork/scanner-report/source-60.txt +147 -133
- package/.scannerwork/scanner-report/source-61.txt +83 -59
- package/.scannerwork/scanner-report/source-62.txt +33 -157
- package/.scannerwork/scanner-report/source-63.txt +56 -99
- package/.scannerwork/scanner-report/source-64.txt +41 -509
- package/.scannerwork/scanner-report/source-65.txt +65 -160
- package/.scannerwork/scanner-report/source-66.txt +31 -0
- package/.scannerwork/scanner-report/source-67.txt +144 -170
- package/.scannerwork/scanner-report/source-68.txt +281 -0
- package/{test-19-results.xml → .scannerwork/scanner-report/source-69.txt} +139 -139
- package/.scannerwork/scanner-report/symbols-19.pb +68 -9
- package/.scannerwork/scanner-report/symbols-2.pb +19 -610
- package/.scannerwork/scanner-report/symbols-20.pb +9 -485
- package/.scannerwork/scanner-report/symbols-21.pb +494 -11
- package/.scannerwork/scanner-report/symbols-22.pb +76 -42
- package/.scannerwork/scanner-report/symbols-23.pb +43 -494
- package/.scannerwork/scanner-report/symbols-24.pb +60 -17
- package/.scannerwork/scanner-report/symbols-25.pb +116 -36
- package/.scannerwork/scanner-report/symbols-26.pb +112 -9
- package/.scannerwork/scanner-report/symbols-27.pb +1253 -44
- package/.scannerwork/scanner-report/symbols-28.pb +385 -103
- package/.scannerwork/scanner-report/symbols-29.pb +417 -26
- package/.scannerwork/scanner-report/symbols-3.pb +29 -417
- package/.scannerwork/scanner-report/symbols-30.pb +486 -85
- package/.scannerwork/scanner-report/symbols-31.pb +17 -102
- package/.scannerwork/scanner-report/symbols-32.pb +9 -77
- package/.scannerwork/scanner-report/symbols-33.pb +26 -393
- package/.scannerwork/scanner-report/symbols-34.pb +97 -116
- package/.scannerwork/scanner-report/symbols-35.pb +36 -60
- package/.scannerwork/scanner-report/symbols-36.pb +11 -0
- package/.scannerwork/scanner-report/symbols-37.pb +102 -30
- package/.scannerwork/scanner-report/symbols-38.pb +44 -18
- package/.scannerwork/scanner-report/symbols-39.pb +85 -28
- package/.scannerwork/scanner-report/symbols-45.pb +610 -0
- package/.scannerwork/scanner-report/symbols-47.pb +153 -0
- package/.scannerwork/scanner-report/symbols-49.pb +180 -0
- package/.scannerwork/scanner-report/symbols-52.pb +28 -18
- package/.scannerwork/scanner-report/symbols-56.pb +42 -13
- package/.scannerwork/scanner-report/symbols-57.pb +33 -59
- package/.scannerwork/scanner-report/symbols-58.pb +30 -42
- package/.scannerwork/scanner-report/symbols-59.pb +58 -13
- package/.scannerwork/scanner-report/symbols-60.pb +129 -111
- package/.scannerwork/scanner-report/symbols-61.pb +41 -45
- package/.scannerwork/scanner-report/symbols-62.pb +14 -143
- package/.scannerwork/scanner-report/symbols-63.pb +42 -30
- package/.scannerwork/scanner-report/symbols-64.pb +18 -0
- package/.scannerwork/scanner-report/symbols-65.pb +45 -152
- package/.scannerwork/scanner-report/symbols-66.pb +14 -0
- package/.scannerwork/scanner-report/symbols-67.pb +126 -180
- package/.scannerwork/scanner-report/syntax-highlightings-19.pb +70 -15
- package/.scannerwork/scanner-report/syntax-highlightings-2.pb +58 -624
- package/.scannerwork/scanner-report/syntax-highlightings-20.pb +14 -623
- package/.scannerwork/scanner-report/syntax-highlightings-21.pb +596 -25
- package/.scannerwork/scanner-report/syntax-highlightings-22.pb +119 -43
- package/.scannerwork/scanner-report/syntax-highlightings-23.pb +46 -594
- package/.scannerwork/scanner-report/syntax-highlightings-24.pb +74 -27
- package/.scannerwork/scanner-report/syntax-highlightings-25.pb +98 -59
- package/.scannerwork/scanner-report/syntax-highlightings-26.pb +189 -14
- package/.scannerwork/scanner-report/syntax-highlightings-27.pb +843 -66
- package/.scannerwork/scanner-report/syntax-highlightings-28.pb +269 -163
- package/.scannerwork/scanner-report/syntax-highlightings-29.pb +291 -28
- package/.scannerwork/scanner-report/syntax-highlightings-3.pb +76 -304
- package/.scannerwork/scanner-report/syntax-highlightings-30.pb +610 -142
- package/.scannerwork/scanner-report/syntax-highlightings-31.pb +27 -191
- package/.scannerwork/scanner-report/syntax-highlightings-32.pb +13 -123
- package/.scannerwork/scanner-report/syntax-highlightings-33.pb +29 -290
- package/.scannerwork/scanner-report/syntax-highlightings-34.pb +147 -99
- package/.scannerwork/scanner-report/syntax-highlightings-35.pb +55 -70
- package/.scannerwork/scanner-report/syntax-highlightings-36.pb +59 -0
- package/.scannerwork/scanner-report/syntax-highlightings-37.pb +200 -76
- package/.scannerwork/scanner-report/syntax-highlightings-38.pb +85 -57
- package/.scannerwork/scanner-report/syntax-highlightings-39.pb +156 -103
- package/.scannerwork/scanner-report/syntax-highlightings-4.pb +3396 -536
- package/.scannerwork/scanner-report/syntax-highlightings-40.pb +3526 -727
- package/.scannerwork/scanner-report/syntax-highlightings-45.pb +648 -0
- package/.scannerwork/scanner-report/syntax-highlightings-47.pb +199 -3733
- package/.scannerwork/scanner-report/syntax-highlightings-49.pb +225 -0
- package/.scannerwork/scanner-report/syntax-highlightings-50.pb +863 -199
- package/.scannerwork/scanner-report/syntax-highlightings-52.pb +108 -20
- package/.scannerwork/scanner-report/syntax-highlightings-56.pb +57 -21
- package/.scannerwork/scanner-report/syntax-highlightings-57.pb +85 -89
- package/.scannerwork/scanner-report/syntax-highlightings-58.pb +77 -80
- package/.scannerwork/scanner-report/syntax-highlightings-59.pb +103 -15
- package/.scannerwork/scanner-report/syntax-highlightings-60.pb +166 -136
- package/.scannerwork/scanner-report/syntax-highlightings-61.pb +81 -60
- package/.scannerwork/scanner-report/syntax-highlightings-62.pb +17 -206
- package/.scannerwork/scanner-report/syntax-highlightings-63.pb +44 -79
- package/.scannerwork/scanner-report/syntax-highlightings-64.pb +39 -3736
- package/.scannerwork/scanner-report/syntax-highlightings-65.pb +64 -183
- package/.scannerwork/scanner-report/syntax-highlightings-66.pb +45 -0
- package/.scannerwork/scanner-report/syntax-highlightings-67.pb +154 -166
- package/.scannerwork/scanner-report/syntax-highlightings-68.pb +285 -0
- package/.scannerwork/scanner-report/{syntax-highlightings-43.pb → syntax-highlightings-69.pb} +98 -99
- package/CHANGES.md +4 -0
- package/README.md +1 -1
- package/package.json +4 -4
- package/test-16-results.xml +152 -152
- package/test-18-results.xml +156 -156
- package/{.scannerwork/scanner-report/source-43.txt → test-20-results.xml} +144 -144
- package/test-iam-18-results.xml +50 -50
- package/.scannerwork/scanner-report/changesets-4.pb +0 -1
- package/.scannerwork/scanner-report/changesets-5.pb +0 -1
- package/.scannerwork/scanner-report/changesets-50.pb +0 -1
- package/.scannerwork/scanner-report/changesets-51.pb +0 -1
- package/.scannerwork/scanner-report/changesets-53.pb +0 -1
- package/.scannerwork/scanner-report/changesets-54.pb +0 -1
- package/.scannerwork/scanner-report/changesets-6.pb +0 -1
- package/.scannerwork/scanner-report/component-42.pb +0 -1
- package/.scannerwork/scanner-report/component-43.pb +0 -1
- package/.scannerwork/scanner-report/component-5.pb +0 -1
- package/.scannerwork/scanner-report/component-51.pb +0 -1
- package/.scannerwork/scanner-report/component-53.pb +0 -1
- package/.scannerwork/scanner-report/component-54.pb +0 -1
- package/.scannerwork/scanner-report/component-6.pb +0 -1
- package/.scannerwork/scanner-report/coverages-4.pb +0 -0
- package/.scannerwork/scanner-report/coverages-5.pb +0 -0
- package/.scannerwork/scanner-report/coverages-51.pb +0 -0
- package/.scannerwork/scanner-report/coverages-53.pb +0 -0
- package/.scannerwork/scanner-report/coverages-54.pb +0 -0
- package/.scannerwork/scanner-report/coverages-6.pb +0 -0
- package/.scannerwork/scanner-report/duplications-32.pb +0 -3
- package/.scannerwork/scanner-report/duplications-5.pb +0 -3
- package/.scannerwork/scanner-report/duplications-51.pb +0 -2
- package/.scannerwork/scanner-report/duplications-54.pb +0 -2
- package/.scannerwork/scanner-report/issues-29.pb +0 -3
- package/.scannerwork/scanner-report/measures-43.pb +0 -0
- package/.scannerwork/scanner-report/measures-5.pb +0 -0
- package/.scannerwork/scanner-report/measures-51.pb +0 -0
- package/.scannerwork/scanner-report/measures-53.pb +0 -0
- package/.scannerwork/scanner-report/measures-54.pb +0 -0
- package/.scannerwork/scanner-report/measures-6.pb +0 -0
- package/.scannerwork/scanner-report/source-42.txt +0 -509
- package/.scannerwork/scanner-report/source-5.txt +0 -131
- package/.scannerwork/scanner-report/source-51.txt +0 -92
- package/.scannerwork/scanner-report/source-53.txt +0 -129
- package/.scannerwork/scanner-report/source-54.txt +0 -75
- package/.scannerwork/scanner-report/source-6.txt +0 -100
- package/.scannerwork/scanner-report/symbols-4.pb +0 -1254
- package/.scannerwork/scanner-report/symbols-5.pb +0 -97
- package/.scannerwork/scanner-report/symbols-51.pb +0 -44
- package/.scannerwork/scanner-report/symbols-53.pb +0 -33
- package/.scannerwork/scanner-report/symbols-54.pb +0 -42
- package/.scannerwork/scanner-report/symbols-6.pb +0 -69
- package/.scannerwork/scanner-report/syntax-highlightings-42.pb +0 -3748
- package/.scannerwork/scanner-report/syntax-highlightings-5.pb +0 -182
- package/.scannerwork/scanner-report/syntax-highlightings-51.pb +0 -90
- package/.scannerwork/scanner-report/syntax-highlightings-53.pb +0 -129
- package/.scannerwork/scanner-report/syntax-highlightings-54.pb +0 -78
- package/.scannerwork/scanner-report/syntax-highlightings-6.pb +0 -105
- package/test-14-results.xml +0 -509
- /package/.scannerwork/scanner-report/{coverages-50.pb → coverages-68.pb} +0 -0
- /package/.scannerwork/scanner-report/{duplications-4.pb → duplications-26.pb} +0 -0
- /package/.scannerwork/scanner-report/{duplications-50.pb → duplications-36.pb} +0 -0
- /package/.scannerwork/scanner-report/{duplications-53.pb → duplications-45.pb} +0 -0
- /package/.scannerwork/scanner-report/{duplications-6.pb → duplications-64.pb} +0 -0
- /package/.scannerwork/scanner-report/{issues-23.pb → issues-21.pb} +0 -0
- /package/.scannerwork/scanner-report/{issues-34.pb → issues-25.pb} +0 -0
- /package/.scannerwork/scanner-report/{measures-42.pb → measures-69.pb} +0 -0
- /package/.scannerwork/scanner-report/{symbols-50.pb → symbols-68.pb} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright © 2017,
|
|
1
|
+
// Copyright © 2017, 2022 IBM Corp. All rights reserved.
|
|
2
2
|
//
|
|
3
3
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
4
|
// you may not use this file except in compliance with the License.
|
|
@@ -13,19 +13,99 @@
|
|
|
13
13
|
// limitations under the License.
|
|
14
14
|
'use strict';
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
const fs = require('fs');
|
|
17
|
+
const liner = require('./liner.js');
|
|
18
|
+
const change = require('./change.js');
|
|
19
|
+
const error = require('./error.js');
|
|
20
|
+
const debug = require('debug')('couchbackup:spoolchanges');
|
|
19
21
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
22
|
+
/**
|
|
23
|
+
* Write log file for all changes from a database, ready for downloading
|
|
24
|
+
* in batches.
|
|
25
|
+
*
|
|
26
|
+
* @param {string} dbUrl - URL of database
|
|
27
|
+
* @param {string} log - path to log file to use
|
|
28
|
+
* @param {number} bufferSize - the number of changes per batch/log line
|
|
29
|
+
* @param {function(err)} callback - a callback to run on completion
|
|
30
|
+
*/
|
|
31
|
+
module.exports = function(db, log, bufferSize, ee, callback) {
|
|
32
|
+
// list of document ids to process
|
|
33
|
+
const buffer = [];
|
|
34
|
+
let batch = 0;
|
|
35
|
+
let lastSeq = null;
|
|
36
|
+
const logStream = fs.createWriteStream(log);
|
|
37
|
+
let pending = 0;
|
|
38
|
+
// The number of changes to fetch per request
|
|
39
|
+
const limit = 100000;
|
|
29
40
|
|
|
30
|
-
|
|
41
|
+
// send documents ids to the queue in batches of bufferSize + the last batch
|
|
42
|
+
const processBuffer = function(lastOne) {
|
|
43
|
+
if (buffer.length >= bufferSize || (lastOne && buffer.length > 0)) {
|
|
44
|
+
debug('writing', buffer.length, 'changes to the backup file');
|
|
45
|
+
const b = { docs: buffer.splice(0, bufferSize), batch: batch };
|
|
46
|
+
logStream.write(':t batch' + batch + ' ' + JSON.stringify(b.docs) + '\n');
|
|
47
|
+
ee.emit('changes', batch);
|
|
48
|
+
batch++;
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
// called once per received change
|
|
53
|
+
const onChange = function(c) {
|
|
54
|
+
if (c) {
|
|
55
|
+
if (c.error) {
|
|
56
|
+
ee.emit('error', new error.BackupError('InvalidChange', `Received invalid change: ${c}`));
|
|
57
|
+
} else if (c.changes) {
|
|
58
|
+
const obj = { id: c.id };
|
|
59
|
+
buffer.push(obj);
|
|
60
|
+
processBuffer(false);
|
|
61
|
+
} else if (c.last_seq) {
|
|
62
|
+
lastSeq = c.last_seq;
|
|
63
|
+
pending = c.pending;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
function getChanges(since = 0) {
|
|
69
|
+
debug('making changes request since ' + since);
|
|
70
|
+
return db.service.postChangesAsStream({ db: db.db, since: since, limit: limit, seqInterval: limit })
|
|
71
|
+
.then(response => {
|
|
72
|
+
response.result.pipe(liner())
|
|
73
|
+
.on('error', function(err) {
|
|
74
|
+
logStream.end();
|
|
75
|
+
callback(err);
|
|
76
|
+
})
|
|
77
|
+
.pipe(change(onChange))
|
|
78
|
+
.on('error', function(err) {
|
|
79
|
+
logStream.end();
|
|
80
|
+
callback(err);
|
|
81
|
+
})
|
|
82
|
+
.on('finish', function() {
|
|
83
|
+
processBuffer(true);
|
|
84
|
+
if (!lastSeq) {
|
|
85
|
+
logStream.end();
|
|
86
|
+
debug('changes request terminated before last_seq was sent');
|
|
87
|
+
callback(new error.BackupError('SpoolChangesError', 'Changes request terminated before last_seq was sent'));
|
|
88
|
+
} else {
|
|
89
|
+
debug(`changes request completed with last_seq: ${lastSeq} and ${pending} changes pending.`);
|
|
90
|
+
if (pending > 0) {
|
|
91
|
+
// Return the next promise
|
|
92
|
+
return getChanges(lastSeq);
|
|
93
|
+
} else {
|
|
94
|
+
debug('finished streaming database changes');
|
|
95
|
+
logStream.end(':changes_complete ' + lastSeq + '\n', 'utf8', callback);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
})
|
|
100
|
+
.catch(err => {
|
|
101
|
+
logStream.end();
|
|
102
|
+
if (err.status && err.status >= 400) {
|
|
103
|
+
callback(error.convertResponseError(err));
|
|
104
|
+
} else if (err.name !== 'SpoolChangesError') {
|
|
105
|
+
callback(new error.BackupError('SpoolChangesError', `Failed changes request - ${err.message}`));
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
getChanges();
|
|
31
111
|
};
|
|
@@ -13,152 +13,166 @@
|
|
|
13
13
|
// limitations under the License.
|
|
14
14
|
'use strict';
|
|
15
15
|
|
|
16
|
-
const
|
|
16
|
+
const pkg = require('../package.json');
|
|
17
17
|
const stream = require('stream');
|
|
18
|
-
const
|
|
19
|
-
const
|
|
18
|
+
const { CloudantV1, CouchdbSessionAuthenticator } = require('@ibm-cloud/cloudant');
|
|
19
|
+
const { IamAuthenticator, NoAuthAuthenticator } = require('ibm-cloud-sdk-core');
|
|
20
|
+
const retryPlugin = require('retry-axios');
|
|
21
|
+
|
|
22
|
+
const userAgent = 'couchbackup-cloudant/' + pkg.version + ' (Node.js ' +
|
|
23
|
+
process.version + ')';
|
|
24
|
+
|
|
25
|
+
// Class for streaming _changes error responses into
|
|
26
|
+
// In general the response is a small error/reason JSON object
|
|
27
|
+
// so it is OK to have this in memory.
|
|
28
|
+
class ResponseWriteable extends stream.Writable {
|
|
29
|
+
constructor(options) {
|
|
30
|
+
super(options);
|
|
31
|
+
this.data = [];
|
|
32
|
+
}
|
|
20
33
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
let linenumber = 0;
|
|
34
|
+
_write(chunk, encoding, callback) {
|
|
35
|
+
this.data.push(chunk);
|
|
36
|
+
callback();
|
|
37
|
+
}
|
|
26
38
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
39
|
+
stringBody() {
|
|
40
|
+
return Buffer.concat(this.data).toString();
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// An interceptor function to help augment error bodies with a little
|
|
45
|
+
// extra information so we can continue to use consistent messaging
|
|
46
|
+
// after the ugprade to @ibm-cloud/cloudant
|
|
47
|
+
const errorHelper = async function(err) {
|
|
48
|
+
let method;
|
|
49
|
+
let requestUrl;
|
|
50
|
+
if (err.response) {
|
|
51
|
+
if (err.response.config.url) {
|
|
52
|
+
requestUrl = err.response.config.url;
|
|
53
|
+
method = err.response.config.method;
|
|
36
54
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
if (!response.
|
|
44
|
-
|
|
45
|
-
|
|
55
|
+
// Override the status text with an improved message
|
|
56
|
+
let errorMsg = `${err.response.status} ${err.response.statusText || ''}: ` +
|
|
57
|
+
`${method} ${requestUrl}`;
|
|
58
|
+
if (err.response.data) {
|
|
59
|
+
// Check if we have a JSON response and try to get the error/reason
|
|
60
|
+
if (err.response.headers['content-type'] === 'application/json') {
|
|
61
|
+
if (!err.response.data.error && err.response.data.pipe) {
|
|
62
|
+
// If we didn't find a JSON object with `error` then we might have a stream response.
|
|
63
|
+
// Detect the stream by the presence of `pipe` and use it to get the body and parse
|
|
64
|
+
// the error information.
|
|
65
|
+
const p = new Promise((resolve, reject) => {
|
|
66
|
+
const errorBody = new ResponseWriteable();
|
|
67
|
+
err.response.data.pipe(errorBody)
|
|
68
|
+
.on('finish', () => { resolve(JSON.parse(errorBody.stringBody())); })
|
|
69
|
+
.on('error', () => { reject(err); });
|
|
70
|
+
});
|
|
71
|
+
// Replace the stream on the response with the parsed object
|
|
72
|
+
err.response.data = await p;
|
|
46
73
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
let didError = false;
|
|
59
|
-
|
|
60
|
-
// write the contents of the buffer to CouchDB in blocks of bufferSize
|
|
61
|
-
function processBuffer(flush, callback) {
|
|
62
|
-
function taskCallback(err, payload) {
|
|
63
|
-
if (err && !didError) {
|
|
64
|
-
debug(`Queue task failed with error ${err.name}`);
|
|
65
|
-
didError = true;
|
|
66
|
-
q.kill();
|
|
67
|
-
writer.emit('error', err);
|
|
74
|
+
// Append the error/reason if available
|
|
75
|
+
if (err.response.data.error) {
|
|
76
|
+
// Override the status text with our more complete message
|
|
77
|
+
errorMsg += ` - Error: ${err.response.data.error}`;
|
|
78
|
+
if (err.response.data.reason) {
|
|
79
|
+
errorMsg += `, Reason: ${err.response.data.reason}`;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
} else {
|
|
83
|
+
errorMsg += err.response.data;
|
|
68
84
|
}
|
|
85
|
+
// Set a new message for use by the node-sdk-core
|
|
86
|
+
// We use the errors array because it gets processed
|
|
87
|
+
// ahead of all other service errors.
|
|
88
|
+
err.response.data.errors = [{ message: errorMsg }];
|
|
69
89
|
}
|
|
90
|
+
} else if (err.request) {
|
|
91
|
+
if (!err.message.includes(err.config.url)) {
|
|
92
|
+
// Augment the message with the URL and method
|
|
93
|
+
// but don't do it again if we already have the URL.
|
|
94
|
+
err.message = `${err.message}: ${err.config.method} ${err.config.url}`;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
return Promise.reject(err);
|
|
98
|
+
};
|
|
70
99
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
if (flush && buffer.length > 0) {
|
|
85
|
-
debug(`Adding remaining ${buffer.length} to the write queue.`);
|
|
86
|
-
q.push({ docs: buffer }, taskCallback);
|
|
100
|
+
module.exports = {
|
|
101
|
+
client: function(rawUrl, opts) {
|
|
102
|
+
const url = new URL(rawUrl);
|
|
103
|
+
// Split the URL to separate service from database
|
|
104
|
+
// Use origin as the "base" to remove auth elements
|
|
105
|
+
const actUrl = new URL(url.pathname.substring(0, url.pathname.lastIndexOf('/')), url.origin);
|
|
106
|
+
const dbName = url.pathname.substring(url.pathname.lastIndexOf('/') + 1);
|
|
107
|
+
let authenticator;
|
|
108
|
+
// Default to cookieauth unless an IAM key is provided
|
|
109
|
+
if (opts.iamApiKey) {
|
|
110
|
+
const iamAuthOpts = { apikey: opts.iamApiKey };
|
|
111
|
+
if (opts.iamTokenUrl) {
|
|
112
|
+
iamAuthOpts.url = opts.iamTokenUrl;
|
|
87
113
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
// if we encountered an error, stop this until loop
|
|
95
|
-
if (didError) {
|
|
96
|
-
return callback(null, true);
|
|
97
|
-
}
|
|
98
|
-
if (flush) {
|
|
99
|
-
callback(null, q.idle() && q.length() === 0);
|
|
100
|
-
} else {
|
|
101
|
-
callback(null, q.length() <= parallelism * 2);
|
|
102
|
-
}
|
|
103
|
-
},
|
|
104
|
-
function(cb) {
|
|
105
|
-
setTimeout(cb, 20);
|
|
106
|
-
},
|
|
107
|
-
|
|
108
|
-
function() {
|
|
109
|
-
if (flush && !didError) {
|
|
110
|
-
writer.emit('finished', { total: written });
|
|
111
|
-
}
|
|
112
|
-
// callback when we're happy with the queue size
|
|
113
|
-
callback();
|
|
114
|
-
});
|
|
114
|
+
authenticator = new IamAuthenticator(iamAuthOpts);
|
|
115
|
+
} else if (url.username) {
|
|
116
|
+
authenticator = new CouchdbSessionAuthenticator({
|
|
117
|
+
username: decodeURIComponent(url.username),
|
|
118
|
+
password: decodeURIComponent(url.password)
|
|
119
|
+
});
|
|
115
120
|
} else {
|
|
116
|
-
|
|
121
|
+
authenticator = new NoAuthAuthenticator();
|
|
117
122
|
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
processBuffer(false, done);
|
|
123
|
+
const serviceOpts = {
|
|
124
|
+
authenticator: authenticator,
|
|
125
|
+
timeout: opts.requestTimeout,
|
|
126
|
+
// Axios performance options
|
|
127
|
+
maxContentLength: -1
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
const service = new CloudantV1(serviceOpts);
|
|
131
|
+
// Configure retries
|
|
132
|
+
const maxRetries = 2; // for 3 total attempts
|
|
133
|
+
service.getHttpClient().defaults.raxConfig = {
|
|
134
|
+
// retries for status codes
|
|
135
|
+
retry: maxRetries,
|
|
136
|
+
// retries for non-response e.g. ETIMEDOUT
|
|
137
|
+
noResponseRetries: maxRetries,
|
|
138
|
+
backoffType: 'exponential',
|
|
139
|
+
httpMethodsToRetry: ['GET', 'HEAD', 'POST'],
|
|
140
|
+
statusCodesToRetry: [
|
|
141
|
+
[429, 429],
|
|
142
|
+
[500, 599]
|
|
143
|
+
],
|
|
144
|
+
shouldRetry: err => {
|
|
145
|
+
const cfg = retryPlugin.getConfig(err);
|
|
146
|
+
// cap at max retries regardless of response/non-response type
|
|
147
|
+
if (cfg.currentRetryAttempt >= maxRetries) {
|
|
148
|
+
return false;
|
|
145
149
|
} else {
|
|
146
|
-
|
|
147
|
-
done();
|
|
150
|
+
return retryPlugin.shouldRetryRequest(err);
|
|
148
151
|
}
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
152
|
+
},
|
|
153
|
+
instance: service.getHttpClient()
|
|
154
|
+
};
|
|
155
|
+
retryPlugin.attach(service.getHttpClient());
|
|
156
|
+
|
|
157
|
+
service.setServiceUrl(actUrl.toString());
|
|
158
|
+
if (authenticator instanceof CouchdbSessionAuthenticator) {
|
|
159
|
+
// Awkward workaround for known Couch issue with compression on _session requests
|
|
160
|
+
// It is not feasible to disable compression on all requests with the amount of
|
|
161
|
+
// data this lib needs to move, so override the property in the tokenManager instance.
|
|
162
|
+
authenticator.tokenManager.requestWrapperInstance.compressRequestData = false;
|
|
156
163
|
}
|
|
157
|
-
|
|
164
|
+
if (authenticator.tokenManager && authenticator.tokenManager.requestWrapperInstance) {
|
|
165
|
+
authenticator.tokenManager.requestWrapperInstance.axiosInstance.interceptors.response.use(null, errorHelper);
|
|
166
|
+
}
|
|
167
|
+
// Add error interceptors to put URLs in error messages
|
|
168
|
+
service.getHttpClient().interceptors.response.use(null, errorHelper);
|
|
169
|
+
|
|
170
|
+
// Add request interceptor to add user-agent (adding it with custom request headers gets overwritten)
|
|
171
|
+
service.getHttpClient().interceptors.request.use(function(requestConfig) {
|
|
172
|
+
requestConfig.headers['User-Agent'] = userAgent;
|
|
173
|
+
return requestConfig;
|
|
174
|
+
}, null);
|
|
158
175
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
processBuffer(true, done);
|
|
162
|
-
};
|
|
163
|
-
return writer;
|
|
176
|
+
return { service: service, db: dbName, url: actUrl.toString() };
|
|
177
|
+
}
|
|
164
178
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright © 2017,
|
|
1
|
+
// Copyright © 2017, 2021 IBM Corp. All rights reserved.
|
|
2
2
|
//
|
|
3
3
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
4
|
// you may not use this file except in compliance with the License.
|
|
@@ -13,68 +13,92 @@
|
|
|
13
13
|
// limitations under the License.
|
|
14
14
|
'use strict';
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
const
|
|
18
|
-
|
|
16
|
+
// fatal errors
|
|
17
|
+
const codes = {
|
|
18
|
+
Error: 1,
|
|
19
|
+
InvalidOption: 2,
|
|
20
|
+
DatabaseNotFound: 10,
|
|
21
|
+
Unauthorized: 11,
|
|
22
|
+
Forbidden: 12,
|
|
23
|
+
DatabaseNotEmpty: 13,
|
|
24
|
+
NoLogFileName: 20,
|
|
25
|
+
LogDoesNotExist: 21,
|
|
26
|
+
IncompleteChangesInLogFile: 22,
|
|
27
|
+
SpoolChangesError: 30,
|
|
28
|
+
HTTPFatalError: 40,
|
|
29
|
+
BulkGetError: 50
|
|
30
|
+
};
|
|
19
31
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
let total = 0;
|
|
32
|
+
class BackupError extends Error {
|
|
33
|
+
constructor(name, message) {
|
|
34
|
+
super(message);
|
|
35
|
+
this.name = name;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
27
38
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
39
|
+
class HTTPError extends BackupError {
|
|
40
|
+
constructor(responseError, name) {
|
|
41
|
+
// Special case some names for more useful error messages
|
|
42
|
+
switch (responseError.status) {
|
|
43
|
+
case 401:
|
|
44
|
+
name = 'Unauthorized';
|
|
45
|
+
break;
|
|
46
|
+
case 403:
|
|
47
|
+
name = 'Forbidden';
|
|
48
|
+
break;
|
|
49
|
+
default:
|
|
50
|
+
name = name || 'HTTPFatalError';
|
|
51
|
+
}
|
|
52
|
+
super(name, responseError.message);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
33
55
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
56
|
+
// Default function to return an error for HTTP status codes
|
|
57
|
+
// < 400 -> OK
|
|
58
|
+
// 4XX (except 429) -> Fatal
|
|
59
|
+
// 429 & >=500 -> Transient
|
|
60
|
+
function checkResponse(err) {
|
|
61
|
+
if (err) {
|
|
62
|
+
// Construct an HTTPError if there is request information on the error
|
|
63
|
+
// Codes < 400 are considered OK
|
|
64
|
+
if (err.status >= 400) {
|
|
65
|
+
return new HTTPError(err);
|
|
66
|
+
} else {
|
|
67
|
+
// Send it back again if there was no status code, e.g. a cxn error
|
|
68
|
+
return augmentMessage(err);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
51
72
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
73
|
+
function convertResponseError(responseError, errorFactory) {
|
|
74
|
+
if (!errorFactory) {
|
|
75
|
+
errorFactory = checkResponse;
|
|
76
|
+
}
|
|
77
|
+
return errorFactory(responseError);
|
|
78
|
+
}
|
|
56
79
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
err = error.convertResponseError(err);
|
|
70
|
-
ee.emit('error', err);
|
|
71
|
-
hasErrored = true;
|
|
72
|
-
callback();
|
|
73
|
-
});
|
|
74
|
-
},
|
|
75
|
-
function(callback) { callback(null, hasErrored || startKey == null); },
|
|
76
|
-
function() { ee.emit('finished', { total: total }); }
|
|
77
|
-
);
|
|
80
|
+
function augmentMessage(err) {
|
|
81
|
+
// For errors that don't have a status code, we are likely looking at a cxn
|
|
82
|
+
// error.
|
|
83
|
+
// Try to augment the message with more detail (core puts the code in statusText)
|
|
84
|
+
if (err && err.statusText) {
|
|
85
|
+
err.message = `${err.message} ${err.statusText}`;
|
|
86
|
+
}
|
|
87
|
+
if (err && err.description) {
|
|
88
|
+
err.message = `${err.message} ${err.description}`;
|
|
89
|
+
}
|
|
90
|
+
return err;
|
|
91
|
+
}
|
|
78
92
|
|
|
79
|
-
|
|
93
|
+
module.exports = {
|
|
94
|
+
BackupError: BackupError,
|
|
95
|
+
HTTPError: HTTPError,
|
|
96
|
+
convertResponseError: convertResponseError,
|
|
97
|
+
terminationCallback: function terminationCallback(err, data) {
|
|
98
|
+
if (err) {
|
|
99
|
+
console.error(`ERROR: ${err.message}`);
|
|
100
|
+
process.exitCode = codes[err.name] || 1;
|
|
101
|
+
process.exit();
|
|
102
|
+
}
|
|
103
|
+
}
|
|
80
104
|
};
|