@cloudant/couchbackup 2.9.16 → 2.9.17-SNAPSHOT.185
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-cache2.pb +0 -0
- package/.scannerwork/scanner-report/analysis-warnings.pb +2 -2
- package/.scannerwork/scanner-report/changesets-23.pb +1 -0
- package/.scannerwork/scanner-report/changesets-24.pb +1 -0
- package/.scannerwork/scanner-report/changesets-26.pb +1 -0
- package/.scannerwork/scanner-report/changesets-27.pb +1 -0
- package/.scannerwork/scanner-report/changesets-28.pb +1 -0
- package/.scannerwork/scanner-report/changesets-29.pb +1 -0
- package/.scannerwork/scanner-report/changesets-53.pb +1 -0
- package/.scannerwork/scanner-report/changesets-55.pb +1 -0
- package/.scannerwork/scanner-report/changesets-56.pb +1 -0
- package/.scannerwork/scanner-report/changesets-57.pb +1 -0
- package/.scannerwork/scanner-report/changesets-58.pb +1 -0
- package/.scannerwork/scanner-report/changesets-59.pb +1 -0
- package/.scannerwork/scanner-report/changesets-62.pb +1 -0
- package/.scannerwork/scanner-report/changesets-63.pb +1 -0
- package/.scannerwork/scanner-report/changesets-67.pb +1 -0
- package/.scannerwork/scanner-report/changesets-69.pb +1 -0
- package/.scannerwork/scanner-report/component-1.pb +1 -2
- package/.scannerwork/scanner-report/component-11.pb +1 -1
- package/.scannerwork/scanner-report/component-12.pb +1 -1
- package/.scannerwork/scanner-report/component-13.pb +1 -1
- package/.scannerwork/scanner-report/component-14.pb +1 -1
- package/.scannerwork/scanner-report/component-15.pb +1 -1
- package/.scannerwork/scanner-report/component-16.pb +1 -1
- package/.scannerwork/scanner-report/component-17.pb +1 -1
- package/.scannerwork/scanner-report/component-18.pb +1 -1
- package/.scannerwork/scanner-report/component-19.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 -0
- package/.scannerwork/scanner-report/component-24.pb +1 -0
- package/.scannerwork/scanner-report/component-25.pb +1 -0
- package/.scannerwork/scanner-report/component-26.pb +1 -0
- package/.scannerwork/scanner-report/component-27.pb +1 -0
- package/.scannerwork/scanner-report/component-28.pb +1 -0
- package/.scannerwork/scanner-report/component-29.pb +1 -0
- package/.scannerwork/scanner-report/component-3.pb +1 -1
- package/.scannerwork/scanner-report/component-41.pb +1 -1
- package/.scannerwork/scanner-report/component-42.pb +1 -1
- package/.scannerwork/scanner-report/component-43.pb +1 -1
- package/.scannerwork/scanner-report/component-44.pb +1 -1
- package/.scannerwork/scanner-report/component-45.pb +1 -1
- package/.scannerwork/scanner-report/component-46.pb +1 -1
- package/.scannerwork/scanner-report/component-47.pb +1 -1
- package/.scannerwork/scanner-report/component-48.pb +1 -1
- package/.scannerwork/scanner-report/component-49.pb +1 -1
- package/.scannerwork/scanner-report/component-50.pb +1 -1
- package/.scannerwork/scanner-report/component-51.pb +1 -1
- package/.scannerwork/scanner-report/component-52.pb +1 -1
- package/.scannerwork/scanner-report/component-53.pb +1 -0
- package/.scannerwork/scanner-report/component-54.pb +1 -1
- package/.scannerwork/scanner-report/component-55.pb +1 -1
- package/.scannerwork/scanner-report/component-56.pb +1 -0
- package/.scannerwork/scanner-report/component-57.pb +1 -0
- package/.scannerwork/scanner-report/component-58.pb +1 -0
- package/.scannerwork/scanner-report/component-59.pb +1 -0
- package/.scannerwork/scanner-report/component-60.pb +1 -1
- package/.scannerwork/scanner-report/component-62.pb +1 -0
- package/.scannerwork/scanner-report/component-63.pb +1 -0
- package/.scannerwork/scanner-report/component-67.pb +1 -0
- package/.scannerwork/scanner-report/component-69.pb +1 -0
- package/.scannerwork/scanner-report/component-70.pb +1 -0
- package/.scannerwork/scanner-report/component-9.pb +1 -1
- package/.scannerwork/scanner-report/coverages-11.pb +0 -0
- package/.scannerwork/scanner-report/coverages-12.pb +0 -0
- package/.scannerwork/scanner-report/coverages-13.pb +0 -0
- package/.scannerwork/scanner-report/coverages-14.pb +0 -0
- package/.scannerwork/scanner-report/coverages-15.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-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-24.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-41.pb +0 -0
- package/.scannerwork/scanner-report/coverages-42.pb +0 -0
- package/.scannerwork/scanner-report/coverages-43.pb +0 -0
- package/.scannerwork/scanner-report/coverages-44.pb +0 -0
- package/.scannerwork/scanner-report/coverages-45.pb +0 -0
- package/.scannerwork/scanner-report/coverages-46.pb +0 -0
- package/.scannerwork/scanner-report/coverages-47.pb +0 -0
- package/.scannerwork/scanner-report/coverages-48.pb +0 -0
- package/.scannerwork/scanner-report/coverages-49.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-52.pb +0 -0
- package/.scannerwork/scanner-report/coverages-54.pb +0 -0
- package/.scannerwork/scanner-report/coverages-56.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-62.pb +0 -0
- package/.scannerwork/scanner-report/coverages-69.pb +0 -0
- package/.scannerwork/scanner-report/duplications-12.pb +0 -3
- package/.scannerwork/scanner-report/duplications-15.pb +2 -0
- package/.scannerwork/scanner-report/duplications-24.pb +2 -0
- package/.scannerwork/scanner-report/duplications-43.pb +2 -0
- package/.scannerwork/scanner-report/duplications-50.pb +0 -2
- package/.scannerwork/scanner-report/duplications-51.pb +3 -2
- package/.scannerwork/scanner-report/duplications-66.pb +1 -1
- package/.scannerwork/scanner-report/measures-11.pb +0 -0
- package/.scannerwork/scanner-report/measures-12.pb +0 -0
- package/.scannerwork/scanner-report/measures-13.pb +0 -0
- package/.scannerwork/scanner-report/measures-14.pb +0 -0
- package/.scannerwork/scanner-report/measures-15.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-18.pb +0 -0
- package/.scannerwork/scanner-report/measures-19.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-24.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-41.pb +0 -0
- package/.scannerwork/scanner-report/measures-42.pb +0 -0
- package/.scannerwork/scanner-report/measures-43.pb +0 -0
- package/.scannerwork/scanner-report/measures-44.pb +0 -0
- package/.scannerwork/scanner-report/measures-45.pb +0 -0
- package/.scannerwork/scanner-report/measures-46.pb +0 -0
- package/.scannerwork/scanner-report/measures-47.pb +0 -0
- package/.scannerwork/scanner-report/measures-48.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-51.pb +0 -0
- package/.scannerwork/scanner-report/measures-52.pb +0 -0
- package/.scannerwork/scanner-report/measures-54.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-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-62.pb +0 -0
- package/.scannerwork/scanner-report/measures-69.pb +0 -0
- package/.scannerwork/scanner-report/measures-9.pb +0 -0
- package/.scannerwork/scanner-report/metadata.pb +0 -0
- package/.scannerwork/scanner-report/source-11.txt +25 -16
- package/.scannerwork/scanner-report/source-12.txt +32 -199
- package/.scannerwork/scanner-report/source-13.txt +17 -87
- package/.scannerwork/scanner-report/source-14.txt +115 -116
- package/.scannerwork/scanner-report/source-15.txt +66 -423
- package/.scannerwork/scanner-report/source-16.txt +64 -277
- package/.scannerwork/scanner-report/source-17.txt +247 -66
- package/.scannerwork/scanner-report/source-18.txt +104 -92
- package/.scannerwork/scanner-report/source-19.txt +45 -120
- package/.scannerwork/scanner-report/source-20.txt +89 -41
- package/.scannerwork/scanner-report/source-21.txt +148 -24
- package/.scannerwork/scanner-report/source-22.txt +162 -25
- package/.scannerwork/scanner-report/source-24.txt +75 -0
- package/.scannerwork/scanner-report/{source-38.txt → source-25.txt} +143 -143
- package/.scannerwork/scanner-report/source-27.txt +65 -0
- package/.scannerwork/scanner-report/source-28.txt +100 -0
- package/.scannerwork/scanner-report/source-3.txt +152 -152
- package/.scannerwork/scanner-report/source-41.txt +315 -32
- package/.scannerwork/scanner-report/source-42.txt +23 -63
- package/.scannerwork/scanner-report/source-43.txt +169 -45
- package/.scannerwork/scanner-report/source-44.txt +23 -164
- package/.scannerwork/scanner-report/source-45.txt +116 -104
- package/.scannerwork/scanner-report/source-46.txt +14 -26
- package/.scannerwork/scanner-report/source-47.txt +48 -99
- package/.scannerwork/scanner-report/source-48.txt +52 -141
- package/.scannerwork/scanner-report/source-49.txt +254 -242
- package/.scannerwork/scanner-report/source-50.txt +114 -72
- package/.scannerwork/scanner-report/source-51.txt +198 -60
- package/.scannerwork/scanner-report/source-52.txt +134 -14
- package/.scannerwork/scanner-report/source-54.txt +80 -25
- package/.scannerwork/scanner-report/source-55.txt +187 -424
- package/.scannerwork/scanner-report/{source-5.txt → source-56.txt} +10 -7
- package/.scannerwork/scanner-report/source-58.txt +106 -0
- package/.scannerwork/scanner-report/source-59.txt +449 -0
- package/.scannerwork/scanner-report/source-60.txt +25 -44
- package/.scannerwork/scanner-report/source-62.txt +60 -0
- package/.scannerwork/scanner-report/source-69.txt +46 -0
- package/.scannerwork/scanner-report/{source-68.txt → source-70.txt} +49 -49
- package/.scannerwork/scanner-report/source-9.txt +424 -183
- package/.scannerwork/scanner-report/symbols-11.pb +18 -9
- package/.scannerwork/scanner-report/symbols-12.pb +20 -264
- package/.scannerwork/scanner-report/symbols-13.pb +13 -57
- package/.scannerwork/scanner-report/symbols-14.pb +33 -86
- package/.scannerwork/scanner-report/symbols-15.pb +43 -789
- package/.scannerwork/scanner-report/symbols-16.pb +44 -426
- package/.scannerwork/scanner-report/symbols-17.pb +354 -69
- package/.scannerwork/scanner-report/symbols-18.pb +30 -59
- package/.scannerwork/scanner-report/symbols-19.pb +19 -71
- package/.scannerwork/scanner-report/symbols-20.pb +45 -32
- package/.scannerwork/scanner-report/symbols-21.pb +126 -23
- package/.scannerwork/scanner-report/symbols-22.pb +143 -30
- package/.scannerwork/scanner-report/symbols-24.pb +42 -0
- package/.scannerwork/scanner-report/symbols-27.pb +33 -0
- package/.scannerwork/scanner-report/symbols-28.pb +69 -0
- package/.scannerwork/scanner-report/symbols-41.pb +353 -20
- package/.scannerwork/scanner-report/symbols-42.pb +23 -46
- package/.scannerwork/scanner-report/symbols-43.pb +203 -19
- package/.scannerwork/scanner-report/symbols-44.pb +9 -144
- package/.scannerwork/scanner-report/symbols-45.pb +86 -30
- package/.scannerwork/scanner-report/symbols-46.pb +8 -18
- package/.scannerwork/scanner-report/symbols-47.pb +23 -45
- package/.scannerwork/scanner-report/symbols-48.pb +39 -126
- package/.scannerwork/scanner-report/symbols-49.pb +402 -328
- package/.scannerwork/scanner-report/symbols-50.pb +71 -44
- package/.scannerwork/scanner-report/symbols-51.pb +264 -42
- package/.scannerwork/scanner-report/symbols-52.pb +92 -13
- package/.scannerwork/scanner-report/symbols-54.pb +58 -7
- package/.scannerwork/scanner-report/symbols-56.pb +9 -0
- package/.scannerwork/scanner-report/symbols-58.pb +59 -0
- package/.scannerwork/scanner-report/symbols-59.pb +790 -0
- package/.scannerwork/scanner-report/symbols-60.pb +31 -21
- package/.scannerwork/scanner-report/symbols-62.pb +21 -0
- package/.scannerwork/scanner-report/symbols-69.pb +7 -0
- package/.scannerwork/scanner-report/syntax-highlightings-11.pb +23 -25
- package/.scannerwork/scanner-report/syntax-highlightings-12.pb +33 -266
- package/.scannerwork/scanner-report/syntax-highlightings-13.pb +15 -124
- package/.scannerwork/scanner-report/syntax-highlightings-14.pb +94 -90
- package/.scannerwork/scanner-report/syntax-highlightings-15.pb +57 -591
- package/.scannerwork/scanner-report/syntax-highlightings-16.pb +62 -687
- package/.scannerwork/scanner-report/syntax-highlightings-17.pb +245 -67
- package/.scannerwork/scanner-report/syntax-highlightings-18.pb +83 -148
- package/.scannerwork/scanner-report/syntax-highlightings-19.pb +23 -145
- package/.scannerwork/scanner-report/syntax-highlightings-20.pb +93 -77
- package/.scannerwork/scanner-report/syntax-highlightings-21.pb +177 -20
- package/.scannerwork/scanner-report/syntax-highlightings-22.pb +207 -33
- package/.scannerwork/scanner-report/syntax-highlightings-24.pb +81 -0
- package/.scannerwork/scanner-report/{syntax-highlightings-38.pb → syntax-highlightings-25.pb} +103 -100
- package/.scannerwork/scanner-report/syntax-highlightings-27.pb +110 -0
- package/.scannerwork/scanner-report/syntax-highlightings-28.pb +107 -0
- package/.scannerwork/scanner-report/syntax-highlightings-3.pb +107 -108
- package/.scannerwork/scanner-report/syntax-highlightings-41.pb +590 -34
- package/.scannerwork/scanner-report/syntax-highlightings-42.pb +22 -61
- package/.scannerwork/scanner-report/syntax-highlightings-43.pb +246 -25
- package/.scannerwork/scanner-report/syntax-highlightings-44.pb +27 -209
- package/.scannerwork/scanner-report/syntax-highlightings-45.pb +95 -83
- package/.scannerwork/scanner-report/syntax-highlightings-46.pb +20 -23
- package/.scannerwork/scanner-report/syntax-highlightings-47.pb +67 -96
- package/.scannerwork/scanner-report/syntax-highlightings-48.pb +64 -176
- package/.scannerwork/scanner-report/syntax-highlightings-49.pb +606 -171
- package/.scannerwork/scanner-report/syntax-highlightings-50.pb +145 -57
- package/.scannerwork/scanner-report/syntax-highlightings-51.pb +263 -47
- package/.scannerwork/scanner-report/syntax-highlightings-52.pb +208 -16
- package/.scannerwork/scanner-report/syntax-highlightings-54.pb +119 -27
- package/.scannerwork/scanner-report/syntax-highlightings-55.pb +289 -3261
- package/.scannerwork/scanner-report/syntax-highlightings-56.pb +54 -0
- package/.scannerwork/scanner-report/syntax-highlightings-58.pb +178 -0
- package/.scannerwork/scanner-report/syntax-highlightings-59.pb +627 -0
- package/.scannerwork/scanner-report/syntax-highlightings-60.pb +48 -61
- package/.scannerwork/scanner-report/syntax-highlightings-62.pb +82 -0
- package/.scannerwork/scanner-report/syntax-highlightings-69.pb +62 -0
- package/.scannerwork/scanner-report/{syntax-highlightings-68.pb → syntax-highlightings-70.pb} +14 -13
- package/.scannerwork/scanner-report/syntax-highlightings-9.pb +3286 -226
- package/package.json +1 -1
- package/test-18-results.xml +147 -147
- package/test-20-results.xml +141 -141
- package/test-21-results.xml +143 -143
- package/test-iam-20-results.xml +49 -49
- package/.scannerwork/scanner-report/changesets-10.pb +0 -2
- package/.scannerwork/scanner-report/changesets-2.pb +0 -1
- package/.scannerwork/scanner-report/changesets-34.pb +0 -1
- package/.scannerwork/scanner-report/changesets-35.pb +0 -1
- package/.scannerwork/scanner-report/changesets-36.pb +0 -1
- package/.scannerwork/scanner-report/changesets-37.pb +0 -1
- package/.scannerwork/scanner-report/changesets-39.pb +0 -1
- package/.scannerwork/scanner-report/changesets-4.pb +0 -1
- package/.scannerwork/scanner-report/changesets-40.pb +0 -1
- package/.scannerwork/scanner-report/changesets-5.pb +0 -1
- package/.scannerwork/scanner-report/changesets-6.pb +0 -1
- package/.scannerwork/scanner-report/changesets-61.pb +0 -1
- package/.scannerwork/scanner-report/changesets-64.pb +0 -1
- package/.scannerwork/scanner-report/changesets-7.pb +0 -1
- package/.scannerwork/scanner-report/changesets-8.pb +0 -1
- package/.scannerwork/scanner-report/changesets-9.pb +0 -1
- package/.scannerwork/scanner-report/component-10.pb +0 -2
- package/.scannerwork/scanner-report/component-2.pb +0 -1
- package/.scannerwork/scanner-report/component-34.pb +0 -1
- package/.scannerwork/scanner-report/component-35.pb +0 -1
- package/.scannerwork/scanner-report/component-36.pb +0 -1
- package/.scannerwork/scanner-report/component-37.pb +0 -1
- package/.scannerwork/scanner-report/component-38.pb +0 -1
- package/.scannerwork/scanner-report/component-39.pb +0 -1
- package/.scannerwork/scanner-report/component-4.pb +0 -1
- package/.scannerwork/scanner-report/component-40.pb +0 -1
- package/.scannerwork/scanner-report/component-5.pb +0 -1
- package/.scannerwork/scanner-report/component-6.pb +0 -1
- package/.scannerwork/scanner-report/component-61.pb +0 -1
- package/.scannerwork/scanner-report/component-64.pb +0 -1
- package/.scannerwork/scanner-report/component-68.pb +0 -1
- package/.scannerwork/scanner-report/component-7.pb +0 -1
- package/.scannerwork/scanner-report/component-8.pb +0 -1
- package/.scannerwork/scanner-report/coverages-10.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-39.pb +0 -0
- package/.scannerwork/scanner-report/coverages-5.pb +0 -0
- package/.scannerwork/scanner-report/coverages-6.pb +0 -0
- package/.scannerwork/scanner-report/coverages-8.pb +0 -0
- package/.scannerwork/scanner-report/coverages-9.pb +0 -0
- package/.scannerwork/scanner-report/duplications-9.pb +0 -2
- package/.scannerwork/scanner-report/measures-10.pb +0 -0
- package/.scannerwork/scanner-report/measures-36.pb +0 -15
- package/.scannerwork/scanner-report/measures-37.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-5.pb +0 -0
- package/.scannerwork/scanner-report/measures-6.pb +0 -0
- package/.scannerwork/scanner-report/measures-8.pb +0 -0
- package/.scannerwork/scanner-report/source-10.txt +0 -37
- package/.scannerwork/scanner-report/source-36.txt +0 -151
- package/.scannerwork/scanner-report/source-37.txt +0 -75
- package/.scannerwork/scanner-report/source-39.txt +0 -129
- package/.scannerwork/scanner-report/source-4.txt +0 -187
- package/.scannerwork/scanner-report/source-6.txt +0 -329
- package/.scannerwork/scanner-report/source-8.txt +0 -62
- package/.scannerwork/scanner-report/symbols-10.pb +0 -9
- package/.scannerwork/scanner-report/symbols-36.pb +0 -93
- package/.scannerwork/scanner-report/symbols-37.pb +0 -39
- package/.scannerwork/scanner-report/symbols-39.pb +0 -33
- package/.scannerwork/scanner-report/symbols-5.pb +0 -8
- package/.scannerwork/scanner-report/symbols-6.pb +0 -353
- package/.scannerwork/scanner-report/symbols-8.pb +0 -24
- package/.scannerwork/scanner-report/symbols-9.pb +0 -203
- package/.scannerwork/scanner-report/syntax-highlightings-10.pb +0 -61
- package/.scannerwork/scanner-report/syntax-highlightings-36.pb +0 -237
- package/.scannerwork/scanner-report/syntax-highlightings-37.pb +0 -101
- package/.scannerwork/scanner-report/syntax-highlightings-39.pb +0 -129
- package/.scannerwork/scanner-report/syntax-highlightings-4.pb +0 -368
- package/.scannerwork/scanner-report/syntax-highlightings-5.pb +0 -49
- package/.scannerwork/scanner-report/syntax-highlightings-6.pb +0 -620
- package/.scannerwork/scanner-report/syntax-highlightings-8.pb +0 -97
- /package/.scannerwork/scanner-report/{coverages-40.pb → coverages-23.pb} +0 -0
- /package/.scannerwork/scanner-report/{coverages-2.pb → coverages-26.pb} +0 -0
- /package/.scannerwork/scanner-report/{coverages-34.pb → coverages-29.pb} +0 -0
- /package/.scannerwork/scanner-report/{coverages-7.pb → coverages-53.pb} +0 -0
- /package/.scannerwork/scanner-report/{coverages-4.pb → coverages-55.pb} +0 -0
- /package/.scannerwork/scanner-report/{coverages-35.pb → coverages-57.pb} +0 -0
- /package/.scannerwork/scanner-report/{coverages-61.pb → coverages-63.pb} +0 -0
- /package/.scannerwork/scanner-report/{coverages-64.pb → coverages-67.pb} +0 -0
- /package/.scannerwork/scanner-report/{duplications-10.pb → duplications-23.pb} +0 -0
- /package/.scannerwork/scanner-report/{duplications-2.pb → duplications-26.pb} +0 -0
- /package/.scannerwork/scanner-report/{duplications-34.pb → duplications-27.pb} +0 -0
- /package/.scannerwork/scanner-report/{duplications-35.pb → duplications-28.pb} +0 -0
- /package/.scannerwork/scanner-report/{duplications-36.pb → duplications-29.pb} +0 -0
- /package/.scannerwork/scanner-report/{duplications-37.pb → duplications-53.pb} +0 -0
- /package/.scannerwork/scanner-report/{duplications-4.pb → duplications-55.pb} +0 -0
- /package/.scannerwork/scanner-report/{duplications-39.pb → duplications-56.pb} +0 -0
- /package/.scannerwork/scanner-report/{duplications-40.pb → duplications-57.pb} +0 -0
- /package/.scannerwork/scanner-report/{duplications-46.pb → duplications-58.pb} +0 -0
- /package/.scannerwork/scanner-report/{duplications-6.pb → duplications-59.pb} +0 -0
- /package/.scannerwork/scanner-report/{duplications-61.pb → duplications-62.pb} +0 -0
- /package/.scannerwork/scanner-report/{duplications-7.pb → duplications-63.pb} +0 -0
- /package/.scannerwork/scanner-report/{duplications-64.pb → duplications-67.pb} +0 -0
- /package/.scannerwork/scanner-report/{duplications-8.pb → duplications-69.pb} +0 -0
- /package/.scannerwork/scanner-report/{issues-6.pb → issues-41.pb} +0 -0
- /package/.scannerwork/scanner-report/{issues-14.pb → issues-45.pb} +0 -0
- /package/.scannerwork/scanner-report/{issues-12.pb → issues-51.pb} +0 -0
- /package/.scannerwork/scanner-report/{issues-35.pb → issues-57.pb} +0 -0
- /package/.scannerwork/scanner-report/{measures-40.pb → measures-23.pb} +0 -0
- /package/.scannerwork/scanner-report/{measures-38.pb → measures-25.pb} +0 -0
- /package/.scannerwork/scanner-report/{measures-2.pb → measures-26.pb} +0 -0
- /package/.scannerwork/scanner-report/{measures-34.pb → measures-29.pb} +0 -0
- /package/.scannerwork/scanner-report/{measures-7.pb → measures-53.pb} +0 -0
- /package/.scannerwork/scanner-report/{measures-35.pb → measures-57.pb} +0 -0
- /package/.scannerwork/scanner-report/{measures-61.pb → measures-63.pb} +0 -0
- /package/.scannerwork/scanner-report/{measures-64.pb → measures-67.pb} +0 -0
- /package/.scannerwork/scanner-report/{measures-68.pb → measures-70.pb} +0 -0
- /package/.scannerwork/scanner-report/{source-40.txt → source-23.txt} +0 -0
- /package/.scannerwork/scanner-report/{source-2.txt → source-26.txt} +0 -0
- /package/.scannerwork/scanner-report/{source-34.txt → source-29.txt} +0 -0
- /package/.scannerwork/scanner-report/{source-7.txt → source-53.txt} +0 -0
- /package/.scannerwork/scanner-report/{source-35.txt → source-57.txt} +0 -0
- /package/.scannerwork/scanner-report/{source-61.txt → source-63.txt} +0 -0
- /package/.scannerwork/scanner-report/{source-64.txt → source-67.txt} +0 -0
- /package/.scannerwork/scanner-report/{symbols-40.pb → symbols-23.pb} +0 -0
- /package/.scannerwork/scanner-report/{symbols-2.pb → symbols-26.pb} +0 -0
- /package/.scannerwork/scanner-report/{symbols-34.pb → symbols-29.pb} +0 -0
- /package/.scannerwork/scanner-report/{symbols-7.pb → symbols-53.pb} +0 -0
- /package/.scannerwork/scanner-report/{symbols-4.pb → symbols-55.pb} +0 -0
- /package/.scannerwork/scanner-report/{symbols-35.pb → symbols-57.pb} +0 -0
- /package/.scannerwork/scanner-report/{symbols-61.pb → symbols-63.pb} +0 -0
- /package/.scannerwork/scanner-report/{symbols-64.pb → symbols-67.pb} +0 -0
- /package/.scannerwork/scanner-report/{syntax-highlightings-40.pb → syntax-highlightings-23.pb} +0 -0
- /package/.scannerwork/scanner-report/{syntax-highlightings-2.pb → syntax-highlightings-26.pb} +0 -0
- /package/.scannerwork/scanner-report/{syntax-highlightings-34.pb → syntax-highlightings-29.pb} +0 -0
- /package/.scannerwork/scanner-report/{syntax-highlightings-7.pb → syntax-highlightings-53.pb} +0 -0
- /package/.scannerwork/scanner-report/{syntax-highlightings-35.pb → syntax-highlightings-57.pb} +0 -0
- /package/.scannerwork/scanner-report/{syntax-highlightings-61.pb → syntax-highlightings-63.pb} +0 -0
- /package/.scannerwork/scanner-report/{syntax-highlightings-64.pb → syntax-highlightings-67.pb} +0 -0
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
// Copyright © 2017, 2021 IBM Corp. All rights reserved.
|
|
2
|
-
//
|
|
3
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
// you may not use this file except in compliance with the License.
|
|
5
|
-
// You may obtain a copy of the License at
|
|
6
|
-
//
|
|
7
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
//
|
|
9
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
// See the License for the specific language governing permissions and
|
|
13
|
-
// limitations under the License.
|
|
14
|
-
'use strict';
|
|
15
|
-
|
|
16
|
-
const cliutils = require('./cliutils.js');
|
|
17
|
-
const config = require('./config.js');
|
|
18
|
-
const error = require('./error.js');
|
|
19
|
-
const path = require('path');
|
|
20
|
-
const pkg = require('../package.json');
|
|
21
|
-
|
|
22
|
-
function parseBackupArgs() {
|
|
23
|
-
const program = require('commander');
|
|
24
|
-
|
|
25
|
-
// Option CLI defaults
|
|
26
|
-
const defaults = config.cliDefaults();
|
|
27
|
-
|
|
28
|
-
// Options set by environment variables
|
|
29
|
-
const envVarOptions = {};
|
|
30
|
-
config.applyEnvironmentVariables(envVarOptions);
|
|
31
|
-
|
|
32
|
-
program
|
|
33
|
-
.version(pkg.version)
|
|
34
|
-
.description('Backup a CouchDB/Cloudant database to a backup text file.')
|
|
35
|
-
.usage('[options...]')
|
|
36
|
-
.option('-b, --buffer-size <n>',
|
|
37
|
-
cliutils.getUsage('number of documents fetched at once', defaults.bufferSize),
|
|
38
|
-
Number)
|
|
39
|
-
.option('-d, --db <db>',
|
|
40
|
-
cliutils.getUsage('name of the database to backup', defaults.db))
|
|
41
|
-
.option('-k, --iam-api-key <API key>',
|
|
42
|
-
cliutils.getUsage('IAM API key to access the Cloudant server'))
|
|
43
|
-
.option('-l, --log <file>',
|
|
44
|
-
cliutils.getUsage('file to store logging information during backup; invalid in "shallow" mode', 'a temporary file'),
|
|
45
|
-
path.normalize)
|
|
46
|
-
.option('-m, --mode <mode>',
|
|
47
|
-
cliutils.getUsage('"shallow" if only a superficial backup is done (ignoring conflicts and revision tokens), else "full" for complete backup', defaults.mode),
|
|
48
|
-
(mode) => { return mode.toLowerCase(); })
|
|
49
|
-
.option('-o, --output <file>',
|
|
50
|
-
cliutils.getUsage('file name to store the backup data', 'stdout'),
|
|
51
|
-
path.normalize)
|
|
52
|
-
.option('-p, --parallelism <n>',
|
|
53
|
-
cliutils.getUsage('number of HTTP requests to perform in parallel when performing a backup; ignored in "shallow" mode', defaults.parallelism),
|
|
54
|
-
Number)
|
|
55
|
-
.option('-q, --quiet',
|
|
56
|
-
cliutils.getUsage('suppress batch messages', defaults.quiet))
|
|
57
|
-
.option('-r, --resume',
|
|
58
|
-
cliutils.getUsage('continue a previous backup from its last known position; invalid in "shallow" mode', defaults.resume))
|
|
59
|
-
.option('-t, --request-timeout <n>',
|
|
60
|
-
cliutils.getUsage('milliseconds to wait for a response to a HTTP request before retrying the request', defaults.requestTimeout),
|
|
61
|
-
Number)
|
|
62
|
-
.option('-u, --url <url>',
|
|
63
|
-
cliutils.getUsage('URL of the CouchDB/Cloudant server', defaults.url))
|
|
64
|
-
.parse(process.argv);
|
|
65
|
-
|
|
66
|
-
// Remove defaults that don't apply when using shallow mode
|
|
67
|
-
if (program.opts().mode === 'shallow' || envVarOptions.mode === 'shallow') {
|
|
68
|
-
delete defaults.parallelism;
|
|
69
|
-
delete defaults.log;
|
|
70
|
-
delete defaults.resume;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
// Apply the options in order so that the CLI overrides env vars and env variables
|
|
74
|
-
// override defaults.
|
|
75
|
-
const opts = Object.assign({}, defaults, envVarOptions, program.opts());
|
|
76
|
-
|
|
77
|
-
if (opts.resume && (opts.log === defaults.log)) {
|
|
78
|
-
// If resuming and the log file arg is the newly generated tmp name from defaults then we know that --log wasn't specified.
|
|
79
|
-
// We have to do this check here for the CLI case because of the default.
|
|
80
|
-
error.terminationCallback(new error.BackupError('NoLogFileName', 'To resume a backup, a log file must be specified'));
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
return opts;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
function parseRestoreArgs() {
|
|
87
|
-
const program = require('commander');
|
|
88
|
-
|
|
89
|
-
// Option CLI defaults
|
|
90
|
-
const defaults = config.cliDefaults();
|
|
91
|
-
|
|
92
|
-
// Options set by environment variables
|
|
93
|
-
const envVarOptions = {};
|
|
94
|
-
config.applyEnvironmentVariables(envVarOptions);
|
|
95
|
-
|
|
96
|
-
program
|
|
97
|
-
.version(pkg.version)
|
|
98
|
-
.description('Restore a CouchDB/Cloudant database from a backup text file.')
|
|
99
|
-
.usage('[options...]')
|
|
100
|
-
.option('-b, --buffer-size <n>',
|
|
101
|
-
cliutils.getUsage('number of documents restored at once', defaults.bufferSize),
|
|
102
|
-
Number)
|
|
103
|
-
.option('-d, --db <db>',
|
|
104
|
-
cliutils.getUsage('name of the new, existing database to restore to', defaults.db))
|
|
105
|
-
.option('-k, --iam-api-key <API key>',
|
|
106
|
-
cliutils.getUsage('IAM API key to access the Cloudant server'))
|
|
107
|
-
.option('-p, --parallelism <n>',
|
|
108
|
-
cliutils.getUsage('number of HTTP requests to perform in parallel when restoring a backup', defaults.parallelism),
|
|
109
|
-
Number)
|
|
110
|
-
.option('-q, --quiet',
|
|
111
|
-
cliutils.getUsage('suppress batch messages', defaults.quiet))
|
|
112
|
-
.option('-t, --request-timeout <n>',
|
|
113
|
-
cliutils.getUsage('milliseconds to wait for a response to a HTTP request before retrying the request', defaults.requestTimeout),
|
|
114
|
-
Number)
|
|
115
|
-
.option('-u, --url <url>',
|
|
116
|
-
cliutils.getUsage('URL of the CouchDB/Cloudant server', defaults.url))
|
|
117
|
-
.parse(process.argv);
|
|
118
|
-
|
|
119
|
-
// Apply the options in order so that the CLI overrides env vars and env variables
|
|
120
|
-
// override defaults.
|
|
121
|
-
const opts = Object.assign({}, defaults, envVarOptions, program.opts());
|
|
122
|
-
|
|
123
|
-
return opts;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
module.exports = {
|
|
127
|
-
parseBackupArgs: parseBackupArgs,
|
|
128
|
-
parseRestoreArgs: parseRestoreArgs
|
|
129
|
-
};
|
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
// Copyright © 2017, 2023 IBM Corp. All rights reserved.
|
|
2
|
-
//
|
|
3
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
// you may not use this file except in compliance with the License.
|
|
5
|
-
// You may obtain a copy of the License at
|
|
6
|
-
//
|
|
7
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
//
|
|
9
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
// See the License for the specific language governing permissions and
|
|
13
|
-
// limitations under the License.
|
|
14
|
-
|
|
15
|
-
/* global describe it */
|
|
16
|
-
'use strict';
|
|
17
|
-
|
|
18
|
-
const assert = require('assert');
|
|
19
|
-
const backup = require('../app.js').backup;
|
|
20
|
-
const fs = require('fs');
|
|
21
|
-
const nock = require('nock');
|
|
22
|
-
const util = require('util');
|
|
23
|
-
const backupPromise = util.promisify(backup);
|
|
24
|
-
|
|
25
|
-
const goodUrl = 'http://localhost:5984/db';
|
|
26
|
-
// The real validateArgs function of app.js isn't
|
|
27
|
-
// exported - so we call the exported backup method
|
|
28
|
-
// instead. We don't get as far as a real backup when
|
|
29
|
-
// testing error cases. For success cases we nock the
|
|
30
|
-
// goodUrl and
|
|
31
|
-
const validateArgs = async function(url, opts, errorValidationForAssertRejects) {
|
|
32
|
-
const nullStream = fs.createWriteStream('/dev/null');
|
|
33
|
-
if (url === goodUrl) {
|
|
34
|
-
// Nock the goodUrl
|
|
35
|
-
nock(goodUrl).head('').reply(404, { error: 'not_found', reason: 'missing' });
|
|
36
|
-
}
|
|
37
|
-
return assert.rejects(backupPromise(url, nullStream, opts), errorValidationForAssertRejects);
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
const validateShallowModeArgs = async function(url, opts, msg) {
|
|
41
|
-
// We pass assertNoValidationError because for these shallow opts
|
|
42
|
-
// we are expecting only a stderr warning
|
|
43
|
-
return validateArgs(url, opts, assertNoValidationError()).then(() => {
|
|
44
|
-
// Assert the warning message was in stderr
|
|
45
|
-
assert(capturedStderr.indexOf(msg) > -1, 'Log warning message was not present');
|
|
46
|
-
});
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
const stderrWriteFun = process.stderr.write;
|
|
50
|
-
let capturedStderr;
|
|
51
|
-
|
|
52
|
-
function captureStderr() {
|
|
53
|
-
process.stderr.write = function(string, encoding, fd) {
|
|
54
|
-
capturedStderr += string;
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
function releaseStderr() {
|
|
59
|
-
process.stderr.write = stderrWriteFun;
|
|
60
|
-
capturedStderr = null;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
// Return a validation object for use with assert.rejects
|
|
64
|
-
function assertErrorMessage(msg) {
|
|
65
|
-
return { name: 'InvalidOption', message: msg };
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
// For cases where validation should pass we reach a real backup that hits a 404
|
|
69
|
-
// mock for a DatabaseNotFound, so that it is the expected in the case assertNoValidationError
|
|
70
|
-
function assertNoValidationError() { return { name: 'DatabaseNotFound' }; }
|
|
71
|
-
|
|
72
|
-
describe('#unit Validate arguments', function() {
|
|
73
|
-
it('returns error for invalid URL type', async function() {
|
|
74
|
-
return validateArgs(true, {}, assertErrorMessage('Invalid URL, must be type string'));
|
|
75
|
-
});
|
|
76
|
-
it('returns no error for valid URL type', async function() {
|
|
77
|
-
return validateArgs(goodUrl, {}, assertNoValidationError());
|
|
78
|
-
});
|
|
79
|
-
it('returns error for invalid (no host) URL', async function() {
|
|
80
|
-
return validateArgs('http://', {}, assertErrorMessage('Invalid URL'));
|
|
81
|
-
});
|
|
82
|
-
it('returns error for invalid (no protocol) URL', async function() {
|
|
83
|
-
return validateArgs('invalid', {}, assertErrorMessage('Invalid URL'));
|
|
84
|
-
});
|
|
85
|
-
it('returns error for invalid (wrong protocol) URL', async function() {
|
|
86
|
-
return validateArgs('ftp://invalid.example.com', {}, assertErrorMessage('Invalid URL protocol.'));
|
|
87
|
-
});
|
|
88
|
-
it('returns error for invalid (no path) URL', async function() {
|
|
89
|
-
return validateArgs('https://invalid.example.com', {}, assertErrorMessage('Invalid URL, missing path element (no database).'));
|
|
90
|
-
});
|
|
91
|
-
it('returns error for invalid (no protocol, no host) URL', async function() {
|
|
92
|
-
return validateArgs('invalid', {}, assertErrorMessage('Invalid URL'));
|
|
93
|
-
});
|
|
94
|
-
it('returns error for invalid buffer size type', async function() {
|
|
95
|
-
return validateArgs(goodUrl, { bufferSize: '123' }, assertErrorMessage('Invalid buffer size option, must be a positive integer in the range (0, MAX_SAFE_INTEGER]'));
|
|
96
|
-
});
|
|
97
|
-
it('returns error for zero buffer size', async function() {
|
|
98
|
-
return validateArgs(goodUrl, { bufferSize: 0 }, assertErrorMessage('Invalid buffer size option, must be a positive integer in the range (0, MAX_SAFE_INTEGER]'));
|
|
99
|
-
});
|
|
100
|
-
it('returns error for float buffer size', async function() {
|
|
101
|
-
return validateArgs(goodUrl, { bufferSize: 1.23 }, assertErrorMessage('Invalid buffer size option, must be a positive integer in the range (0, MAX_SAFE_INTEGER]'));
|
|
102
|
-
});
|
|
103
|
-
it('returns no error for valid buffer size type', async function() {
|
|
104
|
-
return validateArgs(goodUrl, { bufferSize: 123 }, assertNoValidationError());
|
|
105
|
-
});
|
|
106
|
-
it('returns error for invalid log type', async function() {
|
|
107
|
-
return validateArgs(goodUrl, { log: true }, assertErrorMessage('Invalid log option, must be type string'));
|
|
108
|
-
});
|
|
109
|
-
it('returns no error for valid log type', async function() {
|
|
110
|
-
return validateArgs(goodUrl, { log: 'log.txt' }, assertNoValidationError());
|
|
111
|
-
});
|
|
112
|
-
it('returns error for invalid mode type', async function() {
|
|
113
|
-
return validateArgs(goodUrl, { mode: true }, assertErrorMessage('Invalid mode option, must be either "full" or "shallow"'));
|
|
114
|
-
});
|
|
115
|
-
it('returns error for invalid mode string', async function() {
|
|
116
|
-
return validateArgs(goodUrl, { mode: 'foobar' }, assertErrorMessage('Invalid mode option, must be either "full" or "shallow"'));
|
|
117
|
-
});
|
|
118
|
-
it('returns no error for valid mode type', async function() {
|
|
119
|
-
return validateArgs(goodUrl, { mode: 'full' }, assertNoValidationError());
|
|
120
|
-
});
|
|
121
|
-
it('returns error for invalid output type', async function() {
|
|
122
|
-
return validateArgs(goodUrl, { output: true }, assertErrorMessage('Invalid output option, must be type string'));
|
|
123
|
-
});
|
|
124
|
-
it('returns no error for valid output type', async function() {
|
|
125
|
-
return validateArgs(goodUrl, { output: 'output.txt' }, assertNoValidationError());
|
|
126
|
-
});
|
|
127
|
-
it('returns error for invalid parallelism type', async function() {
|
|
128
|
-
return validateArgs(goodUrl, { parallelism: '123' }, assertErrorMessage('Invalid parallelism option, must be a positive integer in the range (0, MAX_SAFE_INTEGER]'));
|
|
129
|
-
});
|
|
130
|
-
it('returns error for zero parallelism', async function() {
|
|
131
|
-
return validateArgs(goodUrl, { parallelism: 0 }, assertErrorMessage('Invalid parallelism option, must be a positive integer in the range (0, MAX_SAFE_INTEGER]'));
|
|
132
|
-
});
|
|
133
|
-
it('returns error for float parallelism', async function() {
|
|
134
|
-
return validateArgs(goodUrl, { parallelism: 1.23 }, assertErrorMessage('Invalid parallelism option, must be a positive integer in the range (0, MAX_SAFE_INTEGER]'));
|
|
135
|
-
});
|
|
136
|
-
it('returns no error for valid parallelism type', async function() {
|
|
137
|
-
return validateArgs(goodUrl, { parallelism: 123 }, assertNoValidationError());
|
|
138
|
-
});
|
|
139
|
-
it('returns error for invalid request timeout type', async function() {
|
|
140
|
-
return validateArgs(goodUrl, { requestTimeout: '123' }, assertErrorMessage('Invalid request timeout option, must be a positive integer in the range (0, MAX_SAFE_INTEGER]'));
|
|
141
|
-
});
|
|
142
|
-
it('returns error for zero request timeout', async function() {
|
|
143
|
-
return validateArgs(goodUrl, { requestTimeout: 0 }, assertErrorMessage('Invalid request timeout option, must be a positive integer in the range (0, MAX_SAFE_INTEGER]'));
|
|
144
|
-
});
|
|
145
|
-
it('returns error for float request timout', async function() {
|
|
146
|
-
return validateArgs(goodUrl, { requestTimeout: 1.23 }, assertErrorMessage('Invalid request timeout option, must be a positive integer in the range (0, MAX_SAFE_INTEGER]'));
|
|
147
|
-
});
|
|
148
|
-
it('returns no error for valid request timeout type', async function() {
|
|
149
|
-
return validateArgs(goodUrl, { requestTimeout: 123 }, assertNoValidationError());
|
|
150
|
-
});
|
|
151
|
-
it('returns error for invalid resume type', async function() {
|
|
152
|
-
return validateArgs(goodUrl, { resume: 'true' }, assertErrorMessage('Invalid resume option, must be type boolean'));
|
|
153
|
-
});
|
|
154
|
-
it('returns no error for valid resume type', async function() {
|
|
155
|
-
return validateArgs(goodUrl, { resume: false }, assertNoValidationError());
|
|
156
|
-
});
|
|
157
|
-
it('returns error for invalid key type', async function() {
|
|
158
|
-
return validateArgs(goodUrl, { iamApiKey: true }, assertErrorMessage('Invalid iamApiKey option, must be type string'));
|
|
159
|
-
});
|
|
160
|
-
it('returns error for key and URL credentials supplied', async function() {
|
|
161
|
-
return validateArgs('https://a:b@example.com/db', { iamApiKey: 'abc123' }, assertErrorMessage('URL user information must not be supplied when using IAM API key.'));
|
|
162
|
-
});
|
|
163
|
-
it('warns for log arg in shallow mode', async function() {
|
|
164
|
-
captureStderr();
|
|
165
|
-
return validateShallowModeArgs(goodUrl, { mode: 'shallow', log: 'test' },
|
|
166
|
-
'the options "log" and "resume" are invalid when using shallow mode.').finally(
|
|
167
|
-
() => {
|
|
168
|
-
releaseStderr();
|
|
169
|
-
});
|
|
170
|
-
});
|
|
171
|
-
it('warns for resume arg in shallow mode', async function() {
|
|
172
|
-
captureStderr();
|
|
173
|
-
return validateShallowModeArgs(goodUrl, { mode: 'shallow', log: 'test', resume: true },
|
|
174
|
-
'the options "log" and "resume" are invalid when using shallow mode.').finally(
|
|
175
|
-
() => {
|
|
176
|
-
releaseStderr();
|
|
177
|
-
});
|
|
178
|
-
});
|
|
179
|
-
it('warns for parallelism arg in shallow mode', async function() {
|
|
180
|
-
captureStderr();
|
|
181
|
-
return validateShallowModeArgs(goodUrl, { mode: 'shallow', parallelism: 10 },
|
|
182
|
-
'the option "parallelism" has no effect when using shallow mode.').finally(
|
|
183
|
-
() => {
|
|
184
|
-
releaseStderr();
|
|
185
|
-
});
|
|
186
|
-
});
|
|
187
|
-
});
|
|
@@ -1,329 +0,0 @@
|
|
|
1
|
-
// Copyright © 2017, 2023 IBM Corp. All rights reserved.
|
|
2
|
-
//
|
|
3
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
// you may not use this file except in compliance with the License.
|
|
5
|
-
// You may obtain a copy of the License at
|
|
6
|
-
//
|
|
7
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
//
|
|
9
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
// See the License for the specific language governing permissions and
|
|
13
|
-
// limitations under the License.
|
|
14
|
-
|
|
15
|
-
/* global describe afterEach before after it */
|
|
16
|
-
'use strict';
|
|
17
|
-
|
|
18
|
-
const assert = require('assert');
|
|
19
|
-
const parser = require('../includes/parser.js');
|
|
20
|
-
|
|
21
|
-
describe('#unit Default parameters', function() {
|
|
22
|
-
let processEnvCopy;
|
|
23
|
-
let processArgvCopy;
|
|
24
|
-
|
|
25
|
-
before('Set process data for test', function() {
|
|
26
|
-
// Copy env and argv so we can reset them after the tests
|
|
27
|
-
processEnvCopy = JSON.parse(JSON.stringify(process.env));
|
|
28
|
-
processArgvCopy = JSON.parse(JSON.stringify(process.argv));
|
|
29
|
-
|
|
30
|
-
// setup environment variables
|
|
31
|
-
process.env.COUCH_URL = 'http://user:pass@myurl.com';
|
|
32
|
-
process.env.COUCH_DATABASE = 'mydb';
|
|
33
|
-
process.env.COUCH_BUFFER_SIZE = '1000';
|
|
34
|
-
process.env.COUCH_PARALLELISM = '20';
|
|
35
|
-
process.env.COUCH_REQUEST_TIMEOUT = '20000';
|
|
36
|
-
process.env.COUCH_LOG = 'my.log';
|
|
37
|
-
process.env.COUCH_RESUME = 'true';
|
|
38
|
-
process.env.COUCH_OUTPUT = 'myfile.txt';
|
|
39
|
-
process.env.COUCH_MODE = 'shallow';
|
|
40
|
-
process.env.CLOUDANT_IAM_API_KEY = 'ABC123-ZYX987_cba789-xyz321';
|
|
41
|
-
process.env.COUCH_QUIET = 'true';
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
after('Reset process data', function() {
|
|
45
|
-
process.env = processEnvCopy;
|
|
46
|
-
process.argv = processArgvCopy;
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
afterEach(function() {
|
|
50
|
-
delete require.cache[require.resolve('commander')];
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
describe('Backup command-line', function() {
|
|
54
|
-
it('respects the COUCH_URL env variable if the --url backup command-line parameter is missing', function() {
|
|
55
|
-
process.argv = ['node', 'test'];
|
|
56
|
-
const program = parser.parseBackupArgs();
|
|
57
|
-
assert.strictEqual(typeof program.url, 'string');
|
|
58
|
-
assert.strictEqual(program.url, process.env.COUCH_URL);
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
it('respects the COUCH_DATABASE env variable if the --db backup command-line parameter is missing', function() {
|
|
62
|
-
process.argv = ['node', 'test'];
|
|
63
|
-
const program = parser.parseBackupArgs();
|
|
64
|
-
assert.strictEqual(typeof program.db, 'string');
|
|
65
|
-
assert.strictEqual(program.db, process.env.COUCH_DATABASE);
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
it('respects the COUCH_BUFFER_SIZE env variable if the --buffer-size backup command-line parameter is missing', function() {
|
|
69
|
-
process.argv = ['node', 'test'];
|
|
70
|
-
const program = parser.parseBackupArgs();
|
|
71
|
-
assert.strictEqual(typeof program.bufferSize, 'number');
|
|
72
|
-
assert.strictEqual(program.bufferSize, parseInt(process.env.COUCH_BUFFER_SIZE, 10));
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
it('respects the COUCH_PARALLELISM env variable if the --parallelism backup command-line parameter is missing', function() {
|
|
76
|
-
process.argv = ['node', 'test'];
|
|
77
|
-
const program = parser.parseBackupArgs();
|
|
78
|
-
assert.strictEqual(typeof program.parallelism, 'number');
|
|
79
|
-
assert.strictEqual(program.parallelism, parseInt(process.env.COUCH_PARALLELISM, 10));
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
it('respects the COUCH_REQUEST_TIMEOUT env variable if the --request-timeout backup command-line parameter is missing', function() {
|
|
83
|
-
process.argv = ['node', 'test'];
|
|
84
|
-
const program = parser.parseBackupArgs();
|
|
85
|
-
assert.strictEqual(typeof program.requestTimeout, 'number');
|
|
86
|
-
assert.strictEqual(program.requestTimeout, parseInt(process.env.COUCH_REQUEST_TIMEOUT, 10));
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
it('respects the CLOUDANT_IAM_API_KEY env variable if the --iam-api-key backup command-line parameter is missing', function() {
|
|
90
|
-
process.argv = ['node', 'test'];
|
|
91
|
-
const program = parser.parseBackupArgs();
|
|
92
|
-
assert.strictEqual(typeof program.iamApiKey, 'string');
|
|
93
|
-
assert.strictEqual(program.iamApiKey, process.env.CLOUDANT_IAM_API_KEY);
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
it('respects the COUCH_LOG env variable if the --log backup command-line parameter is missing', function() {
|
|
97
|
-
process.argv = ['node', 'test'];
|
|
98
|
-
const program = parser.parseBackupArgs();
|
|
99
|
-
assert.strictEqual(typeof program.log, 'string');
|
|
100
|
-
assert.strictEqual(program.log, process.env.COUCH_LOG);
|
|
101
|
-
});
|
|
102
|
-
|
|
103
|
-
it('respects the COUCH_RESUME env variable if the --resume backup command-line parameter is missing', function() {
|
|
104
|
-
process.argv = ['node', 'test'];
|
|
105
|
-
const program = parser.parseBackupArgs();
|
|
106
|
-
assert.strictEqual(typeof program.resume, 'boolean');
|
|
107
|
-
assert.strictEqual(program.resume, true);
|
|
108
|
-
});
|
|
109
|
-
|
|
110
|
-
it('respects the COUCH_OUTPUT env variable if the --output backup command-line parameter is missing', function() {
|
|
111
|
-
process.argv = ['node', 'test'];
|
|
112
|
-
const program = parser.parseBackupArgs();
|
|
113
|
-
assert.strictEqual(typeof program.output, 'string');
|
|
114
|
-
assert.strictEqual(program.output, process.env.COUCH_OUTPUT);
|
|
115
|
-
});
|
|
116
|
-
|
|
117
|
-
it('respects the COUCH_MODE env variable if the --mode backup command-line parameter is missing', function() {
|
|
118
|
-
process.argv = ['node', 'test'];
|
|
119
|
-
const program = parser.parseBackupArgs();
|
|
120
|
-
assert.strictEqual(typeof program.mode, 'string');
|
|
121
|
-
assert.strictEqual(program.mode, process.env.COUCH_MODE);
|
|
122
|
-
});
|
|
123
|
-
|
|
124
|
-
it('respects the COUCH_QUIET env variable if the --quiet backup command-line parameter is missing', function() {
|
|
125
|
-
process.argv = ['node', 'test'];
|
|
126
|
-
const program = parser.parseBackupArgs();
|
|
127
|
-
assert.strictEqual(typeof program.quiet, 'boolean');
|
|
128
|
-
assert.strictEqual(program.quiet, true);
|
|
129
|
-
});
|
|
130
|
-
|
|
131
|
-
it('respects the backup --url command-line parameter', function() {
|
|
132
|
-
const url = 'http://user:pass@myurl2.com';
|
|
133
|
-
process.argv = ['node', 'test', '--url', url];
|
|
134
|
-
const program = parser.parseBackupArgs();
|
|
135
|
-
assert.strictEqual(typeof program.url, 'string');
|
|
136
|
-
assert.strictEqual(program.url, url);
|
|
137
|
-
});
|
|
138
|
-
|
|
139
|
-
it('respects the backup --db command-line parameter', function() {
|
|
140
|
-
const db = 'mydb2';
|
|
141
|
-
process.argv = ['node', 'test', '--db', db];
|
|
142
|
-
const program = parser.parseBackupArgs();
|
|
143
|
-
assert.strictEqual(typeof program.db, 'string');
|
|
144
|
-
assert.strictEqual(program.db, db);
|
|
145
|
-
});
|
|
146
|
-
|
|
147
|
-
it('respects the backup --buffer-size command-line parameter', function() {
|
|
148
|
-
const bufferSize = 500;
|
|
149
|
-
process.argv = ['node', 'test', '--buffer-size', bufferSize];
|
|
150
|
-
const program = parser.parseBackupArgs();
|
|
151
|
-
assert.strictEqual(typeof program.bufferSize, 'number');
|
|
152
|
-
assert.strictEqual(program.bufferSize, bufferSize);
|
|
153
|
-
});
|
|
154
|
-
|
|
155
|
-
it('respects the backup --parallelism command-line parameter', function() {
|
|
156
|
-
const parallelism = 10;
|
|
157
|
-
process.argv = ['node', 'test', '--parallelism', parallelism];
|
|
158
|
-
const program = parser.parseBackupArgs();
|
|
159
|
-
assert.strictEqual(typeof program.parallelism, 'number');
|
|
160
|
-
assert.strictEqual(program.parallelism, parallelism);
|
|
161
|
-
});
|
|
162
|
-
|
|
163
|
-
it('respects the backup --request-timeout command-line parameter', function() {
|
|
164
|
-
const requestTimeout = 10000;
|
|
165
|
-
process.argv = ['node', 'test', '--request-timeout', requestTimeout];
|
|
166
|
-
const program = parser.parseBackupArgs();
|
|
167
|
-
assert.strictEqual(typeof program.requestTimeout, 'number');
|
|
168
|
-
assert.strictEqual(program.requestTimeout, requestTimeout);
|
|
169
|
-
});
|
|
170
|
-
|
|
171
|
-
it('respects the backup --iam-api-key command-line parameter', function() {
|
|
172
|
-
const key = '123abc-789zyx_CBA987-XYZ321';
|
|
173
|
-
process.argv = ['node', 'test', '--iam-api-key', key];
|
|
174
|
-
const program = parser.parseBackupArgs();
|
|
175
|
-
assert.strictEqual(typeof program.iamApiKey, 'string');
|
|
176
|
-
assert.strictEqual(program.iamApiKey, key);
|
|
177
|
-
});
|
|
178
|
-
|
|
179
|
-
it('respects the backup --log command-line parameter', function() {
|
|
180
|
-
const filename = 'my2.log';
|
|
181
|
-
process.argv = ['node', 'test', '--log', filename];
|
|
182
|
-
const program = parser.parseBackupArgs();
|
|
183
|
-
assert.strictEqual(typeof program.log, 'string');
|
|
184
|
-
assert.strictEqual(program.log, filename);
|
|
185
|
-
});
|
|
186
|
-
|
|
187
|
-
it('respects the backup --resume command-line parameter', function() {
|
|
188
|
-
process.argv = ['node', 'test', '--resume'];
|
|
189
|
-
const program = parser.parseBackupArgs();
|
|
190
|
-
assert.strictEqual(typeof program.resume, 'boolean');
|
|
191
|
-
assert.strictEqual(program.resume, true);
|
|
192
|
-
});
|
|
193
|
-
|
|
194
|
-
it('respects the backup --output command-line parameter', function() {
|
|
195
|
-
const filename = 'myfile2.txt';
|
|
196
|
-
process.argv = ['node', 'test', '--output', filename];
|
|
197
|
-
const program = parser.parseBackupArgs();
|
|
198
|
-
assert.strictEqual(typeof program.output, 'string');
|
|
199
|
-
assert.strictEqual(program.output, filename);
|
|
200
|
-
});
|
|
201
|
-
|
|
202
|
-
it('respects the backup --mode full command-line parameter', function() {
|
|
203
|
-
process.argv = ['node', 'test', '--mode', 'full'];
|
|
204
|
-
const program = parser.parseBackupArgs();
|
|
205
|
-
assert.strictEqual(typeof program.mode, 'string');
|
|
206
|
-
assert.strictEqual(program.mode, 'full');
|
|
207
|
-
});
|
|
208
|
-
|
|
209
|
-
it('respects the backup --mode shallow command-line parameter', function() {
|
|
210
|
-
process.argv = ['node', 'test', '--mode', 'shallow'];
|
|
211
|
-
const program = parser.parseBackupArgs();
|
|
212
|
-
assert.strictEqual(typeof program.mode, 'string');
|
|
213
|
-
assert.strictEqual(program.mode, 'shallow');
|
|
214
|
-
});
|
|
215
|
-
|
|
216
|
-
it('respects the backup --quiet command-line parameter', function() {
|
|
217
|
-
process.argv = ['node', 'test', '--quiet'];
|
|
218
|
-
const program = parser.parseBackupArgs();
|
|
219
|
-
assert.strictEqual(typeof program.quiet, 'boolean');
|
|
220
|
-
assert.strictEqual(program.quiet, true);
|
|
221
|
-
});
|
|
222
|
-
});
|
|
223
|
-
|
|
224
|
-
describe('Restore command-line', function() {
|
|
225
|
-
it('respects the COUCH_URL env variable if the --url restore command-line parameter is missing', function() {
|
|
226
|
-
process.argv = ['node', 'test'];
|
|
227
|
-
const program = parser.parseRestoreArgs();
|
|
228
|
-
assert.strictEqual(typeof program.url, 'string');
|
|
229
|
-
assert.strictEqual(program.url, process.env.COUCH_URL);
|
|
230
|
-
});
|
|
231
|
-
|
|
232
|
-
it('respects the COUCH_DATABASE env variable if the --db restore command-line parameter is missing', function() {
|
|
233
|
-
process.argv = ['node', 'test'];
|
|
234
|
-
const program = parser.parseRestoreArgs();
|
|
235
|
-
assert.strictEqual(typeof program.db, 'string');
|
|
236
|
-
assert.strictEqual(program.db, process.env.COUCH_DATABASE);
|
|
237
|
-
});
|
|
238
|
-
|
|
239
|
-
it('respects the COUCH_BUFFER_SIZE env variable if the --buffer-size restore command-line parameter is missing', function() {
|
|
240
|
-
process.argv = ['node', 'test'];
|
|
241
|
-
const program = parser.parseRestoreArgs();
|
|
242
|
-
assert.strictEqual(typeof program.bufferSize, 'number');
|
|
243
|
-
assert.strictEqual(program.bufferSize, parseInt(process.env.COUCH_BUFFER_SIZE, 10));
|
|
244
|
-
});
|
|
245
|
-
|
|
246
|
-
it('respects the COUCH_PARALLELISM env variable if the --parallelism restore command-line parameter is missing', function() {
|
|
247
|
-
process.argv = ['node', 'test'];
|
|
248
|
-
const program = parser.parseRestoreArgs();
|
|
249
|
-
assert.strictEqual(typeof program.parallelism, 'number');
|
|
250
|
-
assert.strictEqual(program.parallelism, parseInt(process.env.COUCH_PARALLELISM, 10));
|
|
251
|
-
});
|
|
252
|
-
|
|
253
|
-
it('respects the COUCH_REQUEST_TIMEOUT env variable if the --request-timeout restore command-line parameter is missing', function() {
|
|
254
|
-
process.argv = ['node', 'test'];
|
|
255
|
-
const program = parser.parseRestoreArgs();
|
|
256
|
-
assert.strictEqual(typeof program.requestTimeout, 'number');
|
|
257
|
-
assert.strictEqual(program.requestTimeout, parseInt(process.env.COUCH_REQUEST_TIMEOUT, 10));
|
|
258
|
-
});
|
|
259
|
-
|
|
260
|
-
it('respects the CLOUDANT_IAM_API_KEY env variable if the --iam-api-key restore command-line parameter is missing', function() {
|
|
261
|
-
process.argv = ['node', 'test'];
|
|
262
|
-
const program = parser.parseRestoreArgs();
|
|
263
|
-
assert.strictEqual(typeof program.iamApiKey, 'string');
|
|
264
|
-
assert.strictEqual(program.iamApiKey, process.env.CLOUDANT_IAM_API_KEY);
|
|
265
|
-
});
|
|
266
|
-
|
|
267
|
-
it('respects the COUCH_QUIET env variable if the --quiet restorer command-line parameter is missing', function() {
|
|
268
|
-
process.argv = ['node', 'test'];
|
|
269
|
-
const program = parser.parseBackupArgs();
|
|
270
|
-
assert.strictEqual(typeof program.quiet, 'boolean');
|
|
271
|
-
assert.strictEqual(program.quiet, true);
|
|
272
|
-
});
|
|
273
|
-
|
|
274
|
-
it('respects the restore --url command-line parameter', function() {
|
|
275
|
-
const url = 'https://a:b@myurl3.com';
|
|
276
|
-
process.argv = ['node', 'test', '--url', url];
|
|
277
|
-
const program = parser.parseRestoreArgs();
|
|
278
|
-
assert.strictEqual(typeof program.url, 'string');
|
|
279
|
-
assert.strictEqual(program.url, url);
|
|
280
|
-
});
|
|
281
|
-
|
|
282
|
-
it('respects the restore --db command-line parameter', function() {
|
|
283
|
-
const db = 'mydb3';
|
|
284
|
-
process.argv = ['node', 'test', '--db', db];
|
|
285
|
-
const program = parser.parseRestoreArgs();
|
|
286
|
-
assert.strictEqual(typeof program.db, 'string');
|
|
287
|
-
assert.strictEqual(program.db, db);
|
|
288
|
-
});
|
|
289
|
-
|
|
290
|
-
it('respects the restore --buffer-size command-line parameter', function() {
|
|
291
|
-
const bufferSize = 250;
|
|
292
|
-
process.argv = ['node', 'test', '--buffer-size', bufferSize];
|
|
293
|
-
const program = parser.parseRestoreArgs();
|
|
294
|
-
assert.strictEqual(typeof program.bufferSize, 'number');
|
|
295
|
-
assert.strictEqual(program.bufferSize, bufferSize);
|
|
296
|
-
});
|
|
297
|
-
|
|
298
|
-
it('respects the restore --parallelism command-line parameter', function() {
|
|
299
|
-
const parallelism = 5;
|
|
300
|
-
process.argv = ['node', 'test', '--parallelism', parallelism];
|
|
301
|
-
const program = parser.parseRestoreArgs();
|
|
302
|
-
assert.strictEqual(typeof program.parallelism, 'number');
|
|
303
|
-
assert.strictEqual(program.parallelism, parallelism);
|
|
304
|
-
});
|
|
305
|
-
|
|
306
|
-
it('respects the restore --request-timeout command-line parameter', function() {
|
|
307
|
-
const requestTimeout = 10000;
|
|
308
|
-
process.argv = ['node', 'test', '--request-timeout', requestTimeout];
|
|
309
|
-
const program = parser.parseRestoreArgs();
|
|
310
|
-
assert.strictEqual(typeof program.requestTimeout, 'number');
|
|
311
|
-
assert.strictEqual(program.requestTimeout, requestTimeout);
|
|
312
|
-
});
|
|
313
|
-
|
|
314
|
-
it('respects the restore --iam-api-key command-line parameter', function() {
|
|
315
|
-
const key = '123abc-789zyx_CBA987-XYZ321';
|
|
316
|
-
process.argv = ['node', 'test', '--iam-api-key', key];
|
|
317
|
-
const program = parser.parseRestoreArgs();
|
|
318
|
-
assert.strictEqual(typeof program.iamApiKey, 'string');
|
|
319
|
-
assert.strictEqual(program.iamApiKey, key);
|
|
320
|
-
});
|
|
321
|
-
|
|
322
|
-
it('respects the restore --quiet command-line parameter', function() {
|
|
323
|
-
process.argv = ['node', 'test', '--quiet'];
|
|
324
|
-
const program = parser.parseRestoreArgs();
|
|
325
|
-
assert.strictEqual(typeof program.quiet, 'boolean');
|
|
326
|
-
assert.strictEqual(program.quiet, true);
|
|
327
|
-
});
|
|
328
|
-
});
|
|
329
|
-
});
|