@sap/generator-fiori
Advanced tools
Comparing version 1.12.2 to 1.12.3
@@ -6,2 +6,10 @@ # Change Log | ||
## [1.12.3] - 2024-01-31 | ||
### Added | ||
- Added a warning message when choosing to use a service from the SAP Business Accelerator Hub, as these services were not intented for use with SAP Fiori UI development. | ||
- Added the abillity to launch the SAP Fiori generator directly from an SAP saved system. When viewing an SAP saved system, a new link `Create SAP Fiori applicaton` will launch the generator and use the selected SAP saved system. | ||
### Fixed | ||
- Fixed an issue where an incorrect error message would be returned to the user if there were no transport requests available when adding deployment configuration. | ||
## [1.12.2] - 2024-01-17 | ||
@@ -8,0 +16,0 @@ ### Added |
@@ -1,1 +0,1 @@ | ||
"use strict";exports.id=36,exports.ids=[36],exports.modules={51040:function(e,t,n){var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{u(i.next(e))}catch(e){r(e)}}function s(e){try{u(i.throw(e))}catch(e){r(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((i=i.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.t=t.initI18n=t.NAV_CONFIG_NS=t.SMART_LINKS_NS=void 0;const r=o(n(35107)),a=o(n(53636)),s=o(n(65026));function u(){return i(this,void 0,void 0,(function*(){yield r.default.init({resources:{en:{[t.SMART_LINKS_NS]:a.default,[t.NAV_CONFIG_NS]:s.default}},lng:"en",fallbackLng:"en",defaultNS:t.SMART_LINKS_NS,ns:[t.SMART_LINKS_NS,t.NAV_CONFIG_NS]})}))}t.SMART_LINKS_NS="app-config-writer:smartLinksConfig",t.NAV_CONFIG_NS="app-config-writer:navConfig",t.initI18n=u,t.t=function(e,t){return r.default.t(e,t)},u().catch((()=>{}))},72089:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.generateInboundNavigationConfig=t.generateSmartLinksConfig=t.promptInboundNavigationConfig=t.getSmartLinksTargetFromPrompt=void 0;var i=n(45647);Object.defineProperty(t,"getSmartLinksTargetFromPrompt",{enumerable:!0,get:function(){return i.getSmartLinksTargetFromPrompt}}),Object.defineProperty(t,"promptInboundNavigationConfig",{enumerable:!0,get:function(){return i.promptInboundNavigationConfig}});var o=n(98929);Object.defineProperty(t,"generateSmartLinksConfig",{enumerable:!0,get:function(){return o.generateSmartLinksConfig}});var r=n(46379);Object.defineProperty(t,"generateInboundNavigationConfig",{enumerable:!0,get:function(){return r.generateInboundNavigationConfig}})},46379:function(e,t,n){var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{u(i.next(e))}catch(e){r(e)}}function s(e){try{u(i.throw(e))}catch(e){r(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.readManifest=t.generateInboundNavigationConfig=void 0;const o=n(14774),r=n(5407),a=n(84659),s=n(50911),u=n(71017),l=n(51040);function c(e,t){return i(this,void 0,void 0,(function*(){const n=(0,u.join)(yield(0,o.getWebappPath)(e),o.FileName.Manifest),i=t.readJSON(n);if(!i)throw Error((0,l.t)("error.manifestNotFound",{path:n,ns:l.NAV_CONFIG_NS}));if(!i["sap.app"])throw Error((0,l.t)("error.sapAppNotDefined",{ns:l.NAV_CONFIG_NS}));return{manifest:i,manifestPath:n}}))}t.generateInboundNavigationConfig=function(e,{semanticObject:t,action:n,title:o,subTitle:u},d=!1,f){var p,g,m;return i(this,void 0,void 0,(function*(){f||(f=(0,a.create)((0,r.create)()));const{manifest:i,manifestPath:v}=yield c(e,f),y=`${t}-${n}`;if(!d&&(null===(p=i["sap.app"].crossNavigation)||void 0===p?void 0:p.inbounds[y]))throw Error((0,l.t)("error.inboundExists",{inboundKey:y,ns:l.NAV_CONFIG_NS}));const h={[y]:{semanticObject:t,action:n,title:o,subTitle:u,signature:{parameters:{},additionalParameters:"allowed"}}},b=Object.assign(null!==(g=i["sap.app"].crossNavigation)&&void 0!==g?g:{},{inbounds:(0,s.mergeObjects)(null===(m=i["sap.app"].crossNavigation)||void 0===m?void 0:m.inbounds,h)});return f.extendJSON(v,{"sap.app":Object.assign(i["sap.app"],{crossNavigation:b})}),f}))},t.readManifest=c},45647:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.promptInboundNavigationConfig=t.promptUserPass=t.getSmartLinksTargetFromPrompt=void 0;var i=n(56172);Object.defineProperty(t,"getSmartLinksTargetFromPrompt",{enumerable:!0,get:function(){return i.getSmartLinksTargetFromPrompt}}),Object.defineProperty(t,"promptUserPass",{enumerable:!0,get:function(){return i.promptUserPass}});var o=n(56513);Object.defineProperty(t,"promptInboundNavigationConfig",{enumerable:!0,get:function(){return o.promptInboundNavigationConfig}})},56513:function(e,t,n){var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{u(i.next(e))}catch(e){r(e)}}function s(e){try{u(i.throw(e))}catch(e){r(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.promptInboundNavigationConfig=void 0;const o=n(70708),r=n(51040),a=n(5407),s=n(84659),u=n(46379);function l(e,t,n=0){return 0===(null==e?void 0:e.trim().length)?(0,r.t)("prompt.validationWarning.inputRequired",{inputName:t,ns:r.NAV_CONFIG_NS}):!(n&&e.length>n)||(0,r.t)("prompt.validationWarning.maxLength",{maxLength:n,ns:r.NAV_CONFIG_NS})}t.promptInboundNavigationConfig=function(e){var t,n;return i(this,void 0,void 0,(function*(){const i=(0,s.create)((0,a.create)()),{manifest:c}=yield(0,u.readManifest)(e,i),d=null===(n=null===(t=null==c?void 0:c["sap.app"])||void 0===t?void 0:t.crossNavigation)||void 0===n?void 0:n.inbounds;let f=yield(0,o.prompt)(function(e){const t=(0,r.t)("prompt.message.semanticObject",{ns:r.NAV_CONFIG_NS}),n=(0,r.t)("prompt.message.action",{ns:r.NAV_CONFIG_NS}),i=(0,r.t)("prompt.message.title",{ns:r.NAV_CONFIG_NS});return[{name:"semanticObject",type:"text",message:t,format:e=>null==e?void 0:e.trim(),validate:e=>l(e,t,30)},{name:"action",type:"text",message:n,format:e=>null==e?void 0:e.trim(),validate:e=>l(e,n,60)},{type:(t,n)=>e.indexOf(`${n.semanticObject}-${n.action}`)>-1&&"confirm",name:"overwrite",message:(0,r.t)("prompt.message.overwrite",{ns:r.NAV_CONFIG_NS}),initial:!1},{name:"title",type:(e,t)=>!1!==t.overwrite&&"text",message:i,format:e=>null==e?void 0:e.trim(),validate:e=>l(e,i)},{name:"subTitle",type:(e,t)=>!1!==t.overwrite&&"text",message:(0,r.t)("prompt.message.subtitle",{ns:r.NAV_CONFIG_NS}),format:e=>null==e?void 0:e.trim()}]}(Object.keys(null!=d?d:{})));return!1===(null==f?void 0:f.overwrite)&&(f=void 0),""===(null==f?void 0:f.subTitle)&&(f.subTitle=void 0),{config:f,fs:i}}))}},56172:function(e,t,n){var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{u(i.next(e))}catch(e){r(e)}}function s(e){try{u(i.throw(e))}catch(e){r(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.getSmartLinksTargetFromPrompt=t.promptUserPass=void 0;const o=n(48009),r=n(70708),a=n(14425),s=n(14774),u=n(51040),l=n(98929),c=n(71432),d=(e,t)=>!(!e||!e.trim())||(0,u.t)(t),f=e=>{const t=[];return(0,a.isAppStudio)()&&((e,t)=>{((null==t?void 0:t.destination)||(null==t?void 0:t.url))&&e.push({name:(null==t?void 0:t.destination)?c.TargetType.destination:c.TargetType.url,message:(0,u.t)("questions.useTarget",{target:t.destination||t.url}),type:"confirm",initial:!0,format:e=>e?t.destination||t.url:e}),e.push({name:"select",type:e=>e?null:"select",message:(0,u.t)("questions.target"),choices:[{title:(0,u.t)("questions.enter",{type:c.TargetType.destination}),value:c.TargetType.destination},{title:(0,u.t)("questions.enter",{type:c.TargetType.url}),value:c.TargetType.url}]}),e.push({type:e=>e===c.TargetType.destination?"text":null,name:c.TargetType.destination,initial:null==t?void 0:t.destination,message:(0,u.t)("questions.target",{type:c.TargetType.destination,file:(null==t?void 0:t.destination)?`(${s.FileName.UI5DeployYaml})`:""}),validate:e=>d(e,"error.target")})})(t,e),t.push({type:e=>e&&e!==c.TargetType.url?null:"text",name:c.TargetType.url,initial:null==e?void 0:e.url,message:(0,u.t)("questions.target",{type:c.TargetType.url,file:(null==e?void 0:e.url)?`(${s.FileName.UI5DeployYaml})`:""}),validate:e=>d(e,"error.target")},{name:"client",type:(e,t)=>(null==t?void 0:t.url)?"text":null,initial:null==e?void 0:e.client,message:(0,u.t)("questions.client",{file:(null==e?void 0:e.client)?`(${s.FileName.UI5DeployYaml})`:""}),format:e=>"number"==typeof e?e.toString():e}),t};function p(e){return i(this,void 0,void 0,(function*(){const{username:t,password:n}=yield(0,r.prompt)([{type:"text",name:"username",message:`${(0,o.cyan)((0,u.t)("info.username"))}`,validate:e=>!(!e||!e.trim())||`${(0,u.t)("error.emptyUsername")}`},{type:"invisible",name:"password",message:`${(0,o.cyan)((0,u.t)("info.password"))}`,validate:e=>!(!e||!e.trim())||`${(0,u.t)("error.emptyPassword")}`}],{onCancel:()=>(null==e||e.info((0,o.yellow)((0,u.t)("info.operationAborted"))),process.exit(1))});return{username:t,password:n}}))}t.promptUserPass=p,t.getSmartLinksTargetFromPrompt=function(e,t){return i(this,void 0,void 0,(function*(){const n=yield(0,l.getTargetDefinition)(e,t),s=yield((e,t)=>i(void 0,void 0,void 0,(function*(){const n={onCancel:()=>(null==t||t.info((0,o.yellow)((0,u.t)("info.operationAborted"))),process.exit(1))},i=f(null==e?void 0:e.target),{url:a,client:s,destination:l}=yield(0,r.prompt)(i,n);return{url:a,client:s,destination:l}})))(n,t),c=yield function(e,t){return i(this,void 0,void 0,(function*(){if((0,a.isAppStudio)()&&e.destination){const n=yield(0,a.listDestinations)(),i=null==n?void 0:n[e.destination];if("NoAuthentication"===(null==i?void 0:i.Authentication))return null==t||t.info((0,u.t)("info.credentialsRequired")),yield p(t);if(i)return void(null==t||t.info((0,u.t)("info.credentialsAvailable")))}else if(e.url){const n=yield(0,l.getLocalStoredCredentials)(e.url,e.client,t);if(null==n?void 0:n.username){const e=[{title:`Use ${n.username}`,value:n},{title:(0,u.t)("questions.credentialsDescription"),value:!1}],{credentials:t}=yield(0,r.prompt)([{name:"credentials",type:"select",message:(0,u.t)("questions.credentials"),choices:e,initial:0}]);if(t)return t}}return p(t)}))}(s,t);return{target:s,auth:c,ignoreCertErrors:null==n?void 0:n.ignoreCertErrors}}))}},52372:function(e,t,n){var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{u(i.next(e))}catch(e){r(e)}}function s(e){try{u(i.throw(e))}catch(e){r(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.generateSmartLinksConfig=void 0;const o=n(5407),r=n(84659),a=n(33995);t.generateSmartLinksConfig=function(e,t,n,s){return i(this,void 0,void 0,(function*(){return s||(s=(0,r.create)((0,o.create)())),yield(0,a.writeSmartLinksConfig)(e,t,s,n),s}))}},98929:function(e,t,n){var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.getLocalStoredCredentials=t.getTargetDefinition=void 0,o(n(52372),t);var r=n(33995);Object.defineProperty(t,"getTargetDefinition",{enumerable:!0,get:function(){return r.getTargetDefinition}}),Object.defineProperty(t,"getLocalStoredCredentials",{enumerable:!0,get:function(){return r.getLocalStoredCredentials}})},61318:function(e,t,n){var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{u(i.next(e))}catch(e){r(e)}}function s(e){try{u(i.throw(e))}catch(e){r(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.addUi5YamlServeStaticMiddleware=t.readUi5DeployConfigTarget=void 0;const o=n(71017),r=n(14774),a=n(51040),s=n(71432);t.readUi5DeployConfigTarget=function(e){var t;return i(this,void 0,void 0,(function*(){const n=(yield(0,r.readUi5Yaml)(e,r.FileName.UI5DeployYaml)).findCustomTask(s.DeployConfig.DeployToAbap);if(!(null===(t=null==n?void 0:n.configuration)||void 0===t?void 0:t.target))throw Error((0,a.t)("error.noTarget",{file:`(${r.FileName.UI5DeployYaml})`}));const{target:i,ignoreCertError:o}=(null==n?void 0:n.configuration)||{};return{target:i,ignoreCertErrors:o}}))};const u=(e,t)=>{const n={path:"/appconfig",src:"appconfig",fallthrough:!1};if(e.find((e=>e.path===n.path&&e.src===n.src)))return;const i=[...e,n],o=t?{beforeMiddleware:"fiori-tools-proxy"}:{afterMiddleware:"compression"};return Object.assign(Object.assign({name:"fiori-tools-servestatic"},o),{configuration:{paths:i}})};t.addUi5YamlServeStaticMiddleware=function(e,t,n){return i(this,void 0,void 0,(function*(){const i=[r.FileName.Ui5Yaml,r.FileName.Ui5MockYaml,r.FileName.Ui5LocalYaml];for(const a of i){let i;try{i=yield(0,r.readUi5Yaml)(e,a)}catch(e){null==n||n.debug(`File ${a} not existing`);continue}const l=!!i.findCustomMiddleware(s.DeployConfig.FioriToolsProxy),c=i.findCustomMiddleware(s.DeployConfig.FioriToolsServestatic),d=u((null==c?void 0:c.configuration.paths)||[],l);if(d){const n=i.updateCustomMiddleware(d).toString();t.write((0,o.join)(e,a),n)}}}))}},33995:function(e,t,n){var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{u(i.next(e))}catch(e){r(e)}}function s(e){try{u(i.throw(e))}catch(e){r(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.writeSmartLinksConfig=t.getTargetMappingsConfig=t.getTargetDefinition=t.sendRequest=t.getLocalStoredCredentials=void 0;const o=n(48009),r=n(69288),a=n(71017),s=n(62637),u=n(14425),l=n(14774),c=n(20034),d=n(51040),f=n(34158),p=n(61318),g={so:"*",action:"*",systemAliasesFormat:"object","sap-language":"EN",shellType:"FLP",depth:0};function m(e,t){return i(this,void 0,void 0,(function*(){const n=(0,u.isAppStudio)()&&e.target.destination?e.target.destination:e.target.url;if(!n)throw Error((0,d.t)("error.target"));try{const i=function(e){const{target:t,auth:n,ignoreCertErrors:i}=e;let o;return(0,u.isAppStudio)()&&t.destination?(o=(0,s.createForDestination)({auth:n},{Name:t.destination}),delete o.defaults.params.saml2):o=(0,s.createForAbap)({baseURL:t.url,auth:n,ignoreCertErrors:i,params:t.client?{"sap-client":t.client}:void 0}),o}(e);null==t||t.info(`${(0,o.cyan)((0,d.t)("info.connectTo"))} ${n}`);const r=yield i.get("/sap/bc/ui2/start_up",{params:g});return null==t||t.info((0,o.cyan)((0,d.t)("info.connectSuccess"))),JSON.parse(r.data)}catch(e){throw null==t||t.debug(e),Error(e.message)}}))}function v(e,t){return i(this,void 0,void 0,(function*(){const n=yield function(e,t){return i(this,void 0,void 0,(function*(){const n=yield m(e,t);if(!n||!n.targetMappings)throw Error((0,d.t)("error.noTarget"));return n.targetMappings}))}(e,t),o={};for(const e in n){const t=n[e];o[e]={semanticObject:t.semanticObject,action:t.semanticAction,title:t.text,signature:Object.assign({additionalParameters:"ignored",parameters:{}},t.signature),resolutionResult:{}}}return o}))}t.getLocalStoredCredentials=function(e,t,n){return i(this,void 0,void 0,(function*(){try{const i=yield(0,c.getService)({logger:n,entityName:"system"}),o=yield i.read(new c.BackendSystemKey({url:e,client:t}));return(null==o?void 0:o.username)?{username:o.username,password:o.password||""}:void 0}catch(e){null==n||n.warn((0,d.t)("warnings.useCredentialsFailed")),null==n||n.debug(e)}}))},t.sendRequest=m,t.getTargetDefinition=function(e,t){return i(this,void 0,void 0,(function*(){null==t||t.info((0,d.t)("info.searchTarget",{file:l.FileName.UI5DeployYaml}));try{const n=yield(0,p.readUi5DeployConfigTarget)(e);return null==t||t.info((0,o.cyan)((0,d.t)("info.targetFound",{file:l.FileName.UI5DeployYaml}))),n}catch(e){return null==t||t.warn(e.message),void(null==t||t.debug(e))}}))},t.getTargetMappingsConfig=v,t.writeSmartLinksConfig=function(e,t,n,o){return i(this,void 0,void 0,(function*(){let i=yield v(t,o);const s=(0,f.getTemplatePath)("smartlinks-config/fioriSandboxConfig.json"),u=(0,a.join)(e,"appconfig","fioriSandboxConfig.json");if(n.exists(u)){i=function(e,t,n){var i,o,r,a;const s=null===(a=null===(r=null===(o=null===(i=n.readJSON(e).services)||void 0===i?void 0:i.ClientSideTargetResolution)||void 0===o?void 0:o.adapter)||void 0===r?void 0:r.config)||void 0===a?void 0:a.inbounds;return s?(Object.entries(t).forEach((([e,t])=>{s[e]=t})),s):t}(u,i,n);const e=(0,r.render)(n.read(s),{inboundTargets:i},{});n.extendJSON(u,JSON.parse(e))}else n.copyTpl(s,u,{inboundTargets:i});yield(0,p.addUi5YamlServeStaticMiddleware)(e,n,o)}))}},34158:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getTemplatePath=void 0;const i=n(71017);t.getTemplatePath=function(e=""){return(0,i.join)(__dirname,"../templates",e)}},71432:function(e,t,n){var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(38144),t)},38144:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TargetType=t.DeployConfig=void 0,function(e){e.DeployToAbap="deploy-to-abap",e.FioriToolsProxy="fiori-tools-proxy",e.FioriToolsServestatic="fiori-tools-servestatic"}(t.DeployConfig||(t.DeployConfig={})),function(e){e.destination="destination",e.url="url"}(t.TargetType||(t.TargetType={}))},65026:e=>{e.exports=JSON.parse('{"error":{"sapAppNotDefined":"Manifest is missing required section \'sap.app\'","manifestNotFound":"Manifest not found at path: {{- path}}","inboundExists":"Inbound definition already exists for key: {{inboundKey}}"},"prompt":{"validationWarning":{"inputRequired":"{{inputName}} input is required","maxLength":"Maximum length: {{maxLength}} characters"},"message":{"semanticObject":"Semantic Object","action":"Action","title":"Title","subtitle":"Subtitle (optional)","overwrite":"Overwrite existing config"}}}')},53636:e=>{e.exports=JSON.parse('{"questions":{"enter":"Enter {{-type}}","useTarget":"Do you want to use {{-target}}","target":"SmartLinks configuration source {{-type}} {{-file}}","client":"SAP client {{-file}}","credentials":"Credentials to be used","credentialsDescription":"Provide username and password"},"warnings":{"useCredentialsFailed":"Retrieving stored credentials failed."},"info":{"username":"Username","password":"Password","searchTarget":"Searching for deploy target definition {{-file}}","targetFound":"Deploy target definition found {{-file}}","credentialsAvailable":"Credentials taken from stored system","credentialsRequired":"Credentials are required. Please enter your credentials below","authNeeded":"Credentials might be required. Do you want to enter your credentials?","operationAborted":"Operation aborted by the user.","connectTo":"Connecting to","connectSuccess":"Connection successful"},"error":{"target":"Please provide a target for configuration","noTarget":"No target definition found {{-file}}","emptyUsername":"Username can not be empty.","emptyPassword":"Password can not be empty."}}')}}; | ||
"use strict";exports.id=36,exports.ids=[36],exports.modules={51040:function(e,t,n){var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{u(i.next(e))}catch(e){r(e)}}function s(e){try{u(i.throw(e))}catch(e){r(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((i=i.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.t=t.initI18n=t.NAV_CONFIG_NS=t.SMART_LINKS_NS=void 0;const r=o(n(35107)),a=o(n(53636)),s=o(n(65026));function u(){return i(this,void 0,void 0,(function*(){yield r.default.init({resources:{en:{[t.SMART_LINKS_NS]:a.default,[t.NAV_CONFIG_NS]:s.default}},lng:"en",fallbackLng:"en",defaultNS:t.SMART_LINKS_NS,ns:[t.SMART_LINKS_NS,t.NAV_CONFIG_NS]})}))}t.SMART_LINKS_NS="app-config-writer:smartLinksConfig",t.NAV_CONFIG_NS="app-config-writer:navConfig",t.initI18n=u,t.t=function(e,t){return r.default.t(e,t)},u().catch((()=>{}))},72089:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.generateInboundNavigationConfig=t.generateSmartLinksConfig=t.promptInboundNavigationConfig=t.getSmartLinksTargetFromPrompt=void 0;var i=n(45647);Object.defineProperty(t,"getSmartLinksTargetFromPrompt",{enumerable:!0,get:function(){return i.getSmartLinksTargetFromPrompt}}),Object.defineProperty(t,"promptInboundNavigationConfig",{enumerable:!0,get:function(){return i.promptInboundNavigationConfig}});var o=n(98929);Object.defineProperty(t,"generateSmartLinksConfig",{enumerable:!0,get:function(){return o.generateSmartLinksConfig}});var r=n(46379);Object.defineProperty(t,"generateInboundNavigationConfig",{enumerable:!0,get:function(){return r.generateInboundNavigationConfig}})},46379:function(e,t,n){var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{u(i.next(e))}catch(e){r(e)}}function s(e){try{u(i.throw(e))}catch(e){r(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.readManifest=t.generateInboundNavigationConfig=void 0;const o=n(9949),r=n(5407),a=n(84659),s=n(50911),u=n(71017),l=n(51040);function c(e,t){return i(this,void 0,void 0,(function*(){const n=(0,u.join)(yield(0,o.getWebappPath)(e),o.FileName.Manifest),i=t.readJSON(n);if(!i)throw Error((0,l.t)("error.manifestNotFound",{path:n,ns:l.NAV_CONFIG_NS}));if(!i["sap.app"])throw Error((0,l.t)("error.sapAppNotDefined",{ns:l.NAV_CONFIG_NS}));return{manifest:i,manifestPath:n}}))}t.generateInboundNavigationConfig=function(e,{semanticObject:t,action:n,title:o,subTitle:u},d=!1,f){var p,g,m;return i(this,void 0,void 0,(function*(){f||(f=(0,a.create)((0,r.create)()));const{manifest:i,manifestPath:v}=yield c(e,f),y=`${t}-${n}`;if(!d&&(null===(p=i["sap.app"].crossNavigation)||void 0===p?void 0:p.inbounds[y]))throw Error((0,l.t)("error.inboundExists",{inboundKey:y,ns:l.NAV_CONFIG_NS}));const h={[y]:{semanticObject:t,action:n,title:o,subTitle:u,signature:{parameters:{},additionalParameters:"allowed"}}},b=Object.assign(null!==(g=i["sap.app"].crossNavigation)&&void 0!==g?g:{},{inbounds:(0,s.mergeObjects)(null===(m=i["sap.app"].crossNavigation)||void 0===m?void 0:m.inbounds,h)});return f.extendJSON(v,{"sap.app":Object.assign(i["sap.app"],{crossNavigation:b})}),f}))},t.readManifest=c},45647:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.promptInboundNavigationConfig=t.promptUserPass=t.getSmartLinksTargetFromPrompt=void 0;var i=n(56172);Object.defineProperty(t,"getSmartLinksTargetFromPrompt",{enumerable:!0,get:function(){return i.getSmartLinksTargetFromPrompt}}),Object.defineProperty(t,"promptUserPass",{enumerable:!0,get:function(){return i.promptUserPass}});var o=n(56513);Object.defineProperty(t,"promptInboundNavigationConfig",{enumerable:!0,get:function(){return o.promptInboundNavigationConfig}})},56513:function(e,t,n){var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{u(i.next(e))}catch(e){r(e)}}function s(e){try{u(i.throw(e))}catch(e){r(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.promptInboundNavigationConfig=void 0;const o=n(70708),r=n(51040),a=n(5407),s=n(84659),u=n(46379);function l(e,t,n=0){return 0===(null==e?void 0:e.trim().length)?(0,r.t)("prompt.validationWarning.inputRequired",{inputName:t,ns:r.NAV_CONFIG_NS}):!(n&&e.length>n)||(0,r.t)("prompt.validationWarning.maxLength",{maxLength:n,ns:r.NAV_CONFIG_NS})}t.promptInboundNavigationConfig=function(e){var t,n;return i(this,void 0,void 0,(function*(){const i=(0,s.create)((0,a.create)()),{manifest:c}=yield(0,u.readManifest)(e,i),d=null===(n=null===(t=null==c?void 0:c["sap.app"])||void 0===t?void 0:t.crossNavigation)||void 0===n?void 0:n.inbounds;let f=yield(0,o.prompt)(function(e){const t=(0,r.t)("prompt.message.semanticObject",{ns:r.NAV_CONFIG_NS}),n=(0,r.t)("prompt.message.action",{ns:r.NAV_CONFIG_NS}),i=(0,r.t)("prompt.message.title",{ns:r.NAV_CONFIG_NS});return[{name:"semanticObject",type:"text",message:t,format:e=>null==e?void 0:e.trim(),validate:e=>l(e,t,30)},{name:"action",type:"text",message:n,format:e=>null==e?void 0:e.trim(),validate:e=>l(e,n,60)},{type:(t,n)=>e.indexOf(`${n.semanticObject}-${n.action}`)>-1&&"confirm",name:"overwrite",message:(0,r.t)("prompt.message.overwrite",{ns:r.NAV_CONFIG_NS}),initial:!1},{name:"title",type:(e,t)=>!1!==t.overwrite&&"text",message:i,format:e=>null==e?void 0:e.trim(),validate:e=>l(e,i)},{name:"subTitle",type:(e,t)=>!1!==t.overwrite&&"text",message:(0,r.t)("prompt.message.subtitle",{ns:r.NAV_CONFIG_NS}),format:e=>null==e?void 0:e.trim()}]}(Object.keys(null!=d?d:{})));return!1===(null==f?void 0:f.overwrite)&&(f=void 0),""===(null==f?void 0:f.subTitle)&&(f.subTitle=void 0),{config:f,fs:i}}))}},56172:function(e,t,n){var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{u(i.next(e))}catch(e){r(e)}}function s(e){try{u(i.throw(e))}catch(e){r(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.getSmartLinksTargetFromPrompt=t.promptUserPass=void 0;const o=n(48009),r=n(70708),a=n(14425),s=n(9949),u=n(51040),l=n(98929),c=n(71432),d=(e,t)=>!(!e||!e.trim())||(0,u.t)(t),f=e=>{const t=[];return(0,a.isAppStudio)()&&((e,t)=>{((null==t?void 0:t.destination)||(null==t?void 0:t.url))&&e.push({name:(null==t?void 0:t.destination)?c.TargetType.destination:c.TargetType.url,message:(0,u.t)("questions.useTarget",{target:t.destination||t.url}),type:"confirm",initial:!0,format:e=>e?t.destination||t.url:e}),e.push({name:"select",type:e=>e?null:"select",message:(0,u.t)("questions.target"),choices:[{title:(0,u.t)("questions.enter",{type:c.TargetType.destination}),value:c.TargetType.destination},{title:(0,u.t)("questions.enter",{type:c.TargetType.url}),value:c.TargetType.url}]}),e.push({type:e=>e===c.TargetType.destination?"text":null,name:c.TargetType.destination,initial:null==t?void 0:t.destination,message:(0,u.t)("questions.target",{type:c.TargetType.destination,file:(null==t?void 0:t.destination)?`(${s.FileName.UI5DeployYaml})`:""}),validate:e=>d(e,"error.target")})})(t,e),t.push({type:e=>e&&e!==c.TargetType.url?null:"text",name:c.TargetType.url,initial:null==e?void 0:e.url,message:(0,u.t)("questions.target",{type:c.TargetType.url,file:(null==e?void 0:e.url)?`(${s.FileName.UI5DeployYaml})`:""}),validate:e=>d(e,"error.target")},{name:"client",type:(e,t)=>(null==t?void 0:t.url)?"text":null,initial:null==e?void 0:e.client,message:(0,u.t)("questions.client",{file:(null==e?void 0:e.client)?`(${s.FileName.UI5DeployYaml})`:""}),format:e=>"number"==typeof e?e.toString():e}),t};function p(e){return i(this,void 0,void 0,(function*(){const{username:t,password:n}=yield(0,r.prompt)([{type:"text",name:"username",message:`${(0,o.cyan)((0,u.t)("info.username"))}`,validate:e=>!(!e||!e.trim())||`${(0,u.t)("error.emptyUsername")}`},{type:"invisible",name:"password",message:`${(0,o.cyan)((0,u.t)("info.password"))}`,validate:e=>!(!e||!e.trim())||`${(0,u.t)("error.emptyPassword")}`}],{onCancel:()=>(null==e||e.info((0,o.yellow)((0,u.t)("info.operationAborted"))),process.exit(1))});return{username:t,password:n}}))}t.promptUserPass=p,t.getSmartLinksTargetFromPrompt=function(e,t){return i(this,void 0,void 0,(function*(){const n=yield(0,l.getTargetDefinition)(e,t),s=yield((e,t)=>i(void 0,void 0,void 0,(function*(){const n={onCancel:()=>(null==t||t.info((0,o.yellow)((0,u.t)("info.operationAborted"))),process.exit(1))},i=f(null==e?void 0:e.target),{url:a,client:s,destination:l}=yield(0,r.prompt)(i,n);return{url:a,client:s,destination:l}})))(n,t),c=yield function(e,t){return i(this,void 0,void 0,(function*(){if((0,a.isAppStudio)()&&e.destination){const n=yield(0,a.listDestinations)(),i=null==n?void 0:n[e.destination];if("NoAuthentication"===(null==i?void 0:i.Authentication))return null==t||t.info((0,u.t)("info.credentialsRequired")),yield p(t);if(i)return void(null==t||t.info((0,u.t)("info.credentialsAvailable")))}else if(e.url){const n=yield(0,l.getLocalStoredCredentials)(e.url,e.client,t);if(null==n?void 0:n.username){const e=[{title:`Use ${n.username}`,value:n},{title:(0,u.t)("questions.credentialsDescription"),value:!1}],{credentials:t}=yield(0,r.prompt)([{name:"credentials",type:"select",message:(0,u.t)("questions.credentials"),choices:e,initial:0}]);if(t)return t}}return p(t)}))}(s,t);return{target:s,auth:c,ignoreCertErrors:null==n?void 0:n.ignoreCertErrors}}))}},52372:function(e,t,n){var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{u(i.next(e))}catch(e){r(e)}}function s(e){try{u(i.throw(e))}catch(e){r(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.generateSmartLinksConfig=void 0;const o=n(5407),r=n(84659),a=n(33995);t.generateSmartLinksConfig=function(e,t,n,s){return i(this,void 0,void 0,(function*(){return s||(s=(0,r.create)((0,o.create)())),yield(0,a.writeSmartLinksConfig)(e,t,s,n),s}))}},98929:function(e,t,n){var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.getLocalStoredCredentials=t.getTargetDefinition=void 0,o(n(52372),t);var r=n(33995);Object.defineProperty(t,"getTargetDefinition",{enumerable:!0,get:function(){return r.getTargetDefinition}}),Object.defineProperty(t,"getLocalStoredCredentials",{enumerable:!0,get:function(){return r.getLocalStoredCredentials}})},61318:function(e,t,n){var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{u(i.next(e))}catch(e){r(e)}}function s(e){try{u(i.throw(e))}catch(e){r(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.addUi5YamlServeStaticMiddleware=t.readUi5DeployConfigTarget=void 0;const o=n(71017),r=n(9949),a=n(51040),s=n(71432);t.readUi5DeployConfigTarget=function(e){var t;return i(this,void 0,void 0,(function*(){const n=(yield(0,r.readUi5Yaml)(e,r.FileName.UI5DeployYaml)).findCustomTask(s.DeployConfig.DeployToAbap);if(!(null===(t=null==n?void 0:n.configuration)||void 0===t?void 0:t.target))throw Error((0,a.t)("error.noTarget",{file:`(${r.FileName.UI5DeployYaml})`}));const{target:i,ignoreCertError:o}=(null==n?void 0:n.configuration)||{};return{target:i,ignoreCertErrors:o}}))};const u=(e,t)=>{const n={path:"/appconfig",src:"appconfig",fallthrough:!1};if(e.find((e=>e.path===n.path&&e.src===n.src)))return;const i=[...e,n],o=t?{beforeMiddleware:"fiori-tools-proxy"}:{afterMiddleware:"compression"};return Object.assign(Object.assign({name:"fiori-tools-servestatic"},o),{configuration:{paths:i}})};t.addUi5YamlServeStaticMiddleware=function(e,t,n){return i(this,void 0,void 0,(function*(){const i=[r.FileName.Ui5Yaml,r.FileName.Ui5MockYaml,r.FileName.Ui5LocalYaml];for(const a of i){let i;try{i=yield(0,r.readUi5Yaml)(e,a)}catch(e){null==n||n.debug(`File ${a} not existing`);continue}const l=!!i.findCustomMiddleware(s.DeployConfig.FioriToolsProxy),c=i.findCustomMiddleware(s.DeployConfig.FioriToolsServestatic),d=u((null==c?void 0:c.configuration.paths)||[],l);if(d){const n=i.updateCustomMiddleware(d).toString();t.write((0,o.join)(e,a),n)}}}))}},33995:function(e,t,n){var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{u(i.next(e))}catch(e){r(e)}}function s(e){try{u(i.throw(e))}catch(e){r(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.writeSmartLinksConfig=t.getTargetMappingsConfig=t.getTargetDefinition=t.sendRequest=t.getLocalStoredCredentials=void 0;const o=n(48009),r=n(69288),a=n(71017),s=n(62637),u=n(14425),l=n(9949),c=n(20034),d=n(51040),f=n(34158),p=n(61318),g={so:"*",action:"*",systemAliasesFormat:"object","sap-language":"EN",shellType:"FLP",depth:0};function m(e,t){return i(this,void 0,void 0,(function*(){const n=(0,u.isAppStudio)()&&e.target.destination?e.target.destination:e.target.url;if(!n)throw Error((0,d.t)("error.target"));try{const i=function(e){const{target:t,auth:n,ignoreCertErrors:i}=e;let o;return(0,u.isAppStudio)()&&t.destination?(o=(0,s.createForDestination)({auth:n},{Name:t.destination}),delete o.defaults.params.saml2):o=(0,s.createForAbap)({baseURL:t.url,auth:n,ignoreCertErrors:i,params:t.client?{"sap-client":t.client}:void 0}),o}(e);null==t||t.info(`${(0,o.cyan)((0,d.t)("info.connectTo"))} ${n}`);const r=yield i.get("/sap/bc/ui2/start_up",{params:g});return null==t||t.info((0,o.cyan)((0,d.t)("info.connectSuccess"))),JSON.parse(r.data)}catch(e){throw null==t||t.debug(e),Error(e.message)}}))}function v(e,t){return i(this,void 0,void 0,(function*(){const n=yield function(e,t){return i(this,void 0,void 0,(function*(){const n=yield m(e,t);if(!n||!n.targetMappings)throw Error((0,d.t)("error.noTarget"));return n.targetMappings}))}(e,t),o={};for(const e in n){const t=n[e];o[e]={semanticObject:t.semanticObject,action:t.semanticAction,title:t.text,signature:Object.assign({additionalParameters:"ignored",parameters:{}},t.signature),resolutionResult:{}}}return o}))}t.getLocalStoredCredentials=function(e,t,n){return i(this,void 0,void 0,(function*(){try{const i=yield(0,c.getService)({logger:n,entityName:"system"}),o=yield i.read(new c.BackendSystemKey({url:e,client:t}));return(null==o?void 0:o.username)?{username:o.username,password:o.password||""}:void 0}catch(e){null==n||n.warn((0,d.t)("warnings.useCredentialsFailed")),null==n||n.debug(e)}}))},t.sendRequest=m,t.getTargetDefinition=function(e,t){return i(this,void 0,void 0,(function*(){null==t||t.info((0,d.t)("info.searchTarget",{file:l.FileName.UI5DeployYaml}));try{const n=yield(0,p.readUi5DeployConfigTarget)(e);return null==t||t.info((0,o.cyan)((0,d.t)("info.targetFound",{file:l.FileName.UI5DeployYaml}))),n}catch(e){return null==t||t.warn(e.message),void(null==t||t.debug(e))}}))},t.getTargetMappingsConfig=v,t.writeSmartLinksConfig=function(e,t,n,o){return i(this,void 0,void 0,(function*(){let i=yield v(t,o);const s=(0,f.getTemplatePath)("smartlinks-config/fioriSandboxConfig.json"),u=(0,a.join)(e,"appconfig","fioriSandboxConfig.json");if(n.exists(u)){i=function(e,t,n){var i,o,r,a;const s=null===(a=null===(r=null===(o=null===(i=n.readJSON(e).services)||void 0===i?void 0:i.ClientSideTargetResolution)||void 0===o?void 0:o.adapter)||void 0===r?void 0:r.config)||void 0===a?void 0:a.inbounds;return s?(Object.entries(t).forEach((([e,t])=>{s[e]=t})),s):t}(u,i,n);const e=(0,r.render)(n.read(s),{inboundTargets:i},{});n.extendJSON(u,JSON.parse(e))}else n.copyTpl(s,u,{inboundTargets:i});yield(0,p.addUi5YamlServeStaticMiddleware)(e,n,o)}))}},34158:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getTemplatePath=void 0;const i=n(71017);t.getTemplatePath=function(e=""){return(0,i.join)(__dirname,"../templates",e)}},71432:function(e,t,n){var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(38144),t)},38144:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TargetType=t.DeployConfig=void 0,function(e){e.DeployToAbap="deploy-to-abap",e.FioriToolsProxy="fiori-tools-proxy",e.FioriToolsServestatic="fiori-tools-servestatic"}(t.DeployConfig||(t.DeployConfig={})),function(e){e.destination="destination",e.url="url"}(t.TargetType||(t.TargetType={}))},65026:e=>{e.exports=JSON.parse('{"error":{"sapAppNotDefined":"Manifest is missing required section \'sap.app\'","manifestNotFound":"Manifest not found at path: {{- path}}","inboundExists":"Inbound definition already exists for key: {{inboundKey}}"},"prompt":{"validationWarning":{"inputRequired":"{{inputName}} input is required","maxLength":"Maximum length: {{maxLength}} characters"},"message":{"semanticObject":"Semantic Object","action":"Action","title":"Title","subtitle":"Subtitle (optional)","overwrite":"Overwrite existing config"}}}')},53636:e=>{e.exports=JSON.parse('{"questions":{"enter":"Enter {{-type}}","useTarget":"Do you want to use {{-target}}","target":"SmartLinks configuration source {{-type}} {{-file}}","client":"SAP client {{-file}}","credentials":"Credentials to be used","credentialsDescription":"Provide username and password"},"warnings":{"useCredentialsFailed":"Retrieving stored credentials failed."},"info":{"username":"Username","password":"Password","searchTarget":"Searching for deploy target definition {{-file}}","targetFound":"Deploy target definition found {{-file}}","credentialsAvailable":"Credentials taken from stored system","credentialsRequired":"Credentials are required. Please enter your credentials below","authNeeded":"Credentials might be required. Do you want to enter your credentials?","operationAborted":"Operation aborted by the user.","connectTo":"Connecting to","connectSuccess":"Connection successful"},"error":{"target":"Please provide a target for configuration","noTarget":"No target definition found {{-file}}","emptyUsername":"Username can not be empty.","emptyPassword":"Password can not be empty."}}')}}; |
export declare const APP_TYPE_SUPPORTED = "SAP Fiori"; | ||
export declare const APP_TYPE_DEPRECATED = "Deprecated Templates"; | ||
export type APP_TYPE = typeof APP_TYPE_SUPPORTED | typeof APP_TYPE_DEPRECATED; | ||
export type APP_TYPE = typeof APP_TYPE_SUPPORTED; | ||
export declare const S4_GENERATOR_NAME = "@sapux/s4-fiori-subgen"; | ||
export declare const S4_GENERATOR_MIN_VERSION = "0.2.0"; | ||
//# sourceMappingURL=constants.d.ts.map |
@@ -1,1 +0,1 @@ | ||
(()=>{var e,t,r={51617:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=51617,e.exports=t},39973:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=39973,e.exports=t},20230:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=20230,e.exports=t},20545:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=20545,e.exports=t},4297:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=4297,e.exports=t},75601:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=75601,e.exports=t},82626:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=82626,e.exports=t},37974:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=37974,e.exports=t},85858:(e,t,r)=>{var s={"./cat":43112,"./cat.js":43112,"./cd":86698,"./cd.js":86698,"./chmod":23986,"./chmod.js":23986,"./common":96816,"./common.js":96816,"./cp":80610,"./cp.js":80610,"./dirs":91972,"./dirs.js":91972,"./echo":16166,"./echo.js":16166,"./error":80609,"./error.js":80609,"./exec":52024,"./exec-child":69911,"./exec-child.js":69911,"./exec.js":52024,"./find":22261,"./find.js":22261,"./grep":56818,"./grep.js":56818,"./head":66412,"./head.js":66412,"./ln":91247,"./ln.js":91247,"./ls":5815,"./ls.js":5815,"./mkdir":70098,"./mkdir.js":70098,"./mv":74164,"./mv.js":74164,"./popd":99851,"./popd.js":99851,"./pushd":6978,"./pushd.js":6978,"./pwd":24044,"./pwd.js":24044,"./rm":44256,"./rm.js":44256,"./sed":43422,"./sed.js":43422,"./set":17444,"./set.js":17444,"./sort":53033,"./sort.js":53033,"./tail":50318,"./tail.js":50318,"./tempdir":16275,"./tempdir.js":16275,"./test":50021,"./test.js":50021,"./to":44915,"./to.js":44915,"./toEnd":13326,"./toEnd.js":13326,"./touch":57650,"./touch.js":57650,"./uniq":63019,"./uniq.js":63019,"./which":5483,"./which.js":5483};function o(e){var t=i(e);return r(t)}function i(e){if(!r.o(s,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return s[e]}o.keys=function(){return Object.keys(s)},o.resolve=i,e.exports=o,o.id=85858},59896:function(e,t,r){"use strict";var s=this&&this.__awaiter||function(e,t,r,s){return new(r||(r=Promise))((function(o,i){function n(e){try{c(s.next(e))}catch(e){i(e)}}function a(e){try{c(s.throw(e))}catch(e){i(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(n,a)}c((s=s.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.checkCdsUi5PluginEnabled=t.enableCdsUi5Plugin=t.satisfiesMinCdsVersion=void 0;const o=r(71017),i=r(5407),n=r(84659),a=r(21832);var c=r(21832);Object.defineProperty(t,"satisfiesMinCdsVersion",{enumerable:!0,get:function(){return c.satisfiesMinCdsVersion}}),t.enableCdsUi5Plugin=function(e,t){var r;return s(this,void 0,void 0,(function*(){t||(t=(0,n.create)((0,i.create)()));const s=(0,o.join)(e,"package.json"),c=null!==(r=t.readJSON(s))&&void 0!==r?r:{};return(0,a.ensureMinCdsVersion)(c),yield(0,a.enableWorkspaces)(e,c),(0,a.addCdsPluginUi5)(c),t.writeJSON(s,c),t}))},t.checkCdsUi5PluginEnabled=function(e,t){return s(this,void 0,void 0,(function*(){t||(t=(0,n.create)((0,i.create)()));const r=(0,o.join)(e,"package.json");if(!t.exists(r))return!1;const s=t.readJSON(r),{workspaceEnabled:c}=yield(0,a.getWorkspaceInfo)(e,s);return(0,a.hasMinCdsVersion)(s)&&c&&(0,a.hasCdsPluginUi5)(s)}))}},21832:function(e,t,r){"use strict";var s=this&&this.__awaiter||function(e,t,r,s){return new(r||(r=Promise))((function(o,i){function n(e){try{c(s.next(e))}catch(e){i(e)}}function a(e){try{c(s.throw(e))}catch(e){i(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(n,a)}c((s=s.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.hasCdsPluginUi5=t.getWorkspaceInfo=t.satisfiesMinCdsVersion=t.hasMinCdsVersion=t.addCdsPluginUi5=t.enableWorkspaces=t.ensureMinCdsVersion=void 0;const o=r(76027),i=r(88536),n="6.8.2";function a(e){var t,r;return(0,o.gte)(null!==(r=(0,o.coerce)(null===(t=e.dependencies)||void 0===t?void 0:t["@sap/cds"]))&&void 0!==r?r:"0.0.0",n)}function c(e,t){var r;return s(this,void 0,void 0,(function*(){const s=yield(0,i.getCapCustomPaths)(e),o=s.app.endsWith("/")?`${s.app}*`:`${s.app}/*`;return{appWorkspace:o,workspaceEnabled:(null!==(r=p(t))&&void 0!==r?r:[]).includes(o)}}))}function p(e){var t,r;let s;return Array.isArray(e.workspaces)?s=e.workspaces:Array.isArray(null===(t=e.workspaces)||void 0===t?void 0:t.packages)&&(s=null===(r=e.workspaces)||void 0===r?void 0:r.packages),s}function u(e){var t;return!!(null===(t=e.devDependencies)||void 0===t?void 0:t["cds-plugin-ui5"])}t.ensureMinCdsVersion=function(e){var t;a(e)||(null!==(t=e.dependencies)&&void 0!==t||(e.dependencies={}),e.dependencies["@sap/cds"]="^6.8.2")},t.enableWorkspaces=function(e,t){var r;return s(this,void 0,void 0,(function*(){const{appWorkspace:s,workspaceEnabled:o}=yield c(e,t);if(o)return;let i=p(t);i||(null!==(r=t.workspaces)&&void 0!==r||(t.workspaces=[]),Array.isArray(t.workspaces)?i=t.workspaces:(t.workspaces.packages=[],i=t.workspaces.packages)),i.push(s)}))},t.addCdsPluginUi5=function(e){var t;u(e)||(null!==(t=e.devDependencies)&&void 0!==t||(e.devDependencies={}),e.devDependencies["cds-plugin-ui5"]="^0.6.13")},t.hasMinCdsVersion=a,t.satisfiesMinCdsVersion=function(e){var t,r;return a(e)||(0,o.satisfies)(n,null!==(r=null===(t=e.dependencies)||void 0===t?void 0:t["@sap/cds"])&&void 0!==r?r:"0.0.0")},t.getWorkspaceInfo=c,t.hasCdsPluginUi5=u},49339:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.satisfiesMinCdsVersion=t.enableCdsUi5Plugin=t.checkCdsUi5PluginEnabled=void 0;var s=r(59896);Object.defineProperty(t,"checkCdsUi5PluginEnabled",{enumerable:!0,get:function(){return s.checkCdsUi5PluginEnabled}}),Object.defineProperty(t,"enableCdsUi5Plugin",{enumerable:!0,get:function(){return s.enableCdsUi5Plugin}}),Object.defineProperty(t,"satisfiesMinCdsVersion",{enumerable:!0,get:function(){return s.satisfiesMinCdsVersion}})},12386:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.S4_GENERATOR_MIN_VERSION=t.S4_GENERATOR_NAME=t.APP_TYPE_DEPRECATED=t.APP_TYPE_SUPPORTED=void 0,t.APP_TYPE_SUPPORTED="SAP Fiori",t.APP_TYPE_DEPRECATED="Deprecated Templates",t.S4_GENERATOR_NAME="@sapux/s4-fiori-subgen",t.S4_GENERATOR_MIN_VERSION="0.2.0"},9333:function(e,t,r){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FioriGeneratorPromptNames=t.GeneratorName=t.TableSelectionMode=t.FloorplanFE=t.TableType=t.ODataVersion=t.Template=t.PROJECT_TYPE=void 0;const o=s(r(98819)),i=r(1628);Object.defineProperty(t,"ODataVersion",{enumerable:!0,get:function(){return i.ODataVersion}}),Object.defineProperty(t,"PROJECT_TYPE",{enumerable:!0,get:function(){return i.PROJECT_TYPE}}),Object.defineProperty(t,"Template",{enumerable:!0,get:function(){return i.Template}}),Object.defineProperty(t,"FloorplanFE",{enumerable:!0,get:function(){return i.FloorplanFE}}),Object.defineProperty(t,"TableType",{enumerable:!0,get:function(){return i.TableType}}),Object.defineProperty(t,"TableSelectionMode",{enumerable:!0,get:function(){return i.TableSelectionMode}}),Object.defineProperty(t,"GeneratorName",{enumerable:!0,get:function(){return i.GeneratorName}}),Object.defineProperty(t,"FioriGeneratorPromptNames",{enumerable:!0,get:function(){return i.FioriGeneratorPromptNames}});const n=r(54202),a=r(82590),c=r(37705),p=s(r(50283)),u=s(r(28869)),l=r(12386),d=r(6113);class Fiori extends o.default{constructor(e,t){if(t.force=!0,super(e,t),t.testMode||this.env.lookup({packagePatterns:["@sap/generator-fiori"]}),"function"==typeof t.appWizard?.setHeaderTitle){const{packageJson:{displayName:e="",name:r="",version:s=""}={}}=p.default.sync({cwd:this.resolved,normalize:!1})||{};t.appWizard.setHeaderTitle(e||r,`${r}@${s}`)}else(0,c.enableFeature)(i.Features.showLegacyVersionInfo);this.argument("logLevel",{default:"off",description:(0,i.t)("INFO_MSG_CLI_ARGUMENT_LOG_LEVEL_DESCRIPTION"),required:!1,type:String}),this.option("disableS4",{description:(0,i.t)("INFO_OPTIONS_DISABLE_S4",{generatorName:l.S4_GENERATOR_NAME}),type:Boolean,default:!1}),this.option("disableGeneratorExtensions",{description:(0,i.t)("INFO_OPTIONS_DISABLE_GENERATOR_EXTENSIONS"),type:Boolean,default:!1}),(0,i.isExtensionInstalled)(this.options.vscode,i.YUI_EXTENSION_ID,i.YUI_MIN_VER_VALIDATION_LINKS)&&(0,c.enableFeature)(i.Features.enableValidationHelpLinks),(0,i.isExtensionInstalled)(this.options.vscode,i.YUI_EXTENSION_ID,i.YUI_MIN_VER_ADDITIONAL_PROMPT_MESSAGES)||(0,c.enableFeature)(i.Features.showLegacyPromptMessages),(0,i.isExtensionInstalled)(this.options.vscode,i.GUIDED_ANSWERS_EXTENSION_ID)&&(0,c.enableFeature)(i.Features.enableGAIntegration),this.options.logWrapper=this.logger=i.AdaptorManager.logger=this._configureLogging(this.options.logLevel,this.options.logger,this.options.vscode);const{state:r={},steps:s=[...i.FIORI_STEPS],floorplans:o,promptSettings:a,generatorOptions:u}=i.AdaptorManager.transformToStepState(this.options.data,i.FIORI_STEPS);if(this.state=r,this.floorplans=o,this.promptSettings=a,Object.assign(this.options,u),!this.state?.project?.targetFolder&&this.options.vscode&&(this.state.project=Object.assign({},this.state?.project??{},{targetFolder:(0,i.getDefaultTargetFolder)(this.options.vscode)})),this.options.workspaceFolders=(0,n.getWorkspaceFolders)(this.options.vscode),this.floorplans&&1===this.floorplans.length){const e=s.findIndex((e=>e.key===i.STEP_FLOORPLAN));s.splice(e,1)}this.fioriSteps=s,this._setPrompts(s),this.env.conflicter&&(this.env.conflicter.force=t.force||!1)}_configureLogging(e,t,r){const s=new i.LogWrapper(this.rootGeneratorName(),e,this.log,t,r);return s.debug((0,i.t)("DEBUG_LOG_INITIALISED")),s}_setPrompts(e){this.yeomanUiStepConfig=(0,i.getYeomanUiStepConfig)(e),this.prompts=this.yeomanUiStepConfig.activeSteps,this.setPromptsCallback=e=>{this.prompts&&this.prompts.setCallback(e)}}async prompting(){let e;if((0,i.hasStep)(this.fioriSteps,i.STEP_FLOORPLAN)){const t=await this.prompt((0,n.getFloorplanPrompts)(this.rootGeneratorVersion(),this.floorplans));e=(0,n.getFloorplanAnswer)(t)}else e=Array.isArray(this.floorplans)&&this.floorplans.length>0?this.floorplans[0]:void 0;this.composeWith((0,a.getSubGeneratorName)(e),{arguments:this.args,...Object.assign(this.options,{yeomanUiStepConfig:this.yeomanUiStepConfig,fioriSteps:this.fioriSteps,state:this.state,floorplan:e,telemetryData:i.TelemetryHelper.telemetryData,promptSettings:this.promptSettings}),parent:this}),this.options.conditionalSteps?.forEach((t=>{t.when({floorplan:e})&&this.prompts.splice(this.prompts.size()-1,0,[t])}))}default(){this.fioriGenExtPath&&this.composeWith(this.fioriGenExtPath,{state:{project:(0,u.default)(this.state.project),service:(0,u.default)(this.state.service)}})}async _findGeneratorExtensions(){const e=await(0,i.findInstalledPackages)("fiori-gen-ext",{keyword:"fiori-generator-extension",vscWorkspaceConfig:this.options.vscode?.workspace?.getConfiguration()});let t;for await(const r of e)if(this.logger.info((0,i.t)("INFO_MSG_SUB_GENERATOR_FOUND",{generatorInfo:{path:r.path,name:r.packageInfo.name,version:r.packageInfo.version}})),!t){t=r;const e=this.env.create(r.path),s="function"==typeof e._getSteps?e._getSteps():[];this.prompts.splice(this.prompts.size(),0,s.filter((e=>!e.when))),this.options.conditionalSteps=s.filter((e=>!!e.when));const o="function"==typeof e._getExtensions?e._getExtensions()?.[this.rootGeneratorName()]:{};this.options.extensions=o;const n="function"==typeof e._getSettings?e._getSettings():void 0;Object.assign(this.options,n),this.logger.info((0,i.t)("INFO_MSG_SUB_GENERATOR_APPLIED",{generatorInfo:{name:r.packageInfo.name,version:r.packageInfo.version,additionalSteps:Array.isArray(s)?s.length:0,extensionsAdded:!!o}})),i.TelemetryHelper.createTelemetryData({FioriGenExtId:(0,d.createHash)("sha256").update(r.packageInfo.name??"").digest("hex"),FioriGenExtCustomisedPrompts:Object.keys(o??[]).join(),FioriGenExtAddedSteps:s.length.toString()})}return t?.path}async initializing(){if(this.options.disableGeneratorExtensions||(this.fioriGenExtPath=await this._findGeneratorExtensions()),!this.options.disableS4){const e=await(0,i.findInstalledGenerator)(l.S4_GENERATOR_NAME,this.options.vscode?.workspace?.getConfiguration(),{minVersion:l.S4_GENERATOR_MIN_VERSION});e&&!this.fioriGenExtPath&&(this.logger.info((0,i.t)("INFO_MSG_SUB_GENERATOR_FOUND",{generatorInfo:{path:e.path,name:e.packageInfo.name,version:e.packageInfo.version}})),this.composeWith(e.path,{state:this.state,prompts:this.prompts}),this.options.showALPLayoutPrompts=!1,this.options.hideUI5VersionPrompt=!0,this.options.generateIndexHtml=!1)}}install(){}}t.default=Fiori},54202:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getWorkspaceFolders=t.getFloorplanAnswer=t.getFloorplanPrompts=void 0;const s=r(1628),o=r(90818),i=r(42205),n=r(12386),a=r(37705);t.getFloorplanPrompts=function(e,t){const r=[];let c=t;t||(c=[...Object.values(s.FloorplanFF),...Object.values(s.FloorplanFE)]);const p=Object.assign({},(0,o.getFloorplanChoices)(c),(0,i.getFloorplanChoices)(c)),u=[],l=[];return Object.entries(p).forEach((([e,t])=>{s.FloorplanAttributes[e].deprecated?u.push(t):l.push(t)})),r.push((({name:t,message:r,choices:o,applicationType:i})=>({type:"list",name:t,guiType:"tiles",message:r,guiOptions:{breadcrumb:(0,s.breadcrumbHelper)((0,s.t)("LABEL_SELECTED_TEMPLATE_BREADCRUMB")),hint:(0,a.isFeatureEnabled)(s.Features.showLegacyVersionInfo)?`${(0,s.t)("APPLICATION_TITLE")} version: ${e}`:void 0},choices:o,when:e=>!e.applicationType||e.applicationType===i}))({name:"currentFloorplan",message:`${(0,s.t)("CREATE_APP_MESSAGE")}`,choices:l,applicationType:n.APP_TYPE_SUPPORTED})),r},t.getFloorplanAnswer=function({currentFloorplan:e,deprecatedFloorplan:t,applicationType:r}){return r===n.APP_TYPE_SUPPORTED?e:r===n.APP_TYPE_DEPRECATED?t:e||t},t.getWorkspaceFolders=function(e){const t=[];return e&&e.workspace?.workspaceFolders?.length>0?e.workspace.workspaceFolders.filter((e=>"file"===e.uri.scheme)).forEach((e=>{t.push(e.uri.fsPath)})):(0,s.getPlatform)()===s.PLATFORMS.CLI&&t.push(process.cwd()),t}},82590:function(e,t,r){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getSubGeneratorName=t.getSubGeneratorPath=void 0;const o=r(1628),i=s(r(71017));t.getSubGeneratorPath=function(e,t){const r=(0,o.getGeneratorName)(e);if(r)return i.default.join(__dirname,"..",r,t?"headless":"app");throw(0,o.t)("ERROR_UNSUPPORTED_GENERATOR_NAME",{genName:r})},t.getSubGeneratorName=function(e,t){const r=(0,o.getGeneratorName)(e);if(r){const e=`@sap/fiori:${r}`;return t?`${e}_headless`:`${e}`}throw(0,o.t)("ERROR_UNSUPPORTED_GENERATOR_NAME",{genName:r})}},34409:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=34409,e.exports=t},70910:(e,t,r)=>{var s={"./Find-VisualStudio.cs":20183,"./build":17724,"./build.js":17724,"./clean":1658,"./clean.js":1658,"./configure":4748,"./configure.js":4748,"./create-config-gypi":98395,"./create-config-gypi.js":98395,"./find-node-directory":24159,"./find-node-directory.js":24159,"./find-python":29130,"./find-python.js":29130,"./find-visualstudio":17703,"./find-visualstudio.js":17703,"./install":25925,"./install.js":25925,"./list":44179,"./list.js":44179,"./node-gyp":55614,"./node-gyp.js":55614,"./process-release":75344,"./process-release.js":75344,"./rebuild":64187,"./rebuild.js":64187,"./remove":13103,"./remove.js":13103,"./util":55690,"./util.js":55690};function o(e){var t=i(e);return r(t)}function i(e){if(!r.o(s,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return s[e]}o.keys=function(){return Object.keys(s)},o.resolve=i,e.exports=o,o.id=70910},84679:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=84679,e.exports=t},72869:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=72869,e.exports=t},12937:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=12937,e.exports=t},84397:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=84397,e.exports=t},54529:e=>{"use strict";e.exports=require("@opentelemetry/tracing")},85767:e=>{"use strict";e.exports=require("@sap/cds")},31980:e=>{"use strict";e.exports=require("@sap/cds-compiler")},32220:e=>{"use strict";e.exports=require("applicationinsights-native-metrics")},43241:e=>{"use strict";e.exports=require("esprima")},74602:e=>{"use strict";e.exports=require("keytar")},66828:e=>{"use strict";e.exports=require("vscode")},39491:e=>{"use strict";e.exports=require("assert")},50852:e=>{"use strict";e.exports=require("async_hooks")},14300:e=>{"use strict";e.exports=require("buffer")},32081:e=>{"use strict";e.exports=require("child_process")},96206:e=>{"use strict";e.exports=require("console")},22057:e=>{"use strict";e.exports=require("constants")},6113:e=>{"use strict";e.exports=require("crypto")},9523:e=>{"use strict";e.exports=require("dns")},82361:e=>{"use strict";e.exports=require("events")},57147:e=>{"use strict";e.exports=require("fs")},73292:e=>{"use strict";e.exports=require("fs/promises")},13685:e=>{"use strict";e.exports=require("http")},95687:e=>{"use strict";e.exports=require("https")},98188:e=>{"use strict";e.exports=require("module")},41808:e=>{"use strict";e.exports=require("net")},22037:e=>{"use strict";e.exports=require("os")},71017:e=>{"use strict";e.exports=require("path")},77282:e=>{"use strict";e.exports=require("process")},85477:e=>{"use strict";e.exports=require("punycode")},63477:e=>{"use strict";e.exports=require("querystring")},14521:e=>{"use strict";e.exports=require("readline")},12781:e=>{"use strict";e.exports=require("stream")},71576:e=>{"use strict";e.exports=require("string_decoder")},39512:e=>{"use strict";e.exports=require("timers")},24404:e=>{"use strict";e.exports=require("tls")},76224:e=>{"use strict";e.exports=require("tty")},57310:e=>{"use strict";e.exports=require("url")},73837:e=>{"use strict";e.exports=require("util")},26144:e=>{"use strict";e.exports=require("vm")},59796:e=>{"use strict";e.exports=require("zlib")},69645:e=>{"use strict";e.exports={}}},s={};function o(e){var t=s[e];if(void 0!==t)return t.exports;var i=s[e]={id:e,loaded:!1,exports:{}};return r[e].call(i.exports,i,i.exports,o),i.loaded=!0,i.exports}o.m=r,o.c=s,o.x=()=>{var e=o.O(void 0,[712,784,475,763,2],(()=>o(o.s=9333)));return e=o.O(e)},e=[],o.O=(t,r,s,i)=>{if(!r){var n=1/0;for(u=0;u<e.length;u++){for(var[r,s,i]=e[u],a=!0,c=0;c<r.length;c++)(!1&i||n>=i)&&Object.keys(o.O).every((e=>o.O[e](r[c])))?r.splice(c--,1):(a=!1,i<n&&(n=i));if(a){e.splice(u--,1);var p=s();void 0!==p&&(t=p)}}return t}i=i||0;for(var u=e.length;u>0&&e[u-1][2]>i;u--)e[u]=e[u-1];e[u]=[r,s,i]},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce(((t,r)=>(o.f[r](e,t),t)),[])),o.u=e=>({2:"project-generator/app",475:"tools-suite-common-libs",712:"commonlibs",763:"app-gen-shared",784:"open-ux-shared"}[e]+"/index.js"),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),o.j=143,o.p="",(()=>{var e={143:1,77:1,190:1};o.O.require=t=>e[t];o.f.require=(t,r)=>{e[t]||(t=>{var r=t.modules,s=t.ids,i=t.runtime;for(var n in r)o.o(r,n)&&(o.m[n]=r[n]);i&&i(o);for(var a=0;a<s.length;a++)e[s[a]]=1;o.O()})(require("../"+o.u(t)))}})(),t=o.x,o.x=()=>(o.e(712),o.e(784),o.e(475),o.e(763),o.e(2),t());var i=o.x();module.exports=i})(); | ||
(()=>{var e,t,r={51617:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=51617,e.exports=t},39973:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=39973,e.exports=t},20230:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=20230,e.exports=t},20545:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=20545,e.exports=t},4297:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=4297,e.exports=t},75601:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=75601,e.exports=t},82626:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=82626,e.exports=t},37974:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=37974,e.exports=t},85858:(e,t,r)=>{var s={"./cat":43112,"./cat.js":43112,"./cd":86698,"./cd.js":86698,"./chmod":23986,"./chmod.js":23986,"./common":96816,"./common.js":96816,"./cp":80610,"./cp.js":80610,"./dirs":91972,"./dirs.js":91972,"./echo":16166,"./echo.js":16166,"./error":80609,"./error.js":80609,"./exec":52024,"./exec-child":69911,"./exec-child.js":69911,"./exec.js":52024,"./find":22261,"./find.js":22261,"./grep":56818,"./grep.js":56818,"./head":66412,"./head.js":66412,"./ln":91247,"./ln.js":91247,"./ls":5815,"./ls.js":5815,"./mkdir":70098,"./mkdir.js":70098,"./mv":74164,"./mv.js":74164,"./popd":99851,"./popd.js":99851,"./pushd":6978,"./pushd.js":6978,"./pwd":24044,"./pwd.js":24044,"./rm":44256,"./rm.js":44256,"./sed":43422,"./sed.js":43422,"./set":17444,"./set.js":17444,"./sort":53033,"./sort.js":53033,"./tail":50318,"./tail.js":50318,"./tempdir":16275,"./tempdir.js":16275,"./test":50021,"./test.js":50021,"./to":44915,"./to.js":44915,"./toEnd":13326,"./toEnd.js":13326,"./touch":57650,"./touch.js":57650,"./uniq":63019,"./uniq.js":63019,"./which":5483,"./which.js":5483};function o(e){var t=i(e);return r(t)}function i(e){if(!r.o(s,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return s[e]}o.keys=function(){return Object.keys(s)},o.resolve=i,e.exports=o,o.id=85858},59896:function(e,t,r){"use strict";var s=this&&this.__awaiter||function(e,t,r,s){return new(r||(r=Promise))((function(o,i){function n(e){try{c(s.next(e))}catch(e){i(e)}}function a(e){try{c(s.throw(e))}catch(e){i(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(n,a)}c((s=s.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.checkCdsUi5PluginEnabled=t.enableCdsUi5Plugin=t.satisfiesMinCdsVersion=void 0;const o=r(71017),i=r(5407),n=r(84659),a=r(21832);var c=r(21832);Object.defineProperty(t,"satisfiesMinCdsVersion",{enumerable:!0,get:function(){return c.satisfiesMinCdsVersion}}),t.enableCdsUi5Plugin=function(e,t){var r;return s(this,void 0,void 0,(function*(){t||(t=(0,n.create)((0,i.create)()));const s=(0,o.join)(e,"package.json"),c=null!==(r=t.readJSON(s))&&void 0!==r?r:{};return(0,a.ensureMinCdsVersion)(c),yield(0,a.enableWorkspaces)(e,c),(0,a.addCdsPluginUi5)(c),t.writeJSON(s,c),t}))},t.checkCdsUi5PluginEnabled=function(e,t){return s(this,void 0,void 0,(function*(){t||(t=(0,n.create)((0,i.create)()));const r=(0,o.join)(e,"package.json");if(!t.exists(r))return!1;const s=t.readJSON(r),{workspaceEnabled:c}=yield(0,a.getWorkspaceInfo)(e,s);return(0,a.hasMinCdsVersion)(s)&&c&&(0,a.hasCdsPluginUi5)(s)}))}},21832:function(e,t,r){"use strict";var s=this&&this.__awaiter||function(e,t,r,s){return new(r||(r=Promise))((function(o,i){function n(e){try{c(s.next(e))}catch(e){i(e)}}function a(e){try{c(s.throw(e))}catch(e){i(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(n,a)}c((s=s.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.hasCdsPluginUi5=t.getWorkspaceInfo=t.satisfiesMinCdsVersion=t.hasMinCdsVersion=t.addCdsPluginUi5=t.enableWorkspaces=t.ensureMinCdsVersion=void 0;const o=r(76027),i=r(9949),n="6.8.2";function a(e){var t,r;return(0,o.gte)(null!==(r=(0,o.coerce)(null===(t=e.dependencies)||void 0===t?void 0:t["@sap/cds"]))&&void 0!==r?r:"0.0.0",n)}function c(e,t){var r;return s(this,void 0,void 0,(function*(){const s=yield(0,i.getCapCustomPaths)(e),o=s.app.endsWith("/")?`${s.app}*`:`${s.app}/*`;return{appWorkspace:o,workspaceEnabled:(null!==(r=p(t))&&void 0!==r?r:[]).includes(o)}}))}function p(e){var t,r;let s;return Array.isArray(e.workspaces)?s=e.workspaces:Array.isArray(null===(t=e.workspaces)||void 0===t?void 0:t.packages)&&(s=null===(r=e.workspaces)||void 0===r?void 0:r.packages),s}function u(e){var t;return!!(null===(t=e.devDependencies)||void 0===t?void 0:t["cds-plugin-ui5"])}t.ensureMinCdsVersion=function(e){var t;a(e)||(null!==(t=e.dependencies)&&void 0!==t||(e.dependencies={}),e.dependencies["@sap/cds"]="^6.8.2")},t.enableWorkspaces=function(e,t){var r;return s(this,void 0,void 0,(function*(){const{appWorkspace:s,workspaceEnabled:o}=yield c(e,t);if(o)return;let i=p(t);i||(null!==(r=t.workspaces)&&void 0!==r||(t.workspaces=[]),Array.isArray(t.workspaces)?i=t.workspaces:(t.workspaces.packages=[],i=t.workspaces.packages)),i.push(s)}))},t.addCdsPluginUi5=function(e){var t;u(e)||(null!==(t=e.devDependencies)&&void 0!==t||(e.devDependencies={}),e.devDependencies["cds-plugin-ui5"]="^0.6.13")},t.hasMinCdsVersion=a,t.satisfiesMinCdsVersion=function(e){var t,r;return a(e)||(0,o.satisfies)(n,null!==(r=null===(t=e.dependencies)||void 0===t?void 0:t["@sap/cds"])&&void 0!==r?r:"0.0.0")},t.getWorkspaceInfo=c,t.hasCdsPluginUi5=u},49339:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.satisfiesMinCdsVersion=t.enableCdsUi5Plugin=t.checkCdsUi5PluginEnabled=void 0;var s=r(59896);Object.defineProperty(t,"checkCdsUi5PluginEnabled",{enumerable:!0,get:function(){return s.checkCdsUi5PluginEnabled}}),Object.defineProperty(t,"enableCdsUi5Plugin",{enumerable:!0,get:function(){return s.enableCdsUi5Plugin}}),Object.defineProperty(t,"satisfiesMinCdsVersion",{enumerable:!0,get:function(){return s.satisfiesMinCdsVersion}})},12386:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.S4_GENERATOR_MIN_VERSION=t.S4_GENERATOR_NAME=t.APP_TYPE_SUPPORTED=void 0,t.APP_TYPE_SUPPORTED="SAP Fiori",t.S4_GENERATOR_NAME="@sapux/s4-fiori-subgen",t.S4_GENERATOR_MIN_VERSION="0.2.0"},9333:function(e,t,r){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FioriGeneratorPromptNames=t.GeneratorName=t.TableSelectionMode=t.FloorplanFE=t.TableType=t.ODataVersion=t.Template=t.PROJECT_TYPE=void 0;const o=s(r(98819)),i=r(1628);Object.defineProperty(t,"ODataVersion",{enumerable:!0,get:function(){return i.ODataVersion}}),Object.defineProperty(t,"PROJECT_TYPE",{enumerable:!0,get:function(){return i.PROJECT_TYPE}}),Object.defineProperty(t,"Template",{enumerable:!0,get:function(){return i.Template}}),Object.defineProperty(t,"FloorplanFE",{enumerable:!0,get:function(){return i.FloorplanFE}}),Object.defineProperty(t,"TableType",{enumerable:!0,get:function(){return i.TableType}}),Object.defineProperty(t,"TableSelectionMode",{enumerable:!0,get:function(){return i.TableSelectionMode}}),Object.defineProperty(t,"GeneratorName",{enumerable:!0,get:function(){return i.GeneratorName}}),Object.defineProperty(t,"FioriGeneratorPromptNames",{enumerable:!0,get:function(){return i.FioriGeneratorPromptNames}});const n=r(54202),a=r(82590),c=r(37705),p=s(r(50283)),u=s(r(28869)),d=r(12386),l=r(6113);class Fiori extends o.default{constructor(e,t){if(t.force=!0,super(e,t),t.testMode||this.env.lookup({packagePatterns:["@sap/generator-fiori"]}),"function"==typeof t.appWizard?.setHeaderTitle){const{packageJson:{displayName:e="",name:r="",version:s=""}={}}=p.default.sync({cwd:this.resolved,normalize:!1})||{};t.appWizard.setHeaderTitle(e||r,`${r}@${s}`)}else(0,c.enableFeature)(i.Features.showLegacyVersionInfo);this.argument("logLevel",{default:"off",description:(0,i.t)("INFO_MSG_CLI_ARGUMENT_LOG_LEVEL_DESCRIPTION"),required:!1,type:String}),this.option("disableS4",{description:(0,i.t)("INFO_OPTIONS_DISABLE_S4",{generatorName:d.S4_GENERATOR_NAME}),type:Boolean,default:!1}),this.option("disableGeneratorExtensions",{description:(0,i.t)("INFO_OPTIONS_DISABLE_GENERATOR_EXTENSIONS"),type:Boolean,default:!1}),(0,i.isExtensionInstalled)(this.options.vscode,i.YUI_EXTENSION_ID,i.YUI_MIN_VER_VALIDATION_LINKS)&&(0,c.enableFeature)(i.Features.enableValidationHelpLinks),(0,i.isExtensionInstalled)(this.options.vscode,i.YUI_EXTENSION_ID,i.YUI_MIN_VER_ADDITIONAL_PROMPT_MESSAGES)||(0,c.enableFeature)(i.Features.showLegacyPromptMessages),(0,i.isExtensionInstalled)(this.options.vscode,i.GUIDED_ANSWERS_EXTENSION_ID)&&(0,c.enableFeature)(i.Features.enableGAIntegration),this.options.logWrapper=this.logger=i.AdaptorManager.logger=this._configureLogging(this.options.logLevel,this.options.logger,this.options.vscode);const{state:r={},steps:s=[...i.FIORI_STEPS],floorplans:o,promptSettings:a,generatorOptions:u}=i.AdaptorManager.transformToStepState(this.options.data,i.FIORI_STEPS);if(this.state=r,this.floorplans=o,this.promptSettings=a,Object.assign(this.options,u),t.appWizard&&this.options.wizardMessage&&(0,n.showWizardMessage)(this.options.wizardMessage,t.appWizard),!this.state?.project?.targetFolder&&this.options.vscode&&(this.state.project=Object.assign({},this.state?.project??{},{targetFolder:(0,i.getDefaultTargetFolder)(this.options.vscode)})),this.options.workspaceFolders=(0,n.getWorkspaceFolders)(this.options.vscode),this.floorplans&&1===this.floorplans.length&&!this.options.showTemplateSelectionStepIfOnlyOne){const e=s.findIndex((e=>e.key===i.STEP_FLOORPLAN));s.splice(e,1)}this.fioriSteps=s,this._setPrompts(s),this.env.conflicter&&(this.env.conflicter.force=t.force||!1)}_configureLogging(e,t,r){const s=new i.LogWrapper(this.rootGeneratorName(),e,this.log,t,r);return s.debug((0,i.t)("DEBUG_LOG_INITIALISED")),s}_setPrompts(e){this.yeomanUiStepConfig=(0,i.getYeomanUiStepConfig)(e),this.prompts=this.yeomanUiStepConfig.activeSteps,this.setPromptsCallback=e=>{this.prompts&&this.prompts.setCallback(e)}}async prompting(){let e;if((0,i.hasStep)(this.fioriSteps,i.STEP_FLOORPLAN)){const t=await this.prompt((0,n.getFloorplanPrompts)(this.rootGeneratorVersion(),this.floorplans));e=t.currentFloorplan}else e=Array.isArray(this.floorplans)&&this.floorplans.length>0?this.floorplans[0]:void 0;this.composeWith((0,a.getSubGeneratorName)(e),{arguments:this.args,...Object.assign(this.options,{yeomanUiStepConfig:this.yeomanUiStepConfig,fioriSteps:this.fioriSteps,state:this.state,floorplan:e,telemetryData:i.TelemetryHelper.telemetryData,promptSettings:this.promptSettings}),parent:this}),this.options.conditionalSteps?.forEach((t=>{t.when({floorplan:e})&&this.prompts.splice(this.prompts.size()-1,0,[t])}))}default(){this.fioriGenExtPath&&this.composeWith(this.fioriGenExtPath,{state:{project:(0,u.default)(this.state.project),service:(0,u.default)(this.state.service)}})}async _findGeneratorExtensions(){const e=await(0,i.findInstalledPackages)("fiori-gen-ext",{keyword:"fiori-generator-extension",vscWorkspaceConfig:this.options.vscode?.workspace?.getConfiguration()});let t;for await(const r of e)if(this.logger.info((0,i.t)("INFO_MSG_SUB_GENERATOR_FOUND",{generatorInfo:{path:r.path,name:r.packageInfo.name,version:r.packageInfo.version}})),!t){t=r;const e=this.env.create(r.path),s="function"==typeof e._getSteps?e._getSteps():[];this.prompts.splice(this.prompts.size(),0,s.filter((e=>!e.when))),this.options.conditionalSteps=s.filter((e=>!!e.when));const o="function"==typeof e._getExtensions?e._getExtensions()?.[this.rootGeneratorName()]:{};this.options.extensions=o;const n="function"==typeof e._getSettings?e._getSettings():void 0;Object.assign(this.options,n),this.logger.info((0,i.t)("INFO_MSG_SUB_GENERATOR_APPLIED",{generatorInfo:{name:r.packageInfo.name,version:r.packageInfo.version,additionalSteps:Array.isArray(s)?s.length:0,extensionsAdded:!!o}})),this.logger.trace(`Creating telemtry data for Fiori generator extension. 'enableTelemtryData': ${e.enableTelemetryData}`);let a={FioriGenExtId:(0,l.createHash)("sha256").update(r.packageInfo.name??"").digest("hex"),FioriGenExtCustomisedPrompts:Object.keys(o??[]).join(),FioriGenExtAddedSteps:s.length.toString()};const c={FioriGenExtModuleName:r.packageInfo.name},p={FioriGenExtModuleVersion:r.packageInfo.version};e.enableTelemetryData&&(a=Object.assign(a,c,p)),i.TelemetryHelper.createTelemetryData(a)}return t?.path}async initializing(){if(this.options.disableGeneratorExtensions||(this.fioriGenExtPath=await this._findGeneratorExtensions()),!this.options.disableS4){const e=await(0,i.findInstalledGenerator)(d.S4_GENERATOR_NAME,this.options.vscode?.workspace?.getConfiguration(),{minVersion:d.S4_GENERATOR_MIN_VERSION});e&&!this.fioriGenExtPath&&(this.logger.info((0,i.t)("INFO_MSG_SUB_GENERATOR_FOUND",{generatorInfo:{path:e.path,name:e.packageInfo.name,version:e.packageInfo.version}})),this.composeWith(e.path,{state:this.state,prompts:this.prompts}),this.options.showALPLayoutPrompts=!1,this.options.hideUI5VersionPrompt=!0,this.options.generateIndexHtml=!1)}}install(){}}t.default=Fiori},54202:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.showWizardMessage=t.getWorkspaceFolders=t.getFloorplanPrompts=void 0;const s=r(1628),o=r(90818),i=r(42205),n=r(12386),a=r(37705),c=r(25184);t.getFloorplanPrompts=function(e,t){const r=[];let c=t;t||(c=[...Object.values(s.FloorplanFF),...Object.values(s.FloorplanFE)]);const p=Object.assign({},(0,o.getFloorplanChoices)(c),(0,i.getFloorplanChoices)(c)),u=[];return Object.entries(p).forEach((([e,t])=>{u.push(t)})),r.push((({name:t,message:r,choices:o,applicationType:i})=>({type:"list",name:t,guiType:"tiles",message:r,guiOptions:{breadcrumb:(0,s.breadcrumbHelper)((0,s.t)("LABEL_SELECTED_TEMPLATE_BREADCRUMB")),hint:(0,a.isFeatureEnabled)(s.Features.showLegacyVersionInfo)?`${(0,s.t)("APPLICATION_TITLE")} version: ${e}`:void 0},choices:o,when:e=>!e.applicationType||e.applicationType===i}))({name:"currentFloorplan",message:`${(0,s.t)("CREATE_APP_MESSAGE")}`,choices:u,applicationType:n.APP_TYPE_SUPPORTED})),r},t.getWorkspaceFolders=function(e){const t=[];return e&&e.workspace?.workspaceFolders?.length>0?e.workspace.workspaceFolders.filter((e=>"file"===e.uri.scheme)).forEach((e=>{t.push(e.uri.fsPath)})):(0,s.getPlatform)()===s.PLATFORMS.CLI&&t.push(process.cwd()),t},t.showWizardMessage=function(e,t){({[c.Severity.information]:e=>t.showInformation(e,c.MessageType.prompt),[c.Severity.warning]:e=>t.showWarning(e,c.MessageType.prompt),[c.Severity.error]:e=>t.showError(e,c.MessageType.prompt)})[e.severity??c.Severity.information](e.text)}},82590:function(e,t,r){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getSubGeneratorName=t.getSubGeneratorPath=void 0;const o=r(1628),i=s(r(71017));t.getSubGeneratorPath=function(e,t){const r=(0,o.getGeneratorName)(e);if(r)return i.default.join(__dirname,"..",r,t?"headless":"app");throw(0,o.t)("ERROR_UNSUPPORTED_GENERATOR_NAME",{genName:r})},t.getSubGeneratorName=function(e,t){const r=(0,o.getGeneratorName)(e);if(r){const e=`@sap/fiori:${r}`;return t?`${e}_headless`:`${e}`}throw(0,o.t)("ERROR_UNSUPPORTED_GENERATOR_NAME",{genName:r})}},34409:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=34409,e.exports=t},70910:(e,t,r)=>{var s={"./Find-VisualStudio.cs":20183,"./build":17724,"./build.js":17724,"./clean":1658,"./clean.js":1658,"./configure":4748,"./configure.js":4748,"./create-config-gypi":98395,"./create-config-gypi.js":98395,"./find-node-directory":24159,"./find-node-directory.js":24159,"./find-python":29130,"./find-python.js":29130,"./find-visualstudio":17703,"./find-visualstudio.js":17703,"./install":25925,"./install.js":25925,"./list":44179,"./list.js":44179,"./node-gyp":55614,"./node-gyp.js":55614,"./process-release":75344,"./process-release.js":75344,"./rebuild":64187,"./rebuild.js":64187,"./remove":13103,"./remove.js":13103,"./util":55690,"./util.js":55690};function o(e){var t=i(e);return r(t)}function i(e){if(!r.o(s,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return s[e]}o.keys=function(){return Object.keys(s)},o.resolve=i,e.exports=o,o.id=70910},84679:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=84679,e.exports=t},72869:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=72869,e.exports=t},12937:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=12937,e.exports=t},84397:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=84397,e.exports=t},54529:e=>{"use strict";e.exports=require("@opentelemetry/tracing")},85767:e=>{"use strict";e.exports=require("@sap/cds")},31980:e=>{"use strict";e.exports=require("@sap/cds-compiler")},32220:e=>{"use strict";e.exports=require("applicationinsights-native-metrics")},43241:e=>{"use strict";e.exports=require("esprima")},74602:e=>{"use strict";e.exports=require("keytar")},66828:e=>{"use strict";e.exports=require("vscode")},39491:e=>{"use strict";e.exports=require("assert")},50852:e=>{"use strict";e.exports=require("async_hooks")},14300:e=>{"use strict";e.exports=require("buffer")},32081:e=>{"use strict";e.exports=require("child_process")},96206:e=>{"use strict";e.exports=require("console")},22057:e=>{"use strict";e.exports=require("constants")},6113:e=>{"use strict";e.exports=require("crypto")},9523:e=>{"use strict";e.exports=require("dns")},82361:e=>{"use strict";e.exports=require("events")},57147:e=>{"use strict";e.exports=require("fs")},73292:e=>{"use strict";e.exports=require("fs/promises")},13685:e=>{"use strict";e.exports=require("http")},95687:e=>{"use strict";e.exports=require("https")},98188:e=>{"use strict";e.exports=require("module")},41808:e=>{"use strict";e.exports=require("net")},22037:e=>{"use strict";e.exports=require("os")},71017:e=>{"use strict";e.exports=require("path")},77282:e=>{"use strict";e.exports=require("process")},85477:e=>{"use strict";e.exports=require("punycode")},63477:e=>{"use strict";e.exports=require("querystring")},14521:e=>{"use strict";e.exports=require("readline")},12781:e=>{"use strict";e.exports=require("stream")},71576:e=>{"use strict";e.exports=require("string_decoder")},39512:e=>{"use strict";e.exports=require("timers")},24404:e=>{"use strict";e.exports=require("tls")},76224:e=>{"use strict";e.exports=require("tty")},57310:e=>{"use strict";e.exports=require("url")},73837:e=>{"use strict";e.exports=require("util")},26144:e=>{"use strict";e.exports=require("vm")},59796:e=>{"use strict";e.exports=require("zlib")},69645:e=>{"use strict";e.exports={}}},s={};function o(e){var t=s[e];if(void 0!==t)return t.exports;var i=s[e]={id:e,loaded:!1,exports:{}};return r[e].call(i.exports,i,i.exports,o),i.loaded=!0,i.exports}o.m=r,o.c=s,o.x=()=>{var e=o.O(void 0,[712,784,475,763,2],(()=>o(o.s=9333)));return e=o.O(e)},e=[],o.O=(t,r,s,i)=>{if(!r){var n=1/0;for(u=0;u<e.length;u++){for(var[r,s,i]=e[u],a=!0,c=0;c<r.length;c++)(!1&i||n>=i)&&Object.keys(o.O).every((e=>o.O[e](r[c])))?r.splice(c--,1):(a=!1,i<n&&(n=i));if(a){e.splice(u--,1);var p=s();void 0!==p&&(t=p)}}return t}i=i||0;for(var u=e.length;u>0&&e[u-1][2]>i;u--)e[u]=e[u-1];e[u]=[r,s,i]},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce(((t,r)=>(o.f[r](e,t),t)),[])),o.u=e=>({2:"project-generator/app",475:"tools-suite-common-libs",712:"commonlibs",763:"app-gen-shared",784:"open-ux-shared"}[e]+"/index.js"),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),o.j=143,o.p="",(()=>{var e={143:1,77:1,190:1};o.O.require=t=>e[t];o.f.require=(t,r)=>{e[t]||(t=>{var r=t.modules,s=t.ids,i=t.runtime;for(var n in r)o.o(r,n)&&(o.m[n]=r[n]);i&&i(o);for(var a=0;a<s.length;a++)e[s[a]]=1;o.O()})(require("../"+o.u(t)))}})(),t=o.x,o.x=()=>(o.e(712),o.e(784),o.e(475),o.e(763),o.e(2),t());var i=o.x();module.exports=i})(); |
@@ -1,6 +0,6 @@ | ||
import type { Floorplan } from '@sap/ux-generator-common'; | ||
import type { FioriGeneratorOptions, Floorplan } from '@sap/ux-generator-common'; | ||
import type { Answers, Question } from 'yeoman-generator'; | ||
import type { APP_TYPE } from './constants'; | ||
import type { AppWizard } from '@sap-devx/yeoman-ui-types'; | ||
/** | ||
* Get the floorplan questions, with an option for deprecated and an option for not-deprecated floorplans. | ||
* Get the floorplan questions. | ||
* The applicationType prompt will only be shown when necessary. i.e. When there are more than 1 category of floorplan | ||
@@ -13,7 +13,2 @@ * | ||
export declare function getFloorplanPrompts(generatorVersion: string, floorplans: Floorplan[] | undefined): Question<Answers>; | ||
export declare function getFloorplanAnswer({ currentFloorplan, deprecatedFloorplan, applicationType }: { | ||
currentFloorplan?: Floorplan; | ||
deprecatedFloorplan?: Floorplan; | ||
applicationType?: APP_TYPE; | ||
}): Floorplan; | ||
/** | ||
@@ -25,2 +20,10 @@ * Get workspace folders from vscode object, set cwd if CLI | ||
export declare function getWorkspaceFolders(vscode: any): string[]; | ||
/** | ||
* Shows an app wizard (Yeoman UI) message. | ||
* | ||
* @param message the message to display on the navigation footer and the severity to determine the icon, default severity is 'information' | ||
* @param appWizard a reference to the app wizard instance | ||
* | ||
*/ | ||
export declare function showWizardMessage(message: FioriGeneratorOptions['wizardMessage'], appWizard: AppWizard): void; | ||
//# sourceMappingURL=utils.d.ts.map |
@@ -1,1 +0,1 @@ | ||
(()=>{var e,t,r={51617:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=51617,e.exports=t},39973:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=39973,e.exports=t},20230:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=20230,e.exports=t},20545:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=20545,e.exports=t},4297:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=4297,e.exports=t},75601:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=75601,e.exports=t},82626:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=82626,e.exports=t},37974:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=37974,e.exports=t},85858:(e,t,r)=>{var o={"./cat":43112,"./cat.js":43112,"./cd":86698,"./cd.js":86698,"./chmod":23986,"./chmod.js":23986,"./common":96816,"./common.js":96816,"./cp":80610,"./cp.js":80610,"./dirs":91972,"./dirs.js":91972,"./echo":16166,"./echo.js":16166,"./error":80609,"./error.js":80609,"./exec":52024,"./exec-child":69911,"./exec-child.js":69911,"./exec.js":52024,"./find":22261,"./find.js":22261,"./grep":56818,"./grep.js":56818,"./head":66412,"./head.js":66412,"./ln":91247,"./ln.js":91247,"./ls":5815,"./ls.js":5815,"./mkdir":70098,"./mkdir.js":70098,"./mv":74164,"./mv.js":74164,"./popd":99851,"./popd.js":99851,"./pushd":6978,"./pushd.js":6978,"./pwd":24044,"./pwd.js":24044,"./rm":44256,"./rm.js":44256,"./sed":43422,"./sed.js":43422,"./set":17444,"./set.js":17444,"./sort":53033,"./sort.js":53033,"./tail":50318,"./tail.js":50318,"./tempdir":16275,"./tempdir.js":16275,"./test":50021,"./test.js":50021,"./to":44915,"./to.js":44915,"./toEnd":13326,"./toEnd.js":13326,"./touch":57650,"./touch.js":57650,"./uniq":63019,"./uniq.js":63019,"./which":5483,"./which.js":5483};function s(e){var t=i(e);return r(t)}function i(e){if(!r.o(o,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return o[e]}s.keys=function(){return Object.keys(o)},s.resolve=i,e.exports=s,s.id=85858},1937:(e,t)=>{"use strict";var r,o,s;Object.defineProperty(t,"__esModule",{value:!0}),t.generatorNamespace=t.bundledRootGeneratorName=t.i18nKeySubTitle=t.i18nKeyTitle=t.ABAP_PACKAGE_SEARCH_MAX_RESULTS=t.API_BUSINESS_HUB_ENTERPRISE_PREFIX=t.MANAGED_XSUAA=t.UI5_URL=t.SRV_API_DEFAULT_URL=t.SRV_API=t.DEFAULT_MTA_DESTINATION=t.MTA_DESTINATION=t.XS_SECURITY=t.MTA_EXTENSION_FILE=t.MTA_YAML=t.PACKAGE_JSON=t.DEPLOY_MODE=t.UI5_YAML=t.UI5_DEPLOY=t.XS_APP=t.RIMRAF=t.RIMRAF_VERSION=t.MBT=t.MBT_VERSION=t.UI5_TASK_FLATTEN_LIB_VERSION=t.UI5_TASK_FLATTEN_LIB=t.ABAP_DEPLOY_TASK=t.WELCOME_FILE=t.DESTINATION_AUTHTYPE_NOAUTH=t.DESTINATION_AUTHTYPE_NOTFOUND=t.DESTINATION_CHOICE_DIRECT_SERVICE_BINDING=t.DESTINATION_CHOICE_NONE=t.RouterModuleType=t.HttpStatus=t.MTA_VERSION=t.MTA_DESCRIPTION=t.TargetName=t.CDS_ADD_MTA_COMMAND_ARGS=t.MTA_PKG=t.MTA_EXECUTABLE=t.CDS_PKG=t.CDS_EXECUTABLE=t.ROUTER_MODULE=t.CLOUD_FOUNDRY_FOLDER=t.FIORI_TOOLS_PROXY=t.DEPLOYER_MODULE_TYPE=t.ROUTER_MODULE_TYPE=void 0,t.ROUTER_MODULE_TYPE="approuter.nodejs",t.DEPLOYER_MODULE_TYPE="com.sap.html5.application-content",t.FIORI_TOOLS_PROXY="fiori-tools-proxy",t.CLOUD_FOUNDRY_FOLDER="cf",t.ROUTER_MODULE="router",t.CDS_EXECUTABLE="cds",t.CDS_PKG="@sap/cds-dk",t.MTA_EXECUTABLE="mta",t.MTA_PKG="mta",t.CDS_ADD_MTA_COMMAND_ARGS=["add","mta"],function(e){e.ABAP="abap",e.CF="cf"}(r||(t.TargetName=r={})),t.MTA_DESCRIPTION="Fiori elements app",t.MTA_VERSION="0.0.1",function(e){e[e.UNAUTHORIZED=401]="UNAUTHORIZED"}(o||(t.HttpStatus=o={})),function(e){e.Standard="Standard",e.Managed="Managed"}(s||(t.RouterModuleType=s={})),t.DESTINATION_CHOICE_NONE="NONE",t.DESTINATION_CHOICE_DIRECT_SERVICE_BINDING="DIRECT_SERVICE_BINDING",t.DESTINATION_AUTHTYPE_NOTFOUND="NotAvailable",t.DESTINATION_AUTHTYPE_NOAUTH="NoAuthentication",t.WELCOME_FILE="welcomeFile",t.ABAP_DEPLOY_TASK="deploy-to-abap",t.UI5_TASK_FLATTEN_LIB="ui5-task-flatten-library",t.UI5_TASK_FLATTEN_LIB_VERSION="0.2.5",t.MBT_VERSION="^1.2.18",t.MBT="mbt",t.RIMRAF_VERSION="^3.0.2",t.RIMRAF="rimraf",t.XS_APP="xs-app.json",t.UI5_DEPLOY="ui5-deploy.yaml",t.UI5_YAML="ui5.yaml",t.DEPLOY_MODE="deploy_mode",t.PACKAGE_JSON="package.json",t.MTA_YAML="mta.yaml",t.MTA_EXTENSION_FILE="mta-ext.mtaext",t.XS_SECURITY="xs-security.json",t.MTA_DESTINATION="%s-srv-api",t.DEFAULT_MTA_DESTINATION="fiori-default-srv-api",t.SRV_API="srv-api",t.SRV_API_DEFAULT_URL="${default-url}",t.UI5_URL="https://ui5.sap.com",t.MANAGED_XSUAA="managed:xsuaa",t.API_BUSINESS_HUB_ENTERPRISE_PREFIX="ABHE",t.ABAP_PACKAGE_SEARCH_MAX_RESULTS=50,t.i18nKeyTitle="flpTitle",t.i18nKeySubTitle="flpSubtitle",t.bundledRootGeneratorName="@sap/fiori:fiori-deployment";t.generatorNamespace=e=>`${t.bundledRootGeneratorName}_${e}`},73858:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transformExtConfig=void 0;const o=r(1628);t.transformExtConfig=function(e){let t,r;if(e.deployConfig?.deployTarget===o.DeployTarget.CF){const r=e.deployConfig;t={cfDestination:r.destinationName,destinationAuthType:r.destinationAuthType,addManagedApprouter:r.addToManagedAppRouter,launchDeployConfigAsSubGenerator:!0,projectPath:e.project.targetFolder,projectName:e.project.name,addMTADestination:r.addMTADestination,lcapModeOnly:r.lcapModeOnly,cloudServiceName:r.cloudServiceName}}if(e.flpConfig){const t=e.flpConfig;r={inboundConfig:{semanticObject:t.semanticObject||(0,o.getSemanticObject)(e.project.name).replace("#",""),action:t.action,title:t.title},skipPrompt:!0,launchFlpConfigAsSubGenerator:!0,projectPath:e.project.targetFolder,projectName:e.project.name}}return{cfOptions:t,flpOptions:r}}},43739:function(e,t,r){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(1628),i=o(r(98819)),n=r(73858),a=r(71017),p=r(57147),u=r(1937);class default_1 extends i.default{constructor(e,t){super(e,t),this.log((0,s.t)("INFO_GENERATOR_NAME_VERSION",{generatorName:this.rootGeneratorName(),generatorVersion:this.rootGeneratorVersion()}));try{if(this.argument("appConfig",{type:String,description:(0,s.t)("INFO_GENERATOR_ARG_APP_CONFIG"),required:!1}),!this.options.appConfig)throw Error((0,s.t)("ERROR_ARG_OR_OPTION_HEADLESS_GENERATOR"));let e;"object"==typeof this.options.appConfig?e=this.options.appConfig:(0,p.existsSync)(this.options.appConfig)?(e=JSON.parse((0,p.readFileSync)(this.options.appConfig,"utf-8")),this.absAppConfigPath=(0,a.resolve)(this.options.appConfig)):e=JSON.parse(this.options.appConfig);const{cfOptions:t,flpOptions:r}=(0,n.transformExtConfig)(e);this.deployConfigOpts=t,this.flpConfigOpts=r}catch(e){this.log((0,s.t)("ERROR_GENERATION_EXITING")),this.env.error(e)}}initializing(){this.deployConfigOpts&&this.composeWith((0,u.generatorNamespace)("cf"),{arguments:this.args,...Object.assign(this.options,this.deployConfigOpts)}),this.flpConfigOpts&&this.composeWith((0,u.generatorNamespace)("flp-config"),{arguments:this.args,...Object.assign(this.options,this.flpConfigOpts)})}end(){this.options.deleteFile&&(0,p.existsSync)(this.absAppConfigPath)&&(this.log((0,s.t)("INFO_DELETING_APPLICATION_CONFIG_FILE",{filepath:this.absAppConfigPath})),(0,p.unlinkSync)(this.absAppConfigPath))}}t.default=default_1},34409:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=34409,e.exports=t},70910:(e,t,r)=>{var o={"./Find-VisualStudio.cs":20183,"./build":17724,"./build.js":17724,"./clean":1658,"./clean.js":1658,"./configure":4748,"./configure.js":4748,"./create-config-gypi":98395,"./create-config-gypi.js":98395,"./find-node-directory":24159,"./find-node-directory.js":24159,"./find-python":29130,"./find-python.js":29130,"./find-visualstudio":17703,"./find-visualstudio.js":17703,"./install":25925,"./install.js":25925,"./list":44179,"./list.js":44179,"./node-gyp":55614,"./node-gyp.js":55614,"./process-release":75344,"./process-release.js":75344,"./rebuild":64187,"./rebuild.js":64187,"./remove":13103,"./remove.js":13103,"./util":55690,"./util.js":55690};function s(e){var t=i(e);return r(t)}function i(e){if(!r.o(o,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return o[e]}s.keys=function(){return Object.keys(o)},s.resolve=i,e.exports=s,s.id=70910},84679:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=84679,e.exports=t},12937:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=12937,e.exports=t},84397:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=84397,e.exports=t},54529:e=>{"use strict";e.exports=require("@opentelemetry/tracing")},85767:e=>{"use strict";e.exports=require("@sap/cds")},32220:e=>{"use strict";e.exports=require("applicationinsights-native-metrics")},43241:e=>{"use strict";e.exports=require("esprima")},74602:e=>{"use strict";e.exports=require("keytar")},66828:e=>{"use strict";e.exports=require("vscode")},39491:e=>{"use strict";e.exports=require("assert")},50852:e=>{"use strict";e.exports=require("async_hooks")},14300:e=>{"use strict";e.exports=require("buffer")},32081:e=>{"use strict";e.exports=require("child_process")},96206:e=>{"use strict";e.exports=require("console")},22057:e=>{"use strict";e.exports=require("constants")},6113:e=>{"use strict";e.exports=require("crypto")},9523:e=>{"use strict";e.exports=require("dns")},82361:e=>{"use strict";e.exports=require("events")},57147:e=>{"use strict";e.exports=require("fs")},73292:e=>{"use strict";e.exports=require("fs/promises")},13685:e=>{"use strict";e.exports=require("http")},95687:e=>{"use strict";e.exports=require("https")},98188:e=>{"use strict";e.exports=require("module")},41808:e=>{"use strict";e.exports=require("net")},22037:e=>{"use strict";e.exports=require("os")},71017:e=>{"use strict";e.exports=require("path")},77282:e=>{"use strict";e.exports=require("process")},85477:e=>{"use strict";e.exports=require("punycode")},63477:e=>{"use strict";e.exports=require("querystring")},14521:e=>{"use strict";e.exports=require("readline")},12781:e=>{"use strict";e.exports=require("stream")},71576:e=>{"use strict";e.exports=require("string_decoder")},39512:e=>{"use strict";e.exports=require("timers")},24404:e=>{"use strict";e.exports=require("tls")},76224:e=>{"use strict";e.exports=require("tty")},57310:e=>{"use strict";e.exports=require("url")},73837:e=>{"use strict";e.exports=require("util")},26144:e=>{"use strict";e.exports=require("vm")},59796:e=>{"use strict";e.exports=require("zlib")}},o={};function s(e){var t=o[e];if(void 0!==t)return t.exports;var i=o[e]={id:e,loaded:!1,exports:{}};return r[e].call(i.exports,i,i.exports,s),i.loaded=!0,i.exports}s.m=r,s.c=o,s.x=()=>{var e=s.O(void 0,[712,784,475,763],(()=>s(s.s=43739)));return e=s.O(e)},e=[],s.O=(t,r,o,i)=>{if(!r){var n=1/0;for(c=0;c<e.length;c++){for(var[r,o,i]=e[c],a=!0,p=0;p<r.length;p++)(!1&i||n>=i)&&Object.keys(s.O).every((e=>s.O[e](r[p])))?r.splice(p--,1):(a=!1,i<n&&(n=i));if(a){e.splice(c--,1);var u=o();void 0!==u&&(t=u)}}return t}i=i||0;for(var c=e.length;c>0&&e[c-1][2]>i;c--)e[c]=e[c-1];e[c]=[r,o,i]},s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce(((t,r)=>(s.f[r](e,t),t)),[])),s.u=e=>({475:"tools-suite-common-libs",712:"commonlibs",763:"app-gen-shared",784:"open-ux-shared"}[e]+"/index.js"),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),s.j=176,s.p="",(()=>{var e={176:1,190:1,154:1};s.O.require=t=>e[t];s.f.require=(t,r)=>{e[t]||(t=>{var r=t.modules,o=t.ids,i=t.runtime;for(var n in r)s.o(r,n)&&(s.m[n]=r[n]);i&&i(s);for(var a=0;a<o.length;a++)e[o[a]]=1;s.O()})(require("../"+s.u(t)))}})(),t=s.x,s.x=()=>(s.e(712),s.e(784),s.e(475),s.e(763),t());var i=s.x();module.exports=i})(); | ||
(()=>{var e,t,r={51617:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=51617,e.exports=t},39973:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=39973,e.exports=t},20230:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=20230,e.exports=t},20545:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=20545,e.exports=t},4297:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=4297,e.exports=t},75601:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=75601,e.exports=t},82626:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=82626,e.exports=t},37974:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=37974,e.exports=t},85858:(e,t,r)=>{var o={"./cat":43112,"./cat.js":43112,"./cd":86698,"./cd.js":86698,"./chmod":23986,"./chmod.js":23986,"./common":96816,"./common.js":96816,"./cp":80610,"./cp.js":80610,"./dirs":91972,"./dirs.js":91972,"./echo":16166,"./echo.js":16166,"./error":80609,"./error.js":80609,"./exec":52024,"./exec-child":69911,"./exec-child.js":69911,"./exec.js":52024,"./find":22261,"./find.js":22261,"./grep":56818,"./grep.js":56818,"./head":66412,"./head.js":66412,"./ln":91247,"./ln.js":91247,"./ls":5815,"./ls.js":5815,"./mkdir":70098,"./mkdir.js":70098,"./mv":74164,"./mv.js":74164,"./popd":99851,"./popd.js":99851,"./pushd":6978,"./pushd.js":6978,"./pwd":24044,"./pwd.js":24044,"./rm":44256,"./rm.js":44256,"./sed":43422,"./sed.js":43422,"./set":17444,"./set.js":17444,"./sort":53033,"./sort.js":53033,"./tail":50318,"./tail.js":50318,"./tempdir":16275,"./tempdir.js":16275,"./test":50021,"./test.js":50021,"./to":44915,"./to.js":44915,"./toEnd":13326,"./toEnd.js":13326,"./touch":57650,"./touch.js":57650,"./uniq":63019,"./uniq.js":63019,"./which":5483,"./which.js":5483};function s(e){var t=i(e);return r(t)}function i(e){if(!r.o(o,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return o[e]}s.keys=function(){return Object.keys(o)},s.resolve=i,e.exports=s,s.id=85858},1937:(e,t)=>{"use strict";var r,o,s;Object.defineProperty(t,"__esModule",{value:!0}),t.generatorNamespace=t.bundledRootGeneratorName=t.i18nKeySubTitle=t.i18nKeyTitle=t.ABAP_PACKAGE_SEARCH_MAX_RESULTS=t.API_BUSINESS_HUB_ENTERPRISE_PREFIX=t.MANAGED_XSUAA=t.UI5_URL=t.SRV_API_DEFAULT_URL=t.SRV_API=t.DEFAULT_MTA_DESTINATION=t.MTA_DESTINATION=t.XS_SECURITY=t.MTA_EXTENSION_FILE=t.MTA_YAML=t.PACKAGE_JSON=t.DEPLOY_MODE=t.UI5_YAML=t.UI5_DEPLOY=t.XS_APP=t.RIMRAF=t.RIMRAF_VERSION=t.MBT=t.MBT_VERSION=t.UI5_TASK_FLATTEN_LIB_VERSION=t.UI5_TASK_FLATTEN_LIB=t.ABAP_DEPLOY_TASK=t.WELCOME_FILE=t.DESTINATION_AUTHTYPE_NOAUTH=t.DESTINATION_AUTHTYPE_NOTFOUND=t.DESTINATION_CHOICE_DIRECT_SERVICE_BINDING=t.DESTINATION_CHOICE_NONE=t.RouterModuleType=t.HttpStatus=t.MTA_VERSION=t.MTA_DESCRIPTION=t.TargetName=t.CDS_ADD_MTA_COMMAND_ARGS=t.MTA_PKG=t.MTA_EXECUTABLE=t.CDS_PKG=t.CDS_EXECUTABLE=t.ROUTER_MODULE=t.CLOUD_FOUNDRY_FOLDER=t.FIORI_TOOLS_PROXY=t.DEPLOYER_MODULE_TYPE=t.ROUTER_MODULE_TYPE=void 0,t.ROUTER_MODULE_TYPE="approuter.nodejs",t.DEPLOYER_MODULE_TYPE="com.sap.html5.application-content",t.FIORI_TOOLS_PROXY="fiori-tools-proxy",t.CLOUD_FOUNDRY_FOLDER="cf",t.ROUTER_MODULE="router",t.CDS_EXECUTABLE="cds",t.CDS_PKG="@sap/cds-dk",t.MTA_EXECUTABLE="mta",t.MTA_PKG="mta",t.CDS_ADD_MTA_COMMAND_ARGS=["add","mta"],function(e){e.ABAP="abap",e.CF="cf"}(r||(t.TargetName=r={})),t.MTA_DESCRIPTION="Fiori elements app",t.MTA_VERSION="0.0.1",function(e){e[e.UNAUTHORIZED=401]="UNAUTHORIZED"}(o||(t.HttpStatus=o={})),function(e){e.Standard="Standard",e.Managed="Managed"}(s||(t.RouterModuleType=s={})),t.DESTINATION_CHOICE_NONE="NONE",t.DESTINATION_CHOICE_DIRECT_SERVICE_BINDING="DIRECT_SERVICE_BINDING",t.DESTINATION_AUTHTYPE_NOTFOUND="NotAvailable",t.DESTINATION_AUTHTYPE_NOAUTH="NoAuthentication",t.WELCOME_FILE="welcomeFile",t.ABAP_DEPLOY_TASK="deploy-to-abap",t.UI5_TASK_FLATTEN_LIB="ui5-task-flatten-library",t.UI5_TASK_FLATTEN_LIB_VERSION="0.2.5",t.MBT_VERSION="^1.2.18",t.MBT="mbt",t.RIMRAF_VERSION="^3.0.2",t.RIMRAF="rimraf",t.XS_APP="xs-app.json",t.UI5_DEPLOY="ui5-deploy.yaml",t.UI5_YAML="ui5.yaml",t.DEPLOY_MODE="deploy_mode",t.PACKAGE_JSON="package.json",t.MTA_YAML="mta.yaml",t.MTA_EXTENSION_FILE="mta-ext.mtaext",t.XS_SECURITY="xs-security.json",t.MTA_DESTINATION="%s-srv-api",t.DEFAULT_MTA_DESTINATION="fiori-default-srv-api",t.SRV_API="srv-api",t.SRV_API_DEFAULT_URL="${default-url}",t.UI5_URL="https://ui5.sap.com",t.MANAGED_XSUAA="managed:xsuaa",t.API_BUSINESS_HUB_ENTERPRISE_PREFIX="ABHE",t.ABAP_PACKAGE_SEARCH_MAX_RESULTS=50,t.i18nKeyTitle="flpTitle",t.i18nKeySubTitle="flpSubtitle",t.bundledRootGeneratorName="@sap/fiori:fiori-deployment";t.generatorNamespace=e=>`${t.bundledRootGeneratorName}_${e}`},73858:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transformExtConfig=void 0;const o=r(1628);t.transformExtConfig=function(e){let t,r;if(e.deployConfig?.deployTarget===o.DeployTarget.CF){const r=e.deployConfig;t={cfDestination:r.destinationName,destinationAuthType:r.destinationAuthType,addManagedApprouter:r.addToManagedAppRouter,launchDeployConfigAsSubGenerator:!0,projectPath:e.project.targetFolder,projectName:e.project.name,addMTADestination:r.addMTADestination,lcapModeOnly:r.lcapModeOnly,cloudServiceName:r.cloudServiceName}}if(e.flpConfig){const t=e.flpConfig;r={inboundConfig:{semanticObject:t.semanticObject||(0,o.getSemanticObject)(e.project.name).replace("#",""),action:t.action,title:t.title},skipPrompt:!0,launchFlpConfigAsSubGenerator:!0,projectPath:e.project.targetFolder,projectName:e.project.name}}return{cfOptions:t,flpOptions:r}}},43739:function(e,t,r){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(1628),i=o(r(98819)),n=r(73858),a=r(71017),p=r(57147),u=r(1937);class default_1 extends i.default{constructor(e,t){super(e,t),this.log((0,s.t)("INFO_GENERATOR_NAME_VERSION",{generatorName:this.rootGeneratorName(),generatorVersion:this.rootGeneratorVersion()}));try{if(this.argument("appConfig",{type:String,description:(0,s.t)("INFO_GENERATOR_ARG_APP_CONFIG"),required:!1}),!this.options.appConfig)throw Error((0,s.t)("ERROR_ARG_OR_OPTION_HEADLESS_GENERATOR"));let e;"object"==typeof this.options.appConfig?e=this.options.appConfig:(0,p.existsSync)(this.options.appConfig)?(e=JSON.parse((0,p.readFileSync)(this.options.appConfig,"utf-8")),this.absAppConfigPath=(0,a.resolve)(this.options.appConfig)):e=JSON.parse(this.options.appConfig);const{cfOptions:t,flpOptions:r}=(0,n.transformExtConfig)(e);this.deployConfigOpts=t,this.flpConfigOpts=r}catch(e){this.log((0,s.t)("ERROR_GENERATION_EXITING")),this.env.error(e)}}async initializing(){const e={AppGenLaunchSource:this.options.appConfig.telemetryData?.generationSourceName??s.LaunchSource.Headless,AppGenLaunchSourceVersion:this.options.appConfig.telemetryData?.generationSourceVersion??"Not Provided"};this.deployConfigOpts&&this.composeWith((0,u.generatorNamespace)("cf"),{arguments:this.args,...Object.assign(this.options,this.deployConfigOpts,{additionalTelemetryData:e})}),this.flpConfigOpts&&this.composeWith((0,u.generatorNamespace)("flp-config"),{arguments:this.args,...Object.assign(this.options,this.flpConfigOpts,{additionalTelemetryData:e})})}end(){this.options.deleteFile&&(0,p.existsSync)(this.absAppConfigPath)&&(this.log((0,s.t)("INFO_DELETING_APPLICATION_CONFIG_FILE",{filepath:this.absAppConfigPath})),(0,p.unlinkSync)(this.absAppConfigPath))}}t.default=default_1},34409:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=34409,e.exports=t},70910:(e,t,r)=>{var o={"./Find-VisualStudio.cs":20183,"./build":17724,"./build.js":17724,"./clean":1658,"./clean.js":1658,"./configure":4748,"./configure.js":4748,"./create-config-gypi":98395,"./create-config-gypi.js":98395,"./find-node-directory":24159,"./find-node-directory.js":24159,"./find-python":29130,"./find-python.js":29130,"./find-visualstudio":17703,"./find-visualstudio.js":17703,"./install":25925,"./install.js":25925,"./list":44179,"./list.js":44179,"./node-gyp":55614,"./node-gyp.js":55614,"./process-release":75344,"./process-release.js":75344,"./rebuild":64187,"./rebuild.js":64187,"./remove":13103,"./remove.js":13103,"./util":55690,"./util.js":55690};function s(e){var t=i(e);return r(t)}function i(e){if(!r.o(o,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return o[e]}s.keys=function(){return Object.keys(o)},s.resolve=i,e.exports=s,s.id=70910},84679:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=84679,e.exports=t},12937:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=12937,e.exports=t},84397:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=84397,e.exports=t},54529:e=>{"use strict";e.exports=require("@opentelemetry/tracing")},85767:e=>{"use strict";e.exports=require("@sap/cds")},32220:e=>{"use strict";e.exports=require("applicationinsights-native-metrics")},43241:e=>{"use strict";e.exports=require("esprima")},74602:e=>{"use strict";e.exports=require("keytar")},66828:e=>{"use strict";e.exports=require("vscode")},39491:e=>{"use strict";e.exports=require("assert")},50852:e=>{"use strict";e.exports=require("async_hooks")},14300:e=>{"use strict";e.exports=require("buffer")},32081:e=>{"use strict";e.exports=require("child_process")},96206:e=>{"use strict";e.exports=require("console")},22057:e=>{"use strict";e.exports=require("constants")},6113:e=>{"use strict";e.exports=require("crypto")},9523:e=>{"use strict";e.exports=require("dns")},82361:e=>{"use strict";e.exports=require("events")},57147:e=>{"use strict";e.exports=require("fs")},73292:e=>{"use strict";e.exports=require("fs/promises")},13685:e=>{"use strict";e.exports=require("http")},95687:e=>{"use strict";e.exports=require("https")},98188:e=>{"use strict";e.exports=require("module")},41808:e=>{"use strict";e.exports=require("net")},22037:e=>{"use strict";e.exports=require("os")},71017:e=>{"use strict";e.exports=require("path")},77282:e=>{"use strict";e.exports=require("process")},85477:e=>{"use strict";e.exports=require("punycode")},63477:e=>{"use strict";e.exports=require("querystring")},14521:e=>{"use strict";e.exports=require("readline")},12781:e=>{"use strict";e.exports=require("stream")},71576:e=>{"use strict";e.exports=require("string_decoder")},39512:e=>{"use strict";e.exports=require("timers")},24404:e=>{"use strict";e.exports=require("tls")},76224:e=>{"use strict";e.exports=require("tty")},57310:e=>{"use strict";e.exports=require("url")},73837:e=>{"use strict";e.exports=require("util")},26144:e=>{"use strict";e.exports=require("vm")},59796:e=>{"use strict";e.exports=require("zlib")}},o={};function s(e){var t=o[e];if(void 0!==t)return t.exports;var i=o[e]={id:e,loaded:!1,exports:{}};return r[e].call(i.exports,i,i.exports,s),i.loaded=!0,i.exports}s.m=r,s.c=o,s.x=()=>{var e=s.O(void 0,[712,784,475,763],(()=>s(s.s=43739)));return e=s.O(e)},e=[],s.O=(t,r,o,i)=>{if(!r){var n=1/0;for(c=0;c<e.length;c++){for(var[r,o,i]=e[c],a=!0,p=0;p<r.length;p++)(!1&i||n>=i)&&Object.keys(s.O).every((e=>s.O[e](r[p])))?r.splice(p--,1):(a=!1,i<n&&(n=i));if(a){e.splice(c--,1);var u=o();void 0!==u&&(t=u)}}return t}i=i||0;for(var c=e.length;c>0&&e[c-1][2]>i;c--)e[c]=e[c-1];e[c]=[r,o,i]},s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce(((t,r)=>(s.f[r](e,t),t)),[])),s.u=e=>({475:"tools-suite-common-libs",712:"commonlibs",763:"app-gen-shared",784:"open-ux-shared"}[e]+"/index.js"),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),s.j=176,s.p="",(()=>{var e={176:1,190:1,154:1};s.O.require=t=>e[t];s.f.require=(t,r)=>{e[t]||(t=>{var r=t.modules,o=t.ids,i=t.runtime;for(var n in r)s.o(r,n)&&(s.m[n]=r[n]);i&&i(s);for(var a=0;a<o.length;a++)e[o[a]]=1;s.O()})(require("../"+s.u(t)))}})(),t=s.x,s.x=()=>(s.e(712),s.e(784),s.e(475),s.e(763),t());var i=s.x();module.exports=i})(); |
@@ -1,1 +0,1 @@ | ||
(()=>{var e,t,n={51617:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=51617,e.exports=t},39973:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=39973,e.exports=t},20230:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=20230,e.exports=t},20545:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=20545,e.exports=t},4297:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=4297,e.exports=t},75601:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=75601,e.exports=t},82626:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=82626,e.exports=t},37974:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=37974,e.exports=t},85858:(e,t,n)=>{var r={"./cat":43112,"./cat.js":43112,"./cd":86698,"./cd.js":86698,"./chmod":23986,"./chmod.js":23986,"./common":96816,"./common.js":96816,"./cp":80610,"./cp.js":80610,"./dirs":91972,"./dirs.js":91972,"./echo":16166,"./echo.js":16166,"./error":80609,"./error.js":80609,"./exec":52024,"./exec-child":69911,"./exec-child.js":69911,"./exec.js":52024,"./find":22261,"./find.js":22261,"./grep":56818,"./grep.js":56818,"./head":66412,"./head.js":66412,"./ln":91247,"./ln.js":91247,"./ls":5815,"./ls.js":5815,"./mkdir":70098,"./mkdir.js":70098,"./mv":74164,"./mv.js":74164,"./popd":99851,"./popd.js":99851,"./pushd":6978,"./pushd.js":6978,"./pwd":24044,"./pwd.js":24044,"./rm":44256,"./rm.js":44256,"./sed":43422,"./sed.js":43422,"./set":17444,"./set.js":17444,"./sort":53033,"./sort.js":53033,"./tail":50318,"./tail.js":50318,"./tempdir":16275,"./tempdir.js":16275,"./test":50021,"./test.js":50021,"./to":44915,"./to.js":44915,"./toEnd":13326,"./toEnd.js":13326,"./touch":57650,"./touch.js":57650,"./uniq":63019,"./uniq.js":63019,"./which":5483,"./which.js":5483};function i(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}i.keys=function(){return Object.keys(r)},i.resolve=o,e.exports=i,i.id=85858},55079:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deleteCachedServiceProvider=t.getOrCreateServiceProvider=void 0;const r=n(62637),i=n(14425);let o,s;t.getOrCreateServiceProvider=async function(e,t){return o&&s?.isSameSystem&&s?.isSameSystem(e.url,e.client)||(o=e?.getConnection()&&e?.getConnection()?.cookies?await async function(e){if((0,i.isAppStudio)()){const t=await(0,i.listDestinations)(),n=e.config.destination;o=(0,r.createForDestination)({cookies:e.getConnection().cookies.toString()},t[n])}else o=e?.isScp()?(0,r.createForAbapOnCloud)({environment:r.AbapCloudEnvironment.Standalone,service:{url:e.url},ignoreCertErrors:!1,cookies:e.getConnection().cookies.toString()}):(0,r.createForAbap)({baseURL:e?.url,ignoreCertErrors:!1,cookies:e?.getConnection().cookies.toString()});return o}(e):await async function(e,t){if((0,i.isAppStudio)()){const n=await(0,i.listDestinations)(),s=e.config.destination,a=t.username?{auth:{username:t.username,password:t.password}}:{};o=(0,r.createForDestination)({...a},n[s])}else o=e?.isScp()?(0,r.createForAbapOnCloud)({refreshToken:e.credentials?.refreshToken,environment:r.AbapCloudEnvironment.Standalone,service:e.credentials?.serviceKeysContents}):(0,r.createForAbap)({baseURL:e?.url,ignoreCertErrors:!1,auth:{username:t.username??e?.username,password:t.password??e?.password}});return o}(e,t),s=e),o},t.deleteCachedServiceProvider=function(){o=void 0}},62283:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createTransportNumberFromService=void 0;const r=n(55079),i=n(62637);t.createTransportNumberFromService=async function(e,{credentials:t,system:n}){try{const o=await(0,r.getOrCreateServiceProvider)(n,t),s=await o.getAdtService(i.TransportRequestService);return await s.createTransportRequest(e)}catch(e){return null}}},98308:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(55079),t),i(n(24105),t),i(n(81547),t)},56821:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.listPackagesFromService=void 0;const r=n(55079),i=n(62637),o=n(1937);t.listPackagesFromService=async function(e,{credentials:t,system:n}){try{const s=await(0,r.getOrCreateServiceProvider)(n,t),a=await s.getAdtService(i.ListPackageService);return await a.listPackages({maxResults:o.ABAP_PACKAGE_SEARCH_MAX_RESULTS,phrase:e})}catch(e){return[]}}},24105:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTransportConfigInstance=void 0;const r=n(1937),i=n(31881),o=n(55079),s=n(73056),a=n(62637);class DummyTransportConfig{getPackage(){}getApplicationPrefix(){}isTransportRequired(){return!1}getDefaultTransport(){}getOperationsType(){}}class DefaultTransportConfig{constructor(){this.atoSettings={},this.defaultTransport=void 0}getDefaultTransport(){return this.defaultTransport}getPackage(){return this.atoSettings.devPackage}getApplicationPrefix(){return this.atoSettings.devPrefix}isTransportRequired(){return!!this.atoSettings.isTransportRequestRequired}getOperationsType(){return this.atoSettings?.operationsType}async init({credentials:e,system:t}){const n={};try{const r=await(0,o.getOrCreateServiceProvider)(t,e),i=await r.getAdtService(a.AtoService),s=await i.getAtoInfo();n.error=this.handleAtoResponse(s)}catch(e){if((0,o.deleteCachedServiceProvider)(),e.response?.status===r.HttpStatus.UNAUTHORIZED){e.response.headers["www-authenticate"]?.toLowerCase()?.startsWith("basic")&&(n.transportConfigNeedsCreds=!0)}else n.warning=e?.toString(),n.transportConfigNeedsCreds=!1}const i=!n.error&&!n.transportConfigNeedsCreds;return n.transportConfig=i?this:this.getDummyConfig(),n}handleAtoResponse(e){let t=!1;if(this.atoSettings=(0,s.uniformAtoFormat)(e),this.atoSettings.isConfigured&&"CUSTOMER"===this.atoSettings.tenantType&&"C"===this.atoSettings.operationsType){if(!this.atoSettings.isExtensibilityDevSystem)return(0,i.t)("ERROR_S4_SYSTEM_NOT_EXTENSIBLE");if(!this.atoSettings.devPrefix)return(0,i.t)("ERROR_INCORRECT_ATO_SETTINGS");t=!0,this.applyS4CDefaults()}t||(this.atoSettings={operationsType:this.atoSettings.operationsType})}applyS4CDefaults(){this.defaultTransport=DefaultTransportConfig.S4C_DEFAULT_TRANSPORT,this.atoSettings.isTransportRequestRequired=!1,this.atoSettings.devPackage=DefaultTransportConfig.S4C_DEFAULT_PACKAGE}getDummyConfig(){const e=new DummyTransportConfig;return e.getOperationsType=this.getOperationsType,e}}DefaultTransportConfig.S4C_DEFAULT_TRANSPORT="",DefaultTransportConfig.S4C_DEFAULT_PACKAGE="TEST_YY1_DEFAULT",t.getTransportConfigInstance=async function({scp:e,credentials:t={},system:n}){return e?{transportConfig:new DummyTransportConfig}:(new DefaultTransportConfig).init({credentials:t,system:n})}},81547:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transportName=t.getTransportListFromService=void 0;const r=n(55079),i=n(62637);t.getTransportListFromService=async function(e,t,{credentials:n,system:o}){try{const s=await(0,r.getOrCreateServiceProvider)(o,n),a=await s.getAdtService(i.TransportChecksService);return(await a.getTransportRequests(e,t)).map((e=>{const t=e.description.replace(/^(.{20}[^\s]*).*/,"$1...");return{transportReqNumber:e.transportNumber,transportReqDescription:t}}))}catch(e){return[]}};t.transportName=e=>({name:e.transportReqDescription?`${e.transportReqNumber} (${e.transportReqDescription})`:`${e.transportReqNumber}`,value:e.transportReqNumber})},73056:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useCreateTrDuringDeploy=t.CREATE_TR_DURING_DEPLOY=t.getTargetSystemChoices=t.isLocalPackage=t.uniformAtoFormat=t.isScp=t.handleProjectDoesNotExist=t.abapDeployConfigExists=t.indexHtmlExists=t.readExistingDeployTaskConfig=t.initBaseConfig=t.getSuggestedClient=t.getUrlAnswer=void 0;const r=n(1937),i=n(31881),o=n(68802),s=n(43895),a=n(28033),_=n(71017);t.getUrlAnswer=function(e,t){if(e.isAppStudio&&t?.destination===e?.backendConfig?.destination)return e.answers.url;{let e=t.targetSystem;return t.targetSystem&&"NoUrlSelected"!==t.targetSystem||!t.url||(e=t.url),e}},t.getSuggestedClient=function(e){let t;const n=e.scripts?.start;return n&&n.includes("sap-client")&&(t=n.split("sap-client")[1].match(/\d{1,3}/g).map(String)[0]),t},t.initBaseConfig=function(e,t){t.baseConfig=(0,o.readYaml)(e);const n=t.baseConfig.toJSON();t.baseMetadataName=n.metadata?.name,t.backendConfig=n?.server?.customMiddleware?.find((e=>e?.name===r.FIORI_TOOLS_PROXY))?.configuration?.backend?.[0]},t.readExistingDeployTaskConfig=function(e){if(e)try{const t=(0,o.readYaml)(e)?.toJSON();return t?.builder?.customTasks?.find((e=>e.name===r.ABAP_DEPLOY_TASK))?.configuration}catch(e){return}},t.indexHtmlExists=async function(e,t){const n=await(0,a.getUi5CustomWebappPath)(t),r=(0,_.join)(t,n,"index.html");return e.exists(r)},t.abapDeployConfigExists=function(e,t){return e.exists(t)},t.handleProjectDoesNotExist=function(e){const t=i.ErrorMessages.fileDoesNotExist(e.destinationPath(e.options.base));throw e.abort=!0,(0,i.handleErrorMessage)(e,e.appWizard,t),i.ErrorMessages.ABORT_SIGNAL},t.isScp=function(e,t){for(const n in t){const r=t[n];if(r.value===e)return r.scp}return!1},t.uniformAtoFormat=function(e){return Object.keys(e).includes("developmentPackage")&&(e.devPackage=e.developmentPackage),Object.keys(e).includes("developmentPrefix")&&(e.devPrefix=e.developmentPrefix),Object.keys(e).includes("isExtensibilityDevelopmentSystem")&&(e.isExtensibilityDevSystem=e.isExtensibilityDevelopmentSystem),e},t.isLocalPackage=function(e){return/^[$LlTt]/.test(e)},t.getTargetSystemChoices=async function(e,t){const n=[];if(!(0,s.isAppStudio)()){let r=!0;n.push({name:(0,i.t)("PROMPT_ABAP_ENTER_TARGET"),value:"NoUrlSelected"}),t?.unSaved&&(n.push({name:`${t.getDisplayName()} (Source system)`,value:t.url,client:t.client,isDefault:!0,scp:t.isScp()}),r=!1);const o=await(0,i.getSapSystems)();Object.values(o).forEach((t=>{let i=!1;r&&(i=t.url===e?.url&&(t.client||"")===(e?.client||"")),n.push({name:i?`${t.getDisplayName()} (Source system)`:t.getDisplayName(),value:t.url,client:t.client,isDefault:i,scp:t.isScp()})}))}return n},t.CREATE_TR_DURING_DEPLOY="REPLACE_WITH_TRANSPORT",t.useCreateTrDuringDeploy=function(e){return e.existingDeployTaskConfig?.app?.transport===t.CREATE_TR_DURING_DEPLOY}},82546:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getS4Prompts=void 0;const r=n(28212);t.getS4Prompts=function(e){return[{type:"confirm",name:"s4Continue",message:(0,r.t)("PROMPT_LABEL_S4_CONTINUE",{configType:e}),default:!1}]}},1937:(e,t)=>{"use strict";var n,r,i;Object.defineProperty(t,"__esModule",{value:!0}),t.generatorNamespace=t.bundledRootGeneratorName=t.i18nKeySubTitle=t.i18nKeyTitle=t.ABAP_PACKAGE_SEARCH_MAX_RESULTS=t.API_BUSINESS_HUB_ENTERPRISE_PREFIX=t.MANAGED_XSUAA=t.UI5_URL=t.SRV_API_DEFAULT_URL=t.SRV_API=t.DEFAULT_MTA_DESTINATION=t.MTA_DESTINATION=t.XS_SECURITY=t.MTA_EXTENSION_FILE=t.MTA_YAML=t.PACKAGE_JSON=t.DEPLOY_MODE=t.UI5_YAML=t.UI5_DEPLOY=t.XS_APP=t.RIMRAF=t.RIMRAF_VERSION=t.MBT=t.MBT_VERSION=t.UI5_TASK_FLATTEN_LIB_VERSION=t.UI5_TASK_FLATTEN_LIB=t.ABAP_DEPLOY_TASK=t.WELCOME_FILE=t.DESTINATION_AUTHTYPE_NOAUTH=t.DESTINATION_AUTHTYPE_NOTFOUND=t.DESTINATION_CHOICE_DIRECT_SERVICE_BINDING=t.DESTINATION_CHOICE_NONE=t.RouterModuleType=t.HttpStatus=t.MTA_VERSION=t.MTA_DESCRIPTION=t.TargetName=t.CDS_ADD_MTA_COMMAND_ARGS=t.MTA_PKG=t.MTA_EXECUTABLE=t.CDS_PKG=t.CDS_EXECUTABLE=t.ROUTER_MODULE=t.CLOUD_FOUNDRY_FOLDER=t.FIORI_TOOLS_PROXY=t.DEPLOYER_MODULE_TYPE=t.ROUTER_MODULE_TYPE=void 0,t.ROUTER_MODULE_TYPE="approuter.nodejs",t.DEPLOYER_MODULE_TYPE="com.sap.html5.application-content",t.FIORI_TOOLS_PROXY="fiori-tools-proxy",t.CLOUD_FOUNDRY_FOLDER="cf",t.ROUTER_MODULE="router",t.CDS_EXECUTABLE="cds",t.CDS_PKG="@sap/cds-dk",t.MTA_EXECUTABLE="mta",t.MTA_PKG="mta",t.CDS_ADD_MTA_COMMAND_ARGS=["add","mta"],function(e){e.ABAP="abap",e.CF="cf"}(n||(t.TargetName=n={})),t.MTA_DESCRIPTION="Fiori elements app",t.MTA_VERSION="0.0.1",function(e){e[e.UNAUTHORIZED=401]="UNAUTHORIZED"}(r||(t.HttpStatus=r={})),function(e){e.Standard="Standard",e.Managed="Managed"}(i||(t.RouterModuleType=i={})),t.DESTINATION_CHOICE_NONE="NONE",t.DESTINATION_CHOICE_DIRECT_SERVICE_BINDING="DIRECT_SERVICE_BINDING",t.DESTINATION_AUTHTYPE_NOTFOUND="NotAvailable",t.DESTINATION_AUTHTYPE_NOAUTH="NoAuthentication",t.WELCOME_FILE="welcomeFile",t.ABAP_DEPLOY_TASK="deploy-to-abap",t.UI5_TASK_FLATTEN_LIB="ui5-task-flatten-library",t.UI5_TASK_FLATTEN_LIB_VERSION="0.2.5",t.MBT_VERSION="^1.2.18",t.MBT="mbt",t.RIMRAF_VERSION="^3.0.2",t.RIMRAF="rimraf",t.XS_APP="xs-app.json",t.UI5_DEPLOY="ui5-deploy.yaml",t.UI5_YAML="ui5.yaml",t.DEPLOY_MODE="deploy_mode",t.PACKAGE_JSON="package.json",t.MTA_YAML="mta.yaml",t.MTA_EXTENSION_FILE="mta-ext.mtaext",t.XS_SECURITY="xs-security.json",t.MTA_DESTINATION="%s-srv-api",t.DEFAULT_MTA_DESTINATION="fiori-default-srv-api",t.SRV_API="srv-api",t.SRV_API_DEFAULT_URL="${default-url}",t.UI5_URL="https://ui5.sap.com",t.MANAGED_XSUAA="managed:xsuaa",t.API_BUSINESS_HUB_ENTERPRISE_PREFIX="ABHE",t.ABAP_PACKAGE_SEARCH_MAX_RESULTS=50,t.i18nKeyTitle="flpTitle",t.i18nKeySubTitle="flpSubtitle",t.bundledRootGeneratorName="@sap/fiori:fiori-deployment";t.generatorNamespace=e=>`${t.bundledRootGeneratorName}_${e}`},26649:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=s(n(98819)),_=n(31881),c=n(25184),u=o(n(71017)),d=n(1628),l=n(82546),p=n(6903),E=n(72089),T=n(9949),P=n(28033),A=n(37705),O=n(1937);class default_1 extends a.default{constructor(e,t){t.force=!0,super(e,t,{unique:"namespace"}),this.exit=!1,this.appWizard=t.appWizard||c.AppWizard.create(t),t.data?.appRootPath?this.appRootPath=t.data.appRootPath:t.projectPath&&t.projectName?this.appRootPath=u.default.join(t.projectPath,t.projectName):this.appRootPath=this.destinationRoot(),t.launchFlpConfigAsSubGenerator||(this.prompts=new c.Prompts([{name:(0,d.t)("FLP_CONFIG"),description:(0,d.t)("DESCRIPTION_FLP_CONFIG_GENERATOR",{appFolderName:` - ${u.default.basename(this.appRootPath)}`})}]),this.setPromptsCallback=e=>{this.prompts&&this.prompts.setCallback(e)},this.existingApp=!0,(0,A.enableFeature)(d.Features.enableAnswerBreadcrumbs))}async initializing(){this.existingApp&&(this.manifestPath=(0,u.join)(await(0,T.getWebappPath)(this.appRootPath),T.FileName.Manifest),this.manifest=this.fs.readJSON(this.manifestPath),this.manifest||(0,_.handleErrorMessage)(this,this.appWizard,(0,_.t)("ERROR_NO_MANIFEST_AT_PATH",{path:this.manifestPath})),this.manifest["sap.app"]||(0,_.handleErrorMessage)(this,this.appWizard,(0,_.t)("ERROR_SAP_APP_NOT_DEFINED")))}async prompting(){if(this.options.launchFlpConfigAsSubGenerator&&void 0!==this.options.inboundConfig?.semanticObject&&void 0!==this.options.inboundConfig?.action&&void 0!==this.options.inboundConfig?.title&&this.options.skipPrompt)return void(this.answers={overwrite:!0,semanticObject:this.options.inboundConfig.semanticObject,action:this.options.inboundConfig.action,title:this.options.inboundConfig.title,subTitle:this.options.inboundConfig.subTitle});let e;this.manifest?.["sap.app"]?.crossNavigation?.inbounds&&(e=Object.keys(this.manifest["sap.app"].crossNavigation.inbounds));const t=this.options.overwrite;let n=(0,p.getQuestions)(e,t);if(((0,d.getPlatform)()===d.PLATFORMS.CLI||!this.options.launchFlpConfigAsSubGenerator)&&await(0,_.isS4Installed)(this.options.vscode?.workspace?.getConfiguration())){const e=(0,l.getS4Prompts)("FLP");n=(0,d.withCondition)(n,(e=>e.s4Continue)),n.unshift(...e)}this.answers={};const r=await this.prompt(n);(!1===r.s4Continue||!1===r.overwrite&&!t)&&(this.exit=!0,process.exit(0)),""===r.subTitle&&(r.subTitle=void 0),Object.assign(this.answers,r)}async writing(){!1===this.exit&&this.existingApp&&await this._updateFiles(this.answers)}async end(){!1!==this.exit||this.existingApp||(this.manifestPath=(0,u.join)(await(0,T.getWebappPath)(this.appRootPath),T.FileName.Manifest),this.manifest=this.fs.readJSON(this.manifestPath),await this._updateFiles(this.answers))}async _updateFiles({semanticObject:e,action:t,title:n,subTitle:r}){const i=await this._updateI18n(u.default.dirname(this.manifestPath),this.manifest,{title:n,subTitle:r});await(0,E.generateInboundNavigationConfig)(this.appRootPath,{semanticObject:e,action:t,title:i?`{{${O.i18nKeyTitle}}}`:n,subTitle:i&&r?`{{${O.i18nKeySubTitle}}}`:r},!0,this.fs)}async _updateI18n(e,t,{title:n,subTitle:r}){const i=(0,P.getI18nPaths)(e,t)["sap.app"];if(i)try{const e=[{key:O.i18nKeyTitle,value:n}];return r&&e.push({key:O.i18nKeySubTitle,value:r}),await(0,P.updateI18nProperties)(i,e),!0}catch(e){const t=(0,_.t)("WARNING_CANNOT_UPDATE_I18N",{path:i});this.appWizard.showWarning(t,c.MessageType.notification),this.log(t)}else this.log((0,_.t)("WARNING_I18N_FILE_PATH_NOT_FOUND_IN_MANIFEST"))}}t.default=default_1},6903:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(30514),t)},30514:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getQuestions=void 0;const r=n(25184),i=n(31881),o=n(1628);function s(e,t,n=0){return 0===e?.trim().length?(0,i.t)("PROMPT_VALIDATION_WARNING_INPUT_REQUIRED",{inputName:t}):!(n&&e.length>n)||(0,i.t)("PROMPT_VALIDATION_WARN_MAX_LENGTH",{maxLength:n})}t.getQuestions=function(e=[],t=!1){const n=(0,o.getPlatform)()===o.PLATFORMS.CLI;let a=!1;const _=(0,i.t)("PROMPT_FLPCONF_SEMANTIC_OBJECT"),c=(0,i.t)("PROMPT_FLPCONF_ACTION"),u=(0,i.t)("PROMPT_FLPCONF_TITLE");return[{name:"semanticObject",type:"input",guiOptions:{mandatory:!0,breadcrumb:(0,o.breadcrumbHelper)()},message:_,filter:e=>e?.trim(),validate:e=>s(e,_,30)},{name:"action",type:"input",guiOptions:{mandatory:!0,breadcrumb:(0,o.breadcrumbHelper)()},message:(0,i.t)("PROMPT_FLPCONF_ACTION"),filter:e=>e?.trim(),validate:e=>s(e,c,60)},{type:"confirm",name:"overwrite",message:e=>`${n?(0,i.t)("WARN_MESSAGE_FLPCONF_INBOUND_CONFIG_KEY_EXISTS",{inboundKey:`${e.semanticObject}-${e.action}`}):""}${(0,i.t)("PROMPT_FLPCONF_OVERWRITE")}`,guiOptions:{applyDefaultWhenDirty:!0},default:()=>!a,additionalMessages:(e,t)=>({message:(0,i.t)("WARN_MESSAGE_FLPCONF_INBOUND_CONFIG_KEY_EXISTS",{inboundKey:`${t.semanticObject}-${t.action}`}),severity:r.Severity.warning}),when:t=>(a=e.indexOf(`${t?.semanticObject}-${t?.action}`)>-1,a)},{when:({overwrite:e})=>!1!==e||!a||t,name:"title",type:"input",guiOptions:{mandatory:!0,breadcrumb:(0,o.breadcrumbHelper)()},message:(0,i.t)("PROMPT_FLPCONF_TITLE"),filter:e=>e?.trim(),validate:e=>s(e,u)},{when:({overwrite:e})=>!1!==e||!a||t,name:"subTitle",type:"input",guiOptions:{breadcrumb:(0,o.breadcrumbHelper)((0,i.t)("LABEL_FLP_SUBTITLE_BREADCRUMB"))},message:(0,i.t)("PROMPT_FLPCONF_SUBTITLE"),filter:e=>e?.trim()}]}},40120:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debug=void 0;const r=n(1628);t.debug=function(e,t){(0,r.getPlatform)()!==r.PLATFORMS.CLI&&e(`[YUI DEBUG] ${t}`)}},42899:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findSapSystem=t.getSapSystems=t.generateDestinationName=t.getCfDestinationChoices=void 0;const r=n(77090);let i={};async function o(e=!0){return e&&0!==Object.keys(i).length||(i=await(0,r.listSAPSystems)()),i}t.getCfDestinationChoices=async function(e=!1){const t=await o();return Object.values(t).map((t=>({name:`${t.name}${t.isScp()?"(SCP)":""} - ${t.url}`,value:e?t:t.name,scp:t.isScp(),url:t.url})))},t.generateDestinationName=function(e,t){return`${e}_${t.replace(/(^\/)|(\/$)/g,"").replace(/\//g,"_")}`},t.getSapSystems=o,t.findSapSystem=function(e,t){return t?.["string"==typeof e?e:e.name]}},35117:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorMessages=void 0;const r=n(1937),i=n(28212),o=(e,t)=>(0,i.t)("ERROR_CANNOT_FIND_BINARY",{bin:e,pkg:t});class ErrorMessages{}t.ErrorMessages=ErrorMessages,ErrorMessages.ABORT_SIGNAL="ABORT_SIGNAL",ErrorMessages.noManifest=(0,i.t)("ERROR_NO_MANIFEST"),ErrorMessages.noAppName=(0,i.t)("ERROR_NO_APPNAME"),ErrorMessages.noCdsBin=o(r.CDS_EXECUTABLE,r.CDS_PKG),ErrorMessages.noMtaBin=o(r.MTA_EXECUTABLE,r.MTA_PKG),ErrorMessages.noMta=(0,i.t)("ERROR_NO_MTA"),ErrorMessages.noPath=(0,i.t)("ERROR_NO_PATH"),ErrorMessages.noMtaId=(0,i.t)("ERROR_NO_MTA_ID"),ErrorMessages.invalidMtaId=(0,i.t)("ERROR_INVALID_MTA_ID"),ErrorMessages.capDeploymentnoMta=(0,i.t)("ERROR_CAP_DEPLOYMENT_NO_MTA"),ErrorMessages.mtaIdAlreadyExist=e=>(0,i.t)("ERROR_MTA_ID_ALREADY_EXIST",{destinationRoot:e}),ErrorMessages.noMtaInRoot=e=>(0,i.t)("ERROR_NO_MTA_ROOT",{mtaFileName:r.MTA_YAML,root:e}),ErrorMessages.unrecognizedTarget=e=>(0,i.t)("ERROR_UNRECOGNIZED_TARGET",{target:e}),ErrorMessages.cannotReadUi5Config=e=>(0,i.t)("ERROR_CANNOT_READ_UI5_CONFIG",{reason:e}),ErrorMessages.fileDoesNotExist=e=>(0,i.t)("ERROR_FILE_NOT_EXIST",{filePath:e}),ErrorMessages.folderDoesNotExist=e=>(0,i.t)("ERROR_FOLDER_NOT_EXIST",{filePath:e}),ErrorMessages.invalidClient=e=>(0,i.t)("ERROR_INVALID_CLIENT",{client:e}),ErrorMessages.invalidURL=e=>(0,i.t)("ERROR_INVALID_URL",{input:e})},68802:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.writeUi5RepositoryFiles=t.writeUi5RepositoryFile=t.getYamlType=t.readYaml=t.addUi5Dependency=t.addPackageDevDependency=t.updatePackageScript=t.dirExists=t.BUILD_MTA_SCRIPT_TEMP=t.DEPLOY_MTA_SCRIPT_TEMP=t.UNDEPLOY_MTA_SCRIPT_TEMP=t.DEPLOY_MTA_SCRIPT=t.BUILD_MTA_SCRIPT=t.BUILD_SCRIPT=void 0;const a=n(57147),_=n(71017),c=o(n(52375)),u=n(1937),d=s(n(37865)),l=s(n(26692)),p=n(28033);t.BUILD_SCRIPT="ui5 build preload --clean-dest --config ui5-deploy.yaml --include-task=generateCachebusterInfo",t.BUILD_MTA_SCRIPT="rimraf resources mta_archives && mbt build";t.DEPLOY_MTA_SCRIPT=(e=[])=>"fiori cfDeploy"+(e.length>0?` ${e.join(" ")}`:"");t.UNDEPLOY_MTA_SCRIPT_TEMP=e=>`cf undeploy ${e} --delete-services --delete-service-keys --delete-service-brokers`;function E(e){return c.parseDocument((0,a.readFileSync)(e,"utf-8"))}t.DEPLOY_MTA_SCRIPT_TEMP=(e=[])=>`cf deploy mta_archives/archive.mtar ${e.length>0?`${e.join(" ")} `:""}--retries 1`,t.BUILD_MTA_SCRIPT_TEMP="rimraf resources mta_archives && mbt build --mtar archive",t.dirExists=function(e){try{return(0,a.statSync)(e)?.isDirectory()}catch{return!1}},t.updatePackageScript=function(e,t,n,r,i=!1){const o=(0,_.join)(e,u.PACKAGE_JSON),s=JSON.parse((0,a.readFileSync)(o,"utf-8"));if(s.scripts||(s.scripts={}),s.scripts[t]=n,r){const{devDependencies:e={},ui5:t={}}=s;s.devDependencies=e,i&&(s.ui5={...t,dependencies:t.dependencies??[]});for(const e in r)s.devDependencies[e]||(s.devDependencies[e]=r[e]),i&&!s.ui5.dependencies.find((t=>t===e))&&s.ui5.dependencies.push(e)}(0,a.writeFileSync)(o,JSON.stringify(s,null,4))},t.addPackageDevDependency=function(e,t,n){const r=(0,_.join)(e,u.PACKAGE_JSON),i=JSON.parse((0,a.readFileSync)(r,"utf-8"));i.devDependencies=i.devDependencies||{},i.devDependencies[t]||(i.devDependencies[t]=n),(0,a.writeFileSync)(r,JSON.stringify(i,null,4))},t.addUi5Dependency=function(e,t){const n=(0,_.join)(e,u.PACKAGE_JSON),r=JSON.parse((0,a.readFileSync)(n,"utf-8"));r.ui5=r.ui5||{},r.ui5.dependencies=r.ui5.dependencies||[],r.ui5.dependencies.includes(t)||r.ui5.dependencies.push(t),(0,a.writeFileSync)(n,JSON.stringify(r,null,4))},t.readYaml=E,t.getYamlType=function(e,t){let n;const r=(0,_.join)(e,t);if((0,a.existsSync)(r)){n=E(r).toJSON().type}return n};t.writeUi5RepositoryFile=(e,t,n)=>{const r=(0,_.join)(e,t);let i;(0,a.existsSync)(r)?(i=(0,a.readFileSync)(r,"utf-8"),i.includes(n)||(i=`${i}\n${n}`)):i=n,(0,a.writeFileSync)(r,i)};t.writeUi5RepositoryFiles=async e=>{const n=(0,_.join)(e,await(0,p.getUi5CustomWebappPath)(e));(await(0,d.default)((0,l.default)((0,_.join)(n,"/**/*.ts"))))?.length>0&&(0,t.writeUi5RepositoryFile)(n,".Ui5RepositoryTextFiles","^.*.ts$")}},28212:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.t=t.addTranslations=t.initI18n=void 0;const i=r(n(73577)),o=r(n(91046)),s="deploy";async function a(){await i.default.init({resources:{en:{[s]:o.default}},lng:"en",fallbackLng:"en",defaultNS:s,ns:[s]})}t.initI18n=a,t.addTranslations=function(e,t){i.default.addResources("en",t,e)},t.t=function(e,t){return t={...t,interpolation:{...t?.interpolation,escapeValue:!1}},i.default.t(e,t)},a()},31881:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.t=t.ErrorMessages=t.isS4Installed=t.loadManifest=t.parseTarget=t.getEnvApiHubConfig=t.isAppStudio=t.CF_ENV=t.handleErrorMessage=t.bail=t.toMtaModuleName=void 0;const o=n(1628),s=n(40120),a=n(25184),_=n(71017),c=n(16484),u=n(28033),d=n(35117);function l({errorMessage:e}){throw new Error(e)}var p;t.toMtaModuleName=function(e){return e.replace(/[`~!@#$%^&*()_|+\-=?;:'",.<>]/gi,"")},t.bail=l,t.handleErrorMessage=function(e,t,n){(0,o.getPlatform)()===o.PLATFORMS.CLI?l({errorMessage:n}):(e.transportConfigError=n,(0,s.debug)(e.log,n),t?.showError(n,a.MessageType.notification))},function(e){e.H2O_URL="H2O_URL"}(p||(t.CF_ENV=p={})),t.isAppStudio=function(){return!!process.env[p.H2O_URL]},t.getEnvApiHubConfig=function(){const e=process.env[o.API_HUB_API_KEY],t=process.env[o.API_HUB_TYPE];return e?{apiHubKey:e,apiHubType:"API_HUB_ENTERPRISE"===t?"API_HUB_ENTERPRISE":"API_HUB"}:void 0},t.parseTarget=function(e,t){let n;return e&&("string"==typeof e?n=e:Array.isArray(e)&&(n=e?.[0])),n||(n=t.target),n},t.loadManifest=async function(e){let t;try{t=new c.Manifest((0,_.join)(e,await(0,u.getUi5CustomWebappPath)(e)))}catch{l({errorMessage:d.ErrorMessages.noManifest})}return t?.appId||l({errorMessage:d.ErrorMessages.noAppName}),t},t.isS4Installed=async function(e){return(await(0,o.findInstalledPackages)("@sapux/s4-fiori-gen-ext",{keyword:"fiori-generator-extension",vscWorkspaceConfig:e})).length>0};var E=n(35117);Object.defineProperty(t,"ErrorMessages",{enumerable:!0,get:function(){return E.ErrorMessages}});var T=n(28212);Object.defineProperty(t,"t",{enumerable:!0,get:function(){return T.t}}),i(n(40120),t),i(n(74475),t),i(n(42899),t)},16484:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Manifest=t.idPropertyPath=t.inboundsPropertyPath=t.crossNavigationPropertyPath=void 0;const s=o(n(57147)),a=o(n(71017)),_="sap.app";t.crossNavigationPropertyPath=[_,"crossNavigation"],t.inboundsPropertyPath=[...t.crossNavigationPropertyPath,"inbounds"],t.idPropertyPath=[_,"id"];t.Manifest=class Manifest{constructor(e){this.CONFIG_FILE="manifest.json",this.manifestPath=e,this.contents=JSON.parse((0,s.readFileSync)(this.manifestPath).toString())}set manifestPath(e){this._appPath=a.join(e,this.CONFIG_FILE)}get manifestPath(){return this._appPath}get appId(){return this.contents?.["sap.app"]?.id}get applicationVersion(){return this.contents["sap.app"]?.applicationVersion?.version}get dataSources(){return this.contents["sap.app"].dataSources??{}}get mainService(){const e=this.contents["sap.ovp"]?this.contents["sap.ovp"].globalFilterModel:"",t=this.contents["sap.ui5"]&&this.contents["sap.ui5"].models&&this.contents["sap.ui5"].models[e]?this.contents["sap.ui5"].models[e].dataSource:void 0;return this.dataSources[t]}get inbound(){const e=this.contents["sap.app"].crossNavigation?.inbounds;return e?{name:Object.keys(e)?.[0],inbound:Object.values(e)?.[0]}:{}}set crossNavigation(e){this.contents["sap.app"].crossNavigation=e}get crossNavigation(){return this.contents["sap.app"].crossNavigation}get sapCloud(){return this.contents["sap.cloud"]}set sapCloud(e){this.contents["sap.cloud"]=e}get i18nFilePath(){return this.contents["sap.app"].i18n}write(e){e?.readJSON(this.manifestPath)?e.writeJSON(this.manifestPath,this.contents,null,4):s.default.writeFileSync(this.manifestPath,JSON.stringify(this.contents,null,4))}}},74475:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.listPackages=t.createTransportNumber=t.getTransportList=t.initTransportConfig=t.validateAppDescription=t.validateAppName=t.isValidClient=t.notExistsValidateClient=t.isValidURL=void 0;const r=n(31881),i=n(77090),o=n(98308),s=n(62283),a=n(56821);async function _(e,t){let n;return t?.isSameSystem?.(e.url,e.client)||t?.config?.destination&&e?.destination===t?.config?.destination&&t?.getConnection()?n=t:e.destination?e.destination&&(n=(0,i.newSapSystemForDestinaton)({destination:e.destination})):n=await async function(e,t){try{return await(0,i.getSapSystem)(e,t?.toString())}catch{return}}(e.url,e.client),n}function c(e){const t=e?.trim()||"";return""===t||!!t.match(/^[0-9]{3}$/)}t.isValidURL=function(e){try{const t=new URL(e);return!!t.protocol&&!!t.host}catch{return!1}},t.notExistsValidateClient=function(e){return!e.client||e.client&&!c(e.client)},t.isValidClient=c,t.validateAppName=function(e,t){const n=[],i=e?e.trim().length:0;if(i)if(e.split("/").length-1>=3)n.push((0,r.t)("PROMPT_ABAP_INVALID_NAMESPACE"));else if(e.match(/^\/.*\/\w*$/g)){const t=e.split("/");let i;t[1].length>10&&(i=(0,r.t)("PROMPT_ABAP_INVALID_NAMESPACE_LENGTH",{length:t[1].length})),t[2].length>15&&(i=`${i?i+", ":""}${(0,r.t)("PROMPT_ABAP_INVALID_APPNAME_LENGTH",{length:t[2].length})}`),i&&n.push(i)}else i>15&&n.push((0,r.t)("PROMPT_ABAP_INVALID_APPNAME_LENGTH",{length:i}));else n.push((0,r.t)("PROMPT_ABAP_APPNAME_REQUIRED"));return i&&(t&&!e?.toUpperCase()?.startsWith(t.toUpperCase())&&n.push((0,r.t)("PROMPT_ABAP_INVALID_APPNAME",{prefix:t})),e.match(/^[A-Za-z0-9_/]*$/)||n.push((0,r.t)("ERROR_CHARACTERS_FORBIDDEN_IN_APP_NAME"))),{valid:0===n.length,errorMessages:n.length?n.join("\n")+(n.length>1?"\n":""):void 0}},t.validateAppDescription=function(e){const t=[];return e.length>60&&t.push((0,r.t)("PROMPT_ABAP_APPDESC_LENGTH")),{valid:0===t.length,errorMessages:t.length?t.join("\n")+(t.length>1?"\n":""):void 0}},t.initTransportConfig=async function({scp:e,url:t,client:n,destination:r,credentials:i,sapSystem:s,errorHandler:a}){let c={};if(!t&&!r)return c;const u={url:t,client:n,destination:r};try{const t=await _(u,s);c=await(0,o.getTransportConfigInstance)({scp:e,credentials:i,system:t})}catch(e){c.error=e}return c.error&&a(c.error),c},t.getTransportList=async function(e,t,{url:n,client:r,destination:i,credentials:s,sapSystem:a}){if(!n&&!i)return[];const c={url:n,client:r,destination:i},u=await _(c,a),d=await(0,o.getTransportListFromService)(e,t,{system:u,credentials:s});return 1===d.length&&""===d[0].transportReqNumber?[]:d},t.createTransportNumber=async function(e,{url:t,client:n,destination:r,credentials:i,sapSystem:o}){if(!t&&!r)return null;const a={url:t,client:n,destination:r},c=await _(a,o);return(0,s.createTransportNumberFromService)(e,{system:c,credentials:i})},t.listPackages=async function(e,{url:t,client:n,destination:r,credentials:i,sapSystem:o}){if(!t&&!r)return[];const s={url:t,client:n,destination:r},c=await _(s,o);return(0,a.listPackagesFromService)(e,{system:c,credentials:i})}},34409:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=34409,e.exports=t},70910:(e,t,n)=>{var r={"./Find-VisualStudio.cs":20183,"./build":17724,"./build.js":17724,"./clean":1658,"./clean.js":1658,"./configure":4748,"./configure.js":4748,"./create-config-gypi":98395,"./create-config-gypi.js":98395,"./find-node-directory":24159,"./find-node-directory.js":24159,"./find-python":29130,"./find-python.js":29130,"./find-visualstudio":17703,"./find-visualstudio.js":17703,"./install":25925,"./install.js":25925,"./list":44179,"./list.js":44179,"./node-gyp":55614,"./node-gyp.js":55614,"./process-release":75344,"./process-release.js":75344,"./rebuild":64187,"./rebuild.js":64187,"./remove":13103,"./remove.js":13103,"./util":55690,"./util.js":55690};function i(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}i.keys=function(){return Object.keys(r)},i.resolve=o,e.exports=i,i.id=70910},84679:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=84679,e.exports=t},72869:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=72869,e.exports=t},12937:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=12937,e.exports=t},84397:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=84397,e.exports=t},54529:e=>{"use strict";e.exports=require("@opentelemetry/tracing")},85767:e=>{"use strict";e.exports=require("@sap/cds")},32220:e=>{"use strict";e.exports=require("applicationinsights-native-metrics")},43241:e=>{"use strict";e.exports=require("esprima")},74602:e=>{"use strict";e.exports=require("keytar")},66828:e=>{"use strict";e.exports=require("vscode")},39491:e=>{"use strict";e.exports=require("assert")},50852:e=>{"use strict";e.exports=require("async_hooks")},14300:e=>{"use strict";e.exports=require("buffer")},32081:e=>{"use strict";e.exports=require("child_process")},96206:e=>{"use strict";e.exports=require("console")},22057:e=>{"use strict";e.exports=require("constants")},6113:e=>{"use strict";e.exports=require("crypto")},9523:e=>{"use strict";e.exports=require("dns")},82361:e=>{"use strict";e.exports=require("events")},57147:e=>{"use strict";e.exports=require("fs")},73292:e=>{"use strict";e.exports=require("fs/promises")},13685:e=>{"use strict";e.exports=require("http")},95687:e=>{"use strict";e.exports=require("https")},98188:e=>{"use strict";e.exports=require("module")},41808:e=>{"use strict";e.exports=require("net")},22037:e=>{"use strict";e.exports=require("os")},71017:e=>{"use strict";e.exports=require("path")},77282:e=>{"use strict";e.exports=require("process")},85477:e=>{"use strict";e.exports=require("punycode")},63477:e=>{"use strict";e.exports=require("querystring")},14521:e=>{"use strict";e.exports=require("readline")},12781:e=>{"use strict";e.exports=require("stream")},71576:e=>{"use strict";e.exports=require("string_decoder")},39512:e=>{"use strict";e.exports=require("timers")},24404:e=>{"use strict";e.exports=require("tls")},76224:e=>{"use strict";e.exports=require("tty")},57310:e=>{"use strict";e.exports=require("url")},73837:e=>{"use strict";e.exports=require("util")},26144:e=>{"use strict";e.exports=require("vm")},59796:e=>{"use strict";e.exports=require("zlib")},91046:e=>{"use strict";e.exports=JSON.parse('{"DEPLOYMENT_CONFIG_GENERATOR":"Deployment Configuration","DEPLOYMENT_CONFIG_GENERATOR_DESC":"Deployment Configuration","DEPLOYMENT_CONFIG":"Deploy Configuration","DEPLOYMENT_CONFIG_DESC":"Create/Update deployment configuration","DEFAULT_PACKAGE":"$tmp","DEFAULT_ABAP_DESCRIPTION":"ABAP Deployment.","DEFAULT_MTA_DESCRIPTION":"Generated by Fiori Tools","FLP_CONFIG":"FLP Configuration","FLP_CONFIG_DESC":"Create/Update Fiori Launchpad configuration","SERVER_CONFIG":"Application Router Configuration","SERVER_CONFIG_DESC":"Configure the Cloud Foundry application router","STEP_PREPARE":"Prepare","STEP_PREPARE_DESC":"Select project location and choose configuration generator","STEP_DEPLOY_TARGET":"Deploy Target","STEP_DEPLOY_TARGET_DESC":"Select backend type: ABAP or Cloud Foundry","STEP_CONFIG":"Project Configuration","STEP_CONFIG_DESC":"Create or update your project configuration","PROMPT_YUI_PROJECT_FOLDER":"Choose project folder","PROMPT_YUI_SELECT_GENERATOR":"Select a configuration generator","ERROR_CANNOT_FIND_BINARY":"Cannot find the \\"{{bin}}\\" executable. Please add it to the path or use \\"npm i -g {{pkg}}\\" to install it.","ERROR_NO_MANIFEST_AT_PATH":"Manifest not found at path: {{- path}}","ERROR_NO_MANIFEST":"Error: could not read webapp/manifest.json","ERROR_SAP_APP_NOT_DEFINED":"Manifest is missing required section \'sap.app\'","WARNING_CANNOT_UPDATE_I18N":"Cannot update i18n properties file: {{- path}}","WARNING_I18N_FILE_PATH_NOT_FOUND_IN_MANIFEST":"i18n file path not found in manifest.json. Fiori launchpad texts not added.","PROMPT_ABAP_INVALID_NAMESPACE_LENGTH":"Namespace limited to 10 characters, entered {{length}}","PROMPT_ABAP_INVALID_NAMESPACE":"Namespace invalid as there are too many forward slashes","PROMPT_ABAP_APPDESC_LENGTH":"Deployment Description should not exceed 60 characters","ERROR_NO_APPNAME":"Could not determine app name from manifest","ERROR_NO_MTA":"Error: no mta.yaml exists. Please run the deployment generator first","ERROR_NO_MTA_ROOT":"Error: no {{mtaFileName}} in {{root}}","ERROR_UNRECOGNIZED_TARGET":"Unrecognized target: {{target}}","ERROR_NO_PATH":"Cannot find \\"path\\" in backend configuration in ui5.yaml","ERROR_CANNOT_READ_UI5_CONFIG":"Cannot read ui5.yaml: {{reason}}","ERROR_FILE_NOT_EXIST":"File does not exist: {{filePath}}","ERROR_FOLDER_NOT_EXIST":"Folder path does not exist: {{filePath}}","ERROR_INVALID_CLIENT":"[{{client}}] is invalid. Enter blank or a value between 000-999","ERROR_INVALID_URL":"Invalid URL: [{{input}}]","ERROR_S4_SYSTEM_NOT_EXTENSIBLE":"S4 system not configured as Extensibility Development system. Cannot deploy to it.","ERROR_INCORRECT_ATO_SETTINGS":"Incorrect ATO settings. Package or prefix settings mising.","ERROR_PARSE_ATO":"Failed to parse ATO Settings - [{{message}}]","ERROR_NO_APP_NAME":"Could not determine app name from manifest","ERROR_NO_APP_ID":"Could not determine app ID from manifest","ERROR_NO_INBOUND":"Could not determine inbound from the manifest","ERROR_MTA_ID_ALREADY_EXIST":"A folder with same name already exist at {{destinationRoot}}","ERROR_NO_MTA_ID":"MTA ID cannot be empty","ERROR_MTA_DESTINATIONS":"No destinations loaded from mta.yaml","ERROR_INVALID_MTA_ID":"The ID can only contain letters, numbers, dashes, periods and underscores (but no spaces).","ERROR_HYPHENS_FORBIDDEN_IN_APP_NAME":"\'-\' not allowed in application name","ERROR_CHARACTERS_FORBIDDEN_IN_APP_NAME":"Only alphanumeric, underscore and slash characters are allowed","ERROR_MTA_EXTENSION_FOR_ABHE_FAILED":"Unable to create or update the mta extension file for Api Hub Enterprise destination configuration: {{error}}","ERROR_MTA_EXTENSION_ADDITION_FAILED":"Unable to add mta extension configuration to file: {{mtaExtFilePath}}","ERROR_UNABLE_TO_LOAD_MTA":"Unable to load mta.yaml configuration","ERROR_FAILED_TO_LOAD_SERVICE_KEY":"Failed to fetch service key","ERROR_CAP_DEPLOYMENT_NO_MTA":"This Fiori application is within a CAP project and deployment should be configured as part of the CAP project.","INFO_EXISTING_MTA_EXTENSION_NOT_FOUND":"Cannot find a valid existing mta extension file, a new one will be created","INFO_MTA_EXT_CREATED":"Created file: {{mtaExtFile}} to extend mta module: {{appMtaId}} with destination configuration","INFO_MTA_EXT_UPDATED":"Updated file: {{mtaExtFile}} with module destination configuration","WARN_EXISTING_DESTINATION_SERVICE_NOT_FOUND":"A destination service resource cannot be found in the mta.yaml. An mta extension destination instance cannot be added","LOG_ATO_PACKAGE_WARN":"Warning: superceding entered package {{package}} with packaged mandated by backend ATO settings: {{backendPackage}}","LOG_ENTER_CREDENTIAL":"Please enter your credentials for: {{url}}","LOG_ENTER_CREDENTIAL_CLIENT":"Please enter your credentials for: {{url}} (Client {{client}})","LOG_ENTER_CREDENTIAL_DESTINATION":"Please enter your credentials for destination: {{destination}}","LOG_CORRECT_CREDENTIAL":"Correct credentials.","LOG_INCORRECT_CREDENTIAL":"Incorrect credentials. Try again","LOG_INCORRECT_APP_NAME":"Your package is in the customer space. Please check the correctness of the application name as it might need to start with a Z.","LOG_MOVE_APP_PATH":"Moving application to {{newAppPath}}","LOG_WIN_OS_MSG":"Windows OS specific: ","LOG_WIN_OS_CANNOT_MOVE_LOCKED_FILE":"{{winosSpecificMsg}}Cannot remove locked folder {{srcPath}}","LOG_FAILED_SERVICE_KEY":"Failed to fetch service key","LOG_UPDATED_MTA":"Updated mta.yaml","LOG_READ_MTA":"Read mta.yaml with prefix {{prefix}}","LOG_READ_MTA_ERROR":"Could not read mta.yaml, trying again...","LOG_UPDATE_STANDALONE_MTA":"Updated standalone mta.yaml","LOG_UPDATE_MTA_FAILED":"Could not update mta.yaml","LOG_UPDATE_XSAPP_FAILED":"Could not update xs-app.json, error found {{error}}","LOG_UPDATED_XSAPP":"Updated standalone approuter xs-app.json {{message}}","LOG_ERROR":"{{method}} error found {{error}}","LOG_CANNOT_FIND_MTA":"Cannot find mta.yaml in current folder or up directory tree","LOG_ADD_FLP":"Adding FLP artifacts","LOG_ADDING_APP_TO_MTA":"Adding application {{appModule}} to mta.yaml","LOG_ADDING_PARAMS_TO_MTA":"Adding additional parameters to mta.yaml","LOG_ERROR_INSTALL_PHASE":"Error during install phase deployment-generator:cf: {{error}}","LOG_ROOT_ERROR_INSTALL_PHASE":"Error during install phase, root package.json deployment-generator:cf: {{error}}","LOG_ERROR_WRITING_PHASE":"Error writing phase deployment-generator:cf: {{error}}","LOG_ERROR_END_PHASE":"Error end phase deployment-generator:cf: {{error}}","LOG_UPDATING_PACKAGE_JSON":"Error updating package.json: {{error}}","LOG_UPDATED_PACKAGE_JSON":"Updated root package.json","LOG_ADDED_MTA_YAML":"mta.yaml created","WARN_MESSAGE_FLPCONF_INBOUND_CONFIG_KEY_EXISTS":"An inbound configuration with the key: \'{{inboundKey}}\' is already defined. ","PROMPT_FLPCONF_OVERWRITE":"Overwrite existing configuration?","PROMPT_FLPCONF_SEMANTIC_OBJECT":"Semantic Object","PROMPT_FLPCONF_ACTION":"Action","PROMPT_FLPCONF_TITLE":"Title","PROMPT_FLPCONF_SUBTITLE":"Subtitle (optional)","PROMPT_FLPCF_EXIST_MTA_DIR":"Existing configuration at {{mtaDir}} found. Do you want to extend it (or abort)?","PROMPT_FLPCF_NEW_MTA_DIR":"Enter the directory containing mta.yaml","PROMPT_FLPCF_NOT_EXIST_MTA_DIR":"{{mtaPath}} does not exist","PROMPT_VALIDATION_WARN_MAX_LENGTH":"Maximum length: {{maxLength}} characters","PROMPT_VALIDATION_WARNING_INPUT_REQUIRED":"{{inputName}} is required","PROMPT_APP_CHOOSE_TARGET":"Please choose the target","PROMPT_ABAP_APPNAME_REQUIRED":"Application name required","PROMPT_ABAP_INVALID_APPNAME_LENGTH":"Application name limited to 15 characters, entered {{length}}","PROMPT_ABAP_INVALID_APPNAME":"Application name needs to be prefixed with [{{prefix}}]","PROMPT_OVERWRITE_CONFIG":"Editing the deployment configuration will overwrite existing configuration, are you sure you want to continue?","PROMPT_OVERWRITE_ABORT":"Deployment config will abort if you choose no. Click Finish to abort.","PROMPT_ABAP_ENTER_BASE_CONFIG":"Enter the base configuration filename","PROMPT_ABAP_CONFIRM_SCP":"Is this an SAP Business Technology Platform system?","PROMPT_ABAP_DESTINATION":"Destination","PROMPT_ABAP_TARGET_SYSTEM":"Select Target system","PROMPT_ABAP_ENTER_TARGET":"Enter Target System URL","PROMPT_ABAP_TARGET_URL":"Target System URL","PROMPT_ABAP_CLIENT":"Client","PROMPT_ABAP_CLIENT_CHOICE_EXISTING":"Use project defined client {{client}}","PROMPT_ABAP_CLIENT_CHOICE_NEW":"Enter client","PROMPT_ABAP_CLIENT_CHOICE_BLANK":"Use default system client","PROMPT_ABAP_ENTER_CLIENT":"Enter client","PROMPT_ABAP_INVALID_APPNAME_LENGTH_2":"Name (Maximum length: 15 characters)","PROMPT_ABAP_APPNAME":"SAPUI5 ABAP Repository","PROMPT_ABAP_INVALID_APPNAME_LENGTH_PREFIX":"SAPUI5 ABAP Repository (Maximum length: 15 characters, should start with {{applicationPrefix}})","PROMPT_ABAP_PACKAGE":"Package","PROMPT_HINT_TYPE_TO_FILTER":" (Type to filter matching records)","PROMPT_ABAP_PACKAGE_WARN":"Provide a package","PROMPT_PACKAGE_INPUT_CHOICE":"How do you want to enter the Package","PROMPT_ABAP_PACKAGE_NOT_FOUND":"Package list cannot be fetched. Please enter the Package manually.","PROMPT_TRANSPORT_INPUT_CHOICE":"How do you want to enter Transport Request","PROMPT_TRANSPORT_NO_EXISTING_LIST":"Transport Request list cannot be fetched. Please enter Transport Request manually.","PROMPT_TRANSPORT_CANNOT_CREATE_TRANSPORT":"Create new Transport Request failed. Please enter Transport Request manually.","ENTER_MANUAL_CHOICE":"Enter manually","LIST_EXISTING_CHOICE":"Choose from existing","CREATE_NEW_CHOICE":"Create new","CREATE_DURING_DEPLOY_CHOICE":"Create during deployment","PROMPT_ABAP_TRANSPORT_NO":"Transport Request","PROMPT_ABAP_TRANSPORT_NO_MANDATORY":"Transport Request (mandatory)","PROMPT_ABAP_TRANSPORT_NO_REQUIRED":"Provide a transport request for your application","PROMPT_CREATE_TRANSPORT":"Created new Transport Request","PROMPT_ABAP_GENERATE_INDEX_HTML":"Generate standalone index.html during deployment","PROMPT_ABAP_USERNAME":"Username: ","PROMPT_ABAP_PASSWORD":"Password: ","PROMPT_ABAP_REQUIRE_CREDENTIAL":"Please provide credential to authenticate backend system","PROMPT_ABAP_DESCRIPTION":"Deployment Description","PROMPT_SERVER_PROJECT_PARENT":"Application router project path","PROMPT_SERVER_STANDALONE_APPROUTER":"Standalone Approuter","PROMPT_SERVER_MANAGED_APPROUTER":"Managed Approuter","PROMPT_SERVER_ADD_ROUTER_MODULE":"Add router module","PROMPT_SERVER_ADD_CONNECTIVITY":"Add connectivity service (required for connections to on-prem systems)?","PROMPT_SERVER_ADVANCED_OPTION":"Configure advanced options","PROMPT_CF_ABAP_ENV_UNAVAIL":"ABAP Environments Unavailable","PROMPT_CF_GENERATE_IN_ROOT":"Generate project artifacts in root folder: {{root}}?","PROMPT_CF_MTA_EXISTS":"Existing configuration at {{mtaPath}} found. Do you want to extend it (or abort)?","PROMPT_CF_SELECT_ROOT_PATH":"Please enter the location of the root folder (relative or absolute path)","PROMPT_CF_CREATE_ROOT":"{{root}} does not exist. Create it?","PROMPT_CF_CREATE_ROOT_CHOICE_YES":"Yes","PROMPT_CF_CREATE_ROOT_CHOICE_NEW":"Enter new name","PROMPT_CF_CREATE_ROOT_CHOICE_ABORT":"Abort","PROMPT_CF_CREATE_MTA_ID":"MTA ID","PROMPT_CF_CREATE_MTA_DESC":"MTA description","PROMPT_CF_CREATE_MTA_VERSION":"MTA version","PROMPT_CF_ABAP_SERVICE":"Do you want to connect to your ABAP environment via direct service binding?","PROMPT_CF_DESTINATION":"Destination name","PROMPT_CF_DESTINATION_HINT":"Destination name - The app router is configured to use direct service binding","PROMPT_CF_HINT_CF_LOGIN":"Login to Cloud Foundry is required prior to view available ABAP services.","PROMPT_CF_LOAD_ABAP_SERVICE_FAIL":"Discovering ABAP environments failed. Check logs for details.","PROMPT_CF_SELECT_ABAP_SERVICE":"ABAP Environment for direct service binding","PROMPT_CF_MOVE_APP_DIR":"Move app directory [{{appPath}}] to {{newRoot}}?\\n(Please ensure everything is under version control and committed first)","PROMPT_CF_NEW_DIR_NAME":"Choose new directory name","PROMPT_CF_APP_PATH_EXISTS":"{{appPath}} already exists.\\nPlease choose an option (h for help)","PROMPT_CF_CREATE_CHOICE_NO_MOVE":"Don\'t move","PROMPT_CF_LABEL_NONE":"None","PROMPT_CF_LABEL_DIRECT_SERVICE_BINDING":"Direct Service Binding","NOT_OVERWRITING_EXISTING_INDEX_HTML":"\'webapp/index.html\' already exists. Won\'t overwrite","PROMPT_GENERATE_MANAGED_APPROUTER":"Add application to managed application router?","WARN_CANNOT_GET_TRANSPORT_CONFIGURATION":"Cannot get transport configuration from the backend","PROMPT_INSTANCE_BASED_DEST_DEFAULT":"Local CAP Project API (Instance Based Destination)","PROMPT_INSTANCE_BASED_DEST":"{{destination}} (Instance Based Destination)","TOOLTIP_SAP_UI5_ABAP_REPO":"Enter the name for the deployed application. The name must follow the rules of creating a BSP application. It must not exceed 15 characters and must consist of alphanumeric characters or underscores only. Name should be unique in the BSP repository and its namespace is compatible with the selected package.","TOOLTIP_ABAP_DESCRIPTION":"The description of the deployed application.","TOOLTIP_ABAP_PACKAGE":"Provide a package for the deployed application.","ERROR_DEPLOY_TARGET_NOT_DEPLOYABLE":"{{systemError}} To continue with project generation choose a different deployment target or skip adding deploy config.","LABEL_TARGET_SYSTEM_BREADCRUMB":"Target System","LABEL_TARGET_SYSTEM_TYPE_BREADCRUMB":"Target Type","LABEL_SCP_BREADCRUMB":"SCP","LABEL_GENERATE_INDEX_HTML_BREADCRUMB":"Generate index.html","LABEL_ADD_APP_TO_ROUTER_BREADCRUMB":"Add to Router","LABEL_FLP_SUBTITLE_BREADCRUMB":"Subtitle","LABEL_ROUTER_PATH_BREADCRUMB":"App Router Path","LABEL_CONNECTIVITY_SERVICE_BREADCRUMB":"Add Connectivity Service","LABEL_DIRECT_SERVICE_ABAP_ENVIRONMENT_BREADCRUMB":"ABAP Env. Binding","INFO_MESSAGE_MORE_SEARCH_RESULTS":"More than {{numResults}} results, keep typing to narrow down","PROMPT_LABEL_S4_CONTINUE":"S/4 {{configType}} configuration is managed centrally as part of the CI pipeline, local updates to deployment configuration will not be for productive use. Are you sure you want to continue?","ERROR_EMPTY_NAME":"You must provide a destination name in order to continue.","ERROR_NAME_MSG":"The destination name must only contain letters, digits, dashes and underscores.","ERROR_NAME_TOO_LONG":"Destination name cannot contain more than 200 characters","VIRTUAL_HOST_WARNING":"As the destination uses a virtual host, you will need to replace the host in the URL with the internal host that is configured with your SAP Cloud Connector when previewing the deployed application."}')},69645:e=>{"use strict";e.exports={}}},r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var o=r[e]={id:e,loaded:!1,exports:{}};return n[e].call(o.exports,o,o.exports,i),o.loaded=!0,o.exports}i.m=n,i.c=r,i.x=()=>{var e=i.O(void 0,[712,784,36,475,763],(()=>i(i.s=26649)));return e=i.O(e)},e=[],i.O=(t,n,r,o)=>{if(!n){var s=1/0;for(u=0;u<e.length;u++){for(var[n,r,o]=e[u],a=!0,_=0;_<n.length;_++)(!1&o||s>=o)&&Object.keys(i.O).every((e=>i.O[e](n[_])))?n.splice(_--,1):(a=!1,o<s&&(s=o));if(a){e.splice(u--,1);var c=r();void 0!==c&&(t=c)}}return t}o=o||0;for(var u=e.length;u>0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[n,r,o]},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((t,n)=>(i.f[n](e,t),t)),[])),i.u=e=>({36:"app-config-writer/dist",475:"tools-suite-common-libs",712:"commonlibs",763:"app-gen-shared",784:"open-ux-shared"}[e]+"/index.js"),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),i.j=651,i.p="",(()=>{var e={651:1,190:1,385:1};i.O.require=t=>e[t];i.f.require=(t,n)=>{e[t]||(t=>{var n=t.modules,r=t.ids,o=t.runtime;for(var s in n)i.o(n,s)&&(i.m[s]=n[s]);o&&o(i);for(var a=0;a<r.length;a++)e[r[a]]=1;i.O()})(require("../"+i.u(t)))}})(),t=i.x,i.x=()=>(i.e(712),i.e(784),i.e(36),i.e(475),i.e(763),t());var o=i.x();module.exports=o})(); | ||
(()=>{var e,t,n={51617:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=51617,e.exports=t},39973:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=39973,e.exports=t},20230:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=20230,e.exports=t},20545:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=20545,e.exports=t},4297:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=4297,e.exports=t},75601:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=75601,e.exports=t},82626:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=82626,e.exports=t},37974:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=37974,e.exports=t},85858:(e,t,n)=>{var r={"./cat":43112,"./cat.js":43112,"./cd":86698,"./cd.js":86698,"./chmod":23986,"./chmod.js":23986,"./common":96816,"./common.js":96816,"./cp":80610,"./cp.js":80610,"./dirs":91972,"./dirs.js":91972,"./echo":16166,"./echo.js":16166,"./error":80609,"./error.js":80609,"./exec":52024,"./exec-child":69911,"./exec-child.js":69911,"./exec.js":52024,"./find":22261,"./find.js":22261,"./grep":56818,"./grep.js":56818,"./head":66412,"./head.js":66412,"./ln":91247,"./ln.js":91247,"./ls":5815,"./ls.js":5815,"./mkdir":70098,"./mkdir.js":70098,"./mv":74164,"./mv.js":74164,"./popd":99851,"./popd.js":99851,"./pushd":6978,"./pushd.js":6978,"./pwd":24044,"./pwd.js":24044,"./rm":44256,"./rm.js":44256,"./sed":43422,"./sed.js":43422,"./set":17444,"./set.js":17444,"./sort":53033,"./sort.js":53033,"./tail":50318,"./tail.js":50318,"./tempdir":16275,"./tempdir.js":16275,"./test":50021,"./test.js":50021,"./to":44915,"./to.js":44915,"./toEnd":13326,"./toEnd.js":13326,"./touch":57650,"./touch.js":57650,"./uniq":63019,"./uniq.js":63019,"./which":5483,"./which.js":5483};function i(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}i.keys=function(){return Object.keys(r)},i.resolve=o,e.exports=i,i.id=85858},55079:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deleteCachedServiceProvider=t.getOrCreateServiceProvider=void 0;const r=n(62637),i=n(14425);let o,s;t.getOrCreateServiceProvider=async function(e,t){return o&&s?.isSameSystem&&s?.isSameSystem(e.url,e.client)||(o=e?.getConnection()&&e?.getConnection()?.cookies?await async function(e){if((0,i.isAppStudio)()){const t=await(0,i.listDestinations)(),n=e.config.destination;o=(0,r.createForDestination)({cookies:e.getConnection().cookies.toString()},t[n])}else o=e?.isScp()?(0,r.createForAbapOnCloud)({environment:r.AbapCloudEnvironment.Standalone,service:{url:e.url},ignoreCertErrors:!1,cookies:e.getConnection().cookies.toString()}):(0,r.createForAbap)({baseURL:e?.url,ignoreCertErrors:!1,cookies:e?.getConnection().cookies.toString()});return o}(e):await async function(e,t){if((0,i.isAppStudio)()){const n=await(0,i.listDestinations)(),s=e.config.destination,a=t.username?{auth:{username:t.username,password:t.password}}:{};o=(0,r.createForDestination)({...a},n[s])}else o=e?.isScp()?(0,r.createForAbapOnCloud)({refreshToken:e.credentials?.refreshToken,environment:r.AbapCloudEnvironment.Standalone,service:e.credentials?.serviceKeysContents}):(0,r.createForAbap)({baseURL:e?.url,ignoreCertErrors:!1,auth:{username:t.username??e?.username,password:t.password??e?.password}});return o}(e,t),s=e),o},t.deleteCachedServiceProvider=function(){o=void 0}},62283:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createTransportNumberFromService=void 0;const r=n(55079),i=n(62637);t.createTransportNumberFromService=async function(e,{credentials:t,system:n}){try{const o=await(0,r.getOrCreateServiceProvider)(n,t),s=await o.getAdtService(i.TransportRequestService);return await s.createTransportRequest(e)}catch(e){return null}}},98308:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(55079),t),i(n(24105),t),i(n(81547),t)},56821:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.listPackagesFromService=void 0;const r=n(55079),i=n(62637),o=n(1937);t.listPackagesFromService=async function(e,{credentials:t,system:n}){try{const s=await(0,r.getOrCreateServiceProvider)(n,t),a=await s.getAdtService(i.ListPackageService);return await a.listPackages({maxResults:o.ABAP_PACKAGE_SEARCH_MAX_RESULTS,phrase:e})}catch(e){return[]}}},24105:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTransportConfigInstance=void 0;const r=n(1937),i=n(31881),o=n(55079),s=n(73056),a=n(62637);class DummyTransportConfig{getPackage(){}getApplicationPrefix(){}isTransportRequired(){return!1}getDefaultTransport(){}getOperationsType(){}}class DefaultTransportConfig{constructor(){this.atoSettings={},this.defaultTransport=void 0}getDefaultTransport(){return this.defaultTransport}getPackage(){return this.atoSettings.devPackage}getApplicationPrefix(){return this.atoSettings.devPrefix}isTransportRequired(){return!!this.atoSettings.isTransportRequestRequired}getOperationsType(){return this.atoSettings?.operationsType}async init({credentials:e,system:t}){const n={};try{const r=await(0,o.getOrCreateServiceProvider)(t,e),i=await r.getAdtService(a.AtoService),s=await i.getAtoInfo();n.error=this.handleAtoResponse(s)}catch(e){if((0,o.deleteCachedServiceProvider)(),e.response?.status===r.HttpStatus.UNAUTHORIZED){e.response.headers["www-authenticate"]?.toLowerCase()?.startsWith("basic")&&(n.transportConfigNeedsCreds=!0)}else n.warning=e?.toString(),n.transportConfigNeedsCreds=!1}const i=!n.error&&!n.transportConfigNeedsCreds;return n.transportConfig=i?this:this.getDummyConfig(),n}handleAtoResponse(e){let t=!1;if(this.atoSettings=(0,s.uniformAtoFormat)(e),this.atoSettings.isConfigured&&"CUSTOMER"===this.atoSettings.tenantType&&"C"===this.atoSettings.operationsType){if(!this.atoSettings.isExtensibilityDevSystem)return(0,i.t)("ERROR_S4_SYSTEM_NOT_EXTENSIBLE");if(!this.atoSettings.devPrefix)return(0,i.t)("ERROR_INCORRECT_ATO_SETTINGS");t=!0,this.applyS4CDefaults()}t||(this.atoSettings={operationsType:this.atoSettings.operationsType})}applyS4CDefaults(){this.defaultTransport=DefaultTransportConfig.S4C_DEFAULT_TRANSPORT,this.atoSettings.isTransportRequestRequired=!1,this.atoSettings.devPackage=DefaultTransportConfig.S4C_DEFAULT_PACKAGE}getDummyConfig(){const e=new DummyTransportConfig;return e.getOperationsType=this.getOperationsType,e}}DefaultTransportConfig.S4C_DEFAULT_TRANSPORT="",DefaultTransportConfig.S4C_DEFAULT_PACKAGE="TEST_YY1_DEFAULT",t.getTransportConfigInstance=async function({scp:e,credentials:t={},system:n}){return e?{transportConfig:new DummyTransportConfig}:(new DefaultTransportConfig).init({credentials:t,system:n})}},81547:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transportName=t.getTransportListFromService=void 0;const r=n(55079),i=n(62637);t.getTransportListFromService=async function(e,t,{credentials:n,system:o}){try{const s=await(0,r.getOrCreateServiceProvider)(o,n),a=await s.getAdtService(i.TransportChecksService);return(await a.getTransportRequests(e,t)).map((e=>({transportReqNumber:e.transportNumber,transportReqDescription:e.description})))}catch{return}};t.transportName=e=>({name:e.transportReqDescription?`${e.transportReqNumber} (${e.transportReqDescription})`:`${e.transportReqNumber}`,value:e.transportReqNumber})},73056:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useCreateTrDuringDeploy=t.CREATE_TR_DURING_DEPLOY=t.getTargetSystemChoices=t.isLocalPackage=t.uniformAtoFormat=t.isScp=t.handleProjectDoesNotExist=t.abapDeployConfigExists=t.indexHtmlExists=t.readExistingDeployTaskConfig=t.initBaseConfig=t.getSuggestedClient=t.getUrlAnswer=void 0;const r=n(1937),i=n(31881),o=n(68802),s=n(43895),a=n(28033),_=n(71017);t.getUrlAnswer=function(e,t){if(e.isAppStudio&&t?.destination===e?.backendConfig?.destination)return e.answers.url;{let e=t.targetSystem;return t.targetSystem&&"NoUrlSelected"!==t.targetSystem||!t.url||(e=t.url),e}},t.getSuggestedClient=function(e){let t;const n=e.scripts?.start;return n&&n.includes("sap-client")&&(t=n.split("sap-client")[1].match(/\d{1,3}/g).map(String)[0]),t},t.initBaseConfig=function(e,t){t.baseConfig=(0,o.readYaml)(e);const n=t.baseConfig.toJSON();t.baseMetadataName=n.metadata?.name,t.backendConfig=n?.server?.customMiddleware?.find((e=>e?.name===r.FIORI_TOOLS_PROXY))?.configuration?.backend?.[0]},t.readExistingDeployTaskConfig=function(e){if(e)try{const t=(0,o.readYaml)(e)?.toJSON();return t?.builder?.customTasks?.find((e=>e.name===r.ABAP_DEPLOY_TASK))?.configuration}catch(e){return}},t.indexHtmlExists=async function(e,t){const n=await(0,a.getUi5CustomWebappPath)(t),r=(0,_.join)(t,n,"index.html");return e.exists(r)},t.abapDeployConfigExists=function(e,t){return e.exists(t)},t.handleProjectDoesNotExist=function(e){const t=i.ErrorMessages.fileDoesNotExist(e.destinationPath(e.options.base));throw e.abort=!0,(0,i.handleErrorMessage)(e,e.appWizard,t),i.ErrorMessages.ABORT_SIGNAL},t.isScp=function(e,t){for(const n in t){const r=t[n];if(r.value===e)return r.scp}return!1},t.uniformAtoFormat=function(e){return Object.keys(e).includes("developmentPackage")&&(e.devPackage=e.developmentPackage),Object.keys(e).includes("developmentPrefix")&&(e.devPrefix=e.developmentPrefix),Object.keys(e).includes("isExtensibilityDevelopmentSystem")&&(e.isExtensibilityDevSystem=e.isExtensibilityDevelopmentSystem),e},t.isLocalPackage=function(e){return/^[$LlTt]/.test(e)},t.getTargetSystemChoices=async function(e,t){const n=[];if(!(0,s.isAppStudio)()){let r=!0;n.push({name:(0,i.t)("PROMPT_ABAP_ENTER_TARGET"),value:"NoUrlSelected"}),t?.unSaved&&(n.push({name:`${t.getDisplayName()} (Source system)`,value:t.url,client:t.client,isDefault:!0,scp:t.isScp()}),r=!1);const o=await(0,i.getSapSystems)();Object.values(o).forEach((t=>{let i=!1;r&&(i=t.url===e?.url&&(t.client||"")===(e?.client||"")),n.push({name:i?`${t.getDisplayName()} (Source system)`:t.getDisplayName(),value:t.url,client:t.client,isDefault:i,scp:t.isScp()})}))}return n},t.CREATE_TR_DURING_DEPLOY="REPLACE_WITH_TRANSPORT",t.useCreateTrDuringDeploy=function(e){return e.existingDeployTaskConfig?.app?.transport===t.CREATE_TR_DURING_DEPLOY}},82546:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getS4Prompts=void 0;const r=n(28212);t.getS4Prompts=function(e){return[{type:"confirm",name:"s4Continue",message:(0,r.t)("PROMPT_LABEL_S4_CONTINUE",{configType:e}),default:!1}]}},1937:(e,t)=>{"use strict";var n,r,i;Object.defineProperty(t,"__esModule",{value:!0}),t.generatorNamespace=t.bundledRootGeneratorName=t.i18nKeySubTitle=t.i18nKeyTitle=t.ABAP_PACKAGE_SEARCH_MAX_RESULTS=t.API_BUSINESS_HUB_ENTERPRISE_PREFIX=t.MANAGED_XSUAA=t.UI5_URL=t.SRV_API_DEFAULT_URL=t.SRV_API=t.DEFAULT_MTA_DESTINATION=t.MTA_DESTINATION=t.XS_SECURITY=t.MTA_EXTENSION_FILE=t.MTA_YAML=t.PACKAGE_JSON=t.DEPLOY_MODE=t.UI5_YAML=t.UI5_DEPLOY=t.XS_APP=t.RIMRAF=t.RIMRAF_VERSION=t.MBT=t.MBT_VERSION=t.UI5_TASK_FLATTEN_LIB_VERSION=t.UI5_TASK_FLATTEN_LIB=t.ABAP_DEPLOY_TASK=t.WELCOME_FILE=t.DESTINATION_AUTHTYPE_NOAUTH=t.DESTINATION_AUTHTYPE_NOTFOUND=t.DESTINATION_CHOICE_DIRECT_SERVICE_BINDING=t.DESTINATION_CHOICE_NONE=t.RouterModuleType=t.HttpStatus=t.MTA_VERSION=t.MTA_DESCRIPTION=t.TargetName=t.CDS_ADD_MTA_COMMAND_ARGS=t.MTA_PKG=t.MTA_EXECUTABLE=t.CDS_PKG=t.CDS_EXECUTABLE=t.ROUTER_MODULE=t.CLOUD_FOUNDRY_FOLDER=t.FIORI_TOOLS_PROXY=t.DEPLOYER_MODULE_TYPE=t.ROUTER_MODULE_TYPE=void 0,t.ROUTER_MODULE_TYPE="approuter.nodejs",t.DEPLOYER_MODULE_TYPE="com.sap.html5.application-content",t.FIORI_TOOLS_PROXY="fiori-tools-proxy",t.CLOUD_FOUNDRY_FOLDER="cf",t.ROUTER_MODULE="router",t.CDS_EXECUTABLE="cds",t.CDS_PKG="@sap/cds-dk",t.MTA_EXECUTABLE="mta",t.MTA_PKG="mta",t.CDS_ADD_MTA_COMMAND_ARGS=["add","mta"],function(e){e.ABAP="abap",e.CF="cf"}(n||(t.TargetName=n={})),t.MTA_DESCRIPTION="Fiori elements app",t.MTA_VERSION="0.0.1",function(e){e[e.UNAUTHORIZED=401]="UNAUTHORIZED"}(r||(t.HttpStatus=r={})),function(e){e.Standard="Standard",e.Managed="Managed"}(i||(t.RouterModuleType=i={})),t.DESTINATION_CHOICE_NONE="NONE",t.DESTINATION_CHOICE_DIRECT_SERVICE_BINDING="DIRECT_SERVICE_BINDING",t.DESTINATION_AUTHTYPE_NOTFOUND="NotAvailable",t.DESTINATION_AUTHTYPE_NOAUTH="NoAuthentication",t.WELCOME_FILE="welcomeFile",t.ABAP_DEPLOY_TASK="deploy-to-abap",t.UI5_TASK_FLATTEN_LIB="ui5-task-flatten-library",t.UI5_TASK_FLATTEN_LIB_VERSION="0.2.5",t.MBT_VERSION="^1.2.18",t.MBT="mbt",t.RIMRAF_VERSION="^3.0.2",t.RIMRAF="rimraf",t.XS_APP="xs-app.json",t.UI5_DEPLOY="ui5-deploy.yaml",t.UI5_YAML="ui5.yaml",t.DEPLOY_MODE="deploy_mode",t.PACKAGE_JSON="package.json",t.MTA_YAML="mta.yaml",t.MTA_EXTENSION_FILE="mta-ext.mtaext",t.XS_SECURITY="xs-security.json",t.MTA_DESTINATION="%s-srv-api",t.DEFAULT_MTA_DESTINATION="fiori-default-srv-api",t.SRV_API="srv-api",t.SRV_API_DEFAULT_URL="${default-url}",t.UI5_URL="https://ui5.sap.com",t.MANAGED_XSUAA="managed:xsuaa",t.API_BUSINESS_HUB_ENTERPRISE_PREFIX="ABHE",t.ABAP_PACKAGE_SEARCH_MAX_RESULTS=50,t.i18nKeyTitle="flpTitle",t.i18nKeySubTitle="flpSubtitle",t.bundledRootGeneratorName="@sap/fiori:fiori-deployment";t.generatorNamespace=e=>`${t.bundledRootGeneratorName}_${e}`},26649:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=s(n(98819)),_=n(31881),c=n(25184),u=o(n(71017)),d=n(1628),l=n(82546),p=n(6903),E=n(72089),T=n(9949),P=n(28033),A=n(37705),O=n(1937);class default_1 extends a.default{constructor(e,t){t.force=!0,super(e,t,{unique:"namespace"}),this.exit=!1,this.appWizard=t.appWizard||c.AppWizard.create(t),this.additionalTelemetryData=t.additionalTelemetryData,t.data?.appRootPath?this.appRootPath=t.data.appRootPath:t.projectPath&&t.projectName?this.appRootPath=u.default.join(t.projectPath,t.projectName):this.appRootPath=this.destinationRoot(),t.launchFlpConfigAsSubGenerator||(this.prompts=new c.Prompts([{name:(0,d.t)("FLP_CONFIG"),description:(0,d.t)("DESCRIPTION_FLP_CONFIG_GENERATOR",{appFolderName:` - ${u.default.basename(this.appRootPath)}`})}]),this.setPromptsCallback=e=>{this.prompts&&this.prompts.setCallback(e)},this.existingApp=!0,(0,A.enableFeature)(d.Features.enableAnswerBreadcrumbs))}async initializing(){await d.TelemetryHelper.initTelemetrySettings({modulePackageJson:{name:"@sap/generator-fiori-deployment:flp-config",version:this.rootGeneratorVersion()}}),this.existingApp&&(this.manifestPath=(0,u.join)(await(0,T.getWebappPath)(this.appRootPath),T.FileName.Manifest),this.manifest=this.fs.readJSON(this.manifestPath),this.manifest||(0,_.handleErrorMessage)(this,this.appWizard,(0,_.t)("ERROR_NO_MANIFEST_AT_PATH",{path:this.manifestPath})),this.manifest["sap.app"]||(0,_.handleErrorMessage)(this,this.appWizard,(0,_.t)("ERROR_SAP_APP_NOT_DEFINED")))}async prompting(){if(this.options.launchFlpConfigAsSubGenerator&&void 0!==this.options.inboundConfig?.semanticObject&&void 0!==this.options.inboundConfig?.action&&void 0!==this.options.inboundConfig?.title&&this.options.skipPrompt)return void(this.answers={overwrite:!0,semanticObject:this.options.inboundConfig.semanticObject,action:this.options.inboundConfig.action,title:this.options.inboundConfig.title,subTitle:this.options.inboundConfig.subTitle});let e;this.manifest?.["sap.app"]?.crossNavigation?.inbounds&&(e=Object.keys(this.manifest["sap.app"].crossNavigation.inbounds));const t=this.options.overwrite;let n=(0,p.getQuestions)(e,t);if(((0,d.getPlatform)()===d.PLATFORMS.CLI||!this.options.launchFlpConfigAsSubGenerator)&&await(0,_.isS4Installed)(this.options.vscode?.workspace?.getConfiguration())){const e=(0,l.getS4Prompts)("FLP");n=(0,d.withCondition)(n,(e=>e.s4Continue)),n.unshift(...e)}this.answers={};const r=await this.prompt(n);(!1===r.s4Continue||!1===r.overwrite&&!t)&&(this.exit=!0,process.exit(0)),""===r.subTitle&&(r.subTitle=void 0),Object.assign(this.answers,r)}async writing(){!1===this.exit&&this.existingApp&&await this._updateFiles(this.answers)}async end(){!1!==this.exit||this.existingApp||(this.manifestPath=(0,u.join)(await(0,T.getWebappPath)(this.appRootPath),T.FileName.Manifest),this.manifest=this.fs.readJSON(this.manifestPath),await this._updateFiles(this.answers));try{const e=d.TelemetryHelper.createTelemetryData(Object.assign({appType:"flp-config"},this.additionalTelemetryData));(0,d.sendTelemetry)(d.EventName.GenerationSuccess,e)}catch(e){this.log((0,_.t)("LOG_ERROR_END_PHASE",{error:e}))}}async _updateFiles({semanticObject:e,action:t,title:n,subTitle:r}){const i=await this._updateI18n(u.default.dirname(this.manifestPath),this.manifest,{title:n,subTitle:r});await(0,E.generateInboundNavigationConfig)(this.appRootPath,{semanticObject:e,action:t,title:i?`{{${O.i18nKeyTitle}}}`:n,subTitle:i&&r?`{{${O.i18nKeySubTitle}}}`:r},!0,this.fs)}async _updateI18n(e,t,{title:n,subTitle:r}){const i=(0,P.getI18nPaths)(e,t)["sap.app"];if(i)try{const e=[{key:O.i18nKeyTitle,value:n}];return r&&e.push({key:O.i18nKeySubTitle,value:r}),await(0,P.updateI18nProperties)(i,e),!0}catch(e){const t=(0,_.t)("WARNING_CANNOT_UPDATE_I18N",{path:i});this.appWizard.showWarning(t,c.MessageType.notification),this.log(t)}else this.log((0,_.t)("WARNING_I18N_FILE_PATH_NOT_FOUND_IN_MANIFEST"))}}t.default=default_1},6903:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(30514),t)},30514:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getQuestions=void 0;const r=n(25184),i=n(31881),o=n(1628);function s(e,t,n=0){return 0===e?.trim().length?(0,i.t)("PROMPT_VALIDATION_WARNING_INPUT_REQUIRED",{inputName:t}):!(n&&e.length>n)||(0,i.t)("PROMPT_VALIDATION_WARN_MAX_LENGTH",{maxLength:n})}t.getQuestions=function(e=[],t=!1){const n=(0,o.getPlatform)()===o.PLATFORMS.CLI;let a=!1;const _=(0,i.t)("PROMPT_FLPCONF_SEMANTIC_OBJECT"),c=(0,i.t)("PROMPT_FLPCONF_ACTION"),u=(0,i.t)("PROMPT_FLPCONF_TITLE");return[{name:"semanticObject",type:"input",guiOptions:{mandatory:!0,breadcrumb:(0,o.breadcrumbHelper)()},message:_,filter:e=>e?.trim(),validate:e=>s(e,_,30)},{name:"action",type:"input",guiOptions:{mandatory:!0,breadcrumb:(0,o.breadcrumbHelper)()},message:(0,i.t)("PROMPT_FLPCONF_ACTION"),filter:e=>e?.trim(),validate:e=>s(e,c,60)},{type:"confirm",name:"overwrite",message:e=>`${n?(0,i.t)("WARN_MESSAGE_FLPCONF_INBOUND_CONFIG_KEY_EXISTS",{inboundKey:`${e.semanticObject}-${e.action}`}):""}${(0,i.t)("PROMPT_FLPCONF_OVERWRITE")}`,guiOptions:{applyDefaultWhenDirty:!0},default:()=>!a,additionalMessages:(e,t)=>({message:(0,i.t)("WARN_MESSAGE_FLPCONF_INBOUND_CONFIG_KEY_EXISTS",{inboundKey:`${t.semanticObject}-${t.action}`}),severity:r.Severity.warning}),when:t=>(a=e.indexOf(`${t?.semanticObject}-${t?.action}`)>-1,a)},{when:({overwrite:e})=>!1!==e||!a||t,name:"title",type:"input",guiOptions:{mandatory:!0,breadcrumb:(0,o.breadcrumbHelper)()},message:(0,i.t)("PROMPT_FLPCONF_TITLE"),filter:e=>e?.trim(),validate:e=>s(e,u)},{when:({overwrite:e})=>!1!==e||!a||t,name:"subTitle",type:"input",guiOptions:{breadcrumb:(0,o.breadcrumbHelper)((0,i.t)("LABEL_FLP_SUBTITLE_BREADCRUMB"))},message:(0,i.t)("PROMPT_FLPCONF_SUBTITLE"),filter:e=>e?.trim()}]}},40120:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debug=void 0;const r=n(1628);t.debug=function(e,t){(0,r.getPlatform)()!==r.PLATFORMS.CLI&&e(`[YUI DEBUG] ${t}`)}},42899:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findSapSystem=t.getSapSystems=t.generateDestinationName=t.getCfDestinationChoices=void 0;const r=n(77090);let i={};async function o(e=!0){return e&&0!==Object.keys(i).length||(i=await(0,r.listSAPSystems)()),i}t.getCfDestinationChoices=async function(e=!1){const t=await o();return Object.values(t).map((t=>({name:`${t.name}${t.isScp()?"(SCP)":""} - ${t.url}`,value:e?t:t.name,scp:t.isScp(),url:t.url})))},t.generateDestinationName=function(e,t){return`${e}_${t.replace(/(^\/)|(\/$)/g,"").replace(/\//g,"_")}`},t.getSapSystems=o,t.findSapSystem=function(e,t){return t?.["string"==typeof e?e:e.name]}},35117:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorMessages=void 0;const r=n(1937),i=n(28212),o=(e,t)=>(0,i.t)("ERROR_CANNOT_FIND_BINARY",{bin:e,pkg:t});class ErrorMessages{}t.ErrorMessages=ErrorMessages,ErrorMessages.ABORT_SIGNAL="ABORT_SIGNAL",ErrorMessages.noManifest=(0,i.t)("ERROR_NO_MANIFEST"),ErrorMessages.noAppName=(0,i.t)("ERROR_NO_APPNAME"),ErrorMessages.noCdsBin=o(r.CDS_EXECUTABLE,r.CDS_PKG),ErrorMessages.noMtaBin=o(r.MTA_EXECUTABLE,r.MTA_PKG),ErrorMessages.noMta=(0,i.t)("ERROR_NO_MTA"),ErrorMessages.noPath=(0,i.t)("ERROR_NO_PATH"),ErrorMessages.noMtaId=(0,i.t)("ERROR_NO_MTA_ID"),ErrorMessages.invalidMtaId=(0,i.t)("ERROR_INVALID_MTA_ID"),ErrorMessages.capDeploymentnoMta=(0,i.t)("ERROR_CAP_DEPLOYMENT_NO_MTA"),ErrorMessages.mtaIdAlreadyExist=e=>(0,i.t)("ERROR_MTA_ID_ALREADY_EXIST",{destinationRoot:e}),ErrorMessages.noMtaInRoot=e=>(0,i.t)("ERROR_NO_MTA_ROOT",{mtaFileName:r.MTA_YAML,root:e}),ErrorMessages.unrecognizedTarget=e=>(0,i.t)("ERROR_UNRECOGNIZED_TARGET",{target:e}),ErrorMessages.cannotReadUi5Config=e=>(0,i.t)("ERROR_CANNOT_READ_UI5_CONFIG",{reason:e}),ErrorMessages.fileDoesNotExist=e=>(0,i.t)("ERROR_FILE_NOT_EXIST",{filePath:e}),ErrorMessages.folderDoesNotExist=e=>(0,i.t)("ERROR_FOLDER_NOT_EXIST",{filePath:e}),ErrorMessages.invalidClient=e=>(0,i.t)("ERROR_INVALID_CLIENT",{client:e}),ErrorMessages.invalidURL=e=>(0,i.t)("ERROR_INVALID_URL",{input:e})},68802:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.writeUi5RepositoryFiles=t.writeUi5RepositoryFile=t.getYamlType=t.readYaml=t.addUi5Dependency=t.addPackageDevDependency=t.updatePackageScript=t.dirExists=t.BUILD_MTA_SCRIPT_TEMP=t.DEPLOY_MTA_SCRIPT_TEMP=t.UNDEPLOY_MTA_SCRIPT_TEMP=t.DEPLOY_MTA_SCRIPT=t.BUILD_MTA_SCRIPT=t.BUILD_SCRIPT=void 0;const a=n(57147),_=n(71017),c=o(n(52375)),u=n(1937),d=s(n(37865)),l=s(n(26692)),p=n(28033);t.BUILD_SCRIPT="ui5 build preload --clean-dest --config ui5-deploy.yaml --include-task=generateCachebusterInfo",t.BUILD_MTA_SCRIPT="rimraf resources mta_archives && mbt build";t.DEPLOY_MTA_SCRIPT=(e=[])=>"fiori cfDeploy"+(e.length>0?` ${e.join(" ")}`:"");t.UNDEPLOY_MTA_SCRIPT_TEMP=e=>`cf undeploy ${e} --delete-services --delete-service-keys --delete-service-brokers`;function E(e){return c.parseDocument((0,a.readFileSync)(e,"utf-8"))}t.DEPLOY_MTA_SCRIPT_TEMP=(e=[])=>`cf deploy mta_archives/archive.mtar ${e.length>0?`${e.join(" ")} `:""}--retries 1`,t.BUILD_MTA_SCRIPT_TEMP="rimraf resources mta_archives && mbt build --mtar archive",t.dirExists=function(e){try{return(0,a.statSync)(e)?.isDirectory()}catch{return!1}},t.updatePackageScript=function(e,t,n,r,i=!1){const o=(0,_.join)(e,u.PACKAGE_JSON),s=JSON.parse((0,a.readFileSync)(o,"utf-8"));if(s.scripts||(s.scripts={}),s.scripts[t]=n,r){const{devDependencies:e={},ui5:t={}}=s;s.devDependencies=e,i&&(s.ui5={...t,dependencies:t.dependencies??[]});for(const e in r)s.devDependencies[e]||(s.devDependencies[e]=r[e]),i&&!s.ui5.dependencies.find((t=>t===e))&&s.ui5.dependencies.push(e)}(0,a.writeFileSync)(o,JSON.stringify(s,null,4))},t.addPackageDevDependency=function(e,t,n){const r=(0,_.join)(e,u.PACKAGE_JSON),i=JSON.parse((0,a.readFileSync)(r,"utf-8"));i.devDependencies=i.devDependencies||{},i.devDependencies[t]||(i.devDependencies[t]=n),(0,a.writeFileSync)(r,JSON.stringify(i,null,4))},t.addUi5Dependency=function(e,t){const n=(0,_.join)(e,u.PACKAGE_JSON),r=JSON.parse((0,a.readFileSync)(n,"utf-8"));r.ui5=r.ui5||{},r.ui5.dependencies=r.ui5.dependencies||[],r.ui5.dependencies.includes(t)||r.ui5.dependencies.push(t),(0,a.writeFileSync)(n,JSON.stringify(r,null,4))},t.readYaml=E,t.getYamlType=function(e,t){let n;const r=(0,_.join)(e,t);if((0,a.existsSync)(r)){n=E(r).toJSON().type}return n};t.writeUi5RepositoryFile=(e,t,n)=>{const r=(0,_.join)(e,t);let i;(0,a.existsSync)(r)?(i=(0,a.readFileSync)(r,"utf-8"),i.includes(n)||(i=`${i}\n${n}`)):i=n,(0,a.writeFileSync)(r,i)};t.writeUi5RepositoryFiles=async e=>{const n=(0,_.join)(e,await(0,p.getUi5CustomWebappPath)(e));(await(0,d.default)((0,l.default)((0,_.join)(n,"/**/*.ts"))))?.length>0&&(0,t.writeUi5RepositoryFile)(n,".Ui5RepositoryTextFiles","^.*.ts$")}},28212:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.t=t.addTranslations=t.initI18n=void 0;const i=r(n(94336)),o=r(n(91046)),s="deploy";async function a(){await i.default.init({resources:{en:{[s]:o.default}},lng:"en",fallbackLng:"en",defaultNS:s,ns:[s]})}t.initI18n=a,t.addTranslations=function(e,t){i.default.addResources("en",t,e)},t.t=function(e,t){return t={...t,interpolation:{...t?.interpolation,escapeValue:!1}},i.default.t(e,t)},a()},31881:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.t=t.ErrorMessages=t.isS4Installed=t.loadManifest=t.parseTarget=t.getEnvApiHubConfig=t.isAppStudio=t.CF_ENV=t.handleErrorMessage=t.bail=t.toMtaModuleName=void 0;const o=n(1628),s=n(40120),a=n(25184),_=n(71017),c=n(16484),u=n(28033),d=n(35117);function l({errorMessage:e}){throw new Error(e)}var p;t.toMtaModuleName=function(e){return e.replace(/[`~!@#$%^&*()_|+\-=?;:'",.<>]/gi,"")},t.bail=l,t.handleErrorMessage=function(e,t,n){(0,o.getPlatform)()===o.PLATFORMS.CLI?l({errorMessage:n}):(e.transportConfigError=n,(0,s.debug)(e.log,n),t?.showError(n,a.MessageType.notification))},function(e){e.H2O_URL="H2O_URL"}(p||(t.CF_ENV=p={})),t.isAppStudio=function(){return!!process.env[p.H2O_URL]},t.getEnvApiHubConfig=function(){const e=process.env[o.API_HUB_API_KEY],t=process.env[o.API_HUB_TYPE];return e?{apiHubKey:e,apiHubType:"API_HUB_ENTERPRISE"===t?"API_HUB_ENTERPRISE":"API_HUB"}:void 0},t.parseTarget=function(e,t){let n;return e&&("string"==typeof e?n=e:Array.isArray(e)&&(n=e?.[0])),n||(n=t.target),n},t.loadManifest=async function(e){let t;try{t=new c.Manifest((0,_.join)(e,await(0,u.getUi5CustomWebappPath)(e)))}catch{l({errorMessage:d.ErrorMessages.noManifest})}return t?.appId||l({errorMessage:d.ErrorMessages.noAppName}),t},t.isS4Installed=async function(e){return(await(0,o.findInstalledPackages)("@sapux/s4-fiori-gen-ext",{keyword:"fiori-generator-extension",vscWorkspaceConfig:e})).length>0};var E=n(35117);Object.defineProperty(t,"ErrorMessages",{enumerable:!0,get:function(){return E.ErrorMessages}});var T=n(28212);Object.defineProperty(t,"t",{enumerable:!0,get:function(){return T.t}}),i(n(40120),t),i(n(74475),t),i(n(42899),t)},16484:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Manifest=t.idPropertyPath=t.inboundsPropertyPath=t.crossNavigationPropertyPath=void 0;const s=o(n(57147)),a=o(n(71017)),_="sap.app";t.crossNavigationPropertyPath=[_,"crossNavigation"],t.inboundsPropertyPath=[...t.crossNavigationPropertyPath,"inbounds"],t.idPropertyPath=[_,"id"];t.Manifest=class Manifest{constructor(e){this.CONFIG_FILE="manifest.json",this.manifestPath=e,this.contents=JSON.parse((0,s.readFileSync)(this.manifestPath).toString())}set manifestPath(e){this._appPath=a.join(e,this.CONFIG_FILE)}get manifestPath(){return this._appPath}get appId(){return this.contents?.["sap.app"]?.id}get applicationVersion(){return this.contents["sap.app"]?.applicationVersion?.version}get dataSources(){return this.contents["sap.app"].dataSources??{}}get mainService(){const e=this.contents["sap.ovp"]?this.contents["sap.ovp"].globalFilterModel:"",t=this.contents["sap.ui5"]&&this.contents["sap.ui5"].models&&this.contents["sap.ui5"].models[e]?this.contents["sap.ui5"].models[e].dataSource:void 0;return this.dataSources[t]}get inbound(){const e=this.contents["sap.app"].crossNavigation?.inbounds;return e?{name:Object.keys(e)?.[0],inbound:Object.values(e)?.[0]}:{}}set crossNavigation(e){this.contents["sap.app"].crossNavigation=e}get crossNavigation(){return this.contents["sap.app"].crossNavigation}get sapCloud(){return this.contents["sap.cloud"]}set sapCloud(e){this.contents["sap.cloud"]=e}get i18nFilePath(){return this.contents["sap.app"].i18n}write(e){e?.readJSON(this.manifestPath)?e.writeJSON(this.manifestPath,this.contents,null,4):s.default.writeFileSync(this.manifestPath,JSON.stringify(this.contents,null,4))}}},74475:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.listPackages=t.createTransportNumber=t.getTransportList=t.initTransportConfig=t.validateAppDescription=t.validateAppName=t.isValidClient=t.notExistsValidateClient=t.isValidURL=void 0;const r=n(31881),i=n(77090),o=n(98308),s=n(62283),a=n(56821);async function _(e,t){let n;return t?.isSameSystem?.(e.url,e.client)||t?.config?.destination&&e?.destination===t?.config?.destination&&t?.getConnection()?n=t:e.destination?e.destination&&(n=(0,i.newSapSystemForDestinaton)({destination:e.destination})):n=await async function(e,t){try{return await(0,i.getSapSystem)(e,t?.toString())}catch{return}}(e.url,e.client),n}function c(e){const t=e?.trim()||"";return""===t||!!t.match(/^[0-9]{3}$/)}t.isValidURL=function(e){try{const t=new URL(e);return!!t.protocol&&!!t.host}catch{return!1}},t.notExistsValidateClient=function(e){return!e.client||e.client&&!c(e.client)},t.isValidClient=c,t.validateAppName=function(e,t){const n=[],i=e?e.trim().length:0;if(i)if(e.split("/").length-1>=3)n.push((0,r.t)("PROMPT_ABAP_INVALID_NAMESPACE"));else if(e.match(/^\/.*\/\w*$/g)){const t=e.split("/");let i;t[1].length>10&&(i=(0,r.t)("PROMPT_ABAP_INVALID_NAMESPACE_LENGTH",{length:t[1].length})),t[2].length>15&&(i=`${i?i+", ":""}${(0,r.t)("PROMPT_ABAP_INVALID_APPNAME_LENGTH",{length:t[2].length})}`),i&&n.push(i)}else i>15&&n.push((0,r.t)("PROMPT_ABAP_INVALID_APPNAME_LENGTH",{length:i}));else n.push((0,r.t)("PROMPT_ABAP_APPNAME_REQUIRED"));return i&&(t&&!e?.toUpperCase()?.startsWith(t.toUpperCase())&&n.push((0,r.t)("PROMPT_ABAP_INVALID_APPNAME",{prefix:t})),e.match(/^[A-Za-z0-9_/]*$/)||n.push((0,r.t)("ERROR_CHARACTERS_FORBIDDEN_IN_APP_NAME"))),{valid:0===n.length,errorMessages:n.length?n.join("\n")+(n.length>1?"\n":""):void 0}},t.validateAppDescription=function(e){const t=[];return e.length>60&&t.push((0,r.t)("PROMPT_ABAP_APPDESC_LENGTH")),{valid:0===t.length,errorMessages:t.length?t.join("\n")+(t.length>1?"\n":""):void 0}},t.initTransportConfig=async function({scp:e,url:t,client:n,destination:r,credentials:i,sapSystem:s,errorHandler:a}){let c={};if(!t&&!r)return c;const u={url:t,client:n,destination:r};try{const t=await _(u,s);c=await(0,o.getTransportConfigInstance)({scp:e,credentials:i,system:t})}catch(e){c.error=e}return c.error&&a(c.error),c},t.getTransportList=async function(e,t,{url:n,client:r,destination:i,credentials:s,sapSystem:a}){if(!n&&!i)return;const c={url:n,client:r,destination:i},u=await _(c,a),d=await(0,o.getTransportListFromService)(e,t,{system:u,credentials:s});return 1===d?.length&&""===d[0].transportReqNumber?[]:d},t.createTransportNumber=async function(e,{url:t,client:n,destination:r,credentials:i,sapSystem:o}){if(!t&&!r)return null;const a={url:t,client:n,destination:r},c=await _(a,o);return(0,s.createTransportNumberFromService)(e,{system:c,credentials:i})},t.listPackages=async function(e,{url:t,client:n,destination:r,credentials:i,sapSystem:o}){if(!t&&!r)return[];const s={url:t,client:n,destination:r},c=await _(s,o);return(0,a.listPackagesFromService)(e,{system:c,credentials:i})}},34409:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=34409,e.exports=t},70910:(e,t,n)=>{var r={"./Find-VisualStudio.cs":20183,"./build":17724,"./build.js":17724,"./clean":1658,"./clean.js":1658,"./configure":4748,"./configure.js":4748,"./create-config-gypi":98395,"./create-config-gypi.js":98395,"./find-node-directory":24159,"./find-node-directory.js":24159,"./find-python":29130,"./find-python.js":29130,"./find-visualstudio":17703,"./find-visualstudio.js":17703,"./install":25925,"./install.js":25925,"./list":44179,"./list.js":44179,"./node-gyp":55614,"./node-gyp.js":55614,"./process-release":75344,"./process-release.js":75344,"./rebuild":64187,"./rebuild.js":64187,"./remove":13103,"./remove.js":13103,"./util":55690,"./util.js":55690};function i(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}i.keys=function(){return Object.keys(r)},i.resolve=o,e.exports=i,i.id=70910},84679:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=84679,e.exports=t},72869:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=72869,e.exports=t},12937:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=12937,e.exports=t},84397:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=84397,e.exports=t},54529:e=>{"use strict";e.exports=require("@opentelemetry/tracing")},85767:e=>{"use strict";e.exports=require("@sap/cds")},32220:e=>{"use strict";e.exports=require("applicationinsights-native-metrics")},43241:e=>{"use strict";e.exports=require("esprima")},74602:e=>{"use strict";e.exports=require("keytar")},66828:e=>{"use strict";e.exports=require("vscode")},39491:e=>{"use strict";e.exports=require("assert")},50852:e=>{"use strict";e.exports=require("async_hooks")},14300:e=>{"use strict";e.exports=require("buffer")},32081:e=>{"use strict";e.exports=require("child_process")},96206:e=>{"use strict";e.exports=require("console")},22057:e=>{"use strict";e.exports=require("constants")},6113:e=>{"use strict";e.exports=require("crypto")},9523:e=>{"use strict";e.exports=require("dns")},82361:e=>{"use strict";e.exports=require("events")},57147:e=>{"use strict";e.exports=require("fs")},73292:e=>{"use strict";e.exports=require("fs/promises")},13685:e=>{"use strict";e.exports=require("http")},95687:e=>{"use strict";e.exports=require("https")},98188:e=>{"use strict";e.exports=require("module")},41808:e=>{"use strict";e.exports=require("net")},22037:e=>{"use strict";e.exports=require("os")},71017:e=>{"use strict";e.exports=require("path")},77282:e=>{"use strict";e.exports=require("process")},85477:e=>{"use strict";e.exports=require("punycode")},63477:e=>{"use strict";e.exports=require("querystring")},14521:e=>{"use strict";e.exports=require("readline")},12781:e=>{"use strict";e.exports=require("stream")},71576:e=>{"use strict";e.exports=require("string_decoder")},39512:e=>{"use strict";e.exports=require("timers")},24404:e=>{"use strict";e.exports=require("tls")},76224:e=>{"use strict";e.exports=require("tty")},57310:e=>{"use strict";e.exports=require("url")},73837:e=>{"use strict";e.exports=require("util")},26144:e=>{"use strict";e.exports=require("vm")},59796:e=>{"use strict";e.exports=require("zlib")},91046:e=>{"use strict";e.exports=JSON.parse('{"DEPLOYMENT_CONFIG_GENERATOR":"Deployment Configuration","DEPLOYMENT_CONFIG_GENERATOR_DESC":"Deployment Configuration","DEPLOYMENT_CONFIG":"Deploy Configuration","DEPLOYMENT_CONFIG_DESC":"Create/Update deployment configuration","DEFAULT_PACKAGE":"$tmp","DEFAULT_ABAP_DESCRIPTION":"ABAP Deployment.","DEFAULT_MTA_DESCRIPTION":"Generated by Fiori Tools","FLP_CONFIG":"FLP Configuration","FLP_CONFIG_DESC":"Create/Update Fiori Launchpad configuration","SERVER_CONFIG":"Application Router Configuration","SERVER_CONFIG_DESC":"Configure the Cloud Foundry application router","STEP_PREPARE":"Prepare","STEP_PREPARE_DESC":"Select project location and choose configuration generator","STEP_DEPLOY_TARGET":"Deploy Target","STEP_DEPLOY_TARGET_DESC":"Select backend type: ABAP or Cloud Foundry","STEP_CONFIG":"Project Configuration","STEP_CONFIG_DESC":"Create or update your project configuration","PROMPT_YUI_PROJECT_FOLDER":"Choose project folder","PROMPT_YUI_SELECT_GENERATOR":"Select a configuration generator","ERROR_CANNOT_FIND_BINARY":"Cannot find the \\"{{bin}}\\" executable. Please add it to the path or use \\"npm i -g {{pkg}}\\" to install it.","ERROR_NO_MANIFEST_AT_PATH":"Manifest not found at path: {{- path}}","ERROR_NO_MANIFEST":"Error: could not read webapp/manifest.json","ERROR_SAP_APP_NOT_DEFINED":"Manifest is missing required section \'sap.app\'","WARNING_CANNOT_UPDATE_I18N":"Cannot update i18n properties file: {{- path}}","WARNING_I18N_FILE_PATH_NOT_FOUND_IN_MANIFEST":"i18n file path not found in manifest.json. Fiori launchpad texts not added.","PROMPT_ABAP_INVALID_NAMESPACE_LENGTH":"Namespace limited to 10 characters, entered {{length}}","PROMPT_ABAP_INVALID_NAMESPACE":"Namespace invalid as there are too many forward slashes","PROMPT_ABAP_APPDESC_LENGTH":"Deployment Description should not exceed 60 characters","ERROR_NO_APPNAME":"Could not determine app name from manifest","ERROR_NO_MTA":"Error: no mta.yaml exists. Please run the deployment generator first","ERROR_NO_MTA_ROOT":"Error: no {{mtaFileName}} in {{root}}","ERROR_UNRECOGNIZED_TARGET":"Unrecognized target: {{target}}","ERROR_NO_PATH":"Cannot find \\"path\\" in backend configuration in ui5.yaml","ERROR_CANNOT_READ_UI5_CONFIG":"Cannot read ui5.yaml: {{reason}}","ERROR_FILE_NOT_EXIST":"File does not exist: {{filePath}}","ERROR_FOLDER_NOT_EXIST":"Folder path does not exist: {{filePath}}","ERROR_INVALID_CLIENT":"[{{client}}] is invalid. Enter blank or a value between 000-999","ERROR_INVALID_URL":"Invalid URL: [{{input}}]","ERROR_S4_SYSTEM_NOT_EXTENSIBLE":"S4 system not configured as Extensibility Development system. Cannot deploy to it.","ERROR_INCORRECT_ATO_SETTINGS":"Incorrect ATO settings. Package or prefix settings mising.","ERROR_PARSE_ATO":"Failed to parse ATO Settings - [{{message}}]","ERROR_NO_APP_NAME":"Could not determine app name from manifest","ERROR_NO_APP_ID":"Could not determine app ID from manifest","ERROR_NO_INBOUND":"Could not determine inbound from the manifest","ERROR_MTA_ID_ALREADY_EXIST":"A folder with same name already exist at {{destinationRoot}}","ERROR_NO_MTA_ID":"MTA ID cannot be empty","ERROR_MTA_DESTINATIONS":"No destinations loaded from mta.yaml","ERROR_INVALID_MTA_ID":"The ID can only contain letters, numbers, dashes, periods and underscores (but no spaces).","ERROR_HYPHENS_FORBIDDEN_IN_APP_NAME":"\'-\' not allowed in application name","ERROR_CHARACTERS_FORBIDDEN_IN_APP_NAME":"Only alphanumeric, underscore and slash characters are allowed","ERROR_MTA_EXTENSION_FOR_ABHE_FAILED":"Unable to create or update the mta extension file for Api Hub Enterprise destination configuration: {{error}}","ERROR_MTA_EXTENSION_ADDITION_FAILED":"Unable to add mta extension configuration to file: {{mtaExtFilePath}}","ERROR_UNABLE_TO_LOAD_MTA":"Unable to load mta.yaml configuration","ERROR_FAILED_TO_LOAD_SERVICE_KEY":"Failed to fetch service key","ERROR_CAP_DEPLOYMENT_NO_MTA":"This Fiori application is within a CAP project and deployment should be configured as part of the CAP project.","INFO_EXISTING_MTA_EXTENSION_NOT_FOUND":"Cannot find a valid existing mta extension file, a new one will be created","INFO_MTA_EXT_CREATED":"Created file: {{mtaExtFile}} to extend mta module: {{appMtaId}} with destination configuration","INFO_MTA_EXT_UPDATED":"Updated file: {{mtaExtFile}} with module destination configuration","WARN_EXISTING_DESTINATION_SERVICE_NOT_FOUND":"A destination service resource cannot be found in the mta.yaml. An mta extension destination instance cannot be added","LOG_ATO_PACKAGE_WARN":"Warning: superceding entered package {{package}} with packaged mandated by backend ATO settings: {{backendPackage}}","LOG_ENTER_CREDENTIAL":"Please enter your credentials for: {{url}}","LOG_ENTER_CREDENTIAL_CLIENT":"Please enter your credentials for: {{url}} (Client {{client}})","LOG_ENTER_CREDENTIAL_DESTINATION":"Please enter your credentials for destination: {{destination}}","LOG_CORRECT_CREDENTIAL":"Correct credentials.","LOG_INCORRECT_CREDENTIAL":"Incorrect credentials. Try again","LOG_INCORRECT_APP_NAME":"Your package is in the customer space. Please check the correctness of the application name as it might need to start with a Z.","LOG_MOVE_APP_PATH":"Moving application to {{newAppPath}}","LOG_WIN_OS_MSG":"Windows OS specific: ","LOG_WIN_OS_CANNOT_MOVE_LOCKED_FILE":"{{winosSpecificMsg}}Cannot remove locked folder {{srcPath}}","LOG_FAILED_SERVICE_KEY":"Failed to fetch service key","LOG_UPDATED_MTA":"Updated mta.yaml","LOG_READ_MTA":"Read mta.yaml with prefix {{prefix}}","LOG_READ_MTA_ERROR":"Could not read mta.yaml, trying again...","LOG_UPDATE_STANDALONE_MTA":"Updated standalone mta.yaml","LOG_UPDATE_MTA_FAILED":"Could not update mta.yaml","LOG_UPDATE_XSAPP_FAILED":"Could not update xs-app.json, error found {{error}}","LOG_UPDATED_XSAPP":"Updated standalone approuter xs-app.json {{message}}","LOG_ERROR":"{{method}} error found {{error}}","LOG_CANNOT_FIND_MTA":"Cannot find mta.yaml in current folder or up directory tree","LOG_ADD_FLP":"Adding FLP artifacts","LOG_ADDING_APP_TO_MTA":"Adding application {{appModule}} to mta.yaml","LOG_ADDING_PARAMS_TO_MTA":"Adding additional parameters to mta.yaml","LOG_ERROR_INSTALL_PHASE":"Error during install phase deployment-generator:cf: {{error}}","LOG_ROOT_ERROR_INSTALL_PHASE":"Error during install phase, root package.json deployment-generator:cf: {{error}}","LOG_ERROR_WRITING_PHASE":"Error writing phase deployment-generator:cf: {{error}}","LOG_ERROR_END_PHASE":"Error end phase deployment-generator:cf: {{error}}","LOG_UPDATING_PACKAGE_JSON":"Error updating package.json: {{error}}","LOG_UPDATED_PACKAGE_JSON":"Updated root package.json","LOG_ADDED_MTA_YAML":"mta.yaml created","WARN_MESSAGE_FLPCONF_INBOUND_CONFIG_KEY_EXISTS":"An inbound configuration with the key: \'{{inboundKey}}\' is already defined. ","PROMPT_FLPCONF_OVERWRITE":"Overwrite existing configuration?","PROMPT_FLPCONF_SEMANTIC_OBJECT":"Semantic Object","PROMPT_FLPCONF_ACTION":"Action","PROMPT_FLPCONF_TITLE":"Title","PROMPT_FLPCONF_SUBTITLE":"Subtitle (optional)","PROMPT_FLPCF_EXIST_MTA_DIR":"Existing configuration at {{mtaDir}} found. Do you want to extend it (or abort)?","PROMPT_FLPCF_NEW_MTA_DIR":"Enter the directory containing mta.yaml","PROMPT_FLPCF_NOT_EXIST_MTA_DIR":"{{mtaPath}} does not exist","PROMPT_VALIDATION_WARN_MAX_LENGTH":"Maximum length: {{maxLength}} characters","PROMPT_VALIDATION_WARNING_INPUT_REQUIRED":"{{inputName}} is required","PROMPT_APP_CHOOSE_TARGET":"Please choose the target","PROMPT_ABAP_APPNAME_REQUIRED":"Application name required","PROMPT_ABAP_INVALID_APPNAME_LENGTH":"Application name limited to 15 characters, entered {{length}}","PROMPT_ABAP_INVALID_APPNAME":"Application name needs to be prefixed with [{{prefix}}]","PROMPT_OVERWRITE_CONFIG":"Editing the deployment configuration will overwrite existing configuration, are you sure you want to continue?","PROMPT_OVERWRITE_ABORT":"Deployment config will abort if you choose no. Click Finish to abort.","PROMPT_ABAP_ENTER_BASE_CONFIG":"Enter the base configuration filename","PROMPT_ABAP_CONFIRM_SCP":"Is this an SAP Business Technology Platform system?","PROMPT_ABAP_DESTINATION":"Destination","PROMPT_ABAP_TARGET_SYSTEM":"Select Target system","PROMPT_ABAP_ENTER_TARGET":"Enter Target System URL","PROMPT_ABAP_TARGET_URL":"Target System URL","PROMPT_ABAP_CLIENT":"Client","PROMPT_ABAP_CLIENT_CHOICE_EXISTING":"Use project defined client {{client}}","PROMPT_ABAP_CLIENT_CHOICE_NEW":"Enter client","PROMPT_ABAP_CLIENT_CHOICE_BLANK":"Use default system client","PROMPT_ABAP_ENTER_CLIENT":"Enter client","PROMPT_ABAP_INVALID_APPNAME_LENGTH_2":"Name (Maximum length: 15 characters)","PROMPT_ABAP_APPNAME":"SAPUI5 ABAP Repository","PROMPT_ABAP_INVALID_APPNAME_LENGTH_PREFIX":"SAPUI5 ABAP Repository (Maximum length: 15 characters, should start with {{applicationPrefix}})","PROMPT_ABAP_PACKAGE":"Package","PROMPT_HINT_TYPE_TO_FILTER":" (Type to filter matching records)","PROMPT_ABAP_PACKAGE_WARN":"Provide a package","PROMPT_PACKAGE_INPUT_CHOICE":"How do you want to enter the Package","PROMPT_ABAP_PACKAGE_NOT_FOUND":"Package list cannot be fetched. Please enter the Package manually.","PROMPT_TRANSPORT_INPUT_CHOICE":"How do you want to enter Transport Request","PROMPT_TRANSPORT_LIST_PRE_REQS":"Name (SAPUI5 ABAP Repository) and Package are required to retrieve the existing Transport Requests","PROMPT_NO_TRANSPORT_REQUESTS":"There are no Transport Requests for the supplied package. You can choose to create a new one now or during deployment","PROMPT_TRANSPORT_NO_EXISTING_LIST":"Transport Request list cannot be fetched. Please enter Transport Request manually.","PROMPT_TRANSPORT_CANNOT_CREATE_TRANSPORT":"Create new Transport Request failed. Please enter Transport Request manually.","ENTER_MANUAL_CHOICE":"Enter manually","LIST_EXISTING_CHOICE":"Choose from existing","CREATE_NEW_CHOICE":"Create new","CREATE_DURING_DEPLOY_CHOICE":"Create during deployment","PROMPT_ABAP_TRANSPORT_NO":"Transport Request","PROMPT_ABAP_TRANSPORT_NO_MANDATORY":"Transport Request (mandatory)","PROMPT_ABAP_TRANSPORT_NO_REQUIRED":"Provide a transport request for your application","PROMPT_CREATE_TRANSPORT":"Created new Transport Request","PROMPT_ABAP_GENERATE_INDEX_HTML":"Generate standalone index.html during deployment","PROMPT_ABAP_USERNAME":"Username: ","PROMPT_ABAP_PASSWORD":"Password: ","PROMPT_ABAP_REQUIRE_CREDENTIAL":"Please provide credential to authenticate backend system","PROMPT_ABAP_DESCRIPTION":"Deployment Description","PROMPT_SERVER_PROJECT_PARENT":"Application router project path","PROMPT_SERVER_STANDALONE_APPROUTER":"Standalone Approuter","PROMPT_SERVER_MANAGED_APPROUTER":"Managed Approuter","PROMPT_SERVER_ADD_ROUTER_MODULE":"Add router module","PROMPT_SERVER_ADD_CONNECTIVITY":"Add connectivity service (required for connections to on-prem systems)?","PROMPT_SERVER_ADVANCED_OPTION":"Configure advanced options","PROMPT_CF_ABAP_ENV_UNAVAIL":"ABAP Environments Unavailable","PROMPT_CF_GENERATE_IN_ROOT":"Generate project artifacts in root folder: {{root}}?","PROMPT_CF_MTA_EXISTS":"Existing configuration at {{mtaPath}} found. Do you want to extend it (or abort)?","PROMPT_CF_SELECT_ROOT_PATH":"Please enter the location of the root folder (relative or absolute path)","PROMPT_CF_CREATE_ROOT":"{{root}} does not exist. Create it?","PROMPT_CF_CREATE_ROOT_CHOICE_YES":"Yes","PROMPT_CF_CREATE_ROOT_CHOICE_NEW":"Enter new name","PROMPT_CF_CREATE_ROOT_CHOICE_ABORT":"Abort","PROMPT_CF_CREATE_MTA_ID":"MTA ID","PROMPT_CF_CREATE_MTA_DESC":"MTA description","PROMPT_CF_CREATE_MTA_VERSION":"MTA version","PROMPT_CF_ABAP_SERVICE":"Do you want to connect to your ABAP environment via direct service binding?","PROMPT_CF_DESTINATION":"Destination name","PROMPT_CF_DESTINATION_HINT":"Destination name - The app router is configured to use direct service binding","PROMPT_CF_HINT_CF_LOGIN":"Login to Cloud Foundry is required prior to view available ABAP services.","PROMPT_CF_LOAD_ABAP_SERVICE_FAIL":"Discovering ABAP environments failed. Check logs for details.","PROMPT_CF_SELECT_ABAP_SERVICE":"ABAP Environment for direct service binding","PROMPT_CF_MOVE_APP_DIR":"Move app directory [{{appPath}}] to {{newRoot}}?\\n(Please ensure everything is under version control and committed first)","PROMPT_CF_NEW_DIR_NAME":"Choose new directory name","PROMPT_CF_APP_PATH_EXISTS":"{{appPath}} already exists.\\nPlease choose an option (h for help)","PROMPT_CF_CREATE_CHOICE_NO_MOVE":"Don\'t move","PROMPT_CF_LABEL_NONE":"None","PROMPT_CF_LABEL_DIRECT_SERVICE_BINDING":"Direct Service Binding","NOT_OVERWRITING_EXISTING_INDEX_HTML":"\'webapp/index.html\' already exists. Won\'t overwrite","PROMPT_GENERATE_MANAGED_APPROUTER":"Add application to managed application router?","WARN_CANNOT_GET_TRANSPORT_CONFIGURATION":"Cannot get transport configuration from the backend","PROMPT_INSTANCE_BASED_DEST_DEFAULT":"Local CAP Project API (Instance Based Destination)","PROMPT_INSTANCE_BASED_DEST":"{{destination}} (Instance Based Destination)","TOOLTIP_SAP_UI5_ABAP_REPO":"Enter the name for the deployed application. The name must follow the rules of creating a BSP application. It must not exceed 15 characters and must consist of alphanumeric characters or underscores only. Name should be unique in the BSP repository and its namespace is compatible with the selected package.","TOOLTIP_ABAP_DESCRIPTION":"The description of the deployed application.","TOOLTIP_ABAP_PACKAGE":"Provide a package for the deployed application.","ERROR_DEPLOY_TARGET_NOT_DEPLOYABLE":"{{systemError}} To continue with project generation choose a different deployment target or skip adding deploy config.","LABEL_TARGET_SYSTEM_BREADCRUMB":"Target System","LABEL_TARGET_SYSTEM_TYPE_BREADCRUMB":"Target Type","LABEL_SCP_BREADCRUMB":"SCP","LABEL_GENERATE_INDEX_HTML_BREADCRUMB":"Generate index.html","LABEL_ADD_APP_TO_ROUTER_BREADCRUMB":"Add to Router","LABEL_FLP_SUBTITLE_BREADCRUMB":"Subtitle","LABEL_ROUTER_PATH_BREADCRUMB":"App Router Path","LABEL_CONNECTIVITY_SERVICE_BREADCRUMB":"Add Connectivity Service","LABEL_DIRECT_SERVICE_ABAP_ENVIRONMENT_BREADCRUMB":"ABAP Env. Binding","INFO_MESSAGE_MORE_SEARCH_RESULTS":"More than {{numResults}} results, keep typing to narrow down","PROMPT_LABEL_S4_CONTINUE":"S/4 {{configType}} configuration is managed centrally as part of the CI pipeline, local updates to deployment configuration will not be for productive use. Are you sure you want to continue?","ERROR_EMPTY_NAME":"You must provide a destination name in order to continue.","ERROR_NAME_MSG":"The destination name must only contain letters, digits, dashes and underscores.","ERROR_NAME_TOO_LONG":"Destination name cannot contain more than 200 characters","VIRTUAL_HOST_WARNING":"As the destination uses a virtual host, you will need to replace the host in the URL with the internal host that is configured with your SAP Cloud Connector when previewing the deployed application."}')},69645:e=>{"use strict";e.exports={}}},r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var o=r[e]={id:e,loaded:!1,exports:{}};return n[e].call(o.exports,o,o.exports,i),o.loaded=!0,o.exports}i.m=n,i.c=r,i.x=()=>{var e=i.O(void 0,[712,784,36,475,763],(()=>i(i.s=26649)));return e=i.O(e)},e=[],i.O=(t,n,r,o)=>{if(!n){var s=1/0;for(u=0;u<e.length;u++){for(var[n,r,o]=e[u],a=!0,_=0;_<n.length;_++)(!1&o||s>=o)&&Object.keys(i.O).every((e=>i.O[e](n[_])))?n.splice(_--,1):(a=!1,o<s&&(s=o));if(a){e.splice(u--,1);var c=r();void 0!==c&&(t=c)}}return t}o=o||0;for(var u=e.length;u>0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[n,r,o]},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((t,n)=>(i.f[n](e,t),t)),[])),i.u=e=>({36:"app-config-writer/dist",475:"tools-suite-common-libs",712:"commonlibs",763:"app-gen-shared",784:"open-ux-shared"}[e]+"/index.js"),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),i.j=651,i.p="",(()=>{var e={651:1,190:1,385:1};i.O.require=t=>e[t];i.f.require=(t,n)=>{e[t]||(t=>{var n=t.modules,r=t.ids,o=t.runtime;for(var s in n)i.o(n,s)&&(i.m[s]=n[s]);o&&o(i);for(var a=0;a<r.length;a++)e[r[a]]=1;i.O()})(require("../"+i.u(t)))}})(),t=i.x,i.x=()=>(i.e(712),i.e(784),i.e(36),i.e(475),i.e(763),t());var o=i.x();module.exports=o})(); |
@@ -1,1 +0,1 @@ | ||
(()=>{var e,t,r={51617:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=51617,e.exports=t},39973:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=39973,e.exports=t},20230:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=20230,e.exports=t},20545:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=20545,e.exports=t},4297:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=4297,e.exports=t},75601:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=75601,e.exports=t},82626:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=82626,e.exports=t},37974:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=37974,e.exports=t},85858:(e,t,r)=>{var o={"./cat":43112,"./cat.js":43112,"./cd":86698,"./cd.js":86698,"./chmod":23986,"./chmod.js":23986,"./common":96816,"./common.js":96816,"./cp":80610,"./cp.js":80610,"./dirs":91972,"./dirs.js":91972,"./echo":16166,"./echo.js":16166,"./error":80609,"./error.js":80609,"./exec":52024,"./exec-child":69911,"./exec-child.js":69911,"./exec.js":52024,"./find":22261,"./find.js":22261,"./grep":56818,"./grep.js":56818,"./head":66412,"./head.js":66412,"./ln":91247,"./ln.js":91247,"./ls":5815,"./ls.js":5815,"./mkdir":70098,"./mkdir.js":70098,"./mv":74164,"./mv.js":74164,"./popd":99851,"./popd.js":99851,"./pushd":6978,"./pushd.js":6978,"./pwd":24044,"./pwd.js":24044,"./rm":44256,"./rm.js":44256,"./sed":43422,"./sed.js":43422,"./set":17444,"./set.js":17444,"./sort":53033,"./sort.js":53033,"./tail":50318,"./tail.js":50318,"./tempdir":16275,"./tempdir.js":16275,"./test":50021,"./test.js":50021,"./to":44915,"./to.js":44915,"./toEnd":13326,"./toEnd.js":13326,"./touch":57650,"./touch.js":57650,"./uniq":63019,"./uniq.js":63019,"./which":5483,"./which.js":5483};function s(e){var t=i(e);return r(t)}function i(e){if(!r.o(o,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return o[e]}s.keys=function(){return Object.keys(o)},s.resolve=i,e.exports=s,s.id=85858},1937:(e,t)=>{"use strict";var r,o,s;Object.defineProperty(t,"__esModule",{value:!0}),t.generatorNamespace=t.bundledRootGeneratorName=t.i18nKeySubTitle=t.i18nKeyTitle=t.ABAP_PACKAGE_SEARCH_MAX_RESULTS=t.API_BUSINESS_HUB_ENTERPRISE_PREFIX=t.MANAGED_XSUAA=t.UI5_URL=t.SRV_API_DEFAULT_URL=t.SRV_API=t.DEFAULT_MTA_DESTINATION=t.MTA_DESTINATION=t.XS_SECURITY=t.MTA_EXTENSION_FILE=t.MTA_YAML=t.PACKAGE_JSON=t.DEPLOY_MODE=t.UI5_YAML=t.UI5_DEPLOY=t.XS_APP=t.RIMRAF=t.RIMRAF_VERSION=t.MBT=t.MBT_VERSION=t.UI5_TASK_FLATTEN_LIB_VERSION=t.UI5_TASK_FLATTEN_LIB=t.ABAP_DEPLOY_TASK=t.WELCOME_FILE=t.DESTINATION_AUTHTYPE_NOAUTH=t.DESTINATION_AUTHTYPE_NOTFOUND=t.DESTINATION_CHOICE_DIRECT_SERVICE_BINDING=t.DESTINATION_CHOICE_NONE=t.RouterModuleType=t.HttpStatus=t.MTA_VERSION=t.MTA_DESCRIPTION=t.TargetName=t.CDS_ADD_MTA_COMMAND_ARGS=t.MTA_PKG=t.MTA_EXECUTABLE=t.CDS_PKG=t.CDS_EXECUTABLE=t.ROUTER_MODULE=t.CLOUD_FOUNDRY_FOLDER=t.FIORI_TOOLS_PROXY=t.DEPLOYER_MODULE_TYPE=t.ROUTER_MODULE_TYPE=void 0,t.ROUTER_MODULE_TYPE="approuter.nodejs",t.DEPLOYER_MODULE_TYPE="com.sap.html5.application-content",t.FIORI_TOOLS_PROXY="fiori-tools-proxy",t.CLOUD_FOUNDRY_FOLDER="cf",t.ROUTER_MODULE="router",t.CDS_EXECUTABLE="cds",t.CDS_PKG="@sap/cds-dk",t.MTA_EXECUTABLE="mta",t.MTA_PKG="mta",t.CDS_ADD_MTA_COMMAND_ARGS=["add","mta"],function(e){e.ABAP="abap",e.CF="cf"}(r||(t.TargetName=r={})),t.MTA_DESCRIPTION="Fiori elements app",t.MTA_VERSION="0.0.1",function(e){e[e.UNAUTHORIZED=401]="UNAUTHORIZED"}(o||(t.HttpStatus=o={})),function(e){e.Standard="Standard",e.Managed="Managed"}(s||(t.RouterModuleType=s={})),t.DESTINATION_CHOICE_NONE="NONE",t.DESTINATION_CHOICE_DIRECT_SERVICE_BINDING="DIRECT_SERVICE_BINDING",t.DESTINATION_AUTHTYPE_NOTFOUND="NotAvailable",t.DESTINATION_AUTHTYPE_NOAUTH="NoAuthentication",t.WELCOME_FILE="welcomeFile",t.ABAP_DEPLOY_TASK="deploy-to-abap",t.UI5_TASK_FLATTEN_LIB="ui5-task-flatten-library",t.UI5_TASK_FLATTEN_LIB_VERSION="0.2.5",t.MBT_VERSION="^1.2.18",t.MBT="mbt",t.RIMRAF_VERSION="^3.0.2",t.RIMRAF="rimraf",t.XS_APP="xs-app.json",t.UI5_DEPLOY="ui5-deploy.yaml",t.UI5_YAML="ui5.yaml",t.DEPLOY_MODE="deploy_mode",t.PACKAGE_JSON="package.json",t.MTA_YAML="mta.yaml",t.MTA_EXTENSION_FILE="mta-ext.mtaext",t.XS_SECURITY="xs-security.json",t.MTA_DESTINATION="%s-srv-api",t.DEFAULT_MTA_DESTINATION="fiori-default-srv-api",t.SRV_API="srv-api",t.SRV_API_DEFAULT_URL="${default-url}",t.UI5_URL="https://ui5.sap.com",t.MANAGED_XSUAA="managed:xsuaa",t.API_BUSINESS_HUB_ENTERPRISE_PREFIX="ABHE",t.ABAP_PACKAGE_SEARCH_MAX_RESULTS=50,t.i18nKeyTitle="flpTitle",t.i18nKeySubTitle="flpSubtitle",t.bundledRootGeneratorName="@sap/fiori:fiori-deployment";t.generatorNamespace=e=>`${t.bundledRootGeneratorName}_${e}`},73858:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transformExtConfig=void 0;const o=r(1628);t.transformExtConfig=function(e){let t,r;if(e.deployConfig?.deployTarget===o.DeployTarget.CF){const r=e.deployConfig;t={cfDestination:r.destinationName,destinationAuthType:r.destinationAuthType,addManagedApprouter:r.addToManagedAppRouter,launchDeployConfigAsSubGenerator:!0,projectPath:e.project.targetFolder,projectName:e.project.name,addMTADestination:r.addMTADestination,lcapModeOnly:r.lcapModeOnly,cloudServiceName:r.cloudServiceName}}if(e.flpConfig){const t=e.flpConfig;r={inboundConfig:{semanticObject:t.semanticObject||(0,o.getSemanticObject)(e.project.name).replace("#",""),action:t.action,title:t.title},skipPrompt:!0,launchFlpConfigAsSubGenerator:!0,projectPath:e.project.targetFolder,projectName:e.project.name}}return{cfOptions:t,flpOptions:r}}},43739:function(e,t,r){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(1628),i=o(r(98819)),n=r(73858),a=r(71017),p=r(57147),u=r(1937);class default_1 extends i.default{constructor(e,t){super(e,t),this.log((0,s.t)("INFO_GENERATOR_NAME_VERSION",{generatorName:this.rootGeneratorName(),generatorVersion:this.rootGeneratorVersion()}));try{if(this.argument("appConfig",{type:String,description:(0,s.t)("INFO_GENERATOR_ARG_APP_CONFIG"),required:!1}),!this.options.appConfig)throw Error((0,s.t)("ERROR_ARG_OR_OPTION_HEADLESS_GENERATOR"));let e;"object"==typeof this.options.appConfig?e=this.options.appConfig:(0,p.existsSync)(this.options.appConfig)?(e=JSON.parse((0,p.readFileSync)(this.options.appConfig,"utf-8")),this.absAppConfigPath=(0,a.resolve)(this.options.appConfig)):e=JSON.parse(this.options.appConfig);const{cfOptions:t,flpOptions:r}=(0,n.transformExtConfig)(e);this.deployConfigOpts=t,this.flpConfigOpts=r}catch(e){this.log((0,s.t)("ERROR_GENERATION_EXITING")),this.env.error(e)}}initializing(){this.deployConfigOpts&&this.composeWith((0,u.generatorNamespace)("cf"),{arguments:this.args,...Object.assign(this.options,this.deployConfigOpts)}),this.flpConfigOpts&&this.composeWith((0,u.generatorNamespace)("flp-config"),{arguments:this.args,...Object.assign(this.options,this.flpConfigOpts)})}end(){this.options.deleteFile&&(0,p.existsSync)(this.absAppConfigPath)&&(this.log((0,s.t)("INFO_DELETING_APPLICATION_CONFIG_FILE",{filepath:this.absAppConfigPath})),(0,p.unlinkSync)(this.absAppConfigPath))}}t.default=default_1},34409:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=34409,e.exports=t},70910:(e,t,r)=>{var o={"./Find-VisualStudio.cs":20183,"./build":17724,"./build.js":17724,"./clean":1658,"./clean.js":1658,"./configure":4748,"./configure.js":4748,"./create-config-gypi":98395,"./create-config-gypi.js":98395,"./find-node-directory":24159,"./find-node-directory.js":24159,"./find-python":29130,"./find-python.js":29130,"./find-visualstudio":17703,"./find-visualstudio.js":17703,"./install":25925,"./install.js":25925,"./list":44179,"./list.js":44179,"./node-gyp":55614,"./node-gyp.js":55614,"./process-release":75344,"./process-release.js":75344,"./rebuild":64187,"./rebuild.js":64187,"./remove":13103,"./remove.js":13103,"./util":55690,"./util.js":55690};function s(e){var t=i(e);return r(t)}function i(e){if(!r.o(o,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return o[e]}s.keys=function(){return Object.keys(o)},s.resolve=i,e.exports=s,s.id=70910},84679:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=84679,e.exports=t},12937:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=12937,e.exports=t},84397:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=84397,e.exports=t},54529:e=>{"use strict";e.exports=require("@opentelemetry/tracing")},85767:e=>{"use strict";e.exports=require("@sap/cds")},32220:e=>{"use strict";e.exports=require("applicationinsights-native-metrics")},43241:e=>{"use strict";e.exports=require("esprima")},74602:e=>{"use strict";e.exports=require("keytar")},66828:e=>{"use strict";e.exports=require("vscode")},39491:e=>{"use strict";e.exports=require("assert")},50852:e=>{"use strict";e.exports=require("async_hooks")},14300:e=>{"use strict";e.exports=require("buffer")},32081:e=>{"use strict";e.exports=require("child_process")},96206:e=>{"use strict";e.exports=require("console")},22057:e=>{"use strict";e.exports=require("constants")},6113:e=>{"use strict";e.exports=require("crypto")},9523:e=>{"use strict";e.exports=require("dns")},82361:e=>{"use strict";e.exports=require("events")},57147:e=>{"use strict";e.exports=require("fs")},73292:e=>{"use strict";e.exports=require("fs/promises")},13685:e=>{"use strict";e.exports=require("http")},95687:e=>{"use strict";e.exports=require("https")},98188:e=>{"use strict";e.exports=require("module")},41808:e=>{"use strict";e.exports=require("net")},22037:e=>{"use strict";e.exports=require("os")},71017:e=>{"use strict";e.exports=require("path")},77282:e=>{"use strict";e.exports=require("process")},85477:e=>{"use strict";e.exports=require("punycode")},63477:e=>{"use strict";e.exports=require("querystring")},14521:e=>{"use strict";e.exports=require("readline")},12781:e=>{"use strict";e.exports=require("stream")},71576:e=>{"use strict";e.exports=require("string_decoder")},39512:e=>{"use strict";e.exports=require("timers")},24404:e=>{"use strict";e.exports=require("tls")},76224:e=>{"use strict";e.exports=require("tty")},57310:e=>{"use strict";e.exports=require("url")},73837:e=>{"use strict";e.exports=require("util")},26144:e=>{"use strict";e.exports=require("vm")},59796:e=>{"use strict";e.exports=require("zlib")}},o={};function s(e){var t=o[e];if(void 0!==t)return t.exports;var i=o[e]={id:e,loaded:!1,exports:{}};return r[e].call(i.exports,i,i.exports,s),i.loaded=!0,i.exports}s.m=r,s.c=o,s.x=()=>{var e=s.O(void 0,[712,784,475,763],(()=>s(s.s=43739)));return e=s.O(e)},e=[],s.O=(t,r,o,i)=>{if(!r){var n=1/0;for(c=0;c<e.length;c++){for(var[r,o,i]=e[c],a=!0,p=0;p<r.length;p++)(!1&i||n>=i)&&Object.keys(s.O).every((e=>s.O[e](r[p])))?r.splice(p--,1):(a=!1,i<n&&(n=i));if(a){e.splice(c--,1);var u=o();void 0!==u&&(t=u)}}return t}i=i||0;for(var c=e.length;c>0&&e[c-1][2]>i;c--)e[c]=e[c-1];e[c]=[r,o,i]},s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce(((t,r)=>(s.f[r](e,t),t)),[])),s.u=e=>({475:"tools-suite-common-libs",712:"commonlibs",763:"app-gen-shared",784:"open-ux-shared"}[e]+"/index.js"),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),s.j=154,s.p="",(()=>{var e={154:1,190:1,176:1};s.O.require=t=>e[t];s.f.require=(t,r)=>{e[t]||(t=>{var r=t.modules,o=t.ids,i=t.runtime;for(var n in r)s.o(r,n)&&(s.m[n]=r[n]);i&&i(s);for(var a=0;a<o.length;a++)e[o[a]]=1;s.O()})(require("../"+s.u(t)))}})(),t=s.x,s.x=()=>(s.e(712),s.e(784),s.e(475),s.e(763),t());var i=s.x();module.exports=i})(); | ||
(()=>{var e,t,r={51617:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=51617,e.exports=t},39973:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=39973,e.exports=t},20230:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=20230,e.exports=t},20545:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=20545,e.exports=t},4297:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=4297,e.exports=t},75601:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=75601,e.exports=t},82626:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=82626,e.exports=t},37974:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=37974,e.exports=t},85858:(e,t,r)=>{var o={"./cat":43112,"./cat.js":43112,"./cd":86698,"./cd.js":86698,"./chmod":23986,"./chmod.js":23986,"./common":96816,"./common.js":96816,"./cp":80610,"./cp.js":80610,"./dirs":91972,"./dirs.js":91972,"./echo":16166,"./echo.js":16166,"./error":80609,"./error.js":80609,"./exec":52024,"./exec-child":69911,"./exec-child.js":69911,"./exec.js":52024,"./find":22261,"./find.js":22261,"./grep":56818,"./grep.js":56818,"./head":66412,"./head.js":66412,"./ln":91247,"./ln.js":91247,"./ls":5815,"./ls.js":5815,"./mkdir":70098,"./mkdir.js":70098,"./mv":74164,"./mv.js":74164,"./popd":99851,"./popd.js":99851,"./pushd":6978,"./pushd.js":6978,"./pwd":24044,"./pwd.js":24044,"./rm":44256,"./rm.js":44256,"./sed":43422,"./sed.js":43422,"./set":17444,"./set.js":17444,"./sort":53033,"./sort.js":53033,"./tail":50318,"./tail.js":50318,"./tempdir":16275,"./tempdir.js":16275,"./test":50021,"./test.js":50021,"./to":44915,"./to.js":44915,"./toEnd":13326,"./toEnd.js":13326,"./touch":57650,"./touch.js":57650,"./uniq":63019,"./uniq.js":63019,"./which":5483,"./which.js":5483};function s(e){var t=i(e);return r(t)}function i(e){if(!r.o(o,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return o[e]}s.keys=function(){return Object.keys(o)},s.resolve=i,e.exports=s,s.id=85858},1937:(e,t)=>{"use strict";var r,o,s;Object.defineProperty(t,"__esModule",{value:!0}),t.generatorNamespace=t.bundledRootGeneratorName=t.i18nKeySubTitle=t.i18nKeyTitle=t.ABAP_PACKAGE_SEARCH_MAX_RESULTS=t.API_BUSINESS_HUB_ENTERPRISE_PREFIX=t.MANAGED_XSUAA=t.UI5_URL=t.SRV_API_DEFAULT_URL=t.SRV_API=t.DEFAULT_MTA_DESTINATION=t.MTA_DESTINATION=t.XS_SECURITY=t.MTA_EXTENSION_FILE=t.MTA_YAML=t.PACKAGE_JSON=t.DEPLOY_MODE=t.UI5_YAML=t.UI5_DEPLOY=t.XS_APP=t.RIMRAF=t.RIMRAF_VERSION=t.MBT=t.MBT_VERSION=t.UI5_TASK_FLATTEN_LIB_VERSION=t.UI5_TASK_FLATTEN_LIB=t.ABAP_DEPLOY_TASK=t.WELCOME_FILE=t.DESTINATION_AUTHTYPE_NOAUTH=t.DESTINATION_AUTHTYPE_NOTFOUND=t.DESTINATION_CHOICE_DIRECT_SERVICE_BINDING=t.DESTINATION_CHOICE_NONE=t.RouterModuleType=t.HttpStatus=t.MTA_VERSION=t.MTA_DESCRIPTION=t.TargetName=t.CDS_ADD_MTA_COMMAND_ARGS=t.MTA_PKG=t.MTA_EXECUTABLE=t.CDS_PKG=t.CDS_EXECUTABLE=t.ROUTER_MODULE=t.CLOUD_FOUNDRY_FOLDER=t.FIORI_TOOLS_PROXY=t.DEPLOYER_MODULE_TYPE=t.ROUTER_MODULE_TYPE=void 0,t.ROUTER_MODULE_TYPE="approuter.nodejs",t.DEPLOYER_MODULE_TYPE="com.sap.html5.application-content",t.FIORI_TOOLS_PROXY="fiori-tools-proxy",t.CLOUD_FOUNDRY_FOLDER="cf",t.ROUTER_MODULE="router",t.CDS_EXECUTABLE="cds",t.CDS_PKG="@sap/cds-dk",t.MTA_EXECUTABLE="mta",t.MTA_PKG="mta",t.CDS_ADD_MTA_COMMAND_ARGS=["add","mta"],function(e){e.ABAP="abap",e.CF="cf"}(r||(t.TargetName=r={})),t.MTA_DESCRIPTION="Fiori elements app",t.MTA_VERSION="0.0.1",function(e){e[e.UNAUTHORIZED=401]="UNAUTHORIZED"}(o||(t.HttpStatus=o={})),function(e){e.Standard="Standard",e.Managed="Managed"}(s||(t.RouterModuleType=s={})),t.DESTINATION_CHOICE_NONE="NONE",t.DESTINATION_CHOICE_DIRECT_SERVICE_BINDING="DIRECT_SERVICE_BINDING",t.DESTINATION_AUTHTYPE_NOTFOUND="NotAvailable",t.DESTINATION_AUTHTYPE_NOAUTH="NoAuthentication",t.WELCOME_FILE="welcomeFile",t.ABAP_DEPLOY_TASK="deploy-to-abap",t.UI5_TASK_FLATTEN_LIB="ui5-task-flatten-library",t.UI5_TASK_FLATTEN_LIB_VERSION="0.2.5",t.MBT_VERSION="^1.2.18",t.MBT="mbt",t.RIMRAF_VERSION="^3.0.2",t.RIMRAF="rimraf",t.XS_APP="xs-app.json",t.UI5_DEPLOY="ui5-deploy.yaml",t.UI5_YAML="ui5.yaml",t.DEPLOY_MODE="deploy_mode",t.PACKAGE_JSON="package.json",t.MTA_YAML="mta.yaml",t.MTA_EXTENSION_FILE="mta-ext.mtaext",t.XS_SECURITY="xs-security.json",t.MTA_DESTINATION="%s-srv-api",t.DEFAULT_MTA_DESTINATION="fiori-default-srv-api",t.SRV_API="srv-api",t.SRV_API_DEFAULT_URL="${default-url}",t.UI5_URL="https://ui5.sap.com",t.MANAGED_XSUAA="managed:xsuaa",t.API_BUSINESS_HUB_ENTERPRISE_PREFIX="ABHE",t.ABAP_PACKAGE_SEARCH_MAX_RESULTS=50,t.i18nKeyTitle="flpTitle",t.i18nKeySubTitle="flpSubtitle",t.bundledRootGeneratorName="@sap/fiori:fiori-deployment";t.generatorNamespace=e=>`${t.bundledRootGeneratorName}_${e}`},73858:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transformExtConfig=void 0;const o=r(1628);t.transformExtConfig=function(e){let t,r;if(e.deployConfig?.deployTarget===o.DeployTarget.CF){const r=e.deployConfig;t={cfDestination:r.destinationName,destinationAuthType:r.destinationAuthType,addManagedApprouter:r.addToManagedAppRouter,launchDeployConfigAsSubGenerator:!0,projectPath:e.project.targetFolder,projectName:e.project.name,addMTADestination:r.addMTADestination,lcapModeOnly:r.lcapModeOnly,cloudServiceName:r.cloudServiceName}}if(e.flpConfig){const t=e.flpConfig;r={inboundConfig:{semanticObject:t.semanticObject||(0,o.getSemanticObject)(e.project.name).replace("#",""),action:t.action,title:t.title},skipPrompt:!0,launchFlpConfigAsSubGenerator:!0,projectPath:e.project.targetFolder,projectName:e.project.name}}return{cfOptions:t,flpOptions:r}}},43739:function(e,t,r){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(1628),i=o(r(98819)),n=r(73858),a=r(71017),p=r(57147),u=r(1937);class default_1 extends i.default{constructor(e,t){super(e,t),this.log((0,s.t)("INFO_GENERATOR_NAME_VERSION",{generatorName:this.rootGeneratorName(),generatorVersion:this.rootGeneratorVersion()}));try{if(this.argument("appConfig",{type:String,description:(0,s.t)("INFO_GENERATOR_ARG_APP_CONFIG"),required:!1}),!this.options.appConfig)throw Error((0,s.t)("ERROR_ARG_OR_OPTION_HEADLESS_GENERATOR"));let e;"object"==typeof this.options.appConfig?e=this.options.appConfig:(0,p.existsSync)(this.options.appConfig)?(e=JSON.parse((0,p.readFileSync)(this.options.appConfig,"utf-8")),this.absAppConfigPath=(0,a.resolve)(this.options.appConfig)):e=JSON.parse(this.options.appConfig);const{cfOptions:t,flpOptions:r}=(0,n.transformExtConfig)(e);this.deployConfigOpts=t,this.flpConfigOpts=r}catch(e){this.log((0,s.t)("ERROR_GENERATION_EXITING")),this.env.error(e)}}async initializing(){const e={AppGenLaunchSource:this.options.appConfig.telemetryData?.generationSourceName??s.LaunchSource.Headless,AppGenLaunchSourceVersion:this.options.appConfig.telemetryData?.generationSourceVersion??"Not Provided"};this.deployConfigOpts&&this.composeWith((0,u.generatorNamespace)("cf"),{arguments:this.args,...Object.assign(this.options,this.deployConfigOpts,{additionalTelemetryData:e})}),this.flpConfigOpts&&this.composeWith((0,u.generatorNamespace)("flp-config"),{arguments:this.args,...Object.assign(this.options,this.flpConfigOpts,{additionalTelemetryData:e})})}end(){this.options.deleteFile&&(0,p.existsSync)(this.absAppConfigPath)&&(this.log((0,s.t)("INFO_DELETING_APPLICATION_CONFIG_FILE",{filepath:this.absAppConfigPath})),(0,p.unlinkSync)(this.absAppConfigPath))}}t.default=default_1},34409:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=34409,e.exports=t},70910:(e,t,r)=>{var o={"./Find-VisualStudio.cs":20183,"./build":17724,"./build.js":17724,"./clean":1658,"./clean.js":1658,"./configure":4748,"./configure.js":4748,"./create-config-gypi":98395,"./create-config-gypi.js":98395,"./find-node-directory":24159,"./find-node-directory.js":24159,"./find-python":29130,"./find-python.js":29130,"./find-visualstudio":17703,"./find-visualstudio.js":17703,"./install":25925,"./install.js":25925,"./list":44179,"./list.js":44179,"./node-gyp":55614,"./node-gyp.js":55614,"./process-release":75344,"./process-release.js":75344,"./rebuild":64187,"./rebuild.js":64187,"./remove":13103,"./remove.js":13103,"./util":55690,"./util.js":55690};function s(e){var t=i(e);return r(t)}function i(e){if(!r.o(o,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return o[e]}s.keys=function(){return Object.keys(o)},s.resolve=i,e.exports=s,s.id=70910},84679:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=84679,e.exports=t},12937:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=12937,e.exports=t},84397:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=84397,e.exports=t},54529:e=>{"use strict";e.exports=require("@opentelemetry/tracing")},85767:e=>{"use strict";e.exports=require("@sap/cds")},32220:e=>{"use strict";e.exports=require("applicationinsights-native-metrics")},43241:e=>{"use strict";e.exports=require("esprima")},74602:e=>{"use strict";e.exports=require("keytar")},66828:e=>{"use strict";e.exports=require("vscode")},39491:e=>{"use strict";e.exports=require("assert")},50852:e=>{"use strict";e.exports=require("async_hooks")},14300:e=>{"use strict";e.exports=require("buffer")},32081:e=>{"use strict";e.exports=require("child_process")},96206:e=>{"use strict";e.exports=require("console")},22057:e=>{"use strict";e.exports=require("constants")},6113:e=>{"use strict";e.exports=require("crypto")},9523:e=>{"use strict";e.exports=require("dns")},82361:e=>{"use strict";e.exports=require("events")},57147:e=>{"use strict";e.exports=require("fs")},73292:e=>{"use strict";e.exports=require("fs/promises")},13685:e=>{"use strict";e.exports=require("http")},95687:e=>{"use strict";e.exports=require("https")},98188:e=>{"use strict";e.exports=require("module")},41808:e=>{"use strict";e.exports=require("net")},22037:e=>{"use strict";e.exports=require("os")},71017:e=>{"use strict";e.exports=require("path")},77282:e=>{"use strict";e.exports=require("process")},85477:e=>{"use strict";e.exports=require("punycode")},63477:e=>{"use strict";e.exports=require("querystring")},14521:e=>{"use strict";e.exports=require("readline")},12781:e=>{"use strict";e.exports=require("stream")},71576:e=>{"use strict";e.exports=require("string_decoder")},39512:e=>{"use strict";e.exports=require("timers")},24404:e=>{"use strict";e.exports=require("tls")},76224:e=>{"use strict";e.exports=require("tty")},57310:e=>{"use strict";e.exports=require("url")},73837:e=>{"use strict";e.exports=require("util")},26144:e=>{"use strict";e.exports=require("vm")},59796:e=>{"use strict";e.exports=require("zlib")}},o={};function s(e){var t=o[e];if(void 0!==t)return t.exports;var i=o[e]={id:e,loaded:!1,exports:{}};return r[e].call(i.exports,i,i.exports,s),i.loaded=!0,i.exports}s.m=r,s.c=o,s.x=()=>{var e=s.O(void 0,[712,784,475,763],(()=>s(s.s=43739)));return e=s.O(e)},e=[],s.O=(t,r,o,i)=>{if(!r){var n=1/0;for(c=0;c<e.length;c++){for(var[r,o,i]=e[c],a=!0,p=0;p<r.length;p++)(!1&i||n>=i)&&Object.keys(s.O).every((e=>s.O[e](r[p])))?r.splice(p--,1):(a=!1,i<n&&(n=i));if(a){e.splice(c--,1);var u=o();void 0!==u&&(t=u)}}return t}i=i||0;for(var c=e.length;c>0&&e[c-1][2]>i;c--)e[c]=e[c-1];e[c]=[r,o,i]},s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce(((t,r)=>(s.f[r](e,t),t)),[])),s.u=e=>({475:"tools-suite-common-libs",712:"commonlibs",763:"app-gen-shared",784:"open-ux-shared"}[e]+"/index.js"),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),s.j=154,s.p="",(()=>{var e={154:1,190:1,176:1};s.O.require=t=>e[t];s.f.require=(t,r)=>{e[t]||(t=>{var r=t.modules,o=t.ids,i=t.runtime;for(var n in r)s.o(r,n)&&(s.m[n]=r[n]);i&&i(s);for(var a=0;a<o.length;a++)e[o[a]]=1;s.O()})(require("../"+s.u(t)))}})(),t=s.x,s.x=()=>(s.e(712),s.e(784),s.e(475),s.e(763),t());var i=s.x();module.exports=i})(); |
@@ -1,1 +0,1 @@ | ||
(()=>{var e,t,r={51617:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=51617,e.exports=t},39973:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=39973,e.exports=t},20230:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=20230,e.exports=t},20545:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=20545,e.exports=t},4297:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=4297,e.exports=t},75601:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=75601,e.exports=t},82626:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=82626,e.exports=t},37974:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=37974,e.exports=t},85858:(e,t,r)=>{var n={"./cat":43112,"./cat.js":43112,"./cd":86698,"./cd.js":86698,"./chmod":23986,"./chmod.js":23986,"./common":96816,"./common.js":96816,"./cp":80610,"./cp.js":80610,"./dirs":91972,"./dirs.js":91972,"./echo":16166,"./echo.js":16166,"./error":80609,"./error.js":80609,"./exec":52024,"./exec-child":69911,"./exec-child.js":69911,"./exec.js":52024,"./find":22261,"./find.js":22261,"./grep":56818,"./grep.js":56818,"./head":66412,"./head.js":66412,"./ln":91247,"./ln.js":91247,"./ls":5815,"./ls.js":5815,"./mkdir":70098,"./mkdir.js":70098,"./mv":74164,"./mv.js":74164,"./popd":99851,"./popd.js":99851,"./pushd":6978,"./pushd.js":6978,"./pwd":24044,"./pwd.js":24044,"./rm":44256,"./rm.js":44256,"./sed":43422,"./sed.js":43422,"./set":17444,"./set.js":17444,"./sort":53033,"./sort.js":53033,"./tail":50318,"./tail.js":50318,"./tempdir":16275,"./tempdir.js":16275,"./test":50021,"./test.js":50021,"./to":44915,"./to.js":44915,"./toEnd":13326,"./toEnd.js":13326,"./touch":57650,"./touch.js":57650,"./uniq":63019,"./uniq.js":63019,"./which":5483,"./which.js":5483};function i(e){var t=o(e);return r(t)}function o(e){if(!r.o(n,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return n[e]}i.keys=function(){return Object.keys(n)},i.resolve=o,e.exports=i,i.id=85858},55079:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deleteCachedServiceProvider=t.getOrCreateServiceProvider=void 0;const n=r(62637),i=r(14425);let o,s;t.getOrCreateServiceProvider=async function(e,t){return o&&s?.isSameSystem&&s?.isSameSystem(e.url,e.client)||(o=e?.getConnection()&&e?.getConnection()?.cookies?await async function(e){if((0,i.isAppStudio)()){const t=await(0,i.listDestinations)(),r=e.config.destination;o=(0,n.createForDestination)({cookies:e.getConnection().cookies.toString()},t[r])}else o=e?.isScp()?(0,n.createForAbapOnCloud)({environment:n.AbapCloudEnvironment.Standalone,service:{url:e.url},ignoreCertErrors:!1,cookies:e.getConnection().cookies.toString()}):(0,n.createForAbap)({baseURL:e?.url,ignoreCertErrors:!1,cookies:e?.getConnection().cookies.toString()});return o}(e):await async function(e,t){if((0,i.isAppStudio)()){const r=await(0,i.listDestinations)(),s=e.config.destination,a=t.username?{auth:{username:t.username,password:t.password}}:{};o=(0,n.createForDestination)({...a},r[s])}else o=e?.isScp()?(0,n.createForAbapOnCloud)({refreshToken:e.credentials?.refreshToken,environment:n.AbapCloudEnvironment.Standalone,service:e.credentials?.serviceKeysContents}):(0,n.createForAbap)({baseURL:e?.url,ignoreCertErrors:!1,auth:{username:t.username??e?.username,password:t.password??e?.password}});return o}(e,t),s=e),o},t.deleteCachedServiceProvider=function(){o=void 0}},62283:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createTransportNumberFromService=void 0;const n=r(55079),i=r(62637);t.createTransportNumberFromService=async function(e,{credentials:t,system:r}){try{const o=await(0,n.getOrCreateServiceProvider)(r,t),s=await o.getAdtService(i.TransportRequestService);return await s.createTransportRequest(e)}catch(e){return null}}},98308:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(55079),t),i(r(24105),t),i(r(81547),t)},56821:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.listPackagesFromService=void 0;const n=r(55079),i=r(62637),o=r(1937);t.listPackagesFromService=async function(e,{credentials:t,system:r}){try{const s=await(0,n.getOrCreateServiceProvider)(r,t),a=await s.getAdtService(i.ListPackageService);return await a.listPackages({maxResults:o.ABAP_PACKAGE_SEARCH_MAX_RESULTS,phrase:e})}catch(e){return[]}}},24105:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTransportConfigInstance=void 0;const n=r(1937),i=r(31881),o=r(55079),s=r(73056),a=r(62637);class DummyTransportConfig{getPackage(){}getApplicationPrefix(){}isTransportRequired(){return!1}getDefaultTransport(){}getOperationsType(){}}class DefaultTransportConfig{constructor(){this.atoSettings={},this.defaultTransport=void 0}getDefaultTransport(){return this.defaultTransport}getPackage(){return this.atoSettings.devPackage}getApplicationPrefix(){return this.atoSettings.devPrefix}isTransportRequired(){return!!this.atoSettings.isTransportRequestRequired}getOperationsType(){return this.atoSettings?.operationsType}async init({credentials:e,system:t}){const r={};try{const n=await(0,o.getOrCreateServiceProvider)(t,e),i=await n.getAdtService(a.AtoService),s=await i.getAtoInfo();r.error=this.handleAtoResponse(s)}catch(e){if((0,o.deleteCachedServiceProvider)(),e.response?.status===n.HttpStatus.UNAUTHORIZED){e.response.headers["www-authenticate"]?.toLowerCase()?.startsWith("basic")&&(r.transportConfigNeedsCreds=!0)}else r.warning=e?.toString(),r.transportConfigNeedsCreds=!1}const i=!r.error&&!r.transportConfigNeedsCreds;return r.transportConfig=i?this:this.getDummyConfig(),r}handleAtoResponse(e){let t=!1;if(this.atoSettings=(0,s.uniformAtoFormat)(e),this.atoSettings.isConfigured&&"CUSTOMER"===this.atoSettings.tenantType&&"C"===this.atoSettings.operationsType){if(!this.atoSettings.isExtensibilityDevSystem)return(0,i.t)("ERROR_S4_SYSTEM_NOT_EXTENSIBLE");if(!this.atoSettings.devPrefix)return(0,i.t)("ERROR_INCORRECT_ATO_SETTINGS");t=!0,this.applyS4CDefaults()}t||(this.atoSettings={operationsType:this.atoSettings.operationsType})}applyS4CDefaults(){this.defaultTransport=DefaultTransportConfig.S4C_DEFAULT_TRANSPORT,this.atoSettings.isTransportRequestRequired=!1,this.atoSettings.devPackage=DefaultTransportConfig.S4C_DEFAULT_PACKAGE}getDummyConfig(){const e=new DummyTransportConfig;return e.getOperationsType=this.getOperationsType,e}}DefaultTransportConfig.S4C_DEFAULT_TRANSPORT="",DefaultTransportConfig.S4C_DEFAULT_PACKAGE="TEST_YY1_DEFAULT",t.getTransportConfigInstance=async function({scp:e,credentials:t={},system:r}){return e?{transportConfig:new DummyTransportConfig}:(new DefaultTransportConfig).init({credentials:t,system:r})}},81547:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transportName=t.getTransportListFromService=void 0;const n=r(55079),i=r(62637);t.getTransportListFromService=async function(e,t,{credentials:r,system:o}){try{const s=await(0,n.getOrCreateServiceProvider)(o,r),a=await s.getAdtService(i.TransportChecksService);return(await a.getTransportRequests(e,t)).map((e=>{const t=e.description.replace(/^(.{20}[^\s]*).*/,"$1...");return{transportReqNumber:e.transportNumber,transportReqDescription:t}}))}catch(e){return[]}};t.transportName=e=>({name:e.transportReqDescription?`${e.transportReqNumber} (${e.transportReqDescription})`:`${e.transportReqNumber}`,value:e.transportReqNumber})},73056:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useCreateTrDuringDeploy=t.CREATE_TR_DURING_DEPLOY=t.getTargetSystemChoices=t.isLocalPackage=t.uniformAtoFormat=t.isScp=t.handleProjectDoesNotExist=t.abapDeployConfigExists=t.indexHtmlExists=t.readExistingDeployTaskConfig=t.initBaseConfig=t.getSuggestedClient=t.getUrlAnswer=void 0;const n=r(1937),i=r(31881),o=r(68802),s=r(43895),a=r(28033),_=r(71017);t.getUrlAnswer=function(e,t){if(e.isAppStudio&&t?.destination===e?.backendConfig?.destination)return e.answers.url;{let e=t.targetSystem;return t.targetSystem&&"NoUrlSelected"!==t.targetSystem||!t.url||(e=t.url),e}},t.getSuggestedClient=function(e){let t;const r=e.scripts?.start;return r&&r.includes("sap-client")&&(t=r.split("sap-client")[1].match(/\d{1,3}/g).map(String)[0]),t},t.initBaseConfig=function(e,t){t.baseConfig=(0,o.readYaml)(e);const r=t.baseConfig.toJSON();t.baseMetadataName=r.metadata?.name,t.backendConfig=r?.server?.customMiddleware?.find((e=>e?.name===n.FIORI_TOOLS_PROXY))?.configuration?.backend?.[0]},t.readExistingDeployTaskConfig=function(e){if(e)try{const t=(0,o.readYaml)(e)?.toJSON();return t?.builder?.customTasks?.find((e=>e.name===n.ABAP_DEPLOY_TASK))?.configuration}catch(e){return}},t.indexHtmlExists=async function(e,t){const r=await(0,a.getUi5CustomWebappPath)(t),n=(0,_.join)(t,r,"index.html");return e.exists(n)},t.abapDeployConfigExists=function(e,t){return e.exists(t)},t.handleProjectDoesNotExist=function(e){const t=i.ErrorMessages.fileDoesNotExist(e.destinationPath(e.options.base));throw e.abort=!0,(0,i.handleErrorMessage)(e,e.appWizard,t),i.ErrorMessages.ABORT_SIGNAL},t.isScp=function(e,t){for(const r in t){const n=t[r];if(n.value===e)return n.scp}return!1},t.uniformAtoFormat=function(e){return Object.keys(e).includes("developmentPackage")&&(e.devPackage=e.developmentPackage),Object.keys(e).includes("developmentPrefix")&&(e.devPrefix=e.developmentPrefix),Object.keys(e).includes("isExtensibilityDevelopmentSystem")&&(e.isExtensibilityDevSystem=e.isExtensibilityDevelopmentSystem),e},t.isLocalPackage=function(e){return/^[$LlTt]/.test(e)},t.getTargetSystemChoices=async function(e,t){const r=[];if(!(0,s.isAppStudio)()){let n=!0;r.push({name:(0,i.t)("PROMPT_ABAP_ENTER_TARGET"),value:"NoUrlSelected"}),t?.unSaved&&(r.push({name:`${t.getDisplayName()} (Source system)`,value:t.url,client:t.client,isDefault:!0,scp:t.isScp()}),n=!1);const o=await(0,i.getSapSystems)();Object.values(o).forEach((t=>{let i=!1;n&&(i=t.url===e?.url&&(t.client||"")===(e?.client||"")),r.push({name:i?`${t.getDisplayName()} (Source system)`:t.getDisplayName(),value:t.url,client:t.client,isDefault:i,scp:t.isScp()})}))}return r},t.CREATE_TR_DURING_DEPLOY="REPLACE_WITH_TRANSPORT",t.useCreateTrDuringDeploy=function(e){return e.existingDeployTaskConfig?.app?.transport===t.CREATE_TR_DURING_DEPLOY}},81741:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigGenerators=void 0;const i=r(31881),o=n(r(98819)),s=n(r(24852)),a=r(66814);(0,s.default)(o.default.prototype,a);const _=r(25184),c=r(1628),u=r(1937);var d;!function(e){e.deploy="deploy",e.flp="flp",e.server="server"}(d||(t.ConfigGenerators=d={}));class default_1 extends o.default{constructor(e,t){super(e,t,{unique:"namespace"}),this.launchDeployConfigAsSubGenerator=t.launchDeployConfigAsSubGenerator,this.launchFlpConfigAsSubGenerator=t.launchFlpConfigAsSubGenerator,this.isServerConfigOnly=this.options?.data?.serverConfigOnly&&!0===this.options.data.serverConfigOnly,this._initSteps(this.isServerConfigOnly),this.answers={inputDestinationRoot:"",selectedGenerator:d.deploy},this.appWizard=t.appWizard||_.AppWizard.create(t)}_initSteps(e){this.wizardSteps=e?[{name:(0,i.t)("STEP_CONFIG"),description:(0,i.t)("STEP_CONFIG_DESC")}]:[{name:(0,i.t)("STEP_PREPARE"),description:(0,i.t)("STEP_PREPARE_DESC")},{name:(0,i.t)("STEP_DEPLOY_TARGET"),description:(0,i.t)("STEP_DEPLOY_TARGET_DESC"),dependency:(0,i.t)("STEP_PREPARE")},{name:(0,i.t)("STEP_CONFIG"),description:(0,i.t)("STEP_CONFIG_DESC")}],this.yeomanUiStepConfig=(0,c.getYeomanUiStepConfig)(this.wizardSteps),this.wizardStepObj=this.yeomanUiStepConfig.activeSteps,this.setPromptsCallback=e=>{this.wizardStepObj&&this.wizardStepObj.setCallback(e)}}async prompting(){this.launchDeployConfigAsSubGenerator||this.launchFlpConfigAsSubGenerator?this._loadSubgeneratorForParentGenerator():this._loadServerConfigGenerator()}_loadSubgeneratorForParentGenerator(){if(this.launchDeployConfigAsSubGenerator&&this.composeWith((0,u.generatorNamespace)("deploy"),{...this.options,appWizard:this.appWizard}),this.launchFlpConfigAsSubGenerator){const e={...this.options,...this.options.flpConfigOptions};this.composeWith((0,u.generatorNamespace)("flp-config"),{...e,appWizard:this.appWizard})}}_loadServerConfigGenerator(){this.composeWith((0,u.generatorNamespace)("server"),{...this.options,destinationRoot:this.answers.inputDestinationRoot,appWizard:this.appWizard})}}t.default=default_1},1937:(e,t)=>{"use strict";var r,n,i;Object.defineProperty(t,"__esModule",{value:!0}),t.generatorNamespace=t.bundledRootGeneratorName=t.i18nKeySubTitle=t.i18nKeyTitle=t.ABAP_PACKAGE_SEARCH_MAX_RESULTS=t.API_BUSINESS_HUB_ENTERPRISE_PREFIX=t.MANAGED_XSUAA=t.UI5_URL=t.SRV_API_DEFAULT_URL=t.SRV_API=t.DEFAULT_MTA_DESTINATION=t.MTA_DESTINATION=t.XS_SECURITY=t.MTA_EXTENSION_FILE=t.MTA_YAML=t.PACKAGE_JSON=t.DEPLOY_MODE=t.UI5_YAML=t.UI5_DEPLOY=t.XS_APP=t.RIMRAF=t.RIMRAF_VERSION=t.MBT=t.MBT_VERSION=t.UI5_TASK_FLATTEN_LIB_VERSION=t.UI5_TASK_FLATTEN_LIB=t.ABAP_DEPLOY_TASK=t.WELCOME_FILE=t.DESTINATION_AUTHTYPE_NOAUTH=t.DESTINATION_AUTHTYPE_NOTFOUND=t.DESTINATION_CHOICE_DIRECT_SERVICE_BINDING=t.DESTINATION_CHOICE_NONE=t.RouterModuleType=t.HttpStatus=t.MTA_VERSION=t.MTA_DESCRIPTION=t.TargetName=t.CDS_ADD_MTA_COMMAND_ARGS=t.MTA_PKG=t.MTA_EXECUTABLE=t.CDS_PKG=t.CDS_EXECUTABLE=t.ROUTER_MODULE=t.CLOUD_FOUNDRY_FOLDER=t.FIORI_TOOLS_PROXY=t.DEPLOYER_MODULE_TYPE=t.ROUTER_MODULE_TYPE=void 0,t.ROUTER_MODULE_TYPE="approuter.nodejs",t.DEPLOYER_MODULE_TYPE="com.sap.html5.application-content",t.FIORI_TOOLS_PROXY="fiori-tools-proxy",t.CLOUD_FOUNDRY_FOLDER="cf",t.ROUTER_MODULE="router",t.CDS_EXECUTABLE="cds",t.CDS_PKG="@sap/cds-dk",t.MTA_EXECUTABLE="mta",t.MTA_PKG="mta",t.CDS_ADD_MTA_COMMAND_ARGS=["add","mta"],function(e){e.ABAP="abap",e.CF="cf"}(r||(t.TargetName=r={})),t.MTA_DESCRIPTION="Fiori elements app",t.MTA_VERSION="0.0.1",function(e){e[e.UNAUTHORIZED=401]="UNAUTHORIZED"}(n||(t.HttpStatus=n={})),function(e){e.Standard="Standard",e.Managed="Managed"}(i||(t.RouterModuleType=i={})),t.DESTINATION_CHOICE_NONE="NONE",t.DESTINATION_CHOICE_DIRECT_SERVICE_BINDING="DIRECT_SERVICE_BINDING",t.DESTINATION_AUTHTYPE_NOTFOUND="NotAvailable",t.DESTINATION_AUTHTYPE_NOAUTH="NoAuthentication",t.WELCOME_FILE="welcomeFile",t.ABAP_DEPLOY_TASK="deploy-to-abap",t.UI5_TASK_FLATTEN_LIB="ui5-task-flatten-library",t.UI5_TASK_FLATTEN_LIB_VERSION="0.2.5",t.MBT_VERSION="^1.2.18",t.MBT="mbt",t.RIMRAF_VERSION="^3.0.2",t.RIMRAF="rimraf",t.XS_APP="xs-app.json",t.UI5_DEPLOY="ui5-deploy.yaml",t.UI5_YAML="ui5.yaml",t.DEPLOY_MODE="deploy_mode",t.PACKAGE_JSON="package.json",t.MTA_YAML="mta.yaml",t.MTA_EXTENSION_FILE="mta-ext.mtaext",t.XS_SECURITY="xs-security.json",t.MTA_DESTINATION="%s-srv-api",t.DEFAULT_MTA_DESTINATION="fiori-default-srv-api",t.SRV_API="srv-api",t.SRV_API_DEFAULT_URL="${default-url}",t.UI5_URL="https://ui5.sap.com",t.MANAGED_XSUAA="managed:xsuaa",t.API_BUSINESS_HUB_ENTERPRISE_PREFIX="ABHE",t.ABAP_PACKAGE_SEARCH_MAX_RESULTS=50,t.i18nKeyTitle="flpTitle",t.i18nKeySubTitle="flpSubtitle",t.bundledRootGeneratorName="@sap/fiori:fiori-deployment";t.generatorNamespace=e=>`${t.bundledRootGeneratorName}_${e}`},40120:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debug=void 0;const n=r(1628);t.debug=function(e,t){(0,n.getPlatform)()!==n.PLATFORMS.CLI&&e(`[YUI DEBUG] ${t}`)}},42899:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findSapSystem=t.getSapSystems=t.generateDestinationName=t.getCfDestinationChoices=void 0;const n=r(77090);let i={};async function o(e=!0){return e&&0!==Object.keys(i).length||(i=await(0,n.listSAPSystems)()),i}t.getCfDestinationChoices=async function(e=!1){const t=await o();return Object.values(t).map((t=>({name:`${t.name}${t.isScp()?"(SCP)":""} - ${t.url}`,value:e?t:t.name,scp:t.isScp(),url:t.url})))},t.generateDestinationName=function(e,t){return`${e}_${t.replace(/(^\/)|(\/$)/g,"").replace(/\//g,"_")}`},t.getSapSystems=o,t.findSapSystem=function(e,t){return t?.["string"==typeof e?e:e.name]}},35117:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorMessages=void 0;const n=r(1937),i=r(28212),o=(e,t)=>(0,i.t)("ERROR_CANNOT_FIND_BINARY",{bin:e,pkg:t});class ErrorMessages{}t.ErrorMessages=ErrorMessages,ErrorMessages.ABORT_SIGNAL="ABORT_SIGNAL",ErrorMessages.noManifest=(0,i.t)("ERROR_NO_MANIFEST"),ErrorMessages.noAppName=(0,i.t)("ERROR_NO_APPNAME"),ErrorMessages.noCdsBin=o(n.CDS_EXECUTABLE,n.CDS_PKG),ErrorMessages.noMtaBin=o(n.MTA_EXECUTABLE,n.MTA_PKG),ErrorMessages.noMta=(0,i.t)("ERROR_NO_MTA"),ErrorMessages.noPath=(0,i.t)("ERROR_NO_PATH"),ErrorMessages.noMtaId=(0,i.t)("ERROR_NO_MTA_ID"),ErrorMessages.invalidMtaId=(0,i.t)("ERROR_INVALID_MTA_ID"),ErrorMessages.capDeploymentnoMta=(0,i.t)("ERROR_CAP_DEPLOYMENT_NO_MTA"),ErrorMessages.mtaIdAlreadyExist=e=>(0,i.t)("ERROR_MTA_ID_ALREADY_EXIST",{destinationRoot:e}),ErrorMessages.noMtaInRoot=e=>(0,i.t)("ERROR_NO_MTA_ROOT",{mtaFileName:n.MTA_YAML,root:e}),ErrorMessages.unrecognizedTarget=e=>(0,i.t)("ERROR_UNRECOGNIZED_TARGET",{target:e}),ErrorMessages.cannotReadUi5Config=e=>(0,i.t)("ERROR_CANNOT_READ_UI5_CONFIG",{reason:e}),ErrorMessages.fileDoesNotExist=e=>(0,i.t)("ERROR_FILE_NOT_EXIST",{filePath:e}),ErrorMessages.folderDoesNotExist=e=>(0,i.t)("ERROR_FOLDER_NOT_EXIST",{filePath:e}),ErrorMessages.invalidClient=e=>(0,i.t)("ERROR_INVALID_CLIENT",{client:e}),ErrorMessages.invalidURL=e=>(0,i.t)("ERROR_INVALID_URL",{input:e})},68802:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.writeUi5RepositoryFiles=t.writeUi5RepositoryFile=t.getYamlType=t.readYaml=t.addUi5Dependency=t.addPackageDevDependency=t.updatePackageScript=t.dirExists=t.BUILD_MTA_SCRIPT_TEMP=t.DEPLOY_MTA_SCRIPT_TEMP=t.UNDEPLOY_MTA_SCRIPT_TEMP=t.DEPLOY_MTA_SCRIPT=t.BUILD_MTA_SCRIPT=t.BUILD_SCRIPT=void 0;const a=r(57147),_=r(71017),c=o(r(52375)),u=r(1937),d=s(r(37865)),l=s(r(26692)),E=r(28033);t.BUILD_SCRIPT="ui5 build preload --clean-dest --config ui5-deploy.yaml --include-task=generateCachebusterInfo",t.BUILD_MTA_SCRIPT="rimraf resources mta_archives && mbt build";t.DEPLOY_MTA_SCRIPT=(e=[])=>"fiori cfDeploy"+(e.length>0?` ${e.join(" ")}`:"");t.UNDEPLOY_MTA_SCRIPT_TEMP=e=>`cf undeploy ${e} --delete-services --delete-service-keys --delete-service-brokers`;function p(e){return c.parseDocument((0,a.readFileSync)(e,"utf-8"))}t.DEPLOY_MTA_SCRIPT_TEMP=(e=[])=>`cf deploy mta_archives/archive.mtar ${e.length>0?`${e.join(" ")} `:""}--retries 1`,t.BUILD_MTA_SCRIPT_TEMP="rimraf resources mta_archives && mbt build --mtar archive",t.dirExists=function(e){try{return(0,a.statSync)(e)?.isDirectory()}catch{return!1}},t.updatePackageScript=function(e,t,r,n,i=!1){const o=(0,_.join)(e,u.PACKAGE_JSON),s=JSON.parse((0,a.readFileSync)(o,"utf-8"));if(s.scripts||(s.scripts={}),s.scripts[t]=r,n){const{devDependencies:e={},ui5:t={}}=s;s.devDependencies=e,i&&(s.ui5={...t,dependencies:t.dependencies??[]});for(const e in n)s.devDependencies[e]||(s.devDependencies[e]=n[e]),i&&!s.ui5.dependencies.find((t=>t===e))&&s.ui5.dependencies.push(e)}(0,a.writeFileSync)(o,JSON.stringify(s,null,4))},t.addPackageDevDependency=function(e,t,r){const n=(0,_.join)(e,u.PACKAGE_JSON),i=JSON.parse((0,a.readFileSync)(n,"utf-8"));i.devDependencies=i.devDependencies||{},i.devDependencies[t]||(i.devDependencies[t]=r),(0,a.writeFileSync)(n,JSON.stringify(i,null,4))},t.addUi5Dependency=function(e,t){const r=(0,_.join)(e,u.PACKAGE_JSON),n=JSON.parse((0,a.readFileSync)(r,"utf-8"));n.ui5=n.ui5||{},n.ui5.dependencies=n.ui5.dependencies||[],n.ui5.dependencies.includes(t)||n.ui5.dependencies.push(t),(0,a.writeFileSync)(r,JSON.stringify(n,null,4))},t.readYaml=p,t.getYamlType=function(e,t){let r;const n=(0,_.join)(e,t);if((0,a.existsSync)(n)){r=p(n).toJSON().type}return r};t.writeUi5RepositoryFile=(e,t,r)=>{const n=(0,_.join)(e,t);let i;(0,a.existsSync)(n)?(i=(0,a.readFileSync)(n,"utf-8"),i.includes(r)||(i=`${i}\n${r}`)):i=r,(0,a.writeFileSync)(n,i)};t.writeUi5RepositoryFiles=async e=>{const r=(0,_.join)(e,await(0,E.getUi5CustomWebappPath)(e));(await(0,d.default)((0,l.default)((0,_.join)(r,"/**/*.ts"))))?.length>0&&(0,t.writeUi5RepositoryFile)(r,".Ui5RepositoryTextFiles","^.*.ts$")}},28212:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.t=t.addTranslations=t.initI18n=void 0;const i=n(r(73577)),o=n(r(91046)),s="deploy";async function a(){await i.default.init({resources:{en:{[s]:o.default}},lng:"en",fallbackLng:"en",defaultNS:s,ns:[s]})}t.initI18n=a,t.addTranslations=function(e,t){i.default.addResources("en",t,e)},t.t=function(e,t){return t={...t,interpolation:{...t?.interpolation,escapeValue:!1}},i.default.t(e,t)},a()},31881:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.t=t.ErrorMessages=t.isS4Installed=t.loadManifest=t.parseTarget=t.getEnvApiHubConfig=t.isAppStudio=t.CF_ENV=t.handleErrorMessage=t.bail=t.toMtaModuleName=void 0;const o=r(1628),s=r(40120),a=r(25184),_=r(71017),c=r(16484),u=r(28033),d=r(35117);function l({errorMessage:e}){throw new Error(e)}var E;t.toMtaModuleName=function(e){return e.replace(/[`~!@#$%^&*()_|+\-=?;:'",.<>]/gi,"")},t.bail=l,t.handleErrorMessage=function(e,t,r){(0,o.getPlatform)()===o.PLATFORMS.CLI?l({errorMessage:r}):(e.transportConfigError=r,(0,s.debug)(e.log,r),t?.showError(r,a.MessageType.notification))},function(e){e.H2O_URL="H2O_URL"}(E||(t.CF_ENV=E={})),t.isAppStudio=function(){return!!process.env[E.H2O_URL]},t.getEnvApiHubConfig=function(){const e=process.env[o.API_HUB_API_KEY],t=process.env[o.API_HUB_TYPE];return e?{apiHubKey:e,apiHubType:"API_HUB_ENTERPRISE"===t?"API_HUB_ENTERPRISE":"API_HUB"}:void 0},t.parseTarget=function(e,t){let r;return e&&("string"==typeof e?r=e:Array.isArray(e)&&(r=e?.[0])),r||(r=t.target),r},t.loadManifest=async function(e){let t;try{t=new c.Manifest((0,_.join)(e,await(0,u.getUi5CustomWebappPath)(e)))}catch{l({errorMessage:d.ErrorMessages.noManifest})}return t?.appId||l({errorMessage:d.ErrorMessages.noAppName}),t},t.isS4Installed=async function(e){return(await(0,o.findInstalledPackages)("@sapux/s4-fiori-gen-ext",{keyword:"fiori-generator-extension",vscWorkspaceConfig:e})).length>0};var p=r(35117);Object.defineProperty(t,"ErrorMessages",{enumerable:!0,get:function(){return p.ErrorMessages}});var T=r(28212);Object.defineProperty(t,"t",{enumerable:!0,get:function(){return T.t}}),i(r(40120),t),i(r(74475),t),i(r(42899),t)},16484:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Manifest=t.idPropertyPath=t.inboundsPropertyPath=t.crossNavigationPropertyPath=void 0;const s=o(r(57147)),a=o(r(71017)),_="sap.app";t.crossNavigationPropertyPath=[_,"crossNavigation"],t.inboundsPropertyPath=[...t.crossNavigationPropertyPath,"inbounds"],t.idPropertyPath=[_,"id"];t.Manifest=class Manifest{constructor(e){this.CONFIG_FILE="manifest.json",this.manifestPath=e,this.contents=JSON.parse((0,s.readFileSync)(this.manifestPath).toString())}set manifestPath(e){this._appPath=a.join(e,this.CONFIG_FILE)}get manifestPath(){return this._appPath}get appId(){return this.contents?.["sap.app"]?.id}get applicationVersion(){return this.contents["sap.app"]?.applicationVersion?.version}get dataSources(){return this.contents["sap.app"].dataSources??{}}get mainService(){const e=this.contents["sap.ovp"]?this.contents["sap.ovp"].globalFilterModel:"",t=this.contents["sap.ui5"]&&this.contents["sap.ui5"].models&&this.contents["sap.ui5"].models[e]?this.contents["sap.ui5"].models[e].dataSource:void 0;return this.dataSources[t]}get inbound(){const e=this.contents["sap.app"].crossNavigation?.inbounds;return e?{name:Object.keys(e)?.[0],inbound:Object.values(e)?.[0]}:{}}set crossNavigation(e){this.contents["sap.app"].crossNavigation=e}get crossNavigation(){return this.contents["sap.app"].crossNavigation}get sapCloud(){return this.contents["sap.cloud"]}set sapCloud(e){this.contents["sap.cloud"]=e}get i18nFilePath(){return this.contents["sap.app"].i18n}write(e){e?.readJSON(this.manifestPath)?e.writeJSON(this.manifestPath,this.contents,null,4):s.default.writeFileSync(this.manifestPath,JSON.stringify(this.contents,null,4))}}},74475:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.listPackages=t.createTransportNumber=t.getTransportList=t.initTransportConfig=t.validateAppDescription=t.validateAppName=t.isValidClient=t.notExistsValidateClient=t.isValidURL=void 0;const n=r(31881),i=r(77090),o=r(98308),s=r(62283),a=r(56821);async function _(e,t){let r;return t?.isSameSystem?.(e.url,e.client)||t?.config?.destination&&e?.destination===t?.config?.destination&&t?.getConnection()?r=t:e.destination?e.destination&&(r=(0,i.newSapSystemForDestinaton)({destination:e.destination})):r=await async function(e,t){try{return await(0,i.getSapSystem)(e,t?.toString())}catch{return}}(e.url,e.client),r}function c(e){const t=e?.trim()||"";return""===t||!!t.match(/^[0-9]{3}$/)}t.isValidURL=function(e){try{const t=new URL(e);return!!t.protocol&&!!t.host}catch{return!1}},t.notExistsValidateClient=function(e){return!e.client||e.client&&!c(e.client)},t.isValidClient=c,t.validateAppName=function(e,t){const r=[],i=e?e.trim().length:0;if(i)if(e.split("/").length-1>=3)r.push((0,n.t)("PROMPT_ABAP_INVALID_NAMESPACE"));else if(e.match(/^\/.*\/\w*$/g)){const t=e.split("/");let i;t[1].length>10&&(i=(0,n.t)("PROMPT_ABAP_INVALID_NAMESPACE_LENGTH",{length:t[1].length})),t[2].length>15&&(i=`${i?i+", ":""}${(0,n.t)("PROMPT_ABAP_INVALID_APPNAME_LENGTH",{length:t[2].length})}`),i&&r.push(i)}else i>15&&r.push((0,n.t)("PROMPT_ABAP_INVALID_APPNAME_LENGTH",{length:i}));else r.push((0,n.t)("PROMPT_ABAP_APPNAME_REQUIRED"));return i&&(t&&!e?.toUpperCase()?.startsWith(t.toUpperCase())&&r.push((0,n.t)("PROMPT_ABAP_INVALID_APPNAME",{prefix:t})),e.match(/^[A-Za-z0-9_/]*$/)||r.push((0,n.t)("ERROR_CHARACTERS_FORBIDDEN_IN_APP_NAME"))),{valid:0===r.length,errorMessages:r.length?r.join("\n")+(r.length>1?"\n":""):void 0}},t.validateAppDescription=function(e){const t=[];return e.length>60&&t.push((0,n.t)("PROMPT_ABAP_APPDESC_LENGTH")),{valid:0===t.length,errorMessages:t.length?t.join("\n")+(t.length>1?"\n":""):void 0}},t.initTransportConfig=async function({scp:e,url:t,client:r,destination:n,credentials:i,sapSystem:s,errorHandler:a}){let c={};if(!t&&!n)return c;const u={url:t,client:r,destination:n};try{const t=await _(u,s);c=await(0,o.getTransportConfigInstance)({scp:e,credentials:i,system:t})}catch(e){c.error=e}return c.error&&a(c.error),c},t.getTransportList=async function(e,t,{url:r,client:n,destination:i,credentials:s,sapSystem:a}){if(!r&&!i)return[];const c={url:r,client:n,destination:i},u=await _(c,a),d=await(0,o.getTransportListFromService)(e,t,{system:u,credentials:s});return 1===d.length&&""===d[0].transportReqNumber?[]:d},t.createTransportNumber=async function(e,{url:t,client:r,destination:n,credentials:i,sapSystem:o}){if(!t&&!n)return null;const a={url:t,client:r,destination:n},c=await _(a,o);return(0,s.createTransportNumberFromService)(e,{system:c,credentials:i})},t.listPackages=async function(e,{url:t,client:r,destination:n,credentials:i,sapSystem:o}){if(!t&&!n)return[];const s={url:t,client:r,destination:n},c=await _(s,o);return(0,a.listPackagesFromService)(e,{system:c,credentials:i})}},34409:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=34409,e.exports=t},70910:(e,t,r)=>{var n={"./Find-VisualStudio.cs":20183,"./build":17724,"./build.js":17724,"./clean":1658,"./clean.js":1658,"./configure":4748,"./configure.js":4748,"./create-config-gypi":98395,"./create-config-gypi.js":98395,"./find-node-directory":24159,"./find-node-directory.js":24159,"./find-python":29130,"./find-python.js":29130,"./find-visualstudio":17703,"./find-visualstudio.js":17703,"./install":25925,"./install.js":25925,"./list":44179,"./list.js":44179,"./node-gyp":55614,"./node-gyp.js":55614,"./process-release":75344,"./process-release.js":75344,"./rebuild":64187,"./rebuild.js":64187,"./remove":13103,"./remove.js":13103,"./util":55690,"./util.js":55690};function i(e){var t=o(e);return r(t)}function o(e){if(!r.o(n,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return n[e]}i.keys=function(){return Object.keys(n)},i.resolve=o,e.exports=i,i.id=70910},84679:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=84679,e.exports=t},72869:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=72869,e.exports=t},12937:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=12937,e.exports=t},84397:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=84397,e.exports=t},54529:e=>{"use strict";e.exports=require("@opentelemetry/tracing")},85767:e=>{"use strict";e.exports=require("@sap/cds")},32220:e=>{"use strict";e.exports=require("applicationinsights-native-metrics")},43241:e=>{"use strict";e.exports=require("esprima")},74602:e=>{"use strict";e.exports=require("keytar")},66828:e=>{"use strict";e.exports=require("vscode")},39491:e=>{"use strict";e.exports=require("assert")},50852:e=>{"use strict";e.exports=require("async_hooks")},14300:e=>{"use strict";e.exports=require("buffer")},32081:e=>{"use strict";e.exports=require("child_process")},96206:e=>{"use strict";e.exports=require("console")},22057:e=>{"use strict";e.exports=require("constants")},6113:e=>{"use strict";e.exports=require("crypto")},9523:e=>{"use strict";e.exports=require("dns")},82361:e=>{"use strict";e.exports=require("events")},57147:e=>{"use strict";e.exports=require("fs")},73292:e=>{"use strict";e.exports=require("fs/promises")},13685:e=>{"use strict";e.exports=require("http")},95687:e=>{"use strict";e.exports=require("https")},98188:e=>{"use strict";e.exports=require("module")},41808:e=>{"use strict";e.exports=require("net")},22037:e=>{"use strict";e.exports=require("os")},71017:e=>{"use strict";e.exports=require("path")},77282:e=>{"use strict";e.exports=require("process")},85477:e=>{"use strict";e.exports=require("punycode")},63477:e=>{"use strict";e.exports=require("querystring")},14521:e=>{"use strict";e.exports=require("readline")},12781:e=>{"use strict";e.exports=require("stream")},71576:e=>{"use strict";e.exports=require("string_decoder")},39512:e=>{"use strict";e.exports=require("timers")},24404:e=>{"use strict";e.exports=require("tls")},76224:e=>{"use strict";e.exports=require("tty")},57310:e=>{"use strict";e.exports=require("url")},73837:e=>{"use strict";e.exports=require("util")},26144:e=>{"use strict";e.exports=require("vm")},59796:e=>{"use strict";e.exports=require("zlib")},91046:e=>{"use strict";e.exports=JSON.parse('{"DEPLOYMENT_CONFIG_GENERATOR":"Deployment Configuration","DEPLOYMENT_CONFIG_GENERATOR_DESC":"Deployment Configuration","DEPLOYMENT_CONFIG":"Deploy Configuration","DEPLOYMENT_CONFIG_DESC":"Create/Update deployment configuration","DEFAULT_PACKAGE":"$tmp","DEFAULT_ABAP_DESCRIPTION":"ABAP Deployment.","DEFAULT_MTA_DESCRIPTION":"Generated by Fiori Tools","FLP_CONFIG":"FLP Configuration","FLP_CONFIG_DESC":"Create/Update Fiori Launchpad configuration","SERVER_CONFIG":"Application Router Configuration","SERVER_CONFIG_DESC":"Configure the Cloud Foundry application router","STEP_PREPARE":"Prepare","STEP_PREPARE_DESC":"Select project location and choose configuration generator","STEP_DEPLOY_TARGET":"Deploy Target","STEP_DEPLOY_TARGET_DESC":"Select backend type: ABAP or Cloud Foundry","STEP_CONFIG":"Project Configuration","STEP_CONFIG_DESC":"Create or update your project configuration","PROMPT_YUI_PROJECT_FOLDER":"Choose project folder","PROMPT_YUI_SELECT_GENERATOR":"Select a configuration generator","ERROR_CANNOT_FIND_BINARY":"Cannot find the \\"{{bin}}\\" executable. Please add it to the path or use \\"npm i -g {{pkg}}\\" to install it.","ERROR_NO_MANIFEST_AT_PATH":"Manifest not found at path: {{- path}}","ERROR_NO_MANIFEST":"Error: could not read webapp/manifest.json","ERROR_SAP_APP_NOT_DEFINED":"Manifest is missing required section \'sap.app\'","WARNING_CANNOT_UPDATE_I18N":"Cannot update i18n properties file: {{- path}}","WARNING_I18N_FILE_PATH_NOT_FOUND_IN_MANIFEST":"i18n file path not found in manifest.json. Fiori launchpad texts not added.","PROMPT_ABAP_INVALID_NAMESPACE_LENGTH":"Namespace limited to 10 characters, entered {{length}}","PROMPT_ABAP_INVALID_NAMESPACE":"Namespace invalid as there are too many forward slashes","PROMPT_ABAP_APPDESC_LENGTH":"Deployment Description should not exceed 60 characters","ERROR_NO_APPNAME":"Could not determine app name from manifest","ERROR_NO_MTA":"Error: no mta.yaml exists. Please run the deployment generator first","ERROR_NO_MTA_ROOT":"Error: no {{mtaFileName}} in {{root}}","ERROR_UNRECOGNIZED_TARGET":"Unrecognized target: {{target}}","ERROR_NO_PATH":"Cannot find \\"path\\" in backend configuration in ui5.yaml","ERROR_CANNOT_READ_UI5_CONFIG":"Cannot read ui5.yaml: {{reason}}","ERROR_FILE_NOT_EXIST":"File does not exist: {{filePath}}","ERROR_FOLDER_NOT_EXIST":"Folder path does not exist: {{filePath}}","ERROR_INVALID_CLIENT":"[{{client}}] is invalid. Enter blank or a value between 000-999","ERROR_INVALID_URL":"Invalid URL: [{{input}}]","ERROR_S4_SYSTEM_NOT_EXTENSIBLE":"S4 system not configured as Extensibility Development system. Cannot deploy to it.","ERROR_INCORRECT_ATO_SETTINGS":"Incorrect ATO settings. Package or prefix settings mising.","ERROR_PARSE_ATO":"Failed to parse ATO Settings - [{{message}}]","ERROR_NO_APP_NAME":"Could not determine app name from manifest","ERROR_NO_APP_ID":"Could not determine app ID from manifest","ERROR_NO_INBOUND":"Could not determine inbound from the manifest","ERROR_MTA_ID_ALREADY_EXIST":"A folder with same name already exist at {{destinationRoot}}","ERROR_NO_MTA_ID":"MTA ID cannot be empty","ERROR_MTA_DESTINATIONS":"No destinations loaded from mta.yaml","ERROR_INVALID_MTA_ID":"The ID can only contain letters, numbers, dashes, periods and underscores (but no spaces).","ERROR_HYPHENS_FORBIDDEN_IN_APP_NAME":"\'-\' not allowed in application name","ERROR_CHARACTERS_FORBIDDEN_IN_APP_NAME":"Only alphanumeric, underscore and slash characters are allowed","ERROR_MTA_EXTENSION_FOR_ABHE_FAILED":"Unable to create or update the mta extension file for Api Hub Enterprise destination configuration: {{error}}","ERROR_MTA_EXTENSION_ADDITION_FAILED":"Unable to add mta extension configuration to file: {{mtaExtFilePath}}","ERROR_UNABLE_TO_LOAD_MTA":"Unable to load mta.yaml configuration","ERROR_FAILED_TO_LOAD_SERVICE_KEY":"Failed to fetch service key","ERROR_CAP_DEPLOYMENT_NO_MTA":"This Fiori application is within a CAP project and deployment should be configured as part of the CAP project.","INFO_EXISTING_MTA_EXTENSION_NOT_FOUND":"Cannot find a valid existing mta extension file, a new one will be created","INFO_MTA_EXT_CREATED":"Created file: {{mtaExtFile}} to extend mta module: {{appMtaId}} with destination configuration","INFO_MTA_EXT_UPDATED":"Updated file: {{mtaExtFile}} with module destination configuration","WARN_EXISTING_DESTINATION_SERVICE_NOT_FOUND":"A destination service resource cannot be found in the mta.yaml. An mta extension destination instance cannot be added","LOG_ATO_PACKAGE_WARN":"Warning: superceding entered package {{package}} with packaged mandated by backend ATO settings: {{backendPackage}}","LOG_ENTER_CREDENTIAL":"Please enter your credentials for: {{url}}","LOG_ENTER_CREDENTIAL_CLIENT":"Please enter your credentials for: {{url}} (Client {{client}})","LOG_ENTER_CREDENTIAL_DESTINATION":"Please enter your credentials for destination: {{destination}}","LOG_CORRECT_CREDENTIAL":"Correct credentials.","LOG_INCORRECT_CREDENTIAL":"Incorrect credentials. Try again","LOG_INCORRECT_APP_NAME":"Your package is in the customer space. Please check the correctness of the application name as it might need to start with a Z.","LOG_MOVE_APP_PATH":"Moving application to {{newAppPath}}","LOG_WIN_OS_MSG":"Windows OS specific: ","LOG_WIN_OS_CANNOT_MOVE_LOCKED_FILE":"{{winosSpecificMsg}}Cannot remove locked folder {{srcPath}}","LOG_FAILED_SERVICE_KEY":"Failed to fetch service key","LOG_UPDATED_MTA":"Updated mta.yaml","LOG_READ_MTA":"Read mta.yaml with prefix {{prefix}}","LOG_READ_MTA_ERROR":"Could not read mta.yaml, trying again...","LOG_UPDATE_STANDALONE_MTA":"Updated standalone mta.yaml","LOG_UPDATE_MTA_FAILED":"Could not update mta.yaml","LOG_UPDATE_XSAPP_FAILED":"Could not update xs-app.json, error found {{error}}","LOG_UPDATED_XSAPP":"Updated standalone approuter xs-app.json {{message}}","LOG_ERROR":"{{method}} error found {{error}}","LOG_CANNOT_FIND_MTA":"Cannot find mta.yaml in current folder or up directory tree","LOG_ADD_FLP":"Adding FLP artifacts","LOG_ADDING_APP_TO_MTA":"Adding application {{appModule}} to mta.yaml","LOG_ADDING_PARAMS_TO_MTA":"Adding additional parameters to mta.yaml","LOG_ERROR_INSTALL_PHASE":"Error during install phase deployment-generator:cf: {{error}}","LOG_ROOT_ERROR_INSTALL_PHASE":"Error during install phase, root package.json deployment-generator:cf: {{error}}","LOG_ERROR_WRITING_PHASE":"Error writing phase deployment-generator:cf: {{error}}","LOG_ERROR_END_PHASE":"Error end phase deployment-generator:cf: {{error}}","LOG_UPDATING_PACKAGE_JSON":"Error updating package.json: {{error}}","LOG_UPDATED_PACKAGE_JSON":"Updated root package.json","LOG_ADDED_MTA_YAML":"mta.yaml created","WARN_MESSAGE_FLPCONF_INBOUND_CONFIG_KEY_EXISTS":"An inbound configuration with the key: \'{{inboundKey}}\' is already defined. ","PROMPT_FLPCONF_OVERWRITE":"Overwrite existing configuration?","PROMPT_FLPCONF_SEMANTIC_OBJECT":"Semantic Object","PROMPT_FLPCONF_ACTION":"Action","PROMPT_FLPCONF_TITLE":"Title","PROMPT_FLPCONF_SUBTITLE":"Subtitle (optional)","PROMPT_FLPCF_EXIST_MTA_DIR":"Existing configuration at {{mtaDir}} found. Do you want to extend it (or abort)?","PROMPT_FLPCF_NEW_MTA_DIR":"Enter the directory containing mta.yaml","PROMPT_FLPCF_NOT_EXIST_MTA_DIR":"{{mtaPath}} does not exist","PROMPT_VALIDATION_WARN_MAX_LENGTH":"Maximum length: {{maxLength}} characters","PROMPT_VALIDATION_WARNING_INPUT_REQUIRED":"{{inputName}} is required","PROMPT_APP_CHOOSE_TARGET":"Please choose the target","PROMPT_ABAP_APPNAME_REQUIRED":"Application name required","PROMPT_ABAP_INVALID_APPNAME_LENGTH":"Application name limited to 15 characters, entered {{length}}","PROMPT_ABAP_INVALID_APPNAME":"Application name needs to be prefixed with [{{prefix}}]","PROMPT_OVERWRITE_CONFIG":"Editing the deployment configuration will overwrite existing configuration, are you sure you want to continue?","PROMPT_OVERWRITE_ABORT":"Deployment config will abort if you choose no. Click Finish to abort.","PROMPT_ABAP_ENTER_BASE_CONFIG":"Enter the base configuration filename","PROMPT_ABAP_CONFIRM_SCP":"Is this an SAP Business Technology Platform system?","PROMPT_ABAP_DESTINATION":"Destination","PROMPT_ABAP_TARGET_SYSTEM":"Select Target system","PROMPT_ABAP_ENTER_TARGET":"Enter Target System URL","PROMPT_ABAP_TARGET_URL":"Target System URL","PROMPT_ABAP_CLIENT":"Client","PROMPT_ABAP_CLIENT_CHOICE_EXISTING":"Use project defined client {{client}}","PROMPT_ABAP_CLIENT_CHOICE_NEW":"Enter client","PROMPT_ABAP_CLIENT_CHOICE_BLANK":"Use default system client","PROMPT_ABAP_ENTER_CLIENT":"Enter client","PROMPT_ABAP_INVALID_APPNAME_LENGTH_2":"Name (Maximum length: 15 characters)","PROMPT_ABAP_APPNAME":"SAPUI5 ABAP Repository","PROMPT_ABAP_INVALID_APPNAME_LENGTH_PREFIX":"SAPUI5 ABAP Repository (Maximum length: 15 characters, should start with {{applicationPrefix}})","PROMPT_ABAP_PACKAGE":"Package","PROMPT_HINT_TYPE_TO_FILTER":" (Type to filter matching records)","PROMPT_ABAP_PACKAGE_WARN":"Provide a package","PROMPT_PACKAGE_INPUT_CHOICE":"How do you want to enter the Package","PROMPT_ABAP_PACKAGE_NOT_FOUND":"Package list cannot be fetched. Please enter the Package manually.","PROMPT_TRANSPORT_INPUT_CHOICE":"How do you want to enter Transport Request","PROMPT_TRANSPORT_NO_EXISTING_LIST":"Transport Request list cannot be fetched. Please enter Transport Request manually.","PROMPT_TRANSPORT_CANNOT_CREATE_TRANSPORT":"Create new Transport Request failed. Please enter Transport Request manually.","ENTER_MANUAL_CHOICE":"Enter manually","LIST_EXISTING_CHOICE":"Choose from existing","CREATE_NEW_CHOICE":"Create new","CREATE_DURING_DEPLOY_CHOICE":"Create during deployment","PROMPT_ABAP_TRANSPORT_NO":"Transport Request","PROMPT_ABAP_TRANSPORT_NO_MANDATORY":"Transport Request (mandatory)","PROMPT_ABAP_TRANSPORT_NO_REQUIRED":"Provide a transport request for your application","PROMPT_CREATE_TRANSPORT":"Created new Transport Request","PROMPT_ABAP_GENERATE_INDEX_HTML":"Generate standalone index.html during deployment","PROMPT_ABAP_USERNAME":"Username: ","PROMPT_ABAP_PASSWORD":"Password: ","PROMPT_ABAP_REQUIRE_CREDENTIAL":"Please provide credential to authenticate backend system","PROMPT_ABAP_DESCRIPTION":"Deployment Description","PROMPT_SERVER_PROJECT_PARENT":"Application router project path","PROMPT_SERVER_STANDALONE_APPROUTER":"Standalone Approuter","PROMPT_SERVER_MANAGED_APPROUTER":"Managed Approuter","PROMPT_SERVER_ADD_ROUTER_MODULE":"Add router module","PROMPT_SERVER_ADD_CONNECTIVITY":"Add connectivity service (required for connections to on-prem systems)?","PROMPT_SERVER_ADVANCED_OPTION":"Configure advanced options","PROMPT_CF_ABAP_ENV_UNAVAIL":"ABAP Environments Unavailable","PROMPT_CF_GENERATE_IN_ROOT":"Generate project artifacts in root folder: {{root}}?","PROMPT_CF_MTA_EXISTS":"Existing configuration at {{mtaPath}} found. Do you want to extend it (or abort)?","PROMPT_CF_SELECT_ROOT_PATH":"Please enter the location of the root folder (relative or absolute path)","PROMPT_CF_CREATE_ROOT":"{{root}} does not exist. Create it?","PROMPT_CF_CREATE_ROOT_CHOICE_YES":"Yes","PROMPT_CF_CREATE_ROOT_CHOICE_NEW":"Enter new name","PROMPT_CF_CREATE_ROOT_CHOICE_ABORT":"Abort","PROMPT_CF_CREATE_MTA_ID":"MTA ID","PROMPT_CF_CREATE_MTA_DESC":"MTA description","PROMPT_CF_CREATE_MTA_VERSION":"MTA version","PROMPT_CF_ABAP_SERVICE":"Do you want to connect to your ABAP environment via direct service binding?","PROMPT_CF_DESTINATION":"Destination name","PROMPT_CF_DESTINATION_HINT":"Destination name - The app router is configured to use direct service binding","PROMPT_CF_HINT_CF_LOGIN":"Login to Cloud Foundry is required prior to view available ABAP services.","PROMPT_CF_LOAD_ABAP_SERVICE_FAIL":"Discovering ABAP environments failed. Check logs for details.","PROMPT_CF_SELECT_ABAP_SERVICE":"ABAP Environment for direct service binding","PROMPT_CF_MOVE_APP_DIR":"Move app directory [{{appPath}}] to {{newRoot}}?\\n(Please ensure everything is under version control and committed first)","PROMPT_CF_NEW_DIR_NAME":"Choose new directory name","PROMPT_CF_APP_PATH_EXISTS":"{{appPath}} already exists.\\nPlease choose an option (h for help)","PROMPT_CF_CREATE_CHOICE_NO_MOVE":"Don\'t move","PROMPT_CF_LABEL_NONE":"None","PROMPT_CF_LABEL_DIRECT_SERVICE_BINDING":"Direct Service Binding","NOT_OVERWRITING_EXISTING_INDEX_HTML":"\'webapp/index.html\' already exists. Won\'t overwrite","PROMPT_GENERATE_MANAGED_APPROUTER":"Add application to managed application router?","WARN_CANNOT_GET_TRANSPORT_CONFIGURATION":"Cannot get transport configuration from the backend","PROMPT_INSTANCE_BASED_DEST_DEFAULT":"Local CAP Project API (Instance Based Destination)","PROMPT_INSTANCE_BASED_DEST":"{{destination}} (Instance Based Destination)","TOOLTIP_SAP_UI5_ABAP_REPO":"Enter the name for the deployed application. The name must follow the rules of creating a BSP application. It must not exceed 15 characters and must consist of alphanumeric characters or underscores only. Name should be unique in the BSP repository and its namespace is compatible with the selected package.","TOOLTIP_ABAP_DESCRIPTION":"The description of the deployed application.","TOOLTIP_ABAP_PACKAGE":"Provide a package for the deployed application.","ERROR_DEPLOY_TARGET_NOT_DEPLOYABLE":"{{systemError}} To continue with project generation choose a different deployment target or skip adding deploy config.","LABEL_TARGET_SYSTEM_BREADCRUMB":"Target System","LABEL_TARGET_SYSTEM_TYPE_BREADCRUMB":"Target Type","LABEL_SCP_BREADCRUMB":"SCP","LABEL_GENERATE_INDEX_HTML_BREADCRUMB":"Generate index.html","LABEL_ADD_APP_TO_ROUTER_BREADCRUMB":"Add to Router","LABEL_FLP_SUBTITLE_BREADCRUMB":"Subtitle","LABEL_ROUTER_PATH_BREADCRUMB":"App Router Path","LABEL_CONNECTIVITY_SERVICE_BREADCRUMB":"Add Connectivity Service","LABEL_DIRECT_SERVICE_ABAP_ENVIRONMENT_BREADCRUMB":"ABAP Env. Binding","INFO_MESSAGE_MORE_SEARCH_RESULTS":"More than {{numResults}} results, keep typing to narrow down","PROMPT_LABEL_S4_CONTINUE":"S/4 {{configType}} configuration is managed centrally as part of the CI pipeline, local updates to deployment configuration will not be for productive use. Are you sure you want to continue?","ERROR_EMPTY_NAME":"You must provide a destination name in order to continue.","ERROR_NAME_MSG":"The destination name must only contain letters, digits, dashes and underscores.","ERROR_NAME_TOO_LONG":"Destination name cannot contain more than 200 characters","VIRTUAL_HOST_WARNING":"As the destination uses a virtual host, you will need to replace the host in the URL with the internal host that is configured with your SAP Cloud Connector when previewing the deployed application."}')},69645:e=>{"use strict";e.exports={}}},n={};function i(e){var t=n[e];if(void 0!==t)return t.exports;var o=n[e]={id:e,loaded:!1,exports:{}};return r[e].call(o.exports,o,o.exports,i),o.loaded=!0,o.exports}i.m=r,i.c=n,i.x=()=>{var e=i.O(void 0,[712,784,475,763],(()=>i(i.s=81741)));return e=i.O(e)},e=[],i.O=(t,r,n,o)=>{if(!r){var s=1/0;for(u=0;u<e.length;u++){for(var[r,n,o]=e[u],a=!0,_=0;_<r.length;_++)(!1&o||s>=o)&&Object.keys(i.O).every((e=>i.O[e](r[_])))?r.splice(_--,1):(a=!1,o<s&&(s=o));if(a){e.splice(u--,1);var c=n();void 0!==c&&(t=c)}}return t}o=o||0;for(var u=e.length;u>0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[r,n,o]},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((t,r)=>(i.f[r](e,t),t)),[])),i.u=e=>({475:"tools-suite-common-libs",712:"commonlibs",763:"app-gen-shared",784:"open-ux-shared"}[e]+"/index.js"),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),i.j=933,i.p="",(()=>{var e={933:1,190:1};i.O.require=t=>e[t];i.f.require=(t,r)=>{e[t]||(t=>{var r=t.modules,n=t.ids,o=t.runtime;for(var s in r)i.o(r,s)&&(i.m[s]=r[s]);o&&o(i);for(var a=0;a<n.length;a++)e[n[a]]=1;i.O()})(require("../"+i.u(t)))}})(),t=i.x,i.x=()=>(i.e(712),i.e(784),i.e(475),i.e(763),t());var o=i.x();module.exports=o})(); | ||
(()=>{var e,t,r={51617:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=51617,e.exports=t},39973:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=39973,e.exports=t},20230:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=20230,e.exports=t},20545:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=20545,e.exports=t},4297:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=4297,e.exports=t},75601:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=75601,e.exports=t},82626:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=82626,e.exports=t},37974:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=37974,e.exports=t},85858:(e,t,r)=>{var n={"./cat":43112,"./cat.js":43112,"./cd":86698,"./cd.js":86698,"./chmod":23986,"./chmod.js":23986,"./common":96816,"./common.js":96816,"./cp":80610,"./cp.js":80610,"./dirs":91972,"./dirs.js":91972,"./echo":16166,"./echo.js":16166,"./error":80609,"./error.js":80609,"./exec":52024,"./exec-child":69911,"./exec-child.js":69911,"./exec.js":52024,"./find":22261,"./find.js":22261,"./grep":56818,"./grep.js":56818,"./head":66412,"./head.js":66412,"./ln":91247,"./ln.js":91247,"./ls":5815,"./ls.js":5815,"./mkdir":70098,"./mkdir.js":70098,"./mv":74164,"./mv.js":74164,"./popd":99851,"./popd.js":99851,"./pushd":6978,"./pushd.js":6978,"./pwd":24044,"./pwd.js":24044,"./rm":44256,"./rm.js":44256,"./sed":43422,"./sed.js":43422,"./set":17444,"./set.js":17444,"./sort":53033,"./sort.js":53033,"./tail":50318,"./tail.js":50318,"./tempdir":16275,"./tempdir.js":16275,"./test":50021,"./test.js":50021,"./to":44915,"./to.js":44915,"./toEnd":13326,"./toEnd.js":13326,"./touch":57650,"./touch.js":57650,"./uniq":63019,"./uniq.js":63019,"./which":5483,"./which.js":5483};function i(e){var t=o(e);return r(t)}function o(e){if(!r.o(n,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return n[e]}i.keys=function(){return Object.keys(n)},i.resolve=o,e.exports=i,i.id=85858},55079:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deleteCachedServiceProvider=t.getOrCreateServiceProvider=void 0;const n=r(62637),i=r(14425);let o,s;t.getOrCreateServiceProvider=async function(e,t){return o&&s?.isSameSystem&&s?.isSameSystem(e.url,e.client)||(o=e?.getConnection()&&e?.getConnection()?.cookies?await async function(e){if((0,i.isAppStudio)()){const t=await(0,i.listDestinations)(),r=e.config.destination;o=(0,n.createForDestination)({cookies:e.getConnection().cookies.toString()},t[r])}else o=e?.isScp()?(0,n.createForAbapOnCloud)({environment:n.AbapCloudEnvironment.Standalone,service:{url:e.url},ignoreCertErrors:!1,cookies:e.getConnection().cookies.toString()}):(0,n.createForAbap)({baseURL:e?.url,ignoreCertErrors:!1,cookies:e?.getConnection().cookies.toString()});return o}(e):await async function(e,t){if((0,i.isAppStudio)()){const r=await(0,i.listDestinations)(),s=e.config.destination,a=t.username?{auth:{username:t.username,password:t.password}}:{};o=(0,n.createForDestination)({...a},r[s])}else o=e?.isScp()?(0,n.createForAbapOnCloud)({refreshToken:e.credentials?.refreshToken,environment:n.AbapCloudEnvironment.Standalone,service:e.credentials?.serviceKeysContents}):(0,n.createForAbap)({baseURL:e?.url,ignoreCertErrors:!1,auth:{username:t.username??e?.username,password:t.password??e?.password}});return o}(e,t),s=e),o},t.deleteCachedServiceProvider=function(){o=void 0}},62283:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createTransportNumberFromService=void 0;const n=r(55079),i=r(62637);t.createTransportNumberFromService=async function(e,{credentials:t,system:r}){try{const o=await(0,n.getOrCreateServiceProvider)(r,t),s=await o.getAdtService(i.TransportRequestService);return await s.createTransportRequest(e)}catch(e){return null}}},98308:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(55079),t),i(r(24105),t),i(r(81547),t)},56821:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.listPackagesFromService=void 0;const n=r(55079),i=r(62637),o=r(1937);t.listPackagesFromService=async function(e,{credentials:t,system:r}){try{const s=await(0,n.getOrCreateServiceProvider)(r,t),a=await s.getAdtService(i.ListPackageService);return await a.listPackages({maxResults:o.ABAP_PACKAGE_SEARCH_MAX_RESULTS,phrase:e})}catch(e){return[]}}},24105:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTransportConfigInstance=void 0;const n=r(1937),i=r(31881),o=r(55079),s=r(73056),a=r(62637);class DummyTransportConfig{getPackage(){}getApplicationPrefix(){}isTransportRequired(){return!1}getDefaultTransport(){}getOperationsType(){}}class DefaultTransportConfig{constructor(){this.atoSettings={},this.defaultTransport=void 0}getDefaultTransport(){return this.defaultTransport}getPackage(){return this.atoSettings.devPackage}getApplicationPrefix(){return this.atoSettings.devPrefix}isTransportRequired(){return!!this.atoSettings.isTransportRequestRequired}getOperationsType(){return this.atoSettings?.operationsType}async init({credentials:e,system:t}){const r={};try{const n=await(0,o.getOrCreateServiceProvider)(t,e),i=await n.getAdtService(a.AtoService),s=await i.getAtoInfo();r.error=this.handleAtoResponse(s)}catch(e){if((0,o.deleteCachedServiceProvider)(),e.response?.status===n.HttpStatus.UNAUTHORIZED){e.response.headers["www-authenticate"]?.toLowerCase()?.startsWith("basic")&&(r.transportConfigNeedsCreds=!0)}else r.warning=e?.toString(),r.transportConfigNeedsCreds=!1}const i=!r.error&&!r.transportConfigNeedsCreds;return r.transportConfig=i?this:this.getDummyConfig(),r}handleAtoResponse(e){let t=!1;if(this.atoSettings=(0,s.uniformAtoFormat)(e),this.atoSettings.isConfigured&&"CUSTOMER"===this.atoSettings.tenantType&&"C"===this.atoSettings.operationsType){if(!this.atoSettings.isExtensibilityDevSystem)return(0,i.t)("ERROR_S4_SYSTEM_NOT_EXTENSIBLE");if(!this.atoSettings.devPrefix)return(0,i.t)("ERROR_INCORRECT_ATO_SETTINGS");t=!0,this.applyS4CDefaults()}t||(this.atoSettings={operationsType:this.atoSettings.operationsType})}applyS4CDefaults(){this.defaultTransport=DefaultTransportConfig.S4C_DEFAULT_TRANSPORT,this.atoSettings.isTransportRequestRequired=!1,this.atoSettings.devPackage=DefaultTransportConfig.S4C_DEFAULT_PACKAGE}getDummyConfig(){const e=new DummyTransportConfig;return e.getOperationsType=this.getOperationsType,e}}DefaultTransportConfig.S4C_DEFAULT_TRANSPORT="",DefaultTransportConfig.S4C_DEFAULT_PACKAGE="TEST_YY1_DEFAULT",t.getTransportConfigInstance=async function({scp:e,credentials:t={},system:r}){return e?{transportConfig:new DummyTransportConfig}:(new DefaultTransportConfig).init({credentials:t,system:r})}},81547:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transportName=t.getTransportListFromService=void 0;const n=r(55079),i=r(62637);t.getTransportListFromService=async function(e,t,{credentials:r,system:o}){try{const s=await(0,n.getOrCreateServiceProvider)(o,r),a=await s.getAdtService(i.TransportChecksService);return(await a.getTransportRequests(e,t)).map((e=>({transportReqNumber:e.transportNumber,transportReqDescription:e.description})))}catch{return}};t.transportName=e=>({name:e.transportReqDescription?`${e.transportReqNumber} (${e.transportReqDescription})`:`${e.transportReqNumber}`,value:e.transportReqNumber})},73056:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useCreateTrDuringDeploy=t.CREATE_TR_DURING_DEPLOY=t.getTargetSystemChoices=t.isLocalPackage=t.uniformAtoFormat=t.isScp=t.handleProjectDoesNotExist=t.abapDeployConfigExists=t.indexHtmlExists=t.readExistingDeployTaskConfig=t.initBaseConfig=t.getSuggestedClient=t.getUrlAnswer=void 0;const n=r(1937),i=r(31881),o=r(68802),s=r(43895),a=r(28033),_=r(71017);t.getUrlAnswer=function(e,t){if(e.isAppStudio&&t?.destination===e?.backendConfig?.destination)return e.answers.url;{let e=t.targetSystem;return t.targetSystem&&"NoUrlSelected"!==t.targetSystem||!t.url||(e=t.url),e}},t.getSuggestedClient=function(e){let t;const r=e.scripts?.start;return r&&r.includes("sap-client")&&(t=r.split("sap-client")[1].match(/\d{1,3}/g).map(String)[0]),t},t.initBaseConfig=function(e,t){t.baseConfig=(0,o.readYaml)(e);const r=t.baseConfig.toJSON();t.baseMetadataName=r.metadata?.name,t.backendConfig=r?.server?.customMiddleware?.find((e=>e?.name===n.FIORI_TOOLS_PROXY))?.configuration?.backend?.[0]},t.readExistingDeployTaskConfig=function(e){if(e)try{const t=(0,o.readYaml)(e)?.toJSON();return t?.builder?.customTasks?.find((e=>e.name===n.ABAP_DEPLOY_TASK))?.configuration}catch(e){return}},t.indexHtmlExists=async function(e,t){const r=await(0,a.getUi5CustomWebappPath)(t),n=(0,_.join)(t,r,"index.html");return e.exists(n)},t.abapDeployConfigExists=function(e,t){return e.exists(t)},t.handleProjectDoesNotExist=function(e){const t=i.ErrorMessages.fileDoesNotExist(e.destinationPath(e.options.base));throw e.abort=!0,(0,i.handleErrorMessage)(e,e.appWizard,t),i.ErrorMessages.ABORT_SIGNAL},t.isScp=function(e,t){for(const r in t){const n=t[r];if(n.value===e)return n.scp}return!1},t.uniformAtoFormat=function(e){return Object.keys(e).includes("developmentPackage")&&(e.devPackage=e.developmentPackage),Object.keys(e).includes("developmentPrefix")&&(e.devPrefix=e.developmentPrefix),Object.keys(e).includes("isExtensibilityDevelopmentSystem")&&(e.isExtensibilityDevSystem=e.isExtensibilityDevelopmentSystem),e},t.isLocalPackage=function(e){return/^[$LlTt]/.test(e)},t.getTargetSystemChoices=async function(e,t){const r=[];if(!(0,s.isAppStudio)()){let n=!0;r.push({name:(0,i.t)("PROMPT_ABAP_ENTER_TARGET"),value:"NoUrlSelected"}),t?.unSaved&&(r.push({name:`${t.getDisplayName()} (Source system)`,value:t.url,client:t.client,isDefault:!0,scp:t.isScp()}),n=!1);const o=await(0,i.getSapSystems)();Object.values(o).forEach((t=>{let i=!1;n&&(i=t.url===e?.url&&(t.client||"")===(e?.client||"")),r.push({name:i?`${t.getDisplayName()} (Source system)`:t.getDisplayName(),value:t.url,client:t.client,isDefault:i,scp:t.isScp()})}))}return r},t.CREATE_TR_DURING_DEPLOY="REPLACE_WITH_TRANSPORT",t.useCreateTrDuringDeploy=function(e){return e.existingDeployTaskConfig?.app?.transport===t.CREATE_TR_DURING_DEPLOY}},81741:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigGenerators=void 0;const i=r(31881),o=n(r(98819)),s=n(r(24852)),a=r(66814);(0,s.default)(o.default.prototype,a);const _=r(25184),c=r(1628),u=r(1937);var d;!function(e){e.deploy="deploy",e.flp="flp",e.server="server"}(d||(t.ConfigGenerators=d={}));class default_1 extends o.default{constructor(e,t){super(e,t,{unique:"namespace"}),this.launchDeployConfigAsSubGenerator=t.launchDeployConfigAsSubGenerator,this.launchFlpConfigAsSubGenerator=t.launchFlpConfigAsSubGenerator,this.isServerConfigOnly=this.options?.data?.serverConfigOnly&&!0===this.options.data.serverConfigOnly,this._initSteps(this.isServerConfigOnly),this.answers={inputDestinationRoot:"",selectedGenerator:d.deploy},this.appWizard=t.appWizard||_.AppWizard.create(t)}_initSteps(e){this.wizardSteps=e?[{name:(0,i.t)("STEP_CONFIG"),description:(0,i.t)("STEP_CONFIG_DESC")}]:[{name:(0,i.t)("STEP_PREPARE"),description:(0,i.t)("STEP_PREPARE_DESC")},{name:(0,i.t)("STEP_DEPLOY_TARGET"),description:(0,i.t)("STEP_DEPLOY_TARGET_DESC"),dependency:(0,i.t)("STEP_PREPARE")},{name:(0,i.t)("STEP_CONFIG"),description:(0,i.t)("STEP_CONFIG_DESC")}],this.yeomanUiStepConfig=(0,c.getYeomanUiStepConfig)(this.wizardSteps),this.wizardStepObj=this.yeomanUiStepConfig.activeSteps,this.setPromptsCallback=e=>{this.wizardStepObj&&this.wizardStepObj.setCallback(e)}}async prompting(){this.launchDeployConfigAsSubGenerator||this.launchFlpConfigAsSubGenerator?this._loadSubgeneratorForParentGenerator():this._loadServerConfigGenerator()}_loadSubgeneratorForParentGenerator(){if(this.launchDeployConfigAsSubGenerator&&this.composeWith((0,u.generatorNamespace)("deploy"),{...this.options,appWizard:this.appWizard}),this.launchFlpConfigAsSubGenerator){const e={...this.options,...this.options.flpConfigOptions};this.composeWith((0,u.generatorNamespace)("flp-config"),{...e,appWizard:this.appWizard})}}_loadServerConfigGenerator(){this.composeWith((0,u.generatorNamespace)("server"),{...this.options,destinationRoot:this.answers.inputDestinationRoot,appWizard:this.appWizard})}}t.default=default_1},1937:(e,t)=>{"use strict";var r,n,i;Object.defineProperty(t,"__esModule",{value:!0}),t.generatorNamespace=t.bundledRootGeneratorName=t.i18nKeySubTitle=t.i18nKeyTitle=t.ABAP_PACKAGE_SEARCH_MAX_RESULTS=t.API_BUSINESS_HUB_ENTERPRISE_PREFIX=t.MANAGED_XSUAA=t.UI5_URL=t.SRV_API_DEFAULT_URL=t.SRV_API=t.DEFAULT_MTA_DESTINATION=t.MTA_DESTINATION=t.XS_SECURITY=t.MTA_EXTENSION_FILE=t.MTA_YAML=t.PACKAGE_JSON=t.DEPLOY_MODE=t.UI5_YAML=t.UI5_DEPLOY=t.XS_APP=t.RIMRAF=t.RIMRAF_VERSION=t.MBT=t.MBT_VERSION=t.UI5_TASK_FLATTEN_LIB_VERSION=t.UI5_TASK_FLATTEN_LIB=t.ABAP_DEPLOY_TASK=t.WELCOME_FILE=t.DESTINATION_AUTHTYPE_NOAUTH=t.DESTINATION_AUTHTYPE_NOTFOUND=t.DESTINATION_CHOICE_DIRECT_SERVICE_BINDING=t.DESTINATION_CHOICE_NONE=t.RouterModuleType=t.HttpStatus=t.MTA_VERSION=t.MTA_DESCRIPTION=t.TargetName=t.CDS_ADD_MTA_COMMAND_ARGS=t.MTA_PKG=t.MTA_EXECUTABLE=t.CDS_PKG=t.CDS_EXECUTABLE=t.ROUTER_MODULE=t.CLOUD_FOUNDRY_FOLDER=t.FIORI_TOOLS_PROXY=t.DEPLOYER_MODULE_TYPE=t.ROUTER_MODULE_TYPE=void 0,t.ROUTER_MODULE_TYPE="approuter.nodejs",t.DEPLOYER_MODULE_TYPE="com.sap.html5.application-content",t.FIORI_TOOLS_PROXY="fiori-tools-proxy",t.CLOUD_FOUNDRY_FOLDER="cf",t.ROUTER_MODULE="router",t.CDS_EXECUTABLE="cds",t.CDS_PKG="@sap/cds-dk",t.MTA_EXECUTABLE="mta",t.MTA_PKG="mta",t.CDS_ADD_MTA_COMMAND_ARGS=["add","mta"],function(e){e.ABAP="abap",e.CF="cf"}(r||(t.TargetName=r={})),t.MTA_DESCRIPTION="Fiori elements app",t.MTA_VERSION="0.0.1",function(e){e[e.UNAUTHORIZED=401]="UNAUTHORIZED"}(n||(t.HttpStatus=n={})),function(e){e.Standard="Standard",e.Managed="Managed"}(i||(t.RouterModuleType=i={})),t.DESTINATION_CHOICE_NONE="NONE",t.DESTINATION_CHOICE_DIRECT_SERVICE_BINDING="DIRECT_SERVICE_BINDING",t.DESTINATION_AUTHTYPE_NOTFOUND="NotAvailable",t.DESTINATION_AUTHTYPE_NOAUTH="NoAuthentication",t.WELCOME_FILE="welcomeFile",t.ABAP_DEPLOY_TASK="deploy-to-abap",t.UI5_TASK_FLATTEN_LIB="ui5-task-flatten-library",t.UI5_TASK_FLATTEN_LIB_VERSION="0.2.5",t.MBT_VERSION="^1.2.18",t.MBT="mbt",t.RIMRAF_VERSION="^3.0.2",t.RIMRAF="rimraf",t.XS_APP="xs-app.json",t.UI5_DEPLOY="ui5-deploy.yaml",t.UI5_YAML="ui5.yaml",t.DEPLOY_MODE="deploy_mode",t.PACKAGE_JSON="package.json",t.MTA_YAML="mta.yaml",t.MTA_EXTENSION_FILE="mta-ext.mtaext",t.XS_SECURITY="xs-security.json",t.MTA_DESTINATION="%s-srv-api",t.DEFAULT_MTA_DESTINATION="fiori-default-srv-api",t.SRV_API="srv-api",t.SRV_API_DEFAULT_URL="${default-url}",t.UI5_URL="https://ui5.sap.com",t.MANAGED_XSUAA="managed:xsuaa",t.API_BUSINESS_HUB_ENTERPRISE_PREFIX="ABHE",t.ABAP_PACKAGE_SEARCH_MAX_RESULTS=50,t.i18nKeyTitle="flpTitle",t.i18nKeySubTitle="flpSubtitle",t.bundledRootGeneratorName="@sap/fiori:fiori-deployment";t.generatorNamespace=e=>`${t.bundledRootGeneratorName}_${e}`},40120:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debug=void 0;const n=r(1628);t.debug=function(e,t){(0,n.getPlatform)()!==n.PLATFORMS.CLI&&e(`[YUI DEBUG] ${t}`)}},42899:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findSapSystem=t.getSapSystems=t.generateDestinationName=t.getCfDestinationChoices=void 0;const n=r(77090);let i={};async function o(e=!0){return e&&0!==Object.keys(i).length||(i=await(0,n.listSAPSystems)()),i}t.getCfDestinationChoices=async function(e=!1){const t=await o();return Object.values(t).map((t=>({name:`${t.name}${t.isScp()?"(SCP)":""} - ${t.url}`,value:e?t:t.name,scp:t.isScp(),url:t.url})))},t.generateDestinationName=function(e,t){return`${e}_${t.replace(/(^\/)|(\/$)/g,"").replace(/\//g,"_")}`},t.getSapSystems=o,t.findSapSystem=function(e,t){return t?.["string"==typeof e?e:e.name]}},35117:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorMessages=void 0;const n=r(1937),i=r(28212),o=(e,t)=>(0,i.t)("ERROR_CANNOT_FIND_BINARY",{bin:e,pkg:t});class ErrorMessages{}t.ErrorMessages=ErrorMessages,ErrorMessages.ABORT_SIGNAL="ABORT_SIGNAL",ErrorMessages.noManifest=(0,i.t)("ERROR_NO_MANIFEST"),ErrorMessages.noAppName=(0,i.t)("ERROR_NO_APPNAME"),ErrorMessages.noCdsBin=o(n.CDS_EXECUTABLE,n.CDS_PKG),ErrorMessages.noMtaBin=o(n.MTA_EXECUTABLE,n.MTA_PKG),ErrorMessages.noMta=(0,i.t)("ERROR_NO_MTA"),ErrorMessages.noPath=(0,i.t)("ERROR_NO_PATH"),ErrorMessages.noMtaId=(0,i.t)("ERROR_NO_MTA_ID"),ErrorMessages.invalidMtaId=(0,i.t)("ERROR_INVALID_MTA_ID"),ErrorMessages.capDeploymentnoMta=(0,i.t)("ERROR_CAP_DEPLOYMENT_NO_MTA"),ErrorMessages.mtaIdAlreadyExist=e=>(0,i.t)("ERROR_MTA_ID_ALREADY_EXIST",{destinationRoot:e}),ErrorMessages.noMtaInRoot=e=>(0,i.t)("ERROR_NO_MTA_ROOT",{mtaFileName:n.MTA_YAML,root:e}),ErrorMessages.unrecognizedTarget=e=>(0,i.t)("ERROR_UNRECOGNIZED_TARGET",{target:e}),ErrorMessages.cannotReadUi5Config=e=>(0,i.t)("ERROR_CANNOT_READ_UI5_CONFIG",{reason:e}),ErrorMessages.fileDoesNotExist=e=>(0,i.t)("ERROR_FILE_NOT_EXIST",{filePath:e}),ErrorMessages.folderDoesNotExist=e=>(0,i.t)("ERROR_FOLDER_NOT_EXIST",{filePath:e}),ErrorMessages.invalidClient=e=>(0,i.t)("ERROR_INVALID_CLIENT",{client:e}),ErrorMessages.invalidURL=e=>(0,i.t)("ERROR_INVALID_URL",{input:e})},68802:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.writeUi5RepositoryFiles=t.writeUi5RepositoryFile=t.getYamlType=t.readYaml=t.addUi5Dependency=t.addPackageDevDependency=t.updatePackageScript=t.dirExists=t.BUILD_MTA_SCRIPT_TEMP=t.DEPLOY_MTA_SCRIPT_TEMP=t.UNDEPLOY_MTA_SCRIPT_TEMP=t.DEPLOY_MTA_SCRIPT=t.BUILD_MTA_SCRIPT=t.BUILD_SCRIPT=void 0;const a=r(57147),_=r(71017),c=o(r(52375)),u=r(1937),d=s(r(37865)),l=s(r(26692)),E=r(28033);t.BUILD_SCRIPT="ui5 build preload --clean-dest --config ui5-deploy.yaml --include-task=generateCachebusterInfo",t.BUILD_MTA_SCRIPT="rimraf resources mta_archives && mbt build";t.DEPLOY_MTA_SCRIPT=(e=[])=>"fiori cfDeploy"+(e.length>0?` ${e.join(" ")}`:"");t.UNDEPLOY_MTA_SCRIPT_TEMP=e=>`cf undeploy ${e} --delete-services --delete-service-keys --delete-service-brokers`;function p(e){return c.parseDocument((0,a.readFileSync)(e,"utf-8"))}t.DEPLOY_MTA_SCRIPT_TEMP=(e=[])=>`cf deploy mta_archives/archive.mtar ${e.length>0?`${e.join(" ")} `:""}--retries 1`,t.BUILD_MTA_SCRIPT_TEMP="rimraf resources mta_archives && mbt build --mtar archive",t.dirExists=function(e){try{return(0,a.statSync)(e)?.isDirectory()}catch{return!1}},t.updatePackageScript=function(e,t,r,n,i=!1){const o=(0,_.join)(e,u.PACKAGE_JSON),s=JSON.parse((0,a.readFileSync)(o,"utf-8"));if(s.scripts||(s.scripts={}),s.scripts[t]=r,n){const{devDependencies:e={},ui5:t={}}=s;s.devDependencies=e,i&&(s.ui5={...t,dependencies:t.dependencies??[]});for(const e in n)s.devDependencies[e]||(s.devDependencies[e]=n[e]),i&&!s.ui5.dependencies.find((t=>t===e))&&s.ui5.dependencies.push(e)}(0,a.writeFileSync)(o,JSON.stringify(s,null,4))},t.addPackageDevDependency=function(e,t,r){const n=(0,_.join)(e,u.PACKAGE_JSON),i=JSON.parse((0,a.readFileSync)(n,"utf-8"));i.devDependencies=i.devDependencies||{},i.devDependencies[t]||(i.devDependencies[t]=r),(0,a.writeFileSync)(n,JSON.stringify(i,null,4))},t.addUi5Dependency=function(e,t){const r=(0,_.join)(e,u.PACKAGE_JSON),n=JSON.parse((0,a.readFileSync)(r,"utf-8"));n.ui5=n.ui5||{},n.ui5.dependencies=n.ui5.dependencies||[],n.ui5.dependencies.includes(t)||n.ui5.dependencies.push(t),(0,a.writeFileSync)(r,JSON.stringify(n,null,4))},t.readYaml=p,t.getYamlType=function(e,t){let r;const n=(0,_.join)(e,t);if((0,a.existsSync)(n)){r=p(n).toJSON().type}return r};t.writeUi5RepositoryFile=(e,t,r)=>{const n=(0,_.join)(e,t);let i;(0,a.existsSync)(n)?(i=(0,a.readFileSync)(n,"utf-8"),i.includes(r)||(i=`${i}\n${r}`)):i=r,(0,a.writeFileSync)(n,i)};t.writeUi5RepositoryFiles=async e=>{const r=(0,_.join)(e,await(0,E.getUi5CustomWebappPath)(e));(await(0,d.default)((0,l.default)((0,_.join)(r,"/**/*.ts"))))?.length>0&&(0,t.writeUi5RepositoryFile)(r,".Ui5RepositoryTextFiles","^.*.ts$")}},28212:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.t=t.addTranslations=t.initI18n=void 0;const i=n(r(94336)),o=n(r(91046)),s="deploy";async function a(){await i.default.init({resources:{en:{[s]:o.default}},lng:"en",fallbackLng:"en",defaultNS:s,ns:[s]})}t.initI18n=a,t.addTranslations=function(e,t){i.default.addResources("en",t,e)},t.t=function(e,t){return t={...t,interpolation:{...t?.interpolation,escapeValue:!1}},i.default.t(e,t)},a()},31881:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.t=t.ErrorMessages=t.isS4Installed=t.loadManifest=t.parseTarget=t.getEnvApiHubConfig=t.isAppStudio=t.CF_ENV=t.handleErrorMessage=t.bail=t.toMtaModuleName=void 0;const o=r(1628),s=r(40120),a=r(25184),_=r(71017),c=r(16484),u=r(28033),d=r(35117);function l({errorMessage:e}){throw new Error(e)}var E;t.toMtaModuleName=function(e){return e.replace(/[`~!@#$%^&*()_|+\-=?;:'",.<>]/gi,"")},t.bail=l,t.handleErrorMessage=function(e,t,r){(0,o.getPlatform)()===o.PLATFORMS.CLI?l({errorMessage:r}):(e.transportConfigError=r,(0,s.debug)(e.log,r),t?.showError(r,a.MessageType.notification))},function(e){e.H2O_URL="H2O_URL"}(E||(t.CF_ENV=E={})),t.isAppStudio=function(){return!!process.env[E.H2O_URL]},t.getEnvApiHubConfig=function(){const e=process.env[o.API_HUB_API_KEY],t=process.env[o.API_HUB_TYPE];return e?{apiHubKey:e,apiHubType:"API_HUB_ENTERPRISE"===t?"API_HUB_ENTERPRISE":"API_HUB"}:void 0},t.parseTarget=function(e,t){let r;return e&&("string"==typeof e?r=e:Array.isArray(e)&&(r=e?.[0])),r||(r=t.target),r},t.loadManifest=async function(e){let t;try{t=new c.Manifest((0,_.join)(e,await(0,u.getUi5CustomWebappPath)(e)))}catch{l({errorMessage:d.ErrorMessages.noManifest})}return t?.appId||l({errorMessage:d.ErrorMessages.noAppName}),t},t.isS4Installed=async function(e){return(await(0,o.findInstalledPackages)("@sapux/s4-fiori-gen-ext",{keyword:"fiori-generator-extension",vscWorkspaceConfig:e})).length>0};var p=r(35117);Object.defineProperty(t,"ErrorMessages",{enumerable:!0,get:function(){return p.ErrorMessages}});var T=r(28212);Object.defineProperty(t,"t",{enumerable:!0,get:function(){return T.t}}),i(r(40120),t),i(r(74475),t),i(r(42899),t)},16484:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Manifest=t.idPropertyPath=t.inboundsPropertyPath=t.crossNavigationPropertyPath=void 0;const s=o(r(57147)),a=o(r(71017)),_="sap.app";t.crossNavigationPropertyPath=[_,"crossNavigation"],t.inboundsPropertyPath=[...t.crossNavigationPropertyPath,"inbounds"],t.idPropertyPath=[_,"id"];t.Manifest=class Manifest{constructor(e){this.CONFIG_FILE="manifest.json",this.manifestPath=e,this.contents=JSON.parse((0,s.readFileSync)(this.manifestPath).toString())}set manifestPath(e){this._appPath=a.join(e,this.CONFIG_FILE)}get manifestPath(){return this._appPath}get appId(){return this.contents?.["sap.app"]?.id}get applicationVersion(){return this.contents["sap.app"]?.applicationVersion?.version}get dataSources(){return this.contents["sap.app"].dataSources??{}}get mainService(){const e=this.contents["sap.ovp"]?this.contents["sap.ovp"].globalFilterModel:"",t=this.contents["sap.ui5"]&&this.contents["sap.ui5"].models&&this.contents["sap.ui5"].models[e]?this.contents["sap.ui5"].models[e].dataSource:void 0;return this.dataSources[t]}get inbound(){const e=this.contents["sap.app"].crossNavigation?.inbounds;return e?{name:Object.keys(e)?.[0],inbound:Object.values(e)?.[0]}:{}}set crossNavigation(e){this.contents["sap.app"].crossNavigation=e}get crossNavigation(){return this.contents["sap.app"].crossNavigation}get sapCloud(){return this.contents["sap.cloud"]}set sapCloud(e){this.contents["sap.cloud"]=e}get i18nFilePath(){return this.contents["sap.app"].i18n}write(e){e?.readJSON(this.manifestPath)?e.writeJSON(this.manifestPath,this.contents,null,4):s.default.writeFileSync(this.manifestPath,JSON.stringify(this.contents,null,4))}}},74475:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.listPackages=t.createTransportNumber=t.getTransportList=t.initTransportConfig=t.validateAppDescription=t.validateAppName=t.isValidClient=t.notExistsValidateClient=t.isValidURL=void 0;const n=r(31881),i=r(77090),o=r(98308),s=r(62283),a=r(56821);async function _(e,t){let r;return t?.isSameSystem?.(e.url,e.client)||t?.config?.destination&&e?.destination===t?.config?.destination&&t?.getConnection()?r=t:e.destination?e.destination&&(r=(0,i.newSapSystemForDestinaton)({destination:e.destination})):r=await async function(e,t){try{return await(0,i.getSapSystem)(e,t?.toString())}catch{return}}(e.url,e.client),r}function c(e){const t=e?.trim()||"";return""===t||!!t.match(/^[0-9]{3}$/)}t.isValidURL=function(e){try{const t=new URL(e);return!!t.protocol&&!!t.host}catch{return!1}},t.notExistsValidateClient=function(e){return!e.client||e.client&&!c(e.client)},t.isValidClient=c,t.validateAppName=function(e,t){const r=[],i=e?e.trim().length:0;if(i)if(e.split("/").length-1>=3)r.push((0,n.t)("PROMPT_ABAP_INVALID_NAMESPACE"));else if(e.match(/^\/.*\/\w*$/g)){const t=e.split("/");let i;t[1].length>10&&(i=(0,n.t)("PROMPT_ABAP_INVALID_NAMESPACE_LENGTH",{length:t[1].length})),t[2].length>15&&(i=`${i?i+", ":""}${(0,n.t)("PROMPT_ABAP_INVALID_APPNAME_LENGTH",{length:t[2].length})}`),i&&r.push(i)}else i>15&&r.push((0,n.t)("PROMPT_ABAP_INVALID_APPNAME_LENGTH",{length:i}));else r.push((0,n.t)("PROMPT_ABAP_APPNAME_REQUIRED"));return i&&(t&&!e?.toUpperCase()?.startsWith(t.toUpperCase())&&r.push((0,n.t)("PROMPT_ABAP_INVALID_APPNAME",{prefix:t})),e.match(/^[A-Za-z0-9_/]*$/)||r.push((0,n.t)("ERROR_CHARACTERS_FORBIDDEN_IN_APP_NAME"))),{valid:0===r.length,errorMessages:r.length?r.join("\n")+(r.length>1?"\n":""):void 0}},t.validateAppDescription=function(e){const t=[];return e.length>60&&t.push((0,n.t)("PROMPT_ABAP_APPDESC_LENGTH")),{valid:0===t.length,errorMessages:t.length?t.join("\n")+(t.length>1?"\n":""):void 0}},t.initTransportConfig=async function({scp:e,url:t,client:r,destination:n,credentials:i,sapSystem:s,errorHandler:a}){let c={};if(!t&&!n)return c;const u={url:t,client:r,destination:n};try{const t=await _(u,s);c=await(0,o.getTransportConfigInstance)({scp:e,credentials:i,system:t})}catch(e){c.error=e}return c.error&&a(c.error),c},t.getTransportList=async function(e,t,{url:r,client:n,destination:i,credentials:s,sapSystem:a}){if(!r&&!i)return;const c={url:r,client:n,destination:i},u=await _(c,a),d=await(0,o.getTransportListFromService)(e,t,{system:u,credentials:s});return 1===d?.length&&""===d[0].transportReqNumber?[]:d},t.createTransportNumber=async function(e,{url:t,client:r,destination:n,credentials:i,sapSystem:o}){if(!t&&!n)return null;const a={url:t,client:r,destination:n},c=await _(a,o);return(0,s.createTransportNumberFromService)(e,{system:c,credentials:i})},t.listPackages=async function(e,{url:t,client:r,destination:n,credentials:i,sapSystem:o}){if(!t&&!n)return[];const s={url:t,client:r,destination:n},c=await _(s,o);return(0,a.listPackagesFromService)(e,{system:c,credentials:i})}},34409:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=34409,e.exports=t},70910:(e,t,r)=>{var n={"./Find-VisualStudio.cs":20183,"./build":17724,"./build.js":17724,"./clean":1658,"./clean.js":1658,"./configure":4748,"./configure.js":4748,"./create-config-gypi":98395,"./create-config-gypi.js":98395,"./find-node-directory":24159,"./find-node-directory.js":24159,"./find-python":29130,"./find-python.js":29130,"./find-visualstudio":17703,"./find-visualstudio.js":17703,"./install":25925,"./install.js":25925,"./list":44179,"./list.js":44179,"./node-gyp":55614,"./node-gyp.js":55614,"./process-release":75344,"./process-release.js":75344,"./rebuild":64187,"./rebuild.js":64187,"./remove":13103,"./remove.js":13103,"./util":55690,"./util.js":55690};function i(e){var t=o(e);return r(t)}function o(e){if(!r.o(n,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return n[e]}i.keys=function(){return Object.keys(n)},i.resolve=o,e.exports=i,i.id=70910},84679:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=84679,e.exports=t},72869:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=72869,e.exports=t},12937:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=12937,e.exports=t},84397:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=84397,e.exports=t},54529:e=>{"use strict";e.exports=require("@opentelemetry/tracing")},85767:e=>{"use strict";e.exports=require("@sap/cds")},32220:e=>{"use strict";e.exports=require("applicationinsights-native-metrics")},43241:e=>{"use strict";e.exports=require("esprima")},74602:e=>{"use strict";e.exports=require("keytar")},66828:e=>{"use strict";e.exports=require("vscode")},39491:e=>{"use strict";e.exports=require("assert")},50852:e=>{"use strict";e.exports=require("async_hooks")},14300:e=>{"use strict";e.exports=require("buffer")},32081:e=>{"use strict";e.exports=require("child_process")},96206:e=>{"use strict";e.exports=require("console")},22057:e=>{"use strict";e.exports=require("constants")},6113:e=>{"use strict";e.exports=require("crypto")},9523:e=>{"use strict";e.exports=require("dns")},82361:e=>{"use strict";e.exports=require("events")},57147:e=>{"use strict";e.exports=require("fs")},73292:e=>{"use strict";e.exports=require("fs/promises")},13685:e=>{"use strict";e.exports=require("http")},95687:e=>{"use strict";e.exports=require("https")},98188:e=>{"use strict";e.exports=require("module")},41808:e=>{"use strict";e.exports=require("net")},22037:e=>{"use strict";e.exports=require("os")},71017:e=>{"use strict";e.exports=require("path")},77282:e=>{"use strict";e.exports=require("process")},85477:e=>{"use strict";e.exports=require("punycode")},63477:e=>{"use strict";e.exports=require("querystring")},14521:e=>{"use strict";e.exports=require("readline")},12781:e=>{"use strict";e.exports=require("stream")},71576:e=>{"use strict";e.exports=require("string_decoder")},39512:e=>{"use strict";e.exports=require("timers")},24404:e=>{"use strict";e.exports=require("tls")},76224:e=>{"use strict";e.exports=require("tty")},57310:e=>{"use strict";e.exports=require("url")},73837:e=>{"use strict";e.exports=require("util")},26144:e=>{"use strict";e.exports=require("vm")},59796:e=>{"use strict";e.exports=require("zlib")},91046:e=>{"use strict";e.exports=JSON.parse('{"DEPLOYMENT_CONFIG_GENERATOR":"Deployment Configuration","DEPLOYMENT_CONFIG_GENERATOR_DESC":"Deployment Configuration","DEPLOYMENT_CONFIG":"Deploy Configuration","DEPLOYMENT_CONFIG_DESC":"Create/Update deployment configuration","DEFAULT_PACKAGE":"$tmp","DEFAULT_ABAP_DESCRIPTION":"ABAP Deployment.","DEFAULT_MTA_DESCRIPTION":"Generated by Fiori Tools","FLP_CONFIG":"FLP Configuration","FLP_CONFIG_DESC":"Create/Update Fiori Launchpad configuration","SERVER_CONFIG":"Application Router Configuration","SERVER_CONFIG_DESC":"Configure the Cloud Foundry application router","STEP_PREPARE":"Prepare","STEP_PREPARE_DESC":"Select project location and choose configuration generator","STEP_DEPLOY_TARGET":"Deploy Target","STEP_DEPLOY_TARGET_DESC":"Select backend type: ABAP or Cloud Foundry","STEP_CONFIG":"Project Configuration","STEP_CONFIG_DESC":"Create or update your project configuration","PROMPT_YUI_PROJECT_FOLDER":"Choose project folder","PROMPT_YUI_SELECT_GENERATOR":"Select a configuration generator","ERROR_CANNOT_FIND_BINARY":"Cannot find the \\"{{bin}}\\" executable. Please add it to the path or use \\"npm i -g {{pkg}}\\" to install it.","ERROR_NO_MANIFEST_AT_PATH":"Manifest not found at path: {{- path}}","ERROR_NO_MANIFEST":"Error: could not read webapp/manifest.json","ERROR_SAP_APP_NOT_DEFINED":"Manifest is missing required section \'sap.app\'","WARNING_CANNOT_UPDATE_I18N":"Cannot update i18n properties file: {{- path}}","WARNING_I18N_FILE_PATH_NOT_FOUND_IN_MANIFEST":"i18n file path not found in manifest.json. Fiori launchpad texts not added.","PROMPT_ABAP_INVALID_NAMESPACE_LENGTH":"Namespace limited to 10 characters, entered {{length}}","PROMPT_ABAP_INVALID_NAMESPACE":"Namespace invalid as there are too many forward slashes","PROMPT_ABAP_APPDESC_LENGTH":"Deployment Description should not exceed 60 characters","ERROR_NO_APPNAME":"Could not determine app name from manifest","ERROR_NO_MTA":"Error: no mta.yaml exists. Please run the deployment generator first","ERROR_NO_MTA_ROOT":"Error: no {{mtaFileName}} in {{root}}","ERROR_UNRECOGNIZED_TARGET":"Unrecognized target: {{target}}","ERROR_NO_PATH":"Cannot find \\"path\\" in backend configuration in ui5.yaml","ERROR_CANNOT_READ_UI5_CONFIG":"Cannot read ui5.yaml: {{reason}}","ERROR_FILE_NOT_EXIST":"File does not exist: {{filePath}}","ERROR_FOLDER_NOT_EXIST":"Folder path does not exist: {{filePath}}","ERROR_INVALID_CLIENT":"[{{client}}] is invalid. Enter blank or a value between 000-999","ERROR_INVALID_URL":"Invalid URL: [{{input}}]","ERROR_S4_SYSTEM_NOT_EXTENSIBLE":"S4 system not configured as Extensibility Development system. Cannot deploy to it.","ERROR_INCORRECT_ATO_SETTINGS":"Incorrect ATO settings. Package or prefix settings mising.","ERROR_PARSE_ATO":"Failed to parse ATO Settings - [{{message}}]","ERROR_NO_APP_NAME":"Could not determine app name from manifest","ERROR_NO_APP_ID":"Could not determine app ID from manifest","ERROR_NO_INBOUND":"Could not determine inbound from the manifest","ERROR_MTA_ID_ALREADY_EXIST":"A folder with same name already exist at {{destinationRoot}}","ERROR_NO_MTA_ID":"MTA ID cannot be empty","ERROR_MTA_DESTINATIONS":"No destinations loaded from mta.yaml","ERROR_INVALID_MTA_ID":"The ID can only contain letters, numbers, dashes, periods and underscores (but no spaces).","ERROR_HYPHENS_FORBIDDEN_IN_APP_NAME":"\'-\' not allowed in application name","ERROR_CHARACTERS_FORBIDDEN_IN_APP_NAME":"Only alphanumeric, underscore and slash characters are allowed","ERROR_MTA_EXTENSION_FOR_ABHE_FAILED":"Unable to create or update the mta extension file for Api Hub Enterprise destination configuration: {{error}}","ERROR_MTA_EXTENSION_ADDITION_FAILED":"Unable to add mta extension configuration to file: {{mtaExtFilePath}}","ERROR_UNABLE_TO_LOAD_MTA":"Unable to load mta.yaml configuration","ERROR_FAILED_TO_LOAD_SERVICE_KEY":"Failed to fetch service key","ERROR_CAP_DEPLOYMENT_NO_MTA":"This Fiori application is within a CAP project and deployment should be configured as part of the CAP project.","INFO_EXISTING_MTA_EXTENSION_NOT_FOUND":"Cannot find a valid existing mta extension file, a new one will be created","INFO_MTA_EXT_CREATED":"Created file: {{mtaExtFile}} to extend mta module: {{appMtaId}} with destination configuration","INFO_MTA_EXT_UPDATED":"Updated file: {{mtaExtFile}} with module destination configuration","WARN_EXISTING_DESTINATION_SERVICE_NOT_FOUND":"A destination service resource cannot be found in the mta.yaml. An mta extension destination instance cannot be added","LOG_ATO_PACKAGE_WARN":"Warning: superceding entered package {{package}} with packaged mandated by backend ATO settings: {{backendPackage}}","LOG_ENTER_CREDENTIAL":"Please enter your credentials for: {{url}}","LOG_ENTER_CREDENTIAL_CLIENT":"Please enter your credentials for: {{url}} (Client {{client}})","LOG_ENTER_CREDENTIAL_DESTINATION":"Please enter your credentials for destination: {{destination}}","LOG_CORRECT_CREDENTIAL":"Correct credentials.","LOG_INCORRECT_CREDENTIAL":"Incorrect credentials. Try again","LOG_INCORRECT_APP_NAME":"Your package is in the customer space. Please check the correctness of the application name as it might need to start with a Z.","LOG_MOVE_APP_PATH":"Moving application to {{newAppPath}}","LOG_WIN_OS_MSG":"Windows OS specific: ","LOG_WIN_OS_CANNOT_MOVE_LOCKED_FILE":"{{winosSpecificMsg}}Cannot remove locked folder {{srcPath}}","LOG_FAILED_SERVICE_KEY":"Failed to fetch service key","LOG_UPDATED_MTA":"Updated mta.yaml","LOG_READ_MTA":"Read mta.yaml with prefix {{prefix}}","LOG_READ_MTA_ERROR":"Could not read mta.yaml, trying again...","LOG_UPDATE_STANDALONE_MTA":"Updated standalone mta.yaml","LOG_UPDATE_MTA_FAILED":"Could not update mta.yaml","LOG_UPDATE_XSAPP_FAILED":"Could not update xs-app.json, error found {{error}}","LOG_UPDATED_XSAPP":"Updated standalone approuter xs-app.json {{message}}","LOG_ERROR":"{{method}} error found {{error}}","LOG_CANNOT_FIND_MTA":"Cannot find mta.yaml in current folder or up directory tree","LOG_ADD_FLP":"Adding FLP artifacts","LOG_ADDING_APP_TO_MTA":"Adding application {{appModule}} to mta.yaml","LOG_ADDING_PARAMS_TO_MTA":"Adding additional parameters to mta.yaml","LOG_ERROR_INSTALL_PHASE":"Error during install phase deployment-generator:cf: {{error}}","LOG_ROOT_ERROR_INSTALL_PHASE":"Error during install phase, root package.json deployment-generator:cf: {{error}}","LOG_ERROR_WRITING_PHASE":"Error writing phase deployment-generator:cf: {{error}}","LOG_ERROR_END_PHASE":"Error end phase deployment-generator:cf: {{error}}","LOG_UPDATING_PACKAGE_JSON":"Error updating package.json: {{error}}","LOG_UPDATED_PACKAGE_JSON":"Updated root package.json","LOG_ADDED_MTA_YAML":"mta.yaml created","WARN_MESSAGE_FLPCONF_INBOUND_CONFIG_KEY_EXISTS":"An inbound configuration with the key: \'{{inboundKey}}\' is already defined. ","PROMPT_FLPCONF_OVERWRITE":"Overwrite existing configuration?","PROMPT_FLPCONF_SEMANTIC_OBJECT":"Semantic Object","PROMPT_FLPCONF_ACTION":"Action","PROMPT_FLPCONF_TITLE":"Title","PROMPT_FLPCONF_SUBTITLE":"Subtitle (optional)","PROMPT_FLPCF_EXIST_MTA_DIR":"Existing configuration at {{mtaDir}} found. Do you want to extend it (or abort)?","PROMPT_FLPCF_NEW_MTA_DIR":"Enter the directory containing mta.yaml","PROMPT_FLPCF_NOT_EXIST_MTA_DIR":"{{mtaPath}} does not exist","PROMPT_VALIDATION_WARN_MAX_LENGTH":"Maximum length: {{maxLength}} characters","PROMPT_VALIDATION_WARNING_INPUT_REQUIRED":"{{inputName}} is required","PROMPT_APP_CHOOSE_TARGET":"Please choose the target","PROMPT_ABAP_APPNAME_REQUIRED":"Application name required","PROMPT_ABAP_INVALID_APPNAME_LENGTH":"Application name limited to 15 characters, entered {{length}}","PROMPT_ABAP_INVALID_APPNAME":"Application name needs to be prefixed with [{{prefix}}]","PROMPT_OVERWRITE_CONFIG":"Editing the deployment configuration will overwrite existing configuration, are you sure you want to continue?","PROMPT_OVERWRITE_ABORT":"Deployment config will abort if you choose no. Click Finish to abort.","PROMPT_ABAP_ENTER_BASE_CONFIG":"Enter the base configuration filename","PROMPT_ABAP_CONFIRM_SCP":"Is this an SAP Business Technology Platform system?","PROMPT_ABAP_DESTINATION":"Destination","PROMPT_ABAP_TARGET_SYSTEM":"Select Target system","PROMPT_ABAP_ENTER_TARGET":"Enter Target System URL","PROMPT_ABAP_TARGET_URL":"Target System URL","PROMPT_ABAP_CLIENT":"Client","PROMPT_ABAP_CLIENT_CHOICE_EXISTING":"Use project defined client {{client}}","PROMPT_ABAP_CLIENT_CHOICE_NEW":"Enter client","PROMPT_ABAP_CLIENT_CHOICE_BLANK":"Use default system client","PROMPT_ABAP_ENTER_CLIENT":"Enter client","PROMPT_ABAP_INVALID_APPNAME_LENGTH_2":"Name (Maximum length: 15 characters)","PROMPT_ABAP_APPNAME":"SAPUI5 ABAP Repository","PROMPT_ABAP_INVALID_APPNAME_LENGTH_PREFIX":"SAPUI5 ABAP Repository (Maximum length: 15 characters, should start with {{applicationPrefix}})","PROMPT_ABAP_PACKAGE":"Package","PROMPT_HINT_TYPE_TO_FILTER":" (Type to filter matching records)","PROMPT_ABAP_PACKAGE_WARN":"Provide a package","PROMPT_PACKAGE_INPUT_CHOICE":"How do you want to enter the Package","PROMPT_ABAP_PACKAGE_NOT_FOUND":"Package list cannot be fetched. Please enter the Package manually.","PROMPT_TRANSPORT_INPUT_CHOICE":"How do you want to enter Transport Request","PROMPT_TRANSPORT_LIST_PRE_REQS":"Name (SAPUI5 ABAP Repository) and Package are required to retrieve the existing Transport Requests","PROMPT_NO_TRANSPORT_REQUESTS":"There are no Transport Requests for the supplied package. You can choose to create a new one now or during deployment","PROMPT_TRANSPORT_NO_EXISTING_LIST":"Transport Request list cannot be fetched. Please enter Transport Request manually.","PROMPT_TRANSPORT_CANNOT_CREATE_TRANSPORT":"Create new Transport Request failed. Please enter Transport Request manually.","ENTER_MANUAL_CHOICE":"Enter manually","LIST_EXISTING_CHOICE":"Choose from existing","CREATE_NEW_CHOICE":"Create new","CREATE_DURING_DEPLOY_CHOICE":"Create during deployment","PROMPT_ABAP_TRANSPORT_NO":"Transport Request","PROMPT_ABAP_TRANSPORT_NO_MANDATORY":"Transport Request (mandatory)","PROMPT_ABAP_TRANSPORT_NO_REQUIRED":"Provide a transport request for your application","PROMPT_CREATE_TRANSPORT":"Created new Transport Request","PROMPT_ABAP_GENERATE_INDEX_HTML":"Generate standalone index.html during deployment","PROMPT_ABAP_USERNAME":"Username: ","PROMPT_ABAP_PASSWORD":"Password: ","PROMPT_ABAP_REQUIRE_CREDENTIAL":"Please provide credential to authenticate backend system","PROMPT_ABAP_DESCRIPTION":"Deployment Description","PROMPT_SERVER_PROJECT_PARENT":"Application router project path","PROMPT_SERVER_STANDALONE_APPROUTER":"Standalone Approuter","PROMPT_SERVER_MANAGED_APPROUTER":"Managed Approuter","PROMPT_SERVER_ADD_ROUTER_MODULE":"Add router module","PROMPT_SERVER_ADD_CONNECTIVITY":"Add connectivity service (required for connections to on-prem systems)?","PROMPT_SERVER_ADVANCED_OPTION":"Configure advanced options","PROMPT_CF_ABAP_ENV_UNAVAIL":"ABAP Environments Unavailable","PROMPT_CF_GENERATE_IN_ROOT":"Generate project artifacts in root folder: {{root}}?","PROMPT_CF_MTA_EXISTS":"Existing configuration at {{mtaPath}} found. Do you want to extend it (or abort)?","PROMPT_CF_SELECT_ROOT_PATH":"Please enter the location of the root folder (relative or absolute path)","PROMPT_CF_CREATE_ROOT":"{{root}} does not exist. Create it?","PROMPT_CF_CREATE_ROOT_CHOICE_YES":"Yes","PROMPT_CF_CREATE_ROOT_CHOICE_NEW":"Enter new name","PROMPT_CF_CREATE_ROOT_CHOICE_ABORT":"Abort","PROMPT_CF_CREATE_MTA_ID":"MTA ID","PROMPT_CF_CREATE_MTA_DESC":"MTA description","PROMPT_CF_CREATE_MTA_VERSION":"MTA version","PROMPT_CF_ABAP_SERVICE":"Do you want to connect to your ABAP environment via direct service binding?","PROMPT_CF_DESTINATION":"Destination name","PROMPT_CF_DESTINATION_HINT":"Destination name - The app router is configured to use direct service binding","PROMPT_CF_HINT_CF_LOGIN":"Login to Cloud Foundry is required prior to view available ABAP services.","PROMPT_CF_LOAD_ABAP_SERVICE_FAIL":"Discovering ABAP environments failed. Check logs for details.","PROMPT_CF_SELECT_ABAP_SERVICE":"ABAP Environment for direct service binding","PROMPT_CF_MOVE_APP_DIR":"Move app directory [{{appPath}}] to {{newRoot}}?\\n(Please ensure everything is under version control and committed first)","PROMPT_CF_NEW_DIR_NAME":"Choose new directory name","PROMPT_CF_APP_PATH_EXISTS":"{{appPath}} already exists.\\nPlease choose an option (h for help)","PROMPT_CF_CREATE_CHOICE_NO_MOVE":"Don\'t move","PROMPT_CF_LABEL_NONE":"None","PROMPT_CF_LABEL_DIRECT_SERVICE_BINDING":"Direct Service Binding","NOT_OVERWRITING_EXISTING_INDEX_HTML":"\'webapp/index.html\' already exists. Won\'t overwrite","PROMPT_GENERATE_MANAGED_APPROUTER":"Add application to managed application router?","WARN_CANNOT_GET_TRANSPORT_CONFIGURATION":"Cannot get transport configuration from the backend","PROMPT_INSTANCE_BASED_DEST_DEFAULT":"Local CAP Project API (Instance Based Destination)","PROMPT_INSTANCE_BASED_DEST":"{{destination}} (Instance Based Destination)","TOOLTIP_SAP_UI5_ABAP_REPO":"Enter the name for the deployed application. The name must follow the rules of creating a BSP application. It must not exceed 15 characters and must consist of alphanumeric characters or underscores only. Name should be unique in the BSP repository and its namespace is compatible with the selected package.","TOOLTIP_ABAP_DESCRIPTION":"The description of the deployed application.","TOOLTIP_ABAP_PACKAGE":"Provide a package for the deployed application.","ERROR_DEPLOY_TARGET_NOT_DEPLOYABLE":"{{systemError}} To continue with project generation choose a different deployment target or skip adding deploy config.","LABEL_TARGET_SYSTEM_BREADCRUMB":"Target System","LABEL_TARGET_SYSTEM_TYPE_BREADCRUMB":"Target Type","LABEL_SCP_BREADCRUMB":"SCP","LABEL_GENERATE_INDEX_HTML_BREADCRUMB":"Generate index.html","LABEL_ADD_APP_TO_ROUTER_BREADCRUMB":"Add to Router","LABEL_FLP_SUBTITLE_BREADCRUMB":"Subtitle","LABEL_ROUTER_PATH_BREADCRUMB":"App Router Path","LABEL_CONNECTIVITY_SERVICE_BREADCRUMB":"Add Connectivity Service","LABEL_DIRECT_SERVICE_ABAP_ENVIRONMENT_BREADCRUMB":"ABAP Env. Binding","INFO_MESSAGE_MORE_SEARCH_RESULTS":"More than {{numResults}} results, keep typing to narrow down","PROMPT_LABEL_S4_CONTINUE":"S/4 {{configType}} configuration is managed centrally as part of the CI pipeline, local updates to deployment configuration will not be for productive use. Are you sure you want to continue?","ERROR_EMPTY_NAME":"You must provide a destination name in order to continue.","ERROR_NAME_MSG":"The destination name must only contain letters, digits, dashes and underscores.","ERROR_NAME_TOO_LONG":"Destination name cannot contain more than 200 characters","VIRTUAL_HOST_WARNING":"As the destination uses a virtual host, you will need to replace the host in the URL with the internal host that is configured with your SAP Cloud Connector when previewing the deployed application."}')},69645:e=>{"use strict";e.exports={}}},n={};function i(e){var t=n[e];if(void 0!==t)return t.exports;var o=n[e]={id:e,loaded:!1,exports:{}};return r[e].call(o.exports,o,o.exports,i),o.loaded=!0,o.exports}i.m=r,i.c=n,i.x=()=>{var e=i.O(void 0,[712,784,475,763],(()=>i(i.s=81741)));return e=i.O(e)},e=[],i.O=(t,r,n,o)=>{if(!r){var s=1/0;for(u=0;u<e.length;u++){for(var[r,n,o]=e[u],a=!0,_=0;_<r.length;_++)(!1&o||s>=o)&&Object.keys(i.O).every((e=>i.O[e](r[_])))?r.splice(_--,1):(a=!1,o<s&&(s=o));if(a){e.splice(u--,1);var c=n();void 0!==c&&(t=c)}}return t}o=o||0;for(var u=e.length;u>0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[r,n,o]},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((t,r)=>(i.f[r](e,t),t)),[])),i.u=e=>({475:"tools-suite-common-libs",712:"commonlibs",763:"app-gen-shared",784:"open-ux-shared"}[e]+"/index.js"),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),i.j=933,i.p="",(()=>{var e={933:1,190:1};i.O.require=t=>e[t];i.f.require=(t,r)=>{e[t]||(t=>{var r=t.modules,n=t.ids,o=t.runtime;for(var s in r)i.o(r,s)&&(i.m[s]=r[s]);o&&o(i);for(var a=0;a<n.length;a++)e[n[a]]=1;i.O()})(require("../"+i.u(t)))}})(),t=i.x,i.x=()=>(i.e(712),i.e(784),i.e(475),i.e(763),t());var o=i.x();module.exports=o})(); |
@@ -1,1 +0,1 @@ | ||
(()=>{var e,r,s={51617:e=>{function r(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}r.keys=()=>[],r.resolve=r,r.id=51617,e.exports=r},39973:e=>{function r(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}r.keys=()=>[],r.resolve=r,r.id=39973,e.exports=r},20230:e=>{function r(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}r.keys=()=>[],r.resolve=r,r.id=20230,e.exports=r},20545:e=>{function r(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}r.keys=()=>[],r.resolve=r,r.id=20545,e.exports=r},4297:e=>{function r(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}r.keys=()=>[],r.resolve=r,r.id=4297,e.exports=r},75601:e=>{function r(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}r.keys=()=>[],r.resolve=r,r.id=75601,e.exports=r},82626:e=>{function r(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}r.keys=()=>[],r.resolve=r,r.id=82626,e.exports=r},37974:e=>{function r(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}r.keys=()=>[],r.resolve=r,r.id=37974,e.exports=r},85858:(e,r,s)=>{var t={"./cat":43112,"./cat.js":43112,"./cd":86698,"./cd.js":86698,"./chmod":23986,"./chmod.js":23986,"./common":96816,"./common.js":96816,"./cp":80610,"./cp.js":80610,"./dirs":91972,"./dirs.js":91972,"./echo":16166,"./echo.js":16166,"./error":80609,"./error.js":80609,"./exec":52024,"./exec-child":69911,"./exec-child.js":69911,"./exec.js":52024,"./find":22261,"./find.js":22261,"./grep":56818,"./grep.js":56818,"./head":66412,"./head.js":66412,"./ln":91247,"./ln.js":91247,"./ls":5815,"./ls.js":5815,"./mkdir":70098,"./mkdir.js":70098,"./mv":74164,"./mv.js":74164,"./popd":99851,"./popd.js":99851,"./pushd":6978,"./pushd.js":6978,"./pwd":24044,"./pwd.js":24044,"./rm":44256,"./rm.js":44256,"./sed":43422,"./sed.js":43422,"./set":17444,"./set.js":17444,"./sort":53033,"./sort.js":53033,"./tail":50318,"./tail.js":50318,"./tempdir":16275,"./tempdir.js":16275,"./test":50021,"./test.js":50021,"./to":44915,"./to.js":44915,"./toEnd":13326,"./toEnd.js":13326,"./touch":57650,"./touch.js":57650,"./uniq":63019,"./uniq.js":63019,"./which":5483,"./which.js":5483};function i(e){var r=n(e);return s(r)}function n(e){if(!s.o(t,e)){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}return t[e]}i.keys=function(){return Object.keys(t)},i.resolve=n,e.exports=i,i.id=85858},59896:function(e,r,s){"use strict";var t=this&&this.__awaiter||function(e,r,s,t){return new(s||(s=Promise))((function(i,n){function o(e){try{c(t.next(e))}catch(e){n(e)}}function u(e){try{c(t.throw(e))}catch(e){n(e)}}function c(e){var r;e.done?i(e.value):(r=e.value,r instanceof s?r:new s((function(e){e(r)}))).then(o,u)}c((t=t.apply(e,r||[])).next())}))};Object.defineProperty(r,"__esModule",{value:!0}),r.checkCdsUi5PluginEnabled=r.enableCdsUi5Plugin=r.satisfiesMinCdsVersion=void 0;const i=s(71017),n=s(5407),o=s(84659),u=s(21832);var c=s(21832);Object.defineProperty(r,"satisfiesMinCdsVersion",{enumerable:!0,get:function(){return c.satisfiesMinCdsVersion}}),r.enableCdsUi5Plugin=function(e,r){var s;return t(this,void 0,void 0,(function*(){r||(r=(0,o.create)((0,n.create)()));const t=(0,i.join)(e,"package.json"),c=null!==(s=r.readJSON(t))&&void 0!==s?s:{};return(0,u.ensureMinCdsVersion)(c),yield(0,u.enableWorkspaces)(e,c),(0,u.addCdsPluginUi5)(c),r.writeJSON(t,c),r}))},r.checkCdsUi5PluginEnabled=function(e,r){return t(this,void 0,void 0,(function*(){r||(r=(0,o.create)((0,n.create)()));const s=(0,i.join)(e,"package.json");if(!r.exists(s))return!1;const t=r.readJSON(s),{workspaceEnabled:c}=yield(0,u.getWorkspaceInfo)(e,t);return(0,u.hasMinCdsVersion)(t)&&c&&(0,u.hasCdsPluginUi5)(t)}))}},21832:function(e,r,s){"use strict";var t=this&&this.__awaiter||function(e,r,s,t){return new(s||(s=Promise))((function(i,n){function o(e){try{c(t.next(e))}catch(e){n(e)}}function u(e){try{c(t.throw(e))}catch(e){n(e)}}function c(e){var r;e.done?i(e.value):(r=e.value,r instanceof s?r:new s((function(e){e(r)}))).then(o,u)}c((t=t.apply(e,r||[])).next())}))};Object.defineProperty(r,"__esModule",{value:!0}),r.hasCdsPluginUi5=r.getWorkspaceInfo=r.satisfiesMinCdsVersion=r.hasMinCdsVersion=r.addCdsPluginUi5=r.enableWorkspaces=r.ensureMinCdsVersion=void 0;const i=s(76027),n=s(88536),o="6.8.2";function u(e){var r,s;return(0,i.gte)(null!==(s=(0,i.coerce)(null===(r=e.dependencies)||void 0===r?void 0:r["@sap/cds"]))&&void 0!==s?s:"0.0.0",o)}function c(e,r){var s;return t(this,void 0,void 0,(function*(){const t=yield(0,n.getCapCustomPaths)(e),i=t.app.endsWith("/")?`${t.app}*`:`${t.app}/*`;return{appWorkspace:i,workspaceEnabled:(null!==(s=d(r))&&void 0!==s?s:[]).includes(i)}}))}function d(e){var r,s;let t;return Array.isArray(e.workspaces)?t=e.workspaces:Array.isArray(null===(r=e.workspaces)||void 0===r?void 0:r.packages)&&(t=null===(s=e.workspaces)||void 0===s?void 0:s.packages),t}function a(e){var r;return!!(null===(r=e.devDependencies)||void 0===r?void 0:r["cds-plugin-ui5"])}r.ensureMinCdsVersion=function(e){var r;u(e)||(null!==(r=e.dependencies)&&void 0!==r||(e.dependencies={}),e.dependencies["@sap/cds"]="^6.8.2")},r.enableWorkspaces=function(e,r){var s;return t(this,void 0,void 0,(function*(){const{appWorkspace:t,workspaceEnabled:i}=yield c(e,r);if(i)return;let n=d(r);n||(null!==(s=r.workspaces)&&void 0!==s||(r.workspaces=[]),Array.isArray(r.workspaces)?n=r.workspaces:(r.workspaces.packages=[],n=r.workspaces.packages)),n.push(t)}))},r.addCdsPluginUi5=function(e){var r;a(e)||(null!==(r=e.devDependencies)&&void 0!==r||(e.devDependencies={}),e.devDependencies["cds-plugin-ui5"]="^0.6.13")},r.hasMinCdsVersion=u,r.satisfiesMinCdsVersion=function(e){var r,s;return u(e)||(0,i.satisfies)(o,null!==(s=null===(r=e.dependencies)||void 0===r?void 0:r["@sap/cds"])&&void 0!==s?s:"0.0.0")},r.getWorkspaceInfo=c,r.hasCdsPluginUi5=a},49339:(e,r,s)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.satisfiesMinCdsVersion=r.enableCdsUi5Plugin=r.checkCdsUi5PluginEnabled=void 0;var t=s(59896);Object.defineProperty(r,"checkCdsUi5PluginEnabled",{enumerable:!0,get:function(){return t.checkCdsUi5PluginEnabled}}),Object.defineProperty(r,"enableCdsUi5Plugin",{enumerable:!0,get:function(){return t.enableCdsUi5Plugin}}),Object.defineProperty(r,"satisfiesMinCdsVersion",{enumerable:!0,get:function(){return t.satisfiesMinCdsVersion}})},34409:e=>{function r(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}r.keys=()=>[],r.resolve=r,r.id=34409,e.exports=r},70910:(e,r,s)=>{var t={"./Find-VisualStudio.cs":20183,"./build":17724,"./build.js":17724,"./clean":1658,"./clean.js":1658,"./configure":4748,"./configure.js":4748,"./create-config-gypi":98395,"./create-config-gypi.js":98395,"./find-node-directory":24159,"./find-node-directory.js":24159,"./find-python":29130,"./find-python.js":29130,"./find-visualstudio":17703,"./find-visualstudio.js":17703,"./install":25925,"./install.js":25925,"./list":44179,"./list.js":44179,"./node-gyp":55614,"./node-gyp.js":55614,"./process-release":75344,"./process-release.js":75344,"./rebuild":64187,"./rebuild.js":64187,"./remove":13103,"./remove.js":13103,"./util":55690,"./util.js":55690};function i(e){var r=n(e);return s(r)}function n(e){if(!s.o(t,e)){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}return t[e]}i.keys=function(){return Object.keys(t)},i.resolve=n,e.exports=i,i.id=70910},84679:e=>{function r(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}r.keys=()=>[],r.resolve=r,r.id=84679,e.exports=r},72869:e=>{function r(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}r.keys=()=>[],r.resolve=r,r.id=72869,e.exports=r},12937:e=>{function r(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}r.keys=()=>[],r.resolve=r,r.id=12937,e.exports=r},84397:e=>{function r(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}r.keys=()=>[],r.resolve=r,r.id=84397,e.exports=r},54529:e=>{"use strict";e.exports=require("@opentelemetry/tracing")},85767:e=>{"use strict";e.exports=require("@sap/cds")},31980:e=>{"use strict";e.exports=require("@sap/cds-compiler")},32220:e=>{"use strict";e.exports=require("applicationinsights-native-metrics")},43241:e=>{"use strict";e.exports=require("esprima")},74602:e=>{"use strict";e.exports=require("keytar")},66828:e=>{"use strict";e.exports=require("vscode")},39491:e=>{"use strict";e.exports=require("assert")},50852:e=>{"use strict";e.exports=require("async_hooks")},14300:e=>{"use strict";e.exports=require("buffer")},32081:e=>{"use strict";e.exports=require("child_process")},96206:e=>{"use strict";e.exports=require("console")},22057:e=>{"use strict";e.exports=require("constants")},6113:e=>{"use strict";e.exports=require("crypto")},9523:e=>{"use strict";e.exports=require("dns")},82361:e=>{"use strict";e.exports=require("events")},57147:e=>{"use strict";e.exports=require("fs")},73292:e=>{"use strict";e.exports=require("fs/promises")},13685:e=>{"use strict";e.exports=require("http")},95687:e=>{"use strict";e.exports=require("https")},98188:e=>{"use strict";e.exports=require("module")},41808:e=>{"use strict";e.exports=require("net")},22037:e=>{"use strict";e.exports=require("os")},71017:e=>{"use strict";e.exports=require("path")},77282:e=>{"use strict";e.exports=require("process")},85477:e=>{"use strict";e.exports=require("punycode")},63477:e=>{"use strict";e.exports=require("querystring")},14521:e=>{"use strict";e.exports=require("readline")},12781:e=>{"use strict";e.exports=require("stream")},71576:e=>{"use strict";e.exports=require("string_decoder")},39512:e=>{"use strict";e.exports=require("timers")},24404:e=>{"use strict";e.exports=require("tls")},76224:e=>{"use strict";e.exports=require("tty")},57310:e=>{"use strict";e.exports=require("url")},73837:e=>{"use strict";e.exports=require("util")},26144:e=>{"use strict";e.exports=require("vm")},59796:e=>{"use strict";e.exports=require("zlib")},69645:e=>{"use strict";e.exports={}}},t={};function i(e){var r=t[e];if(void 0!==r)return r.exports;var n=t[e]={id:e,loaded:!1,exports:{}};return s[e].call(n.exports,n,n.exports,i),n.loaded=!0,n.exports}i.m=s,i.c=t,i.x=()=>{var e=i.O(void 0,[712,784,475,763,2],(()=>i(i.s=42205)));return e=i.O(e)},e=[],i.O=(r,s,t,n)=>{if(!s){var o=1/0;for(a=0;a<e.length;a++){for(var[s,t,n]=e[a],u=!0,c=0;c<s.length;c++)(!1&n||o>=n)&&Object.keys(i.O).every((e=>i.O[e](s[c])))?s.splice(c--,1):(u=!1,n<o&&(o=n));if(u){e.splice(a--,1);var d=t();void 0!==d&&(r=d)}}return r}n=n||0;for(var a=e.length;a>0&&e[a-1][2]>n;a--)e[a]=e[a-1];e[a]=[s,t,n]},i.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return i.d(r,{a:r}),r},i.d=(e,r)=>{for(var s in r)i.o(r,s)&&!i.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:r[s]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((r,s)=>(i.f[s](e,r),r)),[])),i.u=e=>({2:"project-generator/app",475:"tools-suite-common-libs",712:"commonlibs",763:"app-gen-shared",784:"open-ux-shared"}[e]+"/index.js"),i.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),i.j=77,i.p="",(()=>{var e={77:1,190:1};i.O.require=r=>e[r];i.f.require=(r,s)=>{e[r]||(r=>{var s=r.modules,t=r.ids,n=r.runtime;for(var o in s)i.o(s,o)&&(i.m[o]=s[o]);n&&n(i);for(var u=0;u<t.length;u++)e[t[u]]=1;i.O()})(require("../"+i.u(r)))}})(),r=i.x,i.x=()=>(i.e(712),i.e(784),i.e(475),i.e(763),i.e(2),r());var n=i.x();module.exports=n})(); | ||
(()=>{var e,r,s={51617:e=>{function r(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}r.keys=()=>[],r.resolve=r,r.id=51617,e.exports=r},39973:e=>{function r(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}r.keys=()=>[],r.resolve=r,r.id=39973,e.exports=r},20230:e=>{function r(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}r.keys=()=>[],r.resolve=r,r.id=20230,e.exports=r},20545:e=>{function r(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}r.keys=()=>[],r.resolve=r,r.id=20545,e.exports=r},4297:e=>{function r(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}r.keys=()=>[],r.resolve=r,r.id=4297,e.exports=r},75601:e=>{function r(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}r.keys=()=>[],r.resolve=r,r.id=75601,e.exports=r},82626:e=>{function r(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}r.keys=()=>[],r.resolve=r,r.id=82626,e.exports=r},37974:e=>{function r(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}r.keys=()=>[],r.resolve=r,r.id=37974,e.exports=r},85858:(e,r,s)=>{var t={"./cat":43112,"./cat.js":43112,"./cd":86698,"./cd.js":86698,"./chmod":23986,"./chmod.js":23986,"./common":96816,"./common.js":96816,"./cp":80610,"./cp.js":80610,"./dirs":91972,"./dirs.js":91972,"./echo":16166,"./echo.js":16166,"./error":80609,"./error.js":80609,"./exec":52024,"./exec-child":69911,"./exec-child.js":69911,"./exec.js":52024,"./find":22261,"./find.js":22261,"./grep":56818,"./grep.js":56818,"./head":66412,"./head.js":66412,"./ln":91247,"./ln.js":91247,"./ls":5815,"./ls.js":5815,"./mkdir":70098,"./mkdir.js":70098,"./mv":74164,"./mv.js":74164,"./popd":99851,"./popd.js":99851,"./pushd":6978,"./pushd.js":6978,"./pwd":24044,"./pwd.js":24044,"./rm":44256,"./rm.js":44256,"./sed":43422,"./sed.js":43422,"./set":17444,"./set.js":17444,"./sort":53033,"./sort.js":53033,"./tail":50318,"./tail.js":50318,"./tempdir":16275,"./tempdir.js":16275,"./test":50021,"./test.js":50021,"./to":44915,"./to.js":44915,"./toEnd":13326,"./toEnd.js":13326,"./touch":57650,"./touch.js":57650,"./uniq":63019,"./uniq.js":63019,"./which":5483,"./which.js":5483};function i(e){var r=n(e);return s(r)}function n(e){if(!s.o(t,e)){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}return t[e]}i.keys=function(){return Object.keys(t)},i.resolve=n,e.exports=i,i.id=85858},59896:function(e,r,s){"use strict";var t=this&&this.__awaiter||function(e,r,s,t){return new(s||(s=Promise))((function(i,n){function o(e){try{c(t.next(e))}catch(e){n(e)}}function u(e){try{c(t.throw(e))}catch(e){n(e)}}function c(e){var r;e.done?i(e.value):(r=e.value,r instanceof s?r:new s((function(e){e(r)}))).then(o,u)}c((t=t.apply(e,r||[])).next())}))};Object.defineProperty(r,"__esModule",{value:!0}),r.checkCdsUi5PluginEnabled=r.enableCdsUi5Plugin=r.satisfiesMinCdsVersion=void 0;const i=s(71017),n=s(5407),o=s(84659),u=s(21832);var c=s(21832);Object.defineProperty(r,"satisfiesMinCdsVersion",{enumerable:!0,get:function(){return c.satisfiesMinCdsVersion}}),r.enableCdsUi5Plugin=function(e,r){var s;return t(this,void 0,void 0,(function*(){r||(r=(0,o.create)((0,n.create)()));const t=(0,i.join)(e,"package.json"),c=null!==(s=r.readJSON(t))&&void 0!==s?s:{};return(0,u.ensureMinCdsVersion)(c),yield(0,u.enableWorkspaces)(e,c),(0,u.addCdsPluginUi5)(c),r.writeJSON(t,c),r}))},r.checkCdsUi5PluginEnabled=function(e,r){return t(this,void 0,void 0,(function*(){r||(r=(0,o.create)((0,n.create)()));const s=(0,i.join)(e,"package.json");if(!r.exists(s))return!1;const t=r.readJSON(s),{workspaceEnabled:c}=yield(0,u.getWorkspaceInfo)(e,t);return(0,u.hasMinCdsVersion)(t)&&c&&(0,u.hasCdsPluginUi5)(t)}))}},21832:function(e,r,s){"use strict";var t=this&&this.__awaiter||function(e,r,s,t){return new(s||(s=Promise))((function(i,n){function o(e){try{c(t.next(e))}catch(e){n(e)}}function u(e){try{c(t.throw(e))}catch(e){n(e)}}function c(e){var r;e.done?i(e.value):(r=e.value,r instanceof s?r:new s((function(e){e(r)}))).then(o,u)}c((t=t.apply(e,r||[])).next())}))};Object.defineProperty(r,"__esModule",{value:!0}),r.hasCdsPluginUi5=r.getWorkspaceInfo=r.satisfiesMinCdsVersion=r.hasMinCdsVersion=r.addCdsPluginUi5=r.enableWorkspaces=r.ensureMinCdsVersion=void 0;const i=s(76027),n=s(9949),o="6.8.2";function u(e){var r,s;return(0,i.gte)(null!==(s=(0,i.coerce)(null===(r=e.dependencies)||void 0===r?void 0:r["@sap/cds"]))&&void 0!==s?s:"0.0.0",o)}function c(e,r){var s;return t(this,void 0,void 0,(function*(){const t=yield(0,n.getCapCustomPaths)(e),i=t.app.endsWith("/")?`${t.app}*`:`${t.app}/*`;return{appWorkspace:i,workspaceEnabled:(null!==(s=d(r))&&void 0!==s?s:[]).includes(i)}}))}function d(e){var r,s;let t;return Array.isArray(e.workspaces)?t=e.workspaces:Array.isArray(null===(r=e.workspaces)||void 0===r?void 0:r.packages)&&(t=null===(s=e.workspaces)||void 0===s?void 0:s.packages),t}function a(e){var r;return!!(null===(r=e.devDependencies)||void 0===r?void 0:r["cds-plugin-ui5"])}r.ensureMinCdsVersion=function(e){var r;u(e)||(null!==(r=e.dependencies)&&void 0!==r||(e.dependencies={}),e.dependencies["@sap/cds"]="^6.8.2")},r.enableWorkspaces=function(e,r){var s;return t(this,void 0,void 0,(function*(){const{appWorkspace:t,workspaceEnabled:i}=yield c(e,r);if(i)return;let n=d(r);n||(null!==(s=r.workspaces)&&void 0!==s||(r.workspaces=[]),Array.isArray(r.workspaces)?n=r.workspaces:(r.workspaces.packages=[],n=r.workspaces.packages)),n.push(t)}))},r.addCdsPluginUi5=function(e){var r;a(e)||(null!==(r=e.devDependencies)&&void 0!==r||(e.devDependencies={}),e.devDependencies["cds-plugin-ui5"]="^0.6.13")},r.hasMinCdsVersion=u,r.satisfiesMinCdsVersion=function(e){var r,s;return u(e)||(0,i.satisfies)(o,null!==(s=null===(r=e.dependencies)||void 0===r?void 0:r["@sap/cds"])&&void 0!==s?s:"0.0.0")},r.getWorkspaceInfo=c,r.hasCdsPluginUi5=a},49339:(e,r,s)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.satisfiesMinCdsVersion=r.enableCdsUi5Plugin=r.checkCdsUi5PluginEnabled=void 0;var t=s(59896);Object.defineProperty(r,"checkCdsUi5PluginEnabled",{enumerable:!0,get:function(){return t.checkCdsUi5PluginEnabled}}),Object.defineProperty(r,"enableCdsUi5Plugin",{enumerable:!0,get:function(){return t.enableCdsUi5Plugin}}),Object.defineProperty(r,"satisfiesMinCdsVersion",{enumerable:!0,get:function(){return t.satisfiesMinCdsVersion}})},34409:e=>{function r(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}r.keys=()=>[],r.resolve=r,r.id=34409,e.exports=r},70910:(e,r,s)=>{var t={"./Find-VisualStudio.cs":20183,"./build":17724,"./build.js":17724,"./clean":1658,"./clean.js":1658,"./configure":4748,"./configure.js":4748,"./create-config-gypi":98395,"./create-config-gypi.js":98395,"./find-node-directory":24159,"./find-node-directory.js":24159,"./find-python":29130,"./find-python.js":29130,"./find-visualstudio":17703,"./find-visualstudio.js":17703,"./install":25925,"./install.js":25925,"./list":44179,"./list.js":44179,"./node-gyp":55614,"./node-gyp.js":55614,"./process-release":75344,"./process-release.js":75344,"./rebuild":64187,"./rebuild.js":64187,"./remove":13103,"./remove.js":13103,"./util":55690,"./util.js":55690};function i(e){var r=n(e);return s(r)}function n(e){if(!s.o(t,e)){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}return t[e]}i.keys=function(){return Object.keys(t)},i.resolve=n,e.exports=i,i.id=70910},84679:e=>{function r(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}r.keys=()=>[],r.resolve=r,r.id=84679,e.exports=r},72869:e=>{function r(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}r.keys=()=>[],r.resolve=r,r.id=72869,e.exports=r},12937:e=>{function r(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}r.keys=()=>[],r.resolve=r,r.id=12937,e.exports=r},84397:e=>{function r(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}r.keys=()=>[],r.resolve=r,r.id=84397,e.exports=r},54529:e=>{"use strict";e.exports=require("@opentelemetry/tracing")},85767:e=>{"use strict";e.exports=require("@sap/cds")},31980:e=>{"use strict";e.exports=require("@sap/cds-compiler")},32220:e=>{"use strict";e.exports=require("applicationinsights-native-metrics")},43241:e=>{"use strict";e.exports=require("esprima")},74602:e=>{"use strict";e.exports=require("keytar")},66828:e=>{"use strict";e.exports=require("vscode")},39491:e=>{"use strict";e.exports=require("assert")},50852:e=>{"use strict";e.exports=require("async_hooks")},14300:e=>{"use strict";e.exports=require("buffer")},32081:e=>{"use strict";e.exports=require("child_process")},96206:e=>{"use strict";e.exports=require("console")},22057:e=>{"use strict";e.exports=require("constants")},6113:e=>{"use strict";e.exports=require("crypto")},9523:e=>{"use strict";e.exports=require("dns")},82361:e=>{"use strict";e.exports=require("events")},57147:e=>{"use strict";e.exports=require("fs")},73292:e=>{"use strict";e.exports=require("fs/promises")},13685:e=>{"use strict";e.exports=require("http")},95687:e=>{"use strict";e.exports=require("https")},98188:e=>{"use strict";e.exports=require("module")},41808:e=>{"use strict";e.exports=require("net")},22037:e=>{"use strict";e.exports=require("os")},71017:e=>{"use strict";e.exports=require("path")},77282:e=>{"use strict";e.exports=require("process")},85477:e=>{"use strict";e.exports=require("punycode")},63477:e=>{"use strict";e.exports=require("querystring")},14521:e=>{"use strict";e.exports=require("readline")},12781:e=>{"use strict";e.exports=require("stream")},71576:e=>{"use strict";e.exports=require("string_decoder")},39512:e=>{"use strict";e.exports=require("timers")},24404:e=>{"use strict";e.exports=require("tls")},76224:e=>{"use strict";e.exports=require("tty")},57310:e=>{"use strict";e.exports=require("url")},73837:e=>{"use strict";e.exports=require("util")},26144:e=>{"use strict";e.exports=require("vm")},59796:e=>{"use strict";e.exports=require("zlib")},69645:e=>{"use strict";e.exports={}}},t={};function i(e){var r=t[e];if(void 0!==r)return r.exports;var n=t[e]={id:e,loaded:!1,exports:{}};return s[e].call(n.exports,n,n.exports,i),n.loaded=!0,n.exports}i.m=s,i.c=t,i.x=()=>{var e=i.O(void 0,[712,784,475,763,2],(()=>i(i.s=42205)));return e=i.O(e)},e=[],i.O=(r,s,t,n)=>{if(!s){var o=1/0;for(a=0;a<e.length;a++){for(var[s,t,n]=e[a],u=!0,c=0;c<s.length;c++)(!1&n||o>=n)&&Object.keys(i.O).every((e=>i.O[e](s[c])))?s.splice(c--,1):(u=!1,n<o&&(o=n));if(u){e.splice(a--,1);var d=t();void 0!==d&&(r=d)}}return r}n=n||0;for(var a=e.length;a>0&&e[a-1][2]>n;a--)e[a]=e[a-1];e[a]=[s,t,n]},i.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return i.d(r,{a:r}),r},i.d=(e,r)=>{for(var s in r)i.o(r,s)&&!i.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:r[s]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((r,s)=>(i.f[s](e,r),r)),[])),i.u=e=>({2:"project-generator/app",475:"tools-suite-common-libs",712:"commonlibs",763:"app-gen-shared",784:"open-ux-shared"}[e]+"/index.js"),i.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),i.j=77,i.p="",(()=>{var e={77:1,190:1};i.O.require=r=>e[r];i.f.require=(r,s)=>{e[r]||(r=>{var s=r.modules,t=r.ids,n=r.runtime;for(var o in s)i.o(s,o)&&(i.m[o]=s[o]);n&&n(i);for(var u=0;u<t.length;u++)e[t[u]]=1;i.O()})(require("../"+i.u(r)))}})(),r=i.x,i.x=()=>(i.e(712),i.e(784),i.e(475),i.e(763),i.e(2),r());var n=i.x();module.exports=n})(); |
@@ -1,1 +0,1 @@ | ||
(()=>{var e,t,r={51617:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=51617,e.exports=t},39973:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=39973,e.exports=t},20230:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=20230,e.exports=t},20545:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=20545,e.exports=t},4297:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=4297,e.exports=t},75601:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=75601,e.exports=t},82626:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=82626,e.exports=t},37974:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=37974,e.exports=t},85858:(e,t,r)=>{var i={"./cat":43112,"./cat.js":43112,"./cd":86698,"./cd.js":86698,"./chmod":23986,"./chmod.js":23986,"./common":96816,"./common.js":96816,"./cp":80610,"./cp.js":80610,"./dirs":91972,"./dirs.js":91972,"./echo":16166,"./echo.js":16166,"./error":80609,"./error.js":80609,"./exec":52024,"./exec-child":69911,"./exec-child.js":69911,"./exec.js":52024,"./find":22261,"./find.js":22261,"./grep":56818,"./grep.js":56818,"./head":66412,"./head.js":66412,"./ln":91247,"./ln.js":91247,"./ls":5815,"./ls.js":5815,"./mkdir":70098,"./mkdir.js":70098,"./mv":74164,"./mv.js":74164,"./popd":99851,"./popd.js":99851,"./pushd":6978,"./pushd.js":6978,"./pwd":24044,"./pwd.js":24044,"./rm":44256,"./rm.js":44256,"./sed":43422,"./sed.js":43422,"./set":17444,"./set.js":17444,"./sort":53033,"./sort.js":53033,"./tail":50318,"./tail.js":50318,"./tempdir":16275,"./tempdir.js":16275,"./test":50021,"./test.js":50021,"./to":44915,"./to.js":44915,"./toEnd":13326,"./toEnd.js":13326,"./touch":57650,"./touch.js":57650,"./uniq":63019,"./uniq.js":63019,"./which":5483,"./which.js":5483};function n(e){var t=s(e);return r(t)}function s(e){if(!r.o(i,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return i[e]}n.keys=function(){return Object.keys(i)},n.resolve=s,e.exports=n,n.id=85858},59896:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,s){function o(e){try{u(i.next(e))}catch(e){s(e)}}function a(e){try{u(i.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,a)}u((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.checkCdsUi5PluginEnabled=t.enableCdsUi5Plugin=t.satisfiesMinCdsVersion=void 0;const n=r(71017),s=r(5407),o=r(84659),a=r(21832);var u=r(21832);Object.defineProperty(t,"satisfiesMinCdsVersion",{enumerable:!0,get:function(){return u.satisfiesMinCdsVersion}}),t.enableCdsUi5Plugin=function(e,t){var r;return i(this,void 0,void 0,(function*(){t||(t=(0,o.create)((0,s.create)()));const i=(0,n.join)(e,"package.json"),u=null!==(r=t.readJSON(i))&&void 0!==r?r:{};return(0,a.ensureMinCdsVersion)(u),yield(0,a.enableWorkspaces)(e,u),(0,a.addCdsPluginUi5)(u),t.writeJSON(i,u),t}))},t.checkCdsUi5PluginEnabled=function(e,t){return i(this,void 0,void 0,(function*(){t||(t=(0,o.create)((0,s.create)()));const r=(0,n.join)(e,"package.json");if(!t.exists(r))return!1;const i=t.readJSON(r),{workspaceEnabled:u}=yield(0,a.getWorkspaceInfo)(e,i);return(0,a.hasMinCdsVersion)(i)&&u&&(0,a.hasCdsPluginUi5)(i)}))}},21832:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,s){function o(e){try{u(i.next(e))}catch(e){s(e)}}function a(e){try{u(i.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,a)}u((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.hasCdsPluginUi5=t.getWorkspaceInfo=t.satisfiesMinCdsVersion=t.hasMinCdsVersion=t.addCdsPluginUi5=t.enableWorkspaces=t.ensureMinCdsVersion=void 0;const n=r(76027),s=r(88536),o="6.8.2";function a(e){var t,r;return(0,n.gte)(null!==(r=(0,n.coerce)(null===(t=e.dependencies)||void 0===t?void 0:t["@sap/cds"]))&&void 0!==r?r:"0.0.0",o)}function u(e,t){var r;return i(this,void 0,void 0,(function*(){const i=yield(0,s.getCapCustomPaths)(e),n=i.app.endsWith("/")?`${i.app}*`:`${i.app}/*`;return{appWorkspace:n,workspaceEnabled:(null!==(r=c(t))&&void 0!==r?r:[]).includes(n)}}))}function c(e){var t,r;let i;return Array.isArray(e.workspaces)?i=e.workspaces:Array.isArray(null===(t=e.workspaces)||void 0===t?void 0:t.packages)&&(i=null===(r=e.workspaces)||void 0===r?void 0:r.packages),i}function d(e){var t;return!!(null===(t=e.devDependencies)||void 0===t?void 0:t["cds-plugin-ui5"])}t.ensureMinCdsVersion=function(e){var t;a(e)||(null!==(t=e.dependencies)&&void 0!==t||(e.dependencies={}),e.dependencies["@sap/cds"]="^6.8.2")},t.enableWorkspaces=function(e,t){var r;return i(this,void 0,void 0,(function*(){const{appWorkspace:i,workspaceEnabled:n}=yield u(e,t);if(n)return;let s=c(t);s||(null!==(r=t.workspaces)&&void 0!==r||(t.workspaces=[]),Array.isArray(t.workspaces)?s=t.workspaces:(t.workspaces.packages=[],s=t.workspaces.packages)),s.push(i)}))},t.addCdsPluginUi5=function(e){var t;d(e)||(null!==(t=e.devDependencies)&&void 0!==t||(e.devDependencies={}),e.devDependencies["cds-plugin-ui5"]="^0.6.13")},t.hasMinCdsVersion=a,t.satisfiesMinCdsVersion=function(e){var t,r;return a(e)||(0,n.satisfies)(o,null!==(r=null===(t=e.dependencies)||void 0===t?void 0:t["@sap/cds"])&&void 0!==r?r:"0.0.0")},t.getWorkspaceInfo=u,t.hasCdsPluginUi5=d},49339:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.satisfiesMinCdsVersion=t.enableCdsUi5Plugin=t.checkCdsUi5PluginEnabled=void 0;var i=r(59896);Object.defineProperty(t,"checkCdsUi5PluginEnabled",{enumerable:!0,get:function(){return i.checkCdsUi5PluginEnabled}}),Object.defineProperty(t,"enableCdsUi5Plugin",{enumerable:!0,get:function(){return i.enableCdsUi5Plugin}}),Object.defineProperty(t,"satisfiesMinCdsVersion",{enumerable:!0,get:function(){return i.satisfiesMinCdsVersion}})},85513:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(81836),t)},81836:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ProjectInquirer=void 0;const n=r(59390),s=r(1628),o=r(11115),a=r(56470),u=r(48191),c=i(r(66544)),{mainQuestions:d,advancedQuestions:l}=s.FioriGeneratorPromptNames.projectAttributes;t.ProjectInquirer=class ProjectInquirer{async inquire(e,{...t},r){const i=[],c=await(0,u.getUI5VersionChoices)(t.minSupportedUI5Version),l=await(0,n.getSapSystemUI5Version)(t.host),p=(0,a.findUI5VersionChoice)(l,c),f=t.promptSettings;return i.push(...(0,s.withExtensions)((0,o.getMainQuestions)(r,!!t.capService,!f?.[d.ui5Version]?.hide&&c,p,f),t.extensions)),i.push({type:"confirm",name:"showAdvanced",message:(0,s.t)("ADVANCED_CONFIGURE_MESSAGE"),guiOptions:{hint:(0,s.t)("TOOLTIP_ADVANCED_CONFIG")},default:!1}),i.push(...(0,s.withExtensions)((0,s.withCondition)((0,o.getAdvancedQuestions)(c,t.capService,f),(e=>e.showAdvanced)),t.extensions)),this.answersToProject(await e(i),t)}async answersToProject(e,{isV4:t=!1,promptSettings:r,extensions:i}){const s=e?.ui5Version,o=(await(0,n.retrieveUI5Versions)({fioriElementsVersion:t?"v4":"v2",onlyVersionNumbers:!0,onlyNpmVersion:!0,ui5SelectedVersion:s??"Latest"}))[0],a={name:e?.name||r?.[d.name]?.value,description:e?.description,title:e?.title,namespace:e?.namespace,targetFolder:e?.targetFolder||r?.[d.targetFolder]?.value,ui5Version:s||o,addDeployConfig:e?.addDeployConfig,addFlpConfig:e?.addFlpConfig,sapux:!0,localUI5Version:o,ui5Theme:e?.ui5Theme,enableEslint:e?.enableEslint,enableCodeAssist:e?.enableCodeAssist,skipAnnotations:e?.skipAnnotations,enableNPMWorkspaces:e?.enableNPMWorkspaces,enableTypeScript:e?.enableTypeScript};return e?.showAdvanced||Object.assign(a,await this.getAdvancedDefaults(a,i)),a}async getAdvancedDefaults(e,t){let r={};t&&(r=await this.getExtensionDefaults(t,e));return{ui5Theme:e.ui5Theme||r.ui5Theme||(0,n.getDefaultTheme)(e.ui5Version),enableEslint:e.enableEslint||r.enableEslint||s.DEFAULT_PROJECT_ATTRIBUTES.enableCodeAssist,enableCodeAssist:e.enableCodeAssist||r.enableCodeAssist||s.DEFAULT_PROJECT_ATTRIBUTES.enableCodeAssist,skipAnnotations:e.skipAnnotations||r.skipAnnotations||s.DEFAULT_PROJECT_ATTRIBUTES.skipAnnotations,enableNPMWorkspaces:e.enableNPMWorkspaces,enableTypeScript:e.enableTypeScript||r.enableTypeScript||s.DEFAULT_PROJECT_ATTRIBUTES.enableTypeScript}}async getExtensionDefaults(e,t){const r=Object.values(l),i={};for await(const n of r)if(!(0,c.default)(e[n]?.default)){const r="function"==typeof e[n].default?await e[n].default(t):e[n].default;Object.assign(i,{[n]:r})}return i}}},40335:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAdvancedQuestions=void 0;const i=r(1628),n=r(59390),s=r(48191),o=i.FioriGeneratorPromptNames.projectAttributes.advancedQuestions;t.getAdvancedQuestions=function(e,t,r){let a;const u=[];return u.push({type:"list",name:o.ui5Theme,message:(0,i.t)("LABEL_UI5_THEME"),guiOptions:{applyDefaultWhenDirty:!0,breadcrumb:(0,i.breadcrumbHelper)()},choices:({ui5Version:e="Latest"})=>(a=(0,s.getFilterThemesChoices)(e),a),default:({ui5Theme:e,ui5Version:t})=>(e||(e=(0,n.getDefaultTheme)(t)),e)}),t||r?.[o.enableEslint]?.hide||u.push({type:"confirm",name:o.enableEslint,message:(0,i.t)("ENABLE_ESLINT"),default:r?.[o.enableEslint]?.value??i.DEFAULT_PROJECT_ATTRIBUTES[o.enableEslint],guiOptions:{breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("LABEL_ESLINT_ENABLED_BREADCRUMB"))}}),r?.[o.enableCodeAssist]?.hide||u.push({when:t=>{const r=e.map((e=>e.version.semantic));return(0,n.uI5VersionsWithCodeAssist)(r,t?.ui5Version||"Latest")},type:"confirm",name:o.enableCodeAssist,message:(0,i.t)("ENABLE_CODE_ASSIST_MESSAGE"),default:r?.[o.enableCodeAssist]?.value??i.DEFAULT_PROJECT_ATTRIBUTES[o.enableCodeAssist],guiOptions:{breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("LABEL_CODE_ASSIST_ENABLED_BREADCRUMB"))}}),r?.[o.skipAnnotations]?.hide||u.push({type:"confirm",name:o.skipAnnotations,message:(0,i.t)("SKIP_ANNOTATIONS"),default:r?.[o.skipAnnotations]?.value??i.DEFAULT_PROJECT_ATTRIBUTES[o.skipAnnotations],guiOptions:{breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("LABEL_SKIP_ANNOTATIONS_BREADCRUMB"))}}),u.push({when:()=>t?.capType===i.CapType.NODE_JS&&((0,s.checkHasCdsMinVersion)(t.projectPath)&&!t.cdsUI5PluginEnabled),type:"confirm",name:"enableNPMWorkspaces",message:(0,i.t)("ENABLE_NPM_WORKSPACES"),default:!1,guiOptions:{breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("LABEL_ENABLE_NPM_WORKSPACES_BREADCRUMB"))}}),r?.[o.enableTypeScript]?.hide||u.push({when:e=>!t||t.capType===i.CapType.NODE_JS&&(t.cdsUI5PluginEnabled||e?.enableNPMWorkspaces),type:"confirm",name:o.enableTypeScript,message:(0,i.t)("ENABLE_TYPESCRIPT"),default:r?.[o.enableTypeScript]?.value??i.DEFAULT_PROJECT_ATTRIBUTES[o.enableTypeScript],guiOptions:{breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("LABEL_ENABLE_TYPESCRIPT_BREADCRUMB"))}}),u}},57286:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(40335),t)},48191:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.checkHasCdsMinVersion=t.ui5VersionsGrouped=t.getFilterThemesChoices=t.getUI5VersionChoices=void 0;const n=r(59390),s=r(1628),o=i(r(85715)),a=r(5407),u=r(84659),c=r(49339),d=r(71017);t.getUI5VersionChoices=async function(e){const t={includeSnapshots:!1,minSupportedUI5Version:e,useCache:!0,removeDuplicateVersions:!0,groupUI5Versions:!0};return(0,n.getUI5VersionsEnhanced)(t)},t.getFilterThemesChoices=function(e){return(0,n.getUi5Themes)(e).map((e=>({value:e.themeid,name:e.label})))},t.ui5VersionsGrouped=function(e){return e?(0,s.getPlatform)()===s.PLATFORMS.CLI?[...e.filter((e=>(!0===e.version.maintained&&(e.name=`${e.name} - (${(0,s.t)("MAINTAINED")} ${(0,s.t)("VERSION",{count:1})})`),!0===e.version.maintained))),...e.filter((e=>(!1===e.version.maintained&&(e.name=`${e.name} - (${(0,s.t)("OUT_OF_MAINTENANCE")} ${(0,s.t)("VERSION",{count:1})})`),!1===e.version.maintained)))]:[new o.default.Separator(`${(0,s.t)("MAINTAINED")} ${(0,s.t)("VERSION",{count:0})}`),...e.filter((e=>!0===e.version.maintained)),new o.default.Separator(`${(0,s.t)("OUT_OF_MAINTENANCE")} ${(0,s.t)("VERSION",{count:0})}`),...e.filter((e=>!1===e.version.maintained))]:[]},t.checkHasCdsMinVersion=function(e,t){t||(t=(0,u.create)((0,a.create)()));const r=(0,d.join)(e,"package.json");if(!t.exists(r))return!1;const i=t.readJSON(r);return(0,c.satisfiesMinCdsVersion)(i)}},11115:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(57286),t),n(r(37520),t)},66528:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultProjectName=t.defaultDescription=t.defaultTargetFolder=t.defaultUi5Version=void 0;const i=r(1628);t.defaultUi5Version=function(e,t,r){return e?.value||t?.value||r?.value},t.defaultTargetFolder=function(e,t){return e||t||process.cwd()},t.defaultDescription=function(e){return e||(0,i.t)("DEFAULT_PROJECT_DESCRIPTION")},t.defaultProjectName=function(e){let t=i.defaultProjectNumber,r=(0,i.t)("DEFAULT_PROJECT_NAME");for(;(0,i.applicationExists)(`${r}`,e)&&(r=(0,i.t)("DEFAULT_PROJECT_NAME",{defaultProjectNumber:++t}),!(t>99)););return r}},37520:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(89225),t)},89225:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getMainQuestions=void 0;const i=r(1628),n=r(66528),s=i.FioriGeneratorPromptNames.projectAttributes.mainQuestions;t.getMainQuestions=function(e,t,r,o,a){const u=(0,i.breadcrumbHelper)(),c=a?.[s.name]?.value,d=a?.[s.targetFolder]?.value,l=(0,i.ui5VersionsGrouped)(r);let p=[];return a?.[s.name]?.hide||p.push({type:"input",guiOptions:{applyDefaultWhenDirty:!0,hint:(0,i.t)("TOOLTIP_PROJECT_NAME"),mandatory:!0,breadcrumb:u},name:s.name,message:(0,i.t)("PROJECT_NAME_MESSAGE"),default:e=>e.name||c||(0,n.defaultProjectName)(d),validate:e=>(0,i.getPlatform)()===i.PLATFORMS.CLI||t?(0,i.validateProjectName)(d,e):(0,i.validateModuleName)(e)}),p=p.concat([{type:"input",guiOptions:{hint:(0,i.t)("TOOLTIP_PROJECT_TITLE"),breadcrumb:u},name:s.title,message:(0,i.t)("PROJECT_TITLE_MESSAGE"),default:e=>e.title||(0,i.t)("DEFAULT_PROJECT_TITLE")},{type:"input",guiOptions:{hint:(0,i.t)("TOOLTIP_PROJECT_NAMESPACE"),breadcrumb:u},name:s.namespace,message:(0,i.t)("PROJECT_NAMESPACE_MESSAGE"),default:e=>e.namespace||"",validate:(e,t)=>(0,i.validateNamespace)(e,t.name||c)},{type:"input",name:s.description,guiOptions:{hint:(0,i.t)("TOOLTIP_PROJECT_DESCRIPTION"),breadcrumb:u},message:(0,i.t)("PROJECT_DESCRIPTION_MESSAGE"),default:e=>(0,n.defaultDescription)(e.description)}]),a?.[s.targetFolder]?.hide||t||p.push({type:"input",name:s.targetFolder,message:(0,i.t)("CHOOSE_PROJECT_FOLDER_MESSAGE"),guiType:"folder-browser",guiOptions:{applyDefaultWhenDirty:!0,mandatory:!0,breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("LABEL_PROJECT_PATH_BREADCRUMB"))},default:e=>(0,n.defaultTargetFolder)(e.targetFolder,d),validate:(e,{name:t})=>{if(t?.length>2)return(0,i.validateProjectFolder)(e,t)}}),p=p.concat([{when:()=>!!r,type:(0,i.getPlatform)()===i.PLATFORMS.CLI?"autocomplete":"list",name:s.ui5Version,guiOptions:{hint:(0,i.t)("TOOLTIP_UI5_VERSION"),breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("LABEL_UI5_VERSION_BREADCRUMB"))},message:(0,i.t)("LABEL_UI5_VERSION"),choices:()=>l,source:(e,t)=>(0,i.searchChoices)(t,l),default:e=>(0,n.defaultUi5Version)(r.find((t=>t.value===e?.ui5Version)),o,r.find((e=>!0===e.version.default)))}]),a?.[s.addDeployConfig]?.hide||p.push({type:"confirm",name:s.addDeployConfig,guiOptions:{breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("LABEL_DEPLOY_CONFIG_BREADCRUMB"))},message:async e=>{const t=await(0,i.validateMtaPath)(e.targetFolder||d);return t?(0,i.t)("ADD_TO_MTA_QUESTION",{path:t,interpolation:{escapeValue:!1}}):(0,i.t)("ADD_DEPLOYMENT_CONFIG_QUESTION")},when:async e=>!t||t&&await(0,i.validateMtaPath)(e?.targetFolder||d)||!1,default:async e=>!!await(0,i.validateMtaPath)(e?.targetFolder||d),validate:t=>(0,i.validateNextStep)(t,e,(0,i.t)("DEPLOYMENT_CONFIG"))}),a?.[s.addFlpConfig]?.hide||p.push({type:"confirm",name:s.addFlpConfig,guiOptions:{breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("LABEL_FLP_CONFIG_BREADCRUMB"))},message:()=>(0,i.t)("ADD_FLP_CONFIG_QUESTION"),default:!1,validate:t=>(0,i.validateNextStep)(t,e,(0,i.t)("FLP_CONFIG"))}),p}},56470:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.findUI5VersionChoice=void 0;const n=i(r(76027));t.findUI5VersionChoice=function(e,t){const r="(Source system version)";if(e&&n.default.valid(e))return t.find((t=>{const i=function(e,t){try{const r=e.toLowerCase()===t.toLowerCase(),i=e.toLowerCase().includes("snapshot")&&t.toLowerCase().includes("snapshot")&&n.default.eq(n.default.coerce(e),n.default.coerce(t));return r||i}catch{return!1}}(t.version.semantic,e);return i&&!t.name.endsWith(r)&&(t.name=`${t.name} ${r}`),i}))}},34409:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=34409,e.exports=t},70910:(e,t,r)=>{var i={"./Find-VisualStudio.cs":20183,"./build":17724,"./build.js":17724,"./clean":1658,"./clean.js":1658,"./configure":4748,"./configure.js":4748,"./create-config-gypi":98395,"./create-config-gypi.js":98395,"./find-node-directory":24159,"./find-node-directory.js":24159,"./find-python":29130,"./find-python.js":29130,"./find-visualstudio":17703,"./find-visualstudio.js":17703,"./install":25925,"./install.js":25925,"./list":44179,"./list.js":44179,"./node-gyp":55614,"./node-gyp.js":55614,"./process-release":75344,"./process-release.js":75344,"./rebuild":64187,"./rebuild.js":64187,"./remove":13103,"./remove.js":13103,"./util":55690,"./util.js":55690};function n(e){var t=s(e);return r(t)}function s(e){if(!r.o(i,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return i[e]}n.keys=function(){return Object.keys(i)},n.resolve=s,e.exports=n,n.id=70910},84679:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=84679,e.exports=t},72869:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=72869,e.exports=t},12937:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=12937,e.exports=t},84397:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=84397,e.exports=t},54529:e=>{"use strict";e.exports=require("@opentelemetry/tracing")},85767:e=>{"use strict";e.exports=require("@sap/cds")},31980:e=>{"use strict";e.exports=require("@sap/cds-compiler")},32220:e=>{"use strict";e.exports=require("applicationinsights-native-metrics")},43241:e=>{"use strict";e.exports=require("esprima")},74602:e=>{"use strict";e.exports=require("keytar")},66828:e=>{"use strict";e.exports=require("vscode")},39491:e=>{"use strict";e.exports=require("assert")},50852:e=>{"use strict";e.exports=require("async_hooks")},14300:e=>{"use strict";e.exports=require("buffer")},32081:e=>{"use strict";e.exports=require("child_process")},96206:e=>{"use strict";e.exports=require("console")},22057:e=>{"use strict";e.exports=require("constants")},6113:e=>{"use strict";e.exports=require("crypto")},9523:e=>{"use strict";e.exports=require("dns")},82361:e=>{"use strict";e.exports=require("events")},57147:e=>{"use strict";e.exports=require("fs")},73292:e=>{"use strict";e.exports=require("fs/promises")},13685:e=>{"use strict";e.exports=require("http")},95687:e=>{"use strict";e.exports=require("https")},98188:e=>{"use strict";e.exports=require("module")},41808:e=>{"use strict";e.exports=require("net")},22037:e=>{"use strict";e.exports=require("os")},71017:e=>{"use strict";e.exports=require("path")},77282:e=>{"use strict";e.exports=require("process")},85477:e=>{"use strict";e.exports=require("punycode")},63477:e=>{"use strict";e.exports=require("querystring")},14521:e=>{"use strict";e.exports=require("readline")},12781:e=>{"use strict";e.exports=require("stream")},71576:e=>{"use strict";e.exports=require("string_decoder")},39512:e=>{"use strict";e.exports=require("timers")},24404:e=>{"use strict";e.exports=require("tls")},76224:e=>{"use strict";e.exports=require("tty")},57310:e=>{"use strict";e.exports=require("url")},73837:e=>{"use strict";e.exports=require("util")},26144:e=>{"use strict";e.exports=require("vm")},59796:e=>{"use strict";e.exports=require("zlib")},69645:e=>{"use strict";e.exports={}}},i={};function n(e){var t=i[e];if(void 0!==t)return t.exports;var s=i[e]={id:e,loaded:!1,exports:{}};return r[e].call(s.exports,s,s.exports,n),s.loaded=!0,s.exports}n.m=r,n.c=i,n.x=()=>{var e=n.O(void 0,[712,784,708,916,439,400,506,475,763,689,2],(()=>n(n.s=16181)));return e=n.O(e)},e=[],n.O=(t,r,i,s)=>{if(!r){var o=1/0;for(d=0;d<e.length;d++){for(var[r,i,s]=e[d],a=!0,u=0;u<r.length;u++)(!1&s||o>=s)&&Object.keys(n.O).every((e=>n.O[e](r[u])))?r.splice(u--,1):(a=!1,s<o&&(o=s));if(a){e.splice(d--,1);var c=i();void 0!==c&&(t=c)}}return t}s=s||0;for(var d=e.length;d>0&&e[d-1][2]>s;d--)e[d]=e[d-1];e[d]=[r,i,s]},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce(((t,r)=>(n.f[r](e,t),t)),[])),n.u=e=>({2:"project-generator/app",400:"fe-fpm-writer/dist",439:"ui5-application-writer/dist",475:"tools-suite-common-libs",506:"fiori-elements-writer/dist",689:"ux-service-inquirer",708:"ui5-test-writer/dist",712:"commonlibs",763:"app-gen-shared",784:"open-ux-shared",916:"odata-service-writer/dist"}[e]+"/index.js"),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),n.j=838,n.p="",(()=>{var e={838:1,77:1,953:1,190:1,815:1,673:1};n.O.require=t=>e[t];n.f.require=(t,r)=>{e[t]||(t=>{var r=t.modules,i=t.ids,s=t.runtime;for(var o in r)n.o(r,o)&&(n.m[o]=r[o]);s&&s(n);for(var a=0;a<i.length;a++)e[i[a]]=1;n.O()})(require("../"+n.u(t)))}})(),t=n.x,n.x=()=>(n.e(712),n.e(784),n.e(708),n.e(916),n.e(439),n.e(400),n.e(506),n.e(475),n.e(763),n.e(689),n.e(2),t());var s=n.x();module.exports=s})(); | ||
(()=>{var e,t,r={51617:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=51617,e.exports=t},39973:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=39973,e.exports=t},20230:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=20230,e.exports=t},20545:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=20545,e.exports=t},4297:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=4297,e.exports=t},75601:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=75601,e.exports=t},82626:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=82626,e.exports=t},37974:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=37974,e.exports=t},85858:(e,t,r)=>{var i={"./cat":43112,"./cat.js":43112,"./cd":86698,"./cd.js":86698,"./chmod":23986,"./chmod.js":23986,"./common":96816,"./common.js":96816,"./cp":80610,"./cp.js":80610,"./dirs":91972,"./dirs.js":91972,"./echo":16166,"./echo.js":16166,"./error":80609,"./error.js":80609,"./exec":52024,"./exec-child":69911,"./exec-child.js":69911,"./exec.js":52024,"./find":22261,"./find.js":22261,"./grep":56818,"./grep.js":56818,"./head":66412,"./head.js":66412,"./ln":91247,"./ln.js":91247,"./ls":5815,"./ls.js":5815,"./mkdir":70098,"./mkdir.js":70098,"./mv":74164,"./mv.js":74164,"./popd":99851,"./popd.js":99851,"./pushd":6978,"./pushd.js":6978,"./pwd":24044,"./pwd.js":24044,"./rm":44256,"./rm.js":44256,"./sed":43422,"./sed.js":43422,"./set":17444,"./set.js":17444,"./sort":53033,"./sort.js":53033,"./tail":50318,"./tail.js":50318,"./tempdir":16275,"./tempdir.js":16275,"./test":50021,"./test.js":50021,"./to":44915,"./to.js":44915,"./toEnd":13326,"./toEnd.js":13326,"./touch":57650,"./touch.js":57650,"./uniq":63019,"./uniq.js":63019,"./which":5483,"./which.js":5483};function n(e){var t=s(e);return r(t)}function s(e){if(!r.o(i,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return i[e]}n.keys=function(){return Object.keys(i)},n.resolve=s,e.exports=n,n.id=85858},59896:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,s){function o(e){try{u(i.next(e))}catch(e){s(e)}}function a(e){try{u(i.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,a)}u((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.checkCdsUi5PluginEnabled=t.enableCdsUi5Plugin=t.satisfiesMinCdsVersion=void 0;const n=r(71017),s=r(5407),o=r(84659),a=r(21832);var u=r(21832);Object.defineProperty(t,"satisfiesMinCdsVersion",{enumerable:!0,get:function(){return u.satisfiesMinCdsVersion}}),t.enableCdsUi5Plugin=function(e,t){var r;return i(this,void 0,void 0,(function*(){t||(t=(0,o.create)((0,s.create)()));const i=(0,n.join)(e,"package.json"),u=null!==(r=t.readJSON(i))&&void 0!==r?r:{};return(0,a.ensureMinCdsVersion)(u),yield(0,a.enableWorkspaces)(e,u),(0,a.addCdsPluginUi5)(u),t.writeJSON(i,u),t}))},t.checkCdsUi5PluginEnabled=function(e,t){return i(this,void 0,void 0,(function*(){t||(t=(0,o.create)((0,s.create)()));const r=(0,n.join)(e,"package.json");if(!t.exists(r))return!1;const i=t.readJSON(r),{workspaceEnabled:u}=yield(0,a.getWorkspaceInfo)(e,i);return(0,a.hasMinCdsVersion)(i)&&u&&(0,a.hasCdsPluginUi5)(i)}))}},21832:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,s){function o(e){try{u(i.next(e))}catch(e){s(e)}}function a(e){try{u(i.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,a)}u((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.hasCdsPluginUi5=t.getWorkspaceInfo=t.satisfiesMinCdsVersion=t.hasMinCdsVersion=t.addCdsPluginUi5=t.enableWorkspaces=t.ensureMinCdsVersion=void 0;const n=r(76027),s=r(9949),o="6.8.2";function a(e){var t,r;return(0,n.gte)(null!==(r=(0,n.coerce)(null===(t=e.dependencies)||void 0===t?void 0:t["@sap/cds"]))&&void 0!==r?r:"0.0.0",o)}function u(e,t){var r;return i(this,void 0,void 0,(function*(){const i=yield(0,s.getCapCustomPaths)(e),n=i.app.endsWith("/")?`${i.app}*`:`${i.app}/*`;return{appWorkspace:n,workspaceEnabled:(null!==(r=c(t))&&void 0!==r?r:[]).includes(n)}}))}function c(e){var t,r;let i;return Array.isArray(e.workspaces)?i=e.workspaces:Array.isArray(null===(t=e.workspaces)||void 0===t?void 0:t.packages)&&(i=null===(r=e.workspaces)||void 0===r?void 0:r.packages),i}function d(e){var t;return!!(null===(t=e.devDependencies)||void 0===t?void 0:t["cds-plugin-ui5"])}t.ensureMinCdsVersion=function(e){var t;a(e)||(null!==(t=e.dependencies)&&void 0!==t||(e.dependencies={}),e.dependencies["@sap/cds"]="^6.8.2")},t.enableWorkspaces=function(e,t){var r;return i(this,void 0,void 0,(function*(){const{appWorkspace:i,workspaceEnabled:n}=yield u(e,t);if(n)return;let s=c(t);s||(null!==(r=t.workspaces)&&void 0!==r||(t.workspaces=[]),Array.isArray(t.workspaces)?s=t.workspaces:(t.workspaces.packages=[],s=t.workspaces.packages)),s.push(i)}))},t.addCdsPluginUi5=function(e){var t;d(e)||(null!==(t=e.devDependencies)&&void 0!==t||(e.devDependencies={}),e.devDependencies["cds-plugin-ui5"]="^0.6.13")},t.hasMinCdsVersion=a,t.satisfiesMinCdsVersion=function(e){var t,r;return a(e)||(0,n.satisfies)(o,null!==(r=null===(t=e.dependencies)||void 0===t?void 0:t["@sap/cds"])&&void 0!==r?r:"0.0.0")},t.getWorkspaceInfo=u,t.hasCdsPluginUi5=d},49339:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.satisfiesMinCdsVersion=t.enableCdsUi5Plugin=t.checkCdsUi5PluginEnabled=void 0;var i=r(59896);Object.defineProperty(t,"checkCdsUi5PluginEnabled",{enumerable:!0,get:function(){return i.checkCdsUi5PluginEnabled}}),Object.defineProperty(t,"enableCdsUi5Plugin",{enumerable:!0,get:function(){return i.enableCdsUi5Plugin}}),Object.defineProperty(t,"satisfiesMinCdsVersion",{enumerable:!0,get:function(){return i.satisfiesMinCdsVersion}})},85513:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(81836),t)},81836:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ProjectInquirer=void 0;const n=r(59390),s=r(1628),o=r(11115),a=r(56470),u=r(48191),c=i(r(66544)),{mainQuestions:d,advancedQuestions:l}=s.FioriGeneratorPromptNames.projectAttributes;t.ProjectInquirer=class ProjectInquirer{async inquire(e,{...t},r){const i=[],c=await(0,u.getUI5VersionChoices)(t.minSupportedUI5Version),l=await(0,n.getSapSystemUI5Version)(t.host),p=(0,a.findUI5VersionChoice)(l,c),f=t.promptSettings;return i.push(...(0,s.withExtensions)((0,o.getMainQuestions)(r,!!t.capService,!f?.[d.ui5Version]?.hide&&c,p,f),t.extensions)),i.push({type:"confirm",name:"showAdvanced",message:(0,s.t)("ADVANCED_CONFIGURE_MESSAGE"),guiOptions:{hint:(0,s.t)("TOOLTIP_ADVANCED_CONFIG")},default:!1}),i.push(...(0,s.withExtensions)((0,s.withCondition)((0,o.getAdvancedQuestions)(c,t.capService,f),(e=>e.showAdvanced)),t.extensions)),this.answersToProject(await e(i),t)}async answersToProject(e,{isV4:t=!1,promptSettings:r,extensions:i}){const s=e?.ui5Version,o=(await(0,n.retrieveUI5Versions)({fioriElementsVersion:t?"v4":"v2",onlyVersionNumbers:!0,onlyNpmVersion:!0,ui5SelectedVersion:s??"Latest"}))[0],a={name:e?.name||r?.[d.name]?.value,description:e?.description,title:e?.title,namespace:e?.namespace,targetFolder:e?.targetFolder||r?.[d.targetFolder]?.value,ui5Version:s||o,addDeployConfig:e?.addDeployConfig,addFlpConfig:e?.addFlpConfig,sapux:!0,localUI5Version:o,ui5Theme:e?.ui5Theme,enableEslint:e?.enableEslint,enableCodeAssist:e?.enableCodeAssist,skipAnnotations:e?.skipAnnotations,enableNPMWorkspaces:e?.enableNPMWorkspaces,enableTypeScript:e?.enableTypeScript};return e?.showAdvanced||Object.assign(a,await this.getAdvancedDefaults(a,i)),a}async getAdvancedDefaults(e,t){let r={};t&&(r=await this.getExtensionDefaults(t,e));return{ui5Theme:e.ui5Theme||r.ui5Theme||(0,n.getDefaultTheme)(e.ui5Version),enableEslint:e.enableEslint||r.enableEslint||s.DEFAULT_PROJECT_ATTRIBUTES.enableCodeAssist,enableCodeAssist:e.enableCodeAssist||r.enableCodeAssist||s.DEFAULT_PROJECT_ATTRIBUTES.enableCodeAssist,skipAnnotations:e.skipAnnotations||r.skipAnnotations||s.DEFAULT_PROJECT_ATTRIBUTES.skipAnnotations,enableNPMWorkspaces:e.enableNPMWorkspaces,enableTypeScript:e.enableTypeScript||r.enableTypeScript||s.DEFAULT_PROJECT_ATTRIBUTES.enableTypeScript}}async getExtensionDefaults(e,t){const r=Object.values(l),i={};for await(const n of r)if(!(0,c.default)(e[n]?.default)){const r="function"==typeof e[n].default?await e[n].default(t):e[n].default;Object.assign(i,{[n]:r})}return i}}},40335:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAdvancedQuestions=void 0;const i=r(1628),n=r(59390),s=r(48191),o=i.FioriGeneratorPromptNames.projectAttributes.advancedQuestions;t.getAdvancedQuestions=function(e,t,r){let a;const u=[];return u.push({type:"list",name:o.ui5Theme,message:(0,i.t)("LABEL_UI5_THEME"),guiOptions:{applyDefaultWhenDirty:!0,breadcrumb:(0,i.breadcrumbHelper)()},choices:({ui5Version:e="Latest"})=>(a=(0,s.getFilterThemesChoices)(e),a),default:({ui5Theme:e,ui5Version:t})=>(e||(e=(0,n.getDefaultTheme)(t)),e)}),t||r?.[o.enableEslint]?.hide||u.push({type:"confirm",name:o.enableEslint,message:(0,i.t)("ENABLE_ESLINT"),default:r?.[o.enableEslint]?.value??i.DEFAULT_PROJECT_ATTRIBUTES[o.enableEslint],guiOptions:{breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("LABEL_ESLINT_ENABLED_BREADCRUMB"))}}),r?.[o.enableCodeAssist]?.hide||u.push({when:t=>{const r=e.map((e=>e.version.semantic));return(0,n.uI5VersionsWithCodeAssist)(r,t?.ui5Version||"Latest")},type:"confirm",name:o.enableCodeAssist,message:(0,i.t)("ENABLE_CODE_ASSIST_MESSAGE"),default:r?.[o.enableCodeAssist]?.value??i.DEFAULT_PROJECT_ATTRIBUTES[o.enableCodeAssist],guiOptions:{breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("LABEL_CODE_ASSIST_ENABLED_BREADCRUMB"))}}),r?.[o.skipAnnotations]?.hide||u.push({type:"confirm",name:o.skipAnnotations,message:(0,i.t)("SKIP_ANNOTATIONS"),default:r?.[o.skipAnnotations]?.value??i.DEFAULT_PROJECT_ATTRIBUTES[o.skipAnnotations],guiOptions:{breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("LABEL_SKIP_ANNOTATIONS_BREADCRUMB"))}}),u.push({when:()=>t?.capType===i.CapType.NODE_JS&&((0,s.checkHasCdsMinVersion)(t.projectPath)&&!t.cdsUI5PluginEnabled),type:"confirm",name:"enableNPMWorkspaces",message:(0,i.t)("ENABLE_NPM_WORKSPACES"),default:!1,guiOptions:{breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("LABEL_ENABLE_NPM_WORKSPACES_BREADCRUMB"))}}),r?.[o.enableTypeScript]?.hide||u.push({when:e=>!t||t.capType===i.CapType.NODE_JS&&(t.cdsUI5PluginEnabled||e?.enableNPMWorkspaces),type:"confirm",name:o.enableTypeScript,message:(0,i.t)("ENABLE_TYPESCRIPT"),default:r?.[o.enableTypeScript]?.value??i.DEFAULT_PROJECT_ATTRIBUTES[o.enableTypeScript],guiOptions:{breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("LABEL_ENABLE_TYPESCRIPT_BREADCRUMB"))}}),u}},57286:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(40335),t)},48191:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.checkHasCdsMinVersion=t.ui5VersionsGrouped=t.getFilterThemesChoices=t.getUI5VersionChoices=void 0;const n=r(59390),s=r(1628),o=i(r(85715)),a=r(5407),u=r(84659),c=r(49339),d=r(71017);t.getUI5VersionChoices=async function(e){const t={includeSnapshots:!1,minSupportedUI5Version:e,useCache:!0,removeDuplicateVersions:!0,groupUI5Versions:!0};return(0,n.getUI5VersionsEnhanced)(t)},t.getFilterThemesChoices=function(e){return(0,n.getUi5Themes)(e).map((e=>({value:e.themeid,name:e.label})))},t.ui5VersionsGrouped=function(e){return e?(0,s.getPlatform)()===s.PLATFORMS.CLI?[...e.filter((e=>(!0===e.version.maintained&&(e.name=`${e.name} - (${(0,s.t)("MAINTAINED")} ${(0,s.t)("VERSION",{count:1})})`),!0===e.version.maintained))),...e.filter((e=>(!1===e.version.maintained&&(e.name=`${e.name} - (${(0,s.t)("OUT_OF_MAINTENANCE")} ${(0,s.t)("VERSION",{count:1})})`),!1===e.version.maintained)))]:[new o.default.Separator(`${(0,s.t)("MAINTAINED")} ${(0,s.t)("VERSION",{count:0})}`),...e.filter((e=>!0===e.version.maintained)),new o.default.Separator(`${(0,s.t)("OUT_OF_MAINTENANCE")} ${(0,s.t)("VERSION",{count:0})}`),...e.filter((e=>!1===e.version.maintained))]:[]},t.checkHasCdsMinVersion=function(e,t){t||(t=(0,u.create)((0,a.create)()));const r=(0,d.join)(e,"package.json");if(!t.exists(r))return!1;const i=t.readJSON(r);return(0,c.satisfiesMinCdsVersion)(i)}},11115:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(57286),t),n(r(37520),t)},66528:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultProjectName=t.defaultDescription=t.defaultTargetFolder=t.defaultUi5Version=void 0;const i=r(1628);t.defaultUi5Version=function(e,t,r){return e?.value||t?.value||r?.value},t.defaultTargetFolder=function(e,t){return e||t||process.cwd()},t.defaultDescription=function(e){return e||(0,i.t)("DEFAULT_PROJECT_DESCRIPTION")},t.defaultProjectName=function(e){let t=i.defaultProjectNumber,r=(0,i.t)("DEFAULT_PROJECT_NAME");for(;(0,i.applicationExists)(`${r}`,e)&&(r=(0,i.t)("DEFAULT_PROJECT_NAME",{defaultProjectNumber:++t}),!(t>99)););return r}},37520:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(89225),t)},89225:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getMainQuestions=void 0;const i=r(1628),n=r(66528),s=i.FioriGeneratorPromptNames.projectAttributes.mainQuestions;t.getMainQuestions=function(e,t,r,o,a){const u=(0,i.breadcrumbHelper)(),c=a?.[s.name]?.value,d=a?.[s.targetFolder]?.value,l=(0,i.ui5VersionsGrouped)(r);let p=[];return a?.[s.name]?.hide||p.push({type:"input",guiOptions:{applyDefaultWhenDirty:!0,hint:(0,i.t)("TOOLTIP_PROJECT_NAME"),mandatory:!0,breadcrumb:u},name:s.name,message:(0,i.t)("PROJECT_NAME_MESSAGE"),default:e=>e.name||c||(0,n.defaultProjectName)(d),validate:e=>(0,i.getPlatform)()===i.PLATFORMS.CLI||t?(0,i.validateProjectName)(d,e):(0,i.validateModuleName)(e)}),p=p.concat([{type:"input",guiOptions:{hint:(0,i.t)("TOOLTIP_PROJECT_TITLE"),breadcrumb:u},name:s.title,message:(0,i.t)("PROJECT_TITLE_MESSAGE"),default:e=>e.title||(0,i.t)("DEFAULT_PROJECT_TITLE")},{type:"input",guiOptions:{hint:(0,i.t)("TOOLTIP_PROJECT_NAMESPACE"),breadcrumb:u},name:s.namespace,message:(0,i.t)("PROJECT_NAMESPACE_MESSAGE"),default:e=>e.namespace||"",validate:(e,t)=>(0,i.validateNamespace)(e,t.name||c)},{type:"input",name:s.description,guiOptions:{hint:(0,i.t)("TOOLTIP_PROJECT_DESCRIPTION"),breadcrumb:u},message:(0,i.t)("PROJECT_DESCRIPTION_MESSAGE"),default:e=>(0,n.defaultDescription)(e.description)}]),a?.[s.targetFolder]?.hide||t||p.push({type:"input",name:s.targetFolder,message:(0,i.t)("CHOOSE_PROJECT_FOLDER_MESSAGE"),guiType:"folder-browser",guiOptions:{applyDefaultWhenDirty:!0,mandatory:!0,breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("LABEL_PROJECT_PATH_BREADCRUMB"))},default:e=>(0,n.defaultTargetFolder)(e.targetFolder,d),validate:(e,{name:t})=>{if(t?.length>2)return(0,i.validateProjectFolder)(e,t)}}),p=p.concat([{when:()=>!!r,type:(0,i.getPlatform)()===i.PLATFORMS.CLI?"autocomplete":"list",name:s.ui5Version,guiOptions:{hint:(0,i.t)("TOOLTIP_UI5_VERSION"),breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("LABEL_UI5_VERSION_BREADCRUMB"))},message:(0,i.t)("LABEL_UI5_VERSION"),choices:()=>l,source:(e,t)=>(0,i.searchChoices)(t,l),default:e=>(0,n.defaultUi5Version)(r.find((t=>t.value===e?.ui5Version)),o,r.find((e=>!0===e.version.default)))}]),a?.[s.addDeployConfig]?.hide||p.push({type:"confirm",name:s.addDeployConfig,guiOptions:{breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("LABEL_DEPLOY_CONFIG_BREADCRUMB"))},message:async e=>{const t=await(0,i.validateMtaPath)(e.targetFolder||d);return t?(0,i.t)("ADD_TO_MTA_QUESTION",{path:t,interpolation:{escapeValue:!1}}):(0,i.t)("ADD_DEPLOYMENT_CONFIG_QUESTION")},when:async e=>!t||t&&await(0,i.validateMtaPath)(e?.targetFolder||d)||!1,default:async e=>!!await(0,i.validateMtaPath)(e?.targetFolder||d),validate:t=>(0,i.validateNextStep)(t,e,(0,i.t)("DEPLOYMENT_CONFIG"))}),a?.[s.addFlpConfig]?.hide||p.push({type:"confirm",name:s.addFlpConfig,guiOptions:{breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("LABEL_FLP_CONFIG_BREADCRUMB"))},message:()=>(0,i.t)("ADD_FLP_CONFIG_QUESTION"),default:!1,validate:t=>(0,i.validateNextStep)(t,e,(0,i.t)("FLP_CONFIG"))}),p}},56470:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.findUI5VersionChoice=void 0;const n=i(r(76027));t.findUI5VersionChoice=function(e,t){const r="(Source system version)";if(e&&n.default.valid(e))return t.find((t=>{const i=function(e,t){try{const r=e.toLowerCase()===t.toLowerCase(),i=e.toLowerCase().includes("snapshot")&&t.toLowerCase().includes("snapshot")&&n.default.eq(n.default.coerce(e),n.default.coerce(t));return r||i}catch{return!1}}(t.version.semantic,e);return i&&!t.name.endsWith(r)&&(t.name=`${t.name} ${r}`),i}))}},34409:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=34409,e.exports=t},70910:(e,t,r)=>{var i={"./Find-VisualStudio.cs":20183,"./build":17724,"./build.js":17724,"./clean":1658,"./clean.js":1658,"./configure":4748,"./configure.js":4748,"./create-config-gypi":98395,"./create-config-gypi.js":98395,"./find-node-directory":24159,"./find-node-directory.js":24159,"./find-python":29130,"./find-python.js":29130,"./find-visualstudio":17703,"./find-visualstudio.js":17703,"./install":25925,"./install.js":25925,"./list":44179,"./list.js":44179,"./node-gyp":55614,"./node-gyp.js":55614,"./process-release":75344,"./process-release.js":75344,"./rebuild":64187,"./rebuild.js":64187,"./remove":13103,"./remove.js":13103,"./util":55690,"./util.js":55690};function n(e){var t=s(e);return r(t)}function s(e){if(!r.o(i,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return i[e]}n.keys=function(){return Object.keys(i)},n.resolve=s,e.exports=n,n.id=70910},84679:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=84679,e.exports=t},72869:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=72869,e.exports=t},12937:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=12937,e.exports=t},84397:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=84397,e.exports=t},54529:e=>{"use strict";e.exports=require("@opentelemetry/tracing")},85767:e=>{"use strict";e.exports=require("@sap/cds")},31980:e=>{"use strict";e.exports=require("@sap/cds-compiler")},32220:e=>{"use strict";e.exports=require("applicationinsights-native-metrics")},43241:e=>{"use strict";e.exports=require("esprima")},74602:e=>{"use strict";e.exports=require("keytar")},66828:e=>{"use strict";e.exports=require("vscode")},39491:e=>{"use strict";e.exports=require("assert")},50852:e=>{"use strict";e.exports=require("async_hooks")},14300:e=>{"use strict";e.exports=require("buffer")},32081:e=>{"use strict";e.exports=require("child_process")},96206:e=>{"use strict";e.exports=require("console")},22057:e=>{"use strict";e.exports=require("constants")},6113:e=>{"use strict";e.exports=require("crypto")},9523:e=>{"use strict";e.exports=require("dns")},82361:e=>{"use strict";e.exports=require("events")},57147:e=>{"use strict";e.exports=require("fs")},73292:e=>{"use strict";e.exports=require("fs/promises")},13685:e=>{"use strict";e.exports=require("http")},95687:e=>{"use strict";e.exports=require("https")},98188:e=>{"use strict";e.exports=require("module")},41808:e=>{"use strict";e.exports=require("net")},22037:e=>{"use strict";e.exports=require("os")},71017:e=>{"use strict";e.exports=require("path")},77282:e=>{"use strict";e.exports=require("process")},85477:e=>{"use strict";e.exports=require("punycode")},63477:e=>{"use strict";e.exports=require("querystring")},14521:e=>{"use strict";e.exports=require("readline")},12781:e=>{"use strict";e.exports=require("stream")},71576:e=>{"use strict";e.exports=require("string_decoder")},39512:e=>{"use strict";e.exports=require("timers")},24404:e=>{"use strict";e.exports=require("tls")},76224:e=>{"use strict";e.exports=require("tty")},57310:e=>{"use strict";e.exports=require("url")},73837:e=>{"use strict";e.exports=require("util")},26144:e=>{"use strict";e.exports=require("vm")},59796:e=>{"use strict";e.exports=require("zlib")},69645:e=>{"use strict";e.exports={}}},i={};function n(e){var t=i[e];if(void 0!==t)return t.exports;var s=i[e]={id:e,loaded:!1,exports:{}};return r[e].call(s.exports,s,s.exports,n),s.loaded=!0,s.exports}n.m=r,n.c=i,n.x=()=>{var e=n.O(void 0,[712,784,708,916,439,400,506,475,763,689,2],(()=>n(n.s=16181)));return e=n.O(e)},e=[],n.O=(t,r,i,s)=>{if(!r){var o=1/0;for(d=0;d<e.length;d++){for(var[r,i,s]=e[d],a=!0,u=0;u<r.length;u++)(!1&s||o>=s)&&Object.keys(n.O).every((e=>n.O[e](r[u])))?r.splice(u--,1):(a=!1,s<o&&(o=s));if(a){e.splice(d--,1);var c=i();void 0!==c&&(t=c)}}return t}s=s||0;for(var d=e.length;d>0&&e[d-1][2]>s;d--)e[d]=e[d-1];e[d]=[r,i,s]},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce(((t,r)=>(n.f[r](e,t),t)),[])),n.u=e=>({2:"project-generator/app",400:"fe-fpm-writer/dist",439:"ui5-application-writer/dist",475:"tools-suite-common-libs",506:"fiori-elements-writer/dist",689:"ux-service-inquirer",708:"ui5-test-writer/dist",712:"commonlibs",763:"app-gen-shared",784:"open-ux-shared",916:"odata-service-writer/dist"}[e]+"/index.js"),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),n.j=838,n.p="",(()=>{var e={838:1,77:1,953:1,190:1,815:1,673:1};n.O.require=t=>e[t];n.f.require=(t,r)=>{e[t]||(t=>{var r=t.modules,i=t.ids,s=t.runtime;for(var o in r)n.o(r,o)&&(n.m[o]=r[o]);s&&s(n);for(var a=0;a<i.length;a++)e[i[a]]=1;n.O()})(require("../"+n.u(t)))}})(),t=n.x,n.x=()=>(n.e(712),n.e(784),n.e(708),n.e(916),n.e(439),n.e(400),n.e(506),n.e(475),n.e(763),n.e(689),n.e(2),t());var s=n.x();module.exports=s})(); |
@@ -1,1 +0,1 @@ | ||
(()=>{var e,t,r={51617:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=51617,e.exports=t},39973:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=39973,e.exports=t},20230:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=20230,e.exports=t},20545:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=20545,e.exports=t},4297:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=4297,e.exports=t},75601:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=75601,e.exports=t},82626:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=82626,e.exports=t},37974:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=37974,e.exports=t},85858:(e,t,r)=>{var i={"./cat":43112,"./cat.js":43112,"./cd":86698,"./cd.js":86698,"./chmod":23986,"./chmod.js":23986,"./common":96816,"./common.js":96816,"./cp":80610,"./cp.js":80610,"./dirs":91972,"./dirs.js":91972,"./echo":16166,"./echo.js":16166,"./error":80609,"./error.js":80609,"./exec":52024,"./exec-child":69911,"./exec-child.js":69911,"./exec.js":52024,"./find":22261,"./find.js":22261,"./grep":56818,"./grep.js":56818,"./head":66412,"./head.js":66412,"./ln":91247,"./ln.js":91247,"./ls":5815,"./ls.js":5815,"./mkdir":70098,"./mkdir.js":70098,"./mv":74164,"./mv.js":74164,"./popd":99851,"./popd.js":99851,"./pushd":6978,"./pushd.js":6978,"./pwd":24044,"./pwd.js":24044,"./rm":44256,"./rm.js":44256,"./sed":43422,"./sed.js":43422,"./set":17444,"./set.js":17444,"./sort":53033,"./sort.js":53033,"./tail":50318,"./tail.js":50318,"./tempdir":16275,"./tempdir.js":16275,"./test":50021,"./test.js":50021,"./to":44915,"./to.js":44915,"./toEnd":13326,"./toEnd.js":13326,"./touch":57650,"./touch.js":57650,"./uniq":63019,"./uniq.js":63019,"./which":5483,"./which.js":5483};function n(e){var t=s(e);return r(t)}function s(e){if(!r.o(i,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return i[e]}n.keys=function(){return Object.keys(i)},n.resolve=s,e.exports=n,n.id=85858},59896:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,s){function o(e){try{u(i.next(e))}catch(e){s(e)}}function a(e){try{u(i.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,a)}u((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.checkCdsUi5PluginEnabled=t.enableCdsUi5Plugin=t.satisfiesMinCdsVersion=void 0;const n=r(71017),s=r(5407),o=r(84659),a=r(21832);var u=r(21832);Object.defineProperty(t,"satisfiesMinCdsVersion",{enumerable:!0,get:function(){return u.satisfiesMinCdsVersion}}),t.enableCdsUi5Plugin=function(e,t){var r;return i(this,void 0,void 0,(function*(){t||(t=(0,o.create)((0,s.create)()));const i=(0,n.join)(e,"package.json"),u=null!==(r=t.readJSON(i))&&void 0!==r?r:{};return(0,a.ensureMinCdsVersion)(u),yield(0,a.enableWorkspaces)(e,u),(0,a.addCdsPluginUi5)(u),t.writeJSON(i,u),t}))},t.checkCdsUi5PluginEnabled=function(e,t){return i(this,void 0,void 0,(function*(){t||(t=(0,o.create)((0,s.create)()));const r=(0,n.join)(e,"package.json");if(!t.exists(r))return!1;const i=t.readJSON(r),{workspaceEnabled:u}=yield(0,a.getWorkspaceInfo)(e,i);return(0,a.hasMinCdsVersion)(i)&&u&&(0,a.hasCdsPluginUi5)(i)}))}},21832:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,s){function o(e){try{u(i.next(e))}catch(e){s(e)}}function a(e){try{u(i.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,a)}u((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.hasCdsPluginUi5=t.getWorkspaceInfo=t.satisfiesMinCdsVersion=t.hasMinCdsVersion=t.addCdsPluginUi5=t.enableWorkspaces=t.ensureMinCdsVersion=void 0;const n=r(76027),s=r(88536),o="6.8.2";function a(e){var t,r;return(0,n.gte)(null!==(r=(0,n.coerce)(null===(t=e.dependencies)||void 0===t?void 0:t["@sap/cds"]))&&void 0!==r?r:"0.0.0",o)}function u(e,t){var r;return i(this,void 0,void 0,(function*(){const i=yield(0,s.getCapCustomPaths)(e),n=i.app.endsWith("/")?`${i.app}*`:`${i.app}/*`;return{appWorkspace:n,workspaceEnabled:(null!==(r=c(t))&&void 0!==r?r:[]).includes(n)}}))}function c(e){var t,r;let i;return Array.isArray(e.workspaces)?i=e.workspaces:Array.isArray(null===(t=e.workspaces)||void 0===t?void 0:t.packages)&&(i=null===(r=e.workspaces)||void 0===r?void 0:r.packages),i}function d(e){var t;return!!(null===(t=e.devDependencies)||void 0===t?void 0:t["cds-plugin-ui5"])}t.ensureMinCdsVersion=function(e){var t;a(e)||(null!==(t=e.dependencies)&&void 0!==t||(e.dependencies={}),e.dependencies["@sap/cds"]="^6.8.2")},t.enableWorkspaces=function(e,t){var r;return i(this,void 0,void 0,(function*(){const{appWorkspace:i,workspaceEnabled:n}=yield u(e,t);if(n)return;let s=c(t);s||(null!==(r=t.workspaces)&&void 0!==r||(t.workspaces=[]),Array.isArray(t.workspaces)?s=t.workspaces:(t.workspaces.packages=[],s=t.workspaces.packages)),s.push(i)}))},t.addCdsPluginUi5=function(e){var t;d(e)||(null!==(t=e.devDependencies)&&void 0!==t||(e.devDependencies={}),e.devDependencies["cds-plugin-ui5"]="^0.6.13")},t.hasMinCdsVersion=a,t.satisfiesMinCdsVersion=function(e){var t,r;return a(e)||(0,n.satisfies)(o,null!==(r=null===(t=e.dependencies)||void 0===t?void 0:t["@sap/cds"])&&void 0!==r?r:"0.0.0")},t.getWorkspaceInfo=u,t.hasCdsPluginUi5=d},49339:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.satisfiesMinCdsVersion=t.enableCdsUi5Plugin=t.checkCdsUi5PluginEnabled=void 0;var i=r(59896);Object.defineProperty(t,"checkCdsUi5PluginEnabled",{enumerable:!0,get:function(){return i.checkCdsUi5PluginEnabled}}),Object.defineProperty(t,"enableCdsUi5Plugin",{enumerable:!0,get:function(){return i.enableCdsUi5Plugin}}),Object.defineProperty(t,"satisfiesMinCdsVersion",{enumerable:!0,get:function(){return i.satisfiesMinCdsVersion}})},85513:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(81836),t)},81836:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ProjectInquirer=void 0;const n=r(59390),s=r(1628),o=r(11115),a=r(56470),u=r(48191),c=i(r(66544)),{mainQuestions:d,advancedQuestions:l}=s.FioriGeneratorPromptNames.projectAttributes;t.ProjectInquirer=class ProjectInquirer{async inquire(e,{...t},r){const i=[],c=await(0,u.getUI5VersionChoices)(t.minSupportedUI5Version),l=await(0,n.getSapSystemUI5Version)(t.host),p=(0,a.findUI5VersionChoice)(l,c),f=t.promptSettings;return i.push(...(0,s.withExtensions)((0,o.getMainQuestions)(r,!!t.capService,!f?.[d.ui5Version]?.hide&&c,p,f),t.extensions)),i.push({type:"confirm",name:"showAdvanced",message:(0,s.t)("ADVANCED_CONFIGURE_MESSAGE"),guiOptions:{hint:(0,s.t)("TOOLTIP_ADVANCED_CONFIG")},default:!1}),i.push(...(0,s.withExtensions)((0,s.withCondition)((0,o.getAdvancedQuestions)(c,t.capService,f),(e=>e.showAdvanced)),t.extensions)),this.answersToProject(await e(i),t)}async answersToProject(e,{isV4:t=!1,promptSettings:r,extensions:i}){const s=e?.ui5Version,o=(await(0,n.retrieveUI5Versions)({fioriElementsVersion:t?"v4":"v2",onlyVersionNumbers:!0,onlyNpmVersion:!0,ui5SelectedVersion:s??"Latest"}))[0],a={name:e?.name||r?.[d.name]?.value,description:e?.description,title:e?.title,namespace:e?.namespace,targetFolder:e?.targetFolder||r?.[d.targetFolder]?.value,ui5Version:s||o,addDeployConfig:e?.addDeployConfig,addFlpConfig:e?.addFlpConfig,sapux:!0,localUI5Version:o,ui5Theme:e?.ui5Theme,enableEslint:e?.enableEslint,enableCodeAssist:e?.enableCodeAssist,skipAnnotations:e?.skipAnnotations,enableNPMWorkspaces:e?.enableNPMWorkspaces,enableTypeScript:e?.enableTypeScript};return e?.showAdvanced||Object.assign(a,await this.getAdvancedDefaults(a,i)),a}async getAdvancedDefaults(e,t){let r={};t&&(r=await this.getExtensionDefaults(t,e));return{ui5Theme:e.ui5Theme||r.ui5Theme||(0,n.getDefaultTheme)(e.ui5Version),enableEslint:e.enableEslint||r.enableEslint||s.DEFAULT_PROJECT_ATTRIBUTES.enableCodeAssist,enableCodeAssist:e.enableCodeAssist||r.enableCodeAssist||s.DEFAULT_PROJECT_ATTRIBUTES.enableCodeAssist,skipAnnotations:e.skipAnnotations||r.skipAnnotations||s.DEFAULT_PROJECT_ATTRIBUTES.skipAnnotations,enableNPMWorkspaces:e.enableNPMWorkspaces,enableTypeScript:e.enableTypeScript||r.enableTypeScript||s.DEFAULT_PROJECT_ATTRIBUTES.enableTypeScript}}async getExtensionDefaults(e,t){const r=Object.values(l),i={};for await(const n of r)if(!(0,c.default)(e[n]?.default)){const r="function"==typeof e[n].default?await e[n].default(t):e[n].default;Object.assign(i,{[n]:r})}return i}}},40335:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAdvancedQuestions=void 0;const i=r(1628),n=r(59390),s=r(48191),o=i.FioriGeneratorPromptNames.projectAttributes.advancedQuestions;t.getAdvancedQuestions=function(e,t,r){let a;const u=[];return u.push({type:"list",name:o.ui5Theme,message:(0,i.t)("LABEL_UI5_THEME"),guiOptions:{applyDefaultWhenDirty:!0,breadcrumb:(0,i.breadcrumbHelper)()},choices:({ui5Version:e="Latest"})=>(a=(0,s.getFilterThemesChoices)(e),a),default:({ui5Theme:e,ui5Version:t})=>(e||(e=(0,n.getDefaultTheme)(t)),e)}),t||r?.[o.enableEslint]?.hide||u.push({type:"confirm",name:o.enableEslint,message:(0,i.t)("ENABLE_ESLINT"),default:r?.[o.enableEslint]?.value??i.DEFAULT_PROJECT_ATTRIBUTES[o.enableEslint],guiOptions:{breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("LABEL_ESLINT_ENABLED_BREADCRUMB"))}}),r?.[o.enableCodeAssist]?.hide||u.push({when:t=>{const r=e.map((e=>e.version.semantic));return(0,n.uI5VersionsWithCodeAssist)(r,t?.ui5Version||"Latest")},type:"confirm",name:o.enableCodeAssist,message:(0,i.t)("ENABLE_CODE_ASSIST_MESSAGE"),default:r?.[o.enableCodeAssist]?.value??i.DEFAULT_PROJECT_ATTRIBUTES[o.enableCodeAssist],guiOptions:{breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("LABEL_CODE_ASSIST_ENABLED_BREADCRUMB"))}}),r?.[o.skipAnnotations]?.hide||u.push({type:"confirm",name:o.skipAnnotations,message:(0,i.t)("SKIP_ANNOTATIONS"),default:r?.[o.skipAnnotations]?.value??i.DEFAULT_PROJECT_ATTRIBUTES[o.skipAnnotations],guiOptions:{breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("LABEL_SKIP_ANNOTATIONS_BREADCRUMB"))}}),u.push({when:()=>t?.capType===i.CapType.NODE_JS&&((0,s.checkHasCdsMinVersion)(t.projectPath)&&!t.cdsUI5PluginEnabled),type:"confirm",name:"enableNPMWorkspaces",message:(0,i.t)("ENABLE_NPM_WORKSPACES"),default:!1,guiOptions:{breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("LABEL_ENABLE_NPM_WORKSPACES_BREADCRUMB"))}}),r?.[o.enableTypeScript]?.hide||u.push({when:e=>!t||t.capType===i.CapType.NODE_JS&&(t.cdsUI5PluginEnabled||e?.enableNPMWorkspaces),type:"confirm",name:o.enableTypeScript,message:(0,i.t)("ENABLE_TYPESCRIPT"),default:r?.[o.enableTypeScript]?.value??i.DEFAULT_PROJECT_ATTRIBUTES[o.enableTypeScript],guiOptions:{breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("LABEL_ENABLE_TYPESCRIPT_BREADCRUMB"))}}),u}},57286:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(40335),t)},48191:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.checkHasCdsMinVersion=t.ui5VersionsGrouped=t.getFilterThemesChoices=t.getUI5VersionChoices=void 0;const n=r(59390),s=r(1628),o=i(r(85715)),a=r(5407),u=r(84659),c=r(49339),d=r(71017);t.getUI5VersionChoices=async function(e){const t={includeSnapshots:!1,minSupportedUI5Version:e,useCache:!0,removeDuplicateVersions:!0,groupUI5Versions:!0};return(0,n.getUI5VersionsEnhanced)(t)},t.getFilterThemesChoices=function(e){return(0,n.getUi5Themes)(e).map((e=>({value:e.themeid,name:e.label})))},t.ui5VersionsGrouped=function(e){return e?(0,s.getPlatform)()===s.PLATFORMS.CLI?[...e.filter((e=>(!0===e.version.maintained&&(e.name=`${e.name} - (${(0,s.t)("MAINTAINED")} ${(0,s.t)("VERSION",{count:1})})`),!0===e.version.maintained))),...e.filter((e=>(!1===e.version.maintained&&(e.name=`${e.name} - (${(0,s.t)("OUT_OF_MAINTENANCE")} ${(0,s.t)("VERSION",{count:1})})`),!1===e.version.maintained)))]:[new o.default.Separator(`${(0,s.t)("MAINTAINED")} ${(0,s.t)("VERSION",{count:0})}`),...e.filter((e=>!0===e.version.maintained)),new o.default.Separator(`${(0,s.t)("OUT_OF_MAINTENANCE")} ${(0,s.t)("VERSION",{count:0})}`),...e.filter((e=>!1===e.version.maintained))]:[]},t.checkHasCdsMinVersion=function(e,t){t||(t=(0,u.create)((0,a.create)()));const r=(0,d.join)(e,"package.json");if(!t.exists(r))return!1;const i=t.readJSON(r);return(0,c.satisfiesMinCdsVersion)(i)}},11115:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(57286),t),n(r(37520),t)},66528:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultProjectName=t.defaultDescription=t.defaultTargetFolder=t.defaultUi5Version=void 0;const i=r(1628);t.defaultUi5Version=function(e,t,r){return e?.value||t?.value||r?.value},t.defaultTargetFolder=function(e,t){return e||t||process.cwd()},t.defaultDescription=function(e){return e||(0,i.t)("DEFAULT_PROJECT_DESCRIPTION")},t.defaultProjectName=function(e){let t=i.defaultProjectNumber,r=(0,i.t)("DEFAULT_PROJECT_NAME");for(;(0,i.applicationExists)(`${r}`,e)&&(r=(0,i.t)("DEFAULT_PROJECT_NAME",{defaultProjectNumber:++t}),!(t>99)););return r}},37520:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(89225),t)},89225:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getMainQuestions=void 0;const i=r(1628),n=r(66528),s=i.FioriGeneratorPromptNames.projectAttributes.mainQuestions;t.getMainQuestions=function(e,t,r,o,a){const u=(0,i.breadcrumbHelper)(),c=a?.[s.name]?.value,d=a?.[s.targetFolder]?.value,l=(0,i.ui5VersionsGrouped)(r);let p=[];return a?.[s.name]?.hide||p.push({type:"input",guiOptions:{applyDefaultWhenDirty:!0,hint:(0,i.t)("TOOLTIP_PROJECT_NAME"),mandatory:!0,breadcrumb:u},name:s.name,message:(0,i.t)("PROJECT_NAME_MESSAGE"),default:e=>e.name||c||(0,n.defaultProjectName)(d),validate:e=>(0,i.getPlatform)()===i.PLATFORMS.CLI||t?(0,i.validateProjectName)(d,e):(0,i.validateModuleName)(e)}),p=p.concat([{type:"input",guiOptions:{hint:(0,i.t)("TOOLTIP_PROJECT_TITLE"),breadcrumb:u},name:s.title,message:(0,i.t)("PROJECT_TITLE_MESSAGE"),default:e=>e.title||(0,i.t)("DEFAULT_PROJECT_TITLE")},{type:"input",guiOptions:{hint:(0,i.t)("TOOLTIP_PROJECT_NAMESPACE"),breadcrumb:u},name:s.namespace,message:(0,i.t)("PROJECT_NAMESPACE_MESSAGE"),default:e=>e.namespace||"",validate:(e,t)=>(0,i.validateNamespace)(e,t.name||c)},{type:"input",name:s.description,guiOptions:{hint:(0,i.t)("TOOLTIP_PROJECT_DESCRIPTION"),breadcrumb:u},message:(0,i.t)("PROJECT_DESCRIPTION_MESSAGE"),default:e=>(0,n.defaultDescription)(e.description)}]),a?.[s.targetFolder]?.hide||t||p.push({type:"input",name:s.targetFolder,message:(0,i.t)("CHOOSE_PROJECT_FOLDER_MESSAGE"),guiType:"folder-browser",guiOptions:{applyDefaultWhenDirty:!0,mandatory:!0,breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("LABEL_PROJECT_PATH_BREADCRUMB"))},default:e=>(0,n.defaultTargetFolder)(e.targetFolder,d),validate:(e,{name:t})=>{if(t?.length>2)return(0,i.validateProjectFolder)(e,t)}}),p=p.concat([{when:()=>!!r,type:(0,i.getPlatform)()===i.PLATFORMS.CLI?"autocomplete":"list",name:s.ui5Version,guiOptions:{hint:(0,i.t)("TOOLTIP_UI5_VERSION"),breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("LABEL_UI5_VERSION_BREADCRUMB"))},message:(0,i.t)("LABEL_UI5_VERSION"),choices:()=>l,source:(e,t)=>(0,i.searchChoices)(t,l),default:e=>(0,n.defaultUi5Version)(r.find((t=>t.value===e?.ui5Version)),o,r.find((e=>!0===e.version.default)))}]),a?.[s.addDeployConfig]?.hide||p.push({type:"confirm",name:s.addDeployConfig,guiOptions:{breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("LABEL_DEPLOY_CONFIG_BREADCRUMB"))},message:async e=>{const t=await(0,i.validateMtaPath)(e.targetFolder||d);return t?(0,i.t)("ADD_TO_MTA_QUESTION",{path:t,interpolation:{escapeValue:!1}}):(0,i.t)("ADD_DEPLOYMENT_CONFIG_QUESTION")},when:async e=>!t||t&&await(0,i.validateMtaPath)(e?.targetFolder||d)||!1,default:async e=>!!await(0,i.validateMtaPath)(e?.targetFolder||d),validate:t=>(0,i.validateNextStep)(t,e,(0,i.t)("DEPLOYMENT_CONFIG"))}),a?.[s.addFlpConfig]?.hide||p.push({type:"confirm",name:s.addFlpConfig,guiOptions:{breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("LABEL_FLP_CONFIG_BREADCRUMB"))},message:()=>(0,i.t)("ADD_FLP_CONFIG_QUESTION"),default:!1,validate:t=>(0,i.validateNextStep)(t,e,(0,i.t)("FLP_CONFIG"))}),p}},56470:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.findUI5VersionChoice=void 0;const n=i(r(76027));t.findUI5VersionChoice=function(e,t){const r="(Source system version)";if(e&&n.default.valid(e))return t.find((t=>{const i=function(e,t){try{const r=e.toLowerCase()===t.toLowerCase(),i=e.toLowerCase().includes("snapshot")&&t.toLowerCase().includes("snapshot")&&n.default.eq(n.default.coerce(e),n.default.coerce(t));return r||i}catch{return!1}}(t.version.semantic,e);return i&&!t.name.endsWith(r)&&(t.name=`${t.name} ${r}`),i}))}},34409:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=34409,e.exports=t},70910:(e,t,r)=>{var i={"./Find-VisualStudio.cs":20183,"./build":17724,"./build.js":17724,"./clean":1658,"./clean.js":1658,"./configure":4748,"./configure.js":4748,"./create-config-gypi":98395,"./create-config-gypi.js":98395,"./find-node-directory":24159,"./find-node-directory.js":24159,"./find-python":29130,"./find-python.js":29130,"./find-visualstudio":17703,"./find-visualstudio.js":17703,"./install":25925,"./install.js":25925,"./list":44179,"./list.js":44179,"./node-gyp":55614,"./node-gyp.js":55614,"./process-release":75344,"./process-release.js":75344,"./rebuild":64187,"./rebuild.js":64187,"./remove":13103,"./remove.js":13103,"./util":55690,"./util.js":55690};function n(e){var t=s(e);return r(t)}function s(e){if(!r.o(i,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return i[e]}n.keys=function(){return Object.keys(i)},n.resolve=s,e.exports=n,n.id=70910},84679:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=84679,e.exports=t},72869:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=72869,e.exports=t},12937:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=12937,e.exports=t},84397:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=84397,e.exports=t},54529:e=>{"use strict";e.exports=require("@opentelemetry/tracing")},85767:e=>{"use strict";e.exports=require("@sap/cds")},31980:e=>{"use strict";e.exports=require("@sap/cds-compiler")},32220:e=>{"use strict";e.exports=require("applicationinsights-native-metrics")},43241:e=>{"use strict";e.exports=require("esprima")},74602:e=>{"use strict";e.exports=require("keytar")},66828:e=>{"use strict";e.exports=require("vscode")},39491:e=>{"use strict";e.exports=require("assert")},50852:e=>{"use strict";e.exports=require("async_hooks")},14300:e=>{"use strict";e.exports=require("buffer")},32081:e=>{"use strict";e.exports=require("child_process")},96206:e=>{"use strict";e.exports=require("console")},22057:e=>{"use strict";e.exports=require("constants")},6113:e=>{"use strict";e.exports=require("crypto")},9523:e=>{"use strict";e.exports=require("dns")},82361:e=>{"use strict";e.exports=require("events")},57147:e=>{"use strict";e.exports=require("fs")},73292:e=>{"use strict";e.exports=require("fs/promises")},13685:e=>{"use strict";e.exports=require("http")},95687:e=>{"use strict";e.exports=require("https")},98188:e=>{"use strict";e.exports=require("module")},41808:e=>{"use strict";e.exports=require("net")},22037:e=>{"use strict";e.exports=require("os")},71017:e=>{"use strict";e.exports=require("path")},77282:e=>{"use strict";e.exports=require("process")},85477:e=>{"use strict";e.exports=require("punycode")},63477:e=>{"use strict";e.exports=require("querystring")},14521:e=>{"use strict";e.exports=require("readline")},12781:e=>{"use strict";e.exports=require("stream")},71576:e=>{"use strict";e.exports=require("string_decoder")},39512:e=>{"use strict";e.exports=require("timers")},24404:e=>{"use strict";e.exports=require("tls")},76224:e=>{"use strict";e.exports=require("tty")},57310:e=>{"use strict";e.exports=require("url")},73837:e=>{"use strict";e.exports=require("util")},26144:e=>{"use strict";e.exports=require("vm")},59796:e=>{"use strict";e.exports=require("zlib")},69645:e=>{"use strict";e.exports={}}},i={};function n(e){var t=i[e];if(void 0!==t)return t.exports;var s=i[e]={id:e,loaded:!1,exports:{}};return r[e].call(s.exports,s,s.exports,n),s.loaded=!0,s.exports}n.m=r,n.c=i,n.x=()=>{var e=n.O(void 0,[712,784,708,916,439,400,506,475,763,689,2],(()=>n(n.s=97555)));return e=n.O(e)},e=[],n.O=(t,r,i,s)=>{if(!r){var o=1/0;for(d=0;d<e.length;d++){for(var[r,i,s]=e[d],a=!0,u=0;u<r.length;u++)(!1&s||o>=s)&&Object.keys(n.O).every((e=>n.O[e](r[u])))?r.splice(u--,1):(a=!1,s<o&&(o=s));if(a){e.splice(d--,1);var c=i();void 0!==c&&(t=c)}}return t}s=s||0;for(var d=e.length;d>0&&e[d-1][2]>s;d--)e[d]=e[d-1];e[d]=[r,i,s]},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce(((t,r)=>(n.f[r](e,t),t)),[])),n.u=e=>({2:"project-generator/app",400:"fe-fpm-writer/dist",439:"ui5-application-writer/dist",475:"tools-suite-common-libs",506:"fiori-elements-writer/dist",689:"ux-service-inquirer",708:"ui5-test-writer/dist",712:"commonlibs",763:"app-gen-shared",784:"open-ux-shared",916:"odata-service-writer/dist"}[e]+"/index.js"),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),n.j=953,n.p="",(()=>{var e={953:1,77:1,838:1,190:1,815:1,673:1};n.O.require=t=>e[t];n.f.require=(t,r)=>{e[t]||(t=>{var r=t.modules,i=t.ids,s=t.runtime;for(var o in r)n.o(r,o)&&(n.m[o]=r[o]);s&&s(n);for(var a=0;a<i.length;a++)e[i[a]]=1;n.O()})(require("../"+n.u(t)))}})(),t=n.x,n.x=()=>(n.e(712),n.e(784),n.e(708),n.e(916),n.e(439),n.e(400),n.e(506),n.e(475),n.e(763),n.e(689),n.e(2),t());var s=n.x();module.exports=s})(); | ||
(()=>{var e,t,r={51617:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=51617,e.exports=t},39973:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=39973,e.exports=t},20230:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=20230,e.exports=t},20545:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=20545,e.exports=t},4297:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=4297,e.exports=t},75601:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=75601,e.exports=t},82626:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=82626,e.exports=t},37974:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=37974,e.exports=t},85858:(e,t,r)=>{var i={"./cat":43112,"./cat.js":43112,"./cd":86698,"./cd.js":86698,"./chmod":23986,"./chmod.js":23986,"./common":96816,"./common.js":96816,"./cp":80610,"./cp.js":80610,"./dirs":91972,"./dirs.js":91972,"./echo":16166,"./echo.js":16166,"./error":80609,"./error.js":80609,"./exec":52024,"./exec-child":69911,"./exec-child.js":69911,"./exec.js":52024,"./find":22261,"./find.js":22261,"./grep":56818,"./grep.js":56818,"./head":66412,"./head.js":66412,"./ln":91247,"./ln.js":91247,"./ls":5815,"./ls.js":5815,"./mkdir":70098,"./mkdir.js":70098,"./mv":74164,"./mv.js":74164,"./popd":99851,"./popd.js":99851,"./pushd":6978,"./pushd.js":6978,"./pwd":24044,"./pwd.js":24044,"./rm":44256,"./rm.js":44256,"./sed":43422,"./sed.js":43422,"./set":17444,"./set.js":17444,"./sort":53033,"./sort.js":53033,"./tail":50318,"./tail.js":50318,"./tempdir":16275,"./tempdir.js":16275,"./test":50021,"./test.js":50021,"./to":44915,"./to.js":44915,"./toEnd":13326,"./toEnd.js":13326,"./touch":57650,"./touch.js":57650,"./uniq":63019,"./uniq.js":63019,"./which":5483,"./which.js":5483};function n(e){var t=s(e);return r(t)}function s(e){if(!r.o(i,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return i[e]}n.keys=function(){return Object.keys(i)},n.resolve=s,e.exports=n,n.id=85858},59896:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,s){function o(e){try{u(i.next(e))}catch(e){s(e)}}function a(e){try{u(i.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,a)}u((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.checkCdsUi5PluginEnabled=t.enableCdsUi5Plugin=t.satisfiesMinCdsVersion=void 0;const n=r(71017),s=r(5407),o=r(84659),a=r(21832);var u=r(21832);Object.defineProperty(t,"satisfiesMinCdsVersion",{enumerable:!0,get:function(){return u.satisfiesMinCdsVersion}}),t.enableCdsUi5Plugin=function(e,t){var r;return i(this,void 0,void 0,(function*(){t||(t=(0,o.create)((0,s.create)()));const i=(0,n.join)(e,"package.json"),u=null!==(r=t.readJSON(i))&&void 0!==r?r:{};return(0,a.ensureMinCdsVersion)(u),yield(0,a.enableWorkspaces)(e,u),(0,a.addCdsPluginUi5)(u),t.writeJSON(i,u),t}))},t.checkCdsUi5PluginEnabled=function(e,t){return i(this,void 0,void 0,(function*(){t||(t=(0,o.create)((0,s.create)()));const r=(0,n.join)(e,"package.json");if(!t.exists(r))return!1;const i=t.readJSON(r),{workspaceEnabled:u}=yield(0,a.getWorkspaceInfo)(e,i);return(0,a.hasMinCdsVersion)(i)&&u&&(0,a.hasCdsPluginUi5)(i)}))}},21832:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,s){function o(e){try{u(i.next(e))}catch(e){s(e)}}function a(e){try{u(i.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,a)}u((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.hasCdsPluginUi5=t.getWorkspaceInfo=t.satisfiesMinCdsVersion=t.hasMinCdsVersion=t.addCdsPluginUi5=t.enableWorkspaces=t.ensureMinCdsVersion=void 0;const n=r(76027),s=r(9949),o="6.8.2";function a(e){var t,r;return(0,n.gte)(null!==(r=(0,n.coerce)(null===(t=e.dependencies)||void 0===t?void 0:t["@sap/cds"]))&&void 0!==r?r:"0.0.0",o)}function u(e,t){var r;return i(this,void 0,void 0,(function*(){const i=yield(0,s.getCapCustomPaths)(e),n=i.app.endsWith("/")?`${i.app}*`:`${i.app}/*`;return{appWorkspace:n,workspaceEnabled:(null!==(r=c(t))&&void 0!==r?r:[]).includes(n)}}))}function c(e){var t,r;let i;return Array.isArray(e.workspaces)?i=e.workspaces:Array.isArray(null===(t=e.workspaces)||void 0===t?void 0:t.packages)&&(i=null===(r=e.workspaces)||void 0===r?void 0:r.packages),i}function d(e){var t;return!!(null===(t=e.devDependencies)||void 0===t?void 0:t["cds-plugin-ui5"])}t.ensureMinCdsVersion=function(e){var t;a(e)||(null!==(t=e.dependencies)&&void 0!==t||(e.dependencies={}),e.dependencies["@sap/cds"]="^6.8.2")},t.enableWorkspaces=function(e,t){var r;return i(this,void 0,void 0,(function*(){const{appWorkspace:i,workspaceEnabled:n}=yield u(e,t);if(n)return;let s=c(t);s||(null!==(r=t.workspaces)&&void 0!==r||(t.workspaces=[]),Array.isArray(t.workspaces)?s=t.workspaces:(t.workspaces.packages=[],s=t.workspaces.packages)),s.push(i)}))},t.addCdsPluginUi5=function(e){var t;d(e)||(null!==(t=e.devDependencies)&&void 0!==t||(e.devDependencies={}),e.devDependencies["cds-plugin-ui5"]="^0.6.13")},t.hasMinCdsVersion=a,t.satisfiesMinCdsVersion=function(e){var t,r;return a(e)||(0,n.satisfies)(o,null!==(r=null===(t=e.dependencies)||void 0===t?void 0:t["@sap/cds"])&&void 0!==r?r:"0.0.0")},t.getWorkspaceInfo=u,t.hasCdsPluginUi5=d},49339:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.satisfiesMinCdsVersion=t.enableCdsUi5Plugin=t.checkCdsUi5PluginEnabled=void 0;var i=r(59896);Object.defineProperty(t,"checkCdsUi5PluginEnabled",{enumerable:!0,get:function(){return i.checkCdsUi5PluginEnabled}}),Object.defineProperty(t,"enableCdsUi5Plugin",{enumerable:!0,get:function(){return i.enableCdsUi5Plugin}}),Object.defineProperty(t,"satisfiesMinCdsVersion",{enumerable:!0,get:function(){return i.satisfiesMinCdsVersion}})},85513:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(81836),t)},81836:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ProjectInquirer=void 0;const n=r(59390),s=r(1628),o=r(11115),a=r(56470),u=r(48191),c=i(r(66544)),{mainQuestions:d,advancedQuestions:l}=s.FioriGeneratorPromptNames.projectAttributes;t.ProjectInquirer=class ProjectInquirer{async inquire(e,{...t},r){const i=[],c=await(0,u.getUI5VersionChoices)(t.minSupportedUI5Version),l=await(0,n.getSapSystemUI5Version)(t.host),p=(0,a.findUI5VersionChoice)(l,c),f=t.promptSettings;return i.push(...(0,s.withExtensions)((0,o.getMainQuestions)(r,!!t.capService,!f?.[d.ui5Version]?.hide&&c,p,f),t.extensions)),i.push({type:"confirm",name:"showAdvanced",message:(0,s.t)("ADVANCED_CONFIGURE_MESSAGE"),guiOptions:{hint:(0,s.t)("TOOLTIP_ADVANCED_CONFIG")},default:!1}),i.push(...(0,s.withExtensions)((0,s.withCondition)((0,o.getAdvancedQuestions)(c,t.capService,f),(e=>e.showAdvanced)),t.extensions)),this.answersToProject(await e(i),t)}async answersToProject(e,{isV4:t=!1,promptSettings:r,extensions:i}){const s=e?.ui5Version,o=(await(0,n.retrieveUI5Versions)({fioriElementsVersion:t?"v4":"v2",onlyVersionNumbers:!0,onlyNpmVersion:!0,ui5SelectedVersion:s??"Latest"}))[0],a={name:e?.name||r?.[d.name]?.value,description:e?.description,title:e?.title,namespace:e?.namespace,targetFolder:e?.targetFolder||r?.[d.targetFolder]?.value,ui5Version:s||o,addDeployConfig:e?.addDeployConfig,addFlpConfig:e?.addFlpConfig,sapux:!0,localUI5Version:o,ui5Theme:e?.ui5Theme,enableEslint:e?.enableEslint,enableCodeAssist:e?.enableCodeAssist,skipAnnotations:e?.skipAnnotations,enableNPMWorkspaces:e?.enableNPMWorkspaces,enableTypeScript:e?.enableTypeScript};return e?.showAdvanced||Object.assign(a,await this.getAdvancedDefaults(a,i)),a}async getAdvancedDefaults(e,t){let r={};t&&(r=await this.getExtensionDefaults(t,e));return{ui5Theme:e.ui5Theme||r.ui5Theme||(0,n.getDefaultTheme)(e.ui5Version),enableEslint:e.enableEslint||r.enableEslint||s.DEFAULT_PROJECT_ATTRIBUTES.enableCodeAssist,enableCodeAssist:e.enableCodeAssist||r.enableCodeAssist||s.DEFAULT_PROJECT_ATTRIBUTES.enableCodeAssist,skipAnnotations:e.skipAnnotations||r.skipAnnotations||s.DEFAULT_PROJECT_ATTRIBUTES.skipAnnotations,enableNPMWorkspaces:e.enableNPMWorkspaces,enableTypeScript:e.enableTypeScript||r.enableTypeScript||s.DEFAULT_PROJECT_ATTRIBUTES.enableTypeScript}}async getExtensionDefaults(e,t){const r=Object.values(l),i={};for await(const n of r)if(!(0,c.default)(e[n]?.default)){const r="function"==typeof e[n].default?await e[n].default(t):e[n].default;Object.assign(i,{[n]:r})}return i}}},40335:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAdvancedQuestions=void 0;const i=r(1628),n=r(59390),s=r(48191),o=i.FioriGeneratorPromptNames.projectAttributes.advancedQuestions;t.getAdvancedQuestions=function(e,t,r){let a;const u=[];return u.push({type:"list",name:o.ui5Theme,message:(0,i.t)("LABEL_UI5_THEME"),guiOptions:{applyDefaultWhenDirty:!0,breadcrumb:(0,i.breadcrumbHelper)()},choices:({ui5Version:e="Latest"})=>(a=(0,s.getFilterThemesChoices)(e),a),default:({ui5Theme:e,ui5Version:t})=>(e||(e=(0,n.getDefaultTheme)(t)),e)}),t||r?.[o.enableEslint]?.hide||u.push({type:"confirm",name:o.enableEslint,message:(0,i.t)("ENABLE_ESLINT"),default:r?.[o.enableEslint]?.value??i.DEFAULT_PROJECT_ATTRIBUTES[o.enableEslint],guiOptions:{breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("LABEL_ESLINT_ENABLED_BREADCRUMB"))}}),r?.[o.enableCodeAssist]?.hide||u.push({when:t=>{const r=e.map((e=>e.version.semantic));return(0,n.uI5VersionsWithCodeAssist)(r,t?.ui5Version||"Latest")},type:"confirm",name:o.enableCodeAssist,message:(0,i.t)("ENABLE_CODE_ASSIST_MESSAGE"),default:r?.[o.enableCodeAssist]?.value??i.DEFAULT_PROJECT_ATTRIBUTES[o.enableCodeAssist],guiOptions:{breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("LABEL_CODE_ASSIST_ENABLED_BREADCRUMB"))}}),r?.[o.skipAnnotations]?.hide||u.push({type:"confirm",name:o.skipAnnotations,message:(0,i.t)("SKIP_ANNOTATIONS"),default:r?.[o.skipAnnotations]?.value??i.DEFAULT_PROJECT_ATTRIBUTES[o.skipAnnotations],guiOptions:{breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("LABEL_SKIP_ANNOTATIONS_BREADCRUMB"))}}),u.push({when:()=>t?.capType===i.CapType.NODE_JS&&((0,s.checkHasCdsMinVersion)(t.projectPath)&&!t.cdsUI5PluginEnabled),type:"confirm",name:"enableNPMWorkspaces",message:(0,i.t)("ENABLE_NPM_WORKSPACES"),default:!1,guiOptions:{breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("LABEL_ENABLE_NPM_WORKSPACES_BREADCRUMB"))}}),r?.[o.enableTypeScript]?.hide||u.push({when:e=>!t||t.capType===i.CapType.NODE_JS&&(t.cdsUI5PluginEnabled||e?.enableNPMWorkspaces),type:"confirm",name:o.enableTypeScript,message:(0,i.t)("ENABLE_TYPESCRIPT"),default:r?.[o.enableTypeScript]?.value??i.DEFAULT_PROJECT_ATTRIBUTES[o.enableTypeScript],guiOptions:{breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("LABEL_ENABLE_TYPESCRIPT_BREADCRUMB"))}}),u}},57286:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(40335),t)},48191:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.checkHasCdsMinVersion=t.ui5VersionsGrouped=t.getFilterThemesChoices=t.getUI5VersionChoices=void 0;const n=r(59390),s=r(1628),o=i(r(85715)),a=r(5407),u=r(84659),c=r(49339),d=r(71017);t.getUI5VersionChoices=async function(e){const t={includeSnapshots:!1,minSupportedUI5Version:e,useCache:!0,removeDuplicateVersions:!0,groupUI5Versions:!0};return(0,n.getUI5VersionsEnhanced)(t)},t.getFilterThemesChoices=function(e){return(0,n.getUi5Themes)(e).map((e=>({value:e.themeid,name:e.label})))},t.ui5VersionsGrouped=function(e){return e?(0,s.getPlatform)()===s.PLATFORMS.CLI?[...e.filter((e=>(!0===e.version.maintained&&(e.name=`${e.name} - (${(0,s.t)("MAINTAINED")} ${(0,s.t)("VERSION",{count:1})})`),!0===e.version.maintained))),...e.filter((e=>(!1===e.version.maintained&&(e.name=`${e.name} - (${(0,s.t)("OUT_OF_MAINTENANCE")} ${(0,s.t)("VERSION",{count:1})})`),!1===e.version.maintained)))]:[new o.default.Separator(`${(0,s.t)("MAINTAINED")} ${(0,s.t)("VERSION",{count:0})}`),...e.filter((e=>!0===e.version.maintained)),new o.default.Separator(`${(0,s.t)("OUT_OF_MAINTENANCE")} ${(0,s.t)("VERSION",{count:0})}`),...e.filter((e=>!1===e.version.maintained))]:[]},t.checkHasCdsMinVersion=function(e,t){t||(t=(0,u.create)((0,a.create)()));const r=(0,d.join)(e,"package.json");if(!t.exists(r))return!1;const i=t.readJSON(r);return(0,c.satisfiesMinCdsVersion)(i)}},11115:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(57286),t),n(r(37520),t)},66528:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultProjectName=t.defaultDescription=t.defaultTargetFolder=t.defaultUi5Version=void 0;const i=r(1628);t.defaultUi5Version=function(e,t,r){return e?.value||t?.value||r?.value},t.defaultTargetFolder=function(e,t){return e||t||process.cwd()},t.defaultDescription=function(e){return e||(0,i.t)("DEFAULT_PROJECT_DESCRIPTION")},t.defaultProjectName=function(e){let t=i.defaultProjectNumber,r=(0,i.t)("DEFAULT_PROJECT_NAME");for(;(0,i.applicationExists)(`${r}`,e)&&(r=(0,i.t)("DEFAULT_PROJECT_NAME",{defaultProjectNumber:++t}),!(t>99)););return r}},37520:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(89225),t)},89225:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getMainQuestions=void 0;const i=r(1628),n=r(66528),s=i.FioriGeneratorPromptNames.projectAttributes.mainQuestions;t.getMainQuestions=function(e,t,r,o,a){const u=(0,i.breadcrumbHelper)(),c=a?.[s.name]?.value,d=a?.[s.targetFolder]?.value,l=(0,i.ui5VersionsGrouped)(r);let p=[];return a?.[s.name]?.hide||p.push({type:"input",guiOptions:{applyDefaultWhenDirty:!0,hint:(0,i.t)("TOOLTIP_PROJECT_NAME"),mandatory:!0,breadcrumb:u},name:s.name,message:(0,i.t)("PROJECT_NAME_MESSAGE"),default:e=>e.name||c||(0,n.defaultProjectName)(d),validate:e=>(0,i.getPlatform)()===i.PLATFORMS.CLI||t?(0,i.validateProjectName)(d,e):(0,i.validateModuleName)(e)}),p=p.concat([{type:"input",guiOptions:{hint:(0,i.t)("TOOLTIP_PROJECT_TITLE"),breadcrumb:u},name:s.title,message:(0,i.t)("PROJECT_TITLE_MESSAGE"),default:e=>e.title||(0,i.t)("DEFAULT_PROJECT_TITLE")},{type:"input",guiOptions:{hint:(0,i.t)("TOOLTIP_PROJECT_NAMESPACE"),breadcrumb:u},name:s.namespace,message:(0,i.t)("PROJECT_NAMESPACE_MESSAGE"),default:e=>e.namespace||"",validate:(e,t)=>(0,i.validateNamespace)(e,t.name||c)},{type:"input",name:s.description,guiOptions:{hint:(0,i.t)("TOOLTIP_PROJECT_DESCRIPTION"),breadcrumb:u},message:(0,i.t)("PROJECT_DESCRIPTION_MESSAGE"),default:e=>(0,n.defaultDescription)(e.description)}]),a?.[s.targetFolder]?.hide||t||p.push({type:"input",name:s.targetFolder,message:(0,i.t)("CHOOSE_PROJECT_FOLDER_MESSAGE"),guiType:"folder-browser",guiOptions:{applyDefaultWhenDirty:!0,mandatory:!0,breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("LABEL_PROJECT_PATH_BREADCRUMB"))},default:e=>(0,n.defaultTargetFolder)(e.targetFolder,d),validate:(e,{name:t})=>{if(t?.length>2)return(0,i.validateProjectFolder)(e,t)}}),p=p.concat([{when:()=>!!r,type:(0,i.getPlatform)()===i.PLATFORMS.CLI?"autocomplete":"list",name:s.ui5Version,guiOptions:{hint:(0,i.t)("TOOLTIP_UI5_VERSION"),breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("LABEL_UI5_VERSION_BREADCRUMB"))},message:(0,i.t)("LABEL_UI5_VERSION"),choices:()=>l,source:(e,t)=>(0,i.searchChoices)(t,l),default:e=>(0,n.defaultUi5Version)(r.find((t=>t.value===e?.ui5Version)),o,r.find((e=>!0===e.version.default)))}]),a?.[s.addDeployConfig]?.hide||p.push({type:"confirm",name:s.addDeployConfig,guiOptions:{breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("LABEL_DEPLOY_CONFIG_BREADCRUMB"))},message:async e=>{const t=await(0,i.validateMtaPath)(e.targetFolder||d);return t?(0,i.t)("ADD_TO_MTA_QUESTION",{path:t,interpolation:{escapeValue:!1}}):(0,i.t)("ADD_DEPLOYMENT_CONFIG_QUESTION")},when:async e=>!t||t&&await(0,i.validateMtaPath)(e?.targetFolder||d)||!1,default:async e=>!!await(0,i.validateMtaPath)(e?.targetFolder||d),validate:t=>(0,i.validateNextStep)(t,e,(0,i.t)("DEPLOYMENT_CONFIG"))}),a?.[s.addFlpConfig]?.hide||p.push({type:"confirm",name:s.addFlpConfig,guiOptions:{breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("LABEL_FLP_CONFIG_BREADCRUMB"))},message:()=>(0,i.t)("ADD_FLP_CONFIG_QUESTION"),default:!1,validate:t=>(0,i.validateNextStep)(t,e,(0,i.t)("FLP_CONFIG"))}),p}},56470:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.findUI5VersionChoice=void 0;const n=i(r(76027));t.findUI5VersionChoice=function(e,t){const r="(Source system version)";if(e&&n.default.valid(e))return t.find((t=>{const i=function(e,t){try{const r=e.toLowerCase()===t.toLowerCase(),i=e.toLowerCase().includes("snapshot")&&t.toLowerCase().includes("snapshot")&&n.default.eq(n.default.coerce(e),n.default.coerce(t));return r||i}catch{return!1}}(t.version.semantic,e);return i&&!t.name.endsWith(r)&&(t.name=`${t.name} ${r}`),i}))}},34409:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=34409,e.exports=t},70910:(e,t,r)=>{var i={"./Find-VisualStudio.cs":20183,"./build":17724,"./build.js":17724,"./clean":1658,"./clean.js":1658,"./configure":4748,"./configure.js":4748,"./create-config-gypi":98395,"./create-config-gypi.js":98395,"./find-node-directory":24159,"./find-node-directory.js":24159,"./find-python":29130,"./find-python.js":29130,"./find-visualstudio":17703,"./find-visualstudio.js":17703,"./install":25925,"./install.js":25925,"./list":44179,"./list.js":44179,"./node-gyp":55614,"./node-gyp.js":55614,"./process-release":75344,"./process-release.js":75344,"./rebuild":64187,"./rebuild.js":64187,"./remove":13103,"./remove.js":13103,"./util":55690,"./util.js":55690};function n(e){var t=s(e);return r(t)}function s(e){if(!r.o(i,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return i[e]}n.keys=function(){return Object.keys(i)},n.resolve=s,e.exports=n,n.id=70910},84679:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=84679,e.exports=t},72869:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=72869,e.exports=t},12937:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=12937,e.exports=t},84397:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=84397,e.exports=t},54529:e=>{"use strict";e.exports=require("@opentelemetry/tracing")},85767:e=>{"use strict";e.exports=require("@sap/cds")},31980:e=>{"use strict";e.exports=require("@sap/cds-compiler")},32220:e=>{"use strict";e.exports=require("applicationinsights-native-metrics")},43241:e=>{"use strict";e.exports=require("esprima")},74602:e=>{"use strict";e.exports=require("keytar")},66828:e=>{"use strict";e.exports=require("vscode")},39491:e=>{"use strict";e.exports=require("assert")},50852:e=>{"use strict";e.exports=require("async_hooks")},14300:e=>{"use strict";e.exports=require("buffer")},32081:e=>{"use strict";e.exports=require("child_process")},96206:e=>{"use strict";e.exports=require("console")},22057:e=>{"use strict";e.exports=require("constants")},6113:e=>{"use strict";e.exports=require("crypto")},9523:e=>{"use strict";e.exports=require("dns")},82361:e=>{"use strict";e.exports=require("events")},57147:e=>{"use strict";e.exports=require("fs")},73292:e=>{"use strict";e.exports=require("fs/promises")},13685:e=>{"use strict";e.exports=require("http")},95687:e=>{"use strict";e.exports=require("https")},98188:e=>{"use strict";e.exports=require("module")},41808:e=>{"use strict";e.exports=require("net")},22037:e=>{"use strict";e.exports=require("os")},71017:e=>{"use strict";e.exports=require("path")},77282:e=>{"use strict";e.exports=require("process")},85477:e=>{"use strict";e.exports=require("punycode")},63477:e=>{"use strict";e.exports=require("querystring")},14521:e=>{"use strict";e.exports=require("readline")},12781:e=>{"use strict";e.exports=require("stream")},71576:e=>{"use strict";e.exports=require("string_decoder")},39512:e=>{"use strict";e.exports=require("timers")},24404:e=>{"use strict";e.exports=require("tls")},76224:e=>{"use strict";e.exports=require("tty")},57310:e=>{"use strict";e.exports=require("url")},73837:e=>{"use strict";e.exports=require("util")},26144:e=>{"use strict";e.exports=require("vm")},59796:e=>{"use strict";e.exports=require("zlib")},69645:e=>{"use strict";e.exports={}}},i={};function n(e){var t=i[e];if(void 0!==t)return t.exports;var s=i[e]={id:e,loaded:!1,exports:{}};return r[e].call(s.exports,s,s.exports,n),s.loaded=!0,s.exports}n.m=r,n.c=i,n.x=()=>{var e=n.O(void 0,[712,784,708,916,439,400,506,475,763,689,2],(()=>n(n.s=97555)));return e=n.O(e)},e=[],n.O=(t,r,i,s)=>{if(!r){var o=1/0;for(d=0;d<e.length;d++){for(var[r,i,s]=e[d],a=!0,u=0;u<r.length;u++)(!1&s||o>=s)&&Object.keys(n.O).every((e=>n.O[e](r[u])))?r.splice(u--,1):(a=!1,s<o&&(o=s));if(a){e.splice(d--,1);var c=i();void 0!==c&&(t=c)}}return t}s=s||0;for(var d=e.length;d>0&&e[d-1][2]>s;d--)e[d]=e[d-1];e[d]=[r,i,s]},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce(((t,r)=>(n.f[r](e,t),t)),[])),n.u=e=>({2:"project-generator/app",400:"fe-fpm-writer/dist",439:"ui5-application-writer/dist",475:"tools-suite-common-libs",506:"fiori-elements-writer/dist",689:"ux-service-inquirer",708:"ui5-test-writer/dist",712:"commonlibs",763:"app-gen-shared",784:"open-ux-shared",916:"odata-service-writer/dist"}[e]+"/index.js"),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),n.j=953,n.p="",(()=>{var e={953:1,77:1,838:1,190:1,815:1,673:1};n.O.require=t=>e[t];n.f.require=(t,r)=>{e[t]||(t=>{var r=t.modules,i=t.ids,s=t.runtime;for(var o in r)n.o(r,o)&&(n.m[o]=r[o]);s&&s(n);for(var a=0;a<i.length;a++)e[i[a]]=1;n.O()})(require("../"+n.u(t)))}})(),t=n.x,n.x=()=>(n.e(712),n.e(784),n.e(708),n.e(916),n.e(439),n.e(400),n.e(506),n.e(475),n.e(763),n.e(689),n.e(2),t());var s=n.x();module.exports=s})(); |
@@ -1,1 +0,1 @@ | ||
(()=>{var e,t,r={51617:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=51617,e.exports=t},39973:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=39973,e.exports=t},20230:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=20230,e.exports=t},20545:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=20545,e.exports=t},4297:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=4297,e.exports=t},75601:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=75601,e.exports=t},82626:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=82626,e.exports=t},37974:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=37974,e.exports=t},85858:(e,t,r)=>{var n={"./cat":43112,"./cat.js":43112,"./cd":86698,"./cd.js":86698,"./chmod":23986,"./chmod.js":23986,"./common":96816,"./common.js":96816,"./cp":80610,"./cp.js":80610,"./dirs":91972,"./dirs.js":91972,"./echo":16166,"./echo.js":16166,"./error":80609,"./error.js":80609,"./exec":52024,"./exec-child":69911,"./exec-child.js":69911,"./exec.js":52024,"./find":22261,"./find.js":22261,"./grep":56818,"./grep.js":56818,"./head":66412,"./head.js":66412,"./ln":91247,"./ln.js":91247,"./ls":5815,"./ls.js":5815,"./mkdir":70098,"./mkdir.js":70098,"./mv":74164,"./mv.js":74164,"./popd":99851,"./popd.js":99851,"./pushd":6978,"./pushd.js":6978,"./pwd":24044,"./pwd.js":24044,"./rm":44256,"./rm.js":44256,"./sed":43422,"./sed.js":43422,"./set":17444,"./set.js":17444,"./sort":53033,"./sort.js":53033,"./tail":50318,"./tail.js":50318,"./tempdir":16275,"./tempdir.js":16275,"./test":50021,"./test.js":50021,"./to":44915,"./to.js":44915,"./toEnd":13326,"./toEnd.js":13326,"./touch":57650,"./touch.js":57650,"./uniq":63019,"./uniq.js":63019,"./which":5483,"./which.js":5483};function i(e){var t=s(e);return r(t)}function s(e){if(!r.o(n,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return n[e]}i.keys=function(){return Object.keys(n)},i.resolve=s,e.exports=i,i.id=85858},59896:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,s){function o(e){try{u(n.next(e))}catch(e){s(e)}}function a(e){try{u(n.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,a)}u((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.checkCdsUi5PluginEnabled=t.enableCdsUi5Plugin=t.satisfiesMinCdsVersion=void 0;const i=r(71017),s=r(5407),o=r(84659),a=r(21832);var u=r(21832);Object.defineProperty(t,"satisfiesMinCdsVersion",{enumerable:!0,get:function(){return u.satisfiesMinCdsVersion}}),t.enableCdsUi5Plugin=function(e,t){var r;return n(this,void 0,void 0,(function*(){t||(t=(0,o.create)((0,s.create)()));const n=(0,i.join)(e,"package.json"),u=null!==(r=t.readJSON(n))&&void 0!==r?r:{};return(0,a.ensureMinCdsVersion)(u),yield(0,a.enableWorkspaces)(e,u),(0,a.addCdsPluginUi5)(u),t.writeJSON(n,u),t}))},t.checkCdsUi5PluginEnabled=function(e,t){return n(this,void 0,void 0,(function*(){t||(t=(0,o.create)((0,s.create)()));const r=(0,i.join)(e,"package.json");if(!t.exists(r))return!1;const n=t.readJSON(r),{workspaceEnabled:u}=yield(0,a.getWorkspaceInfo)(e,n);return(0,a.hasMinCdsVersion)(n)&&u&&(0,a.hasCdsPluginUi5)(n)}))}},21832:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,s){function o(e){try{u(n.next(e))}catch(e){s(e)}}function a(e){try{u(n.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,a)}u((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.hasCdsPluginUi5=t.getWorkspaceInfo=t.satisfiesMinCdsVersion=t.hasMinCdsVersion=t.addCdsPluginUi5=t.enableWorkspaces=t.ensureMinCdsVersion=void 0;const i=r(76027),s=r(88536),o="6.8.2";function a(e){var t,r;return(0,i.gte)(null!==(r=(0,i.coerce)(null===(t=e.dependencies)||void 0===t?void 0:t["@sap/cds"]))&&void 0!==r?r:"0.0.0",o)}function u(e,t){var r;return n(this,void 0,void 0,(function*(){const n=yield(0,s.getCapCustomPaths)(e),i=n.app.endsWith("/")?`${n.app}*`:`${n.app}/*`;return{appWorkspace:i,workspaceEnabled:(null!==(r=c(t))&&void 0!==r?r:[]).includes(i)}}))}function c(e){var t,r;let n;return Array.isArray(e.workspaces)?n=e.workspaces:Array.isArray(null===(t=e.workspaces)||void 0===t?void 0:t.packages)&&(n=null===(r=e.workspaces)||void 0===r?void 0:r.packages),n}function d(e){var t;return!!(null===(t=e.devDependencies)||void 0===t?void 0:t["cds-plugin-ui5"])}t.ensureMinCdsVersion=function(e){var t;a(e)||(null!==(t=e.dependencies)&&void 0!==t||(e.dependencies={}),e.dependencies["@sap/cds"]="^6.8.2")},t.enableWorkspaces=function(e,t){var r;return n(this,void 0,void 0,(function*(){const{appWorkspace:n,workspaceEnabled:i}=yield u(e,t);if(i)return;let s=c(t);s||(null!==(r=t.workspaces)&&void 0!==r||(t.workspaces=[]),Array.isArray(t.workspaces)?s=t.workspaces:(t.workspaces.packages=[],s=t.workspaces.packages)),s.push(n)}))},t.addCdsPluginUi5=function(e){var t;d(e)||(null!==(t=e.devDependencies)&&void 0!==t||(e.devDependencies={}),e.devDependencies["cds-plugin-ui5"]="^0.6.13")},t.hasMinCdsVersion=a,t.satisfiesMinCdsVersion=function(e){var t,r;return a(e)||(0,i.satisfies)(o,null!==(r=null===(t=e.dependencies)||void 0===t?void 0:t["@sap/cds"])&&void 0!==r?r:"0.0.0")},t.getWorkspaceInfo=u,t.hasCdsPluginUi5=d},49339:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.satisfiesMinCdsVersion=t.enableCdsUi5Plugin=t.checkCdsUi5PluginEnabled=void 0;var n=r(59896);Object.defineProperty(t,"checkCdsUi5PluginEnabled",{enumerable:!0,get:function(){return n.checkCdsUi5PluginEnabled}}),Object.defineProperty(t,"enableCdsUi5Plugin",{enumerable:!0,get:function(){return n.enableCdsUi5Plugin}}),Object.defineProperty(t,"satisfiesMinCdsVersion",{enumerable:!0,get:function(){return n.satisfiesMinCdsVersion}})},85513:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(81836),t)},81836:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ProjectInquirer=void 0;const i=r(59390),s=r(1628),o=r(11115),a=r(56470),u=r(48191),c=n(r(66544)),{mainQuestions:d,advancedQuestions:l}=s.FioriGeneratorPromptNames.projectAttributes;t.ProjectInquirer=class ProjectInquirer{async inquire(e,{...t},r){const n=[],c=await(0,u.getUI5VersionChoices)(t.minSupportedUI5Version),l=await(0,i.getSapSystemUI5Version)(t.host),p=(0,a.findUI5VersionChoice)(l,c),f=t.promptSettings;return n.push(...(0,s.withExtensions)((0,o.getMainQuestions)(r,!!t.capService,!f?.[d.ui5Version]?.hide&&c,p,f),t.extensions)),n.push({type:"confirm",name:"showAdvanced",message:(0,s.t)("ADVANCED_CONFIGURE_MESSAGE"),guiOptions:{hint:(0,s.t)("TOOLTIP_ADVANCED_CONFIG")},default:!1}),n.push(...(0,s.withExtensions)((0,s.withCondition)((0,o.getAdvancedQuestions)(c,t.capService,f),(e=>e.showAdvanced)),t.extensions)),this.answersToProject(await e(n),t)}async answersToProject(e,{isV4:t=!1,promptSettings:r,extensions:n}){const s=e?.ui5Version,o=(await(0,i.retrieveUI5Versions)({fioriElementsVersion:t?"v4":"v2",onlyVersionNumbers:!0,onlyNpmVersion:!0,ui5SelectedVersion:s??"Latest"}))[0],a={name:e?.name||r?.[d.name]?.value,description:e?.description,title:e?.title,namespace:e?.namespace,targetFolder:e?.targetFolder||r?.[d.targetFolder]?.value,ui5Version:s||o,addDeployConfig:e?.addDeployConfig,addFlpConfig:e?.addFlpConfig,sapux:!0,localUI5Version:o,ui5Theme:e?.ui5Theme,enableEslint:e?.enableEslint,enableCodeAssist:e?.enableCodeAssist,skipAnnotations:e?.skipAnnotations,enableNPMWorkspaces:e?.enableNPMWorkspaces,enableTypeScript:e?.enableTypeScript};return e?.showAdvanced||Object.assign(a,await this.getAdvancedDefaults(a,n)),a}async getAdvancedDefaults(e,t){let r={};t&&(r=await this.getExtensionDefaults(t,e));return{ui5Theme:e.ui5Theme||r.ui5Theme||(0,i.getDefaultTheme)(e.ui5Version),enableEslint:e.enableEslint||r.enableEslint||s.DEFAULT_PROJECT_ATTRIBUTES.enableCodeAssist,enableCodeAssist:e.enableCodeAssist||r.enableCodeAssist||s.DEFAULT_PROJECT_ATTRIBUTES.enableCodeAssist,skipAnnotations:e.skipAnnotations||r.skipAnnotations||s.DEFAULT_PROJECT_ATTRIBUTES.skipAnnotations,enableNPMWorkspaces:e.enableNPMWorkspaces,enableTypeScript:e.enableTypeScript||r.enableTypeScript||s.DEFAULT_PROJECT_ATTRIBUTES.enableTypeScript}}async getExtensionDefaults(e,t){const r=Object.values(l),n={};for await(const i of r)if(!(0,c.default)(e[i]?.default)){const r="function"==typeof e[i].default?await e[i].default(t):e[i].default;Object.assign(n,{[i]:r})}return n}}},40335:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAdvancedQuestions=void 0;const n=r(1628),i=r(59390),s=r(48191),o=n.FioriGeneratorPromptNames.projectAttributes.advancedQuestions;t.getAdvancedQuestions=function(e,t,r){let a;const u=[];return u.push({type:"list",name:o.ui5Theme,message:(0,n.t)("LABEL_UI5_THEME"),guiOptions:{applyDefaultWhenDirty:!0,breadcrumb:(0,n.breadcrumbHelper)()},choices:({ui5Version:e="Latest"})=>(a=(0,s.getFilterThemesChoices)(e),a),default:({ui5Theme:e,ui5Version:t})=>(e||(e=(0,i.getDefaultTheme)(t)),e)}),t||r?.[o.enableEslint]?.hide||u.push({type:"confirm",name:o.enableEslint,message:(0,n.t)("ENABLE_ESLINT"),default:r?.[o.enableEslint]?.value??n.DEFAULT_PROJECT_ATTRIBUTES[o.enableEslint],guiOptions:{breadcrumb:(0,n.breadcrumbHelper)((0,n.t)("LABEL_ESLINT_ENABLED_BREADCRUMB"))}}),r?.[o.enableCodeAssist]?.hide||u.push({when:t=>{const r=e.map((e=>e.version.semantic));return(0,i.uI5VersionsWithCodeAssist)(r,t?.ui5Version||"Latest")},type:"confirm",name:o.enableCodeAssist,message:(0,n.t)("ENABLE_CODE_ASSIST_MESSAGE"),default:r?.[o.enableCodeAssist]?.value??n.DEFAULT_PROJECT_ATTRIBUTES[o.enableCodeAssist],guiOptions:{breadcrumb:(0,n.breadcrumbHelper)((0,n.t)("LABEL_CODE_ASSIST_ENABLED_BREADCRUMB"))}}),r?.[o.skipAnnotations]?.hide||u.push({type:"confirm",name:o.skipAnnotations,message:(0,n.t)("SKIP_ANNOTATIONS"),default:r?.[o.skipAnnotations]?.value??n.DEFAULT_PROJECT_ATTRIBUTES[o.skipAnnotations],guiOptions:{breadcrumb:(0,n.breadcrumbHelper)((0,n.t)("LABEL_SKIP_ANNOTATIONS_BREADCRUMB"))}}),u.push({when:()=>t?.capType===n.CapType.NODE_JS&&((0,s.checkHasCdsMinVersion)(t.projectPath)&&!t.cdsUI5PluginEnabled),type:"confirm",name:"enableNPMWorkspaces",message:(0,n.t)("ENABLE_NPM_WORKSPACES"),default:!1,guiOptions:{breadcrumb:(0,n.breadcrumbHelper)((0,n.t)("LABEL_ENABLE_NPM_WORKSPACES_BREADCRUMB"))}}),r?.[o.enableTypeScript]?.hide||u.push({when:e=>!t||t.capType===n.CapType.NODE_JS&&(t.cdsUI5PluginEnabled||e?.enableNPMWorkspaces),type:"confirm",name:o.enableTypeScript,message:(0,n.t)("ENABLE_TYPESCRIPT"),default:r?.[o.enableTypeScript]?.value??n.DEFAULT_PROJECT_ATTRIBUTES[o.enableTypeScript],guiOptions:{breadcrumb:(0,n.breadcrumbHelper)((0,n.t)("LABEL_ENABLE_TYPESCRIPT_BREADCRUMB"))}}),u}},57286:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(40335),t)},48191:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.checkHasCdsMinVersion=t.ui5VersionsGrouped=t.getFilterThemesChoices=t.getUI5VersionChoices=void 0;const i=r(59390),s=r(1628),o=n(r(85715)),a=r(5407),u=r(84659),c=r(49339),d=r(71017);t.getUI5VersionChoices=async function(e){const t={includeSnapshots:!1,minSupportedUI5Version:e,useCache:!0,removeDuplicateVersions:!0,groupUI5Versions:!0};return(0,i.getUI5VersionsEnhanced)(t)},t.getFilterThemesChoices=function(e){return(0,i.getUi5Themes)(e).map((e=>({value:e.themeid,name:e.label})))},t.ui5VersionsGrouped=function(e){return e?(0,s.getPlatform)()===s.PLATFORMS.CLI?[...e.filter((e=>(!0===e.version.maintained&&(e.name=`${e.name} - (${(0,s.t)("MAINTAINED")} ${(0,s.t)("VERSION",{count:1})})`),!0===e.version.maintained))),...e.filter((e=>(!1===e.version.maintained&&(e.name=`${e.name} - (${(0,s.t)("OUT_OF_MAINTENANCE")} ${(0,s.t)("VERSION",{count:1})})`),!1===e.version.maintained)))]:[new o.default.Separator(`${(0,s.t)("MAINTAINED")} ${(0,s.t)("VERSION",{count:0})}`),...e.filter((e=>!0===e.version.maintained)),new o.default.Separator(`${(0,s.t)("OUT_OF_MAINTENANCE")} ${(0,s.t)("VERSION",{count:0})}`),...e.filter((e=>!1===e.version.maintained))]:[]},t.checkHasCdsMinVersion=function(e,t){t||(t=(0,u.create)((0,a.create)()));const r=(0,d.join)(e,"package.json");if(!t.exists(r))return!1;const n=t.readJSON(r);return(0,c.satisfiesMinCdsVersion)(n)}},11115:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(57286),t),i(r(37520),t)},66528:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultProjectName=t.defaultDescription=t.defaultTargetFolder=t.defaultUi5Version=void 0;const n=r(1628);t.defaultUi5Version=function(e,t,r){return e?.value||t?.value||r?.value},t.defaultTargetFolder=function(e,t){return e||t||process.cwd()},t.defaultDescription=function(e){return e||(0,n.t)("DEFAULT_PROJECT_DESCRIPTION")},t.defaultProjectName=function(e){let t=n.defaultProjectNumber,r=(0,n.t)("DEFAULT_PROJECT_NAME");for(;(0,n.applicationExists)(`${r}`,e)&&(r=(0,n.t)("DEFAULT_PROJECT_NAME",{defaultProjectNumber:++t}),!(t>99)););return r}},37520:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(89225),t)},89225:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getMainQuestions=void 0;const n=r(1628),i=r(66528),s=n.FioriGeneratorPromptNames.projectAttributes.mainQuestions;t.getMainQuestions=function(e,t,r,o,a){const u=(0,n.breadcrumbHelper)(),c=a?.[s.name]?.value,d=a?.[s.targetFolder]?.value,l=(0,n.ui5VersionsGrouped)(r);let p=[];return a?.[s.name]?.hide||p.push({type:"input",guiOptions:{applyDefaultWhenDirty:!0,hint:(0,n.t)("TOOLTIP_PROJECT_NAME"),mandatory:!0,breadcrumb:u},name:s.name,message:(0,n.t)("PROJECT_NAME_MESSAGE"),default:e=>e.name||c||(0,i.defaultProjectName)(d),validate:e=>(0,n.getPlatform)()===n.PLATFORMS.CLI||t?(0,n.validateProjectName)(d,e):(0,n.validateModuleName)(e)}),p=p.concat([{type:"input",guiOptions:{hint:(0,n.t)("TOOLTIP_PROJECT_TITLE"),breadcrumb:u},name:s.title,message:(0,n.t)("PROJECT_TITLE_MESSAGE"),default:e=>e.title||(0,n.t)("DEFAULT_PROJECT_TITLE")},{type:"input",guiOptions:{hint:(0,n.t)("TOOLTIP_PROJECT_NAMESPACE"),breadcrumb:u},name:s.namespace,message:(0,n.t)("PROJECT_NAMESPACE_MESSAGE"),default:e=>e.namespace||"",validate:(e,t)=>(0,n.validateNamespace)(e,t.name||c)},{type:"input",name:s.description,guiOptions:{hint:(0,n.t)("TOOLTIP_PROJECT_DESCRIPTION"),breadcrumb:u},message:(0,n.t)("PROJECT_DESCRIPTION_MESSAGE"),default:e=>(0,i.defaultDescription)(e.description)}]),a?.[s.targetFolder]?.hide||t||p.push({type:"input",name:s.targetFolder,message:(0,n.t)("CHOOSE_PROJECT_FOLDER_MESSAGE"),guiType:"folder-browser",guiOptions:{applyDefaultWhenDirty:!0,mandatory:!0,breadcrumb:(0,n.breadcrumbHelper)((0,n.t)("LABEL_PROJECT_PATH_BREADCRUMB"))},default:e=>(0,i.defaultTargetFolder)(e.targetFolder,d),validate:(e,{name:t})=>{if(t?.length>2)return(0,n.validateProjectFolder)(e,t)}}),p=p.concat([{when:()=>!!r,type:(0,n.getPlatform)()===n.PLATFORMS.CLI?"autocomplete":"list",name:s.ui5Version,guiOptions:{hint:(0,n.t)("TOOLTIP_UI5_VERSION"),breadcrumb:(0,n.breadcrumbHelper)((0,n.t)("LABEL_UI5_VERSION_BREADCRUMB"))},message:(0,n.t)("LABEL_UI5_VERSION"),choices:()=>l,source:(e,t)=>(0,n.searchChoices)(t,l),default:e=>(0,i.defaultUi5Version)(r.find((t=>t.value===e?.ui5Version)),o,r.find((e=>!0===e.version.default)))}]),a?.[s.addDeployConfig]?.hide||p.push({type:"confirm",name:s.addDeployConfig,guiOptions:{breadcrumb:(0,n.breadcrumbHelper)((0,n.t)("LABEL_DEPLOY_CONFIG_BREADCRUMB"))},message:async e=>{const t=await(0,n.validateMtaPath)(e.targetFolder||d);return t?(0,n.t)("ADD_TO_MTA_QUESTION",{path:t,interpolation:{escapeValue:!1}}):(0,n.t)("ADD_DEPLOYMENT_CONFIG_QUESTION")},when:async e=>!t||t&&await(0,n.validateMtaPath)(e?.targetFolder||d)||!1,default:async e=>!!await(0,n.validateMtaPath)(e?.targetFolder||d),validate:t=>(0,n.validateNextStep)(t,e,(0,n.t)("DEPLOYMENT_CONFIG"))}),a?.[s.addFlpConfig]?.hide||p.push({type:"confirm",name:s.addFlpConfig,guiOptions:{breadcrumb:(0,n.breadcrumbHelper)((0,n.t)("LABEL_FLP_CONFIG_BREADCRUMB"))},message:()=>(0,n.t)("ADD_FLP_CONFIG_QUESTION"),default:!1,validate:t=>(0,n.validateNextStep)(t,e,(0,n.t)("FLP_CONFIG"))}),p}},56470:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.findUI5VersionChoice=void 0;const i=n(r(76027));t.findUI5VersionChoice=function(e,t){const r="(Source system version)";if(e&&i.default.valid(e))return t.find((t=>{const n=function(e,t){try{const r=e.toLowerCase()===t.toLowerCase(),n=e.toLowerCase().includes("snapshot")&&t.toLowerCase().includes("snapshot")&&i.default.eq(i.default.coerce(e),i.default.coerce(t));return r||n}catch{return!1}}(t.version.semantic,e);return n&&!t.name.endsWith(r)&&(t.name=`${t.name} ${r}`),n}))}},34409:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=34409,e.exports=t},70910:(e,t,r)=>{var n={"./Find-VisualStudio.cs":20183,"./build":17724,"./build.js":17724,"./clean":1658,"./clean.js":1658,"./configure":4748,"./configure.js":4748,"./create-config-gypi":98395,"./create-config-gypi.js":98395,"./find-node-directory":24159,"./find-node-directory.js":24159,"./find-python":29130,"./find-python.js":29130,"./find-visualstudio":17703,"./find-visualstudio.js":17703,"./install":25925,"./install.js":25925,"./list":44179,"./list.js":44179,"./node-gyp":55614,"./node-gyp.js":55614,"./process-release":75344,"./process-release.js":75344,"./rebuild":64187,"./rebuild.js":64187,"./remove":13103,"./remove.js":13103,"./util":55690,"./util.js":55690};function i(e){var t=s(e);return r(t)}function s(e){if(!r.o(n,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return n[e]}i.keys=function(){return Object.keys(n)},i.resolve=s,e.exports=i,i.id=70910},84679:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=84679,e.exports=t},72869:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=72869,e.exports=t},12937:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=12937,e.exports=t},84397:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=84397,e.exports=t},54529:e=>{"use strict";e.exports=require("@opentelemetry/tracing")},85767:e=>{"use strict";e.exports=require("@sap/cds")},32220:e=>{"use strict";e.exports=require("applicationinsights-native-metrics")},43241:e=>{"use strict";e.exports=require("esprima")},74602:e=>{"use strict";e.exports=require("keytar")},66828:e=>{"use strict";e.exports=require("vscode")},39491:e=>{"use strict";e.exports=require("assert")},50852:e=>{"use strict";e.exports=require("async_hooks")},14300:e=>{"use strict";e.exports=require("buffer")},32081:e=>{"use strict";e.exports=require("child_process")},96206:e=>{"use strict";e.exports=require("console")},22057:e=>{"use strict";e.exports=require("constants")},6113:e=>{"use strict";e.exports=require("crypto")},9523:e=>{"use strict";e.exports=require("dns")},82361:e=>{"use strict";e.exports=require("events")},57147:e=>{"use strict";e.exports=require("fs")},73292:e=>{"use strict";e.exports=require("fs/promises")},13685:e=>{"use strict";e.exports=require("http")},95687:e=>{"use strict";e.exports=require("https")},98188:e=>{"use strict";e.exports=require("module")},41808:e=>{"use strict";e.exports=require("net")},22037:e=>{"use strict";e.exports=require("os")},71017:e=>{"use strict";e.exports=require("path")},77282:e=>{"use strict";e.exports=require("process")},85477:e=>{"use strict";e.exports=require("punycode")},63477:e=>{"use strict";e.exports=require("querystring")},14521:e=>{"use strict";e.exports=require("readline")},12781:e=>{"use strict";e.exports=require("stream")},71576:e=>{"use strict";e.exports=require("string_decoder")},39512:e=>{"use strict";e.exports=require("timers")},24404:e=>{"use strict";e.exports=require("tls")},76224:e=>{"use strict";e.exports=require("tty")},57310:e=>{"use strict";e.exports=require("url")},73837:e=>{"use strict";e.exports=require("util")},26144:e=>{"use strict";e.exports=require("vm")},59796:e=>{"use strict";e.exports=require("zlib")},69645:e=>{"use strict";e.exports={}}},n={};function i(e){var t=n[e];if(void 0!==t)return t.exports;var s=n[e]={id:e,loaded:!1,exports:{}};return r[e].call(s.exports,s,s.exports,i),s.loaded=!0,s.exports}i.m=r,i.c=n,i.x=()=>{var e=i.O(void 0,[712,784,916,439,705,475,763,689,2],(()=>i(i.s=54338)));return e=i.O(e)},e=[],i.O=(t,r,n,s)=>{if(!r){var o=1/0;for(d=0;d<e.length;d++){for(var[r,n,s]=e[d],a=!0,u=0;u<r.length;u++)(!1&s||o>=s)&&Object.keys(i.O).every((e=>i.O[e](r[u])))?r.splice(u--,1):(a=!1,s<o&&(o=s));if(a){e.splice(d--,1);var c=n();void 0!==c&&(t=c)}}return t}s=s||0;for(var d=e.length;d>0&&e[d-1][2]>s;d--)e[d]=e[d-1];e[d]=[r,n,s]},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((t,r)=>(i.f[r](e,t),t)),[])),i.u=e=>({2:"project-generator/app",439:"ui5-application-writer/dist",475:"tools-suite-common-libs",689:"ux-service-inquirer",705:"fiori-freestyle-writer/dist",712:"commonlibs",763:"app-gen-shared",784:"open-ux-shared",916:"odata-service-writer/dist"}[e]+"/index.js"),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),i.j=673,i.p="",(()=>{var e={673:1,190:1,815:1};i.O.require=t=>e[t];i.f.require=(t,r)=>{e[t]||(t=>{var r=t.modules,n=t.ids,s=t.runtime;for(var o in r)i.o(r,o)&&(i.m[o]=r[o]);s&&s(i);for(var a=0;a<n.length;a++)e[n[a]]=1;i.O()})(require("../"+i.u(t)))}})(),t=i.x,i.x=()=>(i.e(712),i.e(784),i.e(916),i.e(439),i.e(705),i.e(475),i.e(763),i.e(689),i.e(2),t());var s=i.x();module.exports=s})(); | ||
(()=>{var e,t,r={51617:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=51617,e.exports=t},39973:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=39973,e.exports=t},20230:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=20230,e.exports=t},20545:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=20545,e.exports=t},4297:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=4297,e.exports=t},75601:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=75601,e.exports=t},82626:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=82626,e.exports=t},37974:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=37974,e.exports=t},85858:(e,t,r)=>{var n={"./cat":43112,"./cat.js":43112,"./cd":86698,"./cd.js":86698,"./chmod":23986,"./chmod.js":23986,"./common":96816,"./common.js":96816,"./cp":80610,"./cp.js":80610,"./dirs":91972,"./dirs.js":91972,"./echo":16166,"./echo.js":16166,"./error":80609,"./error.js":80609,"./exec":52024,"./exec-child":69911,"./exec-child.js":69911,"./exec.js":52024,"./find":22261,"./find.js":22261,"./grep":56818,"./grep.js":56818,"./head":66412,"./head.js":66412,"./ln":91247,"./ln.js":91247,"./ls":5815,"./ls.js":5815,"./mkdir":70098,"./mkdir.js":70098,"./mv":74164,"./mv.js":74164,"./popd":99851,"./popd.js":99851,"./pushd":6978,"./pushd.js":6978,"./pwd":24044,"./pwd.js":24044,"./rm":44256,"./rm.js":44256,"./sed":43422,"./sed.js":43422,"./set":17444,"./set.js":17444,"./sort":53033,"./sort.js":53033,"./tail":50318,"./tail.js":50318,"./tempdir":16275,"./tempdir.js":16275,"./test":50021,"./test.js":50021,"./to":44915,"./to.js":44915,"./toEnd":13326,"./toEnd.js":13326,"./touch":57650,"./touch.js":57650,"./uniq":63019,"./uniq.js":63019,"./which":5483,"./which.js":5483};function i(e){var t=s(e);return r(t)}function s(e){if(!r.o(n,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return n[e]}i.keys=function(){return Object.keys(n)},i.resolve=s,e.exports=i,i.id=85858},59896:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,s){function o(e){try{u(n.next(e))}catch(e){s(e)}}function a(e){try{u(n.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,a)}u((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.checkCdsUi5PluginEnabled=t.enableCdsUi5Plugin=t.satisfiesMinCdsVersion=void 0;const i=r(71017),s=r(5407),o=r(84659),a=r(21832);var u=r(21832);Object.defineProperty(t,"satisfiesMinCdsVersion",{enumerable:!0,get:function(){return u.satisfiesMinCdsVersion}}),t.enableCdsUi5Plugin=function(e,t){var r;return n(this,void 0,void 0,(function*(){t||(t=(0,o.create)((0,s.create)()));const n=(0,i.join)(e,"package.json"),u=null!==(r=t.readJSON(n))&&void 0!==r?r:{};return(0,a.ensureMinCdsVersion)(u),yield(0,a.enableWorkspaces)(e,u),(0,a.addCdsPluginUi5)(u),t.writeJSON(n,u),t}))},t.checkCdsUi5PluginEnabled=function(e,t){return n(this,void 0,void 0,(function*(){t||(t=(0,o.create)((0,s.create)()));const r=(0,i.join)(e,"package.json");if(!t.exists(r))return!1;const n=t.readJSON(r),{workspaceEnabled:u}=yield(0,a.getWorkspaceInfo)(e,n);return(0,a.hasMinCdsVersion)(n)&&u&&(0,a.hasCdsPluginUi5)(n)}))}},21832:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,s){function o(e){try{u(n.next(e))}catch(e){s(e)}}function a(e){try{u(n.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,a)}u((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.hasCdsPluginUi5=t.getWorkspaceInfo=t.satisfiesMinCdsVersion=t.hasMinCdsVersion=t.addCdsPluginUi5=t.enableWorkspaces=t.ensureMinCdsVersion=void 0;const i=r(76027),s=r(9949),o="6.8.2";function a(e){var t,r;return(0,i.gte)(null!==(r=(0,i.coerce)(null===(t=e.dependencies)||void 0===t?void 0:t["@sap/cds"]))&&void 0!==r?r:"0.0.0",o)}function u(e,t){var r;return n(this,void 0,void 0,(function*(){const n=yield(0,s.getCapCustomPaths)(e),i=n.app.endsWith("/")?`${n.app}*`:`${n.app}/*`;return{appWorkspace:i,workspaceEnabled:(null!==(r=c(t))&&void 0!==r?r:[]).includes(i)}}))}function c(e){var t,r;let n;return Array.isArray(e.workspaces)?n=e.workspaces:Array.isArray(null===(t=e.workspaces)||void 0===t?void 0:t.packages)&&(n=null===(r=e.workspaces)||void 0===r?void 0:r.packages),n}function d(e){var t;return!!(null===(t=e.devDependencies)||void 0===t?void 0:t["cds-plugin-ui5"])}t.ensureMinCdsVersion=function(e){var t;a(e)||(null!==(t=e.dependencies)&&void 0!==t||(e.dependencies={}),e.dependencies["@sap/cds"]="^6.8.2")},t.enableWorkspaces=function(e,t){var r;return n(this,void 0,void 0,(function*(){const{appWorkspace:n,workspaceEnabled:i}=yield u(e,t);if(i)return;let s=c(t);s||(null!==(r=t.workspaces)&&void 0!==r||(t.workspaces=[]),Array.isArray(t.workspaces)?s=t.workspaces:(t.workspaces.packages=[],s=t.workspaces.packages)),s.push(n)}))},t.addCdsPluginUi5=function(e){var t;d(e)||(null!==(t=e.devDependencies)&&void 0!==t||(e.devDependencies={}),e.devDependencies["cds-plugin-ui5"]="^0.6.13")},t.hasMinCdsVersion=a,t.satisfiesMinCdsVersion=function(e){var t,r;return a(e)||(0,i.satisfies)(o,null!==(r=null===(t=e.dependencies)||void 0===t?void 0:t["@sap/cds"])&&void 0!==r?r:"0.0.0")},t.getWorkspaceInfo=u,t.hasCdsPluginUi5=d},49339:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.satisfiesMinCdsVersion=t.enableCdsUi5Plugin=t.checkCdsUi5PluginEnabled=void 0;var n=r(59896);Object.defineProperty(t,"checkCdsUi5PluginEnabled",{enumerable:!0,get:function(){return n.checkCdsUi5PluginEnabled}}),Object.defineProperty(t,"enableCdsUi5Plugin",{enumerable:!0,get:function(){return n.enableCdsUi5Plugin}}),Object.defineProperty(t,"satisfiesMinCdsVersion",{enumerable:!0,get:function(){return n.satisfiesMinCdsVersion}})},85513:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(81836),t)},81836:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ProjectInquirer=void 0;const i=r(59390),s=r(1628),o=r(11115),a=r(56470),u=r(48191),c=n(r(66544)),{mainQuestions:d,advancedQuestions:l}=s.FioriGeneratorPromptNames.projectAttributes;t.ProjectInquirer=class ProjectInquirer{async inquire(e,{...t},r){const n=[],c=await(0,u.getUI5VersionChoices)(t.minSupportedUI5Version),l=await(0,i.getSapSystemUI5Version)(t.host),p=(0,a.findUI5VersionChoice)(l,c),f=t.promptSettings;return n.push(...(0,s.withExtensions)((0,o.getMainQuestions)(r,!!t.capService,!f?.[d.ui5Version]?.hide&&c,p,f),t.extensions)),n.push({type:"confirm",name:"showAdvanced",message:(0,s.t)("ADVANCED_CONFIGURE_MESSAGE"),guiOptions:{hint:(0,s.t)("TOOLTIP_ADVANCED_CONFIG")},default:!1}),n.push(...(0,s.withExtensions)((0,s.withCondition)((0,o.getAdvancedQuestions)(c,t.capService,f),(e=>e.showAdvanced)),t.extensions)),this.answersToProject(await e(n),t)}async answersToProject(e,{isV4:t=!1,promptSettings:r,extensions:n}){const s=e?.ui5Version,o=(await(0,i.retrieveUI5Versions)({fioriElementsVersion:t?"v4":"v2",onlyVersionNumbers:!0,onlyNpmVersion:!0,ui5SelectedVersion:s??"Latest"}))[0],a={name:e?.name||r?.[d.name]?.value,description:e?.description,title:e?.title,namespace:e?.namespace,targetFolder:e?.targetFolder||r?.[d.targetFolder]?.value,ui5Version:s||o,addDeployConfig:e?.addDeployConfig,addFlpConfig:e?.addFlpConfig,sapux:!0,localUI5Version:o,ui5Theme:e?.ui5Theme,enableEslint:e?.enableEslint,enableCodeAssist:e?.enableCodeAssist,skipAnnotations:e?.skipAnnotations,enableNPMWorkspaces:e?.enableNPMWorkspaces,enableTypeScript:e?.enableTypeScript};return e?.showAdvanced||Object.assign(a,await this.getAdvancedDefaults(a,n)),a}async getAdvancedDefaults(e,t){let r={};t&&(r=await this.getExtensionDefaults(t,e));return{ui5Theme:e.ui5Theme||r.ui5Theme||(0,i.getDefaultTheme)(e.ui5Version),enableEslint:e.enableEslint||r.enableEslint||s.DEFAULT_PROJECT_ATTRIBUTES.enableCodeAssist,enableCodeAssist:e.enableCodeAssist||r.enableCodeAssist||s.DEFAULT_PROJECT_ATTRIBUTES.enableCodeAssist,skipAnnotations:e.skipAnnotations||r.skipAnnotations||s.DEFAULT_PROJECT_ATTRIBUTES.skipAnnotations,enableNPMWorkspaces:e.enableNPMWorkspaces,enableTypeScript:e.enableTypeScript||r.enableTypeScript||s.DEFAULT_PROJECT_ATTRIBUTES.enableTypeScript}}async getExtensionDefaults(e,t){const r=Object.values(l),n={};for await(const i of r)if(!(0,c.default)(e[i]?.default)){const r="function"==typeof e[i].default?await e[i].default(t):e[i].default;Object.assign(n,{[i]:r})}return n}}},40335:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAdvancedQuestions=void 0;const n=r(1628),i=r(59390),s=r(48191),o=n.FioriGeneratorPromptNames.projectAttributes.advancedQuestions;t.getAdvancedQuestions=function(e,t,r){let a;const u=[];return u.push({type:"list",name:o.ui5Theme,message:(0,n.t)("LABEL_UI5_THEME"),guiOptions:{applyDefaultWhenDirty:!0,breadcrumb:(0,n.breadcrumbHelper)()},choices:({ui5Version:e="Latest"})=>(a=(0,s.getFilterThemesChoices)(e),a),default:({ui5Theme:e,ui5Version:t})=>(e||(e=(0,i.getDefaultTheme)(t)),e)}),t||r?.[o.enableEslint]?.hide||u.push({type:"confirm",name:o.enableEslint,message:(0,n.t)("ENABLE_ESLINT"),default:r?.[o.enableEslint]?.value??n.DEFAULT_PROJECT_ATTRIBUTES[o.enableEslint],guiOptions:{breadcrumb:(0,n.breadcrumbHelper)((0,n.t)("LABEL_ESLINT_ENABLED_BREADCRUMB"))}}),r?.[o.enableCodeAssist]?.hide||u.push({when:t=>{const r=e.map((e=>e.version.semantic));return(0,i.uI5VersionsWithCodeAssist)(r,t?.ui5Version||"Latest")},type:"confirm",name:o.enableCodeAssist,message:(0,n.t)("ENABLE_CODE_ASSIST_MESSAGE"),default:r?.[o.enableCodeAssist]?.value??n.DEFAULT_PROJECT_ATTRIBUTES[o.enableCodeAssist],guiOptions:{breadcrumb:(0,n.breadcrumbHelper)((0,n.t)("LABEL_CODE_ASSIST_ENABLED_BREADCRUMB"))}}),r?.[o.skipAnnotations]?.hide||u.push({type:"confirm",name:o.skipAnnotations,message:(0,n.t)("SKIP_ANNOTATIONS"),default:r?.[o.skipAnnotations]?.value??n.DEFAULT_PROJECT_ATTRIBUTES[o.skipAnnotations],guiOptions:{breadcrumb:(0,n.breadcrumbHelper)((0,n.t)("LABEL_SKIP_ANNOTATIONS_BREADCRUMB"))}}),u.push({when:()=>t?.capType===n.CapType.NODE_JS&&((0,s.checkHasCdsMinVersion)(t.projectPath)&&!t.cdsUI5PluginEnabled),type:"confirm",name:"enableNPMWorkspaces",message:(0,n.t)("ENABLE_NPM_WORKSPACES"),default:!1,guiOptions:{breadcrumb:(0,n.breadcrumbHelper)((0,n.t)("LABEL_ENABLE_NPM_WORKSPACES_BREADCRUMB"))}}),r?.[o.enableTypeScript]?.hide||u.push({when:e=>!t||t.capType===n.CapType.NODE_JS&&(t.cdsUI5PluginEnabled||e?.enableNPMWorkspaces),type:"confirm",name:o.enableTypeScript,message:(0,n.t)("ENABLE_TYPESCRIPT"),default:r?.[o.enableTypeScript]?.value??n.DEFAULT_PROJECT_ATTRIBUTES[o.enableTypeScript],guiOptions:{breadcrumb:(0,n.breadcrumbHelper)((0,n.t)("LABEL_ENABLE_TYPESCRIPT_BREADCRUMB"))}}),u}},57286:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(40335),t)},48191:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.checkHasCdsMinVersion=t.ui5VersionsGrouped=t.getFilterThemesChoices=t.getUI5VersionChoices=void 0;const i=r(59390),s=r(1628),o=n(r(85715)),a=r(5407),u=r(84659),c=r(49339),d=r(71017);t.getUI5VersionChoices=async function(e){const t={includeSnapshots:!1,minSupportedUI5Version:e,useCache:!0,removeDuplicateVersions:!0,groupUI5Versions:!0};return(0,i.getUI5VersionsEnhanced)(t)},t.getFilterThemesChoices=function(e){return(0,i.getUi5Themes)(e).map((e=>({value:e.themeid,name:e.label})))},t.ui5VersionsGrouped=function(e){return e?(0,s.getPlatform)()===s.PLATFORMS.CLI?[...e.filter((e=>(!0===e.version.maintained&&(e.name=`${e.name} - (${(0,s.t)("MAINTAINED")} ${(0,s.t)("VERSION",{count:1})})`),!0===e.version.maintained))),...e.filter((e=>(!1===e.version.maintained&&(e.name=`${e.name} - (${(0,s.t)("OUT_OF_MAINTENANCE")} ${(0,s.t)("VERSION",{count:1})})`),!1===e.version.maintained)))]:[new o.default.Separator(`${(0,s.t)("MAINTAINED")} ${(0,s.t)("VERSION",{count:0})}`),...e.filter((e=>!0===e.version.maintained)),new o.default.Separator(`${(0,s.t)("OUT_OF_MAINTENANCE")} ${(0,s.t)("VERSION",{count:0})}`),...e.filter((e=>!1===e.version.maintained))]:[]},t.checkHasCdsMinVersion=function(e,t){t||(t=(0,u.create)((0,a.create)()));const r=(0,d.join)(e,"package.json");if(!t.exists(r))return!1;const n=t.readJSON(r);return(0,c.satisfiesMinCdsVersion)(n)}},11115:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(57286),t),i(r(37520),t)},66528:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultProjectName=t.defaultDescription=t.defaultTargetFolder=t.defaultUi5Version=void 0;const n=r(1628);t.defaultUi5Version=function(e,t,r){return e?.value||t?.value||r?.value},t.defaultTargetFolder=function(e,t){return e||t||process.cwd()},t.defaultDescription=function(e){return e||(0,n.t)("DEFAULT_PROJECT_DESCRIPTION")},t.defaultProjectName=function(e){let t=n.defaultProjectNumber,r=(0,n.t)("DEFAULT_PROJECT_NAME");for(;(0,n.applicationExists)(`${r}`,e)&&(r=(0,n.t)("DEFAULT_PROJECT_NAME",{defaultProjectNumber:++t}),!(t>99)););return r}},37520:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(89225),t)},89225:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getMainQuestions=void 0;const n=r(1628),i=r(66528),s=n.FioriGeneratorPromptNames.projectAttributes.mainQuestions;t.getMainQuestions=function(e,t,r,o,a){const u=(0,n.breadcrumbHelper)(),c=a?.[s.name]?.value,d=a?.[s.targetFolder]?.value,l=(0,n.ui5VersionsGrouped)(r);let p=[];return a?.[s.name]?.hide||p.push({type:"input",guiOptions:{applyDefaultWhenDirty:!0,hint:(0,n.t)("TOOLTIP_PROJECT_NAME"),mandatory:!0,breadcrumb:u},name:s.name,message:(0,n.t)("PROJECT_NAME_MESSAGE"),default:e=>e.name||c||(0,i.defaultProjectName)(d),validate:e=>(0,n.getPlatform)()===n.PLATFORMS.CLI||t?(0,n.validateProjectName)(d,e):(0,n.validateModuleName)(e)}),p=p.concat([{type:"input",guiOptions:{hint:(0,n.t)("TOOLTIP_PROJECT_TITLE"),breadcrumb:u},name:s.title,message:(0,n.t)("PROJECT_TITLE_MESSAGE"),default:e=>e.title||(0,n.t)("DEFAULT_PROJECT_TITLE")},{type:"input",guiOptions:{hint:(0,n.t)("TOOLTIP_PROJECT_NAMESPACE"),breadcrumb:u},name:s.namespace,message:(0,n.t)("PROJECT_NAMESPACE_MESSAGE"),default:e=>e.namespace||"",validate:(e,t)=>(0,n.validateNamespace)(e,t.name||c)},{type:"input",name:s.description,guiOptions:{hint:(0,n.t)("TOOLTIP_PROJECT_DESCRIPTION"),breadcrumb:u},message:(0,n.t)("PROJECT_DESCRIPTION_MESSAGE"),default:e=>(0,i.defaultDescription)(e.description)}]),a?.[s.targetFolder]?.hide||t||p.push({type:"input",name:s.targetFolder,message:(0,n.t)("CHOOSE_PROJECT_FOLDER_MESSAGE"),guiType:"folder-browser",guiOptions:{applyDefaultWhenDirty:!0,mandatory:!0,breadcrumb:(0,n.breadcrumbHelper)((0,n.t)("LABEL_PROJECT_PATH_BREADCRUMB"))},default:e=>(0,i.defaultTargetFolder)(e.targetFolder,d),validate:(e,{name:t})=>{if(t?.length>2)return(0,n.validateProjectFolder)(e,t)}}),p=p.concat([{when:()=>!!r,type:(0,n.getPlatform)()===n.PLATFORMS.CLI?"autocomplete":"list",name:s.ui5Version,guiOptions:{hint:(0,n.t)("TOOLTIP_UI5_VERSION"),breadcrumb:(0,n.breadcrumbHelper)((0,n.t)("LABEL_UI5_VERSION_BREADCRUMB"))},message:(0,n.t)("LABEL_UI5_VERSION"),choices:()=>l,source:(e,t)=>(0,n.searchChoices)(t,l),default:e=>(0,i.defaultUi5Version)(r.find((t=>t.value===e?.ui5Version)),o,r.find((e=>!0===e.version.default)))}]),a?.[s.addDeployConfig]?.hide||p.push({type:"confirm",name:s.addDeployConfig,guiOptions:{breadcrumb:(0,n.breadcrumbHelper)((0,n.t)("LABEL_DEPLOY_CONFIG_BREADCRUMB"))},message:async e=>{const t=await(0,n.validateMtaPath)(e.targetFolder||d);return t?(0,n.t)("ADD_TO_MTA_QUESTION",{path:t,interpolation:{escapeValue:!1}}):(0,n.t)("ADD_DEPLOYMENT_CONFIG_QUESTION")},when:async e=>!t||t&&await(0,n.validateMtaPath)(e?.targetFolder||d)||!1,default:async e=>!!await(0,n.validateMtaPath)(e?.targetFolder||d),validate:t=>(0,n.validateNextStep)(t,e,(0,n.t)("DEPLOYMENT_CONFIG"))}),a?.[s.addFlpConfig]?.hide||p.push({type:"confirm",name:s.addFlpConfig,guiOptions:{breadcrumb:(0,n.breadcrumbHelper)((0,n.t)("LABEL_FLP_CONFIG_BREADCRUMB"))},message:()=>(0,n.t)("ADD_FLP_CONFIG_QUESTION"),default:!1,validate:t=>(0,n.validateNextStep)(t,e,(0,n.t)("FLP_CONFIG"))}),p}},56470:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.findUI5VersionChoice=void 0;const i=n(r(76027));t.findUI5VersionChoice=function(e,t){const r="(Source system version)";if(e&&i.default.valid(e))return t.find((t=>{const n=function(e,t){try{const r=e.toLowerCase()===t.toLowerCase(),n=e.toLowerCase().includes("snapshot")&&t.toLowerCase().includes("snapshot")&&i.default.eq(i.default.coerce(e),i.default.coerce(t));return r||n}catch{return!1}}(t.version.semantic,e);return n&&!t.name.endsWith(r)&&(t.name=`${t.name} ${r}`),n}))}},34409:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=34409,e.exports=t},70910:(e,t,r)=>{var n={"./Find-VisualStudio.cs":20183,"./build":17724,"./build.js":17724,"./clean":1658,"./clean.js":1658,"./configure":4748,"./configure.js":4748,"./create-config-gypi":98395,"./create-config-gypi.js":98395,"./find-node-directory":24159,"./find-node-directory.js":24159,"./find-python":29130,"./find-python.js":29130,"./find-visualstudio":17703,"./find-visualstudio.js":17703,"./install":25925,"./install.js":25925,"./list":44179,"./list.js":44179,"./node-gyp":55614,"./node-gyp.js":55614,"./process-release":75344,"./process-release.js":75344,"./rebuild":64187,"./rebuild.js":64187,"./remove":13103,"./remove.js":13103,"./util":55690,"./util.js":55690};function i(e){var t=s(e);return r(t)}function s(e){if(!r.o(n,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return n[e]}i.keys=function(){return Object.keys(n)},i.resolve=s,e.exports=i,i.id=70910},84679:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=84679,e.exports=t},72869:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=72869,e.exports=t},12937:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=12937,e.exports=t},84397:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=84397,e.exports=t},54529:e=>{"use strict";e.exports=require("@opentelemetry/tracing")},85767:e=>{"use strict";e.exports=require("@sap/cds")},32220:e=>{"use strict";e.exports=require("applicationinsights-native-metrics")},43241:e=>{"use strict";e.exports=require("esprima")},74602:e=>{"use strict";e.exports=require("keytar")},66828:e=>{"use strict";e.exports=require("vscode")},39491:e=>{"use strict";e.exports=require("assert")},50852:e=>{"use strict";e.exports=require("async_hooks")},14300:e=>{"use strict";e.exports=require("buffer")},32081:e=>{"use strict";e.exports=require("child_process")},96206:e=>{"use strict";e.exports=require("console")},22057:e=>{"use strict";e.exports=require("constants")},6113:e=>{"use strict";e.exports=require("crypto")},9523:e=>{"use strict";e.exports=require("dns")},82361:e=>{"use strict";e.exports=require("events")},57147:e=>{"use strict";e.exports=require("fs")},73292:e=>{"use strict";e.exports=require("fs/promises")},13685:e=>{"use strict";e.exports=require("http")},95687:e=>{"use strict";e.exports=require("https")},98188:e=>{"use strict";e.exports=require("module")},41808:e=>{"use strict";e.exports=require("net")},22037:e=>{"use strict";e.exports=require("os")},71017:e=>{"use strict";e.exports=require("path")},77282:e=>{"use strict";e.exports=require("process")},85477:e=>{"use strict";e.exports=require("punycode")},63477:e=>{"use strict";e.exports=require("querystring")},14521:e=>{"use strict";e.exports=require("readline")},12781:e=>{"use strict";e.exports=require("stream")},71576:e=>{"use strict";e.exports=require("string_decoder")},39512:e=>{"use strict";e.exports=require("timers")},24404:e=>{"use strict";e.exports=require("tls")},76224:e=>{"use strict";e.exports=require("tty")},57310:e=>{"use strict";e.exports=require("url")},73837:e=>{"use strict";e.exports=require("util")},26144:e=>{"use strict";e.exports=require("vm")},59796:e=>{"use strict";e.exports=require("zlib")},69645:e=>{"use strict";e.exports={}}},n={};function i(e){var t=n[e];if(void 0!==t)return t.exports;var s=n[e]={id:e,loaded:!1,exports:{}};return r[e].call(s.exports,s,s.exports,i),s.loaded=!0,s.exports}i.m=r,i.c=n,i.x=()=>{var e=i.O(void 0,[712,784,916,439,705,475,763,689,2],(()=>i(i.s=54338)));return e=i.O(e)},e=[],i.O=(t,r,n,s)=>{if(!r){var o=1/0;for(d=0;d<e.length;d++){for(var[r,n,s]=e[d],a=!0,u=0;u<r.length;u++)(!1&s||o>=s)&&Object.keys(i.O).every((e=>i.O[e](r[u])))?r.splice(u--,1):(a=!1,s<o&&(o=s));if(a){e.splice(d--,1);var c=n();void 0!==c&&(t=c)}}return t}s=s||0;for(var d=e.length;d>0&&e[d-1][2]>s;d--)e[d]=e[d-1];e[d]=[r,n,s]},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((t,r)=>(i.f[r](e,t),t)),[])),i.u=e=>({2:"project-generator/app",439:"ui5-application-writer/dist",475:"tools-suite-common-libs",689:"ux-service-inquirer",705:"fiori-freestyle-writer/dist",712:"commonlibs",763:"app-gen-shared",784:"open-ux-shared",916:"odata-service-writer/dist"}[e]+"/index.js"),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),i.j=673,i.p="",(()=>{var e={673:1,190:1,815:1};i.O.require=t=>e[t];i.f.require=(t,r)=>{e[t]||(t=>{var r=t.modules,n=t.ids,s=t.runtime;for(var o in r)i.o(r,o)&&(i.m[o]=r[o]);s&&s(i);for(var a=0;a<n.length;a++)e[n[a]]=1;i.O()})(require("../"+i.u(t)))}})(),t=i.x,i.x=()=>(i.e(712),i.e(784),i.e(916),i.e(439),i.e(705),i.e(475),i.e(763),i.e(689),i.e(2),t());var s=i.x();module.exports=s})(); |
@@ -1,1 +0,1 @@ | ||
"use strict";exports.id=705,exports.ids=[705],exports.modules={88446:function(e,t,n){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.escapeFLPText=t.setDefaults=void 0;const o=i(n(50283)),a=n(82355);t.setDefaults=function(e){var t,n,i,r,s;if((r=e.app).baseComponent=r.baseComponent||"sap/ui/core/UIComponent",r.flpAppId=r.flpAppId||`${r.id.replace(/[-_.]/g,"")}-tile`,!(null===(t=e.app.sourceTemplate)||void 0===t?void 0:t.version)||!(null===(n=e.app.sourceTemplate)||void 0===n?void 0:n.id)){const t=o.default.sync({cwd:__dirname});e.app.sourceTemplate={id:`${null==t?void 0:t.packageJson.name}:${e.template.type}`,version:null==t?void 0:t.packageJson.version,toolsId:null===(i=e.app.sourceTemplate)||void 0===i?void 0:i.toolsId}}e.template.type===a.TemplateType.Basic&&((s=e.template.settings).viewName=s.viewName||"View1"),e.appOptions=Object.assign({loadReuseLibs:!0},e.appOptions)};t.escapeFLPText=e=>e.replace(/\\/g,"\\\\").replace(/(")/g,"\\$&")},52175:function(e,t,n){var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(o,a){function r(e){try{l(i.next(e))}catch(e){a(e)}}function s(e){try{l(i.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,s)}l((i=i.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.t=t.initI18n=void 0;const a=o(n(52137)),r=o(n(10516)),s="fiori-freestyle-writer";function l(){return i(this,void 0,void 0,(function*(){yield a.default.init({resources:{en:{[s]:r.default}},lng:"en",fallbackLng:"en",defaultNS:s,ns:[s]})}))}t.initI18n=l,t.t=function(e,t){return a.default.t(e,t)},l().catch((()=>{}))},24107:function(e,t,n){var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(o,a){function r(e){try{l(i.next(e))}catch(e){a(e)}}function s(e){try{l(i.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,s)}l((i=i.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.OdataVersion=t.TemplateType=t.generate=void 0;const a=n(71017),r=n(69288),s=n(3905),l=n(28923),p=n(51847),c=o(n(28869)),d=n(82355),u=n(88446),f=n(35233);t.generate=function(e,t,n){var o,v,m,y,g,h,O;return i(this,void 0,void 0,(function*(){const i=(0,c.default)(t);(0,u.setDefaults)(i);const j=null===(o=i.appOptions)||void 0===o?void 0:o.typescript;n=yield(0,s.generate)(e,i,n);const T=(0,a.join)(__dirname,"..","templates"),_=[j?"**/*.js":"**/*.ts"];if(n.copyTpl((0,a.join)(T,"common","add"),e,Object.assign(Object.assign({},i),{escapeFLPText:u.escapeFLPText}),void 0,{globOptions:{ignore:_,dot:!0}}),n.copyTpl((0,a.join)(T,i.template.type,"add"),e,i,void 0,{globOptions:{ignore:_,dot:!0}}),i.template.type===d.TemplateType.Basic){const t=i.template.settings.viewName,o=(0,a.join)(e,"webapp","view",`${t}.view.xml`);n.copyTpl((0,a.join)(T,i.template.type,"custom/View.xml"),o,i);const r=j?"ts":"js",s=(0,a.join)(e,`webapp/controller/${t}.controller.${r}`);n.copyTpl((0,a.join)(T,i.template.type,`custom/Controller.${r}`),s,i)}const w=(0,a.join)(e,"webapp","manifest.json"),b=(0,a.join)(__dirname,"..","templates",i.template.type,"extend","webapp");n.extendJSON(w,JSON.parse((0,r.render)(n.read((0,a.join)(b,"manifest.json")),i,{}))),n.append((0,a.join)(e,"webapp","i18n","i18n.properties"),(0,r.render)(n.read((0,a.join)(b,"i18n","i18n.properties")),i,{}));const x=(0,a.join)(e,"package.json");n.extendJSON(x,JSON.parse((0,r.render)(n.read((0,a.join)(T,"common","extend","package.json")),i,{})));const k=JSON.parse(n.read(x));if(k.scripts=Object.assign(Object.assign({},k.scripts),(0,p.getPackageJsonTasks)({localOnly:!!i.service&&!(null===(v=i.service)||void 0===v?void 0:v.url),addMock:!!(null===(m=i.service)||void 0===m?void 0:m.metadata),sapClient:null===(y=i.service)||void 0===y?void 0:y.client,flpAppId:i.app.flpAppId,startFile:null===(g=null==t?void 0:t.app)||void 0===g?void 0:g.startFile,localStartFile:null===(h=null==t?void 0:t.app)||void 0===h?void 0:h.localStartFile,generateIndex:null===(O=i.appOptions)||void 0===O?void 0:O.generateIndex})),n.writeJSON(x,k),i.service)yield(0,l.generate)(e,i.service,n);else{const t=(0,a.join)(e,"ui5-local.yaml"),i=yield f.UI5Config.newInstance(n.read(t));i.addFioriToolsProxydMiddleware({}),n.write(t,i.toString())}return n}))};var v=n(82355);Object.defineProperty(t,"TemplateType",{enumerable:!0,get:function(){return v.TemplateType}}),Object.defineProperty(t,"OdataVersion",{enumerable:!0,get:function(){return v.OdataVersion}})},51847:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getPackageJsonTasks=void 0;const i=n(52175);t.getPackageJsonTasks=function({localOnly:e,addMock:t=!0,sapClient:n,flpAppId:o="",startFile:a,localStartFile:r,generateIndex:s=!0}){const l=[];n&&l.push(["sap-client",`${n}`]),l.push(["sap-ui-xx-viewCache","false"]);let p=new URLSearchParams(l).toString();p=p?`?${p}`:"";const c=`${p}${o?`#${o}`:""}`,d={start:e?`echo \\"${(0,i.t)("info.mockOnlyWarning")}\\"`:`fiori run --open "${a||"test/flpSandbox.html"}${c}"`,"start-local":`fiori run --config ./ui5-local.yaml --open "${r||"test/flpSandbox.html"}${c}"`};return s&&(d["start-noflp"]=e?`echo \\"${(0,i.t)("info.mockOnlyWarning")}\\"`:`fiori run --open "index.html${p}"`),t&&(d["start-mock"]=`fiori run --config ./ui5-mock.yaml --open "test/flpSandbox.html${c}"`),d}},82355:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OdataVersion=t.TemplateType=void 0,function(e){e.Basic="basic",e.Worklist="worklist",e.ListDetail="listdetail"}(t.TemplateType||(t.TemplateType={}));var i=n(28923);Object.defineProperty(t,"OdataVersion",{enumerable:!0,get:function(){return i.OdataVersion}})},10516:e=>{e.exports=JSON.parse('{"info":{"mockOnlyWarning":"This application was generated with a local metadata file and does not reference a live server. Please add the required server configuration or start this application with mock data using the target: npm run start-mock"}}')}}; | ||
"use strict";exports.id=705,exports.ids=[705],exports.modules={88446:function(e,t,n){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.escapeFLPText=t.setDefaults=void 0;const o=i(n(50283)),a=n(82355);t.setDefaults=function(e){var t,n,i,r,s;if((r=e.app).baseComponent=r.baseComponent||"sap/ui/core/UIComponent",r.flpAppId=r.flpAppId||`${r.id.replace(/[-_.]/g,"")}-tile`,!(null===(t=e.app.sourceTemplate)||void 0===t?void 0:t.version)||!(null===(n=e.app.sourceTemplate)||void 0===n?void 0:n.id)){const t=o.default.sync({cwd:__dirname});e.app.sourceTemplate={id:`${null==t?void 0:t.packageJson.name}:${e.template.type}`,version:null==t?void 0:t.packageJson.version,toolsId:null===(i=e.app.sourceTemplate)||void 0===i?void 0:i.toolsId}}e.template.type===a.TemplateType.Basic&&((s=e.template.settings).viewName=s.viewName||"View1"),e.appOptions=Object.assign({loadReuseLibs:!0},e.appOptions)};t.escapeFLPText=e=>e.replace(/\\/g,"\\\\").replace(/(")/g,"\\$&")},52175:function(e,t,n){var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(o,a){function r(e){try{l(i.next(e))}catch(e){a(e)}}function s(e){try{l(i.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,s)}l((i=i.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.t=t.initI18n=void 0;const a=o(n(52137)),r=o(n(10516)),s="fiori-freestyle-writer";function l(){return i(this,void 0,void 0,(function*(){yield a.default.init({resources:{en:{[s]:r.default}},lng:"en",fallbackLng:"en",defaultNS:s,ns:[s]})}))}t.initI18n=l,t.t=function(e,t){return a.default.t(e,t)},l().catch((()=>{}))},24107:function(e,t,n){var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(o,a){function r(e){try{l(i.next(e))}catch(e){a(e)}}function s(e){try{l(i.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,s)}l((i=i.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.OdataVersion=t.TemplateType=t.generate=void 0;const a=n(71017),r=n(69288),s=n(3905),l=n(28923),p=n(51847),c=o(n(28869)),d=n(82355),u=n(88446),f=n(50911);t.generate=function(e,t,n){var o,v,m,y,g,h,O;return i(this,void 0,void 0,(function*(){const i=(0,c.default)(t);(0,u.setDefaults)(i);const j=null===(o=i.appOptions)||void 0===o?void 0:o.typescript;n=yield(0,s.generate)(e,i,n);const T=(0,a.join)(__dirname,"..","templates"),_=[j?"**/*.js":"**/*.ts"];if(n.copyTpl((0,a.join)(T,"common","add"),e,Object.assign(Object.assign({},i),{escapeFLPText:u.escapeFLPText}),void 0,{globOptions:{ignore:_,dot:!0}}),n.copyTpl((0,a.join)(T,i.template.type,"add"),e,i,void 0,{globOptions:{ignore:_,dot:!0}}),i.template.type===d.TemplateType.Basic){const t=i.template.settings.viewName,o=(0,a.join)(e,"webapp","view",`${t}.view.xml`);n.copyTpl((0,a.join)(T,i.template.type,"custom/View.xml"),o,i);const r=j?"ts":"js",s=(0,a.join)(e,`webapp/controller/${t}.controller.${r}`);n.copyTpl((0,a.join)(T,i.template.type,`custom/Controller.${r}`),s,i)}const w=(0,a.join)(e,"webapp","manifest.json"),b=(0,a.join)(__dirname,"..","templates",i.template.type,"extend","webapp");n.extendJSON(w,JSON.parse((0,r.render)(n.read((0,a.join)(b,"manifest.json")),i,{}))),n.append((0,a.join)(e,"webapp","i18n","i18n.properties"),(0,r.render)(n.read((0,a.join)(b,"i18n","i18n.properties")),i,{}));const x=(0,a.join)(e,"package.json");n.extendJSON(x,JSON.parse((0,r.render)(n.read((0,a.join)(T,"common","extend","package.json")),i,{})));const k=JSON.parse(n.read(x));if(k.scripts=Object.assign(Object.assign({},k.scripts),(0,p.getPackageJsonTasks)({localOnly:!!i.service&&!(null===(v=i.service)||void 0===v?void 0:v.url),addMock:!!(null===(m=i.service)||void 0===m?void 0:m.metadata),sapClient:null===(y=i.service)||void 0===y?void 0:y.client,flpAppId:i.app.flpAppId,startFile:null===(g=null==t?void 0:t.app)||void 0===g?void 0:g.startFile,localStartFile:null===(h=null==t?void 0:t.app)||void 0===h?void 0:h.localStartFile,generateIndex:null===(O=i.appOptions)||void 0===O?void 0:O.generateIndex})),n.writeJSON(x,k),i.service)yield(0,l.generate)(e,i.service,n);else{const t=(0,a.join)(e,"ui5-local.yaml"),i=yield f.UI5Config.newInstance(n.read(t));i.addFioriToolsProxydMiddleware({}),n.write(t,i.toString())}return n}))};var v=n(82355);Object.defineProperty(t,"TemplateType",{enumerable:!0,get:function(){return v.TemplateType}}),Object.defineProperty(t,"OdataVersion",{enumerable:!0,get:function(){return v.OdataVersion}})},51847:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getPackageJsonTasks=void 0;const i=n(52175);t.getPackageJsonTasks=function({localOnly:e,addMock:t=!0,sapClient:n,flpAppId:o="",startFile:a,localStartFile:r,generateIndex:s=!0}){const l=[];n&&l.push(["sap-client",`${n}`]),l.push(["sap-ui-xx-viewCache","false"]);let p=new URLSearchParams(l).toString();p=p?`?${p}`:"";const c=`${p}${o?`#${o}`:""}`,d={start:e?`echo \\"${(0,i.t)("info.mockOnlyWarning")}\\"`:`fiori run --open "${a||"test/flpSandbox.html"}${c}"`,"start-local":`fiori run --config ./ui5-local.yaml --open "${r||"test/flpSandbox.html"}${c}"`};return s&&(d["start-noflp"]=e?`echo \\"${(0,i.t)("info.mockOnlyWarning")}\\"`:`fiori run --open "index.html${p}"`),t&&(d["start-mock"]=`fiori run --config ./ui5-mock.yaml --open "test/flpSandbox.html${c}"`),d}},82355:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OdataVersion=t.TemplateType=void 0,function(e){e.Basic="basic",e.Worklist="worklist",e.ListDetail="listdetail"}(t.TemplateType||(t.TemplateType={}));var i=n(28923);Object.defineProperty(t,"OdataVersion",{enumerable:!0,get:function(){return i.OdataVersion}})},10516:e=>{e.exports=JSON.parse('{"info":{"mockOnlyWarning":"This application was generated with a local metadata file and does not reference a live server. Please add the required server configuration or start this application with mock data using the target: npm run start-mock"}}')}}; |
@@ -1,1 +0,1 @@ | ||
(()=>{var e,t,r={51617:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=51617,e.exports=t},39973:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=39973,e.exports=t},20230:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=20230,e.exports=t},20545:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=20545,e.exports=t},4297:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=4297,e.exports=t},75601:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=75601,e.exports=t},82626:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=82626,e.exports=t},37974:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=37974,e.exports=t},85858:(e,t,r)=>{var n={"./cat":43112,"./cat.js":43112,"./cd":86698,"./cd.js":86698,"./chmod":23986,"./chmod.js":23986,"./common":96816,"./common.js":96816,"./cp":80610,"./cp.js":80610,"./dirs":91972,"./dirs.js":91972,"./echo":16166,"./echo.js":16166,"./error":80609,"./error.js":80609,"./exec":52024,"./exec-child":69911,"./exec-child.js":69911,"./exec.js":52024,"./find":22261,"./find.js":22261,"./grep":56818,"./grep.js":56818,"./head":66412,"./head.js":66412,"./ln":91247,"./ln.js":91247,"./ls":5815,"./ls.js":5815,"./mkdir":70098,"./mkdir.js":70098,"./mv":74164,"./mv.js":74164,"./popd":99851,"./popd.js":99851,"./pushd":6978,"./pushd.js":6978,"./pwd":24044,"./pwd.js":24044,"./rm":44256,"./rm.js":44256,"./sed":43422,"./sed.js":43422,"./set":17444,"./set.js":17444,"./sort":53033,"./sort.js":53033,"./tail":50318,"./tail.js":50318,"./tempdir":16275,"./tempdir.js":16275,"./test":50021,"./test.js":50021,"./to":44915,"./to.js":44915,"./toEnd":13326,"./toEnd.js":13326,"./touch":57650,"./touch.js":57650,"./uniq":63019,"./uniq.js":63019,"./which":5483,"./which.js":5483};function i(e){var t=s(e);return r(t)}function s(e){if(!r.o(n,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return n[e]}i.keys=function(){return Object.keys(n)},i.resolve=s,e.exports=i,i.id=85858},59896:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,s){function o(e){try{u(n.next(e))}catch(e){s(e)}}function a(e){try{u(n.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,a)}u((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.checkCdsUi5PluginEnabled=t.enableCdsUi5Plugin=t.satisfiesMinCdsVersion=void 0;const i=r(71017),s=r(5407),o=r(84659),a=r(21832);var u=r(21832);Object.defineProperty(t,"satisfiesMinCdsVersion",{enumerable:!0,get:function(){return u.satisfiesMinCdsVersion}}),t.enableCdsUi5Plugin=function(e,t){var r;return n(this,void 0,void 0,(function*(){t||(t=(0,o.create)((0,s.create)()));const n=(0,i.join)(e,"package.json"),u=null!==(r=t.readJSON(n))&&void 0!==r?r:{};return(0,a.ensureMinCdsVersion)(u),yield(0,a.enableWorkspaces)(e,u),(0,a.addCdsPluginUi5)(u),t.writeJSON(n,u),t}))},t.checkCdsUi5PluginEnabled=function(e,t){return n(this,void 0,void 0,(function*(){t||(t=(0,o.create)((0,s.create)()));const r=(0,i.join)(e,"package.json");if(!t.exists(r))return!1;const n=t.readJSON(r),{workspaceEnabled:u}=yield(0,a.getWorkspaceInfo)(e,n);return(0,a.hasMinCdsVersion)(n)&&u&&(0,a.hasCdsPluginUi5)(n)}))}},21832:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,s){function o(e){try{u(n.next(e))}catch(e){s(e)}}function a(e){try{u(n.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,a)}u((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.hasCdsPluginUi5=t.getWorkspaceInfo=t.satisfiesMinCdsVersion=t.hasMinCdsVersion=t.addCdsPluginUi5=t.enableWorkspaces=t.ensureMinCdsVersion=void 0;const i=r(76027),s=r(88536),o="6.8.2";function a(e){var t,r;return(0,i.gte)(null!==(r=(0,i.coerce)(null===(t=e.dependencies)||void 0===t?void 0:t["@sap/cds"]))&&void 0!==r?r:"0.0.0",o)}function u(e,t){var r;return n(this,void 0,void 0,(function*(){const n=yield(0,s.getCapCustomPaths)(e),i=n.app.endsWith("/")?`${n.app}*`:`${n.app}/*`;return{appWorkspace:i,workspaceEnabled:(null!==(r=c(t))&&void 0!==r?r:[]).includes(i)}}))}function c(e){var t,r;let n;return Array.isArray(e.workspaces)?n=e.workspaces:Array.isArray(null===(t=e.workspaces)||void 0===t?void 0:t.packages)&&(n=null===(r=e.workspaces)||void 0===r?void 0:r.packages),n}function d(e){var t;return!!(null===(t=e.devDependencies)||void 0===t?void 0:t["cds-plugin-ui5"])}t.ensureMinCdsVersion=function(e){var t;a(e)||(null!==(t=e.dependencies)&&void 0!==t||(e.dependencies={}),e.dependencies["@sap/cds"]="^6.8.2")},t.enableWorkspaces=function(e,t){var r;return n(this,void 0,void 0,(function*(){const{appWorkspace:n,workspaceEnabled:i}=yield u(e,t);if(i)return;let s=c(t);s||(null!==(r=t.workspaces)&&void 0!==r||(t.workspaces=[]),Array.isArray(t.workspaces)?s=t.workspaces:(t.workspaces.packages=[],s=t.workspaces.packages)),s.push(n)}))},t.addCdsPluginUi5=function(e){var t;d(e)||(null!==(t=e.devDependencies)&&void 0!==t||(e.devDependencies={}),e.devDependencies["cds-plugin-ui5"]="^0.6.13")},t.hasMinCdsVersion=a,t.satisfiesMinCdsVersion=function(e){var t,r;return a(e)||(0,i.satisfies)(o,null!==(r=null===(t=e.dependencies)||void 0===t?void 0:t["@sap/cds"])&&void 0!==r?r:"0.0.0")},t.getWorkspaceInfo=u,t.hasCdsPluginUi5=d},49339:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.satisfiesMinCdsVersion=t.enableCdsUi5Plugin=t.checkCdsUi5PluginEnabled=void 0;var n=r(59896);Object.defineProperty(t,"checkCdsUi5PluginEnabled",{enumerable:!0,get:function(){return n.checkCdsUi5PluginEnabled}}),Object.defineProperty(t,"enableCdsUi5Plugin",{enumerable:!0,get:function(){return n.enableCdsUi5Plugin}}),Object.defineProperty(t,"satisfiesMinCdsVersion",{enumerable:!0,get:function(){return n.satisfiesMinCdsVersion}})},85513:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(81836),t)},81836:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ProjectInquirer=void 0;const i=r(59390),s=r(1628),o=r(11115),a=r(56470),u=r(48191),c=n(r(66544)),{mainQuestions:d,advancedQuestions:l}=s.FioriGeneratorPromptNames.projectAttributes;t.ProjectInquirer=class ProjectInquirer{async inquire(e,{...t},r){const n=[],c=await(0,u.getUI5VersionChoices)(t.minSupportedUI5Version),l=await(0,i.getSapSystemUI5Version)(t.host),p=(0,a.findUI5VersionChoice)(l,c),f=t.promptSettings;return n.push(...(0,s.withExtensions)((0,o.getMainQuestions)(r,!!t.capService,!f?.[d.ui5Version]?.hide&&c,p,f),t.extensions)),n.push({type:"confirm",name:"showAdvanced",message:(0,s.t)("ADVANCED_CONFIGURE_MESSAGE"),guiOptions:{hint:(0,s.t)("TOOLTIP_ADVANCED_CONFIG")},default:!1}),n.push(...(0,s.withExtensions)((0,s.withCondition)((0,o.getAdvancedQuestions)(c,t.capService,f),(e=>e.showAdvanced)),t.extensions)),this.answersToProject(await e(n),t)}async answersToProject(e,{isV4:t=!1,promptSettings:r,extensions:n}){const s=e?.ui5Version,o=(await(0,i.retrieveUI5Versions)({fioriElementsVersion:t?"v4":"v2",onlyVersionNumbers:!0,onlyNpmVersion:!0,ui5SelectedVersion:s??"Latest"}))[0],a={name:e?.name||r?.[d.name]?.value,description:e?.description,title:e?.title,namespace:e?.namespace,targetFolder:e?.targetFolder||r?.[d.targetFolder]?.value,ui5Version:s||o,addDeployConfig:e?.addDeployConfig,addFlpConfig:e?.addFlpConfig,sapux:!0,localUI5Version:o,ui5Theme:e?.ui5Theme,enableEslint:e?.enableEslint,enableCodeAssist:e?.enableCodeAssist,skipAnnotations:e?.skipAnnotations,enableNPMWorkspaces:e?.enableNPMWorkspaces,enableTypeScript:e?.enableTypeScript};return e?.showAdvanced||Object.assign(a,await this.getAdvancedDefaults(a,n)),a}async getAdvancedDefaults(e,t){let r={};t&&(r=await this.getExtensionDefaults(t,e));return{ui5Theme:e.ui5Theme||r.ui5Theme||(0,i.getDefaultTheme)(e.ui5Version),enableEslint:e.enableEslint||r.enableEslint||s.DEFAULT_PROJECT_ATTRIBUTES.enableCodeAssist,enableCodeAssist:e.enableCodeAssist||r.enableCodeAssist||s.DEFAULT_PROJECT_ATTRIBUTES.enableCodeAssist,skipAnnotations:e.skipAnnotations||r.skipAnnotations||s.DEFAULT_PROJECT_ATTRIBUTES.skipAnnotations,enableNPMWorkspaces:e.enableNPMWorkspaces,enableTypeScript:e.enableTypeScript||r.enableTypeScript||s.DEFAULT_PROJECT_ATTRIBUTES.enableTypeScript}}async getExtensionDefaults(e,t){const r=Object.values(l),n={};for await(const i of r)if(!(0,c.default)(e[i]?.default)){const r="function"==typeof e[i].default?await e[i].default(t):e[i].default;Object.assign(n,{[i]:r})}return n}}},40335:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAdvancedQuestions=void 0;const n=r(1628),i=r(59390),s=r(48191),o=n.FioriGeneratorPromptNames.projectAttributes.advancedQuestions;t.getAdvancedQuestions=function(e,t,r){let a;const u=[];return u.push({type:"list",name:o.ui5Theme,message:(0,n.t)("LABEL_UI5_THEME"),guiOptions:{applyDefaultWhenDirty:!0,breadcrumb:(0,n.breadcrumbHelper)()},choices:({ui5Version:e="Latest"})=>(a=(0,s.getFilterThemesChoices)(e),a),default:({ui5Theme:e,ui5Version:t})=>(e||(e=(0,i.getDefaultTheme)(t)),e)}),t||r?.[o.enableEslint]?.hide||u.push({type:"confirm",name:o.enableEslint,message:(0,n.t)("ENABLE_ESLINT"),default:r?.[o.enableEslint]?.value??n.DEFAULT_PROJECT_ATTRIBUTES[o.enableEslint],guiOptions:{breadcrumb:(0,n.breadcrumbHelper)((0,n.t)("LABEL_ESLINT_ENABLED_BREADCRUMB"))}}),r?.[o.enableCodeAssist]?.hide||u.push({when:t=>{const r=e.map((e=>e.version.semantic));return(0,i.uI5VersionsWithCodeAssist)(r,t?.ui5Version||"Latest")},type:"confirm",name:o.enableCodeAssist,message:(0,n.t)("ENABLE_CODE_ASSIST_MESSAGE"),default:r?.[o.enableCodeAssist]?.value??n.DEFAULT_PROJECT_ATTRIBUTES[o.enableCodeAssist],guiOptions:{breadcrumb:(0,n.breadcrumbHelper)((0,n.t)("LABEL_CODE_ASSIST_ENABLED_BREADCRUMB"))}}),r?.[o.skipAnnotations]?.hide||u.push({type:"confirm",name:o.skipAnnotations,message:(0,n.t)("SKIP_ANNOTATIONS"),default:r?.[o.skipAnnotations]?.value??n.DEFAULT_PROJECT_ATTRIBUTES[o.skipAnnotations],guiOptions:{breadcrumb:(0,n.breadcrumbHelper)((0,n.t)("LABEL_SKIP_ANNOTATIONS_BREADCRUMB"))}}),u.push({when:()=>t?.capType===n.CapType.NODE_JS&&((0,s.checkHasCdsMinVersion)(t.projectPath)&&!t.cdsUI5PluginEnabled),type:"confirm",name:"enableNPMWorkspaces",message:(0,n.t)("ENABLE_NPM_WORKSPACES"),default:!1,guiOptions:{breadcrumb:(0,n.breadcrumbHelper)((0,n.t)("LABEL_ENABLE_NPM_WORKSPACES_BREADCRUMB"))}}),r?.[o.enableTypeScript]?.hide||u.push({when:e=>!t||t.capType===n.CapType.NODE_JS&&(t.cdsUI5PluginEnabled||e?.enableNPMWorkspaces),type:"confirm",name:o.enableTypeScript,message:(0,n.t)("ENABLE_TYPESCRIPT"),default:r?.[o.enableTypeScript]?.value??n.DEFAULT_PROJECT_ATTRIBUTES[o.enableTypeScript],guiOptions:{breadcrumb:(0,n.breadcrumbHelper)((0,n.t)("LABEL_ENABLE_TYPESCRIPT_BREADCRUMB"))}}),u}},57286:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(40335),t)},48191:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.checkHasCdsMinVersion=t.ui5VersionsGrouped=t.getFilterThemesChoices=t.getUI5VersionChoices=void 0;const i=r(59390),s=r(1628),o=n(r(85715)),a=r(5407),u=r(84659),c=r(49339),d=r(71017);t.getUI5VersionChoices=async function(e){const t={includeSnapshots:!1,minSupportedUI5Version:e,useCache:!0,removeDuplicateVersions:!0,groupUI5Versions:!0};return(0,i.getUI5VersionsEnhanced)(t)},t.getFilterThemesChoices=function(e){return(0,i.getUi5Themes)(e).map((e=>({value:e.themeid,name:e.label})))},t.ui5VersionsGrouped=function(e){return e?(0,s.getPlatform)()===s.PLATFORMS.CLI?[...e.filter((e=>(!0===e.version.maintained&&(e.name=`${e.name} - (${(0,s.t)("MAINTAINED")} ${(0,s.t)("VERSION",{count:1})})`),!0===e.version.maintained))),...e.filter((e=>(!1===e.version.maintained&&(e.name=`${e.name} - (${(0,s.t)("OUT_OF_MAINTENANCE")} ${(0,s.t)("VERSION",{count:1})})`),!1===e.version.maintained)))]:[new o.default.Separator(`${(0,s.t)("MAINTAINED")} ${(0,s.t)("VERSION",{count:0})}`),...e.filter((e=>!0===e.version.maintained)),new o.default.Separator(`${(0,s.t)("OUT_OF_MAINTENANCE")} ${(0,s.t)("VERSION",{count:0})}`),...e.filter((e=>!1===e.version.maintained))]:[]},t.checkHasCdsMinVersion=function(e,t){t||(t=(0,u.create)((0,a.create)()));const r=(0,d.join)(e,"package.json");if(!t.exists(r))return!1;const n=t.readJSON(r);return(0,c.satisfiesMinCdsVersion)(n)}},11115:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(57286),t),i(r(37520),t)},66528:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultProjectName=t.defaultDescription=t.defaultTargetFolder=t.defaultUi5Version=void 0;const n=r(1628);t.defaultUi5Version=function(e,t,r){return e?.value||t?.value||r?.value},t.defaultTargetFolder=function(e,t){return e||t||process.cwd()},t.defaultDescription=function(e){return e||(0,n.t)("DEFAULT_PROJECT_DESCRIPTION")},t.defaultProjectName=function(e){let t=n.defaultProjectNumber,r=(0,n.t)("DEFAULT_PROJECT_NAME");for(;(0,n.applicationExists)(`${r}`,e)&&(r=(0,n.t)("DEFAULT_PROJECT_NAME",{defaultProjectNumber:++t}),!(t>99)););return r}},37520:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(89225),t)},89225:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getMainQuestions=void 0;const n=r(1628),i=r(66528),s=n.FioriGeneratorPromptNames.projectAttributes.mainQuestions;t.getMainQuestions=function(e,t,r,o,a){const u=(0,n.breadcrumbHelper)(),c=a?.[s.name]?.value,d=a?.[s.targetFolder]?.value,l=(0,n.ui5VersionsGrouped)(r);let p=[];return a?.[s.name]?.hide||p.push({type:"input",guiOptions:{applyDefaultWhenDirty:!0,hint:(0,n.t)("TOOLTIP_PROJECT_NAME"),mandatory:!0,breadcrumb:u},name:s.name,message:(0,n.t)("PROJECT_NAME_MESSAGE"),default:e=>e.name||c||(0,i.defaultProjectName)(d),validate:e=>(0,n.getPlatform)()===n.PLATFORMS.CLI||t?(0,n.validateProjectName)(d,e):(0,n.validateModuleName)(e)}),p=p.concat([{type:"input",guiOptions:{hint:(0,n.t)("TOOLTIP_PROJECT_TITLE"),breadcrumb:u},name:s.title,message:(0,n.t)("PROJECT_TITLE_MESSAGE"),default:e=>e.title||(0,n.t)("DEFAULT_PROJECT_TITLE")},{type:"input",guiOptions:{hint:(0,n.t)("TOOLTIP_PROJECT_NAMESPACE"),breadcrumb:u},name:s.namespace,message:(0,n.t)("PROJECT_NAMESPACE_MESSAGE"),default:e=>e.namespace||"",validate:(e,t)=>(0,n.validateNamespace)(e,t.name||c)},{type:"input",name:s.description,guiOptions:{hint:(0,n.t)("TOOLTIP_PROJECT_DESCRIPTION"),breadcrumb:u},message:(0,n.t)("PROJECT_DESCRIPTION_MESSAGE"),default:e=>(0,i.defaultDescription)(e.description)}]),a?.[s.targetFolder]?.hide||t||p.push({type:"input",name:s.targetFolder,message:(0,n.t)("CHOOSE_PROJECT_FOLDER_MESSAGE"),guiType:"folder-browser",guiOptions:{applyDefaultWhenDirty:!0,mandatory:!0,breadcrumb:(0,n.breadcrumbHelper)((0,n.t)("LABEL_PROJECT_PATH_BREADCRUMB"))},default:e=>(0,i.defaultTargetFolder)(e.targetFolder,d),validate:(e,{name:t})=>{if(t?.length>2)return(0,n.validateProjectFolder)(e,t)}}),p=p.concat([{when:()=>!!r,type:(0,n.getPlatform)()===n.PLATFORMS.CLI?"autocomplete":"list",name:s.ui5Version,guiOptions:{hint:(0,n.t)("TOOLTIP_UI5_VERSION"),breadcrumb:(0,n.breadcrumbHelper)((0,n.t)("LABEL_UI5_VERSION_BREADCRUMB"))},message:(0,n.t)("LABEL_UI5_VERSION"),choices:()=>l,source:(e,t)=>(0,n.searchChoices)(t,l),default:e=>(0,i.defaultUi5Version)(r.find((t=>t.value===e?.ui5Version)),o,r.find((e=>!0===e.version.default)))}]),a?.[s.addDeployConfig]?.hide||p.push({type:"confirm",name:s.addDeployConfig,guiOptions:{breadcrumb:(0,n.breadcrumbHelper)((0,n.t)("LABEL_DEPLOY_CONFIG_BREADCRUMB"))},message:async e=>{const t=await(0,n.validateMtaPath)(e.targetFolder||d);return t?(0,n.t)("ADD_TO_MTA_QUESTION",{path:t,interpolation:{escapeValue:!1}}):(0,n.t)("ADD_DEPLOYMENT_CONFIG_QUESTION")},when:async e=>!t||t&&await(0,n.validateMtaPath)(e?.targetFolder||d)||!1,default:async e=>!!await(0,n.validateMtaPath)(e?.targetFolder||d),validate:t=>(0,n.validateNextStep)(t,e,(0,n.t)("DEPLOYMENT_CONFIG"))}),a?.[s.addFlpConfig]?.hide||p.push({type:"confirm",name:s.addFlpConfig,guiOptions:{breadcrumb:(0,n.breadcrumbHelper)((0,n.t)("LABEL_FLP_CONFIG_BREADCRUMB"))},message:()=>(0,n.t)("ADD_FLP_CONFIG_QUESTION"),default:!1,validate:t=>(0,n.validateNextStep)(t,e,(0,n.t)("FLP_CONFIG"))}),p}},56470:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.findUI5VersionChoice=void 0;const i=n(r(76027));t.findUI5VersionChoice=function(e,t){const r="(Source system version)";if(e&&i.default.valid(e))return t.find((t=>{const n=function(e,t){try{const r=e.toLowerCase()===t.toLowerCase(),n=e.toLowerCase().includes("snapshot")&&t.toLowerCase().includes("snapshot")&&i.default.eq(i.default.coerce(e),i.default.coerce(t));return r||n}catch{return!1}}(t.version.semantic,e);return n&&!t.name.endsWith(r)&&(t.name=`${t.name} ${r}`),n}))}},34409:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=34409,e.exports=t},70910:(e,t,r)=>{var n={"./Find-VisualStudio.cs":20183,"./build":17724,"./build.js":17724,"./clean":1658,"./clean.js":1658,"./configure":4748,"./configure.js":4748,"./create-config-gypi":98395,"./create-config-gypi.js":98395,"./find-node-directory":24159,"./find-node-directory.js":24159,"./find-python":29130,"./find-python.js":29130,"./find-visualstudio":17703,"./find-visualstudio.js":17703,"./install":25925,"./install.js":25925,"./list":44179,"./list.js":44179,"./node-gyp":55614,"./node-gyp.js":55614,"./process-release":75344,"./process-release.js":75344,"./rebuild":64187,"./rebuild.js":64187,"./remove":13103,"./remove.js":13103,"./util":55690,"./util.js":55690};function i(e){var t=s(e);return r(t)}function s(e){if(!r.o(n,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return n[e]}i.keys=function(){return Object.keys(n)},i.resolve=s,e.exports=i,i.id=70910},84679:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=84679,e.exports=t},72869:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=72869,e.exports=t},12937:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=12937,e.exports=t},84397:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=84397,e.exports=t},54529:e=>{"use strict";e.exports=require("@opentelemetry/tracing")},85767:e=>{"use strict";e.exports=require("@sap/cds")},32220:e=>{"use strict";e.exports=require("applicationinsights-native-metrics")},43241:e=>{"use strict";e.exports=require("esprima")},74602:e=>{"use strict";e.exports=require("keytar")},66828:e=>{"use strict";e.exports=require("vscode")},39491:e=>{"use strict";e.exports=require("assert")},50852:e=>{"use strict";e.exports=require("async_hooks")},14300:e=>{"use strict";e.exports=require("buffer")},32081:e=>{"use strict";e.exports=require("child_process")},96206:e=>{"use strict";e.exports=require("console")},22057:e=>{"use strict";e.exports=require("constants")},6113:e=>{"use strict";e.exports=require("crypto")},9523:e=>{"use strict";e.exports=require("dns")},82361:e=>{"use strict";e.exports=require("events")},57147:e=>{"use strict";e.exports=require("fs")},73292:e=>{"use strict";e.exports=require("fs/promises")},13685:e=>{"use strict";e.exports=require("http")},95687:e=>{"use strict";e.exports=require("https")},98188:e=>{"use strict";e.exports=require("module")},41808:e=>{"use strict";e.exports=require("net")},22037:e=>{"use strict";e.exports=require("os")},71017:e=>{"use strict";e.exports=require("path")},77282:e=>{"use strict";e.exports=require("process")},85477:e=>{"use strict";e.exports=require("punycode")},63477:e=>{"use strict";e.exports=require("querystring")},14521:e=>{"use strict";e.exports=require("readline")},12781:e=>{"use strict";e.exports=require("stream")},71576:e=>{"use strict";e.exports=require("string_decoder")},39512:e=>{"use strict";e.exports=require("timers")},24404:e=>{"use strict";e.exports=require("tls")},76224:e=>{"use strict";e.exports=require("tty")},57310:e=>{"use strict";e.exports=require("url")},73837:e=>{"use strict";e.exports=require("util")},26144:e=>{"use strict";e.exports=require("vm")},59796:e=>{"use strict";e.exports=require("zlib")},69645:e=>{"use strict";e.exports={}}},n={};function i(e){var t=n[e];if(void 0!==t)return t.exports;var s=n[e]={id:e,loaded:!1,exports:{}};return r[e].call(s.exports,s,s.exports,i),s.loaded=!0,s.exports}i.m=r,i.c=n,i.x=()=>{var e=i.O(void 0,[712,784,916,439,705,475,763,689,2],(()=>i(i.s=36262)));return e=i.O(e)},e=[],i.O=(t,r,n,s)=>{if(!r){var o=1/0;for(d=0;d<e.length;d++){for(var[r,n,s]=e[d],a=!0,u=0;u<r.length;u++)(!1&s||o>=s)&&Object.keys(i.O).every((e=>i.O[e](r[u])))?r.splice(u--,1):(a=!1,s<o&&(o=s));if(a){e.splice(d--,1);var c=n();void 0!==c&&(t=c)}}return t}s=s||0;for(var d=e.length;d>0&&e[d-1][2]>s;d--)e[d]=e[d-1];e[d]=[r,n,s]},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((t,r)=>(i.f[r](e,t),t)),[])),i.u=e=>({2:"project-generator/app",439:"ui5-application-writer/dist",475:"tools-suite-common-libs",689:"ux-service-inquirer",705:"fiori-freestyle-writer/dist",712:"commonlibs",763:"app-gen-shared",784:"open-ux-shared",916:"odata-service-writer/dist"}[e]+"/index.js"),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),i.j=815,i.p="",(()=>{var e={815:1,190:1,673:1};i.O.require=t=>e[t];i.f.require=(t,r)=>{e[t]||(t=>{var r=t.modules,n=t.ids,s=t.runtime;for(var o in r)i.o(r,o)&&(i.m[o]=r[o]);s&&s(i);for(var a=0;a<n.length;a++)e[n[a]]=1;i.O()})(require("../"+i.u(t)))}})(),t=i.x,i.x=()=>(i.e(712),i.e(784),i.e(916),i.e(439),i.e(705),i.e(475),i.e(763),i.e(689),i.e(2),t());var s=i.x();module.exports=s})(); | ||
(()=>{var e,t,r={51617:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=51617,e.exports=t},39973:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=39973,e.exports=t},20230:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=20230,e.exports=t},20545:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=20545,e.exports=t},4297:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=4297,e.exports=t},75601:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=75601,e.exports=t},82626:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=82626,e.exports=t},37974:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=37974,e.exports=t},85858:(e,t,r)=>{var n={"./cat":43112,"./cat.js":43112,"./cd":86698,"./cd.js":86698,"./chmod":23986,"./chmod.js":23986,"./common":96816,"./common.js":96816,"./cp":80610,"./cp.js":80610,"./dirs":91972,"./dirs.js":91972,"./echo":16166,"./echo.js":16166,"./error":80609,"./error.js":80609,"./exec":52024,"./exec-child":69911,"./exec-child.js":69911,"./exec.js":52024,"./find":22261,"./find.js":22261,"./grep":56818,"./grep.js":56818,"./head":66412,"./head.js":66412,"./ln":91247,"./ln.js":91247,"./ls":5815,"./ls.js":5815,"./mkdir":70098,"./mkdir.js":70098,"./mv":74164,"./mv.js":74164,"./popd":99851,"./popd.js":99851,"./pushd":6978,"./pushd.js":6978,"./pwd":24044,"./pwd.js":24044,"./rm":44256,"./rm.js":44256,"./sed":43422,"./sed.js":43422,"./set":17444,"./set.js":17444,"./sort":53033,"./sort.js":53033,"./tail":50318,"./tail.js":50318,"./tempdir":16275,"./tempdir.js":16275,"./test":50021,"./test.js":50021,"./to":44915,"./to.js":44915,"./toEnd":13326,"./toEnd.js":13326,"./touch":57650,"./touch.js":57650,"./uniq":63019,"./uniq.js":63019,"./which":5483,"./which.js":5483};function i(e){var t=s(e);return r(t)}function s(e){if(!r.o(n,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return n[e]}i.keys=function(){return Object.keys(n)},i.resolve=s,e.exports=i,i.id=85858},59896:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,s){function o(e){try{u(n.next(e))}catch(e){s(e)}}function a(e){try{u(n.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,a)}u((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.checkCdsUi5PluginEnabled=t.enableCdsUi5Plugin=t.satisfiesMinCdsVersion=void 0;const i=r(71017),s=r(5407),o=r(84659),a=r(21832);var u=r(21832);Object.defineProperty(t,"satisfiesMinCdsVersion",{enumerable:!0,get:function(){return u.satisfiesMinCdsVersion}}),t.enableCdsUi5Plugin=function(e,t){var r;return n(this,void 0,void 0,(function*(){t||(t=(0,o.create)((0,s.create)()));const n=(0,i.join)(e,"package.json"),u=null!==(r=t.readJSON(n))&&void 0!==r?r:{};return(0,a.ensureMinCdsVersion)(u),yield(0,a.enableWorkspaces)(e,u),(0,a.addCdsPluginUi5)(u),t.writeJSON(n,u),t}))},t.checkCdsUi5PluginEnabled=function(e,t){return n(this,void 0,void 0,(function*(){t||(t=(0,o.create)((0,s.create)()));const r=(0,i.join)(e,"package.json");if(!t.exists(r))return!1;const n=t.readJSON(r),{workspaceEnabled:u}=yield(0,a.getWorkspaceInfo)(e,n);return(0,a.hasMinCdsVersion)(n)&&u&&(0,a.hasCdsPluginUi5)(n)}))}},21832:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,s){function o(e){try{u(n.next(e))}catch(e){s(e)}}function a(e){try{u(n.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,a)}u((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.hasCdsPluginUi5=t.getWorkspaceInfo=t.satisfiesMinCdsVersion=t.hasMinCdsVersion=t.addCdsPluginUi5=t.enableWorkspaces=t.ensureMinCdsVersion=void 0;const i=r(76027),s=r(9949),o="6.8.2";function a(e){var t,r;return(0,i.gte)(null!==(r=(0,i.coerce)(null===(t=e.dependencies)||void 0===t?void 0:t["@sap/cds"]))&&void 0!==r?r:"0.0.0",o)}function u(e,t){var r;return n(this,void 0,void 0,(function*(){const n=yield(0,s.getCapCustomPaths)(e),i=n.app.endsWith("/")?`${n.app}*`:`${n.app}/*`;return{appWorkspace:i,workspaceEnabled:(null!==(r=c(t))&&void 0!==r?r:[]).includes(i)}}))}function c(e){var t,r;let n;return Array.isArray(e.workspaces)?n=e.workspaces:Array.isArray(null===(t=e.workspaces)||void 0===t?void 0:t.packages)&&(n=null===(r=e.workspaces)||void 0===r?void 0:r.packages),n}function d(e){var t;return!!(null===(t=e.devDependencies)||void 0===t?void 0:t["cds-plugin-ui5"])}t.ensureMinCdsVersion=function(e){var t;a(e)||(null!==(t=e.dependencies)&&void 0!==t||(e.dependencies={}),e.dependencies["@sap/cds"]="^6.8.2")},t.enableWorkspaces=function(e,t){var r;return n(this,void 0,void 0,(function*(){const{appWorkspace:n,workspaceEnabled:i}=yield u(e,t);if(i)return;let s=c(t);s||(null!==(r=t.workspaces)&&void 0!==r||(t.workspaces=[]),Array.isArray(t.workspaces)?s=t.workspaces:(t.workspaces.packages=[],s=t.workspaces.packages)),s.push(n)}))},t.addCdsPluginUi5=function(e){var t;d(e)||(null!==(t=e.devDependencies)&&void 0!==t||(e.devDependencies={}),e.devDependencies["cds-plugin-ui5"]="^0.6.13")},t.hasMinCdsVersion=a,t.satisfiesMinCdsVersion=function(e){var t,r;return a(e)||(0,i.satisfies)(o,null!==(r=null===(t=e.dependencies)||void 0===t?void 0:t["@sap/cds"])&&void 0!==r?r:"0.0.0")},t.getWorkspaceInfo=u,t.hasCdsPluginUi5=d},49339:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.satisfiesMinCdsVersion=t.enableCdsUi5Plugin=t.checkCdsUi5PluginEnabled=void 0;var n=r(59896);Object.defineProperty(t,"checkCdsUi5PluginEnabled",{enumerable:!0,get:function(){return n.checkCdsUi5PluginEnabled}}),Object.defineProperty(t,"enableCdsUi5Plugin",{enumerable:!0,get:function(){return n.enableCdsUi5Plugin}}),Object.defineProperty(t,"satisfiesMinCdsVersion",{enumerable:!0,get:function(){return n.satisfiesMinCdsVersion}})},85513:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(81836),t)},81836:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ProjectInquirer=void 0;const i=r(59390),s=r(1628),o=r(11115),a=r(56470),u=r(48191),c=n(r(66544)),{mainQuestions:d,advancedQuestions:l}=s.FioriGeneratorPromptNames.projectAttributes;t.ProjectInquirer=class ProjectInquirer{async inquire(e,{...t},r){const n=[],c=await(0,u.getUI5VersionChoices)(t.minSupportedUI5Version),l=await(0,i.getSapSystemUI5Version)(t.host),p=(0,a.findUI5VersionChoice)(l,c),f=t.promptSettings;return n.push(...(0,s.withExtensions)((0,o.getMainQuestions)(r,!!t.capService,!f?.[d.ui5Version]?.hide&&c,p,f),t.extensions)),n.push({type:"confirm",name:"showAdvanced",message:(0,s.t)("ADVANCED_CONFIGURE_MESSAGE"),guiOptions:{hint:(0,s.t)("TOOLTIP_ADVANCED_CONFIG")},default:!1}),n.push(...(0,s.withExtensions)((0,s.withCondition)((0,o.getAdvancedQuestions)(c,t.capService,f),(e=>e.showAdvanced)),t.extensions)),this.answersToProject(await e(n),t)}async answersToProject(e,{isV4:t=!1,promptSettings:r,extensions:n}){const s=e?.ui5Version,o=(await(0,i.retrieveUI5Versions)({fioriElementsVersion:t?"v4":"v2",onlyVersionNumbers:!0,onlyNpmVersion:!0,ui5SelectedVersion:s??"Latest"}))[0],a={name:e?.name||r?.[d.name]?.value,description:e?.description,title:e?.title,namespace:e?.namespace,targetFolder:e?.targetFolder||r?.[d.targetFolder]?.value,ui5Version:s||o,addDeployConfig:e?.addDeployConfig,addFlpConfig:e?.addFlpConfig,sapux:!0,localUI5Version:o,ui5Theme:e?.ui5Theme,enableEslint:e?.enableEslint,enableCodeAssist:e?.enableCodeAssist,skipAnnotations:e?.skipAnnotations,enableNPMWorkspaces:e?.enableNPMWorkspaces,enableTypeScript:e?.enableTypeScript};return e?.showAdvanced||Object.assign(a,await this.getAdvancedDefaults(a,n)),a}async getAdvancedDefaults(e,t){let r={};t&&(r=await this.getExtensionDefaults(t,e));return{ui5Theme:e.ui5Theme||r.ui5Theme||(0,i.getDefaultTheme)(e.ui5Version),enableEslint:e.enableEslint||r.enableEslint||s.DEFAULT_PROJECT_ATTRIBUTES.enableCodeAssist,enableCodeAssist:e.enableCodeAssist||r.enableCodeAssist||s.DEFAULT_PROJECT_ATTRIBUTES.enableCodeAssist,skipAnnotations:e.skipAnnotations||r.skipAnnotations||s.DEFAULT_PROJECT_ATTRIBUTES.skipAnnotations,enableNPMWorkspaces:e.enableNPMWorkspaces,enableTypeScript:e.enableTypeScript||r.enableTypeScript||s.DEFAULT_PROJECT_ATTRIBUTES.enableTypeScript}}async getExtensionDefaults(e,t){const r=Object.values(l),n={};for await(const i of r)if(!(0,c.default)(e[i]?.default)){const r="function"==typeof e[i].default?await e[i].default(t):e[i].default;Object.assign(n,{[i]:r})}return n}}},40335:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAdvancedQuestions=void 0;const n=r(1628),i=r(59390),s=r(48191),o=n.FioriGeneratorPromptNames.projectAttributes.advancedQuestions;t.getAdvancedQuestions=function(e,t,r){let a;const u=[];return u.push({type:"list",name:o.ui5Theme,message:(0,n.t)("LABEL_UI5_THEME"),guiOptions:{applyDefaultWhenDirty:!0,breadcrumb:(0,n.breadcrumbHelper)()},choices:({ui5Version:e="Latest"})=>(a=(0,s.getFilterThemesChoices)(e),a),default:({ui5Theme:e,ui5Version:t})=>(e||(e=(0,i.getDefaultTheme)(t)),e)}),t||r?.[o.enableEslint]?.hide||u.push({type:"confirm",name:o.enableEslint,message:(0,n.t)("ENABLE_ESLINT"),default:r?.[o.enableEslint]?.value??n.DEFAULT_PROJECT_ATTRIBUTES[o.enableEslint],guiOptions:{breadcrumb:(0,n.breadcrumbHelper)((0,n.t)("LABEL_ESLINT_ENABLED_BREADCRUMB"))}}),r?.[o.enableCodeAssist]?.hide||u.push({when:t=>{const r=e.map((e=>e.version.semantic));return(0,i.uI5VersionsWithCodeAssist)(r,t?.ui5Version||"Latest")},type:"confirm",name:o.enableCodeAssist,message:(0,n.t)("ENABLE_CODE_ASSIST_MESSAGE"),default:r?.[o.enableCodeAssist]?.value??n.DEFAULT_PROJECT_ATTRIBUTES[o.enableCodeAssist],guiOptions:{breadcrumb:(0,n.breadcrumbHelper)((0,n.t)("LABEL_CODE_ASSIST_ENABLED_BREADCRUMB"))}}),r?.[o.skipAnnotations]?.hide||u.push({type:"confirm",name:o.skipAnnotations,message:(0,n.t)("SKIP_ANNOTATIONS"),default:r?.[o.skipAnnotations]?.value??n.DEFAULT_PROJECT_ATTRIBUTES[o.skipAnnotations],guiOptions:{breadcrumb:(0,n.breadcrumbHelper)((0,n.t)("LABEL_SKIP_ANNOTATIONS_BREADCRUMB"))}}),u.push({when:()=>t?.capType===n.CapType.NODE_JS&&((0,s.checkHasCdsMinVersion)(t.projectPath)&&!t.cdsUI5PluginEnabled),type:"confirm",name:"enableNPMWorkspaces",message:(0,n.t)("ENABLE_NPM_WORKSPACES"),default:!1,guiOptions:{breadcrumb:(0,n.breadcrumbHelper)((0,n.t)("LABEL_ENABLE_NPM_WORKSPACES_BREADCRUMB"))}}),r?.[o.enableTypeScript]?.hide||u.push({when:e=>!t||t.capType===n.CapType.NODE_JS&&(t.cdsUI5PluginEnabled||e?.enableNPMWorkspaces),type:"confirm",name:o.enableTypeScript,message:(0,n.t)("ENABLE_TYPESCRIPT"),default:r?.[o.enableTypeScript]?.value??n.DEFAULT_PROJECT_ATTRIBUTES[o.enableTypeScript],guiOptions:{breadcrumb:(0,n.breadcrumbHelper)((0,n.t)("LABEL_ENABLE_TYPESCRIPT_BREADCRUMB"))}}),u}},57286:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(40335),t)},48191:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.checkHasCdsMinVersion=t.ui5VersionsGrouped=t.getFilterThemesChoices=t.getUI5VersionChoices=void 0;const i=r(59390),s=r(1628),o=n(r(85715)),a=r(5407),u=r(84659),c=r(49339),d=r(71017);t.getUI5VersionChoices=async function(e){const t={includeSnapshots:!1,minSupportedUI5Version:e,useCache:!0,removeDuplicateVersions:!0,groupUI5Versions:!0};return(0,i.getUI5VersionsEnhanced)(t)},t.getFilterThemesChoices=function(e){return(0,i.getUi5Themes)(e).map((e=>({value:e.themeid,name:e.label})))},t.ui5VersionsGrouped=function(e){return e?(0,s.getPlatform)()===s.PLATFORMS.CLI?[...e.filter((e=>(!0===e.version.maintained&&(e.name=`${e.name} - (${(0,s.t)("MAINTAINED")} ${(0,s.t)("VERSION",{count:1})})`),!0===e.version.maintained))),...e.filter((e=>(!1===e.version.maintained&&(e.name=`${e.name} - (${(0,s.t)("OUT_OF_MAINTENANCE")} ${(0,s.t)("VERSION",{count:1})})`),!1===e.version.maintained)))]:[new o.default.Separator(`${(0,s.t)("MAINTAINED")} ${(0,s.t)("VERSION",{count:0})}`),...e.filter((e=>!0===e.version.maintained)),new o.default.Separator(`${(0,s.t)("OUT_OF_MAINTENANCE")} ${(0,s.t)("VERSION",{count:0})}`),...e.filter((e=>!1===e.version.maintained))]:[]},t.checkHasCdsMinVersion=function(e,t){t||(t=(0,u.create)((0,a.create)()));const r=(0,d.join)(e,"package.json");if(!t.exists(r))return!1;const n=t.readJSON(r);return(0,c.satisfiesMinCdsVersion)(n)}},11115:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(57286),t),i(r(37520),t)},66528:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultProjectName=t.defaultDescription=t.defaultTargetFolder=t.defaultUi5Version=void 0;const n=r(1628);t.defaultUi5Version=function(e,t,r){return e?.value||t?.value||r?.value},t.defaultTargetFolder=function(e,t){return e||t||process.cwd()},t.defaultDescription=function(e){return e||(0,n.t)("DEFAULT_PROJECT_DESCRIPTION")},t.defaultProjectName=function(e){let t=n.defaultProjectNumber,r=(0,n.t)("DEFAULT_PROJECT_NAME");for(;(0,n.applicationExists)(`${r}`,e)&&(r=(0,n.t)("DEFAULT_PROJECT_NAME",{defaultProjectNumber:++t}),!(t>99)););return r}},37520:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(89225),t)},89225:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getMainQuestions=void 0;const n=r(1628),i=r(66528),s=n.FioriGeneratorPromptNames.projectAttributes.mainQuestions;t.getMainQuestions=function(e,t,r,o,a){const u=(0,n.breadcrumbHelper)(),c=a?.[s.name]?.value,d=a?.[s.targetFolder]?.value,l=(0,n.ui5VersionsGrouped)(r);let p=[];return a?.[s.name]?.hide||p.push({type:"input",guiOptions:{applyDefaultWhenDirty:!0,hint:(0,n.t)("TOOLTIP_PROJECT_NAME"),mandatory:!0,breadcrumb:u},name:s.name,message:(0,n.t)("PROJECT_NAME_MESSAGE"),default:e=>e.name||c||(0,i.defaultProjectName)(d),validate:e=>(0,n.getPlatform)()===n.PLATFORMS.CLI||t?(0,n.validateProjectName)(d,e):(0,n.validateModuleName)(e)}),p=p.concat([{type:"input",guiOptions:{hint:(0,n.t)("TOOLTIP_PROJECT_TITLE"),breadcrumb:u},name:s.title,message:(0,n.t)("PROJECT_TITLE_MESSAGE"),default:e=>e.title||(0,n.t)("DEFAULT_PROJECT_TITLE")},{type:"input",guiOptions:{hint:(0,n.t)("TOOLTIP_PROJECT_NAMESPACE"),breadcrumb:u},name:s.namespace,message:(0,n.t)("PROJECT_NAMESPACE_MESSAGE"),default:e=>e.namespace||"",validate:(e,t)=>(0,n.validateNamespace)(e,t.name||c)},{type:"input",name:s.description,guiOptions:{hint:(0,n.t)("TOOLTIP_PROJECT_DESCRIPTION"),breadcrumb:u},message:(0,n.t)("PROJECT_DESCRIPTION_MESSAGE"),default:e=>(0,i.defaultDescription)(e.description)}]),a?.[s.targetFolder]?.hide||t||p.push({type:"input",name:s.targetFolder,message:(0,n.t)("CHOOSE_PROJECT_FOLDER_MESSAGE"),guiType:"folder-browser",guiOptions:{applyDefaultWhenDirty:!0,mandatory:!0,breadcrumb:(0,n.breadcrumbHelper)((0,n.t)("LABEL_PROJECT_PATH_BREADCRUMB"))},default:e=>(0,i.defaultTargetFolder)(e.targetFolder,d),validate:(e,{name:t})=>{if(t?.length>2)return(0,n.validateProjectFolder)(e,t)}}),p=p.concat([{when:()=>!!r,type:(0,n.getPlatform)()===n.PLATFORMS.CLI?"autocomplete":"list",name:s.ui5Version,guiOptions:{hint:(0,n.t)("TOOLTIP_UI5_VERSION"),breadcrumb:(0,n.breadcrumbHelper)((0,n.t)("LABEL_UI5_VERSION_BREADCRUMB"))},message:(0,n.t)("LABEL_UI5_VERSION"),choices:()=>l,source:(e,t)=>(0,n.searchChoices)(t,l),default:e=>(0,i.defaultUi5Version)(r.find((t=>t.value===e?.ui5Version)),o,r.find((e=>!0===e.version.default)))}]),a?.[s.addDeployConfig]?.hide||p.push({type:"confirm",name:s.addDeployConfig,guiOptions:{breadcrumb:(0,n.breadcrumbHelper)((0,n.t)("LABEL_DEPLOY_CONFIG_BREADCRUMB"))},message:async e=>{const t=await(0,n.validateMtaPath)(e.targetFolder||d);return t?(0,n.t)("ADD_TO_MTA_QUESTION",{path:t,interpolation:{escapeValue:!1}}):(0,n.t)("ADD_DEPLOYMENT_CONFIG_QUESTION")},when:async e=>!t||t&&await(0,n.validateMtaPath)(e?.targetFolder||d)||!1,default:async e=>!!await(0,n.validateMtaPath)(e?.targetFolder||d),validate:t=>(0,n.validateNextStep)(t,e,(0,n.t)("DEPLOYMENT_CONFIG"))}),a?.[s.addFlpConfig]?.hide||p.push({type:"confirm",name:s.addFlpConfig,guiOptions:{breadcrumb:(0,n.breadcrumbHelper)((0,n.t)("LABEL_FLP_CONFIG_BREADCRUMB"))},message:()=>(0,n.t)("ADD_FLP_CONFIG_QUESTION"),default:!1,validate:t=>(0,n.validateNextStep)(t,e,(0,n.t)("FLP_CONFIG"))}),p}},56470:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.findUI5VersionChoice=void 0;const i=n(r(76027));t.findUI5VersionChoice=function(e,t){const r="(Source system version)";if(e&&i.default.valid(e))return t.find((t=>{const n=function(e,t){try{const r=e.toLowerCase()===t.toLowerCase(),n=e.toLowerCase().includes("snapshot")&&t.toLowerCase().includes("snapshot")&&i.default.eq(i.default.coerce(e),i.default.coerce(t));return r||n}catch{return!1}}(t.version.semantic,e);return n&&!t.name.endsWith(r)&&(t.name=`${t.name} ${r}`),n}))}},34409:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=34409,e.exports=t},70910:(e,t,r)=>{var n={"./Find-VisualStudio.cs":20183,"./build":17724,"./build.js":17724,"./clean":1658,"./clean.js":1658,"./configure":4748,"./configure.js":4748,"./create-config-gypi":98395,"./create-config-gypi.js":98395,"./find-node-directory":24159,"./find-node-directory.js":24159,"./find-python":29130,"./find-python.js":29130,"./find-visualstudio":17703,"./find-visualstudio.js":17703,"./install":25925,"./install.js":25925,"./list":44179,"./list.js":44179,"./node-gyp":55614,"./node-gyp.js":55614,"./process-release":75344,"./process-release.js":75344,"./rebuild":64187,"./rebuild.js":64187,"./remove":13103,"./remove.js":13103,"./util":55690,"./util.js":55690};function i(e){var t=s(e);return r(t)}function s(e){if(!r.o(n,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return n[e]}i.keys=function(){return Object.keys(n)},i.resolve=s,e.exports=i,i.id=70910},84679:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=84679,e.exports=t},72869:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=72869,e.exports=t},12937:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=12937,e.exports=t},84397:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=84397,e.exports=t},54529:e=>{"use strict";e.exports=require("@opentelemetry/tracing")},85767:e=>{"use strict";e.exports=require("@sap/cds")},32220:e=>{"use strict";e.exports=require("applicationinsights-native-metrics")},43241:e=>{"use strict";e.exports=require("esprima")},74602:e=>{"use strict";e.exports=require("keytar")},66828:e=>{"use strict";e.exports=require("vscode")},39491:e=>{"use strict";e.exports=require("assert")},50852:e=>{"use strict";e.exports=require("async_hooks")},14300:e=>{"use strict";e.exports=require("buffer")},32081:e=>{"use strict";e.exports=require("child_process")},96206:e=>{"use strict";e.exports=require("console")},22057:e=>{"use strict";e.exports=require("constants")},6113:e=>{"use strict";e.exports=require("crypto")},9523:e=>{"use strict";e.exports=require("dns")},82361:e=>{"use strict";e.exports=require("events")},57147:e=>{"use strict";e.exports=require("fs")},73292:e=>{"use strict";e.exports=require("fs/promises")},13685:e=>{"use strict";e.exports=require("http")},95687:e=>{"use strict";e.exports=require("https")},98188:e=>{"use strict";e.exports=require("module")},41808:e=>{"use strict";e.exports=require("net")},22037:e=>{"use strict";e.exports=require("os")},71017:e=>{"use strict";e.exports=require("path")},77282:e=>{"use strict";e.exports=require("process")},85477:e=>{"use strict";e.exports=require("punycode")},63477:e=>{"use strict";e.exports=require("querystring")},14521:e=>{"use strict";e.exports=require("readline")},12781:e=>{"use strict";e.exports=require("stream")},71576:e=>{"use strict";e.exports=require("string_decoder")},39512:e=>{"use strict";e.exports=require("timers")},24404:e=>{"use strict";e.exports=require("tls")},76224:e=>{"use strict";e.exports=require("tty")},57310:e=>{"use strict";e.exports=require("url")},73837:e=>{"use strict";e.exports=require("util")},26144:e=>{"use strict";e.exports=require("vm")},59796:e=>{"use strict";e.exports=require("zlib")},69645:e=>{"use strict";e.exports={}}},n={};function i(e){var t=n[e];if(void 0!==t)return t.exports;var s=n[e]={id:e,loaded:!1,exports:{}};return r[e].call(s.exports,s,s.exports,i),s.loaded=!0,s.exports}i.m=r,i.c=n,i.x=()=>{var e=i.O(void 0,[712,784,916,439,705,475,763,689,2],(()=>i(i.s=36262)));return e=i.O(e)},e=[],i.O=(t,r,n,s)=>{if(!r){var o=1/0;for(d=0;d<e.length;d++){for(var[r,n,s]=e[d],a=!0,u=0;u<r.length;u++)(!1&s||o>=s)&&Object.keys(i.O).every((e=>i.O[e](r[u])))?r.splice(u--,1):(a=!1,s<o&&(o=s));if(a){e.splice(d--,1);var c=n();void 0!==c&&(t=c)}}return t}s=s||0;for(var d=e.length;d>0&&e[d-1][2]>s;d--)e[d]=e[d-1];e[d]=[r,n,s]},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((t,r)=>(i.f[r](e,t),t)),[])),i.u=e=>({2:"project-generator/app",439:"ui5-application-writer/dist",475:"tools-suite-common-libs",689:"ux-service-inquirer",705:"fiori-freestyle-writer/dist",712:"commonlibs",763:"app-gen-shared",784:"open-ux-shared",916:"odata-service-writer/dist"}[e]+"/index.js"),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),i.j=815,i.p="",(()=>{var e={815:1,190:1,673:1};i.O.require=t=>e[t];i.f.require=(t,r)=>{e[t]||(t=>{var r=t.modules,n=t.ids,s=t.runtime;for(var o in r)i.o(r,o)&&(i.m[o]=r[o]);s&&s(i);for(var a=0;a<n.length;a++)e[n[a]]=1;i.O()})(require("../"+i.u(t)))}})(),t=i.x,i.x=()=>(i.e(712),i.e(784),i.e(916),i.e(439),i.e(705),i.e(475),i.e(763),i.e(689),i.e(2),t());var s=i.x();module.exports=s})(); |
@@ -1,1 +0,1 @@ | ||
(()=>{var e,t,n={51617:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=51617,e.exports=t},39973:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=39973,e.exports=t},20230:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=20230,e.exports=t},20545:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=20545,e.exports=t},4297:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=4297,e.exports=t},75601:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=75601,e.exports=t},82626:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=82626,e.exports=t},37974:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=37974,e.exports=t},85858:(e,t,n)=>{var r={"./cat":43112,"./cat.js":43112,"./cd":86698,"./cd.js":86698,"./chmod":23986,"./chmod.js":23986,"./common":96816,"./common.js":96816,"./cp":80610,"./cp.js":80610,"./dirs":91972,"./dirs.js":91972,"./echo":16166,"./echo.js":16166,"./error":80609,"./error.js":80609,"./exec":52024,"./exec-child":69911,"./exec-child.js":69911,"./exec.js":52024,"./find":22261,"./find.js":22261,"./grep":56818,"./grep.js":56818,"./head":66412,"./head.js":66412,"./ln":91247,"./ln.js":91247,"./ls":5815,"./ls.js":5815,"./mkdir":70098,"./mkdir.js":70098,"./mv":74164,"./mv.js":74164,"./popd":99851,"./popd.js":99851,"./pushd":6978,"./pushd.js":6978,"./pwd":24044,"./pwd.js":24044,"./rm":44256,"./rm.js":44256,"./sed":43422,"./sed.js":43422,"./set":17444,"./set.js":17444,"./sort":53033,"./sort.js":53033,"./tail":50318,"./tail.js":50318,"./tempdir":16275,"./tempdir.js":16275,"./test":50021,"./test.js":50021,"./to":44915,"./to.js":44915,"./toEnd":13326,"./toEnd.js":13326,"./touch":57650,"./touch.js":57650,"./uniq":63019,"./uniq.js":63019,"./which":5483,"./which.js":5483};function i(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}i.keys=function(){return Object.keys(r)},i.resolve=o,e.exports=i,i.id=85858},55079:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deleteCachedServiceProvider=t.getOrCreateServiceProvider=void 0;const r=n(62637),i=n(14425);let o,s;t.getOrCreateServiceProvider=async function(e,t){return o&&s?.isSameSystem&&s?.isSameSystem(e.url,e.client)||(o=e?.getConnection()&&e?.getConnection()?.cookies?await async function(e){if((0,i.isAppStudio)()){const t=await(0,i.listDestinations)(),n=e.config.destination;o=(0,r.createForDestination)({cookies:e.getConnection().cookies.toString()},t[n])}else o=e?.isScp()?(0,r.createForAbapOnCloud)({environment:r.AbapCloudEnvironment.Standalone,service:{url:e.url},ignoreCertErrors:!1,cookies:e.getConnection().cookies.toString()}):(0,r.createForAbap)({baseURL:e?.url,ignoreCertErrors:!1,cookies:e?.getConnection().cookies.toString()});return o}(e):await async function(e,t){if((0,i.isAppStudio)()){const n=await(0,i.listDestinations)(),s=e.config.destination,a=t.username?{auth:{username:t.username,password:t.password}}:{};o=(0,r.createForDestination)({...a},n[s])}else o=e?.isScp()?(0,r.createForAbapOnCloud)({refreshToken:e.credentials?.refreshToken,environment:r.AbapCloudEnvironment.Standalone,service:e.credentials?.serviceKeysContents}):(0,r.createForAbap)({baseURL:e?.url,ignoreCertErrors:!1,auth:{username:t.username??e?.username,password:t.password??e?.password}});return o}(e,t),s=e),o},t.deleteCachedServiceProvider=function(){o=void 0}},62283:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createTransportNumberFromService=void 0;const r=n(55079),i=n(62637);t.createTransportNumberFromService=async function(e,{credentials:t,system:n}){try{const o=await(0,r.getOrCreateServiceProvider)(n,t),s=await o.getAdtService(i.TransportRequestService);return await s.createTransportRequest(e)}catch(e){return null}}},98308:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(55079),t),i(n(24105),t),i(n(81547),t)},56821:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.listPackagesFromService=void 0;const r=n(55079),i=n(62637),o=n(1937);t.listPackagesFromService=async function(e,{credentials:t,system:n}){try{const s=await(0,r.getOrCreateServiceProvider)(n,t),a=await s.getAdtService(i.ListPackageService);return await a.listPackages({maxResults:o.ABAP_PACKAGE_SEARCH_MAX_RESULTS,phrase:e})}catch(e){return[]}}},24105:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTransportConfigInstance=void 0;const r=n(1937),i=n(31881),o=n(55079),s=n(73056),a=n(62637);class DummyTransportConfig{getPackage(){}getApplicationPrefix(){}isTransportRequired(){return!1}getDefaultTransport(){}getOperationsType(){}}class DefaultTransportConfig{constructor(){this.atoSettings={},this.defaultTransport=void 0}getDefaultTransport(){return this.defaultTransport}getPackage(){return this.atoSettings.devPackage}getApplicationPrefix(){return this.atoSettings.devPrefix}isTransportRequired(){return!!this.atoSettings.isTransportRequestRequired}getOperationsType(){return this.atoSettings?.operationsType}async init({credentials:e,system:t}){const n={};try{const r=await(0,o.getOrCreateServiceProvider)(t,e),i=await r.getAdtService(a.AtoService),s=await i.getAtoInfo();n.error=this.handleAtoResponse(s)}catch(e){if((0,o.deleteCachedServiceProvider)(),e.response?.status===r.HttpStatus.UNAUTHORIZED){e.response.headers["www-authenticate"]?.toLowerCase()?.startsWith("basic")&&(n.transportConfigNeedsCreds=!0)}else n.warning=e?.toString(),n.transportConfigNeedsCreds=!1}const i=!n.error&&!n.transportConfigNeedsCreds;return n.transportConfig=i?this:this.getDummyConfig(),n}handleAtoResponse(e){let t=!1;if(this.atoSettings=(0,s.uniformAtoFormat)(e),this.atoSettings.isConfigured&&"CUSTOMER"===this.atoSettings.tenantType&&"C"===this.atoSettings.operationsType){if(!this.atoSettings.isExtensibilityDevSystem)return(0,i.t)("ERROR_S4_SYSTEM_NOT_EXTENSIBLE");if(!this.atoSettings.devPrefix)return(0,i.t)("ERROR_INCORRECT_ATO_SETTINGS");t=!0,this.applyS4CDefaults()}t||(this.atoSettings={operationsType:this.atoSettings.operationsType})}applyS4CDefaults(){this.defaultTransport=DefaultTransportConfig.S4C_DEFAULT_TRANSPORT,this.atoSettings.isTransportRequestRequired=!1,this.atoSettings.devPackage=DefaultTransportConfig.S4C_DEFAULT_PACKAGE}getDummyConfig(){const e=new DummyTransportConfig;return e.getOperationsType=this.getOperationsType,e}}DefaultTransportConfig.S4C_DEFAULT_TRANSPORT="",DefaultTransportConfig.S4C_DEFAULT_PACKAGE="TEST_YY1_DEFAULT",t.getTransportConfigInstance=async function({scp:e,credentials:t={},system:n}){return e?{transportConfig:new DummyTransportConfig}:(new DefaultTransportConfig).init({credentials:t,system:n})}},81547:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transportName=t.getTransportListFromService=void 0;const r=n(55079),i=n(62637);t.getTransportListFromService=async function(e,t,{credentials:n,system:o}){try{const s=await(0,r.getOrCreateServiceProvider)(o,n),a=await s.getAdtService(i.TransportChecksService);return(await a.getTransportRequests(e,t)).map((e=>{const t=e.description.replace(/^(.{20}[^\s]*).*/,"$1...");return{transportReqNumber:e.transportNumber,transportReqDescription:t}}))}catch(e){return[]}};t.transportName=e=>({name:e.transportReqDescription?`${e.transportReqNumber} (${e.transportReqDescription})`:`${e.transportReqNumber}`,value:e.transportReqNumber})},73056:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useCreateTrDuringDeploy=t.CREATE_TR_DURING_DEPLOY=t.getTargetSystemChoices=t.isLocalPackage=t.uniformAtoFormat=t.isScp=t.handleProjectDoesNotExist=t.abapDeployConfigExists=t.indexHtmlExists=t.readExistingDeployTaskConfig=t.initBaseConfig=t.getSuggestedClient=t.getUrlAnswer=void 0;const r=n(1937),i=n(31881),o=n(68802),s=n(43895),a=n(28033),_=n(71017);t.getUrlAnswer=function(e,t){if(e.isAppStudio&&t?.destination===e?.backendConfig?.destination)return e.answers.url;{let e=t.targetSystem;return t.targetSystem&&"NoUrlSelected"!==t.targetSystem||!t.url||(e=t.url),e}},t.getSuggestedClient=function(e){let t;const n=e.scripts?.start;return n&&n.includes("sap-client")&&(t=n.split("sap-client")[1].match(/\d{1,3}/g).map(String)[0]),t},t.initBaseConfig=function(e,t){t.baseConfig=(0,o.readYaml)(e);const n=t.baseConfig.toJSON();t.baseMetadataName=n.metadata?.name,t.backendConfig=n?.server?.customMiddleware?.find((e=>e?.name===r.FIORI_TOOLS_PROXY))?.configuration?.backend?.[0]},t.readExistingDeployTaskConfig=function(e){if(e)try{const t=(0,o.readYaml)(e)?.toJSON();return t?.builder?.customTasks?.find((e=>e.name===r.ABAP_DEPLOY_TASK))?.configuration}catch(e){return}},t.indexHtmlExists=async function(e,t){const n=await(0,a.getUi5CustomWebappPath)(t),r=(0,_.join)(t,n,"index.html");return e.exists(r)},t.abapDeployConfigExists=function(e,t){return e.exists(t)},t.handleProjectDoesNotExist=function(e){const t=i.ErrorMessages.fileDoesNotExist(e.destinationPath(e.options.base));throw e.abort=!0,(0,i.handleErrorMessage)(e,e.appWizard,t),i.ErrorMessages.ABORT_SIGNAL},t.isScp=function(e,t){for(const n in t){const r=t[n];if(r.value===e)return r.scp}return!1},t.uniformAtoFormat=function(e){return Object.keys(e).includes("developmentPackage")&&(e.devPackage=e.developmentPackage),Object.keys(e).includes("developmentPrefix")&&(e.devPrefix=e.developmentPrefix),Object.keys(e).includes("isExtensibilityDevelopmentSystem")&&(e.isExtensibilityDevSystem=e.isExtensibilityDevelopmentSystem),e},t.isLocalPackage=function(e){return/^[$LlTt]/.test(e)},t.getTargetSystemChoices=async function(e,t){const n=[];if(!(0,s.isAppStudio)()){let r=!0;n.push({name:(0,i.t)("PROMPT_ABAP_ENTER_TARGET"),value:"NoUrlSelected"}),t?.unSaved&&(n.push({name:`${t.getDisplayName()} (Source system)`,value:t.url,client:t.client,isDefault:!0,scp:t.isScp()}),r=!1);const o=await(0,i.getSapSystems)();Object.values(o).forEach((t=>{let i=!1;r&&(i=t.url===e?.url&&(t.client||"")===(e?.client||"")),n.push({name:i?`${t.getDisplayName()} (Source system)`:t.getDisplayName(),value:t.url,client:t.client,isDefault:i,scp:t.isScp()})}))}return n},t.CREATE_TR_DURING_DEPLOY="REPLACE_WITH_TRANSPORT",t.useCreateTrDuringDeploy=function(e){return e.existingDeployTaskConfig?.app?.transport===t.CREATE_TR_DURING_DEPLOY}},82546:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getS4Prompts=void 0;const r=n(28212);t.getS4Prompts=function(e){return[{type:"confirm",name:"s4Continue",message:(0,r.t)("PROMPT_LABEL_S4_CONTINUE",{configType:e}),default:!1}]}},1937:(e,t)=>{"use strict";var n,r,i;Object.defineProperty(t,"__esModule",{value:!0}),t.generatorNamespace=t.bundledRootGeneratorName=t.i18nKeySubTitle=t.i18nKeyTitle=t.ABAP_PACKAGE_SEARCH_MAX_RESULTS=t.API_BUSINESS_HUB_ENTERPRISE_PREFIX=t.MANAGED_XSUAA=t.UI5_URL=t.SRV_API_DEFAULT_URL=t.SRV_API=t.DEFAULT_MTA_DESTINATION=t.MTA_DESTINATION=t.XS_SECURITY=t.MTA_EXTENSION_FILE=t.MTA_YAML=t.PACKAGE_JSON=t.DEPLOY_MODE=t.UI5_YAML=t.UI5_DEPLOY=t.XS_APP=t.RIMRAF=t.RIMRAF_VERSION=t.MBT=t.MBT_VERSION=t.UI5_TASK_FLATTEN_LIB_VERSION=t.UI5_TASK_FLATTEN_LIB=t.ABAP_DEPLOY_TASK=t.WELCOME_FILE=t.DESTINATION_AUTHTYPE_NOAUTH=t.DESTINATION_AUTHTYPE_NOTFOUND=t.DESTINATION_CHOICE_DIRECT_SERVICE_BINDING=t.DESTINATION_CHOICE_NONE=t.RouterModuleType=t.HttpStatus=t.MTA_VERSION=t.MTA_DESCRIPTION=t.TargetName=t.CDS_ADD_MTA_COMMAND_ARGS=t.MTA_PKG=t.MTA_EXECUTABLE=t.CDS_PKG=t.CDS_EXECUTABLE=t.ROUTER_MODULE=t.CLOUD_FOUNDRY_FOLDER=t.FIORI_TOOLS_PROXY=t.DEPLOYER_MODULE_TYPE=t.ROUTER_MODULE_TYPE=void 0,t.ROUTER_MODULE_TYPE="approuter.nodejs",t.DEPLOYER_MODULE_TYPE="com.sap.html5.application-content",t.FIORI_TOOLS_PROXY="fiori-tools-proxy",t.CLOUD_FOUNDRY_FOLDER="cf",t.ROUTER_MODULE="router",t.CDS_EXECUTABLE="cds",t.CDS_PKG="@sap/cds-dk",t.MTA_EXECUTABLE="mta",t.MTA_PKG="mta",t.CDS_ADD_MTA_COMMAND_ARGS=["add","mta"],function(e){e.ABAP="abap",e.CF="cf"}(n||(t.TargetName=n={})),t.MTA_DESCRIPTION="Fiori elements app",t.MTA_VERSION="0.0.1",function(e){e[e.UNAUTHORIZED=401]="UNAUTHORIZED"}(r||(t.HttpStatus=r={})),function(e){e.Standard="Standard",e.Managed="Managed"}(i||(t.RouterModuleType=i={})),t.DESTINATION_CHOICE_NONE="NONE",t.DESTINATION_CHOICE_DIRECT_SERVICE_BINDING="DIRECT_SERVICE_BINDING",t.DESTINATION_AUTHTYPE_NOTFOUND="NotAvailable",t.DESTINATION_AUTHTYPE_NOAUTH="NoAuthentication",t.WELCOME_FILE="welcomeFile",t.ABAP_DEPLOY_TASK="deploy-to-abap",t.UI5_TASK_FLATTEN_LIB="ui5-task-flatten-library",t.UI5_TASK_FLATTEN_LIB_VERSION="0.2.5",t.MBT_VERSION="^1.2.18",t.MBT="mbt",t.RIMRAF_VERSION="^3.0.2",t.RIMRAF="rimraf",t.XS_APP="xs-app.json",t.UI5_DEPLOY="ui5-deploy.yaml",t.UI5_YAML="ui5.yaml",t.DEPLOY_MODE="deploy_mode",t.PACKAGE_JSON="package.json",t.MTA_YAML="mta.yaml",t.MTA_EXTENSION_FILE="mta-ext.mtaext",t.XS_SECURITY="xs-security.json",t.MTA_DESTINATION="%s-srv-api",t.DEFAULT_MTA_DESTINATION="fiori-default-srv-api",t.SRV_API="srv-api",t.SRV_API_DEFAULT_URL="${default-url}",t.UI5_URL="https://ui5.sap.com",t.MANAGED_XSUAA="managed:xsuaa",t.API_BUSINESS_HUB_ENTERPRISE_PREFIX="ABHE",t.ABAP_PACKAGE_SEARCH_MAX_RESULTS=50,t.i18nKeyTitle="flpTitle",t.i18nKeySubTitle="flpSubtitle",t.bundledRootGeneratorName="@sap/fiori:fiori-deployment";t.generatorNamespace=e=>`${t.bundledRootGeneratorName}_${e}`},26649:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=s(n(98819)),_=n(31881),c=n(25184),u=o(n(71017)),d=n(1628),l=n(82546),p=n(6903),E=n(72089),T=n(9949),P=n(28033),A=n(37705),O=n(1937);class default_1 extends a.default{constructor(e,t){t.force=!0,super(e,t,{unique:"namespace"}),this.exit=!1,this.appWizard=t.appWizard||c.AppWizard.create(t),t.data?.appRootPath?this.appRootPath=t.data.appRootPath:t.projectPath&&t.projectName?this.appRootPath=u.default.join(t.projectPath,t.projectName):this.appRootPath=this.destinationRoot(),t.launchFlpConfigAsSubGenerator||(this.prompts=new c.Prompts([{name:(0,d.t)("FLP_CONFIG"),description:(0,d.t)("DESCRIPTION_FLP_CONFIG_GENERATOR",{appFolderName:` - ${u.default.basename(this.appRootPath)}`})}]),this.setPromptsCallback=e=>{this.prompts&&this.prompts.setCallback(e)},this.existingApp=!0,(0,A.enableFeature)(d.Features.enableAnswerBreadcrumbs))}async initializing(){this.existingApp&&(this.manifestPath=(0,u.join)(await(0,T.getWebappPath)(this.appRootPath),T.FileName.Manifest),this.manifest=this.fs.readJSON(this.manifestPath),this.manifest||(0,_.handleErrorMessage)(this,this.appWizard,(0,_.t)("ERROR_NO_MANIFEST_AT_PATH",{path:this.manifestPath})),this.manifest["sap.app"]||(0,_.handleErrorMessage)(this,this.appWizard,(0,_.t)("ERROR_SAP_APP_NOT_DEFINED")))}async prompting(){if(this.options.launchFlpConfigAsSubGenerator&&void 0!==this.options.inboundConfig?.semanticObject&&void 0!==this.options.inboundConfig?.action&&void 0!==this.options.inboundConfig?.title&&this.options.skipPrompt)return void(this.answers={overwrite:!0,semanticObject:this.options.inboundConfig.semanticObject,action:this.options.inboundConfig.action,title:this.options.inboundConfig.title,subTitle:this.options.inboundConfig.subTitle});let e;this.manifest?.["sap.app"]?.crossNavigation?.inbounds&&(e=Object.keys(this.manifest["sap.app"].crossNavigation.inbounds));const t=this.options.overwrite;let n=(0,p.getQuestions)(e,t);if(((0,d.getPlatform)()===d.PLATFORMS.CLI||!this.options.launchFlpConfigAsSubGenerator)&&await(0,_.isS4Installed)(this.options.vscode?.workspace?.getConfiguration())){const e=(0,l.getS4Prompts)("FLP");n=(0,d.withCondition)(n,(e=>e.s4Continue)),n.unshift(...e)}this.answers={};const r=await this.prompt(n);(!1===r.s4Continue||!1===r.overwrite&&!t)&&(this.exit=!0,process.exit(0)),""===r.subTitle&&(r.subTitle=void 0),Object.assign(this.answers,r)}async writing(){!1===this.exit&&this.existingApp&&await this._updateFiles(this.answers)}async end(){!1!==this.exit||this.existingApp||(this.manifestPath=(0,u.join)(await(0,T.getWebappPath)(this.appRootPath),T.FileName.Manifest),this.manifest=this.fs.readJSON(this.manifestPath),await this._updateFiles(this.answers))}async _updateFiles({semanticObject:e,action:t,title:n,subTitle:r}){const i=await this._updateI18n(u.default.dirname(this.manifestPath),this.manifest,{title:n,subTitle:r});await(0,E.generateInboundNavigationConfig)(this.appRootPath,{semanticObject:e,action:t,title:i?`{{${O.i18nKeyTitle}}}`:n,subTitle:i&&r?`{{${O.i18nKeySubTitle}}}`:r},!0,this.fs)}async _updateI18n(e,t,{title:n,subTitle:r}){const i=(0,P.getI18nPaths)(e,t)["sap.app"];if(i)try{const e=[{key:O.i18nKeyTitle,value:n}];return r&&e.push({key:O.i18nKeySubTitle,value:r}),await(0,P.updateI18nProperties)(i,e),!0}catch(e){const t=(0,_.t)("WARNING_CANNOT_UPDATE_I18N",{path:i});this.appWizard.showWarning(t,c.MessageType.notification),this.log(t)}else this.log((0,_.t)("WARNING_I18N_FILE_PATH_NOT_FOUND_IN_MANIFEST"))}}t.default=default_1},6903:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(30514),t)},30514:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getQuestions=void 0;const r=n(25184),i=n(31881),o=n(1628);function s(e,t,n=0){return 0===e?.trim().length?(0,i.t)("PROMPT_VALIDATION_WARNING_INPUT_REQUIRED",{inputName:t}):!(n&&e.length>n)||(0,i.t)("PROMPT_VALIDATION_WARN_MAX_LENGTH",{maxLength:n})}t.getQuestions=function(e=[],t=!1){const n=(0,o.getPlatform)()===o.PLATFORMS.CLI;let a=!1;const _=(0,i.t)("PROMPT_FLPCONF_SEMANTIC_OBJECT"),c=(0,i.t)("PROMPT_FLPCONF_ACTION"),u=(0,i.t)("PROMPT_FLPCONF_TITLE");return[{name:"semanticObject",type:"input",guiOptions:{mandatory:!0,breadcrumb:(0,o.breadcrumbHelper)()},message:_,filter:e=>e?.trim(),validate:e=>s(e,_,30)},{name:"action",type:"input",guiOptions:{mandatory:!0,breadcrumb:(0,o.breadcrumbHelper)()},message:(0,i.t)("PROMPT_FLPCONF_ACTION"),filter:e=>e?.trim(),validate:e=>s(e,c,60)},{type:"confirm",name:"overwrite",message:e=>`${n?(0,i.t)("WARN_MESSAGE_FLPCONF_INBOUND_CONFIG_KEY_EXISTS",{inboundKey:`${e.semanticObject}-${e.action}`}):""}${(0,i.t)("PROMPT_FLPCONF_OVERWRITE")}`,guiOptions:{applyDefaultWhenDirty:!0},default:()=>!a,additionalMessages:(e,t)=>({message:(0,i.t)("WARN_MESSAGE_FLPCONF_INBOUND_CONFIG_KEY_EXISTS",{inboundKey:`${t.semanticObject}-${t.action}`}),severity:r.Severity.warning}),when:t=>(a=e.indexOf(`${t?.semanticObject}-${t?.action}`)>-1,a)},{when:({overwrite:e})=>!1!==e||!a||t,name:"title",type:"input",guiOptions:{mandatory:!0,breadcrumb:(0,o.breadcrumbHelper)()},message:(0,i.t)("PROMPT_FLPCONF_TITLE"),filter:e=>e?.trim(),validate:e=>s(e,u)},{when:({overwrite:e})=>!1!==e||!a||t,name:"subTitle",type:"input",guiOptions:{breadcrumb:(0,o.breadcrumbHelper)((0,i.t)("LABEL_FLP_SUBTITLE_BREADCRUMB"))},message:(0,i.t)("PROMPT_FLPCONF_SUBTITLE"),filter:e=>e?.trim()}]}},40120:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debug=void 0;const r=n(1628);t.debug=function(e,t){(0,r.getPlatform)()!==r.PLATFORMS.CLI&&e(`[YUI DEBUG] ${t}`)}},42899:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findSapSystem=t.getSapSystems=t.generateDestinationName=t.getCfDestinationChoices=void 0;const r=n(77090);let i={};async function o(e=!0){return e&&0!==Object.keys(i).length||(i=await(0,r.listSAPSystems)()),i}t.getCfDestinationChoices=async function(e=!1){const t=await o();return Object.values(t).map((t=>({name:`${t.name}${t.isScp()?"(SCP)":""} - ${t.url}`,value:e?t:t.name,scp:t.isScp(),url:t.url})))},t.generateDestinationName=function(e,t){return`${e}_${t.replace(/(^\/)|(\/$)/g,"").replace(/\//g,"_")}`},t.getSapSystems=o,t.findSapSystem=function(e,t){return t?.["string"==typeof e?e:e.name]}},35117:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorMessages=void 0;const r=n(1937),i=n(28212),o=(e,t)=>(0,i.t)("ERROR_CANNOT_FIND_BINARY",{bin:e,pkg:t});class ErrorMessages{}t.ErrorMessages=ErrorMessages,ErrorMessages.ABORT_SIGNAL="ABORT_SIGNAL",ErrorMessages.noManifest=(0,i.t)("ERROR_NO_MANIFEST"),ErrorMessages.noAppName=(0,i.t)("ERROR_NO_APPNAME"),ErrorMessages.noCdsBin=o(r.CDS_EXECUTABLE,r.CDS_PKG),ErrorMessages.noMtaBin=o(r.MTA_EXECUTABLE,r.MTA_PKG),ErrorMessages.noMta=(0,i.t)("ERROR_NO_MTA"),ErrorMessages.noPath=(0,i.t)("ERROR_NO_PATH"),ErrorMessages.noMtaId=(0,i.t)("ERROR_NO_MTA_ID"),ErrorMessages.invalidMtaId=(0,i.t)("ERROR_INVALID_MTA_ID"),ErrorMessages.capDeploymentnoMta=(0,i.t)("ERROR_CAP_DEPLOYMENT_NO_MTA"),ErrorMessages.mtaIdAlreadyExist=e=>(0,i.t)("ERROR_MTA_ID_ALREADY_EXIST",{destinationRoot:e}),ErrorMessages.noMtaInRoot=e=>(0,i.t)("ERROR_NO_MTA_ROOT",{mtaFileName:r.MTA_YAML,root:e}),ErrorMessages.unrecognizedTarget=e=>(0,i.t)("ERROR_UNRECOGNIZED_TARGET",{target:e}),ErrorMessages.cannotReadUi5Config=e=>(0,i.t)("ERROR_CANNOT_READ_UI5_CONFIG",{reason:e}),ErrorMessages.fileDoesNotExist=e=>(0,i.t)("ERROR_FILE_NOT_EXIST",{filePath:e}),ErrorMessages.folderDoesNotExist=e=>(0,i.t)("ERROR_FOLDER_NOT_EXIST",{filePath:e}),ErrorMessages.invalidClient=e=>(0,i.t)("ERROR_INVALID_CLIENT",{client:e}),ErrorMessages.invalidURL=e=>(0,i.t)("ERROR_INVALID_URL",{input:e})},68802:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.writeUi5RepositoryFiles=t.writeUi5RepositoryFile=t.getYamlType=t.readYaml=t.addUi5Dependency=t.addPackageDevDependency=t.updatePackageScript=t.dirExists=t.BUILD_MTA_SCRIPT_TEMP=t.DEPLOY_MTA_SCRIPT_TEMP=t.UNDEPLOY_MTA_SCRIPT_TEMP=t.DEPLOY_MTA_SCRIPT=t.BUILD_MTA_SCRIPT=t.BUILD_SCRIPT=void 0;const a=n(57147),_=n(71017),c=o(n(52375)),u=n(1937),d=s(n(37865)),l=s(n(26692)),p=n(28033);t.BUILD_SCRIPT="ui5 build preload --clean-dest --config ui5-deploy.yaml --include-task=generateCachebusterInfo",t.BUILD_MTA_SCRIPT="rimraf resources mta_archives && mbt build";t.DEPLOY_MTA_SCRIPT=(e=[])=>"fiori cfDeploy"+(e.length>0?` ${e.join(" ")}`:"");t.UNDEPLOY_MTA_SCRIPT_TEMP=e=>`cf undeploy ${e} --delete-services --delete-service-keys --delete-service-brokers`;function E(e){return c.parseDocument((0,a.readFileSync)(e,"utf-8"))}t.DEPLOY_MTA_SCRIPT_TEMP=(e=[])=>`cf deploy mta_archives/archive.mtar ${e.length>0?`${e.join(" ")} `:""}--retries 1`,t.BUILD_MTA_SCRIPT_TEMP="rimraf resources mta_archives && mbt build --mtar archive",t.dirExists=function(e){try{return(0,a.statSync)(e)?.isDirectory()}catch{return!1}},t.updatePackageScript=function(e,t,n,r,i=!1){const o=(0,_.join)(e,u.PACKAGE_JSON),s=JSON.parse((0,a.readFileSync)(o,"utf-8"));if(s.scripts||(s.scripts={}),s.scripts[t]=n,r){const{devDependencies:e={},ui5:t={}}=s;s.devDependencies=e,i&&(s.ui5={...t,dependencies:t.dependencies??[]});for(const e in r)s.devDependencies[e]||(s.devDependencies[e]=r[e]),i&&!s.ui5.dependencies.find((t=>t===e))&&s.ui5.dependencies.push(e)}(0,a.writeFileSync)(o,JSON.stringify(s,null,4))},t.addPackageDevDependency=function(e,t,n){const r=(0,_.join)(e,u.PACKAGE_JSON),i=JSON.parse((0,a.readFileSync)(r,"utf-8"));i.devDependencies=i.devDependencies||{},i.devDependencies[t]||(i.devDependencies[t]=n),(0,a.writeFileSync)(r,JSON.stringify(i,null,4))},t.addUi5Dependency=function(e,t){const n=(0,_.join)(e,u.PACKAGE_JSON),r=JSON.parse((0,a.readFileSync)(n,"utf-8"));r.ui5=r.ui5||{},r.ui5.dependencies=r.ui5.dependencies||[],r.ui5.dependencies.includes(t)||r.ui5.dependencies.push(t),(0,a.writeFileSync)(n,JSON.stringify(r,null,4))},t.readYaml=E,t.getYamlType=function(e,t){let n;const r=(0,_.join)(e,t);if((0,a.existsSync)(r)){n=E(r).toJSON().type}return n};t.writeUi5RepositoryFile=(e,t,n)=>{const r=(0,_.join)(e,t);let i;(0,a.existsSync)(r)?(i=(0,a.readFileSync)(r,"utf-8"),i.includes(n)||(i=`${i}\n${n}`)):i=n,(0,a.writeFileSync)(r,i)};t.writeUi5RepositoryFiles=async e=>{const n=(0,_.join)(e,await(0,p.getUi5CustomWebappPath)(e));(await(0,d.default)((0,l.default)((0,_.join)(n,"/**/*.ts"))))?.length>0&&(0,t.writeUi5RepositoryFile)(n,".Ui5RepositoryTextFiles","^.*.ts$")}},28212:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.t=t.addTranslations=t.initI18n=void 0;const i=r(n(73577)),o=r(n(91046)),s="deploy";async function a(){await i.default.init({resources:{en:{[s]:o.default}},lng:"en",fallbackLng:"en",defaultNS:s,ns:[s]})}t.initI18n=a,t.addTranslations=function(e,t){i.default.addResources("en",t,e)},t.t=function(e,t){return t={...t,interpolation:{...t?.interpolation,escapeValue:!1}},i.default.t(e,t)},a()},31881:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.t=t.ErrorMessages=t.isS4Installed=t.loadManifest=t.parseTarget=t.getEnvApiHubConfig=t.isAppStudio=t.CF_ENV=t.handleErrorMessage=t.bail=t.toMtaModuleName=void 0;const o=n(1628),s=n(40120),a=n(25184),_=n(71017),c=n(16484),u=n(28033),d=n(35117);function l({errorMessage:e}){throw new Error(e)}var p;t.toMtaModuleName=function(e){return e.replace(/[`~!@#$%^&*()_|+\-=?;:'",.<>]/gi,"")},t.bail=l,t.handleErrorMessage=function(e,t,n){(0,o.getPlatform)()===o.PLATFORMS.CLI?l({errorMessage:n}):(e.transportConfigError=n,(0,s.debug)(e.log,n),t?.showError(n,a.MessageType.notification))},function(e){e.H2O_URL="H2O_URL"}(p||(t.CF_ENV=p={})),t.isAppStudio=function(){return!!process.env[p.H2O_URL]},t.getEnvApiHubConfig=function(){const e=process.env[o.API_HUB_API_KEY],t=process.env[o.API_HUB_TYPE];return e?{apiHubKey:e,apiHubType:"API_HUB_ENTERPRISE"===t?"API_HUB_ENTERPRISE":"API_HUB"}:void 0},t.parseTarget=function(e,t){let n;return e&&("string"==typeof e?n=e:Array.isArray(e)&&(n=e?.[0])),n||(n=t.target),n},t.loadManifest=async function(e){let t;try{t=new c.Manifest((0,_.join)(e,await(0,u.getUi5CustomWebappPath)(e)))}catch{l({errorMessage:d.ErrorMessages.noManifest})}return t?.appId||l({errorMessage:d.ErrorMessages.noAppName}),t},t.isS4Installed=async function(e){return(await(0,o.findInstalledPackages)("@sapux/s4-fiori-gen-ext",{keyword:"fiori-generator-extension",vscWorkspaceConfig:e})).length>0};var E=n(35117);Object.defineProperty(t,"ErrorMessages",{enumerable:!0,get:function(){return E.ErrorMessages}});var T=n(28212);Object.defineProperty(t,"t",{enumerable:!0,get:function(){return T.t}}),i(n(40120),t),i(n(74475),t),i(n(42899),t)},16484:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Manifest=t.idPropertyPath=t.inboundsPropertyPath=t.crossNavigationPropertyPath=void 0;const s=o(n(57147)),a=o(n(71017)),_="sap.app";t.crossNavigationPropertyPath=[_,"crossNavigation"],t.inboundsPropertyPath=[...t.crossNavigationPropertyPath,"inbounds"],t.idPropertyPath=[_,"id"];t.Manifest=class Manifest{constructor(e){this.CONFIG_FILE="manifest.json",this.manifestPath=e,this.contents=JSON.parse((0,s.readFileSync)(this.manifestPath).toString())}set manifestPath(e){this._appPath=a.join(e,this.CONFIG_FILE)}get manifestPath(){return this._appPath}get appId(){return this.contents?.["sap.app"]?.id}get applicationVersion(){return this.contents["sap.app"]?.applicationVersion?.version}get dataSources(){return this.contents["sap.app"].dataSources??{}}get mainService(){const e=this.contents["sap.ovp"]?this.contents["sap.ovp"].globalFilterModel:"",t=this.contents["sap.ui5"]&&this.contents["sap.ui5"].models&&this.contents["sap.ui5"].models[e]?this.contents["sap.ui5"].models[e].dataSource:void 0;return this.dataSources[t]}get inbound(){const e=this.contents["sap.app"].crossNavigation?.inbounds;return e?{name:Object.keys(e)?.[0],inbound:Object.values(e)?.[0]}:{}}set crossNavigation(e){this.contents["sap.app"].crossNavigation=e}get crossNavigation(){return this.contents["sap.app"].crossNavigation}get sapCloud(){return this.contents["sap.cloud"]}set sapCloud(e){this.contents["sap.cloud"]=e}get i18nFilePath(){return this.contents["sap.app"].i18n}write(e){e?.readJSON(this.manifestPath)?e.writeJSON(this.manifestPath,this.contents,null,4):s.default.writeFileSync(this.manifestPath,JSON.stringify(this.contents,null,4))}}},74475:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.listPackages=t.createTransportNumber=t.getTransportList=t.initTransportConfig=t.validateAppDescription=t.validateAppName=t.isValidClient=t.notExistsValidateClient=t.isValidURL=void 0;const r=n(31881),i=n(77090),o=n(98308),s=n(62283),a=n(56821);async function _(e,t){let n;return t?.isSameSystem?.(e.url,e.client)||t?.config?.destination&&e?.destination===t?.config?.destination&&t?.getConnection()?n=t:e.destination?e.destination&&(n=(0,i.newSapSystemForDestinaton)({destination:e.destination})):n=await async function(e,t){try{return await(0,i.getSapSystem)(e,t?.toString())}catch{return}}(e.url,e.client),n}function c(e){const t=e?.trim()||"";return""===t||!!t.match(/^[0-9]{3}$/)}t.isValidURL=function(e){try{const t=new URL(e);return!!t.protocol&&!!t.host}catch{return!1}},t.notExistsValidateClient=function(e){return!e.client||e.client&&!c(e.client)},t.isValidClient=c,t.validateAppName=function(e,t){const n=[],i=e?e.trim().length:0;if(i)if(e.split("/").length-1>=3)n.push((0,r.t)("PROMPT_ABAP_INVALID_NAMESPACE"));else if(e.match(/^\/.*\/\w*$/g)){const t=e.split("/");let i;t[1].length>10&&(i=(0,r.t)("PROMPT_ABAP_INVALID_NAMESPACE_LENGTH",{length:t[1].length})),t[2].length>15&&(i=`${i?i+", ":""}${(0,r.t)("PROMPT_ABAP_INVALID_APPNAME_LENGTH",{length:t[2].length})}`),i&&n.push(i)}else i>15&&n.push((0,r.t)("PROMPT_ABAP_INVALID_APPNAME_LENGTH",{length:i}));else n.push((0,r.t)("PROMPT_ABAP_APPNAME_REQUIRED"));return i&&(t&&!e?.toUpperCase()?.startsWith(t.toUpperCase())&&n.push((0,r.t)("PROMPT_ABAP_INVALID_APPNAME",{prefix:t})),e.match(/^[A-Za-z0-9_/]*$/)||n.push((0,r.t)("ERROR_CHARACTERS_FORBIDDEN_IN_APP_NAME"))),{valid:0===n.length,errorMessages:n.length?n.join("\n")+(n.length>1?"\n":""):void 0}},t.validateAppDescription=function(e){const t=[];return e.length>60&&t.push((0,r.t)("PROMPT_ABAP_APPDESC_LENGTH")),{valid:0===t.length,errorMessages:t.length?t.join("\n")+(t.length>1?"\n":""):void 0}},t.initTransportConfig=async function({scp:e,url:t,client:n,destination:r,credentials:i,sapSystem:s,errorHandler:a}){let c={};if(!t&&!r)return c;const u={url:t,client:n,destination:r};try{const t=await _(u,s);c=await(0,o.getTransportConfigInstance)({scp:e,credentials:i,system:t})}catch(e){c.error=e}return c.error&&a(c.error),c},t.getTransportList=async function(e,t,{url:n,client:r,destination:i,credentials:s,sapSystem:a}){if(!n&&!i)return[];const c={url:n,client:r,destination:i},u=await _(c,a),d=await(0,o.getTransportListFromService)(e,t,{system:u,credentials:s});return 1===d.length&&""===d[0].transportReqNumber?[]:d},t.createTransportNumber=async function(e,{url:t,client:n,destination:r,credentials:i,sapSystem:o}){if(!t&&!r)return null;const a={url:t,client:n,destination:r},c=await _(a,o);return(0,s.createTransportNumberFromService)(e,{system:c,credentials:i})},t.listPackages=async function(e,{url:t,client:n,destination:r,credentials:i,sapSystem:o}){if(!t&&!r)return[];const s={url:t,client:n,destination:r},c=await _(s,o);return(0,a.listPackagesFromService)(e,{system:c,credentials:i})}},34409:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=34409,e.exports=t},70910:(e,t,n)=>{var r={"./Find-VisualStudio.cs":20183,"./build":17724,"./build.js":17724,"./clean":1658,"./clean.js":1658,"./configure":4748,"./configure.js":4748,"./create-config-gypi":98395,"./create-config-gypi.js":98395,"./find-node-directory":24159,"./find-node-directory.js":24159,"./find-python":29130,"./find-python.js":29130,"./find-visualstudio":17703,"./find-visualstudio.js":17703,"./install":25925,"./install.js":25925,"./list":44179,"./list.js":44179,"./node-gyp":55614,"./node-gyp.js":55614,"./process-release":75344,"./process-release.js":75344,"./rebuild":64187,"./rebuild.js":64187,"./remove":13103,"./remove.js":13103,"./util":55690,"./util.js":55690};function i(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}i.keys=function(){return Object.keys(r)},i.resolve=o,e.exports=i,i.id=70910},84679:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=84679,e.exports=t},72869:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=72869,e.exports=t},12937:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=12937,e.exports=t},84397:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=84397,e.exports=t},54529:e=>{"use strict";e.exports=require("@opentelemetry/tracing")},85767:e=>{"use strict";e.exports=require("@sap/cds")},32220:e=>{"use strict";e.exports=require("applicationinsights-native-metrics")},43241:e=>{"use strict";e.exports=require("esprima")},74602:e=>{"use strict";e.exports=require("keytar")},66828:e=>{"use strict";e.exports=require("vscode")},39491:e=>{"use strict";e.exports=require("assert")},50852:e=>{"use strict";e.exports=require("async_hooks")},14300:e=>{"use strict";e.exports=require("buffer")},32081:e=>{"use strict";e.exports=require("child_process")},96206:e=>{"use strict";e.exports=require("console")},22057:e=>{"use strict";e.exports=require("constants")},6113:e=>{"use strict";e.exports=require("crypto")},9523:e=>{"use strict";e.exports=require("dns")},82361:e=>{"use strict";e.exports=require("events")},57147:e=>{"use strict";e.exports=require("fs")},73292:e=>{"use strict";e.exports=require("fs/promises")},13685:e=>{"use strict";e.exports=require("http")},95687:e=>{"use strict";e.exports=require("https")},98188:e=>{"use strict";e.exports=require("module")},41808:e=>{"use strict";e.exports=require("net")},22037:e=>{"use strict";e.exports=require("os")},71017:e=>{"use strict";e.exports=require("path")},77282:e=>{"use strict";e.exports=require("process")},85477:e=>{"use strict";e.exports=require("punycode")},63477:e=>{"use strict";e.exports=require("querystring")},14521:e=>{"use strict";e.exports=require("readline")},12781:e=>{"use strict";e.exports=require("stream")},71576:e=>{"use strict";e.exports=require("string_decoder")},39512:e=>{"use strict";e.exports=require("timers")},24404:e=>{"use strict";e.exports=require("tls")},76224:e=>{"use strict";e.exports=require("tty")},57310:e=>{"use strict";e.exports=require("url")},73837:e=>{"use strict";e.exports=require("util")},26144:e=>{"use strict";e.exports=require("vm")},59796:e=>{"use strict";e.exports=require("zlib")},91046:e=>{"use strict";e.exports=JSON.parse('{"DEPLOYMENT_CONFIG_GENERATOR":"Deployment Configuration","DEPLOYMENT_CONFIG_GENERATOR_DESC":"Deployment Configuration","DEPLOYMENT_CONFIG":"Deploy Configuration","DEPLOYMENT_CONFIG_DESC":"Create/Update deployment configuration","DEFAULT_PACKAGE":"$tmp","DEFAULT_ABAP_DESCRIPTION":"ABAP Deployment.","DEFAULT_MTA_DESCRIPTION":"Generated by Fiori Tools","FLP_CONFIG":"FLP Configuration","FLP_CONFIG_DESC":"Create/Update Fiori Launchpad configuration","SERVER_CONFIG":"Application Router Configuration","SERVER_CONFIG_DESC":"Configure the Cloud Foundry application router","STEP_PREPARE":"Prepare","STEP_PREPARE_DESC":"Select project location and choose configuration generator","STEP_DEPLOY_TARGET":"Deploy Target","STEP_DEPLOY_TARGET_DESC":"Select backend type: ABAP or Cloud Foundry","STEP_CONFIG":"Project Configuration","STEP_CONFIG_DESC":"Create or update your project configuration","PROMPT_YUI_PROJECT_FOLDER":"Choose project folder","PROMPT_YUI_SELECT_GENERATOR":"Select a configuration generator","ERROR_CANNOT_FIND_BINARY":"Cannot find the \\"{{bin}}\\" executable. Please add it to the path or use \\"npm i -g {{pkg}}\\" to install it.","ERROR_NO_MANIFEST_AT_PATH":"Manifest not found at path: {{- path}}","ERROR_NO_MANIFEST":"Error: could not read webapp/manifest.json","ERROR_SAP_APP_NOT_DEFINED":"Manifest is missing required section \'sap.app\'","WARNING_CANNOT_UPDATE_I18N":"Cannot update i18n properties file: {{- path}}","WARNING_I18N_FILE_PATH_NOT_FOUND_IN_MANIFEST":"i18n file path not found in manifest.json. Fiori launchpad texts not added.","PROMPT_ABAP_INVALID_NAMESPACE_LENGTH":"Namespace limited to 10 characters, entered {{length}}","PROMPT_ABAP_INVALID_NAMESPACE":"Namespace invalid as there are too many forward slashes","PROMPT_ABAP_APPDESC_LENGTH":"Deployment Description should not exceed 60 characters","ERROR_NO_APPNAME":"Could not determine app name from manifest","ERROR_NO_MTA":"Error: no mta.yaml exists. Please run the deployment generator first","ERROR_NO_MTA_ROOT":"Error: no {{mtaFileName}} in {{root}}","ERROR_UNRECOGNIZED_TARGET":"Unrecognized target: {{target}}","ERROR_NO_PATH":"Cannot find \\"path\\" in backend configuration in ui5.yaml","ERROR_CANNOT_READ_UI5_CONFIG":"Cannot read ui5.yaml: {{reason}}","ERROR_FILE_NOT_EXIST":"File does not exist: {{filePath}}","ERROR_FOLDER_NOT_EXIST":"Folder path does not exist: {{filePath}}","ERROR_INVALID_CLIENT":"[{{client}}] is invalid. Enter blank or a value between 000-999","ERROR_INVALID_URL":"Invalid URL: [{{input}}]","ERROR_S4_SYSTEM_NOT_EXTENSIBLE":"S4 system not configured as Extensibility Development system. Cannot deploy to it.","ERROR_INCORRECT_ATO_SETTINGS":"Incorrect ATO settings. Package or prefix settings mising.","ERROR_PARSE_ATO":"Failed to parse ATO Settings - [{{message}}]","ERROR_NO_APP_NAME":"Could not determine app name from manifest","ERROR_NO_APP_ID":"Could not determine app ID from manifest","ERROR_NO_INBOUND":"Could not determine inbound from the manifest","ERROR_MTA_ID_ALREADY_EXIST":"A folder with same name already exist at {{destinationRoot}}","ERROR_NO_MTA_ID":"MTA ID cannot be empty","ERROR_MTA_DESTINATIONS":"No destinations loaded from mta.yaml","ERROR_INVALID_MTA_ID":"The ID can only contain letters, numbers, dashes, periods and underscores (but no spaces).","ERROR_HYPHENS_FORBIDDEN_IN_APP_NAME":"\'-\' not allowed in application name","ERROR_CHARACTERS_FORBIDDEN_IN_APP_NAME":"Only alphanumeric, underscore and slash characters are allowed","ERROR_MTA_EXTENSION_FOR_ABHE_FAILED":"Unable to create or update the mta extension file for Api Hub Enterprise destination configuration: {{error}}","ERROR_MTA_EXTENSION_ADDITION_FAILED":"Unable to add mta extension configuration to file: {{mtaExtFilePath}}","ERROR_UNABLE_TO_LOAD_MTA":"Unable to load mta.yaml configuration","ERROR_FAILED_TO_LOAD_SERVICE_KEY":"Failed to fetch service key","ERROR_CAP_DEPLOYMENT_NO_MTA":"This Fiori application is within a CAP project and deployment should be configured as part of the CAP project.","INFO_EXISTING_MTA_EXTENSION_NOT_FOUND":"Cannot find a valid existing mta extension file, a new one will be created","INFO_MTA_EXT_CREATED":"Created file: {{mtaExtFile}} to extend mta module: {{appMtaId}} with destination configuration","INFO_MTA_EXT_UPDATED":"Updated file: {{mtaExtFile}} with module destination configuration","WARN_EXISTING_DESTINATION_SERVICE_NOT_FOUND":"A destination service resource cannot be found in the mta.yaml. An mta extension destination instance cannot be added","LOG_ATO_PACKAGE_WARN":"Warning: superceding entered package {{package}} with packaged mandated by backend ATO settings: {{backendPackage}}","LOG_ENTER_CREDENTIAL":"Please enter your credentials for: {{url}}","LOG_ENTER_CREDENTIAL_CLIENT":"Please enter your credentials for: {{url}} (Client {{client}})","LOG_ENTER_CREDENTIAL_DESTINATION":"Please enter your credentials for destination: {{destination}}","LOG_CORRECT_CREDENTIAL":"Correct credentials.","LOG_INCORRECT_CREDENTIAL":"Incorrect credentials. Try again","LOG_INCORRECT_APP_NAME":"Your package is in the customer space. Please check the correctness of the application name as it might need to start with a Z.","LOG_MOVE_APP_PATH":"Moving application to {{newAppPath}}","LOG_WIN_OS_MSG":"Windows OS specific: ","LOG_WIN_OS_CANNOT_MOVE_LOCKED_FILE":"{{winosSpecificMsg}}Cannot remove locked folder {{srcPath}}","LOG_FAILED_SERVICE_KEY":"Failed to fetch service key","LOG_UPDATED_MTA":"Updated mta.yaml","LOG_READ_MTA":"Read mta.yaml with prefix {{prefix}}","LOG_READ_MTA_ERROR":"Could not read mta.yaml, trying again...","LOG_UPDATE_STANDALONE_MTA":"Updated standalone mta.yaml","LOG_UPDATE_MTA_FAILED":"Could not update mta.yaml","LOG_UPDATE_XSAPP_FAILED":"Could not update xs-app.json, error found {{error}}","LOG_UPDATED_XSAPP":"Updated standalone approuter xs-app.json {{message}}","LOG_ERROR":"{{method}} error found {{error}}","LOG_CANNOT_FIND_MTA":"Cannot find mta.yaml in current folder or up directory tree","LOG_ADD_FLP":"Adding FLP artifacts","LOG_ADDING_APP_TO_MTA":"Adding application {{appModule}} to mta.yaml","LOG_ADDING_PARAMS_TO_MTA":"Adding additional parameters to mta.yaml","LOG_ERROR_INSTALL_PHASE":"Error during install phase deployment-generator:cf: {{error}}","LOG_ROOT_ERROR_INSTALL_PHASE":"Error during install phase, root package.json deployment-generator:cf: {{error}}","LOG_ERROR_WRITING_PHASE":"Error writing phase deployment-generator:cf: {{error}}","LOG_ERROR_END_PHASE":"Error end phase deployment-generator:cf: {{error}}","LOG_UPDATING_PACKAGE_JSON":"Error updating package.json: {{error}}","LOG_UPDATED_PACKAGE_JSON":"Updated root package.json","LOG_ADDED_MTA_YAML":"mta.yaml created","WARN_MESSAGE_FLPCONF_INBOUND_CONFIG_KEY_EXISTS":"An inbound configuration with the key: \'{{inboundKey}}\' is already defined. ","PROMPT_FLPCONF_OVERWRITE":"Overwrite existing configuration?","PROMPT_FLPCONF_SEMANTIC_OBJECT":"Semantic Object","PROMPT_FLPCONF_ACTION":"Action","PROMPT_FLPCONF_TITLE":"Title","PROMPT_FLPCONF_SUBTITLE":"Subtitle (optional)","PROMPT_FLPCF_EXIST_MTA_DIR":"Existing configuration at {{mtaDir}} found. Do you want to extend it (or abort)?","PROMPT_FLPCF_NEW_MTA_DIR":"Enter the directory containing mta.yaml","PROMPT_FLPCF_NOT_EXIST_MTA_DIR":"{{mtaPath}} does not exist","PROMPT_VALIDATION_WARN_MAX_LENGTH":"Maximum length: {{maxLength}} characters","PROMPT_VALIDATION_WARNING_INPUT_REQUIRED":"{{inputName}} is required","PROMPT_APP_CHOOSE_TARGET":"Please choose the target","PROMPT_ABAP_APPNAME_REQUIRED":"Application name required","PROMPT_ABAP_INVALID_APPNAME_LENGTH":"Application name limited to 15 characters, entered {{length}}","PROMPT_ABAP_INVALID_APPNAME":"Application name needs to be prefixed with [{{prefix}}]","PROMPT_OVERWRITE_CONFIG":"Editing the deployment configuration will overwrite existing configuration, are you sure you want to continue?","PROMPT_OVERWRITE_ABORT":"Deployment config will abort if you choose no. Click Finish to abort.","PROMPT_ABAP_ENTER_BASE_CONFIG":"Enter the base configuration filename","PROMPT_ABAP_CONFIRM_SCP":"Is this an SAP Business Technology Platform system?","PROMPT_ABAP_DESTINATION":"Destination","PROMPT_ABAP_TARGET_SYSTEM":"Select Target system","PROMPT_ABAP_ENTER_TARGET":"Enter Target System URL","PROMPT_ABAP_TARGET_URL":"Target System URL","PROMPT_ABAP_CLIENT":"Client","PROMPT_ABAP_CLIENT_CHOICE_EXISTING":"Use project defined client {{client}}","PROMPT_ABAP_CLIENT_CHOICE_NEW":"Enter client","PROMPT_ABAP_CLIENT_CHOICE_BLANK":"Use default system client","PROMPT_ABAP_ENTER_CLIENT":"Enter client","PROMPT_ABAP_INVALID_APPNAME_LENGTH_2":"Name (Maximum length: 15 characters)","PROMPT_ABAP_APPNAME":"SAPUI5 ABAP Repository","PROMPT_ABAP_INVALID_APPNAME_LENGTH_PREFIX":"SAPUI5 ABAP Repository (Maximum length: 15 characters, should start with {{applicationPrefix}})","PROMPT_ABAP_PACKAGE":"Package","PROMPT_HINT_TYPE_TO_FILTER":" (Type to filter matching records)","PROMPT_ABAP_PACKAGE_WARN":"Provide a package","PROMPT_PACKAGE_INPUT_CHOICE":"How do you want to enter the Package","PROMPT_ABAP_PACKAGE_NOT_FOUND":"Package list cannot be fetched. Please enter the Package manually.","PROMPT_TRANSPORT_INPUT_CHOICE":"How do you want to enter Transport Request","PROMPT_TRANSPORT_NO_EXISTING_LIST":"Transport Request list cannot be fetched. Please enter Transport Request manually.","PROMPT_TRANSPORT_CANNOT_CREATE_TRANSPORT":"Create new Transport Request failed. Please enter Transport Request manually.","ENTER_MANUAL_CHOICE":"Enter manually","LIST_EXISTING_CHOICE":"Choose from existing","CREATE_NEW_CHOICE":"Create new","CREATE_DURING_DEPLOY_CHOICE":"Create during deployment","PROMPT_ABAP_TRANSPORT_NO":"Transport Request","PROMPT_ABAP_TRANSPORT_NO_MANDATORY":"Transport Request (mandatory)","PROMPT_ABAP_TRANSPORT_NO_REQUIRED":"Provide a transport request for your application","PROMPT_CREATE_TRANSPORT":"Created new Transport Request","PROMPT_ABAP_GENERATE_INDEX_HTML":"Generate standalone index.html during deployment","PROMPT_ABAP_USERNAME":"Username: ","PROMPT_ABAP_PASSWORD":"Password: ","PROMPT_ABAP_REQUIRE_CREDENTIAL":"Please provide credential to authenticate backend system","PROMPT_ABAP_DESCRIPTION":"Deployment Description","PROMPT_SERVER_PROJECT_PARENT":"Application router project path","PROMPT_SERVER_STANDALONE_APPROUTER":"Standalone Approuter","PROMPT_SERVER_MANAGED_APPROUTER":"Managed Approuter","PROMPT_SERVER_ADD_ROUTER_MODULE":"Add router module","PROMPT_SERVER_ADD_CONNECTIVITY":"Add connectivity service (required for connections to on-prem systems)?","PROMPT_SERVER_ADVANCED_OPTION":"Configure advanced options","PROMPT_CF_ABAP_ENV_UNAVAIL":"ABAP Environments Unavailable","PROMPT_CF_GENERATE_IN_ROOT":"Generate project artifacts in root folder: {{root}}?","PROMPT_CF_MTA_EXISTS":"Existing configuration at {{mtaPath}} found. Do you want to extend it (or abort)?","PROMPT_CF_SELECT_ROOT_PATH":"Please enter the location of the root folder (relative or absolute path)","PROMPT_CF_CREATE_ROOT":"{{root}} does not exist. Create it?","PROMPT_CF_CREATE_ROOT_CHOICE_YES":"Yes","PROMPT_CF_CREATE_ROOT_CHOICE_NEW":"Enter new name","PROMPT_CF_CREATE_ROOT_CHOICE_ABORT":"Abort","PROMPT_CF_CREATE_MTA_ID":"MTA ID","PROMPT_CF_CREATE_MTA_DESC":"MTA description","PROMPT_CF_CREATE_MTA_VERSION":"MTA version","PROMPT_CF_ABAP_SERVICE":"Do you want to connect to your ABAP environment via direct service binding?","PROMPT_CF_DESTINATION":"Destination name","PROMPT_CF_DESTINATION_HINT":"Destination name - The app router is configured to use direct service binding","PROMPT_CF_HINT_CF_LOGIN":"Login to Cloud Foundry is required prior to view available ABAP services.","PROMPT_CF_LOAD_ABAP_SERVICE_FAIL":"Discovering ABAP environments failed. Check logs for details.","PROMPT_CF_SELECT_ABAP_SERVICE":"ABAP Environment for direct service binding","PROMPT_CF_MOVE_APP_DIR":"Move app directory [{{appPath}}] to {{newRoot}}?\\n(Please ensure everything is under version control and committed first)","PROMPT_CF_NEW_DIR_NAME":"Choose new directory name","PROMPT_CF_APP_PATH_EXISTS":"{{appPath}} already exists.\\nPlease choose an option (h for help)","PROMPT_CF_CREATE_CHOICE_NO_MOVE":"Don\'t move","PROMPT_CF_LABEL_NONE":"None","PROMPT_CF_LABEL_DIRECT_SERVICE_BINDING":"Direct Service Binding","NOT_OVERWRITING_EXISTING_INDEX_HTML":"\'webapp/index.html\' already exists. Won\'t overwrite","PROMPT_GENERATE_MANAGED_APPROUTER":"Add application to managed application router?","WARN_CANNOT_GET_TRANSPORT_CONFIGURATION":"Cannot get transport configuration from the backend","PROMPT_INSTANCE_BASED_DEST_DEFAULT":"Local CAP Project API (Instance Based Destination)","PROMPT_INSTANCE_BASED_DEST":"{{destination}} (Instance Based Destination)","TOOLTIP_SAP_UI5_ABAP_REPO":"Enter the name for the deployed application. The name must follow the rules of creating a BSP application. It must not exceed 15 characters and must consist of alphanumeric characters or underscores only. Name should be unique in the BSP repository and its namespace is compatible with the selected package.","TOOLTIP_ABAP_DESCRIPTION":"The description of the deployed application.","TOOLTIP_ABAP_PACKAGE":"Provide a package for the deployed application.","ERROR_DEPLOY_TARGET_NOT_DEPLOYABLE":"{{systemError}} To continue with project generation choose a different deployment target or skip adding deploy config.","LABEL_TARGET_SYSTEM_BREADCRUMB":"Target System","LABEL_TARGET_SYSTEM_TYPE_BREADCRUMB":"Target Type","LABEL_SCP_BREADCRUMB":"SCP","LABEL_GENERATE_INDEX_HTML_BREADCRUMB":"Generate index.html","LABEL_ADD_APP_TO_ROUTER_BREADCRUMB":"Add to Router","LABEL_FLP_SUBTITLE_BREADCRUMB":"Subtitle","LABEL_ROUTER_PATH_BREADCRUMB":"App Router Path","LABEL_CONNECTIVITY_SERVICE_BREADCRUMB":"Add Connectivity Service","LABEL_DIRECT_SERVICE_ABAP_ENVIRONMENT_BREADCRUMB":"ABAP Env. Binding","INFO_MESSAGE_MORE_SEARCH_RESULTS":"More than {{numResults}} results, keep typing to narrow down","PROMPT_LABEL_S4_CONTINUE":"S/4 {{configType}} configuration is managed centrally as part of the CI pipeline, local updates to deployment configuration will not be for productive use. Are you sure you want to continue?","ERROR_EMPTY_NAME":"You must provide a destination name in order to continue.","ERROR_NAME_MSG":"The destination name must only contain letters, digits, dashes and underscores.","ERROR_NAME_TOO_LONG":"Destination name cannot contain more than 200 characters","VIRTUAL_HOST_WARNING":"As the destination uses a virtual host, you will need to replace the host in the URL with the internal host that is configured with your SAP Cloud Connector when previewing the deployed application."}')},69645:e=>{"use strict";e.exports={}}},r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var o=r[e]={id:e,loaded:!1,exports:{}};return n[e].call(o.exports,o,o.exports,i),o.loaded=!0,o.exports}i.m=n,i.c=r,i.x=()=>{var e=i.O(void 0,[712,784,36,475,763],(()=>i(i.s=26649)));return e=i.O(e)},e=[],i.O=(t,n,r,o)=>{if(!n){var s=1/0;for(u=0;u<e.length;u++){for(var[n,r,o]=e[u],a=!0,_=0;_<n.length;_++)(!1&o||s>=o)&&Object.keys(i.O).every((e=>i.O[e](n[_])))?n.splice(_--,1):(a=!1,o<s&&(s=o));if(a){e.splice(u--,1);var c=r();void 0!==c&&(t=c)}}return t}o=o||0;for(var u=e.length;u>0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[n,r,o]},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((t,n)=>(i.f[n](e,t),t)),[])),i.u=e=>({36:"app-config-writer/dist",475:"tools-suite-common-libs",712:"commonlibs",763:"app-gen-shared",784:"open-ux-shared"}[e]+"/index.js"),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),i.j=385,i.p="",(()=>{var e={385:1,190:1,651:1};i.O.require=t=>e[t];i.f.require=(t,n)=>{e[t]||(t=>{var n=t.modules,r=t.ids,o=t.runtime;for(var s in n)i.o(n,s)&&(i.m[s]=n[s]);o&&o(i);for(var a=0;a<r.length;a++)e[r[a]]=1;i.O()})(require("../"+i.u(t)))}})(),t=i.x,i.x=()=>(i.e(712),i.e(784),i.e(36),i.e(475),i.e(763),t());var o=i.x();module.exports=o})(); | ||
(()=>{var e,t,n={51617:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=51617,e.exports=t},39973:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=39973,e.exports=t},20230:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=20230,e.exports=t},20545:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=20545,e.exports=t},4297:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=4297,e.exports=t},75601:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=75601,e.exports=t},82626:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=82626,e.exports=t},37974:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=37974,e.exports=t},85858:(e,t,n)=>{var r={"./cat":43112,"./cat.js":43112,"./cd":86698,"./cd.js":86698,"./chmod":23986,"./chmod.js":23986,"./common":96816,"./common.js":96816,"./cp":80610,"./cp.js":80610,"./dirs":91972,"./dirs.js":91972,"./echo":16166,"./echo.js":16166,"./error":80609,"./error.js":80609,"./exec":52024,"./exec-child":69911,"./exec-child.js":69911,"./exec.js":52024,"./find":22261,"./find.js":22261,"./grep":56818,"./grep.js":56818,"./head":66412,"./head.js":66412,"./ln":91247,"./ln.js":91247,"./ls":5815,"./ls.js":5815,"./mkdir":70098,"./mkdir.js":70098,"./mv":74164,"./mv.js":74164,"./popd":99851,"./popd.js":99851,"./pushd":6978,"./pushd.js":6978,"./pwd":24044,"./pwd.js":24044,"./rm":44256,"./rm.js":44256,"./sed":43422,"./sed.js":43422,"./set":17444,"./set.js":17444,"./sort":53033,"./sort.js":53033,"./tail":50318,"./tail.js":50318,"./tempdir":16275,"./tempdir.js":16275,"./test":50021,"./test.js":50021,"./to":44915,"./to.js":44915,"./toEnd":13326,"./toEnd.js":13326,"./touch":57650,"./touch.js":57650,"./uniq":63019,"./uniq.js":63019,"./which":5483,"./which.js":5483};function i(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}i.keys=function(){return Object.keys(r)},i.resolve=o,e.exports=i,i.id=85858},55079:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deleteCachedServiceProvider=t.getOrCreateServiceProvider=void 0;const r=n(62637),i=n(14425);let o,s;t.getOrCreateServiceProvider=async function(e,t){return o&&s?.isSameSystem&&s?.isSameSystem(e.url,e.client)||(o=e?.getConnection()&&e?.getConnection()?.cookies?await async function(e){if((0,i.isAppStudio)()){const t=await(0,i.listDestinations)(),n=e.config.destination;o=(0,r.createForDestination)({cookies:e.getConnection().cookies.toString()},t[n])}else o=e?.isScp()?(0,r.createForAbapOnCloud)({environment:r.AbapCloudEnvironment.Standalone,service:{url:e.url},ignoreCertErrors:!1,cookies:e.getConnection().cookies.toString()}):(0,r.createForAbap)({baseURL:e?.url,ignoreCertErrors:!1,cookies:e?.getConnection().cookies.toString()});return o}(e):await async function(e,t){if((0,i.isAppStudio)()){const n=await(0,i.listDestinations)(),s=e.config.destination,a=t.username?{auth:{username:t.username,password:t.password}}:{};o=(0,r.createForDestination)({...a},n[s])}else o=e?.isScp()?(0,r.createForAbapOnCloud)({refreshToken:e.credentials?.refreshToken,environment:r.AbapCloudEnvironment.Standalone,service:e.credentials?.serviceKeysContents}):(0,r.createForAbap)({baseURL:e?.url,ignoreCertErrors:!1,auth:{username:t.username??e?.username,password:t.password??e?.password}});return o}(e,t),s=e),o},t.deleteCachedServiceProvider=function(){o=void 0}},62283:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createTransportNumberFromService=void 0;const r=n(55079),i=n(62637);t.createTransportNumberFromService=async function(e,{credentials:t,system:n}){try{const o=await(0,r.getOrCreateServiceProvider)(n,t),s=await o.getAdtService(i.TransportRequestService);return await s.createTransportRequest(e)}catch(e){return null}}},98308:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(55079),t),i(n(24105),t),i(n(81547),t)},56821:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.listPackagesFromService=void 0;const r=n(55079),i=n(62637),o=n(1937);t.listPackagesFromService=async function(e,{credentials:t,system:n}){try{const s=await(0,r.getOrCreateServiceProvider)(n,t),a=await s.getAdtService(i.ListPackageService);return await a.listPackages({maxResults:o.ABAP_PACKAGE_SEARCH_MAX_RESULTS,phrase:e})}catch(e){return[]}}},24105:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTransportConfigInstance=void 0;const r=n(1937),i=n(31881),o=n(55079),s=n(73056),a=n(62637);class DummyTransportConfig{getPackage(){}getApplicationPrefix(){}isTransportRequired(){return!1}getDefaultTransport(){}getOperationsType(){}}class DefaultTransportConfig{constructor(){this.atoSettings={},this.defaultTransport=void 0}getDefaultTransport(){return this.defaultTransport}getPackage(){return this.atoSettings.devPackage}getApplicationPrefix(){return this.atoSettings.devPrefix}isTransportRequired(){return!!this.atoSettings.isTransportRequestRequired}getOperationsType(){return this.atoSettings?.operationsType}async init({credentials:e,system:t}){const n={};try{const r=await(0,o.getOrCreateServiceProvider)(t,e),i=await r.getAdtService(a.AtoService),s=await i.getAtoInfo();n.error=this.handleAtoResponse(s)}catch(e){if((0,o.deleteCachedServiceProvider)(),e.response?.status===r.HttpStatus.UNAUTHORIZED){e.response.headers["www-authenticate"]?.toLowerCase()?.startsWith("basic")&&(n.transportConfigNeedsCreds=!0)}else n.warning=e?.toString(),n.transportConfigNeedsCreds=!1}const i=!n.error&&!n.transportConfigNeedsCreds;return n.transportConfig=i?this:this.getDummyConfig(),n}handleAtoResponse(e){let t=!1;if(this.atoSettings=(0,s.uniformAtoFormat)(e),this.atoSettings.isConfigured&&"CUSTOMER"===this.atoSettings.tenantType&&"C"===this.atoSettings.operationsType){if(!this.atoSettings.isExtensibilityDevSystem)return(0,i.t)("ERROR_S4_SYSTEM_NOT_EXTENSIBLE");if(!this.atoSettings.devPrefix)return(0,i.t)("ERROR_INCORRECT_ATO_SETTINGS");t=!0,this.applyS4CDefaults()}t||(this.atoSettings={operationsType:this.atoSettings.operationsType})}applyS4CDefaults(){this.defaultTransport=DefaultTransportConfig.S4C_DEFAULT_TRANSPORT,this.atoSettings.isTransportRequestRequired=!1,this.atoSettings.devPackage=DefaultTransportConfig.S4C_DEFAULT_PACKAGE}getDummyConfig(){const e=new DummyTransportConfig;return e.getOperationsType=this.getOperationsType,e}}DefaultTransportConfig.S4C_DEFAULT_TRANSPORT="",DefaultTransportConfig.S4C_DEFAULT_PACKAGE="TEST_YY1_DEFAULT",t.getTransportConfigInstance=async function({scp:e,credentials:t={},system:n}){return e?{transportConfig:new DummyTransportConfig}:(new DefaultTransportConfig).init({credentials:t,system:n})}},81547:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transportName=t.getTransportListFromService=void 0;const r=n(55079),i=n(62637);t.getTransportListFromService=async function(e,t,{credentials:n,system:o}){try{const s=await(0,r.getOrCreateServiceProvider)(o,n),a=await s.getAdtService(i.TransportChecksService);return(await a.getTransportRequests(e,t)).map((e=>({transportReqNumber:e.transportNumber,transportReqDescription:e.description})))}catch{return}};t.transportName=e=>({name:e.transportReqDescription?`${e.transportReqNumber} (${e.transportReqDescription})`:`${e.transportReqNumber}`,value:e.transportReqNumber})},73056:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useCreateTrDuringDeploy=t.CREATE_TR_DURING_DEPLOY=t.getTargetSystemChoices=t.isLocalPackage=t.uniformAtoFormat=t.isScp=t.handleProjectDoesNotExist=t.abapDeployConfigExists=t.indexHtmlExists=t.readExistingDeployTaskConfig=t.initBaseConfig=t.getSuggestedClient=t.getUrlAnswer=void 0;const r=n(1937),i=n(31881),o=n(68802),s=n(43895),a=n(28033),_=n(71017);t.getUrlAnswer=function(e,t){if(e.isAppStudio&&t?.destination===e?.backendConfig?.destination)return e.answers.url;{let e=t.targetSystem;return t.targetSystem&&"NoUrlSelected"!==t.targetSystem||!t.url||(e=t.url),e}},t.getSuggestedClient=function(e){let t;const n=e.scripts?.start;return n&&n.includes("sap-client")&&(t=n.split("sap-client")[1].match(/\d{1,3}/g).map(String)[0]),t},t.initBaseConfig=function(e,t){t.baseConfig=(0,o.readYaml)(e);const n=t.baseConfig.toJSON();t.baseMetadataName=n.metadata?.name,t.backendConfig=n?.server?.customMiddleware?.find((e=>e?.name===r.FIORI_TOOLS_PROXY))?.configuration?.backend?.[0]},t.readExistingDeployTaskConfig=function(e){if(e)try{const t=(0,o.readYaml)(e)?.toJSON();return t?.builder?.customTasks?.find((e=>e.name===r.ABAP_DEPLOY_TASK))?.configuration}catch(e){return}},t.indexHtmlExists=async function(e,t){const n=await(0,a.getUi5CustomWebappPath)(t),r=(0,_.join)(t,n,"index.html");return e.exists(r)},t.abapDeployConfigExists=function(e,t){return e.exists(t)},t.handleProjectDoesNotExist=function(e){const t=i.ErrorMessages.fileDoesNotExist(e.destinationPath(e.options.base));throw e.abort=!0,(0,i.handleErrorMessage)(e,e.appWizard,t),i.ErrorMessages.ABORT_SIGNAL},t.isScp=function(e,t){for(const n in t){const r=t[n];if(r.value===e)return r.scp}return!1},t.uniformAtoFormat=function(e){return Object.keys(e).includes("developmentPackage")&&(e.devPackage=e.developmentPackage),Object.keys(e).includes("developmentPrefix")&&(e.devPrefix=e.developmentPrefix),Object.keys(e).includes("isExtensibilityDevelopmentSystem")&&(e.isExtensibilityDevSystem=e.isExtensibilityDevelopmentSystem),e},t.isLocalPackage=function(e){return/^[$LlTt]/.test(e)},t.getTargetSystemChoices=async function(e,t){const n=[];if(!(0,s.isAppStudio)()){let r=!0;n.push({name:(0,i.t)("PROMPT_ABAP_ENTER_TARGET"),value:"NoUrlSelected"}),t?.unSaved&&(n.push({name:`${t.getDisplayName()} (Source system)`,value:t.url,client:t.client,isDefault:!0,scp:t.isScp()}),r=!1);const o=await(0,i.getSapSystems)();Object.values(o).forEach((t=>{let i=!1;r&&(i=t.url===e?.url&&(t.client||"")===(e?.client||"")),n.push({name:i?`${t.getDisplayName()} (Source system)`:t.getDisplayName(),value:t.url,client:t.client,isDefault:i,scp:t.isScp()})}))}return n},t.CREATE_TR_DURING_DEPLOY="REPLACE_WITH_TRANSPORT",t.useCreateTrDuringDeploy=function(e){return e.existingDeployTaskConfig?.app?.transport===t.CREATE_TR_DURING_DEPLOY}},82546:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getS4Prompts=void 0;const r=n(28212);t.getS4Prompts=function(e){return[{type:"confirm",name:"s4Continue",message:(0,r.t)("PROMPT_LABEL_S4_CONTINUE",{configType:e}),default:!1}]}},1937:(e,t)=>{"use strict";var n,r,i;Object.defineProperty(t,"__esModule",{value:!0}),t.generatorNamespace=t.bundledRootGeneratorName=t.i18nKeySubTitle=t.i18nKeyTitle=t.ABAP_PACKAGE_SEARCH_MAX_RESULTS=t.API_BUSINESS_HUB_ENTERPRISE_PREFIX=t.MANAGED_XSUAA=t.UI5_URL=t.SRV_API_DEFAULT_URL=t.SRV_API=t.DEFAULT_MTA_DESTINATION=t.MTA_DESTINATION=t.XS_SECURITY=t.MTA_EXTENSION_FILE=t.MTA_YAML=t.PACKAGE_JSON=t.DEPLOY_MODE=t.UI5_YAML=t.UI5_DEPLOY=t.XS_APP=t.RIMRAF=t.RIMRAF_VERSION=t.MBT=t.MBT_VERSION=t.UI5_TASK_FLATTEN_LIB_VERSION=t.UI5_TASK_FLATTEN_LIB=t.ABAP_DEPLOY_TASK=t.WELCOME_FILE=t.DESTINATION_AUTHTYPE_NOAUTH=t.DESTINATION_AUTHTYPE_NOTFOUND=t.DESTINATION_CHOICE_DIRECT_SERVICE_BINDING=t.DESTINATION_CHOICE_NONE=t.RouterModuleType=t.HttpStatus=t.MTA_VERSION=t.MTA_DESCRIPTION=t.TargetName=t.CDS_ADD_MTA_COMMAND_ARGS=t.MTA_PKG=t.MTA_EXECUTABLE=t.CDS_PKG=t.CDS_EXECUTABLE=t.ROUTER_MODULE=t.CLOUD_FOUNDRY_FOLDER=t.FIORI_TOOLS_PROXY=t.DEPLOYER_MODULE_TYPE=t.ROUTER_MODULE_TYPE=void 0,t.ROUTER_MODULE_TYPE="approuter.nodejs",t.DEPLOYER_MODULE_TYPE="com.sap.html5.application-content",t.FIORI_TOOLS_PROXY="fiori-tools-proxy",t.CLOUD_FOUNDRY_FOLDER="cf",t.ROUTER_MODULE="router",t.CDS_EXECUTABLE="cds",t.CDS_PKG="@sap/cds-dk",t.MTA_EXECUTABLE="mta",t.MTA_PKG="mta",t.CDS_ADD_MTA_COMMAND_ARGS=["add","mta"],function(e){e.ABAP="abap",e.CF="cf"}(n||(t.TargetName=n={})),t.MTA_DESCRIPTION="Fiori elements app",t.MTA_VERSION="0.0.1",function(e){e[e.UNAUTHORIZED=401]="UNAUTHORIZED"}(r||(t.HttpStatus=r={})),function(e){e.Standard="Standard",e.Managed="Managed"}(i||(t.RouterModuleType=i={})),t.DESTINATION_CHOICE_NONE="NONE",t.DESTINATION_CHOICE_DIRECT_SERVICE_BINDING="DIRECT_SERVICE_BINDING",t.DESTINATION_AUTHTYPE_NOTFOUND="NotAvailable",t.DESTINATION_AUTHTYPE_NOAUTH="NoAuthentication",t.WELCOME_FILE="welcomeFile",t.ABAP_DEPLOY_TASK="deploy-to-abap",t.UI5_TASK_FLATTEN_LIB="ui5-task-flatten-library",t.UI5_TASK_FLATTEN_LIB_VERSION="0.2.5",t.MBT_VERSION="^1.2.18",t.MBT="mbt",t.RIMRAF_VERSION="^3.0.2",t.RIMRAF="rimraf",t.XS_APP="xs-app.json",t.UI5_DEPLOY="ui5-deploy.yaml",t.UI5_YAML="ui5.yaml",t.DEPLOY_MODE="deploy_mode",t.PACKAGE_JSON="package.json",t.MTA_YAML="mta.yaml",t.MTA_EXTENSION_FILE="mta-ext.mtaext",t.XS_SECURITY="xs-security.json",t.MTA_DESTINATION="%s-srv-api",t.DEFAULT_MTA_DESTINATION="fiori-default-srv-api",t.SRV_API="srv-api",t.SRV_API_DEFAULT_URL="${default-url}",t.UI5_URL="https://ui5.sap.com",t.MANAGED_XSUAA="managed:xsuaa",t.API_BUSINESS_HUB_ENTERPRISE_PREFIX="ABHE",t.ABAP_PACKAGE_SEARCH_MAX_RESULTS=50,t.i18nKeyTitle="flpTitle",t.i18nKeySubTitle="flpSubtitle",t.bundledRootGeneratorName="@sap/fiori:fiori-deployment";t.generatorNamespace=e=>`${t.bundledRootGeneratorName}_${e}`},26649:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=s(n(98819)),_=n(31881),c=n(25184),u=o(n(71017)),d=n(1628),l=n(82546),p=n(6903),E=n(72089),T=n(9949),P=n(28033),A=n(37705),O=n(1937);class default_1 extends a.default{constructor(e,t){t.force=!0,super(e,t,{unique:"namespace"}),this.exit=!1,this.appWizard=t.appWizard||c.AppWizard.create(t),this.additionalTelemetryData=t.additionalTelemetryData,t.data?.appRootPath?this.appRootPath=t.data.appRootPath:t.projectPath&&t.projectName?this.appRootPath=u.default.join(t.projectPath,t.projectName):this.appRootPath=this.destinationRoot(),t.launchFlpConfigAsSubGenerator||(this.prompts=new c.Prompts([{name:(0,d.t)("FLP_CONFIG"),description:(0,d.t)("DESCRIPTION_FLP_CONFIG_GENERATOR",{appFolderName:` - ${u.default.basename(this.appRootPath)}`})}]),this.setPromptsCallback=e=>{this.prompts&&this.prompts.setCallback(e)},this.existingApp=!0,(0,A.enableFeature)(d.Features.enableAnswerBreadcrumbs))}async initializing(){await d.TelemetryHelper.initTelemetrySettings({modulePackageJson:{name:"@sap/generator-fiori-deployment:flp-config",version:this.rootGeneratorVersion()}}),this.existingApp&&(this.manifestPath=(0,u.join)(await(0,T.getWebappPath)(this.appRootPath),T.FileName.Manifest),this.manifest=this.fs.readJSON(this.manifestPath),this.manifest||(0,_.handleErrorMessage)(this,this.appWizard,(0,_.t)("ERROR_NO_MANIFEST_AT_PATH",{path:this.manifestPath})),this.manifest["sap.app"]||(0,_.handleErrorMessage)(this,this.appWizard,(0,_.t)("ERROR_SAP_APP_NOT_DEFINED")))}async prompting(){if(this.options.launchFlpConfigAsSubGenerator&&void 0!==this.options.inboundConfig?.semanticObject&&void 0!==this.options.inboundConfig?.action&&void 0!==this.options.inboundConfig?.title&&this.options.skipPrompt)return void(this.answers={overwrite:!0,semanticObject:this.options.inboundConfig.semanticObject,action:this.options.inboundConfig.action,title:this.options.inboundConfig.title,subTitle:this.options.inboundConfig.subTitle});let e;this.manifest?.["sap.app"]?.crossNavigation?.inbounds&&(e=Object.keys(this.manifest["sap.app"].crossNavigation.inbounds));const t=this.options.overwrite;let n=(0,p.getQuestions)(e,t);if(((0,d.getPlatform)()===d.PLATFORMS.CLI||!this.options.launchFlpConfigAsSubGenerator)&&await(0,_.isS4Installed)(this.options.vscode?.workspace?.getConfiguration())){const e=(0,l.getS4Prompts)("FLP");n=(0,d.withCondition)(n,(e=>e.s4Continue)),n.unshift(...e)}this.answers={};const r=await this.prompt(n);(!1===r.s4Continue||!1===r.overwrite&&!t)&&(this.exit=!0,process.exit(0)),""===r.subTitle&&(r.subTitle=void 0),Object.assign(this.answers,r)}async writing(){!1===this.exit&&this.existingApp&&await this._updateFiles(this.answers)}async end(){!1!==this.exit||this.existingApp||(this.manifestPath=(0,u.join)(await(0,T.getWebappPath)(this.appRootPath),T.FileName.Manifest),this.manifest=this.fs.readJSON(this.manifestPath),await this._updateFiles(this.answers));try{const e=d.TelemetryHelper.createTelemetryData(Object.assign({appType:"flp-config"},this.additionalTelemetryData));(0,d.sendTelemetry)(d.EventName.GenerationSuccess,e)}catch(e){this.log((0,_.t)("LOG_ERROR_END_PHASE",{error:e}))}}async _updateFiles({semanticObject:e,action:t,title:n,subTitle:r}){const i=await this._updateI18n(u.default.dirname(this.manifestPath),this.manifest,{title:n,subTitle:r});await(0,E.generateInboundNavigationConfig)(this.appRootPath,{semanticObject:e,action:t,title:i?`{{${O.i18nKeyTitle}}}`:n,subTitle:i&&r?`{{${O.i18nKeySubTitle}}}`:r},!0,this.fs)}async _updateI18n(e,t,{title:n,subTitle:r}){const i=(0,P.getI18nPaths)(e,t)["sap.app"];if(i)try{const e=[{key:O.i18nKeyTitle,value:n}];return r&&e.push({key:O.i18nKeySubTitle,value:r}),await(0,P.updateI18nProperties)(i,e),!0}catch(e){const t=(0,_.t)("WARNING_CANNOT_UPDATE_I18N",{path:i});this.appWizard.showWarning(t,c.MessageType.notification),this.log(t)}else this.log((0,_.t)("WARNING_I18N_FILE_PATH_NOT_FOUND_IN_MANIFEST"))}}t.default=default_1},6903:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(30514),t)},30514:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getQuestions=void 0;const r=n(25184),i=n(31881),o=n(1628);function s(e,t,n=0){return 0===e?.trim().length?(0,i.t)("PROMPT_VALIDATION_WARNING_INPUT_REQUIRED",{inputName:t}):!(n&&e.length>n)||(0,i.t)("PROMPT_VALIDATION_WARN_MAX_LENGTH",{maxLength:n})}t.getQuestions=function(e=[],t=!1){const n=(0,o.getPlatform)()===o.PLATFORMS.CLI;let a=!1;const _=(0,i.t)("PROMPT_FLPCONF_SEMANTIC_OBJECT"),c=(0,i.t)("PROMPT_FLPCONF_ACTION"),u=(0,i.t)("PROMPT_FLPCONF_TITLE");return[{name:"semanticObject",type:"input",guiOptions:{mandatory:!0,breadcrumb:(0,o.breadcrumbHelper)()},message:_,filter:e=>e?.trim(),validate:e=>s(e,_,30)},{name:"action",type:"input",guiOptions:{mandatory:!0,breadcrumb:(0,o.breadcrumbHelper)()},message:(0,i.t)("PROMPT_FLPCONF_ACTION"),filter:e=>e?.trim(),validate:e=>s(e,c,60)},{type:"confirm",name:"overwrite",message:e=>`${n?(0,i.t)("WARN_MESSAGE_FLPCONF_INBOUND_CONFIG_KEY_EXISTS",{inboundKey:`${e.semanticObject}-${e.action}`}):""}${(0,i.t)("PROMPT_FLPCONF_OVERWRITE")}`,guiOptions:{applyDefaultWhenDirty:!0},default:()=>!a,additionalMessages:(e,t)=>({message:(0,i.t)("WARN_MESSAGE_FLPCONF_INBOUND_CONFIG_KEY_EXISTS",{inboundKey:`${t.semanticObject}-${t.action}`}),severity:r.Severity.warning}),when:t=>(a=e.indexOf(`${t?.semanticObject}-${t?.action}`)>-1,a)},{when:({overwrite:e})=>!1!==e||!a||t,name:"title",type:"input",guiOptions:{mandatory:!0,breadcrumb:(0,o.breadcrumbHelper)()},message:(0,i.t)("PROMPT_FLPCONF_TITLE"),filter:e=>e?.trim(),validate:e=>s(e,u)},{when:({overwrite:e})=>!1!==e||!a||t,name:"subTitle",type:"input",guiOptions:{breadcrumb:(0,o.breadcrumbHelper)((0,i.t)("LABEL_FLP_SUBTITLE_BREADCRUMB"))},message:(0,i.t)("PROMPT_FLPCONF_SUBTITLE"),filter:e=>e?.trim()}]}},40120:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debug=void 0;const r=n(1628);t.debug=function(e,t){(0,r.getPlatform)()!==r.PLATFORMS.CLI&&e(`[YUI DEBUG] ${t}`)}},42899:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findSapSystem=t.getSapSystems=t.generateDestinationName=t.getCfDestinationChoices=void 0;const r=n(77090);let i={};async function o(e=!0){return e&&0!==Object.keys(i).length||(i=await(0,r.listSAPSystems)()),i}t.getCfDestinationChoices=async function(e=!1){const t=await o();return Object.values(t).map((t=>({name:`${t.name}${t.isScp()?"(SCP)":""} - ${t.url}`,value:e?t:t.name,scp:t.isScp(),url:t.url})))},t.generateDestinationName=function(e,t){return`${e}_${t.replace(/(^\/)|(\/$)/g,"").replace(/\//g,"_")}`},t.getSapSystems=o,t.findSapSystem=function(e,t){return t?.["string"==typeof e?e:e.name]}},35117:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorMessages=void 0;const r=n(1937),i=n(28212),o=(e,t)=>(0,i.t)("ERROR_CANNOT_FIND_BINARY",{bin:e,pkg:t});class ErrorMessages{}t.ErrorMessages=ErrorMessages,ErrorMessages.ABORT_SIGNAL="ABORT_SIGNAL",ErrorMessages.noManifest=(0,i.t)("ERROR_NO_MANIFEST"),ErrorMessages.noAppName=(0,i.t)("ERROR_NO_APPNAME"),ErrorMessages.noCdsBin=o(r.CDS_EXECUTABLE,r.CDS_PKG),ErrorMessages.noMtaBin=o(r.MTA_EXECUTABLE,r.MTA_PKG),ErrorMessages.noMta=(0,i.t)("ERROR_NO_MTA"),ErrorMessages.noPath=(0,i.t)("ERROR_NO_PATH"),ErrorMessages.noMtaId=(0,i.t)("ERROR_NO_MTA_ID"),ErrorMessages.invalidMtaId=(0,i.t)("ERROR_INVALID_MTA_ID"),ErrorMessages.capDeploymentnoMta=(0,i.t)("ERROR_CAP_DEPLOYMENT_NO_MTA"),ErrorMessages.mtaIdAlreadyExist=e=>(0,i.t)("ERROR_MTA_ID_ALREADY_EXIST",{destinationRoot:e}),ErrorMessages.noMtaInRoot=e=>(0,i.t)("ERROR_NO_MTA_ROOT",{mtaFileName:r.MTA_YAML,root:e}),ErrorMessages.unrecognizedTarget=e=>(0,i.t)("ERROR_UNRECOGNIZED_TARGET",{target:e}),ErrorMessages.cannotReadUi5Config=e=>(0,i.t)("ERROR_CANNOT_READ_UI5_CONFIG",{reason:e}),ErrorMessages.fileDoesNotExist=e=>(0,i.t)("ERROR_FILE_NOT_EXIST",{filePath:e}),ErrorMessages.folderDoesNotExist=e=>(0,i.t)("ERROR_FOLDER_NOT_EXIST",{filePath:e}),ErrorMessages.invalidClient=e=>(0,i.t)("ERROR_INVALID_CLIENT",{client:e}),ErrorMessages.invalidURL=e=>(0,i.t)("ERROR_INVALID_URL",{input:e})},68802:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.writeUi5RepositoryFiles=t.writeUi5RepositoryFile=t.getYamlType=t.readYaml=t.addUi5Dependency=t.addPackageDevDependency=t.updatePackageScript=t.dirExists=t.BUILD_MTA_SCRIPT_TEMP=t.DEPLOY_MTA_SCRIPT_TEMP=t.UNDEPLOY_MTA_SCRIPT_TEMP=t.DEPLOY_MTA_SCRIPT=t.BUILD_MTA_SCRIPT=t.BUILD_SCRIPT=void 0;const a=n(57147),_=n(71017),c=o(n(52375)),u=n(1937),d=s(n(37865)),l=s(n(26692)),p=n(28033);t.BUILD_SCRIPT="ui5 build preload --clean-dest --config ui5-deploy.yaml --include-task=generateCachebusterInfo",t.BUILD_MTA_SCRIPT="rimraf resources mta_archives && mbt build";t.DEPLOY_MTA_SCRIPT=(e=[])=>"fiori cfDeploy"+(e.length>0?` ${e.join(" ")}`:"");t.UNDEPLOY_MTA_SCRIPT_TEMP=e=>`cf undeploy ${e} --delete-services --delete-service-keys --delete-service-brokers`;function E(e){return c.parseDocument((0,a.readFileSync)(e,"utf-8"))}t.DEPLOY_MTA_SCRIPT_TEMP=(e=[])=>`cf deploy mta_archives/archive.mtar ${e.length>0?`${e.join(" ")} `:""}--retries 1`,t.BUILD_MTA_SCRIPT_TEMP="rimraf resources mta_archives && mbt build --mtar archive",t.dirExists=function(e){try{return(0,a.statSync)(e)?.isDirectory()}catch{return!1}},t.updatePackageScript=function(e,t,n,r,i=!1){const o=(0,_.join)(e,u.PACKAGE_JSON),s=JSON.parse((0,a.readFileSync)(o,"utf-8"));if(s.scripts||(s.scripts={}),s.scripts[t]=n,r){const{devDependencies:e={},ui5:t={}}=s;s.devDependencies=e,i&&(s.ui5={...t,dependencies:t.dependencies??[]});for(const e in r)s.devDependencies[e]||(s.devDependencies[e]=r[e]),i&&!s.ui5.dependencies.find((t=>t===e))&&s.ui5.dependencies.push(e)}(0,a.writeFileSync)(o,JSON.stringify(s,null,4))},t.addPackageDevDependency=function(e,t,n){const r=(0,_.join)(e,u.PACKAGE_JSON),i=JSON.parse((0,a.readFileSync)(r,"utf-8"));i.devDependencies=i.devDependencies||{},i.devDependencies[t]||(i.devDependencies[t]=n),(0,a.writeFileSync)(r,JSON.stringify(i,null,4))},t.addUi5Dependency=function(e,t){const n=(0,_.join)(e,u.PACKAGE_JSON),r=JSON.parse((0,a.readFileSync)(n,"utf-8"));r.ui5=r.ui5||{},r.ui5.dependencies=r.ui5.dependencies||[],r.ui5.dependencies.includes(t)||r.ui5.dependencies.push(t),(0,a.writeFileSync)(n,JSON.stringify(r,null,4))},t.readYaml=E,t.getYamlType=function(e,t){let n;const r=(0,_.join)(e,t);if((0,a.existsSync)(r)){n=E(r).toJSON().type}return n};t.writeUi5RepositoryFile=(e,t,n)=>{const r=(0,_.join)(e,t);let i;(0,a.existsSync)(r)?(i=(0,a.readFileSync)(r,"utf-8"),i.includes(n)||(i=`${i}\n${n}`)):i=n,(0,a.writeFileSync)(r,i)};t.writeUi5RepositoryFiles=async e=>{const n=(0,_.join)(e,await(0,p.getUi5CustomWebappPath)(e));(await(0,d.default)((0,l.default)((0,_.join)(n,"/**/*.ts"))))?.length>0&&(0,t.writeUi5RepositoryFile)(n,".Ui5RepositoryTextFiles","^.*.ts$")}},28212:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.t=t.addTranslations=t.initI18n=void 0;const i=r(n(94336)),o=r(n(91046)),s="deploy";async function a(){await i.default.init({resources:{en:{[s]:o.default}},lng:"en",fallbackLng:"en",defaultNS:s,ns:[s]})}t.initI18n=a,t.addTranslations=function(e,t){i.default.addResources("en",t,e)},t.t=function(e,t){return t={...t,interpolation:{...t?.interpolation,escapeValue:!1}},i.default.t(e,t)},a()},31881:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.t=t.ErrorMessages=t.isS4Installed=t.loadManifest=t.parseTarget=t.getEnvApiHubConfig=t.isAppStudio=t.CF_ENV=t.handleErrorMessage=t.bail=t.toMtaModuleName=void 0;const o=n(1628),s=n(40120),a=n(25184),_=n(71017),c=n(16484),u=n(28033),d=n(35117);function l({errorMessage:e}){throw new Error(e)}var p;t.toMtaModuleName=function(e){return e.replace(/[`~!@#$%^&*()_|+\-=?;:'",.<>]/gi,"")},t.bail=l,t.handleErrorMessage=function(e,t,n){(0,o.getPlatform)()===o.PLATFORMS.CLI?l({errorMessage:n}):(e.transportConfigError=n,(0,s.debug)(e.log,n),t?.showError(n,a.MessageType.notification))},function(e){e.H2O_URL="H2O_URL"}(p||(t.CF_ENV=p={})),t.isAppStudio=function(){return!!process.env[p.H2O_URL]},t.getEnvApiHubConfig=function(){const e=process.env[o.API_HUB_API_KEY],t=process.env[o.API_HUB_TYPE];return e?{apiHubKey:e,apiHubType:"API_HUB_ENTERPRISE"===t?"API_HUB_ENTERPRISE":"API_HUB"}:void 0},t.parseTarget=function(e,t){let n;return e&&("string"==typeof e?n=e:Array.isArray(e)&&(n=e?.[0])),n||(n=t.target),n},t.loadManifest=async function(e){let t;try{t=new c.Manifest((0,_.join)(e,await(0,u.getUi5CustomWebappPath)(e)))}catch{l({errorMessage:d.ErrorMessages.noManifest})}return t?.appId||l({errorMessage:d.ErrorMessages.noAppName}),t},t.isS4Installed=async function(e){return(await(0,o.findInstalledPackages)("@sapux/s4-fiori-gen-ext",{keyword:"fiori-generator-extension",vscWorkspaceConfig:e})).length>0};var E=n(35117);Object.defineProperty(t,"ErrorMessages",{enumerable:!0,get:function(){return E.ErrorMessages}});var T=n(28212);Object.defineProperty(t,"t",{enumerable:!0,get:function(){return T.t}}),i(n(40120),t),i(n(74475),t),i(n(42899),t)},16484:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Manifest=t.idPropertyPath=t.inboundsPropertyPath=t.crossNavigationPropertyPath=void 0;const s=o(n(57147)),a=o(n(71017)),_="sap.app";t.crossNavigationPropertyPath=[_,"crossNavigation"],t.inboundsPropertyPath=[...t.crossNavigationPropertyPath,"inbounds"],t.idPropertyPath=[_,"id"];t.Manifest=class Manifest{constructor(e){this.CONFIG_FILE="manifest.json",this.manifestPath=e,this.contents=JSON.parse((0,s.readFileSync)(this.manifestPath).toString())}set manifestPath(e){this._appPath=a.join(e,this.CONFIG_FILE)}get manifestPath(){return this._appPath}get appId(){return this.contents?.["sap.app"]?.id}get applicationVersion(){return this.contents["sap.app"]?.applicationVersion?.version}get dataSources(){return this.contents["sap.app"].dataSources??{}}get mainService(){const e=this.contents["sap.ovp"]?this.contents["sap.ovp"].globalFilterModel:"",t=this.contents["sap.ui5"]&&this.contents["sap.ui5"].models&&this.contents["sap.ui5"].models[e]?this.contents["sap.ui5"].models[e].dataSource:void 0;return this.dataSources[t]}get inbound(){const e=this.contents["sap.app"].crossNavigation?.inbounds;return e?{name:Object.keys(e)?.[0],inbound:Object.values(e)?.[0]}:{}}set crossNavigation(e){this.contents["sap.app"].crossNavigation=e}get crossNavigation(){return this.contents["sap.app"].crossNavigation}get sapCloud(){return this.contents["sap.cloud"]}set sapCloud(e){this.contents["sap.cloud"]=e}get i18nFilePath(){return this.contents["sap.app"].i18n}write(e){e?.readJSON(this.manifestPath)?e.writeJSON(this.manifestPath,this.contents,null,4):s.default.writeFileSync(this.manifestPath,JSON.stringify(this.contents,null,4))}}},74475:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.listPackages=t.createTransportNumber=t.getTransportList=t.initTransportConfig=t.validateAppDescription=t.validateAppName=t.isValidClient=t.notExistsValidateClient=t.isValidURL=void 0;const r=n(31881),i=n(77090),o=n(98308),s=n(62283),a=n(56821);async function _(e,t){let n;return t?.isSameSystem?.(e.url,e.client)||t?.config?.destination&&e?.destination===t?.config?.destination&&t?.getConnection()?n=t:e.destination?e.destination&&(n=(0,i.newSapSystemForDestinaton)({destination:e.destination})):n=await async function(e,t){try{return await(0,i.getSapSystem)(e,t?.toString())}catch{return}}(e.url,e.client),n}function c(e){const t=e?.trim()||"";return""===t||!!t.match(/^[0-9]{3}$/)}t.isValidURL=function(e){try{const t=new URL(e);return!!t.protocol&&!!t.host}catch{return!1}},t.notExistsValidateClient=function(e){return!e.client||e.client&&!c(e.client)},t.isValidClient=c,t.validateAppName=function(e,t){const n=[],i=e?e.trim().length:0;if(i)if(e.split("/").length-1>=3)n.push((0,r.t)("PROMPT_ABAP_INVALID_NAMESPACE"));else if(e.match(/^\/.*\/\w*$/g)){const t=e.split("/");let i;t[1].length>10&&(i=(0,r.t)("PROMPT_ABAP_INVALID_NAMESPACE_LENGTH",{length:t[1].length})),t[2].length>15&&(i=`${i?i+", ":""}${(0,r.t)("PROMPT_ABAP_INVALID_APPNAME_LENGTH",{length:t[2].length})}`),i&&n.push(i)}else i>15&&n.push((0,r.t)("PROMPT_ABAP_INVALID_APPNAME_LENGTH",{length:i}));else n.push((0,r.t)("PROMPT_ABAP_APPNAME_REQUIRED"));return i&&(t&&!e?.toUpperCase()?.startsWith(t.toUpperCase())&&n.push((0,r.t)("PROMPT_ABAP_INVALID_APPNAME",{prefix:t})),e.match(/^[A-Za-z0-9_/]*$/)||n.push((0,r.t)("ERROR_CHARACTERS_FORBIDDEN_IN_APP_NAME"))),{valid:0===n.length,errorMessages:n.length?n.join("\n")+(n.length>1?"\n":""):void 0}},t.validateAppDescription=function(e){const t=[];return e.length>60&&t.push((0,r.t)("PROMPT_ABAP_APPDESC_LENGTH")),{valid:0===t.length,errorMessages:t.length?t.join("\n")+(t.length>1?"\n":""):void 0}},t.initTransportConfig=async function({scp:e,url:t,client:n,destination:r,credentials:i,sapSystem:s,errorHandler:a}){let c={};if(!t&&!r)return c;const u={url:t,client:n,destination:r};try{const t=await _(u,s);c=await(0,o.getTransportConfigInstance)({scp:e,credentials:i,system:t})}catch(e){c.error=e}return c.error&&a(c.error),c},t.getTransportList=async function(e,t,{url:n,client:r,destination:i,credentials:s,sapSystem:a}){if(!n&&!i)return;const c={url:n,client:r,destination:i},u=await _(c,a),d=await(0,o.getTransportListFromService)(e,t,{system:u,credentials:s});return 1===d?.length&&""===d[0].transportReqNumber?[]:d},t.createTransportNumber=async function(e,{url:t,client:n,destination:r,credentials:i,sapSystem:o}){if(!t&&!r)return null;const a={url:t,client:n,destination:r},c=await _(a,o);return(0,s.createTransportNumberFromService)(e,{system:c,credentials:i})},t.listPackages=async function(e,{url:t,client:n,destination:r,credentials:i,sapSystem:o}){if(!t&&!r)return[];const s={url:t,client:n,destination:r},c=await _(s,o);return(0,a.listPackagesFromService)(e,{system:c,credentials:i})}},34409:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=34409,e.exports=t},70910:(e,t,n)=>{var r={"./Find-VisualStudio.cs":20183,"./build":17724,"./build.js":17724,"./clean":1658,"./clean.js":1658,"./configure":4748,"./configure.js":4748,"./create-config-gypi":98395,"./create-config-gypi.js":98395,"./find-node-directory":24159,"./find-node-directory.js":24159,"./find-python":29130,"./find-python.js":29130,"./find-visualstudio":17703,"./find-visualstudio.js":17703,"./install":25925,"./install.js":25925,"./list":44179,"./list.js":44179,"./node-gyp":55614,"./node-gyp.js":55614,"./process-release":75344,"./process-release.js":75344,"./rebuild":64187,"./rebuild.js":64187,"./remove":13103,"./remove.js":13103,"./util":55690,"./util.js":55690};function i(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}i.keys=function(){return Object.keys(r)},i.resolve=o,e.exports=i,i.id=70910},84679:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=84679,e.exports=t},72869:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=72869,e.exports=t},12937:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=12937,e.exports=t},84397:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=84397,e.exports=t},54529:e=>{"use strict";e.exports=require("@opentelemetry/tracing")},85767:e=>{"use strict";e.exports=require("@sap/cds")},32220:e=>{"use strict";e.exports=require("applicationinsights-native-metrics")},43241:e=>{"use strict";e.exports=require("esprima")},74602:e=>{"use strict";e.exports=require("keytar")},66828:e=>{"use strict";e.exports=require("vscode")},39491:e=>{"use strict";e.exports=require("assert")},50852:e=>{"use strict";e.exports=require("async_hooks")},14300:e=>{"use strict";e.exports=require("buffer")},32081:e=>{"use strict";e.exports=require("child_process")},96206:e=>{"use strict";e.exports=require("console")},22057:e=>{"use strict";e.exports=require("constants")},6113:e=>{"use strict";e.exports=require("crypto")},9523:e=>{"use strict";e.exports=require("dns")},82361:e=>{"use strict";e.exports=require("events")},57147:e=>{"use strict";e.exports=require("fs")},73292:e=>{"use strict";e.exports=require("fs/promises")},13685:e=>{"use strict";e.exports=require("http")},95687:e=>{"use strict";e.exports=require("https")},98188:e=>{"use strict";e.exports=require("module")},41808:e=>{"use strict";e.exports=require("net")},22037:e=>{"use strict";e.exports=require("os")},71017:e=>{"use strict";e.exports=require("path")},77282:e=>{"use strict";e.exports=require("process")},85477:e=>{"use strict";e.exports=require("punycode")},63477:e=>{"use strict";e.exports=require("querystring")},14521:e=>{"use strict";e.exports=require("readline")},12781:e=>{"use strict";e.exports=require("stream")},71576:e=>{"use strict";e.exports=require("string_decoder")},39512:e=>{"use strict";e.exports=require("timers")},24404:e=>{"use strict";e.exports=require("tls")},76224:e=>{"use strict";e.exports=require("tty")},57310:e=>{"use strict";e.exports=require("url")},73837:e=>{"use strict";e.exports=require("util")},26144:e=>{"use strict";e.exports=require("vm")},59796:e=>{"use strict";e.exports=require("zlib")},91046:e=>{"use strict";e.exports=JSON.parse('{"DEPLOYMENT_CONFIG_GENERATOR":"Deployment Configuration","DEPLOYMENT_CONFIG_GENERATOR_DESC":"Deployment Configuration","DEPLOYMENT_CONFIG":"Deploy Configuration","DEPLOYMENT_CONFIG_DESC":"Create/Update deployment configuration","DEFAULT_PACKAGE":"$tmp","DEFAULT_ABAP_DESCRIPTION":"ABAP Deployment.","DEFAULT_MTA_DESCRIPTION":"Generated by Fiori Tools","FLP_CONFIG":"FLP Configuration","FLP_CONFIG_DESC":"Create/Update Fiori Launchpad configuration","SERVER_CONFIG":"Application Router Configuration","SERVER_CONFIG_DESC":"Configure the Cloud Foundry application router","STEP_PREPARE":"Prepare","STEP_PREPARE_DESC":"Select project location and choose configuration generator","STEP_DEPLOY_TARGET":"Deploy Target","STEP_DEPLOY_TARGET_DESC":"Select backend type: ABAP or Cloud Foundry","STEP_CONFIG":"Project Configuration","STEP_CONFIG_DESC":"Create or update your project configuration","PROMPT_YUI_PROJECT_FOLDER":"Choose project folder","PROMPT_YUI_SELECT_GENERATOR":"Select a configuration generator","ERROR_CANNOT_FIND_BINARY":"Cannot find the \\"{{bin}}\\" executable. Please add it to the path or use \\"npm i -g {{pkg}}\\" to install it.","ERROR_NO_MANIFEST_AT_PATH":"Manifest not found at path: {{- path}}","ERROR_NO_MANIFEST":"Error: could not read webapp/manifest.json","ERROR_SAP_APP_NOT_DEFINED":"Manifest is missing required section \'sap.app\'","WARNING_CANNOT_UPDATE_I18N":"Cannot update i18n properties file: {{- path}}","WARNING_I18N_FILE_PATH_NOT_FOUND_IN_MANIFEST":"i18n file path not found in manifest.json. Fiori launchpad texts not added.","PROMPT_ABAP_INVALID_NAMESPACE_LENGTH":"Namespace limited to 10 characters, entered {{length}}","PROMPT_ABAP_INVALID_NAMESPACE":"Namespace invalid as there are too many forward slashes","PROMPT_ABAP_APPDESC_LENGTH":"Deployment Description should not exceed 60 characters","ERROR_NO_APPNAME":"Could not determine app name from manifest","ERROR_NO_MTA":"Error: no mta.yaml exists. Please run the deployment generator first","ERROR_NO_MTA_ROOT":"Error: no {{mtaFileName}} in {{root}}","ERROR_UNRECOGNIZED_TARGET":"Unrecognized target: {{target}}","ERROR_NO_PATH":"Cannot find \\"path\\" in backend configuration in ui5.yaml","ERROR_CANNOT_READ_UI5_CONFIG":"Cannot read ui5.yaml: {{reason}}","ERROR_FILE_NOT_EXIST":"File does not exist: {{filePath}}","ERROR_FOLDER_NOT_EXIST":"Folder path does not exist: {{filePath}}","ERROR_INVALID_CLIENT":"[{{client}}] is invalid. Enter blank or a value between 000-999","ERROR_INVALID_URL":"Invalid URL: [{{input}}]","ERROR_S4_SYSTEM_NOT_EXTENSIBLE":"S4 system not configured as Extensibility Development system. Cannot deploy to it.","ERROR_INCORRECT_ATO_SETTINGS":"Incorrect ATO settings. Package or prefix settings mising.","ERROR_PARSE_ATO":"Failed to parse ATO Settings - [{{message}}]","ERROR_NO_APP_NAME":"Could not determine app name from manifest","ERROR_NO_APP_ID":"Could not determine app ID from manifest","ERROR_NO_INBOUND":"Could not determine inbound from the manifest","ERROR_MTA_ID_ALREADY_EXIST":"A folder with same name already exist at {{destinationRoot}}","ERROR_NO_MTA_ID":"MTA ID cannot be empty","ERROR_MTA_DESTINATIONS":"No destinations loaded from mta.yaml","ERROR_INVALID_MTA_ID":"The ID can only contain letters, numbers, dashes, periods and underscores (but no spaces).","ERROR_HYPHENS_FORBIDDEN_IN_APP_NAME":"\'-\' not allowed in application name","ERROR_CHARACTERS_FORBIDDEN_IN_APP_NAME":"Only alphanumeric, underscore and slash characters are allowed","ERROR_MTA_EXTENSION_FOR_ABHE_FAILED":"Unable to create or update the mta extension file for Api Hub Enterprise destination configuration: {{error}}","ERROR_MTA_EXTENSION_ADDITION_FAILED":"Unable to add mta extension configuration to file: {{mtaExtFilePath}}","ERROR_UNABLE_TO_LOAD_MTA":"Unable to load mta.yaml configuration","ERROR_FAILED_TO_LOAD_SERVICE_KEY":"Failed to fetch service key","ERROR_CAP_DEPLOYMENT_NO_MTA":"This Fiori application is within a CAP project and deployment should be configured as part of the CAP project.","INFO_EXISTING_MTA_EXTENSION_NOT_FOUND":"Cannot find a valid existing mta extension file, a new one will be created","INFO_MTA_EXT_CREATED":"Created file: {{mtaExtFile}} to extend mta module: {{appMtaId}} with destination configuration","INFO_MTA_EXT_UPDATED":"Updated file: {{mtaExtFile}} with module destination configuration","WARN_EXISTING_DESTINATION_SERVICE_NOT_FOUND":"A destination service resource cannot be found in the mta.yaml. An mta extension destination instance cannot be added","LOG_ATO_PACKAGE_WARN":"Warning: superceding entered package {{package}} with packaged mandated by backend ATO settings: {{backendPackage}}","LOG_ENTER_CREDENTIAL":"Please enter your credentials for: {{url}}","LOG_ENTER_CREDENTIAL_CLIENT":"Please enter your credentials for: {{url}} (Client {{client}})","LOG_ENTER_CREDENTIAL_DESTINATION":"Please enter your credentials for destination: {{destination}}","LOG_CORRECT_CREDENTIAL":"Correct credentials.","LOG_INCORRECT_CREDENTIAL":"Incorrect credentials. Try again","LOG_INCORRECT_APP_NAME":"Your package is in the customer space. Please check the correctness of the application name as it might need to start with a Z.","LOG_MOVE_APP_PATH":"Moving application to {{newAppPath}}","LOG_WIN_OS_MSG":"Windows OS specific: ","LOG_WIN_OS_CANNOT_MOVE_LOCKED_FILE":"{{winosSpecificMsg}}Cannot remove locked folder {{srcPath}}","LOG_FAILED_SERVICE_KEY":"Failed to fetch service key","LOG_UPDATED_MTA":"Updated mta.yaml","LOG_READ_MTA":"Read mta.yaml with prefix {{prefix}}","LOG_READ_MTA_ERROR":"Could not read mta.yaml, trying again...","LOG_UPDATE_STANDALONE_MTA":"Updated standalone mta.yaml","LOG_UPDATE_MTA_FAILED":"Could not update mta.yaml","LOG_UPDATE_XSAPP_FAILED":"Could not update xs-app.json, error found {{error}}","LOG_UPDATED_XSAPP":"Updated standalone approuter xs-app.json {{message}}","LOG_ERROR":"{{method}} error found {{error}}","LOG_CANNOT_FIND_MTA":"Cannot find mta.yaml in current folder or up directory tree","LOG_ADD_FLP":"Adding FLP artifacts","LOG_ADDING_APP_TO_MTA":"Adding application {{appModule}} to mta.yaml","LOG_ADDING_PARAMS_TO_MTA":"Adding additional parameters to mta.yaml","LOG_ERROR_INSTALL_PHASE":"Error during install phase deployment-generator:cf: {{error}}","LOG_ROOT_ERROR_INSTALL_PHASE":"Error during install phase, root package.json deployment-generator:cf: {{error}}","LOG_ERROR_WRITING_PHASE":"Error writing phase deployment-generator:cf: {{error}}","LOG_ERROR_END_PHASE":"Error end phase deployment-generator:cf: {{error}}","LOG_UPDATING_PACKAGE_JSON":"Error updating package.json: {{error}}","LOG_UPDATED_PACKAGE_JSON":"Updated root package.json","LOG_ADDED_MTA_YAML":"mta.yaml created","WARN_MESSAGE_FLPCONF_INBOUND_CONFIG_KEY_EXISTS":"An inbound configuration with the key: \'{{inboundKey}}\' is already defined. ","PROMPT_FLPCONF_OVERWRITE":"Overwrite existing configuration?","PROMPT_FLPCONF_SEMANTIC_OBJECT":"Semantic Object","PROMPT_FLPCONF_ACTION":"Action","PROMPT_FLPCONF_TITLE":"Title","PROMPT_FLPCONF_SUBTITLE":"Subtitle (optional)","PROMPT_FLPCF_EXIST_MTA_DIR":"Existing configuration at {{mtaDir}} found. Do you want to extend it (or abort)?","PROMPT_FLPCF_NEW_MTA_DIR":"Enter the directory containing mta.yaml","PROMPT_FLPCF_NOT_EXIST_MTA_DIR":"{{mtaPath}} does not exist","PROMPT_VALIDATION_WARN_MAX_LENGTH":"Maximum length: {{maxLength}} characters","PROMPT_VALIDATION_WARNING_INPUT_REQUIRED":"{{inputName}} is required","PROMPT_APP_CHOOSE_TARGET":"Please choose the target","PROMPT_ABAP_APPNAME_REQUIRED":"Application name required","PROMPT_ABAP_INVALID_APPNAME_LENGTH":"Application name limited to 15 characters, entered {{length}}","PROMPT_ABAP_INVALID_APPNAME":"Application name needs to be prefixed with [{{prefix}}]","PROMPT_OVERWRITE_CONFIG":"Editing the deployment configuration will overwrite existing configuration, are you sure you want to continue?","PROMPT_OVERWRITE_ABORT":"Deployment config will abort if you choose no. Click Finish to abort.","PROMPT_ABAP_ENTER_BASE_CONFIG":"Enter the base configuration filename","PROMPT_ABAP_CONFIRM_SCP":"Is this an SAP Business Technology Platform system?","PROMPT_ABAP_DESTINATION":"Destination","PROMPT_ABAP_TARGET_SYSTEM":"Select Target system","PROMPT_ABAP_ENTER_TARGET":"Enter Target System URL","PROMPT_ABAP_TARGET_URL":"Target System URL","PROMPT_ABAP_CLIENT":"Client","PROMPT_ABAP_CLIENT_CHOICE_EXISTING":"Use project defined client {{client}}","PROMPT_ABAP_CLIENT_CHOICE_NEW":"Enter client","PROMPT_ABAP_CLIENT_CHOICE_BLANK":"Use default system client","PROMPT_ABAP_ENTER_CLIENT":"Enter client","PROMPT_ABAP_INVALID_APPNAME_LENGTH_2":"Name (Maximum length: 15 characters)","PROMPT_ABAP_APPNAME":"SAPUI5 ABAP Repository","PROMPT_ABAP_INVALID_APPNAME_LENGTH_PREFIX":"SAPUI5 ABAP Repository (Maximum length: 15 characters, should start with {{applicationPrefix}})","PROMPT_ABAP_PACKAGE":"Package","PROMPT_HINT_TYPE_TO_FILTER":" (Type to filter matching records)","PROMPT_ABAP_PACKAGE_WARN":"Provide a package","PROMPT_PACKAGE_INPUT_CHOICE":"How do you want to enter the Package","PROMPT_ABAP_PACKAGE_NOT_FOUND":"Package list cannot be fetched. Please enter the Package manually.","PROMPT_TRANSPORT_INPUT_CHOICE":"How do you want to enter Transport Request","PROMPT_TRANSPORT_LIST_PRE_REQS":"Name (SAPUI5 ABAP Repository) and Package are required to retrieve the existing Transport Requests","PROMPT_NO_TRANSPORT_REQUESTS":"There are no Transport Requests for the supplied package. You can choose to create a new one now or during deployment","PROMPT_TRANSPORT_NO_EXISTING_LIST":"Transport Request list cannot be fetched. Please enter Transport Request manually.","PROMPT_TRANSPORT_CANNOT_CREATE_TRANSPORT":"Create new Transport Request failed. Please enter Transport Request manually.","ENTER_MANUAL_CHOICE":"Enter manually","LIST_EXISTING_CHOICE":"Choose from existing","CREATE_NEW_CHOICE":"Create new","CREATE_DURING_DEPLOY_CHOICE":"Create during deployment","PROMPT_ABAP_TRANSPORT_NO":"Transport Request","PROMPT_ABAP_TRANSPORT_NO_MANDATORY":"Transport Request (mandatory)","PROMPT_ABAP_TRANSPORT_NO_REQUIRED":"Provide a transport request for your application","PROMPT_CREATE_TRANSPORT":"Created new Transport Request","PROMPT_ABAP_GENERATE_INDEX_HTML":"Generate standalone index.html during deployment","PROMPT_ABAP_USERNAME":"Username: ","PROMPT_ABAP_PASSWORD":"Password: ","PROMPT_ABAP_REQUIRE_CREDENTIAL":"Please provide credential to authenticate backend system","PROMPT_ABAP_DESCRIPTION":"Deployment Description","PROMPT_SERVER_PROJECT_PARENT":"Application router project path","PROMPT_SERVER_STANDALONE_APPROUTER":"Standalone Approuter","PROMPT_SERVER_MANAGED_APPROUTER":"Managed Approuter","PROMPT_SERVER_ADD_ROUTER_MODULE":"Add router module","PROMPT_SERVER_ADD_CONNECTIVITY":"Add connectivity service (required for connections to on-prem systems)?","PROMPT_SERVER_ADVANCED_OPTION":"Configure advanced options","PROMPT_CF_ABAP_ENV_UNAVAIL":"ABAP Environments Unavailable","PROMPT_CF_GENERATE_IN_ROOT":"Generate project artifacts in root folder: {{root}}?","PROMPT_CF_MTA_EXISTS":"Existing configuration at {{mtaPath}} found. Do you want to extend it (or abort)?","PROMPT_CF_SELECT_ROOT_PATH":"Please enter the location of the root folder (relative or absolute path)","PROMPT_CF_CREATE_ROOT":"{{root}} does not exist. Create it?","PROMPT_CF_CREATE_ROOT_CHOICE_YES":"Yes","PROMPT_CF_CREATE_ROOT_CHOICE_NEW":"Enter new name","PROMPT_CF_CREATE_ROOT_CHOICE_ABORT":"Abort","PROMPT_CF_CREATE_MTA_ID":"MTA ID","PROMPT_CF_CREATE_MTA_DESC":"MTA description","PROMPT_CF_CREATE_MTA_VERSION":"MTA version","PROMPT_CF_ABAP_SERVICE":"Do you want to connect to your ABAP environment via direct service binding?","PROMPT_CF_DESTINATION":"Destination name","PROMPT_CF_DESTINATION_HINT":"Destination name - The app router is configured to use direct service binding","PROMPT_CF_HINT_CF_LOGIN":"Login to Cloud Foundry is required prior to view available ABAP services.","PROMPT_CF_LOAD_ABAP_SERVICE_FAIL":"Discovering ABAP environments failed. Check logs for details.","PROMPT_CF_SELECT_ABAP_SERVICE":"ABAP Environment for direct service binding","PROMPT_CF_MOVE_APP_DIR":"Move app directory [{{appPath}}] to {{newRoot}}?\\n(Please ensure everything is under version control and committed first)","PROMPT_CF_NEW_DIR_NAME":"Choose new directory name","PROMPT_CF_APP_PATH_EXISTS":"{{appPath}} already exists.\\nPlease choose an option (h for help)","PROMPT_CF_CREATE_CHOICE_NO_MOVE":"Don\'t move","PROMPT_CF_LABEL_NONE":"None","PROMPT_CF_LABEL_DIRECT_SERVICE_BINDING":"Direct Service Binding","NOT_OVERWRITING_EXISTING_INDEX_HTML":"\'webapp/index.html\' already exists. Won\'t overwrite","PROMPT_GENERATE_MANAGED_APPROUTER":"Add application to managed application router?","WARN_CANNOT_GET_TRANSPORT_CONFIGURATION":"Cannot get transport configuration from the backend","PROMPT_INSTANCE_BASED_DEST_DEFAULT":"Local CAP Project API (Instance Based Destination)","PROMPT_INSTANCE_BASED_DEST":"{{destination}} (Instance Based Destination)","TOOLTIP_SAP_UI5_ABAP_REPO":"Enter the name for the deployed application. The name must follow the rules of creating a BSP application. It must not exceed 15 characters and must consist of alphanumeric characters or underscores only. Name should be unique in the BSP repository and its namespace is compatible with the selected package.","TOOLTIP_ABAP_DESCRIPTION":"The description of the deployed application.","TOOLTIP_ABAP_PACKAGE":"Provide a package for the deployed application.","ERROR_DEPLOY_TARGET_NOT_DEPLOYABLE":"{{systemError}} To continue with project generation choose a different deployment target or skip adding deploy config.","LABEL_TARGET_SYSTEM_BREADCRUMB":"Target System","LABEL_TARGET_SYSTEM_TYPE_BREADCRUMB":"Target Type","LABEL_SCP_BREADCRUMB":"SCP","LABEL_GENERATE_INDEX_HTML_BREADCRUMB":"Generate index.html","LABEL_ADD_APP_TO_ROUTER_BREADCRUMB":"Add to Router","LABEL_FLP_SUBTITLE_BREADCRUMB":"Subtitle","LABEL_ROUTER_PATH_BREADCRUMB":"App Router Path","LABEL_CONNECTIVITY_SERVICE_BREADCRUMB":"Add Connectivity Service","LABEL_DIRECT_SERVICE_ABAP_ENVIRONMENT_BREADCRUMB":"ABAP Env. Binding","INFO_MESSAGE_MORE_SEARCH_RESULTS":"More than {{numResults}} results, keep typing to narrow down","PROMPT_LABEL_S4_CONTINUE":"S/4 {{configType}} configuration is managed centrally as part of the CI pipeline, local updates to deployment configuration will not be for productive use. Are you sure you want to continue?","ERROR_EMPTY_NAME":"You must provide a destination name in order to continue.","ERROR_NAME_MSG":"The destination name must only contain letters, digits, dashes and underscores.","ERROR_NAME_TOO_LONG":"Destination name cannot contain more than 200 characters","VIRTUAL_HOST_WARNING":"As the destination uses a virtual host, you will need to replace the host in the URL with the internal host that is configured with your SAP Cloud Connector when previewing the deployed application."}')},69645:e=>{"use strict";e.exports={}}},r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var o=r[e]={id:e,loaded:!1,exports:{}};return n[e].call(o.exports,o,o.exports,i),o.loaded=!0,o.exports}i.m=n,i.c=r,i.x=()=>{var e=i.O(void 0,[712,784,36,475,763],(()=>i(i.s=26649)));return e=i.O(e)},e=[],i.O=(t,n,r,o)=>{if(!n){var s=1/0;for(u=0;u<e.length;u++){for(var[n,r,o]=e[u],a=!0,_=0;_<n.length;_++)(!1&o||s>=o)&&Object.keys(i.O).every((e=>i.O[e](n[_])))?n.splice(_--,1):(a=!1,o<s&&(s=o));if(a){e.splice(u--,1);var c=r();void 0!==c&&(t=c)}}return t}o=o||0;for(var u=e.length;u>0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[n,r,o]},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((t,n)=>(i.f[n](e,t),t)),[])),i.u=e=>({36:"app-config-writer/dist",475:"tools-suite-common-libs",712:"commonlibs",763:"app-gen-shared",784:"open-ux-shared"}[e]+"/index.js"),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),i.j=385,i.p="",(()=>{var e={385:1,190:1,651:1};i.O.require=t=>e[t];i.f.require=(t,n)=>{e[t]||(t=>{var n=t.modules,r=t.ids,o=t.runtime;for(var s in n)i.o(n,s)&&(i.m[s]=n[s]);o&&o(i);for(var a=0;a<r.length;a++)e[r[a]]=1;i.O()})(require("../"+i.u(t)))}})(),t=i.x,i.x=()=>(i.e(712),i.e(784),i.e(36),i.e(475),i.e(763),t());var o=i.x();module.exports=o})(); |
@@ -1,1 +0,1 @@ | ||
(()=>{var e,r,t={51617:e=>{function r(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}r.keys=()=>[],r.resolve=r,r.id=51617,e.exports=r},39973:e=>{function r(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}r.keys=()=>[],r.resolve=r,r.id=39973,e.exports=r},20230:e=>{function r(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}r.keys=()=>[],r.resolve=r,r.id=20230,e.exports=r},20545:e=>{function r(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}r.keys=()=>[],r.resolve=r,r.id=20545,e.exports=r},4297:e=>{function r(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}r.keys=()=>[],r.resolve=r,r.id=4297,e.exports=r},75601:e=>{function r(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}r.keys=()=>[],r.resolve=r,r.id=75601,e.exports=r},82626:e=>{function r(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}r.keys=()=>[],r.resolve=r,r.id=82626,e.exports=r},37974:e=>{function r(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}r.keys=()=>[],r.resolve=r,r.id=37974,e.exports=r},85858:(e,r,t)=>{var o={"./cat":43112,"./cat.js":43112,"./cd":86698,"./cd.js":86698,"./chmod":23986,"./chmod.js":23986,"./common":96816,"./common.js":96816,"./cp":80610,"./cp.js":80610,"./dirs":91972,"./dirs.js":91972,"./echo":16166,"./echo.js":16166,"./error":80609,"./error.js":80609,"./exec":52024,"./exec-child":69911,"./exec-child.js":69911,"./exec.js":52024,"./find":22261,"./find.js":22261,"./grep":56818,"./grep.js":56818,"./head":66412,"./head.js":66412,"./ln":91247,"./ln.js":91247,"./ls":5815,"./ls.js":5815,"./mkdir":70098,"./mkdir.js":70098,"./mv":74164,"./mv.js":74164,"./popd":99851,"./popd.js":99851,"./pushd":6978,"./pushd.js":6978,"./pwd":24044,"./pwd.js":24044,"./rm":44256,"./rm.js":44256,"./sed":43422,"./sed.js":43422,"./set":17444,"./set.js":17444,"./sort":53033,"./sort.js":53033,"./tail":50318,"./tail.js":50318,"./tempdir":16275,"./tempdir.js":16275,"./test":50021,"./test.js":50021,"./to":44915,"./to.js":44915,"./toEnd":13326,"./toEnd.js":13326,"./touch":57650,"./touch.js":57650,"./uniq":63019,"./uniq.js":63019,"./which":5483,"./which.js":5483};function s(e){var r=i(e);return t(r)}function i(e){if(!t.o(o,e)){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}return o[e]}s.keys=function(){return Object.keys(o)},s.resolve=i,e.exports=s,s.id=85858},21301:function(e,r,t){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});const s=t(1628),i=t(74448),n=t(57147),p=t(71017),c=o(t(98819)),a=t(82590),u="@sap/fiori:fiori-deployment_headless";class default_1 extends c.default{constructor(e,r){super(e,r,{unique:"namespace"}),r.testMode||this.env.isPackageRegistered(u)||this.env.lookup({packagePatterns:["@sap/generator-fiori"]});try{if(this.arguments=e,this.argument("appconfig",{type:String,description:(0,s.t)("INFO_GENERATOR_ARG_APP_CONFIG"),required:!1}),!this.options.appconfig)throw Error((0,s.t)("ERROR_ARG_OR_OPTION_HEADLESS_GENERATOR"));let r;if("object"==typeof this.options.appconfig?r=this.options.appconfig:(0,n.existsSync)(this.options.appconfig)?(r=JSON.parse((0,n.readFileSync)(this.options.appconfig,"utf-8")),this.absAppConfigPath=(0,p.resolve)(this.options.appconfig)):r=JSON.parse(this.options.appconfig),this.argument("targetfolder",{type:String,required:!1}),this.options.targetfolder?r.project.targetFolder=(0,p.isAbsolute)(this.options.targetfolder)?this.options.targetfolder:(0,p.join)(process.cwd(),r.project.targetFolder||""):r.project.targetFolder&&!(0,p.isAbsolute)(r.project.targetFolder)&&(r.project.targetFolder=(0,p.join)(process.cwd(),r.project.targetFolder||"")),r.service?.capService?.projectPath)this.log(`Target folder determined by cap path: ${r.service.capService.projectPath}`);else{const e=(0,p.join)(r.project.targetFolder||process.cwd(),r.project.name);if((0,n.existsSync)(e)&&!this.options.force)throw Error((0,s.t)("ERROR_APP_FOLDER_EXISTS",{projectPath:e}));this.log((0,s.t)("INFO_APP_TARGET_FOLDER",{targetFolder:r.project.targetFolder}))}this.appConfig=r}catch(e){throw this.log((0,s.t)("ERROR_GENERATION_EXITING")),e}}initializing(){const e=(0,a.getSubGeneratorName)(s.FloorplanFE[this.appConfig.floorplan]??s.FloorplanFF[this.appConfig.floorplan],!0);this.composeWith(e,{arguments:this.arguments,...Object.assign(this.options,{appConfig:this.appConfig})}),(this.appConfig.deployConfig||this.appConfig.flpConfig)&&(this.options.appConfig.project.targetFolder=this.appConfig.service?.capService?.projectPath?(0,p.join)(this.appConfig.service.capService.projectPath,this.appConfig.service.capService.appPath??i.CAP_APPS_FOLDER):this.options.appConfig.project.targetFolder,this.composeWith(u,{arguments:this.arguments,...this.options}))}end(){this.options.deleteFile&&(0,n.existsSync)(this.absAppConfigPath)&&(this.log((0,s.t)("INFO_DELETING_APPLICATION_CONFIG_FILE",{filepath:this.absAppConfigPath})),(0,n.unlinkSync)(this.absAppConfigPath))}}r.default=default_1},82590:function(e,r,t){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.getSubGeneratorName=r.getSubGeneratorPath=void 0;const s=t(1628),i=o(t(71017));r.getSubGeneratorPath=function(e,r){const t=(0,s.getGeneratorName)(e);if(t)return i.default.join(__dirname,"..",t,r?"headless":"app");throw(0,s.t)("ERROR_UNSUPPORTED_GENERATOR_NAME",{genName:t})},r.getSubGeneratorName=function(e,r){const t=(0,s.getGeneratorName)(e);if(t){const e=`@sap/fiori:${t}`;return r?`${e}_headless`:`${e}`}throw(0,s.t)("ERROR_UNSUPPORTED_GENERATOR_NAME",{genName:t})}},34409:e=>{function r(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}r.keys=()=>[],r.resolve=r,r.id=34409,e.exports=r},70910:(e,r,t)=>{var o={"./Find-VisualStudio.cs":20183,"./build":17724,"./build.js":17724,"./clean":1658,"./clean.js":1658,"./configure":4748,"./configure.js":4748,"./create-config-gypi":98395,"./create-config-gypi.js":98395,"./find-node-directory":24159,"./find-node-directory.js":24159,"./find-python":29130,"./find-python.js":29130,"./find-visualstudio":17703,"./find-visualstudio.js":17703,"./install":25925,"./install.js":25925,"./list":44179,"./list.js":44179,"./node-gyp":55614,"./node-gyp.js":55614,"./process-release":75344,"./process-release.js":75344,"./rebuild":64187,"./rebuild.js":64187,"./remove":13103,"./remove.js":13103,"./util":55690,"./util.js":55690};function s(e){var r=i(e);return t(r)}function i(e){if(!t.o(o,e)){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}return o[e]}s.keys=function(){return Object.keys(o)},s.resolve=i,e.exports=s,s.id=70910},84679:e=>{function r(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}r.keys=()=>[],r.resolve=r,r.id=84679,e.exports=r},12937:e=>{function r(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}r.keys=()=>[],r.resolve=r,r.id=12937,e.exports=r},84397:e=>{function r(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}r.keys=()=>[],r.resolve=r,r.id=84397,e.exports=r},54529:e=>{"use strict";e.exports=require("@opentelemetry/tracing")},85767:e=>{"use strict";e.exports=require("@sap/cds")},32220:e=>{"use strict";e.exports=require("applicationinsights-native-metrics")},43241:e=>{"use strict";e.exports=require("esprima")},74602:e=>{"use strict";e.exports=require("keytar")},66828:e=>{"use strict";e.exports=require("vscode")},39491:e=>{"use strict";e.exports=require("assert")},50852:e=>{"use strict";e.exports=require("async_hooks")},14300:e=>{"use strict";e.exports=require("buffer")},32081:e=>{"use strict";e.exports=require("child_process")},96206:e=>{"use strict";e.exports=require("console")},22057:e=>{"use strict";e.exports=require("constants")},6113:e=>{"use strict";e.exports=require("crypto")},9523:e=>{"use strict";e.exports=require("dns")},82361:e=>{"use strict";e.exports=require("events")},57147:e=>{"use strict";e.exports=require("fs")},73292:e=>{"use strict";e.exports=require("fs/promises")},13685:e=>{"use strict";e.exports=require("http")},95687:e=>{"use strict";e.exports=require("https")},98188:e=>{"use strict";e.exports=require("module")},41808:e=>{"use strict";e.exports=require("net")},22037:e=>{"use strict";e.exports=require("os")},71017:e=>{"use strict";e.exports=require("path")},77282:e=>{"use strict";e.exports=require("process")},85477:e=>{"use strict";e.exports=require("punycode")},63477:e=>{"use strict";e.exports=require("querystring")},14521:e=>{"use strict";e.exports=require("readline")},12781:e=>{"use strict";e.exports=require("stream")},71576:e=>{"use strict";e.exports=require("string_decoder")},39512:e=>{"use strict";e.exports=require("timers")},24404:e=>{"use strict";e.exports=require("tls")},76224:e=>{"use strict";e.exports=require("tty")},57310:e=>{"use strict";e.exports=require("url")},73837:e=>{"use strict";e.exports=require("util")},26144:e=>{"use strict";e.exports=require("vm")},59796:e=>{"use strict";e.exports=require("zlib")}},o={};function s(e){var r=o[e];if(void 0!==r)return r.exports;var i=o[e]={id:e,loaded:!1,exports:{}};return t[e].call(i.exports,i,i.exports,s),i.loaded=!0,i.exports}s.m=t,s.c=o,s.x=()=>{var e=s.O(void 0,[712,784,475,763],(()=>s(s.s=21301)));return e=s.O(e)},e=[],s.O=(r,t,o,i)=>{if(!t){var n=1/0;for(u=0;u<e.length;u++){for(var[t,o,i]=e[u],p=!0,c=0;c<t.length;c++)(!1&i||n>=i)&&Object.keys(s.O).every((e=>s.O[e](t[c])))?t.splice(c--,1):(p=!1,i<n&&(n=i));if(p){e.splice(u--,1);var a=o();void 0!==a&&(r=a)}}return r}i=i||0;for(var u=e.length;u>0&&e[u-1][2]>i;u--)e[u]=e[u-1];e[u]=[t,o,i]},s.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return s.d(r,{a:r}),r},s.d=(e,r)=>{for(var t in r)s.o(r,t)&&!s.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce(((r,t)=>(s.f[t](e,r),r)),[])),s.u=e=>({475:"tools-suite-common-libs",712:"commonlibs",763:"app-gen-shared",784:"open-ux-shared"}[e]+"/index.js"),s.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),s.j=884,s.p="",(()=>{var e={884:1,190:1};s.O.require=r=>e[r];s.f.require=(r,t)=>{e[r]||(r=>{var t=r.modules,o=r.ids,i=r.runtime;for(var n in t)s.o(t,n)&&(s.m[n]=t[n]);i&&i(s);for(var p=0;p<o.length;p++)e[o[p]]=1;s.O()})(require("../"+s.u(r)))}})(),r=s.x,s.x=()=>(s.e(712),s.e(784),s.e(475),s.e(763),r());var i=s.x();module.exports=i})(); | ||
(()=>{var e,r,t={51617:e=>{function r(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}r.keys=()=>[],r.resolve=r,r.id=51617,e.exports=r},39973:e=>{function r(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}r.keys=()=>[],r.resolve=r,r.id=39973,e.exports=r},20230:e=>{function r(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}r.keys=()=>[],r.resolve=r,r.id=20230,e.exports=r},20545:e=>{function r(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}r.keys=()=>[],r.resolve=r,r.id=20545,e.exports=r},4297:e=>{function r(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}r.keys=()=>[],r.resolve=r,r.id=4297,e.exports=r},75601:e=>{function r(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}r.keys=()=>[],r.resolve=r,r.id=75601,e.exports=r},82626:e=>{function r(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}r.keys=()=>[],r.resolve=r,r.id=82626,e.exports=r},37974:e=>{function r(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}r.keys=()=>[],r.resolve=r,r.id=37974,e.exports=r},85858:(e,r,t)=>{var o={"./cat":43112,"./cat.js":43112,"./cd":86698,"./cd.js":86698,"./chmod":23986,"./chmod.js":23986,"./common":96816,"./common.js":96816,"./cp":80610,"./cp.js":80610,"./dirs":91972,"./dirs.js":91972,"./echo":16166,"./echo.js":16166,"./error":80609,"./error.js":80609,"./exec":52024,"./exec-child":69911,"./exec-child.js":69911,"./exec.js":52024,"./find":22261,"./find.js":22261,"./grep":56818,"./grep.js":56818,"./head":66412,"./head.js":66412,"./ln":91247,"./ln.js":91247,"./ls":5815,"./ls.js":5815,"./mkdir":70098,"./mkdir.js":70098,"./mv":74164,"./mv.js":74164,"./popd":99851,"./popd.js":99851,"./pushd":6978,"./pushd.js":6978,"./pwd":24044,"./pwd.js":24044,"./rm":44256,"./rm.js":44256,"./sed":43422,"./sed.js":43422,"./set":17444,"./set.js":17444,"./sort":53033,"./sort.js":53033,"./tail":50318,"./tail.js":50318,"./tempdir":16275,"./tempdir.js":16275,"./test":50021,"./test.js":50021,"./to":44915,"./to.js":44915,"./toEnd":13326,"./toEnd.js":13326,"./touch":57650,"./touch.js":57650,"./uniq":63019,"./uniq.js":63019,"./which":5483,"./which.js":5483};function s(e){var r=i(e);return t(r)}function i(e){if(!t.o(o,e)){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}return o[e]}s.keys=function(){return Object.keys(o)},s.resolve=i,e.exports=s,s.id=85858},21301:function(e,r,t){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});const s=t(1628),i=t(74448),n=t(57147),p=t(71017),c=o(t(98819)),a=t(82590),u="@sap/fiori:fiori-deployment_headless";class default_1 extends c.default{constructor(e,r){super(e,r,{unique:"namespace"}),r.testMode||this.env.isPackageRegistered(u)||this.env.lookup({packagePatterns:["@sap/generator-fiori"]});try{if(this.arguments=e,this.argument("appconfig",{type:String,description:(0,s.t)("INFO_GENERATOR_ARG_APP_CONFIG"),required:!1}),!this.options.appconfig)throw Error((0,s.t)("ERROR_ARG_OR_OPTION_HEADLESS_GENERATOR"));let r;if("object"==typeof this.options.appconfig?r=this.options.appconfig:(0,n.existsSync)(this.options.appconfig)?(r=JSON.parse((0,n.readFileSync)(this.options.appconfig,"utf-8")),this.absAppConfigPath=(0,p.resolve)(this.options.appconfig)):r=JSON.parse(this.options.appconfig),this.argument("targetfolder",{type:String,required:!1}),this.options.targetfolder?r.project.targetFolder=(0,p.isAbsolute)(this.options.targetfolder)?this.options.targetfolder:(0,p.join)(process.cwd(),r.project.targetFolder||""):r.project.targetFolder&&!(0,p.isAbsolute)(r.project.targetFolder)&&(r.project.targetFolder=(0,p.join)(process.cwd(),r.project.targetFolder||"")),r.service?.capService?.projectPath)this.log(`Target folder determined by cap path: ${r.service.capService.projectPath}`);else{const e=(0,p.join)(r.project.targetFolder||process.cwd(),r.project.name);if((0,n.existsSync)(e)){if(!this.options.force)throw Error((0,s.t)("ERROR_APP_FOLDER_EXISTS",{projectPath:e}));this.log((0,s.t)("INFO_REMOVING_EXISTING_APP_FOLDER_FORCE_OPTION",{projectPath:e})),(0,n.rmSync)(e,{recursive:!0,force:!0})}this.log((0,s.t)("INFO_APP_TARGET_FOLDER",{targetFolder:r.project.targetFolder}))}this.appConfig=r}catch(e){throw this.log((0,s.t)("ERROR_GENERATION_EXITING")),e}}initializing(){const e=(0,a.getSubGeneratorName)(s.FloorplanFE[this.appConfig.floorplan]??s.FloorplanFF[this.appConfig.floorplan],!0);this.composeWith(e,{arguments:this.arguments,...Object.assign(this.options,{appConfig:this.appConfig})}),(this.appConfig.deployConfig||this.appConfig.flpConfig)&&(this.options.appConfig.project.targetFolder=this.appConfig.service?.capService?.projectPath?(0,p.join)(this.appConfig.service.capService.projectPath,this.appConfig.service.capService.appPath??i.CAP_APPS_FOLDER):this.options.appConfig.project.targetFolder,this.composeWith(u,{arguments:this.arguments,...this.options}))}end(){this.options.deleteFile&&(0,n.existsSync)(this.absAppConfigPath)&&(this.log((0,s.t)("INFO_DELETING_APPLICATION_CONFIG_FILE",{filepath:this.absAppConfigPath})),(0,n.unlinkSync)(this.absAppConfigPath))}}r.default=default_1},82590:function(e,r,t){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.getSubGeneratorName=r.getSubGeneratorPath=void 0;const s=t(1628),i=o(t(71017));r.getSubGeneratorPath=function(e,r){const t=(0,s.getGeneratorName)(e);if(t)return i.default.join(__dirname,"..",t,r?"headless":"app");throw(0,s.t)("ERROR_UNSUPPORTED_GENERATOR_NAME",{genName:t})},r.getSubGeneratorName=function(e,r){const t=(0,s.getGeneratorName)(e);if(t){const e=`@sap/fiori:${t}`;return r?`${e}_headless`:`${e}`}throw(0,s.t)("ERROR_UNSUPPORTED_GENERATOR_NAME",{genName:t})}},34409:e=>{function r(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}r.keys=()=>[],r.resolve=r,r.id=34409,e.exports=r},70910:(e,r,t)=>{var o={"./Find-VisualStudio.cs":20183,"./build":17724,"./build.js":17724,"./clean":1658,"./clean.js":1658,"./configure":4748,"./configure.js":4748,"./create-config-gypi":98395,"./create-config-gypi.js":98395,"./find-node-directory":24159,"./find-node-directory.js":24159,"./find-python":29130,"./find-python.js":29130,"./find-visualstudio":17703,"./find-visualstudio.js":17703,"./install":25925,"./install.js":25925,"./list":44179,"./list.js":44179,"./node-gyp":55614,"./node-gyp.js":55614,"./process-release":75344,"./process-release.js":75344,"./rebuild":64187,"./rebuild.js":64187,"./remove":13103,"./remove.js":13103,"./util":55690,"./util.js":55690};function s(e){var r=i(e);return t(r)}function i(e){if(!t.o(o,e)){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}return o[e]}s.keys=function(){return Object.keys(o)},s.resolve=i,e.exports=s,s.id=70910},84679:e=>{function r(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}r.keys=()=>[],r.resolve=r,r.id=84679,e.exports=r},12937:e=>{function r(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}r.keys=()=>[],r.resolve=r,r.id=12937,e.exports=r},84397:e=>{function r(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}r.keys=()=>[],r.resolve=r,r.id=84397,e.exports=r},54529:e=>{"use strict";e.exports=require("@opentelemetry/tracing")},85767:e=>{"use strict";e.exports=require("@sap/cds")},32220:e=>{"use strict";e.exports=require("applicationinsights-native-metrics")},43241:e=>{"use strict";e.exports=require("esprima")},74602:e=>{"use strict";e.exports=require("keytar")},66828:e=>{"use strict";e.exports=require("vscode")},39491:e=>{"use strict";e.exports=require("assert")},50852:e=>{"use strict";e.exports=require("async_hooks")},14300:e=>{"use strict";e.exports=require("buffer")},32081:e=>{"use strict";e.exports=require("child_process")},96206:e=>{"use strict";e.exports=require("console")},22057:e=>{"use strict";e.exports=require("constants")},6113:e=>{"use strict";e.exports=require("crypto")},9523:e=>{"use strict";e.exports=require("dns")},82361:e=>{"use strict";e.exports=require("events")},57147:e=>{"use strict";e.exports=require("fs")},73292:e=>{"use strict";e.exports=require("fs/promises")},13685:e=>{"use strict";e.exports=require("http")},95687:e=>{"use strict";e.exports=require("https")},98188:e=>{"use strict";e.exports=require("module")},41808:e=>{"use strict";e.exports=require("net")},22037:e=>{"use strict";e.exports=require("os")},71017:e=>{"use strict";e.exports=require("path")},77282:e=>{"use strict";e.exports=require("process")},85477:e=>{"use strict";e.exports=require("punycode")},63477:e=>{"use strict";e.exports=require("querystring")},14521:e=>{"use strict";e.exports=require("readline")},12781:e=>{"use strict";e.exports=require("stream")},71576:e=>{"use strict";e.exports=require("string_decoder")},39512:e=>{"use strict";e.exports=require("timers")},24404:e=>{"use strict";e.exports=require("tls")},76224:e=>{"use strict";e.exports=require("tty")},57310:e=>{"use strict";e.exports=require("url")},73837:e=>{"use strict";e.exports=require("util")},26144:e=>{"use strict";e.exports=require("vm")},59796:e=>{"use strict";e.exports=require("zlib")}},o={};function s(e){var r=o[e];if(void 0!==r)return r.exports;var i=o[e]={id:e,loaded:!1,exports:{}};return t[e].call(i.exports,i,i.exports,s),i.loaded=!0,i.exports}s.m=t,s.c=o,s.x=()=>{var e=s.O(void 0,[712,784,475,763],(()=>s(s.s=21301)));return e=s.O(e)},e=[],s.O=(r,t,o,i)=>{if(!t){var n=1/0;for(u=0;u<e.length;u++){for(var[t,o,i]=e[u],p=!0,c=0;c<t.length;c++)(!1&i||n>=i)&&Object.keys(s.O).every((e=>s.O[e](t[c])))?t.splice(c--,1):(p=!1,i<n&&(n=i));if(p){e.splice(u--,1);var a=o();void 0!==a&&(r=a)}}return r}i=i||0;for(var u=e.length;u>0&&e[u-1][2]>i;u--)e[u]=e[u-1];e[u]=[t,o,i]},s.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return s.d(r,{a:r}),r},s.d=(e,r)=>{for(var t in r)s.o(r,t)&&!s.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce(((r,t)=>(s.f[t](e,r),r)),[])),s.u=e=>({475:"tools-suite-common-libs",712:"commonlibs",763:"app-gen-shared",784:"open-ux-shared"}[e]+"/index.js"),s.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),s.j=884,s.p="",(()=>{var e={884:1,190:1};s.O.require=r=>e[r];s.f.require=(r,t)=>{e[r]||(r=>{var t=r.modules,o=r.ids,i=r.runtime;for(var n in t)s.o(t,n)&&(s.m[n]=t[n]);i&&i(s);for(var p=0;p<o.length;p++)e[o[p]]=1;s.O()})(require("../"+s.u(r)))}})(),r=s.x,s.x=()=>(s.e(712),s.e(784),s.e(475),s.e(763),r());var i=s.x();module.exports=i})(); |
@@ -1,1 +0,1 @@ | ||
"use strict";exports.id=916,exports.ids=[916],exports.modules={59572:(e,n,t)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.getAnnotationNamespaces=void 0;const i=t(88295),a=t(46996);function o(e){const n={attributeNamePrefix:"",ignoreAttributes:!1,ignoreNameSpace:!0,parseAttributeValue:!0};try{return new i.XMLParser(n).parse(e,!0)}catch(e){throw new Error((0,a.t)("error.unparseableXML",{error:e}))}}n.getAnnotationNamespaces=function({metadata:e,annotations:n}){const t=e?function(e){var n,t;const i=o(e);let a=null===(t=null===(n=i["edmx:Edmx"])||void 0===n?void 0:n["edmx:DataServices"])||void 0===t?void 0:t.Schema;if(!a)return[];Array.isArray(a)||(a=[a]);return a.map((e=>({namespace:e.Namespace,alias:e.Alias||""})))}(e):[];if(null==n?void 0:n.xml){const e=o(n.xml);return t.map((t=>{const i=n.xml&&t.namespace?function(e,n){var t,i;let a=null===(t=e["edmx:Edmx"])||void 0===t?void 0:t["edmx:Reference"];Array.isArray(a)||(a=[a]);const o=a.find((e=>{var t,i;return(null===(t=e["edmx:Include"])||void 0===t?void 0:t.Namespace)===n&&(null===(i=e["edmx:Include"])||void 0===i?void 0:i.Alias)}));return o?null===(i=o["edmx:Include"])||void 0===i?void 0:i.Alias:""}(e,t.namespace):"";return i&&(t.alias=i),t}))}return t}},72848:(e,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DEFAULT_DATASOURCE_NAME=void 0,n.DEFAULT_DATASOURCE_NAME="mainService"},77660:(e,n,t)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.enhanceData=void 0;const i=t(72848);n.enhanceData=function(e){var n,t;!function(e){var n,t;e.path=(null===(n=e.path)||void 0===n?void 0:n.endsWith("/"))?e.path:(null!==(t=e.path)&&void 0!==t?t:"")+"/"}(e),function(e){var n;e.name=null!==(n=e.name)&&void 0!==n?n:i.DEFAULT_DATASOURCE_NAME}(e),function(e){var n;e.model=null!==(n=e.model)&&void 0!==n?n:""}(e),function(e){var n,t,i,a;(null===(n=e.annotations)||void 0===n?void 0:n.technicalName)&&!e.annotations.name&&(e.annotations.name=null===(a=null===(i=null===(t=e.annotations)||void 0===t?void 0:t.technicalName)||void 0===i?void 0:i.replace(/\//g,"_"))||void 0===a?void 0:a.replace(/^_/,""))}(e),e.previewSettings=e.previewSettings||{},e.previewSettings.path=e.previewSettings.path||`/${null!==(t=null===(n=e.path)||void 0===n?void 0:n.split("/").filter((e=>""!==e))[0])&&void 0!==t?t:""}`,e.previewSettings.url=e.previewSettings.url||e.url||"http://localhost",e.client&&!e.previewSettings.client&&(e.previewSettings.client=e.client),e.destination&&!e.previewSettings.destination&&(e.previewSettings.destination=e.destination.name,e.destination.instance&&(e.previewSettings.destinationInstance=e.destination.instance))}},28276:function(e,n,t){var i=this&&this.__createBinding||(Object.create?function(e,n,t,i){void 0===i&&(i=t);var a=Object.getOwnPropertyDescriptor(n,t);a&&!("get"in a?!n.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return n[t]}}),Object.defineProperty(e,i,a)}:function(e,n,t,i){void 0===i&&(i=t),e[i]=n[t]}),a=this&&this.__exportStar||function(e,n){for(var t in e)"default"===t||Object.prototype.hasOwnProperty.call(n,t)||i(n,e,t)};Object.defineProperty(n,"__esModule",{value:!0}),a(t(77660),n),a(t(59572),n)},46996:function(e,n,t){var i=this&&this.__awaiter||function(e,n,t,i){return new(t||(t=Promise))((function(a,o){function r(e){try{s(i.next(e))}catch(e){o(e)}}function d(e){try{s(i.throw(e))}catch(e){o(e)}}function s(e){var n;e.done?a(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(r,d)}s((i=i.apply(e,n||[])).next())}))},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.t=n.initI18n=void 0;const o=a(t(18237)),r=a(t(67402)),d="odata-service-writer";function s(){return i(this,void 0,void 0,(function*(){yield o.default.init({resources:{en:{[d]:r.default}},lng:"en",fallbackLng:"en",defaultNS:d,ns:[d]})}))}n.initI18n=s,n.t=function(e,n){return o.default.t(e,n)},s().catch((()=>{}))},28923:function(e,n,t){var i=this&&this.__awaiter||function(e,n,t,i){return new(t||(t=Promise))((function(a,o){function r(e){try{s(i.next(e))}catch(e){o(e)}}function d(e){try{s(i.throw(e))}catch(e){o(e)}}function s(e){var n;e.done?a(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(r,d)}s((i=i.apply(e,n||[])).next())}))},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.ServiceType=n.OdataVersion=n.generate=n.findProjectFiles=void 0;const o=t(71017),r=t(5407),d=t(84659),s=t(51450),c=t(43594),u=a(t(10980)),l=t(28276),p=t(46996),v=t(71508);function f(e,n){return i(this,void 0,void 0,(function*(){const t={},i=e.split(o.sep);for(;i.length>0&&(!t.packageJson||!t.ui5Yaml);){const e=i.join(o.sep);!t.packageJson&&n.exists((0,o.join)(e,"package.json"))&&(t.packageJson=(0,o.join)(e,"package.json")),!t.ui5Yaml&&n.exists((0,o.join)(e,"ui5.yaml"))&&(t.ui5Yaml=(0,o.join)(e,"ui5.yaml")),i.pop()}return t}))}Object.defineProperty(n,"OdataVersion",{enumerable:!0,get:function(){return v.OdataVersion}}),Object.defineProperty(n,"ServiceType",{enumerable:!0,get:function(){return v.ServiceType}}),n.findProjectFiles=f,n.generate=function(e,n,t){var a;return i(this,void 0,void 0,(function*(){t||(t=(0,d.create)((0,r.create)()));const i=yield f(e,t);!function(e,n,t){n.forEach((n=>{if(!t.exists((0,o.join)(e,n)))throw new Error((0,p.t)("error.requiredProjectFileNotFound",{path:n}))}))}(e,["webapp/manifest.json"],t),(0,l.enhanceData)(n);const v=(0,o.join)(__dirname,"../templates");let m,h,w;if((0,s.updateManifest)(e,n,t,v),i.ui5Yaml){m=yield c.UI5Config.newInstance(t.read(i.ui5Yaml));try{m.addBackendToFioriToolsProxydMiddleware(n.previewSettings)}catch(e){if(!(e instanceof c.YAMLError&&e.code===c.yamlErrorCode.nodeNotFound))throw e;m.addFioriToolsProxydMiddleware({backend:[n.previewSettings]})}t.write(i.ui5Yaml,m.toString()),w=(0,o.join)((0,o.dirname)(i.ui5Yaml),"ui5-local.yaml"),t.exists(w)&&(h=yield c.UI5Config.newInstance(t.read(w)),h.addFioriToolsProxydMiddleware({backend:[n.previewSettings]}))}if(n.metadata){if(i.ui5Yaml&&m){const e=yield c.UI5Config.newInstance(m.toString());e.addMockServerMiddleware(n.path),t.write((0,o.join)((0,o.dirname)(i.ui5Yaml),"ui5-mock.yaml"),e.toString()),h&&h.addMockServerMiddleware(n.path)}if(t.write((0,o.join)(e,"webapp","localService","metadata.xml"),(0,u.default)(n.metadata,{indent:4})),n.localAnnotationsName){const i=(0,l.getAnnotationNamespaces)(n);t.copyTpl((0,o.join)(v,"add","annotation.xml"),(0,o.join)(e,"webapp","annotations",`${n.localAnnotationsName}.xml`),Object.assign(Object.assign({},n),{namespaces:i}))}}return i.packageJson&&i.ui5Yaml&&(0,s.updatePackageJson)(i.packageJson,t,!!n.metadata),w&&h&&t.write(w,h.toString()),(null===(a=n.annotations)||void 0===a?void 0:a.xml)&&t.write((0,o.join)(e,"webapp","localService",`${n.annotations.technicalName}.xml`),(0,u.default)(n.annotations.xml,{indent:4})),t}))}},71508:(e,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ServiceType=n.OdataVersion=void 0,function(e){e.v2="2",e.v4="4"}(n.OdataVersion||(n.OdataVersion={})),function(e){e.EDMX="edmx",e.CDS="cds"}(n.ServiceType||(n.ServiceType={}))},51450:function(e,n,t){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.hasUI5CliV3=n.updatePackageJson=n.updateManifest=void 0;const a=t(69288),o=t(71017),r=t(46996),d=i(t(76027));function s(e){let n=!1;const t=d.default.coerce(e["@ui5/cli"]);return t&&d.default.gte(t,"3.0.0")&&(n=!0),n}n.updateManifest=function(e,n,t,i){var d;const s=(0,o.join)(e,"webapp","manifest.json"),c=t.readJSON(s),u="sap.app";if(!(null===(d=null==c?void 0:c[u])||void 0===d?void 0:d.id))throw new Error((0,r.t)("error.requiredProjectPropertyNotFound",{property:"'sap.app'.id",path:s}));const l=t.read((0,o.join)(i,"extend","manifest.json"));t.extendJSON(s,JSON.parse((0,a.render)(l,n,{})))},n.updatePackageJson=function(e,n,t){var i,a,o;const r=JSON.parse(n.read(e));r.devDependencies=null!==(i=r.devDependencies)&&void 0!==i?i:{},s(r.devDependencies)||(r.ui5=null!==(a=r.ui5)&&void 0!==a?a:{},r.ui5.dependencies=null!==(o=r.ui5.dependencies)&&void 0!==o?o:[],r.ui5.dependencies.includes("@sap/ux-ui5-tooling")||r.ui5.dependencies.push("@sap/ux-ui5-tooling"),!t||r.ui5.dependencies.includes("@sap/ux-ui5-fe-mockserver-middleware")||r.ui5.dependencies.includes("@sap-ux/ui5-middleware-fe-mockserver")||r.ui5.dependencies.push("@sap-ux/ui5-middleware-fe-mockserver")),r.devDependencies["@sap/ux-ui5-tooling"]||(r.devDependencies["@sap/ux-ui5-tooling"]="1"),t&&(r.devDependencies["@sap/ux-ui5-fe-mockserver-middleware"]||r.devDependencies["@sap-ux/ui5-middleware-fe-mockserver"]||(r.devDependencies["@sap-ux/ui5-middleware-fe-mockserver"]="2")),n.writeJSON(e,r)},n.hasUI5CliV3=s},67402:e=>{e.exports=JSON.parse('{"error":{"requiredProjectFileNotFound":"Invalid project structure. Cannot find required file {{-path}}","requiredProjectPropertyNotFound":"Required project property: {{-property}} was not found in file: {{-path}}","unparseableXML":"Unparseable XML was specified: {{-error}}"}}')}}; | ||
"use strict";exports.id=916,exports.ids=[916],exports.modules={59572:(e,n,t)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.getAnnotationNamespaces=void 0;const i=t(88295),a=t(46996);function o(e){const n={attributeNamePrefix:"",ignoreAttributes:!1,ignoreNameSpace:!0,parseAttributeValue:!0};try{return new i.XMLParser(n).parse(e,!0)}catch(e){throw new Error((0,a.t)("error.unparseableXML",{error:e}))}}n.getAnnotationNamespaces=function({metadata:e,annotations:n}){const t=e?function(e){var n,t;const i=o(e);let a=null===(t=null===(n=i["edmx:Edmx"])||void 0===n?void 0:n["edmx:DataServices"])||void 0===t?void 0:t.Schema;if(!a)return[];Array.isArray(a)||(a=[a]);return a.map((e=>({namespace:e.Namespace,alias:e.Alias||""})))}(e):[];if(null==n?void 0:n.xml){const e=o(n.xml);return t.map((t=>{const i=n.xml&&t.namespace?function(e,n){var t,i;let a=null===(t=e["edmx:Edmx"])||void 0===t?void 0:t["edmx:Reference"];Array.isArray(a)||(a=[a]);const o=a.find((e=>{var t,i;return(null===(t=e["edmx:Include"])||void 0===t?void 0:t.Namespace)===n&&(null===(i=e["edmx:Include"])||void 0===i?void 0:i.Alias)}));return o?null===(i=o["edmx:Include"])||void 0===i?void 0:i.Alias:""}(e,t.namespace):"";return i&&(t.alias=i),t}))}return t}},72848:(e,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DEFAULT_DATASOURCE_NAME=void 0,n.DEFAULT_DATASOURCE_NAME="mainService"},77660:(e,n,t)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.enhanceData=void 0;const i=t(72848);n.enhanceData=function(e){var n,t;!function(e){var n,t;e.path=(null===(n=e.path)||void 0===n?void 0:n.endsWith("/"))?e.path:(null!==(t=e.path)&&void 0!==t?t:"")+"/"}(e),function(e){var n;e.name=null!==(n=e.name)&&void 0!==n?n:i.DEFAULT_DATASOURCE_NAME}(e),function(e){var n;e.model=null!==(n=e.model)&&void 0!==n?n:""}(e),function(e){var n,t,i,a;(null===(n=e.annotations)||void 0===n?void 0:n.technicalName)&&!e.annotations.name&&(e.annotations.name=null===(a=null===(i=null===(t=e.annotations)||void 0===t?void 0:t.technicalName)||void 0===i?void 0:i.replace(/\//g,"_"))||void 0===a?void 0:a.replace(/^_/,""))}(e),e.previewSettings=e.previewSettings||{},e.previewSettings.path=e.previewSettings.path||`/${null!==(t=null===(n=e.path)||void 0===n?void 0:n.split("/").filter((e=>""!==e))[0])&&void 0!==t?t:""}`,e.previewSettings.url=e.previewSettings.url||e.url||"http://localhost",e.client&&!e.previewSettings.client&&(e.previewSettings.client=e.client),e.destination&&!e.previewSettings.destination&&(e.previewSettings.destination=e.destination.name,e.destination.instance&&(e.previewSettings.destinationInstance=e.destination.instance))}},28276:function(e,n,t){var i=this&&this.__createBinding||(Object.create?function(e,n,t,i){void 0===i&&(i=t);var a=Object.getOwnPropertyDescriptor(n,t);a&&!("get"in a?!n.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return n[t]}}),Object.defineProperty(e,i,a)}:function(e,n,t,i){void 0===i&&(i=t),e[i]=n[t]}),a=this&&this.__exportStar||function(e,n){for(var t in e)"default"===t||Object.prototype.hasOwnProperty.call(n,t)||i(n,e,t)};Object.defineProperty(n,"__esModule",{value:!0}),a(t(77660),n),a(t(59572),n)},46996:function(e,n,t){var i=this&&this.__awaiter||function(e,n,t,i){return new(t||(t=Promise))((function(a,o){function r(e){try{s(i.next(e))}catch(e){o(e)}}function d(e){try{s(i.throw(e))}catch(e){o(e)}}function s(e){var n;e.done?a(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(r,d)}s((i=i.apply(e,n||[])).next())}))},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.t=n.initI18n=void 0;const o=a(t(18237)),r=a(t(67402)),d="odata-service-writer";function s(){return i(this,void 0,void 0,(function*(){yield o.default.init({resources:{en:{[d]:r.default}},lng:"en",fallbackLng:"en",defaultNS:d,ns:[d]})}))}n.initI18n=s,n.t=function(e,n){return o.default.t(e,n)},s().catch((()=>{}))},28923:function(e,n,t){var i=this&&this.__awaiter||function(e,n,t,i){return new(t||(t=Promise))((function(a,o){function r(e){try{s(i.next(e))}catch(e){o(e)}}function d(e){try{s(i.throw(e))}catch(e){o(e)}}function s(e){var n;e.done?a(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(r,d)}s((i=i.apply(e,n||[])).next())}))},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.ServiceType=n.OdataVersion=n.generate=n.findProjectFiles=void 0;const o=t(71017),r=t(5407),d=t(84659),s=t(51450),c=t(50911),u=a(t(10980)),l=t(28276),p=t(46996),v=t(71508);function f(e,n){return i(this,void 0,void 0,(function*(){const t={},i=e.split(o.sep);for(;i.length>0&&(!t.packageJson||!t.ui5Yaml);){const e=i.join(o.sep);!t.packageJson&&n.exists((0,o.join)(e,"package.json"))&&(t.packageJson=(0,o.join)(e,"package.json")),!t.ui5Yaml&&n.exists((0,o.join)(e,"ui5.yaml"))&&(t.ui5Yaml=(0,o.join)(e,"ui5.yaml")),i.pop()}return t}))}Object.defineProperty(n,"OdataVersion",{enumerable:!0,get:function(){return v.OdataVersion}}),Object.defineProperty(n,"ServiceType",{enumerable:!0,get:function(){return v.ServiceType}}),n.findProjectFiles=f,n.generate=function(e,n,t){var a;return i(this,void 0,void 0,(function*(){t||(t=(0,d.create)((0,r.create)()));const i=yield f(e,t);!function(e,n,t){n.forEach((n=>{if(!t.exists((0,o.join)(e,n)))throw new Error((0,p.t)("error.requiredProjectFileNotFound",{path:n}))}))}(e,["webapp/manifest.json"],t),(0,l.enhanceData)(n);const v=(0,o.join)(__dirname,"../templates");let m,h,w;if((0,s.updateManifest)(e,n,t,v),i.ui5Yaml){m=yield c.UI5Config.newInstance(t.read(i.ui5Yaml));try{m.addBackendToFioriToolsProxydMiddleware(n.previewSettings)}catch(e){if(!(e instanceof c.YAMLError&&e.code===c.yamlErrorCode.nodeNotFound))throw e;m.addFioriToolsProxydMiddleware({backend:[n.previewSettings]})}t.write(i.ui5Yaml,m.toString()),w=(0,o.join)((0,o.dirname)(i.ui5Yaml),"ui5-local.yaml"),t.exists(w)&&(h=yield c.UI5Config.newInstance(t.read(w)),h.addFioriToolsProxydMiddleware({backend:[n.previewSettings]}))}if(n.metadata){if(i.ui5Yaml&&m){const e=yield c.UI5Config.newInstance(m.toString());e.addMockServerMiddleware(n.path),t.write((0,o.join)((0,o.dirname)(i.ui5Yaml),"ui5-mock.yaml"),e.toString()),h&&h.addMockServerMiddleware(n.path)}if(t.write((0,o.join)(e,"webapp","localService","metadata.xml"),(0,u.default)(n.metadata,{indent:4})),n.localAnnotationsName){const i=(0,l.getAnnotationNamespaces)(n);t.copyTpl((0,o.join)(v,"add","annotation.xml"),(0,o.join)(e,"webapp","annotations",`${n.localAnnotationsName}.xml`),Object.assign(Object.assign({},n),{namespaces:i}))}}return i.packageJson&&i.ui5Yaml&&(0,s.updatePackageJson)(i.packageJson,t,!!n.metadata),w&&h&&t.write(w,h.toString()),(null===(a=n.annotations)||void 0===a?void 0:a.xml)&&t.write((0,o.join)(e,"webapp","localService",`${n.annotations.technicalName}.xml`),(0,u.default)(n.annotations.xml,{indent:4})),t}))}},71508:(e,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ServiceType=n.OdataVersion=void 0,function(e){e.v2="2",e.v4="4"}(n.OdataVersion||(n.OdataVersion={})),function(e){e.EDMX="edmx",e.CDS="cds"}(n.ServiceType||(n.ServiceType={}))},51450:function(e,n,t){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.hasUI5CliV3=n.updatePackageJson=n.updateManifest=void 0;const a=t(69288),o=t(71017),r=t(46996),d=i(t(76027));function s(e){let n=!1;const t=d.default.coerce(e["@ui5/cli"]);return t&&d.default.gte(t,"3.0.0")&&(n=!0),n}n.updateManifest=function(e,n,t,i){var d;const s=(0,o.join)(e,"webapp","manifest.json"),c=t.readJSON(s),u="sap.app";if(!(null===(d=null==c?void 0:c[u])||void 0===d?void 0:d.id))throw new Error((0,r.t)("error.requiredProjectPropertyNotFound",{property:"'sap.app'.id",path:s}));const l=t.read((0,o.join)(i,"extend","manifest.json"));t.extendJSON(s,JSON.parse((0,a.render)(l,n,{})))},n.updatePackageJson=function(e,n,t){var i,a,o;const r=JSON.parse(n.read(e));r.devDependencies=null!==(i=r.devDependencies)&&void 0!==i?i:{},s(r.devDependencies)||(r.ui5=null!==(a=r.ui5)&&void 0!==a?a:{},r.ui5.dependencies=null!==(o=r.ui5.dependencies)&&void 0!==o?o:[],r.ui5.dependencies.includes("@sap/ux-ui5-tooling")||r.ui5.dependencies.push("@sap/ux-ui5-tooling"),!t||r.ui5.dependencies.includes("@sap/ux-ui5-fe-mockserver-middleware")||r.ui5.dependencies.includes("@sap-ux/ui5-middleware-fe-mockserver")||r.ui5.dependencies.push("@sap-ux/ui5-middleware-fe-mockserver")),r.devDependencies["@sap/ux-ui5-tooling"]||(r.devDependencies["@sap/ux-ui5-tooling"]="1"),t&&(r.devDependencies["@sap/ux-ui5-fe-mockserver-middleware"]||r.devDependencies["@sap-ux/ui5-middleware-fe-mockserver"]||(r.devDependencies["@sap-ux/ui5-middleware-fe-mockserver"]="2")),n.writeJSON(e,r)},n.hasUI5CliV3=s},67402:e=>{e.exports=JSON.parse('{"error":{"requiredProjectFileNotFound":"Invalid project structure. Cannot find required file {{-path}}","requiredProjectPropertyNotFound":"Required project property: {{-property}} was not found in file: {{-path}}","unparseableXML":"Unparseable XML was specified: {{-error}}"}}')}}; |
@@ -1,1 +0,1 @@ | ||
"use strict";exports.id=2,exports.ids=[2],exports.modules={38953:function(e,t,a){var o=this&&this.__createBinding||(Object.create?function(e,t,a,o){void 0===o&&(o=a);var n=Object.getOwnPropertyDescriptor(t,a);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[a]}}),Object.defineProperty(e,o,n)}:function(e,t,a,o){void 0===o&&(o=a),e[o]=t[a]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)"default"!==a&&Object.prototype.hasOwnProperty.call(e,a)&&o(t,e,a);return n(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.generateReadMe=t.applyCAPUpdates=t.applyFioriToolsUpdates=void 0;const i=a(37705),s=a(1628),c=a(16920);Object.defineProperty(t,"generateReadMe",{enumerable:!0,get:function(){return c.generateReadMeExt}});const p=a(57147),l=a(71017),u=r(a(52375)),d=a(43895);t.applyFioriToolsUpdates=function(e,{appId:t,ui5Theme:a,localOnly:o,serviceClient:n,apiHubConfig:r,ignoreCertError:p},f){e.extendJSON((0,l.join)(f,"package.json"),{sapuxLayer:(0,s.assignSapUxLayerValue)(!1,(0,i.isInternalFeaturesSettingEnabled)())}),function(e,t,a,o){const n=["server","customMiddleware"],r={name:"fiori-tools-preview",afterMiddleware:"fiori-tools-appreload",configuration:{component:a,ui5Theme:o}},i=u.parseDocument(e.read((0,l.join)(t,"ui5.yaml")));i.addIn(n,r),e.write((0,l.join)(t,"ui5.yaml"),i.toString());const s=u.parseDocument(e.read((0,l.join)(t,"ui5-local.yaml")));s.addIn(n,r),e.write((0,l.join)(t,"ui5-local.yaml"),s.toString())}(e,f,t,a),function(e,t,a,o){const n="#preview-app",r=e.readJSON((0,l.join)(t,"package.json"));if("object"==typeof r.scripts){let i;if(a)i=`echo \\"${(0,s.t)("MOCK_ONLY_WARNING")}\\"`;else{const e=o?`&sap-client=${o}`:"";i=`fiori run --open "preview.html${(0,s.buildUrlParam)(e,s.DisableCacheParam,"fiori-tools-rta-mode=true","sap-ui-rta-skip-flex-validation=true")}${n}"`}r.scripts["start-variants-management"]=i,e.writeJSON((0,l.join)(t,"package.json"),r)}}(e,f,o,n),p&&function(e,t){["ui5.yaml","ui5-mock.yaml","ui5-local.yaml"].forEach((a=>{const o=(0,l.join)(t,a);if(e.exists(o)){const t=e.read(o),a=u.parse(t);if(a?.server?.customMiddleware){const t=a.server.customMiddleware?.findIndex((e=>"fiori-tools-proxy"===e.name));if(-1!==t){a.server.customMiddleware[t].configuration.ignoreCertError=!0;const n=u.stringify(a);e.write(o,n.toString())}}}}))}(e,f),r&&(0,d.isAppStudio)()&&(0,c.createAPIHubKeyFiles)(e,f,r)},t.applyCAPUpdates=async function(e,t,{service:{capService:a},project:{sapux:o,skipAnnotations:n,enableNPMWorkspaces:r}},i,u){const d=a=>{const o=(0,l.join)(t,a);e.exists(o)&&e.delete(o)};d(".gitignore"),d(".npmignore"),d("ui5-local.yaml"),d("ui5-mock.yaml"),d("./webapp/index.html"),d("./webapp/annotations/annotation.xml"),(0,c.updateCAPManifestJson)(e,t),n||(0,c.updateCdsFiles)(e,a,i.package.name,u),await(0,c.updateRootPackageJsonCAP)(e,i.package.name,o,a,i.app.id,u,r,a.cdsUI5PluginEnabled),a.capType===s.CapType.JAVA&&(0,c.applyCAPJavaUpdates)(e,a.projectPath);let f=!1;(0,p.existsSync)((0,l.join)(__dirname,"..","templates"))&&(f=!0),e.copyTpl((0,l.join)(__dirname,""+(f?"":".."),"..","templates","cap","add","**/*.*"),t,{...i,escapeFLPText:e=>e.replace(/\\/g,"\\\\").replace(/(")/g,"\\$&")}),i.appOptions?.typescript&&(0,c.updateTsConfigCap)(e,t),a.cdsUI5PluginEnabled||r?((0,c.updateAppPackageJsonCAP)(e,t),(0,c.updateYamlNpmWorkspaces)(e,(0,l.join)(t,"ui5.yaml"))):e.copyTpl((0,l.join)(__dirname,""+(f?"":".."),"..","templates","cap","optional","**/*.*"),t,{...i,escapeFLPText:e=>e.replace(/\\/g,"\\\\").replace(/(")/g,"\\$&")})}},89546:(e,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getLocalOnly=t.getStartFile=t.getLocalStartFile=t.getUrlParam=t.getStartTasksOpenArg=t.getMockTaskOpenArgs=void 0;const o=a(94751),n=a(85181);function r(e,t,a=!0){let n=e?(0,o.buildUrlParam)(t,o.DisableCacheParam):"";return n&&!a&&(n=n.substring(1,n.length)),n}t.getMockTaskOpenArgs=function(e,t=!1,a,o,i=!0){const s=o?`#${o}`:"",c=`${r(i,a)}${s??""}`;if(t){return{[n.ODataVersion.v2]:["--open",`test/flpSandboxMockServer.html${c}`],[n.ODataVersion.v4]:["--config","./ui5-mock.yaml","--open",`test/flpSandbox.html${c}`]}[e]}return["--config","./ui5-mock.yaml","--open",`test/flpSandbox.html${c}`]},t.getStartTasksOpenArg=function(e,t="",a="",n,i,s,c=!0){const p=a.replace("#",""),l=p?`#${p}`:"";let u;if(s){u=`#${s.replace("#","")}`}const d=r(c,t);return{startCommandOpenArg:e?"":`${n||"test/flpSandbox.html"}${d}${l}`,startLocalCommandOpenArg:`${i||"test/flpSandbox.html"}${d}${u||l}`,startNoFlpCommandOpenArg:e?"":`index.html${d}`,startVariantsCommandOpenArg:`\\"preview.html${(0,o.buildUrlParam)(t,o.DisableCacheParam,"fiori-tools-rta-mode=true","sap-ui-rta-skip-flex-validation=true")}#preview-app\\""`}},t.getUrlParam=r,t.getLocalStartFile=function(e){let t;return t=e.isFioriElement&&e.odataVersion===n.ODataVersion.v2&&!0===e.isMigrator?"test/flpSandboxMockServer.html":e.flpSandboxAvailable?"test/flpSandbox.html":"index.html",t},t.getStartFile=function(e){return e?"test/flpSandbox.html":"index.html"},t.getLocalOnly=function(e){return"File"===e}},99446:(e,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getDebugConfigs=void 0;const o=a(43895),n=a(71017),r=a(89546);t.getDebugConfigs=function(e,t,a,i){const s=(0,r.getLocalOnly)(t.datasourceType),c=(0,r.getStartFile)(t.flpSandboxAvailable),p=`{"handlerId":"fiori_tools","runnableId":"${t.projectPath}"}`,l={version:"0.2.0",configurations:[]},u=(0,r.getLocalStartFile)(t),d=(0,r.getUrlParam)(!0,t.sapClientParam,!1),{startCommandOpenArg:f,startLocalCommandOpenArg:g}=(0,r.getStartTasksOpenArg)(s,t.sapClientParam,t.flpAppId,c,u,t.migratorMockIntent,!1),m=void 0!==t.odataVersion?(0,r.getMockTaskOpenArgs)(t.odataVersion,t.isMigrator,t.sapClientParam,t.flpAppId,!1):void 0,h=n.posix.sep+t.projectName,P=i?n.posix.sep+i:"",S=`\${workspaceFolder}${a?h:P}`,C={name:`Start ${t.projectName}`,type:"node",request:"launch",runtimeExecutable:"npx",cwd:S,windows:{runtimeExecutable:"npx.cmd"},runtimeArgs:["fiori","run"],args:["--open",f],console:"internalConsole",internalConsoleOptions:"openOnSessionStart",outputCapture:"std",port:9229,env:{DEBUG:"--inspect",FIORI_TOOLS_URL_PARAMS:d}},y={name:`Start ${t.projectName} Local`,type:"node",request:"launch",cwd:S,runtimeExecutable:"npx",windows:{runtimeExecutable:"npx.cmd"},runtimeArgs:["fiori","run"],args:["--config","./ui5-local.yaml","--open",g],console:"internalConsole",internalConsoleOptions:"openOnSessionStart",outputCapture:"std",port:9229,env:{FIORI_TOOLS_URL_PARAMS:d}};(0,o.isAppStudio)()&&(C.env["run.config"]=p,y.env["run.config"]=p),"File"!==t.datasourceType&&l.configurations.push(C);const j={liveConfiguration:C,localConfiguration:y,launchFile:l};if(m){const e={name:`Start ${t.projectName} Mock`,type:"node",request:"launch",cwd:S,runtimeExecutable:"npx",windows:{runtimeExecutable:"npx.cmd"},runtimeArgs:["fiori","run"],args:m,console:"internalConsole",internalConsoleOptions:"openOnSessionStart",outputCapture:"std",port:9229,env:{FIORI_TOOLS_URL_PARAMS:d}};(0,o.isAppStudio)()&&(e.env["run.config"]=p),l.configurations.push(e),j.mockConfiguration=e}return l.configurations.push(y),j[e]}},48478:(e,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.generateLaunchConfig=void 0;var o=a(18571);Object.defineProperty(t,"generateLaunchConfig",{enumerable:!0,get:function(){return o.generateLaunchConfig}})},18571:function(e,t,a){var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.launchConfigGenerator=t.checkForFolderInWorkspace=t.launchConfigForAppsOutsideOfWorkspace=t.launchFileCreator=t.generateLaunchConfig=void 0;const n=a(99446),r=a(71017),i=o(a(57147)),s=a(66897),c=a(77090),p=a(398),l=a(34328);function u(e,t){i.default.writeFileSync((0,r.join)(e,"launch.json"),JSON.stringify(t,null,4),"utf8")}function d(e,t,a,o,n=!0){const s=(0,r.join)((0,r.dirname)(e),t),c=(0,r.join)(s,".vscode"),p=o.Uri&&o.Uri.file(s);if(i.default.mkdirSync(c,{recursive:!0}),u(c,a),p){const e=o.workspace.workspaceFolders?o.workspace.workspaceFolders.length:0;!(0,l.isAppStudio)()&&n&&o.workspace.updateWorkspaceFolders(e,void 0,{name:t,uri:p})}return!0}function f(e,t){if(t.workspace.workspaceFile||t.workspace.workspaceFolders){let a=!1;return t.workspace.workspaceFolders&&t.workspace.workspaceFolders.map((t=>{t.uri.fsPath&&e.toLowerCase().includes(t.uri.fsPath.toLowerCase())&&(a=!0)})),a||void 0===t.workspace.workspaceFolders}return!1}function g(e,t,a,o=!0,p=!1){if(!t)return;let l,g,m,h;const P=(t=!0,a)=>{l=(0,n.getDebugConfigs)("liveConfiguration",e,t,a),g=(0,n.getDebugConfigs)("mockConfiguration",e,t,a),m=(0,n.getDebugConfigs)("localConfiguration",e,t,a),h=(0,n.getDebugConfigs)("launchFile",e,t,a)};P(!0);const S=t=>{if(i.default.existsSync(t))try{const a=(0,r.join)(t,"launch.json");if(i.default.statSync(a)){const o=JSON.parse(i.default.readFileSync(a,"utf8").replace(/\\"|"(?:\\"|[^"])*"|(\/\/.*|\/\*[\s\S]*?\*\/)/g,((e,t)=>t?"":e)));"File"!==e.datasourceType&&o.configurations.push(l),e.odataVersion!==c.ODataVersion.v4&&g&&o.configurations.push(g),o.configurations.push(m),u(t,o)}}catch(e){"ENOENT"===e.code&&u(t,h)}else i.default.mkdirSync(t),u(t,h)};if(t&&p)return P(!1),void d(e.projectPath,e.projectName,h,t,o);if(t.workspace&&!t.workspace.workspaceFile)if(f(e.projectPath,t)){const o=t.workspace.getWorkspaceFolder(t.Uri.file(e.projectPath)).uri.fsPath;P(!1,(0,r.relative)(o??e.projectPath,e.projectPath));const n=t.workspace.getConfiguration("launch");"File"!==e.datasourceType&&n.configurations.push(l),g&&n.configurations.push(g),n.configurations.push(m);try{t.workspace.getConfiguration().update("launch",n)}catch(e){a?.error((0,s.t)("ERROR_LAUNCH_FILE",{error:e}))}}else P(!1),d(e.projectPath,e.projectName,h,t,o);if(!t.workspace||t.workspace.workspaceFile||t.workspace.workspaceFolders||(P(!1),d(e.projectPath,e.projectName,h,t,o)),t.workspace&&t.workspace.workspaceFile&&"file"===t.workspace.workspaceFile.scheme){const a=(0,r.join)((0,r.dirname)(e.projectPath),".vscode");f(e.projectPath,t)?S(a):(P(!1),d(e.projectPath,e.projectName,h,t,o))}if(t.workspace&&t.workspace.workspaceFile&&"file"!==t.workspace.workspaceFile.scheme){const a=t.workspace.getWorkspaceFolder(t.Uri.file(e.projectPath))?.uri?.fsPath,o=(0,r.join)(a??e.projectPath,".vscode");P(!1,(0,r.relative)(a??e.projectPath,e.projectPath)),S(o)}}t.generateLaunchConfig=function({source:e,version:t,name:a,targetFolder:o,sapClientParam:n,flpAppId:i,flpSandboxAvailable:c,isFioriElement:l,migratorMockIntent:u,isMigrator:d},f,m=p.DefaultLogger,h=!0,P=!1){if("Local Cap"===e)m.info((0,s.t)("TO_START_APP",{npmStart:"`npm start`",cdsRun:"`cds run --in-memory`"}));else{const p="File"===e?"run start-mock":"start";g({datasourceType:e,odataVersion:t,projectName:a,projectPath:(0,r.join)(o,a),sapClientParam:n,flpAppId:i,flpSandboxAvailable:c,isFioriElement:l,migratorMockIntent:u,isMigrator:d},f,m,h,P),m.info((0,s.t)("TO_START_SERVER_MESSAGE",{folder:a,npmCommand:p}))}},t.launchFileCreator=u,t.launchConfigForAppsOutsideOfWorkspace=d,t.checkForFolderInWorkspace=f,t.launchConfigGenerator=g},16920:(e,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createAPIHubKeyFiles=t.applyCAPJavaUpdates=t.updateYamlNpmWorkspaces=t.updateApplicationYaml=t.updatePomXml=t.generateReadMe=t.generateReadMeExt=t.updateAppPackageJsonCAP=t.updateRootPackageJsonCAP=t.updateTsConfigCap=t.updateCAPManifestJson=t.updateCdsFiles=void 0;const o=a(74448),n=a(43895),r=a(1628),i=a(71017),s=a(76027),c=a(90339),p=a(55920),l=a(52375),u=a(75764),d=a(49339);function f(e,{project:t,service:a,readMe:o}){let n;"SAP System"===a.source?n=`SAP System (${(0,r.t)("LABEL_SAP_SYSTEM_SOURCE_TYPE_"+(a.scp?"SCP":"ON_PREM"))})`:"SAP Business Accelerator Hub"===a.source&&"API_HUB_ENTERPRISE"===a.apiHubConfig?.apiHubType&&(n=(0,r.t)("LABEL_API_BUSINESS_HUB_ENTERPRISE"));let s=(0,r.t)("TEXT_LAUNCH_DEFAULT");a.capService&&(s=(0,c.capLaunchText)(a.capService.capType,t.name,(0,r.getAppId)(t.namespace,t.name),t.enableNPMWorkspaces||a.capService.cdsUI5PluginEnabled));const p={genDate:o?.genDate||(new Date).toString(),genPlatform:o?.genPlatform||(0,r.getPlatform)().name,dataSourceLabel:n||a.source,metadataFilename:a.localEdmxFilePath?(0,i.basename)(a.localEdmxFilePath):"",serviceUrl:(a.host??"")+(a.servicePath??"")||(0,r.t)("TEXT_NOT_APPLICABLE"),projectName:t.name,projectTitle:t.title,projectDescription:t.description,projectNamespace:t.namespace,ui5Theme:t.ui5Theme,projectUI5Version:o?.projectUI5Version||t.ui5Version,enableCodeAssist:t.enableCodeAssist,enableEslint:t.enableEslint,enableTypeScript:t.enableTypeScript,showMockDataInfo:!!a.edmx&&!a.capService,genVersion:o?.genVersion||"",templateLabel:o?.templateLabel||"",genId:o?.genId||"",additionalEntries:[],launchText:s};o?.additionalEntries&&(p.additionalEntries=o.additionalEntries),e("README.md",p)}function g(e,t,a){try{const a=e.read(t).toString(),o=(0,p.xml2js)(a,{compact:!0}),n="spring-boot-maven-plugin";if(0===Object.keys(o).length)return;if(o?.project?.build?.plugins?.plugin){const a=o.project.build.plugins.plugin;Array.isArray(a)&&a.length>0?a.forEach((e=>{e.artifactId._text===n&&e.configuration&&void 0===e.workingDirectory&&(e.configuration.workingDirectory={_text:".."})})):a.artifactId._text===n&&a.configuration&&void 0===a.workingDirectory&&(a.configuration.workingDirectory={_text:".."}),o.project.build.plugins.plugin=a;const r=(0,p.js2xml)(o,{compact:!0,ignoreComment:!0,spaces:4}),i=/&gt/g;e.write(t,r.replace(i,">"))}}catch(e){a.logErrorMsgs(e)}}function m(e,t,a,o){try{const o=(0,l.parseAllDocuments)(e.read(t).toString()).map((e=>e.toJSON()));if(1===o.length&&void 0===o[0].spring["web.resources.static-locations"]){const n=o[0];n.spring["web.resources.static-locations"]=`file:./${a}`,e.write(t,(0,l.stringify)(n))}}catch(e){o.logErrorMsgs(e)}}t.updateCdsFiles=async function(e,t,a,s){s?.trace(`updateCdsFiles: capService : ${JSON.stringify(t)}`);const c=(0,r.getAnnotationPath)(a,t?.appPath);t.serviceCdsPath=await(0,o.toReferenceUri)({root:t.projectPath},c,t.serviceCdsPath),s?.trace(`updateCdsFiles_1: capService: ${JSON.stringify(t)}`),e.write((0,i.join)(t.projectPath,t.appPath,a,"annotations.cds"),`using ${t.serviceName} as service from '${t.serviceCdsPath}';`);const p=(0,i.join)(t.projectPath,t.appPath,"index.cds"),l=(0,i.join)(t.projectPath,t.appPath,"services.cds"),u=`\nusing from './${(0,n.toPosixPath)((0,i.join)(a,"annotations"))}';`;e.exists(p)?e.append(p,u):e.exists(l)?e.append(l,u):e.write(l,u)},t.updateCAPManifestJson=function(e,t){const a=(0,i.join)(t,u.DirName.Webapp,u.FileName.Manifest);if(e.exists(a)){e.readJSON(a)["sap.app"]?.dataSources&&e.extendJSON(a,{},((e,t)=>{if("annotation"!==e||!Object.values(t).includes("ODataAnnotation"))return"annotations"===e&&Array.isArray(t)&&1===t.length?[]:t}))}},t.updateTsConfigCap=function(e,t){const a=(0,i.join)(t,u.FileName.TsConfigJson);if(e.exists(a)){const t=e.readJSON(a);if(t.compilerOptions.typeRoots){const o=t.compilerOptions.typeRoots,n=o.map((e=>e.replace(/\.\//g,"../../")));e.extendJSON(a,{compilerOptions:{typeRoots:[...o,...n]}})}}},t.updateRootPackageJsonCAP=async function(e,t,a,p,l,u,f,g){const m=(0,i.join)(p.projectPath,"package.json"),h=e.readJSON(m);if(f&&await(0,d.enableCdsUi5Plugin)(p.projectPath,e),p.capType===r.CapType.NODE_JS){const a=await(0,r.checkCDSInstalled)();if(a&&(0,s.satisfies)(a,`>=${r.MIN_CDS_SCRIPT_VERSION}`)){const a=(0,c.getCDSTask)(t,l,f||g);e.extendJSON(m,{scripts:a})}else u&&u.warn((0,r.t)("WARNING_CDS_DK_NOT_INSTALLED",{cdsVersion:a??"",minCdsVersion:r.MIN_CDS_SCRIPT_VERSION}))}if(a){const a=(0,n.toPosixPath)((0,i.join)(p.appPath||o.CAP_APPS_FOLDER,t));let r=h?.sapux;Array.isArray(r)?r.push(a):r=[a],e.extendJSON(m,{sapux:r})}},t.updateAppPackageJsonCAP=function(e,t){const a=(0,i.join)(t,"package.json"),o=e.readJSON(a)??{};delete o.sapux,delete o.scripts["int-test"];for(const e in o.scripts)e.startsWith("start")&&delete o.scripts[e];e.writeJSON(a,o)},t.generateReadMeExt=function(e,{project:t,service:a,readMe:o},n){return f(function({fileName:e,destPath:t,fsEditor:a}){let o=!1;a.exists((0,i.join)(__dirname,"..","templates",e))&&(o=!0);return(e,n)=>{a.copyTpl((0,i.join)(__dirname,""+(o?"":".."),"..","templates",e),(0,i.join)(t,e.replace(/\.tmpl|-cap-tmpl/g,"")),n)}}({fileName:"README.md",destPath:e,fsEditor:n}),{project:t,service:a,readMe:o}),n},t.generateReadMe=f,t.updatePomXml=g,t.updateApplicationYaml=m,t.updateYamlNpmWorkspaces=function(e,t){const a=new r.ErrorHandler;try{const a=(0,l.parseAllDocuments)(e.read(t).toString()).map((e=>e.toJSON()))[0];a.server.customMiddleware=a.server.customMiddleware.filter((e=>"fiori-tools-proxy"!==e.name));const o=a.server.customMiddleware.findIndex((e=>"fiori-tools-appreload"===e.name));delete a.server.customMiddleware[o].configuration,e.write(t,(0,l.stringify)(a))}catch(e){a.logErrorMsgs(e)}},t.applyCAPJavaUpdates=function(e,t){const a=(0,o.getCapCustomPaths)(t),n=new r.ErrorHandler,s=(0,i.join)(t,"pom.xml");e.exists(s)&&g(e,s,n);const c=(0,i.join)(t,a.srv,"src","main","resources","application.yaml");e.exists(c)&&m(e,c,a.app,n)},t.createAPIHubKeyFiles=function(e,t,a){e.write(`${t}/.env`,`${r.API_HUB_API_KEY}=${a.apiHubKey}\n${r.API_HUB_TYPE}=${a.apiHubType}`)}},90339:(e,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getCDSTask=t.capLaunchText=t.getCAPAppUriPath=void 0;const o=a(1628);function n(e,t,a=!1){return a?t:e+"/webapp"}t.getCAPAppUriPath=n;t.capLaunchText=(e,t,a,r=!1)=>{let i,s="";return e===o.CapType.JAVA?(s=" (```mvn spring-boot:run```)",i=`http://localhost:8080/${t}/webapp/index.html`):void 0!==e&&e!==o.CapType.NODE_JS||(i=`http://localhost:4004/${n(t,a,r)}/index.html`),`${(0,o.t)("TEXT_LAUNCH_CAP",{mvnCommand:s,capUrl:i})}`},t.getCDSTask=function(e,t,a=!1){return{[`watch-${e}`]:`cds watch --open ${n(e,t,a)}/index.html?${o.DisableCacheParam}${a?" --livereload false":""}`}}},81979:function(e,t,a){var o=this&&this.__createBinding||(Object.create?function(e,t,a,o){void 0===o&&(o=a);var n=Object.getOwnPropertyDescriptor(t,a);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[a]}}),Object.defineProperty(e,o,n)}:function(e,t,a,o){void 0===o&&(o=a),e[o]=t[a]}),n=this&&this.__exportStar||function(e,t){for(var a in e)"default"===a||Object.prototype.hasOwnProperty.call(t,a)||o(t,e,a)};Object.defineProperty(t,"__esModule",{value:!0}),t.generateLaunchConfig=void 0;var r=a(48478);Object.defineProperty(t,"generateLaunchConfig",{enumerable:!0,get:function(){return r.generateLaunchConfig}}),n(a(38953),t)}}; | ||
"use strict";exports.id=2,exports.ids=[2],exports.modules={38953:function(e,t,a){var o=this&&this.__createBinding||(Object.create?function(e,t,a,o){void 0===o&&(o=a);var n=Object.getOwnPropertyDescriptor(t,a);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[a]}}),Object.defineProperty(e,o,n)}:function(e,t,a,o){void 0===o&&(o=a),e[o]=t[a]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)"default"!==a&&Object.prototype.hasOwnProperty.call(e,a)&&o(t,e,a);return n(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.generateReadMe=t.applyCAPUpdates=t.applyFioriToolsUpdates=void 0;const i=a(37705),s=a(1628),c=a(16920);Object.defineProperty(t,"generateReadMe",{enumerable:!0,get:function(){return c.generateReadMeExt}});const p=a(57147),l=a(71017),u=r(a(52375)),d=a(43895);t.applyFioriToolsUpdates=function(e,{appId:t,ui5Theme:a,localOnly:o,serviceClient:n,apiHubConfig:r,ignoreCertError:p},f){e.extendJSON((0,l.join)(f,"package.json"),{sapuxLayer:(0,s.assignSapUxLayerValue)(!1,(0,i.isInternalFeaturesSettingEnabled)())}),function(e,t,a,o){const n=["server","customMiddleware"],r={name:"fiori-tools-preview",afterMiddleware:"fiori-tools-appreload",configuration:{component:a,ui5Theme:o}},i=u.parseDocument(e.read((0,l.join)(t,"ui5.yaml")));i.addIn(n,r),e.write((0,l.join)(t,"ui5.yaml"),i.toString());const s=u.parseDocument(e.read((0,l.join)(t,"ui5-local.yaml")));s.addIn(n,r),e.write((0,l.join)(t,"ui5-local.yaml"),s.toString())}(e,f,t,a),function(e,t,a,o){const n="#preview-app",r=e.readJSON((0,l.join)(t,"package.json"));if("object"==typeof r.scripts){let i;if(a)i=`echo \\"${(0,s.t)("MOCK_ONLY_WARNING")}\\"`;else{const e=o?`&sap-client=${o}`:"";i=`fiori run --open "preview.html${(0,s.buildUrlParam)(e,s.DisableCacheParam,"fiori-tools-rta-mode=true","sap-ui-rta-skip-flex-validation=true")}${n}"`}r.scripts["start-variants-management"]=i,e.writeJSON((0,l.join)(t,"package.json"),r)}}(e,f,o,n),p&&function(e,t){["ui5.yaml","ui5-mock.yaml","ui5-local.yaml"].forEach((a=>{const o=(0,l.join)(t,a);if(e.exists(o)){const t=e.read(o),a=u.parse(t);if(a?.server?.customMiddleware){const t=a.server.customMiddleware?.findIndex((e=>"fiori-tools-proxy"===e.name));if(-1!==t){a.server.customMiddleware[t].configuration.ignoreCertError=!0;const n=u.stringify(a);e.write(o,n.toString())}}}}))}(e,f),r&&(0,d.isAppStudio)()&&(0,c.createAPIHubKeyFiles)(e,f,r)},t.applyCAPUpdates=async function(e,t,{service:{capService:a},project:{sapux:o,skipAnnotations:n,enableNPMWorkspaces:r}},i,u){const d=a=>{const o=(0,l.join)(t,a);e.exists(o)&&e.delete(o)};d(".gitignore"),d(".npmignore"),d("ui5-local.yaml"),d("ui5-mock.yaml"),d("./webapp/index.html"),d("./webapp/annotations/annotation.xml"),(0,c.updateCAPManifestJson)(e,t),n||(0,c.updateCdsFiles)(e,a,i.package.name,u),await(0,c.updateRootPackageJsonCAP)(e,i.package.name,o,a,i.app.id,u,r,a.cdsUI5PluginEnabled),a.capType===s.CapType.JAVA&&(0,c.applyCAPJavaUpdates)(e,a.projectPath);let f=!1;(0,p.existsSync)((0,l.join)(__dirname,"..","templates"))&&(f=!0),e.copyTpl((0,l.join)(__dirname,""+(f?"":".."),"..","templates","cap","add","**/*.*"),t,{...i,escapeFLPText:e=>e.replace(/\\/g,"\\\\").replace(/(")/g,"\\$&")}),i.appOptions?.typescript&&(0,c.updateTsConfigCap)(e,t),a.cdsUI5PluginEnabled||r?((0,c.updateAppPackageJsonCAP)(e,t),(0,c.updateYamlNpmWorkspaces)(e,(0,l.join)(t,"ui5.yaml"))):e.copyTpl((0,l.join)(__dirname,""+(f?"":".."),"..","templates","cap","optional","**/*.*"),t,{...i,escapeFLPText:e=>e.replace(/\\/g,"\\\\").replace(/(")/g,"\\$&")})}},89546:(e,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getLocalOnly=t.getStartFile=t.getLocalStartFile=t.getUrlParam=t.getStartTasksOpenArg=t.getMockTaskOpenArgs=void 0;const o=a(94751),n=a(85181);function r(e,t,a=!0){let n=e?(0,o.buildUrlParam)(t,o.DisableCacheParam):"";return n&&!a&&(n=n.substring(1,n.length)),n}t.getMockTaskOpenArgs=function(e,t=!1,a,o,i=!0){const s=o?`#${o}`:"",c=`${r(i,a)}${s??""}`;if(t){return{[n.ODataVersion.v2]:["--open",`test/flpSandboxMockServer.html${c}`],[n.ODataVersion.v4]:["--config","./ui5-mock.yaml","--open",`test/flpSandbox.html${c}`]}[e]}return["--config","./ui5-mock.yaml","--open",`test/flpSandbox.html${c}`]},t.getStartTasksOpenArg=function(e,t="",a="",n,i,s,c=!0){const p=a.replace("#",""),l=p?`#${p}`:"";let u;if(s){u=`#${s.replace("#","")}`}const d=r(c,t);return{startCommandOpenArg:e?"":`${n||"test/flpSandbox.html"}${d}${l}`,startLocalCommandOpenArg:`${i||"test/flpSandbox.html"}${d}${u||l}`,startNoFlpCommandOpenArg:e?"":`index.html${d}`,startVariantsCommandOpenArg:`\\"preview.html${(0,o.buildUrlParam)(t,o.DisableCacheParam,"fiori-tools-rta-mode=true","sap-ui-rta-skip-flex-validation=true")}#preview-app\\""`}},t.getUrlParam=r,t.getLocalStartFile=function(e){let t;return t=e.isFioriElement&&e.odataVersion===n.ODataVersion.v2&&!0===e.isMigrator?"test/flpSandboxMockServer.html":e.flpSandboxAvailable?"test/flpSandbox.html":"index.html",t},t.getStartFile=function(e){return e?"test/flpSandbox.html":"index.html"},t.getLocalOnly=function(e){return"File"===e}},99446:(e,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getDebugConfigs=void 0;const o=a(43895),n=a(71017),r=a(89546);t.getDebugConfigs=function(e,t,a,i){const s=(0,r.getLocalOnly)(t.datasourceType),c=(0,r.getStartFile)(t.flpSandboxAvailable),p=`{"handlerId":"fiori_tools","runnableId":"${t.projectPath}"}`,l={version:"0.2.0",configurations:[]},u=(0,r.getLocalStartFile)(t),d=(0,r.getUrlParam)(!0,t.sapClientParam,!1),{startCommandOpenArg:f,startLocalCommandOpenArg:g}=(0,r.getStartTasksOpenArg)(s,t.sapClientParam,t.flpAppId,c,u,t.migratorMockIntent,!1),m=void 0!==t.odataVersion?(0,r.getMockTaskOpenArgs)(t.odataVersion,t.isMigrator,t.sapClientParam,t.flpAppId,!1):void 0,h=n.posix.sep+t.projectName,P=i?n.posix.sep+i:"",S=`\${workspaceFolder}${a?h:P}`,C={name:`Start ${t.projectName}`,type:"node",request:"launch",runtimeExecutable:"npx",cwd:S,windows:{runtimeExecutable:"npx.cmd"},runtimeArgs:["fiori","run"],args:["--open",f],console:"internalConsole",internalConsoleOptions:"openOnSessionStart",outputCapture:"std",port:9229,env:{DEBUG:"--inspect",FIORI_TOOLS_URL_PARAMS:d}},y={name:`Start ${t.projectName} Local`,type:"node",request:"launch",cwd:S,runtimeExecutable:"npx",windows:{runtimeExecutable:"npx.cmd"},runtimeArgs:["fiori","run"],args:["--config","./ui5-local.yaml","--open",g],console:"internalConsole",internalConsoleOptions:"openOnSessionStart",outputCapture:"std",port:9229,env:{FIORI_TOOLS_URL_PARAMS:d}};(0,o.isAppStudio)()&&(C.env["run.config"]=p,y.env["run.config"]=p),"File"!==t.datasourceType&&l.configurations.push(C);const j={liveConfiguration:C,localConfiguration:y,launchFile:l};if(m){const e={name:`Start ${t.projectName} Mock`,type:"node",request:"launch",cwd:S,runtimeExecutable:"npx",windows:{runtimeExecutable:"npx.cmd"},runtimeArgs:["fiori","run"],args:m,console:"internalConsole",internalConsoleOptions:"openOnSessionStart",outputCapture:"std",port:9229,env:{FIORI_TOOLS_URL_PARAMS:d}};(0,o.isAppStudio)()&&(e.env["run.config"]=p),l.configurations.push(e),j.mockConfiguration=e}return l.configurations.push(y),j[e]}},48478:(e,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.generateLaunchConfig=void 0;var o=a(18571);Object.defineProperty(t,"generateLaunchConfig",{enumerable:!0,get:function(){return o.generateLaunchConfig}})},18571:function(e,t,a){var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.launchConfigGenerator=t.checkForFolderInWorkspace=t.launchConfigForAppsOutsideOfWorkspace=t.launchFileCreator=t.generateLaunchConfig=void 0;const n=a(99446),r=a(71017),i=o(a(57147)),s=a(66897),c=a(77090),p=a(398),l=a(34328);function u(e,t){i.default.writeFileSync((0,r.join)(e,"launch.json"),JSON.stringify(t,null,4),"utf8")}function d(e,t,a,o,n=!0){const s=(0,r.join)((0,r.dirname)(e),t),c=(0,r.join)(s,".vscode"),p=o.Uri&&o.Uri.file(s);if(i.default.mkdirSync(c,{recursive:!0}),u(c,a),p){const e=o.workspace.workspaceFolders?o.workspace.workspaceFolders.length:0;!(0,l.isAppStudio)()&&n&&o.workspace.updateWorkspaceFolders(e,void 0,{name:t,uri:p})}return!0}function f(e,t){if(t.workspace.workspaceFile||t.workspace.workspaceFolders){let a=!1;return t.workspace.workspaceFolders&&t.workspace.workspaceFolders.map((t=>{t.uri.fsPath&&e.toLowerCase().includes(t.uri.fsPath.toLowerCase())&&(a=!0)})),a||void 0===t.workspace.workspaceFolders}return!1}function g(e,t,a,o=!0,p=!1){if(!t)return;let l,g,m,h;const P=(t=!0,a)=>{l=(0,n.getDebugConfigs)("liveConfiguration",e,t,a),g=(0,n.getDebugConfigs)("mockConfiguration",e,t,a),m=(0,n.getDebugConfigs)("localConfiguration",e,t,a),h=(0,n.getDebugConfigs)("launchFile",e,t,a)};P(!0);const S=t=>{if(i.default.existsSync(t))try{const a=(0,r.join)(t,"launch.json");if(i.default.statSync(a)){const o=JSON.parse(i.default.readFileSync(a,"utf8").replace(/\\"|"(?:\\"|[^"])*"|(\/\/.*|\/\*[\s\S]*?\*\/)/g,((e,t)=>t?"":e)));"File"!==e.datasourceType&&o.configurations.push(l),e.odataVersion!==c.ODataVersion.v4&&g&&o.configurations.push(g),o.configurations.push(m),u(t,o)}}catch(e){"ENOENT"===e.code&&u(t,h)}else i.default.mkdirSync(t),u(t,h)};if(t&&p)return P(!1),void d(e.projectPath,e.projectName,h,t,o);if(t.workspace&&!t.workspace.workspaceFile)if(f(e.projectPath,t)){const o=t.workspace.getWorkspaceFolder(t.Uri.file(e.projectPath)).uri.fsPath;P(!1,(0,r.relative)(o??e.projectPath,e.projectPath));const n=t.workspace.getConfiguration("launch");"File"!==e.datasourceType&&n.configurations.push(l),g&&n.configurations.push(g),n.configurations.push(m);try{t.workspace.getConfiguration().update("launch",n)}catch(e){a?.error((0,s.t)("ERROR_LAUNCH_FILE",{error:e}))}}else P(!1),d(e.projectPath,e.projectName,h,t,o);if(!t.workspace||t.workspace.workspaceFile||t.workspace.workspaceFolders||(P(!1),d(e.projectPath,e.projectName,h,t,o)),t.workspace&&t.workspace.workspaceFile&&"file"===t.workspace.workspaceFile.scheme){const a=(0,r.join)((0,r.dirname)(e.projectPath),".vscode");f(e.projectPath,t)?S(a):(P(!1),d(e.projectPath,e.projectName,h,t,o))}if(t.workspace&&t.workspace.workspaceFile&&"file"!==t.workspace.workspaceFile.scheme){const a=t.workspace.getWorkspaceFolder(t.Uri.file(e.projectPath))?.uri?.fsPath,o=(0,r.join)(a??e.projectPath,".vscode");P(!1,(0,r.relative)(a??e.projectPath,e.projectPath)),S(o)}}t.generateLaunchConfig=function({source:e,version:t,name:a,targetFolder:o,sapClientParam:n,flpAppId:i,flpSandboxAvailable:c,isFioriElement:l,migratorMockIntent:u,isMigrator:d},f,m=p.DefaultLogger,h=!0,P=!1){if("Local Cap"===e)m.info((0,s.t)("TO_START_APP",{npmStart:"`npm start`",cdsRun:"`cds run --in-memory`"}));else{const p="File"===e?"run start-mock":"start";g({datasourceType:e,odataVersion:t,projectName:a,projectPath:(0,r.join)(o,a),sapClientParam:n,flpAppId:i,flpSandboxAvailable:c,isFioriElement:l,migratorMockIntent:u,isMigrator:d},f,m,h,P),m.info((0,s.t)("TO_START_SERVER_MESSAGE",{folder:a,npmCommand:p}))}},t.launchFileCreator=u,t.launchConfigForAppsOutsideOfWorkspace=d,t.checkForFolderInWorkspace=f,t.launchConfigGenerator=g},16920:(e,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createAPIHubKeyFiles=t.applyCAPJavaUpdates=t.updateYamlNpmWorkspaces=t.updateApplicationYaml=t.updatePomXml=t.generateReadMe=t.generateReadMeExt=t.updateAppPackageJsonCAP=t.updateRootPackageJsonCAP=t.updateTsConfigCap=t.updateCAPManifestJson=t.updateCdsFiles=void 0;const o=a(74448),n=a(43895),r=a(1628),i=a(71017),s=a(76027),c=a(90339),p=a(55920),l=a(52375),u=a(75764),d=a(49339);function f(e,{project:t,service:a,readMe:o}){let n;"SAP System"===a.source?n=`SAP System (${(0,r.t)("LABEL_SAP_SYSTEM_SOURCE_TYPE_"+(a.scp?"SCP":"ON_PREM"))})`:"SAP Business Accelerator Hub"===a.source&&"API_HUB_ENTERPRISE"===a.apiHubConfig?.apiHubType&&(n=(0,r.t)("LABEL_API_BUSINESS_HUB_ENTERPRISE"));let s=(0,r.t)("TEXT_LAUNCH_DEFAULT");a.capService&&(s=(0,c.capLaunchText)(a.capService.capType,t.name,(0,r.getAppId)(t.namespace,t.name),t.enableNPMWorkspaces||a.capService.cdsUI5PluginEnabled));const p={genDate:o?.genDate||(new Date).toString(),genPlatform:o?.genPlatform||(0,r.getPlatform)().name,dataSourceLabel:n||a.source,metadataFilename:a.localEdmxFilePath?(0,i.basename)(a.localEdmxFilePath):"",serviceUrl:(a.host??"")+(a.servicePath??"")||(0,r.t)("TEXT_NOT_APPLICABLE"),projectName:t.name,projectTitle:t.title,projectDescription:t.description,projectNamespace:t.namespace,ui5Theme:t.ui5Theme,projectUI5Version:o?.projectUI5Version||t.ui5Version,enableCodeAssist:t.enableCodeAssist,enableEslint:t.enableEslint,enableTypeScript:t.enableTypeScript,showMockDataInfo:!!a.edmx&&!a.capService,genVersion:o?.genVersion||"",templateLabel:o?.templateLabel||"",genId:o?.genId||"",additionalEntries:[],launchText:s};o?.additionalEntries&&(p.additionalEntries=o.additionalEntries),e("README.md",p)}function g(e,t,a){try{const a=e.read(t).toString(),o=(0,p.xml2js)(a,{compact:!0}),n="spring-boot-maven-plugin";if(0===Object.keys(o).length)return;if(o?.project?.build?.plugins?.plugin){const a=o.project.build.plugins.plugin;Array.isArray(a)&&a.length>0?a.forEach((e=>{e.artifactId._text===n&&e.configuration&&void 0===e.workingDirectory&&(e.configuration.workingDirectory={_text:".."})})):a.artifactId._text===n&&a.configuration&&void 0===a.workingDirectory&&(a.configuration.workingDirectory={_text:".."}),o.project.build.plugins.plugin=a;const r=(0,p.js2xml)(o,{compact:!0,ignoreComment:!0,spaces:4}),i=/&gt/g;e.write(t,r.replace(i,">"))}}catch(e){a.logErrorMsgs(e)}}function m(e,t,a,o){try{const o=(0,l.parseAllDocuments)(e.read(t).toString()).map((e=>e.toJSON()));if(1===o.length&&void 0===o[0].spring["web.resources.static-locations"]){const n=o[0];n.spring["web.resources.static-locations"]=`file:./${a}`,e.write(t,(0,l.stringify)(n))}}catch(e){o.logErrorMsgs(e)}}t.updateCdsFiles=async function(e,t,a,s){s?.trace(`updateCdsFiles: capService : ${JSON.stringify(t)}`);const c=(0,r.getAnnotationPath)(a,t?.appPath);s?.trace(`updateCdsFiles: toReferenceUri : ${JSON.stringify({root:t.projectPath})}, annotationPath: ${c}, capService: ${JSON.stringify(t)}`),t.serviceCdsPath=await(0,o.toReferenceUri)({root:t.projectPath},c,t.serviceCdsPath),s?.trace(`updateCdsFiles_1: capService: ${JSON.stringify(t)}`),e.write((0,i.join)(t.projectPath,t.appPath,a,"annotations.cds"),`using ${t.serviceName} as service from '${t.serviceCdsPath}';`);const p=(0,i.join)(t.projectPath,t.appPath,"index.cds"),l=(0,i.join)(t.projectPath,t.appPath,"services.cds"),u=`\nusing from './${(0,n.toPosixPath)((0,i.join)(a,"annotations"))}';`;e.exists(p)?e.append(p,u):e.exists(l)?e.append(l,u):e.write(l,u)},t.updateCAPManifestJson=function(e,t){const a=(0,i.join)(t,u.DirName.Webapp,u.FileName.Manifest);if(e.exists(a)){e.readJSON(a)["sap.app"]?.dataSources&&e.extendJSON(a,{},((e,t)=>{if("annotation"!==e||!Object.values(t).includes("ODataAnnotation"))return"annotations"===e&&Array.isArray(t)&&1===t.length?[]:t}))}},t.updateTsConfigCap=function(e,t){const a=(0,i.join)(t,u.FileName.TsConfigJson);if(e.exists(a)){const t=e.readJSON(a);if(t.compilerOptions.typeRoots){const o=t.compilerOptions.typeRoots,n=o.map((e=>e.replace(/\.\//g,"../../")));e.extendJSON(a,{compilerOptions:{typeRoots:[...o,...n]}})}}},t.updateRootPackageJsonCAP=async function(e,t,a,p,l,u,f,g){const m=(0,i.join)(p.projectPath,"package.json"),h=e.readJSON(m);if(f&&await(0,d.enableCdsUi5Plugin)(p.projectPath,e),p.capType===r.CapType.NODE_JS){const a=await(0,r.checkCDSInstalled)();if(a&&(0,s.satisfies)(a,`>=${r.MIN_CDS_SCRIPT_VERSION}`)){const a=(0,c.getCDSTask)(t,l,f||g);e.extendJSON(m,{scripts:a})}else u&&u.warn((0,r.t)("WARNING_CDS_DK_NOT_INSTALLED",{cdsVersion:a??"",minCdsVersion:r.MIN_CDS_SCRIPT_VERSION}))}if(a){const a=(0,n.toPosixPath)((0,i.join)(p.appPath||o.CAP_APPS_FOLDER,t));let r=h?.sapux;Array.isArray(r)?r.push(a):r=[a],e.extendJSON(m,{sapux:r})}},t.updateAppPackageJsonCAP=function(e,t){const a=(0,i.join)(t,"package.json"),o=e.readJSON(a)??{};delete o.sapux,delete o.scripts["int-test"];for(const e in o.scripts)e.startsWith("start")&&delete o.scripts[e];e.writeJSON(a,o)},t.generateReadMeExt=function(e,{project:t,service:a,readMe:o},n){return f(function({fileName:e,destPath:t,fsEditor:a}){let o=!1;a.exists((0,i.join)(__dirname,"..","templates",e))&&(o=!0);return(e,n)=>{a.copyTpl((0,i.join)(__dirname,""+(o?"":".."),"..","templates",e),(0,i.join)(t,e.replace(/\.tmpl|-cap-tmpl/g,"")),n)}}({fileName:"README.md",destPath:e,fsEditor:n}),{project:t,service:a,readMe:o}),n},t.generateReadMe=f,t.updatePomXml=g,t.updateApplicationYaml=m,t.updateYamlNpmWorkspaces=function(e,t){const a=new r.ErrorHandler;try{const a=(0,l.parseAllDocuments)(e.read(t).toString()).map((e=>e.toJSON()))[0];a.server.customMiddleware=a.server.customMiddleware.filter((e=>"fiori-tools-proxy"!==e.name));const o=a.server.customMiddleware.findIndex((e=>"fiori-tools-appreload"===e.name));delete a.server.customMiddleware[o].configuration,e.write(t,(0,l.stringify)(a))}catch(e){a.logErrorMsgs(e)}},t.applyCAPJavaUpdates=function(e,t){const a=(0,o.getCapCustomPaths)(t),n=new r.ErrorHandler,s=(0,i.join)(t,"pom.xml");e.exists(s)&&g(e,s,n);const c=(0,i.join)(t,a.srv,"src","main","resources","application.yaml");e.exists(c)&&m(e,c,a.app,n)},t.createAPIHubKeyFiles=function(e,t,a){e.write(`${t}/.env`,`${r.API_HUB_API_KEY}=${a.apiHubKey}\n${r.API_HUB_TYPE}=${a.apiHubType}`)}},90339:(e,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getCDSTask=t.capLaunchText=t.getCAPAppUriPath=void 0;const o=a(1628);function n(e,t,a=!1){return a?t:e+"/webapp"}t.getCAPAppUriPath=n;t.capLaunchText=(e,t,a,r=!1)=>{let i,s="";return e===o.CapType.JAVA?(s=" (```mvn spring-boot:run```)",i=`http://localhost:8080/${t}/webapp/index.html`):void 0!==e&&e!==o.CapType.NODE_JS||(i=`http://localhost:4004/${n(t,a,r)}/index.html`),`${(0,o.t)("TEXT_LAUNCH_CAP",{mvnCommand:s,capUrl:i})}`},t.getCDSTask=function(e,t,a=!1){return{[`watch-${e}`]:`cds watch --open ${n(e,t,a)}/index.html?${o.DisableCacheParam}${a?" --livereload false":""}`}}},81979:function(e,t,a){var o=this&&this.__createBinding||(Object.create?function(e,t,a,o){void 0===o&&(o=a);var n=Object.getOwnPropertyDescriptor(t,a);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[a]}}),Object.defineProperty(e,o,n)}:function(e,t,a,o){void 0===o&&(o=a),e[o]=t[a]}),n=this&&this.__exportStar||function(e,t){for(var a in e)"default"===a||Object.prototype.hasOwnProperty.call(t,a)||o(t,e,a)};Object.defineProperty(t,"__esModule",{value:!0}),t.generateLaunchConfig=void 0;var r=a(48478);Object.defineProperty(t,"generateLaunchConfig",{enumerable:!0,get:function(){return r.generateLaunchConfig}}),n(a(38953),t)}}; |
@@ -1,1 +0,1 @@ | ||
"use strict";exports.id=439,exports.ids=[439],exports.modules={47900:function(e,i,t){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i,"__esModule",{value:!0}),i.getSpecTagVersion=i.mergeUi5=i.defaultUI5Libs=i.mergeApp=i.packageDefaults=void 0;const o=t(52841),r=n(t(92229)),a=t(97574),s=n(t(76027)),d=t(71238),u=n(t(62910));function l({framework:e,version:i,localVersion:t}){if(t)return t;if(""===i)return"1.95.0";const n="SAPUI5"===e?"1.76.0":"1.52.5",o=s.default.coerce(i),r=s.default.coerce(n);return o&&r&&s.default.gt(o,r)?s.default.valid(o):n}i.packageDefaults=function(e,i){return{version:e||"0.0.1",description:i||"",devDependencies:{"@ui5/cli":"^3.0.0","@sap/ux-ui5-tooling":"1"},scripts:{start:"ui5 serve --config=ui5.yaml --open index.html","start-local":"ui5 serve --config=ui5-local.yaml --open index.html",build:"ui5 build --config=ui5.yaml --clean-dest --dest dist"}}},i.mergeApp=function(e){var i,t,n,o,r;return(0,u.default)({version:"0.0.1",title:(0,d.t)("text.defaultAppTitle",{id:e.id}),description:(0,d.t)("text.defaultAppDescription",{id:e.id}),baseComponent:"sap/ui/core/UIComponent",sourceTemplate:{id:null!==(t=null===(i=e.sourceTemplate)||void 0===i?void 0:i.id)&&void 0!==t?t:"",version:null!==(o=null===(n=e.sourceTemplate)||void 0===n?void 0:n.version)&&void 0!==o?o:"",toolsId:null===(r=e.sourceTemplate)||void 0===r?void 0:r.toolsId}},e)},i.defaultUI5Libs=["sap.m","sap.ui.core"],i.mergeUi5=function(e,i){var t,n,d,u,p;const c=null!==(t=e.version)&&void 0!==t?t:"",f=null!==(n=e.framework)&&void 0!==n?n:"SAPUI5",v="SAPUI5"===f?"https://ui5.sap.com":"https://sdk.openui5.org",m={minUI5Version:(g=c,y=e.minUI5Version,null!=y?y:g||"1.60.0"),localVersion:l({framework:f,version:c,localVersion:e.localVersion}),version:c,framework:f,frameworkUrl:null!==(d=e.frameworkUrl)&&void 0!==d?d:v};var g,y;return m.descriptorVersion=function(e,i){var t;const n=s.default.coerce(e),o=e=>{const i=r.default;let t=i[`${s.default.major(e)}.${s.default.minor(e)}`];if(!t){const n=Object.keys(i).filter((e=>"latest"!==e)).map((e=>s.default.coerce(e))).sort(((e,i)=>s.default.rcompare(e,i))),o=n[0];if(s.default.gt(e,o))t=i[`${o.major}.${o.minor}`];else{const o=n.find((i=>s.default.gt(e,i)));o&&(t=i[`${o.major}.${o.minor}`])}}return t};return null!==(t=null!=i?i:n&&o(n))&&void 0!==t?t:"1.12.0"}(m.minUI5Version,e.descriptorVersion),m.typesVersion=null!==(u=e.typesVersion)&&void 0!==u?u:((null==i?void 0:i.typescript)?o.getEsmTypesVersion:o.getTypesVersion)(m.minUI5Version),m.typesPackage=(0,o.getTypesPackage)(m.typesVersion),m.ui5Theme=null!==(p=e.ui5Theme)&&void 0!==p?p:"sap_fiori_3",m.ui5Libs=(0,a.getUI5Libs)(e.ui5Libs),Object.assign({},e,m)},i.getSpecTagVersion=function(e){if(e){if(s.default.valid(e))return`UI5-${s.default.major(e)}.${s.default.minor(e)}`;if(e.includes("snapshot")&&e.includes(".")){return`UI5-${e.split("snapshot-")[1]}`}}return"latest"}},11463:(e,i,t)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.mergeWithDefaults=void 0;const n=t(52841),o=t(47900),r=t(25842);i.mergeWithDefaults=function(e){return(0,r.validate)(e),e.app=(0,o.mergeApp)(e.app),e.appOptions=e.appOptions||{},e.appOptions.typescript&&e.appOptions.codeAssist&&(e.appOptions.codeAssist=!1),e.ui5=(0,o.mergeUi5)(e.ui5||{},e.appOptions),e.package=(0,n.mergeObjects)((0,o.packageDefaults)(e.package.version,e.app.description),e.package),e.appOptions.sapux&&(e.package.devDependencies=e.package.devDependencies||{},e.package.devDependencies["@sap/ux-specification"]=(0,o.getSpecTagVersion)(e.ui5.version)),e}},97574:(e,i,t)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.ui5NPMSupport=i.ui5TSSupport=i.getUI5Libs=void 0;const n=t(47900);i.getUI5Libs=e=>{const i=Array.isArray(e)?e:(null==e?void 0:e.split(","))||[];return n.defaultUI5Libs.concat(i).filter(((e,i,t)=>t.indexOf(e)===i))},i.ui5TSSupport={task:{name:"ui5-tooling-transpile-task",afterTask:"replaceVersion",configuration:{debug:!0}},middleware:{name:"ui5-tooling-transpile-middleware",afterMiddleware:"compression",configuration:{debug:!0,excludePatterns:["/Component-preload.js"]}}},i.ui5NPMSupport={task:{name:"ui5-tooling-modules-task",afterTask:"replaceVersion",configuration:{}},middleware:{name:"ui5-tooling-modules-middleware",afterMiddleware:"compression",configuration:{}}}},25842:function(e,i,t){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i,"__esModule",{value:!0}),i.validate=i.validateUI5Version=i.validateAppId=void 0;const o=n(t(76027)),r=t(71238);function a(e){if(!e)throw new Error((0,r.t)("error.missingRequiredProperty",{propertyName:"app.id"}));const i=e.match(/["]/);if(i)throw new Error((0,r.t)("error.disallowedCharacters",{propertyName:"app.id",disallowedChars:`${null==i?void 0:i.join()}`}));return!0}function s(e){if(e&&null===o.default.coerce(e))throw new Error((0,r.t)("error.invalidUI5Version",{version:e}));return!0}i.validateAppId=a,i.validateUI5Version=s,i.validate=function(e){var i,t,n;return a(e.app.id)&&s(null===(i=e.ui5)||void 0===i?void 0:i.version)&&s(null===(t=e.ui5)||void 0===t?void 0:t.localVersion)&&s(null===(n=e.ui5)||void 0===n?void 0:n.minUI5Version)}},71238:function(e,i,t){var n=this&&this.__awaiter||function(e,i,t,n){return new(t||(t=Promise))((function(o,r){function a(e){try{d(n.next(e))}catch(e){r(e)}}function s(e){try{d(n.throw(e))}catch(e){r(e)}}function d(e){var i;e.done?o(e.value):(i=e.value,i instanceof t?i:new t((function(e){e(i)}))).then(a,s)}d((n=n.apply(e,i||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i,"__esModule",{value:!0}),i.t=i.initI18n=void 0;const r=o(t(64949)),a=o(t(644)),s="ui5-application-writer";function d(){return n(this,void 0,void 0,(function*(){yield r.default.init({resources:{en:{[s]:a.default}},lng:"en",fallbackLng:"en",defaultNS:s,ns:[s]})}))}i.initI18n=d,i.t=function(e,i){return r.default.t(e,i)},d().catch((()=>{}))},3905:function(e,i,t){var n=this&&this.__awaiter||function(e,i,t,n){return new(t||(t=Promise))((function(o,r){function a(e){try{d(n.next(e))}catch(e){r(e)}}function s(e){try{d(n.throw(e))}catch(e){r(e)}}function d(e){var i;e.done?o(e.value):(i=e.value,i instanceof t?i:new t((function(e){e(i)}))).then(a,s)}d((n=n.apply(e,i||[])).next())}))};Object.defineProperty(i,"__esModule",{value:!0}),i.isTypescriptEnabled=i.enableTypescript=i.generate=void 0;const o=t(71017),r=t(5407),a=t(84659),s=t(52841),d=t(11463),u=t(97574),l=t(43873);i.generate=function(e,i,t){var u,p,c;return n(this,void 0,void 0,(function*(){t||(t=(0,a.create)((0,r.create)()));const n=(0,d.mergeWithDefaults)(i),f=(0,o.join)(__dirname,"..","templates"),v=[(null===(u=i.appOptions)||void 0===u?void 0:u.typescript)?"**/*.js":"**/*.ts"];!1===(null===(p=i.appOptions)||void 0===p?void 0:p.generateIndex)&&v.push("**/webapp/index.html"),t.copyTpl((0,o.join)(f,"core","**/*.*"),(0,o.join)(e),n,void 0,{globOptions:{dot:!0,ignore:v},processDestinationPath:e=>e.replace(/gitignore.tmpl/g,".gitignore")});const m=(0,o.join)(e,"ui5.yaml"),g=yield s.UI5Config.newInstance(t.read(m));g.addFioriToolsProxydMiddleware({ui5:{url:null===(c=n.ui5)||void 0===c?void 0:c.frameworkUrl}}),g.addFioriToolsAppReloadMiddleware();const y=(0,o.join)(e,"ui5-local.yaml"),h=yield s.UI5Config.newInstance(t.read(y));return h.addUI5Framework(n.ui5.framework,n.ui5.localVersion,n.ui5.ui5Libs,n.ui5.ui5Theme),h.addFioriToolsAppReloadMiddleware(),yield(0,l.applyOptionalFeatures)(n,t,e,f,[g,h]),t.write(m,g.toString()),t.write(y,h.toString()),t}))},i.isTypescriptEnabled=function(e,i){return n(this,void 0,void 0,(function*(){i||(i=(0,a.create)((0,r.create)()));const t=yield s.UI5Config.newInstance(i.read((0,o.join)(e,"ui5.yaml")));return!!t.findCustomMiddleware(u.ui5TSSupport.middleware.name)&&!!t.findCustomTask(u.ui5TSSupport.task.name)}))},i.enableTypescript=function(e,i){var t,d;return n(this,void 0,void 0,(function*(){i||(i=(0,a.create)((0,r.create)()));const n=(0,o.join)(e,"webapp/manifest.json"),u=(0,o.join)(e,"ui5.yaml");if(!i.exists(n))throw new Error(`Invalid project folder. Cannot find required file ${n}`);if(!i.exists(u))throw new Error(`Invalid project folder. Cannot find required file ${u}`);const p=i.readJSON(n),c=yield s.UI5Config.newInstance(i.read(u)),f=(0,o.join)(__dirname,"..","templates"),v=(0,s.getEsmTypesVersion)(null===(d=null===(t=p["sap.ui5"])||void 0===t?void 0:t.dependencies)||void 0===d?void 0:d.minUI5Version),m=(0,s.getTypesPackage)(v),g={app:p["sap.app"],ui5:{typesPackage:m,typesVersion:v}};return yield(0,l.enableTypescript)({basePath:e,fs:i,ui5Configs:[c],tmplPath:f,ui5App:g},!0),i.write(u,c.toString()),i}))}},43873:function(e,i,t){var n=this&&this.__awaiter||function(e,i,t,n){return new(t||(t=Promise))((function(o,r){function a(e){try{d(n.next(e))}catch(e){r(e)}}function s(e){try{d(n.throw(e))}catch(e){r(e)}}function d(e){var i;e.done?o(e.value):(i=e.value,i instanceof t?i:new t((function(e){e(i)}))).then(a,s)}d((n=n.apply(e,i||[])).next())}))};Object.defineProperty(i,"__esModule",{value:!0}),i.applyOptionalFeatures=i.enableNpmPackageConsumption=i.enableTypescript=void 0;const o=t(71017),r=t(69288),a=t(9949),s=t(97574),d=t(52841);function u(e,{ui5App:i,fs:t,basePath:s,tmplPath:u}){return n(this,void 0,void 0,(function*(){const n=(0,o.join)(u,"optional",`${e}`);(yield(0,a.getFilePaths)(n)).forEach((e=>{const a=e.replace(n,""),u=(0,o.join)(s,a);if(t.exists(u)){const n=JSON.parse((0,r.render)(t.read(e),i,{})),o=JSON.parse(t.read(u)),a=(0,d.mergeObjects)(o,n);t.writeJSON(u,a)}else t.copyTpl(e,u,i,void 0,{globOptions:{dot:!0}})}))}))}const l={codeAssist:e=>n(void 0,void 0,void 0,(function*(){return yield u("codeAssist",e)})),eslint:e=>n(void 0,void 0,void 0,(function*(){return yield u("eslint",e)})),loadReuseLibs:e=>n(void 0,void 0,void 0,(function*(){return yield u("loadReuseLibs",e)})),sapux:e=>n(void 0,void 0,void 0,(function*(){return yield u("sapux",e)})),typescript:e=>n(void 0,void 0,void 0,(function*(){return yield p(e)})),npmPackageConsumption:e=>n(void 0,void 0,void 0,(function*(){return yield c(e)}))};function p(e,i=!1){var t;return n(this,void 0,void 0,(function*(){e.ui5App.app.baseComponent=null!==(t=e.ui5App.app.baseComponent)&&void 0!==t?t:"sap/ui/core/UIComponent",yield u("typescript",e),e.ui5Configs.forEach((e=>{e.addCustomMiddleware([s.ui5TSSupport.middleware]),e.addCustomTasks([s.ui5TSSupport.task])}));const n=(0,o.join)(e.basePath,"webapp/Component.js");i?e.fs.move(n,`${n}.old`):e.fs.delete(n)}))}function c(e){return n(this,void 0,void 0,(function*(){yield u("npmPackageConsumption",e),e.ui5Configs.forEach((e=>{e.addCustomMiddleware([s.ui5NPMSupport.middleware]),e.addCustomTasks([s.ui5NPMSupport.task])}))}))}i.enableTypescript=p,i.enableNpmPackageConsumption=c,i.applyOptionalFeatures=function(e,i,t,o,r){var a;return n(this,void 0,void 0,(function*(){if(e.appOptions)for(const[n,s]of Object.entries(e.appOptions))!0===s&&(yield null===(a=l[n])||void 0===a?void 0:a.call(l,{ui5App:e,fs:i,basePath:t,tmplPath:o,ui5Configs:r}))}))}},644:e=>{e.exports=JSON.parse('{"info":{"mockOnlyWarning":"This application was generated with a local metadata file and does not reference a live server. Please add the required server configuration or start this application with mock data using the target: npm run start-mock"},"error":{"missingRequiredProperty":"The property: {{ propertyName }} must have a value","disallowedCharacters":"The property: {{ propertyName }} contains disallowed characters: {{- disallowedChars }}","invalidUI5Version":"The specified UI5 version is invalid: {{ version }}"},"text":{"defaultAppTitle":"Title of {{ id }}","defaultAppDescription":"Description of {{ id }}"}}')}}; | ||
"use strict";exports.id=439,exports.ids=[439],exports.modules={47900:function(e,i,t){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i,"__esModule",{value:!0}),i.getSpecTagVersion=i.mergeUi5=i.defaultUI5Libs=i.mergeApp=i.packageDefaults=void 0;const o=t(50911),r=n(t(92229)),a=t(97574),s=n(t(76027)),d=t(71238),u=n(t(62910));function l({framework:e,version:i,localVersion:t}){if(t)return t;if(""===i)return"1.95.0";const n="SAPUI5"===e?"1.76.0":"1.52.5",o=s.default.coerce(i),r=s.default.coerce(n);return o&&r&&s.default.gt(o,r)?s.default.valid(o):n}i.packageDefaults=function(e,i){return{version:e||"0.0.1",description:i||"",devDependencies:{"@ui5/cli":"^3.0.0","@sap/ux-ui5-tooling":"1"},scripts:{start:"ui5 serve --config=ui5.yaml --open index.html","start-local":"ui5 serve --config=ui5-local.yaml --open index.html",build:"ui5 build --config=ui5.yaml --clean-dest --dest dist"}}},i.mergeApp=function(e){var i,t,n,o,r;return(0,u.default)({version:"0.0.1",title:(0,d.t)("text.defaultAppTitle",{id:e.id}),description:(0,d.t)("text.defaultAppDescription",{id:e.id}),baseComponent:"sap/ui/core/UIComponent",sourceTemplate:{id:null!==(t=null===(i=e.sourceTemplate)||void 0===i?void 0:i.id)&&void 0!==t?t:"",version:null!==(o=null===(n=e.sourceTemplate)||void 0===n?void 0:n.version)&&void 0!==o?o:"",toolsId:null===(r=e.sourceTemplate)||void 0===r?void 0:r.toolsId}},e)},i.defaultUI5Libs=["sap.m","sap.ui.core"],i.mergeUi5=function(e,i){var t,n,d,u,p;const c=null!==(t=e.version)&&void 0!==t?t:"",f=null!==(n=e.framework)&&void 0!==n?n:"SAPUI5",v="SAPUI5"===f?"https://ui5.sap.com":"https://sdk.openui5.org",m={minUI5Version:(g=c,y=e.minUI5Version,null!=y?y:g||"1.60.0"),localVersion:l({framework:f,version:c,localVersion:e.localVersion}),version:c,framework:f,frameworkUrl:null!==(d=e.frameworkUrl)&&void 0!==d?d:v};var g,y;return m.descriptorVersion=function(e,i){var t;const n=s.default.coerce(e),o=e=>{const i=r.default;let t=i[`${s.default.major(e)}.${s.default.minor(e)}`];if(!t){const n=Object.keys(i).filter((e=>"latest"!==e)).map((e=>s.default.coerce(e))).sort(((e,i)=>s.default.rcompare(e,i))),o=n[0];if(s.default.gt(e,o))t=i[`${o.major}.${o.minor}`];else{const o=n.find((i=>s.default.gt(e,i)));o&&(t=i[`${o.major}.${o.minor}`])}}return t};return null!==(t=null!=i?i:n&&o(n))&&void 0!==t?t:"1.12.0"}(m.minUI5Version,e.descriptorVersion),m.typesVersion=null!==(u=e.typesVersion)&&void 0!==u?u:((null==i?void 0:i.typescript)?o.getEsmTypesVersion:o.getTypesVersion)(m.minUI5Version),m.typesPackage=(0,o.getTypesPackage)(m.typesVersion),m.ui5Theme=null!==(p=e.ui5Theme)&&void 0!==p?p:"sap_fiori_3",m.ui5Libs=(0,a.getUI5Libs)(e.ui5Libs),Object.assign({},e,m)},i.getSpecTagVersion=function(e){if(e){if(s.default.valid(e))return`UI5-${s.default.major(e)}.${s.default.minor(e)}`;if(e.includes("snapshot")&&e.includes(".")){return`UI5-${e.split("snapshot-")[1]}`}}return"latest"}},11463:(e,i,t)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.mergeWithDefaults=void 0;const n=t(50911),o=t(47900),r=t(25842);i.mergeWithDefaults=function(e){return(0,r.validate)(e),e.app=(0,o.mergeApp)(e.app),e.appOptions=e.appOptions||{},e.appOptions.typescript&&e.appOptions.codeAssist&&(e.appOptions.codeAssist=!1),e.ui5=(0,o.mergeUi5)(e.ui5||{},e.appOptions),e.package=(0,n.mergeObjects)((0,o.packageDefaults)(e.package.version,e.app.description),e.package),e.appOptions.sapux&&(e.package.devDependencies=e.package.devDependencies||{},e.package.devDependencies["@sap/ux-specification"]=(0,o.getSpecTagVersion)(e.ui5.version)),e}},97574:(e,i,t)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.ui5NPMSupport=i.ui5TSSupport=i.getUI5Libs=void 0;const n=t(47900);i.getUI5Libs=e=>{const i=Array.isArray(e)?e:(null==e?void 0:e.split(","))||[];return n.defaultUI5Libs.concat(i).filter(((e,i,t)=>t.indexOf(e)===i))},i.ui5TSSupport={task:{name:"ui5-tooling-transpile-task",afterTask:"replaceVersion",configuration:{debug:!0}},middleware:{name:"ui5-tooling-transpile-middleware",afterMiddleware:"compression",configuration:{debug:!0,excludePatterns:["/Component-preload.js"]}}},i.ui5NPMSupport={task:{name:"ui5-tooling-modules-task",afterTask:"replaceVersion",configuration:{}},middleware:{name:"ui5-tooling-modules-middleware",afterMiddleware:"compression",configuration:{}}}},25842:function(e,i,t){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i,"__esModule",{value:!0}),i.validate=i.validateUI5Version=i.validateAppId=void 0;const o=n(t(76027)),r=t(71238);function a(e){if(!e)throw new Error((0,r.t)("error.missingRequiredProperty",{propertyName:"app.id"}));const i=e.match(/["]/);if(i)throw new Error((0,r.t)("error.disallowedCharacters",{propertyName:"app.id",disallowedChars:`${null==i?void 0:i.join()}`}));return!0}function s(e){if(e&&null===o.default.coerce(e))throw new Error((0,r.t)("error.invalidUI5Version",{version:e}));return!0}i.validateAppId=a,i.validateUI5Version=s,i.validate=function(e){var i,t,n;return a(e.app.id)&&s(null===(i=e.ui5)||void 0===i?void 0:i.version)&&s(null===(t=e.ui5)||void 0===t?void 0:t.localVersion)&&s(null===(n=e.ui5)||void 0===n?void 0:n.minUI5Version)}},71238:function(e,i,t){var n=this&&this.__awaiter||function(e,i,t,n){return new(t||(t=Promise))((function(o,r){function a(e){try{d(n.next(e))}catch(e){r(e)}}function s(e){try{d(n.throw(e))}catch(e){r(e)}}function d(e){var i;e.done?o(e.value):(i=e.value,i instanceof t?i:new t((function(e){e(i)}))).then(a,s)}d((n=n.apply(e,i||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i,"__esModule",{value:!0}),i.t=i.initI18n=void 0;const r=o(t(64949)),a=o(t(644)),s="ui5-application-writer";function d(){return n(this,void 0,void 0,(function*(){yield r.default.init({resources:{en:{[s]:a.default}},lng:"en",fallbackLng:"en",defaultNS:s,ns:[s]})}))}i.initI18n=d,i.t=function(e,i){return r.default.t(e,i)},d().catch((()=>{}))},3905:function(e,i,t){var n=this&&this.__awaiter||function(e,i,t,n){return new(t||(t=Promise))((function(o,r){function a(e){try{d(n.next(e))}catch(e){r(e)}}function s(e){try{d(n.throw(e))}catch(e){r(e)}}function d(e){var i;e.done?o(e.value):(i=e.value,i instanceof t?i:new t((function(e){e(i)}))).then(a,s)}d((n=n.apply(e,i||[])).next())}))};Object.defineProperty(i,"__esModule",{value:!0}),i.isTypescriptEnabled=i.enableTypescript=i.generate=void 0;const o=t(71017),r=t(5407),a=t(84659),s=t(50911),d=t(11463),u=t(97574),l=t(43873);i.generate=function(e,i,t){var u,p,c;return n(this,void 0,void 0,(function*(){t||(t=(0,a.create)((0,r.create)()));const n=(0,d.mergeWithDefaults)(i),f=(0,o.join)(__dirname,"..","templates"),v=[(null===(u=i.appOptions)||void 0===u?void 0:u.typescript)?"**/*.js":"**/*.ts"];!1===(null===(p=i.appOptions)||void 0===p?void 0:p.generateIndex)&&v.push("**/webapp/index.html"),t.copyTpl((0,o.join)(f,"core","**/*.*"),(0,o.join)(e),n,void 0,{globOptions:{dot:!0,ignore:v},processDestinationPath:e=>e.replace(/gitignore.tmpl/g,".gitignore")});const m=(0,o.join)(e,"ui5.yaml"),g=yield s.UI5Config.newInstance(t.read(m));g.addFioriToolsProxydMiddleware({ui5:{url:null===(c=n.ui5)||void 0===c?void 0:c.frameworkUrl}}),g.addFioriToolsAppReloadMiddleware();const y=(0,o.join)(e,"ui5-local.yaml"),h=yield s.UI5Config.newInstance(t.read(y));return h.addUI5Framework(n.ui5.framework,n.ui5.localVersion,n.ui5.ui5Libs,n.ui5.ui5Theme),h.addFioriToolsAppReloadMiddleware(),yield(0,l.applyOptionalFeatures)(n,t,e,f,[g,h]),t.write(m,g.toString()),t.write(y,h.toString()),t}))},i.isTypescriptEnabled=function(e,i){return n(this,void 0,void 0,(function*(){i||(i=(0,a.create)((0,r.create)()));const t=yield s.UI5Config.newInstance(i.read((0,o.join)(e,"ui5.yaml")));return!!t.findCustomMiddleware(u.ui5TSSupport.middleware.name)&&!!t.findCustomTask(u.ui5TSSupport.task.name)}))},i.enableTypescript=function(e,i){var t,d;return n(this,void 0,void 0,(function*(){i||(i=(0,a.create)((0,r.create)()));const n=(0,o.join)(e,"webapp/manifest.json"),u=(0,o.join)(e,"ui5.yaml");if(!i.exists(n))throw new Error(`Invalid project folder. Cannot find required file ${n}`);if(!i.exists(u))throw new Error(`Invalid project folder. Cannot find required file ${u}`);const p=i.readJSON(n),c=yield s.UI5Config.newInstance(i.read(u)),f=(0,o.join)(__dirname,"..","templates"),v=(0,s.getEsmTypesVersion)(null===(d=null===(t=p["sap.ui5"])||void 0===t?void 0:t.dependencies)||void 0===d?void 0:d.minUI5Version),m=(0,s.getTypesPackage)(v),g={app:p["sap.app"],ui5:{typesPackage:m,typesVersion:v}};return yield(0,l.enableTypescript)({basePath:e,fs:i,ui5Configs:[c],tmplPath:f,ui5App:g},!0),i.write(u,c.toString()),i}))}},43873:function(e,i,t){var n=this&&this.__awaiter||function(e,i,t,n){return new(t||(t=Promise))((function(o,r){function a(e){try{d(n.next(e))}catch(e){r(e)}}function s(e){try{d(n.throw(e))}catch(e){r(e)}}function d(e){var i;e.done?o(e.value):(i=e.value,i instanceof t?i:new t((function(e){e(i)}))).then(a,s)}d((n=n.apply(e,i||[])).next())}))};Object.defineProperty(i,"__esModule",{value:!0}),i.applyOptionalFeatures=i.enableNpmPackageConsumption=i.enableTypescript=void 0;const o=t(71017),r=t(69288),a=t(9949),s=t(97574),d=t(50911);function u(e,{ui5App:i,fs:t,basePath:s,tmplPath:u}){return n(this,void 0,void 0,(function*(){const n=(0,o.join)(u,"optional",`${e}`);(yield(0,a.getFilePaths)(n)).forEach((e=>{const a=e.replace(n,""),u=(0,o.join)(s,a);if(t.exists(u)){const n=JSON.parse((0,r.render)(t.read(e),i,{})),o=JSON.parse(t.read(u)),a=(0,d.mergeObjects)(o,n);t.writeJSON(u,a)}else t.copyTpl(e,u,i,void 0,{globOptions:{dot:!0}})}))}))}const l={codeAssist:e=>n(void 0,void 0,void 0,(function*(){return yield u("codeAssist",e)})),eslint:e=>n(void 0,void 0,void 0,(function*(){return yield u("eslint",e)})),loadReuseLibs:e=>n(void 0,void 0,void 0,(function*(){return yield u("loadReuseLibs",e)})),sapux:e=>n(void 0,void 0,void 0,(function*(){return yield u("sapux",e)})),typescript:e=>n(void 0,void 0,void 0,(function*(){return yield p(e)})),npmPackageConsumption:e=>n(void 0,void 0,void 0,(function*(){return yield c(e)}))};function p(e,i=!1){var t;return n(this,void 0,void 0,(function*(){e.ui5App.app.baseComponent=null!==(t=e.ui5App.app.baseComponent)&&void 0!==t?t:"sap/ui/core/UIComponent",yield u("typescript",e),e.ui5Configs.forEach((e=>{e.addCustomMiddleware([s.ui5TSSupport.middleware]),e.addCustomTasks([s.ui5TSSupport.task])}));const n=(0,o.join)(e.basePath,"webapp/Component.js");i?e.fs.move(n,`${n}.old`):e.fs.delete(n)}))}function c(e){return n(this,void 0,void 0,(function*(){yield u("npmPackageConsumption",e),e.ui5Configs.forEach((e=>{e.addCustomMiddleware([s.ui5NPMSupport.middleware]),e.addCustomTasks([s.ui5NPMSupport.task])}))}))}i.enableTypescript=p,i.enableNpmPackageConsumption=c,i.applyOptionalFeatures=function(e,i,t,o,r){var a;return n(this,void 0,void 0,(function*(){if(e.appOptions)for(const[n,s]of Object.entries(e.appOptions))!0===s&&(yield null===(a=l[n])||void 0===a?void 0:a.call(l,{ui5App:e,fs:i,basePath:t,tmplPath:o,ui5Configs:r}))}))}},644:e=>{e.exports=JSON.parse('{"info":{"mockOnlyWarning":"This application was generated with a local metadata file and does not reference a live server. Please add the required server configuration or start this application with mock data using the target: npm run start-mock"},"error":{"missingRequiredProperty":"The property: {{ propertyName }} must have a value","disallowedCharacters":"The property: {{ propertyName }} contains disallowed characters: {{- disallowedChars }}","invalidUI5Version":"The specified UI5 version is invalid: {{ version }}"},"text":{"defaultAppTitle":"Title of {{ id }}","defaultAppDescription":"Description of {{ id }}"}}')}}; |
@@ -1,1 +0,1 @@ | ||
"use strict";exports.id=261,exports.ids=[261],exports.modules={94086:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mergeWithDefaults=void 0;const n=r(90205);t.mergeWithDefaults=function(e){var t;(0,n.validate)(e);const r=`${e.namespace}.${e.libraryName}`,a=null!==(t=e.author)&&void 0!==t?t:"UX Tools";return Object.assign(Object.assign({},e),{author:a,namespaceURI:e.namespace.split(".").join("/"),libraryNamespace:r,libraryNamespaceURI:r.split(".").join("/"),libraryBasepath:r.split(".").map((e=>"..")).join("/")+"/"})}},90205:function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.validate=t.validateUI5Version=t.validateNamespace=t.validateLibName=void 0;const a=n(r(76027)),i=r(39446);function o(e){if(!e)throw new Error((0,i.t)("error.missingRequiredProperty",{propertyName:"libraryName"}));if(!/^[a-z][a-z0-9]*$/g.test(e))throw new Error((0,i.t)("error.useAlphaNumeric",{propertyName:"libraryName"}));return!0}function s(e,t){if(!e)throw new Error((0,i.t)("error.missingRequiredProperty",{propertyName:"namespace"}));return function(e,t){if(!/^[a-zA-Z]/.test(e))throw new Error((0,i.t)("error.invalidNamespace.mustStartWithLetter"));if(e.endsWith("."))throw new Error((0,i.t)("error.invalidNamespace.mustEndInPeriod"));if("SAP"===e.toUpperCase())throw new Error((0,i.t)("error.invalidNamespace.cannotBeSap",{str:e}));if(e.toLowerCase().startsWith("new"))throw new Error((0,i.t)("error.invalidNamespace.cannotStartWithNew",{str:e.substring(0,3)}));if(/\.\d/.test(e))throw new Error((0,i.t)("error.invalidNamespace.numAfterPeriod"));if(!/^[a-zA-Z\d_.]+$/.test(e))throw new Error((0,i.t)("error.invalidNamespace.specialCharacter"));if((t+e).length>70)throw new Error((0,i.t)("error.invalidNamespace.tooLong",{length:70}));return!0}(e,t)}function c(e){if(e&&null===a.default.coerce(e))throw new Error((0,i.t)("error.invalidUI5Version",{version:e}));return!0}t.validateLibName=o,t.validateNamespace=s,t.validateUI5Version=c,t.validate=function(e){return o(e.libraryName)&&s(e.namespace,e.libraryName)&&c(e.frameworkVersion)}},39446:function(e,t,r){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.t=t.initI18n=void 0;const i=a(r(20404)),o=a(r(86614)),s="ui5-library-writer";function c(){return n(this,void 0,void 0,(function*(){yield i.default.init({resources:{en:{[s]:o.default}},lng:"en",fallbackLng:"en",defaultNS:s,ns:[s]})}))}t.initI18n=c,t.t=function(e,t){return i.default.t(e,t)},c().catch((()=>{}))},78873:function(e,t,r){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.generate=void 0;const i=r(71017),o=r(5407),s=r(84659),c=a(r(28869)),l=r(79963),u=r(94086);t.generate=function(e,t,r){return n(this,void 0,void 0,(function*(){const n=(0,c.default)(t);r||(r=(0,s.create)((0,o.create)()));const a=(0,u.mergeWithDefaults)(t);e=(0,i.join)(e,a.libraryNamespace);const p=(0,i.join)(__dirname,"..","templates"),d=[n.typescript?"**/*.js":"**/*.ts"];return r.copyTpl((0,i.join)(p,"common","**/*.*"),e,a,void 0,{globOptions:{dot:!0,ignore:d},processDestinationPath:e=>e.replace("baselibrary",a.libraryNamespaceURI).replace(/gitignore.tmpl/g,".gitignore").replace(/karma.conf.tmpl/g,"karma.conf.js")}),n.typescript&&(yield(0,l.enableTypescript)(a,e,p,r)),r}))}},79963:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),a(r(92230),t)},92230:function(e,t,r){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.enableTypescript=void 0;const a=r(69288),i=r(93325),o=r(50911),s=r(71017),c=r(76027);function l(e,t){const r=(0,c.gte)(t,"1.113.0")?"types":"ts-types-esm";return`@${e.toLowerCase()}/${r}`}t.enableTypescript=function(e,t,r,c){return n(this,void 0,void 0,(function*(){const n=(0,s.join)(r,"optional","typescript"),u=yield(0,i.getFilePaths)(n),p=Object.assign(Object.assign({},e),{tsTypes:l(e.framework,e.frameworkVersion),tsTypesVersion:e.frameworkVersion});u.forEach((e=>{const r=e.replace(n,""),i=(0,s.join)(t,r);if(c.exists(i)){const t=JSON.parse((0,a.render)(c.read(e),p,{})),r=JSON.parse(c.read(i)),n=(0,o.mergeObjects)(r,t);c.writeJSON(i,n)}else c.copyTpl(e,i,p,void 0,{globOptions:{dot:!0}})}));const d=(0,s.join)(t,"ui5.yaml"),f=yield o.UI5Config.newInstance(c.read(d));f.updateCustomMiddleware({name:"fiori-tools-appreload",afterMiddleware:"compression",configuration:{path:"src",port:35729,delay:300}}),f.updateCustomMiddleware({name:"ui5-tooling-transpile-middleware",afterMiddleware:"compression",configuration:{debug:!0,excludePatterns:["/Component-preload.js"]}}),f.addCustomTasks([{name:"ui5-tooling-transpile-task",afterTask:"replaceVersion",configuration:{debug:!0}}]),c.write(d,f.toString())}))}},86614:e=>{e.exports=JSON.parse('{"error":{"missingRequiredProperty":"The property: {{ propertyName }} must have a value","useAlphaNumeric":"Please use lowercase alpha numeric characters only for the property {{ propertyName }}","invalidUI5Version":"The specified UI5 version is invalid: {{ version }}","invalidNamespace":{"mustStartWithLetter":"The namespace must start with a letter","endsInPeriod":"The namespace cannot end with a period","isSap":"The namespace cannot be {{ str }}","startsWithNew":"The namespace cannot start with {{ str }}","numAfterPeriod":"A number cannot follow a period in the namespace","specialCharacter":"The namespace can only contain letters, digits, dots, and underscores","tooLong":"The combined length of the application namespace and module name must not exceed {{ length }} characters"}}}')}}; | ||
"use strict";exports.id=261,exports.ids=[261],exports.modules={94086:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mergeWithDefaults=void 0;const n=r(90205);t.mergeWithDefaults=function(e){var t;(0,n.validate)(e);const r=`${e.namespace}.${e.libraryName}`,a=null!==(t=e.author)&&void 0!==t?t:"UX Tools";return Object.assign(Object.assign({},e),{author:a,namespaceURI:e.namespace.split(".").join("/"),libraryNamespace:r,libraryNamespaceURI:r.split(".").join("/"),libraryBasepath:r.split(".").map((e=>"..")).join("/")+"/"})}},90205:function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.validate=t.validateUI5Version=t.validateNamespace=t.validateLibName=void 0;const a=n(r(76027)),i=r(39446);function o(e){if(!e)throw new Error((0,i.t)("error.missingRequiredProperty",{propertyName:"libraryName"}));if(!/^[a-z][a-z0-9]*$/g.test(e))throw new Error((0,i.t)("error.useAlphaNumeric",{propertyName:"libraryName"}));return!0}function s(e,t){if(!e)throw new Error((0,i.t)("error.missingRequiredProperty",{propertyName:"namespace"}));return function(e,t){if(!/^[a-zA-Z]/.test(e))throw new Error((0,i.t)("error.invalidNamespace.mustStartWithLetter"));if(e.endsWith("."))throw new Error((0,i.t)("error.invalidNamespace.mustEndInPeriod"));if("SAP"===e.toUpperCase())throw new Error((0,i.t)("error.invalidNamespace.cannotBeSap",{str:e}));if(e.toLowerCase().startsWith("new"))throw new Error((0,i.t)("error.invalidNamespace.cannotStartWithNew",{str:e.substring(0,3)}));if(/\.\d/.test(e))throw new Error((0,i.t)("error.invalidNamespace.numAfterPeriod"));if(!/^[a-zA-Z\d_.]+$/.test(e))throw new Error((0,i.t)("error.invalidNamespace.specialCharacter"));if((t+e).length>70)throw new Error((0,i.t)("error.invalidNamespace.tooLong",{length:70}));return!0}(e,t)}function c(e){if(e&&null===a.default.coerce(e))throw new Error((0,i.t)("error.invalidUI5Version",{version:e}));return!0}t.validateLibName=o,t.validateNamespace=s,t.validateUI5Version=c,t.validate=function(e){return o(e.libraryName)&&s(e.namespace,e.libraryName)&&c(e.frameworkVersion)}},39446:function(e,t,r){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.t=t.initI18n=void 0;const i=a(r(20404)),o=a(r(86614)),s="ui5-library-writer";function c(){return n(this,void 0,void 0,(function*(){yield i.default.init({resources:{en:{[s]:o.default}},lng:"en",fallbackLng:"en",defaultNS:s,ns:[s]})}))}t.initI18n=c,t.t=function(e,t){return i.default.t(e,t)},c().catch((()=>{}))},78873:function(e,t,r){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.generate=void 0;const i=r(71017),o=r(5407),s=r(84659),c=a(r(28869)),l=r(79963),u=r(94086);t.generate=function(e,t,r){return n(this,void 0,void 0,(function*(){const n=(0,c.default)(t);r||(r=(0,s.create)((0,o.create)()));const a=(0,u.mergeWithDefaults)(t);e=(0,i.join)(e,a.libraryNamespace);const p=(0,i.join)(__dirname,"..","templates"),d=[n.typescript?"**/*.js":"**/*.ts"];return r.copyTpl((0,i.join)(p,"common","**/*.*"),e,a,void 0,{globOptions:{dot:!0,ignore:d},processDestinationPath:e=>e.replace("baselibrary",a.libraryNamespaceURI).replace(/gitignore.tmpl/g,".gitignore").replace(/karma.conf.tmpl/g,"karma.conf.js")}),n.typescript&&(yield(0,l.enableTypescript)(a,e,p,r)),r}))}},79963:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),a(r(92230),t)},92230:function(e,t,r){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.enableTypescript=void 0;const a=r(69288),i=r(9949),o=r(50911),s=r(71017),c=r(76027);function l(e,t){const r=(0,c.gte)(t,"1.113.0")?"types":"ts-types-esm";return`@${e.toLowerCase()}/${r}`}t.enableTypescript=function(e,t,r,c){return n(this,void 0,void 0,(function*(){const n=(0,s.join)(r,"optional","typescript"),u=yield(0,i.getFilePaths)(n),p=Object.assign(Object.assign({},e),{tsTypes:l(e.framework,e.frameworkVersion),tsTypesVersion:e.frameworkVersion});u.forEach((e=>{const r=e.replace(n,""),i=(0,s.join)(t,r);if(c.exists(i)){const t=JSON.parse((0,a.render)(c.read(e),p,{})),r=JSON.parse(c.read(i)),n=(0,o.mergeObjects)(r,t);c.writeJSON(i,n)}else c.copyTpl(e,i,p,void 0,{globOptions:{dot:!0}})}));const d=(0,s.join)(t,"ui5.yaml"),f=yield o.UI5Config.newInstance(c.read(d));f.updateCustomMiddleware({name:"fiori-tools-appreload",afterMiddleware:"compression",configuration:{path:"src",port:35729,delay:300}}),f.updateCustomMiddleware({name:"ui5-tooling-transpile-middleware",afterMiddleware:"compression",configuration:{debug:!0,excludePatterns:["/Component-preload.js"]}}),f.addCustomTasks([{name:"ui5-tooling-transpile-task",afterTask:"replaceVersion",configuration:{debug:!0}}]),c.write(d,f.toString())}))}},86614:e=>{e.exports=JSON.parse('{"error":{"missingRequiredProperty":"The property: {{ propertyName }} must have a value","useAlphaNumeric":"Please use lowercase alpha numeric characters only for the property {{ propertyName }}","invalidUI5Version":"The specified UI5 version is invalid: {{ version }}","invalidNamespace":{"mustStartWithLetter":"The namespace must start with a letter","endsInPeriod":"The namespace cannot end with a period","isSap":"The namespace cannot be {{ str }}","startsWithNew":"The namespace cannot start with {{ str }}","numAfterPeriod":"A number cannot follow a period in the namespace","specialCharacter":"The namespace can only contain letters, digits, dots, and underscores","tooLong":"The combined length of the application namespace and module name must not exceed {{ length }} characters"}}}')}}; |
@@ -1,1 +0,1 @@ | ||
"use strict";exports.id=689,exports.ids=[689],exports.modules={24003:function(e,t,r){var a=this&&this.__createBinding||(Object.create?function(e,t,r,a){void 0===a&&(a=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,a,i)}:function(e,t,r,a){void 0===a&&(a=r),e[a]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||a(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(73215),t)},93540:function(e,t,r){var a=this&&this.__createBinding||(Object.create?function(e,t,r,a){void 0===a&&(a=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,a,i)}:function(e,t,r,a){void 0===a&&(a=r),e[a]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||a(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(23580),t),i(r(20023),t),i(r(98133),t),i(r(67288),t),i(r(29142),t),i(r(35907),t),i(r(21509),t)},23580:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getSourcesQuestions=t.getDataSelectionChoices=void 0;const a=r(1628),i=r(37705);function s(e,t){const r=[{name:(0,a.t)("LABEL_SAP"),value:"SAP System"},{name:(0,a.t)("LABEL_ODATA"),value:"OData Url"},{name:(0,a.t)("SELECT_APIHUB"),value:"SAP Business Accelerator Hub"}];return(0,a.getPlatform)()===a.PLATFORMS.SBAS&&(0,i.isInternalFeaturesSettingEnabled)()&&r.push({name:(0,a.t)("LABEL_MTA"),value:"MTA File"}),e!==a.ODataVersion.v2&&r.push({name:(0,a.t)("LABEL_CAP"),value:"Local Cap"}),r.push({name:(0,a.t)("LABEL_METADATA"),value:"File"}),t&&r.unshift({name:(0,a.t)("LABEL_NONE"),value:"None"}),r}t.getDataSelectionChoices=s,t.getSourcesQuestions=function(e,t,r){return{type:"list",name:"source",guiOptions:{breadcrumb:(0,a.breadcrumbHelper)()},default:()=>{if(r)return"Local Cap"},message:(0,a.t)("LABEL_DATA_SERVICE_MESSAGE"),choices:s(e.version,t)}}},35907:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getApiHubQuestions=void 0;const a=r(1628),i=r(48721);t.getApiHubQuestions=function(e){let t;return[{type:"list",name:"apihubService",message:(0,a.t)("SELECT_SERVICE_MSG"),guiOptions:{breadcrumb:(0,a.breadcrumbHelper)((0,a.t)("LABEL_SERVICE"))},choices:async()=>(t||(t=await(0,i.getAPIHubServiceChoices)()),t)},{when:e=>!!e?.apihubService,type:"input",guiOptions:{mandatory:!0},name:"apihubUser",message:(0,a.t)("PROMPT_APIHUB_USERNAME"),validate:e=>!!e?.trim()},{when:e=>!!e?.apihubService,type:"password",name:"apihubPassword",guiType:"login",message:(0,a.t)("PROMPT_APIHUB_PASSWORD"),validate:async(t,{apihubService:r,apihubUser:a})=>{if(t){const s=await(0,i.getAPIHubServiceDetails)(r,a,t);return"string"==typeof s?s:(e.edmx=s.edmx,e.servicePath=s.servicePath,e.host=s.host,e.version=s.version,e.apiHubConfig={apiHubKey:s.apiHubConfig?.apiHubKey,apiHubType:"API_HUB"},!0)}return!1}}]}},48721:function(e,t,r){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getAPIHubServiceChoices=t.getAPIHubServiceDetails=void 0;const i=r(71671),s=r(84826),n=r(77090),o=r(57310),c=a(r(75503));t.getAPIHubServiceDetails=async function(e,t,r){try{const a={};a.apiHubApiKey=await(0,i.getApihubKey)(t,r),a.servicePath=e.ServiceUrl;const c={};c.edmx=await(0,i.getMetadata)(a,e);const l=s.MetadataFactory.getMetadataFactory().getMetadataExplorer(c.edmx);c.version=l.v2Logger?n.ODataVersion.v2:n.ODataVersion.v4;const u=new o.URL(e.ServiceUrl);return c.host=u.origin,c.servicePath=u.pathname,c.apiHubConfig={apiHubKey:a.apiHubApiKey,apiHubType:"API_HUB"},c}catch(e){return c.default.logErrorMsgs(e,e.message)}},t.getAPIHubServiceChoices=async function(){try{return(await(0,i.getListODataServices)()).map((e=>({name:e.Title,value:e}))).sort(((e,t)=>e.name.localeCompare(t.name,void 0,{sensitivity:"base"})))}catch(e){c.default.logErrorMsgs(e)}return[]}},20023:function(e,t,r){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getCapQuestions=void 0;const i=r(1628),s=r(71361),n=r(85379),o=r(24003),c=a(r(75503)),l=r(16284),u=r(35875);t.getCapQuestions=function(e,t,r){const a=new s.CapHelper;let d,S,E,p,_=!1;const m=async t=>{t?.serviceName&&(e.edmx=await a.getEdmx(t.urlPath,t.projectPath,t?.serviceName),e.servicePath=t.urlPath,e.version=i.ODataVersion.v4,void 0===e.edmx&&o.ServiceInquirer.logger.info((0,i.t)("ERROR_ODATA_SERVICE_METADATA_INVALID")))},y=[{when:async()=>(S=await a.getCapWorkspaceFolders(r),S.length>0&&(E=await a.getCapWorkspaceChoices(S),!0)),type:"list",name:"capWorkspaceProject",message:(0,i.t)("LABEL_CAP_CHOOSE_PROJECT"),default:()=>(0,u.defaultCapChoice)(t,E?.length),choices:()=>E,guiOptions:{applyDefaultWhenDirty:!0,mandatory:!0,breadcrumnb:(0,i.breadcrumbHelper)((0,i.t)("LABEL_CAP_PROJECT_BREADCRUMB"))},validate:e=>!!e?.path&&(_=!0,!0)},{when:e=>0===S.length||e.capWorkspaceProject?.path===l.MANUAL_PATH,type:"input",guiType:"folder-browser",name:"projectPath",message:(0,i.t)("LABEL_CAP_PROJECT_MESSAGE"),default:()=>{if(t)return t.projectPath},guiOptions:{mandatory:!0,breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("LABEL_CAP_PROJECT_BREADCRUMB"))},validate:async e=>(_=await(0,n.validateCapPath)(e),_)},{when:async e=>{if(e.capWorkspaceProject&&e.capWorkspaceProject.path!==l.MANUAL_PATH&&(e.projectPath=e.capWorkspaceProject.path,_=!0),!0===_){const t=e.projectPath?{path:e.projectPath}:e.capWorkspaceProject;return p=await a.getCapServiceChoices(t),!0}return!1},type:"list",name:"capService",message:(0,i.t)("LABEL_ODATA_MESSAGE"),choices:()=>(t&&(d=p?.findIndex((e=>e.value?.serviceName===t.serviceName))),p),guiOptions:{applyDefaultWhenDirty:!0,mandatory:!0,breadcrumb:(0,i.breadcrumbHelper)()},default:()=>p?.length>1?d:0,validate:async t=>{const r=c.default.getErrorMsg(void 0,!0);return r||!!t&&(await m(t),void 0!==e.edmx||(0,i.t)("ERROR_ODATA_SERVICE_METADATA_INVALID"))}}];return(0,i.getPlatform)()===i.PLATFORMS.CLI&&y.push({when:async e=>(await m(e.capService),!1),name:"edmx"}),y}},71361:function(e,t,r){var a=this&&this.__createBinding||(Object.create?function(e,t,r,a){void 0===a&&(a=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,a,i)}:function(e,t,r,a){void 0===a&&(a=r),e[a]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&a(t,e,r);return i(t,e),t},n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CapHelper=void 0;const o=r(1628),c=s(r(71017)),l=r(73215),u=n(r(75503)),d=r(74448),S=r(16284),E=r(28033),p=r(76027),_=r(9949);t.CapHelper=class CapHelper{constructor(){this.capServiceSanitizeUrls={}}async checkIfCDSPreV7(e){try{const t=(0,c.join)(e,"package.json"),r=await(0,E.readJSON)(t)??{},a=await(0,_.isCapNodeJsProject)(r)&&!await(0,_.isCapJavaProject)(e),i="7.0.0";return(0,p.lt)((0,p.coerce)(r?.dependencies?.["@sap/cds"])??i,i)&&a}catch{return!1}}sanitizeUrlPath(e,t=!1){return e.startsWith("/")||(e=`/${e}`),t&&(e=e.replace(/\\/g,"/").replace(/\/\//g,"/").replace("odata/v4/","")),e.replace(/\\/g,"/").replace(/\/\//g,"/")}async getCapServiceChoices(e){if(l.ServiceInquirer.logger.debug(`getCapServiceChoices - capProjectPaths: ${JSON.stringify(e)}`),!e)return[];try{e.srv||(e=Object.assign(e,await this.getCapPaths(e.path)),l.ServiceInquirer.logger.trace(`getCapServiceChoices - capProjectPaths: ${JSON.stringify(e)}`));let t=[];try{const{model:r,services:a}=await(0,E.getCapModelAndServices)(e.path);t=a,this.capModel=r}catch(e){return"MODEL_NOT_FOUND"===e.code?u.default.logErrorMsgs((0,o.t)("ERROR_USER_CDS_MODEL_NOT_FOUND")):u.default.logErrorMsgs((0,o.t)("ERROR_CDS_COMPILE",{error:e?.message})),l.ServiceInquirer.logger.error((0,o.t)("ERROR_CDS_COMPILE",{error:e?.message})),[]}const r=e.path,a=e?.app||d.CAP_APPS_FOLDER,i=await this.checkIfCDSPreV7(e.path);return t.map((t=>{const s=this.capModel.definitions[t.name];l.ServiceInquirer.logger.trace(`getCapServiceChoices - Cap service def: ${JSON.stringify(s)}`),l.ServiceInquirer.logger.trace(`getCapServiceChoices - Cap service def $location.file: ${JSON.stringify(s.$location.file)}`);let n=this.capModel.$sources?.find((e=>e.indexOf(s.$location.file)>0));l.ServiceInquirer.logger.trace(`getCapServiceChoices - absolute service file path: ${n}`),n||(n=s.$location.file,l.ServiceInquirer.logger.trace(`getCapServiceChoices - fallback to relative service file path: ${n}`));let u=c.default.relative(e.path,n);l.ServiceInquirer.logger.trace(`getCapServiceChoices - serviceCdsPath: ${u}`),u=(0,o.removeLastMatch)(u,".cds");const d=this.sanitizeUrlPath(t.urlPath,i);this.capServiceSanitizeUrls[t.name]={urlPath:t.urlPath,sanitizedUrlPath:d};const S={serviceName:t.name,urlPath:d,serviceCdsPath:u,projectPath:r,appPath:a,capType:t.runtime};return{name:S.capType?S.serviceName+" ("+S.capType+")":S.serviceName,value:S}}))}catch(e){u.default.logErrorMsgs(e)}return[]}async getEdmx(e,t,r){if(!this.capModel)return u.default.logErrorMsgs("CAP Model not loaded");try{const a=this.capServiceSanitizeUrls?.[r]?.urlPath??e;return await(0,_.readCapServiceMetadataEdmx)(t,a,"v4")}catch(e){u.default.logErrorMsgs(e)}}async getCapWorkspaceChoices(e){const t=[],r=e.reduce(((e,t)=>(e[t.folderName]=e[t.folderName]||[],e[t.folderName].push(t),e)),{}),a=Object.values(r);for await(const e of a)if(1===e.length){const r=await this.getCapPaths(e[0].path);r&&t.push(Object.assign(e[0],r))}else for(const r of e){r.folderName=`${r.folderName} (${r.path})`;const e=await this.getCapPaths(r.path);e&&t.push(Object.assign(r,e))}return[...t.map((e=>({name:e.folderName,value:e}))),{name:(0,o.t)("LABEL_CAP_MANUALLY_SELECT_PATH"),value:{path:S.MANUAL_PATH}}]}async getCapWorkspaceFolders(e){const t=await(0,_.findCapProjects)({wsFolders:e}),r=[];for(const e of t)r.some((t=>t.path===e))||r.push({folderName:c.default.basename(e),path:e});return r.sort(((e,t)=>e.folderName.localeCompare(t.folderName)))}async getCapPaths(e){const t=await(0,_.getCapCustomPaths)(e),r=t.srv?t.srv:d.CAP_SERVICES_FOLDER;return{...t,srv:r}}}},35875:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.defaultCapChoice=void 0,t.defaultCapChoice=function(e,t){return e?{path:e.projectPath}:2===t?0:void 0}},85379:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateCapPath=void 0;const a=r(1628),i=r(9949);t.validateCapPath=async function(e){if(e){"win32"===process.platform&&"/"===e.substring(0,1)&&(e=e.substring(1));try{return!!await(0,i.getCapProjectType)(e)||(0,a.t)("NOT_VALID_CAP_PROJECT")}catch(e){return(0,a.t)("NOT_VALID_CAP_PROJECT")}}return!1}},98133:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getLocalMetadataQuestions=void 0;const a=r(1628),i=r(57147),s=r(98651);t.getLocalMetadataQuestions=function(e){const t=e.version;return[{type:"input",guiType:"file-browser",name:"localEdmxFilePath",guiOptions:{mandatory:!0,breadcrumb:(0,a.breadcrumbHelper)()},message:(0,a.t)("LABEL_METADATA_MESSAGE"),validate:r=>{if(!r)return!1;if((0,i.existsSync)(r)&&(0,i.statSync)(r).isFile()){e.edmx=(0,i.readFileSync)(r,"utf-8"),e.edmx=e.edmx.replace(/ & /g," & ");const{validationMsg:n,version:o}=(0,s.validateODataVersion)(e.edmx,t);return n?(delete e.edmx,n):(e.servicePath=(0,a.t)("EXAMPLE_URL_PATH"),e.version=o,!0)}return(0,a.t)("ERROR_METADATA_FILE_DOES_NOT_EXIST")}}]}},39154:function(e,t,r){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getMtaQuestions=void 0;const i=r(1628),s=r(19324),n=a(r(75503));t.getMtaQuestions=function(e){const t=new s.DestinationHelpers;let r=!1,a=!1,o=!1,c=!1;return[{type:"input",guiType:"file-browser",name:"mtaFilePath",message:(0,i.t)("LABEL_MTA_SELECT_FILE"),guiOptions:{mandatory:!0,breadcrumb:(0,i.breadcrumbHelper)()},validate:async e=>!!e&&(r=await t.validateMtaPath(e),a=!1,o=!1,c=!1,r)},{when:()=>!0===r,type:"list",name:"destinationInstance",message:(0,i.t)("LABEL_MTA_SELECT_DESTINATION"),guiOptions:{mandatory:!0,breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("LABEL_DESTINATION_BREADCRUMB"))},choices:async e=>t.getDestinationsFromFile(e.mtaFilePath),validate:async e=>!!e&&(a=await t.validateDestination(e),o=!1,a)},{when:()=>!0===a,type:"list",name:"destination",message:(0,i.t)("LABEL_MTA_SELECT_SYSTEM"),guiOptions:{mandatory:!0,breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("LABEL_SYSTEM"))},choices:async({destinationInstance:e})=>t.getSystems(e),validate:async(e,r)=>{if(e){let a=await t.validateSystem(r.destinationInstance,e);return"string"==typeof a&&a===(0,i.t)("ERROR_AUTHENTICATION")?(c=!0,o=!1,a=!0):(c=!1,o=a),a}return!1}},{when:()=>!0===c,type:"input",name:"mtaDestinationUser",message:(0,i.t)("LABEL_SERVICE_USERNAME"),guiOptions:{mandatory:!0},validate:e=>!!e?.trim()},{when:()=>!0===c,type:"password",guiType:"login",name:"mtaDestinationPassword",message:(0,i.t)("LABEL_SERVICE_PASSWORD"),mask:"*",default:"",guiOptions:{applyDefaultWhenDirty:!0,mandatory:!0},validate:async(e,{destinationInstance:r,destination:a,mtaDestinationUser:i})=>!!e&&(o=await t.validateSystem(r,a,{user:i,password:e}),o)},{when:()=>!0===o,type:"list",name:"serviceName",message:(0,i.t)("LABEL_MTA_SELECT_SERVICE"),guiOptions:{mandatory:!0,breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("LABEL_SERVICE"))},choices:async({destination:r,destinationInstance:a})=>t.getServices(a,r,e?.version),validate:async(r,{destination:a,destinationInstance:s})=>{if(r){const o=await t.getMetadata(s,a,r.service,r.protocol);if("string"==typeof o)return o;if(Object.keys(o).length)try{return e.edmx=o.edmx,e.annotations=o.annotations,e.version=o.version,e.host=o.host,e.servicePath=o.servicePath,e.destination=a,e.destinationInstance=s,!0}catch(e){return n.default.logErrorMsgs((0,i.t)("ERROR_SERVICE_NOT_AVAILABLE"),e.message)}}return!1}}]}},19324:function(e,t,r){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.DestinationHelpers=void 0;const i=r(71017),s=r(57147),n=r(77482),o=r(1628),c=r(60349),l=r(45546),u=r(84826),d=a(r(75503)),S=r(77090);class DestinationProvider{async getSystems(e){if(this.localDestinationInstance!==e||!this.systems){const t=new c.DestinationInstanceProviderRepository;await t.init(e),this.systems=await t.getSystems(),this.localDestinationInstance=e}return this.systems}async findSystem(e,t){return(await this.getSystems(e)).find((e=>e.name===t))}async getServices(e,t,r){const a=await this.findSystem(e,t),i={filter:new Map([["protocol",["odatav2","odatav4"]]])};(r||a.credentials)&&(i.credentials=a.credentials||new l.Authentication(r.user,r.password));const s=await a.getServices(i);return r&&this.systems&&this.systems.forEach((e=>{e.name===t&&(e.credentials=new l.Authentication(r.user,r.password))})),s}async getMetadata(e,t,r,a){const i=await this.findSystem(e,t),s=new l.ODataService(r.name,r.url,r.id,a),{data:n,annotations:d=[]}=await i.getMetadata(s,c.EncodingMode.XML,{annotations:!0,...i.credentials&&{credentials:i.credentials}});let E;try{const e=u.MetadataFactory.getMetadataFactory().getMetadataExplorer(n);E=e.v2Logger?o.ODataVersion.v2:o.ODataVersion.v4}catch(e){return(0,o.t)("ERROR_COULD_NOT_PARSE_MAIN_ENTITIES")}const p=[];d?.length&&d.forEach((e=>{p.push({TechnicalName:e.technicalName,Version:e.version,Definitions:e.data||[],Uri:`${E===o.ODataVersion.v2?S.V2_CATALOG_URL_PATH:S.V4_CATALOG_URL_PATH_PROD}/Annotations(TechnicalName='${encodeURIComponent(e.technicalName)}',Version='${e.version}')/$value/`})}));const{origin:_,pathname:m,searchParams:y}=/^((http|https):\/\/)/.test(r.url)?new URL(r.url):new URL(r.url,i.url);return{edmx:n,annotations:p.length?p:void 0,version:E,host:_,servicePath:`${m}${y.toString().length?"?"+y.toString():""}`}}}t.DestinationHelpers=class DestinationHelpers{constructor(){this.destinationProvider=new DestinationProvider}async getDestinations(e){const t=new n.Mta((0,i.dirname)(e)),r=await t.getResources();let a=[];return r&&(a=r.filter((e=>"destination"===e.parameters?.service)).map((e=>e.name))),a}async validateMtaPath(e){let t=!1;if(e)try{if("win32"===process.platform&&"/"===e.substring(0,1)&&(e=e.substring(1)),"mta.yaml"===(0,i.basename)(e)&&(0,s.existsSync)(e))try{t=!!(await this.getDestinations(e))?.length||(0,o.t)("ERROR_MTA_NO_DESTINATIONS_FOUND")}catch(e){t=(0,o.t)("ERROR_SCP_ABAP_SOURCE_DISCOVER"),d.default.logErrorMsgs(e)}else e&&(t=(0,o.t)("ERROR_MTA_FILE_DOES_NOT_EXIST"))}catch(e){t=(0,o.t)("ERROR_MTA_FILE_INVALID"),d.default.logErrorMsgs(e)}return t}async validateDestination(e){let t=!1;if(e)try{t=!!(await this.destinationProvider.getSystems(e))?.length||(0,o.t)("ERROR_MTA_NOT_FOUND",{source:"systems",target:"destination"})}catch(e){t=(0,o.t)("ERROR_SCP_ABAP_SOURCE_DISCOVER"),d.default.logErrorMsgs(e)}return t}async validateSystem(e,t,r){let a=!1;if(e&&t)try{a=!!(await this.destinationProvider.getServices(e,t,r))?.length||(0,o.t)("ERROR_MTA_NOT_FOUND",{source:"services",target:"destination"})}catch(e){a=e?.code&&e?.getOriginalCause&&401===e.getOriginalCause()?(0,o.t)("ERROR_AUTHENTICATION"):(0,o.t)("ERROR_SCP_ABAP_SOURCE_DISCOVER"),d.default.logErrorMsgs(e)}return a}async getDestinationsFromFile(e){let t=[];try{t=await this.getDestinations(e)}catch(e){t.length=0,d.default.logErrorMsgs(e)}return t}async getSystems(e){let t=[];try{t=(await this.destinationProvider.getSystems(e)).map((e=>e.name))}catch(e){t.length=0,d.default.logErrorMsgs(e)}return t}async getServices(e,t,r){const a=[];try{let i=await this.destinationProvider.getServices(e,t);r&&(i=i.filter((e=>e.protocol.includes(r)))),i.forEach((e=>{a.push({name:`${e.name?.length?e.name:e.id} - OData v${e.protocol.includes("2")?2:4}`,value:{service:e,protocol:e.protocol}})}))}catch(e){a.length=0,d.default.logErrorMsgs(e)}return a.sort((0,o.compareFunc)("name"))}async getMetadata(e,t,r,a){let i=!1;if(r)try{i=await this.destinationProvider.getMetadata(e,t,r,a)}catch(e){i=(0,o.t)("ERROR_SERVICE_NOT_AVAILABLE"),d.default.logErrorMsgs(e,e.message)}return i}}},21509:function(e,t,r){var a=this&&this.__createBinding||(Object.create?function(e,t,r,a){void 0===a&&(a=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,a,i)}:function(e,t,r,a){void 0===a&&(a=r),e[a]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||a(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(39154),t)},67288:function(e,t,r){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getServiceUrlQuestions=t.validateService=void 0;const i=r(1628),s=r(77090),n=r(84826),o=a(r(75503)),c=r(35677),l=r(73215);async function u({serviceUrl:e,serviceUrlUser:t,serviceUrlPassword:r,requiredVersion:a},c,l,u=!1){if(l.validity.authenticated||!1===l.validity.authRequired)try{!0===u&&l.setRejectUnauthorized(!u);const{system:d,servicePath:S,search:E}=(0,s.newSapSystemForServiceUrl)(e);e&&r&&d.setCredentials({username:t,password:r});const p=await d.getService(S,u);c.edmx=await p.metadata();const _=n.MetadataFactory.getMetadataFactory().getMetadataExplorer(c.edmx).v2Logger?s.ODataVersion.v2:s.ODataVersion.v4;if(a&&a!==_)return delete c.edmx,`${(0,i.t)("ERROR_ODATA_SERVICE_VERSION_MISMATCH",{serviceVersion:_,requiredVersion:a})}`;c.version=_;const m=new URLSearchParams(E);m.has(i.SAP_CLIENT_KEY)&&m.delete(i.SAP_CLIENT_KEY);const y=m.toString()?"?"+m.toString():"";c.servicePath=S+y;const g=await d.getCatalog(c.version,u);return c.annotations=await g.getAnnotations({path:S}).catch((e=>{o.default.logErrorMsgs(e)})),c.host=d.config.url,c.client=d.config.client,!0}catch(e){return delete c.edmx,o.default.logErrorMsgs(e)}finally{l.setRejectUnauthorized(!0)}return!1}t.validateService=u,t.getServiceUrlQuestions=function(e){const t=new c.ConnectionValidator,r=e.version;let a,s=!1;return[{when:function(e){return!!e},type:"input",name:"serviceUrl",guiOptions:{hint:"http://<hostname>:<port>/path/to/odata/service/",mandatory:!0,breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("LABEL_SERVICE_URL_BREADCRUMB"))},message:(0,i.t)("LABEL_ODATA_SERVICE_URL",{odataVersion:r}),validate:async(s,n)=>(a=await t.validateUrl({urlString:s,isServiceUrl:!0}),!![i.ERROR_TYPE.CERT_SELF_SIGNED,i.ERROR_TYPE.CERT_SELF_SIGNED_CERT_IN_CHAIN].includes(o.default.getCurrentErrorType())||(!0===a?!!t.validity.authRequired||u({serviceUrl:s,serviceUrlUser:n.serviceUrlUser,serviceUrlPassword:n.serviceUrlPassword,requiredVersion:r},e,t):a))},{when:function(e){if(e.serviceUrl){const e=[i.ERROR_TYPE.CERT_SELF_SIGNED,i.ERROR_TYPE.CERT_SELF_SIGNED_CERT_IN_CHAIN].includes(o.default.getCurrentErrorType(i.PLATFORMS.CLI!==(0,i.getPlatform)()));return s=s||e,e}return!1},type:"confirm",name:"ignoreCertError",message:(0,i.t)("LABEL_PROMPT_CONTINUE_WITH_UNTRUSTED_CERT"),default:!1,validate:async(a,s)=>{a&&l.ServiceInquirer.logger.warn((0,i.t)("LOG_MSG_INFO_USER_DISABLED_CERT_VALIDATION"));const n=await t.validateUrl({urlString:s.serviceUrl,isServiceUrl:!0,ignoreCertError:a,forceReValidation:!0});return!0===n?!!t.validity.authRequired||u({serviceUrl:s.serviceUrl,serviceUrlUser:s.serviceUrlUser,serviceUrlPassword:s.serviceUrlPassword,requiredVersion:r},e,t,a):n}},{when:async a=>{if(i.PLATFORMS.CLI===(0,i.getPlatform)()){if(!1===a.ignoreCertError)throw new Error("exiting");l.ServiceInquirer.logger.warn((0,i.t)("LOG_MSG_INFO_USER_DISABLED_CERT_VALIDATION"));const s=await t.validateUrl({urlString:a.serviceUrl,isServiceUrl:!0,ignoreCertError:a.ignoreCertError,forceReValidation:!0});if(!0!==s)throw new Error(s.toString());if(!t.validity.authRequired){const i=await u({serviceUrl:a.serviceUrl,serviceUrlUser:a.serviceUrlUser,serviceUrlPassword:a.serviceUrlPassword,requiredVersion:r},e,t,a.ignoreCertError);if(!0!==i)throw new Error(i.toString())}}return!1},name:"cliOnlyRevalidate"},{when:e=>!!t.validity.reachable&&t.isAuthRequired(e.serviceUrl,void 0,e.ignoreCertError),type:"input",name:"serviceUrlUser",message:(0,i.t)("LABEL_SERVICE_USERNAME"),guiOptions:{mandatory:!0},default:"",validate:e=>!!(e&&e.length>0)},{when:e=>!!t.validity.reachable&&t.isAuthRequired(e.serviceUrl,void 0,e.ignoreCertError),type:"password",guiOptions:{applyDefaultWhenDirty:!0,mandatory:!0},name:"serviceUrlPassword",message:(0,i.t)("LABEL_SERVICE_PASSWORD"),guiType:"login",mask:"*",default:"",validate:async(a,i)=>{const s=await t.validateAuth(i.serviceUrl,i.serviceUrlUser,a,void 0,i.ignoreCertError);return!0===s?u({serviceUrl:i.serviceUrl,serviceUrlUser:i.serviceUrlUser,serviceUrlPassword:a,requiredVersion:r},e,t,i.ignoreCertError):s}}]}},54672:function(e,t,r){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getSelectedServiceLabel=t.updateAndValidateServiceDetail=t.createNormalisedURL=t.defaultSystemName=t.appendSuffix=t.suggestSystemName=t.isSystemConfigEqual=t.resetSystemState=t.updateSapSystemCredentials=t.createNewSystem=t.getSystemForService=t.getRequiredServiceInformation=t.getServiceChoices=t.canSaveSapSystem=t.getSapSystemChoices=void 0;const i=r(43895),s=r(1628),n=r(77090),o=r(82884),c=r(24003),l=a(r(75503)),u=r(64989),d=r(98651),S=r(47937);t.getSapSystemChoices=function(e){const t=[],r=(0,i.isAppStudio)()?(0,s.t)("LABEL_SAP_SYSTEM_SOURCE_TYPE_SCP"):(0,s.t)("NEW_SYSTEM");return t.push({name:r,value:r}),e&&Object.values(e).forEach((e=>{(0,i.isAppStudio)()&&!(0,d.validateDestinationAttributes)(e)&&(c.ServiceInquirer.logger.info((0,s.t)("INFO_INVALID_DESTINATION",{destination:e.getDisplayName()})),e=null),e&&t.push({name:e.getDisplayName(),value:e.name})})),t},t.canSaveSapSystem=function(e){let t=!1;return!(0,i.isAppStudio)()&&e&&e?.name!==(0,s.t)("NEW_SYSTEM")&&e?.hasSavedCredentials()&&!e?.isScp()&&(t=!0),t};const E=async(e,t,r)=>{let a,i;try{const i=await e.getCatalog(t);a=await i.listServices(r===n.CATALOG_REQ_TYPE.RECOMMENDED)}catch(a){c.ServiceInquirer.logger.debug((0,s.t)("ERROR_SERVICES_UNAVAILABLE_FOR_VERSION",{catalogType:n.CATALOG_REQ_TYPE[r],system:e.toString(),version:t})),i=a}return{services:a,version:t,error:i}},p=e=>{const t=e.error;return t&&(e.errorType=s.ErrorHandler.getErrorType(t)),e},_=({error:e,errorType:t})=>t===s.ERROR_TYPE.CONNECTION||e instanceof n.ConnectionError||e instanceof n.UAATimeoutError||e instanceof n.TimeoutError?e:void 0,m=e=>{(0,s.getPlatform)()!==s.PLATFORMS.CLI&&c.ServiceInquirer.logger.warn((0,s.t)("LOG_MSG_PROBLEM_WITH_SERVICE_DEFINITION",{service:JSON.stringify(e)}))},y=async({system:e,catRequestErrors:t,rootCauseErrorType:r,logMsg:a,error:n,reqVersion:o})=>{const c=t?.map((({errorType:e})=>e)),u=((e,t,r,a)=>{let n;return(0,i.isAppStudio)()&&(t.isHTML5DynamicDestination()?e&&(e.includes(s.ERROR_TYPE.BAD_GATEWAY)?n=s.ERROR_TYPE.BAD_GATEWAY:e.includes(s.ERROR_TYPE.SERVICE_UNAVAILABLE)&&t.isOnPremSystem()?n=s.ERROR_TYPE.DESTINATION_BAD_GATEWAY_503:e.includes(s.ERROR_TYPE.NOT_FOUND)?n=a===s.ODataVersion.v2?s.ERROR_TYPE.NO_V2_SERVICES:a===s.ODataVersion.v4?s.ERROR_TYPE.NO_V4_SERVICES:s.ERROR_TYPE.DESTINATION_NOT_FOUND:r&&(n=s.ErrorHandler.getErrorType(r))):n=s.ERROR_TYPE.DESTINATION_MISCONFIGURED),n})(c,e,n,o);if((0,s.getPlatform)()===s.PLATFORMS.CLI){if(u){const t=s.TelemetryHelper.createTelemetryData({basErrorType:u,destODataType:e.destinationODataType});throw await(0,s.sendTelemetryBlocking)(S.EventName.SERVICE_INQUIRER_BAS_ERROR,t),new Error(s.ErrorHandler.getHelpForError(u))}{const e=a?s.ErrorHandler.getHelpForError(r,a).toString():l.default.getErrorMsg(n,!0,r);throw new Error(e)}}if(u){const t=s.TelemetryHelper.createTelemetryData({basErrorType:u,destODataType:e.destinationODataType});return(0,s.sendTelemetry)(S.EventName.SERVICE_INQUIRER_BAS_ERROR,t),l.default.logErrorMsgs(u)}const d=c?.indexOf(s.ERROR_TYPE.AUTH);return d>-1?l.default.logErrorMsgs(t[d].error):l.default.logErrorMsgs(n??r,a)};async function g(e,t,r=!0){if(t.servicePath||!r)try{try{const r=await e.getCatalog(t.version);t.annotations=await r.getAnnotations({path:t.servicePath})}catch{c.ServiceInquirer.logger.info((0,s.t)("INFO_NO_ANNOTATIONS_FILE"))}const r=await e.getService(t.servicePath);t.edmx=await r.metadata(),t.host=e.config.url??t.newSystemServiceInfo?.url,t.client=e.config.client,(0,i.isAppStudio)()&&(t.destination=e.name),t.scp=e.isScp(),t.destinationAuthType=e.config.destinationAuthType}catch(t){return c.ServiceInquirer.logger.error(l.default.getErrorMsg(t,!1,s.ERROR_TYPE.SERVICE_UNAVAILABLE)),y({system:e,rootCauseErrorType:s.ERROR_TYPE.SERVICE_UNAVAILABLE})}return!0}async function v(e,t,r){let a;try{a=t||new URL(e).origin+(r?(0,s.t)("SUGGEST_SYSTEM_NAME_CLIENT",{systemClient:r}):"")}catch(e){return void c.ServiceInquirer.logger.warn((0,s.t)("ERROR_SUGGEST_SAP_SYSTEM_NAME",{error:e}))}return!0===await(0,d.validateSystemName)(a)?a:h(a)}async function h(e){let t=1,r=`${e} (${t})`;for(;!0!==await(0,d.validateSystemName)(r);)r=`${e} (${t})`,t++;return r}function A(e,t=""){return t=t.replace(/^\//,""),e=!e.endsWith("/")&&t?e+"/":e,new URL(e+t)}t.getServiceChoices=async function(e,t){const r=performance.now(),a=t?[t]:[s.ODataVersion.v2,s.ODataVersion.v4],o=[n.CATALOG_REQ_TYPE.RECOMMENDED,n.CATALOG_REQ_TYPE.LEGACY],u=[],d=[];for(const t of o)for(const r of a)u.push((()=>E(e,r,t)));const g=await u[0]();d.push(p(g));let v=_(g),h=!!g.error;if(!v)for(let e=1;e<u.length;e++){const t=await u[e]();d.push(p(t)),v=v||_(t),h=h&&!!t.error}const A=((e,t)=>{const r=[],a="trace"===c.ServiceInquirer.logger.getLogLevel();for(let i=0;i<e.length;i++){const n=t[t[i]?i:i+e.length],o=e[i];n?.filter((e=>!e.ServiceId?.includes("/IWBEP/COMMON"))).forEach((e=>{try{let t=e.TechnicalServiceName??`${e.GroupId} > ${e.ServiceAlias||e.ServiceId}`;const i=o===s.ODataVersion.v2?new URL(e.ServiceUrl).pathname:e.ServiceUrl.split("?")[0];t=`${t} (${e.TechnicalServiceVersion??e.ServiceVersion}) - OData V${o}`,a&&(t=`${t} Service Type: ${e.ServiceType}`),r?.push({name:t,value:{servicePath:i,serviceODataVersion:o,toString:()=>t,serviceType:e.ServiceType}})}catch(t){l.default.logErrorMsgs(t),m(e)}}))}return r})(a,d.map((e=>e.services)));if(v||0===A.length&&h){A.push({name:(0,s.t)("SERVICES_UNAVAILABLE"),value:s.ERROR_TYPE.SERVICES_UNAVAILABLE});const r=(0,s.t)("ERROR_ALL_SERVICES_UNAVAILABLE",{system:e.toString(),version:a.join(", V")});await y({system:e,catRequestErrors:d.map((({errorType:e,error:t})=>({errorType:e,error:t}))),rootCauseErrorType:s.ERROR_TYPE.SERVICES_UNAVAILABLE,logMsg:v?void 0:r,error:v,reqVersion:t})}else if((0,i.isAppStudio)()){const t=s.TelemetryHelper.createTelemetryData({destODataType:e.destinationODataType});(0,s.sendTelemetry)(S.EventName.SERVICE_INQUIRER_BAS_SUCCESS,t)}const f=performance.now();return c.ServiceInquirer.logger.info((0,s.t)("SERVICES_TIME_ELAPSED",{servicesRetrievalTime:Math.round((f-r)/1e3)})),A.sort((0,s.compareFunc)("name"))},t.getRequiredServiceInformation=g,t.getSystemForService=async function(e,t){let r=await(0,o.createDestinationInstance)(e,"ABAP");return!0===await(0,n.isSystemNameInUse)(r)&&(r=await h(r)),(0,i.isAppStudio)()?(0,n.newSapSystemForDestinaton)({destination:r}):(0,n.newSapSystemForSteampunk)(r,t,!0)},t.createNewSystem=function(e){const t=e.newSystemName||"Temp System";try{if("SCP"===e.newSystemType&&e.newSystemServiceInfo)return(0,n.newSapSystemForSteampunk)(t,e.newSystemServiceInfo,!0);if("S4HC"===e.newSystemType)return(0,n.newS4HCSystem)({name:t,url:e.newSystemUrl,unSaved:!0});{let r;return e.newSystemUser&&e.newSystemPassword&&(r={username:e.newSystemUser,password:e.newSystemPassword}),(0,n.newSapSystem)(t,e.newSystemUrl,e.newSystemClient??"",r,!0)}}catch(e){l.default.logErrorMsgs(e)}},t.updateSapSystemCredentials=async function(e,t){try{let r;return e.systemUser&&e.systemPassword?(r={username:e.systemUser,password:e.systemPassword},t.setCredentials(r),await(0,n.saveSapSystem)(t),t):t}catch(e){l.default.logErrorMsgs(e)}},t.resetSystemState=function(e){return e.newSystem=void 0,e.newSystemServiceInfo=void 0,e.newSystemServiceInstance=void 0,e.newSystemName="",e.servicePath=void 0,u.tempAnswers.suggestedSystemName=null,u.tempAnswers.lastSystemNameSuggested=null,u.tempAnswers.isSuggestion=!0,!0},t.isSystemConfigEqual=function(e,t){return e.client===t.client&&e.destination===t.destination&&e.originalUrl===t.originalUrl&&e.scp===t.scp&&e.service===t.service&&e.url===t.url},t.suggestSystemName=v,t.appendSuffix=h,t.defaultSystemName=async function(e,t,r,a){return u.tempAnswers.suggestedSystemName=await v(e,t,r),!u.tempAnswers.lastSystemNameSuggested||u.tempAnswers.isSuggestion&&a===u.tempAnswers.lastSystemNameSuggested?(u.tempAnswers.lastSystemNameSuggested=u.tempAnswers.suggestedSystemName,u.tempAnswers.suggestedSystemName):(u.tempAnswers.isSuggestion=!1,a)},t.createNormalisedURL=A,t.updateAndValidateServiceDetail=async function(e,t,r){const a=await g(e,t,!1);if(!0!==a)return a;{const r=A(e.config.url,t.servicePath??"");t.host=r.origin,t.servicePath=r.pathname}const{validationMsg:i,version:s}=(0,d.validateODataVersion)(t.edmx,r);return i||(t.version=s,!0)},t.getSelectedServiceLabel=function(e){let t=(0,s.t)("LABEL_SERVICE");return e.newSystem?.isScp()&&e.newSystem?.userDisplayName&&(t=t.concat(` ${(0,s.t)("LABEL_SERVICE_FOR_USER",{username:e.newSystem?.userDisplayName})}`)),t}},29142:function(e,t,r){var a=this&&this.__createBinding||(Object.create?function(e,t,r,a){void 0===a&&(a=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,a,i)}:function(e,t,r,a){void 0===a&&(a=r),e[a]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||a(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.createNewSystem=void 0,i(r(19024),t),i(r(62815),t);var s=r(54672);Object.defineProperty(t,"createNewSystem",{enumerable:!0,get:function(){return s.createNewSystem}})},19024:function(e,t,r){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getSystemConfigQuestions=t.getServicesForSystemQuestions=t.getDiscoverSystemQuestions=t.getNewSystemQuestions=t.getScpQuestions=t.getS4HCQuestions=t.getOnPremQuestions=void 0;const i=r(1628),s=r(77090),n=r(43895),o=r(75836),c=r(54672),l=r(2929),u=a(r(75503)),d=r(98651),S=r(64989),E=r(62815),p=r(33774),_=r(73215),m=r(25184);function y(e){const t=new l.ConnectionValidator;return[{type:"input",name:"newSystemUrl",message:(0,i.t)("MSG_SYSTEM_URL"),guiOptions:{mandatory:!0,breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("MSG_SYSTEM_URL"))},validate:e=>t.validateUrl({urlString:e,ignorePath:!0})},{type:"input",name:"newSystemClient",message:(0,i.t)("MSG_CLIENT_CODE"),guiOptions:{breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("LABEL_SAP_CLIENT_BREADCRUMB"))},validate:d.validateSapClient},{when:()=>t.isAuthRequired(),type:"input",name:"newSystemUser",message:(0,i.t)("LABEL_SERVICE_USERNAME"),guiOptions:{mandatory:!0},default:"",validate:()=>!0},{when:()=>t.isAuthRequired(),type:"password",guiOptions:{applyDefaultWhenDirty:!0,mandatory:!0},name:"newSystemPassword",message:(0,i.t)("LABEL_SERVICE_PASSWORD"),guiType:"login",mask:"*",default:"",validate:(e,r)=>t.validateAuth(void 0,r.newSystemUser,e,r.newSystemClient)},{when:async r=>(!r.newSystemUrl||!t.validity.authenticated&&t.isAuthRequired()||(e.newSystem=await(0,c.createNewSystem)(r)),!1),name:"createOnPremSystem"}]}function g(e){return[{type:"input",name:"newS4HCSystemUrl",message:(0,i.t)("MSG_SYSTEM_URL"),guiOptions:{mandatory:!0,breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("MSG_SYSTEM_URL"))},validate:p.validateUrl},{when:t=>(t.newS4HCSystemUrl&&(e.newSystem=(0,c.createNewSystem)({...t,newSystemUrl:t.newS4HCSystemUrl,newSystemType:"S4HC"})),!1),name:"createS4HCSystem"}]}function v(e){const t=[];let r;return(0,n.isAppStudio)()?r="DISCOVER":(t.push({type:"list",name:"serviceKeySource",choices:[{name:(0,i.t)("SCP_ABAP_SOURCE_SELECT_DISCOVER"),value:"DISCOVER"},{name:(0,i.t)("SCP_ABAP_SOURCE_SELECT_FILE"),value:"FILE"}],message:(0,i.t)("SCP_ABAP_SOURCE_MESSAGE"),validate:()=>(0,c.resetSystemState)(e)}),t.push({when:e=>"FILE"===e.serviceKeySource,type:"input",name:"newSystemServiceKeyPath",message:(0,i.t)("LABEL_SERVICE_KEY_MESSAGE"),guiType:"file-browser",guiOptions:{hint:(0,i.t)("SERVICE_CONNECTION_LOCAL_FILE"),applyDefaultWhenDirty:!0,mandatory:!0},validate:t=>{const r=(0,d.validateServiceKey)(t);return"string"==typeof r||"boolean"==typeof r?r:(e.newSystemServiceInfo=r,!0)}})),t.push({when:e=>"DISCOVER"===(e.serviceKeySource??r),type:"list",name:"newSystemServiceInstance",guiOptions:{breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("SCP_ABAP_SELECT_MESSAGE"))},choices:async()=>{const e=await(0,i.getABAPInstanceChoices)();if(e.outputError&&(u.default.logErrorMsgs(e.outputError.error,e.outputError.userMsg),(0,i.getPlatform)()===i.PLATFORMS.CLI))throw new Error((0,i.t)("INFO_ABAP_ENVIRONMENTS_UNAVAILABLE"));return e.choices},message:(0,i.t)("SCP_ABAP_SELECT_MESSAGE"),default:()=>i.ERROR_TYPE.NO_ABAP_ENVS,validate:t=>{if(t===i.ERROR_TYPE.NO_ABAP_ENVS){const e=u.default.getErrorMsg("",!0),t=(0,i.t)("ERROR_SCP_ABAP_SOURCE_DISCOVER_CHECK_LOG");return e?`${e} ${t}`:t}return(0,c.resetSystemState)(e),e.newSystemServiceInstance=t,!0}}),t.push({when:async t=>{if((0,i.getPlatform)()===i.PLATFORMS.CLI&&(e.newSystemServiceInstance=t.newSystemServiceInstance),e.newSystemServiceInfo){const r={newSystemName:e.newSystemName,newSystemType:t.newSystemType,newSystemServiceInfo:e.newSystemServiceInfo,newSystemUser:t.newSystemUser,newSystemPassword:t.newSystemPassword,newSystemUrl:t.newSystemUrl,newSystemClient:t.newSystemClient};e.newSystem=(0,c.createNewSystem)(r)}else if(e.newSystemServiceInstance&&e.newSystemServiceInstance!==i.ERROR_TYPE.NO_ABAP_ENVS)try{e.newSystemServiceInfo=(await(0,o.apiGetInstanceCredentials)(e.newSystemServiceInstance)).credentials,e.newSystem=await(0,c.getSystemForService)(e.newSystemServiceInstance,e.newSystemServiceInfo),e.newSystemName=e.newSystem.name}catch(t){u.default.logErrorMsgs("",(0,i.t)("SERVICES_UNAVAILABLE_BY_ABAP_ENV_UNAVAILABLE"),!1),u.default.logErrorMsgs(t,(0,i.t)("INFO_ABAP_ENVIRONMENTS_UNAVAILABLE")),e.newSystem={name:l.SERVICES_UNAVAILABLE_DUMMY_SYSTEM_NAME}}return!1},name:"createSCPSystem"}),t}function h(e){const t=[],r=i.FeatureManager.getInstance().isFeatureEnabled(i.Features.S4HCSystem);t.push({name:(0,i.t)("LABEL_SAP_SYSTEM_SOURCE_TYPE_SCP"),value:"SCP"}),r&&t.push({name:(0,i.t)("LABEL_SAP_SYSTEM_SOURCE_TYPE_S4HC"),value:"S4HC"}),t.push({name:(0,i.t)("LABEL_SAP_SYSTEM_SOURCE_TYPE_ON_PREM"),value:"ON_PREM"});const a=[{type:"list",name:"newSystemType",choices:t,message:(0,i.t)("MSG_SYSTEM_TYPE_CHOICE"),validate:()=>(0,c.resetSystemState)(e)}];return a.push(...(0,i.withCondition)(y(e),(e=>"ON_PREM"===e.newSystemType))),a.push(...(0,i.withCondition)(v(e),(e=>"SCP"===e.newSystemType))),r&&a.push(...(0,i.withCondition)(g(e),(e=>"S4HC"===e.newSystemType))),a.push({when:()=>!!e?.newSystem&&e?.newSystem?.name!==l.SERVICES_UNAVAILABLE_DUMMY_SYSTEM_NAME,type:"input",guiOptions:{hint:(0,i.t)("HINT_ENTER_SYSTEM_NAME_TO_SAVE"),applyDefaultWhenDirty:!0,breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("SYSTEM_NAME"))},name:"newSystemName",message:(0,i.t)("SYSTEM_NAME"),default:t=>e.newSystemName||(0,c.defaultSystemName)("SCP"===t.newSystemType?e.newSystemServiceInfo.url:t.newSystemUrl,e.newSystemServiceInfo?.systemid,t.newSystemClient,t.newSystemName),validate:e=>e===S.tempAnswers.suggestedSystemName||(0,d.validateSystemName)(e)}),a}function A(e){const t=[{when:()=>!1,name:"newSystemType",default:"SCP"}];return t.push(...v(e)),t}function f(e,t={},r){let a,o,d=[];const S=e.version,E=[];return(0,n.isAppStudio)()&&(a=new l.ConnectionValidator,E.push({when:async r=>{if(e.newSystem||t[r.system].isScp())return!1;const i=Object.assign({},t[r.system].config);return(0,s.replaceUrlForAppStudio)(i,r.system),await a.validateUrl({urlString:i.url+i.service,ignorePath:!1,authType:i.destinationAuthType}),a.isAuthRequired()},type:"input",name:"destinationUser",message:(0,i.t)("LABEL_SERVICE_USERNAME"),guiOptions:{mandatory:!0},default:""}),E.push({when:r=>!e.newSystem&&!t[r.system].isScp()&&a.isAuthRequired(),type:"password",guiOptions:{applyDefaultWhenDirty:!0},name:"destinationPassword",message:(0,i.t)("LABEL_SERVICE_PASSWORD"),guiType:"login",mask:"*",default:"",validate:async(e,r)=>{const i=await a.validateAuth(void 0,r.destinationUser,e);return i&&t[r.system].setCredentials({username:r.destinationUser,password:e}),i}})),E.push({when:async s=>(r&&e.newSystem&&(0,c.isSystemConfigEqual)(r.config,e.newSystem?.config)&&(e.newSystem=r),e?.newSystem?.name===l.SERVICES_UNAVAILABLE_DUMMY_SYSTEM_NAME||(u.default.hasError()?(d.push({name:(0,i.t)("SERVICES_UNAVAILABLE"),value:i.ERROR_TYPE.SERVICES_UNAVAILABLE}),!0):!((0,n.isAppStudio)()&&!e.newSystem&&!t[s.system]?.isScp()&&a.validity.authRequired&&!a.validity.authenticated)&&(o&&(0,c.isSystemConfigEqual)(o,t[s.system]?.config||e.newSystem?.config)||(d=await(0,c.getServiceChoices)(t[s.system]||e.newSystem,S),o=t[s.system]?.config||e.newSystem?.config),!!o))),type:(0,i.getPlatform)()===i.PLATFORMS.CLI?"autocomplete":"list",name:"selectedService",guiOptions:{applyDefaultWhenDirty:!0,breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("LABEL_SERVICE"))},choices:()=>d,source:(e,t)=>(0,i.searchChoices)(t,d),message:()=>(0,c.getSelectedServiceLabel)(e),additionalMessages:e=>{if(e?.serviceType&&e.serviceType!==l.SERVICE_TYPE.UI)return{message:(0,i.t)("WARN_MSG_NON_UI_SERVICE_SELECTED"),severity:m.Severity.warning}},default:()=>d.length>1?void 0:0,validate:async(r,a)=>e?.newSystem?.name===l.SERVICES_UNAVAILABLE_DUMMY_SYSTEM_NAME?(0,i.t)("SERVICES_UNAVAILABLE_BY_ABAP_ENV_UNAVAILABLE"):u.default.hasError()?u.default.getValidationErrorHelp():r?(e.version=r.serviceODataVersion,e.servicePath=r.servicePath,(0,c.getRequiredServiceInformation)(e.newSystem??t[a.system],e)):void 0}),E.push({when:async r=>{if(!u.default.hasError(!0)&&(0,i.getPlatform)()===i.PLATFORMS.CLI&&r.selectedService)return e.version=r.selectedService.serviceODataVersion,e.servicePath=r.selectedService.servicePath,!await(0,c.getRequiredServiceInformation)(e.newSystem??t[r.system],e)},name:"getServiceDetail"}),E}t.getOnPremQuestions=y,t.getS4HCQuestions=g,t.getScpQuestions=v,t.getNewSystemQuestions=h,t.getDiscoverSystemQuestions=A,t.getServicesForSystemQuestions=f,t.getSystemConfigQuestions=async function(e,t){let r={};const a=new l.ConnectionValidator;let o;try{r=await(0,s.listSAPSystems)(),e.newSystem&&(r[e.newSystem.name]=e.newSystem)}catch(e){_.ServiceInquirer.logger.error(`${(0,i.t)("ERROR_SAP_SYSTEM")}: ${e}`)}const u=[{type:(0,i.getPlatform)()===i.PLATFORMS.CLI?"autocomplete":"list",guiOptions:{hint:(0,i.t)("LABEL_SYSTEM_CONFIG"),applyDefaultWhenDirty:!0,breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("LABEL_SYSTEM"))},name:"system",choices:(0,c.getSapSystemChoices)(r),source:(e,t)=>(0,i.searchChoices)(t,(0,c.getSapSystemChoices)(r)),message:(0,i.t)("LABEL_SYSTEM"),default:e.newSystem?e.newSystem.name:"",validate:()=>(0,c.resetSystemState)(e)},{when:async t=>{if(e.sapSystem=r[t.system],(0,c.canSaveSapSystem)(r[t.system])){const e=r[t.system];return await a.validateUrl({urlString:e?.url}),a.validity.reachable?(o=await a.validateAuth(e?.url,e?.username,e?.password,e?.client),!0!==o):!1}return!1},type:"input",name:"systemUser",message:(0,i.t)("LABEL_SERVICE_USERNAME"),guiOptions:{mandatory:!0,applyDefaultWhenDirty:!0},default:e=>r[e.system]?.username,validate:()=>!0},{when:e=>(0,c.canSaveSapSystem)(r[e.system])&&a.validity.reachable&&!a.validity.authenticated,type:"password",guiOptions:{applyDefaultWhenDirty:!0},name:"systemPassword",message:(0,i.t)("LABEL_SERVICE_PASSWORD"),guiType:"login",mask:"*",default:"",validate:(e,t)=>a.validateAuth(r[t.system]?.url,t.systemUser,e,r[t.system]?.client)},{when:async e=>(!0!==o&&a.validity.authenticated&&(r[e.system]=await(0,c.updateSapSystemCredentials)(e,r[e.system])),!1),name:"updateSapSystemCredentials"}];return(0,n.isAppStudio)()?u.push(...(0,i.withCondition)(A(e),(e=>e.system&&e.system===(0,i.t)("LABEL_SAP_SYSTEM_SOURCE_TYPE_SCP")))):u.push(...(0,i.withCondition)(h(e),(e=>e.system&&e.system===(0,i.t)("NEW_SYSTEM")))),(0,n.isAppStudio)()&&u.push(...(0,i.withCondition)((0,E.getGenericODataDestQuestions)(e,r),(e=>e.system&&e.system!==(0,i.t)("LABEL_SAP_SYSTEM_SOURCE_TYPE_SCP")&&r[e.system].isGenericODataDest()))),u.push(...(0,i.withCondition)(f(e,r,t),(t=>!!e?.newSystem||t.system&&!((0,c.canSaveSapSystem)(r[t.system])&&a.validity.reachable&&!a.validity.authenticated)&&t.system!==((0,n.isAppStudio)()?(0,i.t)("LABEL_SAP_SYSTEM_SOURCE_TYPE_SCP"):(0,i.t)("NEW_SYSTEM"))&&(!(0,n.isAppStudio)()||r[t.system].isAbapCatalogDest())))),u}},62815:function(e,t,r){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getGenericODataDestQuestions=void 0;const i=r(1628),s=r(77090),n=r(2929),o=a(r(75503)),c=r(54672);function l(e,t){const r=Object.assign({},e,{service:t??""});return(0,s.replaceUrlForAppStudio)(r),(0,c.createNormalisedURL)(r.url,r.service).toString()}t.getGenericODataDestQuestions=function(e,t){const r=new n.ConnectionValidator(!0);let a;const s=e.version;let u;return[{when:r=>(u=t[r?.system],e.sapSystem=u,!!u?.isPartialUrlDest()),type:"input",name:"servicePathInput",message:(0,i.t)("LABEL_SERVICE_PATH"),guiOptions:{mandatory:!0,breadcrumb:(0,i.breadcrumbHelper)()},validate:async t=>{if(!t)return(0,i.t)("WARNING_ENTER_VALID_SERVICE_PATH");let a=await r.validateUrl({urlString:l(u.config,t)});if(!0!==a){if(!1===r.getValidity()?.reachable)return(0,i.t)("ERROR_ODATA_SERVICE_PATH_NOT_FOUND");if(!u.isHTML5DynamicDestination())return i.ErrorHandler.getHelpForError(i.ERROR_TYPE.DESTINATION_MISCONFIGURED)}return!0!==a||r.validity.authRequired||(e.servicePath=t,a=await(0,c.updateAndValidateServiceDetail)(u,e,s)),a}},{when:async e=>u?.isPartialUrlDest()?!!e.servicePathInput&&r.validity.authRequired:(await r.validateUrl({urlString:l(u?.config)}),!!r.validity.authRequired),type:"input",name:"destinationSrvUser",message:(0,i.t)("LABEL_SERVICE_USERNAME"),guiOptions:{mandatory:!0},default:""},{when:()=>!!r.validity.authRequired,type:"password",name:"destinationSrvPassword",message:(0,i.t)("LABEL_SERVICE_PASSWORD"),guiType:"login",mask:"*",default:"",validate:async(t,a)=>{const i=await r.validateAuth(void 0,a.destinationSrvUser,t);return!0===i&&(u.setCredentials({username:a.destinationSrvUser,password:t}),a.servicePathInput)?(e.servicePath=a.servicePathInput,(0,c.updateAndValidateServiceDetail)(u,e,s)):i}},{when:async()=>!(!u?.isFullUrlDest()||!(!r.validity.authRequired||r.validity.authRequired&&r.validity.authenticated))&&(a=!0===await(0,c.updateAndValidateServiceDetail)(u,e,s)?{name:e.host+e.servicePath,value:e.host+e.servicePath}:{name:(0,i.t)("ERROR_MSG_SERVICE_UNAVAILABLE"),value:i.ERROR_TYPE.SERVICES_UNAVAILABLE},!0),type:"list",name:"selectedDestinationService",choices:()=>[a],message:(0,i.t)("LABEL_SERVICE"),guiOptions:{applyDefaultWhenDirty:!0,breadcrumb:(0,i.breadcrumbHelper)()},default:()=>0,validate:e=>e!==i.ERROR_TYPE.SERVICES_UNAVAILABLE||o.default.getErrorMsg(null,!0,i.ERROR_TYPE.SERVICES_UNAVAILABLE)}]}},64989:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.tempAnswers=void 0,t.tempAnswers={suggestedSystemName:null,lastSystemNameSuggested:null,isSuggestion:!0}},98651:function(e,t,r){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.validateDestinationAttributes=t.validateODataVersion=t.validateSystemName=t.validateServiceKey=t.validateSapClient=void 0;const i=r(1628),s=r(77090),n=r(84826),o=r(57147),c=a(r(75503));t.validateSapClient=function(e){return!(e&&!new RegExp("^[0-9][0-9][0-9]$").test(e))||(0,i.t)("WARNING_CLIENT_CODE_FORMAT")},t.validateServiceKey=function(e){if(!e)return!1;try{const t=(0,o.readFileSync)(e,"utf8"),r=JSON.parse(t);return r.url&&r.uaa&&r.catalogs?r:(0,i.t)("ERROR_SERVICE_KEYS_INFO")}catch(e){return(0,i.t)("ERROR_SERVICE_KEYS_INFO")}},t.validateSystemName=async function(e){if(e){if(e===(0,i.t)("NEW_SYSTEM")||e===(0,i.t)("LABEL_SAP_SYSTEM_SOURCE_TYPE_SCP"))return(0,i.t)("VALIDATION_ERROR_RESERVED_SYSTEM_NAME",{systemName:e})+". "+(0,i.t)("SYSTEM_NAME_INVALID");return!await(0,s.isSystemNameInUse)(e)||(0,i.t)("SYSTEM_NAME_EXISTS")}return(0,i.t)("SYSTEM_NAME_INVALID")},t.validateODataVersion=function(e,t){try{const r=n.MetadataFactory.getMetadataFactory().getMetadataExplorer(e).v2Logger?i.ODataVersion.v2:i.ODataVersion.v4;return t&&t!==r?{validationMsg:`${c.default.logErrorMsgs((0,i.t)("ERROR_ODATA_SERVICE_VERSION_MISMATCH",{serviceVersion:r,requiredVersion:t}))}`}:{version:r}}catch(e){return{validationMsg:(0,i.t)("ERROR_ODATA_SERVICE_METADATA_INVALID")}}},t.validateDestinationAttributes=function(e){return e.isAbapCatalogDest()||e.isFullUrlDest()||e.isPartialUrlDest()}},73215:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ServiceInquirer=void 0;const a=r(1628),i=r(43895),s=r(93540),n=r(35907),o=r(77090),c=r(47937);class ServiceInquirer{constructor(e,t,r){ServiceInquirer._logger=e??a.DefaultLogger,a.ErrorHandler.logger=ServiceInquirer._logger,this.workspaceFolders=t,this.generatorInfo=r}static get logger(){return this._logger}async getAllQuestion(e,t,r,i){const o=[];return o.push((0,s.getSourcesQuestions)(e,t,r)),o.push(...(0,a.withCondition)((0,s.getLocalMetadataQuestions)(e),(e=>"File"===e.source))),o.push(...(0,a.withCondition)(await(0,s.getCapQuestions)(e,r,this.workspaceFolders),(e=>"Local Cap"===e.source))),o.push(...(0,a.withCondition)(await(0,s.getSystemConfigQuestions)(e,i),(e=>"SAP System"===e.source))),o.push(...(0,a.withCondition)((0,s.getServiceUrlQuestions)(e),(e=>"OData Url"===e.source))),o.push(...(0,a.withCondition)((0,n.getApiHubQuestions)(e),(e=>"SAP Business Accelerator Hub"===e.source))),o.push(...(0,a.withCondition)((0,s.getMtaQuestions)(e),(e=>"MTA File"===e.source))),o}async inquire(e,t){await(0,c.initTelemetrySettings)({modulePackageJson:{name:a.APP_GENERATOR_MODULE,version:this.generatorInfo.rootGeneratorVersion}});const r={version:t.requiredOdataVersion},s=await this.getAllQuestion(r,!!t.allowNoDatasource,t.capService,t.cachedSapSystem);return Object.assign(r,await e(s)),r.newSystemName&&r.newSystem&&!(0,i.isAppStudio)()&&(r.newSystem.name=r.newSystemName),this.answersToService(r)}answersToService(e){return{host:(e=this.cleanServiceProperties(e)).host,client:e.client,scp:e.scp,destination:e.destination,servicePath:e.servicePath,edmx:e.edmx,annotations:e.annotations,version:e.version,capService:e.capService,source:e.source,localEdmxFilePath:e.localEdmxFilePath,sapSystem:e.sapSystem??this.getNewSystemOrDestination(e),apiHubConfig:e.apiHubConfig,destinationInstance:e.destinationInstance,destinationAuthType:e.destinationAuthType,ignoreCertError:e.ignoreCertError}}getNewSystemOrDestination(e){return e.newSystem?e.newSystem:e.destination?(0,o.newSapSystemForDestinaton)({destination:e.destination,destinationInstance:e.destinationInstance,destinationAuthType:e.destinationAuthType,credentials:{username:e.destinationUser,password:e.destinationPassword}}):void 0}cleanServiceProperties(e){return["File","Local Cap"].includes(e.source)&&delete e.host,"SAP Business Accelerator Hub"!==e.source&&delete e.apiHubConfig,e}}t.ServiceInquirer=ServiceInquirer,ServiceInquirer._logger=a.DefaultLogger},35677:function(e,t,r){var a=this&&this.__createBinding||(Object.create?function(e,t,r,a){void 0===a&&(a=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,a,i)}:function(e,t,r,a){void 0===a&&(a=r),e[a]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&a(t,e,r);return i(t,e),t},n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectionValidator=void 0;const o=r(43895),c=r(1628),l=r(77090),u=n(r(28887)),d=r(16284),S=s(r(79325)),E=r(73215),p=n(r(75503)),_=n(r(95687));u.default.defaults.adapter="http";class ConnectionValidator{constructor(e=!1){this.validity={},this._isFullURLService=e,void 0===ConnectionValidator._requestLoggerId&&(ConnectionValidator._requestLoggerId=u.default.interceptors.request.use((e=>S.requestLogger(e)),S.errorLogger)),void 0===ConnectionValidator._responseLoggerId&&(ConnectionValidator._responseLoggerId=u.default.interceptors.response.use(S.responseLogger,S.errorLogger),S.setGlobalConfig({logger:e=>E.ServiceInquirer.logger.debug(e),headers:!0}))}isSAPSystem({pathname:e}){return e?.length<2||e.startsWith("/destinations")}async checkSapService(e,t,r,a=!1){const i=(0,o.isAppStudio)();try{const s=!this._isFullURLService&&this.isSAPSystem(e);s&&e.searchParams.append("$top","1");const n=Object.fromEntries(e.searchParams),o=(e.pathname+(s?d.PING_PATH:"")).replace("//","/");return!0===a&&this.setRejectUnauthorized(!a),await new l.ODataClient({system:{url:e.origin,params:n,service:o},credentials:{username:t,password:r},disableSAML:i,ignoreCertError:a}).get(),200}catch(e){if(E.ServiceInquirer.logger.debug(`ConnectionValidator.checkSapService() - error: ${e.message}`),e?.isAxiosError){if(500===e?.response?.status&&i)throw e;return e?.response?.status||e?.code}throw e}finally{this.setRejectUnauthorized(!0)}}async validateUrl({urlString:e,ignorePath:t=!1,authType:r,isServiceUrl:a=!1,ignoreCertError:i=!1,forceReValidation:s=!1}){if(this.isEmptyString(e))return this.resetValidity(),!1;try{const n=this.createUrl(e,t);if(!s&&this.isUrlValidated(e))return this.validity.reachable;if("null"===n.origin)return(0,c.t)("WARNING_INVALID_URL");const o=await this.checkSapService(n,void 0,void 0,i);if(E.ServiceInquirer.logger.debug(`ConnectionValidator.validateUrl() - status: ${o}; authType: ${r};`),this.validity.urlFormat=!0,this._validatedUrl=e,200===o)this.validity.authenticated=!0,this.validity.authRequired=!1;else{if(404===o)return this.validity.reachable=!1,a?c.ErrorHandler.getErrorMsgFromType(c.ERROR_TYPE.ODATA_URL_NOT_FOUND):c.ErrorHandler.getErrorMsgFromType(c.ERROR_TYPE.NOT_FOUND);if(c.ErrorHandler.isCertError(o))return this.validity.reachable=!1,p.default.setCurrentError(c.ErrorHandler.getErrorType(o)),p.default.getValidationErrorHelp(o,!1,c.ERROR_TYPE.CERT);if(c.ErrorHandler.isAuthCode(o)){if(!this.isAuthRequiredBasedOnAuthType(r))return p.default.logErrorMsgs((0,c.t)("ERROR_AUTHENTICATION_CONFIGURATION"))}else{if(c.ErrorHandler.isRedirect(o))return(0,c.t)("WARNING_URL_REDIRECTS");if(404!==o)return c.ErrorHandler.getErrorMsgFromType(c.ERROR_TYPE.CONNECTION,`http code: ${o}`)}}return this.validity.reachable=404!==o,this.validity.reachable}catch(t){if(c.ErrorHandler.getErrorType(t)===c.ERROR_TYPE.CONNECTION)return p.default.logErrorMsgs((0,c.t)("ERROR_SERVICE_URL_NOT_FOUND",{url:e}));this.resetValidity();const r=p.default.getErrorMsg(t);return void 0===r?(0,c.t)("WARNING_INVALID_URL"):r}}isEmptyString(e){return!e||!/\S/.test(e)}createUrl(e,t){return t&&(e=new URL(e).origin),new URL(e)}isUrlValidated(e){return this._validatedUrl===e||(this.resetValidity(),!1)}isAuthRequiredBasedOnAuthType(e){return e&&"NoAuthentication"!==e?(this.validity.authRequired=!1,!1):(this.validity.authRequired=!0,!0)}async isAuthRequired(e=this._validatedUrl,t=this._validatedClient,r=!1){if(!e)return!1;if(!1===this.validity.reachable||!1===this.validity.authRequired)return!1;if(this._validatedUrl===e&&this._validatedClient===t&&void 0!==this.validity.authRequired)return this.validity.authRequired;try{const a=new URL(e);return t&&a.searchParams.append(c.SAP_CLIENT_KEY,t),this.validity.authRequired=c.ErrorHandler.isAuthCode(await this.checkSapService(a,void 0,void 0,r)),this.validity.authRequired}catch(e){return p.default.logErrorMsgs(e),!1}}async validateAuth(e=this._validatedUrl,t,r,a,i=!1){if(!this.validity.reachable||!t||!r)return!1;try{const s=new URL(e);return a&&s.searchParams.append(c.SAP_CLIENT_KEY,a),this.validity.authenticated=200===await this.checkSapService(s,t,r,i),!0===this.validity.authenticated||(0,c.t)("ERROR_AUTHENTICATION")}catch(e){return p.default.getErrorMsg(e)}}getValidity(){return this.validity}resetValidity(){this.validity.urlFormat=!1,delete this.validity.reachable,delete this.validity.authRequired,delete this.validity.authenticated,this._validatedUrl=void 0,this._validatedClient=void 0}setRejectUnauthorized(e){_.default.globalAgent.options&&(_.default.globalAgent.options.rejectUnauthorized=e),_.default.globalAgent.fallbackAgent&&(_.default.globalAgent.fallbackAgent.options.rejectUnauthorized=e)}}t.ConnectionValidator=ConnectionValidator},16284:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SERVICE_TYPE=t.MANUAL_PATH=t.SERVICES_UNAVAILABLE_DUMMY_SYSTEM_NAME=t.PING_PATH=t.CERT_HELP_LINK=void 0;const a=r(77090);t.CERT_HELP_LINK="https://help.sap.com/viewer/17d50220bcd848aa854c9c182d65b699/Latest/en-US/4b318bede7eb4021a8be385c46c74045.html",t.PING_PATH=a.V2_CATALOG_URL_PATH+a.V2_SERVICES_PATH,t.SERVICES_UNAVAILABLE_DUMMY_SYSTEM_NAME="SYSTEM_SERVICES_UNAVAILABLE",t.MANUAL_PATH="MANUAL_PATH",t.SERVICE_TYPE={UI:"UI",NOT_CLASSIFIED:"Not Classified",WEB_API:"WEB_API"}},75503:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});const a=new(r(1628).ErrorHandler);t.default=a},2929:function(e,t,r){var a=this&&this.__createBinding||(Object.create?function(e,t,r,a){void 0===a&&(a=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,a,i)}:function(e,t,r,a){void 0===a&&(a=r),e[a]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||a(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectionValidator=void 0;var s=r(35677);Object.defineProperty(t,"ConnectionValidator",{enumerable:!0,get:function(){return s.ConnectionValidator}}),i(r(16284),t)},33774:function(e,t,r){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.validateUrl=void 0;const i=r(1628),s=a(r(75503));t.validateUrl=function(e){if(!e)return!1;try{return"null"!==new URL(e).origin||(0,i.t)("WARNING_INVALID_URL")}catch(e){return s.default.getErrorMsg(e)}}}}; | ||
"use strict";exports.id=689,exports.ids=[689],exports.modules={24003:function(e,t,r){var a=this&&this.__createBinding||(Object.create?function(e,t,r,a){void 0===a&&(a=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,a,i)}:function(e,t,r,a){void 0===a&&(a=r),e[a]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||a(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(73215),t)},93540:function(e,t,r){var a=this&&this.__createBinding||(Object.create?function(e,t,r,a){void 0===a&&(a=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,a,i)}:function(e,t,r,a){void 0===a&&(a=r),e[a]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||a(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(23580),t),i(r(20023),t),i(r(98133),t),i(r(67288),t),i(r(29142),t),i(r(35907),t),i(r(21509),t)},23580:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getSourcesQuestions=t.getDataSelectionChoices=void 0;const a=r(1628),i=r(37705),s=r(25184),n=a.FioriGeneratorPromptNames.serviceInquirer;function o(e,t){const r=[{name:(0,a.t)("LABEL_SAP"),value:"SAP System"},{name:(0,a.t)("LABEL_ODATA"),value:"OData Url"},{name:(0,a.t)("SELECT_APIHUB"),value:"SAP Business Accelerator Hub"}];return(0,a.getPlatform)()===a.PLATFORMS.SBAS&&(0,i.isInternalFeaturesSettingEnabled)()&&r.push({name:(0,a.t)("LABEL_MTA"),value:"MTA File"}),e!==a.ODataVersion.v2&&r.push({name:(0,a.t)("LABEL_CAP"),value:"Local Cap"}),r.push({name:(0,a.t)("LABEL_METADATA"),value:"File"}),t&&r.unshift({name:(0,a.t)("LABEL_NONE"),value:"None"}),r}t.getDataSelectionChoices=o,t.getSourcesQuestions=function(e,t,r,i){return{type:"list",name:n.sourceQuestion.source,guiOptions:{breadcrumb:(0,a.breadcrumbHelper)()},default:()=>i?.[n.systemConfigQuestions.system]?.value?"SAP System":r?"Local Cap":void 0,message:(0,a.t)("LABEL_DATA_SERVICE_MESSAGE"),choices:o(e.version,t),additionalMessages:e=>{if("SAP Business Accelerator Hub"===e)return{message:(0,a.t)("WARN_MSG_NON_UI_SOURCE_OR_SERVICE_SELECTED",{serviceTypeDesc:(0,a.t)("TEXT_API_BUSINESS_HUB_NAME")}),severity:s.Severity.warning}}}}},35907:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getApiHubQuestions=void 0;const a=r(1628),i=r(48721);t.getApiHubQuestions=function(e){let t;return[{type:"list",name:"apihubService",message:(0,a.t)("SELECT_SERVICE_MSG"),guiOptions:{breadcrumb:(0,a.breadcrumbHelper)((0,a.t)("LABEL_SERVICE"))},choices:async()=>(t||(t=await(0,i.getAPIHubServiceChoices)()),t)},{when:e=>!!e?.apihubService,type:"input",guiOptions:{mandatory:!0},name:"apihubUser",message:(0,a.t)("PROMPT_APIHUB_USERNAME"),validate:e=>!!e?.trim()},{when:e=>!!e?.apihubService,type:"password",name:"apihubPassword",guiType:"login",message:(0,a.t)("PROMPT_APIHUB_PASSWORD"),validate:async(t,{apihubService:r,apihubUser:a})=>{if(t){const s=await(0,i.getAPIHubServiceDetails)(r,a,t);return"string"==typeof s?s:(e.edmx=s.edmx,e.servicePath=s.servicePath,e.host=s.host,e.version=s.version,e.apiHubConfig={apiHubKey:s.apiHubConfig?.apiHubKey,apiHubType:"API_HUB"},!0)}return!1}}]}},48721:function(e,t,r){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getAPIHubServiceChoices=t.getAPIHubServiceDetails=void 0;const i=r(71671),s=r(84826),n=r(77090),o=r(57310),c=a(r(75503));t.getAPIHubServiceDetails=async function(e,t,r){try{const a={};a.apiHubApiKey=await(0,i.getApihubKey)(t,r),a.servicePath=e.ServiceUrl;const c={};c.edmx=await(0,i.getMetadata)(a,e);const l=s.MetadataFactory.getMetadataFactory().getMetadataExplorer(c.edmx);c.version=l.v2Logger?n.ODataVersion.v2:n.ODataVersion.v4;const u=new o.URL(e.ServiceUrl);return c.host=u.origin,c.servicePath=u.pathname,c.apiHubConfig={apiHubKey:a.apiHubApiKey,apiHubType:"API_HUB"},c}catch(e){return c.default.logErrorMsgs(e,e.message)}},t.getAPIHubServiceChoices=async function(){try{return(await(0,i.getListODataServices)()).map((e=>({name:e.Title,value:e}))).sort(((e,t)=>e.name.localeCompare(t.name,void 0,{sensitivity:"base"})))}catch(e){c.default.logErrorMsgs(e)}return[]}},20023:function(e,t,r){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getCapQuestions=void 0;const i=r(1628),s=r(71361),n=r(85379),o=r(24003),c=a(r(75503)),l=r(16284),u=r(35875);t.getCapQuestions=function(e,t,r){const a=new s.CapHelper;let d,S,E,m,_=!1;const p=async t=>{t?.serviceName&&(e.edmx=await a.getEdmx(t.urlPath,t.projectPath,t?.serviceName),e.servicePath=t.urlPath,e.version=i.ODataVersion.v4,void 0===e.edmx&&o.ServiceInquirer.logger.info((0,i.t)("ERROR_ODATA_SERVICE_METADATA_INVALID")))},y=[{when:async()=>(S=await a.getCapWorkspaceFolders(r),S.length>0&&(E=await a.getCapWorkspaceChoices(S),!0)),type:"list",name:"capWorkspaceProject",message:(0,i.t)("LABEL_CAP_CHOOSE_PROJECT"),default:()=>(0,u.defaultCapChoice)(t,E?.length),choices:()=>E,guiOptions:{applyDefaultWhenDirty:!0,mandatory:!0,breadcrumnb:(0,i.breadcrumbHelper)((0,i.t)("LABEL_CAP_PROJECT_BREADCRUMB"))},validate:e=>!!e?.path&&(_=!0,!0)},{when:e=>0===S.length||e.capWorkspaceProject?.path===l.MANUAL_PATH,type:"input",guiType:"folder-browser",name:"projectPath",message:(0,i.t)("LABEL_CAP_PROJECT_MESSAGE"),default:()=>{if(t)return t.projectPath},guiOptions:{mandatory:!0,breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("LABEL_CAP_PROJECT_BREADCRUMB"))},validate:async e=>(_=await(0,n.validateCapPath)(e),_)},{when:async e=>{if(e.capWorkspaceProject&&e.capWorkspaceProject.path!==l.MANUAL_PATH&&(e.projectPath=e.capWorkspaceProject.path,_=!0),!0===_){const t=e.projectPath?{path:e.projectPath}:e.capWorkspaceProject;return m=await a.getCapServiceChoices(t),!0}return!1},type:"list",name:"capService",message:(0,i.t)("LABEL_ODATA_MESSAGE"),choices:()=>(t&&(d=m?.findIndex((e=>e.value?.serviceName===t.serviceName))),m),guiOptions:{applyDefaultWhenDirty:!0,mandatory:!0,breadcrumb:(0,i.breadcrumbHelper)()},default:()=>m?.length>1?d:0,validate:async t=>{const r=c.default.getErrorMsg(void 0,!0);return r||!!t&&(await p(t),void 0!==e.edmx||(0,i.t)("ERROR_ODATA_SERVICE_METADATA_INVALID"))}}];return(0,i.getPlatform)()===i.PLATFORMS.CLI&&y.push({when:async e=>(await p(e.capService),!1),name:"edmx"}),y}},71361:function(e,t,r){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CapHelper=void 0;const i=r(1628),s=r(71017),n=r(73215),o=a(r(75503)),c=r(74448),l=r(16284),u=r(28033),d=r(76027),S=r(9949);t.CapHelper=class CapHelper{constructor(){this.capServiceSanitizeUrls={}}async checkIfCDSPreV7(e){try{const t=(0,s.join)(e,"package.json"),r=await(0,u.readJSON)(t)??{},a=await(0,S.isCapNodeJsProject)(r)&&!await(0,S.isCapJavaProject)(e),i="7.0.0";return(0,d.lt)((0,d.coerce)(r?.dependencies?.["@sap/cds"])??i,i)&&a}catch{return!1}}sanitizeUrlPath(e,t=!1){return e.startsWith("/")||(e=`/${e}`),t&&(e=e.replace(/\\/g,"/").replace(/\/\//g,"/").replace("odata/v4/","")),e.replace(/\\/g,"/").replace(/\/\//g,"/")}async getCapServiceChoices(e){if(n.ServiceInquirer.logger.trace(`getCapServiceChoices: ${JSON.stringify(e)}`),!e)return[];try{e.srv||(e=Object.assign(e,await this.getCapPaths(e.path)),n.ServiceInquirer.logger.trace(`getCapServiceChoices: ${JSON.stringify(e)}`));let t=[];try{const r=n.ServiceInquirer.logger,{model:a,services:i}=await(0,u.getCapModelAndServices)({projectRoot:e.path,logger:r});t=i,this.capModel=a}catch(e){return"MODEL_NOT_FOUND"===e.code?o.default.logErrorMsgs((0,i.t)("ERROR_USER_CDS_MODEL_NOT_FOUND")):o.default.logErrorMsgs((0,i.t)("ERROR_CDS_COMPILE",{error:e?.message})),n.ServiceInquirer.logger.error((0,i.t)("ERROR_CDS_COMPILE",{error:e?.message})),[]}const r=e.path,a=e?.app||c.CAP_APPS_FOLDER,l=await this.checkIfCDSPreV7(e.path);return t.map((e=>{const t=this.capModel.definitions[e.name];n.ServiceInquirer.logger.trace(`Cap service def: ${JSON.stringify(t)}`),n.ServiceInquirer.logger.trace(`Cap service def $location.file: ${JSON.stringify(t.$location.file)}`);let o=t.$location.file;(0,s.isAbsolute)(o)&&(o=(0,s.relative)(r,o)),o=(0,i.removeLastMatch)(o,".cds"),n.ServiceInquirer.logger.trace(`serviceCdsFilePath: ${o}`);const c=this.sanitizeUrlPath(e.urlPath,l);this.capServiceSanitizeUrls[e.name]={urlPath:e.urlPath,sanitizedUrlPath:c};const u={serviceName:e.name,urlPath:c,serviceCdsPath:o,projectPath:r,appPath:a,capType:e.runtime};return{name:u.capType?u.serviceName+" ("+u.capType+")":u.serviceName,value:u}}))}catch(e){o.default.logErrorMsgs(e)}return[]}async getEdmx(e,t,r){if(!this.capModel)return o.default.logErrorMsgs("CAP Model not loaded");try{const a=this.capServiceSanitizeUrls?.[r]?.urlPath??e;return await(0,S.readCapServiceMetadataEdmx)(t,a,"v4")}catch(e){o.default.logErrorMsgs(e)}}async getCapWorkspaceChoices(e){const t=[],r=e.reduce(((e,t)=>(e[t.folderName]=e[t.folderName]||[],e[t.folderName].push(t),e)),{}),a=Object.values(r);for await(const e of a)if(1===e.length){const r=await this.getCapPaths(e[0].path);r&&t.push(Object.assign(e[0],r))}else for(const r of e){r.folderName=`${r.folderName} (${r.path})`;const e=await this.getCapPaths(r.path);e&&t.push(Object.assign(r,e))}return[...t.map((e=>({name:e.folderName,value:e}))),{name:(0,i.t)("LABEL_CAP_MANUALLY_SELECT_PATH"),value:{path:l.MANUAL_PATH}}]}async getCapWorkspaceFolders(e){const t=await(0,S.findCapProjects)({wsFolders:e}),r=[];for(const e of t)r.some((t=>t.path===e))||r.push({folderName:(0,s.basename)(e),path:e});return r.sort(((e,t)=>e.folderName.localeCompare(t.folderName)))}async getCapPaths(e){const t=await(0,S.getCapCustomPaths)(e),r=t.srv?t.srv:c.CAP_SERVICES_FOLDER;return{...t,srv:r}}}},35875:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.defaultCapChoice=void 0,t.defaultCapChoice=function(e,t){return e?{path:e.projectPath}:2===t?0:void 0}},85379:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateCapPath=void 0;const a=r(1628),i=r(9949);t.validateCapPath=async function(e){if(e){"win32"===process.platform&&"/"===e.substring(0,1)&&(e=e.substring(1));try{return!!await(0,i.getCapProjectType)(e)||(0,a.t)("NOT_VALID_CAP_PROJECT")}catch(e){return(0,a.t)("NOT_VALID_CAP_PROJECT")}}return!1}},98133:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getLocalMetadataQuestions=void 0;const a=r(1628),i=r(57147),s=r(98651);t.getLocalMetadataQuestions=function(e){const t=e.version;return[{type:"input",guiType:"file-browser",name:"localEdmxFilePath",guiOptions:{mandatory:!0,breadcrumb:(0,a.breadcrumbHelper)()},message:(0,a.t)("LABEL_METADATA_MESSAGE"),validate:r=>{if(!r)return!1;if((0,i.existsSync)(r)&&(0,i.statSync)(r).isFile()){e.edmx=(0,i.readFileSync)(r,"utf-8"),e.edmx=e.edmx.replace(/ & /g," & ");const{validationMsg:n,version:o}=(0,s.validateODataVersion)(e.edmx,t);return n?(delete e.edmx,n):(e.servicePath=(0,a.t)("EXAMPLE_URL_PATH"),e.version=o,!0)}return(0,a.t)("ERROR_METADATA_FILE_DOES_NOT_EXIST")}}]}},39154:function(e,t,r){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getMtaQuestions=void 0;const i=r(1628),s=r(19324),n=a(r(75503));t.getMtaQuestions=function(e){const t=new s.DestinationHelpers;let r=!1,a=!1,o=!1,c=!1;return[{type:"input",guiType:"file-browser",name:"mtaFilePath",message:(0,i.t)("LABEL_MTA_SELECT_FILE"),guiOptions:{mandatory:!0,breadcrumb:(0,i.breadcrumbHelper)()},validate:async e=>!!e&&(r=await t.validateMtaPath(e),a=!1,o=!1,c=!1,r)},{when:()=>!0===r,type:"list",name:"destinationInstance",message:(0,i.t)("LABEL_MTA_SELECT_DESTINATION"),guiOptions:{mandatory:!0,breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("LABEL_DESTINATION_BREADCRUMB"))},choices:async e=>t.getDestinationsFromFile(e.mtaFilePath),validate:async e=>!!e&&(a=await t.validateDestination(e),o=!1,a)},{when:()=>!0===a,type:"list",name:"destination",message:(0,i.t)("LABEL_MTA_SELECT_SYSTEM"),guiOptions:{mandatory:!0,breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("LABEL_SYSTEM"))},choices:async({destinationInstance:e})=>t.getSystems(e),validate:async(e,r)=>{if(e){let a=await t.validateSystem(r.destinationInstance,e);return"string"==typeof a&&a===(0,i.t)("ERROR_AUTHENTICATION")?(c=!0,o=!1,a=!0):(c=!1,o=a),a}return!1}},{when:()=>!0===c,type:"input",name:"mtaDestinationUser",message:(0,i.t)("LABEL_SERVICE_USERNAME"),guiOptions:{mandatory:!0},validate:e=>!!e?.trim()},{when:()=>!0===c,type:"password",guiType:"login",name:"mtaDestinationPassword",message:(0,i.t)("LABEL_SERVICE_PASSWORD"),mask:"*",default:"",guiOptions:{applyDefaultWhenDirty:!0,mandatory:!0},validate:async(e,{destinationInstance:r,destination:a,mtaDestinationUser:i})=>!!e&&(o=await t.validateSystem(r,a,{user:i,password:e}),o)},{when:()=>!0===o,type:"list",name:"serviceName",message:(0,i.t)("LABEL_MTA_SELECT_SERVICE"),guiOptions:{mandatory:!0,breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("LABEL_SERVICE"))},choices:async({destination:r,destinationInstance:a})=>t.getServices(a,r,e?.version),validate:async(r,{destination:a,destinationInstance:s})=>{if(r){const o=await t.getMetadata(s,a,r.service,r.protocol);if("string"==typeof o)return o;if(Object.keys(o).length)try{return e.edmx=o.edmx,e.annotations=o.annotations,e.version=o.version,e.host=o.host,e.servicePath=o.servicePath,e.destination=a,e.destinationInstance=s,!0}catch(e){return n.default.logErrorMsgs((0,i.t)("ERROR_SERVICE_NOT_AVAILABLE"),e.message)}}return!1}}]}},19324:function(e,t,r){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.DestinationHelpers=void 0;const i=r(71017),s=r(57147),n=r(77482),o=r(1628),c=r(60349),l=r(45546),u=r(84826),d=a(r(75503)),S=r(77090);class DestinationProvider{async getSystems(e){if(this.localDestinationInstance!==e||!this.systems){const t=new c.DestinationInstanceProviderRepository;await t.init(e),this.systems=await t.getSystems(),this.localDestinationInstance=e}return this.systems}async findSystem(e,t){return(await this.getSystems(e)).find((e=>e.name===t))}async getServices(e,t,r){const a=await this.findSystem(e,t),i={filter:new Map([["protocol",["odatav2","odatav4"]]])};(r||a.credentials)&&(i.credentials=a.credentials||new l.Authentication(r.user,r.password));const s=await a.getServices(i);return r&&this.systems&&this.systems.forEach((e=>{e.name===t&&(e.credentials=new l.Authentication(r.user,r.password))})),s}async getMetadata(e,t,r,a){const i=await this.findSystem(e,t),s=new l.ODataService(r.name,r.url,r.id,a),{data:n,annotations:d=[]}=await i.getMetadata(s,c.EncodingMode.XML,{annotations:!0,...i.credentials&&{credentials:i.credentials}});let E;try{const e=u.MetadataFactory.getMetadataFactory().getMetadataExplorer(n);E=e.v2Logger?o.ODataVersion.v2:o.ODataVersion.v4}catch(e){return(0,o.t)("ERROR_COULD_NOT_PARSE_MAIN_ENTITIES")}const m=[];d?.length&&d.forEach((e=>{m.push({TechnicalName:e.technicalName,Version:e.version,Definitions:e.data||[],Uri:`${E===o.ODataVersion.v2?S.V2_CATALOG_URL_PATH:S.V4_CATALOG_URL_PATH_PROD}/Annotations(TechnicalName='${encodeURIComponent(e.technicalName)}',Version='${e.version}')/$value/`})}));const{origin:_,pathname:p,searchParams:y}=/^((http|https):\/\/)/.test(r.url)?new URL(r.url):new URL(r.url,i.url);return{edmx:n,annotations:m.length?m:void 0,version:E,host:_,servicePath:`${p}${y.toString().length?"?"+y.toString():""}`}}}t.DestinationHelpers=class DestinationHelpers{constructor(){this.destinationProvider=new DestinationProvider}async getDestinations(e){const t=new n.Mta((0,i.dirname)(e)),r=await t.getResources();let a=[];return r&&(a=r.filter((e=>"destination"===e.parameters?.service)).map((e=>e.name))),a}async validateMtaPath(e){let t=!1;if(e)try{if("win32"===process.platform&&"/"===e.substring(0,1)&&(e=e.substring(1)),"mta.yaml"===(0,i.basename)(e)&&(0,s.existsSync)(e))try{t=!!(await this.getDestinations(e))?.length||(0,o.t)("ERROR_MTA_NO_DESTINATIONS_FOUND")}catch(e){t=(0,o.t)("ERROR_SCP_ABAP_SOURCE_DISCOVER"),d.default.logErrorMsgs(e)}else e&&(t=(0,o.t)("ERROR_MTA_FILE_DOES_NOT_EXIST"))}catch(e){t=(0,o.t)("ERROR_MTA_FILE_INVALID"),d.default.logErrorMsgs(e)}return t}async validateDestination(e){let t=!1;if(e)try{t=!!(await this.destinationProvider.getSystems(e))?.length||(0,o.t)("ERROR_MTA_NOT_FOUND",{source:"systems",target:"destination"})}catch(e){t=(0,o.t)("ERROR_SCP_ABAP_SOURCE_DISCOVER"),d.default.logErrorMsgs(e)}return t}async validateSystem(e,t,r){let a=!1;if(e&&t)try{a=!!(await this.destinationProvider.getServices(e,t,r))?.length||(0,o.t)("ERROR_MTA_NOT_FOUND",{source:"services",target:"destination"})}catch(e){a=e?.code&&e?.getOriginalCause&&401===e.getOriginalCause()?(0,o.t)("ERROR_AUTHENTICATION"):(0,o.t)("ERROR_SCP_ABAP_SOURCE_DISCOVER"),d.default.logErrorMsgs(e)}return a}async getDestinationsFromFile(e){let t=[];try{t=await this.getDestinations(e)}catch(e){t.length=0,d.default.logErrorMsgs(e)}return t}async getSystems(e){let t=[];try{t=(await this.destinationProvider.getSystems(e)).map((e=>e.name))}catch(e){t.length=0,d.default.logErrorMsgs(e)}return t}async getServices(e,t,r){const a=[];try{let i=await this.destinationProvider.getServices(e,t);r&&(i=i.filter((e=>e.protocol.includes(r)))),i.forEach((e=>{a.push({name:`${e.name?.length?e.name:e.id} - OData v${e.protocol.includes("2")?2:4}`,value:{service:e,protocol:e.protocol}})}))}catch(e){a.length=0,d.default.logErrorMsgs(e)}return a.sort((0,o.compareFunc)("name"))}async getMetadata(e,t,r,a){let i=!1;if(r)try{i=await this.destinationProvider.getMetadata(e,t,r,a)}catch(e){i=(0,o.t)("ERROR_SERVICE_NOT_AVAILABLE"),d.default.logErrorMsgs(e,e.message)}return i}}},21509:function(e,t,r){var a=this&&this.__createBinding||(Object.create?function(e,t,r,a){void 0===a&&(a=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,a,i)}:function(e,t,r,a){void 0===a&&(a=r),e[a]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||a(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(39154),t)},67288:function(e,t,r){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getServiceUrlQuestions=t.validateService=void 0;const i=r(1628),s=r(77090),n=r(84826),o=a(r(75503)),c=r(35677),l=r(73215);async function u({serviceUrl:e,serviceUrlUser:t,serviceUrlPassword:r,requiredVersion:a},c,l,u=!1){if(l.validity.authenticated||!1===l.validity.authRequired)try{!0===u&&l.setRejectUnauthorized(!u);const{system:d,servicePath:S,search:E}=(0,s.newSapSystemForServiceUrl)(e);e&&r&&d.setCredentials({username:t,password:r});const m=await d.getService(S,u);c.edmx=await m.metadata();const _=n.MetadataFactory.getMetadataFactory().getMetadataExplorer(c.edmx).v2Logger?s.ODataVersion.v2:s.ODataVersion.v4;if(a&&a!==_)return delete c.edmx,`${(0,i.t)("ERROR_ODATA_SERVICE_VERSION_MISMATCH",{serviceVersion:_,requiredVersion:a})}`;c.version=_;const p=new URLSearchParams(E);p.has(i.SAP_CLIENT_KEY)&&p.delete(i.SAP_CLIENT_KEY);const y=p.toString()?"?"+p.toString():"";c.servicePath=S+y;const g=await d.getCatalog(c.version,u);return c.annotations=await g.getAnnotations({path:S}).catch((e=>{o.default.logErrorMsgs(e)})),c.host=d.config.url,c.client=d.config.client,!0}catch(e){return delete c.edmx,o.default.logErrorMsgs(e)}finally{l.setRejectUnauthorized(!0)}return!1}t.validateService=u,t.getServiceUrlQuestions=function(e){const t=new c.ConnectionValidator,r=e.version;let a,s=!1;return[{when:function(e){return!!e},type:"input",name:"serviceUrl",guiOptions:{hint:"http://<hostname>:<port>/path/to/odata/service/",mandatory:!0,breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("LABEL_SERVICE_URL_BREADCRUMB"))},message:(0,i.t)("LABEL_ODATA_SERVICE_URL",{odataVersion:r}),validate:async(s,n)=>(a=await t.validateUrl({urlString:s,isServiceUrl:!0}),!![i.ERROR_TYPE.CERT_SELF_SIGNED,i.ERROR_TYPE.CERT_SELF_SIGNED_CERT_IN_CHAIN].includes(o.default.getCurrentErrorType())||(!0===a?!!t.validity.authRequired||u({serviceUrl:s,serviceUrlUser:n.serviceUrlUser,serviceUrlPassword:n.serviceUrlPassword,requiredVersion:r},e,t):a))},{when:function(e){if(e.serviceUrl){const e=[i.ERROR_TYPE.CERT_SELF_SIGNED,i.ERROR_TYPE.CERT_SELF_SIGNED_CERT_IN_CHAIN].includes(o.default.getCurrentErrorType(i.PLATFORMS.CLI!==(0,i.getPlatform)()));return s=s||e,e}return!1},type:"confirm",name:"ignoreCertError",message:(0,i.t)("LABEL_PROMPT_CONTINUE_WITH_UNTRUSTED_CERT"),default:!1,validate:async(a,s)=>{a&&l.ServiceInquirer.logger.warn((0,i.t)("LOG_MSG_INFO_USER_DISABLED_CERT_VALIDATION"));const n=await t.validateUrl({urlString:s.serviceUrl,isServiceUrl:!0,ignoreCertError:a,forceReValidation:!0});return!0===n?!!t.validity.authRequired||u({serviceUrl:s.serviceUrl,serviceUrlUser:s.serviceUrlUser,serviceUrlPassword:s.serviceUrlPassword,requiredVersion:r},e,t,a):n}},{when:async a=>{if(i.PLATFORMS.CLI===(0,i.getPlatform)()){if(!1===a.ignoreCertError)throw new Error("exiting");l.ServiceInquirer.logger.warn((0,i.t)("LOG_MSG_INFO_USER_DISABLED_CERT_VALIDATION"));const s=await t.validateUrl({urlString:a.serviceUrl,isServiceUrl:!0,ignoreCertError:a.ignoreCertError,forceReValidation:!0});if(!0!==s)throw new Error(s.toString());if(!t.validity.authRequired){const i=await u({serviceUrl:a.serviceUrl,serviceUrlUser:a.serviceUrlUser,serviceUrlPassword:a.serviceUrlPassword,requiredVersion:r},e,t,a.ignoreCertError);if(!0!==i)throw new Error(i.toString())}}return!1},name:"cliOnlyRevalidate"},{when:e=>!!t.validity.reachable&&t.isAuthRequired(e.serviceUrl,void 0,e.ignoreCertError),type:"input",name:"serviceUrlUser",message:(0,i.t)("LABEL_SERVICE_USERNAME"),guiOptions:{mandatory:!0},default:"",validate:e=>!!(e&&e.length>0)},{when:e=>!!t.validity.reachable&&t.isAuthRequired(e.serviceUrl,void 0,e.ignoreCertError),type:"password",guiOptions:{applyDefaultWhenDirty:!0,mandatory:!0},name:"serviceUrlPassword",message:(0,i.t)("LABEL_SERVICE_PASSWORD"),guiType:"login",mask:"*",default:"",validate:async(a,i)=>{const s=await t.validateAuth(i.serviceUrl,i.serviceUrlUser,a,void 0,i.ignoreCertError);return!0===s?u({serviceUrl:i.serviceUrl,serviceUrlUser:i.serviceUrlUser,serviceUrlPassword:a,requiredVersion:r},e,t,i.ignoreCertError):s}}]}},54672:function(e,t,r){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getSelectedServiceLabel=t.updateAndValidateServiceDetail=t.createNormalisedURL=t.defaultSystemName=t.appendSuffix=t.suggestSystemName=t.isSystemConfigEqual=t.resetSystemState=t.updateSapSystemCredentials=t.createNewSystem=t.getSystemForService=t.getRequiredServiceInformation=t.getServiceChoices=t.canSaveSapSystem=t.getSapSystemChoices=void 0;const i=r(43895),s=r(1628),n=r(77090),o=r(82884),c=r(24003),l=a(r(75503)),u=r(64989),d=r(98651),S=r(47937);t.getSapSystemChoices=function(e){const t=[],r=(0,i.isAppStudio)()?(0,s.t)("LABEL_SAP_SYSTEM_SOURCE_TYPE_SCP"):(0,s.t)("NEW_SYSTEM");return t.push({name:r,value:r}),e&&Object.values(e).forEach((e=>{(0,i.isAppStudio)()&&!(0,d.validateDestinationAttributes)(e)&&(c.ServiceInquirer.logger.info((0,s.t)("INFO_INVALID_DESTINATION",{destination:e.getDisplayName()})),e=null),e&&t.push({name:e.getDisplayName(),value:e.name})})),t},t.canSaveSapSystem=function(e){let t=!1;return!(0,i.isAppStudio)()&&e&&e?.name!==(0,s.t)("NEW_SYSTEM")&&e?.hasSavedCredentials()&&!e?.isScp()&&(t=!0),t};const E=async(e,t,r)=>{let a,i;try{const i=await e.getCatalog(t);a=await i.listServices(r===n.CATALOG_REQ_TYPE.RECOMMENDED)}catch(a){c.ServiceInquirer.logger.debug((0,s.t)("ERROR_SERVICES_UNAVAILABLE_FOR_VERSION",{catalogType:n.CATALOG_REQ_TYPE[r],system:e.toString(),version:t})),i=a}return{services:a,version:t,error:i}},m=e=>{const t=e.error;return t&&(e.errorType=s.ErrorHandler.getErrorType(t)),e},_=({error:e,errorType:t})=>t===s.ERROR_TYPE.CONNECTION||e instanceof n.ConnectionError||e instanceof n.UAATimeoutError||e instanceof n.TimeoutError?e:void 0,p=e=>{(0,s.getPlatform)()!==s.PLATFORMS.CLI&&c.ServiceInquirer.logger.warn((0,s.t)("LOG_MSG_PROBLEM_WITH_SERVICE_DEFINITION",{service:JSON.stringify(e)}))},y=async({system:e,catRequestErrors:t,rootCauseErrorType:r,logMsg:a,error:n,reqVersion:o})=>{const c=t?.map((({errorType:e})=>e)),u=((e,t,r,a)=>{let n;return(0,i.isAppStudio)()&&(t.isHTML5DynamicDestination()?e&&(e.includes(s.ERROR_TYPE.BAD_GATEWAY)?n=s.ERROR_TYPE.BAD_GATEWAY:e.includes(s.ERROR_TYPE.SERVICE_UNAVAILABLE)&&t.isOnPremSystem()?n=s.ERROR_TYPE.DESTINATION_BAD_GATEWAY_503:e.includes(s.ERROR_TYPE.NOT_FOUND)?n=a===s.ODataVersion.v2?s.ERROR_TYPE.NO_V2_SERVICES:a===s.ODataVersion.v4?s.ERROR_TYPE.NO_V4_SERVICES:s.ERROR_TYPE.DESTINATION_NOT_FOUND:r&&(n=s.ErrorHandler.getErrorType(r))):n=s.ERROR_TYPE.DESTINATION_MISCONFIGURED),n})(c,e,n,o);if((0,s.getPlatform)()===s.PLATFORMS.CLI){if(u){const t=s.TelemetryHelper.createTelemetryData({basErrorType:u,destODataType:e.destinationODataType});throw await(0,s.sendTelemetryBlocking)(S.EventName.SERVICE_INQUIRER_BAS_ERROR,t),new Error(s.ErrorHandler.getHelpForError(u))}{const e=a?s.ErrorHandler.getHelpForError(r,a).toString():l.default.getErrorMsg(n,!0,r);throw new Error(e)}}if(u){const t=s.TelemetryHelper.createTelemetryData({basErrorType:u,destODataType:e.destinationODataType});return(0,s.sendTelemetry)(S.EventName.SERVICE_INQUIRER_BAS_ERROR,t),l.default.logErrorMsgs(u)}const d=c?.indexOf(s.ERROR_TYPE.AUTH);return d>-1?l.default.logErrorMsgs(t[d].error):l.default.logErrorMsgs(n??r,a)};async function g(e,t,r=!0){if(t.servicePath||!r)try{try{const r=await e.getCatalog(t.version);t.annotations=await r.getAnnotations({path:t.servicePath})}catch{c.ServiceInquirer.logger.info((0,s.t)("INFO_NO_ANNOTATIONS_FILE"))}const r=await e.getService(t.servicePath);t.edmx=await r.metadata(),t.host=e.config.url??t.newSystemServiceInfo?.url,t.client=e.config.client,(0,i.isAppStudio)()&&(t.destination=e.name),t.scp=e.isScp(),t.destinationAuthType=e.config.destinationAuthType}catch(t){return c.ServiceInquirer.logger.error(l.default.getErrorMsg(t,!1,s.ERROR_TYPE.SERVICE_UNAVAILABLE)),y({system:e,rootCauseErrorType:s.ERROR_TYPE.SERVICE_UNAVAILABLE})}return!0}async function v(e,t,r){let a;try{a=t||new URL(e).origin+(r?(0,s.t)("SUGGEST_SYSTEM_NAME_CLIENT",{systemClient:r}):"")}catch(e){return void c.ServiceInquirer.logger.warn((0,s.t)("ERROR_SUGGEST_SAP_SYSTEM_NAME",{error:e}))}return!0===await(0,d.validateSystemName)(a)?a:h(a)}async function h(e){let t=1,r=`${e} (${t})`;for(;!0!==await(0,d.validateSystemName)(r);)r=`${e} (${t})`,t++;return r}function A(e,t=""){return t=t.replace(/^\//,""),e=!e.endsWith("/")&&t?e+"/":e,new URL(e+t)}t.getServiceChoices=async function(e,t){const r=performance.now(),a=t?[t]:[s.ODataVersion.v2,s.ODataVersion.v4],o=[n.CATALOG_REQ_TYPE.RECOMMENDED,n.CATALOG_REQ_TYPE.LEGACY],u=[],d=[];for(const t of o)for(const r of a)u.push((()=>E(e,r,t)));const g=await u[0]();d.push(m(g));let v=_(g),h=!!g.error;if(!v)for(let e=1;e<u.length;e++){const t=await u[e]();d.push(m(t)),v=v||_(t),h=h&&!!t.error}const A=((e,t)=>{const r=[],a="trace"===c.ServiceInquirer.logger.getLogLevel();for(let i=0;i<e.length;i++){const n=t[t[i]?i:i+e.length],o=e[i];n?.filter((e=>!e.ServiceId?.includes("/IWBEP/COMMON"))).forEach((e=>{try{let t=e.TechnicalServiceName??`${e.GroupId} > ${e.ServiceAlias||e.ServiceId}`;const i=o===s.ODataVersion.v2?new URL(e.ServiceUrl).pathname:e.ServiceUrl.split("?")[0];t=`${t} (${e.TechnicalServiceVersion??e.ServiceVersion}) - OData V${o}`,a&&(t=`${t} Service Type: ${e.ServiceType}`),r?.push({name:t,value:{servicePath:i,serviceODataVersion:o,toString:()=>t,serviceType:e.ServiceType}})}catch(t){l.default.logErrorMsgs(t),p(e)}}))}return r})(a,d.map((e=>e.services)));if(v||0===A.length&&h){A.push({name:(0,s.t)("SERVICES_UNAVAILABLE"),value:s.ERROR_TYPE.SERVICES_UNAVAILABLE});const r=(0,s.t)("ERROR_ALL_SERVICES_UNAVAILABLE",{system:e.toString(),version:a.join(", V")});await y({system:e,catRequestErrors:d.map((({errorType:e,error:t})=>({errorType:e,error:t}))),rootCauseErrorType:s.ERROR_TYPE.SERVICES_UNAVAILABLE,logMsg:v?void 0:r,error:v,reqVersion:t})}else if((0,i.isAppStudio)()){const t=s.TelemetryHelper.createTelemetryData({destODataType:e.destinationODataType});(0,s.sendTelemetry)(S.EventName.SERVICE_INQUIRER_BAS_SUCCESS,t)}const f=performance.now();return c.ServiceInquirer.logger.info((0,s.t)("SERVICES_TIME_ELAPSED",{servicesRetrievalTime:Math.round((f-r)/1e3)})),A.sort((0,s.compareFunc)("name"))},t.getRequiredServiceInformation=g,t.getSystemForService=async function(e,t){let r=await(0,o.createDestinationInstance)(e,"ABAP");return!0===await(0,n.isSystemNameInUse)(r)&&(r=await h(r)),(0,i.isAppStudio)()?(0,n.newSapSystemForDestinaton)({destination:r}):(0,n.newSapSystemForSteampunk)(r,t,!0)},t.createNewSystem=function(e){const t=e.newSystemName||"Temp System";try{if("SCP"===e.newSystemType&&e.newSystemServiceInfo)return(0,n.newSapSystemForSteampunk)(t,e.newSystemServiceInfo,!0);if("S4HC"===e.newSystemType)return(0,n.newS4HCSystem)({name:t,url:e.newSystemUrl,unSaved:!0});{let r;return e.newSystemUser&&e.newSystemPassword&&(r={username:e.newSystemUser,password:e.newSystemPassword}),(0,n.newSapSystem)(t,e.newSystemUrl,e.newSystemClient??"",r,!0)}}catch(e){l.default.logErrorMsgs(e)}},t.updateSapSystemCredentials=async function(e,t){try{let r;return e.systemUser&&e.systemPassword?(r={username:e.systemUser,password:e.systemPassword},t.setCredentials(r),await(0,n.saveSapSystem)(t),t):t}catch(e){l.default.logErrorMsgs(e)}},t.resetSystemState=function(e){return e.newSystem=void 0,e.newSystemServiceInfo=void 0,e.newSystemServiceInstance=void 0,e.newSystemName="",e.servicePath=void 0,u.tempAnswers.suggestedSystemName=null,u.tempAnswers.lastSystemNameSuggested=null,u.tempAnswers.isSuggestion=!0,!0},t.isSystemConfigEqual=function(e,t){return e.client===t.client&&e.destination===t.destination&&e.originalUrl===t.originalUrl&&e.scp===t.scp&&e.service===t.service&&e.url===t.url},t.suggestSystemName=v,t.appendSuffix=h,t.defaultSystemName=async function(e,t,r,a){return u.tempAnswers.suggestedSystemName=await v(e,t,r),!u.tempAnswers.lastSystemNameSuggested||u.tempAnswers.isSuggestion&&a===u.tempAnswers.lastSystemNameSuggested?(u.tempAnswers.lastSystemNameSuggested=u.tempAnswers.suggestedSystemName,u.tempAnswers.suggestedSystemName):(u.tempAnswers.isSuggestion=!1,a)},t.createNormalisedURL=A,t.updateAndValidateServiceDetail=async function(e,t,r){const a=await g(e,t,!1);if(!0!==a)return a;{const r=A(e.config.url,t.servicePath??"");t.host=r.origin,t.servicePath=r.pathname}const{validationMsg:i,version:s}=(0,d.validateODataVersion)(t.edmx,r);return i||(t.version=s,!0)},t.getSelectedServiceLabel=function(e){let t=(0,s.t)("LABEL_SERVICE");return e.newSystem?.isScp()&&e.newSystem?.userDisplayName&&(t=t.concat(` ${(0,s.t)("LABEL_SERVICE_FOR_USER",{username:e.newSystem?.userDisplayName})}`)),t}},29142:function(e,t,r){var a=this&&this.__createBinding||(Object.create?function(e,t,r,a){void 0===a&&(a=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,a,i)}:function(e,t,r,a){void 0===a&&(a=r),e[a]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||a(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.createNewSystem=void 0,i(r(19024),t),i(r(62815),t);var s=r(54672);Object.defineProperty(t,"createNewSystem",{enumerable:!0,get:function(){return s.createNewSystem}})},19024:function(e,t,r){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getSystemConfigQuestions=t.getServicesForSystemQuestions=t.getDiscoverSystemQuestions=t.getNewSystemQuestions=t.getScpQuestions=t.getS4HCQuestions=t.getOnPremQuestions=void 0;const i=r(1628),s=r(77090),n=r(43895),o=r(75836),c=r(54672),l=r(2929),u=a(r(75503)),d=r(98651),S=r(64989),E=r(62815),m=r(33774),_=r(73215),p=r(25184),y=i.FioriGeneratorPromptNames.serviceInquirer.systemConfigQuestions;function g(e){const t=new l.ConnectionValidator;return[{type:"input",name:"newSystemUrl",message:(0,i.t)("MSG_SYSTEM_URL"),guiOptions:{mandatory:!0,breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("MSG_SYSTEM_URL"))},validate:e=>t.validateUrl({urlString:e,ignorePath:!0})},{type:"input",name:"newSystemClient",message:(0,i.t)("MSG_CLIENT_CODE"),guiOptions:{breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("LABEL_SAP_CLIENT_BREADCRUMB"))},validate:d.validateSapClient},{when:()=>t.isAuthRequired(),type:"input",name:"newSystemUser",message:(0,i.t)("LABEL_SERVICE_USERNAME"),guiOptions:{mandatory:!0},default:"",validate:()=>!0},{when:()=>t.isAuthRequired(),type:"password",guiOptions:{applyDefaultWhenDirty:!0,mandatory:!0},name:"newSystemPassword",message:(0,i.t)("LABEL_SERVICE_PASSWORD"),guiType:"login",mask:"*",default:"",validate:(e,r)=>t.validateAuth(void 0,r.newSystemUser,e,r.newSystemClient)},{when:async r=>(!r.newSystemUrl||!t.validity.authenticated&&t.isAuthRequired()||(e.newSystem=await(0,c.createNewSystem)(r)),!1),name:"createOnPremSystem"}]}function v(e){return[{type:"input",name:"newS4HCSystemUrl",message:(0,i.t)("MSG_SYSTEM_URL"),guiOptions:{mandatory:!0,breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("MSG_SYSTEM_URL"))},validate:m.validateUrl},{when:t=>(t.newS4HCSystemUrl&&(e.newSystem=(0,c.createNewSystem)({...t,newSystemUrl:t.newS4HCSystemUrl,newSystemType:"S4HC"})),!1),name:"createS4HCSystem"}]}function h(e){const t=[];let r;return(0,n.isAppStudio)()?r="DISCOVER":(t.push({type:"list",name:"serviceKeySource",choices:[{name:(0,i.t)("SCP_ABAP_SOURCE_SELECT_DISCOVER"),value:"DISCOVER"},{name:(0,i.t)("SCP_ABAP_SOURCE_SELECT_FILE"),value:"FILE"}],message:(0,i.t)("SCP_ABAP_SOURCE_MESSAGE"),validate:()=>(0,c.resetSystemState)(e)}),t.push({when:e=>"FILE"===e.serviceKeySource,type:"input",name:"newSystemServiceKeyPath",message:(0,i.t)("LABEL_SERVICE_KEY_MESSAGE"),guiType:"file-browser",guiOptions:{hint:(0,i.t)("SERVICE_CONNECTION_LOCAL_FILE"),applyDefaultWhenDirty:!0,mandatory:!0},validate:t=>{const r=(0,d.validateServiceKey)(t);return"string"==typeof r||"boolean"==typeof r?r:(e.newSystemServiceInfo=r,!0)}})),t.push({when:e=>"DISCOVER"===(e.serviceKeySource??r),type:"list",name:"newSystemServiceInstance",guiOptions:{breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("SCP_ABAP_SELECT_MESSAGE"))},choices:async()=>{const e=await(0,i.getABAPInstanceChoices)();if(e.outputError&&(u.default.logErrorMsgs(e.outputError.error,e.outputError.userMsg),(0,i.getPlatform)()===i.PLATFORMS.CLI))throw new Error((0,i.t)("INFO_ABAP_ENVIRONMENTS_UNAVAILABLE"));return e.choices},message:(0,i.t)("SCP_ABAP_SELECT_MESSAGE"),default:()=>i.ERROR_TYPE.NO_ABAP_ENVS,validate:t=>{if(t===i.ERROR_TYPE.NO_ABAP_ENVS){const e=u.default.getErrorMsg("",!0),t=(0,i.t)("ERROR_SCP_ABAP_SOURCE_DISCOVER_CHECK_LOG");return e?`${e} ${t}`:t}return(0,c.resetSystemState)(e),e.newSystemServiceInstance=t,!0}}),t.push({when:async t=>{if((0,i.getPlatform)()===i.PLATFORMS.CLI&&(e.newSystemServiceInstance=t.newSystemServiceInstance),e.newSystemServiceInfo){const r={newSystemName:e.newSystemName,newSystemType:t.newSystemType,newSystemServiceInfo:e.newSystemServiceInfo,newSystemUser:t.newSystemUser,newSystemPassword:t.newSystemPassword,newSystemUrl:t.newSystemUrl,newSystemClient:t.newSystemClient};e.newSystem=(0,c.createNewSystem)(r)}else if(e.newSystemServiceInstance&&e.newSystemServiceInstance!==i.ERROR_TYPE.NO_ABAP_ENVS)try{e.newSystemServiceInfo=(await(0,o.apiGetInstanceCredentials)(e.newSystemServiceInstance)).credentials,e.newSystem=await(0,c.getSystemForService)(e.newSystemServiceInstance,e.newSystemServiceInfo),e.newSystemName=e.newSystem.name}catch(t){u.default.logErrorMsgs("",(0,i.t)("SERVICES_UNAVAILABLE_BY_ABAP_ENV_UNAVAILABLE"),!1),u.default.logErrorMsgs(t,(0,i.t)("INFO_ABAP_ENVIRONMENTS_UNAVAILABLE")),e.newSystem={name:l.SERVICES_UNAVAILABLE_DUMMY_SYSTEM_NAME}}return!1},name:"createSCPSystem"}),t}function A(e){const t=[],r=i.FeatureManager.getInstance().isFeatureEnabled(i.Features.S4HCSystem);t.push({name:(0,i.t)("LABEL_SAP_SYSTEM_SOURCE_TYPE_SCP"),value:"SCP"}),r&&t.push({name:(0,i.t)("LABEL_SAP_SYSTEM_SOURCE_TYPE_S4HC"),value:"S4HC"}),t.push({name:(0,i.t)("LABEL_SAP_SYSTEM_SOURCE_TYPE_ON_PREM"),value:"ON_PREM"});const a=[{type:"list",name:"newSystemType",choices:t,message:(0,i.t)("MSG_SYSTEM_TYPE_CHOICE"),validate:()=>(0,c.resetSystemState)(e)}];return a.push(...(0,i.withCondition)(g(e),(e=>"ON_PREM"===e.newSystemType))),a.push(...(0,i.withCondition)(h(e),(e=>"SCP"===e.newSystemType))),r&&a.push(...(0,i.withCondition)(v(e),(e=>"S4HC"===e.newSystemType))),a.push({when:()=>!!e?.newSystem&&e?.newSystem?.name!==l.SERVICES_UNAVAILABLE_DUMMY_SYSTEM_NAME,type:"input",guiOptions:{hint:(0,i.t)("HINT_ENTER_SYSTEM_NAME_TO_SAVE"),applyDefaultWhenDirty:!0,breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("SYSTEM_NAME"))},name:"newSystemName",message:(0,i.t)("SYSTEM_NAME"),default:t=>e.newSystemName||(0,c.defaultSystemName)("SCP"===t.newSystemType?e.newSystemServiceInfo.url:t.newSystemUrl,e.newSystemServiceInfo?.systemid,t.newSystemClient,t.newSystemName),validate:e=>e===S.tempAnswers.suggestedSystemName||(0,d.validateSystemName)(e)}),a}function f(e){const t=[{when:()=>!1,name:"newSystemType",default:"SCP"}];return t.push(...h(e)),t}function R(e,t={},r){let a,o,d=[];const S=e.version,E=[];return(0,n.isAppStudio)()&&(a=new l.ConnectionValidator,E.push({when:async r=>{if(e.newSystem||t[r.system].isScp())return!1;const i=Object.assign({},t[r.system].config);return(0,s.replaceUrlForAppStudio)(i,r.system),await a.validateUrl({urlString:i.url+i.service,ignorePath:!1,authType:i.destinationAuthType}),a.isAuthRequired()},type:"input",name:"destinationUser",message:(0,i.t)("LABEL_SERVICE_USERNAME"),guiOptions:{mandatory:!0},default:""}),E.push({when:r=>!e.newSystem&&!t[r.system].isScp()&&a.isAuthRequired(),type:"password",guiOptions:{applyDefaultWhenDirty:!0},name:"destinationPassword",message:(0,i.t)("LABEL_SERVICE_PASSWORD"),guiType:"login",mask:"*",default:"",validate:async(e,r)=>{const i=await a.validateAuth(void 0,r.destinationUser,e);return i&&t[r.system].setCredentials({username:r.destinationUser,password:e}),i}})),E.push({when:async s=>(r&&e.newSystem&&(0,c.isSystemConfigEqual)(r.config,e.newSystem?.config)&&(e.newSystem=r),e?.newSystem?.name===l.SERVICES_UNAVAILABLE_DUMMY_SYSTEM_NAME||(u.default.hasError()?(d.push({name:(0,i.t)("SERVICES_UNAVAILABLE"),value:i.ERROR_TYPE.SERVICES_UNAVAILABLE}),!0):!((0,n.isAppStudio)()&&!e.newSystem&&!t[s.system]?.isScp()&&a.validity.authRequired&&!a.validity.authenticated)&&(o&&(0,c.isSystemConfigEqual)(o,t[s.system]?.config||e.newSystem?.config)||(d=await(0,c.getServiceChoices)(t[s.system]||e.newSystem,S),o=t[s.system]?.config||e.newSystem?.config),!!o))),type:(0,i.getPlatform)()===i.PLATFORMS.CLI?"autocomplete":"list",name:"selectedService",guiOptions:{applyDefaultWhenDirty:!0,breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("LABEL_SERVICE"))},choices:()=>d,source:(e,t)=>(0,i.searchChoices)(t,d),message:()=>(0,c.getSelectedServiceLabel)(e),additionalMessages:e=>{if(e?.serviceType&&e.serviceType!==l.SERVICE_TYPE.UI)return{message:(0,i.t)("WARN_MSG_NON_UI_SOURCE_OR_SERVICE_SELECTED",{serviceTypeDesc:"A2X"}),severity:p.Severity.warning}},default:()=>d.length>1?void 0:0,validate:async(r,a)=>e?.newSystem?.name===l.SERVICES_UNAVAILABLE_DUMMY_SYSTEM_NAME?(0,i.t)("SERVICES_UNAVAILABLE_BY_ABAP_ENV_UNAVAILABLE"):u.default.hasError()?u.default.getValidationErrorHelp():r?(e.version=r.serviceODataVersion,e.servicePath=r.servicePath,(0,c.getRequiredServiceInformation)(e.newSystem??t[a.system],e)):void 0}),E.push({when:async r=>{if(!u.default.hasError(!0)&&(0,i.getPlatform)()===i.PLATFORMS.CLI&&r.selectedService)return e.version=r.selectedService.serviceODataVersion,e.servicePath=r.selectedService.servicePath,!await(0,c.getRequiredServiceInformation)(e.newSystem??t[r.system],e)},name:"getServiceDetail"}),E}t.getOnPremQuestions=g,t.getS4HCQuestions=v,t.getScpQuestions=h,t.getNewSystemQuestions=A,t.getDiscoverSystemQuestions=f,t.getServicesForSystemQuestions=R,t.getSystemConfigQuestions=async function(e,t,r){let a={};const o=new l.ConnectionValidator;let u;try{a=await(0,s.listSAPSystems)(),e.newSystem&&(a[e.newSystem.name]=e.newSystem)}catch(e){_.ServiceInquirer.logger.error(`${(0,i.t)("ERROR_SAP_SYSTEM")}: ${e}`)}const d=[{type:(0,i.getPlatform)()===i.PLATFORMS.CLI?"autocomplete":"list",guiOptions:{hint:(0,i.t)("LABEL_SYSTEM_CONFIG"),applyDefaultWhenDirty:!0,breadcrumb:(0,i.breadcrumbHelper)((0,i.t)("LABEL_SYSTEM"))},name:y.system,choices:(0,c.getSapSystemChoices)(a),source:(e,t)=>(0,i.searchChoices)(t,(0,c.getSapSystemChoices)(a)),message:(0,i.t)("LABEL_SYSTEM"),default:r?.[y.system]?.value??(e.newSystem?e.newSystem.name:""),validate:()=>(0,c.resetSystemState)(e)},{when:async t=>{if(e.sapSystem=a[t.system],(0,c.canSaveSapSystem)(a[t.system])){const e=a[t.system];return await o.validateUrl({urlString:e?.url}),o.validity.reachable?(u=await o.validateAuth(e?.url,e?.username,e?.password,e?.client),!0!==u):!1}return!1},type:"input",name:y.systemUser,message:(0,i.t)("LABEL_SERVICE_USERNAME"),guiOptions:{mandatory:!0,applyDefaultWhenDirty:!0},default:e=>a[e.system]?.username,validate:()=>!0},{when:e=>(0,c.canSaveSapSystem)(a[e.system])&&o.validity.reachable&&!o.validity.authenticated,type:"password",guiOptions:{applyDefaultWhenDirty:!0},name:y.systemPassword,message:(0,i.t)("LABEL_SERVICE_PASSWORD"),guiType:"login",mask:"*",default:"",validate:(e,t)=>o.validateAuth(a[t.system]?.url,t.systemUser,e,a[t.system]?.client)},{when:async e=>(!0!==u&&o.validity.authenticated&&(a[e.system]=await(0,c.updateSapSystemCredentials)(e,a[e.system])),!1),name:y.updateSapSystemCredentials}];return(0,n.isAppStudio)()?d.push(...(0,i.withCondition)(f(e),(e=>e.system&&e.system===(0,i.t)("LABEL_SAP_SYSTEM_SOURCE_TYPE_SCP")))):d.push(...(0,i.withCondition)(A(e),(e=>e.system&&e.system===(0,i.t)("NEW_SYSTEM")))),(0,n.isAppStudio)()&&d.push(...(0,i.withCondition)((0,E.getGenericODataDestQuestions)(e,a),(e=>e.system&&e.system!==(0,i.t)("LABEL_SAP_SYSTEM_SOURCE_TYPE_SCP")&&a[e.system].isGenericODataDest()))),d.push(...(0,i.withCondition)(R(e,a,t),(t=>!!e?.newSystem||t.system&&!((0,c.canSaveSapSystem)(a[t.system])&&o.validity.reachable&&!o.validity.authenticated)&&t.system!==((0,n.isAppStudio)()?(0,i.t)("LABEL_SAP_SYSTEM_SOURCE_TYPE_SCP"):(0,i.t)("NEW_SYSTEM"))&&(!(0,n.isAppStudio)()||a[t.system].isAbapCatalogDest())))),d}},62815:function(e,t,r){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getGenericODataDestQuestions=void 0;const i=r(1628),s=r(77090),n=r(2929),o=a(r(75503)),c=r(54672);function l(e,t){const r=Object.assign({},e,{service:t??""});return(0,s.replaceUrlForAppStudio)(r),(0,c.createNormalisedURL)(r.url,r.service).toString()}t.getGenericODataDestQuestions=function(e,t){const r=new n.ConnectionValidator(!0);let a;const s=e.version;let u;return[{when:r=>(u=t[r?.system],e.sapSystem=u,!!u?.isPartialUrlDest()),type:"input",name:"servicePathInput",message:(0,i.t)("LABEL_SERVICE_PATH"),guiOptions:{mandatory:!0,breadcrumb:(0,i.breadcrumbHelper)()},validate:async t=>{if(!t)return(0,i.t)("WARNING_ENTER_VALID_SERVICE_PATH");let a=await r.validateUrl({urlString:l(u.config,t)});if(!0!==a){if(!1===r.getValidity()?.reachable)return(0,i.t)("ERROR_ODATA_SERVICE_PATH_NOT_FOUND");if(!u.isHTML5DynamicDestination())return i.ErrorHandler.getHelpForError(i.ERROR_TYPE.DESTINATION_MISCONFIGURED)}return!0!==a||r.validity.authRequired||(e.servicePath=t,a=await(0,c.updateAndValidateServiceDetail)(u,e,s)),a}},{when:async e=>u?.isPartialUrlDest()?!!e.servicePathInput&&r.validity.authRequired:(await r.validateUrl({urlString:l(u?.config)}),!!r.validity.authRequired),type:"input",name:"destinationSrvUser",message:(0,i.t)("LABEL_SERVICE_USERNAME"),guiOptions:{mandatory:!0},default:""},{when:()=>!!r.validity.authRequired,type:"password",name:"destinationSrvPassword",message:(0,i.t)("LABEL_SERVICE_PASSWORD"),guiType:"login",mask:"*",default:"",validate:async(t,a)=>{const i=await r.validateAuth(void 0,a.destinationSrvUser,t);return!0===i&&(u.setCredentials({username:a.destinationSrvUser,password:t}),a.servicePathInput)?(e.servicePath=a.servicePathInput,(0,c.updateAndValidateServiceDetail)(u,e,s)):i}},{when:async()=>!(!u?.isFullUrlDest()||!(!r.validity.authRequired||r.validity.authRequired&&r.validity.authenticated))&&(a=!0===await(0,c.updateAndValidateServiceDetail)(u,e,s)?{name:e.host+e.servicePath,value:e.host+e.servicePath}:{name:(0,i.t)("ERROR_MSG_SERVICE_UNAVAILABLE"),value:i.ERROR_TYPE.SERVICES_UNAVAILABLE},!0),type:"list",name:"selectedDestinationService",choices:()=>[a],message:(0,i.t)("LABEL_SERVICE"),guiOptions:{applyDefaultWhenDirty:!0,breadcrumb:(0,i.breadcrumbHelper)()},default:()=>0,validate:e=>e!==i.ERROR_TYPE.SERVICES_UNAVAILABLE||o.default.getErrorMsg(null,!0,i.ERROR_TYPE.SERVICES_UNAVAILABLE)}]}},64989:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.tempAnswers=void 0,t.tempAnswers={suggestedSystemName:null,lastSystemNameSuggested:null,isSuggestion:!0}},98651:function(e,t,r){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.validateDestinationAttributes=t.validateODataVersion=t.validateSystemName=t.validateServiceKey=t.validateSapClient=void 0;const i=r(1628),s=r(77090),n=r(84826),o=r(57147),c=a(r(75503));t.validateSapClient=function(e){return!(e&&!new RegExp("^[0-9][0-9][0-9]$").test(e))||(0,i.t)("WARNING_CLIENT_CODE_FORMAT")},t.validateServiceKey=function(e){if(!e)return!1;try{const t=(0,o.readFileSync)(e,"utf8"),r=JSON.parse(t);return r.url&&r.uaa&&r.catalogs?r:(0,i.t)("ERROR_SERVICE_KEYS_INFO")}catch(e){return(0,i.t)("ERROR_SERVICE_KEYS_INFO")}},t.validateSystemName=async function(e){if(e){if(e===(0,i.t)("NEW_SYSTEM")||e===(0,i.t)("LABEL_SAP_SYSTEM_SOURCE_TYPE_SCP"))return(0,i.t)("VALIDATION_ERROR_RESERVED_SYSTEM_NAME",{systemName:e})+". "+(0,i.t)("SYSTEM_NAME_INVALID");return!await(0,s.isSystemNameInUse)(e)||(0,i.t)("SYSTEM_NAME_EXISTS")}return(0,i.t)("SYSTEM_NAME_INVALID")},t.validateODataVersion=function(e,t){try{const r=n.MetadataFactory.getMetadataFactory().getMetadataExplorer(e).v2Logger?i.ODataVersion.v2:i.ODataVersion.v4;return t&&t!==r?{validationMsg:`${c.default.logErrorMsgs((0,i.t)("ERROR_ODATA_SERVICE_VERSION_MISMATCH",{serviceVersion:r,requiredVersion:t}))}`}:{version:r}}catch(e){return{validationMsg:(0,i.t)("ERROR_ODATA_SERVICE_METADATA_INVALID")}}},t.validateDestinationAttributes=function(e){return e.isAbapCatalogDest()||e.isFullUrlDest()||e.isPartialUrlDest()}},73215:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ServiceInquirer=void 0;const a=r(1628),i=r(43895),s=r(93540),n=r(35907),o=r(77090),c=r(47937);class ServiceInquirer{constructor(e,t,r){ServiceInquirer._logger=e??a.DefaultLogger,a.ErrorHandler.logger=ServiceInquirer._logger,this.workspaceFolders=t,this.generatorInfo=r}static get logger(){return this._logger}async getAllQuestion(e,t,r,i,o){const c=[];return c.push((0,s.getSourcesQuestions)(e,t,r,o)),c.push(...(0,a.withCondition)((0,s.getLocalMetadataQuestions)(e),(e=>"File"===e.source))),c.push(...(0,a.withCondition)(await(0,s.getCapQuestions)(e,r,this.workspaceFolders),(e=>"Local Cap"===e.source))),c.push(...(0,a.withCondition)(await(0,s.getSystemConfigQuestions)(e,i,o),(e=>"SAP System"===e.source))),c.push(...(0,a.withCondition)((0,s.getServiceUrlQuestions)(e),(e=>"OData Url"===e.source))),c.push(...(0,a.withCondition)((0,n.getApiHubQuestions)(e),(e=>"SAP Business Accelerator Hub"===e.source))),c.push(...(0,a.withCondition)((0,s.getMtaQuestions)(e),(e=>"MTA File"===e.source))),c}async inquire(e,t){await(0,c.initTelemetrySettings)({modulePackageJson:{name:a.APP_GENERATOR_MODULE,version:this.generatorInfo.rootGeneratorVersion}});const r={version:t.requiredOdataVersion},s=t.promptSettings,n=await this.getAllQuestion(r,!!t.allowNoDatasource,t.capService,t.cachedSapSystem,s);return Object.assign(r,await e(n)),r.newSystemName&&r.newSystem&&!(0,i.isAppStudio)()&&(r.newSystem.name=r.newSystemName),this.answersToService(r)}answersToService(e){return{host:(e=this.cleanServiceProperties(e)).host,client:e.client,scp:e.scp,destination:e.destination,servicePath:e.servicePath,edmx:e.edmx,annotations:e.annotations,version:e.version,capService:e.capService,source:e.source,localEdmxFilePath:e.localEdmxFilePath,sapSystem:e.sapSystem??this.getNewSystemOrDestination(e),apiHubConfig:e.apiHubConfig,destinationInstance:e.destinationInstance,destinationAuthType:e.destinationAuthType,ignoreCertError:e.ignoreCertError}}getNewSystemOrDestination(e){return e.newSystem?e.newSystem:e.destination?(0,o.newSapSystemForDestinaton)({destination:e.destination,destinationInstance:e.destinationInstance,destinationAuthType:e.destinationAuthType,credentials:{username:e.destinationUser,password:e.destinationPassword}}):void 0}cleanServiceProperties(e){return["File","Local Cap"].includes(e.source)&&delete e.host,"SAP Business Accelerator Hub"!==e.source&&delete e.apiHubConfig,e}}t.ServiceInquirer=ServiceInquirer,ServiceInquirer._logger=a.DefaultLogger},35677:function(e,t,r){var a=this&&this.__createBinding||(Object.create?function(e,t,r,a){void 0===a&&(a=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,a,i)}:function(e,t,r,a){void 0===a&&(a=r),e[a]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&a(t,e,r);return i(t,e),t},n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectionValidator=void 0;const o=r(43895),c=r(1628),l=r(77090),u=n(r(28887)),d=r(16284),S=s(r(79325)),E=r(73215),m=n(r(75503)),_=n(r(95687));u.default.defaults.adapter="http";class ConnectionValidator{constructor(e=!1){this.validity={},this._isFullURLService=e,void 0===ConnectionValidator._requestLoggerId&&(ConnectionValidator._requestLoggerId=u.default.interceptors.request.use((e=>S.requestLogger(e)),S.errorLogger)),void 0===ConnectionValidator._responseLoggerId&&(ConnectionValidator._responseLoggerId=u.default.interceptors.response.use(S.responseLogger,S.errorLogger),S.setGlobalConfig({logger:e=>E.ServiceInquirer.logger.debug(e),headers:!0}))}isSAPSystem({pathname:e}){return e?.length<2||e.startsWith("/destinations")}async checkSapService(e,t,r,a=!1){const i=(0,o.isAppStudio)();try{const s=!this._isFullURLService&&this.isSAPSystem(e);s&&e.searchParams.append("$top","1");const n=Object.fromEntries(e.searchParams),o=(e.pathname+(s?d.PING_PATH:"")).replace("//","/");return!0===a&&this.setRejectUnauthorized(!a),await new l.ODataClient({system:{url:e.origin,params:n,service:o},credentials:{username:t,password:r},disableSAML:i,ignoreCertError:a}).get(),200}catch(e){if(E.ServiceInquirer.logger.debug(`ConnectionValidator.checkSapService() - error: ${e.message}`),e?.isAxiosError){if(500===e?.response?.status&&i)throw e;return e?.response?.status||e?.code}throw e}finally{this.setRejectUnauthorized(!0)}}async validateUrl({urlString:e,ignorePath:t=!1,authType:r,isServiceUrl:a=!1,ignoreCertError:i=!1,forceReValidation:s=!1}){if(this.isEmptyString(e))return this.resetValidity(),!1;try{const n=this.createUrl(e,t);if(!s&&this.isUrlValidated(e))return this.validity.reachable;if("null"===n.origin)return(0,c.t)("WARNING_INVALID_URL");const o=await this.checkSapService(n,void 0,void 0,i);if(E.ServiceInquirer.logger.debug(`ConnectionValidator.validateUrl() - status: ${o}; authType: ${r};`),this.validity.urlFormat=!0,this._validatedUrl=e,200===o)this.validity.authenticated=!0,this.validity.authRequired=!1;else{if(404===o)return this.validity.reachable=!1,a?c.ErrorHandler.getErrorMsgFromType(c.ERROR_TYPE.ODATA_URL_NOT_FOUND):c.ErrorHandler.getErrorMsgFromType(c.ERROR_TYPE.NOT_FOUND);if(c.ErrorHandler.isCertError(o))return this.validity.reachable=!1,m.default.setCurrentError(c.ErrorHandler.getErrorType(o)),m.default.getValidationErrorHelp(o,!1,c.ERROR_TYPE.CERT);if(c.ErrorHandler.isAuthCode(o)){if(!this.isAuthRequiredBasedOnAuthType(r))return m.default.logErrorMsgs((0,c.t)("ERROR_AUTHENTICATION_CONFIGURATION"))}else{if(c.ErrorHandler.isRedirect(o))return(0,c.t)("WARNING_URL_REDIRECTS");if(404!==o)return c.ErrorHandler.getErrorMsgFromType(c.ERROR_TYPE.CONNECTION,`http code: ${o}`)}}return this.validity.reachable=404!==o,this.validity.reachable}catch(t){if(c.ErrorHandler.getErrorType(t)===c.ERROR_TYPE.CONNECTION)return m.default.logErrorMsgs((0,c.t)("ERROR_SERVICE_URL_NOT_FOUND",{url:e}));this.resetValidity();const r=m.default.getErrorMsg(t);return void 0===r?(0,c.t)("WARNING_INVALID_URL"):r}}isEmptyString(e){return!e||!/\S/.test(e)}createUrl(e,t){return t&&(e=new URL(e).origin),new URL(e)}isUrlValidated(e){return this._validatedUrl===e||(this.resetValidity(),!1)}isAuthRequiredBasedOnAuthType(e){return e&&"NoAuthentication"!==e?(this.validity.authRequired=!1,!1):(this.validity.authRequired=!0,!0)}async isAuthRequired(e=this._validatedUrl,t=this._validatedClient,r=!1){if(!e)return!1;if(!1===this.validity.reachable||!1===this.validity.authRequired)return!1;if(this._validatedUrl===e&&this._validatedClient===t&&void 0!==this.validity.authRequired)return this.validity.authRequired;try{const a=new URL(e);return t&&a.searchParams.append(c.SAP_CLIENT_KEY,t),this.validity.authRequired=c.ErrorHandler.isAuthCode(await this.checkSapService(a,void 0,void 0,r)),this.validity.authRequired}catch(e){return m.default.logErrorMsgs(e),!1}}async validateAuth(e=this._validatedUrl,t,r,a,i=!1){if(!this.validity.reachable||!t||!r)return!1;try{const s=new URL(e);return a&&s.searchParams.append(c.SAP_CLIENT_KEY,a),this.validity.authenticated=200===await this.checkSapService(s,t,r,i),!0===this.validity.authenticated||(0,c.t)("ERROR_AUTHENTICATION")}catch(e){return m.default.getErrorMsg(e)}}getValidity(){return this.validity}resetValidity(){this.validity.urlFormat=!1,delete this.validity.reachable,delete this.validity.authRequired,delete this.validity.authenticated,this._validatedUrl=void 0,this._validatedClient=void 0}setRejectUnauthorized(e){_.default.globalAgent.options&&(_.default.globalAgent.options.rejectUnauthorized=e),_.default.globalAgent.fallbackAgent&&(_.default.globalAgent.fallbackAgent.options.rejectUnauthorized=e)}}t.ConnectionValidator=ConnectionValidator},16284:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SERVICE_TYPE=t.MANUAL_PATH=t.SERVICES_UNAVAILABLE_DUMMY_SYSTEM_NAME=t.PING_PATH=t.CERT_HELP_LINK=void 0;const a=r(77090);t.CERT_HELP_LINK="https://help.sap.com/viewer/17d50220bcd848aa854c9c182d65b699/Latest/en-US/4b318bede7eb4021a8be385c46c74045.html",t.PING_PATH=a.V2_CATALOG_URL_PATH+a.V2_SERVICES_PATH,t.SERVICES_UNAVAILABLE_DUMMY_SYSTEM_NAME="SYSTEM_SERVICES_UNAVAILABLE",t.MANUAL_PATH="MANUAL_PATH",t.SERVICE_TYPE={UI:"UI",NOT_CLASSIFIED:"Not Classified",WEB_API:"WEB_API"}},75503:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});const a=new(r(1628).ErrorHandler);t.default=a},2929:function(e,t,r){var a=this&&this.__createBinding||(Object.create?function(e,t,r,a){void 0===a&&(a=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,a,i)}:function(e,t,r,a){void 0===a&&(a=r),e[a]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||a(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectionValidator=void 0;var s=r(35677);Object.defineProperty(t,"ConnectionValidator",{enumerable:!0,get:function(){return s.ConnectionValidator}}),i(r(16284),t)},33774:function(e,t,r){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.validateUrl=void 0;const i=r(1628),s=a(r(75503));t.validateUrl=function(e){if(!e)return!1;try{return"null"!==new URL(e).origin||(0,i.t)("WARNING_INVALID_URL")}catch(e){return s.default.getErrorMsg(e)}}}}; |
{ | ||
"name": "@sap/generator-fiori", | ||
"displayName": "SAP Fiori application", | ||
"version": "1.12.2", | ||
"version": "1.12.3", | ||
"description": "Create an SAPUI5 application using SAP Fiori elements or a freestyle approach", | ||
@@ -74,16 +74,16 @@ "homepage": "http://www.sapfiorielements.com/", | ||
"@sap-ux/fiori-freestyle-writer": "0.21.3", | ||
"@sap-ux/project-access": "1.15.3", | ||
"@sap-ux/project-access": "1.16.2", | ||
"@sap-ux/ui5-library-inquirer": "0.2.0", | ||
"@sap-ux/ui5-library-writer": "0.3.0", | ||
"@sap/generator-fiori-deployment": "1.12.2", | ||
"@sap/generator-fiori-elements": "1.12.2", | ||
"@sap/generator-fiori-freestyle": "1.12.2", | ||
"@sap/generator-fiori-reference-lib": "1.12.2", | ||
"@sap/generator-fiori-reuse-lib": "1.12.2", | ||
"@sap/ux-cds": "1.12.2", | ||
"@sap/ux-e2e-cli-fiori": "1.12.2", | ||
"@sap/ux-feature-toggle": "1.12.2", | ||
"@sap/ux-generator-common": "1.12.2", | ||
"@sap/ux-jest-matchers": "0.8.2", | ||
"@sap/ux-jest-runner-puppeteer": "1.12.2", | ||
"@sap-ux/ui5-library-writer": "0.3.9", | ||
"@sap/generator-fiori-deployment": "1.12.3", | ||
"@sap/generator-fiori-elements": "1.12.3", | ||
"@sap/generator-fiori-freestyle": "1.12.3", | ||
"@sap/generator-fiori-reference-lib": "1.12.3", | ||
"@sap/generator-fiori-reuse-lib": "1.12.3", | ||
"@sap/ux-cds": "1.12.3", | ||
"@sap/ux-e2e-cli-fiori": "1.12.3", | ||
"@sap/ux-feature-toggle": "1.12.3", | ||
"@sap/ux-generator-common": "1.12.3", | ||
"@sap/ux-jest-matchers": "0.8.3", | ||
"@sap/ux-jest-runner-puppeteer": "1.12.3", | ||
"@types/expect-puppeteer": "4.4.5", | ||
@@ -90,0 +90,0 @@ "@types/yeoman-environment": "2.10.11", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
12859309
312
7710
24
183