UNPKG

@storm-stack/core

Version:

A build toolkit and runtime used by Storm Software in TypeScript applications

30 lines (28 loc) 1.26 kB
import { __VFS_REVERT__ } from './chunk-NPDWYHER.js'; import { __name } from './chunk-43IZMM3W.js'; import { LogLevelLabel } from '@storm-software/config-tools/types'; async function finalize(context, hooks) { await hooks.callHook("finalize:begin", context).catch((error) => { context.log(LogLevelLabel.ERROR, `An error occured while starting the finalize process for the Storm Stack project: ${error.message} ${error.stack ?? ""}`); throw new Error("An error occured while starting the finalize process for the Storm Stack project", { cause: error }); }); await Promise.all([ context.workers.errorLookup?.end(), context.workers.configReflection?.end() ].filter(Boolean)); await hooks.callHook("finalize:complete", context).catch((error) => { context.log(LogLevelLabel.ERROR, `An error occured while finishing the finalize process for the Storm Stack project: ${error.message} ${error.stack ?? ""}`); throw new Error("An error occured while finishing the finalize process for the Storm Stack project", { cause: error }); }); context.vfs[__VFS_REVERT__](); } __name(finalize, "finalize"); export { finalize }; //# sourceMappingURL=chunk-I6YSWAI3.js.map //# sourceMappingURL=chunk-I6YSWAI3.js.map