@nocobase/plugin-client 2.1.0-alpha.4 → 2.1.0-alpha.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -661
- package/README.md +79 -10
- package/client-v2.d.ts +2 -0
- package/client-v2.js +1 -0
- package/dist/client/index.js +1 -1
- package/dist/client/routesTableSchema.d.ts +2 -0
- package/dist/client/utils/updateRoutesInBatch.d.ts +17 -0
- package/dist/client-v2/index.d.ts +10 -0
- package/dist/client-v2/index.js +10 -0
- package/dist/client-v2/plugin.d.ts +13 -0
- package/dist/collections/desktopRoutes.js +9 -2
- package/dist/collections/mobileRoutes.js +9 -2
- package/dist/externalVersion.js +6 -6
- package/dist/locale/de-DE.json +5 -6
- package/dist/locale/en-US.json +20 -5
- package/dist/locale/es-ES.json +5 -6
- package/dist/locale/fr-FR.json +5 -6
- package/dist/locale/hu-HU.json +5 -6
- package/dist/locale/id-ID.json +5 -6
- package/dist/locale/it-IT.json +5 -6
- package/dist/locale/ja-JP.json +5 -6
- package/dist/locale/ko-KR.json +5 -6
- package/dist/locale/nl-NL.json +5 -6
- package/dist/locale/pt-BR.json +5 -6
- package/dist/locale/ru-RU.json +5 -6
- package/dist/locale/tr-TR.json +5 -6
- package/dist/locale/uk-UA.json +5 -6
- package/dist/locale/vi-VN.json +5 -6
- package/dist/locale/zh-CN.json +22 -7
- package/dist/locale/zh-TW.json +5 -6
- package/dist/node_modules/cronstrue/dist/cronstrue.js +1 -1
- package/dist/node_modules/cronstrue/package.json +1 -1
- package/dist/server/migrations/202605121200-clean-orphan-flow-route-models.d.ts +13 -0
- package/dist/server/migrations/202605121200-clean-orphan-flow-route-models.js +131 -0
- package/dist/server/server.js +39 -10
- package/dist/swagger/index.d.ts +248 -0
- package/dist/swagger/index.js +222 -0
- package/package.json +4 -4
- package/dist/swagger/index.json +0 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){var e={622:function(e){(function webpackUniversalModuleDefinition(t,r){if(true)e.exports=r();else{}})(globalThis,(()=>(()=>{"use strict";var e={794:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.CronParser=void 0;var n=r(586);var i=function(){function CronParser(e,t,r){if(t===void 0){t=true}if(r===void 0){r=false}this.expression=e;this.dayOfWeekStartIndexZero=t;this.monthStartIndexZero=r}CronParser.prototype.parse=function(){var e=this.extractParts(this.expression);this.normalize(e);this.validate(e);return e};CronParser.prototype.extractParts=function(e){if(!this.expression){throw new Error("cron expression is empty")}var t=e.trim().split(/[ ]+/);for(var r=0;r<t.length;r++){if(t[r].includes(",")){var n=t[r].split(",").map((function(e){return e.trim()})).filter((function(e){return e!==""})).map((function(e){return!isNaN(Number(e))?Number(e):e})).filter((function(e){return e!==null&&e!==""}));if(n.length===0){n.push("*")}n.sort((function(e,t){return e!==null&&t!==null?e-t:0}));t[r]=n.map((function(e){return e!==null?e.toString():""})).join(",")}}if(t.length<5){throw new Error("Expression has only ".concat(t.length," part").concat(t.length==1?"":"s",". At least 5 parts are required."))}else if(t.length==5){t.unshift("");t.push("")}else if(t.length==6){var i=/\d{4}$/.test(t[5])||t[4]=="?"||t[2]=="?";if(i){t.unshift("")}else{t.push("")}}else if(t.length>7){throw new Error("Expression has ".concat(t.length," parts; too many!"))}return t};CronParser.prototype.normalize=function(e){var t=this;e[3]=e[3].replace("?","*");e[5]=e[5].replace("?","*");e[2]=e[2].replace("?","*");if(e[0].indexOf("0/")==0){e[0]=e[0].replace("0/","*/")}if(e[1].indexOf("0/")==0){e[1]=e[1].replace("0/","*/")}if(e[2].indexOf("0/")==0){e[2]=e[2].replace("0/","*/")}if(e[3].indexOf("1/")==0){e[3]=e[3].replace("1/","*/")}if(e[4].indexOf("1/")==0){e[4]=e[4].replace("1/","*/")}if(e[6].indexOf("1/")==0){e[6]=e[6].replace("1/","*/")}e[5]=e[5].replace(/(^\d)|([^#/\s]\d)/g,(function(e){var r=e.replace(/\D/,"");var n=r;if(t.dayOfWeekStartIndexZero){if(r=="7"){n="0"}}else{n=(parseInt(r)-1).toString()}return e.replace(r,n)}));if(e[5]=="L"){e[5]="6"}if(e[3]=="?"){e[3]="*"}if(e[3].indexOf("W")>-1&&(e[3].indexOf(",")>-1||e[3].indexOf("-")>-1)){throw new Error("The 'W' character can be specified only when the day-of-month is a single day, not a range or list of days.")}var r={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6};for(var n in r){e[5]=e[5].replace(new RegExp(n,"gi"),r[n].toString())}e[4]=e[4].replace(/(^\d{1,2})|([^#/\s]\d{1,2})/g,(function(e){var r=e.replace(/\D/,"");var n=r;if(t.monthStartIndexZero){n=(parseInt(r)+1).toString()}return e.replace(r,n)}));var i={JAN:1,FEB:2,MAR:3,APR:4,MAY:5,JUN:6,JUL:7,AUG:8,SEP:9,OCT:10,NOV:11,DEC:12};for(var o in i){e[4]=e[4].replace(new RegExp(o,"gi"),i[o].toString())}if(e[0]=="0"){e[0]=""}if(!/\*|\-|\,|\//.test(e[2])&&(/\*|\//.test(e[1])||/\*|\//.test(e[0]))){e[2]+="-".concat(e[2])}for(var s=0;s<e.length;s++){if(e[s].indexOf(",")!=-1){e[s]=e[s].split(",").filter((function(e){return e!==""})).join(",")||"*"}if(e[s]=="*/1"){e[s]="*"}if(e[s].indexOf("/")>-1&&!/^\*|\-|\,/.test(e[s])){var a=null;switch(s){case 4:a="12";break;case 5:a="6";break;case 6:a="9999";break;default:a=null;break}if(a!==null){var u=e[s].split("/");e[s]="".concat(u[0],"-").concat(a,"/").concat(u[1])}}}};CronParser.prototype.validate=function(e){this.assertNoInvalidCharacters("DOW",e[5]);this.assertNoInvalidCharacters("DOM",e[3]);this.validateRange(e)};CronParser.prototype.validateRange=function(e){n.default.secondRange(e[0]);n.default.minuteRange(e[1]);n.default.hourRange(e[2]);n.default.dayOfMonthRange(e[3]);n.default.monthRange(e[4],this.monthStartIndexZero);n.default.dayOfWeekRange(e[5],this.dayOfWeekStartIndexZero)};CronParser.prototype.assertNoInvalidCharacters=function(e,t){var r=t.match(/[A-KM-VX-Z]+/gi);if(r&&r.length){throw new Error("".concat(e," part contains invalid values: '").concat(r.toString(),"'"))}};return CronParser}();t.CronParser=i},728:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.ExpressionDescriptor=void 0;var n=r(910);var i=r(794);var o=function(){function ExpressionDescriptor(e,t){this.expression=e;this.options=t;this.expressionParts=new Array(5);if(!this.options.locale&&ExpressionDescriptor.defaultLocale){this.options.locale=ExpressionDescriptor.defaultLocale}if(!ExpressionDescriptor.locales[this.options.locale]){var r=Object.keys(ExpressionDescriptor.locales)[0];console.warn("Locale '".concat(this.options.locale,"' could not be found; falling back to '").concat(r,"'."));this.options.locale=r}this.i18n=ExpressionDescriptor.locales[this.options.locale];if(t.use24HourTimeFormat===undefined){t.use24HourTimeFormat=this.i18n.use24HourTimeFormatByDefault()}}ExpressionDescriptor.toString=function(e,t){var r=t===void 0?{}:t,n=r.throwExceptionOnParseError,i=n===void 0?true:n,o=r.verbose,s=o===void 0?false:o,a=r.dayOfWeekStartIndexZero,u=a===void 0?true:a,c=r.monthStartIndexZero,f=c===void 0?false:c,p=r.use24HourTimeFormat,h=r.locale,l=h===void 0?null:h,d=r.tzOffset,m=d===void 0?0:d;var y={throwExceptionOnParseError:i,verbose:s,dayOfWeekStartIndexZero:u,monthStartIndexZero:f,use24HourTimeFormat:p,locale:l,tzOffset:m};var v=new ExpressionDescriptor(e,y);return v.getFullDescription()};ExpressionDescriptor.initialize=function(e,t){if(t===void 0){t="en"}ExpressionDescriptor.specialCharacters=["/","-",",","*"];ExpressionDescriptor.defaultLocale=t;e.load(ExpressionDescriptor.locales)};ExpressionDescriptor.prototype.getFullDescription=function(){var e="";try{var t=new i.CronParser(this.expression,this.options.dayOfWeekStartIndexZero,this.options.monthStartIndexZero);this.expressionParts=t.parse();var r=this.getTimeOfDayDescription();var n=this.getDayOfMonthDescription();var o=this.getMonthDescription();var s=this.getDayOfWeekDescription();var a=this.getYearDescription();e+=r+n+s+o+a;e=this.transformVerbosity(e,!!this.options.verbose);e=e.charAt(0).toLocaleUpperCase()+e.substr(1)}catch(t){if(!this.options.throwExceptionOnParseError){e=this.i18n.anErrorOccuredWhenGeneratingTheExpressionD()}else{throw"".concat(t)}}return e};ExpressionDescriptor.prototype.getTimeOfDayDescription=function(){var e=this.expressionParts[0];var t=this.expressionParts[1];var r=this.expressionParts[2];var i="";if(!n.StringUtilities.containsAny(t,ExpressionDescriptor.specialCharacters)&&!n.StringUtilities.containsAny(r,ExpressionDescriptor.specialCharacters)&&!n.StringUtilities.containsAny(e,ExpressionDescriptor.specialCharacters)){i+=this.i18n.atSpace()+this.formatTime(r,t,e)}else if(!e&&t.indexOf("-")>-1&&!(t.indexOf(",")>-1)&&!(t.indexOf("/")>-1)&&!n.StringUtilities.containsAny(r,ExpressionDescriptor.specialCharacters)){var o=t.split("-");i+=n.StringUtilities.format(this.i18n.everyMinuteBetweenX0AndX1(),this.formatTime(r,o[0],""),this.formatTime(r,o[1],""))}else if(!e&&r.indexOf(",")>-1&&r.indexOf("-")==-1&&r.indexOf("/")==-1&&!n.StringUtilities.containsAny(t,ExpressionDescriptor.specialCharacters)){var s=r.split(",");i+=this.i18n.at();for(var a=0;a<s.length;a++){i+=" ";i+=this.formatTime(s[a],t,"");if(a<s.length-2){i+=","}if(a==s.length-2){i+=this.i18n.spaceAnd()}}}else{var u=this.getSecondsDescription();var c=this.getMinutesDescription();var f=this.getHoursDescription();i+=u;if(i&&c){i+=", "}i+=c;if(c===f){return i}if(i&&f){i+=", "}i+=f}return i};ExpressionDescriptor.prototype.getSecondsDescription=function(){var e=this;var t=this.getSegmentDescription(this.expressionParts[0],this.i18n.everySecond(),(function(e){return e}),(function(t){return n.StringUtilities.format(e.i18n.everyX0Seconds(t),t)}),(function(t){return e.i18n.secondsX0ThroughX1PastTheMinute()}),(function(t){return t=="0"?"":parseInt(t)<20?e.i18n.atX0SecondsPastTheMinute(t):e.i18n.atX0SecondsPastTheMinuteGt20()||e.i18n.atX0SecondsPastTheMinute(t)}));return t};ExpressionDescriptor.prototype.getMinutesDescription=function(){var e=this;var t=this.expressionParts[0];var r=this.expressionParts[2];var i=this.getSegmentDescription(this.expressionParts[1],this.i18n.everyMinute(),(function(e){return e}),(function(t){return n.StringUtilities.format(e.i18n.everyX0Minutes(t),t)}),(function(t){return e.i18n.minutesX0ThroughX1PastTheHour()}),(function(n){try{return n=="0"&&r.indexOf("/")==-1&&t==""?e.i18n.everyHour():parseInt(n)<20?e.i18n.atX0MinutesPastTheHour(n):e.i18n.atX0MinutesPastTheHourGt20()||e.i18n.atX0MinutesPastTheHour(n)}catch(t){return e.i18n.atX0MinutesPastTheHour(n)}}));return i};ExpressionDescriptor.prototype.getHoursDescription=function(){var e=this;var t=this.expressionParts[2];var r=this.getSegmentDescription(t,this.i18n.everyHour(),(function(t){return e.formatTime(t,"0","")}),(function(t){return n.StringUtilities.format(e.i18n.everyX0Hours(t),t)}),(function(t){return e.i18n.betweenX0AndX1()}),(function(t){return e.i18n.atX0()}));if(r&&t.includes("-")&&this.expressionParts[1]!="0"){var i=Array.from(r.matchAll(/:00/g));if(i.length>1){var o=i[i.length-1].index;r=r.substring(0,o)+":59"+r.substring(o+3)}}return r};ExpressionDescriptor.prototype.getDayOfWeekDescription=function(){var e=this;var t=this.i18n.daysOfTheWeek();var r=null;if(this.expressionParts[5]=="*"){r=""}else{r=this.getSegmentDescription(this.expressionParts[5],this.i18n.commaEveryDay(),(function(r,n){var i=r;if(r.indexOf("#")>-1){i=r.substring(0,r.indexOf("#"))}else if(r.indexOf("L")>-1){i=i.replace("L","")}var o=parseInt(i);if(e.options.tzOffset){var s=e.expressionParts[2];var a=parseInt(s)+(e.options.tzOffset?e.options.tzOffset:0);if(a>=24){o++}else if(a<0){o--}if(o>6){o=0}else if(o<0){o=6}}var u=e.i18n.daysOfTheWeekInCase?e.i18n.daysOfTheWeekInCase(n)[o]:t[o];if(r.indexOf("#")>-1){var c=null;var f=r.substring(r.indexOf("#")+1);var p=r.substring(0,r.indexOf("#"));switch(f){case"1":c=e.i18n.first(p);break;case"2":c=e.i18n.second(p);break;case"3":c=e.i18n.third(p);break;case"4":c=e.i18n.fourth(p);break;case"5":c=e.i18n.fifth(p);break}u=c+" "+u}return u}),(function(t){if(parseInt(t)==1){return""}else{return n.StringUtilities.format(e.i18n.commaEveryX0DaysOfTheWeek(t),t)}}),(function(t){var r=t.substring(0,t.indexOf("-"));var n=e.expressionParts[3]!="*";return n?e.i18n.commaAndX0ThroughX1(r):e.i18n.commaX0ThroughX1(r)}),(function(t){var r=null;if(t.indexOf("#")>-1){var n=t.substring(t.indexOf("#")+1);r=e.i18n.commaOnThe(n).trim()+e.i18n.spaceX0OfTheMonth()}else if(t.indexOf("L")>-1){r=e.i18n.commaOnTheLastX0OfTheMonth(t.replace("L",""))}else{var i=e.expressionParts[3]!="*";r=i?e.i18n.commaAndOnX0():e.i18n.commaOnlyOnX0(t)}return r}))}return r};ExpressionDescriptor.prototype.getMonthDescription=function(){var e=this;var t=this.i18n.monthsOfTheYear();var r=this.getSegmentDescription(this.expressionParts[4],"",(function(r,n){return n&&e.i18n.monthsOfTheYearInCase?e.i18n.monthsOfTheYearInCase(n)[parseInt(r)-1]:t[parseInt(r)-1]}),(function(t){if(parseInt(t)==1){return""}else{return n.StringUtilities.format(e.i18n.commaEveryX0Months(t),t)}}),(function(t){return e.i18n.commaMonthX0ThroughMonthX1()||e.i18n.commaX0ThroughX1()}),(function(t){return e.i18n.commaOnlyInMonthX0?e.i18n.commaOnlyInMonthX0():e.i18n.commaOnlyInX0()}));return r};ExpressionDescriptor.prototype.getDayOfMonthDescription=function(){var e=this;var t=null;var r=this.expressionParts[3];switch(r){case"L":t=this.i18n.commaOnTheLastDayOfTheMonth();break;case"WL":case"LW":t=this.i18n.commaOnTheLastWeekdayOfTheMonth();break;default:var i=r.match(/(\d{1,2}W)|(W\d{1,2})/);if(i){var o=parseInt(i[0].replace("W",""));var s=o==1?this.i18n.firstWeekday():n.StringUtilities.format(this.i18n.weekdayNearestDayX0(),o.toString());t=n.StringUtilities.format(this.i18n.commaOnTheX0OfTheMonth(),s);break}else{var a=r.match(/L-(\d{1,2})/);if(a){var u=a[1];t=n.StringUtilities.format(this.i18n.commaDaysBeforeTheLastDayOfTheMonth(u),u);break}else if(r=="*"&&this.expressionParts[5]!="*"){return""}else{t=this.getSegmentDescription(r,this.i18n.commaEveryDay(),(function(t){return t=="L"?e.i18n.lastDay():e.i18n.dayX0?n.StringUtilities.format(e.i18n.dayX0(),t):t}),(function(t){return t=="1"?e.i18n.commaEveryDay():e.i18n.commaEveryX0Days(t)}),(function(t){return e.i18n.commaBetweenDayX0AndX1OfTheMonth(t)}),(function(t){return e.i18n.commaOnDayX0OfTheMonth(t)}))}break}}return t};ExpressionDescriptor.prototype.getYearDescription=function(){var e=this;var t=this.getSegmentDescription(this.expressionParts[6],"",(function(e){return/^\d+$/.test(e)?new Date(parseInt(e),1).getFullYear().toString():e}),(function(t){return n.StringUtilities.format(e.i18n.commaEveryX0Years(t),t)}),(function(t){return e.i18n.commaYearX0ThroughYearX1()||e.i18n.commaX0ThroughX1()}),(function(t){return e.i18n.commaOnlyInYearX0?e.i18n.commaOnlyInYearX0():e.i18n.commaOnlyInX0()}));return t};ExpressionDescriptor.prototype.getSegmentDescription=function(e,t,r,i,o,s){var a=null;var u=e.indexOf("/")>-1;var c=e.indexOf("-")>-1;var f=e.indexOf(",")>-1;if(!e){a=""}else if(e==="*"){a=t}else if(!u&&!c&&!f){a=n.StringUtilities.format(s(e),r(e))}else if(f){var p=e.split(",");var h="";for(var l=0;l<p.length;l++){if(l>0&&p.length>2){h+=",";if(l<p.length-1){h+=" "}}if(l>0&&p.length>1&&(l==p.length-1||p.length==2)){h+="".concat(this.i18n.spaceAnd()," ")}if(p[l].indexOf("/")>-1||p[l].indexOf("-")>-1){var d=p[l].indexOf("-")>-1&&p[l].indexOf("/")==-1;var m=this.getSegmentDescription(p[l],t,r,i,d?this.i18n.commaX0ThroughX1:o,s);if(d){m=m.replace(", ","")}h+=m}else if(!u){h+=r(p[l])}else{h+=this.getSegmentDescription(p[l],t,r,i,o,s)}}if(!u){a=n.StringUtilities.format(s(e),h)}else{a=h}}else if(u){var p=e.split("/");a=n.StringUtilities.format(i(p[1]),p[1]);if(p[0].indexOf("-")>-1){var y=this.generateRangeSegmentDescription(p[0],o,r);if(y.indexOf(", ")!=0){a+=", "}a+=y}else if(p[0].indexOf("*")==-1){var v=n.StringUtilities.format(s(p[0]),r(p[0]));v=v.replace(", ","");a+=n.StringUtilities.format(this.i18n.commaStartingX0(),v)}}else if(c){a=this.generateRangeSegmentDescription(e,o,r)}return a};ExpressionDescriptor.prototype.generateRangeSegmentDescription=function(e,t,r){var i="";var o=e.split("-");var s=r(o[0],1);var a=r(o[1],2);var u=t(e);i+=n.StringUtilities.format(u,s,a);return i};ExpressionDescriptor.prototype.formatTime=function(e,t,r){var n=0;var i=0;if(this.options.tzOffset){n=this.options.tzOffset>0?Math.floor(this.options.tzOffset):Math.ceil(this.options.tzOffset);i=parseFloat((this.options.tzOffset%1).toFixed(2));if(i!=0){i*=60}}var o=parseInt(e)+n;var s=parseInt(t)+i;if(s>=60){s-=60;o+=1}else if(s<0){s+=60;o-=1}if(o>=24){o=o-24}else if(o<0){o=24+o}var a="";var u=false;if(!this.options.use24HourTimeFormat){u=!!(this.i18n.setPeriodBeforeTime&&this.i18n.setPeriodBeforeTime());a=u?"".concat(this.getPeriod(o)," "):" ".concat(this.getPeriod(o));if(o>12){o-=12}if(o===0){o=12}}var c="";if(r){c=":".concat(("00"+r).substring(r.length))}return"".concat(u?a:"").concat(("00"+o.toString()).substring(o.toString().length),":").concat(("00"+s.toString()).substring(s.toString().length)).concat(c).concat(!u?a:"")};ExpressionDescriptor.prototype.transformVerbosity=function(e,t){if(!t){e=e.replace(new RegExp(", ".concat(this.i18n.everyMinute()),"g"),"");e=e.replace(new RegExp(", ".concat(this.i18n.everyHour()),"g"),"");e=e.replace(new RegExp(this.i18n.commaEveryDay(),"g"),"");e=e.replace(/\, ?$/,"")}return e};ExpressionDescriptor.prototype.getPeriod=function(e){return e>=12?this.i18n.pm&&this.i18n.pm()||"PM":this.i18n.am&&this.i18n.am()||"AM"};ExpressionDescriptor.locales={};return ExpressionDescriptor}();t.ExpressionDescriptor=o},336:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.enLocaleLoader=void 0;var n=r(751);var i=function(){function enLocaleLoader(){}enLocaleLoader.prototype.load=function(e){e["en"]=new n.en};return enLocaleLoader}();t.enLocaleLoader=i},751:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.en=void 0;var r=function(){function en(){}en.prototype.atX0SecondsPastTheMinuteGt20=function(){return null};en.prototype.atX0MinutesPastTheHourGt20=function(){return null};en.prototype.commaMonthX0ThroughMonthX1=function(){return null};en.prototype.commaYearX0ThroughYearX1=function(){return null};en.prototype.use24HourTimeFormatByDefault=function(){return false};en.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return"An error occured when generating the expression description. Check the cron expression syntax."};en.prototype.everyMinute=function(){return"every minute"};en.prototype.everyHour=function(){return"every hour"};en.prototype.atSpace=function(){return"At "};en.prototype.everyMinuteBetweenX0AndX1=function(){return"Every minute between %s and %s"};en.prototype.at=function(){return"At"};en.prototype.spaceAnd=function(){return" and"};en.prototype.everySecond=function(){return"every second"};en.prototype.everyX0Seconds=function(){return"every %s seconds"};en.prototype.secondsX0ThroughX1PastTheMinute=function(){return"seconds %s through %s past the minute"};en.prototype.atX0SecondsPastTheMinute=function(){return"at %s seconds past the minute"};en.prototype.everyX0Minutes=function(){return"every %s minutes"};en.prototype.minutesX0ThroughX1PastTheHour=function(){return"minutes %s through %s past the hour"};en.prototype.atX0MinutesPastTheHour=function(){return"at %s minutes past the hour"};en.prototype.everyX0Hours=function(){return"every %s hours"};en.prototype.betweenX0AndX1=function(){return"between %s and %s"};en.prototype.atX0=function(){return"at %s"};en.prototype.commaEveryDay=function(){return", every day"};en.prototype.commaEveryX0DaysOfTheWeek=function(){return", every %s days of the week"};en.prototype.commaX0ThroughX1=function(){return", %s through %s"};en.prototype.commaAndX0ThroughX1=function(){return", %s through %s"};en.prototype.first=function(){return"first"};en.prototype.second=function(){return"second"};en.prototype.third=function(){return"third"};en.prototype.fourth=function(){return"fourth"};en.prototype.fifth=function(){return"fifth"};en.prototype.commaOnThe=function(){return", on the "};en.prototype.spaceX0OfTheMonth=function(){return" %s of the month"};en.prototype.lastDay=function(){return"the last day"};en.prototype.commaOnTheLastX0OfTheMonth=function(){return", on the last %s of the month"};en.prototype.commaOnlyOnX0=function(){return", only on %s"};en.prototype.commaAndOnX0=function(){return", and on %s"};en.prototype.commaEveryX0Months=function(){return", every %s months"};en.prototype.commaOnlyInX0=function(){return", only in %s"};en.prototype.commaOnTheLastDayOfTheMonth=function(){return", on the last day of the month"};en.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return", on the last weekday of the month"};en.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return", %s days before the last day of the month"};en.prototype.firstWeekday=function(){return"first weekday"};en.prototype.weekdayNearestDayX0=function(){return"weekday nearest day %s"};en.prototype.commaOnTheX0OfTheMonth=function(){return", on the %s of the month"};en.prototype.commaEveryX0Days=function(){return", every %s days"};en.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return", between day %s and %s of the month"};en.prototype.commaOnDayX0OfTheMonth=function(){return", on day %s of the month"};en.prototype.commaEveryHour=function(){return", every hour"};en.prototype.commaEveryX0Years=function(){return", every %s years"};en.prototype.commaStartingX0=function(){return", starting %s"};en.prototype.daysOfTheWeek=function(){return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]};en.prototype.monthsOfTheYear=function(){return["January","February","March","April","May","June","July","August","September","October","November","December"]};return en}();t.en=r},586:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});function assert(e,t){if(!e){throw new Error(t)}}var r=function(){function RangeValidator(){}RangeValidator.secondRange=function(e){var t=e.split(",");for(var r=0;r<t.length;r++){if(!isNaN(parseInt(t[r],10))){var n=parseInt(t[r],10);assert(n>=0&&n<=59,"seconds part must be >= 0 and <= 59")}}};RangeValidator.minuteRange=function(e){var t=e.split(",");for(var r=0;r<t.length;r++){if(!isNaN(parseInt(t[r],10))){var n=parseInt(t[r],10);assert(n>=0&&n<=59,"minutes part must be >= 0 and <= 59")}}};RangeValidator.hourRange=function(e){var t=e.split(",");for(var r=0;r<t.length;r++){if(!isNaN(parseInt(t[r],10))){var n=parseInt(t[r],10);assert(n>=0&&n<=23,"hours part must be >= 0 and <= 23")}}};RangeValidator.dayOfMonthRange=function(e){var t=e.split(",");for(var r=0;r<t.length;r++){if(!isNaN(parseInt(t[r],10))){var n=parseInt(t[r],10);assert(n>=1&&n<=31,"DOM part must be >= 1 and <= 31")}}};RangeValidator.monthRange=function(e,t){var r=e.split(",");for(var n=0;n<r.length;n++){if(!isNaN(parseInt(r[n],10))){var i=parseInt(r[n],10);assert(i>=1&&i<=12,t?"month part must be >= 0 and <= 11":"month part must be >= 1 and <= 12")}}};RangeValidator.dayOfWeekRange=function(e,t){var r=e.split(",");for(var n=0;n<r.length;n++){if(!isNaN(parseInt(r[n],10))){var i=parseInt(r[n],10);assert(i>=0&&i<=6,t?"DOW part must be >= 0 and <= 6":"DOW part must be >= 1 and <= 7")}}};return RangeValidator}();t["default"]=r},910:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.StringUtilities=void 0;var r=function(){function StringUtilities(){}StringUtilities.format=function(e){var t=[];for(var r=1;r<arguments.length;r++){t[r-1]=arguments[r]}return e.replace(/%s/g,(function(e){var r=[];for(var n=1;n<arguments.length;n++){r[n-1]=arguments[n]}return t.shift()}))};StringUtilities.containsAny=function(e,t){return t.some((function(t){return e.indexOf(t)>-1}))};return StringUtilities}();t.StringUtilities=r}};var t={};function __nested_webpack_require_45190__(r){var n=t[r];if(n!==undefined){return n.exports}var i=t[r]={exports:{}};e[r](i,i.exports,__nested_webpack_require_45190__);return i.exports}var r={};(()=>{var e=r;Object.defineProperty(e,"__esModule",{value:true});e.toString=void 0;var t=__nested_webpack_require_45190__(728);var n=__nested_webpack_require_45190__(336);t.ExpressionDescriptor.initialize(new n.enLocaleLoader);e["default"]=t.ExpressionDescriptor;var i=t.ExpressionDescriptor.toString;e.toString=i})();return r})()))}};var t={};function __nccwpck_require__(r){var n=t[r];if(n!==undefined){return n.exports}var i=t[r]={exports:{}};var o=true;try{e[r](i,i.exports,__nccwpck_require__);o=false}finally{if(o)delete t[r]}return i.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r=__nccwpck_require__(622);module.exports=r})();
|
|
1
|
+
(()=>{var e={622:e=>{(function webpackUniversalModuleDefinition(t,r){if(true)e.exports=r();else{}})(globalThis,(()=>(()=>{"use strict";var e={794:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.CronParser=void 0;var n=r(586);var i=function(){function CronParser(e,t,r){if(t===void 0){t=true}if(r===void 0){r=false}this.expression=e;this.dayOfWeekStartIndexZero=t;this.monthStartIndexZero=r}CronParser.prototype.parse=function(){var e=this.extractParts(this.expression);this.normalize(e);this.validate(e);return e};CronParser.prototype.extractParts=function(e){if(!this.expression){throw new Error("cron expression is empty")}var t=e.trim().split(/[ ]+/);for(var r=0;r<t.length;r++){if(t[r].includes(",")){var n=t[r].split(",").map((function(e){return e.trim()})).filter((function(e){return e!==""})).map((function(e){return!isNaN(Number(e))?Number(e):e})).filter((function(e){return e!==null&&e!==""}));if(n.length===0){n.push("*")}n.sort((function(e,t){return e!==null&&t!==null?e-t:0}));t[r]=n.map((function(e){return e!==null?e.toString():""})).join(",")}}if(t.length<5){throw new Error("Expression has only ".concat(t.length," part").concat(t.length==1?"":"s",". At least 5 parts are required."))}else if(t.length==5){t.unshift("");t.push("")}else if(t.length==6){var i=/\d{4}$/.test(t[5])||t[4]=="?"||t[2]=="?";if(i){t.unshift("")}else{t.push("")}}else if(t.length>7){throw new Error("Expression has ".concat(t.length," parts; too many!"))}return t};CronParser.prototype.normalize=function(e){var t=this;e[3]=e[3].replace("?","*");e[5]=e[5].replace("?","*");e[2]=e[2].replace("?","*");if(e[0].indexOf("0/")==0){e[0]=e[0].replace("0/","*/")}if(e[1].indexOf("0/")==0){e[1]=e[1].replace("0/","*/")}if(e[2].indexOf("0/")==0){e[2]=e[2].replace("0/","*/")}if(e[3].indexOf("1/")==0){e[3]=e[3].replace("1/","*/")}if(e[4].indexOf("1/")==0){e[4]=e[4].replace("1/","*/")}if(e[6].indexOf("1/")==0){e[6]=e[6].replace("1/","*/")}e[5]=e[5].replace(/(^\d)|([^#/\s]\d)/g,(function(e){var r=e.replace(/\D/,"");var n=r;if(t.dayOfWeekStartIndexZero){if(r=="7"){n="0"}}else{n=(parseInt(r)-1).toString()}return e.replace(r,n)}));if(e[5]=="L"){e[5]="6"}if(e[3]=="?"){e[3]="*"}if(e[3].indexOf("W")>-1&&(e[3].indexOf(",")>-1||e[3].indexOf("-")>-1)){throw new Error("The 'W' character can be specified only when the day-of-month is a single day, not a range or list of days.")}var r={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6};for(var n in r){e[5]=e[5].replace(new RegExp(n,"gi"),r[n].toString())}e[4]=e[4].replace(/(^\d{1,2})|([^#/\s]\d{1,2})/g,(function(e){var r=e.replace(/\D/,"");var n=r;if(t.monthStartIndexZero){n=(parseInt(r)+1).toString()}return e.replace(r,n)}));var i={JAN:1,FEB:2,MAR:3,APR:4,MAY:5,JUN:6,JUL:7,AUG:8,SEP:9,OCT:10,NOV:11,DEC:12};for(var o in i){e[4]=e[4].replace(new RegExp(o,"gi"),i[o].toString())}if(e[0]=="0"){e[0]=""}if(!/\*|\-|\,|\//.test(e[2])&&(/\*|\//.test(e[1])||/\*|\//.test(e[0]))){e[2]+="-".concat(e[2])}for(var s=0;s<e.length;s++){if(e[s].indexOf(",")!=-1){e[s]=e[s].split(",").filter((function(e){return e!==""})).join(",")||"*"}if(e[s]=="*/1"){e[s]="*"}if(e[s].indexOf("/")>-1&&!/^\*|\-|\,/.test(e[s])){var a=null;switch(s){case 4:a="12";break;case 5:a="6";break;case 6:a="9999";break;default:a=null;break}if(a!==null){var u=e[s].split("/");e[s]="".concat(u[0],"-").concat(a,"/").concat(u[1])}}}};CronParser.prototype.validate=function(e){this.assertNoInvalidCharacters("DOW",e[5]);this.assertNoInvalidCharacters("DOM",e[3]);this.validateRange(e)};CronParser.prototype.validateRange=function(e){n.default.secondRange(e[0]);n.default.minuteRange(e[1]);n.default.hourRange(e[2]);n.default.dayOfMonthRange(e[3]);n.default.monthRange(e[4],this.monthStartIndexZero);n.default.dayOfWeekRange(e[5],this.dayOfWeekStartIndexZero)};CronParser.prototype.assertNoInvalidCharacters=function(e,t){var r=t.match(/[A-KM-VX-Z]+/gi);if(r&&r.length){throw new Error("".concat(e," part contains invalid values: '").concat(r.toString(),"'"))}};return CronParser}();t.CronParser=i},728:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.ExpressionDescriptor=void 0;var n=r(910);var i=r(794);var o=function(){function ExpressionDescriptor(e,t){this.expression=e;this.options=t;this.expressionParts=new Array(5);if(!this.options.locale&&ExpressionDescriptor.defaultLocale){this.options.locale=ExpressionDescriptor.defaultLocale}if(!ExpressionDescriptor.locales[this.options.locale]){var r=Object.keys(ExpressionDescriptor.locales)[0];console.warn("Locale '".concat(this.options.locale,"' could not be found; falling back to '").concat(r,"'."));this.options.locale=r}this.i18n=ExpressionDescriptor.locales[this.options.locale];if(t.use24HourTimeFormat===undefined){t.use24HourTimeFormat=this.i18n.use24HourTimeFormatByDefault()}}ExpressionDescriptor.toString=function(e,t){var r=t===void 0?{}:t,n=r.throwExceptionOnParseError,i=n===void 0?true:n,o=r.verbose,s=o===void 0?false:o,a=r.dayOfWeekStartIndexZero,u=a===void 0?true:a,c=r.monthStartIndexZero,p=c===void 0?false:c,f=r.use24HourTimeFormat,h=r.locale,l=h===void 0?null:h,d=r.tzOffset,m=d===void 0?0:d;var y={throwExceptionOnParseError:i,verbose:s,dayOfWeekStartIndexZero:u,monthStartIndexZero:p,use24HourTimeFormat:f,locale:l,tzOffset:m};var v=new ExpressionDescriptor(e,y);return v.getFullDescription()};ExpressionDescriptor.initialize=function(e,t){if(t===void 0){t="en"}ExpressionDescriptor.specialCharacters=["/","-",",","*"];ExpressionDescriptor.defaultLocale=t;e.load(ExpressionDescriptor.locales)};ExpressionDescriptor.prototype.getFullDescription=function(){var e="";try{var t=new i.CronParser(this.expression,this.options.dayOfWeekStartIndexZero,this.options.monthStartIndexZero);this.expressionParts=t.parse();var r=this.getTimeOfDayDescription();var n=this.getDayOfMonthDescription();var o=this.getMonthDescription();var s=this.getDayOfWeekDescription();var a=this.getYearDescription();e+=r+n+s+o+a;e=this.transformVerbosity(e,!!this.options.verbose);e=e.charAt(0).toLocaleUpperCase()+e.substr(1)}catch(t){if(!this.options.throwExceptionOnParseError){e=this.i18n.anErrorOccuredWhenGeneratingTheExpressionD()}else{throw"".concat(t)}}return e};ExpressionDescriptor.prototype.getTimeOfDayDescription=function(){var e=this.expressionParts[0];var t=this.expressionParts[1];var r=this.expressionParts[2];var i="";if(!n.StringUtilities.containsAny(t,ExpressionDescriptor.specialCharacters)&&!n.StringUtilities.containsAny(r,ExpressionDescriptor.specialCharacters)&&!n.StringUtilities.containsAny(e,ExpressionDescriptor.specialCharacters)){i+=this.i18n.atSpace()+this.formatTime(r,t,e)}else if(!e&&t.indexOf("-")>-1&&!(t.indexOf(",")>-1)&&!(t.indexOf("/")>-1)&&!n.StringUtilities.containsAny(r,ExpressionDescriptor.specialCharacters)){var o=t.split("-");i+=n.StringUtilities.format(this.i18n.everyMinuteBetweenX0AndX1(),this.formatTime(r,o[0],""),this.formatTime(r,o[1],""))}else if(!e&&r.indexOf(",")>-1&&r.indexOf("-")==-1&&r.indexOf("/")==-1&&!n.StringUtilities.containsAny(t,ExpressionDescriptor.specialCharacters)){var s=r.split(",");i+=this.i18n.at();for(var a=0;a<s.length;a++){i+=" ";i+=this.formatTime(s[a],t,"");if(a<s.length-2){i+=","}if(a==s.length-2){i+=this.i18n.spaceAnd()}}}else{var u=this.getSecondsDescription();var c=this.getMinutesDescription();var p=this.getHoursDescription();i+=u;if(i&&c){i+=", "}i+=c;if(c===p){return i}if(i&&p){i+=", "}i+=p}return i};ExpressionDescriptor.prototype.getSecondsDescription=function(){var e=this;var t=this.getSegmentDescription(this.expressionParts[0],this.i18n.everySecond(),(function(e){return e}),(function(t){return n.StringUtilities.format(e.i18n.everyX0Seconds(t),t)}),(function(t){return e.i18n.secondsX0ThroughX1PastTheMinute()}),(function(t){return t=="0"?"":parseInt(t)<20?e.i18n.atX0SecondsPastTheMinute(t):e.i18n.atX0SecondsPastTheMinuteGt20()||e.i18n.atX0SecondsPastTheMinute(t)}));return t};ExpressionDescriptor.prototype.getMinutesDescription=function(){var e=this;var t=this.expressionParts[0];var r=this.expressionParts[2];var i=this.getSegmentDescription(this.expressionParts[1],this.i18n.everyMinute(),(function(e){return e}),(function(t){return n.StringUtilities.format(e.i18n.everyX0Minutes(t),t)}),(function(t){return e.i18n.minutesX0ThroughX1PastTheHour()}),(function(n){try{return n=="0"&&r.indexOf("/")==-1&&t==""?e.i18n.everyHour():parseInt(n)<20?e.i18n.atX0MinutesPastTheHour(n):e.i18n.atX0MinutesPastTheHourGt20()||e.i18n.atX0MinutesPastTheHour(n)}catch(t){return e.i18n.atX0MinutesPastTheHour(n)}}));return i};ExpressionDescriptor.prototype.getHoursDescription=function(){var e=this;var t=this.expressionParts[2];var r=this.getSegmentDescription(t,this.i18n.everyHour(),(function(t){return e.formatTime(t,"0","")}),(function(t){return n.StringUtilities.format(e.i18n.everyX0Hours(t),t)}),(function(t){return e.i18n.betweenX0AndX1()}),(function(t){return e.i18n.atX0()}));if(r&&t.includes("-")&&this.expressionParts[1]!="0"){var i=Array.from(r.matchAll(/:00/g));if(i.length>1){var o=i[i.length-1].index;r=r.substring(0,o)+":59"+r.substring(o+3)}}return r};ExpressionDescriptor.prototype.getDayOfWeekDescription=function(){var e=this;var t=this.i18n.daysOfTheWeek();var r=null;if(this.expressionParts[5]=="*"){r=""}else{r=this.getSegmentDescription(this.expressionParts[5],this.i18n.commaEveryDay(),(function(r,n){var i=r;if(r.indexOf("#")>-1){i=r.substring(0,r.indexOf("#"))}else if(r.indexOf("L")>-1){i=i.replace("L","")}var o=parseInt(i);if(e.options.tzOffset){var s=e.expressionParts[2];var a=parseInt(s)+(e.options.tzOffset?e.options.tzOffset:0);if(a>=24){o++}else if(a<0){o--}if(o>6){o=0}else if(o<0){o=6}}var u=e.i18n.daysOfTheWeekInCase?e.i18n.daysOfTheWeekInCase(n)[o]:t[o];if(r.indexOf("#")>-1){var c=null;var p=r.substring(r.indexOf("#")+1);var f=r.substring(0,r.indexOf("#"));switch(p){case"1":c=e.i18n.first(f);break;case"2":c=e.i18n.second(f);break;case"3":c=e.i18n.third(f);break;case"4":c=e.i18n.fourth(f);break;case"5":c=e.i18n.fifth(f);break}u=c+" "+u}return u}),(function(t){if(parseInt(t)==1){return""}else{return n.StringUtilities.format(e.i18n.commaEveryX0DaysOfTheWeek(t),t)}}),(function(t){var r=t.substring(0,t.indexOf("-"));var n=e.expressionParts[3]!="*";return n?e.i18n.commaAndX0ThroughX1(r):e.i18n.commaX0ThroughX1(r)}),(function(t){var r=null;if(t.indexOf("#")>-1){var n=t.substring(t.indexOf("#")+1);r=e.i18n.commaOnThe(n).trim()+e.i18n.spaceX0OfTheMonth()}else if(t.indexOf("L")>-1){r=e.i18n.commaOnTheLastX0OfTheMonth(t.replace("L",""))}else{var i=e.expressionParts[3]!="*";r=i?e.i18n.commaAndOnX0():e.i18n.commaOnlyOnX0(t)}return r}))}return r};ExpressionDescriptor.prototype.getMonthDescription=function(){var e=this;var t=this.i18n.monthsOfTheYear();var r=this.getSegmentDescription(this.expressionParts[4],"",(function(r,n){return n&&e.i18n.monthsOfTheYearInCase?e.i18n.monthsOfTheYearInCase(n)[parseInt(r)-1]:t[parseInt(r)-1]}),(function(t){if(parseInt(t)==1){return""}else{return n.StringUtilities.format(e.i18n.commaEveryX0Months(t),t)}}),(function(t){return e.i18n.commaMonthX0ThroughMonthX1()||e.i18n.commaX0ThroughX1()}),(function(t){return e.i18n.commaOnlyInMonthX0?e.i18n.commaOnlyInMonthX0():e.i18n.commaOnlyInX0()}));return r};ExpressionDescriptor.prototype.getDayOfMonthDescription=function(){var e=this;var t=null;var r=this.expressionParts[3];switch(r){case"L":t=this.i18n.commaOnTheLastDayOfTheMonth();break;case"WL":case"LW":t=this.i18n.commaOnTheLastWeekdayOfTheMonth();break;default:var i=r.match(/(\d{1,2}W)|(W\d{1,2})/);if(i){var o=parseInt(i[0].replace("W",""));var s=o==1?this.i18n.firstWeekday():n.StringUtilities.format(this.i18n.weekdayNearestDayX0(),o.toString());t=n.StringUtilities.format(this.i18n.commaOnTheX0OfTheMonth(),s);break}else{var a=r.match(/L-(\d{1,2})/);if(a){var u=a[1];t=n.StringUtilities.format(this.i18n.commaDaysBeforeTheLastDayOfTheMonth(u),u);break}else if(r=="*"&&this.expressionParts[5]!="*"){return""}else{t=this.getSegmentDescription(r,this.i18n.commaEveryDay(),(function(t){return t=="L"?e.i18n.lastDay():e.i18n.dayX0?n.StringUtilities.format(e.i18n.dayX0(),t):t}),(function(t){return t=="1"?e.i18n.commaEveryDay():e.i18n.commaEveryX0Days(t)}),(function(t){return e.i18n.commaBetweenDayX0AndX1OfTheMonth(t)}),(function(t){return e.i18n.commaOnDayX0OfTheMonth(t)}))}break}}return t};ExpressionDescriptor.prototype.getYearDescription=function(){var e=this;var t=this.getSegmentDescription(this.expressionParts[6],"",(function(e){return/^\d+$/.test(e)?new Date(parseInt(e),1).getFullYear().toString():e}),(function(t){return n.StringUtilities.format(e.i18n.commaEveryX0Years(t),t)}),(function(t){return e.i18n.commaYearX0ThroughYearX1()||e.i18n.commaX0ThroughX1()}),(function(t){return e.i18n.commaOnlyInYearX0?e.i18n.commaOnlyInYearX0():e.i18n.commaOnlyInX0()}));return t};ExpressionDescriptor.prototype.getSegmentDescription=function(e,t,r,i,o,s){var a=null;var u=e.indexOf("/")>-1;var c=e.indexOf("-")>-1;var p=e.indexOf(",")>-1;if(!e){a=""}else if(e==="*"){a=t}else if(!u&&!c&&!p){a=n.StringUtilities.format(s(e),r(e))}else if(p){var f=e.split(",");var h="";for(var l=0;l<f.length;l++){if(l>0&&f.length>2){h+=",";if(l<f.length-1){h+=" "}}if(l>0&&f.length>1&&(l==f.length-1||f.length==2)){h+="".concat(this.i18n.spaceAnd()," ")}if(f[l].indexOf("/")>-1||f[l].indexOf("-")>-1){var d=f[l].indexOf("-")>-1&&f[l].indexOf("/")==-1;var m=this.getSegmentDescription(f[l],t,r,i,d?this.i18n.commaX0ThroughX1:o,s);if(d){m=m.replace(", ","")}h+=m}else if(!u){h+=r(f[l])}else{h+=this.getSegmentDescription(f[l],t,r,i,o,s)}}if(!u){a=n.StringUtilities.format(s(e),h)}else{a=h}}else if(u){var f=e.split("/");a=n.StringUtilities.format(i(f[1]),f[1]);if(f[0].indexOf("-")>-1){var y=this.generateRangeSegmentDescription(f[0],o,r);if(y.indexOf(", ")!=0){a+=", "}a+=y}else if(f[0].indexOf("*")==-1){var v=n.StringUtilities.format(s(f[0]),r(f[0]));v=v.replace(", ","");a+=n.StringUtilities.format(this.i18n.commaStartingX0(),v)}}else if(c){a=this.generateRangeSegmentDescription(e,o,r)}return a};ExpressionDescriptor.prototype.generateRangeSegmentDescription=function(e,t,r){var i="";var o=e.split("-");var s=r(o[0],1);var a=r(o[1],2);var u=t(e);i+=n.StringUtilities.format(u,s,a);return i};ExpressionDescriptor.prototype.formatTime=function(e,t,r){var n=0;var i=0;if(this.options.tzOffset){n=this.options.tzOffset>0?Math.floor(this.options.tzOffset):Math.ceil(this.options.tzOffset);i=parseFloat((this.options.tzOffset%1).toFixed(2));if(i!=0){i*=60}}var o=parseInt(e)+n;var s=parseInt(t)+i;if(s>=60){s-=60;o+=1}else if(s<0){s+=60;o-=1}if(o>=24){o=o-24}else if(o<0){o=24+o}var a="";var u=false;if(!this.options.use24HourTimeFormat){u=!!(this.i18n.setPeriodBeforeTime&&this.i18n.setPeriodBeforeTime());a=u?"".concat(this.getPeriod(o)," "):" ".concat(this.getPeriod(o));if(o>12){o-=12}if(o===0){o=12}}var c="";if(r){c=":".concat(("00"+r).substring(r.length))}return"".concat(u?a:"").concat(("00"+o.toString()).substring(o.toString().length),":").concat(("00"+s.toString()).substring(s.toString().length)).concat(c).concat(!u?a:"")};ExpressionDescriptor.prototype.transformVerbosity=function(e,t){if(!t){e=e.replace(new RegExp(", ".concat(this.i18n.everyMinute()),"g"),"");e=e.replace(new RegExp(", ".concat(this.i18n.everyHour()),"g"),"");e=e.replace(new RegExp(this.i18n.commaEveryDay(),"g"),"");e=e.replace(/\, ?$/,"")}return e};ExpressionDescriptor.prototype.getPeriod=function(e){return e>=12?this.i18n.pm&&this.i18n.pm()||"PM":this.i18n.am&&this.i18n.am()||"AM"};ExpressionDescriptor.locales={};return ExpressionDescriptor}();t.ExpressionDescriptor=o},336:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.enLocaleLoader=void 0;var n=r(751);var i=function(){function enLocaleLoader(){}enLocaleLoader.prototype.load=function(e){e["en"]=new n.en};return enLocaleLoader}();t.enLocaleLoader=i},751:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.en=void 0;var r=function(){function en(){}en.prototype.atX0SecondsPastTheMinuteGt20=function(){return null};en.prototype.atX0MinutesPastTheHourGt20=function(){return null};en.prototype.commaMonthX0ThroughMonthX1=function(){return null};en.prototype.commaYearX0ThroughYearX1=function(){return null};en.prototype.use24HourTimeFormatByDefault=function(){return false};en.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return"An error occured when generating the expression description. Check the cron expression syntax."};en.prototype.everyMinute=function(){return"every minute"};en.prototype.everyHour=function(){return"every hour"};en.prototype.atSpace=function(){return"At "};en.prototype.everyMinuteBetweenX0AndX1=function(){return"Every minute between %s and %s"};en.prototype.at=function(){return"At"};en.prototype.spaceAnd=function(){return" and"};en.prototype.everySecond=function(){return"every second"};en.prototype.everyX0Seconds=function(){return"every %s seconds"};en.prototype.secondsX0ThroughX1PastTheMinute=function(){return"seconds %s through %s past the minute"};en.prototype.atX0SecondsPastTheMinute=function(){return"at %s seconds past the minute"};en.prototype.everyX0Minutes=function(){return"every %s minutes"};en.prototype.minutesX0ThroughX1PastTheHour=function(){return"minutes %s through %s past the hour"};en.prototype.atX0MinutesPastTheHour=function(){return"at %s minutes past the hour"};en.prototype.everyX0Hours=function(){return"every %s hours"};en.prototype.betweenX0AndX1=function(){return"between %s and %s"};en.prototype.atX0=function(){return"at %s"};en.prototype.commaEveryDay=function(){return", every day"};en.prototype.commaEveryX0DaysOfTheWeek=function(){return", every %s days of the week"};en.prototype.commaX0ThroughX1=function(){return", %s through %s"};en.prototype.commaAndX0ThroughX1=function(){return", %s through %s"};en.prototype.first=function(){return"first"};en.prototype.second=function(){return"second"};en.prototype.third=function(){return"third"};en.prototype.fourth=function(){return"fourth"};en.prototype.fifth=function(){return"fifth"};en.prototype.commaOnThe=function(){return", on the "};en.prototype.spaceX0OfTheMonth=function(){return" %s of the month"};en.prototype.lastDay=function(){return"the last day"};en.prototype.commaOnTheLastX0OfTheMonth=function(){return", on the last %s of the month"};en.prototype.commaOnlyOnX0=function(){return", only on %s"};en.prototype.commaAndOnX0=function(){return", and on %s"};en.prototype.commaEveryX0Months=function(){return", every %s months"};en.prototype.commaOnlyInX0=function(){return", only in %s"};en.prototype.commaOnTheLastDayOfTheMonth=function(){return", on the last day of the month"};en.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return", on the last weekday of the month"};en.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return", %s days before the last day of the month"};en.prototype.firstWeekday=function(){return"first weekday"};en.prototype.weekdayNearestDayX0=function(){return"weekday nearest day %s"};en.prototype.commaOnTheX0OfTheMonth=function(){return", on the %s of the month"};en.prototype.commaEveryX0Days=function(){return", every %s days"};en.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return", between day %s and %s of the month"};en.prototype.commaOnDayX0OfTheMonth=function(){return", on day %s of the month"};en.prototype.commaEveryHour=function(){return", every hour"};en.prototype.commaEveryX0Years=function(){return", every %s years"};en.prototype.commaStartingX0=function(){return", starting %s"};en.prototype.daysOfTheWeek=function(){return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]};en.prototype.monthsOfTheYear=function(){return["January","February","March","April","May","June","July","August","September","October","November","December"]};return en}();t.en=r},586:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});function assert(e,t){if(!e){throw new Error(t)}}var r=function(){function RangeValidator(){}RangeValidator.secondRange=function(e){var t=e.split(",");for(var r=0;r<t.length;r++){if(!isNaN(parseInt(t[r],10))){var n=parseInt(t[r],10);assert(n>=0&&n<=59,"seconds part must be >= 0 and <= 59")}}};RangeValidator.minuteRange=function(e){var t=e.split(",");for(var r=0;r<t.length;r++){if(!isNaN(parseInt(t[r],10))){var n=parseInt(t[r],10);assert(n>=0&&n<=59,"minutes part must be >= 0 and <= 59")}}};RangeValidator.hourRange=function(e){var t=e.split(",");for(var r=0;r<t.length;r++){if(!isNaN(parseInt(t[r],10))){var n=parseInt(t[r],10);assert(n>=0&&n<=23,"hours part must be >= 0 and <= 23")}}};RangeValidator.dayOfMonthRange=function(e){var t=e.split(",");for(var r=0;r<t.length;r++){if(!isNaN(parseInt(t[r],10))){var n=parseInt(t[r],10);assert(n>=1&&n<=31,"DOM part must be >= 1 and <= 31")}}};RangeValidator.monthRange=function(e,t){var r=e.split(",");for(var n=0;n<r.length;n++){if(!isNaN(parseInt(r[n],10))){var i=parseInt(r[n],10);assert(i>=1&&i<=12,t?"month part must be >= 0 and <= 11":"month part must be >= 1 and <= 12")}}};RangeValidator.dayOfWeekRange=function(e,t){var r=e.split(",");for(var n=0;n<r.length;n++){if(!isNaN(parseInt(r[n],10))){var i=parseInt(r[n],10);assert(i>=0&&i<=6,t?"DOW part must be >= 0 and <= 6":"DOW part must be >= 1 and <= 7")}}};return RangeValidator}();t["default"]=r},910:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.StringUtilities=void 0;var r=function(){function StringUtilities(){}StringUtilities.format=function(e){var t=[];for(var r=1;r<arguments.length;r++){t[r-1]=arguments[r]}return e.replace(/%s/g,(function(e){var r=[];for(var n=1;n<arguments.length;n++){r[n-1]=arguments[n]}return t.shift()}))};StringUtilities.containsAny=function(e,t){return t.some((function(t){return e.indexOf(t)>-1}))};return StringUtilities}();t.StringUtilities=r}};var t={};function __nested_webpack_require_45190__(r){var n=t[r];if(n!==undefined){return n.exports}var i=t[r]={exports:{}};e[r](i,i.exports,__nested_webpack_require_45190__);return i.exports}var r={};(()=>{var e=r;Object.defineProperty(e,"__esModule",{value:true});e.toString=void 0;var t=__nested_webpack_require_45190__(728);var n=__nested_webpack_require_45190__(336);t.ExpressionDescriptor.initialize(new n.enLocaleLoader);e["default"]=t.ExpressionDescriptor;var i=t.ExpressionDescriptor.toString;e.toString=i})();return r})()))}};var t={};function __nccwpck_require__(r){var n=t[r];if(n!==undefined){return n.exports}var i=t[r]={exports:{}};var o=true;try{e[r](i,i.exports,__nccwpck_require__);o=false}finally{if(o)delete t[r]}return i.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r=__nccwpck_require__(622);module.exports=r})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"cronstrue","title":"cRonstrue","version":"2.47.0","description":"Convert cron expressions into human readable descriptions","author":"Brady Holt","license":"MIT","bugs":{"url":"https://github.com/bradymholt/cronstrue/issues"},"homepage":"https://github.com/bradymholt/cronstrue","keywords":["cron","cronjob","crontab","schedule","parser","cron expression","cron description","pretty cron","cron for humans","cron translated","cron english","cron schedule","cron english","cron schedule"],"main":"dist/cronstrue.js","bin":{"cronstrue":"bin/cli.js"},"typings":"dist/cronstrue.d.ts","files":["dist/","locales/","i18n.js","i18n.d.ts"],"repository":{"type":"git","url":"git+https://github.com/bradymholt/cronstrue.git"},"publishConfig":{"access":"public"},"prettier":{"printWidth":120},"devDependencies":{"@types/chai":"^4.2.11","@types/mocha":"^8.0.0","chai":"^4.2.0","handlebars":"^4.7.6","marked":"^4.0.10","mocha":"^10.1.0","pixl-xml":"^1.0.13","prettier":"^2.1.1","terser-webpack-plugin":"^5.3.1","ts-loader":"^9.2.6","ts-node":"^10.5.0","typescript":"^4.6.2","webpack":"^5.69.1","webpack-cli":"^4.9.2","xml2js":"^0.5.0"},"scripts":{"start":"npm run build","build":"npx tsc -p ./src --emitDeclarationOnly","test":"npx mocha --reporter spec --require ts-node/register \"./test/**/*.ts\"","prepublishOnly":"rm -rf ./dist && ./node_modules/webpack-cli/bin/cli.js && git add -A"},"dependencies":{},"_lastModified":"2026-
|
|
1
|
+
{"name":"cronstrue","title":"cRonstrue","version":"2.47.0","description":"Convert cron expressions into human readable descriptions","author":"Brady Holt","license":"MIT","bugs":{"url":"https://github.com/bradymholt/cronstrue/issues"},"homepage":"https://github.com/bradymholt/cronstrue","keywords":["cron","cronjob","crontab","schedule","parser","cron expression","cron description","pretty cron","cron for humans","cron translated","cron english","cron schedule","cron english","cron schedule"],"main":"dist/cronstrue.js","bin":{"cronstrue":"bin/cli.js"},"typings":"dist/cronstrue.d.ts","files":["dist/","locales/","i18n.js","i18n.d.ts"],"repository":{"type":"git","url":"git+https://github.com/bradymholt/cronstrue.git"},"publishConfig":{"access":"public"},"prettier":{"printWidth":120},"devDependencies":{"@types/chai":"^4.2.11","@types/mocha":"^8.0.0","chai":"^4.2.0","handlebars":"^4.7.6","marked":"^4.0.10","mocha":"^10.1.0","pixl-xml":"^1.0.13","prettier":"^2.1.1","terser-webpack-plugin":"^5.3.1","ts-loader":"^9.2.6","ts-node":"^10.5.0","typescript":"^4.6.2","webpack":"^5.69.1","webpack-cli":"^4.9.2","xml2js":"^0.5.0"},"scripts":{"start":"npm run build","build":"npx tsc -p ./src --emitDeclarationOnly","test":"npx mocha --reporter spec --require ts-node/register \"./test/**/*.ts\"","prepublishOnly":"rm -rf ./dist && ./node_modules/webpack-cli/bin/cli.js && git add -A"},"dependencies":{},"_lastModified":"2026-05-29T12:49:36.979Z"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
import { Migration } from '@nocobase/server';
|
|
10
|
+
export default class extends Migration {
|
|
11
|
+
on: string;
|
|
12
|
+
up(): Promise<void>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
var __create = Object.create;
|
|
11
|
+
var __defProp = Object.defineProperty;
|
|
12
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
14
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
15
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
16
|
+
var __export = (target, all) => {
|
|
17
|
+
for (var name in all)
|
|
18
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
19
|
+
};
|
|
20
|
+
var __copyProps = (to, from, except, desc) => {
|
|
21
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
22
|
+
for (let key of __getOwnPropNames(from))
|
|
23
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
24
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
25
|
+
}
|
|
26
|
+
return to;
|
|
27
|
+
};
|
|
28
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
29
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
30
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
31
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
32
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
33
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
34
|
+
mod
|
|
35
|
+
));
|
|
36
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
37
|
+
var clean_orphan_flow_route_models_exports = {};
|
|
38
|
+
__export(clean_orphan_flow_route_models_exports, {
|
|
39
|
+
default: () => clean_orphan_flow_route_models_default
|
|
40
|
+
});
|
|
41
|
+
module.exports = __toCommonJS(clean_orphan_flow_route_models_exports);
|
|
42
|
+
var import_server = require("@nocobase/server");
|
|
43
|
+
var _ = __toESM(require("lodash"));
|
|
44
|
+
const parseOptions = (value) => {
|
|
45
|
+
if (!value) return {};
|
|
46
|
+
if (typeof value === "string") {
|
|
47
|
+
try {
|
|
48
|
+
return JSON.parse(value);
|
|
49
|
+
} catch (error) {
|
|
50
|
+
return {};
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return value;
|
|
54
|
+
};
|
|
55
|
+
const isRouteModelOptions = (value) => {
|
|
56
|
+
var _a;
|
|
57
|
+
const options = parseOptions(value);
|
|
58
|
+
return (options == null ? void 0 : options.use) === "RouteModel" || ((_a = options == null ? void 0 : options.schema) == null ? void 0 : _a.use) === "RouteModel";
|
|
59
|
+
};
|
|
60
|
+
class clean_orphan_flow_route_models_default extends import_server.Migration {
|
|
61
|
+
on = "afterLoad";
|
|
62
|
+
async up() {
|
|
63
|
+
if (!this.db.hasCollection("desktopRoutes") || !this.db.hasCollection("flowModels") || !this.db.hasCollection("flowModelTreePath")) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
await this.db.sequelize.transaction(async (transaction) => {
|
|
67
|
+
const desktopRoutesRepo = this.db.getRepository("desktopRoutes");
|
|
68
|
+
const flowRepo = this.db.getRepository("flowModels");
|
|
69
|
+
const treePathRepo = this.db.getRepository("flowModelTreePath");
|
|
70
|
+
const desktopRoutes = await desktopRoutesRepo.find({ fields: ["schemaUid"], transaction });
|
|
71
|
+
const routeSchemaUids = new Set(desktopRoutes.map((route) => route.get("schemaUid")).filter(Boolean));
|
|
72
|
+
const flowModels = await flowRepo.find({ fields: ["uid", "options"], transaction });
|
|
73
|
+
const routeModelUids = flowModels.filter((model) => isRouteModelOptions(model.get("options"))).map((model) => model.get("uid")).filter(Boolean);
|
|
74
|
+
if (routeModelUids.length) {
|
|
75
|
+
const childRouteModels = /* @__PURE__ */ new Set();
|
|
76
|
+
for (const chunk of _.chunk(routeModelUids, 500)) {
|
|
77
|
+
const parentPaths = await treePathRepo.find({
|
|
78
|
+
filter: {
|
|
79
|
+
descendant: {
|
|
80
|
+
$in: chunk
|
|
81
|
+
},
|
|
82
|
+
depth: 1
|
|
83
|
+
},
|
|
84
|
+
fields: ["descendant"],
|
|
85
|
+
transaction
|
|
86
|
+
});
|
|
87
|
+
for (const path of parentPaths) {
|
|
88
|
+
const descendant = path.get("descendant");
|
|
89
|
+
if (descendant) {
|
|
90
|
+
childRouteModels.add(descendant);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
const orphanRouteModelUids = routeModelUids.filter(
|
|
95
|
+
(uid) => !routeSchemaUids.has(uid) && !childRouteModels.has(uid)
|
|
96
|
+
);
|
|
97
|
+
for (const uid of orphanRouteModelUids) {
|
|
98
|
+
await flowRepo.remove(uid, { transaction });
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
if (this.db.hasCollection("flowModelTemplateUsages")) {
|
|
102
|
+
const usageRepo = this.db.getRepository("flowModelTemplateUsages");
|
|
103
|
+
const usages = await usageRepo.find({ fields: ["modelUid"], transaction });
|
|
104
|
+
const usageModelUids = _.uniq(usages.map((usage) => usage.get("modelUid")).filter(Boolean));
|
|
105
|
+
for (const chunk of _.chunk(usageModelUids, 500)) {
|
|
106
|
+
const existingModels = await flowRepo.find({
|
|
107
|
+
fields: ["uid"],
|
|
108
|
+
filter: {
|
|
109
|
+
uid: {
|
|
110
|
+
$in: chunk
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
transaction
|
|
114
|
+
});
|
|
115
|
+
const existingUids = new Set(existingModels.map((model) => model.get("uid")).filter(Boolean));
|
|
116
|
+
const missingUids = chunk.filter((uid) => !existingUids.has(uid));
|
|
117
|
+
if (missingUids.length) {
|
|
118
|
+
await usageRepo.destroy({
|
|
119
|
+
filter: {
|
|
120
|
+
modelUid: {
|
|
121
|
+
$in: missingUids
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
transaction
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
}
|
package/dist/server/server.js
CHANGED
|
@@ -189,15 +189,48 @@ class PluginClientServer extends import_server.Plugin {
|
|
|
189
189
|
instance.allowNewMenu === void 0 ? ["admin", "member"].includes(instance.name) : !!instance.allowNewMenu
|
|
190
190
|
);
|
|
191
191
|
});
|
|
192
|
-
|
|
193
|
-
const
|
|
194
|
-
|
|
195
|
-
|
|
192
|
+
const collectDesktopRouteSchemaUids = async (instance, transaction) => {
|
|
193
|
+
const routeRepo = this.db.getRepository("desktopRoutes");
|
|
194
|
+
const schemaUids = /* @__PURE__ */ new Set();
|
|
195
|
+
const pendingIds = [];
|
|
196
|
+
const rootId = instance.get("id");
|
|
197
|
+
const rootSchemaUid = instance.get("schemaUid");
|
|
198
|
+
if (rootSchemaUid) {
|
|
199
|
+
schemaUids.add(rootSchemaUid);
|
|
200
|
+
}
|
|
201
|
+
if (rootId) {
|
|
202
|
+
pendingIds.push(rootId);
|
|
203
|
+
}
|
|
204
|
+
while (pendingIds.length) {
|
|
205
|
+
const routes = await routeRepo.find({
|
|
206
|
+
fields: ["id", "schemaUid"],
|
|
196
207
|
filter: {
|
|
197
|
-
|
|
208
|
+
parentId: {
|
|
209
|
+
$in: pendingIds.splice(0, pendingIds.length)
|
|
210
|
+
}
|
|
198
211
|
},
|
|
199
212
|
transaction
|
|
200
213
|
});
|
|
214
|
+
for (const route of routes) {
|
|
215
|
+
const schemaUid = route.get("schemaUid");
|
|
216
|
+
const id = route.get("id");
|
|
217
|
+
if (schemaUid) {
|
|
218
|
+
schemaUids.add(schemaUid);
|
|
219
|
+
}
|
|
220
|
+
if (id) {
|
|
221
|
+
pendingIds.push(id);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
return Array.from(schemaUids);
|
|
226
|
+
};
|
|
227
|
+
this.db.on("desktopRoutes.beforeDestroy", async (instance, { transaction }) => {
|
|
228
|
+
const r = this.db.getRepository("flowModels");
|
|
229
|
+
if (r == null ? void 0 : r.remove) {
|
|
230
|
+
const schemaUids = await collectDesktopRouteSchemaUids(instance, transaction);
|
|
231
|
+
for (const schemaUid of schemaUids) {
|
|
232
|
+
await r.remove(schemaUid, { transaction });
|
|
233
|
+
}
|
|
201
234
|
}
|
|
202
235
|
});
|
|
203
236
|
this.db.on("desktopRoutes.afterCreate", async (instance, { transaction }) => {
|
|
@@ -346,11 +379,7 @@ class PluginClientServer extends import_server.Plugin {
|
|
|
346
379
|
});
|
|
347
380
|
}
|
|
348
381
|
registerLocalizationSource() {
|
|
349
|
-
|
|
350
|
-
if (!localizationPlugin) {
|
|
351
|
-
return;
|
|
352
|
-
}
|
|
353
|
-
localizationPlugin.sourceManager.registerSource("desktop-routes", {
|
|
382
|
+
this.app.localeManager.registerSource("desktop-routes", {
|
|
354
383
|
title: (0, import_utils.tval)("Desktop routes"),
|
|
355
384
|
sync: async (ctx) => {
|
|
356
385
|
const desktopRoutes = await ctx.db.getRepository("desktopRoutes").find({
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
declare const _default: {
|
|
10
|
+
openapi: string;
|
|
11
|
+
info: {
|
|
12
|
+
title: string;
|
|
13
|
+
version: string;
|
|
14
|
+
};
|
|
15
|
+
paths: {
|
|
16
|
+
'/roles/{roleName}/desktopRoutes:add': {
|
|
17
|
+
post: {
|
|
18
|
+
tags: string[];
|
|
19
|
+
summary: string;
|
|
20
|
+
parameters: {
|
|
21
|
+
$ref: string;
|
|
22
|
+
}[];
|
|
23
|
+
requestBody: {
|
|
24
|
+
required: boolean;
|
|
25
|
+
content: {
|
|
26
|
+
'application/json': {
|
|
27
|
+
schema: {
|
|
28
|
+
$ref: string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
responses: {
|
|
34
|
+
200: {
|
|
35
|
+
description: string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
'/roles/{roleName}/desktopRoutes:remove': {
|
|
41
|
+
post: {
|
|
42
|
+
tags: string[];
|
|
43
|
+
summary: string;
|
|
44
|
+
parameters: {
|
|
45
|
+
$ref: string;
|
|
46
|
+
}[];
|
|
47
|
+
requestBody: {
|
|
48
|
+
required: boolean;
|
|
49
|
+
content: {
|
|
50
|
+
'application/json': {
|
|
51
|
+
schema: {
|
|
52
|
+
$ref: string;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
responses: {
|
|
58
|
+
200: {
|
|
59
|
+
description: string;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
'/roles/{roleName}/desktopRoutes:set': {
|
|
65
|
+
post: {
|
|
66
|
+
tags: string[];
|
|
67
|
+
summary: string;
|
|
68
|
+
parameters: {
|
|
69
|
+
$ref: string;
|
|
70
|
+
}[];
|
|
71
|
+
requestBody: {
|
|
72
|
+
required: boolean;
|
|
73
|
+
content: {
|
|
74
|
+
'application/json': {
|
|
75
|
+
schema: {
|
|
76
|
+
$ref: string;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
responses: {
|
|
82
|
+
200: {
|
|
83
|
+
description: string;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
'/roles/{roleName}/desktopRoutes:list': {
|
|
89
|
+
get: {
|
|
90
|
+
tags: string[];
|
|
91
|
+
summary: string;
|
|
92
|
+
parameters: {
|
|
93
|
+
$ref: string;
|
|
94
|
+
}[];
|
|
95
|
+
responses: {
|
|
96
|
+
200: {
|
|
97
|
+
description: string;
|
|
98
|
+
content: {
|
|
99
|
+
'application/json': {
|
|
100
|
+
schema: {
|
|
101
|
+
type: string;
|
|
102
|
+
properties: {
|
|
103
|
+
data: {
|
|
104
|
+
type: string;
|
|
105
|
+
items: {
|
|
106
|
+
$ref: string;
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
meta: {
|
|
110
|
+
type: string;
|
|
111
|
+
additionalProperties: boolean;
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
'/desktopRoutes:listAccessible': {
|
|
122
|
+
get: {
|
|
123
|
+
tags: string[];
|
|
124
|
+
summary: string;
|
|
125
|
+
parameters: {
|
|
126
|
+
$ref: string;
|
|
127
|
+
}[];
|
|
128
|
+
responses: {
|
|
129
|
+
200: {
|
|
130
|
+
description: string;
|
|
131
|
+
content: {
|
|
132
|
+
'application/json': {
|
|
133
|
+
schema: {
|
|
134
|
+
type: string;
|
|
135
|
+
properties: {
|
|
136
|
+
data: {
|
|
137
|
+
type: string;
|
|
138
|
+
items: {
|
|
139
|
+
$ref: string;
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
meta: {
|
|
143
|
+
type: string;
|
|
144
|
+
additionalProperties: boolean;
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
components: {
|
|
156
|
+
parameters: {
|
|
157
|
+
RoleNamePath: {
|
|
158
|
+
name: string;
|
|
159
|
+
in: string;
|
|
160
|
+
description: string;
|
|
161
|
+
required: boolean;
|
|
162
|
+
schema: {
|
|
163
|
+
type: string;
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
PaginateQuery: {
|
|
167
|
+
name: string;
|
|
168
|
+
in: string;
|
|
169
|
+
description: string;
|
|
170
|
+
required: boolean;
|
|
171
|
+
schema: {
|
|
172
|
+
type: string;
|
|
173
|
+
};
|
|
174
|
+
};
|
|
175
|
+
TreeQuery: {
|
|
176
|
+
name: string;
|
|
177
|
+
in: string;
|
|
178
|
+
description: string;
|
|
179
|
+
required: boolean;
|
|
180
|
+
schema: {
|
|
181
|
+
type: string;
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
SortScalarQuery: {
|
|
185
|
+
name: string;
|
|
186
|
+
in: string;
|
|
187
|
+
description: string;
|
|
188
|
+
required: boolean;
|
|
189
|
+
schema: {
|
|
190
|
+
type: string;
|
|
191
|
+
};
|
|
192
|
+
};
|
|
193
|
+
FilterQuery: {
|
|
194
|
+
name: string;
|
|
195
|
+
in: string;
|
|
196
|
+
description: string;
|
|
197
|
+
required: boolean;
|
|
198
|
+
schema: {
|
|
199
|
+
type: string;
|
|
200
|
+
additionalProperties: boolean;
|
|
201
|
+
};
|
|
202
|
+
};
|
|
203
|
+
};
|
|
204
|
+
schemas: {
|
|
205
|
+
RouteIdList: {
|
|
206
|
+
type: string;
|
|
207
|
+
description: string;
|
|
208
|
+
items: {
|
|
209
|
+
type: string;
|
|
210
|
+
};
|
|
211
|
+
};
|
|
212
|
+
DesktopRoute: {
|
|
213
|
+
type: string;
|
|
214
|
+
properties: {
|
|
215
|
+
id: {
|
|
216
|
+
type: string;
|
|
217
|
+
};
|
|
218
|
+
title: {
|
|
219
|
+
type: string;
|
|
220
|
+
};
|
|
221
|
+
type: {
|
|
222
|
+
type: string;
|
|
223
|
+
};
|
|
224
|
+
path: {
|
|
225
|
+
type: string;
|
|
226
|
+
nullable: boolean;
|
|
227
|
+
};
|
|
228
|
+
parentId: {
|
|
229
|
+
type: string;
|
|
230
|
+
nullable: boolean;
|
|
231
|
+
};
|
|
232
|
+
hidden: {
|
|
233
|
+
type: string;
|
|
234
|
+
nullable: boolean;
|
|
235
|
+
};
|
|
236
|
+
children: {
|
|
237
|
+
type: string;
|
|
238
|
+
items: {
|
|
239
|
+
$ref: string;
|
|
240
|
+
};
|
|
241
|
+
};
|
|
242
|
+
};
|
|
243
|
+
additionalProperties: boolean;
|
|
244
|
+
};
|
|
245
|
+
};
|
|
246
|
+
};
|
|
247
|
+
};
|
|
248
|
+
export default _default;
|