@cocreate/lazy-loader 1.11.3 → 1.11.4
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 +7 -0
- package/package.json +1 -1
- package/src/server.js +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [1.11.4](https://github.com/CoCreate-app/CoCreate-lazy-loader/compare/v1.11.3...v1.11.4) (2023-12-10)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* handle data.crud object ([15ffb7c](https://github.com/CoCreate-app/CoCreate-lazy-loader/commit/15ffb7c407503fd48c22874df455b8256b33b3bb))
|
|
7
|
+
|
|
1
8
|
## [1.11.3](https://github.com/CoCreate-app/CoCreate-lazy-loader/compare/v1.11.2...v1.11.3) (2023-12-09)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
package/src/server.js
CHANGED
|
@@ -79,7 +79,7 @@ class CoCreateLazyLoader {
|
|
|
79
79
|
if (valideUrl.pathname.startsWith('/webhooks/')) {
|
|
80
80
|
let name = req.url.split('/')[2]; // Assuming URL structure is /webhook/name/...
|
|
81
81
|
if (this.modules[name]) {
|
|
82
|
-
this.executeScriptWithTimeout(name, { req, res,
|
|
82
|
+
this.executeScriptWithTimeout(name, { req, res, organization, valideUrl, organization_id: organization._id })
|
|
83
83
|
} else {
|
|
84
84
|
// Handle unknown module or missing webhook method
|
|
85
85
|
res.writeHead(404, { 'Content-Type': 'application/json' });
|
|
@@ -118,8 +118,10 @@ class CoCreateLazyLoader {
|
|
|
118
118
|
|
|
119
119
|
if (this.modules[name].content) {
|
|
120
120
|
data.apis = await this.getApiKey(data.organization_id, name)
|
|
121
|
+
data.crud = this.crud
|
|
121
122
|
data = await this.modules[name].content.send(data)
|
|
122
123
|
delete data.apis
|
|
124
|
+
delete data.crud
|
|
123
125
|
if (data.socket)
|
|
124
126
|
this.wsManager.send(data)
|
|
125
127
|
} else
|