@cloudant/couchbackup 2.9.16 → 2.9.17-SNAPSHOT.186
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-3.pb +1 -0
- package/.scannerwork/scanner-report/changesets-38.pb +1 -0
- package/.scannerwork/scanner-report/changesets-53.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-68.pb +1 -0
- package/.scannerwork/scanner-report/component-1.pb +2 -2
- package/.scannerwork/scanner-report/component-10.pb +1 -1
- 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-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-3.pb +1 -1
- package/.scannerwork/scanner-report/component-34.pb +1 -1
- package/.scannerwork/scanner-report/component-35.pb +1 -1
- package/.scannerwork/scanner-report/component-36.pb +1 -1
- package/.scannerwork/scanner-report/component-37.pb +1 -1
- package/.scannerwork/scanner-report/component-38.pb +1 -1
- package/.scannerwork/scanner-report/component-39.pb +1 -1
- package/.scannerwork/scanner-report/component-40.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-5.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-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-6.pb +1 -1
- package/.scannerwork/scanner-report/component-62.pb +1 -0
- package/.scannerwork/scanner-report/component-67.pb +1 -0
- package/.scannerwork/scanner-report/component-68.pb +1 -1
- package/.scannerwork/scanner-report/component-7.pb +1 -1
- package/.scannerwork/scanner-report/component-8.pb +1 -1
- package/.scannerwork/scanner-report/component-9.pb +1 -1
- package/.scannerwork/scanner-report/coverages-10.pb +0 -0
- 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-2.pb +0 -0
- package/.scannerwork/scanner-report/coverages-20.pb +0 -0
- package/.scannerwork/scanner-report/coverages-21.pb +0 -0
- package/.scannerwork/scanner-report/coverages-22.pb +0 -0
- package/.scannerwork/scanner-report/coverages-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-40.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-5.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-53.pb +0 -0
- package/.scannerwork/scanner-report/coverages-54.pb +0 -0
- package/.scannerwork/scanner-report/coverages-6.pb +0 -0
- package/.scannerwork/scanner-report/coverages-68.pb +0 -0
- package/.scannerwork/scanner-report/coverages-7.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-12.pb +0 -3
- package/.scannerwork/scanner-report/duplications-15.pb +2 -0
- package/.scannerwork/scanner-report/duplications-34.pb +2 -0
- package/.scannerwork/scanner-report/duplications-45.pb +2 -0
- package/.scannerwork/scanner-report/duplications-46.pb +3 -0
- package/.scannerwork/scanner-report/duplications-50.pb +0 -2
- package/.scannerwork/scanner-report/duplications-51.pb +0 -2
- package/.scannerwork/scanner-report/duplications-57.pb +2 -0
- package/.scannerwork/scanner-report/duplications-58.pb +2 -0
- package/.scannerwork/scanner-report/duplications-68.pb +0 -0
- package/.scannerwork/scanner-report/duplications-9.pb +2 -2
- package/.scannerwork/scanner-report/measures-10.pb +0 -0
- 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-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-3.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-40.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-5.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-53.pb +15 -0
- package/.scannerwork/scanner-report/measures-54.pb +0 -0
- package/.scannerwork/scanner-report/measures-6.pb +0 -0
- package/.scannerwork/scanner-report/measures-62.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-7.pb +0 -0
- package/.scannerwork/scanner-report/measures-8.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-10.txt +150 -23
- package/.scannerwork/scanner-report/source-11.txt +30 -16
- package/.scannerwork/scanner-report/source-12.txt +99 -199
- package/.scannerwork/scanner-report/source-13.txt +60 -81
- package/.scannerwork/scanner-report/source-14.txt +164 -116
- package/.scannerwork/scanner-report/source-15.txt +53 -427
- package/.scannerwork/scanner-report/source-16.txt +22 -274
- package/.scannerwork/scanner-report/source-17.txt +87 -69
- package/.scannerwork/scanner-report/source-18.txt +255 -80
- package/.scannerwork/scanner-report/source-19.txt +102 -134
- package/.scannerwork/scanner-report/source-2.txt +43 -397
- package/.scannerwork/scanner-report/source-20.txt +39 -42
- package/.scannerwork/scanner-report/source-21.txt +47 -22
- package/.scannerwork/scanner-report/source-22.txt +429 -21
- package/.scannerwork/scanner-report/source-3.txt +81 -424
- package/.scannerwork/scanner-report/source-34.txt +168 -18
- package/.scannerwork/scanner-report/source-35.txt +170 -21
- package/.scannerwork/scanner-report/source-36.txt +314 -136
- package/.scannerwork/scanner-report/source-37.txt +9 -55
- package/.scannerwork/scanner-report/source-38.txt +40 -424
- package/.scannerwork/scanner-report/source-39.txt +120 -115
- package/.scannerwork/scanner-report/source-40.txt +82 -93
- package/.scannerwork/scanner-report/source-41.txt +279 -32
- package/.scannerwork/scanner-report/source-42.txt +27 -65
- package/.scannerwork/scanner-report/source-43.txt +21 -43
- package/.scannerwork/scanner-report/source-44.txt +85 -157
- package/.scannerwork/scanner-report/source-45.txt +167 -102
- package/.scannerwork/scanner-report/source-46.txt +194 -22
- package/.scannerwork/scanner-report/source-47.txt +23 -99
- package/.scannerwork/scanner-report/source-48.txt +25 -148
- package/.scannerwork/scanner-report/source-49.txt +97 -248
- package/.scannerwork/scanner-report/source-5.txt +16 -14
- package/.scannerwork/scanner-report/source-50.txt +50 -67
- package/.scannerwork/scanner-report/source-51.txt +15 -58
- package/.scannerwork/scanner-report/source-52.txt +87 -17
- package/.scannerwork/scanner-report/source-53.txt +151 -0
- package/.scannerwork/scanner-report/source-54.txt +396 -28
- package/.scannerwork/scanner-report/{source-55.txt → source-56.txt} +151 -151
- package/.scannerwork/scanner-report/source-6.txt +97 -315
- package/.scannerwork/scanner-report/source-62.txt +424 -0
- package/.scannerwork/scanner-report/source-67.txt +424 -0
- package/.scannerwork/scanner-report/source-68.txt +46 -102
- package/.scannerwork/scanner-report/source-7.txt +113 -175
- package/.scannerwork/scanner-report/source-8.txt +41 -44
- package/.scannerwork/scanner-report/source-9.txt +66 -157
- package/.scannerwork/scanner-report/symbols-10.pb +126 -9
- package/.scannerwork/scanner-report/symbols-11.pb +20 -9
- package/.scannerwork/scanner-report/symbols-12.pb +46 -264
- package/.scannerwork/scanner-report/symbols-13.pb +45 -57
- package/.scannerwork/scanner-report/symbols-14.pb +144 -86
- package/.scannerwork/scanner-report/symbols-15.pb +41 -789
- package/.scannerwork/scanner-report/symbols-16.pb +17 -427
- package/.scannerwork/scanner-report/symbols-17.pb +30 -69
- package/.scannerwork/scanner-report/symbols-18.pb +354 -59
- package/.scannerwork/scanner-report/symbols-2.pb +21 -604
- package/.scannerwork/scanner-report/symbols-20.pb +23 -32
- package/.scannerwork/scanner-report/symbols-21.pb +33 -23
- package/.scannerwork/scanner-report/symbols-22.pb +790 -31
- package/.scannerwork/scanner-report/symbols-34.pb +227 -13
- package/.scannerwork/scanner-report/symbols-35.pb +209 -19
- package/.scannerwork/scanner-report/symbols-36.pb +353 -93
- package/.scannerwork/scanner-report/symbols-37.pb +7 -38
- package/.scannerwork/scanner-report/symbols-38.pb +23 -0
- package/.scannerwork/scanner-report/symbols-39.pb +71 -33
- package/.scannerwork/scanner-report/symbols-40.pb +68 -58
- package/.scannerwork/scanner-report/symbols-41.pb +427 -19
- package/.scannerwork/scanner-report/symbols-42.pb +19 -46
- package/.scannerwork/scanner-report/symbols-43.pb +9 -19
- package/.scannerwork/scanner-report/symbols-44.pb +59 -144
- package/.scannerwork/scanner-report/symbols-45.pb +203 -30
- package/.scannerwork/scanner-report/symbols-46.pb +264 -18
- package/.scannerwork/scanner-report/symbols-47.pb +13 -46
- package/.scannerwork/scanner-report/symbols-48.pb +31 -126
- package/.scannerwork/scanner-report/symbols-49.pb +85 -353
- package/.scannerwork/scanner-report/symbols-5.pb +14 -8
- package/.scannerwork/scanner-report/symbols-50.pb +38 -43
- package/.scannerwork/scanner-report/symbols-51.pb +9 -42
- package/.scannerwork/scanner-report/symbols-52.pb +57 -13
- package/.scannerwork/scanner-report/symbols-53.pb +93 -0
- package/.scannerwork/scanner-report/symbols-54.pb +603 -6
- package/.scannerwork/scanner-report/symbols-6.pb +59 -353
- package/.scannerwork/scanner-report/symbols-68.pb +7 -0
- package/.scannerwork/scanner-report/symbols-7.pb +32 -208
- package/.scannerwork/scanner-report/symbols-8.pb +18 -23
- package/.scannerwork/scanner-report/symbols-9.pb +44 -203
- package/.scannerwork/scanner-report/syntax-highlightings-10.pb +179 -27
- package/.scannerwork/scanner-report/syntax-highlightings-11.pb +34 -24
- package/.scannerwork/scanner-report/syntax-highlightings-12.pb +90 -261
- package/.scannerwork/scanner-report/syntax-highlightings-13.pb +61 -120
- package/.scannerwork/scanner-report/syntax-highlightings-14.pb +208 -90
- package/.scannerwork/scanner-report/syntax-highlightings-15.pb +47 -593
- package/.scannerwork/scanner-report/syntax-highlightings-16.pb +23 -691
- package/.scannerwork/scanner-report/syntax-highlightings-17.pb +82 -76
- package/.scannerwork/scanner-report/syntax-highlightings-18.pb +244 -137
- package/.scannerwork/scanner-report/syntax-highlightings-19.pb +689 -178
- package/.scannerwork/scanner-report/syntax-highlightings-2.pb +58 -617
- package/.scannerwork/scanner-report/syntax-highlightings-20.pb +59 -72
- package/.scannerwork/scanner-report/syntax-highlightings-21.pb +73 -19
- package/.scannerwork/scanner-report/syntax-highlightings-22.pb +590 -32
- package/.scannerwork/scanner-report/syntax-highlightings-3.pb +90 -3331
- package/.scannerwork/scanner-report/syntax-highlightings-34.pb +333 -27
- package/.scannerwork/scanner-report/syntax-highlightings-35.pb +249 -25
- package/.scannerwork/scanner-report/syntax-highlightings-36.pb +550 -167
- package/.scannerwork/scanner-report/syntax-highlightings-37.pb +14 -66
- package/.scannerwork/scanner-report/syntax-highlightings-38.pb +45 -3328
- package/.scannerwork/scanner-report/syntax-highlightings-39.pb +141 -89
- package/.scannerwork/scanner-report/syntax-highlightings-40.pb +68 -94
- package/.scannerwork/scanner-report/syntax-highlightings-41.pb +691 -35
- package/.scannerwork/scanner-report/syntax-highlightings-42.pb +32 -61
- package/.scannerwork/scanner-report/syntax-highlightings-43.pb +31 -29
- package/.scannerwork/scanner-report/syntax-highlightings-44.pb +140 -205
- package/.scannerwork/scanner-report/syntax-highlightings-45.pb +243 -76
- package/.scannerwork/scanner-report/syntax-highlightings-46.pb +268 -23
- package/.scannerwork/scanner-report/syntax-highlightings-47.pb +30 -94
- package/.scannerwork/scanner-report/syntax-highlightings-48.pb +33 -177
- package/.scannerwork/scanner-report/syntax-highlightings-49.pb +90 -250
- package/.scannerwork/scanner-report/syntax-highlightings-5.pb +15 -19
- package/.scannerwork/scanner-report/syntax-highlightings-50.pb +65 -57
- package/.scannerwork/scanner-report/syntax-highlightings-51.pb +22 -49
- package/.scannerwork/scanner-report/syntax-highlightings-52.pb +124 -15
- package/.scannerwork/scanner-report/syntax-highlightings-53.pb +237 -0
- package/.scannerwork/scanner-report/syntax-highlightings-54.pb +612 -33
- package/.scannerwork/scanner-report/{syntax-highlightings-55.pb → syntax-highlightings-56.pb} +89 -90
- package/.scannerwork/scanner-report/syntax-highlightings-6.pb +97 -584
- package/.scannerwork/scanner-report/syntax-highlightings-62.pb +3340 -0
- package/.scannerwork/scanner-report/syntax-highlightings-67.pb +3341 -0
- package/.scannerwork/scanner-report/syntax-highlightings-68.pb +43 -672
- package/.scannerwork/scanner-report/syntax-highlightings-7.pb +88 -249
- package/.scannerwork/scanner-report/syntax-highlightings-8.pb +29 -67
- package/.scannerwork/scanner-report/syntax-highlightings-9.pb +57 -244
- package/.secrets.baseline +2 -2
- package/package.json +1 -1
- package/test-18-results.xml +158 -158
- package/test-20-results.xml +152 -152
- package/test-21-results.xml +153 -153
- package/test-iam-20-results.xml +50 -50
- package/.scannerwork/scanner-report/changesets-19.pb +0 -1
- package/.scannerwork/scanner-report/changesets-4.pb +0 -1
- package/.scannerwork/scanner-report/changesets-60.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-66.pb +0 -1
- package/.scannerwork/scanner-report/component-4.pb +0 -1
- package/.scannerwork/scanner-report/component-55.pb +0 -1
- package/.scannerwork/scanner-report/component-60.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-66.pb +0 -1
- package/.scannerwork/scanner-report/coverages-19.pb +0 -0
- package/.scannerwork/scanner-report/coverages-4.pb +0 -0
- package/.scannerwork/scanner-report/coverages-60.pb +0 -0
- package/.scannerwork/scanner-report/duplications-4.pb +0 -2
- package/.scannerwork/scanner-report/duplications-64.pb +0 -2
- package/.scannerwork/scanner-report/duplications-66.pb +0 -2
- package/.scannerwork/scanner-report/measures-4.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/source-4.txt +0 -187
- package/.scannerwork/scanner-report/source-60.txt +0 -60
- package/.scannerwork/scanner-report/source-61.txt +0 -81
- package/.scannerwork/scanner-report/symbols-19.pb +0 -71
- package/.scannerwork/scanner-report/symbols-4.pb +0 -227
- package/.scannerwork/scanner-report/symbols-60.pb +0 -21
- package/.scannerwork/scanner-report/syntax-highlightings-4.pb +0 -368
- package/.scannerwork/scanner-report/syntax-highlightings-60.pb +0 -82
- package/.scannerwork/scanner-report/syntax-highlightings-61.pb +0 -100
- /package/.scannerwork/scanner-report/{coverages-61.pb → coverages-3.pb} +0 -0
- /package/.scannerwork/scanner-report/{coverages-64.pb → coverages-57.pb} +0 -0
- /package/.scannerwork/scanner-report/{coverages-66.pb → coverages-58.pb} +0 -0
- /package/.scannerwork/scanner-report/{duplications-19.pb → duplications-3.pb} +0 -0
- /package/.scannerwork/scanner-report/{duplications-37.pb → duplications-38.pb} +0 -0
- /package/.scannerwork/scanner-report/{duplications-60.pb → duplications-5.pb} +0 -0
- /package/.scannerwork/scanner-report/{duplications-61.pb → duplications-53.pb} +0 -0
- /package/.scannerwork/scanner-report/{issues-6.pb → issues-36.pb} +0 -0
- /package/.scannerwork/scanner-report/{issues-35.pb → issues-42.pb} +0 -0
- /package/.scannerwork/scanner-report/{issues-12.pb → issues-46.pb} +0 -0
- /package/.scannerwork/scanner-report/{issues-14.pb → issues-49.pb} +0 -0
- /package/.scannerwork/scanner-report/{measures-55.pb → measures-56.pb} +0 -0
- /package/.scannerwork/scanner-report/{measures-64.pb → measures-57.pb} +0 -0
- /package/.scannerwork/scanner-report/{measures-66.pb → measures-58.pb} +0 -0
- /package/.scannerwork/scanner-report/{source-64.txt → source-57.txt} +0 -0
- /package/.scannerwork/scanner-report/{source-66.txt → source-58.txt} +0 -0
- /package/.scannerwork/scanner-report/{symbols-61.pb → symbols-3.pb} +0 -0
- /package/.scannerwork/scanner-report/{symbols-64.pb → symbols-57.pb} +0 -0
- /package/.scannerwork/scanner-report/{symbols-66.pb → symbols-58.pb} +0 -0
- /package/.scannerwork/scanner-report/{syntax-highlightings-64.pb → syntax-highlightings-57.pb} +0 -0
- /package/.scannerwork/scanner-report/{syntax-highlightings-66.pb → syntax-highlightings-58.pb} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright © 2017
|
|
1
|
+
// Copyright © 2017 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,283 +11,31 @@
|
|
|
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 before after beforeEach */
|
|
16
14
|
'use strict';
|
|
17
15
|
|
|
18
|
-
|
|
19
|
-
const
|
|
20
|
-
const u = require('./citestutils.js');
|
|
21
|
-
const mockServerPort = +process.env.COUCHBACKUP_MOCK_SERVER_PORT || 7777;
|
|
22
|
-
const { once } = require('node:events');
|
|
23
|
-
const url = `http://localhost:${mockServerPort}`;
|
|
24
|
-
const nock = require('nock');
|
|
25
|
-
const httpProxy = require('http-proxy');
|
|
26
|
-
const Readable = require('stream').Readable;
|
|
27
|
-
|
|
28
|
-
// Create an infinite stream to read.
|
|
29
|
-
// It just keeps sending a backup line, useful for testing cases of
|
|
30
|
-
// termination while a stream has content remaining (the animaldb backup
|
|
31
|
-
// is too small for that).
|
|
32
|
-
class InfiniteBackupStream extends Readable {
|
|
33
|
-
constructor(opt) {
|
|
34
|
-
super(opt);
|
|
35
|
-
this.contents = Buffer.from('[{"_id":"giraffe","_rev":"3-7665c3e66315ff40616cceef62886bd8","min_weight":830,"min_length":5,"max_weight":1600,"max_length":6,"wiki_page":"http://en.wikipedia.org/wiki/Giraffe","class":"mammal","diet":"herbivore","_revisions":{"start":3,"ids":["7665c3e66315ff40616cceef62886bd8","aaaf10d5a68cdf22d95a5482a0e95549","967a00dff5e02add41819138abb3284d"]}}]\n', 'utf8');
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
_read() {
|
|
39
|
-
let proceed;
|
|
40
|
-
do {
|
|
41
|
-
proceed = this.push(this.contents);
|
|
42
|
-
} while (proceed);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
function assertNock() {
|
|
47
|
-
try {
|
|
48
|
-
assert.ok(nock.isDone());
|
|
49
|
-
} catch (err) {
|
|
50
|
-
console.error('pending mocks: %j', nock.pendingMocks());
|
|
51
|
-
throw err;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
function testPromiseWithAssertNock(testPromise) {
|
|
56
|
-
return testPromise.finally(() => {
|
|
57
|
-
assertNock();
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
async function backupHttpError(opts, errorName, errorCode) {
|
|
62
|
-
const p = u.p(opts, { expectedBackupError: { name: errorName, code: errorCode } });
|
|
63
|
-
|
|
64
|
-
// Create a file and attempt a backup to it
|
|
65
|
-
const output = fs.createWriteStream('/dev/null');
|
|
66
|
-
return once(output, 'open')
|
|
67
|
-
.then(() => {
|
|
68
|
-
return testPromiseWithAssertNock(u.testBackup(p, 'fakenockdb', output));
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
async function restoreHttpError(opts, errorName, errorCode) {
|
|
73
|
-
const q = u.p(opts, { expectedRestoreError: { name: errorName, code: errorCode } });
|
|
74
|
-
return testPromiseWithAssertNock(u.testRestoreFromFile(q, './test/fixtures/animaldb_expected.json', 'fakenockdb'));
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
[{ useApi: true }, { useApi: false }].forEach(function(params) {
|
|
78
|
-
describe(u.scenario('#unit Fatal errors', params), function() {
|
|
79
|
-
// These tests do real requests with mocks and if they run slowly
|
|
80
|
-
// the 2 second default mocha timeout can be insufficient, use 10 s
|
|
81
|
-
this.timeout(10000);
|
|
82
|
-
|
|
83
|
-
let processEnvCopy;
|
|
84
|
-
let proxy;
|
|
85
|
-
|
|
86
|
-
before('Set process data for test', function() {
|
|
87
|
-
const proxyPort = mockServerPort + 1000;
|
|
88
|
-
// Copy env and argv so we can reset them after the tests
|
|
89
|
-
processEnvCopy = JSON.parse(JSON.stringify(process.env));
|
|
90
|
-
|
|
91
|
-
// Set up a proxy to point to our nock server because the nock override
|
|
92
|
-
// isn't visible to the spawned CLI process
|
|
93
|
-
if (!params.useApi) {
|
|
94
|
-
proxy = httpProxy.createProxyServer({ target: url }).listen(proxyPort, 'localhost');
|
|
95
|
-
proxy.on('error', (err, req, res) => {
|
|
96
|
-
console.log(`Proxy received error ${err}`);
|
|
97
|
-
res.writeHead(400, {
|
|
98
|
-
'Content-Type': 'application/json'
|
|
99
|
-
});
|
|
100
|
-
res.end(JSON.stringify(err));
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
// setup environment variables
|
|
105
|
-
process.env.COUCH_URL = (params.useApi) ? url : `http://localhost:${proxyPort}`;
|
|
106
|
-
|
|
107
|
-
nock.emitter.on('no match', (req, opts) => {
|
|
108
|
-
console.error(`Unmatched nock request ${opts.method} ${opts.protocol}${opts.host}${opts.path}`);
|
|
109
|
-
});
|
|
110
|
-
});
|
|
111
|
-
|
|
112
|
-
after('Reset process data', function(done) {
|
|
113
|
-
process.env = processEnvCopy;
|
|
114
|
-
nock.emitter.removeAllListeners();
|
|
115
|
-
if (!params.useApi) {
|
|
116
|
-
proxy.close(done);
|
|
117
|
-
} else {
|
|
118
|
-
done();
|
|
119
|
-
}
|
|
120
|
-
});
|
|
121
|
-
|
|
122
|
-
beforeEach('Reset nocks', function() {
|
|
123
|
-
nock.cleanAll();
|
|
124
|
-
});
|
|
125
|
-
|
|
126
|
-
describe('for backup', function() {
|
|
127
|
-
it('should terminate when DB does not exist', function() {
|
|
128
|
-
// Simulate existence check
|
|
129
|
-
nock(url).head('/fakenockdb').reply(404, { error: 'not_found', reason: 'missing' });
|
|
130
|
-
return backupHttpError(params, 'DatabaseNotFound', 10);
|
|
131
|
-
});
|
|
132
|
-
|
|
133
|
-
it('should terminate on BulkGetError', function() {
|
|
134
|
-
// Simulate existence check
|
|
135
|
-
const n = nock(url).head('/fakenockdb').reply(200);
|
|
136
|
-
// Simulate _bulk_get not available
|
|
137
|
-
n.post('/fakenockdb/_bulk_get').reply(404, { error: 'not_found', reason: 'missing' });
|
|
138
|
-
return backupHttpError(params, 'BulkGetError', 50);
|
|
139
|
-
});
|
|
140
|
-
|
|
141
|
-
it('should terminate on Unauthorized existence check', function() {
|
|
142
|
-
// Simulate a 401
|
|
143
|
-
nock(url).head('/fakenockdb').reply(401, { error: 'unauthorized', reason: '_reader access is required for this request' });
|
|
144
|
-
return backupHttpError(params, 'Unauthorized', 11);
|
|
145
|
-
});
|
|
146
|
-
|
|
147
|
-
it('should terminate on Forbidden no _reader', function() {
|
|
148
|
-
// Simulate a 403
|
|
149
|
-
nock(url).head('/fakenockdb').reply(403, { error: 'forbidden', reason: '_reader access is required for this request' });
|
|
150
|
-
return backupHttpError(params, 'Forbidden', 12);
|
|
151
|
-
});
|
|
152
|
-
|
|
153
|
-
it('should terminate on _bulk_get HTTPFatalError', function() {
|
|
154
|
-
// Provide a mock complete changes log to allow a resume to skip ahead
|
|
155
|
-
const p = u.p(params, { opts: { resume: true, log: './test/fixtures/test.log' } });
|
|
156
|
-
// Allow the existence and _bulk_get checks to pass
|
|
157
|
-
const n = nock(url).head('/fakenockdb').reply(200);
|
|
158
|
-
n.post('/fakenockdb/_bulk_get').reply(200, '{"results": []}');
|
|
159
|
-
// Simulate a fatal HTTP error when trying to fetch docs
|
|
160
|
-
// Note: 2 outstanding batches, so 2 responses, 1 mock is optional because we can't guarantee timing
|
|
161
|
-
n.post('/fakenockdb/_bulk_get').query(true).reply(400, { error: 'bad_request', reason: 'testing bad response' });
|
|
162
|
-
n.post('/fakenockdb/_bulk_get').query(true).optionally().reply(400, { error: 'bad_request', reason: 'testing bad response' });
|
|
163
|
-
return backupHttpError(p, 'HTTPFatalError', 40);
|
|
164
|
-
});
|
|
165
|
-
|
|
166
|
-
it('should terminate on NoLogFileName', function() {
|
|
167
|
-
// Don't supply a log file name with resume
|
|
168
|
-
const p = u.p(params, { opts: { resume: true } });
|
|
169
|
-
return backupHttpError(p, 'NoLogFileName', 20);
|
|
170
|
-
});
|
|
171
|
-
|
|
172
|
-
it('should terminate on LogDoesNotExist', function() {
|
|
173
|
-
// Use a non-existent log file
|
|
174
|
-
const p = u.p(params, { opts: { resume: true, log: './test/fixtures/doesnotexist.log' } });
|
|
175
|
-
return backupHttpError(p, 'LogDoesNotExist', 21);
|
|
176
|
-
});
|
|
177
|
-
|
|
178
|
-
it('should terminate on IncompleteChangesInLogFile', function() {
|
|
179
|
-
// Use an incomplete changes log file
|
|
180
|
-
const p = u.p(params, { opts: { resume: true, log: './test/fixtures/incomplete_changes.log' } });
|
|
181
|
-
// Allow the existence and _bulk_get checks to pass
|
|
182
|
-
const n = nock(url).head('/fakenockdb').reply(200);
|
|
183
|
-
n.post('/fakenockdb/_bulk_get').reply(200, '{"results": []}');
|
|
184
|
-
// Should fail when it reads the incomplete changes
|
|
185
|
-
return backupHttpError(p, 'IncompleteChangesInLogFile', 22);
|
|
186
|
-
});
|
|
187
|
-
|
|
188
|
-
it('should terminate on _changes HTTPFatalError', function() {
|
|
189
|
-
// Allow the existence and _bulk_get checks to pass
|
|
190
|
-
const n = nock(url).head('/fakenockdb').reply(200);
|
|
191
|
-
n.post('/fakenockdb/_bulk_get').reply(200, '{"results": []}');
|
|
192
|
-
// Simulate a fatal HTTP error when trying to fetch docs (note 2 outstanding batches)
|
|
193
|
-
n.post('/fakenockdb/_changes').query(true).reply(400, { error: 'bad_request', reason: 'testing bad response' });
|
|
194
|
-
return backupHttpError(params, 'HTTPFatalError', 40);
|
|
195
|
-
});
|
|
196
|
-
|
|
197
|
-
it('should terminate on SpoolChangesError', function() {
|
|
198
|
-
// Allow the existence and _bulk_get checks to pass
|
|
199
|
-
const n = nock(url).head('/fakenockdb').reply(200);
|
|
200
|
-
n.post('/fakenockdb/_bulk_get').reply(200, '{"results": []}');
|
|
201
|
-
// Simulate a changes without a last_seq
|
|
202
|
-
n.post('/fakenockdb/_changes').query(true).reply(200,
|
|
203
|
-
{
|
|
204
|
-
results: [{
|
|
205
|
-
seq: '2-g1AAAAEbeJzLYWBgYMlgTmFQSElKzi9KdUhJstTLTS3KLElMT9VLzskvTUnMK9HLSy3JAapkSmRIsv___39WBnMiUy5QgN3MzDIxOdEMWb85dv0gSxThigyN8diS5AAkk-pBFiUyoOkzxKMvjwVIMjQAKaDW_Zh6TQnqPQDRC7I3CwDPDV1k',
|
|
206
|
-
id: 'badger',
|
|
207
|
-
changes: [{ rev: '4-51aa94e4b0ef37271082033bba52b850' }]
|
|
208
|
-
}]
|
|
209
|
-
});
|
|
210
|
-
return backupHttpError(params, 'SpoolChangesError', 30);
|
|
211
|
-
});
|
|
212
|
-
});
|
|
213
|
-
|
|
214
|
-
describe('for restore', function() {
|
|
215
|
-
it('should terminate on Unauthorized db existence check', function() {
|
|
216
|
-
// Simulate a 401
|
|
217
|
-
nock(url).get('/fakenockdb').reply(401, { error: 'unauthorized', reason: '_reader access is required for this request' });
|
|
218
|
-
return restoreHttpError(params, 'Unauthorized', 11);
|
|
219
|
-
});
|
|
220
|
-
|
|
221
|
-
it('should terminate on Forbidden no _writer', function() {
|
|
222
|
-
// Simulate the DB exists (i.e. you can read it)
|
|
223
|
-
const n = nock(url).get('/fakenockdb').reply(200, { doc_count: 0, doc_del_count: 0 });
|
|
224
|
-
// Simulate a 403 trying to write
|
|
225
|
-
n.post('/fakenockdb/_bulk_docs').reply(403, { error: 'forbidden', reason: '_writer access is required for this request' });
|
|
226
|
-
return restoreHttpError(params, 'Forbidden', 12);
|
|
227
|
-
});
|
|
228
|
-
|
|
229
|
-
it('should terminate on RestoreDatabaseNotFound', function() {
|
|
230
|
-
// Simulate the DB does not exist
|
|
231
|
-
nock(url).get('/fakenockdb').reply(404, { error: 'not_found', reason: 'Database does not exist.' });
|
|
232
|
-
return restoreHttpError(params, 'DatabaseNotFound', 10);
|
|
233
|
-
});
|
|
234
|
-
|
|
235
|
-
it('should terminate on notEmptyDBErr when database is not empty', function() {
|
|
236
|
-
// Simulate the DB that does exist and not empty
|
|
237
|
-
nock(url).get('/fakenockdb').reply(200, { doc_count: 10, doc_del_count: 0 });
|
|
238
|
-
return restoreHttpError(params, 'DatabaseNotEmpty', 13);
|
|
239
|
-
});
|
|
16
|
+
// stolen from http://strongloop.com/strongblog/practical-examples-of-the-new-node-js-streams-api/
|
|
17
|
+
const stream = require('stream');
|
|
240
18
|
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
nock(url).get('/fakenockdb').reply(200, { doc_count: 0, doc_del_count: 10 });
|
|
244
|
-
return restoreHttpError(params, 'DatabaseNotEmpty', 13);
|
|
245
|
-
});
|
|
19
|
+
module.exports = function(onChange) {
|
|
20
|
+
const change = new stream.Transform({ objectMode: true });
|
|
246
21
|
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
const n = nock(url).get('/fakenockdb').reply(200, { doc_count: 0, doc_del_count: 0 });
|
|
250
|
-
// Use a parallelism of one and mock one response
|
|
251
|
-
const p = u.p(params, { opts: { parallelism: 1 } });
|
|
252
|
-
// Simulate a 400 trying to write
|
|
253
|
-
n.post('/fakenockdb/_bulk_docs').reply(400, { error: 'bad_request', reason: 'testing bad response' });
|
|
254
|
-
return restoreHttpError(p, 'HTTPFatalError', 40);
|
|
255
|
-
});
|
|
22
|
+
change._transform = function(line, encoding, done) {
|
|
23
|
+
let obj = null;
|
|
256
24
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
// This should pass validator as we exclude system databases from the check.
|
|
260
|
-
const n = nock(url).get('/_replicator').reply(200, { doc_count: 1, doc_del_count: 0 });
|
|
261
|
-
// Simulate a 400 trying to write
|
|
262
|
-
n.post('/_replicator/_bulk_docs').reply(400, { error: 'bad_request', reason: 'testing bad response' });
|
|
263
|
-
// Use a parallelism of one and mock one response
|
|
264
|
-
const q = u.p(params, { opts: { parallelism: 1 }, expectedRestoreError: { name: 'HTTPFatalError', code: 40 } });
|
|
265
|
-
return testPromiseWithAssertNock(u.testRestore(q, new InfiniteBackupStream(), '_replicator'));
|
|
266
|
-
});
|
|
25
|
+
// one change per line - remove the trailing comma
|
|
26
|
+
line = line.trim().replace(/,$/, '');
|
|
267
27
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
28
|
+
// extract thee last_seq at the end of the changes feed
|
|
29
|
+
if (line.match(/^"last_seq":/)) {
|
|
30
|
+
line = '{' + line;
|
|
31
|
+
}
|
|
32
|
+
try {
|
|
33
|
+
obj = JSON.parse(line);
|
|
34
|
+
} catch (e) {
|
|
35
|
+
}
|
|
36
|
+
onChange(obj);
|
|
37
|
+
done();
|
|
38
|
+
};
|
|
278
39
|
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
const n = nock(url).get('/fakenockdb').reply(200, { doc_count: 0, doc_del_count: 0 });
|
|
282
|
-
// Simulate a 400 trying to write docs, 5 times because of default parallelism
|
|
283
|
-
// Provide a body function to handle the stream, but allow any body
|
|
284
|
-
// Four of the mocks are optional because of parallelism 5 we can't guarantee that the exit will happen
|
|
285
|
-
// after all 5 requests, but we must get at least one of them
|
|
286
|
-
n.post('/fakenockdb/_bulk_docs', function(body) { return true; }).reply(400, { error: 'bad_request', reason: 'testing bad response' });
|
|
287
|
-
n.post('/fakenockdb/_bulk_docs', function(body) { return true; }).times(4).optionally().reply(400, { error: 'bad_request', reason: 'testing bad response' });
|
|
288
|
-
const q = u.p(params, { opts: { bufferSize: 1 }, expectedRestoreError: { name: 'HTTPFatalError', code: 40 } });
|
|
289
|
-
return restoreHttpError(q, 'HTTPFatalError', 40);
|
|
290
|
-
});
|
|
291
|
-
});
|
|
292
|
-
});
|
|
293
|
-
});
|
|
40
|
+
return change;
|
|
41
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright ©
|
|
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,90 +11,108 @@
|
|
|
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
14
|
'use strict';
|
|
16
15
|
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
16
|
+
const path = require('path');
|
|
17
|
+
const tmp = require('tmp');
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
Return API default settings.
|
|
21
|
+
*/
|
|
22
|
+
function apiDefaults() {
|
|
23
|
+
return {
|
|
24
|
+
parallelism: 5,
|
|
25
|
+
bufferSize: 500,
|
|
26
|
+
requestTimeout: 120000,
|
|
27
|
+
log: tmp.tmpNameSync(),
|
|
28
|
+
resume: false,
|
|
29
|
+
mode: 'full'
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
Return CLI default settings.
|
|
35
|
+
*/
|
|
36
|
+
function cliDefaults() {
|
|
37
|
+
const defaults = apiDefaults();
|
|
38
|
+
|
|
39
|
+
// add additional legacy settings
|
|
40
|
+
defaults.db = 'test';
|
|
41
|
+
defaults.url = 'http://localhost:5984';
|
|
42
|
+
|
|
43
|
+
// add CLI only option
|
|
44
|
+
defaults.quiet = false;
|
|
45
|
+
|
|
46
|
+
return defaults;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
Override settings **in-place** with environment variables.
|
|
51
|
+
*/
|
|
52
|
+
function applyEnvironmentVariables(opts) {
|
|
53
|
+
// if we have a custom CouchDB url
|
|
54
|
+
if (typeof process.env.COUCH_URL !== 'undefined') {
|
|
55
|
+
opts.url = process.env.COUCH_URL;
|
|
38
56
|
}
|
|
39
57
|
|
|
40
|
-
//
|
|
41
|
-
|
|
42
|
-
|
|
58
|
+
// if we have a specified databases
|
|
59
|
+
if (typeof process.env.COUCH_DATABASE !== 'undefined') {
|
|
60
|
+
opts.db = process.env.COUCH_DATABASE;
|
|
61
|
+
}
|
|
43
62
|
|
|
44
|
-
|
|
45
|
-
|
|
63
|
+
// if we have a specified buffer size
|
|
64
|
+
if (typeof process.env.COUCH_BUFFER_SIZE !== 'undefined') {
|
|
65
|
+
opts.bufferSize = parseInt(process.env.COUCH_BUFFER_SIZE);
|
|
66
|
+
}
|
|
46
67
|
|
|
47
|
-
|
|
68
|
+
// if we have a specified parallelism
|
|
69
|
+
if (typeof process.env.COUCH_PARALLELISM !== 'undefined') {
|
|
70
|
+
opts.parallelism = parseInt(process.env.COUCH_PARALLELISM);
|
|
71
|
+
}
|
|
48
72
|
|
|
49
|
-
if
|
|
50
|
-
|
|
51
|
-
|
|
73
|
+
// if we have a specified request timeout
|
|
74
|
+
if (typeof process.env.COUCH_REQUEST_TIMEOUT !== 'undefined') {
|
|
75
|
+
opts.requestTimeout = parseInt(process.env.COUCH_REQUEST_TIMEOUT);
|
|
52
76
|
}
|
|
53
77
|
|
|
54
|
-
|
|
55
|
-
|
|
78
|
+
// if we have a specified log file
|
|
79
|
+
if (typeof process.env.COUCH_LOG !== 'undefined') {
|
|
80
|
+
opts.log = path.normalize(process.env.COUCH_LOG);
|
|
81
|
+
}
|
|
56
82
|
|
|
57
|
-
|
|
58
|
-
|
|
83
|
+
// if we are instructed to resume
|
|
84
|
+
if (typeof process.env.COUCH_RESUME !== 'undefined' && process.env.COUCH_RESUME === 'true') {
|
|
85
|
+
opts.resume = true;
|
|
86
|
+
}
|
|
59
87
|
|
|
60
|
-
|
|
88
|
+
// if we are given an output filename
|
|
89
|
+
if (typeof process.env.COUCH_OUTPUT !== 'undefined') {
|
|
90
|
+
opts.output = path.normalize(process.env.COUCH_OUTPUT);
|
|
91
|
+
}
|
|
61
92
|
|
|
62
|
-
//
|
|
93
|
+
// if we only want a shallow copy
|
|
94
|
+
if (typeof process.env.COUCH_MODE !== 'undefined' && process.env.COUCH_MODE === 'shallow') {
|
|
95
|
+
opts.mode = 'shallow';
|
|
96
|
+
}
|
|
63
97
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
98
|
+
// if we are instructed to be quiet
|
|
99
|
+
if (typeof process.env.COUCH_QUIET !== 'undefined' && process.env.COUCH_QUIET === 'true') {
|
|
100
|
+
opts.quiet = true;
|
|
101
|
+
}
|
|
67
102
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
// look in db2
|
|
72
|
-
const result2 = await client.postRevsDiff({ db: databaseName2, documentRevisions: revsDiffRequestDb2 });
|
|
73
|
-
forOwn(result2.result, (v, k) => {
|
|
74
|
-
if ('missing' in v) {
|
|
75
|
-
missing[k] = v.missing;
|
|
76
|
-
}
|
|
77
|
-
});
|
|
103
|
+
// if we have a specified API key
|
|
104
|
+
if (typeof process.env.CLOUDANT_IAM_API_KEY !== 'undefined') {
|
|
105
|
+
opts.iamApiKey = process.env.CLOUDANT_IAM_API_KEY;
|
|
78
106
|
}
|
|
79
|
-
return missing;
|
|
80
|
-
};
|
|
81
107
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
const pageOfDocIds = (await client.postAllDocs({ db: database, startKey, limit })).result.rows.map(r => r.id);
|
|
88
|
-
allDocIds = allDocIds.concat(pageOfDocIds);
|
|
89
|
-
if (pageOfDocIds.length < limit) {
|
|
90
|
-
startKey = null;
|
|
91
|
-
} else {
|
|
92
|
-
startKey = pageOfDocIds[limit - 1] + '\u0000';
|
|
93
|
-
}
|
|
94
|
-
} while (startKey != null);
|
|
95
|
-
return allDocIds;
|
|
96
|
-
};
|
|
108
|
+
// if we have a specified IAM token endpoint
|
|
109
|
+
if (typeof process.env.CLOUDANT_IAM_TOKEN_URL !== 'undefined') {
|
|
110
|
+
opts.iamTokenUrl = process.env.CLOUDANT_IAM_TOKEN_URL;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
97
113
|
|
|
98
114
|
module.exports = {
|
|
99
|
-
|
|
115
|
+
apiDefaults: apiDefaults,
|
|
116
|
+
cliDefaults: cliDefaults,
|
|
117
|
+
applyEnvironmentVariables: applyEnvironmentVariables
|
|
100
118
|
};
|