Lines 120-175javascript
120\r `),QX=(Z)=>!Z||V$.has(Z);class aY{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(Z,X=!1){if(Z){if(typeof Z!=="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+Z:Z,this.lineEndPos=null}this.atEnd=!X;let J=this.next??"stream";while(J&&(X||this.hasChars(1)))J=yield*this.parseNext(J)}atLineEnd(){let Z=this.pos,X=this.buffer[Z];while(X===" "||X==="\t")X=this.buffer[++Z];if(!X||X==="#"||X===`
121`)return!0;if(X==="\r")return this.buffer[Z+1]===`
122`;return!1}charAt(Z){return this.buffer[this.pos+Z]}continueScalar(Z){let X=this.buffer[Z];if(this.indentNext>0){let J=0;while(X===" ")X=this.buffer[++J+Z];if(X==="\r"){let Q=this.buffer[J+Z+1];if(Q===`
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==="...")&&F0(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 t9.SCALAR,yield*this.pushToIndex(Z+1,!0),yield*this.parseLineStart()}*
134`,Y=this.buffer[J+1];else X=J;if(Y==="#"||Z&&f8.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&&f8.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)}}B$.Lexer=aY});var GX=P(($$)=>{class sY{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`)}displayWidth(Z){return p5(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 ...
143`+" ".repeat(X+H));return G+z+" ".repeat(H)+B.replace(/\n/g,`
144${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()],W=this.displayWidth(H[0]);z.forEach((q)=>{let B=this.displayWidth(q);if(W+B<=X){H.push(q),W+=B;return}Y.push(H.join(""));let V=q.trimStart();H=[V],W=this.displayWidth(V)}),Y.push(H.join(""))}),Y.join(`
145`)}}class t1{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=c5(Z);if(this.short=J.shortFlag,this.long=J.longFlag,this.negate=!1,this.long)this.negate=this.long.startsWith("--no-");this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0,this.helpGroupHeading=void 0}default(Z,X){return this.defaultValue=Z,this.defaultValueDe ...
146- a short flag is a single dash and a single character
147 - either use a single dash and a single character (for a short flag)
148 - or use a double dash for a long option (and can have two, like '--ws, --workspace')`);if(Q.test(z))throw Error(`${H}
149- too many short flags`);if(Y.test(z))throw Error(`${H}
150- too many long flags`);throw Error(`${H}
151- 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 i5(Z,X){if(Math.abs(Z.length-X.length)>3)return Math.max(Z.length,X.length);let J=
152(Did you mean one of ${Q.join(", ")}?)`;if(Q.length===1)return`
153(Did you mean ${Q[0]}?)`;return""}class R1 extends n5{constructor(Z){super();this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=
154- 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 G6(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 ...
155Expecting 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 t0(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 ...
156- 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
157- 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(W6.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
158 - if '${J}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
159 - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
160 - ${Q}`;throw Error(Y)}_executeSubCommand(Z,X){X=X.slice();let J=[".js",".ts",".tsx",".mjs",".cjs"];function Q(q,B){let V=S0.resolve(q,B);if(W6.existsSync(V))return V;if(J.includes(S0.extname(B)))return;let K=J.find(($)=>W6.existsSync(`${V}${$}`));if(K)return`${V}${K}`;return}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let Y=Z._executableFile||`${this._name}-${Z._name}`,G=this._executableDir||"";if(this._scriptPath){let q;try{q=W6.realpathSync(this._scriptPath)}catch{q=this._scriptPath}G=S0.resolve(S0.dirname(q),G)}if(G){let q=Q(G,Y);if(!q&&!Z._executableFile&&t ...
161`,this._outputConfiguration.writeErr),typeof this._showHelpAfterError==="string")this._outputConfiguration.writeErr(`${this._showHelpAfterError}
162`);else if(this._showHelpAfterError)this._outputConfiguration.writeErr(`
163`),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
164`),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 ...
165Expecting 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 · L152 166`)}),this}_outputHelpIfRequested(Z){let X=this._getHelpOption();if(X&&Z.find((Q)=>X.is(Q)))this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)")}}function RX(Z){return Z.map((X)=>{if(!X.startsWith("--inspect"))return X;let J,Q="127.0.0.1",Y="9229"
167`,{mode:384})}function q6(){if(e1(N1()))TX(N1())}function j1(){return e0(Z9(),"session.json")}function X9(){if(!e1(j1()))return null;return JSON.
169Caused by: ${(D=V===null||V===void 0?void 0:V.name)!==null&&D!==void 0?D:"Error"}: ${F}`,O)W+=` (${O})`;if(V===null||V===void 0?void 0:V.stack)W+=`
170${V.stack}`}else{var M;W=(M=z===null||z===void 0?void 0:z.stack)!==null&&M!==void 0?M:""}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="",q="Request was aborted (timeout or manual cancellation)",L>this.urlLengthLimit)q+=`. 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 ...
172new 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+=`
174Suggested 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 HZ=LJ;var OJ="2.108.2";var IJ=`realtime-js/${OJ}`,RJ="1.0.0",WZ="2.0.0",NJ=WZ;var jJ=1e4;var wJ=100;var O0={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},F6={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave",access_token:"access_token"};var H9={connecting:"connecting",open:"open",closing:"closing",closed:"closed"};class L6{constructor(Z){ ...
175`),()=>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.