Lines 123-178javascript
123`||!Q&&!this.atEnd)return Z+J+1}return X===`
124`||J>=this.indentNext||!X&&!this.atEnd?Z+J:-1}if(X==="-"||X==="."){let J=this.buffer.substr(Z,3);if((J==="---"||J==="...")&&B1(this.buffer[Z+3]))return-1}return Z}getLine(){let Z=this.lineEndPos;if(typeof Z!=="number"||Z!==-1&&Z<this.pos)Z=this.buffer.indexOf(`
125`,this.pos),this.lineEndPos=Z;if(Z===-1)return this.atEnd?this.buffer.substring(this.pos):null;if(this.buffer[Z-1]==="\r")Z-=1;return this.buffer.substring(this.pos,Z)}hasChars(Z){return this.pos+Z<=this.buffer.length}setNext(Z){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=Z,null}peek(Z){return this.buffer.substr(this.pos,Z)}*parseNext(Z){switch(Z){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"f ...
126`,this.pos);if(Q!==-1){while(Q!==-1){let Y=this.continueScalar(Q+1);if(Y===-1)break;Q=J.indexOf(`
127`,Y)}if(Q!==-1)X=Q-(J[Q-1]==="\r"?2:1)}if(X===-1){if(!this.atEnd)return this.setNext("quoted-scalar");X=
128`:Z=Y,X=0;break;case"\r":{let G=this.buffer[Y+1];if(!G&&!this.atEnd)return this.setNext("block-scalar");if(G===`
129`)break}default:break Z}if(!J&&!this.atEnd)return this.setNext("block-scalar");if(X>=this.indentNext){if(this.blockScalarIndent===-1)this.indentNext=X;else this.indentNext=this.blockScalarIndent
130`,Y)}while(Z!==-1);if(Z===-1){if(!this.atEnd)return this.setNext("block-scalar");Z=this.buffer.length}}let Q=Z+1;J=this.buffer[Q];while(
131`)J=this.buffer[++Q];Z=Q-1}else if(!this.blockScalarKeep)do{let Y=Z-1,G=this.buffer[Y];if(G==="\r")G=this.buffer[--
132`&&Y>=this.pos&&Y+1+X>z)Z=Y;else break}while(!0);return yield o9.SCALAR,yield*this.pushToIndex(Z+1,!0),yield*this.parseLineStart()}*
134`,Y=this.buffer[J+1];else X=J;if(Y==="#"||Z&&y8.has(Y))break;if(Q===`
135`){let G=this.continueScalar(J+1);if(G===-1)break;J=Math.max(J,G-2)}}else{if(Z&&y8.has(Q))break;X=J}if
136`)return yield*this.pushCount(1);else if(Z==="\r"&&this.charAt(1)===`
137`)return yield*this.pushCount(2);else return 0}*pushSpaces(Z){let X=this.pos-1,J;do J=this.buffer[++X];while(J===" "||Z&&J==="\t");let Q=X-this.pos;if(Q>0)yield this.buffer.substr(this.pos,Q),this.pos=X;return Q}*pushUntil(Z){let X=this.pos,J=this.buffer[X];while(!Z(J))J=this.buffer[++X];return yield*this.pushToIndex(X,!1)}}r$.Lexer=_7});var XX=j((e$)=>{class y7{constructor(){this.lineStarts=[],this.addNewLine=(Z)=>this.lineStarts.push(Z),this.linePos=(Z)=>{let X=0,J=this.lineStarts.length;while(X<J){let Y=X+J>>1;if(this.lineStarts[Y]<Z)X=Y+1;else J=Y}if(this.lineStarts[X]===Z)return{line:X+1, ...
138`)+1;while(X!==0)this.onNewLine(this.offset+X),X=this.source.indexOf(`
139`,X)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(Z){let X=Z.items[Z.items.length-1];switch(this.type){case"newline":
140`)+1;while(X!==0)this.onNewLine(this.offset+X),X=this.source.indexOf(`
141`,X)+1}return{type:Z,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(Z){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start ...
142`).reduce((J,Q)=>J+=Math.max(1,Math.ceil(Q.length/X)),0)}function hM(Z="",X={}){let J=0,Q=X.interval||50,Y
143`,F.write(D,!0),w1.isTTY&&(q=vM(D,Y.columns)),F},spin(){return F.render(),J=++J%G.length,F},update(D){if(typeof D==="string")Z=D;else Z=D.text||Z,G=D.frames&&D.frames.length?D.frames:G,Q=D.interval||Q,z=D.color||z;if(G.length-1<J)J=0;return F},loop(){return w1.isTTY&&(W=setTimeout(()=>F.loop(),Q)),F.spin()},start(D={}){return W&&F.reset(),H=!0,U(),F.update({text:B(D),color:$(D)}).loop()},stop(D){H=!1,clearTimeout(W),W=void 0,M();let O=V(D),N=M5.default[$(D)](K(D,G[J])),I=B(D);return F.write(D?`${N} ${I}${O?"":`
144`}`:"",!0),w1.isTTY&&!O?F.write("\x1B[?25h"):F},success(D={}){return F.stop({text:B(D),mark:K(D,w1.symbols.tick),color:"green",update:V(D)})},error(D={}){return F.stop({text:B(D),mark:K(D,w1.symbols.cross),color:"red",update:V(D)})},warn(D={}){return F.stop({text:B(D),mark:K(D,w1.symbols.warn),color:"yellow",update:V(D)})},info(D={}){return F.stop({text:B(D),mark:K(D,w1.symbols.info),color:"blue",update:V(D)})},isSpinning(){return H}};function L(D){if(H)F.stop();process.exit(D==="SIGINT"?130:D==="SIGTERM"?143:1)}return F}});class o1 extends Error{constructor(Z,X,J){super(J);Error.captureStackT ...
145`)}displayWidth(Z){return b5(Z).length}styleTitle(Z){return Z}styleUsage(Z){return Z.split(" ").map((X)=>{if(X==="[options]")return this.styleOptionText(X);if(X==="[command]")return this.styleSubcommandText(X);if(X[0]==="["||X[0]==="<")return this.styleArgumentText(X);return this.styleCommandText(X)}).join(" ")}styleCommandDescription(Z){return this.styleDescriptionText(Z)}styleOptionDescription(Z){return this.styleDescriptionText(Z)}styleSubcommandDescription(Z){return this.styleDescriptionText(Z)}styleArgumentDescription(Z){return this.styleDescriptionText(Z)}styleDescriptionText(Z){return Z ...
146`+" ".repeat(X+H));return G+z+" ".repeat(H)+B.replace(/\n/g,`
147${G}`)}boxWrap(Z,X){if(X<this.minWidthToWrap)return Z;let J=Z.split(/\r\n|\n/),Q=/[\s]*[^\s]+/g,Y=[];return J.forEach((G)=>{let z=G.match(Q);if(z===null){Y.push("");return}let H=[z.shift()],q=this.displayWidth(H[0]);z.forEach((W)=>{let B=this.displayWidth(W);if(q+B<=X){H.push(W),q+=B;return}Y.push(H.join(""));let V=W.trimStart();H=[V],q=this.displayWidth(V)}),Y.push(H.join(""))}),Y.join(`
148`)}}class o0{constructor(Z,X){this.flags=Z,this.description=X||"",this.required=Z.includes("<"),this.optional=Z.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(Z),this.mandatory=!1;let J=k5(Z);if(this.short=J.shortFlag,this
149- a short flag is a single dash and a single character
150 - either use a single dash and a single character (for a short flag)
151 - or use a double dash for a long option (and can have two, like '--ws, --workspace')`);if(Q.test(z))throw Error(`${H}
152- too many short flags`);if(Y.test(z))throw Error(`${H}
153- too many long flags`);throw Error(`${H}
154- unrecognised flag format`)}if(X===void 0&&J===void 0)throw Error(`option creation failed due to no flags found in '${Z}'.`);return{shortFlag:X,longFlag:J}}function f5(Z,X){if(Math.abs(Z.length-X.length)>3)return Math.max(Z.length,X.length);let J=[];for(let Q=0;Q<=Z.length;Q++)J[Q]=[Q];for(let Q=0;Q<=X.length;Q++)J[0][Q]=Q;for(let Q=1;Q<=X.length;Q++)for(let Y=1;Y<=Z.length;Y++){let G;if(Z[Y-1]===X[Q-1])G=0;else G=1;if(J[Y][Q]=Math.min(J[Y-1][Q]+1,J[Y][Q-1]+1,J[Y-1][Q-1]+G),Y>1&&Q>1&&Z[Y-1]===X[Q-2]&&Z[Y-2]===X[Q-1])J[Y][Q]=Math.min(J[Y][Q],J[Y-2][Q-2]+1)}return J[Z.length][X.length]}function ...
155(Did you mean one of ${Q.join(", ")}?)`;if(Q.length===1)return`
156(Did you mean ${Q[0]}?)`;return""}class O0 extends _5{constructor(Z){super();this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=
157- specify the name in Command constructor or using .name()`);if(X=X||{},X.isDefault)this._defaultCommandName=Z._name;if(X.noHelp||X.hidden)Z._hidden=!0;return this._registerCommand(Z),Z.parent=this,Z._checkForBrokenPassThrough(),this}createArgument(Z,X){return new Y6(Z,X)}argument(Z,X,J,Q){let Y=this.createArgument(Z,X);if(typeof J==="function")Y.default(Q).argParser(J);else Y.default(J);return this.addArgument(Y),this}arguments(Z){return Z.trim().split(/ +/).forEach((X)=>{this.argument(X)}),this}addArgument(Z){let X=this.registeredArguments.slice(-1)[0];if(X?.variadic)throw Error(`only the la ...
158Expecting one of '${J.join("', '")}'`);if(this._lifeCycleHooks[Z])this._lifeCycleHooks[Z].push(X);else this._lifeCycleHooks[Z]=[X];return this}exitOverride(Z){if(Z)this._exitCallback=Z;else this._exitCallback=(X)=>{if(X.code!=="commander.executeSubCommandAsync")throw X};return this}_exit(Z,X,J){if(this._exitCallback)this._exitCallback(new o1(Z,X,J));x.exit(Z)}action(Z){let X=(J)=>{let Q=this.registeredArguments.length,Y=J.slice(0,Q);if(this._storeOptionsAsProperties)Y[Q]=this;else Y[Q]=this.opts();return Y.push(this),Z.apply(this,Y)};return this._actionHandler=X,this}createOption(Z,X){return n ...
159- already used by option '${X.flags}'`)}this._initOptionGroup(Z),this.options.push(Z)}_registerCommand(Z){let X=(Q)=>{return[Q.name()].concat(Q.aliases())},J=X(Z).find((Q
160- 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(Z,X,J){if(H6.existsSync(Z))return;let Q=X?`searched for local subcommand relative to directory '${X}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",Y=`'${Z}' does not exist
161 - if '${J}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
162 - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
163 - ${Q}`;throw Error(Y)}_executeSubCommand(Z,X){X=X.slice();let J=[".js",".ts",".tsx",".mjs",".cjs"];function Q(W,B){let V=P1.resolve(W,B);if(H6.existsSync(V))return V;if(J.includes(P1.extname(B)))return;let $=J.find((K)=>H6.existsSync(`${V}${K}`));if($)return`${V}${$}`;return}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let Y=Z._executableFile||`${this._name}-${Z._name}`,G=this._executableDir||"";if(this._scriptPath){let W;try{W=H6.realpathSync(this._scriptPath)}catch{W=this._scriptPath}G=P1.resolve(P1.dirname(W),G)}if(G){let W=Q(G,Y);if(!W&&!Z._executableFile&&t ...
164`,this._outputConfiguration.writeErr),typeof this._showHelpAfterError==="string")this._outputConfiguration.writeErr(`${this._showHelpAfterError}
165`);else if(this._showHelpAfterError)this._outputConfiguration.writeErr(`
166`),this.outputHelp({error:!0});let J=X||{},Q=J.exitCode||1,Y=J.code||"commander.error";this._exit(Q,Y,Z)}_parseOptionsEnv(){this.options.forEach((Z)=>{if(Z.envVar&&Z.envVar in
167`),this._exit(0,"commander.version",Z)}),this}description(Z,X){if(Z===void 0&&X===void 0)return this._description;if(this._description=Z,X)this._argsDescription=X;return this}summary(Z){if(Z===void 0)return this._summary;return this._summary=Z,this}alias(Z){if(Z===void 0)return this._aliases[0];let X=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler)X=this.commands[this.commands.length-1];if(Z===X._name)throw Error("Command alias can't be the same as its name");let J=this.parent?._findCommand(Z);if(J){let Q=[J.name()].concat(J.aliases()).join("|");throw ...
168Expecting one of '${J.join("', '")}'`);let Q=`${Z}Help`;return this.on(Q,(Y)=>{let G;if(typeof X==="function")G=X({error:Y.error,command:Y.command});else G=X;if(G)Y.write(`${G}
HighCommand Output Exfiltration
Source combines command execution, command-output handling, and outbound requests; review data flow before blocking.
dist/cli.jsView on unpkg · L155 169`)}),this}_outputHelpIfRequested(Z){let X=this._getHelpOption();if(X&&Z.find((Q)=>X.is(Q)))this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)")}}function MX(Z){return Z.map((X)=>{if(!X.startsWith("--inspect"))return X;let J,Q="127.0.0.1",Y="9229"
170`,{mode:384})}function q6(){if(r0(I0()))OX(I0())}function R0(){return r1(t0(),"session.json")}function e0(){if(!r0(R0()))return null;return JSON.
172Caused by: ${(M=V===null||V===void 0?void 0:V.name)!==null&&M!==void 0?M:"Error"}: ${D}`,O)q+=` (${O})`;if(V===null||V===void 0?void 0:V.stack)q+=`
173${V.stack}`}else{var F;q=(F=z===null||z===void 0?void 0:z.stack)!==null&&F!==void 0?F:""}let L=this.url.toString().length;if((z===null||z===void 0?void 0:z.name)==="AbortError"||(z===null||z===void 0?void 0:z.code)==="ABORT_ERR"){if(B="",W="Request was aborted (timeout or manual cancellation)",L>this.urlLengthLimit)W+=`. Note: Your request URL is ${L} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`}else if((V===null||V===void 0?vo ...
175new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){let Z=this.detectEnvironment();if(Z.wsConstructor)return Z.wsConstructor;let X=Z.error||"WebSocket not supported in this environment.";if(Z.workaround)X+=`
177Suggested solution: ${Z.workaround}`;throw Error(X)}static isWebSocketSupported(){try{let Z=this.detectEnvironment();return Z.type==="native"||Z.type==="ws"}catch(Z){return!1}}}var H4=BJ;var $J="2.108.2";var KJ=`realtime-js/${$J}`,MJ="1.0.0",q4="2.0.0",DJ=q4;var UJ=1e4;var FJ=100;var K1={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},U6={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave",access_token:"access_token"};var G9={connecting:"connecting",open:"open",closing:"closing",closed:"closed"};class F6{constructor(Z){ ...
178`),()=>this.onerror("timeout"),(X)=>{if(this.awaitingBatchAck=!1,!X||X.status!==200)this.onerror(X&&X.status),this.closeAndRetry(1011,"internal server error",!1);else if
Long lines were clipped for display.