@rpcbase/server 0.329.0 → 0.331.0

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.
@@ -6,7 +6,7 @@ const run_docker = require("./run_docker")
6
6
  const run_native = require("./run_native")
7
7
 
8
8
  // TODO: auto create network if necessary
9
- // docker network create ${RB_INSTANCE_NAME}-network
9
+ // docker network create ${RB_APP_NAME}-network
10
10
 
11
11
  const start_server = async(args) => {
12
12
  const infrastructure_dir = path.join(process.cwd(), "../infrastructure")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpcbase/server",
3
- "version": "0.329.0",
3
+ "version": "0.331.0",
4
4
  "license": "SSPL-1.0",
5
5
  "main": "./index.js",
6
6
  "bin": {
@@ -1,5 +1,4 @@
1
1
  /* @flow */
2
- const assert = require("assert")
3
2
  const debug = require("debug")
4
3
  const _get = require("lodash/get")
5
4
  const _set = require("lodash/set")
@@ -42,7 +41,11 @@ const mongoose_delete_plugin = (schema) => {
42
41
  return mongoose.models[k].collection.collectionName === coll_name
43
42
  })
44
43
 
45
- assert(model_name, `unable to resolve model name for coll_name:${coll_name}`)
44
+ // assert(model_name, `unable to resolve model name for coll_name:${coll_name}`)
45
+ // there are dynamic models so we can't assert model_name is there
46
+ if (!model_name) {
47
+ return
48
+ }
46
49
 
47
50
  dispatch_queue(queue, model_name, "delete", doc)
48
51
  })
@@ -63,7 +66,9 @@ const dispatch_change_handler = (change) => {
63
66
  return mongoose.models[k].collection.collectionName === coll_name
64
67
  })
65
68
 
66
- assert(model_name, `unable to resolve model name for coll_name:${coll_name}`)
69
+ if (!model_name) {
70
+ return
71
+ }
67
72
 
68
73
  dispatch_queue(queue, model_name, op, change.fullDocument, change.updateDescription)
69
74
  }