@nocobase/plugin-backup-restore 2.1.0-alpha.10 → 2.1.0-alpha.12
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/dist/client/{10f4c576bd93c7ad.js → 93c7062a6af254c8.js} +1 -1
- package/dist/client/index.js +1 -1
- package/dist/externalVersion.js +5 -5
- package/dist/node_modules/@hapi/topo/package.json +1 -1
- package/dist/node_modules/archiver/package.json +1 -1
- package/dist/node_modules/decompress/package.json +1 -1
- package/dist/node_modules/fs-extra/package.json +1 -1
- package/dist/node_modules/moment/package.json +1 -1
- package/dist/node_modules/semver/package.json +1 -1
- package/package.json +2 -2
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
"use strict";(self.webpackChunk_nocobase_plugin_backup_restore=self.webpackChunk_nocobase_plugin_backup_restore||[]).push([["418"],{657:function(e,t,n){n.r(t),n.d(t,{BackupAndRestoreList:function(){return C}});var r=n(375),l=n(418),a=n(342),o=n(59),i=n(506),u=n(155),c=n.n(u),s=n(404);function f(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 d(e,t,n,r,l,a,o){try{var i=e[a](o),u=i.value}catch(e){n(e);return}i.done?t(u):Promise.resolve(u).then(r,l)}function p(e){return function(){var t=this,n=arguments;return new Promise(function(r,l){var a=e.apply(t,n);function o(e){d(a,r,l,o,i,"next",e)}function i(e){d(a,r,l,o,i,"throw",e)}o(void 0)})}}function m(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 b(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function y(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,l=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=l){var a=[],o=!0,i=!1;try{for(l=l.call(e);!(o=(n=l.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(e){i=!0,r=e}finally{try{o||null==l.return||l.return()}finally{if(i)throw r}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return f(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 f(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 h(e,t){var n,r,l,a={label:0,sent:function(){if(1&l[0])throw l[1];return l[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),i=Object.defineProperty;return i(o,"next",{value:u(0)}),i(o,"throw",{value:u(1)}),i(o,"return",{value:u(2)}),"function"==typeof Symbol&&i(o,Symbol.iterator,{value:function(){return this}}),o;function u(i){return function(u){var c=[i,u];if(n)throw TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(a=0)),a;)try{if(n=1,r&&(l=2&c[0]?r.return:c[0]?r.throw||((l=r.return)&&l.call(r),0):r.next)&&!(l=l.call(r,c[1])).done)return l;switch(r=0,l&&(c=[2&c[0],l.value]),c[0]){case 0:case 1:l=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(l=(l=a.trys).length>0&&l[l.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!l||c[1]>l[0]&&c[1]<l[3])){a.label=c[1];break}if(6===c[0]&&a.label<l[1]){a.label=l[1],l=c;break}if(l&&a.label<l[2]){a.label=l[2],a.ops.push(c);break}l[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],r=0}finally{n=l=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var v=o.Upload.Dragger,g=function(e){var t=e.collectionsData,n=(0,s.Wl)().t,r=y((0,u.useState)(!1),2),l=r[0],i=r[1],f=y((0,u.useState)(t),2),d=f[0],m=f[1];(0,u.useEffect)(function(){m(t)},[t]);var b=(0,a.useAPIClient)(),v=(0,a.useCompile)(),g=(0,u.useMemo)(function(){return b.resource("backupFiles")},[b]),k=[{title:n("Collection"),dataIndex:"collection",key:"collection",render:function(e,t){var n=v(t.title);return t.name===n?n:c().createElement("div",null,t.name," ",c().createElement("span",{style:{color:"rgba(0, 0, 0, 0.3)",fontSize:"0.9em"}},"(",v(t.title),")"))}},{title:n("Origin"),dataIndex:"origin",key:"origin",width:"50%"}],E=Object.keys(d||{}).map(function(e){return{key:e,label:n("".concat(e,".title")),children:c().createElement(c().Fragment,null,c().createElement(o.Alert,{style:{marginBottom:16},message:n("".concat(e,".description"))}),c().createElement(o.Table,{pagination:{pageSize:100},bordered:!0,size:"small",dataSource:d[e],columns:k,scroll:{y:400}}))}});return c().createElement(c().Fragment,null,c().createElement("a",{onClick:function(){return p(function(){var t;return h(this,function(n){switch(n.label){case 0:if(!e.isBackup)return[3,2];return[4,g.dumpableCollections()];case 1:m(null==(t=n.sent())?void 0:t.data),i(!0),n.label=2;case 2:return i(!0),[2]}})})()}},n("Learn more")),c().createElement(o.Modal,{title:n("Backup instructions"),width:"80vw",open:l,footer:null,onOk:function(){i(!1)},onCancel:function(){i(!1)}},c().createElement(o.Tabs,{defaultActiveKey:"required",items:E})))},k=function(e){var t=e.ButtonComponent,n=void 0===t?o.Button:t,r=e.title,i=e.upload,f=void 0!==i&&i,d=e.fileData,m=(0,s.Wl)().t,b=y((0,u.useState)(["required"]),2),v=b[0],k=b[1],E=y((0,u.useState)(!1),2),C=E[0],O=E[1],S=y((0,u.useState)(null),2),P=S[0],j=S[1],B=y((0,u.useState)(!1),2),x=B[0],D=B[1],A=(0,a.useAPIClient)(),I=(0,u.useMemo)(function(){return A.resource("backupFiles")},[A]),F=y((0,u.useState)([]),2),T=F[0],q=F[1];return(0,u.useEffect)(function(){q(Object.keys((null==P?void 0:P.dumpableCollectionsGroupByGroup)||[]).map(function(e){return{value:e,label:m("".concat(e,".title")),disabled:["required","skipped"].includes(e)}}))},[P]),c().createElement(c().Fragment,null,c().createElement(n,{onClick:function(){return p(function(){var e,t,n,r;return h(this,function(l){switch(l.label){case 0:if(O(!0),f)return[3,2];return D(!0),[4,I.get({filterByTk:d.name})];case 1:q(Object.keys((null==(r=l.sent().data)||null==(t=r.data)||null==(e=t.meta)?void 0:e.dumpableCollectionsGroupByGroup)||[]).map(function(e){return{value:e,label:m("".concat(e,".title")),disabled:["required","skipped"].includes(e)}})),j(null==r||null==(n=r.data)?void 0:n.meta),D(!1),l.label=2;case 2:return[2]}})})()}},r),c().createElement(o.Modal,{title:m("Restore"),width:800,footer:f&&!P?null:void 0,open:C,onOk:function(){I.restore({values:{dataTypes:v,filterByTk:null==d?void 0:d.name,key:null==P?void 0:P.key}}),O(!1)},onCancel:function(){O(!1),j(null),k(["required"])}},c().createElement(o.Spin,{spinning:x},f&&!P&&c().createElement(w,{setRestoreData:j}),(!f||P)&&[c().createElement("strong",{style:{fontWeight:600,display:"block",margin:"16px 0 8px"},key:"info"},m("Select the data to be restored")," (",c().createElement(g,{collectionsData:null==P?void 0:P.dumpableCollectionsGroupByGroup}),"):"),c().createElement("div",{style:{lineHeight:2,marginBottom:8},key:"dataType"},c().createElement(l.FormItem,null,c().createElement(a.Checkbox.Group,{options:T,style:{flexDirection:"column"},value:v,onChange:function(e){return k(e)}})))])))},E=function(e){var t=e.ButtonComponent,n=void 0===t?o.Button:t,l=e.refresh,i=(0,s.Wl)().t,f=y((0,u.useState)(!1),2),d=f[0],m=f[1],b=y((0,u.useState)(["required"]),2),v=b[0],k=b[1],E=(0,a.useAPIClient)(),w=y((0,u.useState)([]),2),C=w[0],O=w[1];return c().createElement(c().Fragment,null,c().createElement(n,{icon:c().createElement(r.PlusOutlined,null),type:"primary",onClick:function(){return p(function(){return h(this,function(e){switch(e.label){case 0:return[4,E.resource("backupFiles").dumpableCollections()];case 1:return O(Object.keys(e.sent().data||[]).map(function(e){return{value:e,label:i("".concat(e,".title")),disabled:["required","skipped"].includes(e)}})),m(!0),[2]}})})()}},i("New backup")),c().createElement(o.Modal,{title:i("New backup"),width:800,open:d,onOk:function(){E.request({url:"backupFiles:create",method:"post",data:{dataTypes:v}}),m(!1),k(["required"]),setTimeout(function(){l()},500)},onCancel:function(){m(!1),k(["required"])}},c().createElement("strong",{style:{fontWeight:600,display:"block",margin:"16px 0 8px"}},i("Select the data to be backed up")," (",c().createElement(g,{isBackup:!0}),"):"),c().createElement("div",{style:{lineHeight:2,marginBottom:8}},c().createElement(a.Checkbox.Group,{options:C,style:{flexDirection:"column"},onChange:function(e){return k(e)},value:v}))))},w=function(e){var t,n,l=(0,s.Wl)().t;return c().createElement(v,(t={multiple:!1,action:"/backupFiles:upload",onChange:function(t){t.fileList.length>1&&t.fileList.splice(0,t.fileList.length-1);var n,r,a,i=t.file.status;"done"===i?(o.message.success("".concat(t.file.name," ")+l("file uploaded successfully")),e.setRestoreData(b(m({},null==(r=t.file.response)||null==(n=r.data)?void 0:n.meta),{key:null==(a=t.file.response)?void 0:a.data.key}))):"error"===i&&o.message.error("".concat(t.file.name," ")+l("file upload failed"))},onDrop:function(e){console.log("Dropped files",e.dataTransfer.files)}},n=(0,a.useAPIClient)(),b(m({},t),{customRequest:function(e){var t=e.action,r=e.data,l=e.file,a=e.filename,o=e.headers,i=e.onError,u=e.onProgress,c=e.onSuccess,s=e.withCredentials,f=new FormData;return r&&Object.keys(r).forEach(function(e){f.append(e,r[e])}),f.append(a,l),n.axios.post(t,f,{withCredentials:s,headers:o,onUploadProgress:function(e){var t=e.total;u({percent:Math.round(e.loaded/t*100).toFixed(2)},l)}}).then(function(e){c(e.data,l)}).catch(i).finally(function(){}),{abort:function(){console.log("upload progress is aborted.")}}},onChange:function(e){var n;null==(n=t.onChange)||n.call(t,e)}})),c().createElement("p",{className:"ant-upload-drag-icon"},c().createElement(r.InboxOutlined,null)),c().createElement("p",{className:"ant-upload-text"}," ",l("Click or drag file to this area to upload")))},C=function(){var e=(0,s.Wl)().t,t=(0,a.useAPIClient)(),n=y((0,u.useState)([]),2),l=n[0],f=n[1],d=y((0,u.useState)(!1),2),m=d[0],b=d[1],v=y((0,u.useState)(!1),2),g=(v[0],v[1]),w=o.App.useApp().modal,C=(0,u.useMemo)(function(){return t.resource("backupFiles")},[t]);(0,u.useEffect)(function(){O()},[]);var O=function(){return p(function(){return h(this,function(e){switch(e.label){case 0:return b(!0),[4,C.list()];case 1:return f(e.sent().data.data),b(!1),[2]}})})()},S=function(){return p(function(){return h(this,function(e){switch(e.label){case 0:return[4,O()];case 1:return e.sent(),[2]}})})()},P=function(t){w.confirm({title:e("Delete record",{ns:"client"}),content:e("Are you sure you want to delete it?",{ns:"client"}),onOk:function(){return p(function(){return h(this,function(n){switch(n.label){case 0:return[4,C.destroy({filterByTk:t.name})];case 1:return n.sent(),[4,O()];case 2:return n.sent(),o.message.success(e("Deleted successfully")),[2]}})})()}})};return c().createElement("div",null,c().createElement(o.Card,{bordered:!1},c().createElement(o.Space,{style:{float:"right",marginBottom:16}},c().createElement(o.Button,{onClick:S,icon:c().createElement(r.ReloadOutlined,null)},e("Refresh")),c().createElement(k,{upload:!0,title:c().createElement(c().Fragment,null,c().createElement(r.UploadOutlined,null)," ",e("Restore backup from local"))}),c().createElement(E,{refresh:S})),c().createElement(o.Table,{dataSource:l,loading:m,columns:[{title:e("Backup file"),dataIndex:"name",width:400,onCell:function(e){return e.inProgress?{colSpan:4}:{}},render:function(t,n){return n.inProgress?c().createElement("div",{style:{color:"rgba(0, 0, 0, 0.88)"}},t,"(",e("Backing up"),"...)"):c().createElement("div",null,t)}},{title:e("File size"),dataIndex:"fileSize",onCell:function(e){return e.inProgress?{colSpan:0}:{}}},{title:e("Created at",{ns:"client"}),dataIndex:"createdAt",onCell:function(e){return e.inProgress?{colSpan:0}:{}},render:function(e){return c().createElement(a.DatePicker.ReadPretty,{value:e,showTime:!0})}},{title:e("Actions",{ns:"client"}),dataIndex:"actions",onCell:function(e){return e.inProgress?{colSpan:0}:{}},render:function(n,r){return c().createElement(o.Space,{split:c().createElement(o.Divider,{type:"vertical"})},c().createElement(k,{ButtonComponent:"a",title:e("Restore"),fileData:r}),c().createElement("a",{type:"link",onClick:function(){return p(function(){var e,n;return h(this,function(l){switch(l.label){case 0:return g(r.name),[4,t.request({url:"backupFiles:download",method:"get",params:{filterByTk:r.name},responseType:"blob"})];case 1:return e=l.sent(),g(!1),n=new Blob([e.data]),(0,i.saveAs)(n,r.name),[2]}})})()}},e("Download")),c().createElement("a",{onClick:function(){return P(r)}},e("Delete")))}}]})))}}}]);
|
|
10
|
+
"use strict";(self.webpackChunk_nocobase_plugin_backup_restore=self.webpackChunk_nocobase_plugin_backup_restore||[]).push([["370"],{761:function(e,t,n){n.r(t),n.d(t,{BackupAndRestoreList:function(){return C}});var r=n(375),l=n(418),a=n(342),o=n(59),i=n(506),u=n(155),c=n.n(u),s=n(872);function f(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 d(e,t,n,r,l,a,o){try{var i=e[a](o),u=i.value}catch(e){n(e);return}i.done?t(u):Promise.resolve(u).then(r,l)}function p(e){return function(){var t=this,n=arguments;return new Promise(function(r,l){var a=e.apply(t,n);function o(e){d(a,r,l,o,i,"next",e)}function i(e){d(a,r,l,o,i,"throw",e)}o(void 0)})}}function m(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 b(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function y(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,l=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=l){var a=[],o=!0,i=!1;try{for(l=l.call(e);!(o=(n=l.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(e){i=!0,r=e}finally{try{o||null==l.return||l.return()}finally{if(i)throw r}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return f(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 f(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 h(e,t){var n,r,l,a={label:0,sent:function(){if(1&l[0])throw l[1];return l[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),i=Object.defineProperty;return i(o,"next",{value:u(0)}),i(o,"throw",{value:u(1)}),i(o,"return",{value:u(2)}),"function"==typeof Symbol&&i(o,Symbol.iterator,{value:function(){return this}}),o;function u(i){return function(u){var c=[i,u];if(n)throw TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(a=0)),a;)try{if(n=1,r&&(l=2&c[0]?r.return:c[0]?r.throw||((l=r.return)&&l.call(r),0):r.next)&&!(l=l.call(r,c[1])).done)return l;switch(r=0,l&&(c=[2&c[0],l.value]),c[0]){case 0:case 1:l=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(l=(l=a.trys).length>0&&l[l.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!l||c[1]>l[0]&&c[1]<l[3])){a.label=c[1];break}if(6===c[0]&&a.label<l[1]){a.label=l[1],l=c;break}if(l&&a.label<l[2]){a.label=l[2],a.ops.push(c);break}l[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],r=0}finally{n=l=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var v=o.Upload.Dragger,g=function(e){var t=e.collectionsData,n=(0,s.Wl)().t,r=y((0,u.useState)(!1),2),l=r[0],i=r[1],f=y((0,u.useState)(t),2),d=f[0],m=f[1];(0,u.useEffect)(function(){m(t)},[t]);var b=(0,a.useAPIClient)(),v=(0,a.useCompile)(),g=(0,u.useMemo)(function(){return b.resource("backupFiles")},[b]),k=[{title:n("Collection"),dataIndex:"collection",key:"collection",render:function(e,t){var n=v(t.title);return t.name===n?n:c().createElement("div",null,t.name," ",c().createElement("span",{style:{color:"rgba(0, 0, 0, 0.3)",fontSize:"0.9em"}},"(",v(t.title),")"))}},{title:n("Origin"),dataIndex:"origin",key:"origin",width:"50%"}],E=Object.keys(d||{}).map(function(e){return{key:e,label:n("".concat(e,".title")),children:c().createElement(c().Fragment,null,c().createElement(o.Alert,{style:{marginBottom:16},message:n("".concat(e,".description"))}),c().createElement(o.Table,{pagination:{pageSize:100},bordered:!0,size:"small",dataSource:d[e],columns:k,scroll:{y:400}}))}});return c().createElement(c().Fragment,null,c().createElement("a",{onClick:function(){return p(function(){var t;return h(this,function(n){switch(n.label){case 0:if(!e.isBackup)return[3,2];return[4,g.dumpableCollections()];case 1:m(null==(t=n.sent())?void 0:t.data),i(!0),n.label=2;case 2:return i(!0),[2]}})})()}},n("Learn more")),c().createElement(o.Modal,{title:n("Backup instructions"),width:"80vw",open:l,footer:null,onOk:function(){i(!1)},onCancel:function(){i(!1)}},c().createElement(o.Tabs,{defaultActiveKey:"required",items:E})))},k=function(e){var t=e.ButtonComponent,n=void 0===t?o.Button:t,r=e.title,i=e.upload,f=void 0!==i&&i,d=e.fileData,m=(0,s.Wl)().t,b=y((0,u.useState)(["required"]),2),v=b[0],k=b[1],E=y((0,u.useState)(!1),2),C=E[0],O=E[1],S=y((0,u.useState)(null),2),P=S[0],j=S[1],B=y((0,u.useState)(!1),2),x=B[0],D=B[1],A=(0,a.useAPIClient)(),I=(0,u.useMemo)(function(){return A.resource("backupFiles")},[A]),F=y((0,u.useState)([]),2),T=F[0],q=F[1];return(0,u.useEffect)(function(){q(Object.keys((null==P?void 0:P.dumpableCollectionsGroupByGroup)||[]).map(function(e){return{value:e,label:m("".concat(e,".title")),disabled:["required","skipped"].includes(e)}}))},[P]),c().createElement(c().Fragment,null,c().createElement(n,{onClick:function(){return p(function(){var e,t,n,r;return h(this,function(l){switch(l.label){case 0:if(O(!0),f)return[3,2];return D(!0),[4,I.get({filterByTk:d.name})];case 1:q(Object.keys((null==(r=l.sent().data)||null==(t=r.data)||null==(e=t.meta)?void 0:e.dumpableCollectionsGroupByGroup)||[]).map(function(e){return{value:e,label:m("".concat(e,".title")),disabled:["required","skipped"].includes(e)}})),j(null==r||null==(n=r.data)?void 0:n.meta),D(!1),l.label=2;case 2:return[2]}})})()}},r),c().createElement(o.Modal,{title:m("Restore"),width:800,footer:f&&!P?null:void 0,open:C,onOk:function(){I.restore({values:{dataTypes:v,filterByTk:null==d?void 0:d.name,key:null==P?void 0:P.key}}),O(!1)},onCancel:function(){O(!1),j(null),k(["required"])}},c().createElement(o.Spin,{spinning:x},f&&!P&&c().createElement(w,{setRestoreData:j}),(!f||P)&&[c().createElement("strong",{style:{fontWeight:600,display:"block",margin:"16px 0 8px"},key:"info"},m("Select the data to be restored")," (",c().createElement(g,{collectionsData:null==P?void 0:P.dumpableCollectionsGroupByGroup}),"):"),c().createElement("div",{style:{lineHeight:2,marginBottom:8},key:"dataType"},c().createElement(l.FormItem,null,c().createElement(a.Checkbox.Group,{options:T,style:{flexDirection:"column"},value:v,onChange:function(e){return k(e)}})))])))},E=function(e){var t=e.ButtonComponent,n=void 0===t?o.Button:t,l=e.refresh,i=(0,s.Wl)().t,f=y((0,u.useState)(!1),2),d=f[0],m=f[1],b=y((0,u.useState)(["required"]),2),v=b[0],k=b[1],E=(0,a.useAPIClient)(),w=y((0,u.useState)([]),2),C=w[0],O=w[1];return c().createElement(c().Fragment,null,c().createElement(n,{icon:c().createElement(r.PlusOutlined,null),type:"primary",onClick:function(){return p(function(){return h(this,function(e){switch(e.label){case 0:return[4,E.resource("backupFiles").dumpableCollections()];case 1:return O(Object.keys(e.sent().data||[]).map(function(e){return{value:e,label:i("".concat(e,".title")),disabled:["required","skipped"].includes(e)}})),m(!0),[2]}})})()}},i("New backup")),c().createElement(o.Modal,{title:i("New backup"),width:800,open:d,onOk:function(){E.request({url:"backupFiles:create",method:"post",data:{dataTypes:v}}),m(!1),k(["required"]),setTimeout(function(){l()},500)},onCancel:function(){m(!1),k(["required"])}},c().createElement("strong",{style:{fontWeight:600,display:"block",margin:"16px 0 8px"}},i("Select the data to be backed up")," (",c().createElement(g,{isBackup:!0}),"):"),c().createElement("div",{style:{lineHeight:2,marginBottom:8}},c().createElement(a.Checkbox.Group,{options:C,style:{flexDirection:"column"},onChange:function(e){return k(e)},value:v}))))},w=function(e){var t,n,l=(0,s.Wl)().t;return c().createElement(v,(t={multiple:!1,action:"/backupFiles:upload",onChange:function(t){t.fileList.length>1&&t.fileList.splice(0,t.fileList.length-1);var n,r,a,i=t.file.status;"done"===i?(o.message.success("".concat(t.file.name," ")+l("file uploaded successfully")),e.setRestoreData(b(m({},null==(r=t.file.response)||null==(n=r.data)?void 0:n.meta),{key:null==(a=t.file.response)?void 0:a.data.key}))):"error"===i&&o.message.error("".concat(t.file.name," ")+l("file upload failed"))},onDrop:function(e){console.log("Dropped files",e.dataTransfer.files)}},n=(0,a.useAPIClient)(),b(m({},t),{customRequest:function(e){var t=e.action,r=e.data,l=e.file,a=e.filename,o=e.headers,i=e.onError,u=e.onProgress,c=e.onSuccess,s=e.withCredentials,f=new FormData;return r&&Object.keys(r).forEach(function(e){f.append(e,r[e])}),f.append(a,l),n.axios.post(t,f,{withCredentials:s,headers:o,onUploadProgress:function(e){var t=e.total;u({percent:Math.round(e.loaded/t*100).toFixed(2)},l)}}).then(function(e){c(e.data,l)}).catch(i).finally(function(){}),{abort:function(){console.log("upload progress is aborted.")}}},onChange:function(e){var n;null==(n=t.onChange)||n.call(t,e)}})),c().createElement("p",{className:"ant-upload-drag-icon"},c().createElement(r.InboxOutlined,null)),c().createElement("p",{className:"ant-upload-text"}," ",l("Click or drag file to this area to upload")))},C=function(){var e=(0,s.Wl)().t,t=(0,a.useAPIClient)(),n=y((0,u.useState)([]),2),l=n[0],f=n[1],d=y((0,u.useState)(!1),2),m=d[0],b=d[1],v=y((0,u.useState)(!1),2),g=(v[0],v[1]),w=o.App.useApp().modal,C=(0,u.useMemo)(function(){return t.resource("backupFiles")},[t]);(0,u.useEffect)(function(){O()},[]);var O=function(){return p(function(){return h(this,function(e){switch(e.label){case 0:return b(!0),[4,C.list()];case 1:return f(e.sent().data.data),b(!1),[2]}})})()},S=function(){return p(function(){return h(this,function(e){switch(e.label){case 0:return[4,O()];case 1:return e.sent(),[2]}})})()},P=function(t){w.confirm({title:e("Delete record",{ns:"client"}),content:e("Are you sure you want to delete it?",{ns:"client"}),onOk:function(){return p(function(){return h(this,function(n){switch(n.label){case 0:return[4,C.destroy({filterByTk:t.name})];case 1:return n.sent(),[4,O()];case 2:return n.sent(),o.message.success(e("Deleted successfully")),[2]}})})()}})};return c().createElement("div",null,c().createElement(o.Card,{bordered:!1},c().createElement(o.Space,{style:{float:"right",marginBottom:16}},c().createElement(o.Button,{onClick:S,icon:c().createElement(r.ReloadOutlined,null)},e("Refresh")),c().createElement(k,{upload:!0,title:c().createElement(c().Fragment,null,c().createElement(r.UploadOutlined,null)," ",e("Restore backup from local"))}),c().createElement(E,{refresh:S})),c().createElement(o.Table,{dataSource:l,loading:m,columns:[{title:e("Backup file"),dataIndex:"name",width:400,onCell:function(e){return e.inProgress?{colSpan:4}:{}},render:function(t,n){return n.inProgress?c().createElement("div",{style:{color:"rgba(0, 0, 0, 0.88)"}},t,"(",e("Backing up"),"...)"):c().createElement("div",null,t)}},{title:e("File size"),dataIndex:"fileSize",onCell:function(e){return e.inProgress?{colSpan:0}:{}}},{title:e("Created at",{ns:"client"}),dataIndex:"createdAt",onCell:function(e){return e.inProgress?{colSpan:0}:{}},render:function(e){return c().createElement(a.DatePicker.ReadPretty,{value:e,showTime:!0})}},{title:e("Actions",{ns:"client"}),dataIndex:"actions",onCell:function(e){return e.inProgress?{colSpan:0}:{}},render:function(n,r){return c().createElement(o.Space,{split:c().createElement(o.Divider,{type:"vertical"})},c().createElement(k,{ButtonComponent:"a",title:e("Restore"),fileData:r}),c().createElement("a",{type:"link",onClick:function(){return p(function(){var e,n;return h(this,function(l){switch(l.label){case 0:return g(r.name),[4,t.request({url:"backupFiles:download",method:"get",params:{filterByTk:r.name},responseType:"blob"})];case 1:return e=l.sent(),g(!1),n=new Blob([e.data]),(0,i.saveAs)(n,r.name),[2]}})})()}},e("Download")),c().createElement("a",{onClick:function(){return P(r)}},e("Delete")))}}]})))}}}]);
|
package/dist/client/index.js
CHANGED
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react-i18next"),require("file-saver"),require("@formily/antd-v5"),require("react"),require("antd"),require("@nocobase/client"),require("@ant-design/icons")):"function"==typeof define&&define.amd?define("@nocobase/plugin-backup-restore",["react-i18next","file-saver","@formily/antd-v5","react","antd","@nocobase/client","@ant-design/icons"],t):"object"==typeof exports?exports["@nocobase/plugin-backup-restore"]=t(require("react-i18next"),require("file-saver"),require("@formily/antd-v5"),require("react"),require("antd"),require("@nocobase/client"),require("@ant-design/icons")):e["@nocobase/plugin-backup-restore"]=t(e["react-i18next"],e["file-saver"],e["@formily/antd-v5"],e.react,e.antd,e["@nocobase/client"],e["@ant-design/icons"])}(self,function(e,t,r,n,o,i,u){return function(){var c,
|
|
10
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react-i18next"),require("file-saver"),require("@formily/antd-v5"),require("react"),require("antd"),require("@nocobase/client"),require("@ant-design/icons")):"function"==typeof define&&define.amd?define("@nocobase/plugin-backup-restore",["react-i18next","file-saver","@formily/antd-v5","react","antd","@nocobase/client","@ant-design/icons"],t):"object"==typeof exports?exports["@nocobase/plugin-backup-restore"]=t(require("react-i18next"),require("file-saver"),require("@formily/antd-v5"),require("react"),require("antd"),require("@nocobase/client"),require("@ant-design/icons")):e["@nocobase/plugin-backup-restore"]=t(e["react-i18next"],e["file-saver"],e["@formily/antd-v5"],e.react,e.antd,e["@nocobase/client"],e["@ant-design/icons"])}(self,function(e,t,r,n,o,i,u){return function(){"use strict";var a,c,l,s={872:function(e,t,r){r.d(t,{CU:function(){return o},Wl:function(){return i}}),r(342);var n=r(953),o="backup-restore";function i(){return(0,n.useTranslation)(o,{nsMode:"fallback"})}},375:function(e){e.exports=u},418:function(e){e.exports=r},342:function(e){e.exports=i},59:function(e){e.exports=o},506:function(e){e.exports=t},155:function(e){e.exports=n},953:function(t){t.exports=e}},f={};function p(e){var t=f[e];if(void 0!==t)return t.exports;var r=f[e]={exports:{}};return s[e](r,r.exports,p),r.exports}p.m=s,p.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return p.d(t,{a:t}),t},p.d=function(e,t){for(var r in t)p.o(t,r)&&!p.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},p.f={},p.e=function(e){return Promise.all(Object.keys(p.f).reduce(function(t,r){return p.f[r](e,t),t},[]))},p.u=function(e){return"93c7062a6af254c8.js"},p.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),p.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},d={},p.l=function(e,t,r,n){if(d[e])return void d[e].push(t);if(void 0!==r)for(var o,i,u=document.getElementsByTagName("script"),a=0;a<u.length;a++){var c=u[a];if(c.getAttribute("src")==e||c.getAttribute("data-rspack")=="@nocobase/plugin-backup-restore:"+r){o=c;break}}o||(i=!0,(o=document.createElement("script")).timeout=120,p.nc&&o.setAttribute("nonce",p.nc),o.setAttribute("data-rspack","@nocobase/plugin-backup-restore:"+r),o.src=e),d[e]=[t];var l=function(t,r){o.onerror=o.onload=null,clearTimeout(s);var n=d[e];if(delete d[e],o.parentNode&&o.parentNode.removeChild(o),n&&n.forEach(function(e){return e(r)}),t)return t(r)},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)},p.r=function(e){"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},p.g.importScripts&&(b=p.g.location+"");var d,b,v=p.g.document;if(!b&&v&&(v.currentScript&&"SCRIPT"===v.currentScript.tagName.toUpperCase()&&(b=v.currentScript.src),!b)){var y=v.getElementsByTagName("script");if(y.length)for(var h=y.length-1;h>-1&&(!b||!/^http(s?):/.test(b));)b=y[h--].src}if(!b)throw Error("Automatic publicPath is not supported in this browser");p.p=b.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a={889:0},p.f.j=function(e,t){var r=p.o(a,e)?a[e]:void 0;if(0!==r)if(r)t.push(r[2]);else{var n=new Promise(function(t,n){r=a[e]=[t,n]});t.push(r[2]=n);var o=p.p+p.u(e),i=Error();p.l(o,function(t){if(p.o(a,e)&&(0!==(r=a[e])&&(a[e]=void 0),r)){var n=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;i.message="Loading chunk "+e+" failed.\n("+n+": "+o+")",i.name="ChunkLoadError",i.type=n,i.request=o,r[1](i)}},"chunk-"+e,e)}},c=function(e,t){var r,n,o=t[0],i=t[1],u=t[2],c=0;if(o.some(function(e){return 0!==a[e]})){for(r in i)p.o(i,r)&&(p.m[r]=i[r]);u&&u(p)}for(e&&e(t);c<o.length;c++)n=o[c],p.o(a,n)&&a[n]&&a[n][0](),a[n]=0},(l=self.webpackChunk_nocobase_plugin_backup_restore=self.webpackChunk_nocobase_plugin_backup_restore||[]).forEach(c.bind(null,0)),l.push=c.bind(null,l.push.bind(l));var g={},m=window.__nocobase_public_path__||"";if(!m&&window.location&&window.location.pathname){var w=window.location.pathname||"/",k=w.indexOf("/v2/");m=k>=0?w.slice(0,k+1):"/"}return m&&(m=m.replace(/\/v2\/?$/,"/")),m||(m="/"),"/"!==m.charAt(m.length-1)&&(m+="/"),p.p=m+"static/plugins/@nocobase/plugin-backup-restore/dist/client/",!function(){p.r(g),p.d(g,{default:function(){return b},PluginBackupRestoreClient:function(){return d}});var e=p(342),t=p(155),r=p.n(t),n=function(t){return r().createElement(e.SchemaComponentOptions,null,t.children)};n.displayName="DuplicatorProvider";var o=p(872);function i(e,t,r,n,o,i,u){try{var a=e[i](u),c=a.value}catch(e){r(e);return}a.done?t(c):Promise.resolve(c).then(n,o)}function u(e,t,r){return(u=s()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&c(o,r.prototype),o}).apply(null,arguments)}function a(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e){var t="function"==typeof Map?new Map:void 0;return(l=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,r)}function r(){return u(e,arguments,a(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),c(r,e)})(e)}function s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(s=function(){return!!e})()}var f=(0,e.lazy)(function(){return p.e("370").then(p.bind(p,761))},"BackupAndRestoreList").BackupAndRestoreList,d=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function r(){var e,t;if(!(this instanceof r))throw TypeError("Cannot call a class as a function");return e=r,t=arguments,e=a(e),function(e,t){var r;if(t&&("object"==((r=t)&&"u">typeof Symbol&&r.constructor===Symbol?"symbol":typeof r)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,s()?Reflect.construct(e,t||[],a(this).constructor):e.apply(this,t))}return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),e&&c(r,e),t=[{key:"load",value:function(){var e;return(e=function(){return function(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},u=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),a=Object.defineProperty;return a(u,"next",{value:c(0)}),a(u,"throw",{value:c(1)}),a(u,"return",{value:c(2)}),"function"==typeof Symbol&&a(u,Symbol.iterator,{value:function(){return this}}),u;function c(a){return function(c){var l=[a,c];if(r)throw TypeError("Generator is already executing.");for(;u&&(u=0,l[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&l[0]?n.return:l[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,l[1])).done)return o;switch(n=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++,n=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],n=0}finally{r=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}(this,function(e){return this.app.use(n),this.app.pluginSettingsManager.add(o.CU,{title:this.t("Backup & Restore"),icon:"CloudServerOutlined",Component:f,aclSnippet:"pm.backup-restore"}),[2]})},function(){var t=this,r=arguments;return new Promise(function(n,o){var u=e.apply(t,r);function a(e){i(u,n,o,a,c,"next",e)}function c(e){i(u,n,o,a,c,"throw",e)}a(void 0)})}).call(this)}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(r.prototype,t),r}(l(e.Plugin)),b=d}(),g}()});
|
package/dist/externalVersion.js
CHANGED
|
@@ -10,15 +10,15 @@
|
|
|
10
10
|
module.exports = {
|
|
11
11
|
"@ant-design/icons": "5.6.1",
|
|
12
12
|
"@formily/antd-v5": "1.2.3",
|
|
13
|
-
"@nocobase/client": "2.1.0-alpha.
|
|
13
|
+
"@nocobase/client": "2.1.0-alpha.12",
|
|
14
14
|
"antd": "5.24.2",
|
|
15
15
|
"file-saver": "2.0.5",
|
|
16
16
|
"react": "18.2.0",
|
|
17
|
-
"@nocobase/server": "2.1.0-alpha.
|
|
18
|
-
"@nocobase/utils": "2.1.0-alpha.
|
|
19
|
-
"@nocobase/database": "2.1.0-alpha.
|
|
17
|
+
"@nocobase/server": "2.1.0-alpha.12",
|
|
18
|
+
"@nocobase/utils": "2.1.0-alpha.12",
|
|
19
|
+
"@nocobase/database": "2.1.0-alpha.12",
|
|
20
20
|
"dayjs": "1.11.13",
|
|
21
21
|
"lodash": "4.17.21",
|
|
22
22
|
"react-i18next": "11.18.6",
|
|
23
|
-
"@nocobase/actions": "2.1.0-alpha.
|
|
23
|
+
"@nocobase/actions": "2.1.0-alpha.12"
|
|
24
24
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@hapi/topo","description":"Topological sorting with grouping support","version":"6.0.2","repository":"git://github.com/hapijs/topo","main":"lib/index.js","types":"lib/index.d.ts","files":["lib"],"keywords":["topological","sort","toposort","topsort"],"eslintConfig":{"extends":["plugin:@hapi/module"]},"dependencies":{"@hapi/hoek":"^11.0.2"},"devDependencies":{"@hapi/code":"^9.0.3","@hapi/eslint-plugin":"*","@hapi/lab":"^25.1.2","@types/node":"^17.0.31","typescript":"~4.6.4"},"scripts":{"test":"lab -a @hapi/code -t 100 -L -Y","test-cov-html":"lab -a @hapi/code -t 100 -L -r html -o coverage.html"},"license":"BSD-3-Clause","_lastModified":"2026-03-
|
|
1
|
+
{"name":"@hapi/topo","description":"Topological sorting with grouping support","version":"6.0.2","repository":"git://github.com/hapijs/topo","main":"lib/index.js","types":"lib/index.d.ts","files":["lib"],"keywords":["topological","sort","toposort","topsort"],"eslintConfig":{"extends":["plugin:@hapi/module"]},"dependencies":{"@hapi/hoek":"^11.0.2"},"devDependencies":{"@hapi/code":"^9.0.3","@hapi/eslint-plugin":"*","@hapi/lab":"^25.1.2","@types/node":"^17.0.31","typescript":"~4.6.4"},"scripts":{"test":"lab -a @hapi/code -t 100 -L -Y","test-cov-html":"lab -a @hapi/code -t 100 -L -r html -o coverage.html"},"license":"BSD-3-Clause","_lastModified":"2026-03-25T14:05:26.373Z"}
|
|
@@ -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-03-
|
|
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-03-25T14:05:24.413Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"decompress","version":"4.2.1","description":"Extracting archives made easy","license":"MIT","repository":"kevva/decompress","author":{"name":"Kevin Mårtensson","email":"kevinmartensson@gmail.com","url":"github.com/kevva"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["bz2","bzip2","decompress","extract","tar","tar.bz","tar.gz","zip","unzip"],"dependencies":{"decompress-tar":"^4.0.0","decompress-tarbz2":"^4.0.0","decompress-targz":"^4.0.0","decompress-unzip":"^4.0.1","graceful-fs":"^4.1.10","make-dir":"^1.0.0","pify":"^2.3.0","strip-dirs":"^2.0.0"},"devDependencies":{"ava":"*","esm":"^3.2.25","is-jpg":"^1.0.0","path-exists":"^3.0.0","pify":"^2.3.0","rimraf":"^3.0.2","xo":"*"},"ava":{"require":["esm"]},"xo":{"rules":{"promise/prefer-await-to-then":"off"}},"_lastModified":"2026-03-
|
|
1
|
+
{"name":"decompress","version":"4.2.1","description":"Extracting archives made easy","license":"MIT","repository":"kevva/decompress","author":{"name":"Kevin Mårtensson","email":"kevinmartensson@gmail.com","url":"github.com/kevva"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["bz2","bzip2","decompress","extract","tar","tar.bz","tar.gz","zip","unzip"],"dependencies":{"decompress-tar":"^4.0.0","decompress-tarbz2":"^4.0.0","decompress-targz":"^4.0.0","decompress-unzip":"^4.0.1","graceful-fs":"^4.1.10","make-dir":"^1.0.0","pify":"^2.3.0","strip-dirs":"^2.0.0"},"devDependencies":{"ava":"*","esm":"^3.2.25","is-jpg":"^1.0.0","path-exists":"^3.0.0","pify":"^2.3.0","rimraf":"^3.0.2","xo":"*"},"ava":{"require":["esm"]},"xo":{"rules":{"promise/prefer-await-to-then":"off"}},"_lastModified":"2026-03-25T14:05:26.132Z"}
|
|
@@ -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-03-
|
|
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-03-25T14:05:24.765Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"moment","version":"2.29.4","description":"Parse, validate, manipulate, and display dates","homepage":"https://momentjs.com","author":"Iskren Ivov Chernev <iskren.chernev@gmail.com> (https://github.com/ichernev)","contributors":["Tim Wood <washwithcare@gmail.com> (http://timwoodcreates.com/)","Rocky Meza (http://rockymeza.com)","Matt Johnson <mj1856@hotmail.com> (http://codeofmatt.com)","Isaac Cambron <isaac@isaaccambron.com> (http://isaaccambron.com)","Andre Polykanine <andre@oire.org> (https://github.com/oire)"],"keywords":["moment","date","time","parse","format","validate","i18n","l10n","ender"],"main":"./moment.js","jsnext:main":"./dist/moment.js","typings":"./moment.d.ts","typesVersions":{">=3.1":{"*":["ts3.1-typings/*"]}},"engines":{"node":"*"},"repository":{"type":"git","url":"https://github.com/moment/moment.git"},"bugs":{"url":"https://github.com/moment/moment/issues"},"license":"MIT","devDependencies":{"benchmark":"latest","coveralls":"latest","cross-env":"^6.0.3","es6-promise":"latest","eslint":"~6","grunt":"latest","grunt-benchmark":"latest","grunt-cli":"latest","grunt-contrib-clean":"latest","grunt-contrib-concat":"latest","grunt-contrib-copy":"latest","grunt-contrib-uglify":"latest","grunt-contrib-watch":"latest","grunt-env":"latest","grunt-exec":"latest","grunt-karma":"latest","grunt-nuget":"latest","grunt-string-replace":"latest","karma":"latest","karma-chrome-launcher":"latest","karma-firefox-launcher":"latest","karma-qunit":"latest","karma-sauce-launcher":"4.1.4","load-grunt-tasks":"latest","lodash":">=4.17.19","node-qunit":"latest","nyc":"latest","prettier":"latest","qunit":"^2.10.0","rollup":"2.17.1","typescript":"^1.8.10","typescript3":"npm:typescript@^3.1.6","uglify-js":"latest"},"ender":"./ender.js","dojoBuild":"package.js","jspm":{"files":["moment.js","moment.d.ts","locale"],"map":{"moment":"./moment"},"buildConfig":{"uglify":true}},"scripts":{"ts3.1-typescript-test":"cross-env node_modules/typescript3/bin/tsc --project ts3.1-typing-tests","typescript-test":"cross-env node_modules/typescript/bin/tsc --project typing-tests","test":"grunt test","eslint":"eslint Gruntfile.js tasks src","prettier-check":"prettier --check Gruntfile.js tasks src","prettier-fmt":"prettier --write Gruntfile.js tasks src","coverage":"nyc npm test && nyc report","coveralls":"nyc npm test && nyc report --reporter=text-lcov | coveralls"},"spm":{"main":"moment.js","output":["locale/*.js"]},"_lastModified":"2026-03-
|
|
1
|
+
{"name":"moment","version":"2.29.4","description":"Parse, validate, manipulate, and display dates","homepage":"https://momentjs.com","author":"Iskren Ivov Chernev <iskren.chernev@gmail.com> (https://github.com/ichernev)","contributors":["Tim Wood <washwithcare@gmail.com> (http://timwoodcreates.com/)","Rocky Meza (http://rockymeza.com)","Matt Johnson <mj1856@hotmail.com> (http://codeofmatt.com)","Isaac Cambron <isaac@isaaccambron.com> (http://isaaccambron.com)","Andre Polykanine <andre@oire.org> (https://github.com/oire)"],"keywords":["moment","date","time","parse","format","validate","i18n","l10n","ender"],"main":"./moment.js","jsnext:main":"./dist/moment.js","typings":"./moment.d.ts","typesVersions":{">=3.1":{"*":["ts3.1-typings/*"]}},"engines":{"node":"*"},"repository":{"type":"git","url":"https://github.com/moment/moment.git"},"bugs":{"url":"https://github.com/moment/moment/issues"},"license":"MIT","devDependencies":{"benchmark":"latest","coveralls":"latest","cross-env":"^6.0.3","es6-promise":"latest","eslint":"~6","grunt":"latest","grunt-benchmark":"latest","grunt-cli":"latest","grunt-contrib-clean":"latest","grunt-contrib-concat":"latest","grunt-contrib-copy":"latest","grunt-contrib-uglify":"latest","grunt-contrib-watch":"latest","grunt-env":"latest","grunt-exec":"latest","grunt-karma":"latest","grunt-nuget":"latest","grunt-string-replace":"latest","karma":"latest","karma-chrome-launcher":"latest","karma-firefox-launcher":"latest","karma-qunit":"latest","karma-sauce-launcher":"4.1.4","load-grunt-tasks":"latest","lodash":">=4.17.19","node-qunit":"latest","nyc":"latest","prettier":"latest","qunit":"^2.10.0","rollup":"2.17.1","typescript":"^1.8.10","typescript3":"npm:typescript@^3.1.6","uglify-js":"latest"},"ender":"./ender.js","dojoBuild":"package.js","jspm":{"files":["moment.js","moment.d.ts","locale"],"map":{"moment":"./moment"},"buildConfig":{"uglify":true}},"scripts":{"ts3.1-typescript-test":"cross-env node_modules/typescript3/bin/tsc --project ts3.1-typing-tests","typescript-test":"cross-env node_modules/typescript/bin/tsc --project typing-tests","test":"grunt test","eslint":"eslint Gruntfile.js tasks src","prettier-check":"prettier --check Gruntfile.js tasks src","prettier-fmt":"prettier --write Gruntfile.js tasks src","coverage":"nyc npm test && nyc report","coveralls":"nyc npm test && nyc report --reporter=text-lcov | coveralls"},"spm":{"main":"moment.js","output":["locale/*.js"]},"_lastModified":"2026-03-25T14:05:25.334Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"semver","version":"7.7.1","description":"The semantic version parser used by npm.","main":"index.js","scripts":{"test":"tap","snap":"tap","lint":"npm run eslint","postlint":"template-oss-check","lintfix":"npm run eslint -- --fix","posttest":"npm run lint","template-oss-apply":"template-oss-apply --force","eslint":"eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\""},"devDependencies":{"@npmcli/eslint-config":"^5.0.0","@npmcli/template-oss":"4.23.4","benchmark":"^2.1.4","tap":"^16.0.0"},"license":"ISC","repository":{"type":"git","url":"git+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"},"author":"GitHub Inc.","templateOSS":{"//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten.","version":"4.23.4","engines":">=10","distPaths":["classes/","functions/","internal/","ranges/","index.js","preload.js","range.bnf"],"allowPaths":["/classes/","/functions/","/internal/","/ranges/","/index.js","/preload.js","/range.bnf","/benchmarks"],"publish":"true"},"_lastModified":"2026-03-
|
|
1
|
+
{"name":"semver","version":"7.7.1","description":"The semantic version parser used by npm.","main":"index.js","scripts":{"test":"tap","snap":"tap","lint":"npm run eslint","postlint":"template-oss-check","lintfix":"npm run eslint -- --fix","posttest":"npm run lint","template-oss-apply":"template-oss-apply --force","eslint":"eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\""},"devDependencies":{"@npmcli/eslint-config":"^5.0.0","@npmcli/template-oss":"4.23.4","benchmark":"^2.1.4","tap":"^16.0.0"},"license":"ISC","repository":{"type":"git","url":"git+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"},"author":"GitHub Inc.","templateOSS":{"//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten.","version":"4.23.4","engines":">=10","distPaths":["classes/","functions/","internal/","ranges/","index.js","preload.js","range.bnf"],"allowPaths":["/classes/","/functions/","/internal/","/ranges/","/index.js","/preload.js","/range.bnf","/benchmarks"],"publish":"true"},"_lastModified":"2026-03-25T14:05:26.671Z"}
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"description": "Backup and restore applications for scenarios such as application replication, migration, and upgrades.",
|
|
7
7
|
"description.ru-RU": "Резервное копирование и восстановление приложений для задач репликации, миграции и обновления.",
|
|
8
8
|
"description.zh-CN": "备份和还原应用,可用于应用的复制、迁移、升级等场景。",
|
|
9
|
-
"version": "2.1.0-alpha.
|
|
9
|
+
"version": "2.1.0-alpha.12",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"main": "./dist/server/index.js",
|
|
12
12
|
"homepage": "https://docs.nocobase.com/handbook/backup-restore",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"keywords": [
|
|
48
48
|
"System management"
|
|
49
49
|
],
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "f12c4a75470590b1670ce54510b96ef94c2cd7a2"
|
|
51
51
|
}
|