@cocreate/crud-server 1.23.15 → 1.24.1

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,17 @@
1
+ ## [1.24.1](https://github.com/CoCreate-app/CoCreate-crud-server/compare/v1.24.0...v1.24.1) (2023-06-15)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * this.config ([af0cb69](https://github.com/CoCreate-app/CoCreate-crud-server/commit/af0cb691c329748656002523d890066979d07e0c))
7
+
8
+ # [1.24.0](https://github.com/CoCreate-app/CoCreate-crud-server/compare/v1.23.15...v1.24.0) (2023-06-15)
9
+
10
+
11
+ ### Features
12
+
13
+ * add @cocreate/config ([1710d45](https://github.com/CoCreate-app/CoCreate-crud-server/commit/1710d457ff9ab000d1c4f4bc57c0fcd62d648b1a))
14
+
1
15
  ## [1.23.15](https://github.com/CoCreate-app/CoCreate-crud-server/compare/v1.23.14...v1.23.15) (2023-06-14)
2
16
 
3
17
 
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.1",
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
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const { ObjectId, searchData, sortData } = require("@cocreate/utils");
4
- const config = require('@cocreate/config')
4
+ const Config = require('@cocreate/config')
5
5
 
6
6
  class CoCreateCrudServer {
7
7
  constructor(wsManager, databases) {
@@ -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
+ this.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