@budibase/cli 2.3.17 → 2.3.18-alpha.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@budibase/cli",
3
- "version": "2.3.17",
3
+ "version": "2.3.18-alpha.0",
4
4
  "description": "Budibase CLI, for developers, self hosting and migrations.",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -26,9 +26,9 @@
26
26
  "outputPath": "build"
27
27
  },
28
28
  "dependencies": {
29
- "@budibase/backend-core": "^2.3.17",
30
- "@budibase/string-templates": "^2.3.17",
31
- "@budibase/types": "^2.3.17",
29
+ "@budibase/backend-core": "2.3.18-alpha.0",
30
+ "@budibase/string-templates": "2.3.18-alpha.0",
31
+ "@budibase/types": "2.3.18-alpha.0",
32
32
  "axios": "0.21.2",
33
33
  "chalk": "4.1.0",
34
34
  "cli-progress": "3.11.2",
@@ -54,5 +54,5 @@
54
54
  "eslint": "^7.20.0",
55
55
  "renamer": "^4.0.0"
56
56
  },
57
- "gitHead": "a57c922b91c1df8dc276588a5ad583a0c1aea52c"
57
+ "gitHead": "f4dd710b75eb0a7a65e6f9d8b8f709d3b76c435b"
58
58
  }
@@ -74,17 +74,17 @@ exports.getConfig = async (envFile = true) => {
74
74
  return config
75
75
  }
76
76
 
77
- exports.replication = (from, to) => {
78
- return new Promise((resolve, reject) => {
79
- from.replicate
80
- .to(to)
81
- .on("complete", () => {
82
- resolve()
83
- })
84
- .on("error", err => {
85
- reject(err)
86
- })
87
- })
77
+ exports.replication = async (from, to) => {
78
+ const pouch = getPouch()
79
+ try {
80
+ await pouch.replicate(from, to, {
81
+ batch_size: 1000,
82
+ batch_limit: 5,
83
+ style: "main_only",
84
+ })
85
+ } catch (err) {
86
+ throw new Error(`Replication failed - ${JSON.stringify(err)}`)
87
+ }
88
88
  }
89
89
 
90
90
  exports.getPouches = config => {