@cocreate/organizations 1.22.1 → 1.23.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 +15 -0
- package/package.json +5 -5
- package/src/client.js +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
## [1.23.1](https://github.com/CoCreate-app/CoCreate-organizations/compare/v1.23.0...v1.23.1) (2023-10-25)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* bump dependencies ([44ba953](https://github.com/CoCreate-app/CoCreate-organizations/commit/44ba953a2cd92dd4e0004030a291354381be4b87))
|
|
7
|
+
|
|
8
|
+
# [1.23.0](https://github.com/CoCreate-app/CoCreate-organizations/compare/v1.22.1...v1.23.0) (2023-10-22)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* ObjectId() returns an object containg the parts iof the _id along with a toString() function ([46d5c28](https://github.com/CoCreate-app/CoCreate-organizations/commit/46d5c28f3ca21b12477a34f69225e8fc5af63fd1))
|
|
14
|
+
* ObjectId() returns an object containg the parts iof the _id along with a toString() function ([a1976de](https://github.com/CoCreate-app/CoCreate-organizations/commit/a1976de4d1af4af5d07830cc080eecca709d2cc1))
|
|
15
|
+
|
|
1
16
|
## [1.22.1](https://github.com/CoCreate-app/CoCreate-organizations/compare/v1.22.0...v1.22.1) (2023-10-19)
|
|
2
17
|
|
|
3
18
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cocreate/organizations",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.23.1",
|
|
4
4
|
"description": "A simple organizations component in vanilla javascript. Easily configured using HTML5 attributes and/or JavaScript API.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"organizations",
|
|
@@ -58,9 +58,9 @@
|
|
|
58
58
|
"webpack-log": "^3.0.1"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@cocreate/actions": "^1.
|
|
62
|
-
"@cocreate/config": "^1.6.
|
|
63
|
-
"@cocreate/crud-client": "^1.28.
|
|
64
|
-
"@cocreate/elements": "^1.
|
|
61
|
+
"@cocreate/actions": "^1.12.0",
|
|
62
|
+
"@cocreate/config": "^1.6.5",
|
|
63
|
+
"@cocreate/crud-client": "^1.28.10",
|
|
64
|
+
"@cocreate/elements": "^1.25.1"
|
|
65
65
|
}
|
|
66
66
|
}
|
package/src/client.js
CHANGED
|
@@ -6,9 +6,9 @@ import Indexeddb from '@cocreate/indexeddb';
|
|
|
6
6
|
import uuid from '@cocreate/uuid';
|
|
7
7
|
|
|
8
8
|
async function generateDB(organization = { object: {} }, user = { object: {} }) {
|
|
9
|
-
const organization_id = organization.object._id || Crud.ObjectId();
|
|
9
|
+
const organization_id = organization.object._id || Crud.ObjectId().toString();
|
|
10
10
|
const apikey = organization.object.key || uuid.generate();
|
|
11
|
-
const user_id = user.object._id || Crud.ObjectId();
|
|
11
|
+
const user_id = user.object._id || Crud.ObjectId().toString();
|
|
12
12
|
|
|
13
13
|
try {
|
|
14
14
|
// Create organization
|
|
@@ -39,7 +39,7 @@ async function generateDB(organization = { object: {} }, user = { object: {} })
|
|
|
39
39
|
database: organization_id,
|
|
40
40
|
array: 'keys',
|
|
41
41
|
object: {
|
|
42
|
-
_id: Crud.ObjectId(),
|
|
42
|
+
_id: Crud.ObjectId().toString(),
|
|
43
43
|
type: "key",
|
|
44
44
|
key: apikey,
|
|
45
45
|
actions: {
|
|
@@ -53,7 +53,7 @@ async function generateDB(organization = { object: {} }, user = { object: {} })
|
|
|
53
53
|
Indexeddb.send(key);
|
|
54
54
|
|
|
55
55
|
// Create role
|
|
56
|
-
let role_id = Crud.ObjectId();
|
|
56
|
+
let role_id = Crud.ObjectId().toString();
|
|
57
57
|
let role = {
|
|
58
58
|
method: 'create.object',
|
|
59
59
|
storage: 'indexeddb',
|
|
@@ -76,7 +76,7 @@ async function generateDB(organization = { object: {} }, user = { object: {} })
|
|
|
76
76
|
database: organization_id,
|
|
77
77
|
array: 'keys',
|
|
78
78
|
object: {
|
|
79
|
-
_id: Crud.ObjectId(),
|
|
79
|
+
_id: Crud.ObjectId().toString(),
|
|
80
80
|
type: "user",
|
|
81
81
|
key: user_id,
|
|
82
82
|
array: 'users', // could be any array
|