@nxtedition/lib 15.1.7 → 16.0.1

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/worker.js CHANGED
@@ -1,12 +1,12 @@
1
- const EE = require('events')
1
+ import { once } from 'node:events'
2
2
 
3
- module.exports.terminate = async function terminate(worker, { logger, timeout = 10e3 } = {}) {
3
+ export async function terminate(worker, { logger = null, timeout = 10e3 } = {}) {
4
4
  try {
5
5
  worker.postMessage({ type: 'nxt:worker:terminate' })
6
6
  await Promise.race([
7
- EE.once(worker, 'exit'),
7
+ once(worker, 'exit'),
8
8
  new Promise((resolve, reject) =>
9
- setTimeout(() => reject(new Error('worker close timeout')), timeout)
9
+ setTimeout(() => reject(new Error('worker close timeout')), timeout),
10
10
  ),
11
11
  ])
12
12
  } catch (err) {
package/rxjs/index.js DELETED
@@ -1,7 +0,0 @@
1
- module.exports = {
2
- auditMap: require('./auditMap'),
3
- combineMap: require('./combineMap'),
4
- firstValueFrom: require('./firstValueFrom'),
5
- lastValueFrom: require('./lastValueFrom'),
6
- withAbortSignal: require('./withAbortSignal'),
7
- }
package/util/index.js DELETED
@@ -1,5 +0,0 @@
1
- module.exports = {
2
- cached: require('./cached'),
3
- compareRev: require('./compare-rev'),
4
- template: './template',
5
- }