poke 0.3.1 → 0.4.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/README.md +0 -18
- package/dist/cli.cjs +47 -144
- package/package.json +2 -4
package/README.md
CHANGED
|
@@ -173,24 +173,6 @@ poke tunnel http://localhost:3000/mcp --name "Local Dev"
|
|
|
173
173
|
|
|
174
174
|
The tunnel stays active until you press Ctrl+C. Tools are synced automatically every 5 minutes.
|
|
175
175
|
|
|
176
|
-
### `poke wrap`
|
|
177
|
-
|
|
178
|
-
Analyze your project with AI and generate an MCP server that exposes its capabilities, then tunnel it to Poke.
|
|
179
|
-
|
|
180
|
-
```bash
|
|
181
|
-
poke wrap
|
|
182
|
-
poke wrap --name "My Project"
|
|
183
|
-
poke wrap --prompt "Focus on the REST API endpoints and expose CRUD operations as tools"
|
|
184
|
-
```
|
|
185
|
-
|
|
186
|
-
| Option | Description |
|
|
187
|
-
|--------|-------------|
|
|
188
|
-
| `--port <port>` | Port for the generated MCP server (default: `8765`) |
|
|
189
|
-
| `-n, --name <name>` | Display name for the connection |
|
|
190
|
-
| `--prompt <prompt>` | Additional instructions for what the MCP server should do |
|
|
191
|
-
|
|
192
|
-
Requires [uv](https://docs.astral.sh/uv/) to be installed.
|
|
193
|
-
|
|
194
176
|
## Configuration
|
|
195
177
|
|
|
196
178
|
Credentials are stored in `~/.config/poke/credentials.json` (respects `$XDG_CONFIG_HOME`).
|
package/dist/cli.cjs
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";var
|
|
3
|
-
`).replace(/^/gm," ".repeat(s))}let l=[`Usage: ${t.commandUsage(e)}`,""],
|
|
4
|
-
`)}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestGlobalOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}wrap(e,t,r,
|
|
2
|
+
"use strict";var ar=Object.create;var Je=Object.defineProperty;var ur=Object.getOwnPropertyDescriptor;var lr=Object.getOwnPropertyNames;var cr=Object.getPrototypeOf,hr=Object.prototype.hasOwnProperty;var fr=(n,e)=>()=>(n&&(e=n(n=0)),e);var y=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports);var dr=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of lr(e))!hr.call(n,i)&&i!==t&&Je(n,i,{get:()=>e[i],enumerable:!(r=ur(e,i))||r.enumerable});return n};var E=(n,e,t)=>(t=n!=null?ar(cr(n)):{},dr(e||!n||!n.__esModule?Je(t,"default",{value:n,enumerable:!0}):t,n));var Xe,m,c=fr(()=>{"use strict";Xe=require("url"),m=(0,Xe.pathToFileURL)(__filename).href});var K=y(le=>{c();var z=class extends Error{constructor(e,t,r){super(r),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}},ue=class extends z{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};le.CommanderError=z;le.InvalidArgumentError=ue});var Y=y(he=>{c();var{InvalidArgumentError:mr}=K(),ce=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.e=e.slice(1,-1);break;case"[":this.required=!1,this.e=e.slice(1,-1);break;default:this.required=!0,this.e=e;break}this.e.length>3&&this.e.slice(-3)==="..."&&(this.variadic=!0,this.e=this.e.slice(0,-3))}name(){return this.e}E(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:t.concat(e)}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,r)=>{if(!this.argChoices.includes(t))throw new mr(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this.E(t,r):t},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function pr(n){let e=n.name()+(n.variadic===!0?"...":"");return n.required?"<"+e+">":"["+e+"]"}he.Argument=ce;he.humanReadableArgName=pr});var de=y(ze=>{c();var{humanReadableArgName:gr}=Y(),fe=class{constructor(){this.helpWidth=void 0,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}visibleCommands(e){let t=e.commands.filter(i=>!i.y),r=e.g();return r&&!r.y&&t.push(r),this.sortSubcommands&&t.sort((i,s)=>i.name().localeCompare(s.name())),t}compareOptions(e,t){let r=i=>i.short?i.short.replace(/^-/,""):i.long.replace(/^--/,"");return r(e).localeCompare(r(t))}visibleOptions(e){let t=e.options.filter(i=>!i.hidden),r=e.h();if(r&&!r.hidden){let i=r.short&&e.n(r.short),s=r.long&&e.n(r.long);!i&&!s?t.push(r):r.long&&!s?t.push(e.createOption(r.long,r.description)):r.short&&!i&&t.push(e.createOption(r.short,r.description))}return this.sortOptions&&t.sort(this.compareOptions),t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let t=[];for(let r=e.parent;r;r=r.parent){let i=r.options.filter(s=>!s.hidden);t.push(...i)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleArguments(e){return e.D&&e.registeredArguments.forEach(t=>{t.description=t.description||e.D[t.name()]||""}),e.registeredArguments.find(t=>t.description)?e.registeredArguments:[]}subcommandTerm(e){let t=e.registeredArguments.map(r=>gr(r)).join(" ");return e.e+(e.o[0]?"|"+e.o[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((r,i)=>Math.max(r,t.subcommandTerm(i).length),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce((r,i)=>Math.max(r,t.optionTerm(i).length),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce((r,i)=>Math.max(r,t.optionTerm(i).length),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce((r,i)=>Math.max(r,t.argumentTerm(i).length),0)}commandUsage(e){let t=e.e;e.o[0]&&(t=t+"|"+e.o[0]);let r="";for(let i=e.parent;i;i=i.parent)r=i.name()+" "+r;return r+t+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let t=[];return e.argChoices&&t.push(`choices: ${e.argChoices.map(r=>JSON.stringify(r)).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?`${e.description} (${t.join(", ")})`:e.description}argumentDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(r=>JSON.stringify(r)).join(", ")}`),e.defaultValue!==void 0&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){let r=`(${t.join(", ")})`;return e.description?`${e.description} ${r}`:r}return e.description}formatHelp(e,t){let r=t.padWidth(e,t),i=t.helpWidth||80,s=2,o=2;function u(f,b){if(b){let $=`${f.padEnd(r+o)}${b}`;return t.wrap($,i-s,r+o)}return f}function a(f){return f.join(`
|
|
3
|
+
`).replace(/^/gm," ".repeat(s))}let l=[`Usage: ${t.commandUsage(e)}`,""],h=t.commandDescription(e);h.length>0&&(l=l.concat([t.wrap(h,i,0),""]));let d=t.visibleArguments(e).map(f=>u(t.argumentTerm(f),t.argumentDescription(f)));d.length>0&&(l=l.concat(["Arguments:",a(d),""]));let w=t.visibleOptions(e).map(f=>u(t.optionTerm(f),t.optionDescription(f)));if(w.length>0&&(l=l.concat(["Options:",a(w),""])),this.showGlobalOptions){let f=t.visibleGlobalOptions(e).map(b=>u(t.optionTerm(b),t.optionDescription(b)));f.length>0&&(l=l.concat(["Global Options:",a(f),""]))}let v=t.visibleCommands(e).map(f=>u(t.subcommandTerm(f),t.subcommandDescription(f)));return v.length>0&&(l=l.concat(["Commands:",a(v),""])),l.join(`
|
|
4
|
+
`)}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestGlobalOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}wrap(e,t,r,i=40){let s=" \\f\\t\\v\xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF",o=new RegExp(`[\\n][${s}]+`);if(e.match(o))return e;let u=t-r;if(u<i)return e;let a=e.slice(0,r),l=e.slice(r).replace(`\r
|
|
5
5
|
`,`
|
|
6
|
-
`),
|
|
7
|
-
|.{1,${
|
|
8
|
-
`?"":($>0?
|
|
9
|
-
`)}};
|
|
6
|
+
`),h=" ".repeat(r),w="\\s\u200B",v=new RegExp(`
|
|
7
|
+
|.{1,${u-1}}([${w}]|$)|[^${w}]+?([${w}]|$)`,"g"),f=l.match(v)||[];return a+f.map((b,$)=>b===`
|
|
8
|
+
`?"":($>0?h:"")+b.trimEnd()).join(`
|
|
9
|
+
`)}};ze.Help=fe});var we=y(ge=>{c();var{InvalidArgumentError:wr}=K(),me=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 r=Ar(e);this.short=r.shortFlag,this.long=r.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}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}E(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:t.concat(e)}choices(e){return this.argChoices=e.slice(),this.parseArg=(t,r)=>{if(!this.argChoices.includes(t))throw new wr(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this.E(t,r):t},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return vr(this.name().replace(/^no-/,""))}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},pe=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,r)=>{this.positiveOptions.has(r)&&this.dualOptions.add(r)})}valueFromOption(e,t){let r=t.attributeName();if(!this.dualOptions.has(r))return!0;let i=this.negativeOptions.get(r).presetArg,s=i!==void 0?i:!1;return t.negate===(s===e)}};function vr(n){return n.split("-").reduce((e,t)=>e+t[0].toUpperCase()+t.slice(1))}function Ar(n){let e,t,r=n.split(/[ |,]+/);return r.length>1&&!/^[[<]/.test(r[1])&&(e=r.shift()),t=r.shift(),!e&&/^-[^-]$/.test(t)&&(e=t,t=void 0),{shortFlag:e,longFlag:t}}ge.Option=me;ge.DualOptions=pe});var Ze=y(Ye=>{c();function Er(n,e){if(Math.abs(n.length-e.length)>3)return Math.max(n.length,e.length);let t=[];for(let r=0;r<=n.length;r++)t[r]=[r];for(let r=0;r<=e.length;r++)t[0][r]=r;for(let r=1;r<=e.length;r++)for(let i=1;i<=n.length;i++){let s=1;n[i-1]===e[r-1]?s=0:s=1,t[i][r]=Math.min(t[i-1][r]+1,t[i][r-1]+1,t[i-1][r-1]+s),i>1&&r>1&&n[i-1]===e[r-2]&&n[i-2]===e[r-1]&&(t[i][r]=Math.min(t[i][r],t[i-2][r-2]+1))}return t[n.length][e.length]}function yr(n,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let t=n.startsWith("--");t&&(n=n.slice(2),e=e.map(o=>o.slice(2)));let r=[],i=3,s=.4;return e.forEach(o=>{if(o.length<=1)return;let u=Er(n,o),a=Math.max(n.length,o.length);(a-u)/a>s&&(u<i?(i=u,r=[o]):u===i&&r.push(o))}),r.sort((o,u)=>o.localeCompare(u)),t&&(r=r.map(o=>`--${o}`)),r.length>1?`
|
|
10
10
|
(Did you mean one of ${r.join(", ")}?)`:r.length===1?`
|
|
11
|
-
(Did you mean ${r[0]}?)`:""}
|
|
12
|
-
- specify the name in Command constructor or using .name()`);return t=t||{},t.isDefault&&(this.f=e.e),(t.noHelp||t.hidden)&&(e.
|
|
13
|
-
Expecting one of '${r.join("', '")}'`);return this.l[e]?this.l[e].push(t):this.l[e]=[t],this}exitOverride(e){return e?this.
|
|
14
|
-
- already used by option '${t.flags}'`)}this.options.push(e)}
|
|
11
|
+
(Did you mean ${r[0]}?)`:""}Ye.suggestSimilar=yr});var nt=y(it=>{c();var br=require("node:events").EventEmitter,ve=require("node:child_process"),B=require("node:path"),Ae=require("node:fs"),g=require("node:process"),{Argument:Or,humanReadableArgName:Cr}=Y(),{CommanderError:Ee}=K(),{Help:xr}=de(),{Option:et,DualOptions:Tr}=we(),{suggestSimilar:tt}=Ze(),ye=class n extends br{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._=!1,this.b=!0,this.registeredArguments=[],this.de=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this.r=null,this.e=e||"",this.O={},this.F={},this.a=!1,this.w=null,this.C=!1,this.R=null,this.I=null,this.f=null,this.u=null,this.o=[],this.x=!0,this.V="",this.W="",this.D=void 0,this.d=!1,this.T=!1,this.l={},this.m=!1,this.v=!0,this.t={writeOut:t=>g.stdout.write(t),writeErr:t=>g.stderr.write(t),getOutHelpWidth:()=>g.stdout.isTTY?g.stdout.columns:void 0,getErrHelpWidth:()=>g.stderr.isTTY?g.stderr.columns:void 0,outputError:(t,r)=>r(t)},this.y=!1,this.i=void 0,this.P=void 0,this.p=void 0,this.S={}}copyInheritedSettings(e){return this.t=e.t,this.i=e.i,this.p=e.p,this.S=e.S,this.u=e.u,this.a=e.a,this.x=e.x,this.b=e.b,this.d=e.d,this.m=e.m,this.v=e.v,this}c(){let e=[];for(let t=this;t;t=t.parent)e.push(t);return e}command(e,t,r){let i=t,s=r;typeof i=="object"&&i!==null&&(s=i,i=null),s=s||{};let[,o,u]=e.match(/([^ ]+) *(.*)/),a=this.createCommand(o);return i&&(a.description(i),a.C=!0),s.isDefault&&(this.f=a.e),a.y=!!(s.noHelp||s.hidden),a.R=s.executableFile||null,u&&a.arguments(u),this.U(a),a.parent=this,a.copyInheritedSettings(this),i?this:a}createCommand(e){return new n(e)}createHelp(){return Object.assign(new xr,this.configureHelp())}configureHelp(e){return e===void 0?this.S:(this.S=e,this)}configureOutput(e){return e===void 0?this.t:(Object.assign(this.t,e),this)}showHelpAfterError(e=!0){return typeof e!="string"&&(e=!!e),this.m=e,this}showSuggestionAfterError(e=!0){return this.v=!!e,this}addCommand(e,t){if(!e.e)throw new Error(`Command passed to .addCommand() must have a name
|
|
12
|
+
- specify the name in Command constructor or using .name()`);return t=t||{},t.isDefault&&(this.f=e.e),(t.noHelp||t.hidden)&&(e.y=!0),this.U(e),e.parent=this,e.q(),this}createArgument(e,t){return new Or(e,t)}argument(e,t,r,i){let s=this.createArgument(e,t);return typeof r=="function"?s.default(i).argParser(r):s.default(r),this.addArgument(s),this}arguments(e){return e.trim().split(/ +/).forEach(t=>{this.argument(t)}),this}addArgument(e){let t=this.registeredArguments.slice(-1)[0];if(t&&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.P=e,this;e=e??"help [command]";let[,r,i]=e.match(/([^ ]+) *(.*)/),s=t??"display help for command",o=this.createCommand(r);return o.helpOption(!1),i&&o.arguments(i),s&&o.description(s),this.P=!0,this.p=o,this}addHelpCommand(e,t){return typeof e!="object"?(this.helpCommand(e,t),this):(this.P=!0,this.p=e,this)}g(){return this.P??(this.commands.length&&!this.w&&!this.s("help"))?(this.p===void 0&&this.helpCommand(void 0,void 0),this.p):null}hook(e,t){let r=["preSubcommand","preAction","postAction"];if(!r.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
|
|
13
|
+
Expecting one of '${r.join("', '")}'`);return this.l[e]?this.l[e].push(t):this.l[e]=[t],this}exitOverride(e){return e?this.u=e:this.u=t=>{if(t.code!=="commander.executeSubCommandAsync")throw t},this}$(e,t,r){this.u&&this.u(new Ee(e,t,r)),g.exit(e)}action(e){let t=r=>{let i=this.registeredArguments.length,s=r.slice(0,i);return this.a?s[i]=this:s[i]=this.opts(),s.push(this),e.apply(this,s)};return this.w=t,this}createOption(e,t){return new et(e,t)}j(e,t,r,i){try{return e.parseArg(t,r)}catch(s){if(s.code==="commander.invalidArgument"){let o=`${i} ${s.message}`;this.error(o,{exitCode:s.exitCode,code:s.code})}throw s}}G(e){let t=e.short&&this.n(e.short)||e.long&&this.n(e.long);if(t){let r=e.long&&this.n(e.long)?e.long:e.short;throw new Error(`Cannot add option '${e.flags}'${this.e&&` to command '${this.e}'`} due to conflicting flag '${r}'
|
|
14
|
+
- already used by option '${t.flags}'`)}this.options.push(e)}U(e){let t=i=>[i.name()].concat(i.aliases()),r=t(e).find(i=>this.s(i));if(r){let i=t(this.s(r)).join("|"),s=t(e).join("|");throw new Error(`cannot add command '${s}' as already have command '${i}'`)}this.commands.push(e)}addOption(e){this.G(e);let t=e.name(),r=e.attributeName();if(e.negate){let s=e.long.replace(/^--no-/,"--");this.n(s)||this.setOptionValueWithSource(r,e.defaultValue===void 0?!0:e.defaultValue,"default")}else e.defaultValue!==void 0&&this.setOptionValueWithSource(r,e.defaultValue,"default");let i=(s,o,u)=>{s==null&&e.presetArg!==void 0&&(s=e.presetArg);let a=this.getOptionValue(r);s!==null&&e.parseArg?s=this.j(e,s,a,o):s!==null&&e.variadic&&(s=e.E(s,a)),s==null&&(e.negate?s=!1:e.isBoolean()||e.optional?s=!0:s=""),this.setOptionValueWithSource(r,s,u)};return this.on("option:"+t,s=>{let o=`error: option '${e.flags}' argument '${s}' is invalid.`;i(s,o,"cli")}),e.envVar&&this.on("optionEnv:"+t,s=>{let o=`error: option '${e.flags}' value '${s}' from env '${e.envVar}' is invalid.`;i(s,o,"env")}),this}K(e,t,r,i,s){if(typeof t=="object"&&t instanceof et)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let o=this.createOption(t,r);if(o.makeOptionMandatory(!!e.mandatory),typeof i=="function")o.default(s).argParser(i);else if(i instanceof RegExp){let u=i;i=(a,l)=>{let h=u.exec(a);return h?h[0]:l},o.default(s).argParser(i)}else o.default(i);return this.addOption(o)}option(e,t,r,i){return this.K({},e,t,r,i)}requiredOption(e,t,r,i){return this.K({mandatory:!0},e,t,r,i)}combineFlagAndOptionalValue(e=!0){return this.x=!!e,this}allowUnknownOption(e=!0){return this._=!!e,this}allowExcessArguments(e=!0){return this.b=!!e,this}enablePositionalOptions(e=!0){return this.d=!!e,this}passThroughOptions(e=!0){return this.T=!!e,this.q(),this}q(){if(this.parent&&this.T&&!this.parent.d)throw new Error(`passThroughOptions cannot be used for '${this.e}' 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.O).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this.a=!!e,this}getOptionValue(e){return this.a?this[e]:this.O[e]}setOptionValue(e,t){return this.setOptionValueWithSource(e,t,void 0)}setOptionValueWithSource(e,t,r){return this.a?this[e]=t:this.O[e]=t,this.F[e]=r,this}getOptionValueSource(e){return this.F[e]}getOptionValueSourceWithGlobals(e){let t;return this.c().forEach(r=>{r.getOptionValueSource(e)!==void 0&&(t=r.getOptionValueSource(e))}),t}J(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){g.versions?.electron&&(t.from="electron");let i=g.execArgv??[];(i.includes("-e")||i.includes("--eval")||i.includes("-p")||i.includes("--print"))&&(t.from="eval")}e===void 0&&(e=g.argv),this.rawArgs=e.slice();let r;switch(t.from){case void 0:case"node":this.r=e[1],r=e.slice(2);break;case"electron":g.defaultApp?(this.r=e[1],r=e.slice(2)):r=e.slice(1);break;case"user":r=e.slice(0);break;case"eval":r=e.slice(1);break;default:throw new Error(`unexpected parse option { from: '${t.from}' }`)}return!this.e&&this.r&&this.nameFromFilename(this.r),this.e=this.e||"program",r}parse(e,t){let r=this.J(e,t);return this.N([],r),this}async parseAsync(e,t){let r=this.J(e,t);return await this.N([],r),this}re(e,t){t=t.slice();let r=!1,i=[".js",".ts",".tsx",".mjs",".cjs"];function s(h,d){let w=B.resolve(h,d);if(Ae.existsSync(w))return w;if(i.includes(B.extname(d)))return;let v=i.find(f=>Ae.existsSync(`${w}${f}`));if(v)return`${w}${v}`}this.X(),this.z();let o=e.R||`${this.e}-${e.e}`,u=this.I||"";if(this.r){let h;try{h=Ae.realpathSync(this.r)}catch{h=this.r}u=B.resolve(B.dirname(h),u)}if(u){let h=s(u,o);if(!h&&!e.R&&this.r){let d=B.basename(this.r,B.extname(this.r));d!==this.e&&(h=s(u,`${d}-${e.e}`))}o=h||o}r=i.includes(B.extname(o));let a;g.platform!=="win32"?r?(t.unshift(o),t=rt(g.execArgv).concat(t),a=ve.spawn(g.argv[0],t,{stdio:"inherit"})):a=ve.spawn(o,t,{stdio:"inherit"}):(t.unshift(o),t=rt(g.execArgv).concat(t),a=ve.spawn(g.execPath,t,{stdio:"inherit"})),a.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(d=>{g.on(d,()=>{a.killed===!1&&a.exitCode===null&&a.kill(d)})});let l=this.u;a.on("close",h=>{h=h??1,l?l(new Ee(h,"commander.executeSubCommandAsync","(close)")):g.exit(h)}),a.on("error",h=>{if(h.code==="ENOENT"){let d=u?`searched for local subcommand relative to directory '${u}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",w=`'${o}' does not exist
|
|
15
15
|
- if '${e.e}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
|
|
16
16
|
- if the default executable name is not suitable, use the executableFile option to supply a custom name or path
|
|
17
|
-
- ${
|
|
17
|
+
- ${d}`;throw new Error(w)}else if(h.code==="EACCES")throw new Error(`'${o}' not executable`);if(!l)g.exit(1);else{let d=new Ee(1,"commander.executeSubCommandAsync","(error)");d.nestedError=h,l(d)}}),this.runningCommand=a}k(e,t,r){let i=this.s(e);i||this.help({error:!0});let s;return s=this.ie(s,i,"preSubcommand"),s=this.A(s,()=>{if(i.C)this.re(i,t.concat(r));else return i.N(t,r)}),s}ne(e){e||this.help();let t=this.s(e);return t&&!t.C&&t.help(),this.k(e,[],[this.h()?.long??this.h()?.short??"--help"])}se(){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.oe(this.args)}B(){let e=(r,i,s)=>{let o=i;if(i!==null&&r.parseArg){let u=`error: command-argument value '${i}' is invalid for argument '${r.name()}'.`;o=this.j(r,i,s,u)}return o};this.se();let t=[];this.registeredArguments.forEach((r,i)=>{let s=r.defaultValue;r.variadic?i<this.args.length?(s=this.args.slice(i),r.parseArg&&(s=s.reduce((o,u)=>e(r,u,o),r.defaultValue))):s===void 0&&(s=[]):i<this.args.length&&(s=this.args[i],r.parseArg&&(s=e(r,s,r.defaultValue))),t[i]=s}),this.processedArgs=t}A(e,t){return e&&e.then&&typeof e.then=="function"?e.then(()=>t()):t()}Y(e,t){let r=e,i=[];return this.c().reverse().filter(s=>s.l[t]!==void 0).forEach(s=>{s.l[t].forEach(o=>{i.push({hookedCommand:s,callback:o})})}),t==="postAction"&&i.reverse(),i.forEach(s=>{r=this.A(r,()=>s.callback(s.hookedCommand,this))}),r}ie(e,t,r){let i=e;return this.l[r]!==void 0&&this.l[r].forEach(s=>{i=this.A(i,()=>s(this,t))}),i}N(e,t){let r=this.parseOptions(t);if(this.ae(),this.ue(),e=e.concat(r.operands),t=r.unknown,this.args=e.concat(t),e&&this.s(e[0]))return this.k(e[0],e.slice(1),t);if(this.g()&&e[0]===this.g().name())return this.ne(e[1]);if(this.f)return this.Z(t),this.k(this.f,e,t);this.commands.length&&this.args.length===0&&!this.w&&!this.f&&this.help({error:!0}),this.Z(r.unknown),this.X(),this.z();let i=()=>{r.unknown.length>0&&this.unknownOption(r.unknown[0])},s=`command:${this.name()}`;if(this.w){i(),this.B();let o;return o=this.Y(o,"preAction"),o=this.A(o,()=>this.w(this.processedArgs)),this.parent&&(o=this.A(o,()=>{this.parent.emit(s,e,t)})),o=this.Y(o,"postAction"),o}if(this.parent&&this.parent.listenerCount(s))i(),this.B(),this.parent.emit(s,e,t);else if(e.length){if(this.s("*"))return this.k("*",e,t);this.listenerCount("command:*")?this.emit("command:*",e,t):this.commands.length?this.unknownCommand():(i(),this.B())}else this.commands.length?(i(),this.help({error:!0})):(i(),this.B())}s(e){if(e)return this.commands.find(t=>t.e===e||t.o.includes(e))}n(e){return this.options.find(t=>t.is(e))}X(){this.c().forEach(e=>{e.options.forEach(t=>{t.mandatory&&e.getOptionValue(t.attributeName())===void 0&&e.missingMandatoryOptionValue(t)})})}le(){let e=this.options.filter(r=>{let i=r.attributeName();return this.getOptionValue(i)===void 0?!1:this.getOptionValueSource(i)!=="default"});e.filter(r=>r.conflictsWith.length>0).forEach(r=>{let i=e.find(s=>r.conflictsWith.includes(s.attributeName()));i&&this.ce(r,i)})}z(){this.c().forEach(e=>{e.le()})}parseOptions(e){let t=[],r=[],i=t,s=e.slice();function o(a){return a.length>1&&a[0]==="-"}let u=null;for(;s.length;){let a=s.shift();if(a==="--"){i===r&&i.push(a),i.push(...s);break}if(u&&!o(a)){this.emit(`option:${u.name()}`,a);continue}if(u=null,o(a)){let l=this.n(a);if(l){if(l.required){let h=s.shift();h===void 0&&this.optionMissingArgument(l),this.emit(`option:${l.name()}`,h)}else if(l.optional){let h=null;s.length>0&&!o(s[0])&&(h=s.shift()),this.emit(`option:${l.name()}`,h)}else this.emit(`option:${l.name()}`);u=l.variadic?l:null;continue}}if(a.length>2&&a[0]==="-"&&a[1]!=="-"){let l=this.n(`-${a[1]}`);if(l){l.required||l.optional&&this.x?this.emit(`option:${l.name()}`,a.slice(2)):(this.emit(`option:${l.name()}`),s.unshift(`-${a.slice(2)}`));continue}}if(/^--[^=]+=/.test(a)){let l=a.indexOf("="),h=this.n(a.slice(0,l));if(h&&(h.required||h.optional)){this.emit(`option:${h.name()}`,a.slice(l+1));continue}}if(o(a)&&(i=r),(this.d||this.T)&&t.length===0&&r.length===0){if(this.s(a)){t.push(a),s.length>0&&r.push(...s);break}else if(this.g()&&a===this.g().name()){t.push(a),s.length>0&&t.push(...s);break}else if(this.f){r.push(a),s.length>0&&r.push(...s);break}}if(this.T){i.push(a),s.length>0&&i.push(...s);break}i.push(a)}return{operands:t,unknown:r}}opts(){if(this.a){let e={},t=this.options.length;for(let r=0;r<t;r++){let i=this.options[r].attributeName();e[i]=i===this.he?this.ee:this[i]}return e}return this.O}optsWithGlobals(){return this.c().reduce((e,t)=>Object.assign(e,t.opts()),{})}error(e,t){this.t.outputError(`${e}
|
|
18
18
|
`,this.t.writeErr),typeof this.m=="string"?this.t.writeErr(`${this.m}
|
|
19
19
|
`):this.m&&(this.t.writeErr(`
|
|
20
|
-
`),this.outputHelp({error:!0}));let r=t||{},
|
|
21
|
-
`),this
|
|
22
|
-
Expecting one of '${r.join("', '")}'`);let
|
|
23
|
-
`)}),this}Z(e){let t=this.h();t&&e.find(n=>t.is(n))&&(this.outputHelp(),this.S(0,"commander.helpDisplayed","(outputHelp)"))}};function ht(i){return i.map(e=>{if(!e.startsWith("--inspect"))return e;let t,r="127.0.0.1",n="9229",s;return(s=e.match(/^(--inspect(-brk)?)$/))!==null?t=s[1]:(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(t=s[1],/^\d+$/.test(s[3])?n=s[3]:r=s[3]):(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=s[1],r=s[3],n=s[4]),t&&n!=="0"?`${t}=${r}:${parseInt(n)+1}`:e})}ft.Command=Se});var wt=x(S=>{h();var{Argument:mt}=re(),{Command:Le}=dt(),{CommanderError:Br,InvalidArgumentError:pt}=z(),{Help:Dr}=Ee(),{Option:gt}=xe();S.program=new Le;S.createCommand=i=>new Le(i);S.createOption=(i,e)=>new gt(i,e);S.createArgument=(i,e)=>new mt(i,e);S.Command=Le;S.Option=gt;S.Argument=mt;S.Help=Dr;S.CommanderError=Br;S.InvalidArgumentError=pt;S.InvalidOptionArgumentError=pt});var Qe=x((Ai,Ht)=>{h();Ht.exports={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8}});var Wt=x((bi,Vt)=>{h();var Jr=Qe();function Ut(i){this.mode=Jr.MODE_8BIT_BYTE,this.data=i}Ut.prototype={getLength:function(){return this.data.length},write:function(i){for(var e=0;e<this.data.length;e++)i.put(this.data.charCodeAt(e),8)}};Vt.exports=Ut});var Je=x((Pi,jt)=>{h();var B={glog:function(i){if(i<1)throw new Error("glog("+i+")");return B.LOG_TABLE[i]},gexp:function(i){for(;i<0;)i+=255;for(;i>=256;)i-=255;return B.EXP_TABLE[i]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)};for(P=0;P<8;P++)B.EXP_TABLE[P]=1<<P;var P;for(P=8;P<256;P++)B.EXP_TABLE[P]=B.EXP_TABLE[P-4]^B.EXP_TABLE[P-5]^B.EXP_TABLE[P-6]^B.EXP_TABLE[P-8];var P;for(P=0;P<255;P++)B.LOG_TABLE[B.EXP_TABLE[P]]=P;var P;jt.exports=B});var Xe=x((Ci,qt)=>{h();var K=Je();function le(i,e){if(i.length===void 0)throw new Error(i.length+"/"+e);for(var t=0;t<i.length&&i[t]===0;)t++;this.num=new Array(i.length-t+e);for(var r=0;r<i.length-t;r++)this.num[r]=i[r+t]}le.prototype={get:function(i){return this.num[i]},getLength:function(){return this.num.length},multiply:function(i){for(var e=new Array(this.getLength()+i.getLength()-1),t=0;t<this.getLength();t++)for(var r=0;r<i.getLength();r++)e[t+r]^=K.gexp(K.glog(this.get(t))+K.glog(i.get(r)));return new le(e,0)},mod:function(i){if(this.getLength()-i.getLength()<0)return this;for(var e=K.glog(this.get(0))-K.glog(i.get(0)),t=new Array(this.getLength()),r=0;r<this.getLength();r++)t[r]=this.get(r);for(var n=0;n<i.getLength();n++)t[n]^=K.gexp(K.glog(i.get(n))+e);return new le(t,0).mod(i)}};qt.exports=le});var Kt=x(($i,Gt)=>{h();Gt.exports={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7}});var Xt=x((Li,Jt)=>{h();var L=Qe(),Qt=Xe(),Xr=Je(),W=Kt(),C={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(i){for(var e=i<<10;C.getBCHDigit(e)-C.getBCHDigit(C.G15)>=0;)e^=C.G15<<C.getBCHDigit(e)-C.getBCHDigit(C.G15);return(i<<10|e)^C.G15_MASK},getBCHTypeNumber:function(i){for(var e=i<<12;C.getBCHDigit(e)-C.getBCHDigit(C.G18)>=0;)e^=C.G18<<C.getBCHDigit(e)-C.getBCHDigit(C.G18);return i<<12|e},getBCHDigit:function(i){for(var e=0;i!==0;)e++,i>>>=1;return e},getPatternPosition:function(i){return C.PATTERN_POSITION_TABLE[i-1]},getMask:function(i,e,t){switch(i){case W.PATTERN000:return(e+t)%2===0;case W.PATTERN001:return e%2===0;case W.PATTERN010:return t%3===0;case W.PATTERN011:return(e+t)%3===0;case W.PATTERN100:return(Math.floor(e/2)+Math.floor(t/3))%2===0;case W.PATTERN101:return e*t%2+e*t%3===0;case W.PATTERN110:return(e*t%2+e*t%3)%2===0;case W.PATTERN111:return(e*t%3+(e+t)%2)%2===0;default:throw new Error("bad maskPattern:"+i)}},getErrorCorrectPolynomial:function(i){for(var e=new Qt([1],0),t=0;t<i;t++)e=e.multiply(new Qt([1,Xr.gexp(t)],0));return e},getLengthInBits:function(i,e){if(1<=e&&e<10)switch(i){case L.MODE_NUMBER:return 10;case L.MODE_ALPHA_NUM:return 9;case L.MODE_8BIT_BYTE:return 8;case L.MODE_KANJI:return 8;default:throw new Error("mode:"+i)}else if(e<27)switch(i){case L.MODE_NUMBER:return 12;case L.MODE_ALPHA_NUM:return 11;case L.MODE_8BIT_BYTE:return 16;case L.MODE_KANJI:return 10;default:throw new Error("mode:"+i)}else if(e<41)switch(i){case L.MODE_NUMBER:return 14;case L.MODE_ALPHA_NUM:return 13;case L.MODE_8BIT_BYTE:return 16;case L.MODE_KANJI:return 12;default:throw new Error("mode:"+i)}else throw new Error("type:"+e)},getLostPoint:function(i){var e=i.getModuleCount(),t=0,r=0,n=0;for(r=0;r<e;r++)for(n=0;n<e;n++){for(var s=0,o=i.isDark(r,n),a=-1;a<=1;a++)if(!(r+a<0||e<=r+a))for(var c=-1;c<=1;c++)n+c<0||e<=n+c||a===0&&c===0||o===i.isDark(r+a,n+c)&&s++;s>5&&(t+=3+s-5)}for(r=0;r<e-1;r++)for(n=0;n<e-1;n++){var l=0;i.isDark(r,n)&&l++,i.isDark(r+1,n)&&l++,i.isDark(r,n+1)&&l++,i.isDark(r+1,n+1)&&l++,(l===0||l===4)&&(t+=3)}for(r=0;r<e;r++)for(n=0;n<e-6;n++)i.isDark(r,n)&&!i.isDark(r,n+1)&&i.isDark(r,n+2)&&i.isDark(r,n+3)&&i.isDark(r,n+4)&&!i.isDark(r,n+5)&&i.isDark(r,n+6)&&(t+=40);for(n=0;n<e;n++)for(r=0;r<e-6;r++)i.isDark(r,n)&&!i.isDark(r+1,n)&&i.isDark(r+2,n)&&i.isDark(r+3,n)&&i.isDark(r+4,n)&&!i.isDark(r+5,n)&&i.isDark(r+6,n)&&(t+=40);var u=0;for(n=0;n<e;n++)for(r=0;r<e;r++)i.isDark(r,n)&&u++;var f=Math.abs(100*u/e/e-50)/5;return t+=f*10,t}};Jt.exports=C});var Ye=x((Mi,Yt)=>{h();Yt.exports={L:1,M:0,Q:3,H:2}});var Zt=x((Di,zt)=>{h();var ue=Ye();function D(i,e){this.totalCount=i,this.dataCount=e}D.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];D.getRSBlocks=function(i,e){var t=D.getRsBlockTable(i,e);if(t===void 0)throw new Error("bad rs block @ typeNumber:"+i+"/errorCorrectLevel:"+e);for(var r=t.length/3,n=[],s=0;s<r;s++)for(var o=t[s*3+0],a=t[s*3+1],c=t[s*3+2],l=0;l<o;l++)n.push(new D(a,c));return n};D.getRsBlockTable=function(i,e){switch(e){case ue.L:return D.RS_BLOCK_TABLE[(i-1)*4+0];case ue.M:return D.RS_BLOCK_TABLE[(i-1)*4+1];case ue.Q:return D.RS_BLOCK_TABLE[(i-1)*4+2];case ue.H:return D.RS_BLOCK_TABLE[(i-1)*4+3];default:return}};zt.exports=D});var rr=x((Ii,tr)=>{h();function er(){this.buffer=[],this.length=0}er.prototype={get:function(i){var e=Math.floor(i/8);return(this.buffer[e]>>>7-i%8&1)==1},put:function(i,e){for(var t=0;t<e;t++)this.putBit((i>>>e-t-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(i){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),i&&(this.buffer[e]|=128>>>this.length%8),this.length++}};tr.exports=er});var or=x((Ni,sr)=>{h();var Yr=Wt(),j=Xt(),zr=Xe(),nr=Zt(),ir=rr();function R(i,e){this.typeNumber=i,this.errorCorrectLevel=e,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}R.prototype={addData:function(i){var e=new Yr(i);this.dataList.push(e),this.dataCache=null},isDark:function(i,e){if(i<0||this.moduleCount<=i||e<0||this.moduleCount<=e)throw new Error(i+","+e);return this.modules[i][e]},getModuleCount:function(){return this.moduleCount},make:function(){if(this.typeNumber<1){var i=1;for(i=1;i<40;i++){for(var e=nr.getRSBlocks(i,this.errorCorrectLevel),t=new ir,r=0,n=0;n<e.length;n++)r+=e[n].dataCount;for(var s=0;s<this.dataList.length;s++){var o=this.dataList[s];t.put(o.mode,4),t.put(o.getLength(),j.getLengthInBits(o.mode,i)),o.write(t)}if(t.getLengthInBits()<=r*8)break}this.typeNumber=i}this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(i,e){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var t=0;t<this.moduleCount;t++){this.modules[t]=new Array(this.moduleCount);for(var r=0;r<this.moduleCount;r++)this.modules[t][r]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(i,e),this.typeNumber>=7&&this.setupTypeNumber(i),this.dataCache===null&&(this.dataCache=R.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,e)},setupPositionProbePattern:function(i,e){for(var t=-1;t<=7;t++)if(!(i+t<=-1||this.moduleCount<=i+t))for(var r=-1;r<=7;r++)e+r<=-1||this.moduleCount<=e+r||(0<=t&&t<=6&&(r===0||r===6)||0<=r&&r<=6&&(t===0||t===6)||2<=t&&t<=4&&2<=r&&r<=4?this.modules[i+t][e+r]=!0:this.modules[i+t][e+r]=!1)},getBestMaskPattern:function(){for(var i=0,e=0,t=0;t<8;t++){this.makeImpl(!0,t);var r=j.getLostPoint(this);(t===0||i>r)&&(i=r,e=t)}return e},createMovieClip:function(i,e,t){var r=i.createEmptyMovieClip(e,t),n=1;this.make();for(var s=0;s<this.modules.length;s++)for(var o=s*n,a=0;a<this.modules[s].length;a++){var c=a*n,l=this.modules[s][a];l&&(r.beginFill(0,100),r.moveTo(c,o),r.lineTo(c+n,o),r.lineTo(c+n,o+n),r.lineTo(c,o+n),r.endFill())}return r},setupTimingPattern:function(){for(var i=8;i<this.moduleCount-8;i++)this.modules[i][6]===null&&(this.modules[i][6]=i%2===0);for(var e=8;e<this.moduleCount-8;e++)this.modules[6][e]===null&&(this.modules[6][e]=e%2===0)},setupPositionAdjustPattern:function(){for(var i=j.getPatternPosition(this.typeNumber),e=0;e<i.length;e++)for(var t=0;t<i.length;t++){var r=i[e],n=i[t];if(this.modules[r][n]===null)for(var s=-2;s<=2;s++)for(var o=-2;o<=2;o++)Math.abs(s)===2||Math.abs(o)===2||s===0&&o===0?this.modules[r+s][n+o]=!0:this.modules[r+s][n+o]=!1}},setupTypeNumber:function(i){for(var e=j.getBCHTypeNumber(this.typeNumber),t,r=0;r<18;r++)t=!i&&(e>>r&1)===1,this.modules[Math.floor(r/3)][r%3+this.moduleCount-8-3]=t;for(var n=0;n<18;n++)t=!i&&(e>>n&1)===1,this.modules[n%3+this.moduleCount-8-3][Math.floor(n/3)]=t},setupTypeInfo:function(i,e){for(var t=this.errorCorrectLevel<<3|e,r=j.getBCHTypeInfo(t),n,s=0;s<15;s++)n=!i&&(r>>s&1)===1,s<6?this.modules[s][8]=n:s<8?this.modules[s+1][8]=n:this.modules[this.moduleCount-15+s][8]=n;for(var o=0;o<15;o++)n=!i&&(r>>o&1)===1,o<8?this.modules[8][this.moduleCount-o-1]=n:o<9?this.modules[8][15-o-1+1]=n:this.modules[8][15-o-1]=n;this.modules[this.moduleCount-8][8]=!i},mapData:function(i,e){for(var t=-1,r=this.moduleCount-1,n=7,s=0,o=this.moduleCount-1;o>0;o-=2)for(o===6&&o--;;){for(var a=0;a<2;a++)if(this.modules[r][o-a]===null){var c=!1;s<i.length&&(c=(i[s]>>>n&1)===1);var l=j.getMask(e,r,o-a);l&&(c=!c),this.modules[r][o-a]=c,n--,n===-1&&(s++,n=7)}if(r+=t,r<0||this.moduleCount<=r){r-=t,t=-t;break}}}};R.PAD0=236;R.PAD1=17;R.createData=function(i,e,t){for(var r=nr.getRSBlocks(i,e),n=new ir,s=0;s<t.length;s++){var o=t[s];n.put(o.mode,4),n.put(o.getLength(),j.getLengthInBits(o.mode,i)),o.write(n)}for(var a=0,c=0;c<r.length;c++)a+=r[c].dataCount;if(n.getLengthInBits()>a*8)throw new Error("code length overflow. ("+n.getLengthInBits()+">"+a*8+")");for(n.getLengthInBits()+4<=a*8&&n.put(0,4);n.getLengthInBits()%8!==0;)n.putBit(!1);for(;!(n.getLengthInBits()>=a*8||(n.put(R.PAD0,8),n.getLengthInBits()>=a*8));)n.put(R.PAD1,8);return R.createBytes(n,r)};R.createBytes=function(i,e){for(var t=0,r=0,n=0,s=new Array(e.length),o=new Array(e.length),a=0;a<e.length;a++){var c=e[a].dataCount,l=e[a].totalCount-c;r=Math.max(r,c),n=Math.max(n,l),s[a]=new Array(c);for(var u=0;u<s[a].length;u++)s[a][u]=255&i.buffer[u+t];t+=c;var f=j.getErrorCorrectPolynomial(l),w=new zr(s[a],f.getLength()-1),v=w.mod(f);o[a]=new Array(f.getLength()-1);for(var d=0;d<o[a].length;d++){var T=d+v.getLength()-o[a].length;o[a][d]=T>=0?v.get(T):0}}for(var $=0,p=0;p<e.length;p++)$+=e[p].totalCount;for(var E=new Array($),H=0,I=0;I<r;I++)for(var _=0;_<e.length;_++)I<s[_].length&&(E[H++]=s[_][I]);for(var m=0;m<n;m++)for(var b=0;b<e.length;b++)m<o[b].length&&(E[H++]=o[b][m]);return E};sr.exports=R});var Ze=x((Hi,cr)=>{h();var Zr=or(),ar=Ye(),en="\x1B[40m \x1B[0m",he="\x1B[47m \x1B[0m",tn=function(i){return i?en:he},ze=function(i){return{times:function(e){return new Array(e).join(i)}}},rn=function(i,e){for(var t=new Array(i),r=0;r<i;r++)t[r]=e;return t};cr.exports={error:ar.L,generate:function(i,e,t){typeof e=="function"&&(t=e,e={});var r=new Zr(-1,this.error);r.addData(i),r.make();var n="";if(e&&e.small){var s=!0,o=!1,a=r.getModuleCount(),c=r.modules.slice(),l=a%2===1;l&&c.push(rn(a,o));var u={WHITE_ALL:"\u2588",WHITE_BLACK:"\u2580",BLACK_WHITE:"\u2584",BLACK_ALL:" "},f=ze(u.BLACK_WHITE).times(a+3),w=ze(u.WHITE_BLACK).times(a+3);n+=f+`
|
|
24
|
-
`;for(var v=0;v<
|
|
25
|
-
`}l||(
|
|
26
|
-
`,r.modules.forEach(function($){
|
|
27
|
-
`}),
|
|
28
|
-
tell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`)}
|
|
20
|
+
`),this.outputHelp({error:!0}));let r=t||{},i=r.exitCode||1,s=r.code||"commander.error";this.$(i,s,e)}ae(){this.options.forEach(e=>{if(e.envVar&&e.envVar in g.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()}`,g.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}ue(){let e=new Tr(this.options),t=r=>this.getOptionValue(r)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(r));this.options.filter(r=>r.implied!==void 0&&t(r.attributeName())&&e.valueFromOption(this.getOptionValue(r.attributeName()),r)).forEach(r=>{Object.keys(r.implied).filter(i=>!t(i)).forEach(i=>{this.setOptionValueWithSource(i,r.implied[i],"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"})}ce(e,t){let r=o=>{let u=o.attributeName(),a=this.getOptionValue(u),l=this.options.find(d=>d.negate&&u===d.attributeName()),h=this.options.find(d=>!d.negate&&u===d.attributeName());return l&&(l.presetArg===void 0&&a===!1||l.presetArg!==void 0&&a===l.presetArg)?l:h||o},i=o=>{let u=r(o),a=u.attributeName();return this.getOptionValueSource(a)==="env"?`environment variable '${u.envVar}'`:`option '${u.flags}'`},s=`error: ${i(e)} cannot be used with ${i(t)}`;this.error(s,{code:"commander.conflictingOption"})}unknownOption(e){if(this._)return;let t="";if(e.startsWith("--")&&this.v){let i=[],s=this;do{let o=s.createHelp().visibleOptions(s).filter(u=>u.long).map(u=>u.long);i=i.concat(o),s=s.parent}while(s&&!s.d);t=tt(e,i)}let r=`error: unknown option '${e}'${t}`;this.error(r,{code:"commander.unknownOption"})}oe(e){if(this.b)return;let t=this.registeredArguments.length,r=t===1?"":"s",s=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${t} argument${r} but got ${e.length}.`;this.error(s,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],t="";if(this.v){let i=[];this.createHelp().visibleCommands(this).forEach(s=>{i.push(s.name()),s.alias()&&i.push(s.alias())}),t=tt(e,i)}let r=`error: unknown command '${e}'${t}`;this.error(r,{code:"commander.unknownCommand"})}version(e,t,r){if(e===void 0)return this.ee;this.ee=e,t=t||"-V, --version",r=r||"output the version number";let i=this.createOption(t,r);return this.he=i.attributeName(),this.G(i),this.on("option:"+i.name(),()=>{this.t.writeOut(`${e}
|
|
21
|
+
`),this.$(0,"commander.version",e)}),this}description(e,t){return e===void 0&&t===void 0?this.V:(this.V=e,t&&(this.D=t),this)}summary(e){return e===void 0?this.W:(this.W=e,this)}alias(e){if(e===void 0)return this.o[0];let t=this;if(this.commands.length!==0&&this.commands[this.commands.length-1].C&&(t=this.commands[this.commands.length-1]),e===t.e)throw new Error("Command alias can't be the same as its name");let r=this.parent?.s(e);if(r){let i=[r.name()].concat(r.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${i}'`)}return t.o.push(e),this}aliases(e){return e===void 0?this.o:(e.forEach(t=>this.alias(t)),this)}usage(e){if(e===void 0){if(this.te)return this.te;let t=this.registeredArguments.map(r=>Cr(r));return[].concat(this.options.length||this.i!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?t:[]).join(" ")}return this.te=e,this}name(e){return e===void 0?this.e:(this.e=e,this)}nameFromFilename(e){return this.e=B.basename(e,B.extname(e)),this}executableDir(e){return e===void 0?this.I:(this.I=e,this)}helpInformation(e){let t=this.createHelp();return t.helpWidth===void 0&&(t.helpWidth=e&&e.error?this.t.getErrHelpWidth():this.t.getOutHelpWidth()),t.formatHelp(this,t)}fe(e){e=e||{};let t={error:!!e.error},r;return t.error?r=i=>this.t.writeErr(i):r=i=>this.t.writeOut(i),t.write=e.write||r,t.command=this,t}outputHelp(e){let t;typeof e=="function"&&(t=e,e=void 0);let r=this.fe(e);this.c().reverse().forEach(s=>s.emit("beforeAllHelp",r)),this.emit("beforeHelp",r);let i=this.helpInformation(r);if(t&&(i=t(i),typeof i!="string"&&!Buffer.isBuffer(i)))throw new Error("outputHelp callback must return a string or a Buffer");r.write(i),this.h()?.long&&this.emit(this.h().long),this.emit("afterHelp",r),this.c().forEach(s=>s.emit("afterAllHelp",r))}helpOption(e,t){return typeof e=="boolean"?(e?this.i=this.i??void 0:this.i=null,this):(e=e??"-h, --help",t=t??"display help for command",this.i=this.createOption(e,t),this)}h(){return this.i===void 0&&this.helpOption(void 0,void 0),this.i}addHelpOption(e){return this.i=e,this}help(e){this.outputHelp(e);let t=g.exitCode||0;t===0&&e&&typeof e!="function"&&e.error&&(t=1),this.$(t,"commander.help","(outputHelp)")}addHelpText(e,t){let r=["beforeAll","before","after","afterAll"];if(!r.includes(e))throw new Error(`Unexpected value for position to addHelpText.
|
|
22
|
+
Expecting one of '${r.join("', '")}'`);let i=`${e}Help`;return this.on(i,s=>{let o;typeof t=="function"?o=t({error:s.error,command:s.command}):o=t,o&&s.write(`${o}
|
|
23
|
+
`)}),this}Z(e){let t=this.h();t&&e.find(i=>t.is(i))&&(this.outputHelp(),this.$(0,"commander.helpDisplayed","(outputHelp)"))}};function rt(n){return n.map(e=>{if(!e.startsWith("--inspect"))return e;let t,r="127.0.0.1",i="9229",s;return(s=e.match(/^(--inspect(-brk)?)$/))!==null?t=s[1]:(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(t=s[1],/^\d+$/.test(s[3])?i=s[3]:r=s[3]):(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=s[1],r=s[3],i=s[4]),t&&i!=="0"?`${t}=${r}:${parseInt(i)+1}`:e})}it.Command=ye});var ut=y(x=>{c();var{Argument:st}=Y(),{Command:be}=nt(),{CommanderError:Pr,InvalidArgumentError:ot}=K(),{Help:Sr}=de(),{Option:at}=we();x.program=new be;x.createCommand=n=>new be(n);x.createOption=(n,e)=>new at(n,e);x.createArgument=(n,e)=>new st(n,e);x.Command=be;x.Option=at;x.Argument=st;x.Help=Sr;x.CommanderError=Pr;x.InvalidArgumentError=ot;x.InvalidOptionArgumentError=ot});var Ve=y((mn,kt)=>{c();kt.exports={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8}});var Dt=y((gn,Mt)=>{c();var Ur=Ve();function Bt(n){this.mode=Ur.MODE_8BIT_BYTE,this.data=n}Bt.prototype={getLength:function(){return this.data.length},write:function(n){for(var e=0;e<this.data.length;e++)n.put(this.data.charCodeAt(e),8)}};Mt.exports=Bt});var We=y((vn,Rt)=>{c();var S={glog:function(n){if(n<1)throw new Error("glog("+n+")");return S.LOG_TABLE[n]},gexp:function(n){for(;n<0;)n+=255;for(;n>=256;)n-=255;return S.EXP_TABLE[n]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)};for(A=0;A<8;A++)S.EXP_TABLE[A]=1<<A;var A;for(A=8;A<256;A++)S.EXP_TABLE[A]=S.EXP_TABLE[A-4]^S.EXP_TABLE[A-5]^S.EXP_TABLE[A-6]^S.EXP_TABLE[A-8];var A;for(A=0;A<255;A++)S.LOG_TABLE[S.EXP_TABLE[A]]=A;var A;Rt.exports=S});var Ue=y((En,It)=>{c();var H=We();function ne(n,e){if(n.length===void 0)throw new Error(n.length+"/"+e);for(var t=0;t<n.length&&n[t]===0;)t++;this.num=new Array(n.length-t+e);for(var r=0;r<n.length-t;r++)this.num[r]=n[r+t]}ne.prototype={get:function(n){return this.num[n]},getLength:function(){return this.num.length},multiply:function(n){for(var e=new Array(this.getLength()+n.getLength()-1),t=0;t<this.getLength();t++)for(var r=0;r<n.getLength();r++)e[t+r]^=H.gexp(H.glog(this.get(t))+H.glog(n.get(r)));return new ne(e,0)},mod:function(n){if(this.getLength()-n.getLength()<0)return this;for(var e=H.glog(this.get(0))-H.glog(n.get(0)),t=new Array(this.getLength()),r=0;r<this.getLength();r++)t[r]=this.get(r);for(var i=0;i<n.getLength();i++)t[i]^=H.gexp(H.glog(n.get(i))+e);return new ne(t,0).mod(n)}};It.exports=ne});var _t=y((bn,Nt)=>{c();Nt.exports={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7}});var Vt=y((Cn,Ft)=>{c();var T=Ve(),Ht=Ue(),qr=We(),R=_t(),C={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(n){for(var e=n<<10;C.getBCHDigit(e)-C.getBCHDigit(C.G15)>=0;)e^=C.G15<<C.getBCHDigit(e)-C.getBCHDigit(C.G15);return(n<<10|e)^C.G15_MASK},getBCHTypeNumber:function(n){for(var e=n<<12;C.getBCHDigit(e)-C.getBCHDigit(C.G18)>=0;)e^=C.G18<<C.getBCHDigit(e)-C.getBCHDigit(C.G18);return n<<12|e},getBCHDigit:function(n){for(var e=0;n!==0;)e++,n>>>=1;return e},getPatternPosition:function(n){return C.PATTERN_POSITION_TABLE[n-1]},getMask:function(n,e,t){switch(n){case R.PATTERN000:return(e+t)%2===0;case R.PATTERN001:return e%2===0;case R.PATTERN010:return t%3===0;case R.PATTERN011:return(e+t)%3===0;case R.PATTERN100:return(Math.floor(e/2)+Math.floor(t/3))%2===0;case R.PATTERN101:return e*t%2+e*t%3===0;case R.PATTERN110:return(e*t%2+e*t%3)%2===0;case R.PATTERN111:return(e*t%3+(e+t)%2)%2===0;default:throw new Error("bad maskPattern:"+n)}},getErrorCorrectPolynomial:function(n){for(var e=new Ht([1],0),t=0;t<n;t++)e=e.multiply(new Ht([1,qr.gexp(t)],0));return e},getLengthInBits:function(n,e){if(1<=e&&e<10)switch(n){case T.MODE_NUMBER:return 10;case T.MODE_ALPHA_NUM:return 9;case T.MODE_8BIT_BYTE:return 8;case T.MODE_KANJI:return 8;default:throw new Error("mode:"+n)}else if(e<27)switch(n){case T.MODE_NUMBER:return 12;case T.MODE_ALPHA_NUM:return 11;case T.MODE_8BIT_BYTE:return 16;case T.MODE_KANJI:return 10;default:throw new Error("mode:"+n)}else if(e<41)switch(n){case T.MODE_NUMBER:return 14;case T.MODE_ALPHA_NUM:return 13;case T.MODE_8BIT_BYTE:return 16;case T.MODE_KANJI:return 12;default:throw new Error("mode:"+n)}else throw new Error("type:"+e)},getLostPoint:function(n){var e=n.getModuleCount(),t=0,r=0,i=0;for(r=0;r<e;r++)for(i=0;i<e;i++){for(var s=0,o=n.isDark(r,i),u=-1;u<=1;u++)if(!(r+u<0||e<=r+u))for(var a=-1;a<=1;a++)i+a<0||e<=i+a||u===0&&a===0||o===n.isDark(r+u,i+a)&&s++;s>5&&(t+=3+s-5)}for(r=0;r<e-1;r++)for(i=0;i<e-1;i++){var l=0;n.isDark(r,i)&&l++,n.isDark(r+1,i)&&l++,n.isDark(r,i+1)&&l++,n.isDark(r+1,i+1)&&l++,(l===0||l===4)&&(t+=3)}for(r=0;r<e;r++)for(i=0;i<e-6;i++)n.isDark(r,i)&&!n.isDark(r,i+1)&&n.isDark(r,i+2)&&n.isDark(r,i+3)&&n.isDark(r,i+4)&&!n.isDark(r,i+5)&&n.isDark(r,i+6)&&(t+=40);for(i=0;i<e;i++)for(r=0;r<e-6;r++)n.isDark(r,i)&&!n.isDark(r+1,i)&&n.isDark(r+2,i)&&n.isDark(r+3,i)&&n.isDark(r+4,i)&&!n.isDark(r+5,i)&&n.isDark(r+6,i)&&(t+=40);var h=0;for(i=0;i<e;i++)for(r=0;r<e;r++)n.isDark(r,i)&&h++;var d=Math.abs(100*h/e/e-50)/5;return t+=d*10,t}};Ft.exports=C});var qe=y((Tn,Wt)=>{c();Wt.exports={L:1,M:0,Q:3,H:2}});var qt=y((Sn,Ut)=>{c();var se=qe();function L(n,e){this.totalCount=n,this.dataCount=e}L.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];L.getRSBlocks=function(n,e){var t=L.getRsBlockTable(n,e);if(t===void 0)throw new Error("bad rs block @ typeNumber:"+n+"/errorCorrectLevel:"+e);for(var r=t.length/3,i=[],s=0;s<r;s++)for(var o=t[s*3+0],u=t[s*3+1],a=t[s*3+2],l=0;l<o;l++)i.push(new L(u,a));return i};L.getRsBlockTable=function(n,e){switch(e){case se.L:return L.RS_BLOCK_TABLE[(n-1)*4+0];case se.M:return L.RS_BLOCK_TABLE[(n-1)*4+1];case se.Q:return L.RS_BLOCK_TABLE[(n-1)*4+2];case se.H:return L.RS_BLOCK_TABLE[(n-1)*4+3];default:return}};Ut.exports=L});var Kt=y((Ln,Gt)=>{c();function jt(){this.buffer=[],this.length=0}jt.prototype={get:function(n){var e=Math.floor(n/8);return(this.buffer[e]>>>7-n%8&1)==1},put:function(n,e){for(var t=0;t<e;t++)this.putBit((n>>>e-t-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(n){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),n&&(this.buffer[e]|=128>>>this.length%8),this.length++}};Gt.exports=jt});var zt=y((Bn,Xt)=>{c();var jr=Dt(),I=Vt(),Gr=Ue(),Qt=qt(),Jt=Kt();function k(n,e){this.typeNumber=n,this.errorCorrectLevel=e,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}k.prototype={addData:function(n){var e=new jr(n);this.dataList.push(e),this.dataCache=null},isDark:function(n,e){if(n<0||this.moduleCount<=n||e<0||this.moduleCount<=e)throw new Error(n+","+e);return this.modules[n][e]},getModuleCount:function(){return this.moduleCount},make:function(){if(this.typeNumber<1){var n=1;for(n=1;n<40;n++){for(var e=Qt.getRSBlocks(n,this.errorCorrectLevel),t=new Jt,r=0,i=0;i<e.length;i++)r+=e[i].dataCount;for(var s=0;s<this.dataList.length;s++){var o=this.dataList[s];t.put(o.mode,4),t.put(o.getLength(),I.getLengthInBits(o.mode,n)),o.write(t)}if(t.getLengthInBits()<=r*8)break}this.typeNumber=n}this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(n,e){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var t=0;t<this.moduleCount;t++){this.modules[t]=new Array(this.moduleCount);for(var r=0;r<this.moduleCount;r++)this.modules[t][r]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(n,e),this.typeNumber>=7&&this.setupTypeNumber(n),this.dataCache===null&&(this.dataCache=k.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,e)},setupPositionProbePattern:function(n,e){for(var t=-1;t<=7;t++)if(!(n+t<=-1||this.moduleCount<=n+t))for(var r=-1;r<=7;r++)e+r<=-1||this.moduleCount<=e+r||(0<=t&&t<=6&&(r===0||r===6)||0<=r&&r<=6&&(t===0||t===6)||2<=t&&t<=4&&2<=r&&r<=4?this.modules[n+t][e+r]=!0:this.modules[n+t][e+r]=!1)},getBestMaskPattern:function(){for(var n=0,e=0,t=0;t<8;t++){this.makeImpl(!0,t);var r=I.getLostPoint(this);(t===0||n>r)&&(n=r,e=t)}return e},createMovieClip:function(n,e,t){var r=n.createEmptyMovieClip(e,t),i=1;this.make();for(var s=0;s<this.modules.length;s++)for(var o=s*i,u=0;u<this.modules[s].length;u++){var a=u*i,l=this.modules[s][u];l&&(r.beginFill(0,100),r.moveTo(a,o),r.lineTo(a+i,o),r.lineTo(a+i,o+i),r.lineTo(a,o+i),r.endFill())}return r},setupTimingPattern:function(){for(var n=8;n<this.moduleCount-8;n++)this.modules[n][6]===null&&(this.modules[n][6]=n%2===0);for(var e=8;e<this.moduleCount-8;e++)this.modules[6][e]===null&&(this.modules[6][e]=e%2===0)},setupPositionAdjustPattern:function(){for(var n=I.getPatternPosition(this.typeNumber),e=0;e<n.length;e++)for(var t=0;t<n.length;t++){var r=n[e],i=n[t];if(this.modules[r][i]===null)for(var s=-2;s<=2;s++)for(var o=-2;o<=2;o++)Math.abs(s)===2||Math.abs(o)===2||s===0&&o===0?this.modules[r+s][i+o]=!0:this.modules[r+s][i+o]=!1}},setupTypeNumber:function(n){for(var e=I.getBCHTypeNumber(this.typeNumber),t,r=0;r<18;r++)t=!n&&(e>>r&1)===1,this.modules[Math.floor(r/3)][r%3+this.moduleCount-8-3]=t;for(var i=0;i<18;i++)t=!n&&(e>>i&1)===1,this.modules[i%3+this.moduleCount-8-3][Math.floor(i/3)]=t},setupTypeInfo:function(n,e){for(var t=this.errorCorrectLevel<<3|e,r=I.getBCHTypeInfo(t),i,s=0;s<15;s++)i=!n&&(r>>s&1)===1,s<6?this.modules[s][8]=i:s<8?this.modules[s+1][8]=i:this.modules[this.moduleCount-15+s][8]=i;for(var o=0;o<15;o++)i=!n&&(r>>o&1)===1,o<8?this.modules[8][this.moduleCount-o-1]=i:o<9?this.modules[8][15-o-1+1]=i:this.modules[8][15-o-1]=i;this.modules[this.moduleCount-8][8]=!n},mapData:function(n,e){for(var t=-1,r=this.moduleCount-1,i=7,s=0,o=this.moduleCount-1;o>0;o-=2)for(o===6&&o--;;){for(var u=0;u<2;u++)if(this.modules[r][o-u]===null){var a=!1;s<n.length&&(a=(n[s]>>>i&1)===1);var l=I.getMask(e,r,o-u);l&&(a=!a),this.modules[r][o-u]=a,i--,i===-1&&(s++,i=7)}if(r+=t,r<0||this.moduleCount<=r){r-=t,t=-t;break}}}};k.PAD0=236;k.PAD1=17;k.createData=function(n,e,t){for(var r=Qt.getRSBlocks(n,e),i=new Jt,s=0;s<t.length;s++){var o=t[s];i.put(o.mode,4),i.put(o.getLength(),I.getLengthInBits(o.mode,n)),o.write(i)}for(var u=0,a=0;a<r.length;a++)u+=r[a].dataCount;if(i.getLengthInBits()>u*8)throw new Error("code length overflow. ("+i.getLengthInBits()+">"+u*8+")");for(i.getLengthInBits()+4<=u*8&&i.put(0,4);i.getLengthInBits()%8!==0;)i.putBit(!1);for(;!(i.getLengthInBits()>=u*8||(i.put(k.PAD0,8),i.getLengthInBits()>=u*8));)i.put(k.PAD1,8);return k.createBytes(i,r)};k.createBytes=function(n,e){for(var t=0,r=0,i=0,s=new Array(e.length),o=new Array(e.length),u=0;u<e.length;u++){var a=e[u].dataCount,l=e[u].totalCount-a;r=Math.max(r,a),i=Math.max(i,l),s[u]=new Array(a);for(var h=0;h<s[u].length;h++)s[u][h]=255&n.buffer[h+t];t+=a;var d=I.getErrorCorrectPolynomial(l),w=new Gr(s[u],d.getLength()-1),v=w.mod(d);o[u]=new Array(d.getLength()-1);for(var f=0;f<o[u].length;f++){var b=f+v.getLength()-o[u].length;o[u][f]=b>=0?v.get(b):0}}for(var $=0,p=0;p<e.length;p++)$+=e[p].totalCount;for(var O=new Array($),W=0,G=0;G<r;G++)for(var U=0;U<e.length;U++)G<s[U].length&&(O[W++]=s[U][G]);for(var J=0;J<i;J++)for(var X=0;X<e.length;X++)J<o[X].length&&(O[W++]=o[X][J]);return O};Xt.exports=k});var er=y((Dn,Zt)=>{c();var Kr=zt(),Yt=qe(),Qr="\x1B[40m \x1B[0m",oe="\x1B[47m \x1B[0m",Jr=function(n){return n?Qr:oe},je=function(n){return{times:function(e){return new Array(e).join(n)}}},Xr=function(n,e){for(var t=new Array(n),r=0;r<n;r++)t[r]=e;return t};Zt.exports={error:Yt.L,generate:function(n,e,t){typeof e=="function"&&(t=e,e={});var r=new Kr(-1,this.error);r.addData(n),r.make();var i="";if(e&&e.small){var s=!0,o=!1,u=r.getModuleCount(),a=r.modules.slice(),l=u%2===1;l&&a.push(Xr(u,o));var h={WHITE_ALL:"\u2588",WHITE_BLACK:"\u2580",BLACK_WHITE:"\u2584",BLACK_ALL:" "},d=je(h.BLACK_WHITE).times(u+3),w=je(h.WHITE_BLACK).times(u+3);i+=d+`
|
|
24
|
+
`;for(var v=0;v<u;v+=2){i+=h.WHITE_ALL;for(var f=0;f<u;f++)a[v][f]===o&&a[v+1][f]===o?i+=h.WHITE_ALL:a[v][f]===o&&a[v+1][f]===s?i+=h.WHITE_BLACK:a[v][f]===s&&a[v+1][f]===o?i+=h.BLACK_WHITE:i+=h.BLACK_ALL;i+=h.WHITE_ALL+`
|
|
25
|
+
`}l||(i+=w)}else{var b=je(oe).times(r.getModuleCount()+3);i+=b+`
|
|
26
|
+
`,r.modules.forEach(function($){i+=oe,i+=$.map(Jr).join(""),i+=oe+`
|
|
27
|
+
`}),i+=b}t?t(i):console.log(i)},setErrorLevel:function(n){this.error=Yt[n]||this.error}}});c();var rr=require("child_process");c();var lt=E(ut(),1),{program:yi,createCommand:bi,createArgument:Oi,createOption:Ci,CommanderError:xi,InvalidArgumentError:Ti,InvalidOptionArgumentError:Pi,Command:ct,Argument:Si,Option:$i,Help:Li}=lt.default;var P=E(require("fs"),1);c();var Ie=E(require("node:process"),1),Ne=require("node:buffer"),_e=E(require("node:path"),1),$t=require("node:url"),Lt=require("node:util"),He=E(require("node:child_process"),1),re=E(require("node:fs/promises"),1);c();var Se=E(require("node:process"),1),Q=E(require("node:fs/promises"),1);c();var Pe=E(require("node:process"),1),dt=E(require("node:os"),1),mt=E(require("node:fs"),1);c();var ht=E(require("node:fs"),1);c();var Ce=E(require("node:fs"),1),Oe;function $r(){try{return Ce.default.statSync("/.dockerenv"),!0}catch{return!1}}function Lr(){try{return Ce.default.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}function xe(){return Oe===void 0&&(Oe=$r()||Lr()),Oe}var Te,kr=()=>{try{return ht.default.statSync("/run/.containerenv"),!0}catch{return!1}};function q(){return Te===void 0&&(Te=kr()||xe()),Te}var ft=()=>{if(Pe.default.platform!=="linux")return!1;if(dt.default.release().toLowerCase().includes("microsoft"))return!q();try{return mt.default.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft")?!q():!1}catch{return!1}},M=Pe.default.env.me?ft:ft();var Br=(()=>{let n="/mnt/",e;return async function(){if(e)return e;let t="/etc/wsl.conf",r=!1;try{await Q.default.access(t,Q.constants.F_OK),r=!0}catch{}if(!r)return n;let i=await Q.default.readFile(t,{encoding:"utf8"}),s=/(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(i);return s?(e=s.groups.mountPoint.trim(),e=e.endsWith("/")?e:`${e}/`,e):n}})(),Mr=async()=>`${await Br()}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`,$e=async()=>M?Mr():`${Se.default.env.SYSTEMROOT||Se.default.env.windir||String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`;c();function D(n,e,t){let r=i=>Object.defineProperty(n,e,{value:i,enumerable:!0,writable:!0});return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get(){let i=t();return r(i),i},set(i){r(i)}}),n}c();var Ot=require("node:util"),ee=E(require("node:process"),1),Ct=require("node:child_process");c();var pt=require("node:util"),gt=E(require("node:process"),1),wt=require("node:child_process"),Dr=(0,pt.promisify)(wt.execFile);async function Le(){if(gt.default.platform!=="darwin")throw new Error("macOS only");let{stdout:n}=await Dr("defaults",["read","com.apple.LaunchServices/com.apple.launchservices.secure","LSHandlers"]);return/LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(n)?.groups.id??"com.apple.Safari"}c();c();var vt=E(require("node:process"),1),At=require("node:util"),ke=require("node:child_process"),Rr=(0,At.promisify)(ke.execFile);async function Et(n,{humanReadableOutput:e=!0,signal:t}={}){if(vt.default.platform!=="darwin")throw new Error("macOS only");let r=e?[]:["-ss"],i={};t&&(i.signal=t);let{stdout:s}=await Rr("osascript",["-e",n,r],i);return s.trim()}async function Be(n){return Et(`tell application "Finder" to set app_path to application file id "${n}" as string
|
|
28
|
+
tell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`)}c();var yt=require("node:util"),bt=require("node:child_process"),Ir=(0,yt.promisify)(bt.execFile),Nr={AppXq0fevzme2pys62n3e0fbqa7peapykr8v:{name:"Edge",id:"com.microsoft.edge.old"},MSEdgeDHTML:{name:"Edge",id:"com.microsoft.edge"},MSEdgeHTM:{name:"Edge",id:"com.microsoft.edge"},"IE.HTTP":{name:"Internet Explorer",id:"com.microsoft.ie"},FirefoxURL:{name:"Firefox",id:"org.mozilla.firefox"},ChromeHTML:{name:"Chrome",id:"com.google.chrome"},BraveHTML:{name:"Brave",id:"com.brave.Browser"},BraveBHTML:{name:"Brave Beta",id:"com.brave.Browser.beta"},BraveSSHTM:{name:"Brave Nightly",id:"com.brave.Browser.nightly"}},Z=class extends Error{};async function Me(n=Ir){let{stdout:e}=await n("reg",["QUERY"," HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice","/v","ProgId"]),t=/ProgId\s*REG_SZ\s*(?<id>\S+)/.exec(e);if(!t)throw new Z(`Cannot find Windows browser in stdout: ${JSON.stringify(e)}`);let{id:r}=t.groups,i=Nr[r];if(!i)throw new Z(`Unknown browser ID: ${r}`);return i}var _r=(0,Ot.promisify)(Ct.execFile),Hr=n=>n.toLowerCase().replaceAll(/(?:^|\s|-)\S/g,e=>e.toUpperCase());async function De(){if(ee.default.platform==="darwin"){let n=await Le();return{name:await Be(n),id:n}}if(ee.default.platform==="linux"){let{stdout:n}=await _r("xdg-mime",["query","default","x-scheme-handler/http"]),e=n.trim();return{name:Hr(e.replace(/.desktop$/,"").replace("-"," ")),id:e}}if(ee.default.platform==="win32")return Me();throw new Error("Only macOS, Linux, and Windows are supported")}var Fr=(0,Lt.promisify)(He.default.execFile),Re=_e.default.dirname((0,$t.fileURLToPath)(m)),xt=_e.default.join(Re,"xdg-open"),{platform:j,arch:Tt}=Ie.default;async function Vr(){let n=await $e(),e=String.raw`(Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice").ProgId`,t=Ne.Buffer.from(e,"utf16le").toString("base64"),{stdout:r}=await Fr(n,["-NoProfile","-NonInteractive","-ExecutionPolicy","Bypass","-EncodedCommand",t],{encoding:"utf8"}),i=r.trim(),s={ChromeHTML:"com.google.chrome",BraveHTML:"com.brave.Browser",MSEdgeHTM:"com.microsoft.edge",FirefoxURL:"org.mozilla.firefox"};return s[i]?{id:s[i]}:{}}var Pt=async(n,e)=>{let t;for(let r of n)try{return await e(r)}catch(i){t=i}throw t},te=async n=>{if(n={wait:!1,background:!1,newInstance:!1,allowNonzeroExitCode:!1,...n},Array.isArray(n.app))return Pt(n.app,u=>te({...n,app:u}));let{name:e,arguments:t=[]}=n.app??{};if(t=[...t],Array.isArray(e))return Pt(e,u=>te({...n,app:{name:u,arguments:t}}));if(e==="browser"||e==="browserPrivate"){let u={"com.google.chrome":"chrome","google-chrome.desktop":"chrome","com.brave.Browser":"brave","org.mozilla.firefox":"firefox","firefox.desktop":"firefox","com.microsoft.msedge":"edge","com.microsoft.edge":"edge","com.microsoft.edgemac":"edge","microsoft-edge.desktop":"edge"},a={chrome:"--incognito",brave:"--incognito",firefox:"--private-window",edge:"--inPrivate"},l=M?await Vr():await De();if(l.id in u){let h=u[l.id];return e==="browserPrivate"&&t.push(a[h]),te({...n,app:{name:_[h],arguments:t}})}throw new Error(`${l.name} is not supported as a default browser`)}let r,i=[],s={};if(j==="darwin")r="open",n.wait&&i.push("--wait-apps"),n.background&&i.push("--background"),n.newInstance&&i.push("--new"),e&&i.push("-a",e);else if(j==="win32"||M&&!q()&&!e){r=await $e(),i.push("-NoProfile","-NonInteractive","-ExecutionPolicy","Bypass","-EncodedCommand"),M||(s.windowsVerbatimArguments=!0);let u=["Start"];n.wait&&u.push("-Wait"),e?(u.push(`"\`"${e}\`""`),n.target&&t.push(n.target)):n.target&&u.push(`"${n.target}"`),t.length>0&&(t=t.map(a=>`"\`"${a}\`""`),u.push("-ArgumentList",t.join(","))),n.target=Ne.Buffer.from(u.join(" "),"utf16le").toString("base64")}else{if(e)r=e;else{let u=!Re||Re==="/",a=!1;try{await re.default.access(xt,re.constants.X_OK),a=!0}catch{}r=Ie.default.versions.electron??(j==="android"||u||!a)?"xdg-open":xt}t.length>0&&i.push(...t),n.wait||(s.stdio="ignore",s.detached=!0)}j==="darwin"&&t.length>0&&i.push("--args",...t),n.target&&i.push(n.target);let o=He.default.spawn(r,i,s);return n.wait?new Promise((u,a)=>{o.once("error",a),o.once("close",l=>{if(!n.allowNonzeroExitCode&&l>0){a(new Error(`Exited with code ${l}`));return}u(o)})}):(o.unref(),o)},Wr=(n,e)=>{if(typeof n!="string")throw new TypeError("Expected a `target`");return te({...e,target:n})};function St(n){if(typeof n=="string"||Array.isArray(n))return n;let{[Tt]:e}=n;if(!e)throw new Error(`${Tt} is not supported`);return e}function ie({[j]:n},{wsl:e}){if(e&&M)return St(e);if(!n)throw new Error(`${j} is not supported`);return St(n)}var _={};D(_,"chrome",()=>ie({darwin:"google chrome",win32:"chrome",linux:["google-chrome","google-chrome-stable","chromium"]},{wsl:{ia32:"/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",x64:["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe","/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]}}));D(_,"brave",()=>ie({darwin:"brave browser",win32:"brave",linux:["brave-browser","brave"]},{wsl:{ia32:"/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe",x64:["/mnt/c/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe","/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe"]}}));D(_,"firefox",()=>ie({darwin:"firefox",win32:String.raw`C:\Program Files\Mozilla Firefox\firefox.exe`,linux:"firefox"},{wsl:"/mnt/c/Program Files/Mozilla Firefox/firefox.exe"}));D(_,"edge",()=>ie({darwin:"microsoft edge",win32:"msedge",linux:["microsoft-edge","microsoft-edge-dev"]},{wsl:"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"}));D(_,"browser",()=>"browser");D(_,"browserPrivate",()=>"browserPrivate");var Fe=Wr;var Ge=E(require("os"),1),N=E(require("path"),1),ae=process.env.POKE_API??"https://poke.com/api/v1",ir=process.env.POKE_FRONTEND??"https://poke.com",zr=`
|
|
29
29
|
@@@@@@@ @@@@@@@@
|
|
30
30
|
@@@@@@@@@@@@ @@@@@@@@@@@@@
|
|
31
31
|
@@@@@@@@@@ @@@@@@@@@@
|
|
@@ -51,12 +51,12 @@ tell application "System Events" to get value of property list item "CFBundleNam
|
|
|
51
51
|
@@@@
|
|
52
52
|
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
|
53
53
|
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
|
54
|
-
`;function
|
|
55
|
-
`);let e=await fetch(`${
|
|
54
|
+
`;function Ke(){let n=process.env.XDG_CONFIG_HOME;return n?N.default.join(n,"poke"):N.default.join(Ge.default.homedir(),".config","poke")}function Qe(){return N.default.join(Ke(),"credentials.json")}function Yr(n){let e=Ke(),t=Qe();P.default.mkdirSync(e,{recursive:!0});let r={token:n};P.default.writeFileSync(t,JSON.stringify(r,null,2));try{P.default.chmodSync(t,384)}catch{}}function nr(){try{let n=P.default.readFileSync(Qe(),"utf-8");return JSON.parse(n)}catch{return null}}function sr(){try{P.default.unlinkSync(Qe())}catch{}}async function F(n,e={}){let t=nr();t?.token||(console.error("Not logged in. Run 'poke login'."),process.exit(1));let r=new Headers(e.headers);r.set("Authorization",`Bearer ${t.token}`);let i=await fetch(`${ae}${n}`,{...e,headers:r});return i.status===401&&(sr(),console.error("Session expired. Run 'poke login' again."),process.exit(1)),i}function or(n){return new Promise(e=>setTimeout(e,n))}async function Zr(){if(nr()?.token){console.log("Already logged in. Run 'poke logout' first to switch accounts.");return}console.log(zr),console.log(`Starting login...
|
|
55
|
+
`);let e=await fetch(`${ae}/cli-auth/code`,{method:"POST"});e.ok||(console.error("Failed to create login code"),process.exit(1));let{deviceCode:t,userCode:r}=await e.json(),i=`${ir}/device?code=${encodeURIComponent(r)}`;console.log(`Your login code is:
|
|
56
56
|
`),console.log(` ${r}
|
|
57
|
-
`),console.log(`Opening
|
|
58
|
-
`),console.log(`
|
|
59
|
-
`),console.log("Waiting for authentication...");try{await
|
|
57
|
+
`),console.log(`Opening browser...
|
|
58
|
+
`),console.log(`Confirm the login in your browser.
|
|
59
|
+
`),console.log("Waiting for authentication...");try{await Fe(i)}catch{}let s=5*60*1e3,o=2e3,u=Date.now()+s;for(;Date.now()<u;){await or(o);let l=await(await fetch(`${ae}/cli-auth/poll/${t}`)).json();if(l.status==="authenticated"){Yr(l.token),console.log(`
|
|
60
60
|
\u2713 Logged in successfully!
|
|
61
61
|
`);return}l.status==="expired"&&(console.error(`
|
|
62
62
|
Code expired. Run 'poke login' again.
|
|
@@ -64,133 +64,36 @@ Code expired. Run 'poke login' again.
|
|
|
64
64
|
Invalid code. Run 'poke login' again.
|
|
65
65
|
`),process.exit(1)),process.stdout.write(".")}console.error(`
|
|
66
66
|
Login timed out. Run 'poke login' again.
|
|
67
|
-
`),process.exit(1)}async function
|
|
67
|
+
`),process.exit(1)}async function ei(){sr(),console.log("Logged out.")}async function ti(){let n=await F("/user/profile");n.ok||(console.error("Failed to fetch profile"),process.exit(1));let e=await n.json();console.log(e.name??e.email??e.id??"Logged in")}var V=new ct;V.name("poke").description("Poke CLI - Create tunnels to expose local servers").version("0.1.0");V.command("login").description("Log in to Poke").action(Zr);V.command("logout").description("Log out").action(ei);V.command("whoami").description("Show current user").action(ti);var tr="0.7.0";function ri(){let n=process.env.XDG_CACHE_HOME;return n?N.default.join(n,"poke","bin"):N.default.join(Ge.default.homedir(),".cache","poke","bin")}async function ii(){let n=ri(),e=N.default.join(n,`piko-${tr}`);if(P.default.existsSync(e))return e;if(P.default.mkdirSync(n,{recursive:!0}),process.platform==="win32")throw new Error("Windows is not supported yet. Use WSL instead.");let t=process.platform==="darwin"?"darwin":"linux",r=process.arch==="arm64"?"arm64":"amd64",i=`https://github.com/andydunstall/piko/releases/download/v${tr}/piko-${t}-${r}`;console.log("Downloading tunnel agent...");let s=await fetch(i,{redirect:"follow"});if(!s.ok)throw new Error(`Failed to download tunnel agent: ${s.status}`);let o=await s.arrayBuffer();return P.default.writeFileSync(e,Buffer.from(o)),P.default.chmodSync(e,493),e}var ni=V.command("mcp").description("Manage MCP server connections");ni.command("add").description("Add an MCP server connection").argument("<url>","MCP server URL").requiredOption("-n, --name <name>","Display name for the connection").option("-k, --api-key <key>","API key if the server requires one").action(async(n,e)=>{let t={name:e.name,serverUrl:n};e.apiKey&&(t.apiKey=e.apiKey);let r=await F("/mcp/connections/cli",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!r.ok){let o=await r.text(),u={};try{u=JSON.parse(o)}catch{}u.error==="OAUTH_REQUIRED"&&(console.error(`
|
|
68
68
|
This MCP server requires OAuth authentication.`),console.error(`Add it from the web app instead.
|
|
69
69
|
`),process.exit(1)),console.error(`
|
|
70
|
-
Failed to add MCP connection: ${
|
|
71
|
-
`),process.exit(1)}let
|
|
72
|
-
MCP connection added successfully!`),console.log(` Name: ${
|
|
73
|
-
`)});
|
|
74
|
-
Invalid URL: ${
|
|
75
|
-
`),process.exit(1)}let r={name:e.name,serverUrl:
|
|
76
|
-
Failed to create tunnel: ${
|
|
77
|
-
`),process.exit(1)}let s=await
|
|
70
|
+
Failed to add MCP connection: ${u.message??`HTTP ${r.status}`}
|
|
71
|
+
`),process.exit(1)}let i=await r.json(),s=Array.isArray(i.tools)?i.tools.length:0;console.log(`
|
|
72
|
+
MCP connection added successfully!`),console.log(` Name: ${i.name}`),console.log(` Server URL: ${i.serverUrl}`),console.log(` Tools: ${s}
|
|
73
|
+
`)});V.command("tunnel").description("Forward a local port to Poke (start your MCP server separately, then tunnel that port)").argument("<url>","Local MCP server URL (e.g. http://localhost:3000/mcp)").requiredOption("-n, --name <name>","Display name for the connection").option("--recipe","Create a shareable recipe with QR code").option("--client-id <id>","OAuth client ID").option("--client-secret <secret>","OAuth client secret").action(async(n,e)=>{let t;try{t=new URL(n)}catch{console.error(`
|
|
74
|
+
Invalid URL: ${n}
|
|
75
|
+
`),process.exit(1)}let r={name:e.name,serverUrl:n,tunnel:!0};e.clientId&&(r.clientId=e.clientId),e.clientSecret&&(r.clientSecret=e.clientSecret);let i=await F("/mcp/connections/cli",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(!i.ok){let p=await i.text(),O=`HTTP ${i.status}`;try{O=JSON.parse(p).message??O}catch{}console.error(`
|
|
76
|
+
Failed to create tunnel: ${O}
|
|
77
|
+
`),process.exit(1)}let s=await i.json();(!s.tunnel?.token||!s.tunnel?.upstreamUrl)&&(console.error(`
|
|
78
78
|
Tunnel configuration not available.
|
|
79
|
-
`),process.exit(1));let o;try{o=await
|
|
79
|
+
`),process.exit(1));let o;try{o=await ii()}catch(p){console.error(`
|
|
80
80
|
Failed to download tunnel agent: ${p instanceof Error?p.message:p}
|
|
81
|
-
`),process.exit(1)}let
|
|
81
|
+
`),process.exit(1)}let u=t.host,a=(0,rr.spawn)(o,["agent","http",s.id,u,"--connect.url",s.tunnel.upstreamUrl,"--connect.token",s.tunnel.token]);a.on("error",p=>{console.error(`
|
|
82
82
|
Failed to start tunnel agent: ${p.message}
|
|
83
|
-
`),process.exit(1)});let l=
|
|
84
|
-
Tunnel agent failed to start (exit ${
|
|
83
|
+
`),process.exit(1)});let l=Ke();P.default.mkdirSync(l,{recursive:!0});let h=P.default.createWriteStream(N.default.join(l,"error.log"),{flags:"a"});a.stderr?.on("data",p=>h.write(p)),await or(2e3),a.exitCode!==null&&(console.error(`
|
|
84
|
+
Tunnel agent failed to start (exit ${a.exitCode}).
|
|
85
85
|
`),process.exit(1)),console.log(`
|
|
86
86
|
Tunnel is active!
|
|
87
|
-
`),console.log(` Tunnel URL: ${s.serverUrl}`),console.log(` Local: ${
|
|
87
|
+
`),console.log(` Tunnel URL: ${s.serverUrl}`),console.log(` Local: ${n}`),console.log(` Name: ${s.name}`);let d=async()=>{try{let p=await F(`/mcp/connections/${s.id}/sync-tools`,{method:"POST"});p.ok?console.log(`[${new Date().toLocaleTimeString()}] Tools synced.`):console.error(`[${new Date().toLocaleTimeString()}] Tool sync failed (HTTP ${p.status}).`)}catch{console.error(`[${new Date().toLocaleTimeString()}] Tool sync failed.`)}},w=await F(`/mcp/connections/${s.id}/activate-tunnel`,{method:"POST"});if(w.ok){let p=await w.json();if(p.status==="authenticated")console.log(`[${new Date().toLocaleTimeString()}] Connection activated and tools synced.`);else if(p.status==="oauth_required"){console.log(`
|
|
88
88
|
This MCP server requires OAuth authentication.
|
|
89
89
|
`),console.log(` Auth URL: ${p.authUrl}
|
|
90
|
-
`);try{await
|
|
90
|
+
`);try{await Fe(p.authUrl)}catch{}}}else console.error(`[${new Date().toLocaleTimeString()}] Activation failed (HTTP ${w.status}). Falling back to periodic sync.`),await d();if(e.recipe){let p=s.recipe?.link;if(!p){let O=await F(`/mcp/connections/${s.id}/create-recipe`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e.name})});O.ok?p=(await O.json()).link:console.error(`[${new Date().toLocaleTimeString()}] Failed to create recipe (HTTP ${O.status}).`)}if(p){let O=new URL(ae).origin;p=p.replace(O,ir),console.log(`
|
|
91
91
|
Recipe: ${p}
|
|
92
92
|
`),console.log(`Share this recipe link so others can use your tunnel:
|
|
93
|
-
`);let
|
|
94
|
-
`);let v=setInterval(
|
|
95
|
-
Removing MCP connection...`);try{await
|
|
93
|
+
`);let W=await Promise.resolve().then(()=>E(er(),1));(W.default??W).generate(p,{small:!0},U=>{console.log(U)})}}console.log(`Press Ctrl+C to stop the tunnel.
|
|
94
|
+
`);let v=setInterval(d,5*60*1e3),f=!1,b=async()=>{if(!f){f=!0,clearInterval(v),console.log(`
|
|
95
|
+
Removing MCP connection...`);try{await F(`/mcp/connections/${s.id}`,{method:"DELETE"}),console.log(`MCP connection removed.
|
|
96
96
|
`)}catch{console.error(`Failed to remove MCP connection.
|
|
97
|
-
`)}
|
|
98
|
-
Tunnel stopped${
|
|
99
|
-
`),p(
|
|
100
|
-
|
|
101
|
-
Install it with:
|
|
102
|
-
curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
103
|
-
`),process.exit(1));let r=process.cwd(),n=await un(parseInt(i.port,10)),s=M.default.join(r,"poke-mcp");O.default.existsSync(s)&&(s=M.default.join(r,`poke-mcp-${Date.now()}`)),O.default.mkdirSync(s,{recursive:!0});let o=`You are generating an MCP server that wraps the functionality of the software project in the current directory.
|
|
104
|
-
|
|
105
|
-
## Your Task
|
|
106
|
-
|
|
107
|
-
1. **Explore the project** to understand what it does:
|
|
108
|
-
- Read package.json, pyproject.toml, Cargo.toml, go.mod, Makefile, or similar project files
|
|
109
|
-
- Look at the directory structure using Glob
|
|
110
|
-
- Read important source files to understand the main functionality
|
|
111
|
-
|
|
112
|
-
2. **Identify 5-10 capabilities** that would be most useful to expose as MCP tools. Focus on:
|
|
113
|
-
- Build, test, and lint commands
|
|
114
|
-
- Key APIs or functions the project provides
|
|
115
|
-
- Data processing or transformation capabilities
|
|
116
|
-
- File generation or manipulation features
|
|
117
|
-
|
|
118
|
-
3. **Generate a Python FastMCP server**. Write exactly TWO files:
|
|
119
|
-
|
|
120
|
-
**File 1: ${s}/requirements.txt**
|
|
121
|
-
\`\`\`
|
|
122
|
-
fastmcp>=2.0.0
|
|
123
|
-
\`\`\`
|
|
124
|
-
|
|
125
|
-
**File 2: ${s}/server.py**
|
|
126
|
-
- Use FastMCP with Streamable HTTP transport
|
|
127
|
-
- Run on 0.0.0.0:${n}
|
|
128
|
-
- Each tool should have a descriptive name and docstring
|
|
129
|
-
- Use subprocess.run() with cwd="${r}" for shell commands
|
|
130
|
-
- Handle errors gracefully and return useful string results
|
|
131
|
-
|
|
132
|
-
Example structure:
|
|
133
|
-
\`\`\`python
|
|
134
|
-
import subprocess
|
|
135
|
-
from fastmcp import FastMCP
|
|
136
|
-
|
|
137
|
-
mcp = FastMCP("Project Name")
|
|
138
|
-
|
|
139
|
-
@mcp.tool()
|
|
140
|
-
def run_tests() -> str:
|
|
141
|
-
"""Run the project's test suite."""
|
|
142
|
-
result = subprocess.run(["npm", "test"], capture_output=True, text=True, cwd="${r}")
|
|
143
|
-
return result.stdout + result.stderr
|
|
144
|
-
|
|
145
|
-
if __name__ == "__main__":
|
|
146
|
-
mcp.run(transport="streamable-http", host="0.0.0.0", port=${n})
|
|
147
|
-
\`\`\`
|
|
148
|
-
|
|
149
|
-
4. **After writing the files**, use Bash to install dependencies and start the server:
|
|
150
|
-
\`\`\`bash
|
|
151
|
-
cd ${s} && uv venv .venv && uv pip install -r requirements.txt -p .venv/bin/python
|
|
152
|
-
\`\`\`
|
|
153
|
-
Then start the server in the background:
|
|
154
|
-
\`\`\`bash
|
|
155
|
-
${s}/.venv/bin/python ${s}/server.py &
|
|
156
|
-
\`\`\`
|
|
157
|
-
|
|
158
|
-
5. **Important constraints:**
|
|
159
|
-
- Write ONLY to ${s}/ \u2014 never modify the original project
|
|
160
|
-
- Use absolute paths when writing files
|
|
161
|
-
- Include proper error handling in every tool
|
|
162
|
-
- Tools should work with the project as-is
|
|
163
|
-
- You MUST install deps and start the server using the Bash tool before finishing${i.prompt?`
|
|
164
|
-
|
|
165
|
-
## Additional Instructions from the User
|
|
166
|
-
|
|
167
|
-
${i.prompt}`:""}`;console.log(`Analyzing project and generating MCP server...
|
|
168
|
-
`);try{let{query:m}=await import("@anthropic-ai/claude-agent-sdk");for await(let b of m({prompt:o,options:{cwd:r,allowedTools:["Read","Write","Bash","Glob","Grep"],permissionMode:"bypassPermissions",allowDangerouslySkipPermissions:!0,maxTurns:30,env:{...process.env,ANTHROPIC_BASE_URL:`${Y}/ai-proxy`,ANTHROPIC_API_KEY:e.token}}}))if(b.type,b.type==="result"){let Q=b;if(Q.subtype!=="success"){let pe=(Q.errors??[]).filter(N=>!N.includes("events failed to export")&&!N.includes("Failed to export")&&!N.includes("1P event logging")&&!N.includes("only prompt commands are supported")&&!N.includes("405 status code")&&!N.includes("404")&&!N.includes("EISDIR"));pe.length>0&&(console.error(`
|
|
169
|
-
Failed to generate MCP server:`,pe),process.exit(1))}}}catch(m){console.error(`
|
|
170
|
-
Failed to run AI agent: ${m instanceof Error?m.message:m}`),console.error("Make sure @anthropic-ai/claude-agent-sdk is installed."),process.exit(1)}console.log(`
|
|
171
|
-
`);try{await hn(n,1e4)}catch{console.error("MCP server is not running. The agent may have failed to start it."),process.exit(1)}console.log(`MCP server is running on port ${n}!
|
|
172
|
-
`);let a=`http://localhost:${n}/mcp`,c=Math.random().toString(36).slice(2,6),l=i.name??`${M.default.basename(r)}-${c}`,u=await k("/mcp/connections/cli",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:l,serverUrl:a,tunnel:!0})});if(!u.ok){let m=await u.text(),b=`HTTP ${u.status}`;try{b=JSON.parse(m).message??b}catch{}console.error(`
|
|
173
|
-
Failed to create tunnel: ${b}
|
|
174
|
-
`),process.exit(1)}let f=await u.json();(!f.tunnel?.token||!f.tunnel?.upstreamUrl)&&(console.error(`
|
|
175
|
-
Tunnel configuration not available.
|
|
176
|
-
`),process.exit(1));let w;try{w=await fr()}catch(m){console.error(`
|
|
177
|
-
Failed to download tunnel agent: ${m instanceof Error?m.message:m}
|
|
178
|
-
`),process.exit(1)}let v=new URL(a).host,d=(0,ee.spawn)(w,["agent","http",f.id,v,"--connect.url",f.tunnel.upstreamUrl,"--connect.token",f.tunnel.token]);d.on("error",m=>{console.error(`
|
|
179
|
-
Failed to start tunnel agent: ${m.message}
|
|
180
|
-
`),process.exit(1)});let T=me();O.default.mkdirSync(T,{recursive:!0});let $=O.default.createWriteStream(M.default.join(T,"error.log"),{flags:"a"});d.stderr?.on("data",m=>$.write(m)),await nt(2e3),d.exitCode!==null&&(console.error(`
|
|
181
|
-
Tunnel agent failed to start (exit ${d.exitCode}).
|
|
182
|
-
`),process.exit(1)),console.log(`Tunnel is active!
|
|
183
|
-
`),console.log(` Tunnel URL: ${f.serverUrl}`),console.log(` Local: ${a}`),console.log(` Name: ${l}
|
|
184
|
-
`);{let m=f.recipe?.link;if(!m){let b=await k(`/mcp/connections/${f.id}/create-recipe`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:l})});b.ok?m=(await b.json()).link:console.error(`[${new Date().toLocaleTimeString()}] Failed to create recipe (HTTP ${b.status}).`)}if(m){let b=new URL(Y).origin;m=m.replace(b,tt),console.log(`
|
|
185
|
-
Recipe: ${m}
|
|
186
|
-
`),console.log(`Share this recipe link so others can use your tunnel:
|
|
187
|
-
`);let Q=await Promise.resolve().then(()=>y(Ze(),1));(Q.default??Q).generate(m,{small:!0},N=>{console.log(N)})}}console.log(`Press Ctrl+C to stop.
|
|
188
|
-
`);let p=async()=>{try{let m=await k(`/mcp/connections/${f.id}/sync-tools`,{method:"POST"});m.ok?console.log(`[${new Date().toLocaleTimeString()}] Tools synced.`):console.error(`[${new Date().toLocaleTimeString()}] Tool sync failed (HTTP ${m.status}).`)}catch{console.error(`[${new Date().toLocaleTimeString()}] Tool sync failed.`)}},E=await k(`/mcp/connections/${f.id}/activate-tunnel`,{method:"POST"});if(E.ok){let m=await E.json();if(m.status==="authenticated")console.log(`[${new Date().toLocaleTimeString()}] Connection activated and tools synced.`);else if(m.status==="oauth_required"){console.log(`
|
|
189
|
-
This MCP server requires OAuth authentication.
|
|
190
|
-
`),console.log(` Auth URL: ${m.authUrl}
|
|
191
|
-
`);try{await ce(m.authUrl)}catch{}}}else console.error(`[${new Date().toLocaleTimeString()}] Activation failed (HTTP ${E.status}). Falling back to periodic sync.`),await p();let H=setInterval(p,5*60*1e3),I=!1,_=async()=>{if(!I){I=!0,clearInterval(H),console.log(`
|
|
192
|
-
Removing MCP connection...`);try{await k(`/mcp/connections/${f.id}`,{method:"DELETE"}),console.log(`MCP connection removed.
|
|
193
|
-
`)}catch{console.error(`Failed to remove MCP connection.
|
|
194
|
-
`)}d.exitCode===null&&d.kill(),process.exit(0)}};process.on("SIGINT",_),process.on("SIGTERM",_),await new Promise(m=>{d.on("exit",b=>{console.log(`
|
|
195
|
-
Tunnel stopped${b?` (exit ${b})`:""}.
|
|
196
|
-
`),m()})}),I||process.exit(0)});process.argv.length<=2&&process.argv.push("wrap");q.parse();
|
|
97
|
+
`)}a.exitCode===null&&a.kill(),process.exit(0)}};process.on("SIGINT",b),process.on("SIGTERM",b);let $=await new Promise(p=>{a.on("exit",O=>{console.log(`
|
|
98
|
+
Tunnel stopped${O?` (exit ${O})`:""}.
|
|
99
|
+
`),p(O??0)})});f||process.exit($)});V.parse();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "poke",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Poke.com Developer SDK",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -23,9 +23,7 @@
|
|
|
23
23
|
"build": "tsc --noEmit && tsc --emitDeclarationOnly --outDir dist && node esbuild.config.js",
|
|
24
24
|
"dev": "tsx src/cli.ts"
|
|
25
25
|
},
|
|
26
|
-
"dependencies": {
|
|
27
|
-
"@anthropic-ai/claude-agent-sdk": "^0.1.0"
|
|
28
|
-
},
|
|
26
|
+
"dependencies": {},
|
|
29
27
|
"devDependencies": {
|
|
30
28
|
"@types/node": "^22.14.1",
|
|
31
29
|
"@types/ws": "^8.5.10",
|