@flowerforce/flowerbase 1.7.5-beta.4 → 1.7.5-beta.5
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../../src/features/functions/controller.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAmHhD,eAAO,MAAM,iCAAiC,GAAI,OAAO,OAAO,KAAG,OA0BlE,CAAA;AAID,eAAO,MAAM,6BAA6B,GAAI,OAAO,OAAO,KAAG,OAgD9D,CAAA;AAqHD;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,EAAE,
|
|
1
|
+
{"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../../src/features/functions/controller.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAmHhD,eAAO,MAAM,iCAAiC,GAAI,OAAO,OAAO,KAAG,OA0BlE,CAAA;AAID,eAAO,MAAM,6BAA6B,GAAI,OAAO,OAAO,KAAG,OAgD9D,CAAA;AAqHD;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,EAAE,kBAoRjC,CAAA"}
|
|
@@ -359,7 +359,6 @@ const functionsController = (app_1, _a) => __awaiter(void 0, [app_1, _a], void 0
|
|
|
359
359
|
const config = bson_1.EJSON.deserialize(decodedConfig);
|
|
360
360
|
const [_a] = config.arguments, { database, collection } = _a, watchArgsInput = __rest(_a, ["database", "collection"]);
|
|
361
361
|
const watchArgs = isRecord(watchArgsInput) ? watchArgsInput : {};
|
|
362
|
-
console.log("🚀 ~ functionsController ~ watchArgs:", watchArgs);
|
|
363
362
|
const headers = {
|
|
364
363
|
'Content-Type': 'text/event-stream',
|
|
365
364
|
'Cache-Control': 'no-cache',
|
|
@@ -420,7 +419,6 @@ const functionsController = (app_1, _a) => __awaiter(void 0, [app_1, _a], void 0
|
|
|
420
419
|
}
|
|
421
420
|
});
|
|
422
421
|
const onHubChange = (change) => __awaiter(void 0, void 0, void 0, function* () {
|
|
423
|
-
console.log("🚀 ~ onHubChange ~ change:", change);
|
|
424
422
|
const subscribers = Array.from(currentHub.subscribers.values());
|
|
425
423
|
yield Promise.all(subscribers.map((subscriber) => __awaiter(void 0, void 0, void 0, function* () {
|
|
426
424
|
var _a, _b, _c;
|
|
@@ -444,7 +442,6 @@ const functionsController = (app_1, _a) => __awaiter(void 0, [app_1, _a], void 0
|
|
|
444
442
|
.db(currentHub.database)
|
|
445
443
|
.collection(currentHub.collection)
|
|
446
444
|
.findOne(readQuery);
|
|
447
|
-
console.log("🚀 ~ onHubChange ~ readableDoc:", readableDoc);
|
|
448
445
|
if (!isReadableDocumentResult(readableDoc))
|
|
449
446
|
return;
|
|
450
447
|
subscriberRes.write(`data: ${serializeEjson(change)}\n\n`);
|
package/package.json
CHANGED
|
@@ -440,7 +440,6 @@ export const functionsController: FunctionController = async (
|
|
|
440
440
|
|
|
441
441
|
const [{ database, collection, ...watchArgsInput }] = config.arguments
|
|
442
442
|
const watchArgs = isRecord(watchArgsInput) ? watchArgsInput : {}
|
|
443
|
-
console.log("🚀 ~ functionsController ~ watchArgs:", watchArgs)
|
|
444
443
|
|
|
445
444
|
const headers = {
|
|
446
445
|
'Content-Type': 'text/event-stream',
|
|
@@ -511,7 +510,6 @@ export const functionsController: FunctionController = async (
|
|
|
511
510
|
}
|
|
512
511
|
|
|
513
512
|
const onHubChange = async (change: Document) => {
|
|
514
|
-
console.log("🚀 ~ onHubChange ~ change:", change)
|
|
515
513
|
const subscribers = Array.from(currentHub.subscribers.values())
|
|
516
514
|
await Promise.all(subscribers.map(async (subscriber) => {
|
|
517
515
|
const subscriberRes = subscriber.response
|
|
@@ -538,7 +536,6 @@ export const functionsController: FunctionController = async (
|
|
|
538
536
|
.db(currentHub.database)
|
|
539
537
|
.collection(currentHub.collection)
|
|
540
538
|
.findOne(readQuery)
|
|
541
|
-
console.log("🚀 ~ onHubChange ~ readableDoc:", readableDoc)
|
|
542
539
|
|
|
543
540
|
if (!isReadableDocumentResult(readableDoc)) return
|
|
544
541
|
subscriberRes.write(`data: ${serializeEjson(change)}\n\n`)
|