'use strict';

var chunkAF3E2D32_cjs = require('./chunk-AF3E2D32.cjs');
var types = require('@storm-software/config-tools/types');

async function finalize(log, context, hooks) {
  await hooks.callHook("finalize:begin", context).catch((error) => {
    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 hooks.callHook("finalize:complete", context).catch((error) => {
    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
    });
  });
}
chunkAF3E2D32_cjs.__name(finalize, "finalize");

exports.finalize = finalize;
//# sourceMappingURL=chunk-4B53BL4A.cjs.map
//# sourceMappingURL=chunk-4B53BL4A.cjs.map