"use strict";var __rest=this&&this.__rest||function(e,t){var o={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(o[r[n]]=e[r[n]])}return o},__importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0});const devtools_instrument_1=__importDefault(require("../../../../../instruments")),common_1=require("../../../config/common");function pack(e){const{packVersion:t}=e,o=__rest(e,["packVersion"]),[r,n]=(0,devtools_instrument_1.default)(t),{stringifyMsg:s,LoggerTypeSymbol:c}=n;r.logger.pipe({info(e){var t;return"COMPILE_BEGIN"===e.event&&(null===(t=process.send)||void 0===t||t.call(process,{error:"",type:"compileStart"})),console[c.info](s(e)),e}}),r(o,()=>{var t;let o="";"PKG"===e.context.packageType&&(o=common_1.PKGFileName),null===(t=process.send)||void 0===t||t.call(process,{error:"",data:{productName:o},type:"compileEnd"}),e.watch||process.exit()})}process.on("message",e=>{const{type:t,data:o}=e;"compile"===t&&pack(o)});