feat: add configuration backup, sync, and version checker services

- Implemented ConfigBackupService for backing up local configuration files.
- Added ConfigSyncService to download configuration files from GitHub with remote-first conflict resolution.
- Created VersionChecker to check application version against the latest GitHub release with caching.
- Introduced security validation utilities for input validation to prevent common vulnerabilities.
- Developed utility functions to start and stop Docusaurus documentation server.
This commit is contained in:
catlog22
2026-02-05 17:32:31 +08:00
parent 834951a08d
commit 5cfeb59124
265 changed files with 8714 additions and 1408 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
"use strict";(globalThis.webpackChunkccw_docs=globalThis.webpackChunkccw_docs||[]).push([[647],{3531(c,s,e){e.r(s),e.d(s,{default:()=>h});e(3696);var r=e(4357),a=e(7473),u=e(8582),l=e(8150),o=e(6270),d=e(2540);function h(c){return(0,d.jsx)(u.e3,{className:(0,r.A)(a.G.wrapper.docsPages),children:(0,d.jsx)(o.A,{children:(0,l.v)(c.route.routes)})})}}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
"use strict";(globalThis.webpackChunkccw_docs=globalThis.webpackChunkccw_docs||[]).push([[663],{1184(e,s,n){n.d(s,{R:()=>r,x:()=>t});var c=n(3696);const d={},i=c.createContext(d);function r(e){const s=c.useContext(i);return c.useMemo(function(){return"function"==typeof e?e(s):{...s,...e}},[s,e])}function t(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(d):e.components||d:r(e.components),c.createElement(i.Provider,{value:s},e.children)}},3747(e,s,n){n.r(s),n.d(s,{assets:()=>l,contentTitle:()=>o,default:()=>u,frontMatter:()=>t,metadata:()=>c,toc:()=>a});const c=JSON.parse('{"id":"index","title":"CCW \u5e2e\u52a9\u6587\u6863","description":"\u5de5\u4f5c\u6d41","source":"@site/i18n/zh/docusaurus-plugin-content-docs/current/index.mdx","sourceDirName":".","slug":"/","permalink":"/docs/zh/","draft":false,"unlisted":false,"editUrl":"https://github.com/ccw/docs/tree/main/docs/index.mdx","tags":[],"version":"current","sidebarPosition":1,"frontMatter":{"title":"CCW \u5e2e\u52a9\u6587\u6863","sidebar_label":"\u9996\u9875","sidebar_position":1},"sidebar":"docs","next":{"title":"\u6982\u89c8","permalink":"/docs/zh/overview"}}');var d=n(2540),i=n(1184),r=n(2436);const t={title:"CCW \u5e2e\u52a9\u6587\u6863",sidebar_label:"\u9996\u9875",sidebar_position:1},o="\u6b22\u8fce\u4f7f\u7528 CCW \u5e2e\u52a9\u6587\u6863",l={},a=[{value:"\u5feb\u901f\u94fe\u63a5",id:"\u5feb\u901f\u94fe\u63a5",level:2}];function h(e){const s={a:"a",h1:"h1",h2:"h2",header:"header",li:"li",ul:"ul",...(0,i.R)(),...e.components};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(s.header,{children:(0,d.jsx)(s.h1,{id:"\u6b22\u8fce\u4f7f\u7528-ccw-\u5e2e\u52a9\u6587\u6863",children:"\u6b22\u8fce\u4f7f\u7528 CCW \u5e2e\u52a9\u6587\u6863"})}),"\n",(0,d.jsxs)("div",{className:"row",children:[(0,d.jsx)("div",{className:"col col--6",children:(0,d.jsxs)("div",{className:"card padding--md",children:[(0,d.jsx)("div",{className:"card__header",children:(0,d.jsx)("h3",{children:"\u5de5\u4f5c\u6d41"})}),(0,d.jsxs)("div",{className:"card__body",children:[(0,d.jsx)("p",{children:"\u63a2\u7d22 15 \u4e2a\u5de5\u4f5c\u6d41\u7ea7\u522b\uff0c\u4ece\u5feb\u901f\u6267\u884c\u5230\u667a\u80fd\u7f16\u6392"}),(0,d.jsx)(r.A,{to:"/docs/zh/workflows/introduction",children:"\u5f00\u59cb\u4f7f\u7528"})]})]})}),(0,d.jsx)("div",{className:"col col--6",children:(0,d.jsxs)("div",{className:"card padding--md",children:[(0,d.jsx)("div",{className:"card__header",children:(0,d.jsx)("h3",{children:"\u547d\u4ee4"})}),(0,d.jsxs)("div",{className:"card__body",children:[(0,d.jsx)("p",{children:"\u5b8c\u6574\u547d\u4ee4\u53c2\u8003\uff0c\u6db5\u76d6\u5de5\u4f5c\u6d41\u3001issue\u3001CLI \u548c\u5185\u5b58\u64cd\u4f5c"}),(0,d.jsx)(r.A,{to:"/docs/zh/commands/general/ccw",children:"\u6d4f\u89c8\u547d\u4ee4"})]})]})})]}),"\n",(0,d.jsx)(s.h2,{id:"\u5feb\u901f\u94fe\u63a5",children:"\u5feb\u901f\u94fe\u63a5"}),"\n",(0,d.jsxs)(s.ul,{children:["\n",(0,d.jsx)(s.li,{children:(0,d.jsx)(s.a,{href:"/docs/zh/workflows/introduction",children:"\u5de5\u4f5c\u6d41\u4ecb\u7ecd"})}),"\n",(0,d.jsx)(s.li,{children:(0,d.jsx)(s.a,{href:"/docs/zh/commands/general/ccw",children:"\u547d\u4ee4\u53c2\u8003"})}),"\n",(0,d.jsx)(s.li,{children:(0,d.jsx)(s.a,{href:"/docs/zh/faq",children:"\u5e38\u89c1\u95ee\u9898"})}),"\n"]})]})}function u(e={}){const{wrapper:s}={...(0,i.R)(),...e.components};return s?(0,d.jsx)(s,{...e,children:(0,d.jsx)(h,{...e})}):h(e)}}}]);

View File

@@ -0,0 +1 @@
"use strict";(globalThis.webpackChunkccw_docs=globalThis.webpackChunkccw_docs||[]).push([[723],{2757(e,t,i){i.d(t,{A:()=>r});i(3696);var n=i(4357),o=i(9082),s=i(4441),a=i(2540);function r({className:e}){return(0,a.jsx)("main",{className:(0,n.A)("container margin-vert--xl",e),children:(0,a.jsx)("div",{className:"row",children:(0,a.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,a.jsx)(s.A,{as:"h1",className:"hero__title",children:(0,a.jsx)(o.A,{id:"theme.NotFound.title",description:"The title of the 404 page",children:"Page Not Found"})}),(0,a.jsx)("p",{children:(0,a.jsx)(o.A,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page",children:"We could not find what you were looking for."})}),(0,a.jsx)("p",{children:(0,a.jsx)(o.A,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page",children:"Please contact the owner of the site that linked you to the original URL and let them know their link is broken."})})]})})})}},5723(e,t,i){i.r(t),i.d(t,{default:()=>c});i(3696);var n=i(9082),o=i(8582),s=i(6270),a=i(2757),r=i(2540);function c(){const e=(0,n.T)({id:"theme.NotFound.title",message:"Page Not Found"});return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.be,{title:e}),(0,r.jsx)(s.A,{children:(0,r.jsx)(a.A,{})})]})}}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
"use strict";(globalThis.webpackChunkccw_docs=globalThis.webpackChunkccw_docs||[]).push([[98],{3045(n,s,e){e.r(s),e.d(s,{default:()=>d});e(3696);var r=e(8582);function o(n,s){return`docs-${n}-${s}`}var c=e(4647),t=e(8150),i=e(6613),a=e(2540);function u(n){const{version:s}=n;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.A,{version:s.version,tag:o(s.pluginId,s.version)}),(0,a.jsx)(r.be,{children:s.noIndex&&(0,a.jsx)("meta",{name:"robots",content:"noindex, nofollow"})})]})}function l(n){const{version:s,route:e}=n;return(0,a.jsx)(r.e3,{className:s.className,children:(0,a.jsx)(c.n,{version:s,children:(0,t.v)(e.routes)})})}function d(n){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(u,{...n}),(0,a.jsx)(l,{...n})]})}}}]);

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
"use strict";(globalThis.webpackChunkccw_docs=globalThis.webpackChunkccw_docs||[]).push([[742],{7093(c){c.exports=JSON.parse('{"name":"docusaurus-plugin-content-docs","id":"default"}')}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,51 @@
/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress
* @license MIT */
/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v16.13.1
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

View File

@@ -0,0 +1 @@
(()=>{"use strict";var e,a,r,t,f,c={},o={};function b(e){var a=o[e];if(void 0!==a)return a.exports;var r=o[e]={exports:{}};return c[e].call(r.exports,r,r.exports,b),r.exports}b.m=c,e=[],b.O=(a,r,t,f)=>{if(!r){var c=1/0;for(i=0;i<e.length;i++){for(var[r,t,f]=e[i],o=!0,d=0;d<r.length;d++)(!1&f||c>=f)&&Object.keys(b.O).every(e=>b.O[e](r[d]))?r.splice(d--,1):(o=!1,f<c&&(c=f));if(o){e.splice(i--,1);var n=t();void 0!==n&&(a=n)}}return a}f=f||0;for(var i=e.length;i>0&&e[i-1][2]>f;i--)e[i]=e[i-1];e[i]=[r,t,f]},b.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return b.d(a,{a:a}),a},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,b.t=function(e,t){if(1&t&&(e=this(e)),8&t)return e;if("object"==typeof e&&e){if(4&t&&e.__esModule)return e;if(16&t&&"function"==typeof e.then)return e}var f=Object.create(null);b.r(f);var c={};a=a||[null,r({}),r([]),r(r)];for(var o=2&t&&e;("object"==typeof o||"function"==typeof o)&&!~a.indexOf(o);o=r(o))Object.getOwnPropertyNames(o).forEach(a=>c[a]=()=>e[a]);return c.default=()=>e,b.d(f,c),f},b.d=(e,a)=>{for(var r in a)b.o(a,r)&&!b.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:a[r]})},b.f={},b.e=e=>Promise.all(Object.keys(b.f).reduce((a,r)=>(b.f[r](e,a),a),[])),b.u=e=>"assets/js/"+({11:"ea313555",17:"ccef5d0f",47:"157db180",48:"a94703ab",98:"a7bd4aaa",121:"5c7b2278",139:"05467734",142:"0566a0a8",148:"4cc74730",207:"562bb8cb",268:"60eef997",273:"8a7e39ed",288:"666bb1bf",366:"775938bf",401:"17896441",407:"611877e1",411:"d550a629",412:"1bac9067",439:"e5f6eee3",448:"f9222419",512:"3f1fe4a1",567:"46f40178",647:"5e95c892",663:"6ab014e9",742:"aba21aa0",777:"fabaf1c8",814:"97c6e66a",829:"9cf7cb6b",834:"b17e4002",849:"4ad7db0f",856:"2ecf8b4a",896:"f4817052",927:"04db0a2e",934:"7a1ee27c",954:"f1bf82ec",971:"fe8e3dcf",975:"1e3006f3",991:"a6c3df16"}[e]||e)+"."+{11:"83795af1",17:"7361a812",47:"00b15415",48:"7b43e8e3",98:"e4fb75f9",121:"b4090abe",139:"307672f8",142:"395f48cb",148:"d1e6f3c3",207:"5f71cec9",268:"a2c45f16",273:"9b5044f2",288:"2b6e95d2",366:"8d71fe29",401:"d1575d23",407:"b99788ce",411:"32ac07bc",412:"1dc1a696",439:"c7efecd7",448:"d1b7c198",512:"3b4b8b58",567:"2e24b189",647:"9f686774",663:"68e6dc67",723:"50d99bed",742:"dc3eeab8",777:"295c1a59",814:"6d0689f8",829:"a74b65de",834:"aff3badb",849:"2e6ab2d6",856:"1a4b0ac6",896:"03d1c334",927:"364684cb",934:"3dd83112",954:"336ffb8a",971:"a08a438a",975:"cad7edf6",991:"3c82de99"}[e]+".js",b.miniCssF=e=>{},b.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),t={},f="ccw-docs:",b.l=(e,a,r,c)=>{if(t[e])t[e].push(a);else{var o,d;if(void 0!==r)for(var n=document.getElementsByTagName("script"),i=0;i<n.length;i++){var l=n[i];if(l.getAttribute("src")==e||l.getAttribute("data-webpack")==f+r){o=l;break}}o||(d=!0,(o=document.createElement("script")).charset="utf-8",b.nc&&o.setAttribute("nonce",b.nc),o.setAttribute("data-webpack",f+r),o.src=e),t[e]=[a];var u=(a,r)=>{o.onerror=o.onload=null,clearTimeout(s);var f=t[e];if(delete t[e],o.parentNode&&o.parentNode.removeChild(o),f&&f.forEach(e=>e(r)),a)return a(r)},s=setTimeout(u.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=u.bind(null,o.onerror),o.onload=u.bind(null,o.onload),d&&document.head.appendChild(o)}},b.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},b.p="/docs/zh/",b.gca=function(e){return e={17896441:"401",ea313555:"11",ccef5d0f:"17","157db180":"47",a94703ab:"48",a7bd4aaa:"98","5c7b2278":"121","05467734":"139","0566a0a8":"142","4cc74730":"148","562bb8cb":"207","60eef997":"268","8a7e39ed":"273","666bb1bf":"288","775938bf":"366","611877e1":"407",d550a629:"411","1bac9067":"412",e5f6eee3:"439",f9222419:"448","3f1fe4a1":"512","46f40178":"567","5e95c892":"647","6ab014e9":"663",aba21aa0:"742",fabaf1c8:"777","97c6e66a":"814","9cf7cb6b":"829",b17e4002:"834","4ad7db0f":"849","2ecf8b4a":"856",f4817052:"896","04db0a2e":"927","7a1ee27c":"934",f1bf82ec:"954",fe8e3dcf:"971","1e3006f3":"975",a6c3df16:"991"}[e]||e,b.p+b.u(e)},(()=>{var e={354:0,869:0};b.f.j=(a,r)=>{var t=b.o(e,a)?e[a]:void 0;if(0!==t)if(t)r.push(t[2]);else if(/^(354|869)$/.test(a))e[a]=0;else{var f=new Promise((r,f)=>t=e[a]=[r,f]);r.push(t[2]=f);var c=b.p+b.u(a),o=new Error;b.l(c,r=>{if(b.o(e,a)&&(0!==(t=e[a])&&(e[a]=void 0),t)){var f=r&&("load"===r.type?"missing":r.type),c=r&&r.target&&r.target.src;o.message="Loading chunk "+a+" failed.\n("+f+": "+c+")",o.name="ChunkLoadError",o.type=f,o.request=c,t[1](o)}},"chunk-"+a,a)}},b.O.j=a=>0===e[a];var a=(a,r)=>{var t,f,[c,o,d]=r,n=0;if(c.some(a=>0!==e[a])){for(t in o)b.o(o,t)&&(b.m[t]=o[t]);if(d)var i=d(b)}for(a&&a(r);n<c.length;n++)f=c[n],b.o(e,f)&&e[f]&&e[f][0](),e[f]=0;return b.O(i)},r=globalThis.webpackChunkccw_docs=globalThis.webpackChunkccw_docs||[];r.forEach(a.bind(null,0)),r.push=a.bind(null,r.push.bind(r))})()})();