"use strict";exports.id=2701,exports.ids=[2701],exports.modules={18838:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.updateBaseConfig=function updateBaseConfig(e,t,i,n){if(e){if(!i.findCustomTask(a.UI5_TASK_FLATTEN_LIB)){const e={name:a.UI5_TASK_FLATTEN_LIB,afterTask:"generateResourcesJson"};i.addCustomTasks([e])}n.write(t,i.toString()),i.removeConfig("builder")}},t.getDeployConfig=async function getDeployConfig(e,t){const i={},a=[];void 0!==e.target.destination&&(i.destination=e.target.destination);void 0!==e.target.url&&(i.url=e.target.url);e.target.client&&(i.client=e.target.client);e.target.scp&&(i.scp=!0);"reentranceTicket"===e.target.authenticationType&&(i.authenticationType="reentranceTicket",a.push({path:"configuration.target.authenticationType",comment:" SAML support for vscode",key:"authenticationType"}));const o=t.removeConfig("server"),r=await n.UI5Config.newInstance(o.toString());return r.addComment({comment:" yaml-language-server: $schema=https://sap.github.io/ui5-tooling/schema/ui5.yaml.json",location:"beginning"}),r.addAbapDeployTask(i,e.app,!0,["/test/"],e.index,e.lrep,a),r};const n=i(8231),a=i(70655)},70655:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UI5_CLI_MIN_VERSION=t.UI5_CLI_LIB=t.UI5_REPO_IGNORE=t.UI5_REPO_TEXT_FILES=t.UI5_TASK_FLATTEN_LIB_VERSION=t.UI5_TASK_FLATTEN_LIB=t.RIMRAF=t.RIMRAF_VERSION=t.UNDEPLOY_SCRIPT=t.DEPLOY_SCRIPT=t.BUILD_SCRIPT=void 0,t.BUILD_SCRIPT="npm run build",t.DEPLOY_SCRIPT="fiori deploy",t.UNDEPLOY_SCRIPT="fiori undeploy",t.RIMRAF_VERSION="^5.0.5",t.RIMRAF="rimraf",t.UI5_TASK_FLATTEN_LIB="ui5-task-flatten-library",t.UI5_TASK_FLATTEN_LIB_VERSION="^3.1.0",t.UI5_REPO_TEXT_FILES=".Ui5RepositoryTextFiles",t.UI5_REPO_IGNORE=".Ui5RepositoryIgnore",t.UI5_CLI_LIB="@ui5/cli",t.UI5_CLI_MIN_VERSION="3.0.0"},34746:function(e,t,i){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.writeUi5RepositoryFile=void 0,t.addUi5Dependency=function addUi5Dependency(e,t,i){const n=(0,a.join)(t,s.FileName.Package),o=e.readJSON(n)??{},r=(0,_.coerce)(o?.devDependencies?.[c.UI5_CLI_LIB]);if(r&&(0,_.satisfies)(r,`>=${c.UI5_CLI_MIN_VERSION}`))return;o.ui5=o.ui5??{},o.ui5.dependencies=o.ui5.dependencies??[],o.ui5.dependencies.includes(i)||o.ui5.dependencies.push(i);e.writeJSON(n,o)},t.getLibraryPath=async function getLibraryPath(e){return(await(0,s.getReuseLibs)([{projectRoot:e}]))[0]?.path},t.writeUi5RepositoryFiles=async function writeUi5RepositoryFiles(e,i){if(i){const n=await getTypescriptFilePaths((0,a.join)(i,"/**/*.ts"));n?.length>0&&(0,t.writeUi5RepositoryFile)(e,i,c.UI5_REPO_TEXT_FILES,"^.*.ts$")}},t.writeUi5RepositoryIgnore=async function writeUi5RepositoryIgnore(e,i){if(i){const n=await getTypescriptFilePaths((0,a.join)(i,"/**/*.ts"));n?.length>0&&(0,t.writeUi5RepositoryFile)(e,i,c.UI5_REPO_IGNORE,"^.*.ts$\n^.*.ts.map$")}};const a=i(76760),o=n(i(71855)),r=i(48161),s=i(20787),c=i(70655),_=i(85263);async function getTypescriptFilePaths(e){const t="win32"===(0,r.platform)()?e.replace(/\\/g,"/"):e;return await(0,o.default)(t)}t.writeUi5RepositoryFile=(e,t,i,n)=>{const o=(0,a.join)(t,i);let r;e.exists(o)?(r=e.read(o),r.includes(n)||(r=`${r}\n${n}`)):r=n,e.write(o,r)}},99214:function(e,t,i){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.generate=async function generate(e,t,i,n){const u=(0,s.default)(t);n||(n=(0,r.create)((0,o.create)()));const l=i?.baseFile??c.FileName.Ui5Yaml,T=await(0,c.readUi5Yaml)(e,l,n),g="library"===T.getType(),y=(0,a.join)(e,l);(0,_.updateBaseConfig)(g,y,T,n);const R=i?.deployFile??c.FileName.UI5DeployYaml,f=(0,a.join)(e,R),U=await(0,_.getDeployConfig)(u,T);if(n.write(f,U.toString()),await(0,I.updateScripts)(e,R,n,i),g){await(0,c.addPackageDevDependency)(e,d.UI5_TASK_FLATTEN_LIB,d.UI5_TASK_FLATTEN_LIB_VERSION,n),(0,p.addUi5Dependency)(n,e,d.UI5_TASK_FLATTEN_LIB);const t=await(0,p.getLibraryPath)(e);await(0,p.writeUi5RepositoryIgnore)(n,t)}else{const t=await(0,c.getWebappPath)(e);await(0,p.writeUi5RepositoryFiles)(n,t)}return n};const a=i(76760),o=i(64812),r=i(90718),s=n(i(27381)),c=i(20787),_=i(18838),p=i(34746),d=i(70655),I=i(37810)},37810:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.updateScripts=async function updateScripts(e,t,i,o){const r=o?.addBuildToUndeployScript??1?`${a.BUILD_SCRIPT} && `:"",s=`${a.BUILD_SCRIPT} && ${a.DEPLOY_SCRIPT} --config ${t}`;await(0,n.updatePackageScript)(e,"deploy",s,i);const c=`${r}${a.UNDEPLOY_SCRIPT} --config ${t}`;await(0,n.updatePackageScript)(e,"undeploy",c,i);const _=`${a.BUILD_SCRIPT} && ${a.DEPLOY_SCRIPT} --config ${t} --testMode true`;await(0,n.updatePackageScript)(e,"deploy-test",_,i),await(0,n.addPackageDevDependency)(e,a.RIMRAF,a.RIMRAF_VERSION,i)};const n=i(20787),a=i(70655)}};