@cocreate/crud-server 1.29.0 → 1.30.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,26 @@
1
+ # [1.30.0](https://github.com/CoCreate-app/CoCreate-crud-server/compare/v1.29.1...v1.30.0) (2023-11-12)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * bump dependencies for latest features ([4a787c6](https://github.com/CoCreate-app/CoCreate-crud-server/commit/4a787c6045b2a6e27f79bdeca52ec42fc275ccfa))
7
+ * set $filter.index ([414946f](https://github.com/CoCreate-app/CoCreate-crud-server/commit/414946fbb1528b65017dae5eb5e00b99c742f10a))
8
+
9
+
10
+ ### Features
11
+
12
+ * set starting index ([3fca777](https://github.com/CoCreate-app/CoCreate-crud-server/commit/3fca7775e2351d84b831f416bd2c361338e5b08c))
13
+
14
+ ## [1.29.1](https://github.com/CoCreate-app/CoCreate-crud-server/compare/v1.29.0...v1.29.1) (2023-11-09)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * date updated to ISO format ([78efb88](https://github.com/CoCreate-app/CoCreate-crud-server/commit/78efb886aee6b8f2522a32180315781c4824f79d))
20
+ * meta name typo ([cb45152](https://github.com/CoCreate-app/CoCreate-crud-server/commit/cb45152c9895a92cd27c3ddbeb055ad67e0a2f4c))
21
+ * update crud methods ([76e0135](https://github.com/CoCreate-app/CoCreate-crud-server/commit/76e0135f34976beec3c2bbd0f14ec2338b1fecac))
22
+ * update host ([efeddaf](https://github.com/CoCreate-app/CoCreate-crud-server/commit/efeddaff4f791f8c4d3d288f5e108b152eec07c8))
23
+
1
24
  # [1.29.0](https://github.com/CoCreate-app/CoCreate-crud-server/compare/v1.28.11...v1.29.0) (2023-11-03)
2
25
 
3
26
 
@@ -12,8 +12,7 @@ module.exports = {
12
12
  "pathname": "/docs/crud-server/index.html",
13
13
  "src": "{{./docs/index.html}}",
14
14
  "host": [
15
- "*",
16
- "general.cocreate.app"
15
+ "*"
17
16
  ],
18
17
  "directory": "crud-server",
19
18
  "content-type": "text/html",
package/docs/index.html CHANGED
@@ -11,10 +11,10 @@
11
11
  sizes="32x32"
12
12
  href="https://cocreate.app/images/favicon.ico" />
13
13
  <meta
14
- key="description"
14
+ name="description"
15
15
  content="A simple HTML5 and pure javascript component. Easy configuration using data-attributes and highly styleable." />
16
16
  <meta
17
- key="keywords"
17
+ name="keywords"
18
18
  content="helper classes, utility classes, css framework, css library, inline style classes" />
19
19
  <meta name="robots" content="index,follow" />
20
20
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/crud-server",
3
- "version": "1.29.0",
3
+ "version": "1.30.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.6.6",
44
- "@cocreate/utils": "^1.26.2",
43
+ "@cocreate/config": "^1.6.8",
44
+ "@cocreate/utils": "^1.27.1",
45
45
  "csvtojson": "^2.0.10",
46
46
  "json-2-csv": "^3.10.3"
47
47
  }
package/src/index.js CHANGED
@@ -80,10 +80,8 @@ class CoCreateCrudServer {
80
80
  if (storages.error)
81
81
  return resolve(storages)
82
82
 
83
- if (data['timeStamp'])
84
- data['timeStamp'] = new Date(data['timeStamp'])
85
- else
86
- data['timeStamp'] = new Date()
83
+ if (!data['timeStamp'])
84
+ data['timeStamp'] = new Date().toISOString()
87
85
 
88
86
  // TODO: manage error handling if if no method defined
89
87
  if (data.method.endsWith('.update') && data.upsert != false)
@@ -112,7 +110,7 @@ class CoCreateCrudServer {
112
110
  if (object) {
113
111
  for (let key of syncKeys) {
114
112
  if (object[key])
115
- platformUpdate.object[0][key] = object[key]
113
+ platformobject.update[0][key] = object[key]
116
114
  }
117
115
  }
118
116
 
@@ -145,8 +143,10 @@ class CoCreateCrudServer {
145
143
  let type = data.method.split(".")[0]
146
144
  if (data.$filter.sort && data.$filter.sort.length)
147
145
  data[type] = sortData(data[type], data.$filter.sort)
148
-
149
- data.$filter.count = data[type].length
146
+ if (!data.$filter.index)
147
+ data.$filter.index = 0
148
+ data.$filter.startingIndex = data.$filter.index
149
+ data.$filter.index += data[type].length
150
150
  }
151
151
 
152
152
  }