@sap/generator-fiori
Version:
Create an SAPUI5 application using SAP Fiori elements or a freestyle approach
1 lines • 17.3 kB
JavaScript
(()=>{var e,r,o={48676(e){function webpackEmptyContext(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}webpackEmptyContext.keys=()=>[],webpackEmptyContext.resolve=webpackEmptyContext,webpackEmptyContext.id=48676,e.exports=webpackEmptyContext},15411(e){function webpackEmptyContext(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}webpackEmptyContext.keys=()=>[],webpackEmptyContext.resolve=webpackEmptyContext,webpackEmptyContext.id=15411,e.exports=webpackEmptyContext},1320(e){function webpackEmptyContext(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}webpackEmptyContext.keys=()=>[],webpackEmptyContext.resolve=webpackEmptyContext,webpackEmptyContext.id=1320,e.exports=webpackEmptyContext},53306(e){function webpackEmptyContext(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}webpackEmptyContext.keys=()=>[],webpackEmptyContext.resolve=webpackEmptyContext,webpackEmptyContext.id=53306,e.exports=webpackEmptyContext},9704(e,r,o){var i={"./Find-VisualStudio.cs":78280,"./build":74250,"./build.js":74250,"./clean":20575,"./clean.js":20575,"./configure":38446,"./configure.js":38446,"./create-config-gypi":55331,"./create-config-gypi.js":55331,"./download":73156,"./download.js":73156,"./find-node-directory":36958,"./find-node-directory.js":36958,"./find-python":30754,"./find-python.js":30754,"./find-visualstudio":44962,"./find-visualstudio.js":44962,"./install":83909,"./install.js":83909,"./list":94984,"./list.js":94984,"./log":18496,"./log.js":18496,"./node-gyp":41409,"./node-gyp.js":41409,"./process-release":38003,"./process-release.js":38003,"./rebuild":47437,"./rebuild.js":47437,"./remove":43388,"./remove.js":43388,"./util":82228,"./util.js":82228};function webpackContext(e){var r=webpackContextResolve(e);return o(r)}function webpackContextResolve(e){if(!o.o(i,e)){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}return i[e]}webpackContext.keys=function webpackContextKeys(){return Object.keys(i)},webpackContext.resolve=webpackContextResolve,e.exports=webpackContext,webpackContext.id=9704},69433(e,r,o){var i={"./cat":4921,"./cat.js":4921,"./cd":5414,"./cd.js":5414,"./chmod":77140,"./chmod.js":77140,"./common":46656,"./common.js":46656,"./cp":92906,"./cp.js":92906,"./dirs":54425,"./dirs.js":54425,"./echo":82448,"./echo.js":82448,"./error":75691,"./error.js":75691,"./exec":38196,"./exec-child":82587,"./exec-child.js":82587,"./exec.js":38196,"./find":1350,"./find.js":1350,"./grep":45965,"./grep.js":45965,"./head":87595,"./head.js":87595,"./ln":8267,"./ln.js":8267,"./ls":3296,"./ls.js":3296,"./mkdir":3890,"./mkdir.js":3890,"./mv":10994,"./mv.js":10994,"./popd":92148,"./popd.js":92148,"./pushd":43573,"./pushd.js":43573,"./pwd":83158,"./pwd.js":83158,"./rm":72836,"./rm.js":72836,"./sed":1285,"./sed.js":1285,"./set":6037,"./set.js":6037,"./sort":62909,"./sort.js":62909,"./tail":77795,"./tail.js":77795,"./tempdir":58988,"./tempdir.js":58988,"./test":99237,"./test.js":99237,"./to":59951,"./to.js":59951,"./toEnd":34339,"./toEnd.js":34339,"./touch":12062,"./touch.js":12062,"./uniq":23256,"./uniq.js":23256,"./which":52540,"./which.js":52540};function webpackContext(e){var r=webpackContextResolve(e);return o(r)}function webpackContextResolve(e){if(!o.o(i,e)){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}return i[e]}webpackContext.keys=function webpackContextKeys(){return Object.keys(i)},webpackContext.resolve=webpackContextResolve,e.exports=webpackContext,webpackContext.id=69433},10249(e,r,o){"use strict";o.r(r),o.d(r,{default:()=>l});var i=o(58012),s=o(73024),n=o(76760),a=o(91170),p=o.n(a),c=o(17635);const _=JSON.parse('{"DEBUG_MSG_ADAPTOR_MATCH_FOUND":"An adaptor has been found matching the specified input data: {{adaptorName}}.","DEBUG_MSG_NO_ADAPTOR_MATCH_FOUND":"No adaptors have been found matching the input data.","DEBUG_MSG_APP_GEN_LAUNCHED_WITH_DATA":"SAP Fiori Generator was launched with the data: {{- inputData}}.","INFO_GENERATOR_ARG_APP_CONFIG":"Path to the application config file or application config as a string.","ERROR_ARG_OR_OPTION_HEADLESS_GENERATOR":"Please provide one of the following: the first argument of the file path to the app config, the first argument of the app config file as a JSON string or an `appconfig` option as a JSON object.","INFO_REMOVING_EXISTING_APP_FOLDER_FORCE_OPTION":"The `--force` option was specified. The existing application at the path: {{-projectPath}} will be overwritten.","ERROR_APP_FOLDER_EXISTS":"A folder with the application name already exists at path: {{- projectPath}}. Choose a different folder.","INFO_APP_TARGET_FOLDER":"An application will be generated at path: {{- targetFolder}}","INFO_DELETING_APPLICATION_CONFIG_FILE":"Deleting application config file: {{- filepath}}.","LABEL_SELECTED_TEMPLATE_BREADCRUMB":"Template","CREATE_APP_MESSAGE":"Which template do you want to use?","INFO_MSG_CLI_ARGUMENT_LOG_LEVEL_DESCRIPTION":"Log level settings. Possible options: trace < debug < info < warn < error < fatal < off.","INFO_OPTIONS_DISABLE_GENERATOR_EXTENSIONS":"Disables search and loading of generator extensions.","LOGGING_INITIALISED":"`LogWrapper` initialized at log level: {{logLevel}}.","INFO_MSG_SUB_GENERATOR_FOUND":"The installed generator: {{-generatorInfo.name}}@{{-generatorInfo.version}} has been found at path: {{-generatorInfo.path}}.","INFO_MSG_SUB_GENERATOR_APPLIED":"The generator extension: {{-generatorInfo.name}}@{{-generatorInfo.version}} will be integrated to the SAP Fiori Generator. Steps added: {{-generatorInfo.additionalSteps}}. Extension points added: {{-generatorInfo.extensionsAdded}}.","ERROR_GENERATION_EXITING":"Application generation exited due to the error: {{error}}.","PROJECT_ACCELERATOR_TEXT":"Looking to generate your SAP Fiori elements application directly from your business requirements? Try the ","PROJECT_ACCELERATOR_ACTION_TEXT":"Project Accelerator.","PROJECT_ACCELERATOR_ARIA_LABEL":"Project Accelerator Banner","DEBUG_MSG_HELP_EXTENSION_NOT_INSTALLED":"The required extension \'{{extensionId}}\' is not installed.","DEBUG_MSG_COMMAND_NOT_REGISTERED":"The required command \'{{commandName}}\' is not registered.","DEBUG_MSG_FIORI_AI_CHECK_FAILED":"An error occurred when checking the availability of SAP Fiori AI: {{error}}."}'),u="common",d=c.Ay.createInstance();function t(e,r){return d.t(e,r)}(async function initI18n(){await d.init({resources:{en:{[u]:_}},lng:"en",fallbackLng:"en",defaultNS:u,ns:[u],interpolation:{format:function odataVersionFormatter(e){return e?` V${e}`:""},defaultVariables:{defaultProjectNumber:1}},missingInterpolationHandler:()=>"",showSupportNotice:!1})})().catch(()=>{});const l=class extends(p()){arguments;absAppConfigPath;appConfig;constructor(e,r){super(e,r,{unique:"namespace"}),r.testMode||this.env.lookup({packagePatterns:["@sap/generator-fiori"]});try{if(this.arguments=e,this.argument("appconfig",{type:String,description:t("INFO_GENERATOR_ARG_APP_CONFIG"),required:!1}),!this.options.appconfig)throw Error(t("ERROR_ARG_OR_OPTION_HEADLESS_GENERATOR"));let r;if("object"==typeof this.options.appconfig?r=this.options.appconfig:(0,s.existsSync)(this.options.appconfig)?(r=JSON.parse((0,s.readFileSync)(this.options.appconfig,"utf-8")),this.absAppConfigPath=(0,n.resolve)(this.options.appconfig)):r=JSON.parse(this.options.appconfig),this.argument("targetfolder",{type:String,required:!1}),this.options.targetfolder?r.project.targetFolder=(0,n.isAbsolute)(this.options.targetfolder)?this.options.targetfolder:(0,n.join)(process.cwd(),r.project.targetFolder||""):r.project.targetFolder&&!(0,n.isAbsolute)(r.project.targetFolder)&&(r.project.targetFolder=(0,n.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,n.join)(r.project.targetFolder||process.cwd(),r.project.name);if((0,s.existsSync)(e)){if(!this.options.force)throw Error(t("ERROR_APP_FOLDER_EXISTS",{projectPath:e}));this.log(t("INFO_REMOVING_EXISTING_APP_FOLDER_FORCE_OPTION",{projectPath:e})),(0,s.rmSync)(e,{recursive:!0,force:!0})}this.log(t("INFO_APP_TARGET_FOLDER",{targetFolder:r.project.targetFolder}))}this.appConfig=r}catch(e){throw this.log(t("ERROR_GENERATION_EXITING")),e}}_getTargetFolder(){return this.appConfig.service?.capService?.projectPath?(0,n.join)(this.appConfig.service.capService.projectPath,this.appConfig.service.capService.appPath??(0,i.getCapFolderPathsSync)(this.appConfig.service.capService.projectPath).app):this.options.appConfig.project.targetFolder}async initializing(){const e=function getFioriAppSubGeneratorName(e){return"@sap/fiori:fiori-app-sub-gen"+(e?"_headless":"")}(!0);await this.composeWith(e,{arguments:this.arguments,...Object.assign(this.options,{appConfig:this.appConfig})}),this.options.additionalTelemetryData={AppGenLaunchSource:this.options.appConfig.telemetryData?.generationSourceName??"Headless",AppGenLaunchSourceVersion:this.options.appConfig.telemetryData?.generationSourceVersion??"Not Provided"},this.appConfig.deployConfig&&(this.options.appConfig.project.targetFolder=this._getTargetFolder(),await this.composeWith("@sap/fiori:fiori-deployment_headless",{arguments:this.arguments,...this.options})),this.appConfig.flpConfig&&await this._addFlpConfig()}async _addFlpConfig(){const e=this.appConfig.flpConfig;this.appConfig.project.targetFolder=this._getTargetFolder();const r={inboundConfig:{semanticObject:e.semanticObject||(0,i.getSemanticObject)(this.appConfig.project.name).replace("#",""),action:e.action,title:e.title},skipPrompt:!0,launchFlpConfigAsSubGenerator:!0,appRootPath:(0,n.join)(this.appConfig.project.targetFolder,this.appConfig.project.name),telemetryData:this.options.additionalTelemetryData};await this.composeWith("@sap/fiori:flp-config",{arguments:this.arguments,...this.options,...r})}end(){this.options.deleteFile&&(0,s.existsSync)(this.absAppConfigPath)&&(this.log(t("INFO_DELETING_APPLICATION_CONFIG_FILE",{filepath:this.absAppConfigPath})),(0,s.unlinkSync)(this.absAppConfigPath))}}},6533(e){function webpackEmptyContext(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}webpackEmptyContext.keys=()=>[],webpackEmptyContext.resolve=webpackEmptyContext,webpackEmptyContext.id=6533,e.exports=webpackEmptyContext},29963(e){function webpackEmptyContext(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}webpackEmptyContext.keys=()=>[],webpackEmptyContext.resolve=webpackEmptyContext,webpackEmptyContext.id=29963,e.exports=webpackEmptyContext},40632(e){function webpackEmptyContext(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}webpackEmptyContext.keys=()=>[],webpackEmptyContext.resolve=webpackEmptyContext,webpackEmptyContext.id=40632,e.exports=webpackEmptyContext},72470(e){"use strict";e.exports=require("@zowe/secrets-for-zowe-sdk")},5827(e){"use strict";e.exports=require("applicationinsights-native-metrics")},54980(e){"use strict";e.exports=require("vscode")},42613(e){"use strict";e.exports=require("assert")},90290(e){"use strict";e.exports=require("async_hooks")},20181(e){"use strict";e.exports=require("buffer")},35317(e){"use strict";e.exports=require("child_process")},64236(e){"use strict";e.exports=require("console")},49140(e){"use strict";e.exports=require("constants")},76982(e){"use strict";e.exports=require("crypto")},72250(e){"use strict";e.exports=require("dns")},24434(e){"use strict";e.exports=require("events")},79896(e){"use strict";e.exports=require("fs")},91943(e){"use strict";e.exports=require("fs/promises")},58611(e){"use strict";e.exports=require("http")},85675(e){"use strict";e.exports=require("http2")},65692(e){"use strict";e.exports=require("https")},73339(e){"use strict";e.exports=require("module")},69278(e){"use strict";e.exports=require("net")},34589(e){"use strict";e.exports=require("node:assert")},31421(e){"use strict";e.exports=require("node:child_process")},77598(e){"use strict";e.exports=require("node:crypto")},78474(e){"use strict";e.exports=require("node:events")},73024(e){"use strict";e.exports=require("node:fs")},51455(e){"use strict";e.exports=require("node:fs/promises")},37067(e){"use strict";e.exports=require("node:http")},44708(e){"use strict";e.exports=require("node:https")},98995(e){"use strict";e.exports=require("node:module")},48161(e){"use strict";e.exports=require("node:os")},76760(e){"use strict";e.exports=require("node:path")},58152(e){"use strict";e.exports=require("node:path/win32")},1708(e){"use strict";e.exports=require("node:process")},57075(e){"use strict";e.exports=require("node:stream")},46193(e){"use strict";e.exports=require("node:string_decoder")},73136(e){"use strict";e.exports=require("node:url")},57975(e){"use strict";e.exports=require("node:util")},38522(e){"use strict";e.exports=require("node:zlib")},70857(e){"use strict";e.exports=require("os")},16928(e){"use strict";e.exports=require("path")},82987(e){"use strict";e.exports=require("perf_hooks")},932(e){"use strict";e.exports=require("process")},83480(e){"use strict";e.exports=require("querystring")},2203(e){"use strict";e.exports=require("stream")},13193(e){"use strict";e.exports=require("string_decoder")},53557(e){"use strict";e.exports=require("timers")},16460(e){"use strict";e.exports=require("timers/promises")},64756(e){"use strict";e.exports=require("tls")},52018(e){"use strict";e.exports=require("tty")},87016(e){"use strict";e.exports=require("url")},39023(e){"use strict";e.exports=require("util")},43106(e){"use strict";e.exports=require("zlib")},15224(e){"use strict";e.exports=JSON.parse('{"name":"@sap-ux/telemetry","version":"0.6.104","description":"Library for sending usage telemetry data","repository":{"type":"git","url":"https://github.com/SAP/open-ux-tools.git","directory":"packages/telemetry"},"bugs":{"url":"https://github.com/SAP/open-ux-tools/issues?q=is%3Aopen+is%3Aissue+label%3Abug+label%3Atelemetry"},"license":"Apache-2.0","private":false,"main":"dist/index.js","dependencies":{"applicationinsights":"2.9.8","axios":"1.16.0","performance-now":"2.1.0","yaml":"2.8.3","@sap-ux/store":"1.5.13","@sap-ux/project-access":"1.36.3","@sap-ux/btp-utils":"1.1.15","@sap-ux/ui5-config":"0.30.4","@sap-ux/logger":"0.8.5","@sap-ux/nodejs-utils":"0.2.22"},"devDependencies":{"jest-extended":"7.0.0","memfs":"3.4.13","unionfs":"4.6.0","dotenv":"17.4.2"},"files":["dist","LICENSE","!dist/*.map","!dist/**/*.map"],"engines":{"node":">=20.x"},"scripts":{"build":"tsc --build","watch":"tsc --watch","clean":"rimraf --glob dist coverage *.tsbuildinfo","format":"prettier --write \'**/*.{js,json,ts,yaml,yml}\' --ignore-path ../../.prettierignore","lint":"eslint","lint:fix":"eslint --fix","test":"jest --ci --forceExit --detectOpenHandles --colors","test-u":"jest --ci --forceExit --detectOpenHandles --colors -u","link":"pnpm link --global","unlink":"pnpm unlink --global","example":"ts-node example/index.ts"}}')}},i={};function __webpack_require__(e){var r=i[e];if(void 0!==r)return r.exports;var s=i[e]={id:e,loaded:!1,exports:{}};return o[e].call(s.exports,s,s.exports,__webpack_require__),s.loaded=!0,s.exports}__webpack_require__.m=o,__webpack_require__.c=i,__webpack_require__.x=()=>{var e=__webpack_require__.O(void 0,[6288,5019,4977],()=>__webpack_require__(__webpack_require__.s=10249));return e=__webpack_require__.O(e)},e=[],__webpack_require__.O=(r,o,i,s)=>{if(!o){var n=1/0;for(_=0;_<e.length;_++){for(var[o,i,s]=e[_],a=!0,p=0;p<o.length;p++)(!1&s||n>=s)&&Object.keys(__webpack_require__.O).every(e=>__webpack_require__.O[e](o[p]))?o.splice(p--,1):(a=!1,s<n&&(n=s));if(a){e.splice(_--,1);var c=i();void 0!==c&&(r=c)}}return r}s=s||0;for(var _=e.length;_>0&&e[_-1][2]>s;_--)e[_]=e[_-1];e[_]=[o,i,s]},__webpack_require__.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(r,{a:r}),r},__webpack_require__.d=(e,r)=>{for(var o in r)__webpack_require__.o(r,o)&&!__webpack_require__.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:r[o]})},__webpack_require__.f={},__webpack_require__.e=e=>Promise.all(Object.keys(__webpack_require__.f).reduce((r,o)=>(__webpack_require__.f[o](e,r),r),[])),__webpack_require__.u=e=>({4977:"fiori-generator-shared/dist",5019:"open-ux-shared",6288:"commonlibs"}[e]+"/index.js"),__webpack_require__.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),__webpack_require__.j=9906,__webpack_require__.p="",(()=>{var e={9906:1};__webpack_require__.O.require=r=>e[r];__webpack_require__.f.require=(r,o)=>{if(!e[r]){var i=require("../"+__webpack_require__.u(r));e[r]||(r=>{var o=r.modules,i=r.ids,s=r.runtime;for(var n in o)__webpack_require__.o(o,n)&&(__webpack_require__.m[n]=o[n]);s&&s(__webpack_require__);for(var a=0;a<i.length;a++)e[i[a]]=1;__webpack_require__.O()})(i)}}})(),r=__webpack_require__.x,__webpack_require__.x=()=>(__webpack_require__.e(6288),__webpack_require__.e(5019),__webpack_require__.e(4977),r());var s=__webpack_require__.x();module.exports=s})();