UNPKG

@storm-stack/core

Version:

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

32 lines (29 loc) 1.33 kB
'use strict'; var chunkN2HLPYZL_cjs = require('./chunk-N2HLPYZL.cjs'); var chunk3ONWID2V_cjs = require('./chunk-3ONWID2V.cjs'); var types = require('@storm-software/config-tools/types'); async function finalize(context, hooks) { await hooks.callHook("finalize:begin", context).catch((error) => { context.log(types.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(types.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[chunkN2HLPYZL_cjs.__VFS_REVERT__](); } chunk3ONWID2V_cjs.__name(finalize, "finalize"); exports.finalize = finalize; //# sourceMappingURL=chunk-ZQM2CFMT.cjs.map //# sourceMappingURL=chunk-ZQM2CFMT.cjs.map