@nocobase/plugin-backups 2.1.0-beta.47 → 2.1.0
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/client-v2.d.ts +2 -0
- package/client-v2.js +1 -0
- package/dist/client-v2/105.064f69093e98a2dd.js +10 -0
- package/dist/client-v2/346.45d02ff0f75c76e4.js +10 -0
- package/dist/client-v2/567.d39a82a6aa6452a0.js +10 -0
- package/dist/client-v2/components/BackupsTable.d.ts +16 -0
- package/dist/client-v2/components/NewBackup.d.ts +10 -0
- package/dist/client-v2/components/RefreshBackups.d.ts +10 -0
- package/dist/client-v2/components/RestoreFromBackup.d.ts +13 -0
- package/dist/client-v2/components/RestoreFromLocal.d.ts +10 -0
- package/dist/client-v2/constants.d.ts +14 -0
- package/dist/client-v2/contexts.d.ts +21 -0
- package/dist/client-v2/hooks/useBackupAppInfo.d.ts +15 -0
- package/dist/client-v2/hooks/useCheckBackupMessage.d.ts +12 -0
- package/dist/client-v2/hooks/useRestoreTask.d.ts +10 -0
- package/dist/client-v2/index.d.ts +9 -0
- package/dist/client-v2/index.js +10 -0
- package/dist/client-v2/locale.d.ts +10 -0
- package/dist/client-v2/pages/BackupSettings.d.ts +12 -0
- package/dist/client-v2/pages/BackupsManagement.d.ts +11 -0
- package/dist/client-v2/plugin.d.ts +15 -0
- package/dist/externalVersion.js +11 -9
- package/dist/node_modules/archiver/package.json +1 -1
- package/dist/node_modules/cron-parser/package.json +1 -1
- package/dist/node_modules/fs-extra/package.json +1 -1
- package/dist/node_modules/semver/package.json +1 -1
- package/dist/node_modules/yauzl/package.json +1 -1
- package/package.json +5 -2
package/client-v2.d.ts
ADDED
package/client-v2.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./dist/client-v2/index.js');
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
"use strict";(self.webpackChunk_nocobase_plugin_backups_client_v2=self.webpackChunk_nocobase_plugin_backups_client_v2||[]).push([["105"],{696:function(e,t,n){n.r(t);var r=n(694),a=n(625),o=n(59),c=n(155),l=n.n(c),u=n(837);n(693);var i=n(488);function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function f(e,t,n,r,a,o,c){try{var l=e[o](c),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,a)}function p(e){return function(){var t=this,n=arguments;return new Promise(function(r,a){var o=e.apply(t,n);function c(e){f(o,r,a,c,l,"next",e)}function l(e){f(o,r,a,c,l,"throw",e)}c(void 0)})}}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function m(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,a=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var o=[],c=!0,l=!1;try{for(a=a.call(e);!(c=(n=a.next()).done)&&(o.push(n.value),!t||o.length!==t);c=!0);}catch(e){l=!0,r=e}finally{try{c||null==a.return||a.return()}finally{if(l)throw r}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){var n,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),l=Object.defineProperty;return l(c,"next",{value:u(0)}),l(c,"throw",{value:u(1)}),l(c,"return",{value:u(2)}),"function"==typeof Symbol&&l(c,Symbol.iterator,{value:function(){return this}}),c;function u(l){return function(u){var i=[l,u];if(n)throw TypeError("Generator is already executing.");for(;c&&(c=0,i[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&i[0]?r.return:i[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,i[1])).done)return a;switch(r=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,r=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){o.label=i[1];break}if(6===i[0]&&o.label<a[1]){o.label=a[1],a=i;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(i);break}a[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e],r=0}finally{n=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}}}var y={scheduled:!1,cron:"0 0 * * *",keep:100,enableFilesBackup:!1},h=function(e){var t,n,r,a=e.onChange,o=e.value,c=function(e,t){if(null==e)return{};var n,r,a,o={};if("u">typeof Reflect&&Reflect.ownKeys){for(a=0,n=Reflect.ownKeys(Object(e));a<n.length;a++)r=n[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}if(o=function(e,t){if(null==e)return{};var n,r,a={},o=Object.getOwnPropertyNames(e);for(r=0;r<o.length;r++)n=o[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n]);return a}(e,t),Object.getOwnPropertySymbols)for(a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)r=n[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}(e,["onChange","value"]),i=window.cronLocale;return l().createElement("fieldset",{className:"nb-backup-settings-cron"},l().createElement(u.l4,(t=b({},c),n=n={clearButton:!1,locale:i,value:null!=(r=null!=o?o:y.cron)?r:"",setValue:function(e){null==a||a(e)}},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t)))},g=function(e){return l().createElement("strong",null,e,":")};t.default=function(){var e=(0,r.useFlowContext)(),t=(0,i.k)(),n=o.App.useApp().message,u=m(o.Form.useForm(),1)[0],s=m((0,c.useState)(!1),2),f=s[0],v=s[1],w=o.Form.useWatch("scheduled",u),O=(0,a.useRequest)(function(){return p(function(){var t;return d(this,function(n){switch(n.label){case 0:return[4,e.api.request({url:"backupSettings:get/1"})];case 1:return[2,null==(t=n.sent().data)?void 0:t.data]}})})()},{onSuccess:function(e){u.setFieldsValue(b({},y,e))}}),j=(0,a.useRequest)(function(){return p(function(){var t,n;return d(this,function(r){switch(r.label){case 0:return[4,e.api.request({url:"storages:list"})];case 1:return[2,(null!=(t=null==(n=r.sent().data)?void 0:n.data)?t:[]).filter(function(e){return"local"!==e.type})]}})})()}),k=(0,c.useMemo)(function(){var e;return(null!=(e=j.data)?e:[]).map(function(e){return{label:e.title,value:e.id}})},[j.data]);return l().createElement(o.Card,{bordered:!1},l().createElement("style",null,"\n .nb-backup-settings-cron {\n min-width: 0;\n margin: 0;\n padding: 0;\n border: 0;\n }\n\n .nb-backup-settings-cron .react-js-cron {\n padding: 0.5em 0.5em 0 0.5em;\n border: 1px dashed #ccc;\n }\n\n .nb-backup-settings-cron .react-js-cron .react-js-cron-field {\n flex-shrink: 0;\n margin-bottom: 0.5em;\n }\n\n .nb-backup-settings-cron .react-js-cron .react-js-cron-field > span {\n flex-shrink: 0;\n margin: 0 0.5em 0 0;\n }\n\n .nb-backup-settings-cron .react-js-cron .react-js-cron-field > .react-js-cron-select {\n margin: 0 0.5em 0 0;\n }\n\n .nb-backup-settings-cron\n .react-js-cron\n .react-js-cron-field\n > .react-js-cron-select\n .ant-select-selection-overflow {\n align-items: center;\n flex: initial;\n }\n"),l().createElement(o.Form,{form:u,layout:"vertical",initialValues:y,disabled:O.loading},l().createElement(o.Form.Item,{label:g(t("Automatic backup"))},l().createElement(o.Space,{direction:"vertical",style:{width:"100%"}},l().createElement(o.Form.Item,{name:"scheduled",valuePropName:"checked",noStyle:!0},l().createElement(o.Checkbox,null,t("Run automatic backup on the cron schedule"))),l().createElement(o.Form.Item,{name:"cron",rules:[{required:!!w,message:t("The field value is required")}],style:{marginBottom:0}},l().createElement(h,{disabled:!w})))),l().createElement(o.Form.Item,{name:"keep",label:g(t("Maximum number of backups")),extra:t("The maximum number of backups to keep, older backups are automatically deleted."),required:!0,rules:[{required:!0,message:t("The field value is required")}]},l().createElement(o.InputNumber,{min:1,style:{width:"100%"}})),l().createElement(o.Form.Item,{name:"storageId",label:g(t("Sync backups to cloud storage"))},l().createElement(o.Select,{loading:j.loading,options:k,style:{width:"100%"}})),l().createElement(o.Form.Item,{name:"enableFilesBackup",label:g(t("Backup local storage files")),valuePropName:"checked"},l().createElement(o.Switch,null)),l().createElement(o.Form.Item,{name:"encryptionPassword",label:g(t("Restore password")),extra:t("If a restore password is set, it must be entered when restoring the backup.")},l().createElement(o.Input.Password,{autoComplete:"new-password",style:{width:"100%"}})),l().createElement(o.Form.Item,null,l().createElement(o.Button,{type:"primary",loading:f,onClick:function(){return p(function(){var r,a;return d(this,function(o){switch(o.label){case 0:return[4,u.validateFields()];case 1:r=o.sent(),a=b({},O.data,r),v(!0),o.label=2;case 2:return o.trys.push([2,,4,5]),[4,e.api.request({url:"backupSettings:update/1",method:"post",data:a})];case 3:return o.sent(),O.mutate(a),n.success(t("Saved successfully")),[3,5];case 4:return v(!1),[7];case 5:return[2]}})})()}},t("Submit")))))}},488:function(e,t,n){n.d(t,{k:function(){return o}});var r=n(694),a=n(401);function o(){var e=(0,r.useFlowEngine)();return function(t,n){return e.context.t(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({ns:[a.C,"client"]},n))}}}}]);
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
"use strict";(self.webpackChunk_nocobase_plugin_backups_client_v2=self.webpackChunk_nocobase_plugin_backups_client_v2||[]).push([["346"],{253:function(e,n,t){var r=t(168),o=t.n(r),a=t(433),i=t.n(a)()(o());i.push([e.id,".react-js-cron {\n display: -webkit-box;\n display: -webkit-flex;\n display: -moz-box;\n display: flex;\n align-items: flex-start;\n flex-wrap: wrap;\n}\n.react-js-cron > div,\n.react-js-cron-field {\n display: -webkit-box;\n display: -webkit-flex;\n display: -moz-box;\n display: flex;\n align-items: center;\n}\n.react-js-cron-field {\n margin-bottom: 10px;\n}\n.react-js-cron-field > span {\n margin-left: 5px;\n}\ndiv.react-js-cron-select {\n margin-left: 5px;\n}\n.react-js-cron-select.react-js-cron-select-no-prefix {\n margin-left: 0;\n}\ndiv.react-js-cron-error .react-js-cron-select .ant-select-selector {\n border-color: #ff4d4f;\n background: #fff6f6;\n}\ndiv.react-js-cron-custom-select {\n min-width: 70px;\n z-index: 1;\n}\ndiv.react-js-cron-error div.react-js-cron-custom-select {\n background: #fff6f6;\n}\ndiv.react-js-cron-select.react-js-cron-custom-select.ant-select\n div.ant-select-selector {\n padding-left: 11px;\n padding-right: 30px;\n}\n.react-js-cron-read-only\n div.react-js-cron-select.react-js-cron-custom-select.ant-select\n div.ant-select-selector {\n padding-right: 11px;\n}\ndiv.react-js-cron-custom-select .ant-select-selection-search {\n width: 0 !important;\n margin: 0 !important;\n}\ndiv.react-js-cron-custom-select .ant-select-selection-placeholder {\n position: static;\n top: 50%;\n right: auto;\n left: auto;\n transform: none;\n transition: none;\n opacity: 1;\n color: inherit;\n}\n.react-js-cron-week-days-placeholder\n .react-js-cron-custom-select\n .ant-select-selection-placeholder,\n.react-js-cron-month-days-placeholder\n .react-js-cron-custom-select\n .ant-select-selection-placeholder {\n opacity: 0.4;\n}\n.react-js-cron-custom-select-dropdown {\n min-width: 0 !important;\n width: 170px !important;\n}\n.react-js-cron-custom-select-dropdown .rc-virtual-list {\n max-height: none !important;\n}\n.react-js-cron-custom-select-dropdown-grid .rc-virtual-list-holder-inner {\n display: grid !important;\n grid-template-columns: repeat(4, 1fr);\n}\n.react-js-cron-custom-select-dropdown-grid\n .rc-virtual-list-holder-inner\n .ant-select-item-option-content {\n text-align: center;\n}\n.react-js-cron-custom-select-dropdown-hours-twelve-hour-clock {\n width: 260px !important;\n}\n.react-js-cron-custom-select-dropdown-minutes-large {\n width: 300px !important;\n}\n.react-js-cron-custom-select-dropdown-minutes-large\n .rc-virtual-list-holder-inner {\n grid-template-columns: repeat(7, 1fr);\n}\n.react-js-cron-custom-select-dropdown-minutes-medium {\n width: 215px !important;\n}\n.react-js-cron-custom-select-dropdown-minutes-medium\n .rc-virtual-list-holder-inner {\n grid-template-columns: repeat(5, 1fr);\n}\n.react-js-cron-period > span:first-child {\n margin-left: 0 !important;\n}\n.react-js-cron-period\n .react-js-cron-select.ant-select-single.ant-select-open\n .ant-select-selection-item {\n opacity: 1;\n}\n.react-js-cron-select-dropdown-period {\n min-width: 0 !important;\n width: auto !important;\n}\n.react-js-cron-clear-button {\n margin-left: 10px;\n margin-bottom: 10px;\n}\n.react-js-cron-disabled .react-js-cron-select.ant-select-disabled {\n background: #f5f5f5;\n}\ndiv.react-js-cron-select.react-js-cron-custom-select.ant-select\n div.ant-select-selector\n > .ant-select-selection-overflow {\n align-items: center;\n flex: initial;\n}\n",""]),n.A=i},433:function(e){e.exports=function(e){var n=[];return n.toString=function(){return this.map(function(n){var t="",r=void 0!==n[5];return n[4]&&(t+="@supports (".concat(n[4],") {")),n[2]&&(t+="@media ".concat(n[2]," {")),r&&(t+="@layer".concat(n[5].length>0?" ".concat(n[5]):""," {")),t+=e(n),r&&(t+="}"),n[2]&&(t+="}"),n[4]&&(t+="}"),t}).join("")},n.i=function(e,t,r,o,a){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(r)for(var c=0;c<this.length;c++){var l=this[c][0];null!=l&&(i[l]=!0)}for(var s=0;s<e.length;s++){var u=[].concat(e[s]);r&&i[u[0]]||(void 0!==a&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=a),t&&(u[2]&&(u[1]="@media ".concat(u[2]," {").concat(u[1],"}")),u[2]=t),o&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=o):u[4]="".concat(o)),n.push(u))}},n}},168:function(e){e.exports=function(e){return e[1]}},837:function(e,n,t){t.d(n,{l4:function(){return F}});var r=t(295),o=t(59),a=t(155),i=function(){return(i=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}).apply(this,arguments)};function c(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>n.indexOf(r)&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>n.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(t[r[o]]=e[r[o]])}return t}function l(e,n,t){if(t||2==arguments.length)for(var r,o=0,a=n.length;o<a;o++)!r&&o in n||(r||(r=Array.prototype.slice.call(n,0,o)),r[o]=n[o]);return e.concat(r||Array.prototype.slice.call(n))}var s=[{name:"@yearly",value:"0 0 1 1 *"},{name:"@annually",value:"0 0 1 1 *"},{name:"@monthly",value:"0 0 1 * *"},{name:"@weekly",value:"0 0 * * 0"},{name:"@daily",value:"0 0 * * *"},{name:"@midnight",value:"0 0 * * *"},{name:"@hourly",value:"0 * * * *"}],u=[{type:"minutes",min:0,max:59,total:60},{type:"hours",min:0,max:23,total:24},{type:"month-days",min:1,max:31,total:31},{type:"months",min:1,max:12,total:12,alt:["JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC"]},{type:"week-days",min:0,max:6,total:7,alt:["SUN","MON","TUE","WED","THU","FRI","SAT"]}],d={everyText:"every",emptyMonths:"every month",emptyMonthDays:"every day of the month",emptyMonthDaysShort:"day of the month",emptyWeekDays:"every day of the week",emptyWeekDaysShort:"day of the week",emptyHours:"every hour",emptyMinutes:"every minute",emptyMinutesForHourPeriod:"every",yearOption:"year",monthOption:"month",weekOption:"week",dayOption:"day",hourOption:"hour",minuteOption:"minute",rebootOption:"reboot",prefixPeriod:"Every",prefixMonths:"in",prefixMonthDays:"on",prefixWeekDays:"on",prefixWeekDaysForMonthAndYearPeriod:"and",prefixHours:"at",prefixMinutes:":",prefixMinutesForHourPeriod:"at",suffixMinutesForHourPeriod:"minute(s)",errorInvalidCron:"Invalid cron expression",clearButtonText:"Clear",weekDays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],altWeekDays:["SUN","MON","TUE","WED","THU","FRI","SAT"],altMonths:["JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC"]};function p(e,n){for(var t=[],r=e;r<=n;r++)t.push(r);return t}function m(e){return e.sort(function(e,n){return e-n}),e}function f(e){var n=[];return e.forEach(function(e){0>n.indexOf(e)&&n.push(e)}),n}function h(e){return Object.entries(e).filter(function(e){var n=e[0],t=e[1];return n&&t}).map(function(e){return e[0]}).join(" ")}function y(e,n){e&&e({type:"invalid_cron",description:n.errorInvalidCron||d.errorInvalidCron})}function v(e){var n=parseInt(e,10),t=Number(e);return n===t?t:NaN}function g(e,n,t,r,o,a,i,c,l,d,h,g,b,x){t&&t(void 0),n(!1);var j=!1;if(!e){if("always"===r||a&&"for-default-value"===r)return;j=!0}if(!j){if(c&&(!0===c||c.includes(e))){if("@reboot"===e)return void x("reboot");var w=s.find(function(n){return n.name===e});w&&(e=w.value)}try{var M=function(e){if("string"!=typeof e)throw Error("Invalid cron string");var n=e.replace(/\s+/g," ").trim().split(" ");if(5===n.length)return n.map(function(e,n){var t=u[n];if("*"===e||"*/1"===e)return[];var r=m(f(k((function(e,n,t){if(t){e=e.toUpperCase();for(var r=0;r<t.length;r++)e=e.replace(t[r],"".concat(r+n))}return e})(e,t.min,t.alt).split(",").map(function(n){var r,o=n.split("/");if(o.length>2)throw Error('Invalid value "'.concat(e,' for "').concat(t.type,'"'));var a=o[0],i=o[1];r="*"===a?p(t.min,t.max):function(e,n,t){var r=e.split("-");if(1===r.length){var o=v(r[0]);if(isNaN(o))throw Error('Invalid value "'.concat(n,'" for ').concat(t.type));return[o]}if(2===r.length){var a=v(r[0]),i=v(r[1]);if(isNaN(a)||isNaN(i))throw Error('Invalid value "'.concat(n,'" for ').concat(t.type));if(i<a)throw Error('Max range is less than min range in "'.concat(e,'" for ').concat(t.type));return p(a,i)}throw Error('Invalid value "'.concat(e,'" for ').concat(t.type))}(a,e,t);var c=function(e,n){if(void 0!==e){var t=v(e);if(isNaN(t)||t<1)throw Error('Invalid interval step value "'.concat(e,'" for ').concat(n.type));return t}}(i,t),l=r,s=c;if(s){var u=l[0];l=l.filter(function(e){return e%s==u%s||e===u})}return l}).flat(),t))),o=O(r,t);if(void 0!==o)throw Error('Value "'.concat(o,'" out of range for ').concat(t.type));return r.length===t.total?[]:r});throw Error("Invalid cron string format")}(e),N=M[3].length>0?"year":M[2].length>0?"month":M[4].length>0?"week":M[1].length>0?"day":M[0].length>0?"hour":"minute";x(N),l(M[0]),d(M[1]),h(M[2]),g(M[3]),b(M[4])}catch(e){j=!0}}j&&(o.current=e,n(!0),y(t,i))}function b(e,n,t,r,o,a,i){return"reboot"===e?"@reboot":["minute"!==e&&a?a:[],"minute"!==e&&"hour"!==e&&o?o:[],("year"===e||"month"===e)&&t?t:[],"year"===e&&n?n:[],("year"===e||"month"===e||"week"===e)&&r?r:[]].map(function(e,n){var t=u[n];return x(w(e,t),t,i)}).join(" ")}function x(e,n,t,r,o){var a="";if(e.length===n.max-n.min+1||0===e.length)a="*";else{var i,c,l,s,u,d=function(e){if(e.length>2){var n=e[1]-e[0];if(n>1)return n}}(e);a=d&&function(e,n){for(var t=1;t<e.length;t++){var r=e[t-1];if(e[t]-r!==n)return!1}return!0}(e,d)?(i=e[0],c=M(e),l=e.length===(c-i)/d+1,i===n.min&&c+d>n.max&&l||0)?"*/".concat(d):"".concat(j(e[0],n,t,r,o),"-").concat(j(M(e),n,t,r,o),"/").concat(d):(s=[],u=null,e.forEach(function(e,n,t){e!==t[n+1]-1?null!==u?(s.push([u,e]),u=null):s.push(e):null===u&&(u=e)}),s).map(function(e){return Array.isArray(e)?"".concat(j(e[0],n,t,r,o),"-").concat(j(e[1],n,t,r,o)):j(e,n,t,r,o)}).join(",")}return a}function j(e,n,t,r,o){var a=e.toString(),i=n.type,c=n.alt,l=n.min,s=r&&(!0===r||r.includes(i)),u="24-hour-clock"===o&&("hours"===i||"minutes"===i);if(t&&"week-days"===i||t&&"months"===i?a=c[e-l]:e<10&&(s||u)&&(a=a.padStart(2,"0")),"hours"===i&&"12-hour-clock"===o){var d=e>=12?"PM":"AM",p=e%12||12;p<10&&s&&(p=p.toString().padStart(2,"0")),a="".concat(p).concat(d)}return a}function w(e,n){var t=m(f(k(e,n)));if(0===t.length)return t;var r=O(t,n);if(void 0!==r)throw Error('Value "'.concat(r,'" out of range for ').concat(n.type));return t}function k(e,n){return"week-days"===n.type&&(e=e.map(function(e){return 7===e?0:e})),e}function O(e,n){var t=e[0],r=e[e.length-1];return t<n.min?t:r>n.max?r:void 0}function M(e){return e[e.length-1]}function N(e){var n=e.value,t=e.grid,s=void 0===t||t,u=e.optionsList,p=e.setValue,f=e.locale,y=e.className,v=e.humanizeLabels,g=e.disabled,b=e.readOnly,k=e.leadingZero,O=e.clockFormat,M=e.period,N=e.unit,D=e.periodicityOnDoubleClick,S=e.mode,C=c(e,["value","grid","optionsList","setValue","locale","className","humanizeLabels","disabled","readOnly","leadingZero","clockFormat","period","unit","periodicityOnDoubleClick","mode"]),A=(0,a.useMemo)(function(){if(n&&Array.isArray(n))return n.map(function(e){return e.toString()})},[n]),E=(0,a.useMemo)(function(){return u?u.map(function(e,n){return{value:(0===N.min?n:n+1).toString(),label:e}}):l([],Array(N.total),!0).map(function(e,n){var t=0===N.min?n:n+1;return{value:t.toString(),label:j(t,N,v,k,O)}})},[u,k,v,O]),P=JSON.stringify(f),F=(0,a.useCallback)(function(e){var t=e.value;if(!n||n[0]!==Number(t))return(0,r.jsx)(r.Fragment,{});var o=x(w(n,N),N,v,k,O),a=o.match(/^\*\/([0-9]+),?/)||[];return(0,r.jsx)("div",{children:a[1]?"".concat(f.everyText||d.everyText," ").concat(a[1]):o})},[n,P,v,k,O]),T=(0,a.useCallback)(function(e){var t=Array.isArray(e)?m(e):[e],r=t;n&&(r="single"===S?[]:l([],n,!0),t.forEach(function(e){var t=Number(e);r=n.some(function(e){return e===t})?r.filter(function(e){return e!==t}):m(l(l([],r,!0),[t],!1))})),r.length===N.total?p([]):p(r)},[p,n]),_=(0,a.useCallback)(function(e){if(0!==e&&1!==e){for(var t=N.total+N.min,r=[],o=N.min;o<t;o++)o%e==0&&r.push(o);var a=n&&r&&n.length===r.length&&n.every(function(e,n){return e===r[n]});p(r.length===E.length||a?[]:r)}else p([])},[n,E,p]),V=(0,a.useRef)([]),I=(0,a.useCallback)(function(e){if(!b){var n=V.current;n.push({time:(new Date).getTime(),value:Number(e)});var t=window.setTimeout(function(){D&&n.length>1&&n[n.length-1].time-n[n.length-2].time<300?n[n.length-1].value===n[n.length-2].value?_(Number(e)):T([n[n.length-2].value,n[n.length-1].value]):T(Number(e)),V.current=[]},300);return function(){window.clearTimeout(t)}}},[V,T,_,b,D]),H=(0,a.useCallback)(function(){b||p([])},[p,b]),W=(0,a.useMemo)(function(){var e;return h(((e={"react-js-cron-select":!0,"react-js-cron-custom-select":!0})["".concat(y,"-select")]=!!y,e))},[y]),L=(0,a.useMemo)(function(){var e;return h(((e={"react-js-cron-select-dropdown":!0})["react-js-cron-select-dropdown-".concat(N.type)]=!0,e["react-js-cron-custom-select-dropdown"]=!0,e["react-js-cron-custom-select-dropdown-".concat(N.type)]=!0,e["react-js-cron-custom-select-dropdown-minutes-large"]="minutes"===N.type&&"hour"!==M&&"day"!==M,e["react-js-cron-custom-select-dropdown-minutes-medium"]="minutes"===N.type&&("day"===M||"hour"===M),e["react-js-cron-custom-select-dropdown-hours-twelve-hour-clock"]="hours"===N.type&&"12-hour-clock"===O,e["react-js-cron-custom-select-dropdown-grid"]=!!s,e["".concat(y,"-select-dropdown")]=!!y,e["".concat(y,"-select-dropdown-").concat(N.type)]=!!y,e))},[y,s,O,M]);return(0,r.jsx)(o.Select,i({mode:"single"!==S||D?"multiple":void 0,allowClear:!b,virtual:!1,open:!b&&void 0,value:A,onClear:H,tagRender:F,className:W,popupClassName:L,options:E,showSearch:!1,showArrow:!b,menuItemSelectedIcon:null,dropdownMatchSelectWidth:!1,onSelect:I,onDeselect:I,disabled:g,dropdownAlign:"minutes"!==N.type&&"hours"!==N.type||"day"===M||"hour"===M?void 0:{points:["tr","br"]},"data-testid":"custom-select-".concat(N.type)},C))}function D(e){var n=e.value,t=e.setValue,o=e.locale,c=e.className,l=e.disabled,s=e.readOnly,p=e.leadingZero,m=e.clockFormat,f=e.period,y=e.periodicityOnDoubleClick,v=e.mode,g=(0,a.useMemo)(function(){var e;return h(((e={"react-js-cron-field":!0,"react-js-cron-hours":!0})["".concat(c,"-field")]=!!c,e["".concat(c,"-hours")]=!!c,e))},[c]);return(0,r.jsxs)("div",i({className:g},{children:[""!==o.prefixHours&&(0,r.jsx)("span",{children:o.prefixHours||d.prefixHours}),(0,r.jsx)(N,{placeholder:o.emptyHours||d.emptyHours,value:n,unit:u[1],setValue:t,locale:o,className:c,disabled:l,readOnly:s,leadingZero:p,clockFormat:m,period:f,periodicityOnDoubleClick:y,mode:v})]}))}function S(e){var n=e.value,t=e.setValue,o=e.locale,c=e.className,l=e.disabled,s=e.readOnly,p=e.leadingZero,m=e.clockFormat,f=e.period,y=e.periodicityOnDoubleClick,v=e.mode,g=(0,a.useMemo)(function(){var e;return h(((e={"react-js-cron-field":!0,"react-js-cron-minutes":!0})["".concat(c,"-field")]=!!c,e["".concat(c,"-minutes")]=!!c,e))},[c]);return(0,r.jsxs)("div",i({className:g},{children:["hour"===f?""!==o.prefixMinutesForHourPeriod&&(0,r.jsx)("span",{children:o.prefixMinutesForHourPeriod||d.prefixMinutesForHourPeriod}):""!==o.prefixMinutes&&(0,r.jsx)("span",{children:o.prefixMinutes||d.prefixMinutes}),(0,r.jsx)(N,{placeholder:"hour"===f?o.emptyMinutesForHourPeriod||d.emptyMinutesForHourPeriod:o.emptyMinutes||d.emptyMinutes,value:n,unit:u[0],setValue:t,locale:o,className:c,disabled:l,readOnly:s,leadingZero:p,clockFormat:m,period:f,periodicityOnDoubleClick:y,mode:v}),"hour"===f&&""!==o.suffixMinutesForHourPeriod&&(0,r.jsx)("span",{children:o.suffixMinutesForHourPeriod||d.suffixMinutesForHourPeriod})]}))}function C(e){var n=e.value,t=e.setValue,o=e.locale,c=e.className,l=e.weekDays,s=e.disabled,p=e.readOnly,m=e.leadingZero,f=e.period,y=e.periodicityOnDoubleClick,v=e.mode,g=!l||0===l.length,b=(0,a.useMemo)(function(){var e;return h(((e={"react-js-cron-field":!0,"react-js-cron-month-days":!0,"react-js-cron-month-days-placeholder":!g})["".concat(c,"-field")]=!!c,e["".concat(c,"-month-days")]=!!c,e))},[c,g]),x=JSON.stringify(o),j=(0,a.useMemo)(function(){return g?o.emptyMonthDays||d.emptyMonthDays:o.emptyMonthDaysShort||d.emptyMonthDaysShort},[g,x]);return p&&(!n||!(n.length>0))&&(n&&0!==n.length||l&&0!==l.length)?null:(0,r.jsxs)("div",i({className:b},{children:[""!==o.prefixMonthDays&&(0,r.jsx)("span",{children:o.prefixMonthDays||d.prefixMonthDays}),(0,r.jsx)(N,{placeholder:j,value:n,setValue:t,unit:u[2],locale:o,className:c,disabled:s,readOnly:p,leadingZero:m,period:f,periodicityOnDoubleClick:y,mode:v})]}))}function A(e){var n=e.value,t=e.setValue,o=e.locale,c=e.className,l=e.humanizeLabels,s=e.disabled,p=e.readOnly,m=e.period,f=e.periodicityOnDoubleClick,y=e.mode,v=o.months||d.months,g=(0,a.useMemo)(function(){var e;return h(((e={"react-js-cron-field":!0,"react-js-cron-months":!0})["".concat(c,"-field")]=!!c,e["".concat(c,"-months")]=!!c,e))},[c]);return(0,r.jsxs)("div",i({className:g},{children:[""!==o.prefixMonths&&(0,r.jsx)("span",{children:o.prefixMonths||d.prefixMonths}),(0,r.jsx)(N,{placeholder:o.emptyMonths||d.emptyMonths,optionsList:v,grid:!1,value:n,unit:i(i({},u[3]),{alt:o.altMonths||d.altMonths}),setValue:t,locale:o,className:c,humanizeLabels:l,disabled:s,readOnly:p,period:m,periodicityOnDoubleClick:f,mode:y})]}))}function E(e){var n=e.value,t=e.setValue,c=e.locale,l=e.className,s=e.disabled,u=e.readOnly,p=e.shortcuts,m=e.allowedPeriods,f=[];m.includes("year")&&f.push({value:"year",label:c.yearOption||d.yearOption}),m.includes("month")&&f.push({value:"month",label:c.monthOption||d.monthOption}),m.includes("week")&&f.push({value:"week",label:c.weekOption||d.weekOption}),m.includes("day")&&f.push({value:"day",label:c.dayOption||d.dayOption}),m.includes("hour")&&f.push({value:"hour",label:c.hourOption||d.hourOption}),m.includes("minute")&&f.push({value:"minute",label:c.minuteOption||d.minuteOption}),m.includes("reboot")&&p&&(!0===p||p.includes("@reboot"))&&f.push({value:"reboot",label:c.rebootOption||d.rebootOption});var y=(0,a.useCallback)(function(e){u||t(e)},[t,u]),v=(0,a.useMemo)(function(){var e;return h(((e={"react-js-cron-field":!0,"react-js-cron-period":!0})["".concat(l,"-field")]=!!l,e["".concat(l,"-period")]=!!l,e))},[l]),g=(0,a.useMemo)(function(){var e;return h(((e={"react-js-cron-select":!0,"react-js-cron-select-no-prefix":""===c.prefixPeriod})["".concat(l,"-select")]=!!l,e))},[l,c.prefixPeriod]),b=(0,a.useMemo)(function(){var e;return h(((e={"react-js-cron-select-dropdown":!0,"react-js-cron-select-dropdown-period":!0})["".concat(l,"-select-dropdown")]=!!l,e["".concat(l,"-select-dropdown-period")]=!!l,e))},[l]);return(0,r.jsxs)("div",i({className:v},{children:[""!==c.prefixPeriod&&(0,r.jsx)("span",{children:c.prefixPeriod||d.prefixPeriod}),(0,r.jsx)(o.Select,{defaultValue:n,value:n,onChange:y,options:f,className:g,popupClassName:b,disabled:s,showArrow:!u,open:!u&&void 0,"data-testid":"select-period"},JSON.stringify(c))]}))}function P(e){var n=e.value,t=e.setValue,o=e.locale,c=e.className,l=e.humanizeLabels,s=e.monthDays,p=e.disabled,m=e.readOnly,f=e.period,y=e.periodicityOnDoubleClick,v=e.mode,g=o.weekDays||d.weekDays,b="week"===f||!s||0===s.length,x=(0,a.useMemo)(function(){var e;return h(((e={"react-js-cron-field":!0,"react-js-cron-week-days":!0,"react-js-cron-week-days-placeholder":!b})["".concat(c,"-field")]=!!c,e["".concat(c,"-week-days")]=!!c,e))},[c,b]),j=JSON.stringify(o),w=(0,a.useMemo)(function(){return b?o.emptyWeekDays||d.emptyWeekDays:o.emptyWeekDaysShort||d.emptyWeekDaysShort},[b,j]),k="week"===f||!m||n&&n.length>0||(!n||0===n.length)&&(!s||0===s.length),O=!m||s&&s.length>0||(!s||0===s.length)&&(!n||0===n.length);return k?(0,r.jsxs)("div",i({className:x},{children:[""!==o.prefixWeekDays&&("week"===f||!O)&&(0,r.jsx)("span",{children:o.prefixWeekDays||d.prefixWeekDays}),""!==o.prefixWeekDaysForMonthAndYearPeriod&&"week"!==f&&O&&(0,r.jsx)("span",{children:o.prefixWeekDaysForMonthAndYearPeriod||d.prefixWeekDaysForMonthAndYearPeriod}),(0,r.jsx)(N,{placeholder:w,optionsList:g,grid:!1,value:n,unit:i(i({},u[4]),{alt:o.altWeekDays||d.altWeekDays}),setValue:t,locale:o,className:c,humanizeLabels:l,disabled:p,readOnly:m,period:f,periodicityOnDoubleClick:y,mode:v})]})):null}function F(e){var n,t=e.clearButton,l=void 0===t||t,s=e.clearButtonProps,u=void 0===s?{}:s,p=e.clearButtonAction,m=void 0===p?"fill-with-every":p,f=e.locale,v=void 0===f?d:f,x=e.value,j=void 0===x?"":x,w=e.setValue,k=e.displayError,O=void 0===k||k,M=e.onError,N=e.className,F=e.defaultPeriod,T=e.allowEmpty,_=void 0===T?"for-default-value":T,V=e.humanizeLabels,I=void 0===V||V,H=e.humanizeValue,W=void 0!==H&&H,L=e.disabled,R=void 0!==L&&L,U=e.readOnly,J=void 0!==U&&U,z=e.leadingZero,Z=void 0!==z&&z,B=e.shortcuts,Y=void 0===B?["@yearly","@annually","@monthly","@weekly","@daily","@midnight","@hourly"]:B,G=e.clockFormat,$=e.periodicityOnDoubleClick,q=void 0===$||$,K=e.mode,Q=void 0===K?"multiple":K,X=e.allowedDropdowns,ee=void 0===X?["period","months","month-days","week-days","hours","minutes"]:X,en=e.allowedPeriods,et=(0,a.useRef)(j),er=(0,a.useRef)(void 0===F?"day":F),eo=(0,a.useState)(),ea=eo[0],ei=eo[1],ec=(0,a.useState)(),el=ec[0],es=ec[1],eu=(0,a.useState)(),ed=eu[0],ep=eu[1],em=(0,a.useState)(),ef=em[0],eh=em[1],ey=(0,a.useState)(),ev=ey[0],eg=ey[1],eb=(0,a.useState)(),ex=eb[0],ej=eb[1],ew=(0,a.useState)(!1),ek=ew[0],eO=ew[1],eM=(0,a.useState)(!1),eN=eM[0],eD=eM[1],eS=(n=(0,a.useRef)(eN),(0,a.useEffect)(function(){n.current=eN},[eN]),n.current),eC=JSON.stringify(v);(0,a.useEffect)(function(){g(j,eO,M,_,et,!0,v,Y,ej,eg,es,ep,eh,ei)},[]),(0,a.useEffect)(function(){j!==et.current&&g(j,eO,M,_,et,!1,v,Y,ej,eg,es,ep,eh,ei)},[j,et,eC,_,Y]),(0,a.useEffect)(function(){if(!(ea||ex||ed||el||ef||ev)||eN||eS)eN&&eD(!1);else{var e=ea||er.current,n=b(e,ed,el,ef,ev,ex,W);w(n,{selectedPeriod:e}),et.current=n,M&&M(void 0),eO(!1)}},[ea,el,ed,ef,ev,ex,W,eN]);var eA=(0,a.useCallback)(function(){es(void 0),ep(void 0),eh(void 0),eg(void 0),ej(void 0);var e="",n="reboot"!==ea&&ea?ea:er.current;n!==ea&&ei(n),"fill-with-every"===m&&(e=b(n,void 0,void 0,void 0,void 0,void 0)),w(e,{selectedPeriod:n}),et.current=e,eD(!0),"never"===_&&"empty"===m?(eO(!0),y(M,v)):(M&&M(void 0),eO(!1))},[ea,w,M,m]),eE=(0,a.useMemo)(function(){var e;return h(((e={"react-js-cron":!0,"react-js-cron-error":ek&&O,"react-js-cron-disabled":R,"react-js-cron-read-only":J})["".concat(N)]=!!N,e["".concat(N,"-error")]=ek&&O&&!!N,e["".concat(N,"-disabled")]=R&&!!N,e["".concat(N,"-read-only")]=J&&!!N,e))},[N,ek,O,R,J]),eP=u.className,eF=c(u,["className"]),eT=(0,a.useMemo)(function(){var e;return h(((e={"react-js-cron-clear-button":!0})["".concat(N,"-clear-button")]=!!N,e["".concat(eP)]=!!eP,e))},[N,eP]),e_=JSON.stringify(eF),eV=(0,a.useMemo)(function(){return l&&!J?(0,r.jsx)(o.Button,i({className:eT,danger:!0,type:"primary",disabled:R},eF,{onClick:eA},{children:v.clearButtonText||d.clearButtonText})):null},[l,J,eC,eT,R,e_,eA]),eI=ea||er.current;return(0,r.jsxs)("div",i({className:eE},{children:[ee.includes("period")&&(0,r.jsx)(E,{value:eI,setValue:ei,locale:v,className:N,disabled:R,readOnly:J,shortcuts:Y,allowedPeriods:void 0===en?["year","month","week","day","hour","minute","reboot"]:en}),"reboot"===eI?eV:(0,r.jsxs)(r.Fragment,{children:["year"===eI&&ee.includes("months")&&(0,r.jsx)(A,{value:ed,setValue:ep,locale:v,className:N,humanizeLabels:I,disabled:R,readOnly:J,period:eI,periodicityOnDoubleClick:q,mode:Q}),("year"===eI||"month"===eI)&&ee.includes("month-days")&&(0,r.jsx)(C,{value:el,setValue:es,locale:v,className:N,weekDays:ef,disabled:R,readOnly:J,leadingZero:Z,period:eI,periodicityOnDoubleClick:q,mode:Q}),("year"===eI||"month"===eI||"week"===eI)&&ee.includes("week-days")&&(0,r.jsx)(P,{value:ef,setValue:eh,locale:v,className:N,humanizeLabels:I,monthDays:el,disabled:R,readOnly:J,period:eI,periodicityOnDoubleClick:q,mode:Q}),(0,r.jsxs)("div",{children:["minute"!==eI&&"hour"!==eI&&ee.includes("hours")&&(0,r.jsx)(D,{value:ev,setValue:eg,locale:v,className:N,disabled:R,readOnly:J,leadingZero:Z,clockFormat:G,period:eI,periodicityOnDoubleClick:q,mode:Q}),"minute"!==eI&&ee.includes("minutes")&&(0,r.jsx)(S,{value:ex,setValue:ej,locale:v,period:eI,className:N,disabled:R,readOnly:J,leadingZero:Z,clockFormat:G,periodicityOnDoubleClick:q,mode:Q}),eV]})]})]}))}Object.freeze({__proto__:null,setValuesFromCronString:g,getCronStringFromValues:b,partToString:x,formatValue:j,parsePartArray:w})},245:function(e,n,t){var r=t(155),o=Symbol.for("react.element"),a=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,c=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function s(e,n,t){var r,a={},s=null,u=null;for(r in void 0!==t&&(s=""+t),void 0!==n.key&&(s=""+n.key),void 0!==n.ref&&(u=n.ref),n)i.call(n,r)&&!l.hasOwnProperty(r)&&(a[r]=n[r]);if(e&&e.defaultProps)for(r in n=e.defaultProps)void 0===a[r]&&(a[r]=n[r]);return{$$typeof:o,type:e,key:s,ref:u,props:a,_owner:c.current}}n.Fragment=a,n.jsx=s,n.jsxs=s},295:function(e,n,t){e.exports=t(245)},693:function(e,n,t){var r=t(673),o=t.n(r),a=t(598),i=t.n(a),c=t(262),l=t.n(c),s=t(657),u=t.n(s),d=t(357),p=t.n(d),m=t(626),f=t.n(m),h=t(253),y={};y.styleTagTransform=f(),y.setAttributes=u(),y.insert=l().bind(null,"head"),y.domAPI=i(),y.insertStyleElement=p(),o()(h.A,y),h.A&&h.A.locals&&h.A.locals},673:function(e){var n=[];function t(e){for(var t=-1,r=0;r<n.length;r++)if(n[r].identifier===e){t=r;break}return t}function r(e,r){for(var o={},a=[],i=0;i<e.length;i++){var c=e[i],l=r.base?c[0]+r.base:c[0],s=o[l]||0,u="".concat(l," ").concat(s);o[l]=s+1;var d=t(u),p={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==d)n[d].references++,n[d].updater(p);else{var m=function(e,n){var t=n.domAPI(n);return t.update(e),function(n){n?(n.css!==e.css||n.media!==e.media||n.sourceMap!==e.sourceMap||n.supports!==e.supports||n.layer!==e.layer)&&t.update(e=n):t.remove()}}(p,r);r.byIndex=i,n.splice(i,0,{identifier:u,updater:m,references:1})}a.push(u)}return a}e.exports=function(e,o){var a=r(e=e||[],o=o||{});return function(e){e=e||[];for(var i=0;i<a.length;i++){var c=t(a[i]);n[c].references--}for(var l=r(e,o),s=0;s<a.length;s++){var u=t(a[s]);0===n[u].references&&(n[u].updater(),n.splice(u,1))}a=l}}},262:function(e){var n={};e.exports=function(e,t){var r=function(e){if(void 0===n[e]){var t=document.querySelector(e);if(window.HTMLIFrameElement&&t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(e){t=null}n[e]=t}return n[e]}(e);if(!r)throw Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(t)}},357:function(e){e.exports=function(e){var n=document.createElement("style");return e.setAttributes(n,e.attributes),e.insert(n,e.options),n}},657:function(e,n,t){e.exports=function(e){var n=t.nc;n&&e.setAttribute("nonce",n)}},598:function(e){e.exports=function(e){if("u"<typeof document)return{update:function(){},remove:function(){}};var n=e.insertStyleElement(e);return{update:function(t){var r,o,a;r="",t.supports&&(r+="@supports (".concat(t.supports,") {")),t.media&&(r+="@media ".concat(t.media," {")),(o=void 0!==t.layer)&&(r+="@layer".concat(t.layer.length>0?" ".concat(t.layer):""," {")),r+=t.css,o&&(r+="}"),t.media&&(r+="}"),t.supports&&(r+="}"),(a=t.sourceMap)&&"u">typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),e.styleTagTransform(r,n,e.options)},remove:function(){var e;null===(e=n).parentNode||e.parentNode.removeChild(e)}}}},626:function(e){e.exports=function(e,n){if(n.styleSheet)n.styleSheet.cssText=e;else{for(;n.firstChild;)n.removeChild(n.firstChild);n.appendChild(document.createTextNode(e))}}}}]);
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
(self.webpackChunk_nocobase_plugin_backups_client_v2=self.webpackChunk_nocobase_plugin_backups_client_v2||[]).push([["567"],{574:function(e,t,n){var r,a;void 0===(a="function"==typeof(r=function(){"use strict";function t(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){l(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function r(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function a(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(n){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var o="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n.g&&n.g.global===n.g?n.g:void 0,u=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=o.saveAs||("object"!=typeof window||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!u?function(e,n,u){var l=o.URL||o.webkitURL,i=document.createElement("a");i.download=n=n||e.name||"download",i.rel="noopener","string"==typeof e?(i.href=e,i.origin===location.origin?a(i):r(i.href)?t(e,n,u):a(i,i.target="_blank")):(i.href=l.createObjectURL(e),setTimeout(function(){l.revokeObjectURL(i.href)},4e4),setTimeout(function(){a(i)},0))}:"msSaveOrOpenBlob"in navigator?function(e,n,o){if(n=n||e.name||"download","string"!=typeof e){var u;navigator.msSaveOrOpenBlob((void 0===(u=o)?u={autoBom:!1}:"object"!=typeof u&&(console.warn("Deprecated: Expected third argument to be a object"),u={autoBom:!u}),u.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\uFEFF",e],{type:e.type}):e),n)}else if(r(e))t(e,n,o);else{var l=document.createElement("a");l.href=e,l.target="_blank",setTimeout(function(){a(l)})}}:function(e,n,r,a){if((a=a||open("","_blank"))&&(a.document.title=a.document.body.innerText="downloading..."),"string"==typeof e)return t(e,n,r);var l="application/octet-stream"===e.type,i=/constructor/i.test(o.HTMLElement)||o.safari,c=/CriOS\/[\d]+/.test(navigator.userAgent);if((c||l&&i||u)&&"u">typeof FileReader){var s=new FileReader;s.onloadend=function(){var e=s.result;e=c?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),a?a.location.href=e:location=e,a=null},s.readAsDataURL(e)}else{var f=o.URL||o.webkitURL,p=f.createObjectURL(e);a?a.location=p:location.href=p,a=null,setTimeout(function(){f.revokeObjectURL(p)},4e4)}});o.saveAs=l.saveAs=l,e.exports=l})?r.apply(t,[]):r)||(e.exports=a)},258:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return Y}});var r=n(694),a=n(625),o=n(59),u=n(155),l=n.n(u),i=n(485),c=n(185),s=n.n(c),f=n(574),p=n(401),d=(0,u.createContext)(null),b=function(){var e=(0,u.useContext)(d);if(!e)throw Error("BackupsContext provider is missing");return e},m=n(488);function v(e,t,n,r,a,o,u){try{var l=e[o](u),i=l.value}catch(e){n(e);return}l.done?t(i):Promise.resolve(i).then(r,a)}var h={database:{dialect:""}},y=function(){var e=(0,r.useFlowContext)(),t=(0,a.useMemoizedFn)(function(){var t;return(t=function(){var t,n;return function(e,t){var n,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},u=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),l=Object.defineProperty;return l(u,"next",{value:i(0)}),l(u,"throw",{value:i(1)}),l(u,"return",{value:i(2)}),"function"==typeof Symbol&&l(u,Symbol.iterator,{value:function(){return this}}),u;function i(l){return function(i){var c=[l,i];if(n)throw TypeError("Generator is already executing.");for(;u&&(u=0,c[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&c[0]?r.return:c[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,c[1])).done)return a;switch(r=0,a&&(c=[2&c[0],a.value]),c[0]){case 0:case 1:a=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,r=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===c[0]||2===c[0])){o=0;continue}if(3===c[0]&&(!a||c[1]>a[0]&&c[1]<a[3])){o.label=c[1];break}if(6===c[0]&&o.label<a[1]){o.label=a[1],a=c;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(c);break}a[2]&&o.ops.pop(),o.trys.pop();continue}c=t.call(e,o)}catch(e){c=[6,e],r=0}finally{n=a=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(r){switch(r.label){case 0:return[4,e.api.request({url:"backups:appInfo"})];case 1:return[2,null!=(t=null==(n=r.sent().data)?void 0:n.data)?t:h]}})},function(){var e=this,n=arguments;return new Promise(function(r,a){var o=t.apply(e,n);function u(e){v(o,r,a,u,l,"next",e)}function l(e){v(o,r,a,u,l,"throw",e)}u(void 0)})})()}),n=(0,a.useRequest)(t,{cacheKey:"backupAppInfo",staleTime:-1}).data;return null!=n?n:h},w=function(){var e=(0,r.useFlowEngine)(),t=(0,i.useApp)();return{showCheckBackupMessage:(0,a.useMemoizedFn)(function(){var n=e.context[p.l];n?n.showCheckBackupMessage():("function"==typeof t.setMaintaining?t.setMaintaining(!0):t.maintaining=!0,t.error={command:{name:"APP Restoring"},message:"checking backup...",code:"APP_COMMANDING"})}),hideCheckBackupMessage:(0,a.useMemoizedFn)(function(){var n=e.context[p.l];n?n.hideCheckBackupMessage():"function"==typeof t.setMaintaining?t.setMaintaining(!1):t.maintaining=!1})}};function g(e,t,n,r,a,o,u){try{var l=e[o](u),i=l.value}catch(e){n(e);return}l.done?t(i):Promise.resolve(i).then(r,a)}function k(){var e=(0,r.useFlowContext)(),t=(0,i.useApp)(),n=l().useRef(null),a=o.App.useApp().notification,c=w().hideCheckBackupMessage;return(0,u.useEffect)(function(){var t=setInterval(function(){var t;return(t=function(){var t,r;return function(e,t){var n,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},u=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),l=Object.defineProperty;return l(u,"next",{value:i(0)}),l(u,"throw",{value:i(1)}),l(u,"return",{value:i(2)}),"function"==typeof Symbol&&l(u,Symbol.iterator,{value:function(){return this}}),u;function i(l){return function(i){var c=[l,i];if(n)throw TypeError("Generator is already executing.");for(;u&&(u=0,c[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&c[0]?r.return:c[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,c[1])).done)return a;switch(r=0,a&&(c=[2&c[0],a.value]),c[0]){case 0:case 1:a=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,r=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===c[0]||2===c[0])){o=0;continue}if(3===c[0]&&(!a||c[1]>a[0]&&c[1]<a[3])){o.label=c[1];break}if(6===c[0]&&o.label<a[1]){o.label=a[1],a=c;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(c);break}a[2]&&o.ops.pop(),o.trys.pop();continue}c=t.call(e,o)}catch(e){c=[6,e],r=0}finally{n=a=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(o){switch(o.label){case 0:if(!n.current)return[2];o.label=1;case 1:return o.trys.push([1,3,,4]),[4,e.api.request({url:"".concat(p.C,":restoreStatus"),method:"get",params:{task:n.current}})];case 2:if(!(r=null==(t=o.sent().data)?void 0:t.data))return[2];return r.inProgress||(n.current=null),r.message&&(c(),a.error({message:r.message,role:"alert"})),[3,4];case 3:return console.error(o.sent()),[3,4];case 4:return[2]}})},function(){var e=this,n=arguments;return new Promise(function(r,a){var o=t.apply(e,n);function u(e){g(o,r,a,u,l,"next",e)}function l(e){g(o,r,a,u,l,"throw",e)}u(void 0)})})()},3e3);return function(){return clearInterval(t)}},[t.maintaining,e.api,c,a]),n}function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function C(e,t,n,r,a,o,u){try{var l=e[o](u),i=l.value}catch(e){n(e);return}l.done?t(i):Promise.resolve(i).then(r,a)}function S(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,a=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var o=[],u=!0,l=!1;try{for(a=a.call(e);!(u=(n=a.next()).done)&&(o.push(n.value),!t||o.length!==t);u=!0);}catch(e){l=!0,r=e}finally{try{u||null==a.return||a.return()}finally{if(l)throw r}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return E(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return E(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var x=function(e){var t=e.backup,n=(0,m.k)(),a=(0,r.useFlowContext)(),u=S(l().useState(!1),2),i=u[0],c=u[1],s=S(l().useState(""),2),f=s[0],p=s[1],d=S(l().useState(!1),2),b=d[0],v=d[1],h=S(l().useState(""),2),g=h[0],E=h[1],x=k(),A=w().showCheckBackupMessage,O=y().database,j=O.schema,I=O.dialect,P=function(){p(""),E("")},M=function(){c(!1),P()};return l().createElement(l().Fragment,null,l().createElement(o.Button,{type:"link",size:"small",onClick:function(){c(!0)}},n("Restore")),l().createElement(o.Modal,{title:n("Restore"),open:i,onCancel:M,footer:[l().createElement(o.Button,{key:"back",onClick:M},n("Cancel")),l().createElement(o.Button,{key:"submit",type:"primary",loading:b,onClick:function(){var e;return(e=function(){var e,n,r;return function(e,t){var n,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},u=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),l=Object.defineProperty;return l(u,"next",{value:i(0)}),l(u,"throw",{value:i(1)}),l(u,"return",{value:i(2)}),"function"==typeof Symbol&&l(u,Symbol.iterator,{value:function(){return this}}),u;function i(l){return function(i){var c=[l,i];if(n)throw TypeError("Generator is already executing.");for(;u&&(u=0,c[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&c[0]?r.return:c[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,c[1])).done)return a;switch(r=0,a&&(c=[2&c[0],a.value]),c[0]){case 0:case 1:a=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,r=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===c[0]||2===c[0])){o=0;continue}if(3===c[0]&&(!a||c[1]>a[0]&&c[1]<a[3])){o.label=c[1];break}if(6===c[0]&&o.label<a[1]){o.label=a[1],a=c;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(c);break}a[2]&&o.ops.pop(),o.trys.pop();continue}c=t.call(e,o)}catch(e){c=[6,e],r=0}finally{n=a=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(o){switch(o.label){case 0:v(!0),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,a.api.request({url:"backups:restore",method:"post",data:{name:t.name,password:f,dbSchema:g}})];case 2:return x.current=null!=(e=null==(r=o.sent().data)||null==(n=r.data)?void 0:n.task)?e:null,A(),[3,4];case 3:return console.error(o.sent()),[3,4];case 4:return v(!1),c(!1),P(),[2]}})},function(){var t=this,n=arguments;return new Promise(function(r,a){var o=e.apply(t,n);function u(e){C(o,r,a,u,l,"next",e)}function l(e){C(o,r,a,u,l,"throw",e)}u(void 0)})})()}},n("Submit"))]},l().createElement(o.Form,{layout:"vertical",autoComplete:"off"},"postgres"===I&&l().createElement(o.Form.Item,{label:l().createElement("strong",null,n("Confirm the application database schema")),help:n("Required if application database schema is different with the backup",{currentDbSchemaTips:j?"[".concat(j,"]"):""})},l().createElement(o.Input,{autoComplete:"new-password",value:g,onChange:function(e){return E(e.target.value)}})),l().createElement(o.Form.Item,{colon:!0,label:l().createElement("strong",null,n("Restore password"))},l().createElement(o.Input.Password,{value:f,autoComplete:"new-password",onChange:function(e){return p(e.target.value)}})))))};function A(e,t,n,r,a,o,u){try{var l=e[o](u),i=l.value}catch(e){n(e);return}l.done?t(i):Promise.resolve(i).then(r,a)}function O(e){return function(){var t=this,n=arguments;return new Promise(function(r,a){var o=e.apply(t,n);function u(e){A(o,r,a,u,l,"next",e)}function l(e){A(o,r,a,u,l,"throw",e)}u(void 0)})}}function j(e,t){var n,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},u=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),l=Object.defineProperty;return l(u,"next",{value:i(0)}),l(u,"throw",{value:i(1)}),l(u,"return",{value:i(2)}),"function"==typeof Symbol&&l(u,Symbol.iterator,{value:function(){return this}}),u;function i(l){return function(i){var c=[l,i];if(n)throw TypeError("Generator is already executing.");for(;u&&(u=0,c[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&c[0]?r.return:c[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,c[1])).done)return a;switch(r=0,a&&(c=[2&c[0],a.value]),c[0]){case 0:case 1:a=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,r=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===c[0]||2===c[0])){o=0;continue}if(3===c[0]&&(!a||c[1]>a[0]&&c[1]<a[3])){o.label=c[1];break}if(6===c[0]&&o.label<a[1]){o.label=a[1],a=c;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(c);break}a[2]&&o.ops.pop(),o.trys.pop();continue}c=t.call(e,o)}catch(e){c=[6,e],r=0}finally{n=a=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var I=function(){var e,t=(0,m.k)(),n=(0,r.useFlowContext)(),c=(0,i.useCurrentAppInfo)(),d=o.theme.useToken().token,v=o.App.useApp(),h=v.modal,y=v.message,w=b(),g=w.data,k=w.loading,E=w.refreshAsync,C=(0,a.useRequest)(function(e){return O(function(){var t;return j(this,function(r){switch(r.label){case 0:return[4,n.api.request({url:"".concat(p.C,":destroy"),method:"post",params:{filterByTk:e}})];case 1:return[2,null==(t=r.sent().data)?void 0:t.data]}})})()},{manual:!0}).runAsync,S=(0,u.useCallback)(function(e){h.confirm({title:t("Delete record"),content:t("Are you sure you want to delete it?"),onOk:function(){return O(function(){return j(this,function(n){switch(n.label){case 0:return[4,C(e.name)];case 1:return n.sent(),[4,E()];case 2:return n.sent(),y.success(t("The deletion was successful.")),[2]}})})()}})},[C,y,h,E,t]),A=(0,u.useCallback)(function(e){return O(function(){var t,r,a,o,u;return j(this,function(l){switch(l.label){case 0:return a=null!=(t=null==c?void 0:c.name)?t:null==c||null==(r=c.data)?void 0:r.name,o={filterByTk:e.name},a&&(o.__appName=a),[4,n.api.request({url:"backups:download",method:"get",params:o,responseType:"blob"})];case 1:return u=new Blob([l.sent().data]),(0,f.saveAs)(u,e.name),[2]}})})()},[n.api,null==c||null==(e=c.data)?void 0:e.name,null==c?void 0:c.name]),I=function(e){return e.inProgress?{colSpan:0}:{}},P=(0,u.useMemo)(function(){return[{title:t("Backup list"),dataIndex:"name",width:400,onCell:function(e){return e.inProgress?{colSpan:4}:{}},render:function(e,n){return n.inProgress?l().createElement("span",{style:{color:d.colorText}},e,"(",t("Backing up"),"...)"):l().createElement("span",null,e)}},{title:t("File size"),dataIndex:"fileSize",onCell:I},{title:t("Created at"),dataIndex:"createdAt",onCell:I,render:function(e){return e?s()(e).format("YYYY-MM-DD HH:mm:ss"):null}},{title:t("Actions"),dataIndex:"actions",onCell:I,render:function(e,n){return l().createElement(o.Space,{split:l().createElement(o.Divider,{type:"vertical"})},l().createElement(x,{backup:n}),l().createElement("a",{onClick:function(){A(n)}},t("Download")),l().createElement("a",{onClick:function(){return S(n)}},t("Delete")))}}]},[S,A,t,d.colorText]);return l().createElement(i.Table,{rowKey:"name",dataSource:null==g?void 0:g.data,loading:k,columns:P})},P=n(375);function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function R(e,t,n,r,a,o,u){try{var l=e[o](u),i=l.value}catch(e){n(e);return}l.done?t(i):Promise.resolve(i).then(r,a)}function T(e){return function(){var t=this,n=arguments;return new Promise(function(r,a){var o=e.apply(t,n);function u(e){R(o,r,a,u,l,"next",e)}function l(e){R(o,r,a,u,l,"throw",e)}u(void 0)})}}function B(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,a=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var o=[],u=!0,l=!1;try{for(a=a.call(e);!(u=(n=a.next()).done)&&(o.push(n.value),!t||o.length!==t);u=!0);}catch(e){l=!0,r=e}finally{try{u||null==a.return||a.return()}finally{if(l)throw r}}return o}}(e,t)||q(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function F(e){return function(e){if(Array.isArray(e))return M(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||q(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function q(e,t){if(e){if("string"==typeof e)return M(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return M(e,t)}}function _(e,t){var n,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},u=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),l=Object.defineProperty;return l(u,"next",{value:i(0)}),l(u,"throw",{value:i(1)}),l(u,"return",{value:i(2)}),"function"==typeof Symbol&&l(u,Symbol.iterator,{value:function(){return this}}),u;function i(l){return function(i){var c=[l,i];if(n)throw TypeError("Generator is already executing.");for(;u&&(u=0,c[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&c[0]?r.return:c[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,c[1])).done)return a;switch(r=0,a&&(c=[2&c[0],a.value]),c[0]){case 0:case 1:a=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,r=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===c[0]||2===c[0])){o=0;continue}if(3===c[0]&&(!a||c[1]>a[0]&&c[1]<a[3])){o.label=c[1];break}if(6===c[0]&&o.label<a[1]){o.label=a[1],a=c;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(c);break}a[2]&&o.ops.pop(),o.trys.pop();continue}c=t.call(e,o)}catch(e){c=[6,e],r=0}finally{n=a=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var D=function(){var e=B((0,u.useState)([]),2),t=e[0],n=e[1],i=(0,m.k)(),c=(0,r.useFlowContext)(),s=o.App.useApp(),f=s.message,d=s.notification,v=s.modal,h=b().refreshAsync,y=(0,a.useRequest)(function(){return T(function(){var e;return _(this,function(t){switch(t.label){case 0:return[4,c.api.request({url:"".concat(p.C,":create"),method:"post"})];case 1:return[2,null==(e=t.sent().data)?void 0:e.data]}})})()},{manual:!0,throttleWait:1e3}),w=y.runAsync,g=y.loading,k=(0,a.useRequest)(function(e){return T(function(){var t,n;return _(this,function(r){switch(r.label){case 0:return[4,c.api.request({url:"".concat(p.C,":taskStatus"),method:"get",params:{names:e}})];case 1:return[2,null!=(t=null==(n=r.sent().data)?void 0:n.data)?t:{}]}})})()},{manual:!0}).runAsync;(0,u.useEffect)(function(){if(0!==t.length){var e=setInterval(function(){return T(function(){var e,r,a,o,u,l,c,s,p,b,m,v;return _(this,function(y){switch(y.label){case 0:return[4,k(t)];case 1:e=y.sent(),r=[],a=[],o=!0,u=!1,l=void 0;try{for(c=Object.entries(e)[Symbol.iterator]();!(o=(s=c.next()).done);o=!0)b=(p=B(s.value,2))[0],(m=p[1]).inProgress||(m.message?(a.push(b),d.error({message:m.message,role:"alert"})):r.push(b))}catch(e){u=!0,l=e}finally{try{o||null==c.return||c.return()}finally{if(u)throw l}}if(v=F(r).concat(F(a)),!(r.length>0))return[3,3];return f.success(i("NEW_BACKUPS_CREATED",{names:r.join(", ")})),[4,h()];case 2:y.sent(),y.label=3;case 3:return v.length>0&&n(function(e){return e.filter(function(e){return!v.includes(e)})}),[2]}})})()},3e3);return function(){clearInterval(e)}}},[t,f,d,k,h,i]);var E=g?P.LoadingOutlined:P.PlusOutlined;return l().createElement(o.Button,{icon:l().createElement(E,null),disabled:g,type:"primary",onClick:function(){return T(function(){return _(this,function(e){return v.confirm({title:i("New backup"),content:i("Are you sure you want to create new backup?"),onOk:function(){return T(function(){return _(this,function(e){switch(e.label){case 0:return[4,T(function(){var e;return _(this,function(t){switch(t.label){case 0:return[4,w()];case 1:return(null==(e=t.sent())?void 0:e.name)&&n(function(t){return F(t).concat([e.name])}),f.success(i("New backup operation started")),[4,h()];case 2:return t.sent(),[2]}})})()];case 1:return e.sent(),[2]}})})()}}),[2]})})()}},i("New backup"))},L=function(){var e=(0,m.k)(),t=b(),n=t.refresh,r=t.loading,a=r?P.LoadingOutlined:P.ReloadOutlined;return l().createElement(o.Button,{onClick:n,icon:l().createElement(a,null),disabled:r},e("Refresh"))};function U(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function G(e,t,n,r,a,o,u){try{var l=e[o](u),i=l.value}catch(e){n(e);return}l.done?t(i):Promise.resolve(i).then(r,a)}function N(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,a=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var o=[],u=!0,l=!1;try{for(a=a.call(e);!(u=(n=a.next()).done)&&(o.push(n.value),!t||o.length!==t);u=!0);}catch(e){l=!0,r=e}finally{try{u||null==a.return||a.return()}finally{if(l)throw r}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return U(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return U(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var H=function(){var e=(0,m.k)(),t=(0,r.useFlowContext)(),n=o.App.useApp().notification,a=N((0,u.useState)(!1),2),i=a[0],c=a[1],s=N((0,u.useState)(!1),2),f=s[0],p=s[1],d=N((0,u.useState)(""),2),b=d[0],v=d[1],h=N((0,u.useState)(""),2),g=h[0],E=h[1],C=N((0,u.useState)(null),2),S=C[0],x=C[1],A=N((0,u.useState)([]),2),O=A[0],j=A[1],I=k(),M=w().showCheckBackupMessage,R=y().database,T=R.schema,B=R.dialect,F=function(){v(""),x(null),j([]),E("")},q=function(){c(!1),F()};return l().createElement(l().Fragment,null,l().createElement(o.Button,{icon:l().createElement(P.UploadOutlined,null),onClick:function(){c(!0)}},e("Restore backup from local")),l().createElement(o.Modal,{title:e("Restore backup from local"),open:i,onCancel:q,footer:[l().createElement(o.Button,{key:"back",onClick:q},e("Cancel")),l().createElement(o.Button,{key:"submit",type:"primary",loading:f,onClick:function(){var r;return(r=function(){var r,a,o,u;return function(e,t){var n,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},u=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),l=Object.defineProperty;return l(u,"next",{value:i(0)}),l(u,"throw",{value:i(1)}),l(u,"return",{value:i(2)}),"function"==typeof Symbol&&l(u,Symbol.iterator,{value:function(){return this}}),u;function i(l){return function(i){var c=[l,i];if(n)throw TypeError("Generator is already executing.");for(;u&&(u=0,c[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&c[0]?r.return:c[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,c[1])).done)return a;switch(r=0,a&&(c=[2&c[0],a.value]),c[0]){case 0:case 1:a=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,r=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===c[0]||2===c[0])){o=0;continue}if(3===c[0]&&(!a||c[1]>a[0]&&c[1]<a[3])){o.label=c[1];break}if(6===c[0]&&o.label<a[1]){o.label=a[1],a=c;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(c);break}a[2]&&o.ops.pop(),o.trys.pop();continue}c=t.call(e,o)}catch(e){c=[6,e],r=0}finally{n=a=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(l){switch(l.label){case 0:if(!S)return n.error({message:e("Please select a backup file")}),[2];p(!0),(r=new FormData).append("file",S),r.append("password",b),r.append("dbSchema",g),l.label=1;case 1:return l.trys.push([1,3,,4]),[4,t.api.request({url:"backups:upload",method:"post",data:r})];case 2:return I.current=null!=(a=null==(u=l.sent().data)||null==(o=u.data)?void 0:o.task)?a:null,M(),[3,4];case 3:return console.error(l.sent()),[3,4];case 4:return p(!1),c(!1),F(),[2]}})},function(){var e=this,t=arguments;return new Promise(function(n,a){var o=r.apply(e,t);function u(e){G(o,n,a,u,l,"next",e)}function l(e){G(o,n,a,u,l,"throw",e)}u(void 0)})})()}},e("Submit"))]},l().createElement(o.Form,{layout:"vertical",autoComplete:"off"},l().createElement(o.Form.Item,null,l().createElement(o.Upload.Dragger,{onRemove:function(){j([]),x(null)},fileList:O,multiple:!1,maxCount:1,beforeUpload:function(e){return x(e),j([e]),!1}},l().createElement("p",{className:"ant-upload-drag-icon"},l().createElement(P.InboxOutlined,null)),l().createElement("p",{className:"ant-upload-text"},e("Click or drag file to this area to upload")))),"postgres"===B&&l().createElement(o.Form.Item,{label:l().createElement("strong",null,e("Confirm the application database schema")),help:e("Required if application database schema is different with the backup",{currentDbSchemaTips:T?"[".concat(T,"]"):""})},l().createElement(o.Input,{autoComplete:"new-password",value:g,onChange:function(e){return E(e.target.value)}})),l().createElement(o.Form.Item,{colon:!0,label:l().createElement("strong",null,e("Restore password"))},l().createElement(o.Input.Password,{autoComplete:"new-password",value:b,onChange:function(e){return v(e.target.value)}})))))};function z(e,t,n,r,a,o,u){try{var l=e[o](u),i=l.value}catch(e){n(e);return}l.done?t(i):Promise.resolve(i).then(r,a)}var K={data:[]},Y=function(){var e=(0,r.useFlowContext)(),t=(0,a.useRequest)(function(){var t;return(t=function(){var t;return function(e,t){var n,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},u=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),l=Object.defineProperty;return l(u,"next",{value:i(0)}),l(u,"throw",{value:i(1)}),l(u,"return",{value:i(2)}),"function"==typeof Symbol&&l(u,Symbol.iterator,{value:function(){return this}}),u;function i(l){return function(i){var c=[l,i];if(n)throw TypeError("Generator is already executing.");for(;u&&(u=0,c[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&c[0]?r.return:c[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,c[1])).done)return a;switch(r=0,a&&(c=[2&c[0],a.value]),c[0]){case 0:case 1:a=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,r=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===c[0]||2===c[0])){o=0;continue}if(3===c[0]&&(!a||c[1]>a[0]&&c[1]<a[3])){o.label=c[1];break}if(6===c[0]&&o.label<a[1]){o.label=a[1],a=c;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(c);break}a[2]&&o.ops.pop(),o.trys.pop();continue}c=t.call(e,o)}catch(e){c=[6,e],r=0}finally{n=a=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(n){switch(n.label){case 0:return[4,e.api.request({url:"".concat(p.C,":list"),method:"get"})];case 1:return[2,null!=(t=n.sent().data)?t:K]}})},function(){var e=this,n=arguments;return new Promise(function(r,a){var o=t.apply(e,n);function u(e){z(o,r,a,u,l,"next",e)}function l(e){z(o,r,a,u,l,"throw",e)}u(void 0)})})()});return l().createElement(d.Provider,{value:t},l().createElement(o.Card,{bordered:!1},l().createElement(o.Space,{style:{float:"right",marginBottom:16}},l().createElement(L,null),l().createElement(H,null),l().createElement(D,null)),l().createElement(I,null)))}},488:function(e,t,n){"use strict";n.d(t,{k:function(){return o}});var r=n(694),a=n(401);function o(){var e=(0,r.useFlowEngine)();return function(t,n){return e.context.t(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({ns:[a.C,"client"]},n))}}}}]);
|
|
@@ -0,0 +1,16 @@
|
|
|
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 React from 'react';
|
|
10
|
+
export interface BackupFile {
|
|
11
|
+
name: string;
|
|
12
|
+
fileSize: string;
|
|
13
|
+
createdAt: string;
|
|
14
|
+
inProgress: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare const BackupsTable: () => React.JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
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 React from 'react';
|
|
10
|
+
export declare const NewBackup: () => React.JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
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 React from 'react';
|
|
10
|
+
export declare const RefreshBackups: () => React.JSX.Element;
|
|
@@ -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 React from 'react';
|
|
10
|
+
import type { BackupFile } from './BackupsTable';
|
|
11
|
+
export declare const RestoreFromBackup: ({ backup }: {
|
|
12
|
+
backup: BackupFile;
|
|
13
|
+
}) => React.JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
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 React from 'react';
|
|
10
|
+
export declare const RestoreFromLocal: () => React.JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
export declare const NAMESPACE = "backups";
|
|
10
|
+
export declare const BACKUP_RESTORE_RUNTIME_KEY = "backupRestoreRuntime";
|
|
11
|
+
export type BackupRestoreRuntime = {
|
|
12
|
+
showCheckBackupMessage: () => void;
|
|
13
|
+
hideCheckBackupMessage: () => void;
|
|
14
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
/// <reference types="react" />
|
|
10
|
+
import type { BackupFile } from './components/BackupsTable';
|
|
11
|
+
export type BackupsListBody = {
|
|
12
|
+
data: BackupFile[];
|
|
13
|
+
};
|
|
14
|
+
export type BackupsContextValue = {
|
|
15
|
+
data?: BackupsListBody;
|
|
16
|
+
loading: boolean;
|
|
17
|
+
refresh: () => void;
|
|
18
|
+
refreshAsync: () => Promise<BackupsListBody>;
|
|
19
|
+
};
|
|
20
|
+
export declare const BackupsContext: import("react").Context<BackupsContextValue>;
|
|
21
|
+
export declare const useBackupsContext: () => BackupsContextValue;
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
export type BackupAppInfo = {
|
|
10
|
+
database: {
|
|
11
|
+
dialect: string;
|
|
12
|
+
schema?: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export declare const useBackupAppInfo: () => BackupAppInfo;
|
|
@@ -0,0 +1,12 @@
|
|
|
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
|
+
export declare const useCheckBackupMessage: () => {
|
|
10
|
+
showCheckBackupMessage: () => void;
|
|
11
|
+
hideCheckBackupMessage: () => void;
|
|
12
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
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 React from 'react';
|
|
10
|
+
export declare function useRestoreTask(): React.MutableRefObject<string>;
|
|
@@ -0,0 +1,9 @@
|
|
|
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
|
+
export { default } from './plugin';
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("ahooks"),require("@nocobase/client-v2"),require("dayjs"),require("react"),require("antd"),require("@ant-design/icons"),require("@nocobase/flow-engine")):"function"==typeof define&&define.amd?define("@nocobase/plugin-backups/client-v2",["ahooks","@nocobase/client-v2","dayjs","react","antd","@ant-design/icons","@nocobase/flow-engine"],t):"object"==typeof exports?exports["@nocobase/plugin-backups/client-v2"]=t(require("ahooks"),require("@nocobase/client-v2"),require("dayjs"),require("react"),require("antd"),require("@ant-design/icons"),require("@nocobase/flow-engine")):e["@nocobase/plugin-backups/client-v2"]=t(e.ahooks,e["@nocobase/client-v2"],e.dayjs,e.react,e.antd,e["@ant-design/icons"],e["@nocobase/flow-engine"])}(self,function(e,t,n,r,o,i,c){return function(){"use strict";var a,u,l,s={401:function(e,t,n){n.d(t,{C:function(){return r},l:function(){return o}});var r="backups",o="backupRestoreRuntime"},375:function(e){e.exports=i},485:function(e){e.exports=t},694:function(e){e.exports=c},625:function(t){t.exports=e},59:function(e){e.exports=o},185:function(e){e.exports=n},155:function(e){e.exports=r}},p={};function f(e){var t=p[e];if(void 0!==t)return t.exports;var n=p[e]={id:e,exports:{}};return s[e].call(n.exports,n,n.exports,f),n.exports}f.m=s,f.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(t,{a:t}),t},f.d=function(e,t){for(var n in t)f.o(t,n)&&!f.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},f.f={},f.e=function(e){return Promise.all(Object.keys(f.f).reduce(function(t,n){return f.f[n](e,t),t},[]))},f.u=function(e){return""+e+"."+({105:"064f69093e98a2dd",346:"45d02ff0f75c76e4",567:"d39a82a6aa6452a0"})[e]+".js"},f.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),f.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},b={},f.l=function(e,t,n,r){if(b[e])return void b[e].push(t);if(void 0!==n)for(var o,i,c=document.getElementsByTagName("script"),a=0;a<c.length;a++){var u=c[a];if(u.getAttribute("src")==e||u.getAttribute("data-rspack")=="@nocobase/plugin-backups/client-v2:"+n){o=u;break}}o||(i=!0,(o=document.createElement("script")).timeout=120,f.nc&&o.setAttribute("nonce",f.nc),o.setAttribute("data-rspack","@nocobase/plugin-backups/client-v2:"+n),o.src=e),b[e]=[t];var l=function(t,n){o.onerror=o.onload=null,clearTimeout(s);var r=b[e];if(delete b[e],o.parentNode&&o.parentNode.removeChild(o),r&&r.forEach(function(e){return e(n)}),t)return t(n)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=l.bind(null,o.onerror),o.onload=l.bind(null,o.onload),i&&document.head.appendChild(o)},f.r=function(e){"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.nc=void 0,f.g.importScripts&&(d=f.g.location+"");var b,d,h=f.g.document;if(!d&&h&&(h.currentScript&&"SCRIPT"===h.currentScript.tagName.toUpperCase()&&(d=h.currentScript.src),!d)){var g=h.getElementsByTagName("script");if(g.length)for(var v=g.length-1;v>-1&&(!d||!/^http(s?):/.test(d));)d=g[v--].src}if(!d)throw Error("Automatic publicPath is not supported in this browser");f.p=d.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a={889:0},f.f.j=function(e,t){var n=f.o(a,e)?a[e]:void 0;if(0!==n)if(n)t.push(n[2]);else{var r=new Promise(function(t,r){n=a[e]=[t,r]});t.push(n[2]=r);var o=f.p+f.u(e),i=Error();f.l(o,function(t){if(f.o(a,e)&&(0!==(n=a[e])&&(a[e]=void 0),n)){var r=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;i.message="Loading chunk "+e+" failed.\n("+r+": "+o+")",i.name="ChunkLoadError",i.type=r,i.request=o,n[1](i)}},"chunk-"+e,e)}},u=function(e,t){var n,r,o=t[0],i=t[1],c=t[2],u=0;if(o.some(function(e){return 0!==a[e]})){for(n in i)f.o(i,n)&&(f.m[n]=i[n]);c&&c(f)}for(e&&e(t);u<o.length;u++)r=o[u],f.o(a,r)&&a[r]&&a[r][0](),a[r]=0},(l=self.webpackChunk_nocobase_plugin_backups_client_v2=self.webpackChunk_nocobase_plugin_backups_client_v2||[]).forEach(u.bind(null,0)),l.push=u.bind(null,l.push.bind(l));var y={};return!function(){var e="",t="u">typeof document?document.currentScript:null;if(t&&t.src&&(e=t.src.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/")),!e){var n=window.__webpack_public_path__||"";n&&("/"!==n.charAt(n.length-1)&&(n+="/"),e=n+"static/plugins/@nocobase/plugin-backups/dist/client-v2/")}if(!e){var r=window.__nocobase_modern_client_prefix__||"v",o="/"+(r=String(r).replace(/^\/+|\/+$/g,"")||"v")+"/";if(!(e=window.__nocobase_public_path__||"")&&window.location&&window.location.pathname){var i=window.location.pathname||"/",c=i.indexOf(o);e=c>=0?i.slice(0,c+1):"/"}e&&(e=e.replace(RegExp("/"+r+"/?$"),"/")),e||(e="/"),"/"!==e.charAt(e.length-1)&&(e+="/"),e+="static/plugins/@nocobase/plugin-backups/dist/client-v2/"}f.p=e}(),!function(){f.r(y),f.d(y,{default:function(){return u}});var e=f(485),t=f(401);function n(e,t,n,r,o,i,c){try{var a=e[i](c),u=a.value}catch(e){n(e);return}a.done?t(u):Promise.resolve(u).then(r,o)}function r(e,t,n){return(r=a()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&i(o,n.prototype),o}).apply(null,arguments)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t="function"==typeof Map?new Map:void 0;return(c=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return r(e,arguments,o(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),i(n,e)})(e)}function a(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(a=function(){return!!e})()}var u=function(e){var r;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function c(){var e,t;if(!(this instanceof c))throw TypeError("Cannot call a class as a function");return e=c,t=arguments,e=o(e),function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,a()?Reflect.construct(e,t||[],o(this).constructor):e.apply(this,t))}return c.prototype=Object.create(e&&e.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),e&&i(c,e),r=[{key:"load",value:function(){var e;return(e=function(){var e;return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),a=Object.defineProperty;return a(c,"next",{value:u(0)}),a(c,"throw",{value:u(1)}),a(c,"return",{value:u(2)}),"function"==typeof Symbol&&a(c,Symbol.iterator,{value:function(){return this}}),c;function u(a){return function(u){var l=[a,u];if(n)throw TypeError("Generator is already executing.");for(;c&&(c=0,l[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&l[0]?r.return:l[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,l[1])).done)return o;switch(r=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,r=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===l[0]||2===l[0])){i=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){i.label=l[1];break}if(6===l[0]&&i.label<o[1]){i.label=o[1],o=l;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(l);break}o[2]&&i.ops.pop(),i.trys.pop();continue}l=t.call(e,i)}catch(e){l=[6,e],r=0}finally{n=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}(this,function(n){return e=this.t("Backup manager"),this.flowEngine.context.defineProperty(t.l,{value:this.createBackupRestoreRuntime()}),this.pluginSettingsManager.addMenuItem({key:t.C,title:e,icon:"CloudServerOutlined",showTabs:!0}),this.pluginSettingsManager.addPageTabItem({menuKey:t.C,key:"list",title:this.t("Backup list"),icon:"CloudServerOutlined",aclSnippet:"pm.".concat(t.C),componentLoader:function(){return f.e("567").then(f.bind(f,258))}}),this.pluginSettingsManager.addPageTabItem({menuKey:t.C,key:"settings",title:this.t("Settings"),icon:"SettingOutlined",aclSnippet:"pm.".concat(t.C,".settings"),componentLoader:function(){return Promise.all([f.e("346"),f.e("105")]).then(f.bind(f,696))}}),[2]})},function(){var t=this,r=arguments;return new Promise(function(o,i){var c=e.apply(t,r);function a(e){n(c,o,i,a,u,"next",e)}function u(e){n(c,o,i,a,u,"throw",e)}a(void 0)})}).call(this)}},{key:"createBackupRestoreRuntime",value:function(){var e=this.app;return{showCheckBackupMessage:function(){"function"==typeof e.setMaintaining?e.setMaintaining(!0):e.maintaining=!0,e.error={command:{name:"APP Restoring"},message:"checking backup...",code:"APP_COMMANDING"}},hideCheckBackupMessage:function(){"function"==typeof e.setMaintaining?e.setMaintaining(!1):e.maintaining=!1}}}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(c.prototype,r),c}(c(e.Plugin))}(),y}()});
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
export declare function useT(): (key: string, options?: Record<string, unknown>) => string;
|
|
10
|
+
export declare function tExpr(key: string): string;
|
|
@@ -0,0 +1,12 @@
|
|
|
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 React from 'react';
|
|
10
|
+
import 'react-js-cron/dist/styles.css';
|
|
11
|
+
declare const BackupSettings: () => React.JSX.Element;
|
|
12
|
+
export default BackupSettings;
|
|
@@ -0,0 +1,11 @@
|
|
|
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 React from 'react';
|
|
10
|
+
declare const BackupsManagement: () => React.JSX.Element;
|
|
11
|
+
export default BackupsManagement;
|
|
@@ -0,0 +1,15 @@
|
|
|
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 type { Application } from '@nocobase/client-v2';
|
|
10
|
+
import { Plugin } from '@nocobase/client-v2';
|
|
11
|
+
export declare class PluginBackupsClientV2 extends Plugin<Record<string, never>, Application> {
|
|
12
|
+
load(): Promise<void>;
|
|
13
|
+
private createBackupRestoreRuntime;
|
|
14
|
+
}
|
|
15
|
+
export default PluginBackupsClientV2;
|
package/dist/externalVersion.js
CHANGED
|
@@ -8,15 +8,17 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
module.exports = {
|
|
11
|
-
"@nocobase/client": "2.1.0
|
|
11
|
+
"@nocobase/client": "2.1.0",
|
|
12
12
|
"react": "18.2.0",
|
|
13
|
-
"@nocobase/
|
|
14
|
-
"@nocobase/
|
|
15
|
-
"@nocobase/
|
|
13
|
+
"@nocobase/flow-engine": "2.1.0",
|
|
14
|
+
"@nocobase/client-v2": "2.1.0",
|
|
15
|
+
"@nocobase/cache": "2.1.0",
|
|
16
|
+
"@nocobase/lock-manager": "2.1.0",
|
|
17
|
+
"@nocobase/server": "2.1.0",
|
|
16
18
|
"lodash": "4.18.1",
|
|
17
|
-
"@nocobase/database": "2.1.0
|
|
19
|
+
"@nocobase/database": "2.1.0",
|
|
18
20
|
"sequelize": "6.35.2",
|
|
19
|
-
"@nocobase/test": "2.1.0
|
|
21
|
+
"@nocobase/test": "2.1.0",
|
|
20
22
|
"@formily/antd-v5": "1.2.3",
|
|
21
23
|
"@formily/react": "2.3.7",
|
|
22
24
|
"@formily/reactive": "2.3.7",
|
|
@@ -24,8 +26,8 @@ module.exports = {
|
|
|
24
26
|
"antd": "5.24.2",
|
|
25
27
|
"@ant-design/icons": "5.6.1",
|
|
26
28
|
"ahooks": "3.7.8",
|
|
27
|
-
"@nocobase/plugin-file-manager": "2.1.0-beta.47",
|
|
28
|
-
"@nocobase/resourcer": "2.1.0-beta.47",
|
|
29
29
|
"dayjs": "1.11.13",
|
|
30
|
-
"@nocobase/
|
|
30
|
+
"@nocobase/plugin-file-manager": "2.1.0",
|
|
31
|
+
"@nocobase/resourcer": "2.1.0",
|
|
32
|
+
"@nocobase/utils": "2.1.0"
|
|
31
33
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"archiver","version":"5.3.2","description":"a streaming interface for archive generation","homepage":"https://github.com/archiverjs/node-archiver","author":{"name":"Chris Talkington","url":"http://christalkington.com/"},"repository":{"type":"git","url":"https://github.com/archiverjs/node-archiver.git"},"bugs":{"url":"https://github.com/archiverjs/node-archiver/issues"},"license":"MIT","main":"index.js","files":["index.js","lib"],"engines":{"node":">= 10"},"scripts":{"test":"mocha --reporter dot","bench":"node benchmark/simple/pack-zip.js"},"dependencies":{"archiver-utils":"^2.1.0","async":"^3.2.4","buffer-crc32":"^0.2.1","readable-stream":"^3.6.0","readdir-glob":"^1.1.2","tar-stream":"^2.2.0","zip-stream":"^4.1.0"},"devDependencies":{"archiver-jsdoc-theme":"^1.1.3","chai":"^4.3.7","jsdoc":"^3.6.4","mkdirp":"^2.1.5","mocha":"^9.0.2","rimraf":"^4.3.1","stream-bench":"^0.1.2","tar":"^6.1.13","yauzl":"^2.9.0"},"keywords":["archive","archiver","stream","zip","tar"],"publishConfig":{"registry":"https://registry.npmjs.org/"},"_lastModified":"2026-06-
|
|
1
|
+
{"name":"archiver","version":"5.3.2","description":"a streaming interface for archive generation","homepage":"https://github.com/archiverjs/node-archiver","author":{"name":"Chris Talkington","url":"http://christalkington.com/"},"repository":{"type":"git","url":"https://github.com/archiverjs/node-archiver.git"},"bugs":{"url":"https://github.com/archiverjs/node-archiver/issues"},"license":"MIT","main":"index.js","files":["index.js","lib"],"engines":{"node":">= 10"},"scripts":{"test":"mocha --reporter dot","bench":"node benchmark/simple/pack-zip.js"},"dependencies":{"archiver-utils":"^2.1.0","async":"^3.2.4","buffer-crc32":"^0.2.1","readable-stream":"^3.6.0","readdir-glob":"^1.1.2","tar-stream":"^2.2.0","zip-stream":"^4.1.0"},"devDependencies":{"archiver-jsdoc-theme":"^1.1.3","chai":"^4.3.7","jsdoc":"^3.6.4","mkdirp":"^2.1.5","mocha":"^9.0.2","rimraf":"^4.3.1","stream-bench":"^0.1.2","tar":"^6.1.13","yauzl":"^2.9.0"},"keywords":["archive","archiver","stream","zip","tar"],"publishConfig":{"registry":"https://registry.npmjs.org/"},"_lastModified":"2026-06-10T23:42:26.563Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"cron-parser","version":"4.4.0","description":"Node.js library for parsing crontab instructions","main":"lib/parser.js","types":"index.d.ts","typesVersions":{"<4.1":{"*":["types/ts3/*"]}},"directories":{"test":"test"},"scripts":{"test:tsd":"tsd","test:unit":"TZ=UTC tap ./test/*.js","test:cover":"TZ=UTC tap --coverage-report=html ./test/*.js","lint":"eslint .","lint:fix":"eslint --fix .","test":"npm run lint && npm run test:unit && npm run test:tsd"},"repository":{"type":"git","url":"https://github.com/harrisiirak/cron-parser.git"},"keywords":["cron","crontab","parser"],"author":"Harri Siirak","contributors":["Nicholas Clawson","Daniel Prentis <daniel@salsitasoft.com>","Renault John Lecoultre","Richard Astbury <richard.astbury@gmail.com>","Meaglin Wasabi <Meaglin.wasabi@gmail.com>","Mike Kusold <hello@mikekusold.com>","Alex Kit <alex.kit@atmajs.com>","Santiago Gimeno <santiago.gimeno@gmail.com>","Daniel <darc.tec@gmail.com>","Christian Steininger <christian.steininger.cs@gmail.com>","Mykola Piskovyi <m.piskovyi@gmail.com>","Brian Vaughn <brian.david.vaughn@gmail.com>","Nicholas Clawson <nickclaw@gmail.com>","Yasuhiroki <yasuhiroki.duck@gmail.com>","Nicholas Clawson <nickclaw@gmail.com>","Brendan Warkentin <faazshift@gmail.com>","Charlie Fish <fishcharlie.code@gmail.com>","Ian Graves <ian+diskimage@iangrav.es>","Andy Thompson <me@andytson.com>","Regev Brody <regevbr@gmail.com>"],"license":"MIT","dependencies":{"luxon":"^1.28.0"},"devDependencies":{"eslint":"^8.2.0","sinon":"^10.0.0","tap":"^16.0.1","tsd":"^0.19.0"},"engines":{"node":">=0.8"},"browser":{"fs":false},"tap":{"check-coverage":false},"tsd":{"directory":"test","compilerOptions":{"lib":["es2017","dom"]}},"_lastModified":"2026-06-
|
|
1
|
+
{"name":"cron-parser","version":"4.4.0","description":"Node.js library for parsing crontab instructions","main":"lib/parser.js","types":"index.d.ts","typesVersions":{"<4.1":{"*":["types/ts3/*"]}},"directories":{"test":"test"},"scripts":{"test:tsd":"tsd","test:unit":"TZ=UTC tap ./test/*.js","test:cover":"TZ=UTC tap --coverage-report=html ./test/*.js","lint":"eslint .","lint:fix":"eslint --fix .","test":"npm run lint && npm run test:unit && npm run test:tsd"},"repository":{"type":"git","url":"https://github.com/harrisiirak/cron-parser.git"},"keywords":["cron","crontab","parser"],"author":"Harri Siirak","contributors":["Nicholas Clawson","Daniel Prentis <daniel@salsitasoft.com>","Renault John Lecoultre","Richard Astbury <richard.astbury@gmail.com>","Meaglin Wasabi <Meaglin.wasabi@gmail.com>","Mike Kusold <hello@mikekusold.com>","Alex Kit <alex.kit@atmajs.com>","Santiago Gimeno <santiago.gimeno@gmail.com>","Daniel <darc.tec@gmail.com>","Christian Steininger <christian.steininger.cs@gmail.com>","Mykola Piskovyi <m.piskovyi@gmail.com>","Brian Vaughn <brian.david.vaughn@gmail.com>","Nicholas Clawson <nickclaw@gmail.com>","Yasuhiroki <yasuhiroki.duck@gmail.com>","Nicholas Clawson <nickclaw@gmail.com>","Brendan Warkentin <faazshift@gmail.com>","Charlie Fish <fishcharlie.code@gmail.com>","Ian Graves <ian+diskimage@iangrav.es>","Andy Thompson <me@andytson.com>","Regev Brody <regevbr@gmail.com>"],"license":"MIT","dependencies":{"luxon":"^1.28.0"},"devDependencies":{"eslint":"^8.2.0","sinon":"^10.0.0","tap":"^16.0.1","tsd":"^0.19.0"},"engines":{"node":">=0.8"},"browser":{"fs":false},"tap":{"check-coverage":false},"tsd":{"directory":"test","compilerOptions":{"lib":["es2017","dom"]}},"_lastModified":"2026-06-10T23:42:25.048Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"fs-extra","version":"9.1.0","description":"fs-extra contains methods that aren't included in the vanilla Node.js fs package. Such as recursive mkdir, copy, and remove.","engines":{"node":">=10"},"homepage":"https://github.com/jprichardson/node-fs-extra","repository":{"type":"git","url":"https://github.com/jprichardson/node-fs-extra"},"keywords":["fs","file","file system","copy","directory","extra","mkdirp","mkdir","mkdirs","recursive","json","read","write","extra","delete","remove","touch","create","text","output","move","promise"],"author":"JP Richardson <jprichardson@gmail.com>","license":"MIT","dependencies":{"at-least-node":"^1.0.0","graceful-fs":"^4.2.0","jsonfile":"^6.0.1","universalify":"^2.0.0"},"devDependencies":{"coveralls":"^3.0.0","klaw":"^2.1.1","klaw-sync":"^3.0.2","minimist":"^1.1.1","mocha":"^5.0.5","nyc":"^15.0.0","proxyquire":"^2.0.1","read-dir-files":"^0.1.1","standard":"^14.1.0"},"main":"./lib/index.js","files":["lib/","!lib/**/__tests__/"],"scripts":{"full-ci":"npm run lint && npm run coverage","coverage":"nyc -r lcovonly npm run unit","coveralls":"coveralls < coverage/lcov.info","lint":"standard","test-find":"find ./lib/**/__tests__ -name *.test.js | xargs mocha","test":"npm run lint && npm run unit","unit":"node test.js"},"_lastModified":"2026-06-
|
|
1
|
+
{"name":"fs-extra","version":"9.1.0","description":"fs-extra contains methods that aren't included in the vanilla Node.js fs package. Such as recursive mkdir, copy, and remove.","engines":{"node":">=10"},"homepage":"https://github.com/jprichardson/node-fs-extra","repository":{"type":"git","url":"https://github.com/jprichardson/node-fs-extra"},"keywords":["fs","file","file system","copy","directory","extra","mkdirp","mkdir","mkdirs","recursive","json","read","write","extra","delete","remove","touch","create","text","output","move","promise"],"author":"JP Richardson <jprichardson@gmail.com>","license":"MIT","dependencies":{"at-least-node":"^1.0.0","graceful-fs":"^4.2.0","jsonfile":"^6.0.1","universalify":"^2.0.0"},"devDependencies":{"coveralls":"^3.0.0","klaw":"^2.1.1","klaw-sync":"^3.0.2","minimist":"^1.1.1","mocha":"^5.0.5","nyc":"^15.0.0","proxyquire":"^2.0.1","read-dir-files":"^0.1.1","standard":"^14.1.0"},"main":"./lib/index.js","files":["lib/","!lib/**/__tests__/"],"scripts":{"full-ci":"npm run lint && npm run coverage","coverage":"nyc -r lcovonly npm run unit","coveralls":"coveralls < coverage/lcov.info","lint":"standard","test-find":"find ./lib/**/__tests__ -name *.test.js | xargs mocha","test":"npm run lint && npm run unit","unit":"node test.js"},"_lastModified":"2026-06-10T23:42:25.410Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"semver","version":"7.6.0","description":"The semantic version parser used by npm.","main":"index.js","scripts":{"test":"tap","snap":"tap","lint":"eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"","postlint":"template-oss-check","lintfix":"npm run lint -- --fix","posttest":"npm run lint","template-oss-apply":"template-oss-apply --force"},"devDependencies":{"@npmcli/eslint-config":"^4.0.0","@npmcli/template-oss":"4.21.3","tap":"^16.0.0"},"license":"ISC","repository":{"type":"git","url":"https://github.com/npm/node-semver.git"},"bin":{"semver":"bin/semver.js"},"files":["bin/","lib/","classes/","functions/","internal/","ranges/","index.js","preload.js","range.bnf"],"tap":{"timeout":30,"coverage-map":"map.js","nyc-arg":["--exclude","tap-snapshots/**"]},"engines":{"node":">=10"},"dependencies":{"lru-cache":"^6.0.0"},"author":"GitHub Inc.","templateOSS":{"//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten.","version":"4.21.3","engines":">=10","distPaths":["classes/","functions/","internal/","ranges/","index.js","preload.js","range.bnf"],"allowPaths":["/classes/","/functions/","/internal/","/ranges/","/index.js","/preload.js","/range.bnf"],"publish":"true"},"_lastModified":"2026-06-
|
|
1
|
+
{"name":"semver","version":"7.6.0","description":"The semantic version parser used by npm.","main":"index.js","scripts":{"test":"tap","snap":"tap","lint":"eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"","postlint":"template-oss-check","lintfix":"npm run lint -- --fix","posttest":"npm run lint","template-oss-apply":"template-oss-apply --force"},"devDependencies":{"@npmcli/eslint-config":"^4.0.0","@npmcli/template-oss":"4.21.3","tap":"^16.0.0"},"license":"ISC","repository":{"type":"git","url":"https://github.com/npm/node-semver.git"},"bin":{"semver":"bin/semver.js"},"files":["bin/","lib/","classes/","functions/","internal/","ranges/","index.js","preload.js","range.bnf"],"tap":{"timeout":30,"coverage-map":"map.js","nyc-arg":["--exclude","tap-snapshots/**"]},"engines":{"node":">=10"},"dependencies":{"lru-cache":"^6.0.0"},"author":"GitHub Inc.","templateOSS":{"//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten.","version":"4.21.3","engines":">=10","distPaths":["classes/","functions/","internal/","ranges/","index.js","preload.js","range.bnf"],"allowPaths":["/classes/","/functions/","/internal/","/ranges/","/index.js","/preload.js","/range.bnf"],"publish":"true"},"_lastModified":"2026-06-10T23:42:27.125Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"yauzl","version":"3.3.0","description":"yet another unzip library for node","engines":{"node":">=12"},"main":"index.js","scripts":{"test":"node test/test.js"},"repository":{"type":"git","url":"git+https://github.com/thejoshwolfe/yauzl.git"},"keywords":["unzip","zip","stream","archive","file"],"author":"Josh Wolfe <thejoshwolfe@gmail.com>","license":"MIT","bugs":{"url":"https://github.com/thejoshwolfe/yauzl/issues"},"homepage":"https://github.com/thejoshwolfe/yauzl","dependencies":{"buffer-crc32":"~0.2.3","pend":"~1.2.0"},"devDependencies":{"bl":"^6.0.11"},"files":["fd-slicer.js","index.js"],"_lastModified":"2026-06-
|
|
1
|
+
{"name":"yauzl","version":"3.3.0","description":"yet another unzip library for node","engines":{"node":">=12"},"main":"index.js","scripts":{"test":"node test/test.js"},"repository":{"type":"git","url":"git+https://github.com/thejoshwolfe/yauzl.git"},"keywords":["unzip","zip","stream","archive","file"],"author":"Josh Wolfe <thejoshwolfe@gmail.com>","license":"MIT","bugs":{"url":"https://github.com/thejoshwolfe/yauzl/issues"},"homepage":"https://github.com/thejoshwolfe/yauzl","dependencies":{"buffer-crc32":"~0.2.3","pend":"~1.2.0"},"devDependencies":{"bl":"^6.0.11"},"files":["fd-slicer.js","index.js"],"_lastModified":"2026-06-10T23:42:25.229Z"}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"displayName.zh-CN": "备份管理器",
|
|
5
5
|
"description": "Provides backup and restore functionality, supports scheduled backups, and ensures data security and quick recovery.",
|
|
6
6
|
"description.zh-CN": "提供备份与还原功能,支持定时备份,确保数据安全与快速恢复。",
|
|
7
|
-
"version": "2.1.0
|
|
7
|
+
"version": "2.1.0",
|
|
8
8
|
"license": "Apache-2.0",
|
|
9
9
|
"main": "dist/server/index.js",
|
|
10
10
|
"nocobase": {
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"mkdirp": "^1.0.4",
|
|
31
31
|
"object-path": "^0.11.8",
|
|
32
32
|
"react": "^18.2.0",
|
|
33
|
+
"react-js-cron": "^3.1.0",
|
|
33
34
|
"semver": "^7.5.4",
|
|
34
35
|
"tar": "^7.5.15",
|
|
35
36
|
"yauzl": "^3.2.0"
|
|
@@ -37,7 +38,9 @@
|
|
|
37
38
|
"peerDependencies": {
|
|
38
39
|
"@nocobase/actions": "2.x",
|
|
39
40
|
"@nocobase/client": "2.x",
|
|
41
|
+
"@nocobase/client-v2": "2.x",
|
|
40
42
|
"@nocobase/database": "2.x",
|
|
43
|
+
"@nocobase/flow-engine": "2.x",
|
|
41
44
|
"@nocobase/lock-manager": "2.x",
|
|
42
45
|
"@nocobase/plugin-file-manager": "2.x",
|
|
43
46
|
"@nocobase/server": "2.x",
|
|
@@ -47,5 +50,5 @@
|
|
|
47
50
|
"keywords": [
|
|
48
51
|
"System management"
|
|
49
52
|
],
|
|
50
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "9373212dd0f22cd985be1e23674d6b454944b9ee"
|
|
51
54
|
}
|