mango-cms 0.2.25 → 0.2.27
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/default/package.json
CHANGED
|
@@ -226,12 +226,13 @@ const Mango = collections.reduce((a, c) => {
|
|
|
226
226
|
|
|
227
227
|
}
|
|
228
228
|
|
|
229
|
-
let subscribe = (
|
|
229
|
+
let subscribe = (room, message, callback) => {
|
|
230
|
+
message = message || c.name
|
|
230
231
|
let socket = io(`${api}/${c.name}`, { transports: ['websocket'] })
|
|
231
232
|
let userId = window.localStorage.getItem('auth').split(':')[1]
|
|
232
233
|
room = room || userId
|
|
233
234
|
socket.emit('subscribeToThread', room)
|
|
234
|
-
if (callback) socket.on(
|
|
235
|
+
if (callback) socket.on(message, callback)
|
|
235
236
|
}
|
|
236
237
|
|
|
237
238
|
a[c.name] = runQuery
|
|
@@ -239,9 +240,9 @@ const Mango = collections.reduce((a, c) => {
|
|
|
239
240
|
a[c.name]['delete'] = deleteEntry
|
|
240
241
|
a[c.name]['subscribe'] = subscribe
|
|
241
242
|
a[c.singular] = (id, query) => runQuery({ id, ...query })
|
|
242
|
-
a[c.singular]['subscribe'] = (id, callback) => {
|
|
243
|
+
a[c.singular]['subscribe'] = (id, callback, message) => {
|
|
243
244
|
if (!id) return console.error('No id provided')
|
|
244
|
-
return subscribe(
|
|
245
|
+
return subscribe(id, message, callback)
|
|
245
246
|
}
|
|
246
247
|
|
|
247
248
|
a[c.name]['local'] = localDB.getEntries
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mango-cms",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.27",
|
|
4
4
|
"main": "./index.js",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./index.js",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"node-lame": "^1.3.2",
|
|
81
81
|
"node-zip": "^1.1.1",
|
|
82
82
|
"nodemon-webpack-plugin": "^4.3.2",
|
|
83
|
-
"openai": "^
|
|
83
|
+
"openai": "^5.15.0",
|
|
84
84
|
"pack": "^2.2.0",
|
|
85
85
|
"parse-html-text-content": "^1.1.1",
|
|
86
86
|
"redis": "^4.7.0",
|