refactor(daemon): Pivot from shutdown to terminate
To align with web worker lingo.
MODIFY
packages/daemon/index.d.ts
packages/daemon/index.d.ts
@@ -6,5 +6,5 @@ type Locator = {
export async function start(locator?: Locator);
export async function stop(locator?: Locator);
export async function restart(locator?: Locator);
-export async function shutdown(locator?: Locator);
+export async function terminate(locator?: Locator);
export async function clean(locator?: Locator);

MODIFY
packages/daemon/index.js
packages/daemon/index.js
@@ -24,13 +24,13 @@ const defaultLocator = {
const endoDaemonPath = url.fileURLToPath(new URL('src/daemon.js', import.meta.url));
-export const shutdown = async (locator = defaultLocator) => {
+export const terminate = async (locator = defaultLocator) => {
const { getBootstrap, finalize } = await makeEndoClient(
'harbinger',
locator.sockPath,
);
const bootstrap = getBootstrap();
- await E(E.get(bootstrap).privateFacet).shutdown(locator);
+ await E(E.get(bootstrap).privateFacet).terminate(locator);
finalize();
};
@@ -93,12 +93,12 @@ export const clean = async (locator = defaultLocator) => {
export const restart = async (locator = defaultLocator) => {
if (restart) {
- await shutdown(locator).catch(() => {});
+ await terminate(locator).catch(() => {});
await clean(locator);
}
return start(locator);
};
export const stop = async (locator = defaultLocator) => {
- return shutdown(locator).catch(() => {});
+ return terminate(locator).catch(() => {});
};

refactor(daemon): Pivot from shutdown to terminate

To align with web worker lingo.