@cloudant/couchbackup 2.9.13 → 2.9.14-SNAPSHOT.146
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.scannerwork/report-task.txt +2 -2
- package/.scannerwork/scanner-report/analysis-warnings.pb +2 -2
- package/.scannerwork/scanner-report/changesets-10.pb +2 -0
- package/.scannerwork/scanner-report/changesets-13.pb +1 -0
- package/.scannerwork/scanner-report/changesets-30.pb +1 -0
- package/.scannerwork/scanner-report/changesets-31.pb +1 -0
- package/.scannerwork/scanner-report/changesets-32.pb +1 -0
- package/.scannerwork/scanner-report/changesets-33.pb +1 -0
- package/.scannerwork/scanner-report/changesets-34.pb +1 -0
- package/.scannerwork/scanner-report/changesets-49.pb +1 -0
- package/.scannerwork/scanner-report/changesets-50.pb +1 -0
- package/.scannerwork/scanner-report/changesets-6.pb +1 -0
- package/.scannerwork/scanner-report/changesets-7.pb +1 -0
- package/.scannerwork/scanner-report/changesets-8.pb +1 -0
- package/.scannerwork/scanner-report/changesets-9.pb +1 -0
- package/.scannerwork/scanner-report/component-1.pb +3 -1
- package/.scannerwork/scanner-report/component-10.pb +2 -0
- 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 -0
- 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-30.pb +1 -0
- package/.scannerwork/scanner-report/component-31.pb +1 -0
- package/.scannerwork/scanner-report/component-32.pb +1 -0
- package/.scannerwork/scanner-report/component-33.pb +1 -0
- package/.scannerwork/scanner-report/component-34.pb +1 -0
- 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-39.pb +1 -1
- package/.scannerwork/scanner-report/component-4.pb +1 -0
- package/.scannerwork/scanner-report/component-40.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 -0
- 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-54.pb +1 -1
- package/.scannerwork/scanner-report/component-55.pb +1 -1
- package/.scannerwork/scanner-report/component-56.pb +1 -1
- package/.scannerwork/scanner-report/component-59.pb +1 -1
- package/.scannerwork/scanner-report/component-6.pb +1 -0
- package/.scannerwork/scanner-report/component-60.pb +1 -1
- package/.scannerwork/scanner-report/component-62.pb +1 -1
- package/.scannerwork/scanner-report/component-64.pb +1 -1
- package/.scannerwork/scanner-report/component-7.pb +1 -0
- package/.scannerwork/scanner-report/component-8.pb +1 -1
- package/.scannerwork/scanner-report/component-9.pb +1 -0
- 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-30.pb +0 -0
- package/.scannerwork/scanner-report/coverages-33.pb +0 -0
- package/.scannerwork/scanner-report/{coverages-38.pb → 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-39.pb +0 -0
- package/.scannerwork/scanner-report/coverages-40.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-54.pb +0 -0
- package/.scannerwork/scanner-report/coverages-55.pb +0 -0
- package/.scannerwork/scanner-report/coverages-56.pb +0 -0
- package/.scannerwork/scanner-report/coverages-59.pb +0 -0
- package/.scannerwork/scanner-report/coverages-6.pb +0 -0
- package/.scannerwork/scanner-report/coverages-60.pb +0 -0
- package/.scannerwork/scanner-report/coverages-64.pb +0 -0
- package/.scannerwork/scanner-report/coverages-7.pb +0 -0
- package/.scannerwork/scanner-report/coverages-9.pb +0 -0
- package/.scannerwork/scanner-report/duplications-11.pb +0 -2
- package/.scannerwork/scanner-report/duplications-12.pb +0 -2
- package/.scannerwork/scanner-report/duplications-15.pb +2 -0
- package/.scannerwork/scanner-report/duplications-17.pb +3 -0
- package/.scannerwork/scanner-report/duplications-30.pb +2 -0
- package/.scannerwork/scanner-report/duplications-37.pb +0 -2
- package/.scannerwork/scanner-report/duplications-42.pb +0 -3
- package/.scannerwork/scanner-report/duplications-43.pb +2 -0
- package/.scannerwork/scanner-report/duplications-45.pb +0 -2
- package/.scannerwork/scanner-report/duplications-55.pb +2 -0
- package/.scannerwork/scanner-report/duplications-59.pb +2 -0
- package/.scannerwork/scanner-report/duplications-60.pb +1 -1
- package/.scannerwork/scanner-report/duplications-9.pb +3 -0
- package/.scannerwork/scanner-report/issues-36.pb +2 -2
- package/.scannerwork/scanner-report/issues-37.pb +3 -0
- 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-30.pb +0 -0
- package/.scannerwork/scanner-report/measures-33.pb +0 -0
- package/.scannerwork/scanner-report/measures-34.pb +0 -0
- package/.scannerwork/scanner-report/measures-35.pb +0 -0
- package/.scannerwork/scanner-report/measures-36.pb +0 -0
- package/.scannerwork/scanner-report/measures-37.pb +0 -0
- package/.scannerwork/scanner-report/measures-39.pb +0 -0
- package/.scannerwork/scanner-report/measures-4.pb +0 -0
- package/.scannerwork/scanner-report/measures-40.pb +0 -0
- package/.scannerwork/scanner-report/measures-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-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-59.pb +0 -0
- package/.scannerwork/scanner-report/measures-6.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-64.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 +63 -0
- package/.scannerwork/scanner-report/source-11.txt +64 -147
- package/.scannerwork/scanner-report/source-12.txt +45 -167
- package/.scannerwork/scanner-report/{source-41.txt → source-13.txt} +14 -7
- package/.scannerwork/scanner-report/source-14.txt +47 -47
- package/.scannerwork/scanner-report/source-15.txt +262 -69
- package/.scannerwork/scanner-report/source-16.txt +603 -14
- package/.scannerwork/scanner-report/source-17.txt +91 -35
- package/.scannerwork/scanner-report/source-18.txt +128 -40
- package/.scannerwork/scanner-report/source-30.txt +145 -0
- package/.scannerwork/scanner-report/source-33.txt +147 -0
- package/.scannerwork/scanner-report/{source-38.txt → source-34.txt} +9 -10
- package/.scannerwork/scanner-report/source-35.txt +10 -347
- package/.scannerwork/scanner-report/source-36.txt +29 -124
- package/.scannerwork/scanner-report/source-37.txt +118 -121
- package/.scannerwork/scanner-report/source-39.txt +40 -31
- package/.scannerwork/scanner-report/source-4.txt +509 -0
- package/.scannerwork/scanner-report/source-40.txt +62 -19
- package/.scannerwork/scanner-report/source-42.txt +90 -107
- package/.scannerwork/scanner-report/source-43.txt +50 -67
- package/.scannerwork/scanner-report/source-44.txt +40 -142
- package/.scannerwork/scanner-report/source-45.txt +105 -269
- package/.scannerwork/scanner-report/source-46.txt +32 -133
- package/.scannerwork/scanner-report/source-47.txt +14 -39
- package/.scannerwork/scanner-report/source-48.txt +90 -56
- package/.scannerwork/scanner-report/source-49.txt +281 -0
- package/.scannerwork/scanner-report/source-5.txt +20 -403
- package/.scannerwork/scanner-report/source-50.txt +41 -509
- package/.scannerwork/scanner-report/source-51.txt +84 -21
- package/.scannerwork/scanner-report/source-52.txt +63 -14
- package/.scannerwork/scanner-report/source-54.txt +138 -20
- package/.scannerwork/scanner-report/source-55.txt +76 -113
- package/.scannerwork/scanner-report/source-56.txt +78 -241
- package/.scannerwork/scanner-report/source-59.txt +175 -65
- package/.scannerwork/scanner-report/source-6.txt +100 -0
- package/.scannerwork/scanner-report/source-60.txt +152 -52
- package/.scannerwork/scanner-report/source-62.txt +167 -54
- package/.scannerwork/scanner-report/source-64.txt +387 -133
- package/.scannerwork/scanner-report/source-7.txt +366 -0
- package/.scannerwork/scanner-report/source-8.txt +36 -167
- package/.scannerwork/scanner-report/source-9.txt +131 -0
- package/.scannerwork/scanner-report/symbols-10.pb +43 -0
- package/.scannerwork/scanner-report/symbols-11.pb +60 -153
- package/.scannerwork/scanner-report/symbols-12.pb +45 -180
- package/.scannerwork/scanner-report/symbols-13.pb +14 -0
- package/.scannerwork/scanner-report/symbols-14.pb +35 -44
- package/.scannerwork/scanner-report/symbols-15.pb +485 -68
- package/.scannerwork/scanner-report/symbols-16.pb +1253 -13
- package/.scannerwork/scanner-report/symbols-17.pb +76 -42
- package/.scannerwork/scanner-report/symbols-18.pb +110 -34
- package/.scannerwork/scanner-report/symbols-30.pb +102 -0
- package/.scannerwork/scanner-report/symbols-33.pb +85 -0
- package/.scannerwork/scanner-report/symbols-34.pb +10 -0
- package/.scannerwork/scanner-report/symbols-35.pb +9 -494
- package/.scannerwork/scanner-report/symbols-36.pb +27 -116
- package/.scannerwork/scanner-report/symbols-37.pb +111 -97
- package/.scannerwork/scanner-report/symbols-39.pb +19 -27
- package/.scannerwork/scanner-report/symbols-40.pb +29 -9
- package/.scannerwork/scanner-report/symbols-42.pb +28 -97
- package/.scannerwork/scanner-report/symbols-43.pb +42 -60
- package/.scannerwork/scanner-report/symbols-44.pb +14 -111
- package/.scannerwork/scanner-report/symbols-45.pb +33 -486
- package/.scannerwork/scanner-report/symbols-46.pb +19 -84
- package/.scannerwork/scanner-report/symbols-47.pb +13 -18
- package/.scannerwork/scanner-report/symbols-48.pb +58 -29
- package/.scannerwork/scanner-report/symbols-49.pb +354 -0
- package/.scannerwork/scanner-report/symbols-5.pb +17 -610
- package/.scannerwork/scanner-report/symbols-50.pb +18 -0
- package/.scannerwork/scanner-report/symbols-51.pb +39 -15
- package/.scannerwork/scanner-report/symbols-52.pb +45 -13
- package/.scannerwork/scanner-report/symbols-54.pb +126 -20
- package/.scannerwork/scanner-report/symbols-55.pb +44 -33
- package/.scannerwork/scanner-report/symbols-56.pb +30 -354
- package/.scannerwork/scanner-report/symbols-59.pb +180 -46
- package/.scannerwork/scanner-report/symbols-6.pb +69 -0
- package/.scannerwork/scanner-report/symbols-60.pb +152 -41
- package/.scannerwork/scanner-report/symbols-64.pb +604 -120
- package/.scannerwork/scanner-report/symbols-7.pb +494 -0
- package/.scannerwork/scanner-report/symbols-9.pb +97 -0
- package/.scannerwork/scanner-report/syntax-highlightings-10.pb +82 -0
- package/.scannerwork/scanner-report/syntax-highlightings-11.pb +72 -176
- package/.scannerwork/scanner-report/syntax-highlightings-12.pb +65 -180
- package/.scannerwork/scanner-report/syntax-highlightings-13.pb +54 -0
- package/.scannerwork/scanner-report/syntax-highlightings-14.pb +59 -74
- package/.scannerwork/scanner-report/syntax-highlightings-15.pb +618 -64
- package/.scannerwork/scanner-report/syntax-highlightings-16.pb +854 -21
- package/.scannerwork/scanner-report/syntax-highlightings-17.pb +119 -43
- package/.scannerwork/scanner-report/syntax-highlightings-18.pb +185 -57
- package/.scannerwork/scanner-report/syntax-highlightings-30.pb +227 -0
- package/.scannerwork/scanner-report/syntax-highlightings-33.pb +191 -0
- package/.scannerwork/scanner-report/{syntax-highlightings-41.pb → syntax-highlightings-34.pb} +15 -13
- package/.scannerwork/scanner-report/syntax-highlightings-35.pb +15 -597
- package/.scannerwork/scanner-report/syntax-highlightings-36.pb +31 -97
- package/.scannerwork/scanner-report/syntax-highlightings-37.pb +96 -189
- package/.scannerwork/scanner-report/syntax-highlightings-39.pb +59 -45
- package/.scannerwork/scanner-report/syntax-highlightings-4.pb +3747 -0
- package/.scannerwork/scanner-report/syntax-highlightings-40.pb +82 -29
- package/.scannerwork/scanner-report/syntax-highlightings-42.pb +102 -146
- package/.scannerwork/scanner-report/syntax-highlightings-43.pb +43 -75
- package/.scannerwork/scanner-report/syntax-highlightings-44.pb +24 -193
- package/.scannerwork/scanner-report/syntax-highlightings-45.pb +91 -621
- package/.scannerwork/scanner-report/syntax-highlightings-46.pb +35 -162
- package/.scannerwork/scanner-report/syntax-highlightings-47.pb +33 -70
- package/.scannerwork/scanner-report/syntax-highlightings-48.pb +108 -78
- package/.scannerwork/scanner-report/syntax-highlightings-49.pb +285 -0
- package/.scannerwork/scanner-report/syntax-highlightings-5.pb +34 -619
- package/.scannerwork/scanner-report/syntax-highlightings-50.pb +39 -3736
- package/.scannerwork/scanner-report/syntax-highlightings-51.pb +83 -17
- package/.scannerwork/scanner-report/syntax-highlightings-52.pb +65 -15
- package/.scannerwork/scanner-report/syntax-highlightings-54.pb +178 -29
- package/.scannerwork/scanner-report/syntax-highlightings-55.pb +49 -88
- package/.scannerwork/scanner-report/syntax-highlightings-56.pb +78 -250
- package/.scannerwork/scanner-report/syntax-highlightings-59.pb +194 -64
- package/.scannerwork/scanner-report/syntax-highlightings-6.pb +105 -0
- package/.scannerwork/scanner-report/syntax-highlightings-60.pb +183 -47
- package/.scannerwork/scanner-report/syntax-highlightings-62.pb +938 -43
- package/.scannerwork/scanner-report/syntax-highlightings-64.pb +586 -151
- package/.scannerwork/scanner-report/syntax-highlightings-7.pb +630 -0
- package/.scannerwork/scanner-report/syntax-highlightings-8.pb +48 -938
- package/.scannerwork/scanner-report/syntax-highlightings-9.pb +182 -0
- package/package.json +1 -1
- package/test-18-results.xml +152 -152
- package/test-iam-18-results.xml +50 -50
- package/.scannerwork/scanner-report/changesets-19.pb +0 -1
- package/.scannerwork/scanner-report/changesets-2.pb +0 -1
- package/.scannerwork/scanner-report/changesets-20.pb +0 -1
- package/.scannerwork/scanner-report/changesets-21.pb +0 -1
- package/.scannerwork/scanner-report/changesets-22.pb +0 -1
- package/.scannerwork/scanner-report/changesets-23.pb +0 -1
- package/.scannerwork/scanner-report/changesets-38.pb +0 -1
- package/.scannerwork/scanner-report/changesets-41.pb +0 -1
- package/.scannerwork/scanner-report/changesets-57.pb +0 -1
- package/.scannerwork/scanner-report/changesets-58.pb +0 -1
- package/.scannerwork/scanner-report/changesets-61.pb +0 -1
- package/.scannerwork/scanner-report/changesets-62.pb +0 -1
- package/.scannerwork/scanner-report/changesets-63.pb +0 -1
- package/.scannerwork/scanner-report/component-19.pb +0 -1
- package/.scannerwork/scanner-report/component-2.pb +0 -1
- package/.scannerwork/scanner-report/component-20.pb +0 -1
- package/.scannerwork/scanner-report/component-21.pb +0 -1
- package/.scannerwork/scanner-report/component-22.pb +0 -1
- package/.scannerwork/scanner-report/component-23.pb +0 -1
- package/.scannerwork/scanner-report/component-38.pb +0 -1
- package/.scannerwork/scanner-report/component-41.pb +0 -1
- package/.scannerwork/scanner-report/component-57.pb +0 -1
- package/.scannerwork/scanner-report/component-58.pb +0 -1
- package/.scannerwork/scanner-report/component-61.pb +0 -1
- package/.scannerwork/scanner-report/component-63.pb +0 -1
- 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-41.pb +0 -0
- package/.scannerwork/scanner-report/coverages-57.pb +0 -0
- package/.scannerwork/scanner-report/coverages-58.pb +0 -0
- package/.scannerwork/scanner-report/coverages-61.pb +0 -0
- package/.scannerwork/scanner-report/coverages-62.pb +0 -0
- package/.scannerwork/scanner-report/coverages-63.pb +0 -0
- package/.scannerwork/scanner-report/duplications-21.pb +0 -3
- package/.scannerwork/scanner-report/duplications-61.pb +0 -2
- package/.scannerwork/scanner-report/issues-39.pb +0 -3
- package/.scannerwork/scanner-report/measures-19.pb +0 -0
- package/.scannerwork/scanner-report/measures-2.pb +0 -0
- package/.scannerwork/scanner-report/measures-20.pb +0 -0
- package/.scannerwork/scanner-report/measures-21.pb +0 -0
- package/.scannerwork/scanner-report/measures-38.pb +0 -0
- package/.scannerwork/scanner-report/measures-41.pb +0 -0
- package/.scannerwork/scanner-report/measures-57.pb +0 -0
- package/.scannerwork/scanner-report/measures-58.pb +0 -15
- package/.scannerwork/scanner-report/measures-61.pb +0 -0
- package/.scannerwork/scanner-report/measures-63.pb +0 -0
- package/.scannerwork/scanner-report/source-19.txt +0 -36
- package/.scannerwork/scanner-report/source-2.txt +0 -114
- package/.scannerwork/scanner-report/source-20.txt +0 -625
- package/.scannerwork/scanner-report/source-21.txt +0 -119
- package/.scannerwork/scanner-report/source-57.txt +0 -118
- package/.scannerwork/scanner-report/source-58.txt +0 -104
- package/.scannerwork/scanner-report/source-61.txt +0 -92
- package/.scannerwork/scanner-report/source-63.txt +0 -111
- package/.scannerwork/scanner-report/symbols-2.pb +0 -28
- package/.scannerwork/scanner-report/symbols-20.pb +0 -1254
- package/.scannerwork/scanner-report/symbols-21.pb +0 -77
- package/.scannerwork/scanner-report/symbols-38.pb +0 -17
- package/.scannerwork/scanner-report/symbols-41.pb +0 -9
- package/.scannerwork/scanner-report/symbols-57.pb +0 -30
- package/.scannerwork/scanner-report/symbols-58.pb +0 -42
- package/.scannerwork/scanner-report/symbols-61.pb +0 -44
- package/.scannerwork/scanner-report/symbols-62.pb +0 -15
- package/.scannerwork/scanner-report/symbols-63.pb +0 -59
- package/.scannerwork/scanner-report/syntax-highlightings-19.pb +0 -59
- package/.scannerwork/scanner-report/syntax-highlightings-2.pb +0 -138
- package/.scannerwork/scanner-report/syntax-highlightings-20.pb +0 -887
- package/.scannerwork/scanner-report/syntax-highlightings-21.pb +0 -158
- package/.scannerwork/scanner-report/syntax-highlightings-38.pb +0 -63
- package/.scannerwork/scanner-report/syntax-highlightings-57.pb +0 -113
- package/.scannerwork/scanner-report/syntax-highlightings-58.pb +0 -116
- package/.scannerwork/scanner-report/syntax-highlightings-61.pb +0 -90
- package/.scannerwork/scanner-report/syntax-highlightings-63.pb +0 -133
- /package/.scannerwork/scanner-report/{coverages-22.pb → coverages-31.pb} +0 -0
- /package/.scannerwork/scanner-report/{coverages-23.pb → coverages-32.pb} +0 -0
- /package/.scannerwork/scanner-report/{coverages-19.pb → coverages-8.pb} +0 -0
- /package/.scannerwork/scanner-report/{duplications-19.pb → duplications-10.pb} +0 -0
- /package/.scannerwork/scanner-report/{duplications-2.pb → duplications-13.pb} +0 -0
- /package/.scannerwork/scanner-report/{duplications-22.pb → duplications-31.pb} +0 -0
- /package/.scannerwork/scanner-report/{duplications-23.pb → duplications-32.pb} +0 -0
- /package/.scannerwork/scanner-report/{duplications-20.pb → duplications-33.pb} +0 -0
- /package/.scannerwork/scanner-report/{duplications-35.pb → duplications-34.pb} +0 -0
- /package/.scannerwork/scanner-report/{duplications-38.pb → duplications-49.pb} +0 -0
- /package/.scannerwork/scanner-report/{duplications-57.pb → duplications-50.pb} +0 -0
- /package/.scannerwork/scanner-report/{duplications-58.pb → duplications-6.pb} +0 -0
- /package/.scannerwork/scanner-report/{duplications-62.pb → duplications-7.pb} +0 -0
- /package/.scannerwork/scanner-report/{duplications-63.pb → duplications-8.pb} +0 -0
- /package/.scannerwork/scanner-report/{issues-23.pb → issues-32.pb} +0 -0
- /package/.scannerwork/scanner-report/{issues-35.pb → issues-7.pb} +0 -0
- /package/.scannerwork/scanner-report/{measures-22.pb → measures-31.pb} +0 -0
- /package/.scannerwork/scanner-report/{measures-23.pb → measures-32.pb} +0 -0
- /package/.scannerwork/scanner-report/{source-22.txt → source-31.txt} +0 -0
- /package/.scannerwork/scanner-report/{source-23.txt → source-32.txt} +0 -0
- /package/.scannerwork/scanner-report/{symbols-22.pb → symbols-31.pb} +0 -0
- /package/.scannerwork/scanner-report/{symbols-23.pb → symbols-32.pb} +0 -0
- /package/.scannerwork/scanner-report/{symbols-19.pb → symbols-8.pb} +0 -0
- /package/.scannerwork/scanner-report/{syntax-highlightings-22.pb → syntax-highlightings-31.pb} +0 -0
- /package/.scannerwork/scanner-report/{syntax-highlightings-23.pb → syntax-highlightings-32.pb} +0 -0
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
// Copyright © 2017 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 fs = require('fs');
|
|
20
|
-
const u = require('./citestutils.js');
|
|
21
|
-
|
|
22
|
-
[{ useApi: true }, { useApi: false }].forEach(function(params) {
|
|
23
|
-
describe(u.scenario('Resume tests', params), function() {
|
|
24
|
-
it('should create a log file', function(done) {
|
|
25
|
-
// Allow up to 90 s for this test
|
|
26
|
-
u.setTimeout(this, 60);
|
|
27
|
-
|
|
28
|
-
const actualBackup = `./${this.fileName}`;
|
|
29
|
-
const logFile = `./${this.fileName}` + '.log';
|
|
30
|
-
// Use abort parameter to terminate the backup a given number of ms after
|
|
31
|
-
// the first data write to the output file.
|
|
32
|
-
const p = u.p(params, { opts: { log: logFile } });
|
|
33
|
-
u.testBackupToFile(p, 'animaldb', actualBackup, function(err) {
|
|
34
|
-
if (err) {
|
|
35
|
-
done(err);
|
|
36
|
-
} else {
|
|
37
|
-
// Assert the log file exists
|
|
38
|
-
try {
|
|
39
|
-
assert.ok(fs.existsSync(logFile), 'The log file should exist.');
|
|
40
|
-
done();
|
|
41
|
-
} catch (err) {
|
|
42
|
-
done(err);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
it('should restore corrupted animaldb to a database correctly', function(done) {
|
|
49
|
-
// Allow up to 60 s to restore and compare (again it should be faster)!
|
|
50
|
-
u.setTimeout(this, 60);
|
|
51
|
-
const input = fs.createReadStream('./test/fixtures/animaldb_corrupted.json');
|
|
52
|
-
const dbName = this.dbName;
|
|
53
|
-
input.on('open', function() {
|
|
54
|
-
u.testRestore(params, input, dbName, function(err) {
|
|
55
|
-
if (err) {
|
|
56
|
-
done(err);
|
|
57
|
-
} else {
|
|
58
|
-
u.dbCompare('animaldb', dbName, done);
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
});
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
it('should restore resumed animaldb with blank line to a database correctly', function(done) {
|
|
65
|
-
// Allow up to 60 s to restore and compare (again it should be faster)!
|
|
66
|
-
u.setTimeout(this, 60);
|
|
67
|
-
const input = fs.createReadStream('./test/fixtures/animaldb_resumed_blank.json');
|
|
68
|
-
const dbName = this.dbName;
|
|
69
|
-
input.on('open', function() {
|
|
70
|
-
u.testRestore(params, input, dbName, function(err) {
|
|
71
|
-
if (err) {
|
|
72
|
-
done(err);
|
|
73
|
-
} else {
|
|
74
|
-
u.dbCompare('animaldb', dbName, done);
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
});
|
|
78
|
-
});
|
|
79
|
-
});
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
describe('Resume tests', function() {
|
|
83
|
-
// Currently cannot abort API backups, when we do this test should be run for
|
|
84
|
-
// both API and CLI
|
|
85
|
-
it('should correctly backup and restore backup10m', function(done) {
|
|
86
|
-
// Allow up to 90 s for this test
|
|
87
|
-
u.setTimeout(this, 90);
|
|
88
|
-
|
|
89
|
-
const actualBackup = `./${this.fileName}`;
|
|
90
|
-
const logFile = `./${this.fileName}` + '.log';
|
|
91
|
-
// Use abort parameter to terminate the backup a given number of ms after
|
|
92
|
-
// the first data write to the output file.
|
|
93
|
-
const p = u.p(params, { abort: true }, { opts: { log: logFile } });
|
|
94
|
-
const restoreDb = this.dbName;
|
|
95
|
-
// Set the database doc count as fewer than this should be written during
|
|
96
|
-
// resumed backup.
|
|
97
|
-
p.exclusiveMaxExpected = 5096;
|
|
98
|
-
|
|
99
|
-
u.testBackupAbortResumeRestore(p, 'backup10m', actualBackup, restoreDb, done);
|
|
100
|
-
});
|
|
101
|
-
// Note --output is only valid for CLI usage, this test should only run for CLI
|
|
102
|
-
const params = { useApi: false };
|
|
103
|
-
it('should correctly backup and restore backup10m using --output', function(done) {
|
|
104
|
-
// Allow up to 90 s for this test
|
|
105
|
-
u.setTimeout(this, 90);
|
|
106
|
-
|
|
107
|
-
const actualBackup = `./${this.fileName}`;
|
|
108
|
-
const logFile = `./${this.fileName}` + '.log';
|
|
109
|
-
// Use abort parameter to terminate the backup a given number of ms after
|
|
110
|
-
// the first data write to the output file.
|
|
111
|
-
const p = u.p(params, { abort: true }, { opts: { output: actualBackup, log: logFile } });
|
|
112
|
-
const restoreDb = this.dbName;
|
|
113
|
-
// Set the database doc count as fewer than this should be written during
|
|
114
|
-
// resumed backup.
|
|
115
|
-
p.exclusiveMaxExpected = 5096;
|
|
116
|
-
|
|
117
|
-
u.testBackupAbortResumeRestore(p, 'backup10m', actualBackup, restoreDb, done);
|
|
118
|
-
});
|
|
119
|
-
});
|
|
@@ -1,118 +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 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;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
// if we have a specified databases
|
|
59
|
-
if (typeof process.env.COUCH_DATABASE !== 'undefined') {
|
|
60
|
-
opts.db = process.env.COUCH_DATABASE;
|
|
61
|
-
}
|
|
62
|
-
|
|
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
|
-
}
|
|
67
|
-
|
|
68
|
-
// if we have a specified parallelism
|
|
69
|
-
if (typeof process.env.COUCH_PARALLELISM !== 'undefined') {
|
|
70
|
-
opts.parallelism = parseInt(process.env.COUCH_PARALLELISM);
|
|
71
|
-
}
|
|
72
|
-
|
|
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);
|
|
76
|
-
}
|
|
77
|
-
|
|
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
|
-
}
|
|
82
|
-
|
|
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
|
-
}
|
|
87
|
-
|
|
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
|
-
}
|
|
92
|
-
|
|
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
|
-
}
|
|
97
|
-
|
|
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
|
-
}
|
|
102
|
-
|
|
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;
|
|
106
|
-
}
|
|
107
|
-
|
|
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
|
-
}
|
|
113
|
-
|
|
114
|
-
module.exports = {
|
|
115
|
-
apiDefaults: apiDefaults,
|
|
116
|
-
cliDefaults: cliDefaults,
|
|
117
|
-
applyEnvironmentVariables: applyEnvironmentVariables
|
|
118
|
-
};
|
|
@@ -1,104 +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
|
-
// fatal errors
|
|
17
|
-
const codes = {
|
|
18
|
-
Error: 1,
|
|
19
|
-
InvalidOption: 2,
|
|
20
|
-
DatabaseNotFound: 10,
|
|
21
|
-
Unauthorized: 11,
|
|
22
|
-
Forbidden: 12,
|
|
23
|
-
DatabaseNotEmpty: 13,
|
|
24
|
-
NoLogFileName: 20,
|
|
25
|
-
LogDoesNotExist: 21,
|
|
26
|
-
IncompleteChangesInLogFile: 22,
|
|
27
|
-
SpoolChangesError: 30,
|
|
28
|
-
HTTPFatalError: 40,
|
|
29
|
-
BulkGetError: 50
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
class BackupError extends Error {
|
|
33
|
-
constructor(name, message) {
|
|
34
|
-
super(message);
|
|
35
|
-
this.name = name;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
class HTTPError extends BackupError {
|
|
40
|
-
constructor(responseError, name) {
|
|
41
|
-
// Special case some names for more useful error messages
|
|
42
|
-
switch (responseError.status) {
|
|
43
|
-
case 401:
|
|
44
|
-
name = 'Unauthorized';
|
|
45
|
-
break;
|
|
46
|
-
case 403:
|
|
47
|
-
name = 'Forbidden';
|
|
48
|
-
break;
|
|
49
|
-
default:
|
|
50
|
-
name = name || 'HTTPFatalError';
|
|
51
|
-
}
|
|
52
|
-
super(name, responseError.message);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
// Default function to return an error for HTTP status codes
|
|
57
|
-
// < 400 -> OK
|
|
58
|
-
// 4XX (except 429) -> Fatal
|
|
59
|
-
// 429 & >=500 -> Transient
|
|
60
|
-
function checkResponse(err) {
|
|
61
|
-
if (err) {
|
|
62
|
-
// Construct an HTTPError if there is request information on the error
|
|
63
|
-
// Codes < 400 are considered OK
|
|
64
|
-
if (err.status >= 400) {
|
|
65
|
-
return new HTTPError(err);
|
|
66
|
-
} else {
|
|
67
|
-
// Send it back again if there was no status code, e.g. a cxn error
|
|
68
|
-
return augmentMessage(err);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
function convertResponseError(responseError, errorFactory) {
|
|
74
|
-
if (!errorFactory) {
|
|
75
|
-
errorFactory = checkResponse;
|
|
76
|
-
}
|
|
77
|
-
return errorFactory(responseError);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
function augmentMessage(err) {
|
|
81
|
-
// For errors that don't have a status code, we are likely looking at a cxn
|
|
82
|
-
// error.
|
|
83
|
-
// Try to augment the message with more detail (core puts the code in statusText)
|
|
84
|
-
if (err && err.statusText) {
|
|
85
|
-
err.message = `${err.message} ${err.statusText}`;
|
|
86
|
-
}
|
|
87
|
-
if (err && err.description) {
|
|
88
|
-
err.message = `${err.message} ${err.description}`;
|
|
89
|
-
}
|
|
90
|
-
return err;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
module.exports = {
|
|
94
|
-
BackupError: BackupError,
|
|
95
|
-
HTTPError: HTTPError,
|
|
96
|
-
convertResponseError: convertResponseError,
|
|
97
|
-
terminationCallback: function terminationCallback(err, data) {
|
|
98
|
-
if (err) {
|
|
99
|
-
console.error(`ERROR: ${err.message}`);
|
|
100
|
-
process.exitCode = codes[err.name] || 1;
|
|
101
|
-
process.exit();
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
};
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
// Copyright © 2017 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 fs = require('fs');
|
|
17
|
-
const stream = require('stream');
|
|
18
|
-
const liner = require('./liner.js');
|
|
19
|
-
|
|
20
|
-
const onLine = function(onCommand, getDocs) {
|
|
21
|
-
const change = new stream.Transform({ objectMode: true });
|
|
22
|
-
|
|
23
|
-
change._transform = function(line, encoding, done) {
|
|
24
|
-
if (line && line[0] === ':') {
|
|
25
|
-
const obj = {
|
|
26
|
-
command: null,
|
|
27
|
-
batch: null,
|
|
28
|
-
docs: []
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
let matches;
|
|
32
|
-
|
|
33
|
-
// extract command
|
|
34
|
-
matches = line.match(/^:([a-z_]+) ?/);
|
|
35
|
-
if (matches) {
|
|
36
|
-
obj.command = matches[1];
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
// extract batch
|
|
40
|
-
matches = line.match(/ batch([0-9]+)/);
|
|
41
|
-
if (matches) {
|
|
42
|
-
obj.batch = parseInt(matches[1]);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
// extract doc ids
|
|
46
|
-
if (getDocs && obj.command === 't') {
|
|
47
|
-
const json = line.replace(/^.* batch[0-9]+ /, '').trim();
|
|
48
|
-
obj.docs = JSON.parse(json);
|
|
49
|
-
}
|
|
50
|
-
onCommand(obj);
|
|
51
|
-
}
|
|
52
|
-
done();
|
|
53
|
-
};
|
|
54
|
-
return change;
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* Generate a list of remaining batches from a download file.
|
|
59
|
-
*
|
|
60
|
-
* @param {string} log - log file name
|
|
61
|
-
* @param {function} callback - callback with err, {changesComplete: N, batches: N}.
|
|
62
|
-
* changesComplete signifies whether the log file appeared to
|
|
63
|
-
* have completed reading the changes feed (contains :changes_complete).
|
|
64
|
-
* batches are remaining batch IDs for download.
|
|
65
|
-
*/
|
|
66
|
-
module.exports = function(log, callback) {
|
|
67
|
-
// our sense of state
|
|
68
|
-
const state = {
|
|
69
|
-
|
|
70
|
-
};
|
|
71
|
-
let changesComplete = false;
|
|
72
|
-
|
|
73
|
-
// called with each line from the log file
|
|
74
|
-
const onCommand = function(obj) {
|
|
75
|
-
if (obj.command === 't') {
|
|
76
|
-
state[obj.batch] = true;
|
|
77
|
-
} else if (obj.command === 'd') {
|
|
78
|
-
delete state[obj.batch];
|
|
79
|
-
} else if (obj.command === 'changes_complete') {
|
|
80
|
-
changesComplete = true;
|
|
81
|
-
}
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
// stream through the previous log file
|
|
85
|
-
fs.createReadStream(log)
|
|
86
|
-
.pipe(liner())
|
|
87
|
-
.pipe(onLine(onCommand, false))
|
|
88
|
-
.on('finish', function() {
|
|
89
|
-
const obj = { changesComplete: changesComplete, batches: state };
|
|
90
|
-
callback(null, obj);
|
|
91
|
-
});
|
|
92
|
-
};
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
// Copyright © 2017, 2022 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 fs = require('fs');
|
|
17
|
-
const liner = require('./liner.js');
|
|
18
|
-
const change = require('./change.js');
|
|
19
|
-
const error = require('./error.js');
|
|
20
|
-
const debug = require('debug')('couchbackup:spoolchanges');
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Write log file for all changes from a database, ready for downloading
|
|
24
|
-
* in batches.
|
|
25
|
-
*
|
|
26
|
-
* @param {string} dbUrl - URL of database
|
|
27
|
-
* @param {string} log - path to log file to use
|
|
28
|
-
* @param {number} bufferSize - the number of changes per batch/log line
|
|
29
|
-
* @param {function(err)} callback - a callback to run on completion
|
|
30
|
-
*/
|
|
31
|
-
module.exports = function(db, log, bufferSize, ee, callback) {
|
|
32
|
-
// list of document ids to process
|
|
33
|
-
const buffer = [];
|
|
34
|
-
let batch = 0;
|
|
35
|
-
let lastSeq = null;
|
|
36
|
-
const logStream = fs.createWriteStream(log);
|
|
37
|
-
let pending = 0;
|
|
38
|
-
// The number of changes to fetch per request
|
|
39
|
-
const limit = 100000;
|
|
40
|
-
|
|
41
|
-
// send documents ids to the queue in batches of bufferSize + the last batch
|
|
42
|
-
const processBuffer = function(lastOne) {
|
|
43
|
-
if (buffer.length >= bufferSize || (lastOne && buffer.length > 0)) {
|
|
44
|
-
debug('writing', buffer.length, 'changes to the backup file');
|
|
45
|
-
const b = { docs: buffer.splice(0, bufferSize), batch: batch };
|
|
46
|
-
logStream.write(':t batch' + batch + ' ' + JSON.stringify(b.docs) + '\n');
|
|
47
|
-
ee.emit('changes', batch);
|
|
48
|
-
batch++;
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
// called once per received change
|
|
53
|
-
const onChange = function(c) {
|
|
54
|
-
if (c) {
|
|
55
|
-
if (c.error) {
|
|
56
|
-
ee.emit('error', new error.BackupError('InvalidChange', `Received invalid change: ${c}`));
|
|
57
|
-
} else if (c.changes) {
|
|
58
|
-
const obj = { id: c.id };
|
|
59
|
-
buffer.push(obj);
|
|
60
|
-
processBuffer(false);
|
|
61
|
-
} else if (c.last_seq) {
|
|
62
|
-
lastSeq = c.last_seq;
|
|
63
|
-
pending = c.pending;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
function getChanges(since = 0) {
|
|
69
|
-
debug('making changes request since ' + since);
|
|
70
|
-
return db.service.postChangesAsStream({ db: db.db, since: since, limit: limit, seqInterval: limit })
|
|
71
|
-
.then(response => {
|
|
72
|
-
response.result.pipe(liner())
|
|
73
|
-
.on('error', function(err) {
|
|
74
|
-
logStream.end();
|
|
75
|
-
callback(err);
|
|
76
|
-
})
|
|
77
|
-
.pipe(change(onChange))
|
|
78
|
-
.on('error', function(err) {
|
|
79
|
-
logStream.end();
|
|
80
|
-
callback(err);
|
|
81
|
-
})
|
|
82
|
-
.on('finish', function() {
|
|
83
|
-
processBuffer(true);
|
|
84
|
-
if (!lastSeq) {
|
|
85
|
-
logStream.end();
|
|
86
|
-
debug('changes request terminated before last_seq was sent');
|
|
87
|
-
callback(new error.BackupError('SpoolChangesError', 'Changes request terminated before last_seq was sent'));
|
|
88
|
-
} else {
|
|
89
|
-
debug(`changes request completed with last_seq: ${lastSeq} and ${pending} changes pending.`);
|
|
90
|
-
if (pending > 0) {
|
|
91
|
-
// Return the next promise
|
|
92
|
-
return getChanges(lastSeq);
|
|
93
|
-
} else {
|
|
94
|
-
debug('finished streaming database changes');
|
|
95
|
-
logStream.end(':changes_complete ' + lastSeq + '\n', 'utf8', callback);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
});
|
|
99
|
-
})
|
|
100
|
-
.catch(err => {
|
|
101
|
-
logStream.end();
|
|
102
|
-
if (err.status && err.status >= 400) {
|
|
103
|
-
callback(error.convertResponseError(err));
|
|
104
|
-
} else if (err.name !== 'SpoolChangesError') {
|
|
105
|
-
callback(new error.BackupError('SpoolChangesError', `Failed changes request - ${err.message}`));
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
getChanges();
|
|
111
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
ee (
|
|
3
|
-
|
|
4
|
-
<
|
|
5
|
-
.. 33 >> FF HH
|
|
6
|
-
44 @@
|
|
7
|
-
``
|
|
8
|
-
$$
|
|
9
|
-
KK+ 1
|
|
10
|
-
|
|
11
|
$ .Z
|
|
12
|
-
|
|
13
|
-
SS
|
|
14
|
-
[[ \\< B`` aa) /(
|
|
15
|
-
]]
|
|
16
|
-
ee hh hh! (
|
|
17
|
-
|
|
18
|
-
..# $..> ?
|
|
19
|
-
33! "337 8
|
|
20
|
-
>>" #>>= >
|
|
21
|
-
@@' (@@C D
|
|
22
|
-
FF# $FF@ A
|
|
23
|
-
HH# $HH@ A
|
|
24
|
-
$$ LL
|
|
25
|
-
QQ
|
|
26
|
-
__+ ,ii
|
|
27
|
-
kk) *mm
|
|
28
|
-
\\U Vqq
|
|
29
|
-
[[! "rr
|