"use strict";var t=this&&this.__awaiter||function(t,e,i,n){return new(i||(i=Promise))((function(o,u){function r(t){try{a(n.next(t))}catch(t){u(t)}}function c(t){try{a(n.throw(t))}catch(t){u(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(r,c)}a((n=n.apply(t,e||[])).next())}))};Object.defineProperty(exports,"__esModule",{value:!0}),exports.publishCmd=void 0;const e=require("../core/audit"),i=require("../common/GlobalState"),n=require("../core/install/common/OptionValid"),o=require("../core/publish/PublishCore");exports.publishCmd=function(u,r){return t(this,void 0,void 0,(function*(){i.GlobalState.command=i.CommandType.PUBLISH,(0,n.validPublishBaseOptions)(i.GlobalState.command,r),yield(new o.PublishCore).publish(u,r),yield function(){return t(this,void 0,void 0,(function*(){try{const t=(0,e.commandAudit)("publish");yield(0,e.auditRequest)(t)}catch(t){}}))}()}))};