@nocobase/plugin-client 2.1.0-alpha.3 → 2.1.0-alpha.30
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/externalVersion.js +7 -6
- package/dist/locale/de-DE.json +5 -1
- package/dist/locale/en-US.json +16 -0
- package/dist/locale/es-ES.json +5 -1
- package/dist/locale/fr-FR.json +5 -1
- package/dist/locale/hu-HU.json +5 -1
- package/dist/locale/id-ID.json +5 -1
- package/dist/locale/it-IT.json +5 -1
- package/dist/locale/ja-JP.json +5 -1
- package/dist/locale/ko-KR.json +5 -1
- package/dist/locale/nl-NL.json +5 -1
- package/dist/locale/pt-BR.json +5 -1
- package/dist/locale/ru-RU.json +5 -1
- package/dist/locale/tr-TR.json +5 -1
- package/dist/locale/uk-UA.json +5 -1
- package/dist/locale/vi-VN.json +5 -1
- package/dist/locale/zh-CN.json +18 -2
- package/dist/locale/zh-TW.json +5 -1
- package/dist/node_modules/cronstrue/dist/cronstrue.js +1 -1
- package/dist/node_modules/cronstrue/package.json +1 -1
- package/dist/swagger/index.d.ts +248 -0
- package/dist/swagger/index.js +222 -0
- package/package.json +4 -3
- 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-06T11:13:42.571Z"}
|
|
@@ -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;
|
|
@@ -0,0 +1,222 @@
|
|
|
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 __defProp = Object.defineProperty;
|
|
11
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
+
var __export = (target, all) => {
|
|
15
|
+
for (var name in all)
|
|
16
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
+
};
|
|
18
|
+
var __copyProps = (to, from, except, desc) => {
|
|
19
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
+
for (let key of __getOwnPropNames(from))
|
|
21
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
+
}
|
|
24
|
+
return to;
|
|
25
|
+
};
|
|
26
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
+
var swagger_exports = {};
|
|
28
|
+
__export(swagger_exports, {
|
|
29
|
+
default: () => swagger_default
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(swagger_exports);
|
|
32
|
+
var swagger_default = {
|
|
33
|
+
openapi: "3.0.2",
|
|
34
|
+
info: {
|
|
35
|
+
title: "NocoBase API - Client plugin",
|
|
36
|
+
version: "1.0.0"
|
|
37
|
+
},
|
|
38
|
+
paths: {
|
|
39
|
+
"/roles/{roleName}/desktopRoutes:add": {
|
|
40
|
+
post: {
|
|
41
|
+
tags: ["roles.desktopRoutes"],
|
|
42
|
+
summary: "Add desktop route permissions to a role",
|
|
43
|
+
parameters: [{ $ref: "#/components/parameters/RoleNamePath" }],
|
|
44
|
+
requestBody: {
|
|
45
|
+
required: true,
|
|
46
|
+
content: {
|
|
47
|
+
"application/json": {
|
|
48
|
+
schema: { $ref: "#/components/schemas/RouteIdList" }
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
responses: {
|
|
53
|
+
200: { description: "OK" }
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"/roles/{roleName}/desktopRoutes:remove": {
|
|
58
|
+
post: {
|
|
59
|
+
tags: ["roles.desktopRoutes"],
|
|
60
|
+
summary: "Remove desktop route permissions from a role",
|
|
61
|
+
parameters: [{ $ref: "#/components/parameters/RoleNamePath" }],
|
|
62
|
+
requestBody: {
|
|
63
|
+
required: true,
|
|
64
|
+
content: {
|
|
65
|
+
"application/json": {
|
|
66
|
+
schema: { $ref: "#/components/schemas/RouteIdList" }
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
responses: {
|
|
71
|
+
200: { description: "OK" }
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"/roles/{roleName}/desktopRoutes:set": {
|
|
76
|
+
post: {
|
|
77
|
+
tags: ["roles.desktopRoutes"],
|
|
78
|
+
summary: "Set desktop route permissions for a role",
|
|
79
|
+
parameters: [{ $ref: "#/components/parameters/RoleNamePath" }],
|
|
80
|
+
requestBody: {
|
|
81
|
+
required: true,
|
|
82
|
+
content: {
|
|
83
|
+
"application/json": {
|
|
84
|
+
schema: { $ref: "#/components/schemas/RouteIdList" }
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
responses: {
|
|
89
|
+
200: { description: "OK" }
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"/roles/{roleName}/desktopRoutes:list": {
|
|
94
|
+
get: {
|
|
95
|
+
tags: ["roles.desktopRoutes"],
|
|
96
|
+
summary: "List desktop routes granted to a role",
|
|
97
|
+
parameters: [
|
|
98
|
+
{ $ref: "#/components/parameters/RoleNamePath" },
|
|
99
|
+
{ $ref: "#/components/parameters/PaginateQuery" },
|
|
100
|
+
{ $ref: "#/components/parameters/FilterQuery" }
|
|
101
|
+
],
|
|
102
|
+
responses: {
|
|
103
|
+
200: {
|
|
104
|
+
description: "OK",
|
|
105
|
+
content: {
|
|
106
|
+
"application/json": {
|
|
107
|
+
schema: {
|
|
108
|
+
type: "object",
|
|
109
|
+
properties: {
|
|
110
|
+
data: {
|
|
111
|
+
type: "array",
|
|
112
|
+
items: { $ref: "#/components/schemas/DesktopRoute" }
|
|
113
|
+
},
|
|
114
|
+
meta: {
|
|
115
|
+
type: "object",
|
|
116
|
+
additionalProperties: true
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
"/desktopRoutes:listAccessible": {
|
|
127
|
+
get: {
|
|
128
|
+
tags: ["desktopRoutes"],
|
|
129
|
+
summary: "List desktop routes accessible to the current user",
|
|
130
|
+
parameters: [
|
|
131
|
+
{ $ref: "#/components/parameters/TreeQuery" },
|
|
132
|
+
{ $ref: "#/components/parameters/SortScalarQuery" },
|
|
133
|
+
{ $ref: "#/components/parameters/FilterQuery" }
|
|
134
|
+
],
|
|
135
|
+
responses: {
|
|
136
|
+
200: {
|
|
137
|
+
description: "OK",
|
|
138
|
+
content: {
|
|
139
|
+
"application/json": {
|
|
140
|
+
schema: {
|
|
141
|
+
type: "object",
|
|
142
|
+
properties: {
|
|
143
|
+
data: {
|
|
144
|
+
type: "array",
|
|
145
|
+
items: { $ref: "#/components/schemas/DesktopRoute" }
|
|
146
|
+
},
|
|
147
|
+
meta: {
|
|
148
|
+
type: "object",
|
|
149
|
+
additionalProperties: true
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
components: {
|
|
161
|
+
parameters: {
|
|
162
|
+
RoleNamePath: {
|
|
163
|
+
name: "roleName",
|
|
164
|
+
in: "path",
|
|
165
|
+
description: "Role name.",
|
|
166
|
+
required: true,
|
|
167
|
+
schema: { type: "string" }
|
|
168
|
+
},
|
|
169
|
+
PaginateQuery: {
|
|
170
|
+
name: "paginate",
|
|
171
|
+
in: "query",
|
|
172
|
+
description: "Whether to return paginated result format.",
|
|
173
|
+
required: false,
|
|
174
|
+
schema: { type: "boolean" }
|
|
175
|
+
},
|
|
176
|
+
TreeQuery: {
|
|
177
|
+
name: "tree",
|
|
178
|
+
in: "query",
|
|
179
|
+
description: "Whether to return routes as a tree.",
|
|
180
|
+
required: false,
|
|
181
|
+
schema: { type: "boolean" }
|
|
182
|
+
},
|
|
183
|
+
SortScalarQuery: {
|
|
184
|
+
name: "sort",
|
|
185
|
+
in: "query",
|
|
186
|
+
description: "Sort field, for example `sort`.",
|
|
187
|
+
required: false,
|
|
188
|
+
schema: { type: "string" }
|
|
189
|
+
},
|
|
190
|
+
FilterQuery: {
|
|
191
|
+
name: "filter",
|
|
192
|
+
in: "query",
|
|
193
|
+
description: "JSON filter object.",
|
|
194
|
+
required: false,
|
|
195
|
+
schema: { type: "object", additionalProperties: true }
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
schemas: {
|
|
199
|
+
RouteIdList: {
|
|
200
|
+
type: "array",
|
|
201
|
+
description: "Desktop route id list.",
|
|
202
|
+
items: { type: "integer" }
|
|
203
|
+
},
|
|
204
|
+
DesktopRoute: {
|
|
205
|
+
type: "object",
|
|
206
|
+
properties: {
|
|
207
|
+
id: { type: "integer" },
|
|
208
|
+
title: { type: "string" },
|
|
209
|
+
type: { type: "string" },
|
|
210
|
+
path: { type: "string", nullable: true },
|
|
211
|
+
parentId: { type: "integer", nullable: true },
|
|
212
|
+
hidden: { type: "boolean", nullable: true },
|
|
213
|
+
children: {
|
|
214
|
+
type: "array",
|
|
215
|
+
items: { $ref: "#/components/schemas/DesktopRoute" }
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
additionalProperties: true
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
};
|
package/package.json
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
"description": "Provides a client interface for the NocoBase server",
|
|
7
7
|
"description.ru-RU": "Предоставляет клиентский интерфейс для сервера NocoBase",
|
|
8
8
|
"description.zh-CN": "为 NocoBase 服务端提供客户端界面",
|
|
9
|
-
"version": "2.1.0-alpha.
|
|
9
|
+
"version": "2.1.0-alpha.30",
|
|
10
10
|
"main": "./dist/server/index.js",
|
|
11
|
-
"license": "
|
|
11
|
+
"license": "Apache-2.0",
|
|
12
12
|
"devDependencies": {
|
|
13
13
|
"antd": "5.x",
|
|
14
14
|
"cronstrue": "^2.11.0",
|
|
@@ -17,11 +17,12 @@
|
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
19
|
"@nocobase/client": "2.x",
|
|
20
|
+
"@nocobase/client-v2": "2.x",
|
|
20
21
|
"@nocobase/database": "2.x",
|
|
21
22
|
"@nocobase/plugin-localization": "2.x",
|
|
22
23
|
"@nocobase/server": "2.x",
|
|
23
24
|
"@nocobase/test": "2.x",
|
|
24
25
|
"@nocobase/utils": "2.x"
|
|
25
26
|
},
|
|
26
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "292ae0ad87f195ed201b274902d21ecd96f5ddd0"
|
|
27
28
|
}
|