@cocreate/usage 1.0.0 → 1.1.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.1.1](https://github.com/CoCreate-app/CoCreate-usage/compare/v1.1.0...v1.1.1) (2024-02-05)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * Removed https://cdn.cocreate.app/latest/CoCreate.min.css ([5184808](https://github.com/CoCreate-app/CoCreate-usage/commit/518480890edeb1f63a3b5a6858d875ee42f7ceda))
7
+
8
+ # [1.1.0](https://github.com/CoCreate-app/CoCreate-usage/compare/v1.0.0...v1.1.0) (2024-01-08)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * applied host to define environment/branch ([8d7404c](https://github.com/CoCreate-app/CoCreate-usage/commit/8d7404ca75eeece4a17a9477d25101ccdab0a8ed))
14
+
15
+
16
+ ### Features
17
+
18
+ * bumped CoCreate dependencies to their latest versions ([6e0b814](https://github.com/CoCreate-app/CoCreate-usage/commit/6e0b814e6afda547fceca6b7248ea5181de7843b))
19
+
1
20
  # 1.0.0 (2023-11-29)
2
21
 
3
22
 
package/docs/index.html CHANGED
@@ -17,12 +17,6 @@
17
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
-
21
- <!-- CoCreate CSS -->
22
- <link
23
- rel="stylesheet"
24
- href="https://cdn.cocreate.app/latest/CoCreate.min.css"
25
- type="text/css" />
26
20
  </head>
27
21
 
28
22
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/usage",
3
- "version": "1.0.0",
3
+ "version": "1.1.1",
4
4
  "description": "CoCreate-usage",
5
5
  "keywords": [
6
6
  "cocreate-usage",
package/src/index.js CHANGED
@@ -26,7 +26,7 @@ class CoCreateUsage {
26
26
 
27
27
  org = {}
28
28
  org.debounce = setTimeout(() => {
29
- self.send(org, organization_id); // Call the callback to display the count
29
+ self.send(org, organization_id, data.host); // Call the callback to display the count
30
30
  self.organizations.delete(organization_id)
31
31
  }, 60000);
32
32
 
@@ -54,7 +54,7 @@ class CoCreateUsage {
54
54
  }
55
55
 
56
56
 
57
- async send(org, organization_id) {
57
+ async send(org, organization_id, host) {
58
58
  delete org.debounce
59
59
 
60
60
  org.dataTransferedOut += 250
@@ -63,6 +63,7 @@ class CoCreateUsage {
63
63
  const platformOrganization = this.crud.config.organization_id
64
64
  let organization = await this.crud.send({
65
65
  method: 'object.read',
66
+ host: this.crud.config.host,
66
67
  array: 'organizations',
67
68
  object: { _id: organization_id },
68
69
  organization_id: platformOrganization
@@ -103,6 +104,7 @@ class CoCreateUsage {
103
104
  isResetDataTransfer = true
104
105
  this.crud.send({
105
106
  method: 'object.create',
107
+ host: this.crud.config.host,
106
108
  array: 'transactions',
107
109
  object: {
108
110
  organization_id,
@@ -130,6 +132,7 @@ class CoCreateUsage {
130
132
 
131
133
  let balanceUpdate = {
132
134
  method: 'object.update',
135
+ host: this.crud.config.host,
133
136
  array: 'organizations',
134
137
  object: { _id: organization_id },
135
138
  organization_id: platformOrganization,
@@ -154,6 +157,7 @@ class CoCreateUsage {
154
157
 
155
158
  let transaction = {
156
159
  method: 'object.create',
160
+ host,
157
161
  array: 'transactions',
158
162
  object: {
159
163
  organization_id,