@cloudant/couchbackup 2.9.9-SNAPSHOT.98 → 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-2.pb +1 -0
- package/.scannerwork/scanner-report/changesets-3.pb +1 -0
- package/.scannerwork/scanner-report/changesets-30.pb +1 -0
- package/.scannerwork/scanner-report/changesets-32.pb +1 -0
- package/.scannerwork/scanner-report/changesets-33.pb +1 -0
- package/.scannerwork/scanner-report/changesets-35.pb +1 -0
- package/.scannerwork/scanner-report/changesets-38.pb +1 -0
- package/.scannerwork/scanner-report/changesets-39.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/component-1.pb +1 -2
- package/.scannerwork/scanner-report/component-18.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 -0
- package/.scannerwork/scanner-report/component-30.pb +1 -0
- package/.scannerwork/scanner-report/component-31.pb +1 -1
- package/.scannerwork/scanner-report/component-32.pb +1 -0
- package/.scannerwork/scanner-report/component-33.pb +1 -0
- package/.scannerwork/scanner-report/component-34.pb +1 -1
- package/.scannerwork/scanner-report/component-35.pb +1 -0
- package/.scannerwork/scanner-report/component-36.pb +1 -1
- package/.scannerwork/scanner-report/component-37.pb +1 -1
- package/.scannerwork/scanner-report/component-38.pb +1 -0
- package/.scannerwork/scanner-report/component-39.pb +1 -0
- package/.scannerwork/scanner-report/component-4.pb +1 -1
- package/.scannerwork/scanner-report/component-40.pb +1 -0
- package/.scannerwork/scanner-report/component-45.pb +1 -0
- package/.scannerwork/scanner-report/component-47.pb +1 -0
- package/.scannerwork/scanner-report/component-49.pb +1 -1
- package/.scannerwork/scanner-report/component-50.pb +1 -1
- package/.scannerwork/scanner-report/component-52.pb +1 -1
- package/.scannerwork/scanner-report/component-55.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 -1
- package/.scannerwork/scanner-report/component-67.pb +1 -1
- package/.scannerwork/scanner-report/component-68.pb +1 -1
- package/.scannerwork/scanner-report/component-69.pb +1 -1
- package/.scannerwork/scanner-report/coverages-18.pb +0 -0
- package/.scannerwork/scanner-report/coverages-19.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-31.pb +0 -0
- package/.scannerwork/scanner-report/coverages-32.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-55.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/coverages-68.pb +0 -0
- package/.scannerwork/scanner-report/duplications-22.pb +3 -0
- package/.scannerwork/scanner-report/duplications-26.pb +0 -2
- package/.scannerwork/scanner-report/duplications-28.pb +3 -0
- package/.scannerwork/scanner-report/duplications-29.pb +2 -0
- package/.scannerwork/scanner-report/duplications-31.pb +0 -2
- package/.scannerwork/scanner-report/duplications-34.pb +2 -1
- 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-60.pb +0 -2
- package/.scannerwork/scanner-report/duplications-62.pb +0 -3
- package/.scannerwork/scanner-report/duplications-63.pb +2 -0
- package/.scannerwork/scanner-report/duplications-64.pb +0 -3
- package/.scannerwork/scanner-report/duplications-67.pb +0 -2
- package/.scannerwork/scanner-report/measures-18.pb +0 -0
- 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-30.pb +15 -0
- package/.scannerwork/scanner-report/measures-31.pb +0 -0
- package/.scannerwork/scanner-report/measures-32.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-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-55.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/measures-69.pb +0 -0
- package/.scannerwork/scanner-report/metadata.pb +0 -0
- package/.scannerwork/scanner-report/source-18.txt +18 -160
- package/.scannerwork/scanner-report/source-19.txt +81 -35
- package/.scannerwork/scanner-report/source-2.txt +56 -509
- package/.scannerwork/scanner-report/source-20.txt +20 -115
- package/.scannerwork/scanner-report/source-21.txt +352 -32
- package/.scannerwork/scanner-report/source-22.txt +99 -84
- package/.scannerwork/scanner-report/source-23.txt +44 -92
- package/.scannerwork/scanner-report/source-24.txt +73 -22
- package/.scannerwork/scanner-report/source-25.txt +128 -66
- package/.scannerwork/scanner-report/source-26.txt +130 -66
- package/.scannerwork/scanner-report/source-27.txt +584 -123
- package/.scannerwork/scanner-report/source-28.txt +209 -246
- package/.scannerwork/scanner-report/source-29.txt +209 -15
- package/.scannerwork/scanner-report/source-30.txt +293 -0
- package/.scannerwork/scanner-report/source-31.txt +18 -158
- package/.scannerwork/scanner-report/{source-53.txt → source-32.txt} +7 -14
- package/.scannerwork/scanner-report/source-34.txt +109 -168
- package/.scannerwork/scanner-report/source-35.txt +68 -0
- package/.scannerwork/scanner-report/source-36.txt +19 -401
- package/.scannerwork/scanner-report/source-37.txt +121 -118
- package/.scannerwork/scanner-report/source-38.txt +68 -0
- package/.scannerwork/scanner-report/source-39.txt +147 -0
- package/.scannerwork/scanner-report/source-4.txt +155 -155
- package/.scannerwork/scanner-report/{source-6.txt → source-40.txt} +154 -154
- package/.scannerwork/scanner-report/source-45.txt +418 -0
- package/.scannerwork/scanner-report/source-47.txt +175 -0
- package/.scannerwork/scanner-report/source-49.txt +173 -18
- package/.scannerwork/scanner-report/source-50.txt +167 -244
- package/.scannerwork/scanner-report/source-52.txt +93 -47
- package/.scannerwork/scanner-report/source-55.txt +27 -49
- package/.scannerwork/scanner-report/source-56.txt +75 -12
- package/.scannerwork/scanner-report/source-57.txt +107 -78
- package/.scannerwork/scanner-report/source-58.txt +104 -22
- package/.scannerwork/scanner-report/source-59.txt +91 -136
- package/.scannerwork/scanner-report/source-60.txt +151 -118
- package/.scannerwork/scanner-report/source-61.txt +89 -19
- package/.scannerwork/scanner-report/source-62.txt +40 -105
- package/.scannerwork/scanner-report/source-63.txt +56 -44
- package/.scannerwork/scanner-report/source-64.txt +22 -112
- package/.scannerwork/scanner-report/source-65.txt +64 -131
- package/.scannerwork/scanner-report/source-66.txt +14 -608
- package/.scannerwork/scanner-report/source-67.txt +141 -202
- package/.scannerwork/scanner-report/source-68.txt +253 -64
- package/.scannerwork/scanner-report/source-69.txt +509 -293
- package/.scannerwork/scanner-report/symbols-18.pb +14 -144
- package/.scannerwork/scanner-report/symbols-19.pb +68 -14
- package/.scannerwork/scanner-report/symbols-20.pb +10 -33
- package/.scannerwork/scanner-report/symbols-21.pb +494 -20
- package/.scannerwork/scanner-report/symbols-22.pb +76 -41
- package/.scannerwork/scanner-report/symbols-23.pb +42 -58
- package/.scannerwork/scanner-report/symbols-24.pb +60 -18
- package/.scannerwork/scanner-report/symbols-25.pb +116 -46
- package/.scannerwork/scanner-report/symbols-26.pb +111 -43
- package/.scannerwork/scanner-report/symbols-27.pb +1241 -113
- package/.scannerwork/scanner-report/symbols-28.pb +342 -302
- package/.scannerwork/scanner-report/symbols-29.pb +417 -13
- package/.scannerwork/scanner-report/symbols-31.pb +16 -152
- package/.scannerwork/scanner-report/symbols-32.pb +9 -0
- package/.scannerwork/scanner-report/symbols-34.pb +97 -180
- package/.scannerwork/scanner-report/symbols-35.pb +36 -0
- package/.scannerwork/scanner-report/symbols-36.pb +11 -610
- package/.scannerwork/scanner-report/symbols-37.pb +97 -111
- package/.scannerwork/scanner-report/symbols-38.pb +45 -0
- package/.scannerwork/scanner-report/symbols-39.pb +85 -0
- 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 -17
- package/.scannerwork/scanner-report/symbols-52.pb +28 -45
- package/.scannerwork/scanner-report/symbols-55.pb +19 -35
- package/.scannerwork/scanner-report/symbols-56.pb +44 -9
- package/.scannerwork/scanner-report/symbols-57.pb +33 -69
- package/.scannerwork/scanner-report/symbols-58.pb +30 -11
- package/.scannerwork/scanner-report/symbols-59.pb +57 -110
- package/.scannerwork/scanner-report/symbols-60.pb +136 -94
- package/.scannerwork/scanner-report/symbols-61.pb +41 -9
- package/.scannerwork/scanner-report/symbols-62.pb +14 -76
- package/.scannerwork/scanner-report/symbols-63.pb +41 -42
- package/.scannerwork/scanner-report/symbols-64.pb +18 -97
- package/.scannerwork/scanner-report/symbols-65.pb +46 -85
- package/.scannerwork/scanner-report/symbols-66.pb +13 -1253
- package/.scannerwork/scanner-report/symbols-67.pb +125 -417
- package/.scannerwork/scanner-report/symbols-68.pb +354 -60
- package/.scannerwork/scanner-report/syntax-highlightings-18.pb +22 -211
- package/.scannerwork/scanner-report/syntax-highlightings-19.pb +75 -24
- package/.scannerwork/scanner-report/syntax-highlightings-2.pb +55 -3721
- package/.scannerwork/scanner-report/syntax-highlightings-20.pb +16 -95
- package/.scannerwork/scanner-report/syntax-highlightings-21.pb +600 -34
- package/.scannerwork/scanner-report/syntax-highlightings-22.pb +128 -86
- package/.scannerwork/scanner-report/syntax-highlightings-23.pb +47 -98
- package/.scannerwork/scanner-report/syntax-highlightings-24.pb +81 -21
- package/.scannerwork/scanner-report/syntax-highlightings-25.pb +101 -62
- package/.scannerwork/scanner-report/syntax-highlightings-26.pb +189 -56
- package/.scannerwork/scanner-report/syntax-highlightings-27.pb +815 -141
- package/.scannerwork/scanner-report/syntax-highlightings-28.pb +217 -173
- package/.scannerwork/scanner-report/syntax-highlightings-29.pb +301 -15
- package/.scannerwork/scanner-report/syntax-highlightings-30.pb +659 -0
- package/.scannerwork/scanner-report/syntax-highlightings-31.pb +34 -185
- package/.scannerwork/scanner-report/syntax-highlightings-32.pb +48 -0
- package/.scannerwork/scanner-report/syntax-highlightings-34.pb +152 -195
- package/.scannerwork/scanner-report/syntax-highlightings-35.pb +95 -0
- package/.scannerwork/scanner-report/syntax-highlightings-36.pb +30 -619
- package/.scannerwork/scanner-report/syntax-highlightings-37.pb +189 -96
- package/.scannerwork/scanner-report/syntax-highlightings-38.pb +110 -0
- package/.scannerwork/scanner-report/syntax-highlightings-39.pb +191 -0
- package/.scannerwork/scanner-report/syntax-highlightings-4.pb +90 -91
- package/.scannerwork/scanner-report/{syntax-highlightings-5.pb → syntax-highlightings-40.pb} +96 -96
- package/.scannerwork/scanner-report/syntax-highlightings-45.pb +648 -0
- package/.scannerwork/scanner-report/syntax-highlightings-47.pb +214 -0
- package/.scannerwork/scanner-report/syntax-highlightings-49.pb +196 -34
- package/.scannerwork/scanner-report/syntax-highlightings-50.pb +843 -223
- package/.scannerwork/scanner-report/syntax-highlightings-52.pb +97 -69
- package/.scannerwork/scanner-report/syntax-highlightings-55.pb +34 -65
- package/.scannerwork/scanner-report/syntax-highlightings-56.pb +57 -15
- package/.scannerwork/scanner-report/syntax-highlightings-57.pb +88 -64
- package/.scannerwork/scanner-report/syntax-highlightings-58.pb +84 -30
- package/.scannerwork/scanner-report/syntax-highlightings-59.pb +96 -186
- package/.scannerwork/scanner-report/syntax-highlightings-60.pb +201 -185
- package/.scannerwork/scanner-report/syntax-highlightings-61.pb +87 -21
- package/.scannerwork/scanner-report/syntax-highlightings-62.pb +24 -128
- package/.scannerwork/scanner-report/syntax-highlightings-63.pb +45 -49
- package/.scannerwork/scanner-report/syntax-highlightings-64.pb +20 -152
- package/.scannerwork/scanner-report/syntax-highlightings-65.pb +62 -158
- package/.scannerwork/scanner-report/syntax-highlightings-66.pb +15 -857
- package/.scannerwork/scanner-report/syntax-highlightings-67.pb +168 -286
- package/.scannerwork/scanner-report/syntax-highlightings-68.pb +240 -65
- package/.scannerwork/scanner-report/syntax-highlightings-69.pb +3487 -398
- package/CHANGES.md +4 -0
- package/README.md +1 -1
- package/package.json +5 -5
- package/test-16-results.xml +144 -144
- package/test-18-results.xml +152 -152
- package/{test-19-results.xml → test-20-results.xml} +154 -154
- package/test-iam-18-results.xml +49 -49
- package/.scannerwork/scanner-report/changesets-10.pb +0 -2
- package/.scannerwork/scanner-report/changesets-11.pb +0 -1
- package/.scannerwork/scanner-report/changesets-14.pb +0 -1
- package/.scannerwork/scanner-report/changesets-16.pb +0 -1
- package/.scannerwork/scanner-report/changesets-17.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-69.pb +0 -1
- package/.scannerwork/scanner-report/component-10.pb +0 -2
- package/.scannerwork/scanner-report/component-11.pb +0 -1
- package/.scannerwork/scanner-report/component-12.pb +0 -1
- package/.scannerwork/scanner-report/component-14.pb +0 -1
- package/.scannerwork/scanner-report/component-16.pb +0 -1
- package/.scannerwork/scanner-report/component-17.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-14.pb +0 -0
- package/.scannerwork/scanner-report/coverages-16.pb +0 -0
- package/.scannerwork/scanner-report/coverages-17.pb +0 -0
- package/.scannerwork/scanner-report/coverages-50.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/duplications-17.pb +0 -2
- package/.scannerwork/scanner-report/duplications-50.pb +0 -3
- package/.scannerwork/scanner-report/measures-11.pb +0 -0
- package/.scannerwork/scanner-report/measures-12.pb +0 -0
- package/.scannerwork/scanner-report/measures-14.pb +0 -0
- package/.scannerwork/scanner-report/measures-16.pb +0 -0
- package/.scannerwork/scanner-report/measures-17.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-6.pb +0 -0
- package/.scannerwork/scanner-report/source-11.txt +0 -56
- package/.scannerwork/scanner-report/source-12.txt +0 -167
- package/.scannerwork/scanner-report/source-14.txt +0 -114
- package/.scannerwork/scanner-report/source-16.txt +0 -118
- package/.scannerwork/scanner-report/source-17.txt +0 -75
- package/.scannerwork/scanner-report/source-5.txt +0 -509
- package/.scannerwork/scanner-report/source-51.txt +0 -366
- package/.scannerwork/scanner-report/symbols-14.pb +0 -28
- package/.scannerwork/scanner-report/symbols-16.pb +0 -30
- package/.scannerwork/scanner-report/symbols-17.pb +0 -42
- package/.scannerwork/scanner-report/symbols-50.pb +0 -394
- package/.scannerwork/scanner-report/symbols-51.pb +0 -494
- package/.scannerwork/scanner-report/symbols-53.pb +0 -14
- package/.scannerwork/scanner-report/syntax-highlightings-11.pb +0 -82
- package/.scannerwork/scanner-report/syntax-highlightings-12.pb +0 -949
- package/.scannerwork/scanner-report/syntax-highlightings-14.pb +0 -138
- package/.scannerwork/scanner-report/syntax-highlightings-16.pb +0 -113
- package/.scannerwork/scanner-report/syntax-highlightings-17.pb +0 -78
- package/.scannerwork/scanner-report/syntax-highlightings-51.pb +0 -630
- package/.scannerwork/scanner-report/syntax-highlightings-53.pb +0 -54
- package/.scannerwork/scanner-report/syntax-highlightings-6.pb +0 -3747
- package/test-14-results.xml +0 -509
- /package/.scannerwork/scanner-report/{coverages-11.pb → coverages-2.pb} +0 -0
- /package/.scannerwork/scanner-report/{coverages-10.pb → coverages-3.pb} +0 -0
- /package/.scannerwork/scanner-report/{coverages-69.pb → coverages-30.pb} +0 -0
- /package/.scannerwork/scanner-report/{coverages-54.pb → coverages-33.pb} +0 -0
- /package/.scannerwork/scanner-report/{duplications-10.pb → duplications-2.pb} +0 -0
- /package/.scannerwork/scanner-report/{duplications-11.pb → duplications-3.pb} +0 -0
- /package/.scannerwork/scanner-report/{duplications-69.pb → duplications-30.pb} +0 -0
- /package/.scannerwork/scanner-report/{duplications-14.pb → duplications-33.pb} +0 -0
- /package/.scannerwork/scanner-report/{duplications-16.pb → duplications-35.pb} +0 -0
- /package/.scannerwork/scanner-report/{duplications-51.pb → duplications-38.pb} +0 -0
- /package/.scannerwork/scanner-report/{duplications-53.pb → duplications-39.pb} +0 -0
- /package/.scannerwork/scanner-report/{duplications-54.pb → duplications-45.pb} +0 -0
- /package/.scannerwork/scanner-report/{issues-51.pb → issues-21.pb} +0 -0
- /package/.scannerwork/scanner-report/{issues-37.pb → issues-25.pb} +0 -0
- /package/.scannerwork/scanner-report/{issues-50.pb → issues-28.pb} +0 -0
- /package/.scannerwork/scanner-report/{issues-54.pb → issues-33.pb} +0 -0
- /package/.scannerwork/scanner-report/{measures-10.pb → measures-3.pb} +0 -0
- /package/.scannerwork/scanner-report/{measures-54.pb → measures-33.pb} +0 -0
- /package/.scannerwork/scanner-report/{measures-5.pb → measures-40.pb} +0 -0
- /package/.scannerwork/scanner-report/{source-10.txt → source-3.txt} +0 -0
- /package/.scannerwork/scanner-report/{source-54.txt → source-33.txt} +0 -0
- /package/.scannerwork/scanner-report/{symbols-11.pb → symbols-2.pb} +0 -0
- /package/.scannerwork/scanner-report/{symbols-10.pb → symbols-3.pb} +0 -0
- /package/.scannerwork/scanner-report/{symbols-69.pb → symbols-30.pb} +0 -0
- /package/.scannerwork/scanner-report/{symbols-54.pb → symbols-33.pb} +0 -0
- /package/.scannerwork/scanner-report/{syntax-highlightings-10.pb → syntax-highlightings-3.pb} +0 -0
- /package/.scannerwork/scanner-report/{syntax-highlightings-54.pb → syntax-highlightings-33.pb} +0 -0
|
@@ -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.
|
|
@@ -11,135 +11,168 @@
|
|
|
11
11
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
12
|
// See the License for the specific language governing permissions and
|
|
13
13
|
// limitations under the License.
|
|
14
|
-
|
|
15
|
-
/* global describe it beforeEach */
|
|
16
14
|
'use strict';
|
|
17
15
|
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
const
|
|
16
|
+
const pkg = require('../package.json');
|
|
17
|
+
const stream = require('stream');
|
|
18
|
+
const { CloudantV1, CouchdbSessionAuthenticator } = require('@ibm-cloud/cloudant');
|
|
19
|
+
const { IamAuthenticator, NoAuthAuthenticator } = require('ibm-cloud-sdk-core');
|
|
20
|
+
const retryPlugin = require('retry-axios');
|
|
23
21
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
function shallowBackup(dbUrl, opts) {
|
|
27
|
-
const db = request.client(dbUrl, opts);
|
|
28
|
-
// Disable compression to make body assertions easier
|
|
29
|
-
db.service.setEnableGzipCompression(false);
|
|
30
|
-
return backup(db, opts);
|
|
31
|
-
}
|
|
22
|
+
const userAgent = 'couchbackup-cloudant/' + pkg.version + ' (Node.js ' +
|
|
23
|
+
process.version + ')';
|
|
32
24
|
|
|
33
|
-
//
|
|
34
|
-
//
|
|
35
|
-
//
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
const snipeKey = 'snipe\0';
|
|
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
|
+
}
|
|
42
33
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
34
|
+
_write(chunk, encoding, callback) {
|
|
35
|
+
this.data.push(chunk);
|
|
36
|
+
callback();
|
|
37
|
+
}
|
|
46
38
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
.reply(200, JSON.parse(fs.readFileSync('./test/fixtures/animaldb_all_docs_1.json', 'utf8')))
|
|
52
|
-
// batch 2
|
|
53
|
-
.post('/_all_docs', { limit: 3, start_key: badgerKey, include_docs: true })
|
|
54
|
-
.reply(200, JSON.parse(fs.readFileSync('./test/fixtures/animaldb_all_docs_2.json', 'utf8')))
|
|
55
|
-
// batch 3
|
|
56
|
-
.post('/_all_docs', { limit: 3, start_key: kookaburraKey, include_docs: true })
|
|
57
|
-
.reply(200, JSON.parse(fs.readFileSync('./test/fixtures/animaldb_all_docs_3.json', 'utf8')))
|
|
58
|
-
// batch 4
|
|
59
|
-
.post('/_all_docs', { limit: 3, start_key: snipeKey, include_docs: true })
|
|
60
|
-
.reply(200, JSON.parse(fs.readFileSync('./test/fixtures/animaldb_all_docs_4.json', 'utf8')));
|
|
39
|
+
stringBody() {
|
|
40
|
+
return Buffer.concat(this.data).toString();
|
|
41
|
+
}
|
|
42
|
+
}
|
|
61
43
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
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;
|
|
54
|
+
}
|
|
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;
|
|
71
73
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
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;
|
|
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 }];
|
|
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
|
+
};
|
|
79
99
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
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;
|
|
113
|
+
}
|
|
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
|
+
});
|
|
120
|
+
} else {
|
|
121
|
+
authenticator = new NoAuthAuthenticator();
|
|
122
|
+
}
|
|
123
|
+
const serviceOpts = {
|
|
124
|
+
authenticator: authenticator,
|
|
125
|
+
timeout: opts.requestTimeout,
|
|
126
|
+
// Axios performance options
|
|
127
|
+
maxContentLength: -1
|
|
128
|
+
};
|
|
97
129
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
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;
|
|
105
149
|
} else {
|
|
106
|
-
|
|
150
|
+
return retryPlugin.shouldRetryRequest(err);
|
|
107
151
|
}
|
|
108
|
-
}
|
|
109
|
-
.
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
done();
|
|
113
|
-
});
|
|
114
|
-
});
|
|
152
|
+
},
|
|
153
|
+
instance: service.getHttpClient()
|
|
154
|
+
};
|
|
155
|
+
retryPlugin.attach(service.getHttpClient());
|
|
115
156
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
//
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
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;
|
|
163
|
+
}
|
|
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);
|
|
127
169
|
|
|
128
|
-
|
|
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);
|
|
129
175
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
assert.strictEqual(err.name, 'Unauthorized');
|
|
134
|
-
})
|
|
135
|
-
.on('received', function(data) {
|
|
136
|
-
assert.strictEqual(data.length, 3);
|
|
137
|
-
})
|
|
138
|
-
.on('finished', function(data) {
|
|
139
|
-
assert.strictEqual(data.total, 6);
|
|
140
|
-
assert.ok(couch.isDone());
|
|
141
|
-
assert.strictEqual(errCount, 1);
|
|
142
|
-
done();
|
|
143
|
-
});
|
|
144
|
-
});
|
|
145
|
-
});
|
|
176
|
+
return { service: service, db: dbName, url: actUrl.toString() };
|
|
177
|
+
}
|
|
178
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright © 2017 IBM Corp. All rights reserved.
|
|
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.
|
|
@@ -11,24 +11,94 @@
|
|
|
11
11
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
12
|
// See the License for the specific language governing permissions and
|
|
13
13
|
// limitations under the License.
|
|
14
|
-
|
|
15
|
-
/* global describe it */
|
|
16
14
|
'use strict';
|
|
17
15
|
|
|
18
|
-
|
|
19
|
-
const
|
|
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
|
+
};
|
|
31
|
+
|
|
32
|
+
class BackupError extends Error {
|
|
33
|
+
constructor(name, message) {
|
|
34
|
+
super(message);
|
|
35
|
+
this.name = name;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
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
|
+
}
|
|
55
|
+
|
|
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
|
+
}
|
|
72
|
+
|
|
73
|
+
function convertResponseError(responseError, errorFactory) {
|
|
74
|
+
if (!errorFactory) {
|
|
75
|
+
errorFactory = checkResponse;
|
|
76
|
+
}
|
|
77
|
+
return errorFactory(responseError);
|
|
78
|
+
}
|
|
79
|
+
|
|
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
|
+
}
|
|
20
92
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
});
|
|
34
|
-
});
|
|
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
|
+
}
|
|
104
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright © 2017 IBM Corp. All rights reserved.
|
|
1
|
+
// Copyright © 2017, 2018 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.
|
|
@@ -11,109 +11,44 @@
|
|
|
11
11
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
12
|
// See the License for the specific language governing permissions and
|
|
13
13
|
// limitations under the License.
|
|
14
|
-
|
|
15
|
-
/* global describe it */
|
|
16
14
|
'use strict';
|
|
17
15
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
} else {
|
|
58
|
-
u.dbCompare('animaldb', dbName, done);
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
});
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
it('should restore resumed animaldb with blank line to a database correctly', function(done) {
|
|
65
|
-
// Allow up to 60 s to restore and compare (again it should be faster)!
|
|
66
|
-
u.setTimeout(this, 60);
|
|
67
|
-
const input = fs.createReadStream('./test/fixtures/animaldb_resumed_blank.json');
|
|
68
|
-
const dbName = this.dbName;
|
|
69
|
-
input.on('open', function() {
|
|
70
|
-
u.testRestore(params, input, dbName, function(err) {
|
|
71
|
-
if (err) {
|
|
72
|
-
done(err);
|
|
73
|
-
} else {
|
|
74
|
-
u.dbCompare('animaldb', dbName, done);
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
});
|
|
78
|
-
});
|
|
79
|
-
});
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
describe('Resume tests', function() {
|
|
83
|
-
// Currently cannot abort API backups, when we do this test should be run for
|
|
84
|
-
// both API and CLI
|
|
85
|
-
it('should correctly backup and restore backup10m', function(done) {
|
|
86
|
-
// Allow up to 90 s for this test
|
|
87
|
-
u.setTimeout(this, 90);
|
|
88
|
-
|
|
89
|
-
const actualBackup = `./${this.fileName}`;
|
|
90
|
-
const logFile = `./${this.fileName}` + '.log';
|
|
91
|
-
// Use abort parameter to terminate the backup a given number of ms after
|
|
92
|
-
// the first data write to the output file.
|
|
93
|
-
const p = u.p(params, { abort: true }, { opts: { log: logFile } });
|
|
94
|
-
const restoreDb = this.dbName;
|
|
95
|
-
// Set the database doc count as fewer than this should be written during
|
|
96
|
-
// resumed backup.
|
|
97
|
-
p.exclusiveMaxExpected = 5096;
|
|
98
|
-
|
|
99
|
-
u.testBackupAbortResumeRestore(p, 'backup10m', actualBackup, restoreDb, done);
|
|
100
|
-
});
|
|
101
|
-
// Note --output is only valid for CLI usage, this test should only run for CLI
|
|
102
|
-
const params = { useApi: false };
|
|
103
|
-
it('should correctly backup and restore backup10m using --output', function(done) {
|
|
104
|
-
// Allow up to 90 s for this test
|
|
105
|
-
u.setTimeout(this, 90);
|
|
106
|
-
|
|
107
|
-
const actualBackup = `./${this.fileName}`;
|
|
108
|
-
const logFile = `./${this.fileName}` + '.log';
|
|
109
|
-
// Use abort parameter to terminate the backup a given number of ms after
|
|
110
|
-
// the first data write to the output file.
|
|
111
|
-
const p = u.p(params, { abort: true }, { opts: { output: actualBackup, log: logFile } });
|
|
112
|
-
const restoreDb = this.dbName;
|
|
113
|
-
// Set the database doc count as fewer than this should be written during
|
|
114
|
-
// resumed backup.
|
|
115
|
-
p.exclusiveMaxExpected = 5096;
|
|
116
|
-
|
|
117
|
-
u.testBackupAbortResumeRestore(p, 'backup10m', actualBackup, restoreDb, done);
|
|
118
|
-
});
|
|
119
|
-
});
|
|
16
|
+
/**
|
|
17
|
+
* Utility methods for the command line interface.
|
|
18
|
+
* @module cliutils
|
|
19
|
+
* @see module:cliutils
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
const url = require('url');
|
|
23
|
+
|
|
24
|
+
module.exports = {
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Combine a base URL and a database name, ensuring at least single slash
|
|
28
|
+
* between root and database name. This allows users to have Couch behind
|
|
29
|
+
* proxies that mount Couch's / endpoint at some other mount point.
|
|
30
|
+
* @param {string} root - root URL
|
|
31
|
+
* @param {string} databaseName - database name
|
|
32
|
+
* @return concatenated URL.
|
|
33
|
+
*
|
|
34
|
+
* @private
|
|
35
|
+
*/
|
|
36
|
+
databaseUrl: function databaseUrl(root, databaseName) {
|
|
37
|
+
if (!root.endsWith('/')) {
|
|
38
|
+
root = root + '/';
|
|
39
|
+
}
|
|
40
|
+
return new url.URL(encodeURIComponent(databaseName), root).toString();
|
|
41
|
+
},
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Generate CLI argument usage text.
|
|
45
|
+
*
|
|
46
|
+
* @param {string} description - argument description.
|
|
47
|
+
* @param {string} defaultValue - default argument value.
|
|
48
|
+
*
|
|
49
|
+
* @private
|
|
50
|
+
*/
|
|
51
|
+
getUsage: function getUsage(description, defaultValue) {
|
|
52
|
+
return `${description} ${defaultValue !== undefined ? ` (default: ${defaultValue})` : ''}`;
|
|
53
|
+
}
|
|
54
|
+
};
|