Skip to content

Commit 8484272

Browse files
committed
streamline + refactor
1 parent 0828694 commit 8484272

File tree

5 files changed

+7984
-10820
lines changed

5 files changed

+7984
-10820
lines changed

src/domain/datasource-factory.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ const DsCoreExtensions = superclass =>
9090
return new Transform({
9191
objectMode: true,
9292

93-
transform (chunk, _encoding, callback) {
93+
transform (chunk, _encoding, next) {
9494
this.push(ModelFactory.loadModel(broker, ctx, chunk, ctx.name))
95-
callback()
95+
next()
9696
}
9797
})
9898
}
@@ -101,7 +101,7 @@ const DsCoreExtensions = superclass =>
101101
if (options?.writable)
102102
return isMainThread
103103
? super.list(options)
104-
: super.list({ ...options, transfrom: this.transform() })
104+
: super.list({ ...options, transform: this.transform() })
105105

106106
const arr = await super.list(options)
107107

src/domain/make-ports.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,12 @@ export default function makePorts (ports, adapters, broker, datasource) {
190190
const disabled = portConf.disabled || !adapters[port]
191191

192192
// Listen for event that will invoke this port
193-
const rememberPort = disabled
194-
? false
195-
: addPortListener(portName, portConf, broker, datasource)
193+
const rememberPort = addPortListener(
194+
portName,
195+
portConf,
196+
broker,
197+
datasource
198+
)
196199

197200
/**
198201
*
@@ -223,7 +226,7 @@ export default function makePorts (ports, adapters, broker, datasource) {
223226
}
224227

225228
try {
226-
// call the inbound or oubound adapter and wait
229+
// call the inbound or oubound adapte
227230
const result = await adapters[port]({ model: this, port, args })
228231

229232
// Stop the timer

0 commit comments

Comments
 (0)