@whyour/qinglong-cli 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.en.md +156 -0
- package/README.md +156 -0
- package/dist/npm/commander-LICENSE +22 -0
- package/dist/npm/ql.js +110 -0
- package/dist/npm/ql.js.map +7 -0
- package/package.json +40 -0
- package/skills/qinglong-cli/SKILL.md +21 -0
- package/skills/qinglong-cli/references/openapi.md +213 -0
- package/skills/qinglong-cli/references/panel.md +57 -0
package/dist/npm/ql.js
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";var vt=Object.create;var se=Object.defineProperty;var Tt=Object.getOwnPropertyDescriptor;var xt=Object.getOwnPropertyNames;var kt=Object.getPrototypeOf,St=Object.prototype.hasOwnProperty;var g=(o,e,t)=>()=>{if(t)throw t[0];try{return o&&(e=o(o=0)),e}catch(n){throw t=[n],n}};var z=(o,e)=>{for(var t in e)se(o,t,{get:e[t],enumerable:!0})},Se=(o,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of xt(e))!St.call(o,s)&&s!==t&&se(o,s,{get:()=>e[s],enumerable:!(n=Tt(e,s))||n.enumerable});return o};var U=(o,e,t)=>(t=o!=null?vt(kt(o)):{},Se(e||!o||!o.__esModule?se(t,"default",{value:o,enumerable:!0}):t,o)),Et=o=>Se(se({},"__esModule",{value:!0}),o);var j,ie=g(()=>{"use strict";j=[{name:"task view-list",method:"GET",path:"crons/views"},{name:"task view-create",method:"POST",path:"crons/views",body:"json"},{name:"task view-update",method:"PUT",path:"crons/views",params:["id"],body:"object-id"},{name:"task view-delete",method:"DELETE",path:"crons/views",body:"ids"},{name:"task view-move",method:"PUT",path:"crons/views/move",body:"json"},{name:"task view-disable",method:"PUT",path:"crons/views/disable",body:"ids"},{name:"task view-enable",method:"PUT",path:"crons/views/enable",body:"ids"},{name:"task list",method:"GET",path:"crons",existing:!0},{name:"task detail",method:"GET",path:"crons/detail"},{name:"task create",method:"POST",path:"crons",body:"json"},{name:"task run",method:"PUT",path:"crons/run",body:"ids",existing:!0},{name:"task stop",method:"PUT",path:"crons/stop",body:"ids",existing:!0},{name:"task labels-delete",method:"DELETE",path:"crons/labels",body:"json"},{name:"task labels-create",method:"POST",path:"crons/labels",body:"json"},{name:"task disable",method:"PUT",path:"crons/disable",body:"ids"},{name:"task enable",method:"PUT",path:"crons/enable",body:"ids"},{name:"task logs",method:"GET",path:"crons/:id/log",params:["id"],existing:!0},{name:"task update",method:"PUT",path:"crons",params:["id"],body:"object-id"},{name:"task delete",method:"DELETE",path:"crons",body:"ids"},{name:"task pin",method:"PUT",path:"crons/pin",body:"ids"},{name:"task unpin",method:"PUT",path:"crons/unpin",body:"ids"},{name:"task import",method:"GET",path:"crons/import"},{name:"task get",method:"GET",path:"crons/:id",params:["id"],existing:!0},{name:"task status",method:"PUT",path:"crons/status",body:"json"},{name:"task instances",method:"GET",path:"crons/:id/instances",params:["id"]},{name:"task instance-stop",method:"POST",path:"crons/:id/instances/:instanceId/stop",params:["id","instanceId"]},{name:"task log-files",method:"GET",path:"crons/:id/logs",params:["id"]},{name:"subscription list",method:"GET",path:"subscriptions",existing:!0},{name:"subscription create",method:"POST",path:"subscriptions",body:"json"},{name:"subscription run",method:"PUT",path:"subscriptions/run",body:"ids",existing:!0},{name:"subscription stop",method:"PUT",path:"subscriptions/stop",body:"ids",existing:!0},{name:"subscription disable",method:"PUT",path:"subscriptions/disable",body:"ids",existing:!0},{name:"subscription enable",method:"PUT",path:"subscriptions/enable",body:"ids",existing:!0},{name:"subscription logs",method:"GET",path:"subscriptions/:id/log",params:["id"],existing:!0},{name:"subscription update",method:"PUT",path:"subscriptions",params:["id"],body:"object-id"},{name:"subscription delete",method:"DELETE",path:"subscriptions",body:"ids"},{name:"subscription get",method:"GET",path:"subscriptions/:id",params:["id"],existing:!0},{name:"subscription status",method:"PUT",path:"subscriptions/status",body:"json"},{name:"subscription log-files",method:"GET",path:"subscriptions/:id/logs",params:["id"]},{name:"app list",method:"GET",path:"apps"},{name:"app create",method:"POST",path:"apps",body:"json"},{name:"app update",method:"PUT",path:"apps",params:["id"],body:"object-id"},{name:"app delete",method:"DELETE",path:"apps",body:"ids"},{name:"app reset-secret",method:"PUT",path:"apps/:id/reset-secret",params:["id"]},{name:"auth login",method:"GET",path:"auth/token",existing:!0,anonymous:!0},{name:"env list",method:"GET",path:"envs"},{name:"env create",method:"POST",path:"envs",body:"json"},{name:"env update",method:"PUT",path:"envs",params:["id"],body:"object-id"},{name:"env delete",method:"DELETE",path:"envs",body:"ids"},{name:"env move",method:"PUT",path:"envs/:id/move",params:["id"],body:"json"},{name:"env disable",method:"PUT",path:"envs/disable",body:"ids"},{name:"env enable",method:"PUT",path:"envs/enable",body:"ids"},{name:"env rename",method:"PUT",path:"envs/name",body:"json"},{name:"env get",method:"GET",path:"envs/:id",params:["id"]},{name:"env pin",method:"PUT",path:"envs/pin",body:"ids"},{name:"env unpin",method:"PUT",path:"envs/unpin",body:"ids"},{name:"env labels-create",method:"POST",path:"envs/labels",body:"json"},{name:"env labels-delete",method:"DELETE",path:"envs/labels",body:"json"},{name:"env upload",method:"POST",path:"envs/upload",body:"json",upload:"env"},{name:"config samples",method:"GET",path:"configs/samples"},{name:"config list",method:"GET",path:"configs/files"},{name:"config get",method:"GET",path:"configs/detail"},{name:"config save",method:"POST",path:"configs/save",body:"json"},{name:"script list",method:"GET",path:"scripts"},{name:"script get",method:"GET",path:"scripts/detail"},{name:"script create",method:"POST",path:"scripts",body:"json",upload:"file"},{name:"script update",method:"PUT",path:"scripts",body:"json",upload:"file"},{name:"script delete",method:"DELETE",path:"scripts",body:"json"},{name:"script download",method:"POST",path:"scripts/download",body:"json",download:!0},{name:"script run",method:"PUT",path:"scripts/run",body:"json"},{name:"script stop",method:"PUT",path:"scripts/stop",body:"json"},{name:"script rename",method:"PUT",path:"scripts/rename",body:"json"},{name:"log list",method:"GET",path:"logs"},{name:"log get",method:"GET",path:"logs/detail"},{name:"log delete",method:"DELETE",path:"logs",body:"json"},{name:"log download",method:"POST",path:"logs/download",body:"json",download:!0},{name:"dependency list",method:"GET",path:"dependencies"},{name:"dependency create",method:"POST",path:"dependencies",body:"json"},{name:"dependency update",method:"PUT",path:"dependencies",params:["id"],body:"object-id"},{name:"dependency delete",method:"DELETE",path:"dependencies",body:"ids"},{name:"dependency force-delete",method:"DELETE",path:"dependencies/force",body:"ids"},{name:"dependency get",method:"GET",path:"dependencies/:id",params:["id"]},{name:"dependency reinstall",method:"PUT",path:"dependencies/reinstall",body:"ids"},{name:"dependency cancel",method:"PUT",path:"dependencies/cancel",body:"ids"},{name:"system info",method:"GET",path:"system"},{name:"system config-get",method:"GET",path:"system/config"},{name:"system config-log-remove-frequency",method:"PUT",path:"system/config/log-remove-frequency",body:"json"},{name:"system config-cron-concurrency",method:"PUT",path:"system/config/cron-concurrency",body:"json"},{name:"system config-dependence-proxy",method:"PUT",path:"system/config/dependence-proxy",body:"json"},{name:"system config-node-mirror",method:"PUT",path:"system/config/node-mirror",body:"json"},{name:"system config-python-mirror",method:"PUT",path:"system/config/python-mirror",body:"json"},{name:"system config-linux-mirror",method:"PUT",path:"system/config/linux-mirror",body:"json"},{name:"system update-check",method:"PUT",path:"system/update-check"},{name:"system update",method:"PUT",path:"system/update"},{name:"system reload",method:"PUT",path:"system/reload",body:"json"},{name:"system notify",method:"PUT",path:"system/notify",body:"json"},{name:"system command-run",method:"PUT",path:"system/command-run",body:"json",download:!0},{name:"system command-stop",method:"PUT",path:"system/command-stop",body:"json"},{name:"system data-export",method:"PUT",path:"system/data/export",body:"json",download:!0},{name:"system data-import",method:"PUT",path:"system/data/import",body:"json",upload:"data"},{name:"system logs",method:"GET",path:"system/log"},{name:"system logs-delete",method:"DELETE",path:"system/log"},{name:"system auth-reset",method:"PUT",path:"system/auth/reset",body:"json"},{name:"system config-timezone",method:"PUT",path:"system/config/timezone",body:"json"},{name:"system config-lang",method:"PUT",path:"system/config/lang",body:"json"},{name:"system config-panel-title",method:"PUT",path:"system/config/panel-title",body:"json"},{name:"system config-global-ssh-key",method:"PUT",path:"system/config/global-ssh-key",body:"json"},{name:"system config-dependence-clean",method:"PUT",path:"system/config/dependence-clean",body:"json"},{name:"dashboard record",method:"POST",path:"dashboard/record"},{name:"dashboard overview",method:"GET",path:"dashboard/overview"},{name:"dashboard trend",method:"GET",path:"dashboard/trend"},{name:"dashboard top-time",method:"GET",path:"dashboard/top-time"},{name:"dashboard top-count",method:"GET",path:"dashboard/top-count"},{name:"dashboard runtime",method:"GET",path:"dashboard/runtime"},{name:"dashboard labels",method:"GET",path:"dashboard/labels"},{name:"dashboard system",method:"GET",path:"dashboard/system"},{name:"system client-ip-get",method:"GET",path:"system/client-ip/config"},{name:"system client-ip-set",method:"PUT",path:"system/client-ip/config",body:"json"},{name:"system client-ip-diagnose",method:"GET",path:"system/client-ip/diagnose"},{name:"system retention-set",method:"PUT",path:"system/storage-retention/config",body:"json"},{name:"system retention-preview",method:"POST",path:"system/storage-retention/preview",body:"json"},{name:"system retention-cleanup",method:"POST",path:"system/storage-retention/cleanup",body:"json"},{name:"user login",method:"POST",path:"user/login",body:"json",anonymous:!0},{name:"user logout",method:"POST",path:"user/logout"},{name:"user update",method:"PUT",path:"user",body:"json"},{name:"user get",method:"GET",path:"user"},{name:"user two-factor-init",method:"GET",path:"user/two-factor/init"},{name:"user two-factor-active",method:"PUT",path:"user/two-factor/active",body:"json"},{name:"user two-factor-deactivate",method:"PUT",path:"user/two-factor/deactivate"},{name:"user two-factor-login",method:"PUT",path:"user/two-factor/login",body:"json",anonymous:!0},{name:"user login-log",method:"GET",path:"user/login-log"},{name:"user ip-blacklist",method:"GET",path:"user/ip-blacklist"},{name:"user ip-blacklist-set",method:"PUT",path:"user/ip-blacklist",body:"json"},{name:"user ip-blacklist-delete",method:"DELETE",path:"user/ip-blacklist",body:"json"},{name:"user notification-get",method:"GET",path:"user/notification"},{name:"user notification-set",method:"PUT",path:"user/notification",body:"json"},{name:"user init",method:"PUT",path:"user/init",body:"json",anonymous:!0},{name:"user notification-init",method:"PUT",path:"user/notification/init",body:"json",anonymous:!0},{name:"user avatar",method:"PUT",path:"user/avatar",body:"json",upload:"avatar"},{name:"system apply-reload",method:"PUT",path:"update/reload"},{name:"system apply-system",method:"PUT",path:"update/system"},{name:"system apply-data",method:"PUT",path:"update/data"},{name:"health get",method:"GET",path:"health"}]});var x,N,K=g(()=>{x=class extends Error{constructor(e,t,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}},N=class extends x{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}}});function oe(o){let e=o.name()+(o.variadic===!0?"...":"");return o.required?"<"+e+">":"["+e+"]"}var Y,re=g(()=>{K();Y=class{constructor(e,t){switch(this.description=t||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.endsWith("...")&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_collectValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:(t.push(e),t)}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(t,n)=>{if(!this.argChoices.includes(t))throw new N(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(t,n):t},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}}});var Ee,X,ge=g(()=>{re();Ee=require("node:util"),X=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(e){this.helpWidth=this.helpWidth??e.helpWidth??80}visibleCommands(e){let t=e.commands.filter(s=>!s._hidden),n=e._getHelpCommand();return n&&!n._hidden&&t.push(n),this.sortSubcommands&&t.sort((s,i)=>s.name().localeCompare(i.name())),t}compareOptions(e,t){let n=s=>s.short?s.short.replace(/^-/,""):s.long.replace(/^--/,"");return n(e).localeCompare(n(t))}visibleOptions(e){let t=e.options.filter(s=>!s.hidden),n=e._getHelpOption();if(n&&!n.hidden){let s=n.short&&e._findOption(n.short),i=n.long&&e._findOption(n.long);!s&&!i?t.push(n):n.long&&!i?t.push(e.createOption(n.long,n.description)):n.short&&!s&&t.push(e.createOption(n.short,n.description))}return this.sortOptions&&t.sort(this.compareOptions),t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let t=[];for(let n=e.parent;n;n=n.parent){let s=n.options.filter(i=>!i.hidden);t.push(...s)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(t=>{t.description=t.description||e._argsDescription[t.name()]||""}),e.registeredArguments.find(t=>t.description)?e.registeredArguments:[]}subcommandTerm(e){let t=e.registeredArguments.map(n=>oe(n)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(t?" "+t:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce((n,s)=>Math.max(n,this.displayWidth(t.styleSubcommandTerm(t.subcommandTerm(s)))),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce((n,s)=>Math.max(n,this.displayWidth(t.styleOptionTerm(t.optionTerm(s)))),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce((n,s)=>Math.max(n,this.displayWidth(t.styleOptionTerm(t.optionTerm(s)))),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce((n,s)=>Math.max(n,this.displayWidth(t.styleArgumentTerm(t.argumentTerm(s)))),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+"|"+e._aliases[0]);let n="";for(let s=e.parent;s;s=s.parent)n=s.name()+" "+n;return n+t+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&t.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&t.push(`env: ${e.envVar}`),t.length>0){let n=`(${t.join(", ")})`;return e.description?`${e.description} ${n}`:n}return e.description}argumentDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),e.defaultValue!==void 0&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){let n=`(${t.join(", ")})`;return e.description?`${e.description} ${n}`:n}return e.description}formatItemList(e,t,n){return t.length===0?[]:[n.styleTitle(e),...t,""]}groupItems(e,t,n){let s=new Map;return e.forEach(i=>{let r=n(i);s.has(r)||s.set(r,[])}),t.forEach(i=>{let r=n(i);s.has(r)||s.set(r,[]),s.get(r).push(i)}),s}formatHelp(e,t){let n=t.padWidth(e,t),s=t.helpWidth??80;function i(d,c){return t.formatItem(d,n,c,t)}let r=[`${t.styleTitle("Usage:")} ${t.styleUsage(t.commandUsage(e))}`,""],a=t.commandDescription(e);a.length>0&&(r=r.concat([t.boxWrap(t.styleCommandDescription(a),s),""]));let p=t.visibleArguments(e).map(d=>i(t.styleArgumentTerm(t.argumentTerm(d)),t.styleArgumentDescription(t.argumentDescription(d))));if(r=r.concat(this.formatItemList("Arguments:",p,t)),this.groupItems(e.options,t.visibleOptions(e),d=>d.helpGroupHeading??"Options:").forEach((d,c)=>{let _=d.map(w=>i(t.styleOptionTerm(t.optionTerm(w)),t.styleOptionDescription(t.optionDescription(w))));r=r.concat(this.formatItemList(c,_,t))}),t.showGlobalOptions){let d=t.visibleGlobalOptions(e).map(c=>i(t.styleOptionTerm(t.optionTerm(c)),t.styleOptionDescription(t.optionDescription(c))));r=r.concat(this.formatItemList("Global Options:",d,t))}return this.groupItems(e.commands,t.visibleCommands(e),d=>d.helpGroup()||"Commands:").forEach((d,c)=>{let _=d.map(w=>i(t.styleSubcommandTerm(t.subcommandTerm(w)),t.styleSubcommandDescription(t.subcommandDescription(w))));r=r.concat(this.formatItemList(c,_,t))}),r.join(`
|
|
3
|
+
`)}displayWidth(e){return(0,Ee.stripVTControlCharacters)(e).length}styleTitle(e){return e}styleUsage(e){return e.split(" ").map(t=>t==="[options]"?this.styleOptionText(t):t==="[command]"?this.styleSubcommandText(t):t[0]==="["||t[0]==="<"?this.styleArgumentText(t):this.styleCommandText(t)).join(" ")}styleCommandDescription(e){return this.styleDescriptionText(e)}styleOptionDescription(e){return this.styleDescriptionText(e)}styleSubcommandDescription(e){return this.styleDescriptionText(e)}styleArgumentDescription(e){return this.styleDescriptionText(e)}styleDescriptionText(e){return e}styleOptionTerm(e){return this.styleOptionText(e)}styleSubcommandTerm(e){return e.split(" ").map(t=>t==="[options]"?this.styleOptionText(t):t[0]==="["||t[0]==="<"?this.styleArgumentText(t):this.styleSubcommandText(t)).join(" ")}styleArgumentTerm(e){return this.styleArgumentText(e)}styleOptionText(e){return e}styleArgumentText(e){return e}styleSubcommandText(e){return e}styleCommandText(e){return e}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestGlobalOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}preformatted(e){return/\n[^\S\r\n]/.test(e)}formatItem(e,t,n,s){let r=" ".repeat(2);if(!n)return r+e;let a=e.padEnd(t+e.length-s.displayWidth(e)),p=2,l=(this.helpWidth??80)-t-p-2,d;return l<this.minWidthToWrap||s.preformatted(n)?d=n:d=s.boxWrap(n,l).replace(/\n/g,`
|
|
4
|
+
`+" ".repeat(t+p)),r+a+" ".repeat(p)+d.replace(/\n/g,`
|
|
5
|
+
${r}`)}boxWrap(e,t){if(t<this.minWidthToWrap)return e;let n=e.split(/\r\n|\n/),s=/[\s]*[^\s]+/g,i=[];return n.forEach(r=>{let a=r.match(s);if(a===null){i.push("");return}let p=[a.shift()],u=this.displayWidth(p[0]);a.forEach(l=>{let d=this.displayWidth(l);if(u+d<=t){p.push(l),u+=d;return}i.push(p.join(""));let c=l.trimStart();p=[c],u=this.displayWidth(c)}),i.push(p.join(""))}),i.join(`
|
|
6
|
+
`)}}});function Ae(o){return o.split("-").reduce((e,t)=>e+t[0].toUpperCase()+t.slice(1))}function At(o){let e,t,n=/^-[^-]$/,s=/^--[^-]/,i=o.split(/[ |,]+/).concat("guard");if(n.test(i[0])&&(e=i.shift()),s.test(i[0])&&(t=i.shift()),!e&&n.test(i[0])&&(e=i.shift()),!e&&s.test(i[0])&&(e=t,t=i.shift()),i[0].startsWith("-")){let r=i[0],a=`option creation failed due to '${r}' in option flags '${o}'`;throw/^-[^-][^-]/.test(r)?new Error(`${a}
|
|
7
|
+
- a short flag is a single dash and a single character
|
|
8
|
+
- either use a single dash and a single character (for a short flag)
|
|
9
|
+
- or use a double dash for a long option (and can have two, like '--ws, --workspace')`):n.test(r)?new Error(`${a}
|
|
10
|
+
- too many short flags`):s.test(r)?new Error(`${a}
|
|
11
|
+
- too many long flags`):new Error(`${a}
|
|
12
|
+
- unrecognised flag format`)}if(e===void 0&&t===void 0)throw new Error(`option creation failed due to no flags found in '${o}'.`);return{shortFlag:e,longFlag:t}}var R,ae,ye=g(()=>{K();R=class{constructor(e,t){this.flags=e,this.description=t||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let n=At(e);this.short=n.shortFlag,this.long=n.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0,this.helpGroupHeading=void 0}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let t=e;return typeof e=="string"&&(t={[e]:!0}),this.implied=Object.assign(this.implied||{},t),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_collectValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:(t.push(e),t)}choices(e){return this.argChoices=e.slice(),this.parseArg=(t,n)=>{if(!this.argChoices.includes(t))throw new N(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(t,n):t},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?Ae(this.name().replace(/^no-/,"")):Ae(this.name())}helpGroup(e){return this.helpGroupHeading=e,this}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},ae=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(t=>{t.negate?this.negativeOptions.set(t.attributeName(),t):this.positiveOptions.set(t.attributeName(),t)}),this.negativeOptions.forEach((t,n)=>{this.positiveOptions.has(n)&&this.dualOptions.add(n)})}valueFromOption(e,t){let n=t.attributeName();if(!this.dualOptions.has(n))return!0;let s=this.negativeOptions.get(n).presetArg,i=s!==void 0?s:!1;return t.negate===(i===e)}}});function Pt(o,e){if(Math.abs(o.length-e.length)>3)return Math.max(o.length,e.length);let t=[];for(let n=0;n<=o.length;n++)t[n]=[n];for(let n=0;n<=e.length;n++)t[0][n]=n;for(let n=1;n<=e.length;n++)for(let s=1;s<=o.length;s++){let i;o[s-1]===e[n-1]?i=0:i=1,t[s][n]=Math.min(t[s-1][n]+1,t[s][n-1]+1,t[s-1][n-1]+i),s>1&&n>1&&o[s-1]===e[n-2]&&o[s-2]===e[n-1]&&(t[s][n]=Math.min(t[s][n],t[s-2][n-2]+1))}return t[o.length][e.length]}function be(o,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let t=o.startsWith("--");t&&(o=o.slice(2),e=e.map(r=>r.slice(2)));let n=[],s=3,i=.4;return e.forEach(r=>{if(r.length<=1)return;let a=Pt(o,r),p=Math.max(o.length,r.length);(p-a)/p>i&&(a<s?(s=a,n=[r]):a===s&&n.push(r))}),n.sort((r,a)=>r.localeCompare(a)),t&&(n=n.map(r=>`--${r}`)),n.length>1?`
|
|
13
|
+
(Did you mean one of ${n.join(", ")}?)`:n.length===1?`
|
|
14
|
+
(Did you mean ${n[0]}?)`:""}var Pe=g(()=>{});function Ie(o){return o.map(e=>{if(!e.startsWith("--inspect"))return e;let t,n="127.0.0.1",s="9229",i;return(i=e.match(/^(--inspect(-brk)?)$/))!==null?t=i[1]:(i=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(t=i[1],/^\d+$/.test(i[3])?s=i[3]:n=i[3]):(i=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=i[1],n=i[3],s=i[4]),t&&s!=="0"?`${t}=${n}:${parseInt(s)+1}`:e})}function Le(){if(f.default.env.NO_COLOR||f.default.env.FORCE_COLOR==="0"||f.default.env.FORCE_COLOR==="false")return!1;if(f.default.env.FORCE_COLOR||f.default.env.CLICOLOR_FORCE!==void 0)return!0}var Re,le,P,Z,f,Ue,D,je=g(()=>{Re=require("node:events"),le=U(require("node:child_process"),1),P=U(require("node:path"),1),Z=U(require("node:fs"),1),f=U(require("node:process"),1),Ue=require("node:util");re();K();ge();ye();Pe();D=class o extends Re.EventEmitter{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._savedState=null,this._outputConfiguration={writeOut:t=>f.default.stdout.write(t),writeErr:t=>f.default.stderr.write(t),outputError:(t,n)=>n(t),getOutHelpWidth:()=>f.default.stdout.isTTY?f.default.stdout.columns:void 0,getErrHelpWidth:()=>f.default.stderr.isTTY?f.default.stderr.columns:void 0,getOutHasColors:()=>Le()??(f.default.stdout.isTTY&&f.default.stdout.hasColors?.()),getErrHasColors:()=>Le()??(f.default.stderr.isTTY&&f.default.stderr.hasColors?.()),stripColor:t=>(0,Ue.stripVTControlCharacters)(t)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={},this._helpGroupHeading=void 0,this._defaultCommandGroup=void 0,this._defaultOptionGroup=void 0}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._helpOption=e._helpOption,this._helpCommand=e._helpCommand,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}_getCommandAndAncestors(){let e=[];for(let t=this;t;t=t.parent)e.push(t);return e}command(e,t,n){let s=t,i=n;typeof s=="object"&&s!==null&&(i=s,s=null),i=i||{};let[,r,a]=e.match(/([^ ]+) *(.*)/),p=this.createCommand(r);return s&&(p.description(s),p._executableHandler=!0),i.isDefault&&(this._defaultCommandName=p._name),p._hidden=!!(i.noHelp||i.hidden),p._executableFile=i.executableFile||null,a&&p.arguments(a),this._registerCommand(p),p.parent=this,p.copyInheritedSettings(this),s?this:p}createCommand(e){return new o(e)}createHelp(){return Object.assign(new X,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(this._outputConfiguration={...this._outputConfiguration,...e},this)}showHelpAfterError(e=!0){return typeof e!="string"&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,t){if(!e._name)throw new Error(`Command passed to .addCommand() must have a name
|
|
15
|
+
- specify the name in Command constructor or using .name()`);return t=t||{},t.isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,t){return new Y(e,t)}argument(e,t,n,s){let i=this.createArgument(e,t);return typeof n=="function"?i.default(s).argParser(n):i.default(n),this.addArgument(i),this}arguments(e){return e.trim().split(/ +/).forEach(t=>{this.argument(t)}),this}addArgument(e){let t=this.registeredArguments.slice(-1)[0];if(t?.variadic)throw new Error(`only the last argument can be variadic '${t.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}helpCommand(e,t){if(typeof e=="boolean")return this._addImplicitHelpCommand=e,e&&this._defaultCommandGroup&&this._initCommandGroup(this._getHelpCommand()),this;let n=e??"help [command]",[,s,i]=n.match(/([^ ]+) *(.*)/),r=t??"display help for command",a=this.createCommand(s);return a.helpOption(!1),i&&a.arguments(i),r&&a.description(r),this._addImplicitHelpCommand=!0,this._helpCommand=a,(e||t)&&this._initCommandGroup(a),this}addHelpCommand(e,t){return typeof e!="object"?(this.helpCommand(e,t),this):(this._addImplicitHelpCommand=!0,this._helpCommand=e,this._initCommandGroup(e),this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(e,t){let n=["preSubcommand","preAction","postAction"];if(!n.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
|
|
16
|
+
Expecting one of '${n.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(t):this._lifeCycleHooks[e]=[t],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=t=>{if(t.code!=="commander.executeSubCommandAsync")throw t},this}_exit(e,t,n){this._exitCallback&&this._exitCallback(new x(e,t,n)),f.default.exit(e)}action(e){let t=n=>{let s=this.registeredArguments.length,i=n.slice(0,s);return this._storeOptionsAsProperties?i[s]=this:i[s]=this.opts(),i.push(this),e.apply(this,i)};return this._actionHandler=t,this}createOption(e,t){return new R(e,t)}_callParseArg(e,t,n,s){try{return e.parseArg(t,n)}catch(i){if(i.code==="commander.invalidArgument"){let r=`${s} ${i.message}`;this.error(r,{exitCode:i.exitCode,code:i.code})}throw i}}_registerOption(e){let t=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(t){let n=e.long&&this._findOption(e.long)?e.long:e.short;throw new Error(`Cannot add option '${e.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${n}'
|
|
17
|
+
- already used by option '${t.flags}'`)}this._initOptionGroup(e),this.options.push(e)}_registerCommand(e){let t=s=>[s.name()].concat(s.aliases()),n=t(e).find(s=>this._findCommand(s));if(n){let s=t(this._findCommand(n)).join("|"),i=t(e).join("|");throw new Error(`cannot add command '${i}' as already have command '${s}'`)}this._initCommandGroup(e),this.commands.push(e)}addOption(e){this._registerOption(e);let t=e.name(),n=e.attributeName();e.defaultValue!==void 0&&this.setOptionValueWithSource(n,e.defaultValue,"default");let s=(i,r,a)=>{i==null&&e.presetArg!==void 0&&(i=e.presetArg);let p=this.getOptionValue(n);i!==null&&e.parseArg?i=this._callParseArg(e,i,p,r):i!==null&&e.variadic&&(i=e._collectValue(i,p)),i==null&&(e.negate?i=!1:e.isBoolean()||e.optional?i=!0:i=""),this.setOptionValueWithSource(n,i,a)};return this.on("option:"+t,i=>{let r=`error: option '${e.flags}' argument '${i}' is invalid.`;s(i,r,"cli")}),e.envVar&&this.on("optionEnv:"+t,i=>{let r=`error: option '${e.flags}' value '${i}' from env '${e.envVar}' is invalid.`;s(i,r,"env")}),this}_optionEx(e,t,n,s,i){if(typeof t=="object"&&t instanceof R)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let r=this.createOption(t,n);if(r.makeOptionMandatory(!!e.mandatory),typeof s=="function")r.default(i).argParser(s);else if(s instanceof RegExp){let a=s;s=(p,u)=>{let l=a.exec(p);return l?l[0]:u},r.default(i).argParser(s)}else r.default(s);return this.addOption(r)}option(e,t,n,s){return this._optionEx({},e,t,n,s)}requiredOption(e,t,n,s){return this._optionEx({mandatory:!0},e,t,n,s)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){return this._passThroughOptions=!!e,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(e=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,t){return this.setOptionValueWithSource(e,t,void 0)}setOptionValueWithSource(e,t,n){return this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t,this._optionValueSources[e]=n,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let t;return this._getCommandAndAncestors().forEach(n=>{n.getOptionValueSource(e)!==void 0&&(t=n.getOptionValueSource(e))}),t}_prepareUserArgs(e,t){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");if(t=t||{},e===void 0&&t.from===void 0){f.default.versions?.electron&&(t.from="electron");let s=f.default.execArgv??[];(s.includes("-e")||s.includes("--eval")||s.includes("-p")||s.includes("--print"))&&(t.from="eval")}e===void 0&&(e=f.default.argv),this.rawArgs=e.slice();let n;switch(t.from){case void 0:case"node":this._scriptPath=e[1],n=e.slice(2);break;case"electron":f.default.defaultApp?(this._scriptPath=e[1],n=e.slice(2)):n=e.slice(1);break;case"user":n=e.slice(0);break;case"eval":n=e.slice(1);break;default:throw new Error(`unexpected parse option { from: '${t.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",n}parse(e,t){this._prepareForParse();let n=this._prepareUserArgs(e,t);return this._parseCommand([],n),this}async parseAsync(e,t){this._prepareForParse();let n=this._prepareUserArgs(e,t);return await this._parseCommand([],n),this}_prepareForParse(){this._savedState===null?(this.options.filter(e=>e.negate&&e.defaultValue===void 0&&this.getOptionValue(e.attributeName())===void 0).forEach(e=>{let t=e.long.replace(/^--no-/,"--");this._findOption(t)||this.setOptionValueWithSource(e.attributeName(),!0,"default")}),this.saveStateBeforeParse()):this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw new Error(`Can not call parse again when storeOptionsAsProperties is true.
|
|
18
|
+
- either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[]}_checkForMissingExecutable(e,t,n){if(Z.default.existsSync(e))return;let s=t?`searched for local subcommand relative to directory '${t}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",i=`'${e}' does not exist
|
|
19
|
+
- if '${n}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
|
|
20
|
+
- if the default executable name is not suitable, use the executableFile option to supply a custom name or path
|
|
21
|
+
- ${s}`;throw new Error(i)}_executeSubCommand(e,t){t=t.slice();let n=[".js",".ts",".tsx",".mjs",".cjs"];function s(l,d){let c=P.default.resolve(l,d);if(Z.default.existsSync(c))return c;if(n.includes(P.default.extname(d)))return;let _=n.find(w=>Z.default.existsSync(`${c}${w}`));if(_)return`${c}${_}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let i=e._executableFile||`${this._name}-${e._name}`,r=this._executableDir||"";if(this._scriptPath){let l;try{l=Z.default.realpathSync(this._scriptPath)}catch{l=this._scriptPath}r=P.default.resolve(P.default.dirname(l),r)}if(r){let l=s(r,i);if(!l&&!e._executableFile&&this._scriptPath){let d=P.default.basename(this._scriptPath,P.default.extname(this._scriptPath));d!==this._name&&(l=s(r,`${d}-${e._name}`))}i=l||i}let a=n.includes(P.default.extname(i)),p;f.default.platform!=="win32"?a?(t.unshift(i),t=Ie(f.default.execArgv).concat(t),p=le.default.spawn(f.default.argv[0],t,{stdio:"inherit"})):p=le.default.spawn(i,t,{stdio:"inherit"}):(this._checkForMissingExecutable(i,r,e._name),t.unshift(i),t=Ie(f.default.execArgv).concat(t),p=le.default.spawn(f.default.execPath,t,{stdio:"inherit"})),p.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(d=>{f.default.on(d,()=>{p.killed===!1&&p.exitCode===null&&p.kill(d)})});let u=this._exitCallback;p.on("close",l=>{l=l??1,u?u(new x(l,"commander.executeSubCommandAsync","(close)")):f.default.exit(l)}),p.on("error",l=>{if(l.code==="ENOENT")this._checkForMissingExecutable(i,r,e._name);else if(l.code==="EACCES")throw new Error(`'${i}' not executable`);if(!u)f.default.exit(1);else{let d=new x(1,"commander.executeSubCommandAsync","(error)");d.nestedError=l,u(d)}}),this.runningCommand=p}_dispatchSubcommand(e,t,n){let s=this._findCommand(e);s||this.help({error:!0}),s._prepareForParse();let i;return i=this._chainOrCallSubCommandHook(i,s,"preSubcommand"),i=this._chainOrCall(i,()=>{if(s._executableHandler)this._executeSubCommand(s,t.concat(n));else return s._parseCommand(t,n)}),i}_dispatchHelpCommand(e){e||this.help();let t=this._findCommand(e);return t&&!t._executableHandler&&t.help(),this._dispatchSubcommand(e,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,t)=>{e.required&&this.args[t]==null&&this.missingArgument(e.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let e=(n,s,i)=>{let r=s;if(s!==null&&n.parseArg){let a=`error: command-argument value '${s}' is invalid for argument '${n.name()}'.`;r=this._callParseArg(n,s,i,a)}return r};this._checkNumberOfArguments();let t=[];this.registeredArguments.forEach((n,s)=>{let i=n.defaultValue;n.variadic?s<this.args.length?(i=this.args.slice(s),n.parseArg&&(i=i.reduce((r,a)=>e(n,a,r),n.defaultValue))):i===void 0&&(i=[]):s<this.args.length&&(i=this.args[s],n.parseArg&&(i=e(n,i,n.defaultValue))),t[s]=i}),this.processedArgs=t}_chainOrCall(e,t){return e?.then&&typeof e.then=="function"?e.then(()=>t()):t()}_chainOrCallHooks(e,t){let n=e,s=[];return this._getCommandAndAncestors().reverse().filter(i=>i._lifeCycleHooks[t]!==void 0).forEach(i=>{i._lifeCycleHooks[t].forEach(r=>{s.push({hookedCommand:i,callback:r})})}),t==="postAction"&&s.reverse(),s.forEach(i=>{n=this._chainOrCall(n,()=>i.callback(i.hookedCommand,this))}),n}_chainOrCallSubCommandHook(e,t,n){let s=e;return this._lifeCycleHooks[n]!==void 0&&this._lifeCycleHooks[n].forEach(i=>{s=this._chainOrCall(s,()=>i(this,t))}),s}_parseCommand(e,t){let n=this.parseOptions(t);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(n.operands),t=n.unknown,this.args=e.concat(t),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),t);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(t),this._dispatchSubcommand(this._defaultCommandName,e,t);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(n.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let s=()=>{n.unknown.length>0&&this.unknownOption(n.unknown[0])},i=`command:${this.name()}`;if(this._actionHandler){s(),this._processArguments();let r;return r=this._chainOrCallHooks(r,"preAction"),r=this._chainOrCall(r,()=>this._actionHandler(this.processedArgs)),this.parent&&(r=this._chainOrCall(r,()=>{this.parent.emit(i,e,t)})),r=this._chainOrCallHooks(r,"postAction"),r}if(this.parent?.listenerCount(i))s(),this._processArguments(),this.parent.emit(i,e,t);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,t);this.listenerCount("command:*")?this.emit("command:*",e,t):this.commands.length?this.unknownCommand():(s(),this._processArguments())}else this.commands.length?(s(),this.help({error:!0})):(s(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(t=>t._name===e||t._aliases.includes(e))}_findOption(e){return this.options.find(t=>t.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(t=>{t.mandatory&&e.getOptionValue(t.attributeName())===void 0&&e.missingMandatoryOptionValue(t)})})}_checkForConflictingLocalOptions(){let e=this.options.filter(n=>{let s=n.attributeName();return this.getOptionValue(s)===void 0?!1:this.getOptionValueSource(s)!=="default"});e.filter(n=>n.conflictsWith.length>0).forEach(n=>{let s=e.find(i=>n.conflictsWith.includes(i.attributeName()));s&&this._conflictingOption(n,s)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){let t=[],n=[],s=t;function i(l){return l.length>1&&l[0]==="-"}let r=l=>/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(l)?!this._getCommandAndAncestors().some(d=>d.options.map(c=>c.short).some(c=>/^-\d$/.test(c))):!1,a=null,p=null,u=0;for(;u<e.length||p;){let l=p??e[u++];if(p=null,l==="--"){s===n&&s.push(l),s.push(...e.slice(u));break}if(a&&(!i(l)||r(l))){this.emit(`option:${a.name()}`,l);continue}if(a=null,i(l)){let d=this._findOption(l);if(d){if(d.required){let c=e[u++];c===void 0&&this.optionMissingArgument(d),this.emit(`option:${d.name()}`,c)}else if(d.optional){let c=null;u<e.length&&(!i(e[u])||r(e[u]))&&(c=e[u++]),this.emit(`option:${d.name()}`,c)}else this.emit(`option:${d.name()}`);a=d.variadic?d:null;continue}}if(l.length>2&&l[0]==="-"&&l[1]!=="-"){let d=this._findOption(`-${l[1]}`);if(d){d.required||d.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${d.name()}`,l.slice(2)):(this.emit(`option:${d.name()}`),p=`-${l.slice(2)}`);continue}}if(/^--[^=]+=/.test(l)){let d=l.indexOf("="),c=this._findOption(l.slice(0,d));if(c&&(c.required||c.optional)){this.emit(`option:${c.name()}`,l.slice(d+1));continue}}if(s===t&&i(l)&&!(this.commands.length===0&&r(l))&&(s=n),(this._enablePositionalOptions||this._passThroughOptions)&&t.length===0&&n.length===0){if(this._findCommand(l)){t.push(l),n.push(...e.slice(u));break}else if(this._getHelpCommand()&&l===this._getHelpCommand().name()){t.push(l,...e.slice(u));break}else if(this._defaultCommandName){n.push(l,...e.slice(u));break}}if(this._passThroughOptions){s.push(l,...e.slice(u));break}s.push(l)}return{operands:t,unknown:n}}opts(){if(this._storeOptionsAsProperties){let e={},t=this.options.length;for(let n=0;n<t;n++){let s=this.options[n].attributeName();e[s]=s===this._versionOptionName?this._version:this[s]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,t)=>Object.assign(e,t.opts()),{})}error(e,t){this._outputConfiguration.outputError(`${e}
|
|
22
|
+
`,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
|
|
23
|
+
`):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
|
|
24
|
+
`),this.outputHelp({error:!0}));let n=t||{},s=n.exitCode||1,i=n.code||"commander.error";this._exit(s,i,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in f.default.env){let t=e.attributeName();(this.getOptionValue(t)===void 0||["default","config","env"].includes(this.getOptionValueSource(t)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,f.default.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new ae(this.options),t=n=>this.getOptionValue(n)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(n));this.options.filter(n=>n.implied!==void 0&&t(n.attributeName())&&e.valueFromOption(this.getOptionValue(n.attributeName()),n)).forEach(n=>{Object.keys(n.implied).filter(s=>!t(s)).forEach(s=>{this.setOptionValueWithSource(s,n.implied[s],"implied")})})}missingArgument(e){let t=`error: missing required argument '${e}'`;this.error(t,{code:"commander.missingArgument"})}optionMissingArgument(e){let t=`error: option '${e.flags}' argument missing`;this.error(t,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){let t=`error: required option '${e.flags}' not specified`;this.error(t,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,t){let n=r=>{let a=r.attributeName(),p=this.getOptionValue(a),u=this.options.find(d=>d.negate&&a===d.attributeName()),l=this.options.find(d=>!d.negate&&a===d.attributeName());return u&&(u.presetArg===void 0&&p===!1||u.presetArg!==void 0&&p===u.presetArg)?u:l||r},s=r=>{let a=n(r),p=a.attributeName();return this.getOptionValueSource(p)==="env"?`environment variable '${a.envVar}'`:`option '${a.flags}'`},i=`error: ${s(e)} cannot be used with ${s(t)}`;this.error(i,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let t="";if(e.startsWith("--")&&this._showSuggestionAfterError){let s=[],i=this;do{let r=i.createHelp().visibleOptions(i).filter(a=>a.long).map(a=>a.long);s=s.concat(r),i=i.parent}while(i&&!i._enablePositionalOptions);t=be(e,s)}let n=`error: unknown option '${e}'${t}`;this.error(n,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let t=this.registeredArguments.length,n=t===1?"":"s",s=e.length,i=this.parent?` for '${this.name()}'`:"",r=e.join(", "),a=`error: too many arguments${i}. Expected ${t} argument${n} but got ${s}: ${r}.`;this.error(a,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],t="";if(this._showSuggestionAfterError){let s=[];this.createHelp().visibleCommands(this).forEach(i=>{s.push(i.name()),i.alias()&&s.push(i.alias())}),t=be(e,s)}let n=`error: unknown command '${e}'${t}`;this.error(n,{code:"commander.unknownCommand"})}version(e,t,n){if(e===void 0)return this._version;this._version=e,t=t||"-V, --version",n=n||"output the version number";let s=this.createOption(t,n);return this._versionOptionName=s.attributeName(),this._registerOption(s),this.on("option:"+s.name(),()=>{this._outputConfiguration.writeOut(`${e}
|
|
25
|
+
`),this._exit(0,"commander.version",e)}),this}description(e,t){return e===void 0&&t===void 0?this._description:(this._description=e,t&&(this._argsDescription=t),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let t=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(t=this.commands[this.commands.length-1]),e===t._name)throw new Error("Command alias can't be the same as its name");let n=this.parent?._findCommand(e);if(n){let s=[n.name()].concat(n.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${s}'`)}return t._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(t=>this.alias(t)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let t=this.registeredArguments.map(n=>oe(n));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?t:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}helpGroup(e){return e===void 0?this._helpGroupHeading??"":(this._helpGroupHeading=e,this)}commandsGroup(e){return e===void 0?this._defaultCommandGroup??"":(this._defaultCommandGroup=e,this)}optionsGroup(e){return e===void 0?this._defaultOptionGroup??"":(this._defaultOptionGroup=e,this)}_initOptionGroup(e){this._defaultOptionGroup&&!e.helpGroupHeading&&e.helpGroup(this._defaultOptionGroup)}_initCommandGroup(e){this._defaultCommandGroup&&!e.helpGroup()&&e.helpGroup(this._defaultCommandGroup)}nameFromFilename(e){return this._name=P.default.basename(e,P.default.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let t=this.createHelp(),n=this._getOutputContext(e);t.prepareContext({error:n.error,helpWidth:n.helpWidth,outputHasColors:n.hasColors});let s=t.formatHelp(this,t);return n.hasColors?s:this._outputConfiguration.stripColor(s)}_getOutputContext(e){e=e||{};let t=!!e.error,n,s,i;return t?(n=a=>this._outputConfiguration.writeErr(a),s=this._outputConfiguration.getErrHasColors(),i=this._outputConfiguration.getErrHelpWidth()):(n=a=>this._outputConfiguration.writeOut(a),s=this._outputConfiguration.getOutHasColors(),i=this._outputConfiguration.getOutHelpWidth()),{error:t,write:a=>(s||(a=this._outputConfiguration.stripColor(a)),n(a)),hasColors:s,helpWidth:i}}outputHelp(e){let t;typeof e=="function"&&(t=e,e=void 0);let n=this._getOutputContext(e),s={error:n.error,write:n.write,command:this};this._getCommandAndAncestors().reverse().forEach(r=>r.emit("beforeAllHelp",s)),this.emit("beforeHelp",s);let i=this.helpInformation({error:n.error});if(t&&(i=t(i),typeof i!="string"&&!Buffer.isBuffer(i)))throw new Error("outputHelp callback must return a string or a Buffer");n.write(i),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",s),this._getCommandAndAncestors().forEach(r=>r.emit("afterAllHelp",s))}helpOption(e,t){return typeof e=="boolean"?(e?(this._helpOption===null&&(this._helpOption=void 0),this._defaultOptionGroup&&this._initOptionGroup(this._getHelpOption())):this._helpOption=null,this):(this._helpOption=this.createOption(e??"-h, --help",t??"display help for command"),(e||t)&&this._initOptionGroup(this._helpOption),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this._initOptionGroup(e),this}help(e){this.outputHelp(e);let t=Number(f.default.exitCode??0);t===0&&e&&typeof e!="function"&&e.error&&(t=1),this._exit(t,"commander.help","(outputHelp)")}addHelpText(e,t){let n=["beforeAll","before","after","afterAll"];if(!n.includes(e))throw new Error(`Unexpected value for position to addHelpText.
|
|
26
|
+
Expecting one of '${n.join("', '")}'`);let s=`${e}Help`;return this.on(s,i=>{let r;typeof t=="function"?r=t({error:i.error,command:i.command}):r=t,r&&i.write(`${r}
|
|
27
|
+
`)}),this}_outputHelpIfRequested(e){let t=this._getHelpOption();t&&e.find(s=>t.is(s))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}}});var cn,$e=g(()=>{re();je();K();ge();ye();cn=new D});var Ne=g(()=>{"use strict";$e()});function h(o,e=1){throw new k(o,e)}var k,S=g(()=>{"use strict";k=class extends Error{constructor(t,n=1){super(t);this.exitCode=n;this.name="CliError"}exitCode}});var De,qe=g(()=>{"use strict";De={"\u9700\u8981\u53CC\u56E0\u7D20\u9A8C\u8BC1\uFF0C\u8BF7\u8C03\u7528 user two-factor-login\u3002":"Two-factor authentication required; use user two-factor-login.","QL_URL \u548C QL_ACCESS_TOKEN \u5FC5\u987B\u540C\u65F6\u63D0\u4F9B\u3002":"Provide QL_URL and QL_ACCESS_TOKEN together.","\u63A5\u53E3\u8FD4\u56DE JSON\uFF0C\u672A\u4FDD\u5B58\u4E0B\u8F7D\u6587\u4EF6\u3002":"The endpoint returned JSON; no download was saved.","\u5DF2\u9009\u62E9\u7684 CLI \u5B89\u88C5\u8DEF\u5F84\u5FC5\u987B\u4E3A\u7EDD\u5BF9\u8DEF\u5F84\u3002":"The selected CLI installation path must be absolute.","\u4FDD\u7559 CLI \u5165\u53E3\u4EC5\u652F\u6301\u5DF2\u786E\u8BA4\u7684 2.x \u5347\u7EA7\u8F7D\u8377\u3002":"Preserving CLI entries requires a verified 2.x upgrade payload.","\u65E0\u6CD5\u786E\u8BA4\u5DF2\u9009\u62E9\u7684 CLI \u547D\u4EE4\u52A0\u8F7D\u5668\uFF0C\u8BF7\u68C0\u67E5\u5B89\u88C5\u3002":"Cannot verify the selected CLI command loader. Check the installation.","\u5BB9\u5668\u5165\u53E3\u4EC5\u63A5\u53D7\u901A\u8FC7\u73AF\u5883\u53D8\u91CF\u914D\u7F6E\u3002":"Container entry accepts configuration through environment variables only.","\u4EFB\u52A1\u5EF6\u8FDF\u8FC7\u6EE4\u5DF2\u53D6\u6D88\u3002":"Task delay filtering cancelled.","\u4EFB\u52A1\u5EF6\u8FDF\u8FC7\u6EE4\u5931\u8D25\uFF08\u9000\u51FA\u7801 %s\uFF09\u3002":"Task delay filtering failed (exit %s).","\u76F4\u63A5\u8FD0\u884C\u7684\u540E\u7AEF\u5728\u542F\u52A8\u671F\u95F4\u9000\u51FA\uFF08%s\uFF09\u3002":"Direct backend exited during startup (%s).","\u65E0\u6CD5\u83B7\u53D6\u672C\u673A\u7CFB\u7EDF\u4EE4\u724C\uFF0C\u8BF7\u68C0\u67E5\u8FD0\u884C\u4E2D\u7684\u9762\u677F\u3002":"Cannot obtain a local system token. Check the running panel.","\u672C\u673A\u9762\u677F\u7AEF\u53E3\u65E0\u6548\u3002":"Invalid local panel port.","\u672C\u673A API \u62D2\u7EDD\u8BF7\u6C42\uFF08HTTP %s\uFF09\u3002":"Local API rejected request (HTTP %s).","\u672C\u673A API \u8BF7\u6C42\u5931\u8D25\uFF1B\u8BF7\u5148\u68C0\u67E5\u64CD\u4F5C\u7ED3\u679C\uFF0C\u4E0D\u8981\u76F4\u63A5\u91CD\u8BD5\u5199\u5165\u3002":"Local API request failed; do not retry a mutation without checking its result.","\u672C\u673A API \u62D2\u7EDD\u8BF7\u6C42\uFF0C\u8BF7\u68C0\u67E5\u9762\u677F\u65E5\u5FD7\u548C\u6743\u9650\u3002":"Local API rejected request. Check panel logs and permissions.","\u4EFB\u52A1\u5217\u8868\u54CD\u5E94\u65E0\u6548\u3002":"Invalid task list response.","\u4EFB\u52A1\u54CD\u5E94\u65E0\u6548\u3002":"Invalid task response.","\u65E5\u5FD7\u54CD\u5E94\u65E0\u6548\u3002":"Invalid log response.","\u8BA2\u9605\u54CD\u5E94\u65E0\u6548\u3002":"Invalid subscription response.","\u8BA2\u9605\u5217\u8868\u54CD\u5E94\u65E0\u6548\u3002":"Invalid subscription list response.","\u8FD4\u56DE\u7684\u8BA2\u9605 ID \u4E0E\u8BF7\u6C42\u4E0D\u4E00\u81F4\u3002":"Unexpected subscription ID.","\u8BA2\u9605\u65E5\u5FD7\u54CD\u5E94\u65E0\u6548\u3002":"Invalid subscription log response.","\u4E0D\u652F\u6301\u7684\u8BA2\u9605\u64CD\u4F5C\u3002":"Unsupported subscription operation.","\u8DEF\u5F84\u5FC5\u987B\u4F4D\u4E8E\u5176\u7BA1\u7406\u76EE\u5F55\u5185\u90E8\u3002":"Path must be a descendant of its managed directory.","\u4ED3\u5E93\u8DEF\u5F84\u65E0\u6548\u3002":"Invalid repository path.","\u5355\u6587\u4EF6\u8BA2\u9605\u9700\u8981 HTTP(S) \u5730\u5740\u3002":"Raw subscriptions require HTTP(S).","\u8BA2\u9605\u4EFB\u52A1\u540C\u6B65\u8FD4\u56DE\u4E86\u65E0\u6548\u4EFB\u52A1\u5217\u8868\u3002":"Invalid task list during subscription reconciliation.","\u65E0\u6CD5\u542F\u52A8\u5FC5\u8981\u7684\u53EF\u6267\u884C\u7A0B\u5E8F\uFF1A%s":"Cannot start required executable: %s","\u5B50\u8FDB\u7A0B\u8F93\u51FA\u5199\u5165\u5931\u8D25\u3002":"Child output sink failed.","\u5B50\u8FDB\u7A0B\u8F93\u51FA\u8D85\u8FC7\u914D\u7F6E\u7684\u6355\u83B7\u4E0A\u9650\u3002":"Child output exceeded the configured capture limit.","\u5FC5\u8981\u7684\u53EF\u6267\u884C\u7A0B\u5E8F\u5931\u8D25\uFF08%s\uFF0C\u9000\u51FA\u7801 %s\uFF09\u3002":"Required executable failed (%s, exit %s).","CLI \u5B89\u88C5\u8DEF\u5F84\u5FC5\u987B\u4E3A\u7EDD\u5BF9\u8DEF\u5F84\u3002":"CLI installation paths must be absolute.","CLI \u5165\u53E3\u5FC5\u987B\u4E3A\u666E\u901A\u6587\u4EF6\u3002":"CLI entry is not a regular file.","\u547D\u4EE4\u65E5\u5FD7\u76EE\u5F55\u65E0\u6548\u3002":"Invalid command log directory.","QlPort \u5FC5\u987B\u5728 1 \u5230 65535 \u4E4B\u95F4\u3002":"QlPort must be between 1 and 65535.","CLI \u8C03\u7528\u5931\u8D25\u3002":"CLI invocation failed.","\u4E0D\u652F\u6301\u6B64\u90E8\u7F72\u64CD\u4F5C\u7CFB\u7EDF\uFF1A%s\u3002":"Unsupported deployment OS: %s.","Python \u8FD4\u56DE\u4E86\u65E0\u6548\u7248\u672C\u3002":"Python returned an invalid version.","\u542F\u52A8\u9700\u8981\u4EE5 /data \u7ED3\u5C3E\u7684\u7EDD\u5BF9\u6570\u636E\u76EE\u5F55\u3002":"Startup requires an absolute data directory ending in /data.","\u5BB9\u5668\u5B89\u88C5\u76EE\u5F55\u548C\u6570\u636E\u76EE\u5F55\u5FC5\u987B\u4E3A\u7EDD\u5BF9\u8DEF\u5F84\u3002":"Container root and data directory must be absolute paths.","\u5BB9\u5668\u76EE\u5F55\u4E0D\u53EF\u5199\u6216\u4E0D\u53EF\u8BBF\u95EE\uFF1A%s\uFF08UID %s\uFF09\u3002\u8BF7\u68C0\u67E5\u6302\u8F7D\u76EE\u5F55\u7684\u6240\u6709\u8005\u548C\u6743\u9650\u3002":"Container directory is not writable/searchable: %s (UID %s). Check the mounted directory ownership and permissions.","\u65E0\u6CD5\u521D\u59CB\u5316 %s\uFF1A%s":"Cannot initialize %s: %s","QL_SCHEDULER \u5FC5\u987B\u4E3A node \u6216 system\u3002":"QL_SCHEDULER must be node or system.","\u5BB9\u5668\u8C03\u5EA6\u5668\u610F\u5916\u9000\u51FA\uFF08%s\uFF09\u3002":"Container scheduler exited unexpectedly (%s).","Bot \u5B89\u88C5\u4E0D\u652F\u6301\u6B64\u64CD\u4F5C\u7CFB\u7EDF\uFF1A%s\u3002":"Bot installation does not support OS: %s.","Bot \u4ED3\u5E93\u5305\u542B\u6307\u5411\u76EE\u5F55\u5916\u90E8\u7684\u7B26\u53F7\u94FE\u63A5\u3002":"Bot repository contains an external symlink.","Bot \u4ED3\u5E93\u5305\u542B\u4E0D\u652F\u6301\u7684\u6587\u4EF6\u7C7B\u578B\u3002":"Bot repository contains an unsupported entry.","Bot \u6E90\u5FC5\u987B\u4E3A\u666E\u901A\u76EE\u5F55\u3002":"Bot source must be a regular directory.","Bot \u914D\u7F6E\u6A21\u677F\u5FC5\u987B\u4E3A\u666E\u901A\u6587\u4EF6\u3002":"Bot configuration template must be a regular file.","Bot \u8FDB\u7A0B\u7BA1\u7406\u9700\u8981 Linux\u3002":"Bot process management requires Linux.","Bot \u5B89\u88C5\u548C\u8FDB\u7A0B\u7BA1\u7406\u9700\u8981 Linux\u3002":"Bot installation and process management require Linux.","Bot \u5728\u542F\u52A8\u671F\u95F4\u9000\u51FA\uFF08%s\uFF09\u3002":"Bot exited during startup (%s).","\u8BA2\u9605\u8DEF\u5F84\u5305\u542B\u6362\u884C\u6216\u7A7A\u5B57\u7B26\uFF0C\u65E0\u6CD5\u5B89\u5168\u8FC7\u6EE4\u3002":"Subscription paths with line breaks cannot be filtered safely.","\u8BA2\u9605 POSIX \u6B63\u5219\u8868\u8FBE\u5F0F\u65E0\u6548\u3002":"Invalid subscription POSIX regular expression.","\u8BA2\u9605\u8FC7\u6EE4\u5931\u8D25\uFF08\u9000\u51FA\u7801 %s\uFF09\u3002":"Subscription filtering failed (exit %s).","\u8D26\u53F7\u9009\u62E9\u683C\u5F0F\u65E0\u6548\u3002":"Invalid account selection.","\u8D26\u53F7\u9009\u62E9\u8D85\u51FA\u73AF\u5883\u53D8\u91CF\u7684\u8D26\u53F7\u8303\u56F4\u3002":"Account selection is outside the environment variable range.","\u8D85\u65F6\u5FC5\u987B\u4E3A\u6B63\u65F6\u957F\uFF0C\u4F8B\u5982 30s \u6216 5m\u3002":"Timeout must be a positive duration, e.g. 30s or 5m.","\u8D85\u65F6\u65F6\u957F\u8D85\u51FA\u652F\u6301\u8303\u56F4\u3002":"Timeout is outside the supported range.","\u5FC5\u987B\u6307\u5B9A\u811A\u672C\u6216\u53EF\u6267\u884C\u7A0B\u5E8F\u3002":"A script or executable is required.","\u5FC5\u987B\u6307\u5B9A\u6709\u6548\u7684\u8D26\u53F7\u73AF\u5883\u53D8\u91CF\u540D\u3002":"A valid account environment variable is required.","cron \u73AF\u5883\u53D8\u91CF\u503C\u65E0\u6548\u3002":"Invalid cron environment value","cron \u5B89\u88C5\u8DEF\u5F84\u5FC5\u987B\u4E3A\u7EDD\u5BF9\u8DEF\u5F84\u3002":"Cron installation paths must be absolute","\u62D2\u7EDD\u8986\u76D6\u4E0D\u5C5E\u4E8E\u6B64 CLI \u7684\u7528\u6237 crontab \u547D\u4EE4\u3002":"Refusing to replace an unrelated user crontab command","\u65E0\u6CD5\u5B89\u88C5\u6216\u8BFB\u53D6\u9762\u677F crontab\uFF0C\u8BF7\u68C0\u67E5\u73AF\u5883\u8DEF\u5F84\u548C\u7CFB\u7EDF cron \u5DE5\u5177\u3002":"Cannot install or read the selected panel crontab. Check its environment paths and system cron tool.","\u540E\u7AEF\u8FDB\u7A0B\u672A\u5728 5 \u79D2\u5185\u505C\u6B62\uFF0C\u5DF2\u53D6\u6D88\u91CD\u542F\u3002":"Direct backend did not stop within 5 seconds; restart cancelled.","\u65E0\u6CD5\u68C0\u67E5\u8FD0\u884C\u4E2D\u7684\u540E\u7AEF\u8FDB\u7A0B\u3002":"Cannot inspect running backend processes.","\u5347\u7EA7\u6587\u4EF6\u5305\u542B\u6307\u5411\u76EE\u5F55\u5916\u90E8\u7684\u7B26\u53F7\u94FE\u63A5\u3002":"Upgrade payload contains an external symlink.","\u5347\u7EA7\u6587\u4EF6\u5305\u542B\u4E0D\u652F\u6301\u7684\u6587\u4EF6\u7C7B\u578B\u3002":"Upgrade payload contains unsupported filesystem entries.","\u5347\u7EA7\u5F52\u6863\u5305\u542B\u65E0\u6548\u8DEF\u5F84\u3002":"Upgrade archive contains an invalid path.","\u5347\u7EA7\u5F52\u6863\u5305\u542B\u7B26\u53F7\u94FE\u63A5\u3002":"Upgrade archive contains symlinks.","\u6682\u5B58\u5347\u7EA7\u6307\u9488\u65E0\u6548\u3002":"Invalid staged upgrade pointer.","\u6682\u5B58\u5347\u7EA7\u76EE\u5F55\u65E0\u6548\u3002":"Invalid staged upgrade directory.","\u6682\u5B58\u5347\u7EA7\u5C31\u7EEA\u8BB0\u5F55\u4E0E\u76EE\u5F55\u4E0D\u5339\u914D\u3002":"Staged upgrade readiness does not match its directory.","\u66FF\u6362\u6E90\u4E0E\u76EE\u6807\u76F8\u540C\u3002":"Replacement source equals destination.","\u66FF\u6362\u6E90\u4F4D\u4E8E\u76EE\u6807\u76EE\u5F55\u5185\u90E8\u3002":"Replacement source is inside its destination.","\u91CD\u8F7D\u5931\u8D25\uFF1B\u6587\u4EF6\u5DF2\u6062\u590D\uFF0C\u4F46\u539F\u670D\u52A1\u65E0\u6CD5\u91CD\u65B0\u542F\u52A8\u3002":"Reload failed; files restored, but the previous service could not restart.","\u6570\u636E\u91CD\u8F7D\u9700\u8981\u72EC\u7ACB\u7684\u6570\u636E\u76EE\u5F55\u3002":"Data reload requires a dedicated data directory.","\u6682\u5B58\u6570\u636E\u4E0E\u5DF2\u5B89\u88C5\u7684\u6570\u636E\u76EE\u5F55\u5FC5\u987B\u5206\u79BB\u3002":"Staged data must be separate from the installed data directory.","\u4E3B\u673A\u5F00\u673A\u6CE8\u518C\u9700\u8981 OpenRC \u6216 systemd\uFF1B\u4EC5\u5728\u5176\u4ED6\u7BA1\u7406\u5668\u8D1F\u8D23\u670D\u52A1\u65F6\u4F7F\u7528 --no-startup\u3002":"Host startup registration requires OpenRC or systemd. Use --no-startup only when another supervisor owns the services.","\u672C\u673A\u547D\u4EE4\u9700\u8981\u901A\u8FC7 --root \u6216 QL_DIR \u6307\u5B9A\u7EDD\u5BF9\u8DEF\u5F84\u3002":"Local commands require an absolute --root or QL_DIR.","\u9762\u677F\u5B89\u88C5\u76EE\u5F55\u4E0D\u5B58\u5728\u6216\u4E0D\u662F\u76EE\u5F55\u3002":"Panel root does not exist.","\u7528\u6237\u914D\u7F6E\u52A0\u8F7D\u5DF2\u53D6\u6D88\u3002":"User configuration evaluation cancelled.","\u7528\u6237\u914D\u7F6E\u52A0\u8F7D\u5931\u8D25\u3002":"User configuration evaluation failed.","\u7528\u6237\u914D\u7F6E\u8FD4\u56DE\u4E86\u65E0\u6548\u7684\u73AF\u5883\u6570\u636E\u3002":"User configuration returned invalid environment data.","\u7528\u6CD5\uFF1Aql-compat update [true|false]":"Usage: ql-compat update [true|false]","\u7528\u6CD5\uFF1Aql-compat reload [services|system|data]":"Usage: ql-compat reload [services|system|data]","\u672A\u77E5\u65E7\u547D\u4EE4\uFF0C\u8BF7\u8FD0\u884C ql-compat --help\u3002":"Unknown legacy command. Run ql-compat --help.","\u547D\u4EE4\u5DF2\u4E2D\u65AD\u3002":"Command interrupted.","\u65E7\u547D\u4EE4\u9002\u914D\u5668\u6267\u884C\u5931\u8D25\u3002":"Legacy command adapter failed.","\u7528\u6CD5\uFF1Aql-subscription-worker repo|raw <url> [\u65E7\u8BA2\u9605\u53C2\u6570]":"Usage: ql-subscription-worker repo|raw <url> [legacy subscription arguments]","\u8BA2\u9605\u5E03\u5C14\u53C2\u6570\u65E0\u6548\uFF0C\u53EA\u80FD\u4F7F\u7528 true \u6216 false\u3002":"Invalid subscription boolean.","\u8BA2\u9605\u53C2\u6570\u8FC7\u591A\u3002":"Too many subscription arguments.","SUB_ID \u65E0\u6548\uFF0C\u5FC5\u987B\u4E3A\u6B63\u6574\u6570\u3002":"Invalid SUB_ID.","\u8BA2\u9605\u6267\u884C\u5668\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u672C\u673A\u65E5\u5FD7\u3002":"Subscription worker failed. Check local logs.","\u4EFB\u52A1\u6267\u884C\u5668\u9009\u9879\u65E0\u6548\u3002":"Invalid runner options.","\u672C\u673A\u4EFB\u52A1\u5728\u52A0\u8F7D\u914D\u7F6E\u65F6\u5DF2\u53D6\u6D88\u3002":"Local task execution cancelled during configuration.","\u672C\u673A\u4EFB\u52A1\u6267\u884C\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u9762\u677F\u73AF\u5883\u548C\u4EFB\u52A1\u65E5\u5FD7\u3002":"Local task execution failed. Check the panel environment and task log.","\u5E94\u7528 ID":"Client ID",\u5E94\u7528\u5BC6\u94A5:"Client secret",\u8BA2\u9605:"subscription",\u4EFB\u52A1:"task",\u5E94\u7528\u51ED\u636E:"application credentials","\u5E94\u7528\u51ED\u636E\u548C %s \u6743\u9650":"application credentials and %s permission",\u672A\u77E5:"unknown"," \u6267\u884C\u7ED3\u679C\u53EF\u80FD\u672A\u77E5\uFF0C\u8BF7\u5148\u68C0\u67E5%s\u72B6\u6001\u518D\u8003\u8651\u91CD\u8BD5\u3002":" Execution outcome may be unknown; check %s status before retrying.","API \u8BF7\u6C42\u88AB\u62D2\u7EDD\uFF08HTTP %s\uFF09\uFF0C\u8BF7\u68C0\u67E5%s\u3002%s":"API request rejected (HTTP %s). Check %s.%s","\u8BF7\u6C42\u5931\u8D25\u6216\u54CD\u5E94\u65E0\u6548\uFF0C\u6267\u884C\u7ED3\u679C\u672A\u77E5\u3002\u8BF7\u5148\u68C0\u67E5%s\u72B6\u6001\u518D\u8003\u8651\u91CD\u8BD5\u3002":"Request failed or returned an invalid response; execution outcome is unknown. Check %s status before retrying.","\u8BF7\u6C42\u5931\u8D25\u6216\u8FD4\u56DE\u7684 JSON \u65E0\u6548\uFF0C\u8BF7\u68C0\u67E5\u5B9E\u4F8B URL\u3001\u7F51\u7EDC\u548C TLS \u8BC1\u4E66\u3002":"Request failed or returned invalid JSON. Check the instance URL, network and TLS certificate.","API \u8BF7\u6C42\u88AB\u62D2\u7EDD\uFF08code %s\uFF09\uFF0C\u8BF7\u68C0\u67E5%s\u3002":"API request rejected (code %s). Check %s.","CLI \u914D\u7F6E\u5FC5\u987B\u662F\u5F53\u524D\u7528\u6237\u62E5\u6709\u7684\u79C1\u6709\u666E\u901A\u6587\u4EF6\uFF080600\uFF09\u3002":"CLI config must be an owned private regular file (0600).","CLI \u914D\u7F6E\u65E0\u6548\uFF0C\u8BF7\u8FD0\u884C ql-cli login\u3002":"Invalid CLI config. Run ql-cli login.","\u5C1A\u672A\u767B\u5F55\uFF0C\u8BF7\u8FD0\u884C ql-cli login\u3002":"Not logged in. Run ql-cli login.","\u65E0\u6CD5\u8BFB\u53D6 CLI \u914D\u7F6E\uFF0C\u8BF7\u68C0\u67E5\u6587\u4EF6\u6743\u9650\u5E76\u8FD0\u884C ql-cli login\u3002":"Cannot read CLI config. Check file permissions and run ql-cli login.","\u8BF7\u8F93\u5165\u6709\u6548\u7684\u9762\u677F URL\u3002":"A valid panel URL is required.","\u8BF7\u4F7F\u7528\u4E0D\u542B\u51ED\u636E\u3001\u67E5\u8BE2\u53C2\u6570\u6216\u7247\u6BB5\u7684 HTTP(S) \u9762\u677F URL\u3002":"Use an HTTP(S) panel URL without credentials, query or fragment.","\u8FDC\u7A0B\u8BA4\u8BC1\u9700\u8981 HTTPS\uFF1BHTTP \u4EC5\u5141\u8BB8\u56DE\u73AF\u5730\u5740\u3002":"Remote authentication requires HTTPS; HTTP is allowed only for loopback.","\u975E\u4EA4\u4E92\u767B\u5F55\u9700\u8981 QL_CLIENT_ID \u548C QL_CLIENT_SECRET\u3002":"Non-interactive login requires QL_CLIENT_ID and QL_CLIENT_SECRET.","\u767B\u5F55\u5DF2\u53D6\u6D88\u3002":"Login cancelled.","\u51ED\u636E\u4E0D\u80FD\u4E3A\u7A7A\u3002":"Credentials cannot be empty.","\u8BA4\u8BC1\u54CD\u5E94\u65E0\u6548\u3002":"Invalid authentication response.","\u8BF7\u8F93\u5165\u652F\u6301\u8303\u56F4\u5185\u7684\u6574\u6570\u3002":"Expected an integer within the supported range.","\u672A\u77E5\u547D\u4EE4\uFF0C\u8BF7\u8FD0\u884C %s --help\u3002":"Unknown command. Run %s --help.","\u9009\u9879\u672A\u77E5\u6216\u7F3A\u5C11\u9009\u9879\u503C\uFF0C\u8BF7\u8FD0\u884C %s --help\u3002":"Unknown or missing option. Run %s --help.","\u9009\u9879\u91CD\u590D\uFF0C\u8BF7\u8FD0\u884C %s --help\u3002":"Duplicate option. Run %s --help.","\u53C2\u6570\u591A\u4F59\u6216\u7F3A\u5C11\u5FC5\u8981\u53C2\u6570\u3002":"Unexpected argument or missing required argument.","\u7F3A\u5C11 --%s\u3002":"Missing --%s.","--%s \u65E0\u6548\u3002":"Invalid --%s.","CLI \u64CD\u4F5C\u5DF2\u53D6\u6D88\u3002":"CLI operation cancelled.","CLI \u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u672C\u673A\u914D\u7F6E\u548C\u6743\u9650\u3002":"CLI operation failed. Check local configuration and permissions.","\u4EFB\u52A1\u72B6\u6001\u4E0A\u62A5\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u672C\u673A\u9762\u677F\u3002\n":`Task lifecycle reporting failed; check the local panel.
|
|
28
|
+
`,"\u4EFB\u52A1\u7EDF\u8BA1\u4E0A\u62A5\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u672C\u673A\u9762\u677F\u3002\n":`Task statistics reporting failed; check the local panel.
|
|
29
|
+
`,"\u547D\u4EE4\u72B6\u6001\u4E0A\u62A5\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u672C\u673A\u9762\u677F\u3002\n":`Command lifecycle reporting failed; check the local panel.
|
|
30
|
+
`,"\u8BA2\u9605\u540C\u6B65\u5DF2\u5B8C\u6210\uFF0C\u4F46\u901A\u77E5\u53D1\u9001\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u9762\u677F\u901A\u77E5\u8BBE\u7F6E\u3002\n":`Subscription synchronized, but notification delivery failed. Check panel notification settings.
|
|
31
|
+
`,"\n## \u6267\u884C\u7ED3\u675F... %s \u9000\u51FA\u7801 %s\n":`
|
|
32
|
+
## Finished... %s exit code %s
|
|
33
|
+
`,"\u4EFB\u52A1\u968F\u673A\u5EF6\u8FDF %s \u79D2\uFF0C\u5C06\u4E8E %s \u5F00\u59CB\uFF0C\u914D\u7F6E\u6587\u4EF6\u53C2\u6570 RandomDelay \u7F6E\u7A7A\u53EF\u53D6\u6D88\u5EF6\u8FDF\n":`Task delayed %s seconds, will start at %s. Set RandomDelay to empty to cancel delay
|
|
34
|
+
`,"\u5F00\u59CB\u6267\u884C...\n":`Starting execution...
|
|
35
|
+
`,\u5DF2\u505C\u6B62:"Stopped",\u5B8C\u6210:"Completed","\u5931\u8D25(\u9000\u51FA\u7801 %s)":"Failed (exit code %s)","\u5B89\u88C5 %s \u4F9D\u8D56\u5305...\n":`Installing %s dependencies...
|
|
36
|
+
`,"\u5F00\u59CB\u62C9\u53D6\u4ED3\u5E93 %s \u5230 %s\n":`Cloning repository %s to %s
|
|
37
|
+
`,\u6DFB\u52A0\u6210\u529F:"Added successfully","\u6DFB\u52A0\u5931\u8D25(%s)":"Add failed (%s)",\u66F4\u65B0\u6210\u529F:"Updated successfully","\u66F4\u65B0\u5931\u8D25(%s)":"Update failed (%s)",\u6210\u529F:"Success","\u5931\u8D25(%s)":"Failed (%s)","\u901A\u77E5\u53D1\u9001\u6210\u529F\u{1F389}":"Notification sent successfully \u{1F389}","\u901A\u77E5\u5931\u8D25(%s)":"Notification failed (%s)","\u5F53\u524D\u6709\u4EE5\u4E0B\u811A\u672C\u53EF\u4EE5\u8FD0\u884C:":"Available scripts:",\u6682\u65E0\u811A\u672C\u53EF\u4EE5\u6267\u884C:"No scripts available","\u8B66\u544A\uFF1A\u5DE5\u4F5C\u76EE\u5F55\u4E0D\u5B58\u5728 %s":"Warning: working directory does not exist: %s","\n\u7F3A\u5C11\u5E76\u53D1\u8FD0\u884C\u7684\u73AF\u5883\u53D8\u91CF\u53C2\u6570":`
|
|
38
|
+
Missing concurrency environment variable`,"\n\u7F3A\u5C11\u5355\u72EC\u8FD0\u884C\u7684\u53C2\u6570 task xxx.js desi Test":`
|
|
39
|
+
Missing parameter: task xxx.js desi Test`,"\u6682\u4E0D\u652F\u6301\u6B64\u7CFB\u7EDF %s":"Unsupported system: %s","\u68C0\u6D4B\u5230 pm2 \u670D\u52A1\u6B63\u5728\u8FD0\u884C":"pm2 service is running","npm \u6A21\u5757\u4F4D\u7F6E: %s":"npm module location: %s","\u5BFC\u5165\u6570\u636E\u6210\u529F %s":"Data imported successfully: %s","\u5BFC\u51FA\u6570\u636E\u6210\u529F %s":"Data exported successfully: %s","\u5F53\u524D\u7248\u672C: %s / \u6700\u65B0\u7248\u672C: %s":"Current: %s / Latest: %s",\u5DF2\u662F\u6700\u65B0\u7248\u672C:"Already up to date","%s \u4E2A\u5B9A\u65F6\u4EFB\u52A1\u6B63\u5728\u8FD0\u884C":"%s scheduled tasks running","\u6267\u884C\u524D\u7F6E\u547D\u4EE4\n":`Running pre-command
|
|
40
|
+
`,"\n\u6267\u884C\u524D\u7F6E\u547D\u4EE4\u7ED3\u675F\n":`
|
|
41
|
+
Pre-command finished
|
|
42
|
+
`,"\n\u6267\u884C\u540E\u7F6E\u547D\u4EE4\n":`
|
|
43
|
+
Running post-command
|
|
44
|
+
`,"\n\u6267\u884C\u540E\u7F6E\u547D\u4EE4\u7ED3\u675F":`
|
|
45
|
+
Post-command finished`,"\u8B66\u544A: PM2 \u542F\u52A8\u5931\u8D25 (\u9000\u51FA\u7801: %s)\uFF0C\u53EF\u80FD\u662F\u7531\u4E8E\u786C\u4EF6\u4E0D\u517C\u5BB9":"Warning: PM2 start failed (exit code: %s), possibly due to hardware incompatibility","\u6B63\u5728\u5C1D\u8BD5\u76F4\u63A5\u4F7F\u7528 Node.js \u542F\u52A8\u670D\u52A1...":"Attempting to start service with Node.js directly...","\u5DF2\u4F7F\u7528 Node.js \u76F4\u63A5\u542F\u52A8\u670D\u52A1 (PID: %s)":"Service started with Node.js directly (PID: %s)","\u6CE8\u610F: \u4F7F\u7528\u6B64\u6A21\u5F0F\u65F6\uFF0C\u90E8\u5206 PM2 \u7BA1\u7406\u529F\u80FD\u5C06\u4E0D\u53EF\u7528":"Note: some PM2 management features are unavailable in this mode","## \u5F00\u59CB\u6267\u884C... %s\n":`## Starting... %s
|
|
46
|
+
`,"\n## \u5DF2\u505C\u6B62 \u{1F6D1}... %s \u8017\u65F6 %s \u79D2%s":`
|
|
47
|
+
## Stopped \u{1F6D1}... %s took %s seconds%s`,"\n## \u5B8C\u6210 \u2705... %s \u8017\u65F6 %s \u79D2%s":`
|
|
48
|
+
## Completed \u2705... %s took %s seconds%s`,"\n## \u5931\u8D25 \u274C(\u9000\u51FA\u7801 %s)... %s \u8017\u65F6 %s \u79D2%s":`
|
|
49
|
+
## Failed \u274C(exit code %s)... %s took %s seconds%s`,"%s -> \u6DFB\u52A0\u6210\u529F":"%s -> Added successfully","%s -> \u6DFB\u52A0\u5931\u8D25(%s)":"%s -> Add failed (%s)","%s -> \u66F4\u65B0\u6210\u529F":"%s -> Updated successfully","%s -> \u66F4\u65B0\u5931\u8D25(%s)":"%s -> Update failed (%s)","%s\u6210\u529F\u{1F389}":"%s succeeded \u{1F389}","%s\u5931\u8D25(%s)":"%s failed (%s)","\u68C0\u6D4B\u5230\u6709%s\u7684\u5B9A\u65F6\u4EFB\u52A1:":"Found %s scheduled tasks:","\n\u5F00\u59CB\u5C1D\u8BD5\u81EA\u52A8\u5220\u9664\u5931\u6548\u7684\u5B9A\u65F6\u4EFB\u52A1...":`
|
|
50
|
+
Attempting to remove invalid scheduled tasks...`,"\n\u5F00\u59CB\u5C1D\u8BD5\u81EA\u52A8\u6DFB\u52A0\u5B9A\u65F6\u4EFB\u52A1...":`
|
|
51
|
+
Attempting to add scheduled tasks...`,"\u62C9\u53D6 %s \u6210\u529F...\n":`Pull %s succeeded...
|
|
52
|
+
`,"\u62C9\u53D6 %s \u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u65E5\u5FD7...\n":`Pull %s failed, check logs...
|
|
53
|
+
`,"\u5F00\u59CB\u4E0B\u8F7D\uFF1A%s \u4FDD\u5B58\u8DEF\u5F84\uFF1A%s\n":`Downloading: %s to: %s
|
|
54
|
+
`,"\u4E0B\u8F7D %s \u6210\u529F...\n":`Download %s succeeded...
|
|
55
|
+
`,"\u4E0B\u8F7D %s \u5931\u8D25\uFF0C\u4FDD\u7559\u4E4B\u524D\u6B63\u5E38\u4E0B\u8F7D\u7684\u7248\u672C...\n":`Download %s failed, keeping previous version...
|
|
56
|
+
`,"%s\u6587\u4EF6\u4E0D\u5B58\u5728\uFF0C\u8DF3\u8FC7\u6267\u884C...\n":`%s does not exist, skipping...
|
|
57
|
+
`,"\u4F7F\u7528 %s \u6E90\u66F4\u65B0...\n":`Updating using %s mirror...
|
|
58
|
+
`,"\u66F4\u65B0\u9752\u9F99\u6E90\u6587\u4EF6\u6210\u529F...\n":`Qinglong source updated successfully
|
|
59
|
+
`,"\u66F4\u65B0\u9752\u9F99\u6E90\u6587\u4EF6\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC...\n":`Qinglong source update failed, check network
|
|
60
|
+
`,"\u66F4\u65B0\u9752\u9F99\u9759\u6001\u8D44\u6E90\u6210\u529F...\n":`Static assets updated successfully
|
|
61
|
+
`,"\u66F4\u65B0\u9752\u9F99\u9759\u6001\u8D44\u6E90\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC...\n":`Static assets update failed, check network
|
|
62
|
+
`,"\n\u5F00\u59CB\u68C0\u6D4B\u4F9D\u8D56...\n":`
|
|
63
|
+
Checking dependencies...
|
|
64
|
+
`,"\n\u4F9D\u8D56\u68C0\u6D4B\u5B89\u88C5\u6210\u529F...\n":`
|
|
65
|
+
Dependencies installed successfully
|
|
66
|
+
`,"\u66F4\u65B0\u5305\u4E0B\u8F7D\u6210\u529F...\n":`Package download succeeded
|
|
67
|
+
`,"\n\u4F9D\u8D56\u68C0\u6D4B\u5B89\u88C5\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC...\n":`
|
|
68
|
+
Dependency installation failed, check network
|
|
69
|
+
`,"\n1\u3001\u5B89\u88C5bot\u4F9D\u8D56...\n":`
|
|
70
|
+
1. Installing bot dependencies...
|
|
71
|
+
`,"\nbot\u4F9D\u8D56\u5B89\u88C5\u6210\u529F...\n":`
|
|
72
|
+
Bot dependencies installed
|
|
73
|
+
`,"2\u3001\u4E0B\u8F7Dbot\u6240\u9700\u6587\u4EF6...\n":`2. Downloading bot files...
|
|
74
|
+
`,"\nbot\u6587\u4EF6\u4E0B\u8F7D\u6210\u529F...\n":`
|
|
75
|
+
Bot files downloaded
|
|
76
|
+
`,"3\u3001\u5B89\u88C5python3\u4F9D\u8D56...\n":`3. Installing python3 dependencies...
|
|
77
|
+
`,"\npython3\u4F9D\u8D56\u5B89\u88C5\u6210\u529F...\n":`
|
|
78
|
+
Python3 dependencies installed
|
|
79
|
+
`,"4\u3001\u542F\u52A8bot\u7A0B\u5E8F...\n":`4. Starting bot...
|
|
80
|
+
`,"bot\u542F\u52A8\u6210\u529F...\n":`Bot started successfully
|
|
81
|
+
`,"---> 1. \u5F00\u59CB\u68C0\u6D4B\u914D\u7F6E\u6587\u4EF6\n":`---> 1. Checking config...
|
|
82
|
+
`,"---> \u914D\u7F6E\u6587\u4EF6\u68C0\u6D4B\u5B8C\u6210\n":`---> Config check complete
|
|
83
|
+
`,"---> 2. \u5F00\u59CB\u5B89\u88C5\u9752\u9F99\u4F9D\u8D56\n":`---> 2. Installing qinglong dependencies...
|
|
84
|
+
`,"---> \u9752\u9F99\u4F9D\u8D56\u5B89\u88C5\u5B8C\u6210\n":`---> Dependencies installed
|
|
85
|
+
`,"---> \u811A\u672C\u4F9D\u8D56\u5B89\u88C5\u5B8C\u6210\n":`---> Script dependencies installed
|
|
86
|
+
`,"---> 1. \u590D\u5236\u901A\u77E5\u6587\u4EF6\n":`---> 1. Copying notification files...
|
|
87
|
+
`,"---> \u590D\u5236\u4E00\u4EFD %s \u4E3A %s\n":`---> Copying %s to %s
|
|
88
|
+
`,"---> \u901A\u77E5\u6587\u4EF6\u590D\u5236\u5B8C\u6210\n":`---> Notification files copied
|
|
89
|
+
`,"---> pm2\u65E5\u5FD7":"---> pm2 log","\n=====> \u68C0\u6D4B\u9762\u677F":`
|
|
90
|
+
=====> Checking panel`,"=====> \u9762\u677F\u670D\u52A1\u542F\u52A8\u6B63\u5E38\n":`=====> Panel service running normally
|
|
91
|
+
`,"\n=====> \u68C0\u6D4B\u540E\u53F0":`
|
|
92
|
+
=====> Checking backend`,"=====> \u540E\u53F0\u670D\u52A1\u542F\u52A8\u6B63\u5E38\n":`=====> Backend service running normally
|
|
93
|
+
`,"=====> \u5F00\u59CB\u68C0\u6D4B":"=====> Starting check","\n=====> \u68C0\u6D4B\u7ED3\u675F\n":`
|
|
94
|
+
=====> Check complete
|
|
95
|
+
`,"\u67E5\u8BE2\u6587\u4EF6 %s":"Checking file: %s","\u5220\u9664\u4E2D~":"Deleting...","\u6B63\u5728\u88AB %s \u4F7F\u7528\uFF0C\u8DF3\u8FC7~":"In use by %s, skipping...","\u67E5\u627E\u65E7\u65E5\u5FD7\u6587\u4EF6\u4E2D...\n":`Looking for old log files...
|
|
96
|
+
`,"\u5220\u9664\u65E7\u65E5\u5FD7\u6267\u884C\u5B8C\u6BD5\n":`Old log cleanup complete
|
|
97
|
+
`,"\u672A\u627E\u5230 qinglong \u6A21\u5757\uFF0C\u8BF7\u5148\u6267\u884C npm i -g @whyour/qinglong \u5B89\u88C5":"Module not found. Run: npm i -g @whyour/qinglong","\u8BF7\u5148\u624B\u52A8\u8BBE\u7F6E export QL_DIR=%s\uFF0C\u73AF\u5883\u53D8\u91CF\uFF0C\u5E76\u624B\u52A8\u6DFB\u52A0\u5230\u7CFB\u7EDF\u73AF\u5883\u53D8\u91CF\uFF0C\u7136\u540E\u518D\u6B21\u6267\u884C\u547D\u4EE4 qinglong \u542F\u52A8\u670D\u52A1":"Set env: export QL_DIR=%s, then run qinglong to start","\u8BF7\u5148\u624B\u52A8\u8BBE\u7F6E\u6570\u636E\u5B58\u50A8\u76EE\u5F55 export QL_DATA_DIR \u73AF\u5883\u53D8\u91CF\uFF0C\u76EE\u5F55\u5FC5\u987B\u4EE5\u659C\u6760\u5F00\u5934\u7684\u7EDD\u5BF9\u8DEF\u5F84\uFF0C\u5E76\u4E14\u4EE5 /data \u7ED3\u5C3E\uFF0C\u4F8B\u5982 /ql/data \u5E76\u624B\u52A8\u6DFB\u52A0\u5230\u7CFB\u7EDF\u73AF\u5883\u53D8\u91CF":"Set QL_DATA_DIR (absolute path ending with /data, e.g. /ql/data)","QL_DATA_DIR \u5FC5\u987B\u4EE5 /data \u7ED3\u5C3E\uFF0C\u4F8B\u5982 /ql/data\uFF0C\u5982\u679C\u6709\u5386\u53F2\u6570\u636E\uFF0C\u8BF7\u65B0\u5EFA data \u76EE\u5F55\uFF0C\u628A\u5386\u53F2\u6570\u636E\u653E\u5230 data \u76EE\u5F55\u4E2D":"QL_DATA_DIR must end with /data, e.g. /ql/data","\u6682\u4E0D\u652F\u6301\u6B64\u7CFB\u7EDF\u90E8\u7F72 %s":"Unsupported system for deployment: %s","\u547D\u4EE4\u8F93\u5165\u9519\u8BEF...\n":`Invalid command...
|
|
98
|
+
`}});function m(o,e,...t){let n=o.QL_LANG==="en"?De[e]??e:e,s=0;return n.replace(/%%|%s/g,i=>i==="%%"?"%":String(t[s++]??""))}var A=g(()=>{"use strict";qe()});function q(o){return new D(o).helpOption(!1).addHelpCommand(!1).exitOverride().configureOutput({writeOut(){},writeErr(){}})}function W(o,e,t=!0){let n=new Set;for(let[s,i]of Object.entries(e)){let r=new R(`${i.short?`-${i.short}, `:""}--${s}${i.type==="string"?" <value>":""}`,i.description);r.negate=!1,i.default!==void 0&&r.default(i.default),o.addOption(r),o.on(`option:${r.name()}`,()=>{t&&n.has(s)&&h(m(process.env,"\u9009\u9879\u91CD\u590D\uFF0C\u8BF7\u8FD0\u884C %s --help\u3002","ql"),2),n.add(s)})}}function ee(o,e){let t=o.opts(),n={};for(let s of Object.keys(e)){let i=o.options.find(r=>r.long===`--${s}`);t[i.attributeName()]!==void 0&&(n[s]=t[i.attributeName()])}return n}function He(o,e,t=!1){for(let n=0;n<o.length;n++){let s=o[n];if(s==="--")break;if(!s.startsWith("-")||s==="-"){if(t)break;continue}let i=!1;if(s.startsWith("--"))s.includes("=")||(i=e[s.slice(2)]?.type==="string");else for(let r=1;r<s.length;r++){let a=Object.values(e).find(p=>p.short===s[r]);if(!a)break;if(a.type==="string"){i=r===s.length-1;break}}if(i){let r=o[++n];if(r===void 0||r.length>1&&r.startsWith("-"))throw new x(2,"commander.optionMissingArgument","Missing option value")}}}function Ge(o){return o instanceof x}var _e=g(()=>{"use strict";Ne();S();A()});function M(o,e=process.env){return e.QL_LANG!=="en"&&/^(GET|POST|PUT|DELETE) \/open\//.test(o)?`\u8FDC\u7A0B API\uFF1A${o}`:e.QL_LANG==="en"?o:de[o]??o}var de,It,Ve=g(()=>{"use strict";de={"Query object as JSON, @file or - for stdin":"\u67E5\u8BE2\u53C2\u6570 JSON\uFF1B\u652F\u6301 @\u6587\u4EF6\u6216 - \u4ECE stdin \u8BFB\u53D6","Request body as JSON, @file or - for stdin":"\u8BF7\u6C42\u4F53 JSON\uFF1B\u652F\u6301 @\u6587\u4EF6\u6216 - \u4ECE stdin \u8BFB\u53D6","Request timeout in seconds":"\u8BF7\u6C42\u8D85\u65F6\u79D2\u6570\uFF08\u9ED8\u8BA4 30\uFF0C\u6700\u591A 3600\uFF09","Local file to upload":"\u8981\u4E0A\u4F20\u7684\u672C\u673A\u6587\u4EF6","Save response to a new local file":"\u54CD\u5E94\u4FDD\u5B58\u5230\u65B0\u6587\u4EF6\uFF08\u4E0D\u8986\u76D6\u5DF2\u6709\u6587\u4EF6\uFF09","Resource name":"\u8D44\u6E90\u540D\u79F0","Command executed by the remote panel":"\u7531\u8FDC\u7A0B\u9762\u677F\u6267\u884C\u7684\u547D\u4EE4","Cron schedule":"\u5B9A\u65F6\u89C4\u5219","Comma-separated application permissions":"\u5E94\u7528\u6743\u9650\uFF0C\u7528\u9017\u53F7\u5206\u9694","Explicitly include application credentials in output":"\u663E\u5F0F\u8F93\u51FA\u5E94\u7528\u5BC6\u94A5\uFF08\u9ED8\u8BA4\u9690\u85CF\uFF09","Call a registered OpenAPI route":"\u8C03\u7528\u5DF2\u767B\u8BB0\u7684 OpenAPI \u8DEF\u7531","List supported OpenAPI routes and commands":"\u5217\u51FA\u652F\u6301\u7684 OpenAPI \u8DEF\u7531\u548C\u5BF9\u5E94\u547D\u4EE4","Subscription type":"\u8BA2\u9605\u7C7B\u578B\uFF1Apublic-repo/private-repo/file","Subscription url":"\u8BA2\u9605\u5730\u5740","Subscription alias":"\u8BA2\u9605\u522B\u540D","Subscription schedule":"\u8BA2\u9605\u5B9A\u65F6\u89C4\u5219","Subscription schedule-type":"\u8BA2\u9605\u5B9A\u65F6\u7C7B\u578B\uFF1Acrontab/interval","Subscription branch":"\u8BA2\u9605\u5206\u652F","Subscription whitelist":"\u8BA2\u9605\u5305\u542B\u89C4\u5219","Subscription blacklist":"\u8BA2\u9605\u6392\u9664\u89C4\u5219","Skip OS boot registration (for containers)":"\u8DF3\u8FC7\u7CFB\u7EDF\u5F00\u673A\u6CE8\u518C\uFF08\u7528\u4E8E\u5BB9\u5668\uFF09","Authenticate with a remote panel application":"\u4F7F\u7528\u8FDC\u7A0B\u9762\u677F\u5E94\u7528\u51ED\u636E\u767B\u5F55","Panel URL including optional base path":"\u9762\u677F\u5730\u5740\uFF0C\u53EF\u5305\u542B\u57FA\u7840\u8DEF\u5F84","Verify authentication and resource permission":"\u68C0\u67E5\u767B\u5F55\u72B6\u6001\u548C\u8D44\u6E90\u6743\u9650","Permission to check":"\u8981\u68C0\u67E5\u7684\u6743\u9650","Remove local credentials (does not revoke the server token)":"\u6E05\u9664\u672C\u673A\u51ED\u636E\uFF08\u4E0D\u4F1A\u64A4\u9500\u670D\u52A1\u7AEF\u4EE4\u724C\uFF09","List remote tasks":"\u5217\u51FA\u8FDC\u7A0B\u4EFB\u52A1","Search task name or command":"\u6309\u4EFB\u52A1\u540D\u79F0\u6216\u547D\u4EE4\u641C\u7D22","Page number":"\u9875\u7801","Page size":"\u6BCF\u9875\u6570\u91CF","Read the latest task log":"\u8BFB\u53D6\u6700\u65B0\u4EFB\u52A1\u65E5\u5FD7","Last N lines":"\u6700\u540E N \u884C","List panel subscriptions":"\u5217\u51FA\u9762\u677F\u8BA2\u9605","Search subscriptions":"\u641C\u7D22\u8BA2\u9605","Read latest subscription log":"\u8BFB\u53D6\u6700\u65B0\u8BA2\u9605\u65E5\u5FD7","Remove expired logs not referenced by a task":"\u5220\u9664\u8FC7\u671F\u4E14\u672A\u88AB\u4EFB\u52A1\u5F15\u7528\u7684\u65E5\u5FD7","Execute the user extra.sh hook":"\u6267\u884C\u7528\u6237\u7684 extra.sh \u94A9\u5B50","Restore missing configuration templates and runtime directories":"\u6062\u590D\u7F3A\u5931\u7684\u914D\u7F6E\u6A21\u677F\u548C\u8FD0\u884C\u76EE\u5F55","Install runtime dependencies, repair files, diagnose and reload services":"\u5B89\u88C5\u8FD0\u884C\u4F9D\u8D56\u3001\u4FEE\u590D\u6587\u4EF6\u3001\u8BCA\u65AD\u5E76\u91CD\u8F7D\u670D\u52A1","Install dependencies and start the optional local Telegram bot":"\u5B89\u88C5\u4F9D\u8D56\u5E76\u542F\u52A8\u53EF\u9009\u7684\u672C\u673A Telegram \u673A\u5668\u4EBA","Install runtime prerequisites and start nginx and panel services":"\u5B89\u88C5\u8FD0\u884C\u73AF\u5883\u5E76\u542F\u52A8 nginx \u548C\u9762\u677F\u670D\u52A1","Restart services without installing packages or starting optional hooks":"\u91CD\u542F\u670D\u52A1\uFF0C\u8DF3\u8FC7\u4F9D\u8D56\u5B89\u88C5\u548C\u53EF\u9009\u94A9\u5B50","Restart local services or apply staged system/data files":"\u91CD\u542F\u672C\u673A\u670D\u52A1\u6216\u5E94\u7528\u5DF2\u51C6\u5907\u7684\u7CFB\u7EDF\uFF0F\u6570\u636E\u6587\u4EF6","Reload target":"\u91CD\u8F7D\u76EE\u6807","Stage and apply a local panel upgrade":"\u51C6\u5907\u5E76\u5E94\u7528\u672C\u673A\u9762\u677F\u5347\u7EA7","Archive source":"\u5347\u7EA7\u5305\u6765\u6E90","Prepare upgrade without replacing files or restarting services":"\u4EC5\u51C6\u5907\u5347\u7EA7\u5305\uFF0C\u4E0D\u66FF\u6362\u6587\u4EF6\u6216\u91CD\u542F\u670D\u52A1","One JSON result on stdout; diagnostics on stderr":"\u6807\u51C6\u8F93\u51FA\u8FD4\u56DE\u4E00\u4E2A JSON \u7ED3\u679C\uFF0C\u8BCA\u65AD\u5199\u5165\u6807\u51C6\u9519\u8BEF","Show help":"\u663E\u793A\u5E2E\u52A9","Installed panel root (defaults to QL_DIR)":"\u5DF2\u5B89\u88C5\u9762\u677F\u7684\u6839\u76EE\u5F55\uFF08\u9ED8\u8BA4 QL_DIR\uFF09","Panel data directory (defaults to QL_DATA_DIR)":"\u9762\u677F\u6570\u636E\u76EE\u5F55\uFF08\u9ED8\u8BA4 QL_DATA_DIR\uFF09","Usage:":"\u7528\u6CD5\uFF1A","Options:":"\u9009\u9879\uFF1A","default:":"\u9ED8\u8BA4\uFF1A","Alias: login = auth login.":"\u522B\u540D\uFF1Alogin = auth login\u3002","Local operator commands require an installed panel.":"\u672C\u673A\u8FD0\u7EF4\u547D\u4EE4\u9700\u8981\u5DF2\u5B89\u88C5\u7684\u9762\u677F\u3002"},It={get:"\u67E5\u770B",run:"\u8FD0\u884C",stop:"\u505C\u6B62",enable:"\u542F\u7528",disable:"\u7981\u7528"};for(let[o,e]of Object.entries(It))de[`${o} a remote task by ID`]=`\u6309 ID ${e}\u8FDC\u7A0B\u4EFB\u52A1`,de[`${o} a panel subscription by ID`]=`\u6309 ID ${e}\u9762\u677F\u8BA2\u9605`;for(let[o,e]of Object.entries({resetlet:"\u6E05\u9664\u767B\u5F55\u9650\u5236",resettfa:"\u5173\u95ED\u53CC\u56E0\u7D20\u8BA4\u8BC1",resetpwd:"\u91CD\u7F6E\u5BC6\u7801",resetname:"\u91CD\u7F6E\u7528\u6237\u540D"}))de[`Local panel ${o}`]=`\u672C\u673A\u9762\u677F\uFF1A${e}`});function Fe(o,e,t){let{commands:n,surface:s}=o,i=e?[e]:n.filter(u=>(s==="local"?u.local:!u.local)&&(!t||u.name.startsWith(`${t} `))),r=u=>s==="local"?u.replace(/^local /,""):u,a=q(e?`ql ${r(e.name)}`:`ql${t?" "+t:""}`);if(a.description("QingLong 2.x CLI"),e)e.arguments&&a.arguments(e.arguments),a.description(M(e.summary));else for(let u of i){let l=q(r(u.name)).description(M(u.summary));u.arguments&&l.arguments(u.arguments),a.addCommand(l)}let p={...I,...o.options,...e?.options};return W(a,Object.fromEntries(Object.entries(p).map(([u,l])=>[u,{...l,description:M(l.description)}]))),a.helpInformation().replace(/^Usage:/m,M("Usage:")).replace(/^Options:/m,M("Options:")).replace(/^Commands:/m,process.env.QL_LANG==="en"?"Commands:":"\u547D\u4EE4\uFF1A")}var I,We=g(()=>{"use strict";Ve();_e();I={json:{type:"boolean",description:"One JSON result on stdout; diagnostics on stderr"},help:{type:"boolean",short:"h",description:"Show help"}}});function H(o,e=1,t=Number.MAX_SAFE_INTEGER){return(!/^\d+$/.test(o)||!Number.isSafeInteger(Number(o))||Number(o)<e||Number(o)>t)&&h(m(process.env,"\u8BF7\u8F93\u5165\u652F\u6301\u8303\u56F4\u5185\u7684\u6574\u6570\u3002"),2),Number(o)}function Me(o,e){let{commands:t,aliases:n,surface:s,options:i}=e,r="ql",a=[...o],p=0;for(;a[p]==="--json";)p++;a[p]&&Object.hasOwn(n,a[p])&&a.splice(p,1,...n[a[p]]),a[p]==="help"&&a.splice(p,1,"--help");let u=q("ql").enablePositionalOptions();u.action(()=>{}),W(u,I);let l,d,c={},_=[],w=new Map;for(let y of t.filter(C=>s==="local"?C.local:!C.local)){let[C,fe]=y.name.split(" ");if(!w.has(C)){let L=q(C).enablePositionalOptions();W(L,I),L.action(()=>{d=C,c=ee(L,I)}),u.addCommand(L),w.set(C,L)}let ke={...I,...y.local?i:{},...y.options},B=q(fe).argument("[arguments...]");W(B,ke),B.action(()=>{l=y,d=C,c=ee(B,ke),_=B.args;let L=ee(w.get(C),I);for(let J of["json","help"])L[J]&&c[J]&&h(m(process.env,"\u9009\u9879\u91CD\u590D\uFF0C\u8BF7\u8FD0\u884C %s --help\u3002",r),2),L[J]&&(c[J]=L[J])}),w.get(C).addCommand(B)}try{He(a,Object.assign({},I,...t.map(y=>y.options))),u.parse(a,{from:"user"})}catch(y){if(!Ge(y))throw y;let C=y.code,fe=C==="commander.unknownCommand"||C==="commander.excessArguments"&&!l;h(m(process.env,fe?"\u672A\u77E5\u547D\u4EE4\uFF0C\u8BF7\u8FD0\u884C %s --help\u3002":"\u9009\u9879\u672A\u77E5\u6216\u7F3A\u5C11\u9009\u9879\u503C\uFF0C\u8BF7\u8FD0\u884C %s --help\u3002",r),2)}let he=ee(u,I);for(let y of["json","help"])he[y]&&c[y]&&h(m(process.env,"\u9009\u9879\u91CD\u590D\uFF0C\u8BF7\u8FD0\u884C %s --help\u3002",r),2),he[y]&&(c[y]=he[y]);let Ot=!l,wt={...I,...l?.local?i:{},...l?.options},Q={name:l?.name??"help",positionals:_,values:c,json:c.json===!0};if(Ot||c.help)return{...Q,help:Fe(e,l,d)};(Q.positionals.length<(l?.minimum??0)||Q.positionals.length>(l?.maximum??0))&&h(m(process.env,"\u53C2\u6570\u591A\u4F59\u6216\u7F3A\u5C11\u5FC5\u8981\u53C2\u6570\u3002"),2);for(let[y,C]of Object.entries(wt))C.required&&!c[y]&&h(m(process.env,"\u7F3A\u5C11 --%s\u3002",y),2),C.choices&&!C.choices.includes(c[y])&&h(m(process.env,"--%s \u65E0\u6548\u3002",y),2),C.integer&&typeof c[y]=="string"&&H(c[y],C.integer.min,C.integer.max);return e.validate?.(Q),Q}var ce=g(()=>{"use strict";_e();S();A();We()});async function Xe(o,e){let t=(0,Ye.resolve)(e),n=await(0,pe.open)(t,"wx",384);try{if(!o.body)throw new Error("Missing response body");let s=n.createWriteStream();return await(0,ze.pipeline)(Ke.Readable.fromWeb(o.body),s),{code:200,data:{path:t,bytes:s.bytesWritten}}}catch(s){throw await(0,pe.unlink)(t).catch(()=>{}),s}finally{await n.close()}}var pe,ze,Ke,Ye,Ze=g(()=>{"use strict";pe=require("node:fs/promises"),ze=require("node:stream/promises"),Ke=require("node:stream"),Ye=require("node:path")});function O(o){return o!==null&&typeof o=="object"&&!Array.isArray(o)}var Ce=g(()=>{"use strict"});async function T(o,e,t={}){let{method:n="GET",body:s,authenticated:i=!0}=t,r=e.split(/[/?]/,1)[0],a=r==="subscriptions",p=r==="crons"||a?m(process.env,a?"\u8BA2\u9605":"\u4EFB\u52A1"):r,u=i?m(process.env,"\u5E94\u7528\u51ED\u636E\u548C %s \u6743\u9650",r):m(process.env,"\u5E94\u7528\u51ED\u636E"),l,d;try{if(l=await fetch(`${o.url}/open/${e}`,{method:n,redirect:"error",signal:AbortSignal.timeout(t.timeoutMs??3e4),headers:{...i?{Authorization:`Bearer ${o.token}`}:{},...s!==void 0&&!(s instanceof FormData)?{"Content-Type":"application/json"}:{}},body:s instanceof FormData?s:s!==void 0?JSON.stringify(s):void 0}),!l.ok){await l.body?.cancel();let c=n!=="GET"&&l.status>=500?m(process.env," \u6267\u884C\u7ED3\u679C\u53EF\u80FD\u672A\u77E5\uFF0C\u8BF7\u5148\u68C0\u67E5%s\u72B6\u6001\u518D\u8003\u8651\u91CD\u8BD5\u3002",p):"";h(m(process.env,"API \u8BF7\u6C42\u88AB\u62D2\u7EDD\uFF08HTTP %s\uFF09\uFF0C\u8BF7\u68C0\u67E5%s\u3002%s",l.status,u,c),[401,403].includes(l.status)?3:1)}if(t.output&&(l.headers.get("content-disposition")?.startsWith("attachment")||!l.headers.get("content-type")?.includes("application/json")))return await Xe(l,t.output);if(t.text&&!l.headers.get("content-type")?.includes("application/json"))return{code:200,data:await l.text()};d=await l.json()}catch(c){if(c instanceof k)throw c;h(n!=="GET"?m(process.env,"\u8BF7\u6C42\u5931\u8D25\u6216\u54CD\u5E94\u65E0\u6548\uFF0C\u6267\u884C\u7ED3\u679C\u672A\u77E5\u3002\u8BF7\u5148\u68C0\u67E5%s\u72B6\u6001\u518D\u8003\u8651\u91CD\u8BD5\u3002",p):m(process.env,"\u8BF7\u6C42\u5931\u8D25\u6216\u8FD4\u56DE\u7684 JSON \u65E0\u6548\uFF0C\u8BF7\u68C0\u67E5\u5B9E\u4F8B URL\u3001\u7F51\u7EDC\u548C TLS \u8BC1\u4E66\u3002"))}if(e.split("?")[0]==="user/login"&&O(d)&&d.code===420&&h(m(process.env,"\u9700\u8981\u53CC\u56E0\u7D20\u9A8C\u8BC1\uFF0C\u8BF7\u8C03\u7528 user two-factor-login\u3002"),3),!O(d)||d.code!==200){let c=O(d)&&typeof d.code=="number"?d.code:void 0;h(m(process.env,"API \u8BF7\u6C42\u88AB\u62D2\u7EDD\uFF08code %s\uFF09\uFF0C\u8BF7\u68C0\u67E5%s\u3002",c??m(process.env,"\u672A\u77E5"),u),c===401||c===403?3:1)}return t.output&&h(m(process.env,"\u63A5\u53E3\u8FD4\u56DE JSON\uFF0C\u672A\u4FDD\u5B58\u4E0B\u8F7D\u6587\u4EF6\u3002")),d}async function Oe(o){let e=new URLSearchParams({client_id:o.clientId,client_secret:o.clientSecret}),n=(await T(o,`auth/token?${e}`,{authenticated:!1})).data;return(!O(n)||typeof n.token!="string"||!n.token||typeof n.expiration!="number"||!Number.isFinite(n.expiration)||n.expiration<=Date.now()/1e3)&&h(m(process.env,"\u8BA4\u8BC1\u54CD\u5E94\u65E0\u6548\u3002")),{...o,token:n.token,expiration:n.expiration}}var te=g(()=>{"use strict";Ze();A();S();Ce();Ce()});function G(o){let e;try{e=new URL(o)}catch{h(m(process.env,"\u8BF7\u8F93\u5165\u6709\u6548\u7684\u9762\u677F URL\u3002"),2)}return(!["http:","https:"].includes(e.protocol)||e.username||e.password||e.search||e.hash)&&h(m(process.env,"\u8BF7\u4F7F\u7528\u4E0D\u542B\u51ED\u636E\u3001\u67E5\u8BE2\u53C2\u6570\u6216\u7247\u6BB5\u7684 HTTP(S) \u9762\u677F URL\u3002"),2),e.protocol==="http:"&&!["localhost","127.0.0.1","[::1]"].includes(e.hostname)&&h(m(process.env,"\u8FDC\u7A0B\u8BA4\u8BC1\u9700\u8981 HTTPS\uFF1BHTTP \u4EC5\u5141\u8BB8\u56DE\u73AF\u5730\u5740\u3002"),2),e.href.replace(/\/+$/,"")}var ue=g(()=>{"use strict";A();S()});function we(){return me.default.resolve(process.env.QL_CLI_CONFIG||me.default.join(et.default.homedir(),".config/qinglong/cli.json"))}function nt(){let o;try{o=E.default.openSync(we(),E.default.constants.O_RDONLY|E.default.constants.O_NOFOLLOW);let e=E.default.fstatSync(o);(!e.isFile()||e.mode&63||process.getuid&&e.uid!==process.getuid())&&h(m(process.env,"CLI \u914D\u7F6E\u5FC5\u987B\u662F\u5F53\u524D\u7528\u6237\u62E5\u6709\u7684\u79C1\u6709\u666E\u901A\u6587\u4EF6\uFF080600\uFF09\u3002"));let t=JSON.parse(E.default.readFileSync(o,"utf8"));(!t||typeof t!="object")&&h(m(process.env,"CLI \u914D\u7F6E\u65E0\u6548\uFF0C\u8BF7\u8FD0\u884C ql-cli login\u3002"));let n=t;return(typeof n.url!="string"||typeof n.clientId!="string"||!n.clientId.trim()||typeof n.clientSecret!="string"||!n.clientSecret.trim())&&h(m(process.env,"CLI \u914D\u7F6E\u65E0\u6548\uFF0C\u8BF7\u8FD0\u884C ql-cli login\u3002")),{url:G(n.url),clientId:n.clientId,clientSecret:n.clientSecret,token:typeof n.token=="string"?n.token:void 0,expiration:typeof n.expiration=="number"?n.expiration:void 0}}catch(e){if(e.code==="ENOENT"&&h(m(process.env,"\u5C1A\u672A\u767B\u5F55\uFF0C\u8BF7\u8FD0\u884C ql-cli login\u3002"),3),e instanceof k)throw e;return h(m(process.env,"\u65E0\u6CD5\u8BFB\u53D6 CLI \u914D\u7F6E\uFF0C\u8BF7\u68C0\u67E5\u6587\u4EF6\u6743\u9650\u5E76\u8FD0\u884C ql-cli login\u3002"))}finally{o!==void 0&&E.default.closeSync(o)}}function ve(o){let e=we();E.default.mkdirSync(me.default.dirname(e),{recursive:!0,mode:448});let t=`${e}.${(0,tt.randomUUID)()}.tmp`;try{E.default.writeFileSync(t,JSON.stringify(o)+`
|
|
99
|
+
`,{mode:384,flag:"wx"}),E.default.renameSync(t,e)}finally{E.default.rmSync(t,{force:!0})}}function st(){E.default.rmSync(we(),{force:!0})}var E,me,et,tt,it=g(()=>{"use strict";A();E=U(require("node:fs")),me=U(require("node:path")),et=U(require("node:os")),tt=require("node:crypto");S();ue()});var at={};z(at,{auth:()=>Rt,promptCredential:()=>Te,session:()=>$});async function Te(o,e=!1){(!process.stdin.isTTY||!process.stderr.isTTY)&&h(m(process.env,"\u975E\u4EA4\u4E92\u767B\u5F55\u9700\u8981 QL_CLIENT_ID \u548C QL_CLIENT_SECRET\u3002"),2);let t=new rt.Writable({write(s,i,r){e||process.stderr.write(s),r()}}),n=ot.default.createInterface({input:process.stdin,output:t,terminal:!0});process.stderr.write(`${o}: `);try{return await new Promise((s,i)=>{let r=()=>i(new k(m(process.env,"\u767B\u5F55\u5DF2\u53D6\u6D88\u3002"),2));n.once("SIGINT",r),n.once("close",r),n.question("",s)})}finally{n.close(),t.end(),e&&process.stderr.write(`
|
|
100
|
+
`)}}async function $(){if(process.env.QL_ACCESS_TOKEN||process.env.QL_URL)return(!process.env.QL_ACCESS_TOKEN||!process.env.QL_URL)&&h(m(process.env,"QL_URL \u548C QL_ACCESS_TOKEN \u5FC5\u987B\u540C\u65F6\u63D0\u4F9B\u3002"),2),{url:G(process.env.QL_URL),token:process.env.QL_ACCESS_TOKEN,clientId:"",clientSecret:"",expiration:0};let o=nt();if(o.token&&typeof o.expiration=="number"&&Number.isFinite(o.expiration)&&o.expiration>Date.now()/1e3+60)return{...o,token:o.token,expiration:o.expiration};let e=await Oe(o);return ve(e),e}async function Rt(o){if(o.kind==="logout")return st(),{code:200,data:{authenticated:!1,localOnly:!0}};if(o.kind==="login"){let n=G(o.url),s=process.env.QL_CLIENT_ID||await Te(m(process.env,"\u5E94\u7528 ID")),i=process.env.QL_CLIENT_SECRET||await Te(m(process.env,"\u5E94\u7528\u5BC6\u94A5"),!0);(!s.trim()||!i.trim())&&h(m(process.env,"\u51ED\u636E\u4E0D\u80FD\u4E3A\u7A7A\u3002"),2);let r=await Oe({url:n,clientId:s,clientSecret:i});return ve(r),{code:200,data:{authenticated:!0,url:n}}}let e=await $(),t=o.scope??"crons";return await T(e,{crons:"crons?page=1&size=1",configs:"configs/files",dashboard:"dashboard/overview"}[t]??t),{code:200,data:{authenticated:!0,url:e.url,expiration:e.expiration,scopeChecked:t}}}var ot,rt,ne=g(()=>{"use strict";A();ot=U(require("node:readline")),rt=require("node:stream");te();it();ue();S()});var pt={};z(pt,{openCommand:()=>jt});function b(o,e){return h(process.env.QL_LANG==="en"?e:o,2)}async function lt(o){if(typeof o!="string")return;let e=o;try{if(o==="-"){process.stdin.isTTY&&b("\u8BF7\u901A\u8FC7\u7BA1\u9053\u63D0\u4F9B JSON\u3002","Pipe JSON to stdin.");let t=[],n=0;for await(let s of process.stdin){let i=Buffer.from(s);if(n+=i.length,n>50*1024*1024)throw new Error("Too large");t.push(i)}e=Buffer.concat(t).toString("utf8")}else if(o.startsWith("@")){let t=o.slice(1),n=await(0,V.stat)(t);if(!n.isFile()||n.size>50*1024*1024)throw new Error("Invalid input");e=await(0,V.readFile)(t,"utf8")}return JSON.parse(e)}catch{return b("JSON \u8F93\u5165\u65E0\u6548\u6216\u6587\u4EF6\u65E0\u6CD5\u8BFB\u53D6\u3002","Invalid JSON input or unreadable file.")}}function Ut(o,e){let t=j.find(n=>n.method===o&&new RegExp("^"+n.path.replace(/:[A-Za-z]+/g,"[1-9][0-9]*")+"$").test(e));t||b("\u65B9\u6CD5\u6216\u8DEF\u5F84\u4E0D\u5C5E\u4E8E\u5F53\u524D\u652F\u6301\u7684 OpenAPI\u3002","Method/path is not a supported OpenAPI route.");for(let[n,s]of t.path.split("/").entries())s.startsWith(":")&&H(e.split("/")[n]);return t}function xe(o){return Array.isArray(o)?o.map(xe):O(o)?Object.fromEntries(Object.entries(o).filter(([e])=>!["client_secret","tokens"].includes(e)).map(([e,t])=>[e,xe(t)])):o}async function jt(o){if(o.name==="api routes")return{code:200,data:j};let e=o.name==="api request",t=o.values;t.data==="-"&&t.query==="-"&&b("--data \u548C --query \u4E0D\u80FD\u540C\u65F6\u8BFB\u53D6 stdin\u3002","--data and --query cannot both read stdin.");let n=e?o.positionals[1].replace(/^\/open\//,"").replace(/^\//,""):"";e&&(!/^[\w/-]+$/.test(n)||n.includes("//"))&&b("\u8BF7\u4F7F\u7528\u76F8\u5BF9 OpenAPI \u8DEF\u5F84\uFF0C\u67E5\u8BE2\u53C2\u6570\u901A\u8FC7 --query \u63D0\u4F9B\u3002","Use a relative OpenAPI path; pass query parameters with --query.");let s=e?Ut(o.positionals[0].toUpperCase(),n):j.find(d=>d.name===o.name);s||b("\u672A\u77E5 OpenAPI \u547D\u4EE4\u3002","Unknown OpenAPI command.");let i=await lt(t.data),r=await lt(t.query);if(r!==void 0&&!O(r)&&b("--query \u5FC5\u987B\u4E3A JSON \u5BF9\u8C61\u3002","--query must be a JSON object."),!e){n=s.path;for(let[c,_]of(s.params??[]).entries()){let w=H(o.positionals[c]);n=n.replace(`:${_}`,String(w)),s.body==="object-id"&&(i!==void 0&&!O(i)&&b("--data \u5FC5\u987B\u4E3A JSON \u5BF9\u8C61\u3002","--data must be a JSON object."),O(i)&&i.id!==void 0&&i.id!==w&&b("\u8BF7\u6C42\u4F53 ID \u4E0E\u547D\u4EE4 ID \u4E0D\u4E00\u81F4\u3002","Body ID differs from command ID."),i={...i,id:w})}s.body==="ids"&&(i=o.positionals.map(c=>H(c)));for(let c of["name","command","schedule","type","url","alias","schedule-type","branch","whitelist","blacklist","scopes"]){if(t[c]===void 0)continue;i!==void 0&&!O(i)&&b("--data \u5FC5\u987B\u4E3A JSON \u5BF9\u8C61\u3002","--data must be a JSON object.");let _=c.replace(/-/g,"_");O(i)&&Object.hasOwn(i,_)&&b("\u5B57\u6BB5\u4E0D\u80FD\u540C\u65F6\u901A\u8FC7 --data \u548C\u9009\u9879\u63D0\u4F9B\u3002","Do not provide a field in both --data and flags."),i={...i,[_]:c==="scopes"?String(t[c]).split(",").map(w=>w.trim()).filter(Boolean):t[c]}}({"task create":["command","schedule"],"task update":["command","schedule"],"subscription create":["type","url","alias","schedule_type"],"subscription update":["type","url","alias"]}[s.name]??[]).some(c=>!O(i)||typeof i[c]!="string"||!i[c])&&b("\u7F3A\u5C11\u5FC5\u9700\u5B57\u6BB5\uFF0C\u8BF7\u67E5\u770B\u547D\u4EE4\u5E2E\u52A9\u548C OpenAPI \u53C2\u8003\u3002","Missing required fields; see command help and OpenAPI reference.")}if(s.method==="GET"&&i!==void 0&&b("GET \u4E0D\u63A5\u53D7\u8BF7\u6C42\u4F53\u3002","GET does not accept a body."),s.body&&i===void 0&&!t.file&&b("\u6B64\u547D\u4EE4\u9700\u8981 --data \u6216\u5BF9\u5E94\u5B57\u6BB5\u9009\u9879\u3002","This command needs --data or field options."),t.file){s.upload||b("\u6B64\u63A5\u53E3\u4E0D\u652F\u6301\u6587\u4EF6\u4E0A\u4F20\u3002","This route does not accept uploads."),i!==void 0&&!O(i)&&b("\u4E0A\u4F20\u5B57\u6BB5\u5FC5\u987B\u4E3A JSON \u5BF9\u8C61\u3002","Upload fields must be a JSON object.");let d=new FormData;for(let[c,_]of Object.entries(i??{}))["string","number","boolean"].includes(typeof _)||b("\u4E0A\u4F20\u5B57\u6BB5\u5FC5\u987B\u4E3A\u6807\u91CF\u3002","Upload fields must be scalars."),d.append(c,String(_));try{let c=String(t.file);if(!(await(0,V.stat)(c)).isFile())throw new Error("Not a file");d.append(s.upload,await(0,dt.openAsBlob)(c),(0,ct.basename)(c))}catch{b("\u4E0A\u4F20\u6587\u4EF6\u65E0\u6CD5\u8BFB\u53D6\u3002","Cannot read upload file.")}i=d}else s.upload&&s.path!=="scripts"&&b("\u6B64\u63A5\u53E3\u9700\u8981 --file\u3002","This route requires --file.");if(s.download&&!t.output&&b("\u6B64\u63A5\u53E3\u9700\u8981 --output \u4FDD\u5B58\u54CD\u5E94\u3002","This route requires --output."),t.output){s.download||b("\u6B64\u63A5\u53E3\u4E0D\u652F\u6301 --output\u3002","This route does not support --output.");try{await(0,V.lstat)(String(t.output)),b("\u8F93\u51FA\u6587\u4EF6\u5DF2\u5B58\u5728\u3002","Output file already exists.")}catch(d){if(d.code!=="ENOENT")throw d}}let a=new URLSearchParams;for(let[d,c]of Object.entries(r??{}))for(let _ of Array.isArray(c)?c:[c])(_===null||!["string","number","boolean"].includes(typeof _))&&b("\u67E5\u8BE2\u53C2\u6570\u5FC5\u987B\u4E3A\u6807\u91CF\u6216\u6807\u91CF\u6570\u7EC4\u3002","Query values must be scalars or arrays of scalars."),a.append(d,String(_));a.size&&(n+=`?${a}`);let p=s.anonymous?{url:G(process.env.QL_URL||""),clientId:"",clientSecret:""}:await $(),u=await T(p,n,{method:s.method,body:i,authenticated:!s.anonymous,output:t.output,text:s.path==="system/log",timeoutMs:t.timeout?Number(t.timeout)*1e3:void 0}),l=s.path.startsWith("apps")&&!t["show-secrets"]?xe(u.data):u.data;return{...u,code:200,data:l??null}}var V,dt,ct,ut=g(()=>{"use strict";V=require("node:fs/promises"),dt=require("node:fs"),ct=require("node:path");ie();te();ne();ue();ce();S()});var ht={};z(ht,{task:()=>$t});function mt(o){return O(o)&&typeof o.id=="number"&&Number.isSafeInteger(o.id)&&o.id>0}async function $t(o){let e=await $();if(o.kind==="list"){let t=new URLSearchParams({page:String(o.page),size:String(o.size)});o.search!==void 0&&t.set("searchValue",o.search);let s=(await T(e,`crons?${t}`)).data;return(!O(s)||!Array.isArray(s.data)||!s.data.every(mt)||typeof s.total!="number"||!Number.isSafeInteger(s.total)||s.total<0)&&h(m(process.env,"\u4EFB\u52A1\u5217\u8868\u54CD\u5E94\u65E0\u6548\u3002")),{code:200,data:{data:s.data,total:s.total}}}if(o.kind==="get"){let t=await T(e,`crons/${o.id}`);return(!mt(t.data)||t.data.id!==o.id)&&h(m(process.env,"\u4EFB\u52A1\u54CD\u5E94\u65E0\u6548\u3002")),{code:200,data:t.data}}if(o.kind==="logs"){let t=await T(e,`crons/${o.id}/log`);(typeof t.data!="string"||t.logStatus!==void 0&&typeof t.logStatus!="string")&&h(m(process.env,"\u65E5\u5FD7\u54CD\u5E94\u65E0\u6548\u3002"));let n=t.data.replace(/\r\n/g,`
|
|
101
|
+
`).split(`
|
|
102
|
+
`);return n.at(-1)===""&&n.pop(),{code:200,data:n.slice(-o.tail).join(`
|
|
103
|
+
`),logStatus:t.logStatus,truncated:n.length>o.tail}}return await T(e,`crons/${o.kind}`,{method:"PUT",body:[o.id]}),{code:200,data:{taskId:o.id,action:o.kind,accepted:!0}}}var ft=g(()=>{"use strict";A();te();S();ne()});var yt={};z(yt,{subscription:()=>Dt});function gt(o){return(!O(o)||typeof o.id!="number"||!Number.isSafeInteger(o.id)||o.id<=0)&&h(m(process.env,"\u8BA2\u9605\u54CD\u5E94\u65E0\u6548\u3002")),Object.fromEntries(Nt.filter(e=>o[e]!==void 0).map(e=>[e,o[e]]))}async function Dt(o){let e=await $(),t=o.name.split(" ")[1];if(t==="list"){let s=typeof o.values.search=="string"?`?${new URLSearchParams({searchValue:o.values.search})}`:"",i=await T(e,`subscriptions${s}`);return Array.isArray(i.data)||h(m(process.env,"\u8BA2\u9605\u5217\u8868\u54CD\u5E94\u65E0\u6548\u3002")),{code:200,data:i.data.map(gt)}}let n=Number(o.positionals[0]);if(t==="get"){let s=gt((await T(e,`subscriptions/${n}`)).data);return s.id!==n&&h(m(process.env,"\u8FD4\u56DE\u7684\u8BA2\u9605 ID \u4E0E\u8BF7\u6C42\u4E0D\u4E00\u81F4\u3002")),{code:200,data:s}}if(t==="logs"){let s=await T(e,`subscriptions/${n}/log`);typeof s.data!="string"&&h(m(process.env,"\u8BA2\u9605\u65E5\u5FD7\u54CD\u5E94\u65E0\u6548\u3002"));let i=s.data.replace(/\r\n/g,`
|
|
104
|
+
`).split(`
|
|
105
|
+
`);i.at(-1)===""&&i.pop();let r=Number(o.values.tail);return{code:200,data:i.slice(-r).join(`
|
|
106
|
+
`),truncated:i.length>r}}return["run","stop","enable","disable"].includes(t)||h(m(process.env,"\u4E0D\u652F\u6301\u7684\u8BA2\u9605\u64CD\u4F5C\u3002"),2),await T(e,`subscriptions/${t}`,{method:"PUT",body:[n]}),{code:200,data:{subscriptionId:n,action:t,accepted:!0}}}var Nt,bt=g(()=>{"use strict";A();te();ne();S();Nt=["id","name","alias","type","status","is_disabled","schedule","schedule_type","interval_schedule","branch","whitelist","blacklist","dependences","extensions","autoAddCron","autoDelCron","createdAt","updatedAt"]});var qt={};z(qt,{remoteMain:()=>Ct});module.exports=Et(qt);ie();var v=o=>({type:"string",description:o}),F=j.filter(o=>!o.existing).map(o=>{let e={query:v("Query object as JSON, @file or - for stdin"),timeout:{...v("Request timeout in seconds"),integer:{min:1,max:3600}}};if(o.body&&o.body!=="ids"&&(e.data=v("Request body as JSON, @file or - for stdin")),o.upload&&(e.file=v("Local file to upload")),o.download&&(e.output={...v("Save response to a new local file"),required:!0}),["task create","task update","subscription create","subscription update","app create","app update"].includes(o.name))if(e.name=v("Resource name"),o.name.startsWith("task "))e.command=v("Command executed by the remote panel"),e.schedule=v("Cron schedule");else if(o.name.startsWith("subscription "))for(let n of["type","url","alias","schedule","schedule-type","branch","whitelist","blacklist"])e[n]=v(`Subscription ${n}`);else e.scopes=v("Comma-separated application permissions");o.name.startsWith("app ")&&(e["show-secrets"]={type:"boolean",description:"Explicitly include application credentials in output"});let t=o.params??[];return{name:o.name,summary:`${o.method} /open/${o.path}`,arguments:o.body==="ids"?"<id...>":t.map(n=>`<${n}>`).join(" "),minimum:o.body==="ids"?1:t.length,maximum:o.body==="ids"?1e4:t.length,options:e}});F.push({name:"api request",summary:"Call a registered OpenAPI route",arguments:"<method> <path>",minimum:2,maximum:2,options:{data:v("Request body as JSON, @file or - for stdin"),query:v("Query object as JSON, @file or - for stdin"),file:v("Local file to upload"),output:v("Save response to a new local file"),timeout:{...v("Request timeout in seconds"),integer:{min:1,max:3600}},"show-secrets":{type:"boolean",description:"Explicitly include application credentials in output"}}},{name:"api routes",summary:"List supported OpenAPI routes and commands"});ie();ce();var Qe="<id>",Lt=[...F,{name:"auth login",summary:"Authenticate with a remote panel application",options:{url:{type:"string",description:"Panel URL including optional base path",required:!0}}},{name:"auth status",summary:"Verify authentication and resource permission",options:{scope:{type:"string",description:"Permission to check",default:"crons",choices:[...new Set(j.map(o=>o.path.split("/")[0]))].filter(o=>!["auth","update"].includes(o))}}},{name:"auth logout",summary:"Remove local credentials (does not revoke the server token)"},{name:"task list",summary:"List remote tasks",options:{search:{type:"string",description:"Search task name or command"},page:{type:"string",short:"p",description:"Page number",default:"1",integer:{min:1,max:Number.MAX_SAFE_INTEGER}},size:{type:"string",description:"Page size",default:"50",integer:{min:1,max:200}}}},...["get","run","stop"].map(o=>({name:`task ${o}`,summary:`${o} a remote task by ID`,arguments:Qe,minimum:1,maximum:1})),{name:"task logs",summary:"Read the latest task log",arguments:Qe,minimum:1,maximum:1,options:{tail:{type:"string",short:"n",description:"Last N lines",default:"200",integer:{min:1,max:1e4}}}},{name:"subscription list",summary:"List panel subscriptions",options:{search:{type:"string",description:"Search subscriptions"}}},...["get","run","stop","enable","disable"].map(o=>({name:`subscription ${o}`,summary:`${o} a panel subscription by ID`,arguments:"<id>",minimum:1,maximum:1})),{name:"subscription logs",summary:"Read latest subscription log",arguments:"<id>",minimum:1,maximum:1,options:{tail:{type:"string",short:"n",description:"Last N lines",default:"200",integer:{min:1,max:1e4}}}}],Be={commands:Lt,aliases:{login:["auth","login"]},options:{},surface:"public",validate(o){!F.some(e=>e.name===o.name)&&/^(task|subscription) /.test(o.name)&&!o.name.endsWith(" list")&&H(o.positionals[0])}};ce();A();S();async function Je(o,e,t,n,s){let i=o.slice(0,o.indexOf("--")<0?void 0:o.indexOf("--")).includes("--json");try{let r=Me(o,e);if(i=r.json,r.help)return process.stdout.write((i?JSON.stringify({code:200,data:{help:r.help}}):r.help)+`
|
|
107
|
+
`),0;let a=await t(r);return n?.throwIfAborted(),process.stdout.write(JSON.stringify(a,null,i?0:2)+`
|
|
108
|
+
`),0}catch(r){let a=n?.aborted,p=a?s?.()??1:r instanceof k?r.exitCode:1,u=a?m(process.env,"CLI \u64CD\u4F5C\u5DF2\u53D6\u6D88\u3002"):r instanceof k?r.message:m(process.env,"CLI \u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u672C\u673A\u914D\u7F6E\u548C\u6743\u9650\u3002");return process.stderr.write((i?JSON.stringify({code:p,message:u}):u)+`
|
|
109
|
+
`),p}}S();A();async function _t(o){let{name:e,values:t,positionals:n}=o;if(F.some(s=>s.name===e)){let{openCommand:s}=await Promise.resolve().then(()=>(ut(),pt));return s(o)}if(e.startsWith("auth ")){let{auth:s}=await Promise.resolve().then(()=>(ne(),at));return s(e==="auth login"?{kind:"login",url:t.url}:e==="auth logout"?{kind:"logout"}:{kind:"status",scope:t.scope})}if(e.startsWith("task ")){let{task:s}=await Promise.resolve().then(()=>(ft(),ht));if(e==="task list")return s({kind:"list",page:Number(t.page),size:Number(t.size),search:t.search});let i=Number(n[0]);return s(e==="task logs"?{kind:"logs",id:i,tail:Number(t.tail)}:{kind:e.slice(5),id:i})}if(e.startsWith("subscription ")){let{subscription:s}=await Promise.resolve().then(()=>(bt(),yt));return s(o)}return h(m(process.env,"\u672A\u77E5\u547D\u4EE4\uFF0C\u8BF7\u8FD0\u884C %s --help\u3002","ql"),2)}function Ct(o=process.argv.slice(2)){return Je(o,Be,_t)}require.main===module&&Ct().then(o=>{process.exitCode=o});0&&(module.exports={remoteMain});
|
|
110
|
+
//# sourceMappingURL=ql.js.map
|