"use strict";var e=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,a){function i(e){try{c(n.next(e))}catch(e){a(e)}}function s(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,s)}c((n=n.apply(e,t||[])).next())}))},t=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.readPackageJsonFromLocalDir=void 0;const r=t(require("path")),n=require("../../../common/Constants"),o=require("../../../util/FsUtil"),a=require("../../parameter"),i=require("../../../common/message");exports.readPackageJsonFromLocalDir=function(t){return e(this,void 0,void 0,(function*(){const e=r.default.join(t,n.Constants.MyPackageJson);if(!t||!(yield o.FsUtil.exists(e)))throw new Error((0,i.format)(i.Messages.Fetcher.SourceCode.FetchSourceCodeFailed,{path:e}));const s=yield o.FsUtil.readJSON5(e);return a.ParameterizationManager.getInstance().assignParameterOnPkgJson(s)}))};