@capgo/cli 8.20.0 → 8.20.1

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/dist/index.js CHANGED
@@ -91,7 +91,7 @@ Expecting one of '${B.join("', '")}'`);if(this._lifeCycleHooks[A])this._lifeCycl
91
91
  `),this.outputHelp({error:!0});let B=Q||{},$=B.exitCode||1,J=B.code||"commander.error";this._exit($,J,A)}_parseOptionsEnv(){this.options.forEach((A)=>{if(A.envVar&&A.envVar in U$.env){let Q=A.attributeName();if(this.getOptionValue(Q)===void 0||["default","config","env"].includes(this.getOptionValueSource(Q)))if(A.required||A.optional)this.emit(`optionEnv:${A.name()}`,U$.env[A.envVar]);else this.emit(`optionEnv:${A.name()}`)}})}_parseOptionsImplied(){let A=new _HQ(this.options),Q=(B)=>{return this.getOptionValue(B)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(B))};this.options.filter((B)=>B.implied!==void 0&&Q(B.attributeName())&&A.valueFromOption(this.getOptionValue(B.attributeName()),B)).forEach((B)=>{Object.keys(B.implied).filter(($)=>!Q($)).forEach(($)=>{this.setOptionValueWithSource($,B.implied[$],"implied")})})}missingArgument(A){let Q=`error: missing required argument '${A}'`;this.error(Q,{code:"commander.missingArgument"})}optionMissingArgument(A){let Q=`error: option '${A.flags}' argument missing`;this.error(Q,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(A){let Q=`error: required option '${A.flags}' not specified`;this.error(Q,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(A,Q){let B=(Y)=>{let X=Y.attributeName(),G=this.getOptionValue(X),W=this.options.find((H)=>H.negate&&X===H.attributeName()),K=this.options.find((H)=>!H.negate&&X===H.attributeName());if(W&&(W.presetArg===void 0&&G===!1||W.presetArg!==void 0&&G===W.presetArg))return W;return K||Y},$=(Y)=>{let X=B(Y),G=X.attributeName();if(this.getOptionValueSource(G)==="env")return`environment variable '${X.envVar}'`;return`option '${X.flags}'`},J=`error: ${$(A)} cannot be used with ${$(Q)}`;this.error(J,{code:"commander.conflictingOption"})}unknownOption(A){if(this._allowUnknownOption)return;let Q="";if(A.startsWith("--")&&this._showSuggestionAfterError){let $=[],J=this;do{let Y=J.createHelp().visibleOptions(J).filter((X)=>X.long).map((X)=>X.long);$=$.concat(Y),J=J.parent}while(J&&!J._enablePositionalOptions);Q=MCA(A,$)}let B=`error: unknown option '${A}'${Q}`;this.error(B,{code:"commander.unknownOption"})}_excessArguments(A){if(this._allowExcessArguments)return;let Q=this.registeredArguments.length,B=Q===1?"":"s",J=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${Q} argument${B} but got ${A.length}.`;this.error(J,{code:"commander.excessArguments"})}unknownCommand(){let A=this.args[0],Q="";if(this._showSuggestionAfterError){let $=[];this.createHelp().visibleCommands(this).forEach((J)=>{if($.push(J.name()),J.alias())$.push(J.alias())}),Q=MCA(A,$)}let B=`error: unknown command '${A}'${Q}`;this.error(B,{code:"commander.unknownCommand"})}version(A,Q,B){if(A===void 0)return this._version;this._version=A,Q=Q||"-V, --version",B=B||"output the version number";let $=this.createOption(Q,B);return this._versionOptionName=$.attributeName(),this._registerOption($),this.on("option:"+$.name(),()=>{this._outputConfiguration.writeOut(`${A}
92
92
  `),this._exit(0,"commander.version",A)}),this}description(A,Q){if(A===void 0&&Q===void 0)return this._description;if(this._description=A,Q)this._argsDescription=Q;return this}summary(A){if(A===void 0)return this._summary;return this._summary=A,this}alias(A){if(A===void 0)return this._aliases[0];let Q=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler)Q=this.commands[this.commands.length-1];if(A===Q._name)throw Error("Command alias can't be the same as its name");let B=this.parent?._findCommand(A);if(B){let $=[B.name()].concat(B.aliases()).join("|");throw Error(`cannot add alias '${A}' to command '${this.name()}' as already have command '${$}'`)}return Q._aliases.push(A),this}aliases(A){if(A===void 0)return this._aliases;return A.forEach((Q)=>this.alias(Q)),this}usage(A){if(A===void 0){if(this._usage)return this._usage;let Q=this.registeredArguments.map((B)=>{return RHQ(B)});return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?Q:[]).join(" ")}return this._usage=A,this}name(A){if(A===void 0)return this._name;return this._name=A,this}helpGroup(A){if(A===void 0)return this._helpGroupHeading??"";return this._helpGroupHeading=A,this}commandsGroup(A){if(A===void 0)return this._defaultCommandGroup??"";return this._defaultCommandGroup=A,this}optionsGroup(A){if(A===void 0)return this._defaultOptionGroup??"";return this._defaultOptionGroup=A,this}_initOptionGroup(A){if(this._defaultOptionGroup&&!A.helpGroupHeading)A.helpGroup(this._defaultOptionGroup)}_initCommandGroup(A){if(this._defaultCommandGroup&&!A.helpGroup())A.helpGroup(this._defaultCommandGroup)}nameFromFilename(A){return this._name=zD.basename(A,zD.extname(A)),this}executableDir(A){if(A===void 0)return this._executableDir;return this._executableDir=A,this}helpInformation(A){let Q=this.createHelp(),B=this._getOutputContext(A);Q.prepareContext({error:B.error,helpWidth:B.helpWidth,outputHasColors:B.hasColors});let $=Q.formatHelp(this,Q);if(B.hasColors)return $;return this._outputConfiguration.stripColor($)}_getOutputContext(A){A=A||{};let Q=!!A.error,B,$,J;if(Q)B=(X)=>this._outputConfiguration.writeErr(X),$=this._outputConfiguration.getErrHasColors(),J=this._outputConfiguration.getErrHelpWidth();else B=(X)=>this._outputConfiguration.writeOut(X),$=this._outputConfiguration.getOutHasColors(),J=this._outputConfiguration.getOutHelpWidth();return{error:Q,write:(X)=>{if(!$)X=this._outputConfiguration.stripColor(X);return B(X)},hasColors:$,helpWidth:J}}outputHelp(A){let Q;if(typeof A==="function")Q=A,A=void 0;let B=this._getOutputContext(A),$={error:B.error,write:B.write,command:this};this._getCommandAndAncestors().reverse().forEach((Y)=>Y.emit("beforeAllHelp",$)),this.emit("beforeHelp",$);let J=this.helpInformation({error:B.error});if(Q){if(J=Q(J),typeof J!=="string"&&!Buffer.isBuffer(J))throw Error("outputHelp callback must return a string or a Buffer")}if(B.write(J),this._getHelpOption()?.long)this.emit(this._getHelpOption().long);this.emit("afterHelp",$),this._getCommandAndAncestors().forEach((Y)=>Y.emit("afterAllHelp",$))}helpOption(A,Q){if(typeof A==="boolean"){if(A){if(this._helpOption===null)this._helpOption=void 0;if(this._defaultOptionGroup)this._initOptionGroup(this._getHelpOption())}else this._helpOption=null;return this}if(this._helpOption=this.createOption(A??"-h, --help",Q??"display help for command"),A||Q)this._initOptionGroup(this._helpOption);return this}_getHelpOption(){if(this._helpOption===void 0)this.helpOption(void 0,void 0);return this._helpOption}addHelpOption(A){return this._helpOption=A,this._initOptionGroup(A),this}help(A){this.outputHelp(A);let Q=Number(U$.exitCode??0);if(Q===0&&A&&typeof A!=="function"&&A.error)Q=1;this._exit(Q,"commander.help","(outputHelp)")}addHelpText(A,Q){let B=["beforeAll","before","after","afterAll"];if(!B.includes(A))throw Error(`Unexpected value for position to addHelpText.
93
93
  Expecting one of '${B.join("', '")}'`);let $=`${A}Help`;return this.on($,(J)=>{let Y;if(typeof Q==="function")Y=Q({error:J.error,command:J.command});else Y=Q;if(Y)J.write(`${Y}
94
- `)}),this}_outputHelpIfRequested(A){let Q=this._getHelpOption();if(Q&&A.find(($)=>Q.is($)))this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)")}}function NCA(A){return A.map((Q)=>{if(!Q.startsWith("--inspect"))return Q;let B,$="127.0.0.1",J="9229",Y;if((Y=Q.match(/^(--inspect(-brk)?)$/))!==null)B=Y[1];else if((Y=Q.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null)if(B=Y[1],/^\d+$/.test(Y[3]))J=Y[3];else $=Y[3];else if((Y=Q.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null)B=Y[1],$=Y[3],J=Y[4];if(B&&J!=="0")return`${B}=${$}:${parseInt(J)+1}`;return Q})}function W1A(){if(U$.env.NO_COLOR||U$.env.FORCE_COLOR==="0"||U$.env.FORCE_COLOR==="false")return!1;if(U$.env.FORCE_COLOR||U$.env.CLICOLOR_FORCE!==void 0)return!0;return}PHQ.Command=K1A;PHQ.useColor=W1A});var jCA=r((bHQ)=>{var{Argument:VCA}=Am(),{Command:Z1A}=LCA(),{CommanderError:SHQ,InvalidArgumentError:ECA}=i_(),{Help:xHQ}=J1A(),{Option:RCA}=Y1A();bHQ.program=new Z1A;bHQ.createCommand=(A)=>new Z1A(A);bHQ.createOption=(A,Q)=>new RCA(A,Q);bHQ.createArgument=(A,Q)=>new VCA(A,Q);bHQ.Command=Z1A;bHQ.Option=RCA;bHQ.Argument=VCA;bHQ.Help=xHQ;bHQ.CommanderError=SHQ;bHQ.InvalidArgumentError=ECA;bHQ.InvalidOptionArgumentError=ECA});var K4;var mG=vA(()=>{K4={name:"@capgo/cli",type:"module",version:"8.20.0",description:"A CLI to upload to capgo servers",author:"Martin martin@capgo.app",license:"Apache 2.0",homepage:"https://github.com/Cap-go/capgo/tree/main/cli#readme",repository:{type:"git",url:"git+https://github.com/Cap-go/capgo.git",directory:"cli"},bugs:{url:"https://github.com/Cap-go/capgo/issues"},keywords:["appflow alternative","ionic","capacitor","auto update","live update","capgo","cli","upload","capgo-cli","sdk","tanstack-intent"],exports:{".":{import:"./dist/index.js",require:"./dist/index.js"},"./sdk":{types:"./dist/src/sdk.d.ts",import:"./dist/src/sdk.js"}},main:"dist/index.js",types:"dist/src/index.d.ts",bin:{capgo:"dist/index.js"},files:["!skills/_artifacts","dist","skills"],engines:{npm:">=8.0.0",node:">=20.0.0"},scripts:{build:"tsc && bun build.mjs",dev:"NODE_ENV=development ncc build","no-debug":"node dist/index.js","dev-build":"SUPA_DB=development ncc build",pack:"pkg",types:"bunx --bun supabase gen types typescript --project-id=xvwzpoazmxkqosrdewyv > src/types/supabase.types.ts",typecheck:"tsgo --project tsconfig.tsgo.json --noEmit",lint:"bun run lint:ox","lint:ox":"oxlint --config ../.oxlintrc.json src","lint:fix":"oxlint --config ../.oxlintrc.json --fix src","check-posix-paths":"node test/check-posix-paths.js","generate-docs":"node dist/index.js generate-docs README.md","test:bundle":"bun test/test-bundle.mjs","test:prescan":"bun test test/prescan/","test:functional":"bun test/test-functional.mjs","test:semver":"bun test/test-semver-validation.mjs","test:version-edge-cases":"bun test/test-version-validation.mjs","test:regex":"bun test/test-regex-validation.mjs","test:upload":"bun test/test-upload-validation.mjs","test:fail-on-incompatible":"bun test/test-fail-on-incompatible.mjs","test:credentials":"bun test/test-credentials.mjs","test:asc-key-protocol":"bun test/test-asc-key-protocol.mjs","test:credentials-validation":"bun test/test-credentials-validation.mjs","test:android-service-account-validation":"bun test/test-android-service-account-validation.mjs","test:build-zip-filter":"bun test/test-build-zip-filter.mjs","test:checksum":"bun test/test-checksum-algorithm.mjs","test:build-needed":"bun test/test-build-needed.mjs","test:ci-prompts":"bun test/test-ci-prompts.mjs","test:ci-secrets":"bun test/test-ci-secrets.mjs","test:android-onboarding-progress":"bun test/test-android-onboarding-progress.mjs","test:onboarding-telemetry":"bun test/test-onboarding-telemetry.mjs","test:v2-event-migration":"bun test/test-v2-event-migration.mjs","test:analytics":"bun test/test-analytics.mjs","test:analytics-error-category":"bun test/test-analytics-error-category.mjs","test:analytics-org-resolver":"bun test/test-analytics-org-resolver.mjs","test:supabase-perf":"bun test/test-supabase-perf.mjs","test:preview-qr":"bun test/test-preview-qr.mjs","test:mcp-analytics":"bun test/test-mcp-analytics.mjs","test:mcp-instructions":"bun test/test-mcp-instructions.mjs","test:mcp-stdout-guard":"bun test/test-mcp-stdout-guard.mjs","test:mcp-platform-select":"bun test/test-mcp-platform-select.mjs","test:mcp-explain-scopes":"bun test/test-mcp-explain-scopes.mjs","test:mcp-oauth-reopen":"bun test/test-mcp-oauth-reopen.mjs","test:mcp-broker-oauth":"bun test/test-mcp-broker-oauth.mjs","test:mcp-broker-session":"bun test/test-mcp-broker-session.mjs","test:mcp-credentials-manage":"bun test/test-mcp-credentials-manage.mjs","test:mcp-resume-prompt":"bun test/test-mcp-resume-prompt.mjs","test:mcp-build-job":"bun test/test-mcp-build-job.mjs","test:mcp-build-tools":"bun test/test-mcp-build-tools.mjs","test:app-created-source":"bun test/test-app-created-source.mjs","test:doctor-analytics":"bun test/test-doctor-analytics.mjs","test:posthog-exception":"bun test/test-posthog-exception.mjs","test:onboarding-recovery":"bun test/test-onboarding-recovery.mjs","test:onboarding-progress":"bun test/test-onboarding-progress.mjs","test:onboarding-run-targets":"bun test/test-onboarding-run-targets.mjs","test:run-device-command":"bun test/test-run-device-command.mjs","test:init-app-conflict":"bun test/test-init-app-conflict.mjs","test:init-guardrails":"bun test/test-init-guardrails.mjs","test:init-replay":"bun test/test-init-replay.mjs","test:prompt-preferences":"bun test/test-prompt-preferences.mjs","test:esm-sdk":"node test/test-sdk-esm.mjs","test:auth-session":"bun test/test-auth-session.mjs","test:mcp":"node test/test-mcp.mjs","test:mcp-no-key-handshake":"node test/test-mcp-no-key-handshake.mjs","test:version-detection":"node test/test-get-installed-version.mjs","test:version-detection:setup":"./test/fixtures/setup-test-projects.sh","test:platform-paths":"bun test/test-platform-paths.mjs","test:project-type-detection":"bun test/test-project-type-detection.mjs","test:payload-split":"bun test/test-payload-split.mjs","test:macos-signing":"bun test/test-macos-signing.mjs","test:helper-dce":"bash scripts/check-helper-dce.sh","test:apple-api-import-helpers":"bun test/test-apple-api-import-helpers.mjs","test:apple-api-verify-key":"bun test/test-apple-api-verify-key.mjs","test:bundle-id-detector":"bun test/test-bundle-id-detector.mjs","test:apple-api-app-list":"bun test/test-apple-api-app-list.mjs","test:apple-api-cert-create":"bun test/test-apple-api-cert-create.mjs","test:app-verification":"bun test/test-app-verification.mjs","test:pbxproj-parser":"bun test/test-pbxproj-parser.mjs","test:manifest-path-encoding":"bun test/test-manifest-path-encoding.mjs","test:self-update":"bun test/test-self-update.mjs","test:update-prompt":"bun test/test-update-prompt.mjs","test:android-tail-engine":"bun test/test-android-tail-engine.mjs","test:android-tail-render":"bun test/test-android-tail-render.mjs","test:android-tail-routing":"bun test/test-android-tail-routing.mjs","test:dev-gate-stripped":"bun test/test-dev-gate-stripped.mjs","test:frame-fit-ios-shared":"bun test/test-frame-fit-ios-shared.mjs","test:ios-confirm-app-id":"bun test/test-ios-confirm-app-id.mjs","test:ios-create-new":"bun test/test-ios-create-new.mjs","test:ios-e2e":"bun test/test-ios-e2e.mjs","test:ios-flow-contract":"bun test/test-ios-flow-contract.mjs","test:ios-import-discovery":"bun test/test-ios-import-discovery.mjs","test:ios-import-export":"bun test/test-ios-import-export.mjs","test:ios-import-pickers":"bun test/test-ios-import-pickers.mjs","test:ios-import-recovery":"bun test/test-ios-import-recovery.mjs","test:ios-recovery":"bun test/test-ios-recovery.mjs","test:ios-resume":"bun test/test-ios-resume.mjs","test:ios-tail-handoff":"bun test/test-ios-tail-handoff.mjs","test:ios-tui-render":"bun test/test-ios-tui-render.mjs","test:p8-error":"bun test/test-p8-error.mjs","test:ios-tui-routing":"bun test/test-ios-tui-routing.mjs","test:ios-updater-sync-validation":"bun test/test-ios-updater-sync-validation.mjs","test:ios-verify-app":"bun test/test-ios-verify-app.mjs","test:platform-flow-contract":"bun test/test-platform-flow-contract.mjs","test:tail-engine-shared":"bun test/test-tail-engine-shared.mjs",test:"bun run build && bun run test:helper-dce && bun run test:version-detection:setup && bun run test:bundle && bun run test:functional && bun run test:semver && bun run test:version-edge-cases && bun run test:regex && bun run test:upload && bun run test:fail-on-incompatible && bun run test:credentials && bun run test:credentials-validation && bun run test:android-service-account-validation && bun run test:build-zip-filter && bun run test:checksum && bun run test:build-needed && bun run test:ci-prompts && bun run test:ci-secrets && bun run test:android-onboarding-progress && bun run test:onboarding-telemetry && bun run test:v2-event-migration && bun run test:analytics && bun run test:analytics-error-category && bun run test:analytics-org-resolver && bun run test:supabase-perf && bun run test:preview-qr && bun run test:app-set-options && bun run test:mcp-analytics && bun run test:mcp-instructions && bun run test:mcp-live-update-onboarding && bun run test:mcp-stdout-guard && bun run test:mcp-platform-select && bun run test:mcp-explain-scopes && bun run test:mcp-oauth-reopen && bun run test:mcp-broker-oauth && bun run test:mcp-broker-session && bun run test:mcp-credentials-manage && bun run test:mcp-resume-prompt && bun run test:mcp-build-job && bun run test:mcp-build-tools && bun run test:app-created-source && bun run test:doctor-analytics && bun run test:posthog-exception && bun run test:build-platform-selection && bun run test:onboarding-recovery && bun run test:onboarding-progress && bun run test:onboarding-run-targets && bun run test:run-device-command && bun run test:init-app-conflict && bun run test:init-guardrails && bun run test:init-replay && bun run test:prompt-preferences && bun run test:esm-sdk && bun run test:mcp && bun run test:mcp-no-key-handshake && bun run test:auth-session && bun run test:version-detection && bun run test:platform-paths && bun run test:project-type-detection && bun run test:payload-split && bun run test:manifest-path-encoding && bun run test:macos-signing && bun run test:asc-key-protocol && bun run test:apple-api-import-helpers && bun run test:apple-api-verify-key && bun run test:bundle-id-detector && bun run test:apple-api-app-list && bun run test:app-verification && bun run test:pbxproj-parser && bun run test:ai-log-capture && bun run test:ai-analyze-flow && bun run test:cicd-failure-help && bun run test:ai-sse-parser && bun run test:ai-render-markdown && bun run test:ai-stream-markdown && bun run test:ai-onboarding-mode && bun run test:ai-fit && bun run test:platform-layout && bun run test:frame-fit && bun run test:onboarding-min-size && bun run test:min-size-gate && bun run test:shell-size-gate && bun run test:build-log-sanitize && bun run test:build-output-viewport && bun run test:diff-viewer-viewport && bun run test:build-complete-exit && bun run test:ai-analyze-stream && bun run test:support-mailto && bun run test:support-redact && bun run test:support-internal-log && bun run test:support-help-menu && bun run test:support-contact && bun run test:support-upload-prompt && bun run test:support-bundle-files && bun run test:self-update && bun run test:update-prompt && bun run test:apple-api-cert-create && bun run test:android-tail-engine && bun run test:android-tail-render && bun run test:android-tail-routing && bun run test:dev-gate-stripped && bun run test:frame-fit-ios-shared && bun run test:ios-confirm-app-id && bun run test:ios-create-new && bun run test:ios-e2e && bun run test:ios-flow-contract && bun run test:ios-import-discovery && bun run test:ios-import-export && bun run test:ios-import-pickers && bun run test:ios-import-recovery && bun run test:ios-recovery && bun run test:ios-resume && bun run test:ios-tail-handoff && bun run test:ios-tui-render && bun run test:p8-error && bun run test:ios-tui-routing && bun run test:ios-updater-sync-validation && bun run test:ios-verify-app && bun run test:platform-flow-contract && bun run test:tail-engine-shared && bun run test:prescan","test:build-platform-selection":"bun test/test-build-platform-selection.mjs","test:ai-log-capture":"bun test/test-ai-log-capture.mjs","test:ai-analyze-flow":"bun test/test-ai-analyze-flow.mjs","test:cicd-failure-help":"bun test/test-cicd-failure-help.mjs","test:ai-analyze-stream":"bun test/test-ai-analyze-stream.mjs","test:ai-sse-parser":"bun test/test-ai-sse-parser.mjs","test:ai-render-markdown":"bun test/test-ai-render-markdown.mjs","test:ai-onboarding-mode":"bun test/test-ai-onboarding-mode.mjs","test:ai-fit":"bun test/test-ai-fit.mjs","test:platform-layout":"bun test/test-platform-layout.mjs","test:frame-fit":"bun test/run-frame-fit.mjs","test:onboarding-min-size":"bun test/test-onboarding-min-size.mjs","test:min-size-gate":"bun test/test-min-size-gate.mjs","test:shell-size-gate":"bun test/test-shell-size-gate.mjs","test:build-log-sanitize":"bun test/test-build-log-sanitize.mjs","test:build-output-viewport":"bun test/test-build-output-viewport.mjs","test:diff-viewer-viewport":"bun test/test-diff-viewer-viewport.mjs","test:build-complete-exit":"bun test/test-build-complete-exit.mjs","test:ai-stream-markdown":"bun test/test-ai-stream-markdown.mjs","test:support-mailto":"bun test/test-support-mailto.mjs","test:support-redact":"bun test/test-support-redact.mjs","test:support-internal-log":"bun test/test-support-internal-log.mjs","test:support-help-menu":"bun test/test-support-help-menu.mjs","test:support-contact":"bun test/test-support-contact.mjs","test:support-upload-prompt":"bun test/test-support-upload-prompt.mjs","test:support-bundle-files":"bun test/test-support-bundle-files.mjs","test:mcp-live-update-onboarding":"bun test/test-mcp-live-update-onboarding.mjs","test:app-set-options":"bun test/test-app-set-options.mjs"},dependencies:{"@inkjs/ui":"^2.0.0","@rrweb/types":"^2.0.1","@xterm/addon-serialize":"^0.14.0","@xterm/headless":"^6.0.0","happy-dom":"^20.10.4",ink:"^7.0.4","ink-spinner":"^5.0.0",jsonwebtoken:"^9.0.3","node-forge":"^1.4.0",qrcode:"^1.5.4",react:"^19.2.6","rrweb-snapshot":"^2.0.1","string-width":"^8.2.1"},optionalDependencies:{"@capgo/cli-helper-darwin-arm64":"^1.1.1","@capgo/cli-helper-darwin-x64":"^1.1.1","node-pty":"^1.1.0"},devDependencies:{"@antfu/eslint-config":"^9.0.0","@bradenmacdonald/s3-lite-client":"npm:@jsr/bradenmacdonald__s3-lite-client@0.9.6","@capacitor/cli":"^8.3.4","@capgo/find-package-manager":"^0.0.18","@clack/prompts":"^1.4.0","@modelcontextprotocol/sdk":"^1.29.0","@sauber/table":"npm:@jsr/sauber__table","@std/semver":"npm:@jsr/std__semver@1.0.8","@supabase/supabase-js":"^2.106.2","@tanstack/intent":"^0.0.41","@types/adm-zip":"^0.5.8","@types/jsonwebtoken":"^9.0.10","@types/node":"^25.9.1","@types/node-forge":"^1.3.14","@types/prettyjson":"^0.0.33","@types/qrcode":"^1.5.6","@types/react":"^19.2.15","@types/tmp":"^0.2.6","@types/ws":"^8.18.1","@typescript/native-preview":"7.0.0-dev.20260526.1","@vercel/ncc":"^0.38.4","@xterm/headless":"^6.0.0","adm-zip":"^0.5.17","ci-info":"^4.4.0",commander:"^14.0.3",eslint:"^10.4.0","git-format-staged":"4.0.1",husky:"^9.1.7","is-wsl":"^3.1.1",micromatch:"^4.0.8",open:"^11.0.0",oxlint:"^1.67.0",partysocket:"^1.1.19",prettyjson:"^1.2.5",tmp:"^0.2.6","tus-js-client":"^4.3.1",typescript:"^6.0.3",ws:"^8.21.0",zod:"^4.4.3"}}});function nHQ(A){if(A&&typeof A==="object"&&"status"in A){let Q=A.status;if(typeof Q==="number")return Q}return}function aHQ(A){if(A instanceof Error)return A.message;if(typeof A==="string")return A;return""}function n_(A){if(A&&typeof A==="object"&&"code"in A){let $=A.code;if(typeof $==="string"&&$.startsWith("commander."))return"commander"}let Q=nHQ(A);if(Q!==void 0){if(Q===401)return"unauthorized";if(Q===403)return"forbidden";if(Q===404)return"not_found";if(Q===413)return"payload_too_large";if(Q>=500)return"server_error"}let B=aHQ(A).toLowerCase();if(/econnrefused|enotfound|fetch failed|network|socket|dns/.test(B))return"network_error";if(/timed out|timeout|etimedout|aborted/.test(B))return"timeout";if(/invalid|must be|required|not allowed|malformed|validation/.test(B))return"validation_error";return"unknown"}function _CA(A){if(A===401)return"unauthorized";if(A===403)return"forbidden";if(A===404)return"not_found";if(A===408||A===504)return"timeout";if(A===413)return"payload_too_large";if(A===429)return"rate_limited";if(A===400||A===422)return"validation_error";if(A>=500)return"server_error";return"unknown"}import{AsyncLocalStorage as rHQ}from"node:async_hooks";function a_(A,Q){return kCA.run(A,()=>Promise.resolve(Q()))}function sHQ(){return kCA.getStore()}function o_(){SCA=!0}function xCA(){return SCA}function fCA(A){bCA=A}function TCA(A){try{bCA?.(A)}catch{}}function gCA(A,Q){let B;try{B=new URL(A).pathname}catch{B=A.split("?")[0]}let $="/functions/v1/",J=B.indexOf($);if(J>=0){let K=B.slice(J+$.length).replace(/^\/+|\/+$/g,"");return K?`${Q} functions:${K}`:`${Q} functions`}let Y="/rest/v1/",X=B.indexOf(Y),G=X>=0?B.slice(X+Y.length):B.replace(/^\//,"");if(G.startsWith("rpc/"))return`rpc:${G.slice(4).split("/")[0]}`;let W=G.split("/")[0]||B;return`${Q} ${W}`}function tHQ(A){let Q=A?.headers;if(!Q)return;let B=Q.get;if(typeof B==="function")return B.call(Q,"capgkey")??void 0;if(Array.isArray(Q))return Q.find(([$])=>$.toLowerCase()==="capgkey")?.[1];return Q.capgkey}function yCA(){return async(Q,B)=>{let $=(B?.method??"GET").toUpperCase(),J=typeof Q==="string"?Q:Q instanceof URL?Q.href:Q.url,Y=sHQ(),X=tHQ(B),G=Date.now();try{let W=await globalThis.fetch(Q,B);return TCA({url:J,method:$,status:W.status,ok:W.ok,durationMs:Date.now()-G,source:Y,apikey:X}),W}catch(W){throw TCA({url:J,method:$,status:0,ok:!1,durationMs:Date.now()-G,source:Y,apikey:X,error:W}),W}}}var kCA,SCA=!1,bCA,vCA=5000;var r_=vA(()=>{kCA=new rHQ});import{homedir as hCA,platform as eHQ,release as A3Q}from"node:os";import{arch as Q3Q,cwd as uCA,env as kI,version as B3Q}from"node:process";function CK(A){return A==="1"||A?.toLowerCase()==="true"||A?.toLowerCase()==="yes"}function X3Q(){if(CK(kI.CAPGO_DISABLE_TELEMETRY)||CK(kI.CAPGO_DISABLE_POSTHOG))return;return kI.CAPGO_CLI_POSTHOG_API_KEY?.trim()||kI.POSTHOG_API_KEY?.trim()||J3Q}function G3Q(A){let Q=A.replace(/\/+$/,"");if(Q.endsWith("/i/v0/e"))return`${Q}/`;let B=Q.replace(/\/capture$/,"/");return new URL("i/v0/e/",B.endsWith("/")?B:`${B}/`).toString()}function W3Q(A){if(A instanceof Error)return{cause:A.cause,message:A.message,name:A.name||"Error",stack:A.stack};if(typeof A==="string")return{message:A,name:"Error",stack:void 0};try{return{message:JSON.stringify(A)??String(A),name:"Error",stack:void 0}}catch{return{message:String(A),name:"Error",stack:void 0}}}function K3Q(A){let Q=A,B=uCA(),$=hCA();if(B)Q=Q.replaceAll(B,"<cwd>");if($)Q=Q.replaceAll($,"~");return Q}function Z3Q(A){let Q=A,B=uCA(),$=hCA();if(B)Q=Q.replaceAll(B,"<cwd>");if($)Q=Q.replaceAll($,"~");return Q.replace(/<cwd>\/[^\s"',)]+/g,"<cwd>/<path>").replace(/~\/[^\s"',)]+/g,"~/<path>").replace(/[\w.%+-]+@[\w.-]+\.[A-Z]{2,}/gi,"<email>").replace(/(https?:\/\/)([^/\s:@]+):([^/\s@]+)@/gi,"$1<redacted>@").replace(/\b[a-z][\w-]*(?:\.[\w-]+){2,}\b/gi,"<app_id>").replace(/\b[a-z]:\\[^\s"',)]+/gi,"<path>").replace(/(^|[\s"'(])\/[^\s"',)]+/g,"$1<path>").replace(/(--(?:token|api[-_]?key|key|password|secret|private[-_]?key|jwt|session|auth)(?:=|\s+))("[^"]+"|'[^']+'|\S+)/gi,"$1<redacted>").replace(/\b((?:token|api[-_]?key|password|secret|authorization)\s*[:=]\s*)[^\s,;]+/gi,"$1<redacted>")}function H3Q(A,Q){let B=A?.split(`
94
+ `)}),this}_outputHelpIfRequested(A){let Q=this._getHelpOption();if(Q&&A.find(($)=>Q.is($)))this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)")}}function NCA(A){return A.map((Q)=>{if(!Q.startsWith("--inspect"))return Q;let B,$="127.0.0.1",J="9229",Y;if((Y=Q.match(/^(--inspect(-brk)?)$/))!==null)B=Y[1];else if((Y=Q.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null)if(B=Y[1],/^\d+$/.test(Y[3]))J=Y[3];else $=Y[3];else if((Y=Q.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null)B=Y[1],$=Y[3],J=Y[4];if(B&&J!=="0")return`${B}=${$}:${parseInt(J)+1}`;return Q})}function W1A(){if(U$.env.NO_COLOR||U$.env.FORCE_COLOR==="0"||U$.env.FORCE_COLOR==="false")return!1;if(U$.env.FORCE_COLOR||U$.env.CLICOLOR_FORCE!==void 0)return!0;return}PHQ.Command=K1A;PHQ.useColor=W1A});var jCA=r((bHQ)=>{var{Argument:VCA}=Am(),{Command:Z1A}=LCA(),{CommanderError:SHQ,InvalidArgumentError:ECA}=i_(),{Help:xHQ}=J1A(),{Option:RCA}=Y1A();bHQ.program=new Z1A;bHQ.createCommand=(A)=>new Z1A(A);bHQ.createOption=(A,Q)=>new RCA(A,Q);bHQ.createArgument=(A,Q)=>new VCA(A,Q);bHQ.Command=Z1A;bHQ.Option=RCA;bHQ.Argument=VCA;bHQ.Help=xHQ;bHQ.CommanderError=SHQ;bHQ.InvalidArgumentError=ECA;bHQ.InvalidOptionArgumentError=ECA});var K4;var mG=vA(()=>{K4={name:"@capgo/cli",type:"module",version:"8.20.1",description:"A CLI to upload to capgo servers",author:"Martin martin@capgo.app",license:"Apache 2.0",homepage:"https://github.com/Cap-go/capgo/tree/main/cli#readme",repository:{type:"git",url:"git+https://github.com/Cap-go/capgo.git",directory:"cli"},bugs:{url:"https://github.com/Cap-go/capgo/issues"},keywords:["appflow alternative","ionic","capacitor","auto update","live update","capgo","cli","upload","capgo-cli","sdk","tanstack-intent"],exports:{".":{import:"./dist/index.js",require:"./dist/index.js"},"./sdk":{types:"./dist/src/sdk.d.ts",import:"./dist/src/sdk.js"}},main:"dist/index.js",types:"dist/src/index.d.ts",bin:{capgo:"dist/index.js"},files:["!skills/_artifacts","dist","skills"],engines:{npm:">=8.0.0",node:">=20.0.0"},scripts:{build:"tsc && bun build.mjs",dev:"NODE_ENV=development ncc build","no-debug":"node dist/index.js","dev-build":"SUPA_DB=development ncc build",pack:"pkg",types:"bunx --bun supabase gen types typescript --project-id=xvwzpoazmxkqosrdewyv > src/types/supabase.types.ts",typecheck:"tsgo --project tsconfig.tsgo.json --noEmit",lint:"bun run lint:ox","lint:ox":"oxlint --config ../.oxlintrc.json src","lint:fix":"oxlint --config ../.oxlintrc.json --fix src","check-posix-paths":"node test/check-posix-paths.js","generate-docs":"node dist/index.js generate-docs README.md","test:bundle":"bun test/test-bundle.mjs","test:prescan":"bun test test/prescan/","test:functional":"bun test/test-functional.mjs","test:semver":"bun test/test-semver-validation.mjs","test:version-edge-cases":"bun test/test-version-validation.mjs","test:regex":"bun test/test-regex-validation.mjs","test:upload":"bun test/test-upload-validation.mjs","test:fail-on-incompatible":"bun test/test-fail-on-incompatible.mjs","test:credentials":"bun test/test-credentials.mjs","test:asc-key-protocol":"bun test/test-asc-key-protocol.mjs","test:credentials-validation":"bun test/test-credentials-validation.mjs","test:android-service-account-validation":"bun test/test-android-service-account-validation.mjs","test:build-zip-filter":"bun test/test-build-zip-filter.mjs","test:checksum":"bun test/test-checksum-algorithm.mjs","test:build-needed":"bun test/test-build-needed.mjs","test:ci-prompts":"bun test/test-ci-prompts.mjs","test:ci-secrets":"bun test/test-ci-secrets.mjs","test:android-onboarding-progress":"bun test/test-android-onboarding-progress.mjs","test:onboarding-telemetry":"bun test/test-onboarding-telemetry.mjs","test:v2-event-migration":"bun test/test-v2-event-migration.mjs","test:analytics":"bun test/test-analytics.mjs","test:analytics-error-category":"bun test/test-analytics-error-category.mjs","test:analytics-org-resolver":"bun test/test-analytics-org-resolver.mjs","test:supabase-perf":"bun test/test-supabase-perf.mjs","test:preview-qr":"bun test/test-preview-qr.mjs","test:mcp-analytics":"bun test/test-mcp-analytics.mjs","test:mcp-instructions":"bun test/test-mcp-instructions.mjs","test:mcp-stdout-guard":"bun test/test-mcp-stdout-guard.mjs","test:mcp-platform-select":"bun test/test-mcp-platform-select.mjs","test:mcp-explain-scopes":"bun test/test-mcp-explain-scopes.mjs","test:mcp-oauth-reopen":"bun test/test-mcp-oauth-reopen.mjs","test:mcp-broker-oauth":"bun test/test-mcp-broker-oauth.mjs","test:mcp-broker-session":"bun test/test-mcp-broker-session.mjs","test:mcp-credentials-manage":"bun test/test-mcp-credentials-manage.mjs","test:mcp-resume-prompt":"bun test/test-mcp-resume-prompt.mjs","test:mcp-build-job":"bun test/test-mcp-build-job.mjs","test:mcp-build-tools":"bun test/test-mcp-build-tools.mjs","test:app-created-source":"bun test/test-app-created-source.mjs","test:doctor-analytics":"bun test/test-doctor-analytics.mjs","test:posthog-exception":"bun test/test-posthog-exception.mjs","test:onboarding-recovery":"bun test/test-onboarding-recovery.mjs","test:onboarding-progress":"bun test/test-onboarding-progress.mjs","test:onboarding-run-targets":"bun test/test-onboarding-run-targets.mjs","test:run-device-command":"bun test/test-run-device-command.mjs","test:init-app-conflict":"bun test/test-init-app-conflict.mjs","test:init-guardrails":"bun test/test-init-guardrails.mjs","test:init-replay":"bun test/test-init-replay.mjs","test:prompt-preferences":"bun test/test-prompt-preferences.mjs","test:esm-sdk":"node test/test-sdk-esm.mjs","test:auth-session":"bun test/test-auth-session.mjs","test:mcp":"node test/test-mcp.mjs","test:mcp-no-key-handshake":"node test/test-mcp-no-key-handshake.mjs","test:version-detection":"node test/test-get-installed-version.mjs","test:version-detection:setup":"./test/fixtures/setup-test-projects.sh","test:platform-paths":"bun test/test-platform-paths.mjs","test:project-type-detection":"bun test/test-project-type-detection.mjs","test:payload-split":"bun test/test-payload-split.mjs","test:macos-signing":"bun test/test-macos-signing.mjs","test:helper-dce":"bash scripts/check-helper-dce.sh","test:apple-api-import-helpers":"bun test/test-apple-api-import-helpers.mjs","test:apple-api-verify-key":"bun test/test-apple-api-verify-key.mjs","test:bundle-id-detector":"bun test/test-bundle-id-detector.mjs","test:apple-api-app-list":"bun test/test-apple-api-app-list.mjs","test:apple-api-cert-create":"bun test/test-apple-api-cert-create.mjs","test:app-verification":"bun test/test-app-verification.mjs","test:pbxproj-parser":"bun test/test-pbxproj-parser.mjs","test:manifest-path-encoding":"bun test/test-manifest-path-encoding.mjs","test:self-update":"bun test/test-self-update.mjs","test:update-prompt":"bun test/test-update-prompt.mjs","test:android-tail-engine":"bun test/test-android-tail-engine.mjs","test:android-tail-render":"bun test/test-android-tail-render.mjs","test:android-tail-routing":"bun test/test-android-tail-routing.mjs","test:dev-gate-stripped":"bun test/test-dev-gate-stripped.mjs","test:frame-fit-ios-shared":"bun test/test-frame-fit-ios-shared.mjs","test:ios-confirm-app-id":"bun test/test-ios-confirm-app-id.mjs","test:ios-create-new":"bun test/test-ios-create-new.mjs","test:ios-e2e":"bun test/test-ios-e2e.mjs","test:ios-flow-contract":"bun test/test-ios-flow-contract.mjs","test:ios-import-discovery":"bun test/test-ios-import-discovery.mjs","test:ios-import-export":"bun test/test-ios-import-export.mjs","test:ios-import-pickers":"bun test/test-ios-import-pickers.mjs","test:ios-import-recovery":"bun test/test-ios-import-recovery.mjs","test:ios-recovery":"bun test/test-ios-recovery.mjs","test:ios-resume":"bun test/test-ios-resume.mjs","test:ios-tail-handoff":"bun test/test-ios-tail-handoff.mjs","test:ios-tui-render":"bun test/test-ios-tui-render.mjs","test:p8-error":"bun test/test-p8-error.mjs","test:ios-tui-routing":"bun test/test-ios-tui-routing.mjs","test:ios-updater-sync-validation":"bun test/test-ios-updater-sync-validation.mjs","test:ios-verify-app":"bun test/test-ios-verify-app.mjs","test:platform-flow-contract":"bun test/test-platform-flow-contract.mjs","test:tail-engine-shared":"bun test/test-tail-engine-shared.mjs",test:"bun run build && bun run test:helper-dce && bun run test:version-detection:setup && bun run test:bundle && bun run test:functional && bun run test:semver && bun run test:version-edge-cases && bun run test:regex && bun run test:upload && bun run test:fail-on-incompatible && bun run test:credentials && bun run test:credentials-validation && bun run test:android-service-account-validation && bun run test:build-zip-filter && bun run test:checksum && bun run test:build-needed && bun run test:ci-prompts && bun run test:ci-secrets && bun run test:android-onboarding-progress && bun run test:onboarding-telemetry && bun run test:v2-event-migration && bun run test:analytics && bun run test:analytics-error-category && bun run test:analytics-org-resolver && bun run test:supabase-perf && bun run test:preview-qr && bun run test:app-set-options && bun run test:mcp-analytics && bun run test:mcp-instructions && bun run test:mcp-live-update-onboarding && bun run test:mcp-stdout-guard && bun run test:mcp-platform-select && bun run test:mcp-explain-scopes && bun run test:mcp-oauth-reopen && bun run test:mcp-broker-oauth && bun run test:mcp-broker-session && bun run test:mcp-credentials-manage && bun run test:mcp-resume-prompt && bun run test:mcp-build-job && bun run test:mcp-build-tools && bun run test:app-created-source && bun run test:doctor-analytics && bun run test:posthog-exception && bun run test:build-platform-selection && bun run test:onboarding-recovery && bun run test:onboarding-progress && bun run test:onboarding-run-targets && bun run test:run-device-command && bun run test:init-app-conflict && bun run test:init-guardrails && bun run test:init-replay && bun run test:prompt-preferences && bun run test:esm-sdk && bun run test:mcp && bun run test:mcp-no-key-handshake && bun run test:auth-session && bun run test:version-detection && bun run test:platform-paths && bun run test:project-type-detection && bun run test:payload-split && bun run test:manifest-path-encoding && bun run test:macos-signing && bun run test:asc-key-protocol && bun run test:apple-api-import-helpers && bun run test:apple-api-verify-key && bun run test:bundle-id-detector && bun run test:apple-api-app-list && bun run test:app-verification && bun run test:pbxproj-parser && bun run test:ai-log-capture && bun run test:ai-analyze-flow && bun run test:cicd-failure-help && bun run test:ai-sse-parser && bun run test:ai-render-markdown && bun run test:ai-stream-markdown && bun run test:ai-onboarding-mode && bun run test:ai-fit && bun run test:platform-layout && bun run test:frame-fit && bun run test:onboarding-min-size && bun run test:min-size-gate && bun run test:shell-size-gate && bun run test:build-log-sanitize && bun run test:build-output-viewport && bun run test:diff-viewer-viewport && bun run test:build-complete-exit && bun run test:ai-analyze-stream && bun run test:support-mailto && bun run test:support-redact && bun run test:support-internal-log && bun run test:support-help-menu && bun run test:support-contact && bun run test:support-upload-prompt && bun run test:support-bundle-files && bun run test:self-update && bun run test:update-prompt && bun run test:apple-api-cert-create && bun run test:android-tail-engine && bun run test:android-tail-render && bun run test:android-tail-routing && bun run test:dev-gate-stripped && bun run test:frame-fit-ios-shared && bun run test:ios-confirm-app-id && bun run test:ios-create-new && bun run test:ios-e2e && bun run test:ios-flow-contract && bun run test:ios-import-discovery && bun run test:ios-import-export && bun run test:ios-import-pickers && bun run test:ios-import-recovery && bun run test:ios-recovery && bun run test:ios-resume && bun run test:ios-tail-handoff && bun run test:ios-tui-render && bun run test:p8-error && bun run test:ios-tui-routing && bun run test:ios-updater-sync-validation && bun run test:ios-verify-app && bun run test:platform-flow-contract && bun run test:tail-engine-shared && bun run test:prescan","test:build-platform-selection":"bun test/test-build-platform-selection.mjs","test:ai-log-capture":"bun test/test-ai-log-capture.mjs","test:ai-analyze-flow":"bun test/test-ai-analyze-flow.mjs","test:cicd-failure-help":"bun test/test-cicd-failure-help.mjs","test:ai-analyze-stream":"bun test/test-ai-analyze-stream.mjs","test:ai-sse-parser":"bun test/test-ai-sse-parser.mjs","test:ai-render-markdown":"bun test/test-ai-render-markdown.mjs","test:ai-onboarding-mode":"bun test/test-ai-onboarding-mode.mjs","test:ai-fit":"bun test/test-ai-fit.mjs","test:platform-layout":"bun test/test-platform-layout.mjs","test:frame-fit":"bun test/run-frame-fit.mjs","test:onboarding-min-size":"bun test/test-onboarding-min-size.mjs","test:min-size-gate":"bun test/test-min-size-gate.mjs","test:shell-size-gate":"bun test/test-shell-size-gate.mjs","test:build-log-sanitize":"bun test/test-build-log-sanitize.mjs","test:build-output-viewport":"bun test/test-build-output-viewport.mjs","test:diff-viewer-viewport":"bun test/test-diff-viewer-viewport.mjs","test:build-complete-exit":"bun test/test-build-complete-exit.mjs","test:ai-stream-markdown":"bun test/test-ai-stream-markdown.mjs","test:support-mailto":"bun test/test-support-mailto.mjs","test:support-redact":"bun test/test-support-redact.mjs","test:support-internal-log":"bun test/test-support-internal-log.mjs","test:support-help-menu":"bun test/test-support-help-menu.mjs","test:support-contact":"bun test/test-support-contact.mjs","test:support-upload-prompt":"bun test/test-support-upload-prompt.mjs","test:support-bundle-files":"bun test/test-support-bundle-files.mjs","test:mcp-live-update-onboarding":"bun test/test-mcp-live-update-onboarding.mjs","test:app-set-options":"bun test/test-app-set-options.mjs"},dependencies:{"@inkjs/ui":"^2.0.0","@rrweb/types":"^2.0.1","@xterm/addon-serialize":"^0.14.0","@xterm/headless":"^6.0.0","happy-dom":"^20.10.4",ink:"^7.0.4","ink-spinner":"^5.0.0",jsonwebtoken:"^9.0.3","node-forge":"^1.4.0",qrcode:"^1.5.4",react:"^19.2.6","rrweb-snapshot":"^2.0.1","string-width":"^8.2.1"},optionalDependencies:{"@capgo/cli-helper-darwin-arm64":"^1.1.1","@capgo/cli-helper-darwin-x64":"^1.1.1","node-pty":"^1.1.0"},devDependencies:{"@antfu/eslint-config":"^9.0.0","@bradenmacdonald/s3-lite-client":"npm:@jsr/bradenmacdonald__s3-lite-client@0.9.6","@capacitor/cli":"^8.3.4","@capgo/find-package-manager":"^0.0.18","@clack/prompts":"^1.4.0","@modelcontextprotocol/sdk":"^1.29.0","@sauber/table":"npm:@jsr/sauber__table","@std/semver":"npm:@jsr/std__semver@1.0.8","@supabase/supabase-js":"^2.106.2","@tanstack/intent":"^0.0.41","@types/adm-zip":"^0.5.8","@types/jsonwebtoken":"^9.0.10","@types/node":"^25.9.1","@types/node-forge":"^1.3.14","@types/prettyjson":"^0.0.33","@types/qrcode":"^1.5.6","@types/react":"^19.2.15","@types/tmp":"^0.2.6","@types/ws":"^8.18.1","@typescript/native-preview":"7.0.0-dev.20260526.1","@vercel/ncc":"^0.38.4","@xterm/headless":"^6.0.0","adm-zip":"^0.5.17","ci-info":"^4.4.0",commander:"^14.0.3",eslint:"^10.4.0","git-format-staged":"4.0.1",husky:"^9.1.7","is-wsl":"^3.1.1",micromatch:"^4.0.8",open:"^11.0.0",oxlint:"^1.67.0",partysocket:"^1.1.19",prettyjson:"^1.2.5",tmp:"^0.2.6","tus-js-client":"^4.3.1",typescript:"^6.0.3",ws:"^8.21.0",zod:"^4.4.3"}}});function nHQ(A){if(A&&typeof A==="object"&&"status"in A){let Q=A.status;if(typeof Q==="number")return Q}return}function aHQ(A){if(A instanceof Error)return A.message;if(typeof A==="string")return A;return""}function n_(A){if(A&&typeof A==="object"&&"code"in A){let $=A.code;if(typeof $==="string"&&$.startsWith("commander."))return"commander"}let Q=nHQ(A);if(Q!==void 0){if(Q===401)return"unauthorized";if(Q===403)return"forbidden";if(Q===404)return"not_found";if(Q===413)return"payload_too_large";if(Q>=500)return"server_error"}let B=aHQ(A).toLowerCase();if(/econnrefused|enotfound|fetch failed|network|socket|dns/.test(B))return"network_error";if(/timed out|timeout|etimedout|aborted/.test(B))return"timeout";if(/invalid|must be|required|not allowed|malformed|validation/.test(B))return"validation_error";return"unknown"}function _CA(A){if(A===401)return"unauthorized";if(A===403)return"forbidden";if(A===404)return"not_found";if(A===408||A===504)return"timeout";if(A===413)return"payload_too_large";if(A===429)return"rate_limited";if(A===400||A===422)return"validation_error";if(A>=500)return"server_error";return"unknown"}import{AsyncLocalStorage as rHQ}from"node:async_hooks";function a_(A,Q){return kCA.run(A,()=>Promise.resolve(Q()))}function sHQ(){return kCA.getStore()}function o_(){SCA=!0}function xCA(){return SCA}function fCA(A){bCA=A}function TCA(A){try{bCA?.(A)}catch{}}function gCA(A,Q){let B;try{B=new URL(A).pathname}catch{B=A.split("?")[0]}let $="/functions/v1/",J=B.indexOf($);if(J>=0){let K=B.slice(J+$.length).replace(/^\/+|\/+$/g,"");return K?`${Q} functions:${K}`:`${Q} functions`}let Y="/rest/v1/",X=B.indexOf(Y),G=X>=0?B.slice(X+Y.length):B.replace(/^\//,"");if(G.startsWith("rpc/"))return`rpc:${G.slice(4).split("/")[0]}`;let W=G.split("/")[0]||B;return`${Q} ${W}`}function tHQ(A){let Q=A?.headers;if(!Q)return;let B=Q.get;if(typeof B==="function")return B.call(Q,"capgkey")??void 0;if(Array.isArray(Q))return Q.find(([$])=>$.toLowerCase()==="capgkey")?.[1];return Q.capgkey}function yCA(){return async(Q,B)=>{let $=(B?.method??"GET").toUpperCase(),J=typeof Q==="string"?Q:Q instanceof URL?Q.href:Q.url,Y=sHQ(),X=tHQ(B),G=Date.now();try{let W=await globalThis.fetch(Q,B);return TCA({url:J,method:$,status:W.status,ok:W.ok,durationMs:Date.now()-G,source:Y,apikey:X}),W}catch(W){throw TCA({url:J,method:$,status:0,ok:!1,durationMs:Date.now()-G,source:Y,apikey:X,error:W}),W}}}var kCA,SCA=!1,bCA,vCA=5000;var r_=vA(()=>{kCA=new rHQ});import{homedir as hCA,platform as eHQ,release as A3Q}from"node:os";import{arch as Q3Q,cwd as uCA,env as kI,version as B3Q}from"node:process";function CK(A){return A==="1"||A?.toLowerCase()==="true"||A?.toLowerCase()==="yes"}function X3Q(){if(CK(kI.CAPGO_DISABLE_TELEMETRY)||CK(kI.CAPGO_DISABLE_POSTHOG))return;return kI.CAPGO_CLI_POSTHOG_API_KEY?.trim()||kI.POSTHOG_API_KEY?.trim()||J3Q}function G3Q(A){let Q=A.replace(/\/+$/,"");if(Q.endsWith("/i/v0/e"))return`${Q}/`;let B=Q.replace(/\/capture$/,"/");return new URL("i/v0/e/",B.endsWith("/")?B:`${B}/`).toString()}function W3Q(A){if(A instanceof Error)return{cause:A.cause,message:A.message,name:A.name||"Error",stack:A.stack};if(typeof A==="string")return{message:A,name:"Error",stack:void 0};try{return{message:JSON.stringify(A)??String(A),name:"Error",stack:void 0}}catch{return{message:String(A),name:"Error",stack:void 0}}}function K3Q(A){let Q=A,B=uCA(),$=hCA();if(B)Q=Q.replaceAll(B,"<cwd>");if($)Q=Q.replaceAll($,"~");return Q}function Z3Q(A){let Q=A,B=uCA(),$=hCA();if(B)Q=Q.replaceAll(B,"<cwd>");if($)Q=Q.replaceAll($,"~");return Q.replace(/<cwd>\/[^\s"',)]+/g,"<cwd>/<path>").replace(/~\/[^\s"',)]+/g,"~/<path>").replace(/[\w.%+-]+@[\w.-]+\.[A-Z]{2,}/gi,"<email>").replace(/(https?:\/\/)([^/\s:@]+):([^/\s@]+)@/gi,"$1<redacted>@").replace(/\b[a-z][\w-]*(?:\.[\w-]+){2,}\b/gi,"<app_id>").replace(/\b[a-z]:\\[^\s"',)]+/gi,"<path>").replace(/(^|[\s"'(])\/[^\s"',)]+/g,"$1<path>").replace(/(--(?:token|api[-_]?key|key|password|secret|private[-_]?key|jwt|session|auth)(?:=|\s+))("[^"]+"|'[^']+'|\S+)/gi,"$1<redacted>").replace(/\b((?:token|api[-_]?key|password|secret|authorization)\s*[:=]\s*)[^\s,;]+/gi,"$1<redacted>")}function H3Q(A,Q){let B=A?.split(`
95
95
  `).slice(1).map(($)=>{let J=$.trim(),Y=J.startsWith("at ")?J.slice(3):J,X=Q,G=Y,W=Y.lastIndexOf(" (");if(W!==-1&&Y.endsWith(")"))X=Y.slice(0,W).trim()||Q,G=Y.slice(W+2,-1);else{let q=Y.lastIndexOf(" "),F=q===-1?"":Y.slice(q+1);if(/:\d+:\d+$/.test(F))X=Y.slice(0,q).trim()||Q,G=F}let K=G.lastIndexOf(":"),H=K===-1?-1:G.lastIndexOf(":",K-1);if(K===-1||H===-1)return{function:Q,platform:"custom",lang:"javascript"};return{function:X,filename:K3Q(G.slice(0,H)),lineno:Number.parseInt(G.slice(H+1,K),10),colno:Number.parseInt(G.slice(K+1),10),platform:"custom",lang:"javascript"}}).filter(Boolean);return B&&B.length>0?B:[{function:Q,platform:"custom",lang:"javascript"}]}function D3Q(A){if(!A||typeof A!=="object"||!("code"in A))return;let{code:Q}=A;return typeof Q==="string"?Q:void 0}function mCA(A){return!D3Q(A)?.startsWith("commander.")}function H1A(A){let Q=[],B=A;while(B?.parent){let $=B.name();if($)Q.push($);B=B.parent}return Q.reverse().join(" ")||"unknown"}async function D1A(A){let Q=X3Q();if(!Q)return!1;let B=kI.CAPGO_CLI_POSTHOG_API_HOST?.trim()||kI.POSTHOG_API_HOST?.trim()||$3Q,$;try{$=G3Q(B)}catch{return!1}let J=W3Q(A.error),Y=Z3Q(J.message),X=`cli:${K4.version}:${A.functionName}`,G=H3Q(J.stack,A.functionName),W=G[0],K=[X,A.kind,J.name||"Error",W?.function||A.functionName,W&&"filename"in W?W.filename:"unknown",String(A.status??1)].join(":"),H={token:Q,event:"$exception",properties:{distinct_id:X,$exception_list:[{type:J.name||"Error",value:Y,mechanism:{handled:!0,synthetic:!1},stacktrace:{type:"raw",frames:G}}],$exception_fingerprint:K,architecture:Q3Q,cli_version:K4.version,error_kind:A.kind,function_name:A.functionName,is_ci:Boolean(kI.CI),node_version:B3Q,os_platform:eHQ(),os_release:A3Q(),runtime:"cli",status:A.status},timestamp:new Date().toISOString()};try{let q=new AbortController,F=setTimeout(()=>q.abort(),Y3Q);try{return(await fetch($,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(H),signal:q.signal})).ok}finally{clearTimeout(F)}}catch{return!1}}var $3Q="https://eu.i.posthog.com/i/v0/e/",J3Q="phc_NXDyDajQaTQVwb25DEhIVZfxVUn4R0Y348Z7vWYHZUi",Y3Q=1500;var s_=vA(()=>{mG()});import{existsSync as u7}from"fs";var iF=(A=".",Q="unknown")=>{let B=`${A}/bun.lockb`,$=`${A}/bun.lock`,J=`${A}/pnpm-lock.yaml`,Y=`${A}/shrinkwrap.yaml`,X=`${A}/yarn.lock`,G=`${A}/package-lock.json`,W=`${A}/npm-shrinkwrap.json`;if(u7(B)||u7($))return"bun";if(u7(J)||u7(Y))return"pnpm";if(u7(X))return"yarn";if(u7(G)||u7(W))return"npm";return Q},$m=(A=iF(),Q=!1)=>{switch(A){case"bun":return Q?"bun install":"install";case"pnpm":return Q?"pnpm install":"install";case"yarn":return Q?"yarn install":"install";case"npm":return Q?"npm install":"install";case"unknown":return Q?"unknown unknown":"unknown";default:return Q?"npm install":"install"}},cCA=(A=".",Q="npx")=>{let B=`${A}/bun.lockb`,$=`${A}/bun.lock`,J=`${A}/pnpm-lock.yaml`,Y=`${A}/shrinkwrap.yaml`,X=`${A}/yarn.lock`,G=`${A}/package-lock.json`,W=`${A}/npm-shrinkwrap.json`;if(u7(B)||u7($))return"bunx";if(u7(J)||u7(Y))return"pnpm exec";if(u7(X))return"yarn dlx";if(u7(G)||u7(W))return"npx";return Q};var q1A=()=>{};function Jm(A,Q){if(isNaN(A)||isNaN(Q))throw Error("Cannot compare against non-numbers");return A===Q?0:A<Q?-1:1}function pCA(A=[],Q=[]){if(A.length&&!Q.length)return-1;if(!A.length&&Q.length)return 1;return 0}function Ym(A=[],Q=[]){let B=Math.max(A.length,Q.length);for(let $=0;$<B;$++){let J=A[$],Y=Q[$];if(J===void 0&&Y===void 0)return 0;if(Y===void 0)return 1;if(J===void 0)return-1;if(typeof J==="string"&&typeof Y==="number")return 1;if(typeof J==="number"&&typeof Y==="string")return-1;if(J<Y)return-1;if(J>Y)return 1}return 0}function U1A(A){return typeof A==="number"&&!Number.isNaN(A)&&(!Number.isFinite(A)||0<=A&&A<=Number.MAX_SAFE_INTEGER)}function m7(A){return A.split(".").filter(Boolean).map((Q)=>{if(z3Q.test(Q)){let B=Number(Q);if(U1A(B))return B}return Q})}function QH(A){return A.split(".").filter(Boolean)}function Gm(A,Q){let B=Number(A);if(!U1A(B))throw TypeError(Q);return B}function ID(A){return Number.isNaN(A.major)&&Number.isNaN(A.minor)&&Number.isNaN(A.patch)&&(A.prerelease===void 0||A.prerelease.length===0)&&(A.build===void 0||A.build.length===0)}var eN="0|[1-9]\\d*",q3Q="\\d*[a-zA-Z-][a-zA-Z0-9-]*",F3Q,dCA,iCA,lCA="[0-9A-Za-z-]+",nCA,aCA,oCA,rCA="(?:<|>)?=?",U3Q="x|X|\\*",F1A,Xm,sCA,tCA,z1A=256,z3Q;var oX=vA(()=>{F3Q=`(?<major>${eN})\\.(?<minor>${eN})\\.(?<patch>${eN})`,dCA=`(?:${eN}|${q3Q})`,iCA=`(?:-(?<prerelease>${dCA}(?:\\.${dCA})*))`,nCA=`(?:\\+(?<buildmetadata>${lCA}(?:\\.${lCA})*))`,aCA=`v?${F3Q}${iCA}?${nCA}?`,oCA=new RegExp(`^${aCA}$`),F1A=`${eN}|${U3Q}`,Xm=`[v=\\s]*(?<major>${F1A})(?:\\.(?<minor>${F1A})(?:\\.(?<patch>${F1A})${iCA}?${nCA}?)?)?`,sCA=new RegExp(`^(?<operator>~>?|\\^|${rCA})\\s*${Xm}$`),tCA=new RegExp(`^(?<operator>${rCA})\\s*(${aCA})$|^$`);z3Q=new RegExp(`^${eN}$`)});function xY(A,Q){if(A===Q)return 0;return Jm(A.major,Q.major)||Jm(A.minor,Q.minor)||Jm(A.patch,Q.patch)||pCA(A.prerelease,Q.prerelease)||Ym(A.prerelease,Q.prerelease)}var cG=vA(()=>{oX()});function eCA(A,Q){let B=A.prerelease?.length||Q.prerelease?.length;if(A.major!==Q.major)return B?"premajor":"major";if(A.minor!==Q.minor)return B?"preminor":"minor";if(A.patch!==Q.patch)return B?"prepatch":"patch";if(Ym(A.prerelease,Q.prerelease)!==0)return"prerelease"}var AMA=vA(()=>{oX()});function I1A(A){return A.toFixed(0)}function Y5(A){let Q=I1A(A.major),B=I1A(A.minor),$=I1A(A.patch),J=A.prerelease?.join(".")??"",Y=A.build?.join(".")??"";return[[`${Q}.${B}.${$}`,J].filter((W)=>W).join("-"),Y].filter((W)=>W).join("+")}function I3Q(A,Q){if(ID(Q))return!0;let B=xY(A,Q);switch(Q.operator){case"=":case void 0:return B===0;case"!=":return B!==0;case">":return B>0;case"<":return B<0;case">=":return B>=0;case"<=":return B<=0}}function Wm(A,Q){for(let B of Q)if(!I3Q(A,B))return!1;if(!A.prerelease?.length)return!0;for(let B of Q){if(ID(B))continue;if(!B.prerelease?.length)continue;let{major:$,minor:J,patch:Y}=B;if(A.major===$&&A.minor===J&&A.patch===Y)return!0}return!1}var Km=vA(()=>{oX();cG()});function t_(A,Q){return Q.some((B)=>Wm(A,B))}var e_=vA(()=>{Km()});function O3Q(A=[]){let Q=[...A],B=Q.length;while(B>=0){let $=Q[B];if(typeof $==="number"){Q[B]=$+1;break}B-=1}if(B===-1)Q.push(0);return Q}function AP(A=[],Q){let B=O3Q(A);if(!Q)return B;let $=m7(Q);if($.every((J)=>typeof J==="string")){if($.every((J,Y)=>J===B[Y])&&typeof B[$.length]==="number")return B;$=[...$,0]}return $}function nF(A,Q,B={}){let $=B.build!==void 0?QH(B.build):A.build??[];switch(Q){case"premajor":return{major:A.major+1,minor:0,patch:0,prerelease:AP(A.prerelease,B.prerelease),build:$};case"preminor":return{major:A.major,minor:A.minor+1,patch:0,prerelease:AP(A.prerelease,B.prerelease),build:$};case"prepatch":return{major:A.major,minor:A.minor,patch:A.patch+1,prerelease:AP(A.prerelease,B.prerelease),build:$};case"prerelease":{let Y=(A.prerelease??[]).length===0?A.patch+1:A.patch;return{major:A.major,minor:A.minor,patch:Y,prerelease:AP(A.prerelease,B.prerelease),build:$}}case"major":return{major:(A.prerelease??[]).length===0||A.minor!==0||A.patch!==0?A.major+1:A.major,minor:0,patch:0,prerelease:[],build:$};case"minor":{let Y=(A.prerelease??[]).length===0||A.patch!==0?A.minor+1:A.minor;return{major:A.major,minor:Y,patch:0,prerelease:[],build:$}}case"patch":{let Y=(A.prerelease??[]).length===0?A.patch+1:A.patch;return{major:A.major,minor:A.minor,patch:Y,prerelease:[],build:$}}case"pre":return{major:A.major,minor:A.minor,patch:A.patch,prerelease:AP(A.prerelease,B.prerelease),build:$};default:throw TypeError(`Cannot increment version: invalid argument ${Q}`)}}var QMA=vA(()=>{oX()});var Zm,AL;var QP=vA(()=>{Zm={major:Number.NaN,minor:Number.NaN,patch:Number.NaN,prerelease:[],build:[]},AL={operator:void 0,...Zm}});var O1A=vA(()=>{QP();oX()});function C1A(A,Q){return xY(A,Q)>0}var M1A=vA(()=>{cG()});var BMA=vA(()=>{e_();M1A()});function rX(A,Q){return xY(A,Q)<0}var N1A=vA(()=>{cG()});var $MA=vA(()=>{e_();N1A()});function C3Q(A){let B=A.match(tCA)?.groups;if(!B)return null;let{operator:$}=B;return{operator:$||void 0,...Zm}}function E4(A){return!A||A.toLowerCase()==="x"||A==="*"}function M3Q(A){if(E4(A.major))return;if(E4(A.minor))return{operator:">=",major:+A.major,minor:0,patch:0,prerelease:[],build:[]};if(E4(A.patch))return{operator:">=",major:+A.major,minor:+A.minor,patch:0,prerelease:[],build:[]};return{operator:">=",major:+A.major,minor:+A.minor,patch:+A.patch,prerelease:A.prerelease?m7(A.prerelease):[],build:[]}}function N3Q(A){if(E4(A.major))return;if(E4(A.minor))return{operator:"<",major:+A.major+1,minor:0,patch:0,prerelease:[],build:[]};if(E4(A.patch))return{operator:"<",major:+A.major,minor:+A.minor+1,patch:0,prerelease:[],build:[]};if(A.prerelease)return{operator:"<=",major:+A.major,minor:+A.minor,patch:+A.patch,prerelease:m7(A.prerelease),build:[]};return{operator:"<=",major:+A.major,minor:+A.minor,patch:+A.patch,prerelease:[],build:[]}}function L3Q(A){let Q=A.match(new RegExp(`^${Xm}`)),B=Q?.groups;if(!B)return null;let $=Q[0].length,J=A.slice($).match(/^\s+-\s+/);if(!J)return null;let Y=J[0].length,G=A.slice($+Y).match(new RegExp(`^${Xm}\\s*$`))?.groups,W=M3Q(B),K=N3Q(G);return[W,K].filter(Boolean)}function V3Q(A){let Q=E4(A.major),B=E4(A.minor),$=E4(A.patch),J=+A.major,Y=+A.minor,X=+A.patch;if(Q)return[AL];if(B)return[{operator:">=",major:J,minor:0,patch:0},{operator:"<",major:J+1,minor:0,patch:0}];if($){if(J===0)return[{operator:">=",major:J,minor:Y,patch:0},{operator:"<",major:J,minor:Y+1,patch:0}];return[{operator:">=",major:J,minor:Y,patch:0},{operator:"<",major:J+1,minor:0,patch:0}]}let G=m7(A.prerelease??"");if(J===0){if(Y===0)return[{operator:">=",major:J,minor:Y,patch:X,prerelease:G},{operator:"<",major:J,minor:Y,patch:X+1}];return[{operator:">=",major:J,minor:Y,patch:X,prerelease:G},{operator:"<",major:J,minor:Y+1,patch:0}]}return[{operator:">=",major:J,minor:Y,patch:X,prerelease:G},{operator:"<",major:J+1,minor:0,patch:0}]}function E3Q(A){let Q=E4(A.major),B=E4(A.minor),$=E4(A.patch),J=+A.major,Y=+A.minor,X=+A.patch;if(Q)return[AL];if(B)return[{operator:">=",major:J,minor:0,patch:0},{operator:"<",major:J+1,minor:0,patch:0}];if($)return[{operator:">=",major:J,minor:Y,patch:0},{operator:"<",major:J,minor:Y+1,patch:0}];let G=m7(A.prerelease??"");return[{operator:">=",major:J,minor:Y,patch:X,prerelease:G},{operator:"<",major:J,minor:Y+1,patch:0}]}function R3Q(A){let Q=E4(A.major),B=E4(A.minor),$=E4(A.patch),J=+A.major,Y=+A.minor,X=+A.patch;if(Q)return[{operator:"<",major:0,minor:0,patch:0}];if(B){if($)return[{operator:"<",major:J,minor:0,patch:0}];return[{operator:"<",major:J,minor:0,patch:0}]}if($)return[{operator:"<",major:J,minor:Y,patch:0}];let G=m7(A.prerelease??""),W=QH(A.build??"");return[{operator:"<",major:J,minor:Y,patch:X,prerelease:G,build:W}]}function j3Q(A){let Q=E4(A.minor),B=E4(A.patch),$=+A.major,J=+A.minor,Y=+A.patch;if(Q)return[{operator:"<",major:$+1,minor:0,patch:0}];if(B)return[{operator:"<",major:$,minor:J+1,patch:0}];let X=m7(A.prerelease??""),G=QH(A.build??"");return[{operator:"<=",major:$,minor:J,patch:Y,prerelease:X,build:G}]}function w3Q(A){let Q=E4(A.major),B=E4(A.minor),$=E4(A.patch),J=+A.major,Y=+A.minor,X=+A.patch;if(Q)return[{operator:"<",major:0,minor:0,patch:0}];if(B)return[{operator:">=",major:J+1,minor:0,patch:0}];if($)return[{operator:">=",major:J,minor:Y+1,patch:0}];let G=m7(A.prerelease??""),W=QH(A.build??"");return[{operator:">",major:J,minor:Y,patch:X,prerelease:G,build:W}]}function _3Q(A){let Q=E4(A.major),B=E4(A.minor),$=E4(A.patch),J=+A.major,Y=+A.minor,X=+A.patch;if(Q)return[AL];if(B)return[{operator:">=",major:J,minor:0,patch:0}];if($)return[{operator:">=",major:J,minor:Y,patch:0}];let G=m7(A.prerelease??""),W=QH(A.build??"");return[{operator:">=",major:J,minor:Y,patch:X,prerelease:G,build:W}]}function P3Q(A){let Q=E4(A.major),B=E4(A.minor),$=E4(A.patch),J=+A.major,Y=+A.minor,X=+A.patch;if(Q)return[AL];if(B)return[{operator:">=",major:J,minor:0,patch:0},{operator:"<",major:J+1,minor:0,patch:0}];if($)return[{operator:">=",major:J,minor:Y,patch:0},{operator:"<",major:J,minor:Y+1,patch:0}];let G=m7(A.prerelease??""),W=QH(A.build??"");return[{operator:A.operator==="="?"=":void 0,major:J,minor:Y,patch:X,prerelease:G,build:W}]}function T3Q(A){let Q=A.match(sCA)?.groups;if(!Q)return C3Q(A);switch(Q.operator){case"^":return V3Q(Q);case"~":case"~>":return E3Q(Q);case"<":return R3Q(Q);case"<=":return j3Q(Q);case">":return w3Q(Q);case">=":return _3Q(Q);default:return P3Q(Q)}}function k3Q(A){return A.split(/\s+/).flatMap(T3Q)}function Hm(A){let Q=A.replaceAll(/(?<=[<>=~^])(\s+)/g,"").split(/\s*\|\|\s*/).map((B)=>L3Q(B)||k3Q(B));if(Q.some((B)=>B.includes(null)))throw TypeError(`Cannot parse version range: range "${A}" is invalid`);return Q}var L1A=vA(()=>{oX();QP()});function sB(A){if(typeof A!=="string")throw TypeError(`Cannot parse version as version must be a string: received ${typeof A}`);if(A.length>z1A)throw TypeError(`Cannot parse version as version length is too long: length is ${A.length}, max length is ${z1A}`);A=A.trim();let Q=A.match(oCA)?.groups;if(!Q)throw TypeError(`Cannot parse version: ${A}`);let B=Gm(Q.major,`Cannot parse version ${A}: invalid major version`),$=Gm(Q.minor,`Cannot parse version ${A}: invalid minor version`),J=Gm(Q.patch,`Cannot parse version ${A}: invalid patch version`),Y=Q.prerelease?m7(Q.prerelease):[],X=Q.buildmetadata?QH(Q.buildmetadata):[];return{major:B,minor:$,patch:J,prerelease:Y,build:X}}var Dm=vA(()=>{oX();oX()});function JMA(A,Q){let B=A.operator,$=Q.operator;if(B===void 0){if(ID(A))return!0;return t_(A,[[Q]])}if($===void 0){if(ID(Q))return!0;return t_(Q,[[A]])}let J=xY(A,Q);return(B===">="||B===">")&&($===">="||$===">")||(B==="<="||B==="<")&&($==="<="||$==="<")||J===0&&((B===">="||B==="<=")&&($===">="||$==="<="))||J===-1&&(B===">="||B===">")&&($==="<="||$==="<")||J===1&&(B==="<="||B==="<")&&($===">="||$===">")}function S3Q(A){return A.every((Q)=>{return Q.some((B)=>x3Q(B))})}function x3Q(A){for(let Q=0;Q<A.length-1;Q++){let B=A[Q];for(let $ of A.slice(Q+1))if(!JMA(B,$))return!1}return!0}function YMA(A,Q){return S3Q([A,Q])&&A.some((B)=>{return Q.some(($)=>{return B.every((J)=>{return $.every((Y)=>JMA(J,Y))})})})}var XMA=vA(()=>{oX();cG();e_()});var GMA=vA(()=>{L1A()});var WMA=vA(()=>{QP();QP();O1A()});function BP(A){try{return sB(A),!0}catch{return!1}}var KMA=vA(()=>{Dm()});var ZMA=vA(()=>{Dm()});var HMA=vA(()=>{oX()});var DMA=vA(()=>{cG()});var qMA=vA(()=>{cG()});var FMA=vA(()=>{Km();oX();cG()});function V1A(A,Q){return xY(A,Q)>=0}var UMA=vA(()=>{cG()});var zMA=vA(()=>{Km();oX();cG()});var IMA=vA(()=>{cG()});var MK=vA(()=>{cG();AMA();e_();QMA();O1A();BMA();$MA();L1A();Dm();XMA();GMA();WMA();KMA();ZMA();HMA();DMA();qMA();M1A();FMA();UMA();N1A();zMA();IMA()});var c7=r((DE0,Um)=>{var OMA,CMA,MMA,NMA,LMA,VMA,EMA,RMA,jMA,wMA,_MA,PMA,TMA,qm,E1A,kMA,SMA,xMA,QL,bMA,fMA,vMA,gMA,yMA,hMA,uMA,mMA,cMA,Fm,dMA,lMA,pMA;(function(A){var Q=typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:{};if(typeof define==="function"&&define.amd)define("tslib",["exports"],function($){A(B(Q,B($)))});else if(typeof Um==="object"&&typeof DE0==="object")A(B(Q,B(DE0)));else A(B(Q));function B($,J){if($!==Q)if(typeof Object.create==="function")Object.defineProperty($,"__esModule",{value:!0});else $.__esModule=!0;return function(Y,X){return $[Y]=J?J(Y,X):X}}})(function(A){var Q=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Y,X){Y.__proto__=X}||function(Y,X){for(var G in X)if(Object.prototype.hasOwnProperty.call(X,G))Y[G]=X[G]};OMA=function(Y,X){if(typeof X!=="function"&&X!==null)throw TypeError("Class extends value "+String(X)+" is not a constructor or null");Q(Y,X);function G(){this.constructor=Y}Y.prototype=X===null?Object.create(X):(G.prototype=X.prototype,new G)},CMA=Object.assign||function(Y){for(var X,G=1,W=arguments.length;G<W;G++){X=arguments[G];for(var K in X)if(Object.prototype.hasOwnProperty.call(X,K))Y[K]=X[K]}return Y},MMA=function(Y,X){var G={};for(var W in Y)if(Object.prototype.hasOwnProperty.call(Y,W)&&X.indexOf(W)<0)G[W]=Y[W];if(Y!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var K=0,W=Object.getOwnPropertySymbols(Y);K<W.length;K++)if(X.indexOf(W[K])<0&&Object.prototype.propertyIsEnumerable.call(Y,W[K]))G[W[K]]=Y[W[K]]}return G},NMA=function(Y,X,G,W){var K=arguments.length,H=K<3?X:W===null?W=Object.getOwnPropertyDescriptor(X,G):W,q;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")H=Reflect.decorate(Y,X,G,W);else for(var F=Y.length-1;F>=0;F--)if(q=Y[F])H=(K<3?q(H):K>3?q(X,G,H):q(X,G))||H;return K>3&&H&&Object.defineProperty(X,G,H),H},LMA=function(Y,X){return function(G,W){X(G,W,Y)}},VMA=function(Y,X,G,W,K,H){function q(T){if(T!==void 0&&typeof T!=="function")throw TypeError("Function expected");return T}var F=W.kind,U=F==="getter"?"get":F==="setter"?"set":"value",z=!X&&Y?W.static?Y:Y.prototype:null,I=X||(z?Object.getOwnPropertyDescriptor(z,W.name):{}),C,V=!1;for(var E=G.length-1;E>=0;E--){var M={};for(var L in W)M[L]=L==="access"?{}:W[L];for(var L in W.access)M.access[L]=W.access[L];M.addInitializer=function(T){if(V)throw TypeError("Cannot add initializers after decoration has completed");H.push(q(T||null))};var R=(0,G[E])(F==="accessor"?{get:I.get,set:I.set}:I[U],M);if(F==="accessor"){if(R===void 0)continue;if(R===null||typeof R!=="object")throw TypeError("Object expected");if(C=q(R.get))I.get=C;if(C=q(R.set))I.set=C;if(C=q(R.init))K.unshift(C)}else if(C=q(R))if(F==="field")K.unshift(C);else I[U]=C}if(z)Object.defineProperty(z,W.name,I);V=!0},EMA=function(Y,X,G){var W=arguments.length>2;for(var K=0;K<X.length;K++)G=W?X[K].call(Y,G):X[K].call(Y);return W?G:void 0},RMA=function(Y){return typeof Y==="symbol"?Y:"".concat(Y)},jMA=function(Y,X,G){if(typeof X==="symbol")X=X.description?"[".concat(X.description,"]"):"";return Object.defineProperty(Y,"name",{configurable:!0,value:G?"".concat(G," ",X):X})},wMA=function(Y,X){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(Y,X)},_MA=function(Y,X,G,W){function K(H){return H instanceof G?H:new G(function(q){q(H)})}return new(G||(G=Promise))(function(H,q){function F(I){try{z(W.next(I))}catch(C){q(C)}}function U(I){try{z(W.throw(I))}catch(C){q(C)}}function z(I){I.done?H(I.value):K(I.value).then(F,U)}z((W=W.apply(Y,X||[])).next())})},PMA=function(Y,X){var G={label:0,sent:function(){if(H[0]&1)throw H[1];return H[1]},trys:[],ops:[]},W,K,H,q=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return q.next=F(0),q.throw=F(1),q.return=F(2),typeof Symbol==="function"&&(q[Symbol.iterator]=function(){return this}),q;function F(z){return function(I){return U([z,I])}}function U(z){if(W)throw TypeError("Generator is already executing.");while(q&&(q=0,z[0]&&(G=0)),G)try{if(W=1,K&&(H=z[0]&2?K.return:z[0]?K.throw||((H=K.return)&&H.call(K),0):K.next)&&!(H=H.call(K,z[1])).done)return H;if(K=0,H)z=[z[0]&2,H.value];switch(z[0]){case 0:case 1:H=z;break;case 4:return G.label++,{value:z[1],done:!1};case 5:G.label++,K=z[1],z=[0];continue;case 7:z=G.ops.pop(),G.trys.pop();continue;default:if((H=G.trys,!(H=H.length>0&&H[H.length-1]))&&(z[0]===6||z[0]===2)){G=0;continue}if(z[0]===3&&(!H||z[1]>H[0]&&z[1]<H[3])){G.label=z[1];break}if(z[0]===6&&G.label<H[1]){G.label=H[1],H=z;break}if(H&&G.label<H[2]){G.label=H[2],G.ops.push(z);break}if(H[2])G.ops.pop();G.trys.pop();continue}z=X.call(Y,G)}catch(I){z=[6,I],K=0}finally{W=H=0}if(z[0]&5)throw z[1];return{value:z[0]?z[1]:void 0,done:!0}}},TMA=function(Y,X){for(var G in Y)if(G!=="default"&&!Object.prototype.hasOwnProperty.call(X,G))Fm(X,Y,G)},Fm=Object.create?function(Y,X,G,W){if(W===void 0)W=G;var K=Object.getOwnPropertyDescriptor(X,G);if(!K||("get"in K?!X.__esModule:K.writable||K.configurable))K={enumerable:!0,get:function(){return X[G]}};Object.defineProperty(Y,W,K)}:function(Y,X,G,W){if(W===void 0)W=G;Y[W]=X[G]},qm=function(Y){var X=typeof Symbol==="function"&&Symbol.iterator,G=X&&Y[X],W=0;if(G)return G.call(Y);if(Y&&typeof Y.length==="number")return{next:function(){if(Y&&W>=Y.length)Y=void 0;return{value:Y&&Y[W++],done:!Y}}};throw TypeError(X?"Object is not iterable.":"Symbol.iterator is not defined.")},E1A=function(Y,X){var G=typeof Symbol==="function"&&Y[Symbol.iterator];if(!G)return Y;var W=G.call(Y),K,H=[],q;try{while((X===void 0||X-- >0)&&!(K=W.next()).done)H.push(K.value)}catch(F){q={error:F}}finally{try{if(K&&!K.done&&(G=W.return))G.call(W)}finally{if(q)throw q.error}}return H},kMA=function(){for(var Y=[],X=0;X<arguments.length;X++)Y=Y.concat(E1A(arguments[X]));return Y},SMA=function(){for(var Y=0,X=0,G=arguments.length;X<G;X++)Y+=arguments[X].length;for(var W=Array(Y),K=0,X=0;X<G;X++)for(var H=arguments[X],q=0,F=H.length;q<F;q++,K++)W[K]=H[q];return W},xMA=function(Y,X,G){if(G||arguments.length===2){for(var W=0,K=X.length,H;W<K;W++)if(H||!(W in X)){if(!H)H=Array.prototype.slice.call(X,0,W);H[W]=X[W]}}return Y.concat(H||Array.prototype.slice.call(X))},QL=function(Y){return this instanceof QL?(this.v=Y,this):new QL(Y)},bMA=function(Y,X,G){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var W=G.apply(Y,X||[]),K,H=[];return K=Object.create((typeof AsyncIterator==="function"?AsyncIterator:Object).prototype),F("next"),F("throw"),F("return",q),K[Symbol.asyncIterator]=function(){return this},K;function q(E){return function(M){return Promise.resolve(M).then(E,C)}}function F(E,M){if(W[E]){if(K[E]=function(L){return new Promise(function(R,T){H.push([E,L,R,T])>1||U(E,L)})},M)K[E]=M(K[E])}}function U(E,M){try{z(W[E](M))}catch(L){V(H[0][3],L)}}function z(E){E.value instanceof QL?Promise.resolve(E.value.v).then(I,C):V(H[0][2],E)}function I(E){U("next",E)}function C(E){U("throw",E)}function V(E,M){if(E(M),H.shift(),H.length)U(H[0][0],H[0][1])}},fMA=function(Y){var X,G;return X={},W("next"),W("throw",function(K){throw K}),W("return"),X[Symbol.iterator]=function(){return this},X;function W(K,H){X[K]=Y[K]?function(q){return(G=!G)?{value:QL(Y[K](q)),done:!1}:H?H(q):q}:H}},vMA=function(Y){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var X=Y[Symbol.asyncIterator],G;return X?X.call(Y):(Y=typeof qm==="function"?qm(Y):Y[Symbol.iterator](),G={},W("next"),W("throw"),W("return"),G[Symbol.asyncIterator]=function(){return this},G);function W(H){G[H]=Y[H]&&function(q){return new Promise(function(F,U){q=Y[H](q),K(F,U,q.done,q.value)})}}function K(H,q,F,U){Promise.resolve(U).then(function(z){H({value:z,done:F})},q)}},gMA=function(Y,X){if(Object.defineProperty)Object.defineProperty(Y,"raw",{value:X});else Y.raw=X;return Y};var B=Object.create?function(Y,X){Object.defineProperty(Y,"default",{enumerable:!0,value:X})}:function(Y,X){Y.default=X},$=function(Y){return $=Object.getOwnPropertyNames||function(X){var G=[];for(var W in X)if(Object.prototype.hasOwnProperty.call(X,W))G[G.length]=W;return G},$(Y)};yMA=function(Y){if(Y&&Y.__esModule)return Y;var X={};if(Y!=null){for(var G=$(Y),W=0;W<G.length;W++)if(G[W]!=="default")Fm(X,Y,G[W])}return B(X,Y),X},hMA=function(Y){return Y&&Y.__esModule?Y:{default:Y}},uMA=function(Y,X,G,W){if(G==="a"&&!W)throw TypeError("Private accessor was defined without a getter");if(typeof X==="function"?Y!==X||!W:!X.has(Y))throw TypeError("Cannot read private member from an object whose class did not declare it");return G==="m"?W:G==="a"?W.call(Y):W?W.value:X.get(Y)},mMA=function(Y,X,G,W,K){if(W==="m")throw TypeError("Private method is not writable");if(W==="a"&&!K)throw TypeError("Private accessor was defined without a setter");if(typeof X==="function"?Y!==X||!K:!X.has(Y))throw TypeError("Cannot write private member to an object whose class did not declare it");return W==="a"?K.call(Y,G):K?K.value=G:X.set(Y,G),G},cMA=function(Y,X){if(X===null||typeof X!=="object"&&typeof X!=="function")throw TypeError("Cannot use 'in' operator on non-object");return typeof Y==="function"?X===Y:Y.has(X)},dMA=function(Y,X,G){if(X!==null&&X!==void 0){if(typeof X!=="object"&&typeof X!=="function")throw TypeError("Object expected.");var W,K;if(G){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");W=X[Symbol.asyncDispose]}if(W===void 0){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");if(W=X[Symbol.dispose],G)K=W}if(typeof W!=="function")throw TypeError("Object not disposable.");if(K)W=function(){try{K.call(this)}catch(H){return Promise.reject(H)}};Y.stack.push({value:X,dispose:W,async:G})}else if(G)Y.stack.push({async:!0});return X};var J=typeof SuppressedError==="function"?SuppressedError:function(Y,X,G){var W=Error(G);return W.name="SuppressedError",W.error=Y,W.suppressed=X,W};lMA=function(Y){function X(H){Y.error=Y.hasError?new J(H,Y.error,"An error was suppressed during disposal."):H,Y.hasError=!0}var G,W=0;function K(){while(G=Y.stack.pop())try{if(!G.async&&W===1)return W=0,Y.stack.push(G),Promise.resolve().then(K);if(G.dispose){var H=G.dispose.call(G.value);if(G.async)return W|=2,Promise.resolve(H).then(K,function(q){return X(q),K()})}else W|=1}catch(q){X(q)}if(W===1)return Y.hasError?Promise.reject(Y.error):Promise.resolve();if(Y.hasError)throw Y.error}return K()},pMA=function(Y,X){if(typeof Y==="string"&&/^\.\.?\//.test(Y))return Y.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(G,W,K,H,q){return W?X?".jsx":".js":K&&(!H||!q)?G:K+H+"."+q.toLowerCase()+"js"});return Y},A("__extends",OMA),A("__assign",CMA),A("__rest",MMA),A("__decorate",NMA),A("__param",LMA),A("__esDecorate",VMA),A("__runInitializers",EMA),A("__propKey",RMA),A("__setFunctionName",jMA),A("__metadata",wMA),A("__awaiter",_MA),A("__generator",PMA),A("__exportStar",TMA),A("__createBinding",Fm),A("__values",qm),A("__read",E1A),A("__spread",kMA),A("__spreadArrays",SMA),A("__spreadArray",xMA),A("__await",QL),A("__asyncGenerator",bMA),A("__asyncDelegator",fMA),A("__asyncValues",vMA),A("__makeTemplateObject",gMA),A("__importStar",yMA),A("__importDefault",hMA),A("__classPrivateFieldGet",uMA),A("__classPrivateFieldSet",mMA),A("__classPrivateFieldIn",cMA),A("__addDisposableResource",dMA),A("__disposeResources",lMA),A("__rewriteRelativeImportExtension",pMA)})});var aMA=r((iMA)=>{Object.defineProperty(iMA,"__esModule",{value:!0});iMA.resolveFetch=void 0;var b3Q=(A)=>{if(A)return(...Q)=>A(...Q);return(...Q)=>fetch(...Q)};iMA.resolveFetch=b3Q});var R1A=r((eMA)=>{Object.defineProperty(eMA,"__esModule",{value:!0});eMA.FunctionRegion=eMA.FunctionsHttpError=eMA.FunctionsRelayError=eMA.FunctionsFetchError=eMA.FunctionsError=void 0;class $P extends Error{constructor(A,Q="FunctionsError",B){super(A);this.name=Q,this.context=B}toJSON(){return{name:this.name,message:this.message,context:this.context}}}eMA.FunctionsError=$P;class rMA extends $P{constructor(A){super("Failed to send a request to the Edge Function","FunctionsFetchError",A)}}eMA.FunctionsFetchError=rMA;class sMA extends $P{constructor(A){super("Relay Error invoking the Edge Function","FunctionsRelayError",A)}}eMA.FunctionsRelayError=sMA;class tMA extends $P{constructor(A){super("Edge Function returned a non-2xx status code","FunctionsHttpError",A)}}eMA.FunctionsHttpError=tMA;var oMA;(function(A){A.Any="any",A.ApNortheast1="ap-northeast-1",A.ApNortheast2="ap-northeast-2",A.ApSouth1="ap-south-1",A.ApSoutheast1="ap-southeast-1",A.ApSoutheast2="ap-southeast-2",A.CaCentral1="ca-central-1",A.EuCentral1="eu-central-1",A.EuWest1="eu-west-1",A.EuWest2="eu-west-2",A.EuWest3="eu-west-3",A.SaEast1="sa-east-1",A.UsEast1="us-east-1",A.UsWest1="us-west-1",A.UsWest2="us-west-2"})(oMA||(eMA.FunctionRegion=oMA={}))});var JNA=r((BNA)=>{Object.defineProperty(BNA,"__esModule",{value:!0});BNA.FunctionsClient=void 0;var h3Q=c7(),u3Q=aMA(),BL=R1A();class QNA{constructor(A,{headers:Q={},customFetch:B,region:$=BL.FunctionRegion.Any}={}){this.url=A,this.headers=Q,this.region=$,this.fetch=(0,u3Q.resolveFetch)(B)}setAuth(A){this.headers.Authorization=`Bearer ${A}`}invoke(A){return h3Q.__awaiter(this,arguments,void 0,function*(Q,B={}){var $;let J,Y;try{let{headers:X,method:G,body:W,signal:K,timeout:H}=B,q={},{region:F}=B;if(!F)F=this.region;let U=new URL(`${this.url}/${Q}`);if(F&&F!=="any")q["x-region"]=F,U.searchParams.set("forceFunctionRegion",F);let z;if(W&&(X&&!Object.prototype.hasOwnProperty.call(X,"Content-Type")||!X))if(typeof Blob<"u"&&W instanceof Blob||W instanceof ArrayBuffer)q["Content-Type"]="application/octet-stream",z=W;else if(typeof W==="string")q["Content-Type"]="text/plain",z=W;else if(typeof FormData<"u"&&W instanceof FormData)z=W;else q["Content-Type"]="application/json",z=JSON.stringify(W);else if(W&&typeof W!=="string"&&!(typeof Blob<"u"&&W instanceof Blob)&&!(W instanceof ArrayBuffer)&&!(typeof FormData<"u"&&W instanceof FormData))z=JSON.stringify(W);else z=W;let I=K;if(H)if(Y=new AbortController,J=setTimeout(()=>Y.abort(),H),K)I=Y.signal,K.addEventListener("abort",()=>Y.abort());else I=Y.signal;let C=yield this.fetch(U.toString(),{method:G||"POST",headers:Object.assign(Object.assign(Object.assign({},q),this.headers),X),body:z,signal:I}).catch((L)=>{throw new BL.FunctionsFetchError(L)}),V=C.headers.get("x-relay-error");if(V&&V==="true")throw new BL.FunctionsRelayError(C);if(!C.ok)throw new BL.FunctionsHttpError(C);let E=(($=C.headers.get("Content-Type"))!==null&&$!==void 0?$:"text/plain").split(";")[0].trim(),M;if(E==="application/json")M=yield C.json();else if(E==="application/octet-stream"||E==="application/pdf")M=yield C.blob();else if(E==="text/event-stream")M=C;else if(E==="multipart/form-data")M=yield C.formData();else M=yield C.text();return{data:M,error:null,response:C}}catch(X){return{data:null,error:X,response:X instanceof BL.FunctionsHttpError||X instanceof BL.FunctionsRelayError?X.context:void 0}}finally{if(J)clearTimeout(J)}})}}BNA.FunctionsClient=QNA});var YNA=r((aF)=>{Object.defineProperty(aF,"__esModule",{value:!0});aF.FunctionRegion=aF.FunctionsRelayError=aF.FunctionsHttpError=aF.FunctionsFetchError=aF.FunctionsError=aF.FunctionsClient=void 0;var m3Q=JNA();Object.defineProperty(aF,"FunctionsClient",{enumerable:!0,get:function(){return m3Q.FunctionsClient}});var JP=R1A();Object.defineProperty(aF,"FunctionsError",{enumerable:!0,get:function(){return JP.FunctionsError}});Object.defineProperty(aF,"FunctionsFetchError",{enumerable:!0,get:function(){return JP.FunctionsFetchError}});Object.defineProperty(aF,"FunctionsHttpError",{enumerable:!0,get:function(){return JP.FunctionsHttpError}});Object.defineProperty(aF,"FunctionsRelayError",{enumerable:!0,get:function(){return JP.FunctionsRelayError}});Object.defineProperty(aF,"FunctionRegion",{enumerable:!0,get:function(){return JP.FunctionRegion}})});function GNA(A,Q){return new Promise((B)=>{if(Q===null||Q===void 0?void 0:Q.aborted){B();return}let $=setTimeout(()=>{Q===null||Q===void 0||Q.removeEventListener("abort",J),B()},A);function J(){clearTimeout($),B()}Q===null||Q===void 0||Q.addEventListener("abort",J)})}function l3Q(A,Q,B,$){if(!$||B>=3)return!1;if(!ZNA.includes(A))return!1;if(!d3Q.includes(Q))return!1;return!0}function YP(A){return YP=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Q){return typeof Q}:function(Q){return Q&&typeof Symbol=="function"&&Q.constructor===Symbol&&Q!==Symbol.prototype?"symbol":typeof Q},YP(A)}function a3Q(A,Q){if(YP(A)!="object"||!A)return A;var B=A[Symbol.toPrimitive];if(B!==void 0){var $=B.call(A,Q||"default");if(YP($)!="object")return $;throw TypeError("@@toPrimitive must return a primitive value.")}return(Q==="string"?String:Number)(A)}function o3Q(A){var Q=a3Q(A,"string");return YP(Q)=="symbol"?Q:Q+""}function r3Q(A,Q,B){return(Q=o3Q(Q))in A?Object.defineProperty(A,Q,{value:B,enumerable:!0,configurable:!0,writable:!0}):A[Q]=B,A}function KNA(A,Q){var B=Object.keys(A);if(Object.getOwnPropertySymbols){var $=Object.getOwnPropertySymbols(A);Q&&($=$.filter(function(J){return Object.getOwnPropertyDescriptor(A,J).enumerable})),B.push.apply(B,$)}return B}function zm(A){for(var Q=1;Q<arguments.length;Q++){var B=arguments[Q]!=null?arguments[Q]:{};Q%2?KNA(Object(B),!0).forEach(function($){r3Q(A,$,B[$])}):Object.getOwnPropertyDescriptors?Object.defineProperties(A,Object.getOwnPropertyDescriptors(B)):KNA(Object(B)).forEach(function($){Object.defineProperty(A,$,Object.getOwnPropertyDescriptor(B,$))})}return A}var XNA=(A)=>Math.min(1000*2**A,30000),d3Q,ZNA,j1A,p3Q=class{constructor(A){var Q,B,$,J,Y;if(this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=A.method,this.url=A.url,this.headers=new Headers(A.headers),this.schema=A.schema,this.body=A.body,this.shouldThrowOnError=(Q=A.shouldThrowOnError)!==null&&Q!==void 0?Q:!1,this.signal=A.signal,this.isMaybeSingle=(B=A.isMaybeSingle)!==null&&B!==void 0?B:!1,this.shouldStripNulls=($=A.shouldStripNulls)!==null&&$!==void 0?$:!1,this.urlLengthLimit=(J=A.urlLengthLimit)!==null&&J!==void 0?J:8000,this.retryEnabled=(Y=A.retry)!==null&&Y!==void 0?Y:!0,A.fetch)this.fetch=A.fetch;else this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get("Accept")==="text/csv")throw Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(A,Q){return this.headers=new Headers(this.headers),this.headers.set(A,Q),this}retry(A){return this.retryEnabled=A,this}then(A,Q){var B=this;if(this.schema===void 0);else if(["GET","HEAD"].includes(this.method))this.headers.set("Accept-Profile",this.schema);else this.headers.set("Content-Profile",this.schema);if(this.method!=="GET"&&this.method!=="HEAD")this.headers.set("Content-Type","application/json");if(this.shouldStripNulls){let X=this.headers.get("Accept");if(X==="application/vnd.pgrst.object+json")this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped");else if(!X||X==="application/json")this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}let $=this.fetch,Y=(async()=>{let X=0;while(!0){let K={};if(B.headers.forEach((q,F)=>{K[F]=q}),X>0)K["X-Retry-Count"]=String(X);let H;try{H=await $(B.url.toString(),{method:B.method,headers:K,body:JSON.stringify(B.body,(q,F)=>typeof F==="bigint"?F.toString():F),signal:B.signal})}catch(q){if((q===null||q===void 0?void 0:q.name)==="AbortError"||(q===null||q===void 0?void 0:q.code)==="ABORT_ERR")throw q;if(!ZNA.includes(B.method))throw q;if(B.retryEnabled&&X<3){let F=XNA(X);X++,await GNA(F,B.signal);continue}throw q}if(l3Q(B.method,H.status,X,B.retryEnabled)){var G,W;let q=(G=(W=H.headers)===null||W===void 0?void 0:W.get("Retry-After"))!==null&&G!==void 0?G:null,F=q!==null?Math.max(0,parseInt(q,10)||0)*1000:XNA(X);await H.text(),X++,await GNA(F,B.signal);continue}return await B.processResponse(H)}})();if(!this.shouldThrowOnError)Y=Y.catch((X)=>{var G;let W="",K="",H="",q=X===null||X===void 0?void 0:X.cause;if(q){var F,U,z,I;let E=(F=q===null||q===void 0?void 0:q.message)!==null&&F!==void 0?F:"",M=(U=q===null||q===void 0?void 0:q.code)!==null&&U!==void 0?U:"";if(W=`${(z=X===null||X===void 0?void 0:X.name)!==null&&z!==void 0?z:"FetchError"}: ${X===null||X===void 0?void 0:X.message}`,W+=`
96
96
 
97
97
  Caused by: ${(I=q===null||q===void 0?void 0:q.name)!==null&&I!==void 0?I:"Error"}: ${E}`,M)W+=` (${M})`;if(q===null||q===void 0?void 0:q.stack)W+=`
package/dist/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capgo/cli",
3
3
  "type": "module",
4
- "version": "8.20.0",
4
+ "version": "8.20.1",
5
5
  "description": "A CLI to upload to capgo servers",
6
6
  "author": "Martin martin@capgo.app",
7
7
  "license": "Apache 2.0",
package/dist/src/sdk.js CHANGED
@@ -123,7 +123,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
123
123
  `)}),D.__defineSetter__("stack",function(X){return[X].concat(D.stack).join(`
124
124
 
125
125
  `)}),D}});var _g=A((LH$,vg)=>{var W9=t("constants"),Hj0=process.cwd,Fq=null,Oj0=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){if(!Fq)Fq=Hj0.call(process);return Fq};try{process.cwd()}catch($){}if(typeof process.chdir==="function"){if(Uq=process.chdir,process.chdir=function($){Fq=null,Uq.call(process,$)},Object.setPrototypeOf)Object.setPrototypeOf(process.chdir,Uq)}var Uq;vg.exports=zj0;function zj0($){if(W9.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./))D($);if(!$.lutimes)X($);if($.chown=Y($.chown),$.fchown=Y($.fchown),$.lchown=Y($.lchown),$.chmod=J($.chmod),$.fchmod=J($.fchmod),$.lchmod=J($.lchmod),$.chownSync=Z($.chownSync),$.fchownSync=Z($.fchownSync),$.lchownSync=Z($.lchownSync),$.chmodSync=Q($.chmodSync),$.fchmodSync=Q($.fchmodSync),$.lchmodSync=Q($.lchmodSync),$.stat=F($.stat),$.fstat=F($.fstat),$.lstat=F($.lstat),$.statSync=U($.statSync),$.fstatSync=U($.fstatSync),$.lstatSync=U($.lstatSync),$.chmod&&!$.lchmod)$.lchmod=function(q,W,H){if(H)process.nextTick(H)},$.lchmodSync=function(){};if($.chown&&!$.lchown)$.lchown=function(q,W,H,O){if(O)process.nextTick(O)},$.lchownSync=function(){};if(Oj0==="win32")$.rename=typeof $.rename!=="function"?$.rename:function(q){function W(H,O,z){var V=Date.now(),N=0;q(H,O,function L(E){if(E&&(E.code==="EACCES"||E.code==="EPERM"||E.code==="EBUSY")&&Date.now()-V<60000){if(setTimeout(function(){$.stat(O,function(K,M){if(K&&K.code==="ENOENT")q(H,O,L);else z(E)})},N),N<100)N+=10;return}if(z)z(E)})}if(Object.setPrototypeOf)Object.setPrototypeOf(W,q);return W}($.rename);$.read=typeof $.read!=="function"?$.read:function(q){function W(H,O,z,V,N,L){var E;if(L&&typeof L==="function"){var K=0;E=function(M,w,R){if(M&&M.code==="EAGAIN"&&K<10)return K++,q.call($,H,O,z,V,N,E);L.apply(this,arguments)}}return q.call($,H,O,z,V,N,E)}if(Object.setPrototypeOf)Object.setPrototypeOf(W,q);return W}($.read),$.readSync=typeof $.readSync!=="function"?$.readSync:function(q){return function(W,H,O,z,V){var N=0;while(!0)try{return q.call($,W,H,O,z,V)}catch(L){if(L.code==="EAGAIN"&&N<10){N++;continue}throw L}}}($.readSync);function D(q){q.lchmod=function(W,H,O){q.open(W,W9.O_WRONLY|W9.O_SYMLINK,H,function(z,V){if(z){if(O)O(z);return}q.fchmod(V,H,function(N){q.close(V,function(L){if(O)O(N||L)})})})},q.lchmodSync=function(W,H){var O=q.openSync(W,W9.O_WRONLY|W9.O_SYMLINK,H),z=!0,V;try{V=q.fchmodSync(O,H),z=!1}finally{if(z)try{q.closeSync(O)}catch(N){}else q.closeSync(O)}return V}}function X(q){if(W9.hasOwnProperty("O_SYMLINK")&&q.futimes)q.lutimes=function(W,H,O,z){q.open(W,W9.O_SYMLINK,function(V,N){if(V){if(z)z(V);return}q.futimes(N,H,O,function(L){q.close(N,function(E){if(z)z(L||E)})})})},q.lutimesSync=function(W,H,O){var z=q.openSync(W,W9.O_SYMLINK),V,N=!0;try{V=q.futimesSync(z,H,O),N=!1}finally{if(N)try{q.closeSync(z)}catch(L){}else q.closeSync(z)}return V};else if(q.futimes)q.lutimes=function(W,H,O,z){if(z)process.nextTick(z)},q.lutimesSync=function(){}}function J(q){if(!q)return q;return function(W,H,O){return q.call($,W,H,function(z){if(G(z))z=null;if(O)O.apply(this,arguments)})}}function Q(q){if(!q)return q;return function(W,H){try{return q.call($,W,H)}catch(O){if(!G(O))throw O}}}function Y(q){if(!q)return q;return function(W,H,O,z){return q.call($,W,H,O,function(V){if(G(V))V=null;if(z)z.apply(this,arguments)})}}function Z(q){if(!q)return q;return function(W,H,O){try{return q.call($,W,H,O)}catch(z){if(!G(z))throw z}}}function F(q){if(!q)return q;return function(W,H,O){if(typeof H==="function")O=H,H=null;function z(V,N){if(N){if(N.uid<0)N.uid+=4294967296;if(N.gid<0)N.gid+=4294967296}if(O)O.apply(this,arguments)}return H?q.call($,W,H,z):q.call($,W,z)}}function U(q){if(!q)return q;return function(W,H){var O=H?q.call($,W,H):q.call($,W);if(O){if(O.uid<0)O.uid+=4294967296;if(O.gid<0)O.gid+=4294967296}return O}}function G(q){if(!q)return!0;if(q.code==="ENOSYS")return!0;var W=!process.getuid||process.getuid()!==0;if(W){if(q.code==="EINVAL"||q.code==="EPERM")return!0}return!1}}});var yg=A((BH$,ug)=>{var kg=t("stream").Stream;ug.exports=Vj0;function Vj0($){return{ReadStream:D,WriteStream:X};function D(J,Q){if(!(this instanceof D))return new D(J,Q);kg.call(this);var Y=this;this.path=J,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,Q=Q||{};var Z=Object.keys(Q);for(var F=0,U=Z.length;F<U;F++){var G=Z[F];this[G]=Q[G]}if(this.encoding)this.setEncoding(this.encoding);if(this.start!==void 0){if(typeof this.start!=="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!=="number")throw TypeError("end must be a Number");if(this.start>this.end)throw Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){Y._read()});return}$.open(this.path,this.flags,this.mode,function(q,W){if(q){Y.emit("error",q),Y.readable=!1;return}Y.fd=W,Y.emit("open",W),Y._read()})}function X(J,Q){if(!(this instanceof X))return new X(J,Q);kg.call(this),this.path=J,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,Q=Q||{};var Y=Object.keys(Q);for(var Z=0,F=Y.length;Z<F;Z++){var U=Y[Z];this[U]=Q[U]}if(this.start!==void 0){if(typeof this.start!=="number")throw TypeError("start must be a Number");if(this.start<0)throw Error("start must be >= zero");this.pos=this.start}if(this.busy=!1,this._queue=[],this.fd===null)this._open=$.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush()}}});var hg=A((EH$,fg)=>{fg.exports=Nj0;var Kj0=Object.getPrototypeOf||function($){return $.__proto__};function Nj0($){if($===null||typeof $!=="object")return $;if($ instanceof Object)var D={__proto__:Kj0($)};else var D=Object.create(null);return Object.getOwnPropertyNames($).forEach(function(X){Object.defineProperty(D,X,Object.getOwnPropertyDescriptor($,X))}),D}});var I1=A((RH$,Jw)=>{var w1=t("fs"),Mj0=_g(),wj0=yg(),Lj0=hg(),Gq=t("util"),JD,Wq;if(typeof Symbol==="function"&&typeof Symbol.for==="function")JD=Symbol.for("graceful-fs.queue"),Wq=Symbol.for("graceful-fs.previous");else JD="___graceful-fs.queue",Wq="___graceful-fs.previous";function Bj0(){}function gg($,D){Object.defineProperty($,JD,{get:function(){return D}})}var lX=Bj0;if(Gq.debuglog)lX=Gq.debuglog("gfs4");else if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))lX=function(){var $=Gq.format.apply(Gq,arguments);$="GFS4: "+$.split(/\n/).join(`
126
- GFS4: `),console.error($)};if(!w1[JD]){if($w=global[JD]||[],gg(w1,$w),w1.close=function($){function D(X,J){return $.call(w1,X,function(Q){if(!Q)bg();if(typeof J==="function")J.apply(this,arguments)})}return Object.defineProperty(D,Wq,{value:$}),D}(w1.close),w1.closeSync=function($){function D(X){$.apply(w1,arguments),bg()}return Object.defineProperty(D,Wq,{value:$}),D}(w1.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))process.on("exit",function(){lX(w1[JD]),t("assert").equal(w1[JD].length,0)})}var $w;if(!global[JD])gg(global,w1[JD]);Jw.exports=Dw(Lj0(w1));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!w1.__patched)Jw.exports=Dw(w1),w1.__patched=!0;function Dw($){Mj0($),$.gracefulify=Dw,$.createReadStream=w,$.createWriteStream=R;var D=$.readFile;$.readFile=X;function X(I,u,C){if(typeof u==="function")C=u,u=null;return l(I,u,C);function l(n,e,h,j){return D(n,e,function(P){if(P&&(P.code==="EMFILE"||P.code==="ENFILE"))o5([l,[n,e,h],P,j||Date.now(),Date.now()]);else if(typeof h==="function")h.apply(this,arguments)})}}var J=$.writeFile;$.writeFile=Q;function Q(I,u,C,l){if(typeof C==="function")l=C,C=null;return n(I,u,C,l);function n(e,h,j,P,_){return J(e,h,j,function(m){if(m&&(m.code==="EMFILE"||m.code==="ENFILE"))o5([n,[e,h,j,P],m,_||Date.now(),Date.now()]);else if(typeof P==="function")P.apply(this,arguments)})}}var Y=$.appendFile;if(Y)$.appendFile=Z;function Z(I,u,C,l){if(typeof C==="function")l=C,C=null;return n(I,u,C,l);function n(e,h,j,P,_){return Y(e,h,j,function(m){if(m&&(m.code==="EMFILE"||m.code==="ENFILE"))o5([n,[e,h,j,P],m,_||Date.now(),Date.now()]);else if(typeof P==="function")P.apply(this,arguments)})}}var F=$.copyFile;if(F)$.copyFile=U;function U(I,u,C,l){if(typeof C==="function")l=C,C=0;return n(I,u,C,l);function n(e,h,j,P,_){return F(e,h,j,function(m){if(m&&(m.code==="EMFILE"||m.code==="ENFILE"))o5([n,[e,h,j,P],m,_||Date.now(),Date.now()]);else if(typeof P==="function")P.apply(this,arguments)})}}var G=$.readdir;$.readdir=W;var q=/^v[0-5]\./;function W(I,u,C){if(typeof u==="function")C=u,u=null;var l=q.test(process.version)?function(h,j,P,_){return G(h,n(h,j,P,_))}:function(h,j,P,_){return G(h,j,n(h,j,P,_))};return l(I,u,C);function n(e,h,j,P){return function(_,m){if(_&&(_.code==="EMFILE"||_.code==="ENFILE"))o5([l,[e,h,j],_,P||Date.now(),Date.now()]);else{if(m&&m.sort)m.sort();if(typeof j==="function")j.call(this,_,m)}}}}if(process.version.substr(0,4)==="v0.8"){var H=wj0($);L=H.ReadStream,K=H.WriteStream}var O=$.ReadStream;if(O)L.prototype=Object.create(O.prototype),L.prototype.open=E;var z=$.WriteStream;if(z)K.prototype=Object.create(z.prototype),K.prototype.open=M;Object.defineProperty($,"ReadStream",{get:function(){return L},set:function(I){L=I},enumerable:!0,configurable:!0}),Object.defineProperty($,"WriteStream",{get:function(){return K},set:function(I){K=I},enumerable:!0,configurable:!0});var V=L;Object.defineProperty($,"FileReadStream",{get:function(){return V},set:function(I){V=I},enumerable:!0,configurable:!0});var N=K;Object.defineProperty($,"FileWriteStream",{get:function(){return N},set:function(I){N=I},enumerable:!0,configurable:!0});function L(I,u){if(this instanceof L)return O.apply(this,arguments),this;else return L.apply(Object.create(L.prototype),arguments)}function E(){var I=this;k(I.path,I.flags,I.mode,function(u,C){if(u){if(I.autoClose)I.destroy();I.emit("error",u)}else I.fd=C,I.emit("open",C),I.read()})}function K(I,u){if(this instanceof K)return z.apply(this,arguments),this;else return K.apply(Object.create(K.prototype),arguments)}function M(){var I=this;k(I.path,I.flags,I.mode,function(u,C){if(u)I.destroy(),I.emit("error",u);else I.fd=C,I.emit("open",C)})}function w(I,u){return new $.ReadStream(I,u)}function R(I,u){return new $.WriteStream(I,u)}var x=$.open;$.open=k;function k(I,u,C,l){if(typeof C==="function")l=C,C=null;return n(I,u,C,l);function n(e,h,j,P,_){return x(e,h,j,function(m,c){if(m&&(m.code==="EMFILE"||m.code==="ENFILE"))o5([n,[e,h,j,P],m,_||Date.now(),Date.now()]);else if(typeof P==="function")P.apply(this,arguments)})}}return $}function o5($){lX("ENQUEUE",$[0].name,$[1]),w1[JD].push($),Xw()}var qq;function bg(){var $=Date.now();for(var D=0;D<w1[JD].length;++D)if(w1[JD][D].length>2)w1[JD][D][3]=$,w1[JD][D][4]=$;Xw()}function Xw(){if(clearTimeout(qq),qq=void 0,w1[JD].length===0)return;var $=w1[JD].shift(),D=$[0],X=$[1],J=$[2],Q=$[3],Y=$[4];if(Q===void 0)lX("RETRY",D.name,X),D.apply(null,X);else if(Date.now()-Q>=60000){lX("TIMEOUT",D.name,X);var Z=X.pop();if(typeof Z==="function")Z.call(null,J)}else{var F=Date.now()-Y,U=Math.max(Y-Q,1),G=Math.min(U*1.2,100);if(F>=G)lX("RETRY",D.name,X),D.apply(null,X.concat([Q]));else w1[JD].push($)}if(qq===void 0)qq=setTimeout(Xw,0)}});var dg=A((AH$,mg)=>{function x6($,D){if(typeof D==="boolean")D={forever:D};if(this._originalTimeouts=JSON.parse(JSON.stringify($)),this._timeouts=$,this._options=D||{},this._maxRetryTime=D&&D.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._options.forever)this._cachedTimeouts=this._timeouts.slice(0)}mg.exports=x6;x6.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts};x6.prototype.stop=function(){if(this._timeout)clearTimeout(this._timeout);this._timeouts=[],this._cachedTimeouts=null};x6.prototype.retry=function($){if(this._timeout)clearTimeout(this._timeout);if(!$)return!1;var D=new Date().getTime();if($&&D-this._operationStart>=this._maxRetryTime)return this._errors.unshift(Error("RetryOperation timeout occurred")),!1;this._errors.push($);var X=this._timeouts.shift();if(X===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),X=this._timeouts.shift();else return!1;var J=this,Q=setTimeout(function(){if(J._attempts++,J._operationTimeoutCb){if(J._timeout=setTimeout(function(){J._operationTimeoutCb(J._attempts)},J._operationTimeout),J._options.unref)J._timeout.unref()}J._fn(J._attempts)},X);if(this._options.unref)Q.unref();return!0};x6.prototype.attempt=function($,D){if(this._fn=$,D){if(D.timeout)this._operationTimeout=D.timeout;if(D.cb)this._operationTimeoutCb=D.cb}var X=this;if(this._operationTimeoutCb)this._timeout=setTimeout(function(){X._operationTimeoutCb()},X._operationTimeout);this._operationStart=new Date().getTime(),this._fn(this._attempts)};x6.prototype.try=function($){console.log("Using RetryOperation.try() is deprecated"),this.attempt($)};x6.prototype.start=function($){console.log("Using RetryOperation.start() is deprecated"),this.attempt($)};x6.prototype.start=x6.prototype.try;x6.prototype.errors=function(){return this._errors};x6.prototype.attempts=function(){return this._attempts};x6.prototype.mainError=function(){if(this._errors.length===0)return null;var $={},D=null,X=0;for(var J=0;J<this._errors.length;J++){var Q=this._errors[J],Y=Q.message,Z=($[Y]||0)+1;if($[Y]=Z,Z>=X)D=Q,X=Z}return D}});var lg=A((Rj0)=>{var Ej0=dg();Rj0.operation=function($){var D=Rj0.timeouts($);return new Ej0(D,{forever:$&&$.forever,unref:$&&$.unref,maxRetryTime:$&&$.maxRetryTime})};Rj0.timeouts=function($){if($ instanceof Array)return[].concat($);var D={retries:10,factor:2,minTimeout:1000,maxTimeout:1/0,randomize:!1};for(var X in $)D[X]=$[X];if(D.minTimeout>D.maxTimeout)throw Error("minTimeout is greater than maxTimeout");var J=[];for(var Q=0;Q<D.retries;Q++)J.push(this.createTimeout(Q,D));if($&&$.forever&&!J.length)J.push(this.createTimeout(Q,D));return J.sort(function(Y,Z){return Y-Z}),J};Rj0.createTimeout=function($,D){var X=D.randomize?Math.random()+1:1,J=Math.round(X*D.minTimeout*Math.pow(D.factor,$));return J=Math.min(J,D.maxTimeout),J};Rj0.wrap=function($,D,X){if(D instanceof Array)X=D,D=null;if(!X){X=[];for(var J in $)if(typeof $[J]==="function")X.push(J)}for(var Q=0;Q<X.length;Q++){var Y=X[Q],Z=$[Y];$[Y]=function(U){var G=Rj0.operation(D),q=Array.prototype.slice.call(arguments,1),W=q.pop();q.push(function(H){if(G.retry(H))return;if(H)arguments[0]=G.mainError();W.apply(this,arguments)}),G.attempt(function(){U.apply($,q)})}.bind($,Z),$[Y].options=D}}});var ng=A((jH$,Hq)=>{Hq.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];if(process.platform!=="win32")Hq.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")Hq.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var Vq=A((TH$,t5)=>{var H1=global.process,nX=function($){return $&&typeof $==="object"&&typeof $.removeListener==="function"&&typeof $.emit==="function"&&typeof $.reallyExit==="function"&&typeof $.listeners==="function"&&typeof $.kill==="function"&&typeof $.pid==="number"&&typeof $.on==="function"};if(!nX(H1))t5.exports=function(){return function(){}};else{if(Qw=t("assert"),iX=ng(),Yw=/^win/i.test(H1.platform),a5=t("events"),typeof a5!=="function")a5=a5.EventEmitter;if(H1.__signal_exit_emitter__)c1=H1.__signal_exit_emitter__;else c1=H1.__signal_exit_emitter__=new a5,c1.count=0,c1.emitted={};if(!c1.infinite)c1.setMaxListeners(1/0),c1.infinite=!0;t5.exports=function($,D){if(!nX(global.process))return function(){};if(Qw.equal(typeof $,"function","a callback must be provided for exit handler"),pX===!1)Oq();var X="exit";if(D&&D.alwaysLast)X="afterexit";var J=function(){if(c1.removeListener(X,$),c1.listeners("exit").length===0&&c1.listeners("afterexit").length===0)LZ()};return c1.on(X,$),J},LZ=function(){if(!pX||!nX(global.process))return;pX=!1,iX.forEach(function(D){try{H1.removeListener(D,BZ[D])}catch(X){}}),H1.emit=EZ,H1.reallyExit=zq,c1.count-=1},t5.exports.unload=LZ,H9=function(D,X,J){if(c1.emitted[D])return;c1.emitted[D]=!0,c1.emit(D,X,J)},BZ={},iX.forEach(function($){BZ[$]=function(){if(!nX(global.process))return;var X=H1.listeners($);if(X.length===c1.count){if(LZ(),H9("exit",null,$),H9("afterexit",null,$),Yw&&$==="SIGHUP")$="SIGINT";H1.kill(H1.pid,$)}}}),t5.exports.signals=function(){return iX},pX=!1,Oq=function(){if(pX||!nX(global.process))return;pX=!0,c1.count+=1,iX=iX.filter(function(D){try{return H1.on(D,BZ[D]),!0}catch(X){return!1}}),H1.emit=Fw,H1.reallyExit=Zw},t5.exports.load=Oq,zq=H1.reallyExit,Zw=function(D){if(!nX(global.process))return;H1.exitCode=D||0,H9("exit",H1.exitCode,null),H9("afterexit",H1.exitCode,null),zq.call(H1,H1.exitCode)},EZ=H1.emit,Fw=function(D,X){if(D==="exit"&&nX(global.process)){if(X!==void 0)H1.exitCode=X;var J=EZ.apply(this,arguments);return H9("exit",H1.exitCode,null),H9("afterexit",H1.exitCode,null),J}else return EZ.apply(this,arguments)}}var Qw,iX,Yw,a5,c1,LZ,H9,BZ,pX,Oq,zq,Zw,EZ,Fw});var pg=A((Pj0,Uw)=>{var ig=Symbol();function Tj0($,D,X){let J=D[ig];if(J)return D.stat($,(Y,Z)=>{if(Y)return X(Y);X(null,Z.mtime,J)});let Q=new Date(Math.ceil(Date.now()/1000)*1000+5);D.utimes($,Q,Q,(Y)=>{if(Y)return X(Y);D.stat($,(Z,F)=>{if(Z)return X(Z);let U=F.mtime.getTime()%1000===0?"s":"ms";Object.defineProperty(D,ig,{value:U}),X(null,F.mtime,U)})})}function Cj0($){let D=Date.now();if($==="s")D=Math.ceil(D/1000)*1000;return new Date(D)}Pj0.probe=Tj0;Pj0.getMtime=Cj0});var sg=A((hj0,AZ)=>{var vj0=t("path"),Ww=I1(),_j0=lg(),kj0=Vq(),rg=pg(),j8={};function RZ($,D){return D.lockfilePath||`${$}.lock`}function Hw($,D,X){if(!D.realpath)return X(null,vj0.resolve($));D.fs.realpath($,X)}function qw($,D,X){let J=RZ($,D);D.fs.mkdir(J,(Q)=>{if(!Q)return rg.probe(J,D.fs,(Y,Z,F)=>{if(Y)return D.fs.rmdir(J,()=>{}),X(Y);X(null,Z,F)});if(Q.code!=="EEXIST")return X(Q);if(D.stale<=0)return X(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:$}));D.fs.stat(J,(Y,Z)=>{if(Y){if(Y.code==="ENOENT")return qw($,{...D,stale:0},X);return X(Y)}if(!og(Z,D))return X(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:$}));ag($,D,(F)=>{if(F)return X(F);qw($,{...D,stale:0},X)})})})}function og($,D){return $.mtime.getTime()<Date.now()-D.stale}function ag($,D,X){D.fs.rmdir(RZ($,D),(J)=>{if(J&&J.code!=="ENOENT")return X(J);X()})}function Kq($,D){let X=j8[$];if(X.updateTimeout)return;if(X.updateDelay=X.updateDelay||D.update,X.updateTimeout=setTimeout(()=>{X.updateTimeout=null,D.fs.stat(X.lockfilePath,(J,Q)=>{let Y=X.lastUpdate+D.stale<Date.now();if(J){if(J.code==="ENOENT"||Y)return Gw($,X,Object.assign(J,{code:"ECOMPROMISED"}));return X.updateDelay=1000,Kq($,D)}if(X.mtime.getTime()!==Q.mtime.getTime())return Gw($,X,Object.assign(Error("Unable to update lock within the stale threshold"),{code:"ECOMPROMISED"}));let F=rg.getMtime(X.mtimePrecision);D.fs.utimes(X.lockfilePath,F,F,(U)=>{let G=X.lastUpdate+D.stale<Date.now();if(X.released)return;if(U){if(U.code==="ENOENT"||G)return Gw($,X,Object.assign(U,{code:"ECOMPROMISED"}));return X.updateDelay=1000,Kq($,D)}X.mtime=F,X.lastUpdate=Date.now(),X.updateDelay=null,Kq($,D)})})},X.updateDelay),X.updateTimeout.unref)X.updateTimeout.unref()}function Gw($,D,X){if(D.released=!0,D.updateTimeout)clearTimeout(D.updateTimeout);if(j8[$]===D)delete j8[$];D.options.onCompromised(X)}function uj0($,D,X){D={stale:1e4,update:null,realpath:!0,retries:0,fs:Ww,onCompromised:(J)=>{throw J},...D},D.retries=D.retries||0,D.retries=typeof D.retries==="number"?{retries:D.retries}:D.retries,D.stale=Math.max(D.stale||0,2000),D.update=D.update==null?D.stale/2:D.update||0,D.update=Math.max(Math.min(D.update,D.stale/2),1000),Hw($,D,(J,Q)=>{if(J)return X(J);let Y=_j0.operation(D.retries);Y.attempt(()=>{qw(Q,D,(Z,F,U)=>{if(Y.retry(Z))return;if(Z)return X(Y.mainError());let G=j8[Q]={lockfilePath:RZ(Q,D),mtime:F,mtimePrecision:U,options:D,lastUpdate:Date.now()};Kq(Q,D),X(null,(q)=>{if(G.released)return q&&q(Object.assign(Error("Lock is already released"),{code:"ERELEASED"}));tg(Q,{...D,realpath:!1},q)})})})})}function tg($,D,X){D={fs:Ww,realpath:!0,...D},Hw($,D,(J,Q)=>{if(J)return X(J);let Y=j8[Q];if(!Y)return X(Object.assign(Error("Lock is not acquired/owned by you"),{code:"ENOTACQUIRED"}));Y.updateTimeout&&clearTimeout(Y.updateTimeout),Y.released=!0,delete j8[Q],ag(Q,D,X)})}function yj0($,D,X){D={stale:1e4,realpath:!0,fs:Ww,...D},D.stale=Math.max(D.stale||0,2000),Hw($,D,(J,Q)=>{if(J)return X(J);D.fs.stat(RZ(Q,D),(Y,Z)=>{if(Y)return Y.code==="ENOENT"?X(null,!1):X(Y);return X(null,!og(Z,D))})})}function fj0(){return j8}kj0(()=>{for(let $ in j8){let D=j8[$].options;try{D.fs.rmdirSync(RZ($,D))}catch(X){}}});hj0.lock=uj0;hj0.unlock=tg;hj0.check=yj0;hj0.getLocks=fj0});var $m=A((CH$,eg)=>{var cj0=I1();function lj0($){let D=["mkdir","realpath","stat","rmdir","utimes"],X={...$};return D.forEach((J)=>{X[J]=(...Q)=>{let Y=Q.pop(),Z;try{Z=$[`${J}Sync`](...Q)}catch(F){return Y(F)}Y(null,Z)}}),X}function nj0($){return(...D)=>new Promise((X,J)=>{D.push((Q,Y)=>{if(Q)J(Q);else X(Y)}),$(...D)})}function ij0($){return(...D)=>{let X,J;if(D.push((Q,Y)=>{X=Q,J=Y}),$(...D),X)throw X;return J}}function pj0($){if($={...$},$.fs=lj0($.fs||cj0),typeof $.retries==="number"&&$.retries>0||$.retries&&typeof $.retries.retries==="number"&&$.retries.retries>0)throw Object.assign(Error("Cannot use retries with the sync api"),{code:"ESYNC"});return $}eg.exports={toPromise:nj0,toSync:ij0,toSyncOptions:pj0}});var Xm=A((PH$,O9)=>{var s5=sg(),{toPromise:Nq,toSync:Mq,toSyncOptions:Ow}=$m();async function Dm($,D){let X=await Nq(s5.lock)($,D);return Nq(X)}function rj0($,D){let X=Mq(s5.lock)($,Ow(D));return Mq(X)}function oj0($,D){return Nq(s5.unlock)($,D)}function aj0($,D){return Mq(s5.unlock)($,Ow(D))}function tj0($,D){return Nq(s5.check)($,D)}function sj0($,D){return Mq(s5.check)($,Ow(D))}O9.exports=Dm;O9.exports.lock=Dm;O9.exports.unlock=oj0;O9.exports.lockSync=rj0;O9.exports.unlockSync=aj0;O9.exports.check=tj0;O9.exports.checkSync=sj0});var Gm=A((Fm)=>{Object.defineProperty(Fm,"__esModule",{value:!0});Fm.canStoreURLs=Fm.FileUrlStorage=void 0;var Jm=t("fs"),ej0=DT0(xg()),Qm=$T0(Xm());function Zm($){if(typeof WeakMap!="function")return null;var D=new WeakMap,X=new WeakMap;return(Zm=function(J){return J?X:D})($)}function $T0($,D){if(!D&&$&&$.__esModule)return $;if($===null||typeof $!="object"&&typeof $!="function")return{default:$};var X=Zm(D);if(X&&X.has($))return X.get($);var J={__proto__:null},Q=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Y in $)if(Y!=="default"&&{}.hasOwnProperty.call($,Y)){var Z=Q?Object.getOwnPropertyDescriptor($,Y):null;Z&&(Z.get||Z.set)?Object.defineProperty(J,Y,Z):J[Y]=$[Y]}return J.default=$,X&&X.set($,J),J}function DT0($){return $&&$.__esModule?$:{default:$}}function IZ($){return IZ=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(D){return typeof D}:function(D){return D&&typeof Symbol=="function"&&D.constructor===Symbol&&D!==Symbol.prototype?"symbol":typeof D},IZ($)}function XT0($,D){if(!($ instanceof D))throw TypeError("Cannot call a class as a function")}function Ym($,D){for(var X=0;X<D.length;X++){var J=D[X];if(J.enumerable=J.enumerable||!1,J.configurable=!0,"value"in J)J.writable=!0;Object.defineProperty($,QT0(J.key),J)}}function JT0($,D,X){if(D)Ym($.prototype,D);if(X)Ym($,X);return Object.defineProperty($,"prototype",{writable:!1}),$}function QT0($){var D=YT0($,"string");return IZ(D)=="symbol"?D:D+""}function YT0($,D){if(IZ($)!="object"||!$)return $;var X=$[Symbol.toPrimitive];if(X!==void 0){var J=X.call($,D||"default");if(IZ(J)!="object")return J;throw TypeError("@@toPrimitive must return a primitive value.")}return(D==="string"?String:Number)($)}var SH$=Fm.canStoreURLs=!0,xH$=Fm.FileUrlStorage=function(){function $(D){XT0(this,$),this.path=D}return JT0($,[{key:"findAllUploads",value:function(){var X=this;return new Promise(function(J,Q){X._getItems("tus::",function(Y,Z){if(Y)Q(Y);else J(Z)})})}},{key:"findUploadsByFingerprint",value:function(X){var J=this;return new Promise(function(Q,Y){J._getItems("tus::".concat(X),function(Z,F){if(Z)Y(Z);else Q(F)})})}},{key:"removeUpload",value:function(X){var J=this;return new Promise(function(Q,Y){J._removeItem(X,function(Z){if(Z)Y(Z);else Q()})})}},{key:"addUpload",value:function(X,J){var Q=this,Y=Math.round(Math.random()*1000000000000),Z="tus::".concat(X,"::").concat(Y);return new Promise(function(F,U){Q._setItem(Z,J,function(G){if(G)U(G);else F(Z)})})}},{key:"_setItem",value:function(X,J,Q){var Y=this;Qm.lock(this.path,this._lockfileOptions()).then(function(Z){Q=Y._releaseAndCb(Z,Q),Y._getData(function(F,U){if(F){Q(F);return}U[X]=J,Y._writeData(U,function(G){return Q(G)})})}).catch(Q)}},{key:"_getItems",value:function(X,J){this._getData(function(Q,Y){if(Q){J(Q);return}var Z=Object.keys(Y).filter(function(F){return F.startsWith(X)}).map(function(F){var U=Y[F];return U.urlStorageKey=F,U});J(null,Z)})}},{key:"_removeItem",value:function(X,J){var Q=this;Qm.lock(this.path,this._lockfileOptions()).then(function(Y){J=Q._releaseAndCb(Y,J),Q._getData(function(Z,F){if(Z){J(Z);return}delete F[X],Q._writeData(F,function(U){return J(U)})})}).catch(J)}},{key:"_lockfileOptions",value:function(){return{realpath:!1,retries:{retries:5,minTimeout:20}}}},{key:"_releaseAndCb",value:function(X,J){return function(Q){if(Q){X().then(function(){return J(Q)}).catch(function(Y){return J((0,ej0.default)([Q,Y]))});return}X().then(J).catch(J)}}},{key:"_writeData",value:function(X,J){var Q={encoding:"utf8",mode:432,flag:"w"};(0,Jm.writeFile)(this.path,JSON.stringify(X),Q,function(Y){return J(Y)})}},{key:"_getData",value:function(X){(0,Jm.readFile)(this.path,"utf8",function(J,Q){if(J){if(J.code==="ENOENT")X(null,{});else X(J);return}try{Q=!Q.trim().length?{}:JSON.parse(Q)}catch(Y){X(Y);return}X(null,Q)})}}])}()});var Lq=A((z9)=>{Object.defineProperty(z9,"__esModule",{value:!0});Object.defineProperty(z9,"DefaultHttpStack",{enumerable:!0,get:function(){return Om.default}});Object.defineProperty(z9,"DetailedError",{enumerable:!0,get:function(){return FT0.default}});Object.defineProperty(z9,"FileUrlStorage",{enumerable:!0,get:function(){return zm.FileUrlStorage}});Object.defineProperty(z9,"StreamSource",{enumerable:!0,get:function(){return HT0.default}});z9.Upload=void 0;Object.defineProperty(z9,"canStoreURLs",{enumerable:!0,get:function(){return zm.canStoreURLs}});z9.defaultOptions=void 0;Object.defineProperty(z9,"enableDebugLog",{enumerable:!0,get:function(){return UT0.enableDebugLog}});z9.isSupported=void 0;var FT0=rX(OM()),UT0=zM(),GT0=rX(Xh()),zw=rX(uh()),qT0=rX(Db()),WT0=rX(Zb()),Om=rX(Eb()),HT0=rX(IM()),zm=Gm();function rX($){return $&&$.__esModule?$:{default:$}}function $J($){return $J=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(D){return typeof D}:function(D){return D&&typeof Symbol=="function"&&D.constructor===Symbol&&D!==Symbol.prototype?"symbol":typeof D},$J($)}function OT0($,D){if(!($ instanceof D))throw TypeError("Cannot call a class as a function")}function qm($,D){for(var X=0;X<D.length;X++){var J=D[X];if(J.enumerable=J.enumerable||!1,J.configurable=!0,"value"in J)J.writable=!0;Object.defineProperty($,Km(J.key),J)}}function zT0($,D,X){if(D)qm($.prototype,D);if(X)qm($,X);return Object.defineProperty($,"prototype",{writable:!1}),$}function VT0($,D,X){return D=wq(D),KT0($,Vm()?Reflect.construct(D,X||[],wq($).constructor):D.apply($,X))}function KT0($,D){if(D&&($J(D)==="object"||typeof D==="function"))return D;else if(D!==void 0)throw TypeError("Derived constructors may only return object or undefined");return NT0($)}function NT0($){if($===void 0)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return $}function Vm(){try{var $=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(D){}return(Vm=function(){return!!$})()}function wq($){return wq=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(X){return X.__proto__||Object.getPrototypeOf(X)},wq($)}function MT0($,D){if(typeof D!=="function"&&D!==null)throw TypeError("Super expression must either be null or a function");if($.prototype=Object.create(D&&D.prototype,{constructor:{value:$,writable:!0,configurable:!0}}),Object.defineProperty($,"prototype",{writable:!1}),D)Vw($,D)}function Vw($,D){return Vw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(J,Q){return J.__proto__=Q,J},Vw($,D)}function Wm($,D){var X=Object.keys($);if(Object.getOwnPropertySymbols){var J=Object.getOwnPropertySymbols($);D&&(J=J.filter(function(Q){return Object.getOwnPropertyDescriptor($,Q).enumerable})),X.push.apply(X,J)}return X}function e5($){for(var D=1;D<arguments.length;D++){var X=arguments[D]!=null?arguments[D]:{};D%2?Wm(Object(X),!0).forEach(function(J){wT0($,J,X[J])}):Object.getOwnPropertyDescriptors?Object.defineProperties($,Object.getOwnPropertyDescriptors(X)):Wm(Object(X)).forEach(function(J){Object.defineProperty($,J,Object.getOwnPropertyDescriptor(X,J))})}return $}function wT0($,D,X){if(D=Km(D),D in $)Object.defineProperty($,D,{value:X,enumerable:!0,configurable:!0,writable:!0});else $[D]=X;return $}function Km($){var D=LT0($,"string");return $J(D)=="symbol"?D:D+""}function LT0($,D){if($J($)!="object"||!$)return $;var X=$[Symbol.toPrimitive];if(X!==void 0){var J=X.call($,D||"default");if($J(J)!="object")return J;throw TypeError("@@toPrimitive must return a primitive value.")}return(D==="string"?String:Number)($)}var Hm=z9.defaultOptions=e5(e5({},zw.default.defaultOptions),{},{httpStack:new Om.default,fileReader:new qT0.default,urlStorage:new GT0.default,fingerprint:WT0.default}),_H$=z9.Upload=function($){function D(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return OT0(this,D),J=e5(e5({},Hm),J),VT0(this,D,[X,J])}return MT0(D,$),zT0(D,null,[{key:"terminate",value:function(J){var Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Q=e5(e5({},Hm),Q),zw.default.terminate(J,Q)}}])}(zw.default),kH$=z9.isSupported=!0});var QD;var T8=s(()=>{QD={name:"@capgo/cli",type:"module",version:"8.20.0",description:"A CLI to upload to capgo servers",author:"Martin martin@capgo.app",license:"Apache 2.0",homepage:"https://github.com/Cap-go/capgo/tree/main/cli#readme",repository:{type:"git",url:"git+https://github.com/Cap-go/capgo.git",directory:"cli"},bugs:{url:"https://github.com/Cap-go/capgo/issues"},keywords:["appflow alternative","ionic","capacitor","auto update","live update","capgo","cli","upload","capgo-cli","sdk","tanstack-intent"],exports:{".":{import:"./dist/index.js",require:"./dist/index.js"},"./sdk":{types:"./dist/src/sdk.d.ts",import:"./dist/src/sdk.js"}},main:"dist/index.js",types:"dist/src/index.d.ts",bin:{capgo:"dist/index.js"},files:["!skills/_artifacts","dist","skills"],engines:{npm:">=8.0.0",node:">=20.0.0"},scripts:{build:"tsc && bun build.mjs",dev:"NODE_ENV=development ncc build","no-debug":"node dist/index.js","dev-build":"SUPA_DB=development ncc build",pack:"pkg",types:"bunx --bun supabase gen types typescript --project-id=xvwzpoazmxkqosrdewyv > src/types/supabase.types.ts",typecheck:"tsgo --project tsconfig.tsgo.json --noEmit",lint:"bun run lint:ox","lint:ox":"oxlint --config ../.oxlintrc.json src","lint:fix":"oxlint --config ../.oxlintrc.json --fix src","check-posix-paths":"node test/check-posix-paths.js","generate-docs":"node dist/index.js generate-docs README.md","test:bundle":"bun test/test-bundle.mjs","test:prescan":"bun test test/prescan/","test:functional":"bun test/test-functional.mjs","test:semver":"bun test/test-semver-validation.mjs","test:version-edge-cases":"bun test/test-version-validation.mjs","test:regex":"bun test/test-regex-validation.mjs","test:upload":"bun test/test-upload-validation.mjs","test:fail-on-incompatible":"bun test/test-fail-on-incompatible.mjs","test:credentials":"bun test/test-credentials.mjs","test:asc-key-protocol":"bun test/test-asc-key-protocol.mjs","test:credentials-validation":"bun test/test-credentials-validation.mjs","test:android-service-account-validation":"bun test/test-android-service-account-validation.mjs","test:build-zip-filter":"bun test/test-build-zip-filter.mjs","test:checksum":"bun test/test-checksum-algorithm.mjs","test:build-needed":"bun test/test-build-needed.mjs","test:ci-prompts":"bun test/test-ci-prompts.mjs","test:ci-secrets":"bun test/test-ci-secrets.mjs","test:android-onboarding-progress":"bun test/test-android-onboarding-progress.mjs","test:onboarding-telemetry":"bun test/test-onboarding-telemetry.mjs","test:v2-event-migration":"bun test/test-v2-event-migration.mjs","test:analytics":"bun test/test-analytics.mjs","test:analytics-error-category":"bun test/test-analytics-error-category.mjs","test:analytics-org-resolver":"bun test/test-analytics-org-resolver.mjs","test:supabase-perf":"bun test/test-supabase-perf.mjs","test:preview-qr":"bun test/test-preview-qr.mjs","test:mcp-analytics":"bun test/test-mcp-analytics.mjs","test:mcp-instructions":"bun test/test-mcp-instructions.mjs","test:mcp-stdout-guard":"bun test/test-mcp-stdout-guard.mjs","test:mcp-platform-select":"bun test/test-mcp-platform-select.mjs","test:mcp-explain-scopes":"bun test/test-mcp-explain-scopes.mjs","test:mcp-oauth-reopen":"bun test/test-mcp-oauth-reopen.mjs","test:mcp-broker-oauth":"bun test/test-mcp-broker-oauth.mjs","test:mcp-broker-session":"bun test/test-mcp-broker-session.mjs","test:mcp-credentials-manage":"bun test/test-mcp-credentials-manage.mjs","test:mcp-resume-prompt":"bun test/test-mcp-resume-prompt.mjs","test:mcp-build-job":"bun test/test-mcp-build-job.mjs","test:mcp-build-tools":"bun test/test-mcp-build-tools.mjs","test:app-created-source":"bun test/test-app-created-source.mjs","test:doctor-analytics":"bun test/test-doctor-analytics.mjs","test:posthog-exception":"bun test/test-posthog-exception.mjs","test:onboarding-recovery":"bun test/test-onboarding-recovery.mjs","test:onboarding-progress":"bun test/test-onboarding-progress.mjs","test:onboarding-run-targets":"bun test/test-onboarding-run-targets.mjs","test:run-device-command":"bun test/test-run-device-command.mjs","test:init-app-conflict":"bun test/test-init-app-conflict.mjs","test:init-guardrails":"bun test/test-init-guardrails.mjs","test:init-replay":"bun test/test-init-replay.mjs","test:prompt-preferences":"bun test/test-prompt-preferences.mjs","test:esm-sdk":"node test/test-sdk-esm.mjs","test:auth-session":"bun test/test-auth-session.mjs","test:mcp":"node test/test-mcp.mjs","test:mcp-no-key-handshake":"node test/test-mcp-no-key-handshake.mjs","test:version-detection":"node test/test-get-installed-version.mjs","test:version-detection:setup":"./test/fixtures/setup-test-projects.sh","test:platform-paths":"bun test/test-platform-paths.mjs","test:project-type-detection":"bun test/test-project-type-detection.mjs","test:payload-split":"bun test/test-payload-split.mjs","test:macos-signing":"bun test/test-macos-signing.mjs","test:helper-dce":"bash scripts/check-helper-dce.sh","test:apple-api-import-helpers":"bun test/test-apple-api-import-helpers.mjs","test:apple-api-verify-key":"bun test/test-apple-api-verify-key.mjs","test:bundle-id-detector":"bun test/test-bundle-id-detector.mjs","test:apple-api-app-list":"bun test/test-apple-api-app-list.mjs","test:apple-api-cert-create":"bun test/test-apple-api-cert-create.mjs","test:app-verification":"bun test/test-app-verification.mjs","test:pbxproj-parser":"bun test/test-pbxproj-parser.mjs","test:manifest-path-encoding":"bun test/test-manifest-path-encoding.mjs","test:self-update":"bun test/test-self-update.mjs","test:update-prompt":"bun test/test-update-prompt.mjs","test:android-tail-engine":"bun test/test-android-tail-engine.mjs","test:android-tail-render":"bun test/test-android-tail-render.mjs","test:android-tail-routing":"bun test/test-android-tail-routing.mjs","test:dev-gate-stripped":"bun test/test-dev-gate-stripped.mjs","test:frame-fit-ios-shared":"bun test/test-frame-fit-ios-shared.mjs","test:ios-confirm-app-id":"bun test/test-ios-confirm-app-id.mjs","test:ios-create-new":"bun test/test-ios-create-new.mjs","test:ios-e2e":"bun test/test-ios-e2e.mjs","test:ios-flow-contract":"bun test/test-ios-flow-contract.mjs","test:ios-import-discovery":"bun test/test-ios-import-discovery.mjs","test:ios-import-export":"bun test/test-ios-import-export.mjs","test:ios-import-pickers":"bun test/test-ios-import-pickers.mjs","test:ios-import-recovery":"bun test/test-ios-import-recovery.mjs","test:ios-recovery":"bun test/test-ios-recovery.mjs","test:ios-resume":"bun test/test-ios-resume.mjs","test:ios-tail-handoff":"bun test/test-ios-tail-handoff.mjs","test:ios-tui-render":"bun test/test-ios-tui-render.mjs","test:p8-error":"bun test/test-p8-error.mjs","test:ios-tui-routing":"bun test/test-ios-tui-routing.mjs","test:ios-updater-sync-validation":"bun test/test-ios-updater-sync-validation.mjs","test:ios-verify-app":"bun test/test-ios-verify-app.mjs","test:platform-flow-contract":"bun test/test-platform-flow-contract.mjs","test:tail-engine-shared":"bun test/test-tail-engine-shared.mjs",test:"bun run build && bun run test:helper-dce && bun run test:version-detection:setup && bun run test:bundle && bun run test:functional && bun run test:semver && bun run test:version-edge-cases && bun run test:regex && bun run test:upload && bun run test:fail-on-incompatible && bun run test:credentials && bun run test:credentials-validation && bun run test:android-service-account-validation && bun run test:build-zip-filter && bun run test:checksum && bun run test:build-needed && bun run test:ci-prompts && bun run test:ci-secrets && bun run test:android-onboarding-progress && bun run test:onboarding-telemetry && bun run test:v2-event-migration && bun run test:analytics && bun run test:analytics-error-category && bun run test:analytics-org-resolver && bun run test:supabase-perf && bun run test:preview-qr && bun run test:app-set-options && bun run test:mcp-analytics && bun run test:mcp-instructions && bun run test:mcp-live-update-onboarding && bun run test:mcp-stdout-guard && bun run test:mcp-platform-select && bun run test:mcp-explain-scopes && bun run test:mcp-oauth-reopen && bun run test:mcp-broker-oauth && bun run test:mcp-broker-session && bun run test:mcp-credentials-manage && bun run test:mcp-resume-prompt && bun run test:mcp-build-job && bun run test:mcp-build-tools && bun run test:app-created-source && bun run test:doctor-analytics && bun run test:posthog-exception && bun run test:build-platform-selection && bun run test:onboarding-recovery && bun run test:onboarding-progress && bun run test:onboarding-run-targets && bun run test:run-device-command && bun run test:init-app-conflict && bun run test:init-guardrails && bun run test:init-replay && bun run test:prompt-preferences && bun run test:esm-sdk && bun run test:mcp && bun run test:mcp-no-key-handshake && bun run test:auth-session && bun run test:version-detection && bun run test:platform-paths && bun run test:project-type-detection && bun run test:payload-split && bun run test:manifest-path-encoding && bun run test:macos-signing && bun run test:asc-key-protocol && bun run test:apple-api-import-helpers && bun run test:apple-api-verify-key && bun run test:bundle-id-detector && bun run test:apple-api-app-list && bun run test:app-verification && bun run test:pbxproj-parser && bun run test:ai-log-capture && bun run test:ai-analyze-flow && bun run test:cicd-failure-help && bun run test:ai-sse-parser && bun run test:ai-render-markdown && bun run test:ai-stream-markdown && bun run test:ai-onboarding-mode && bun run test:ai-fit && bun run test:platform-layout && bun run test:frame-fit && bun run test:onboarding-min-size && bun run test:min-size-gate && bun run test:shell-size-gate && bun run test:build-log-sanitize && bun run test:build-output-viewport && bun run test:diff-viewer-viewport && bun run test:build-complete-exit && bun run test:ai-analyze-stream && bun run test:support-mailto && bun run test:support-redact && bun run test:support-internal-log && bun run test:support-help-menu && bun run test:support-contact && bun run test:support-upload-prompt && bun run test:support-bundle-files && bun run test:self-update && bun run test:update-prompt && bun run test:apple-api-cert-create && bun run test:android-tail-engine && bun run test:android-tail-render && bun run test:android-tail-routing && bun run test:dev-gate-stripped && bun run test:frame-fit-ios-shared && bun run test:ios-confirm-app-id && bun run test:ios-create-new && bun run test:ios-e2e && bun run test:ios-flow-contract && bun run test:ios-import-discovery && bun run test:ios-import-export && bun run test:ios-import-pickers && bun run test:ios-import-recovery && bun run test:ios-recovery && bun run test:ios-resume && bun run test:ios-tail-handoff && bun run test:ios-tui-render && bun run test:p8-error && bun run test:ios-tui-routing && bun run test:ios-updater-sync-validation && bun run test:ios-verify-app && bun run test:platform-flow-contract && bun run test:tail-engine-shared && bun run test:prescan","test:build-platform-selection":"bun test/test-build-platform-selection.mjs","test:ai-log-capture":"bun test/test-ai-log-capture.mjs","test:ai-analyze-flow":"bun test/test-ai-analyze-flow.mjs","test:cicd-failure-help":"bun test/test-cicd-failure-help.mjs","test:ai-analyze-stream":"bun test/test-ai-analyze-stream.mjs","test:ai-sse-parser":"bun test/test-ai-sse-parser.mjs","test:ai-render-markdown":"bun test/test-ai-render-markdown.mjs","test:ai-onboarding-mode":"bun test/test-ai-onboarding-mode.mjs","test:ai-fit":"bun test/test-ai-fit.mjs","test:platform-layout":"bun test/test-platform-layout.mjs","test:frame-fit":"bun test/run-frame-fit.mjs","test:onboarding-min-size":"bun test/test-onboarding-min-size.mjs","test:min-size-gate":"bun test/test-min-size-gate.mjs","test:shell-size-gate":"bun test/test-shell-size-gate.mjs","test:build-log-sanitize":"bun test/test-build-log-sanitize.mjs","test:build-output-viewport":"bun test/test-build-output-viewport.mjs","test:diff-viewer-viewport":"bun test/test-diff-viewer-viewport.mjs","test:build-complete-exit":"bun test/test-build-complete-exit.mjs","test:ai-stream-markdown":"bun test/test-ai-stream-markdown.mjs","test:support-mailto":"bun test/test-support-mailto.mjs","test:support-redact":"bun test/test-support-redact.mjs","test:support-internal-log":"bun test/test-support-internal-log.mjs","test:support-help-menu":"bun test/test-support-help-menu.mjs","test:support-contact":"bun test/test-support-contact.mjs","test:support-upload-prompt":"bun test/test-support-upload-prompt.mjs","test:support-bundle-files":"bun test/test-support-bundle-files.mjs","test:mcp-live-update-onboarding":"bun test/test-mcp-live-update-onboarding.mjs","test:app-set-options":"bun test/test-app-set-options.mjs"},dependencies:{"@inkjs/ui":"^2.0.0","@rrweb/types":"^2.0.1","@xterm/addon-serialize":"^0.14.0","@xterm/headless":"^6.0.0","happy-dom":"^20.10.4",ink:"^7.0.4","ink-spinner":"^5.0.0",jsonwebtoken:"^9.0.3","node-forge":"^1.4.0",qrcode:"^1.5.4",react:"^19.2.6","rrweb-snapshot":"^2.0.1","string-width":"^8.2.1"},optionalDependencies:{"@capgo/cli-helper-darwin-arm64":"^1.1.1","@capgo/cli-helper-darwin-x64":"^1.1.1","node-pty":"^1.1.0"},devDependencies:{"@antfu/eslint-config":"^9.0.0","@bradenmacdonald/s3-lite-client":"npm:@jsr/bradenmacdonald__s3-lite-client@0.9.6","@capacitor/cli":"^8.3.4","@capgo/find-package-manager":"^0.0.18","@clack/prompts":"^1.4.0","@modelcontextprotocol/sdk":"^1.29.0","@sauber/table":"npm:@jsr/sauber__table","@std/semver":"npm:@jsr/std__semver@1.0.8","@supabase/supabase-js":"^2.106.2","@tanstack/intent":"^0.0.41","@types/adm-zip":"^0.5.8","@types/jsonwebtoken":"^9.0.10","@types/node":"^25.9.1","@types/node-forge":"^1.3.14","@types/prettyjson":"^0.0.33","@types/qrcode":"^1.5.6","@types/react":"^19.2.15","@types/tmp":"^0.2.6","@types/ws":"^8.18.1","@typescript/native-preview":"7.0.0-dev.20260526.1","@vercel/ncc":"^0.38.4","@xterm/headless":"^6.0.0","adm-zip":"^0.5.17","ci-info":"^4.4.0",commander:"^14.0.3",eslint:"^10.4.0","git-format-staged":"4.0.1",husky:"^9.1.7","is-wsl":"^3.1.1",micromatch:"^4.0.8",open:"^11.0.0",oxlint:"^1.67.0",partysocket:"^1.1.19",prettyjson:"^1.2.5",tmp:"^0.2.6","tus-js-client":"^4.3.1",typescript:"^6.0.3",ws:"^8.21.0",zod:"^4.4.3"}}});import{platform as ET0,release as RT0}from"node:os";import{arch as AT0,version as IT0}from"node:process";function Kw(){return Lm}function Nw(){let $={cli_version:QD.version,node_version:IT0,os_platform:ET0(),os_arch:AT0,os_release:RT0(),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone||"undefined",is_ci:jZ.isCI,is_tty:Boolean(process.stdout.isTTY),invocation_source:Lm};if(jZ.name)$.ci_provider=jZ.name;return $}var jZ,Lm="cli";var Mw=s(()=>{T8();jZ=M$(ZM(),1)});import{AsyncLocalStorage as jT0}from"node:async_hooks";function TZ($,D){return Em.run($,()=>Promise.resolve(D()))}function TT0(){return Em.getStore()}function Rm(){return CT0}function Im($){Am=$}function Bm($){try{Am?.($)}catch{}}function Tm($,D){let X;try{X=new URL($).pathname}catch{X=$.split("?")[0]}let J="/functions/v1/",Q=X.indexOf(J);if(Q>=0){let G=X.slice(Q+J.length).replace(/^\/+|\/+$/g,"");return G?`${D} functions:${G}`:`${D} functions`}let Y="/rest/v1/",Z=X.indexOf(Y),F=Z>=0?X.slice(Z+Y.length):X.replace(/^\//,"");if(F.startsWith("rpc/"))return`rpc:${F.slice(4).split("/")[0]}`;let U=F.split("/")[0]||X;return`${D} ${U}`}function PT0($){let D=$?.headers;if(!D)return;let X=D.get;if(typeof X==="function")return X.call(D,"capgkey")??void 0;if(Array.isArray(D))return D.find(([J])=>J.toLowerCase()==="capgkey")?.[1];return D.capgkey}function Cm(){return async(D,X)=>{let J=(X?.method??"GET").toUpperCase(),Q=typeof D==="string"?D:D instanceof URL?D.href:D.url,Y=TT0(),Z=PT0(X),F=Date.now();try{let U=await globalThis.fetch(D,X);return Bm({url:Q,method:J,status:U.status,ok:U.ok,durationMs:Date.now()-F,source:Y,apikey:Z}),U}catch(U){throw Bm({url:Q,method:J,status:0,ok:!1,durationMs:Date.now()-F,source:Y,apikey:Z,error:U}),U}}}var Em,CT0=!1,Am,jm=5000;var Bq=s(()=>{Em=new jT0});function Pm($,D){let J=["normal","bold","dim","italic","underline","strikethrough"].indexOf($),Q="\x1B[";return"\x1B["+J+"m"+D+"\x1B[0m"}var V6;var Sm=s(()=>{V6=class V6{title=null;headers=[];rows=[];static narrowTheme={top:["╔","═","╤","╗"],row:["║"," ","│","║"],div:["╟","─","┼","╢"],bot:["╚","═","╧","╝"]};static wideTheme={top:["╔═","═","═╤═","═╗"],row:["║ "," "," │ "," ║"],div:["╟─","─","─┼─","─╢"],bot:["╚═","═","═╧═","═╝"]};static roundTheme={top:["╭─","─","─┬─","─╮"],row:["│ "," "," │ "," │"],div:["├─","─","─┼─","─┤"],bot:["╰─","─","─┴─","─╯"]};theme=V6.wideTheme;columnWidth(){let $=[this.headers,...this.rows].filter((X)=>X.length>0),D=$[0].map((X)=>this.cast(X).length);for(let X of $.slice(1))for(let J=0;J<D.length;J++){let Q=this.cast(X[J]).length;if(Q>D[J])D[J]=Q}return D}cast($){if(typeof $==="object")return"obj";if($!==void 0&&typeof $.toString==="function")return $.toString();else return""}renderTitle(){return"[ "+this.title+" ]"}renderLine($){let D=this.columnWidth();return $[0]+D.map((X)=>$[1].repeat(X)).join($[2])+$[3]}renderCell($,D,X=!1){let J=this.cast($),Q=X?Pm("bold",J):J,Y=D-J.length,Z=this.theme.row[1];switch(typeof $){case"number":return Z.repeat(Y)+Q;case"string":return Q+Z.repeat(Y);case"boolean":case"object":return Z.repeat(Math.ceil(Y/2))+Pm("italic",J)+Z.repeat(Math.floor(Y/2));default:return Z.repeat(Y)}}renderRow($,D=!1){let X=this.theme.row,J=this.columnWidth();return X[0]+$.map((Q,Y)=>this.renderCell(Q,J[Y],D)).join(X[2])+X[3]}toString(){let $=this.theme,D=this.headers.length>0,X=this.rows.length>0;return[this.title?this.renderTitle():"",D||X?this.renderLine($.top):"",D?this.renderRow(this.headers,!0):"",D&&X?this.renderLine($.div):"",...this.rows.map((J)=>this.renderRow(J)),D||X?this.renderLine($.bot):""].filter((J)=>J.length>0).join(`
126
+ GFS4: `),console.error($)};if(!w1[JD]){if($w=global[JD]||[],gg(w1,$w),w1.close=function($){function D(X,J){return $.call(w1,X,function(Q){if(!Q)bg();if(typeof J==="function")J.apply(this,arguments)})}return Object.defineProperty(D,Wq,{value:$}),D}(w1.close),w1.closeSync=function($){function D(X){$.apply(w1,arguments),bg()}return Object.defineProperty(D,Wq,{value:$}),D}(w1.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))process.on("exit",function(){lX(w1[JD]),t("assert").equal(w1[JD].length,0)})}var $w;if(!global[JD])gg(global,w1[JD]);Jw.exports=Dw(Lj0(w1));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!w1.__patched)Jw.exports=Dw(w1),w1.__patched=!0;function Dw($){Mj0($),$.gracefulify=Dw,$.createReadStream=w,$.createWriteStream=R;var D=$.readFile;$.readFile=X;function X(I,u,C){if(typeof u==="function")C=u,u=null;return l(I,u,C);function l(n,e,h,j){return D(n,e,function(P){if(P&&(P.code==="EMFILE"||P.code==="ENFILE"))o5([l,[n,e,h],P,j||Date.now(),Date.now()]);else if(typeof h==="function")h.apply(this,arguments)})}}var J=$.writeFile;$.writeFile=Q;function Q(I,u,C,l){if(typeof C==="function")l=C,C=null;return n(I,u,C,l);function n(e,h,j,P,_){return J(e,h,j,function(m){if(m&&(m.code==="EMFILE"||m.code==="ENFILE"))o5([n,[e,h,j,P],m,_||Date.now(),Date.now()]);else if(typeof P==="function")P.apply(this,arguments)})}}var Y=$.appendFile;if(Y)$.appendFile=Z;function Z(I,u,C,l){if(typeof C==="function")l=C,C=null;return n(I,u,C,l);function n(e,h,j,P,_){return Y(e,h,j,function(m){if(m&&(m.code==="EMFILE"||m.code==="ENFILE"))o5([n,[e,h,j,P],m,_||Date.now(),Date.now()]);else if(typeof P==="function")P.apply(this,arguments)})}}var F=$.copyFile;if(F)$.copyFile=U;function U(I,u,C,l){if(typeof C==="function")l=C,C=0;return n(I,u,C,l);function n(e,h,j,P,_){return F(e,h,j,function(m){if(m&&(m.code==="EMFILE"||m.code==="ENFILE"))o5([n,[e,h,j,P],m,_||Date.now(),Date.now()]);else if(typeof P==="function")P.apply(this,arguments)})}}var G=$.readdir;$.readdir=W;var q=/^v[0-5]\./;function W(I,u,C){if(typeof u==="function")C=u,u=null;var l=q.test(process.version)?function(h,j,P,_){return G(h,n(h,j,P,_))}:function(h,j,P,_){return G(h,j,n(h,j,P,_))};return l(I,u,C);function n(e,h,j,P){return function(_,m){if(_&&(_.code==="EMFILE"||_.code==="ENFILE"))o5([l,[e,h,j],_,P||Date.now(),Date.now()]);else{if(m&&m.sort)m.sort();if(typeof j==="function")j.call(this,_,m)}}}}if(process.version.substr(0,4)==="v0.8"){var H=wj0($);L=H.ReadStream,K=H.WriteStream}var O=$.ReadStream;if(O)L.prototype=Object.create(O.prototype),L.prototype.open=E;var z=$.WriteStream;if(z)K.prototype=Object.create(z.prototype),K.prototype.open=M;Object.defineProperty($,"ReadStream",{get:function(){return L},set:function(I){L=I},enumerable:!0,configurable:!0}),Object.defineProperty($,"WriteStream",{get:function(){return K},set:function(I){K=I},enumerable:!0,configurable:!0});var V=L;Object.defineProperty($,"FileReadStream",{get:function(){return V},set:function(I){V=I},enumerable:!0,configurable:!0});var N=K;Object.defineProperty($,"FileWriteStream",{get:function(){return N},set:function(I){N=I},enumerable:!0,configurable:!0});function L(I,u){if(this instanceof L)return O.apply(this,arguments),this;else return L.apply(Object.create(L.prototype),arguments)}function E(){var I=this;k(I.path,I.flags,I.mode,function(u,C){if(u){if(I.autoClose)I.destroy();I.emit("error",u)}else I.fd=C,I.emit("open",C),I.read()})}function K(I,u){if(this instanceof K)return z.apply(this,arguments),this;else return K.apply(Object.create(K.prototype),arguments)}function M(){var I=this;k(I.path,I.flags,I.mode,function(u,C){if(u)I.destroy(),I.emit("error",u);else I.fd=C,I.emit("open",C)})}function w(I,u){return new $.ReadStream(I,u)}function R(I,u){return new $.WriteStream(I,u)}var x=$.open;$.open=k;function k(I,u,C,l){if(typeof C==="function")l=C,C=null;return n(I,u,C,l);function n(e,h,j,P,_){return x(e,h,j,function(m,c){if(m&&(m.code==="EMFILE"||m.code==="ENFILE"))o5([n,[e,h,j,P],m,_||Date.now(),Date.now()]);else if(typeof P==="function")P.apply(this,arguments)})}}return $}function o5($){lX("ENQUEUE",$[0].name,$[1]),w1[JD].push($),Xw()}var qq;function bg(){var $=Date.now();for(var D=0;D<w1[JD].length;++D)if(w1[JD][D].length>2)w1[JD][D][3]=$,w1[JD][D][4]=$;Xw()}function Xw(){if(clearTimeout(qq),qq=void 0,w1[JD].length===0)return;var $=w1[JD].shift(),D=$[0],X=$[1],J=$[2],Q=$[3],Y=$[4];if(Q===void 0)lX("RETRY",D.name,X),D.apply(null,X);else if(Date.now()-Q>=60000){lX("TIMEOUT",D.name,X);var Z=X.pop();if(typeof Z==="function")Z.call(null,J)}else{var F=Date.now()-Y,U=Math.max(Y-Q,1),G=Math.min(U*1.2,100);if(F>=G)lX("RETRY",D.name,X),D.apply(null,X.concat([Q]));else w1[JD].push($)}if(qq===void 0)qq=setTimeout(Xw,0)}});var dg=A((AH$,mg)=>{function x6($,D){if(typeof D==="boolean")D={forever:D};if(this._originalTimeouts=JSON.parse(JSON.stringify($)),this._timeouts=$,this._options=D||{},this._maxRetryTime=D&&D.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._options.forever)this._cachedTimeouts=this._timeouts.slice(0)}mg.exports=x6;x6.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts};x6.prototype.stop=function(){if(this._timeout)clearTimeout(this._timeout);this._timeouts=[],this._cachedTimeouts=null};x6.prototype.retry=function($){if(this._timeout)clearTimeout(this._timeout);if(!$)return!1;var D=new Date().getTime();if($&&D-this._operationStart>=this._maxRetryTime)return this._errors.unshift(Error("RetryOperation timeout occurred")),!1;this._errors.push($);var X=this._timeouts.shift();if(X===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),X=this._timeouts.shift();else return!1;var J=this,Q=setTimeout(function(){if(J._attempts++,J._operationTimeoutCb){if(J._timeout=setTimeout(function(){J._operationTimeoutCb(J._attempts)},J._operationTimeout),J._options.unref)J._timeout.unref()}J._fn(J._attempts)},X);if(this._options.unref)Q.unref();return!0};x6.prototype.attempt=function($,D){if(this._fn=$,D){if(D.timeout)this._operationTimeout=D.timeout;if(D.cb)this._operationTimeoutCb=D.cb}var X=this;if(this._operationTimeoutCb)this._timeout=setTimeout(function(){X._operationTimeoutCb()},X._operationTimeout);this._operationStart=new Date().getTime(),this._fn(this._attempts)};x6.prototype.try=function($){console.log("Using RetryOperation.try() is deprecated"),this.attempt($)};x6.prototype.start=function($){console.log("Using RetryOperation.start() is deprecated"),this.attempt($)};x6.prototype.start=x6.prototype.try;x6.prototype.errors=function(){return this._errors};x6.prototype.attempts=function(){return this._attempts};x6.prototype.mainError=function(){if(this._errors.length===0)return null;var $={},D=null,X=0;for(var J=0;J<this._errors.length;J++){var Q=this._errors[J],Y=Q.message,Z=($[Y]||0)+1;if($[Y]=Z,Z>=X)D=Q,X=Z}return D}});var lg=A((Rj0)=>{var Ej0=dg();Rj0.operation=function($){var D=Rj0.timeouts($);return new Ej0(D,{forever:$&&$.forever,unref:$&&$.unref,maxRetryTime:$&&$.maxRetryTime})};Rj0.timeouts=function($){if($ instanceof Array)return[].concat($);var D={retries:10,factor:2,minTimeout:1000,maxTimeout:1/0,randomize:!1};for(var X in $)D[X]=$[X];if(D.minTimeout>D.maxTimeout)throw Error("minTimeout is greater than maxTimeout");var J=[];for(var Q=0;Q<D.retries;Q++)J.push(this.createTimeout(Q,D));if($&&$.forever&&!J.length)J.push(this.createTimeout(Q,D));return J.sort(function(Y,Z){return Y-Z}),J};Rj0.createTimeout=function($,D){var X=D.randomize?Math.random()+1:1,J=Math.round(X*D.minTimeout*Math.pow(D.factor,$));return J=Math.min(J,D.maxTimeout),J};Rj0.wrap=function($,D,X){if(D instanceof Array)X=D,D=null;if(!X){X=[];for(var J in $)if(typeof $[J]==="function")X.push(J)}for(var Q=0;Q<X.length;Q++){var Y=X[Q],Z=$[Y];$[Y]=function(U){var G=Rj0.operation(D),q=Array.prototype.slice.call(arguments,1),W=q.pop();q.push(function(H){if(G.retry(H))return;if(H)arguments[0]=G.mainError();W.apply(this,arguments)}),G.attempt(function(){U.apply($,q)})}.bind($,Z),$[Y].options=D}}});var ng=A((jH$,Hq)=>{Hq.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];if(process.platform!=="win32")Hq.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")Hq.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var Vq=A((TH$,t5)=>{var H1=global.process,nX=function($){return $&&typeof $==="object"&&typeof $.removeListener==="function"&&typeof $.emit==="function"&&typeof $.reallyExit==="function"&&typeof $.listeners==="function"&&typeof $.kill==="function"&&typeof $.pid==="number"&&typeof $.on==="function"};if(!nX(H1))t5.exports=function(){return function(){}};else{if(Qw=t("assert"),iX=ng(),Yw=/^win/i.test(H1.platform),a5=t("events"),typeof a5!=="function")a5=a5.EventEmitter;if(H1.__signal_exit_emitter__)c1=H1.__signal_exit_emitter__;else c1=H1.__signal_exit_emitter__=new a5,c1.count=0,c1.emitted={};if(!c1.infinite)c1.setMaxListeners(1/0),c1.infinite=!0;t5.exports=function($,D){if(!nX(global.process))return function(){};if(Qw.equal(typeof $,"function","a callback must be provided for exit handler"),pX===!1)Oq();var X="exit";if(D&&D.alwaysLast)X="afterexit";var J=function(){if(c1.removeListener(X,$),c1.listeners("exit").length===0&&c1.listeners("afterexit").length===0)LZ()};return c1.on(X,$),J},LZ=function(){if(!pX||!nX(global.process))return;pX=!1,iX.forEach(function(D){try{H1.removeListener(D,BZ[D])}catch(X){}}),H1.emit=EZ,H1.reallyExit=zq,c1.count-=1},t5.exports.unload=LZ,H9=function(D,X,J){if(c1.emitted[D])return;c1.emitted[D]=!0,c1.emit(D,X,J)},BZ={},iX.forEach(function($){BZ[$]=function(){if(!nX(global.process))return;var X=H1.listeners($);if(X.length===c1.count){if(LZ(),H9("exit",null,$),H9("afterexit",null,$),Yw&&$==="SIGHUP")$="SIGINT";H1.kill(H1.pid,$)}}}),t5.exports.signals=function(){return iX},pX=!1,Oq=function(){if(pX||!nX(global.process))return;pX=!0,c1.count+=1,iX=iX.filter(function(D){try{return H1.on(D,BZ[D]),!0}catch(X){return!1}}),H1.emit=Fw,H1.reallyExit=Zw},t5.exports.load=Oq,zq=H1.reallyExit,Zw=function(D){if(!nX(global.process))return;H1.exitCode=D||0,H9("exit",H1.exitCode,null),H9("afterexit",H1.exitCode,null),zq.call(H1,H1.exitCode)},EZ=H1.emit,Fw=function(D,X){if(D==="exit"&&nX(global.process)){if(X!==void 0)H1.exitCode=X;var J=EZ.apply(this,arguments);return H9("exit",H1.exitCode,null),H9("afterexit",H1.exitCode,null),J}else return EZ.apply(this,arguments)}}var Qw,iX,Yw,a5,c1,LZ,H9,BZ,pX,Oq,zq,Zw,EZ,Fw});var pg=A((Pj0,Uw)=>{var ig=Symbol();function Tj0($,D,X){let J=D[ig];if(J)return D.stat($,(Y,Z)=>{if(Y)return X(Y);X(null,Z.mtime,J)});let Q=new Date(Math.ceil(Date.now()/1000)*1000+5);D.utimes($,Q,Q,(Y)=>{if(Y)return X(Y);D.stat($,(Z,F)=>{if(Z)return X(Z);let U=F.mtime.getTime()%1000===0?"s":"ms";Object.defineProperty(D,ig,{value:U}),X(null,F.mtime,U)})})}function Cj0($){let D=Date.now();if($==="s")D=Math.ceil(D/1000)*1000;return new Date(D)}Pj0.probe=Tj0;Pj0.getMtime=Cj0});var sg=A((hj0,AZ)=>{var vj0=t("path"),Ww=I1(),_j0=lg(),kj0=Vq(),rg=pg(),j8={};function RZ($,D){return D.lockfilePath||`${$}.lock`}function Hw($,D,X){if(!D.realpath)return X(null,vj0.resolve($));D.fs.realpath($,X)}function qw($,D,X){let J=RZ($,D);D.fs.mkdir(J,(Q)=>{if(!Q)return rg.probe(J,D.fs,(Y,Z,F)=>{if(Y)return D.fs.rmdir(J,()=>{}),X(Y);X(null,Z,F)});if(Q.code!=="EEXIST")return X(Q);if(D.stale<=0)return X(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:$}));D.fs.stat(J,(Y,Z)=>{if(Y){if(Y.code==="ENOENT")return qw($,{...D,stale:0},X);return X(Y)}if(!og(Z,D))return X(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:$}));ag($,D,(F)=>{if(F)return X(F);qw($,{...D,stale:0},X)})})})}function og($,D){return $.mtime.getTime()<Date.now()-D.stale}function ag($,D,X){D.fs.rmdir(RZ($,D),(J)=>{if(J&&J.code!=="ENOENT")return X(J);X()})}function Kq($,D){let X=j8[$];if(X.updateTimeout)return;if(X.updateDelay=X.updateDelay||D.update,X.updateTimeout=setTimeout(()=>{X.updateTimeout=null,D.fs.stat(X.lockfilePath,(J,Q)=>{let Y=X.lastUpdate+D.stale<Date.now();if(J){if(J.code==="ENOENT"||Y)return Gw($,X,Object.assign(J,{code:"ECOMPROMISED"}));return X.updateDelay=1000,Kq($,D)}if(X.mtime.getTime()!==Q.mtime.getTime())return Gw($,X,Object.assign(Error("Unable to update lock within the stale threshold"),{code:"ECOMPROMISED"}));let F=rg.getMtime(X.mtimePrecision);D.fs.utimes(X.lockfilePath,F,F,(U)=>{let G=X.lastUpdate+D.stale<Date.now();if(X.released)return;if(U){if(U.code==="ENOENT"||G)return Gw($,X,Object.assign(U,{code:"ECOMPROMISED"}));return X.updateDelay=1000,Kq($,D)}X.mtime=F,X.lastUpdate=Date.now(),X.updateDelay=null,Kq($,D)})})},X.updateDelay),X.updateTimeout.unref)X.updateTimeout.unref()}function Gw($,D,X){if(D.released=!0,D.updateTimeout)clearTimeout(D.updateTimeout);if(j8[$]===D)delete j8[$];D.options.onCompromised(X)}function uj0($,D,X){D={stale:1e4,update:null,realpath:!0,retries:0,fs:Ww,onCompromised:(J)=>{throw J},...D},D.retries=D.retries||0,D.retries=typeof D.retries==="number"?{retries:D.retries}:D.retries,D.stale=Math.max(D.stale||0,2000),D.update=D.update==null?D.stale/2:D.update||0,D.update=Math.max(Math.min(D.update,D.stale/2),1000),Hw($,D,(J,Q)=>{if(J)return X(J);let Y=_j0.operation(D.retries);Y.attempt(()=>{qw(Q,D,(Z,F,U)=>{if(Y.retry(Z))return;if(Z)return X(Y.mainError());let G=j8[Q]={lockfilePath:RZ(Q,D),mtime:F,mtimePrecision:U,options:D,lastUpdate:Date.now()};Kq(Q,D),X(null,(q)=>{if(G.released)return q&&q(Object.assign(Error("Lock is already released"),{code:"ERELEASED"}));tg(Q,{...D,realpath:!1},q)})})})})}function tg($,D,X){D={fs:Ww,realpath:!0,...D},Hw($,D,(J,Q)=>{if(J)return X(J);let Y=j8[Q];if(!Y)return X(Object.assign(Error("Lock is not acquired/owned by you"),{code:"ENOTACQUIRED"}));Y.updateTimeout&&clearTimeout(Y.updateTimeout),Y.released=!0,delete j8[Q],ag(Q,D,X)})}function yj0($,D,X){D={stale:1e4,realpath:!0,fs:Ww,...D},D.stale=Math.max(D.stale||0,2000),Hw($,D,(J,Q)=>{if(J)return X(J);D.fs.stat(RZ(Q,D),(Y,Z)=>{if(Y)return Y.code==="ENOENT"?X(null,!1):X(Y);return X(null,!og(Z,D))})})}function fj0(){return j8}kj0(()=>{for(let $ in j8){let D=j8[$].options;try{D.fs.rmdirSync(RZ($,D))}catch(X){}}});hj0.lock=uj0;hj0.unlock=tg;hj0.check=yj0;hj0.getLocks=fj0});var $m=A((CH$,eg)=>{var cj0=I1();function lj0($){let D=["mkdir","realpath","stat","rmdir","utimes"],X={...$};return D.forEach((J)=>{X[J]=(...Q)=>{let Y=Q.pop(),Z;try{Z=$[`${J}Sync`](...Q)}catch(F){return Y(F)}Y(null,Z)}}),X}function nj0($){return(...D)=>new Promise((X,J)=>{D.push((Q,Y)=>{if(Q)J(Q);else X(Y)}),$(...D)})}function ij0($){return(...D)=>{let X,J;if(D.push((Q,Y)=>{X=Q,J=Y}),$(...D),X)throw X;return J}}function pj0($){if($={...$},$.fs=lj0($.fs||cj0),typeof $.retries==="number"&&$.retries>0||$.retries&&typeof $.retries.retries==="number"&&$.retries.retries>0)throw Object.assign(Error("Cannot use retries with the sync api"),{code:"ESYNC"});return $}eg.exports={toPromise:nj0,toSync:ij0,toSyncOptions:pj0}});var Xm=A((PH$,O9)=>{var s5=sg(),{toPromise:Nq,toSync:Mq,toSyncOptions:Ow}=$m();async function Dm($,D){let X=await Nq(s5.lock)($,D);return Nq(X)}function rj0($,D){let X=Mq(s5.lock)($,Ow(D));return Mq(X)}function oj0($,D){return Nq(s5.unlock)($,D)}function aj0($,D){return Mq(s5.unlock)($,Ow(D))}function tj0($,D){return Nq(s5.check)($,D)}function sj0($,D){return Mq(s5.check)($,Ow(D))}O9.exports=Dm;O9.exports.lock=Dm;O9.exports.unlock=oj0;O9.exports.lockSync=rj0;O9.exports.unlockSync=aj0;O9.exports.check=tj0;O9.exports.checkSync=sj0});var Gm=A((Fm)=>{Object.defineProperty(Fm,"__esModule",{value:!0});Fm.canStoreURLs=Fm.FileUrlStorage=void 0;var Jm=t("fs"),ej0=DT0(xg()),Qm=$T0(Xm());function Zm($){if(typeof WeakMap!="function")return null;var D=new WeakMap,X=new WeakMap;return(Zm=function(J){return J?X:D})($)}function $T0($,D){if(!D&&$&&$.__esModule)return $;if($===null||typeof $!="object"&&typeof $!="function")return{default:$};var X=Zm(D);if(X&&X.has($))return X.get($);var J={__proto__:null},Q=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Y in $)if(Y!=="default"&&{}.hasOwnProperty.call($,Y)){var Z=Q?Object.getOwnPropertyDescriptor($,Y):null;Z&&(Z.get||Z.set)?Object.defineProperty(J,Y,Z):J[Y]=$[Y]}return J.default=$,X&&X.set($,J),J}function DT0($){return $&&$.__esModule?$:{default:$}}function IZ($){return IZ=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(D){return typeof D}:function(D){return D&&typeof Symbol=="function"&&D.constructor===Symbol&&D!==Symbol.prototype?"symbol":typeof D},IZ($)}function XT0($,D){if(!($ instanceof D))throw TypeError("Cannot call a class as a function")}function Ym($,D){for(var X=0;X<D.length;X++){var J=D[X];if(J.enumerable=J.enumerable||!1,J.configurable=!0,"value"in J)J.writable=!0;Object.defineProperty($,QT0(J.key),J)}}function JT0($,D,X){if(D)Ym($.prototype,D);if(X)Ym($,X);return Object.defineProperty($,"prototype",{writable:!1}),$}function QT0($){var D=YT0($,"string");return IZ(D)=="symbol"?D:D+""}function YT0($,D){if(IZ($)!="object"||!$)return $;var X=$[Symbol.toPrimitive];if(X!==void 0){var J=X.call($,D||"default");if(IZ(J)!="object")return J;throw TypeError("@@toPrimitive must return a primitive value.")}return(D==="string"?String:Number)($)}var SH$=Fm.canStoreURLs=!0,xH$=Fm.FileUrlStorage=function(){function $(D){XT0(this,$),this.path=D}return JT0($,[{key:"findAllUploads",value:function(){var X=this;return new Promise(function(J,Q){X._getItems("tus::",function(Y,Z){if(Y)Q(Y);else J(Z)})})}},{key:"findUploadsByFingerprint",value:function(X){var J=this;return new Promise(function(Q,Y){J._getItems("tus::".concat(X),function(Z,F){if(Z)Y(Z);else Q(F)})})}},{key:"removeUpload",value:function(X){var J=this;return new Promise(function(Q,Y){J._removeItem(X,function(Z){if(Z)Y(Z);else Q()})})}},{key:"addUpload",value:function(X,J){var Q=this,Y=Math.round(Math.random()*1000000000000),Z="tus::".concat(X,"::").concat(Y);return new Promise(function(F,U){Q._setItem(Z,J,function(G){if(G)U(G);else F(Z)})})}},{key:"_setItem",value:function(X,J,Q){var Y=this;Qm.lock(this.path,this._lockfileOptions()).then(function(Z){Q=Y._releaseAndCb(Z,Q),Y._getData(function(F,U){if(F){Q(F);return}U[X]=J,Y._writeData(U,function(G){return Q(G)})})}).catch(Q)}},{key:"_getItems",value:function(X,J){this._getData(function(Q,Y){if(Q){J(Q);return}var Z=Object.keys(Y).filter(function(F){return F.startsWith(X)}).map(function(F){var U=Y[F];return U.urlStorageKey=F,U});J(null,Z)})}},{key:"_removeItem",value:function(X,J){var Q=this;Qm.lock(this.path,this._lockfileOptions()).then(function(Y){J=Q._releaseAndCb(Y,J),Q._getData(function(Z,F){if(Z){J(Z);return}delete F[X],Q._writeData(F,function(U){return J(U)})})}).catch(J)}},{key:"_lockfileOptions",value:function(){return{realpath:!1,retries:{retries:5,minTimeout:20}}}},{key:"_releaseAndCb",value:function(X,J){return function(Q){if(Q){X().then(function(){return J(Q)}).catch(function(Y){return J((0,ej0.default)([Q,Y]))});return}X().then(J).catch(J)}}},{key:"_writeData",value:function(X,J){var Q={encoding:"utf8",mode:432,flag:"w"};(0,Jm.writeFile)(this.path,JSON.stringify(X),Q,function(Y){return J(Y)})}},{key:"_getData",value:function(X){(0,Jm.readFile)(this.path,"utf8",function(J,Q){if(J){if(J.code==="ENOENT")X(null,{});else X(J);return}try{Q=!Q.trim().length?{}:JSON.parse(Q)}catch(Y){X(Y);return}X(null,Q)})}}])}()});var Lq=A((z9)=>{Object.defineProperty(z9,"__esModule",{value:!0});Object.defineProperty(z9,"DefaultHttpStack",{enumerable:!0,get:function(){return Om.default}});Object.defineProperty(z9,"DetailedError",{enumerable:!0,get:function(){return FT0.default}});Object.defineProperty(z9,"FileUrlStorage",{enumerable:!0,get:function(){return zm.FileUrlStorage}});Object.defineProperty(z9,"StreamSource",{enumerable:!0,get:function(){return HT0.default}});z9.Upload=void 0;Object.defineProperty(z9,"canStoreURLs",{enumerable:!0,get:function(){return zm.canStoreURLs}});z9.defaultOptions=void 0;Object.defineProperty(z9,"enableDebugLog",{enumerable:!0,get:function(){return UT0.enableDebugLog}});z9.isSupported=void 0;var FT0=rX(OM()),UT0=zM(),GT0=rX(Xh()),zw=rX(uh()),qT0=rX(Db()),WT0=rX(Zb()),Om=rX(Eb()),HT0=rX(IM()),zm=Gm();function rX($){return $&&$.__esModule?$:{default:$}}function $J($){return $J=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(D){return typeof D}:function(D){return D&&typeof Symbol=="function"&&D.constructor===Symbol&&D!==Symbol.prototype?"symbol":typeof D},$J($)}function OT0($,D){if(!($ instanceof D))throw TypeError("Cannot call a class as a function")}function qm($,D){for(var X=0;X<D.length;X++){var J=D[X];if(J.enumerable=J.enumerable||!1,J.configurable=!0,"value"in J)J.writable=!0;Object.defineProperty($,Km(J.key),J)}}function zT0($,D,X){if(D)qm($.prototype,D);if(X)qm($,X);return Object.defineProperty($,"prototype",{writable:!1}),$}function VT0($,D,X){return D=wq(D),KT0($,Vm()?Reflect.construct(D,X||[],wq($).constructor):D.apply($,X))}function KT0($,D){if(D&&($J(D)==="object"||typeof D==="function"))return D;else if(D!==void 0)throw TypeError("Derived constructors may only return object or undefined");return NT0($)}function NT0($){if($===void 0)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return $}function Vm(){try{var $=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(D){}return(Vm=function(){return!!$})()}function wq($){return wq=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(X){return X.__proto__||Object.getPrototypeOf(X)},wq($)}function MT0($,D){if(typeof D!=="function"&&D!==null)throw TypeError("Super expression must either be null or a function");if($.prototype=Object.create(D&&D.prototype,{constructor:{value:$,writable:!0,configurable:!0}}),Object.defineProperty($,"prototype",{writable:!1}),D)Vw($,D)}function Vw($,D){return Vw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(J,Q){return J.__proto__=Q,J},Vw($,D)}function Wm($,D){var X=Object.keys($);if(Object.getOwnPropertySymbols){var J=Object.getOwnPropertySymbols($);D&&(J=J.filter(function(Q){return Object.getOwnPropertyDescriptor($,Q).enumerable})),X.push.apply(X,J)}return X}function e5($){for(var D=1;D<arguments.length;D++){var X=arguments[D]!=null?arguments[D]:{};D%2?Wm(Object(X),!0).forEach(function(J){wT0($,J,X[J])}):Object.getOwnPropertyDescriptors?Object.defineProperties($,Object.getOwnPropertyDescriptors(X)):Wm(Object(X)).forEach(function(J){Object.defineProperty($,J,Object.getOwnPropertyDescriptor(X,J))})}return $}function wT0($,D,X){if(D=Km(D),D in $)Object.defineProperty($,D,{value:X,enumerable:!0,configurable:!0,writable:!0});else $[D]=X;return $}function Km($){var D=LT0($,"string");return $J(D)=="symbol"?D:D+""}function LT0($,D){if($J($)!="object"||!$)return $;var X=$[Symbol.toPrimitive];if(X!==void 0){var J=X.call($,D||"default");if($J(J)!="object")return J;throw TypeError("@@toPrimitive must return a primitive value.")}return(D==="string"?String:Number)($)}var Hm=z9.defaultOptions=e5(e5({},zw.default.defaultOptions),{},{httpStack:new Om.default,fileReader:new qT0.default,urlStorage:new GT0.default,fingerprint:WT0.default}),_H$=z9.Upload=function($){function D(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return OT0(this,D),J=e5(e5({},Hm),J),VT0(this,D,[X,J])}return MT0(D,$),zT0(D,null,[{key:"terminate",value:function(J){var Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Q=e5(e5({},Hm),Q),zw.default.terminate(J,Q)}}])}(zw.default),kH$=z9.isSupported=!0});var QD;var T8=s(()=>{QD={name:"@capgo/cli",type:"module",version:"8.20.1",description:"A CLI to upload to capgo servers",author:"Martin martin@capgo.app",license:"Apache 2.0",homepage:"https://github.com/Cap-go/capgo/tree/main/cli#readme",repository:{type:"git",url:"git+https://github.com/Cap-go/capgo.git",directory:"cli"},bugs:{url:"https://github.com/Cap-go/capgo/issues"},keywords:["appflow alternative","ionic","capacitor","auto update","live update","capgo","cli","upload","capgo-cli","sdk","tanstack-intent"],exports:{".":{import:"./dist/index.js",require:"./dist/index.js"},"./sdk":{types:"./dist/src/sdk.d.ts",import:"./dist/src/sdk.js"}},main:"dist/index.js",types:"dist/src/index.d.ts",bin:{capgo:"dist/index.js"},files:["!skills/_artifacts","dist","skills"],engines:{npm:">=8.0.0",node:">=20.0.0"},scripts:{build:"tsc && bun build.mjs",dev:"NODE_ENV=development ncc build","no-debug":"node dist/index.js","dev-build":"SUPA_DB=development ncc build",pack:"pkg",types:"bunx --bun supabase gen types typescript --project-id=xvwzpoazmxkqosrdewyv > src/types/supabase.types.ts",typecheck:"tsgo --project tsconfig.tsgo.json --noEmit",lint:"bun run lint:ox","lint:ox":"oxlint --config ../.oxlintrc.json src","lint:fix":"oxlint --config ../.oxlintrc.json --fix src","check-posix-paths":"node test/check-posix-paths.js","generate-docs":"node dist/index.js generate-docs README.md","test:bundle":"bun test/test-bundle.mjs","test:prescan":"bun test test/prescan/","test:functional":"bun test/test-functional.mjs","test:semver":"bun test/test-semver-validation.mjs","test:version-edge-cases":"bun test/test-version-validation.mjs","test:regex":"bun test/test-regex-validation.mjs","test:upload":"bun test/test-upload-validation.mjs","test:fail-on-incompatible":"bun test/test-fail-on-incompatible.mjs","test:credentials":"bun test/test-credentials.mjs","test:asc-key-protocol":"bun test/test-asc-key-protocol.mjs","test:credentials-validation":"bun test/test-credentials-validation.mjs","test:android-service-account-validation":"bun test/test-android-service-account-validation.mjs","test:build-zip-filter":"bun test/test-build-zip-filter.mjs","test:checksum":"bun test/test-checksum-algorithm.mjs","test:build-needed":"bun test/test-build-needed.mjs","test:ci-prompts":"bun test/test-ci-prompts.mjs","test:ci-secrets":"bun test/test-ci-secrets.mjs","test:android-onboarding-progress":"bun test/test-android-onboarding-progress.mjs","test:onboarding-telemetry":"bun test/test-onboarding-telemetry.mjs","test:v2-event-migration":"bun test/test-v2-event-migration.mjs","test:analytics":"bun test/test-analytics.mjs","test:analytics-error-category":"bun test/test-analytics-error-category.mjs","test:analytics-org-resolver":"bun test/test-analytics-org-resolver.mjs","test:supabase-perf":"bun test/test-supabase-perf.mjs","test:preview-qr":"bun test/test-preview-qr.mjs","test:mcp-analytics":"bun test/test-mcp-analytics.mjs","test:mcp-instructions":"bun test/test-mcp-instructions.mjs","test:mcp-stdout-guard":"bun test/test-mcp-stdout-guard.mjs","test:mcp-platform-select":"bun test/test-mcp-platform-select.mjs","test:mcp-explain-scopes":"bun test/test-mcp-explain-scopes.mjs","test:mcp-oauth-reopen":"bun test/test-mcp-oauth-reopen.mjs","test:mcp-broker-oauth":"bun test/test-mcp-broker-oauth.mjs","test:mcp-broker-session":"bun test/test-mcp-broker-session.mjs","test:mcp-credentials-manage":"bun test/test-mcp-credentials-manage.mjs","test:mcp-resume-prompt":"bun test/test-mcp-resume-prompt.mjs","test:mcp-build-job":"bun test/test-mcp-build-job.mjs","test:mcp-build-tools":"bun test/test-mcp-build-tools.mjs","test:app-created-source":"bun test/test-app-created-source.mjs","test:doctor-analytics":"bun test/test-doctor-analytics.mjs","test:posthog-exception":"bun test/test-posthog-exception.mjs","test:onboarding-recovery":"bun test/test-onboarding-recovery.mjs","test:onboarding-progress":"bun test/test-onboarding-progress.mjs","test:onboarding-run-targets":"bun test/test-onboarding-run-targets.mjs","test:run-device-command":"bun test/test-run-device-command.mjs","test:init-app-conflict":"bun test/test-init-app-conflict.mjs","test:init-guardrails":"bun test/test-init-guardrails.mjs","test:init-replay":"bun test/test-init-replay.mjs","test:prompt-preferences":"bun test/test-prompt-preferences.mjs","test:esm-sdk":"node test/test-sdk-esm.mjs","test:auth-session":"bun test/test-auth-session.mjs","test:mcp":"node test/test-mcp.mjs","test:mcp-no-key-handshake":"node test/test-mcp-no-key-handshake.mjs","test:version-detection":"node test/test-get-installed-version.mjs","test:version-detection:setup":"./test/fixtures/setup-test-projects.sh","test:platform-paths":"bun test/test-platform-paths.mjs","test:project-type-detection":"bun test/test-project-type-detection.mjs","test:payload-split":"bun test/test-payload-split.mjs","test:macos-signing":"bun test/test-macos-signing.mjs","test:helper-dce":"bash scripts/check-helper-dce.sh","test:apple-api-import-helpers":"bun test/test-apple-api-import-helpers.mjs","test:apple-api-verify-key":"bun test/test-apple-api-verify-key.mjs","test:bundle-id-detector":"bun test/test-bundle-id-detector.mjs","test:apple-api-app-list":"bun test/test-apple-api-app-list.mjs","test:apple-api-cert-create":"bun test/test-apple-api-cert-create.mjs","test:app-verification":"bun test/test-app-verification.mjs","test:pbxproj-parser":"bun test/test-pbxproj-parser.mjs","test:manifest-path-encoding":"bun test/test-manifest-path-encoding.mjs","test:self-update":"bun test/test-self-update.mjs","test:update-prompt":"bun test/test-update-prompt.mjs","test:android-tail-engine":"bun test/test-android-tail-engine.mjs","test:android-tail-render":"bun test/test-android-tail-render.mjs","test:android-tail-routing":"bun test/test-android-tail-routing.mjs","test:dev-gate-stripped":"bun test/test-dev-gate-stripped.mjs","test:frame-fit-ios-shared":"bun test/test-frame-fit-ios-shared.mjs","test:ios-confirm-app-id":"bun test/test-ios-confirm-app-id.mjs","test:ios-create-new":"bun test/test-ios-create-new.mjs","test:ios-e2e":"bun test/test-ios-e2e.mjs","test:ios-flow-contract":"bun test/test-ios-flow-contract.mjs","test:ios-import-discovery":"bun test/test-ios-import-discovery.mjs","test:ios-import-export":"bun test/test-ios-import-export.mjs","test:ios-import-pickers":"bun test/test-ios-import-pickers.mjs","test:ios-import-recovery":"bun test/test-ios-import-recovery.mjs","test:ios-recovery":"bun test/test-ios-recovery.mjs","test:ios-resume":"bun test/test-ios-resume.mjs","test:ios-tail-handoff":"bun test/test-ios-tail-handoff.mjs","test:ios-tui-render":"bun test/test-ios-tui-render.mjs","test:p8-error":"bun test/test-p8-error.mjs","test:ios-tui-routing":"bun test/test-ios-tui-routing.mjs","test:ios-updater-sync-validation":"bun test/test-ios-updater-sync-validation.mjs","test:ios-verify-app":"bun test/test-ios-verify-app.mjs","test:platform-flow-contract":"bun test/test-platform-flow-contract.mjs","test:tail-engine-shared":"bun test/test-tail-engine-shared.mjs",test:"bun run build && bun run test:helper-dce && bun run test:version-detection:setup && bun run test:bundle && bun run test:functional && bun run test:semver && bun run test:version-edge-cases && bun run test:regex && bun run test:upload && bun run test:fail-on-incompatible && bun run test:credentials && bun run test:credentials-validation && bun run test:android-service-account-validation && bun run test:build-zip-filter && bun run test:checksum && bun run test:build-needed && bun run test:ci-prompts && bun run test:ci-secrets && bun run test:android-onboarding-progress && bun run test:onboarding-telemetry && bun run test:v2-event-migration && bun run test:analytics && bun run test:analytics-error-category && bun run test:analytics-org-resolver && bun run test:supabase-perf && bun run test:preview-qr && bun run test:app-set-options && bun run test:mcp-analytics && bun run test:mcp-instructions && bun run test:mcp-live-update-onboarding && bun run test:mcp-stdout-guard && bun run test:mcp-platform-select && bun run test:mcp-explain-scopes && bun run test:mcp-oauth-reopen && bun run test:mcp-broker-oauth && bun run test:mcp-broker-session && bun run test:mcp-credentials-manage && bun run test:mcp-resume-prompt && bun run test:mcp-build-job && bun run test:mcp-build-tools && bun run test:app-created-source && bun run test:doctor-analytics && bun run test:posthog-exception && bun run test:build-platform-selection && bun run test:onboarding-recovery && bun run test:onboarding-progress && bun run test:onboarding-run-targets && bun run test:run-device-command && bun run test:init-app-conflict && bun run test:init-guardrails && bun run test:init-replay && bun run test:prompt-preferences && bun run test:esm-sdk && bun run test:mcp && bun run test:mcp-no-key-handshake && bun run test:auth-session && bun run test:version-detection && bun run test:platform-paths && bun run test:project-type-detection && bun run test:payload-split && bun run test:manifest-path-encoding && bun run test:macos-signing && bun run test:asc-key-protocol && bun run test:apple-api-import-helpers && bun run test:apple-api-verify-key && bun run test:bundle-id-detector && bun run test:apple-api-app-list && bun run test:app-verification && bun run test:pbxproj-parser && bun run test:ai-log-capture && bun run test:ai-analyze-flow && bun run test:cicd-failure-help && bun run test:ai-sse-parser && bun run test:ai-render-markdown && bun run test:ai-stream-markdown && bun run test:ai-onboarding-mode && bun run test:ai-fit && bun run test:platform-layout && bun run test:frame-fit && bun run test:onboarding-min-size && bun run test:min-size-gate && bun run test:shell-size-gate && bun run test:build-log-sanitize && bun run test:build-output-viewport && bun run test:diff-viewer-viewport && bun run test:build-complete-exit && bun run test:ai-analyze-stream && bun run test:support-mailto && bun run test:support-redact && bun run test:support-internal-log && bun run test:support-help-menu && bun run test:support-contact && bun run test:support-upload-prompt && bun run test:support-bundle-files && bun run test:self-update && bun run test:update-prompt && bun run test:apple-api-cert-create && bun run test:android-tail-engine && bun run test:android-tail-render && bun run test:android-tail-routing && bun run test:dev-gate-stripped && bun run test:frame-fit-ios-shared && bun run test:ios-confirm-app-id && bun run test:ios-create-new && bun run test:ios-e2e && bun run test:ios-flow-contract && bun run test:ios-import-discovery && bun run test:ios-import-export && bun run test:ios-import-pickers && bun run test:ios-import-recovery && bun run test:ios-recovery && bun run test:ios-resume && bun run test:ios-tail-handoff && bun run test:ios-tui-render && bun run test:p8-error && bun run test:ios-tui-routing && bun run test:ios-updater-sync-validation && bun run test:ios-verify-app && bun run test:platform-flow-contract && bun run test:tail-engine-shared && bun run test:prescan","test:build-platform-selection":"bun test/test-build-platform-selection.mjs","test:ai-log-capture":"bun test/test-ai-log-capture.mjs","test:ai-analyze-flow":"bun test/test-ai-analyze-flow.mjs","test:cicd-failure-help":"bun test/test-cicd-failure-help.mjs","test:ai-analyze-stream":"bun test/test-ai-analyze-stream.mjs","test:ai-sse-parser":"bun test/test-ai-sse-parser.mjs","test:ai-render-markdown":"bun test/test-ai-render-markdown.mjs","test:ai-onboarding-mode":"bun test/test-ai-onboarding-mode.mjs","test:ai-fit":"bun test/test-ai-fit.mjs","test:platform-layout":"bun test/test-platform-layout.mjs","test:frame-fit":"bun test/run-frame-fit.mjs","test:onboarding-min-size":"bun test/test-onboarding-min-size.mjs","test:min-size-gate":"bun test/test-min-size-gate.mjs","test:shell-size-gate":"bun test/test-shell-size-gate.mjs","test:build-log-sanitize":"bun test/test-build-log-sanitize.mjs","test:build-output-viewport":"bun test/test-build-output-viewport.mjs","test:diff-viewer-viewport":"bun test/test-diff-viewer-viewport.mjs","test:build-complete-exit":"bun test/test-build-complete-exit.mjs","test:ai-stream-markdown":"bun test/test-ai-stream-markdown.mjs","test:support-mailto":"bun test/test-support-mailto.mjs","test:support-redact":"bun test/test-support-redact.mjs","test:support-internal-log":"bun test/test-support-internal-log.mjs","test:support-help-menu":"bun test/test-support-help-menu.mjs","test:support-contact":"bun test/test-support-contact.mjs","test:support-upload-prompt":"bun test/test-support-upload-prompt.mjs","test:support-bundle-files":"bun test/test-support-bundle-files.mjs","test:mcp-live-update-onboarding":"bun test/test-mcp-live-update-onboarding.mjs","test:app-set-options":"bun test/test-app-set-options.mjs"},dependencies:{"@inkjs/ui":"^2.0.0","@rrweb/types":"^2.0.1","@xterm/addon-serialize":"^0.14.0","@xterm/headless":"^6.0.0","happy-dom":"^20.10.4",ink:"^7.0.4","ink-spinner":"^5.0.0",jsonwebtoken:"^9.0.3","node-forge":"^1.4.0",qrcode:"^1.5.4",react:"^19.2.6","rrweb-snapshot":"^2.0.1","string-width":"^8.2.1"},optionalDependencies:{"@capgo/cli-helper-darwin-arm64":"^1.1.1","@capgo/cli-helper-darwin-x64":"^1.1.1","node-pty":"^1.1.0"},devDependencies:{"@antfu/eslint-config":"^9.0.0","@bradenmacdonald/s3-lite-client":"npm:@jsr/bradenmacdonald__s3-lite-client@0.9.6","@capacitor/cli":"^8.3.4","@capgo/find-package-manager":"^0.0.18","@clack/prompts":"^1.4.0","@modelcontextprotocol/sdk":"^1.29.0","@sauber/table":"npm:@jsr/sauber__table","@std/semver":"npm:@jsr/std__semver@1.0.8","@supabase/supabase-js":"^2.106.2","@tanstack/intent":"^0.0.41","@types/adm-zip":"^0.5.8","@types/jsonwebtoken":"^9.0.10","@types/node":"^25.9.1","@types/node-forge":"^1.3.14","@types/prettyjson":"^0.0.33","@types/qrcode":"^1.5.6","@types/react":"^19.2.15","@types/tmp":"^0.2.6","@types/ws":"^8.18.1","@typescript/native-preview":"7.0.0-dev.20260526.1","@vercel/ncc":"^0.38.4","@xterm/headless":"^6.0.0","adm-zip":"^0.5.17","ci-info":"^4.4.0",commander:"^14.0.3",eslint:"^10.4.0","git-format-staged":"4.0.1",husky:"^9.1.7","is-wsl":"^3.1.1",micromatch:"^4.0.8",open:"^11.0.0",oxlint:"^1.67.0",partysocket:"^1.1.19",prettyjson:"^1.2.5",tmp:"^0.2.6","tus-js-client":"^4.3.1",typescript:"^6.0.3",ws:"^8.21.0",zod:"^4.4.3"}}});import{platform as ET0,release as RT0}from"node:os";import{arch as AT0,version as IT0}from"node:process";function Kw(){return Lm}function Nw(){let $={cli_version:QD.version,node_version:IT0,os_platform:ET0(),os_arch:AT0,os_release:RT0(),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone||"undefined",is_ci:jZ.isCI,is_tty:Boolean(process.stdout.isTTY),invocation_source:Lm};if(jZ.name)$.ci_provider=jZ.name;return $}var jZ,Lm="cli";var Mw=s(()=>{T8();jZ=M$(ZM(),1)});import{AsyncLocalStorage as jT0}from"node:async_hooks";function TZ($,D){return Em.run($,()=>Promise.resolve(D()))}function TT0(){return Em.getStore()}function Rm(){return CT0}function Im($){Am=$}function Bm($){try{Am?.($)}catch{}}function Tm($,D){let X;try{X=new URL($).pathname}catch{X=$.split("?")[0]}let J="/functions/v1/",Q=X.indexOf(J);if(Q>=0){let G=X.slice(Q+J.length).replace(/^\/+|\/+$/g,"");return G?`${D} functions:${G}`:`${D} functions`}let Y="/rest/v1/",Z=X.indexOf(Y),F=Z>=0?X.slice(Z+Y.length):X.replace(/^\//,"");if(F.startsWith("rpc/"))return`rpc:${F.slice(4).split("/")[0]}`;let U=F.split("/")[0]||X;return`${D} ${U}`}function PT0($){let D=$?.headers;if(!D)return;let X=D.get;if(typeof X==="function")return X.call(D,"capgkey")??void 0;if(Array.isArray(D))return D.find(([J])=>J.toLowerCase()==="capgkey")?.[1];return D.capgkey}function Cm(){return async(D,X)=>{let J=(X?.method??"GET").toUpperCase(),Q=typeof D==="string"?D:D instanceof URL?D.href:D.url,Y=TT0(),Z=PT0(X),F=Date.now();try{let U=await globalThis.fetch(D,X);return Bm({url:Q,method:J,status:U.status,ok:U.ok,durationMs:Date.now()-F,source:Y,apikey:Z}),U}catch(U){throw Bm({url:Q,method:J,status:0,ok:!1,durationMs:Date.now()-F,source:Y,apikey:Z,error:U}),U}}}var Em,CT0=!1,Am,jm=5000;var Bq=s(()=>{Em=new jT0});function Pm($,D){let J=["normal","bold","dim","italic","underline","strikethrough"].indexOf($),Q="\x1B[";return"\x1B["+J+"m"+D+"\x1B[0m"}var V6;var Sm=s(()=>{V6=class V6{title=null;headers=[];rows=[];static narrowTheme={top:["╔","═","╤","╗"],row:["║"," ","│","║"],div:["╟","─","┼","╢"],bot:["╚","═","╧","╝"]};static wideTheme={top:["╔═","═","═╤═","═╗"],row:["║ "," "," │ "," ║"],div:["╟─","─","─┼─","─╢"],bot:["╚═","═","═╧═","═╝"]};static roundTheme={top:["╭─","─","─┬─","─╮"],row:["│ "," "," │ "," │"],div:["├─","─","─┼─","─┤"],bot:["╰─","─","─┴─","─╯"]};theme=V6.wideTheme;columnWidth(){let $=[this.headers,...this.rows].filter((X)=>X.length>0),D=$[0].map((X)=>this.cast(X).length);for(let X of $.slice(1))for(let J=0;J<D.length;J++){let Q=this.cast(X[J]).length;if(Q>D[J])D[J]=Q}return D}cast($){if(typeof $==="object")return"obj";if($!==void 0&&typeof $.toString==="function")return $.toString();else return""}renderTitle(){return"[ "+this.title+" ]"}renderLine($){let D=this.columnWidth();return $[0]+D.map((X)=>$[1].repeat(X)).join($[2])+$[3]}renderCell($,D,X=!1){let J=this.cast($),Q=X?Pm("bold",J):J,Y=D-J.length,Z=this.theme.row[1];switch(typeof $){case"number":return Z.repeat(Y)+Q;case"string":return Q+Z.repeat(Y);case"boolean":case"object":return Z.repeat(Math.ceil(Y/2))+Pm("italic",J)+Z.repeat(Math.floor(Y/2));default:return Z.repeat(Y)}}renderRow($,D=!1){let X=this.theme.row,J=this.columnWidth();return X[0]+$.map((Q,Y)=>this.renderCell(Q,J[Y],D)).join(X[2])+X[3]}toString(){let $=this.theme,D=this.headers.length>0,X=this.rows.length>0;return[this.title?this.renderTitle():"",D||X?this.renderLine($.top):"",D?this.renderRow(this.headers,!0):"",D&&X?this.renderLine($.div):"",...this.rows.map((J)=>this.renderRow(J)),D||X?this.renderLine($.bot):""].filter((J)=>J.length>0).join(`
127
127
  `)}}});var DJ=s(()=>{Sm()});async function Eq($){try{let X=`https://registry.npmjs.org/${encodeURIComponent($.toLowerCase())}`,J=await fetch(X,{headers:{accept:"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"}});if(!J.ok)return null;return(await J.json())["dist-tags"]?.latest||null}catch{return null}}async function ST0(){let $=await Eq("@capgo/cli")??"",D=$?.split(".")[0]??"";return{currentVersion:QD.version,latestVersion:$,isOutdated:!!$&&$!==QD.version,majorVersion:D}}async function t$(){let{isOutdated:$,currentVersion:D,latestVersion:X,majorVersion:J}=await ST0();if($)B.warning(`\uD83D\uDEA8 You are using @capgo/cli@${D} it's not the latest version.
128
128
  Please use @capgo/cli@${X}" or @capgo/cli@${J} to keep up to date with the latest features and bug fixes.`)}var TD=s(()=>{$$();T8()});async function xm($,D,X,J,Q,Y="✅",Z){await c0(X,{channel:$,event:J,icon:Y,org_id:D,tracking_version:2,...Q||Z?{tags:{...Q?{"app-id":Q}:{},...Z}}:{},notify:!1})}var vm=s(()=>{$$();DJ();TD();t0()});var ww=A((XO$,_m)=>{var XJ=1000,JJ=XJ*60,QJ=JJ*60,oX=QJ*24,xT0=oX*7,vT0=oX*365.25;_m.exports=function($,D){D=D||{};var X=typeof $;if(X==="string"&&$.length>0)return _T0($);else if(X==="number"&&isFinite($))return D.long?uT0($):kT0($);throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify($))};function _T0($){if($=String($),$.length>100)return;var D=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec($);if(!D)return;var X=parseFloat(D[1]),J=(D[2]||"ms").toLowerCase();switch(J){case"years":case"year":case"yrs":case"yr":case"y":return X*vT0;case"weeks":case"week":case"w":return X*xT0;case"days":case"day":case"d":return X*oX;case"hours":case"hour":case"hrs":case"hr":case"h":return X*QJ;case"minutes":case"minute":case"mins":case"min":case"m":return X*JJ;case"seconds":case"second":case"secs":case"sec":case"s":return X*XJ;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return X;default:return}}function kT0($){var D=Math.abs($);if(D>=oX)return Math.round($/oX)+"d";if(D>=QJ)return Math.round($/QJ)+"h";if(D>=JJ)return Math.round($/JJ)+"m";if(D>=XJ)return Math.round($/XJ)+"s";return $+"ms"}function uT0($){var D=Math.abs($);if(D>=oX)return Rq($,D,oX,"day");if(D>=QJ)return Rq($,D,QJ,"hour");if(D>=JJ)return Rq($,D,JJ,"minute");if(D>=XJ)return Rq($,D,XJ,"second");return $+" ms"}function Rq($,D,X,J){var Q=D>=X*1.5;return Math.round($/X)+" "+J+(Q?"s":"")}});var Lw=A((JO$,km)=>{function yT0($){X.debug=X,X.default=X,X.coerce=U,X.disable=Z,X.enable=Q,X.enabled=F,X.humanize=ww(),X.destroy=G,Object.keys($).forEach((q)=>{X[q]=$[q]}),X.names=[],X.skips=[],X.formatters={};function D(q){let W=0;for(let H=0;H<q.length;H++)W=(W<<5)-W+q.charCodeAt(H),W|=0;return X.colors[Math.abs(W)%X.colors.length]}X.selectColor=D;function X(q){let W,H=null,O,z;function V(...N){if(!V.enabled)return;let L=V,E=Number(new Date),K=E-(W||E);if(L.diff=K,L.prev=W,L.curr=E,W=E,N[0]=X.coerce(N[0]),typeof N[0]!=="string")N.unshift("%O");let M=0;N[0]=N[0].replace(/%([a-zA-Z%])/g,(R,x)=>{if(R==="%%")return"%";M++;let k=X.formatters[x];if(typeof k==="function"){let I=N[M];R=k.call(L,I),N.splice(M,1),M--}return R}),X.formatArgs.call(L,N),(L.log||X.log).apply(L,N)}if(V.namespace=q,V.useColors=X.useColors(),V.color=X.selectColor(q),V.extend=J,V.destroy=X.destroy,Object.defineProperty(V,"enabled",{enumerable:!0,configurable:!1,get:()=>{if(H!==null)return H;if(O!==X.namespaces)O=X.namespaces,z=X.enabled(q);return z},set:(N)=>{H=N}}),typeof X.init==="function")X.init(V);return V}function J(q,W){let H=X(this.namespace+(typeof W>"u"?":":W)+q);return H.log=this.log,H}function Q(q){X.save(q),X.namespaces=q,X.names=[],X.skips=[];let W=(typeof q==="string"?q:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let H of W)if(H[0]==="-")X.skips.push(H.slice(1));else X.names.push(H)}function Y(q,W){let H=0,O=0,z=-1,V=0;while(H<q.length)if(O<W.length&&(W[O]===q[H]||W[O]==="*"))if(W[O]==="*")z=O,V=H,O++;else H++,O++;else if(z!==-1)O=z+1,V++,H=V;else return!1;while(O<W.length&&W[O]==="*")O++;return O===W.length}function Z(){let q=[...X.names,...X.skips.map((W)=>"-"+W)].join(",");return X.enable(""),q}function F(q){for(let W of X.skips)if(Y(q,W))return!1;for(let W of X.names)if(Y(q,W))return!0;return!1}function U(q){if(q instanceof Error)return q.stack||q.message;return q}function G(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return X.enable(X.load()),X}km.exports=yT0});var ym=A((um,Aq)=>{um.formatArgs=hT0;um.save=bT0;um.load=gT0;um.useColors=fT0;um.storage=mT0();um.destroy=(()=>{let $=!1;return()=>{if(!$)$=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}})();um.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function fT0(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let $;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&($=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt($[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function hT0($){if($[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+$[0]+(this.useColors?"%c ":" ")+"+"+Aq.exports.humanize(this.diff),!this.useColors)return;let D="color: "+this.color;$.splice(1,0,D,"color: inherit");let X=0,J=0;$[0].replace(/%[a-zA-Z%]/g,(Q)=>{if(Q==="%%")return;if(X++,Q==="%c")J=X}),$.splice(J,0,D)}um.log=console.debug||console.log||(()=>{});function bT0($){try{if($)um.storage.setItem("debug",$);else um.storage.removeItem("debug")}catch(D){}}function gT0(){let $;try{$=um.storage.getItem("debug")||um.storage.getItem("DEBUG")}catch(D){}if(!$&&typeof process<"u"&&"env"in process)$=process.env.DEBUG;return $}function mT0(){try{return localStorage}catch($){}}Aq.exports=Lw()(um);var{formatters:dT0}=Aq.exports;dT0.j=function($){try{return JSON.stringify($)}catch(D){return"[UnexpectedJSONParseError]: "+D.message}}});var hm=A((YO$,fm)=>{fm.exports=($,D=process.argv)=>{let X=$.startsWith("-")?"":$.length===1?"-":"--",J=D.indexOf(X+$),Q=D.indexOf("--");return J!==-1&&(Q===-1||J<Q)}});var mm=A((ZO$,gm)=>{var aT0=t("os"),bm=t("tty"),v6=hm(),{env:p1}=process,V9;if(v6("no-color")||v6("no-colors")||v6("color=false")||v6("color=never"))V9=0;else if(v6("color")||v6("colors")||v6("color=true")||v6("color=always"))V9=1;if("FORCE_COLOR"in p1)if(p1.FORCE_COLOR==="true")V9=1;else if(p1.FORCE_COLOR==="false")V9=0;else V9=p1.FORCE_COLOR.length===0?1:Math.min(parseInt(p1.FORCE_COLOR,10),3);function Bw($){if($===0)return!1;return{level:$,hasBasic:!0,has256:$>=2,has16m:$>=3}}function Ew($,D){if(V9===0)return 0;if(v6("color=16m")||v6("color=full")||v6("color=truecolor"))return 3;if(v6("color=256"))return 2;if($&&!D&&V9===void 0)return 0;let X=V9||0;if(p1.TERM==="dumb")return X;if(process.platform==="win32"){let J=aT0.release().split(".");if(Number(J[0])>=10&&Number(J[2])>=10586)return Number(J[2])>=14931?3:2;return 1}if("CI"in p1){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((J)=>(J in p1))||p1.CI_NAME==="codeship")return 1;return X}if("TEAMCITY_VERSION"in p1)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(p1.TEAMCITY_VERSION)?1:0;if(p1.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in p1){let J=parseInt((p1.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(p1.TERM_PROGRAM){case"iTerm.app":return J>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(p1.TERM))return 2;if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(p1.TERM))return 1;if("COLORTERM"in p1)return 1;return X}function tT0($){let D=Ew($,$&&$.isTTY);return Bw(D)}gm.exports={supportsColor:tT0,stdout:Bw(Ew(!0,bm.isatty(1))),stderr:Bw(Ew(!0,bm.isatty(2)))}});var nm=A((cm,jq)=>{var sT0=t("tty"),Iq=t("util");cm.init=YC0;cm.log=XC0;cm.formatArgs=$C0;cm.save=JC0;cm.load=QC0;cm.useColors=eT0;cm.destroy=Iq.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");cm.colors=[6,2,3,4,5,1];try{let $=mm();if($&&($.stderr||$).level>=2)cm.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221]}catch($){}cm.inspectOpts=Object.keys(process.env).filter(($)=>{return/^debug_/i.test($)}).reduce(($,D)=>{let X=D.substring(6).toLowerCase().replace(/_([a-z])/g,(Q,Y)=>{return Y.toUpperCase()}),J=process.env[D];if(/^(yes|on|true|enabled)$/i.test(J))J=!0;else if(/^(no|off|false|disabled)$/i.test(J))J=!1;else if(J==="null")J=null;else J=Number(J);return $[X]=J,$},{});function eT0(){return"colors"in cm.inspectOpts?Boolean(cm.inspectOpts.colors):sT0.isatty(process.stderr.fd)}function $C0($){let{namespace:D,useColors:X}=this;if(X){let J=this.color,Q="\x1B[3"+(J<8?J:"8;5;"+J),Y=` ${Q};1m${D} \x1B[0m`;$[0]=Y+$[0].split(`
129
129
  `).join(`
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capgo/cli",
3
3
  "type": "module",
4
- "version": "8.20.0",
4
+ "version": "8.20.1",
5
5
  "description": "A CLI to upload to capgo servers",
6
6
  "author": "Martin martin@capgo.app",
7
7
  "license": "Apache 2.0",