@cocreate/users 1.32.0 → 1.33.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,22 @@
1
+ ## [1.33.1](https://github.com/CoCreate-app/CoCreate-users/compare/v1.33.0...v1.33.1) (2024-01-17)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * update to support new query system ([6e11866](https://github.com/CoCreate-app/CoCreate-users/commit/6e118666cc66c83adaf0a56c029f044305d9d924))
7
+
8
+ # [1.33.0](https://github.com/CoCreate-app/CoCreate-users/compare/v1.32.0...v1.33.0) (2024-01-08)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * applied host to define environment/branch ([953c3fa](https://github.com/CoCreate-app/CoCreate-users/commit/953c3fa3cd144e1d9c0718e0c25df786892a136d))
14
+
15
+
16
+ ### Features
17
+
18
+ * bumped CoCreate dependencies to their latest versions ([e118a0f](https://github.com/CoCreate-app/CoCreate-users/commit/e118a0fcbd74ac9ffa20ec21830855b1176c50ee))
19
+
1
20
  # [1.32.0](https://github.com/CoCreate-app/CoCreate-users/compare/v1.31.3...v1.32.0) (2023-12-21)
2
21
 
3
22
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/users",
3
- "version": "1.32.0",
3
+ "version": "1.33.1",
4
4
  "description": "A simple users component in vanilla javascript. Easily configured using HTML5 attributes and/or JavaScript API.",
5
5
  "keywords": [
6
6
  "users",
@@ -58,11 +58,11 @@
58
58
  "webpack-log": "^3.0.1"
59
59
  },
60
60
  "dependencies": {
61
- "@cocreate/actions": "^1.14.0",
62
- "@cocreate/crud-client": "^1.31.0",
61
+ "@cocreate/actions": "^1.15.1",
62
+ "@cocreate/crud-client": "^1.32.2",
63
63
  "@cocreate/element-prototype": "^1.15.0",
64
- "@cocreate/elements": "^1.28.0",
64
+ "@cocreate/elements": "^1.32.0",
65
65
  "@cocreate/local-storage": "^1.12.0",
66
- "@cocreate/render": "^1.35.0"
66
+ "@cocreate/render": "^1.37.1"
67
67
  }
68
68
  }
package/src/client.js CHANGED
@@ -79,13 +79,13 @@ const CoCreateUser = {
79
79
 
80
80
  signIn: async function (action) {
81
81
  if (!action.form) return;
82
- let query = [];
82
+ let query = {};
83
83
 
84
84
  const inputs = action.form.querySelectorAll('input[key="email"], input[key="password"], input[key="username"]');
85
85
  for (let i = 0; i < inputs.length; i++) {
86
86
  const key = inputs[i].getAttribute('key');
87
87
  const value = await inputs[i].getValue();
88
- query.push({ key, value, operator: '$eq' })
88
+ query[key] = value
89
89
  }
90
90
 
91
91
  let request = {
package/src/server.js CHANGED
@@ -17,12 +17,14 @@ class CoCreateUser {
17
17
  try {
18
18
  if (data.user) {
19
19
  data.user.method = 'object.create'
20
+ data.user.host = data.host
20
21
  const response = await this.crud.send(data.user)
21
22
  this.wsManager.send(response);
22
23
  }
23
24
 
24
25
  if (data.userKey) {
25
26
  data.userKey.method = 'object.create'
27
+ data.userKey.host = data.host
26
28
  const response = await this.crud.send(data.userKey)
27
29
  this.wsManager.send(response);
28
30
  }
@@ -55,6 +57,7 @@ class CoCreateUser {
55
57
  this.crud.send(data).then(async (data) => {
56
58
  let response = {
57
59
  socket,
60
+ host: data.host,
58
61
  method: 'signIn',
59
62
  success: false,
60
63
  message: "signIn failed",