feat: Remove unnecessary couchDBChangesFeed.js entry and update SharedWorker initialization in CouchObjectProvider.

This commit is contained in:
Jesse Mazzella 2024-04-12 10:40:58 -07:00
parent 63cdd34462
commit d7472ebc4c
2 changed files with 4 additions and 5 deletions

View File

@ -45,7 +45,6 @@ const config = {
},
entry: {
openmct: './openmct.js',
couchDBChangesFeed: './src/plugins/persistence/couch/CouchChangesFeed.js',
espressoTheme: './src/plugins/themes/espresso-theme.scss',
snowTheme: './src/plugins/themes/snow-theme.scss',
darkmatterTheme: './src/plugins/themes/darkmatter-theme.scss'

View File

@ -57,11 +57,11 @@ class CouchObjectProvider {
let provider = this;
let sharedWorker;
// eslint-disable-next-line no-undef
const sharedWorkerURL = `${this.openmct.getAssetPath()}${__OPENMCT_ROOT_RELATIVE__}couchDBChangesFeed.js`;
sharedWorker = new SharedWorker(
sharedWorkerURL,
/* webpackChunkName: "couchDBChangesFeed" */ new URL(
'./CouchChangesFeed.js',
import.meta.url
),
`CouchDB SSE Shared Worker for ${this.namespace}`
);
sharedWorker.port.onmessage = provider.onSharedWorkerMessage.bind(this);