@nocobase/plugin-backup-restore 1.4.0-beta.1 → 1.4.0-beta.2
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/index.js +1 -1
- package/dist/externalVersion.js +5 -6
- 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/mkdirp/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
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"),require("react-i18next"),require("file-saver"),require("@ant-design/icons"),require("@nocobase/client"),require("@formily/antd-v5"),require("antd")):"function"==typeof define&&define.amd?define("@nocobase/plugin-backup-restore",["react","react-i18next","file-saver","@ant-design/icons","@nocobase/client","@formily/antd-v5","antd"],t):"object"==typeof exports?exports["@nocobase/plugin-backup-restore"]=t(require("react"),require("react-i18next"),require("file-saver"),require("@ant-design/icons"),require("@nocobase/client"),require("@formily/antd-v5"),require("antd")):e["@nocobase/plugin-backup-restore"]=t(e.react,e["react-i18next"],e["file-saver"],e["@ant-design/icons"],e["@nocobase/client"],e["@formily/antd-v5"],e.antd)}(self,function(e,t,n,r,o,a,i){return function(){"use strict";var l={482:function(e){e.exports=r},632:function(e){e.exports=a},772:function(e){e.exports=o},721:function(e){e.exports=i},346:function(e){e.exports=n},156:function(t){t.exports=e},238:function(e){e.exports=t}},u={};function c(e){var t=u[e];if(void 0!==t)return t.exports;var n=u[e]={exports:{}};return l[e](n,n.exports,c),n.exports}c.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(t,{a:t}),t},c.d=function(e,t){for(var n in t)c.o(t,n)&&!c.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},c.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},c.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var s={};c.r(s),c.d(s,{PluginBackupRestoreClient:function(){return L},default:function(){return U}});var f=c("772"),p=c("482"),d=c("632"),m=c("721"),y=c("346"),b=c("156"),v=c.n(b),h=c("238"),g="backup-restore";function k(){return(0,h.useTranslation)(g,{nsMode:"fallback"})}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 w(e,t,n,r,o,a,i){try{var l=e[a](i),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function O(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function i(e){w(a,r,o,i,l,"next",e)}function l(e){w(a,r,o,i,l,"throw",e)}i(void 0)})}}function S(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,o,a;r=e,o=t,a=n[t],o in r?Object.defineProperty(r,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[o]=a})}return e}function x(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function C(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var a=[],i=!0,l=!1;try{for(o=o.call(e);!(i=(n=o.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){l=!0,r=e}finally{try{!i&&null!=o.return&&o.return()}finally{if(l)throw r}}return a}}(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.")}()}function P(e,t){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(a){return function(l){return function(a){if(n)throw TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}var j=m.Upload.Dragger,B=function(e){var t,n=e.collectionsData,r=k().t,o=C((0,b.useState)(!1),2),a=o[0],i=o[1],l=C((0,b.useState)(n),2),u=l[0],c=l[1];(0,b.useEffect)(function(){c(n)},[n]);var s=(0,f.useAPIClient)(),p=(0,f.useCompile)(),d=(0,b.useMemo)(function(){return s.resource("backupFiles")},[s]);var y=(t=O(function(){var t;return P(this,function(n){switch(n.label){case 0:if(!e.isBackup)return[3,2];return[4,d.dumpableCollections()];case 1:c(null==(t=n.sent())?void 0:t.data),i(!0),n.label=2;case 2:return i(!0),[2]}})}),function(){return t.apply(this,arguments)}),h=[{title:r("Collection"),dataIndex:"collection",key:"collection",render:function(e,t){var n=p(t.title);return t.name===n?n:v().createElement("div",null,t.name," ",v().createElement("span",{style:{color:"rgba(0, 0, 0, 0.3)",fontSize:"0.9em"}},"(",p(t.title),")"))}},{title:r("Origin"),dataIndex:"origin",key:"origin",width:"50%"}],g=Object.keys(u||{}).map(function(e){return{key:e,label:r("".concat(e,".title")),children:v().createElement(v().Fragment,null,v().createElement(m.Alert,{style:{marginBottom:16},message:r("".concat(e,".description"))}),v().createElement(m.Table,{pagination:{pageSize:100},bordered:!0,size:"small",dataSource:u[e],columns:h,scroll:{y:400}}))}});return v().createElement(v().Fragment,null,v().createElement("a",{onClick:y},r("Learn more")),v().createElement(m.Modal,{title:r("Backup instructions"),width:"80vw",open:a,footer:null,onOk:function(){i(!1)},onCancel:function(){i(!1)}},v().createElement(m.Tabs,{defaultActiveKey:"required",items:g})))},q=function(e){var t,n=e.ButtonComponent,r=void 0===n?m.Button:n,o=e.title,a=e.upload,i=void 0!==a&&a,l=e.fileData,u=k().t,c=C((0,b.useState)(["required"]),2),s=c[0],p=c[1],y=C((0,b.useState)(!1),2),h=y[0],g=y[1],E=C((0,b.useState)(null),2),w=E[0],S=E[1],x=C((0,b.useState)(!1),2),j=x[0],q=x[1],D=(0,f.useAPIClient)(),A=(0,b.useMemo)(function(){return D.resource("backupFiles")},[D]),F=C((0,b.useState)([]),2),I=F[0],M=F[1];(0,b.useEffect)(function(){M(Object.keys((null==w?void 0:w.dumpableCollectionsGroupByGroup)||[]).map(function(e){return{value:e,label:u("".concat(e,".title")),disabled:["required","skipped"].includes(e)}}))},[w]);var R=(t=O(function(){var e,t,n,r;return P(this,function(o){switch(o.label){case 0:if(g(!0),i)return[3,2];return q(!0),[4,A.get({filterByTk:l.name})];case 1:M(Object.keys((null==(r=o.sent().data)?void 0:null===(t=r.data)||void 0===t?void 0:null===(e=t.meta)||void 0===e?void 0:e.dumpableCollectionsGroupByGroup)||[]).map(function(e){return{value:e,label:u("".concat(e,".title")),disabled:["required","skipped"].includes(e)}})),S(null==r?void 0:null===(n=r.data)||void 0===n?void 0:n.meta),q(!1),o.label=2;case 2:return[2]}})}),function(){return t.apply(this,arguments)});return v().createElement(v().Fragment,null,v().createElement(r,{onClick:R},o),v().createElement(m.Modal,{title:u("Restore"),width:800,footer:i&&!w?null:void 0,open:h,onOk:function(){A.restore({values:{dataTypes:s,filterByTk:null==l?void 0:l.name,key:null==w?void 0:w.key}}),g(!1)},onCancel:function(){g(!1),S(null),p(["required"])}},v().createElement(m.Spin,{spinning:j},i&&!w&&v().createElement(T,{setRestoreData:S}),(!i||w)&&[v().createElement("strong",{style:{fontWeight:600,display:"block",margin:"16px 0 8px"},key:"info"},u("Select the data to be restored")," (",v().createElement(B,{collectionsData:null==w?void 0:w.dumpableCollectionsGroupByGroup}),"):"),v().createElement("div",{style:{lineHeight:2,marginBottom:8},key:"dataType"},v().createElement(d.FormItem,null,v().createElement(f.Checkbox.Group,{options:I,style:{flexDirection:"column"},value:s,onChange:function(e){return p(e)}})))])))},D=function(e){var t,n=e.ButtonComponent,r=void 0===n?m.Button:n,o=e.refresh,a=k().t,i=C((0,b.useState)(!1),2),l=i[0],u=i[1],c=C((0,b.useState)(["required"]),2),s=c[0],d=c[1],y=(0,f.useAPIClient)(),h=C((0,b.useState)([]),2),g=h[0],E=h[1];var w=(t=O(function(){return P(this,function(e){switch(e.label){case 0:return[4,y.resource("backupFiles").dumpableCollections()];case 1:return E(Object.keys(e.sent().data||[]).map(function(e){return{value:e,label:a("".concat(e,".title")),disabled:["required","skipped"].includes(e)}})),u(!0),[2]}})}),function(){return t.apply(this,arguments)});return v().createElement(v().Fragment,null,v().createElement(r,{icon:v().createElement(p.PlusOutlined,null),type:"primary",onClick:w},a("New backup")),v().createElement(m.Modal,{title:a("New backup"),width:800,open:l,onOk:function(){y.request({url:"backupFiles:create",method:"post",data:{dataTypes:s}}),u(!1),d(["required"]),setTimeout(function(){o()},500)},onCancel:function(){u(!1),d(["required"])}},v().createElement("strong",{style:{fontWeight:600,display:"block",margin:"16px 0 8px"}},a("Select the data to be backed up")," (",v().createElement(B,{isBackup:!0}),"):"),v().createElement("div",{style:{lineHeight:2,marginBottom:8}},v().createElement(f.Checkbox.Group,{options:g,style:{flexDirection:"column"},onChange:function(e){return d(e)},value:s}))))},T=function(e){var t,n,r=k().t;return v().createElement(j,(t={multiple:!1,action:"/backupFiles:upload",onChange:function(t){t.fileList.length>1&&t.fileList.splice(0,t.fileList.length-1);var n,o,a,i=t.file.status;"done"===i?(m.message.success("".concat(t.file.name," ")+r("file uploaded successfully")),e.setRestoreData(x(S({},null===(o=t.file.response)||void 0===o?void 0:null===(n=o.data)||void 0===n?void 0:n.meta),{key:null===(a=t.file.response)||void 0===a?void 0:a.data.key}))):"error"===i&&m.message.error("".concat(t.file.name," ")+r("file upload failed"))},onDrop:function(e){console.log("Dropped files",e.dataTransfer.files)}},n=(0,f.useAPIClient)(),x(S({},t),{customRequest:function(e){var t=e.action,r=e.data,o=e.file,a=e.filename,i=e.headers,l=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,o),n.axios.post(t,f,{withCredentials:s,headers:i,onUploadProgress:function(e){var t=e.total;u({percent:Math.round(e.loaded/t*100).toFixed(2)},o)}}).then(function(e){c(e.data,o)}).catch(l).finally(function(){}),{abort:function(){console.log("upload progress is aborted.")}}},onChange:function(e){var n;null===(n=t.onChange)||void 0===n||n.call(t,e)}})),v().createElement("p",{className:"ant-upload-drag-icon"},v().createElement(p.InboxOutlined,null)),v().createElement("p",{className:"ant-upload-text"}," ",r("Click or drag file to this area to upload")))},A=function(){var e,t,n,r=k().t,o=(0,f.useAPIClient)(),a=C((0,b.useState)([]),2),i=a[0],l=a[1],u=C((0,b.useState)(!1),2),c=u[0],s=u[1],d=C((0,b.useState)(!1),2),h=(d[0],d[1]),g=m.App.useApp().modal,E=(0,b.useMemo)(function(){return o.resource("backupFiles")},[o]);(0,b.useEffect)(function(){w()},[]);var w=(e=O(function(){return P(this,function(e){switch(e.label){case 0:return s(!0),[4,E.list()];case 1:return l(e.sent().data.data),s(!1),[2]}})}),function(){return e.apply(this,arguments)});var S=(t=O(function(e){var t,n;return P(this,function(r){switch(r.label){case 0:return h(e.name),[4,o.request({url:"backupFiles:download",method:"get",params:{filterByTk:e.name},responseType:"blob"})];case 1:return t=r.sent(),h(!1),n=new Blob([t.data]),(0,y.saveAs)(n,e.name),[2]}})}),function(e){return t.apply(this,arguments)});var x=(n=O(function(){return P(this,function(e){switch(e.label){case 0:return[4,w()];case 1:return e.sent(),[2]}})}),function(){return n.apply(this,arguments)}),j=function(e){g.confirm({title:r("Delete record",{ns:"client"}),content:r("Are you sure you want to delete it?",{ns:"client"}),onOk:O(function(){return P(this,function(t){switch(t.label){case 0:return[4,E.destroy({filterByTk:e.name})];case 1:return t.sent(),[4,w()];case 2:return t.sent(),m.message.success(r("Deleted successfully")),[2]}})})})};return v().createElement("div",null,v().createElement(m.Card,{bordered:!1},v().createElement(m.Space,{style:{float:"right",marginBottom:16}},v().createElement(m.Button,{onClick:x,icon:v().createElement(p.ReloadOutlined,null)},r("Refresh")),v().createElement(q,{upload:!0,title:v().createElement(v().Fragment,null,v().createElement(p.UploadOutlined,null)," ",r("Restore backup from local"))}),v().createElement(D,{refresh:x})),v().createElement(m.Table,{dataSource:i,loading:c,columns:[{title:r("Backup file"),dataIndex:"name",width:400,onCell:function(e){return e.inProgress?{colSpan:4}:{}},render:function(e,t){return t.inProgress?v().createElement("div",{style:{color:"rgba(0, 0, 0, 0.88)"}},e,"(",r("Backing up"),"...)"):v().createElement("div",null,e)}},{title:r("File size"),dataIndex:"fileSize",onCell:function(e){return e.inProgress?{colSpan:0}:{}}},{title:r("Created at",{ns:"client"}),dataIndex:"createdAt",onCell:function(e){return e.inProgress?{colSpan:0}:{}},render:function(e){return v().createElement(f.DatePicker.ReadPretty,{value:e,showTime:!0})}},{title:r("Actions",{ns:"client"}),dataIndex:"actions",onCell:function(e){return e.inProgress?{colSpan:0}:{}},render:function(e,t){return v().createElement(m.Space,{split:v().createElement(m.Divider,{type:"vertical"})},v().createElement(q,{ButtonComponent:"a",title:r("Restore"),fileData:t}),v().createElement("a",{type:"link",onClick:function(){return S(t)}},r("Download")),v().createElement("a",{onClick:function(){return j(t)}},r("Delete")))}}]})))},F=function(e){return v().createElement(f.SchemaComponentOptions,null,e.children)};F.displayName="DuplicatorProvider";function I(e,t,n,r,o,a,i){try{var l=e[a](i),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function M(e,t,n){return(M=N()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&G(o,n.prototype),o}).apply(null,arguments)}function R(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)}}function _(e){return(_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function G(e,t){return(G=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function z(e){var t="function"==typeof Map?new Map:void 0;return(z=function(e){var n;if(null===e||(n=e,-1===Function.toString.call(n).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 M(e,arguments,_(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),G(r,e)})(e)}function N(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(N=function(){return!!e})()}var L=function(e){var t,n,r;function o(){var e,t,n;return!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,o),e=this,t=o,n=arguments,t=_(t),function(e,t){return t&&("object"===function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}(t)||"function"==typeof t)?t:function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,N()?Reflect.construct(t,n||[],_(e).constructor):t.apply(e,n))}return!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&G(e,t)}(o,e),t=o,n=[{key:"load",value:function(){var e,t=this;return(e=function(){return function(e,t){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(a){return function(l){return function(a){if(n)throw TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}(this,function(e){return t.app.use(F),t.app.pluginSettingsManager.add(g,{title:t.t("Backup & Restore"),icon:"CloudServerOutlined",Component:A,aclSnippet:"pm.backup-restore"}),[2]})},function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function i(e){I(a,r,o,i,l,"next",e)}function l(e){I(a,r,o,i,l,"throw",e)}i(void 0)})})()}}],R(t.prototype,n),o}(z(f.Plugin)),U=L;return s}()});
|
|
10
|
+
(function(d,i){typeof exports=="object"&&typeof module!="undefined"?i(exports,require("@nocobase/client"),require("react/jsx-runtime"),require("@ant-design/icons"),require("@formily/antd-v5"),require("antd"),require("react"),require("react-i18next")):typeof define=="function"&&define.amd?define(["exports","@nocobase/client","react/jsx-runtime","@ant-design/icons","@formily/antd-v5","antd","react","react-i18next"],i):(d=typeof globalThis!="undefined"?globalThis:d||self,i(d["@nocobase/plugin-backup-restore"]={},d["@nocobase/client"],d.jsxRuntime,d["@ant-design/icons"],d["@formily/antd-v5"],d.antd,d.react,d["react-i18next"]))})(this,function(d,i,e,x,q,h,g,E){"use strict";var Z=Object.defineProperty,R=Object.defineProperties;var ee=Object.getOwnPropertyDescriptors;var z=Object.getOwnPropertySymbols;var te=Object.prototype.hasOwnProperty,oe=Object.prototype.propertyIsEnumerable;var W=(d,i,e)=>i in d?Z(d,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):d[i]=e,L=(d,i)=>{for(var e in i||(i={}))te.call(i,e)&&W(d,e,i[e]);if(z)for(var e of z(i))oe.call(i,e)&&W(d,e,i[e]);return d},D=(d,i)=>R(d,ee(i));var S=(d,i,e)=>new Promise((x,q)=>{var h=m=>{try{E(e.next(m))}catch(M){q(M)}},g=m=>{try{E(e.throw(m))}catch(M){q(M)}},E=m=>m.done?x(m.value):Promise.resolve(m.value).then(h,g);E((e=e.apply(d,i)).next())});var m=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},M={exports:{}};(function(a,k){(function(p,l){l()})(m,function(){function p(t,o){return typeof o=="undefined"?o={autoBom:!1}:typeof o!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),o={autoBom:!o}),o.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob(["\uFEFF",t],{type:t.type}):t}function l(t,o,b){var n=new XMLHttpRequest;n.open("GET",t),n.responseType="blob",n.onload=function(){v(n.response,o,b)},n.onerror=function(){console.error("could not download file")},n.send()}function c(t){var o=new XMLHttpRequest;o.open("HEAD",t,!1);try{o.send()}catch(b){}return 200<=o.status&&299>=o.status}function f(t){try{t.dispatchEvent(new MouseEvent("click"))}catch(b){var o=document.createEvent("MouseEvents");o.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(o)}}var u=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof m=="object"&&m.global===m?m:void 0,w=u.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),v=u.saveAs||(typeof window!="object"||window!==u?function(){}:"download"in HTMLAnchorElement.prototype&&!w?function(t,o,b){var n=u.URL||u.webkitURL,r=document.createElement("a");o=o||t.name||"download",r.download=o,r.rel="noopener",typeof t=="string"?(r.href=t,r.origin===location.origin?f(r):c(r.href)?l(t,o,b):f(r,r.target="_blank")):(r.href=n.createObjectURL(t),setTimeout(function(){n.revokeObjectURL(r.href)},4e4),setTimeout(function(){f(r)},0))}:"msSaveOrOpenBlob"in navigator?function(t,o,b){if(o=o||t.name||"download",typeof t!="string")navigator.msSaveOrOpenBlob(p(t,b),o);else if(c(t))l(t,o,b);else{var n=document.createElement("a");n.href=t,n.target="_blank",setTimeout(function(){f(n)})}}:function(t,o,b,n){if(n=n||open("","_blank"),n&&(n.document.title=n.document.body.innerText="downloading..."),typeof t=="string")return l(t,o,b);var r=t.type==="application/octet-stream",s=/constructor/i.test(u.HTMLElement)||u.safari,y=/CriOS\/[\d]+/.test(navigator.userAgent);if((y||r&&s||w)&&typeof FileReader!="undefined"){var C=new FileReader;C.onloadend=function(){var T=C.result;T=y?T:T.replace(/^data:[^;]*;/,"data:attachment/file;"),n?n.location.href=T:location=T,n=null},C.readAsDataURL(t)}else{var B=u.URL||u.webkitURL,A=B.createObjectURL(t);n?n.location=A:location.href=A,n=null,setTimeout(function(){B.revokeObjectURL(A)},4e4)}});u.saveAs=v.saveAs=v,a.exports=v})})(M);var K=M.exports;const I="backup-restore";function P(){return E.useTranslation(I,{nsMode:"fallback"})}const{Dragger:X}=h.Upload;function J(a){const k=l=>{var c;(c=a.onChange)==null||c.call(a,l)},p=i.useAPIClient();return D(L({},a),{customRequest({action:l,data:c,file:f,filename:u,headers:w,onError:v,onProgress:t,onSuccess:o,withCredentials:b}){const n=new FormData;return c&&Object.keys(c).forEach(r=>{n.append(r,c[r])}),n.append(u,f),p.axios.post(l,n,{withCredentials:b,headers:w,onUploadProgress:({total:r,loaded:s})=>{t({percent:Math.round(s/r*100).toFixed(2)},f)}}).then(({data:r})=>{o(r,f)}).catch(v).finally(()=>{}),{abort(){console.log("upload progress is aborted.")}}},onChange:k})}const U=a=>{const{collectionsData:k}=a,{t:p}=P(),[l,c]=g.useState(!1),[f,u]=g.useState(k);g.useEffect(()=>{u(k)},[k]);const w=i.useAPIClient(),v=i.useCompile(),t=g.useMemo(()=>w.resource("backupFiles"),[w]),o=()=>S(this,null,function*(){if(a.isBackup){const y=yield t.dumpableCollections();u(y==null?void 0:y.data),c(!0)}c(!0)}),b=()=>{c(!1)},n=()=>{c(!1)},r=[{title:p("Collection"),dataIndex:"collection",key:"collection",render:(y,C)=>{const B=v(C.title);return C.name===B?B:e.jsxs("div",{children:[C.name," ",e.jsxs("span",{style:{color:"rgba(0, 0, 0, 0.3)",fontSize:"0.9em"},children:["(",v(C.title),")"]})]})}},{title:p("Origin"),dataIndex:"origin",key:"origin",width:"50%"}],s=Object.keys(f||{}).map(y=>({key:y,label:p(`${y}.title`),children:e.jsxs(e.Fragment,{children:[e.jsx(h.Alert,{style:{marginBottom:16},message:p(`${y}.description`)}),e.jsx(h.Table,{pagination:{pageSize:100},bordered:!0,size:"small",dataSource:f[y],columns:r,scroll:{y:400}})]})}));return e.jsxs(e.Fragment,{children:[e.jsx("a",{onClick:o,children:p("Learn more")}),e.jsx(h.Modal,{title:p("Backup instructions"),width:"80vw",open:l,footer:null,onOk:b,onCancel:n,children:e.jsx(h.Tabs,{defaultActiveKey:"required",items:s})})]})},G=({ButtonComponent:a=h.Button,title:k,upload:p=!1,fileData:l})=>{const{t:c}=P(),[f,u]=g.useState(["required"]),[w,v]=g.useState(!1),[t,o]=g.useState(null),[b,n]=g.useState(!1),r=i.useAPIClient(),s=g.useMemo(()=>r.resource("backupFiles"),[r]),[y,C]=g.useState([]);g.useEffect(()=>{C(Object.keys((t==null?void 0:t.dumpableCollectionsGroupByGroup)||[]).map(O=>({value:O,label:c(`${O}.title`),disabled:["required","skipped"].includes(O)})))},[t]);const B=()=>S(this,null,function*(){var O,N,$;if(v(!0),!p){n(!0);const{data:F}=yield s.get({filterByTk:l.name});C(Object.keys(((N=(O=F==null?void 0:F.data)==null?void 0:O.meta)==null?void 0:N.dumpableCollectionsGroupByGroup)||[]).map(j=>({value:j,label:c(`${j}.title`),disabled:["required","skipped"].includes(j)}))),o(($=F==null?void 0:F.data)==null?void 0:$.meta),n(!1)}}),A=()=>{s.restore({values:{dataTypes:f,filterByTk:l==null?void 0:l.name,key:t==null?void 0:t.key}}),v(!1)},T=()=>{v(!1),o(null),u(["required"])};return e.jsxs(e.Fragment,{children:[e.jsx(a,{onClick:B,children:k}),e.jsx(h.Modal,{title:c("Restore"),width:800,footer:p&&!t?null:void 0,open:w,onOk:A,onCancel:T,children:e.jsxs(h.Spin,{spinning:b,children:[p&&!t&&e.jsx(V,{setRestoreData:o}),(!p||t)&&[e.jsxs("strong",{style:{fontWeight:600,display:"block",margin:"16px 0 8px"},children:[c("Select the data to be restored")," (",e.jsx(U,{collectionsData:t==null?void 0:t.dumpableCollectionsGroupByGroup}),"):"]},"info"),e.jsx("div",{style:{lineHeight:2,marginBottom:8},children:e.jsx(q.FormItem,{children:e.jsx(i.Checkbox.Group,{options:y,style:{flexDirection:"column"},value:f,onChange:O=>u(O)})})},"dataType")]]})})]})},Q=({ButtonComponent:a=h.Button,refresh:k})=>{const{t:p}=P(),[l,c]=g.useState(!1),[f,u]=g.useState(["required"]),w=i.useAPIClient(),[v,t]=g.useState([]),o=()=>S(this,null,function*(){const{data:r}=yield w.resource("backupFiles").dumpableCollections();t(Object.keys(r||[]).map(s=>({value:s,label:p(`${s}.title`),disabled:["required","skipped"].includes(s)}))),c(!0)}),b=()=>{w.request({url:"backupFiles:create",method:"post",data:{dataTypes:f}}),c(!1),u(["required"]),setTimeout(()=>{k()},500)},n=()=>{c(!1),u(["required"])};return e.jsxs(e.Fragment,{children:[e.jsx(a,{icon:e.jsx(x.PlusOutlined,{}),type:"primary",onClick:o,children:p("New backup")}),e.jsxs(h.Modal,{title:p("New backup"),width:800,open:l,onOk:b,onCancel:n,children:[e.jsxs("strong",{style:{fontWeight:600,display:"block",margin:"16px 0 8px"},children:[p("Select the data to be backed up")," (",e.jsx(U,{isBackup:!0}),"):"]}),e.jsx("div",{style:{lineHeight:2,marginBottom:8},children:e.jsx(i.Checkbox.Group,{options:v,style:{flexDirection:"column"},onChange:r=>u(r),value:f})})]})]})},V=a=>{const{t:k}=P(),p={multiple:!1,action:"/backupFiles:upload",onChange(l){var f,u,w;l.fileList.length>1&&l.fileList.splice(0,l.fileList.length-1);const{status:c}=l.file;c==="done"?(h.message.success(`${l.file.name} `+k("file uploaded successfully")),a.setRestoreData(D(L({},(u=(f=l.file.response)==null?void 0:f.data)==null?void 0:u.meta),{key:(w=l.file.response)==null?void 0:w.data.key}))):c==="error"&&h.message.error(`${l.file.name} `+k("file upload failed"))},onDrop(l){console.log("Dropped files",l.dataTransfer.files)}};return e.jsxs(X,D(L({},J(p)),{children:[e.jsx("p",{className:"ant-upload-drag-icon",children:e.jsx(x.InboxOutlined,{})}),e.jsxs("p",{className:"ant-upload-text",children:[" ",k("Click or drag file to this area to upload")]})]}))},Y=()=>{const{t:a}=P(),k=i.useAPIClient(),[p,l]=g.useState([]),[c,f]=g.useState(!1),[u,w]=g.useState(!1),{modal:v}=h.App.useApp(),t=g.useMemo(()=>k.resource("backupFiles"),[k]);g.useEffect(()=>{o()},[]);const o=()=>S(this,null,function*(){f(!0);const{data:s}=yield t.list();l(s.data),f(!1)}),b=s=>S(this,null,function*(){w(s.name);const y=yield k.request({url:"backupFiles:download",method:"get",params:{filterByTk:s.name},responseType:"blob"});w(!1);const C=new Blob([y.data]);K.saveAs(C,s.name)}),n=()=>S(this,null,function*(){yield o()}),r=s=>{v.confirm({title:a("Delete record",{ns:"client"}),content:a("Are you sure you want to delete it?",{ns:"client"}),onOk:()=>S(this,null,function*(){yield t.destroy({filterByTk:s.name}),yield o(),h.message.success(a("Deleted successfully"))})})};return e.jsx("div",{children:e.jsxs(h.Card,{bordered:!1,children:[e.jsxs(h.Space,{style:{float:"right",marginBottom:16},children:[e.jsx(h.Button,{onClick:n,icon:e.jsx(x.ReloadOutlined,{}),children:a("Refresh")}),e.jsx(G,{upload:!0,title:e.jsxs(e.Fragment,{children:[e.jsx(x.UploadOutlined,{})," ",a("Restore backup from local")]})}),e.jsx(Q,{refresh:n})]}),e.jsx(h.Table,{dataSource:p,loading:c,columns:[{title:a("Backup file"),dataIndex:"name",width:400,onCell:s=>s.inProgress?{colSpan:4}:{},render:(s,y)=>y.inProgress?e.jsxs("div",{style:{color:"rgba(0, 0, 0, 0.88)"},children:[s,"(",a("Backing up"),"...)"]}):e.jsx("div",{children:s})},{title:a("File size"),dataIndex:"fileSize",onCell:s=>s.inProgress?{colSpan:0}:{}},{title:a("Created at",{ns:"client"}),dataIndex:"createdAt",onCell:s=>s.inProgress?{colSpan:0}:{},render:s=>e.jsx(i.DatePicker.ReadPretty,{value:s,showTime:!0})},{title:a("Actions",{ns:"client"}),dataIndex:"actions",onCell:s=>s.inProgress?{colSpan:0}:{},render:(s,y)=>e.jsxs(h.Space,{split:e.jsx(h.Divider,{type:"vertical"}),children:[e.jsx(G,{ButtonComponent:"a",title:a("Restore"),fileData:y}),e.jsx("a",{type:"link",onClick:()=>b(y),children:a("Download")}),e.jsx("a",{onClick:()=>r(y),children:a("Delete")})]})}]})]})})},_=function(a){return e.jsx(i.SchemaComponentOptions,{children:a.children})};_.displayName="DuplicatorProvider";class H extends i.Plugin{load(){return S(this,null,function*(){this.app.use(_),this.app.pluginSettingsManager.add(I,{title:this.t("Backup & Restore"),icon:"CloudServerOutlined",Component:Y,aclSnippet:"pm.backup-restore"})})}}d.PluginBackupRestoreClient=H,d.default=H,Object.defineProperties(d,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/dist/externalVersion.js
CHANGED
|
@@ -10,15 +10,14 @@
|
|
|
10
10
|
module.exports = {
|
|
11
11
|
"@ant-design/icons": "5.2.6",
|
|
12
12
|
"@formily/antd-v5": "1.1.9",
|
|
13
|
-
"@nocobase/client": "1.4.0-beta.
|
|
13
|
+
"@nocobase/client": "1.4.0-beta.2",
|
|
14
14
|
"antd": "5.12.8",
|
|
15
|
-
"file-saver": "2.0.5",
|
|
16
15
|
"react": "18.2.0",
|
|
17
|
-
"@nocobase/server": "1.4.0-beta.
|
|
18
|
-
"@nocobase/utils": "1.4.0-beta.
|
|
19
|
-
"@nocobase/database": "1.4.0-beta.
|
|
16
|
+
"@nocobase/server": "1.4.0-beta.2",
|
|
17
|
+
"@nocobase/utils": "1.4.0-beta.2",
|
|
18
|
+
"@nocobase/database": "1.4.0-beta.2",
|
|
20
19
|
"dayjs": "1.11.10",
|
|
21
20
|
"lodash": "4.17.21",
|
|
22
21
|
"react-i18next": "11.18.6",
|
|
23
|
-
"@nocobase/actions": "1.4.0-beta.
|
|
22
|
+
"@nocobase/actions": "1.4.0-beta.2"
|
|
24
23
|
};
|
|
@@ -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":"2024-11-
|
|
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":"2024-11-21T06:45:05.089Z"}
|
|
@@ -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":"2024-11-
|
|
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":"2024-11-21T06:45:03.321Z"}
|
|
@@ -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":"2024-11-
|
|
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":"2024-11-21T06:45:04.877Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"mkdirp","description":"Recursively mkdir, like `mkdir -p`","version":"1.0.4","main":"index.js","keywords":["mkdir","directory","make dir","make","dir","recursive","native"],"repository":{"type":"git","url":"https://github.com/isaacs/node-mkdirp.git"},"scripts":{"test":"tap","snap":"tap","preversion":"npm test","postversion":"npm publish","postpublish":"git push origin --follow-tags"},"tap":{"check-coverage":true,"coverage-map":"map.js"},"devDependencies":{"require-inject":"^1.4.4","tap":"^14.10.7"},"bin":"bin/cmd.js","license":"MIT","engines":{"node":">=10"},"files":["bin","lib","index.js"],"_lastModified":"2024-11-
|
|
1
|
+
{"name":"mkdirp","description":"Recursively mkdir, like `mkdir -p`","version":"1.0.4","main":"index.js","keywords":["mkdir","directory","make dir","make","dir","recursive","native"],"repository":{"type":"git","url":"https://github.com/isaacs/node-mkdirp.git"},"scripts":{"test":"tap","snap":"tap","preversion":"npm test","postversion":"npm publish","postpublish":"git push origin --follow-tags"},"tap":{"check-coverage":true,"coverage-map":"map.js"},"devDependencies":{"require-inject":"^1.4.4","tap":"^14.10.7"},"bin":"bin/cmd.js","license":"MIT","engines":{"node":">=10"},"files":["bin","lib","index.js"],"_lastModified":"2024-11-21T06:45:03.451Z"}
|
|
@@ -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":"2024-11-
|
|
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":"2024-11-21T06:45:04.030Z"}
|
|
@@ -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":"2024-11-
|
|
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":"2024-11-21T06:45:05.452Z"}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"displayName.zh-CN": "应用的备份与还原(废弃)",
|
|
5
5
|
"description": "Backup and restore applications for scenarios such as application replication, migration, and upgrades.",
|
|
6
6
|
"description.zh-CN": "备份和还原应用,可用于应用的复制、迁移、升级等场景。",
|
|
7
|
-
"version": "1.4.0-beta.
|
|
7
|
+
"version": "1.4.0-beta.2",
|
|
8
8
|
"license": "AGPL-3.0",
|
|
9
9
|
"main": "./dist/server/index.js",
|
|
10
10
|
"homepage": "https://docs.nocobase.com/handbook/backup-restore",
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"keywords": [
|
|
42
42
|
"System management"
|
|
43
43
|
],
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "d5b141a3cd197a3165d69306b99135ea0c7e4aa2"
|
|
45
45
|
}
|