@cocreate/crud-server 1.23.15 → 1.24.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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [1.24.0](https://github.com/CoCreate-app/CoCreate-crud-server/compare/v1.23.15...v1.24.0) (2023-06-15)
2
+
3
+
4
+ ### Features
5
+
6
+ * add @cocreate/config ([1710d45](https://github.com/CoCreate-app/CoCreate-crud-server/commit/1710d457ff9ab000d1c4f4bc57c0fcd62d648b1a))
7
+
1
8
  ## [1.23.15](https://github.com/CoCreate-app/CoCreate-crud-server/compare/v1.23.14...v1.23.15) (2023-06-14)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/crud-server",
3
- "version": "1.23.15",
3
+ "version": "1.24.0",
4
4
  "description": "CoCreate-crud-server",
5
5
  "keywords": [
6
6
  "cocreate-crud",
@@ -40,8 +40,8 @@
40
40
  },
41
41
  "homepage": "https://cocreate.app/docs/CoCreate-crud-server",
42
42
  "dependencies": {
43
- "@cocreate/config": "^1.0.2",
44
- "@cocreate/utils": "^1.21.15",
43
+ "@cocreate/config": "^1.0.4",
44
+ "@cocreate/utils": "^1.21.16",
45
45
  "csvtojson": "^2.0.10",
46
46
  "json-2-csv": "^3.10.3"
47
47
  }
package/src/index.js CHANGED
@@ -13,9 +13,18 @@ class CoCreateCrudServer {
13
13
  }
14
14
 
15
15
  async init() {
16
- this.config = await config({
17
- organization_id: { prompt: 'Enter your organization_id: ' },
18
- storage: { prompt: 'Enter a JSON.stringify storage object: ' }
16
+ let config = await config({
17
+ 'organization_id': { prompt: 'Enter your organization_id: ' },
18
+ 'name': {
19
+ prompt: 'Enter a friendly name for the new storage: ',
20
+ variable: true
21
+ },
22
+ 'storage.{{name}}.provider': {
23
+ prompt: 'Enter the storage provider, ex mongodb: '
24
+ },
25
+ 'storage.{{name}}.url': {
26
+ prompt: 'Enter the storage providers url: '
27
+ }
19
28
  })
20
29
 
21
30
  let dbUrl