UNPKG

@sap/generator-fiori

Version:

Create an SAPUI5 application using SAP Fiori elements or a freestyle approach

7 lines (6 loc) 10.5 kB
const __esmImportMetaUrl = require('node:url').pathToFileURL(__filename).href; var ee=Object.defineProperty;var n=(e,r)=>ee(e,"name",{value:r,configurable:!0});var O=(e,r)=>()=>{try{return r||e((r={exports:{}}).exports,r),r.exports}catch(t){throw r=0,t}};var j=O((Ee,N)=>{var w=1e3,v=w*60,x=v*60,y=x*24,te=y*7,re=y*365.25;N.exports=function(e,r){r=r||{};var t=typeof e;if(t==="string"&&e.length>0)return ne(e);if(t==="number"&&isFinite(e))return r.long?oe(e):se(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function ne(e){if(e=String(e),!(e.length>100)){var r=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(r){var t=parseFloat(r[1]),s=(r[2]||"ms").toLowerCase();switch(s){case"years":case"year":case"yrs":case"yr":case"y":return t*re;case"weeks":case"week":case"w":return t*te;case"days":case"day":case"d":return t*y;case"hours":case"hour":case"hrs":case"hr":case"h":return t*x;case"minutes":case"minute":case"mins":case"min":case"m":return t*v;case"seconds":case"second":case"secs":case"sec":case"s":return t*w;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}}}n(ne,"parse");function se(e){var r=Math.abs(e);return r>=y?Math.round(e/y)+"d":r>=x?Math.round(e/x)+"h":r>=v?Math.round(e/v)+"m":r>=w?Math.round(e/w)+"s":e+"ms"}n(se,"fmtShort");function oe(e){var r=Math.abs(e);return r>=y?R(e,r,y,"day"):r>=x?R(e,r,x,"hour"):r>=v?R(e,r,v,"minute"):r>=w?R(e,r,w,"second"):e+" ms"}n(oe,"fmtLong");function R(e,r,t,s){var d=r>=t*1.5;return Math.round(e/t)+" "+s+(d?"s":"")}n(R,"plural")});var L=O((Re,D)=>{function ie(e){t.debug=t,t.default=t,t.coerce=Z,t.disable=J,t.enable=d,t.enabled=W,t.humanize=j(),t.destroy=H,Object.keys(e).forEach(o=>{t[o]=e[o]}),t.names=[],t.skips=[],t.formatters={};function r(o){let i=0;for(let c=0;c<o.length;c++)i=(i<<5)-i+o.charCodeAt(c),i|=0;return t.colors[Math.abs(i)%t.colors.length]}n(r,"selectColor"),t.selectColor=r;function t(o){let i,c=null,l,b;function f(...p){if(!f.enabled)return;let g=f,E=Number(new Date),K=E-(i||E);g.diff=K,g.prev=i,g.curr=E,i=E,p[0]=t.coerce(p[0]),typeof p[0]!="string"&&p.unshift("%O");let I=0;p[0]=p[0].replace(/%([a-zA-Z%])/g,(_,Q)=>{if(_==="%%")return"%";I++;let S=t.formatters[Q];if(typeof S=="function"){let X=p[I];_=S.call(g,X),p.splice(I,1),I--}return _}),t.formatArgs.call(g,p),(g.log||t.log).apply(g,p)}return n(f,"debug"),f.namespace=o,f.useColors=t.useColors(),f.color=t.selectColor(o),f.extend=s,f.destroy=t.destroy,Object.defineProperty(f,"enabled",{enumerable:!0,configurable:!1,get:n(()=>c!==null?c:(l!==t.namespaces&&(l=t.namespaces,b=t.enabled(o)),b),"get"),set:n(p=>{c=p},"set")}),typeof t.init=="function"&&t.init(f),f}n(t,"createDebug");function s(o,i){let c=t(this.namespace+(typeof i>"u"?":":i)+o);return c.log=this.log,c}n(s,"extend");function d(o){t.save(o),t.namespaces=o,t.names=[],t.skips=[];let i=(typeof o=="string"?o:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let c of i)c[0]==="-"?t.skips.push(c.slice(1)):t.names.push(c)}n(d,"enable");function F(o,i){let c=0,l=0,b=-1,f=0;for(;c<o.length;)if(l<i.length&&(i[l]===o[c]||i[l]==="*"))i[l]==="*"?(b=l,f=c,l++):(c++,l++);else if(b!==-1)l=b+1,f++,c=f;else return!1;for(;l<i.length&&i[l]==="*";)l++;return l===i.length}n(F,"matchesTemplate");function J(){let o=[...t.names,...t.skips.map(i=>"-"+i)].join(",");return t.enable(""),o}n(J,"disable");function W(o){for(let i of t.skips)if(F(o,i))return!1;for(let i of t.names)if(F(o,i))return!0;return!1}n(W,"enabled");function Z(o){return o instanceof Error?o.stack||o.message:o}n(Z,"coerce");function H(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n(H,"destroy"),t.enable(t.load()),t}n(ie,"setup");D.exports=ie});var q=O((C,A)=>{C.formatArgs=ue;C.save=ae;C.load=le;C.useColors=ce;C.storage=fe();C.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();C.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function ce(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}n(ce,"useColors");function ue(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+A.exports.humanize(this.diff),!this.useColors)return;let r="color: "+this.color;e.splice(1,0,r,"color: inherit");let t=0,s=0;e[0].replace(/%[a-zA-Z%]/g,d=>{d!=="%%"&&(t++,d==="%c"&&(s=t))}),e.splice(s,0,r)}n(ue,"formatArgs");C.log=console.debug||console.log||(()=>{});function ae(e){try{e?C.storage.setItem("debug",e):C.storage.removeItem("debug")}catch{}}n(ae,"save");function le(){let e;try{e=C.storage.getItem("debug")||C.storage.getItem("DEBUG")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}n(le,"load");function fe(){try{return localStorage}catch{}}n(fe,"localstorage");A.exports=L()(C);var{formatters:Ce}=A.exports;Ce.j=function(e){try{return JSON.stringify(e)}catch(r){return"[UnexpectedJSONParseError]: "+r.message}}});var P=O((Te,G)=>{"use strict";G.exports=(e,r=process.argv)=>{let t=e.startsWith("-")?"":e.length===1?"-":"--",s=r.indexOf(t+e),d=r.indexOf("--");return s!==-1&&(d===-1||s<d)}});var $=O((_e,z)=>{"use strict";var de=require("os"),U=require("tty"),h=P(),{env:u}=process,m;h("no-color")||h("no-colors")||h("color=false")||h("color=never")?m=0:(h("color")||h("colors")||h("color=true")||h("color=always"))&&(m=1);"FORCE_COLOR"in u&&(u.FORCE_COLOR==="true"?m=1:u.FORCE_COLOR==="false"?m=0:m=u.FORCE_COLOR.length===0?1:Math.min(parseInt(u.FORCE_COLOR,10),3));function k(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}n(k,"translateLevel");function B(e,r){if(m===0)return 0;if(h("color=16m")||h("color=full")||h("color=truecolor"))return 3;if(h("color=256"))return 2;if(e&&!r&&m===void 0)return 0;let t=m||0;if(u.TERM==="dumb")return t;if(process.platform==="win32"){let s=de.release().split(".");return Number(s[0])>=10&&Number(s[2])>=10586?Number(s[2])>=14931?3:2:1}if("CI"in u)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(s=>s in u)||u.CI_NAME==="codeship"?1:t;if("TEAMCITY_VERSION"in u)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(u.TEAMCITY_VERSION)?1:0;if(u.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in u){let s=parseInt((u.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(u.TERM_PROGRAM){case"iTerm.app":return s>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(u.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(u.TERM)||"COLORTERM"in u?1:t}n(B,"supportsColor");function pe(e){let r=B(e,e&&e.isTTY);return k(r)}n(pe,"getSupportLevel");z.exports={supportsColor:pe,stdout:k(B(!0,U.isatty(1))),stderr:k(B(!0,U.isatty(2)))}});var Y=O((a,T)=>{var he=require("tty"),M=require("util");a.init=we;a.log=ye;a.formatArgs=Fe;a.save=be;a.load=Oe;a.useColors=me;a.destroy=M.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");a.colors=[6,2,3,4,5,1];try{let e=$();e&&(e.stderr||e).level>=2&&(a.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}a.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,r)=>{let t=r.substring(6).toLowerCase().replace(/_([a-z])/g,(d,F)=>F.toUpperCase()),s=process.env[r];return/^(yes|on|true|enabled)$/i.test(s)?s=!0:/^(no|off|false|disabled)$/i.test(s)?s=!1:s==="null"?s=null:s=Number(s),e[t]=s,e},{});function me(){return"colors"in a.inspectOpts?!!a.inspectOpts.colors:he.isatty(process.stderr.fd)}n(me,"useColors");function Fe(e){let{namespace:r,useColors:t}=this;if(t){let s=this.color,d="\x1B[3"+(s<8?s:"8;5;"+s),F=` ${d};1m${r} \x1B[0m`;e[0]=F+e[0].split(` `).join(` `+F),e.push(d+"m+"+T.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=ge()+r+" "+e[0]}n(Fe,"formatArgs");function ge(){return a.inspectOpts.hideDate?"":new Date().toISOString()+" "}n(ge,"getDate");function ye(...e){return process.stderr.write(M.formatWithOptions(a.inspectOpts,...e)+` `)}n(ye,"log");function be(e){e?process.env.DEBUG=e:delete process.env.DEBUG}n(be,"save");function Oe(){return process.env.DEBUG}n(Oe,"load");function we(e){e.inspectOpts={};let r=Object.keys(a.inspectOpts);for(let t=0;t<r.length;t++)e.inspectOpts[r[t]]=a.inspectOpts[r[t]]}n(we,"init");T.exports=L()(a);var{formatters:V}=T.exports;V.o=function(e){return this.inspectOpts.colors=this.useColors,M.inspect(e,this.inspectOpts).split(` `).map(r=>r.trim()).join(" ")};V.O=function(e){return this.inspectOpts.colors=this.useColors,M.inspect(e,this.inspectOpts)}});typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?module.exports=q():module.exports=Y();