@capgo/cli 8.9.0 → 8.9.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,G=B.code||"commander.error";this._exit($,G,A)}_parseOptionsEnv(){this.options.forEach((A)=>{if(A.envVar&&A.envVar in R1.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()}`,R1.env[A.envVar]);else this.emit(`optionEnv:${A.name()}`)}})}_parseOptionsImplied(){let A=new BiA(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=(J)=>{let I=J.attributeName(),E=this.getOptionValue(I),D=this.options.find((X)=>X.negate&&I===X.attributeName()),H=this.options.find((X)=>!X.negate&&I===X.attributeName());if(D&&(D.presetArg===void 0&&E===!1||D.presetArg!==void 0&&E===D.presetArg))return D;return H||J},$=(J)=>{let I=B(J),E=I.attributeName();if(this.getOptionValueSource(E)==="env")return`environment variable '${I.envVar}'`;return`option '${I.flags}'`},G=`error: ${$(A)} cannot be used with ${$(Q)}`;this.error(G,{code:"commander.conflictingOption"})}unknownOption(A){if(this._allowUnknownOption)return;let Q="";if(A.startsWith("--")&&this._showSuggestionAfterError){let $=[],G=this;do{let J=G.createHelp().visibleOptions(G).filter((I)=>I.long).map((I)=>I.long);$=$.concat(J),G=G.parent}while(G&&!G._enablePositionalOptions);Q=Y6A(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",G=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${Q} argument${B} but got ${A.length}.`;this.error(G,{code:"commander.excessArguments"})}unknownCommand(){let A=this.args[0],Q="";if(this._showSuggestionAfterError){let $=[];this.createHelp().visibleCommands(this).forEach((G)=>{if($.push(G.name()),G.alias())$.push(G.alias())}),Q=Y6A(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 enA(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=tY.basename(A,tY.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,$,G;if(Q)B=(I)=>this._outputConfiguration.writeErr(I),$=this._outputConfiguration.getErrHasColors(),G=this._outputConfiguration.getErrHelpWidth();else B=(I)=>this._outputConfiguration.writeOut(I),$=this._outputConfiguration.getOutHasColors(),G=this._outputConfiguration.getOutHelpWidth();return{error:Q,write:(I)=>{if(!$)I=this._outputConfiguration.stripColor(I);return B(I)},hasColors:$,helpWidth:G}}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((J)=>J.emit("beforeAllHelp",$)),this.emit("beforeHelp",$);let G=this.helpInformation({error:B.error});if(Q){if(G=Q(G),typeof G!=="string"&&!Buffer.isBuffer(G))throw Error("outputHelp callback must return a string or a Buffer")}if(B.write(G),this._getHelpOption()?.long)this.emit(this._getHelpOption().long);this.emit("afterHelp",$),this._getCommandAndAncestors().forEach((J)=>J.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(R1.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($,(G)=>{let J;if(typeof Q==="function")J=Q({error:G.error,command:G.command});else J=Q;if(J)G.write(`${J}
94
- `)}),this}_outputHelpIfRequested(A){let Q=this._getHelpOption();if(Q&&A.find(($)=>Q.is($)))this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)")}}function D6A(A){return A.map((Q)=>{if(!Q.startsWith("--inspect"))return Q;let B,$="127.0.0.1",G="9229",J;if((J=Q.match(/^(--inspect(-brk)?)$/))!==null)B=J[1];else if((J=Q.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null)if(B=J[1],/^\d+$/.test(J[3]))G=J[3];else $=J[3];else if((J=Q.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null)B=J[1],$=J[3],G=J[4];if(B&&G!=="0")return`${B}=${$}:${parseInt(G)+1}`;return Q})}function th(){if(R1.env.NO_COLOR||R1.env.FORCE_COLOR==="0"||R1.env.FORCE_COLOR==="false")return!1;if(R1.env.FORCE_COLOR||R1.env.CLICOLOR_FORCE!==void 0)return!0;return}$iA.Command=eh;$iA.useColor=th});var W6A=g((YiA)=>{var{Argument:H6A}=oV(),{Command:Au}=U6A(),{CommanderError:IiA,InvalidArgumentError:X6A}=aC(),{Help:EiA}=rh(),{Option:F6A}=oh();YiA.program=new Au;YiA.createCommand=(A)=>new Au(A);YiA.createOption=(A,Q)=>new F6A(A,Q);YiA.createArgument=(A,Q)=>new H6A(A,Q);YiA.Command=Au;YiA.Option=F6A;YiA.Argument=H6A;YiA.Help=EiA;YiA.CommanderError=IiA;YiA.InvalidArgumentError=X6A;YiA.InvalidOptionArgumentError=X6A});var h8;var FI=kA(()=>{h8={name:"@capgo/cli",type:"module",version:"8.9.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: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:prompt-preferences":"bun test/test-prompt-preferences.mjs","test:esm-sdk":"node test/test-sdk-esm.mjs","test:mcp":"node test/test-mcp.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: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:mcp-analytics && bun run test:mcp-instructions && 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:prompt-preferences && bun run test:esm-sdk && bun run test:mcp && 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: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: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-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","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: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-bundle-files":"bun test/test-support-bundle-files.mjs"},dependencies:{"@inkjs/ui":"^2.0.0",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","string-width":"^8.2.1"},optionalDependencies:{"@capgo/cli-helper-darwin-arm64":"^1.1.1","@capgo/cli-helper-darwin-x64":"^1.1.1"},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 NiA(A){if(A&&typeof A==="object"&&"status"in A){let Q=A.status;if(typeof Q==="number")return Q}return}function LiA(A){if(A instanceof Error)return A.message;if(typeof A==="string")return A;return""}function tC(A){if(A&&typeof A==="object"&&"code"in A){let $=A.code;if(typeof $==="string"&&$.startsWith("commander."))return"commander"}let Q=NiA(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=LiA(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 q6A(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 wiA}from"node:async_hooks";function eC(A,Q){return C6A.run(A,()=>Promise.resolve(Q()))}function OiA(){return C6A.getStore()}function AM(){M6A=!0}function z6A(){return M6A}function L6A(A){N6A=A}function Z6A(A){try{N6A?.(A)}catch{}}function O6A(A,Q){let B;try{B=new URL(A).pathname}catch{B=A.split("?")[0]}let $="/functions/v1/",G=B.indexOf($);if(G>=0){let H=B.slice(G+$.length).replace(/^\/+|\/+$/g,"");return H?`${Q} functions:${H}`:`${Q} functions`}let J="/rest/v1/",I=B.indexOf(J),E=I>=0?B.slice(I+J.length):B.replace(/^\//,"");if(E.startsWith("rpc/"))return`rpc:${E.slice(4).split("/")[0]}`;let D=E.split("/")[0]||B;return`${Q} ${D}`}function ViA(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 V6A(){return async(Q,B)=>{let $=(B?.method??"GET").toUpperCase(),G=typeof Q==="string"?Q:Q instanceof URL?Q.href:Q.url,J=OiA(),I=ViA(B),E=Date.now();try{let D=await globalThis.fetch(Q,B);return Z6A({url:G,method:$,status:D.status,ok:D.ok,durationMs:Date.now()-E,source:J,apikey:I}),D}catch(D){throw Z6A({url:G,method:$,status:0,ok:!1,durationMs:Date.now()-E,source:J,apikey:I,error:D}),D}}}var C6A,M6A=!1,N6A,w6A=5000;var QM=kA(()=>{C6A=new wiA});import{homedir as R6A,platform as RiA,release as jiA}from"node:os";import{arch as TiA,cwd as j6A,env as YH,version as SiA}from"node:process";function BM(A){return A==="1"||A?.toLowerCase()==="true"||A?.toLowerCase()==="yes"}function viA(){if(BM(YH.CAPGO_DISABLE_TELEMETRY)||BM(YH.CAPGO_DISABLE_POSTHOG))return;return YH.CAPGO_CLI_POSTHOG_API_KEY?.trim()||YH.POSTHOG_API_KEY?.trim()||_iA}function xiA(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 biA(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 giA(A){let Q=A,B=j6A(),$=R6A();if(B)Q=Q.replaceAll(B,"<cwd>");if($)Q=Q.replaceAll($,"~");return Q}function yiA(A){let Q=A,B=j6A(),$=R6A();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 fiA(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 D6A(A){return A.map((Q)=>{if(!Q.startsWith("--inspect"))return Q;let B,$="127.0.0.1",G="9229",J;if((J=Q.match(/^(--inspect(-brk)?)$/))!==null)B=J[1];else if((J=Q.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null)if(B=J[1],/^\d+$/.test(J[3]))G=J[3];else $=J[3];else if((J=Q.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null)B=J[1],$=J[3],G=J[4];if(B&&G!=="0")return`${B}=${$}:${parseInt(G)+1}`;return Q})}function th(){if(R1.env.NO_COLOR||R1.env.FORCE_COLOR==="0"||R1.env.FORCE_COLOR==="false")return!1;if(R1.env.FORCE_COLOR||R1.env.CLICOLOR_FORCE!==void 0)return!0;return}$iA.Command=eh;$iA.useColor=th});var W6A=g((YiA)=>{var{Argument:H6A}=oV(),{Command:Au}=U6A(),{CommanderError:IiA,InvalidArgumentError:X6A}=aC(),{Help:EiA}=rh(),{Option:F6A}=oh();YiA.program=new Au;YiA.createCommand=(A)=>new Au(A);YiA.createOption=(A,Q)=>new F6A(A,Q);YiA.createArgument=(A,Q)=>new H6A(A,Q);YiA.Command=Au;YiA.Option=F6A;YiA.Argument=H6A;YiA.Help=EiA;YiA.CommanderError=IiA;YiA.InvalidArgumentError=X6A;YiA.InvalidOptionArgumentError=X6A});var h8;var FI=kA(()=>{h8={name:"@capgo/cli",type:"module",version:"8.9.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: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:prompt-preferences":"bun test/test-prompt-preferences.mjs","test:esm-sdk":"node test/test-sdk-esm.mjs","test:mcp":"node test/test-mcp.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: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:mcp-analytics && bun run test:mcp-instructions && 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:prompt-preferences && bun run test:esm-sdk && bun run test:mcp && 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: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: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-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","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: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-bundle-files":"bun test/test-support-bundle-files.mjs"},dependencies:{"@inkjs/ui":"^2.0.0",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","string-width":"^8.2.1"},optionalDependencies:{"@capgo/cli-helper-darwin-arm64":"^1.1.1","@capgo/cli-helper-darwin-x64":"^1.1.1"},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 NiA(A){if(A&&typeof A==="object"&&"status"in A){let Q=A.status;if(typeof Q==="number")return Q}return}function LiA(A){if(A instanceof Error)return A.message;if(typeof A==="string")return A;return""}function tC(A){if(A&&typeof A==="object"&&"code"in A){let $=A.code;if(typeof $==="string"&&$.startsWith("commander."))return"commander"}let Q=NiA(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=LiA(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 q6A(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 wiA}from"node:async_hooks";function eC(A,Q){return C6A.run(A,()=>Promise.resolve(Q()))}function OiA(){return C6A.getStore()}function AM(){M6A=!0}function z6A(){return M6A}function L6A(A){N6A=A}function Z6A(A){try{N6A?.(A)}catch{}}function O6A(A,Q){let B;try{B=new URL(A).pathname}catch{B=A.split("?")[0]}let $="/functions/v1/",G=B.indexOf($);if(G>=0){let H=B.slice(G+$.length).replace(/^\/+|\/+$/g,"");return H?`${Q} functions:${H}`:`${Q} functions`}let J="/rest/v1/",I=B.indexOf(J),E=I>=0?B.slice(I+J.length):B.replace(/^\//,"");if(E.startsWith("rpc/"))return`rpc:${E.slice(4).split("/")[0]}`;let D=E.split("/")[0]||B;return`${Q} ${D}`}function ViA(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 V6A(){return async(Q,B)=>{let $=(B?.method??"GET").toUpperCase(),G=typeof Q==="string"?Q:Q instanceof URL?Q.href:Q.url,J=OiA(),I=ViA(B),E=Date.now();try{let D=await globalThis.fetch(Q,B);return Z6A({url:G,method:$,status:D.status,ok:D.ok,durationMs:Date.now()-E,source:J,apikey:I}),D}catch(D){throw Z6A({url:G,method:$,status:0,ok:!1,durationMs:Date.now()-E,source:J,apikey:I,error:D}),D}}}var C6A,M6A=!1,N6A,w6A=5000;var QM=kA(()=>{C6A=new wiA});import{homedir as R6A,platform as RiA,release as jiA}from"node:os";import{arch as TiA,cwd as j6A,env as YH,version as SiA}from"node:process";function BM(A){return A==="1"||A?.toLowerCase()==="true"||A?.toLowerCase()==="yes"}function viA(){if(BM(YH.CAPGO_DISABLE_TELEMETRY)||BM(YH.CAPGO_DISABLE_POSTHOG))return;return YH.CAPGO_CLI_POSTHOG_API_KEY?.trim()||YH.POSTHOG_API_KEY?.trim()||_iA}function xiA(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 biA(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 giA(A){let Q=A,B=j6A(),$=R6A();if(B)Q=Q.replaceAll(B,"<cwd>");if($)Q=Q.replaceAll($,"~");return Q}function yiA(A){let Q=A,B=j6A(),$=R6A();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 fiA(A,Q){let B=A?.split(`
95
95
  `).slice(1).map(($)=>{let G=$.trim(),J=G.startsWith("at ")?G.slice(3):G,I=Q,E=J,D=J.lastIndexOf(" (");if(D!==-1&&J.endsWith(")"))I=J.slice(0,D).trim()||Q,E=J.slice(D+2,-1);else{let F=J.lastIndexOf(" "),K=F===-1?"":J.slice(F+1);if(/:\d+:\d+$/.test(K))I=J.slice(0,F).trim()||Q,E=K}let H=E.lastIndexOf(":"),X=H===-1?-1:E.lastIndexOf(":",H-1);if(H===-1||X===-1)return{function:Q,platform:"custom",lang:"javascript"};return{function:I,filename:giA(E.slice(0,X)),lineno:Number.parseInt(E.slice(X+1,H),10),colno:Number.parseInt(E.slice(H+1),10),platform:"custom",lang:"javascript"}}).filter(Boolean);return B&&B.length>0?B:[{function:Q,platform:"custom",lang:"javascript"}]}function hiA(A){if(!A||typeof A!=="object"||!("code"in A))return;let{code:Q}=A;return typeof Q==="string"?Q:void 0}function T6A(A){return!hiA(A)?.startsWith("commander.")}function Qu(A){let Q=[],B=A;while(B?.parent){let $=B.name();if($)Q.push($);B=B.parent}return Q.reverse().join(" ")||"unknown"}async function Bu(A){let Q=viA();if(!Q)return!1;let B=YH.CAPGO_CLI_POSTHOG_API_HOST?.trim()||YH.POSTHOG_API_HOST?.trim()||PiA,$;try{$=xiA(B)}catch{return!1}let G=biA(A.error),J=yiA(G.message),I=`cli:${h8.version}:${A.functionName}`,E=fiA(G.stack,A.functionName),D=E[0],H=[I,A.kind,G.name||"Error",D?.function||A.functionName,D&&"filename"in D?D.filename:"unknown",String(A.status??1)].join(":"),X={token:Q,event:"$exception",properties:{distinct_id:I,$exception_list:[{type:G.name||"Error",value:J,mechanism:{handled:!0,synthetic:!1},stacktrace:{type:"raw",frames:E}}],$exception_fingerprint:H,architecture:TiA,cli_version:h8.version,error_kind:A.kind,function_name:A.functionName,is_ci:Boolean(YH.CI),node_version:SiA,os_platform:RiA(),os_release:jiA(),runtime:"cli",status:A.status},timestamp:new Date().toISOString()};try{let F=new AbortController,K=setTimeout(()=>F.abort(),kiA);try{return(await fetch($,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(X),signal:F.signal})).ok}finally{clearTimeout(K)}}catch{return!1}}var PiA="https://eu.i.posthog.com/i/v0/e/",_iA="phc_NXDyDajQaTQVwb25DEhIVZfxVUn4R0Y348Z7vWYHZUi",kiA=1500;var $u=kA(()=>{FI()});import{existsSync as aG}from"fs";var R7=(A=".",Q="unknown")=>{let B=`${A}/bun.lockb`,$=`${A}/bun.lock`,G=`${A}/pnpm-lock.yaml`,J=`${A}/shrinkwrap.yaml`,I=`${A}/yarn.lock`,E=`${A}/package-lock.json`,D=`${A}/npm-shrinkwrap.json`;if(aG(B)||aG($))return"bun";if(aG(G)||aG(J))return"pnpm";if(aG(I))return"yarn";if(aG(E)||aG(D))return"npm";return Q},sV=(A=R7(),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"}},S6A=(A=".",Q="npx")=>{let B=`${A}/bun.lockb`,$=`${A}/bun.lock`,G=`${A}/pnpm-lock.yaml`,J=`${A}/shrinkwrap.yaml`,I=`${A}/yarn.lock`,E=`${A}/package-lock.json`,D=`${A}/npm-shrinkwrap.json`;if(aG(B)||aG($))return"bunx";if(aG(G)||aG(J))return"pnpm exec";if(aG(I))return"yarn dlx";if(aG(E)||aG(D))return"npx";return Q};var Gu=()=>{};function tV(A,Q){if(isNaN(A)||isNaN(Q))throw Error("Cannot compare against non-numbers");return A===Q?0:A<Q?-1:1}function k6A(A=[],Q=[]){if(A.length&&!Q.length)return-1;if(!A.length&&Q.length)return 1;return 0}function eV(A=[],Q=[]){let B=Math.max(A.length,Q.length);for(let $=0;$<B;$++){let G=A[$],J=Q[$];if(G===void 0&&J===void 0)return 0;if(J===void 0)return 1;if(G===void 0)return-1;if(typeof G==="string"&&typeof J==="number")return 1;if(typeof G==="number"&&typeof J==="string")return-1;if(G<J)return-1;if(G>J)return 1}return 0}function Iu(A){return typeof A==="number"&&!Number.isNaN(A)&&(!Number.isFinite(A)||0<=A&&A<=Number.MAX_SAFE_INTEGER)}function sG(A){return A.split(".").filter(Boolean).map((Q)=>{if(liA.test(Q)){let B=Number(Q);if(Iu(B))return B}return Q})}function OE(A){return A.split(".").filter(Boolean)}function QR(A,Q){let B=Number(A);if(!Iu(B))throw TypeError(Q);return B}function eY(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 ZF="0|[1-9]\\d*",uiA="\\d*[a-zA-Z-][a-zA-Z0-9-]*",miA,P6A,v6A,_6A="[0-9A-Za-z-]+",x6A,b6A,g6A,y6A="(?:<|>)?=?",ciA="x|X|\\*",Ju,AR,f6A,h6A,Eu=256,liA;var f9=kA(()=>{miA=`(?<major>${ZF})\\.(?<minor>${ZF})\\.(?<patch>${ZF})`,P6A=`(?:${ZF}|${uiA})`,v6A=`(?:-(?<prerelease>${P6A}(?:\\.${P6A})*))`,x6A=`(?:\\+(?<buildmetadata>${_6A}(?:\\.${_6A})*))`,b6A=`v?${miA}${v6A}?${x6A}?`,g6A=new RegExp(`^${b6A}$`),Ju=`${ZF}|${ciA}`,AR=`[v=\\s]*(?<major>${Ju})(?:\\.(?<minor>${Ju})(?:\\.(?<patch>${Ju})${v6A}?${x6A}?)?)?`,f6A=new RegExp(`^(?<operator>~>?|\\^|${y6A})\\s*${AR}$`),h6A=new RegExp(`^(?<operator>${y6A})\\s*(${b6A})$|^$`);liA=new RegExp(`^${ZF}$`)});function EG(A,Q){if(A===Q)return 0;return tV(A.major,Q.major)||tV(A.minor,Q.minor)||tV(A.patch,Q.patch)||k6A(A.prerelease,Q.prerelease)||eV(A.prerelease,Q.prerelease)}var ZJ=kA(()=>{f9()});function u6A(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(eV(A.prerelease,Q.prerelease)!==0)return"prerelease"}var m6A=kA(()=>{f9()});function Yu(A){return A.toFixed(0)}function Q6(A){let Q=Yu(A.major),B=Yu(A.minor),$=Yu(A.patch),G=A.prerelease?.join(".")??"",J=A.build?.join(".")??"";return[[`${Q}.${B}.${$}`,G].filter((D)=>D).join("-"),J].filter((D)=>D).join("+")}function diA(A,Q){if(eY(Q))return!0;let B=EG(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 BR(A,Q){for(let B of Q)if(!diA(A,B))return!1;if(!A.prerelease?.length)return!0;for(let B of Q){if(eY(B))continue;if(!B.prerelease?.length)continue;let{major:$,minor:G,patch:J}=B;if(A.major===$&&A.minor===G&&A.patch===J)return!0}return!1}var $R=kA(()=>{f9();ZJ()});function $M(A,Q){return Q.some((B)=>BR(A,B))}var GM=kA(()=>{$R()});function piA(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 JM(A=[],Q){let B=piA(A);if(!Q)return B;let $=sG(Q);if($.every((G)=>typeof G==="string")){if($.every((G,J)=>G===B[J])&&typeof B[$.length]==="number")return B;$=[...$,0]}return $}function j7(A,Q,B={}){let $=B.build!==void 0?OE(B.build):A.build??[];switch(Q){case"premajor":return{major:A.major+1,minor:0,patch:0,prerelease:JM(A.prerelease,B.prerelease),build:$};case"preminor":return{major:A.major,minor:A.minor+1,patch:0,prerelease:JM(A.prerelease,B.prerelease),build:$};case"prepatch":return{major:A.major,minor:A.minor,patch:A.patch+1,prerelease:JM(A.prerelease,B.prerelease),build:$};case"prerelease":{let J=(A.prerelease??[]).length===0?A.patch+1:A.patch;return{major:A.major,minor:A.minor,patch:J,prerelease:JM(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 J=(A.prerelease??[]).length===0||A.patch!==0?A.minor+1:A.minor;return{major:A.major,minor:J,patch:0,prerelease:[],build:$}}case"patch":{let J=(A.prerelease??[]).length===0?A.patch+1:A.patch;return{major:A.major,minor:A.minor,patch:J,prerelease:[],build:$}}case"pre":return{major:A.major,minor:A.minor,patch:A.patch,prerelease:JM(A.prerelease,B.prerelease),build:$};default:throw TypeError(`Cannot increment version: invalid argument ${Q}`)}}var c6A=kA(()=>{f9()});var GR,CF;var IM=kA(()=>{GR={major:Number.NaN,minor:Number.NaN,patch:Number.NaN,prerelease:[],build:[]},CF={operator:void 0,...GR}});var Du=kA(()=>{IM();f9()});function Uu(A,Q){return EG(A,Q)>0}var Hu=kA(()=>{ZJ()});var l6A=kA(()=>{GM();Hu()});function h9(A,Q){return EG(A,Q)<0}var Xu=kA(()=>{ZJ()});var d6A=kA(()=>{GM();Xu()});function niA(A){let B=A.match(h6A)?.groups;if(!B)return null;let{operator:$}=B;return{operator:$||void 0,...GR}}function V8(A){return!A||A.toLowerCase()==="x"||A==="*"}function iiA(A){if(V8(A.major))return;if(V8(A.minor))return{operator:">=",major:+A.major,minor:0,patch:0,prerelease:[],build:[]};if(V8(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?sG(A.prerelease):[],build:[]}}function riA(A){if(V8(A.major))return;if(V8(A.minor))return{operator:"<",major:+A.major+1,minor:0,patch:0,prerelease:[],build:[]};if(V8(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:sG(A.prerelease),build:[]};return{operator:"<=",major:+A.major,minor:+A.minor,patch:+A.patch,prerelease:[],build:[]}}function oiA(A){let Q=A.match(new RegExp(`^${AR}`)),B=Q?.groups;if(!B)return null;let $=Q[0].length,G=A.slice($).match(/^\s+-\s+/);if(!G)return null;let J=G[0].length,E=A.slice($+J).match(new RegExp(`^${AR}\\s*$`))?.groups,D=iiA(B),H=riA(E);return[D,H].filter(Boolean)}function aiA(A){let Q=V8(A.major),B=V8(A.minor),$=V8(A.patch),G=+A.major,J=+A.minor,I=+A.patch;if(Q)return[CF];if(B)return[{operator:">=",major:G,minor:0,patch:0},{operator:"<",major:G+1,minor:0,patch:0}];if($){if(G===0)return[{operator:">=",major:G,minor:J,patch:0},{operator:"<",major:G,minor:J+1,patch:0}];return[{operator:">=",major:G,minor:J,patch:0},{operator:"<",major:G+1,minor:0,patch:0}]}let E=sG(A.prerelease??"");if(G===0){if(J===0)return[{operator:">=",major:G,minor:J,patch:I,prerelease:E},{operator:"<",major:G,minor:J,patch:I+1}];return[{operator:">=",major:G,minor:J,patch:I,prerelease:E},{operator:"<",major:G,minor:J+1,patch:0}]}return[{operator:">=",major:G,minor:J,patch:I,prerelease:E},{operator:"<",major:G+1,minor:0,patch:0}]}function siA(A){let Q=V8(A.major),B=V8(A.minor),$=V8(A.patch),G=+A.major,J=+A.minor,I=+A.patch;if(Q)return[CF];if(B)return[{operator:">=",major:G,minor:0,patch:0},{operator:"<",major:G+1,minor:0,patch:0}];if($)return[{operator:">=",major:G,minor:J,patch:0},{operator:"<",major:G,minor:J+1,patch:0}];let E=sG(A.prerelease??"");return[{operator:">=",major:G,minor:J,patch:I,prerelease:E},{operator:"<",major:G,minor:J+1,patch:0}]}function tiA(A){let Q=V8(A.major),B=V8(A.minor),$=V8(A.patch),G=+A.major,J=+A.minor,I=+A.patch;if(Q)return[{operator:"<",major:0,minor:0,patch:0}];if(B){if($)return[{operator:"<",major:G,minor:0,patch:0}];return[{operator:"<",major:G,minor:0,patch:0}]}if($)return[{operator:"<",major:G,minor:J,patch:0}];let E=sG(A.prerelease??""),D=OE(A.build??"");return[{operator:"<",major:G,minor:J,patch:I,prerelease:E,build:D}]}function eiA(A){let Q=V8(A.minor),B=V8(A.patch),$=+A.major,G=+A.minor,J=+A.patch;if(Q)return[{operator:"<",major:$+1,minor:0,patch:0}];if(B)return[{operator:"<",major:$,minor:G+1,patch:0}];let I=sG(A.prerelease??""),E=OE(A.build??"");return[{operator:"<=",major:$,minor:G,patch:J,prerelease:I,build:E}]}function ArA(A){let Q=V8(A.major),B=V8(A.minor),$=V8(A.patch),G=+A.major,J=+A.minor,I=+A.patch;if(Q)return[{operator:"<",major:0,minor:0,patch:0}];if(B)return[{operator:">=",major:G+1,minor:0,patch:0}];if($)return[{operator:">=",major:G,minor:J+1,patch:0}];let E=sG(A.prerelease??""),D=OE(A.build??"");return[{operator:">",major:G,minor:J,patch:I,prerelease:E,build:D}]}function QrA(A){let Q=V8(A.major),B=V8(A.minor),$=V8(A.patch),G=+A.major,J=+A.minor,I=+A.patch;if(Q)return[CF];if(B)return[{operator:">=",major:G,minor:0,patch:0}];if($)return[{operator:">=",major:G,minor:J,patch:0}];let E=sG(A.prerelease??""),D=OE(A.build??"");return[{operator:">=",major:G,minor:J,patch:I,prerelease:E,build:D}]}function BrA(A){let Q=V8(A.major),B=V8(A.minor),$=V8(A.patch),G=+A.major,J=+A.minor,I=+A.patch;if(Q)return[CF];if(B)return[{operator:">=",major:G,minor:0,patch:0},{operator:"<",major:G+1,minor:0,patch:0}];if($)return[{operator:">=",major:G,minor:J,patch:0},{operator:"<",major:G,minor:J+1,patch:0}];let E=sG(A.prerelease??""),D=OE(A.build??"");return[{operator:A.operator==="="?"=":void 0,major:G,minor:J,patch:I,prerelease:E,build:D}]}function $rA(A){let Q=A.match(f6A)?.groups;if(!Q)return niA(A);switch(Q.operator){case"^":return aiA(Q);case"~":case"~>":return siA(Q);case"<":return tiA(Q);case"<=":return eiA(Q);case">":return ArA(Q);case">=":return QrA(Q);default:return BrA(Q)}}function GrA(A){return A.split(/\s+/).flatMap($rA)}function JR(A){let Q=A.replaceAll(/(?<=[<>=~^])(\s+)/g,"").split(/\s*\|\|\s*/).map((B)=>oiA(B)||GrA(B));if(Q.some((B)=>B.includes(null)))throw TypeError(`Cannot parse version range: range "${A}" is invalid`);return Q}var Fu=kA(()=>{f9();IM()});function Q0(A){if(typeof A!=="string")throw TypeError(`Cannot parse version as version must be a string: received ${typeof A}`);if(A.length>Eu)throw TypeError(`Cannot parse version as version length is too long: length is ${A.length}, max length is ${Eu}`);A=A.trim();let Q=A.match(g6A)?.groups;if(!Q)throw TypeError(`Cannot parse version: ${A}`);let B=QR(Q.major,`Cannot parse version ${A}: invalid major version`),$=QR(Q.minor,`Cannot parse version ${A}: invalid minor version`),G=QR(Q.patch,`Cannot parse version ${A}: invalid patch version`),J=Q.prerelease?sG(Q.prerelease):[],I=Q.buildmetadata?OE(Q.buildmetadata):[];return{major:B,minor:$,patch:G,prerelease:J,build:I}}var IR=kA(()=>{f9();f9()});function p6A(A,Q){let B=A.operator,$=Q.operator;if(B===void 0){if(eY(A))return!0;return $M(A,[[Q]])}if($===void 0){if(eY(Q))return!0;return $M(Q,[[A]])}let G=EG(A,Q);return(B===">="||B===">")&&($===">="||$===">")||(B==="<="||B==="<")&&($==="<="||$==="<")||G===0&&((B===">="||B==="<=")&&($===">="||$==="<="))||G===-1&&(B===">="||B===">")&&($==="<="||$==="<")||G===1&&(B==="<="||B==="<")&&($===">="||$===">")}function JrA(A){return A.every((Q)=>{return Q.some((B)=>IrA(B))})}function IrA(A){for(let Q=0;Q<A.length-1;Q++){let B=A[Q];for(let $ of A.slice(Q+1))if(!p6A(B,$))return!1}return!0}function n6A(A,Q){return JrA([A,Q])&&A.some((B)=>{return Q.some(($)=>{return B.every((G)=>{return $.every((J)=>p6A(G,J))})})})}var i6A=kA(()=>{f9();ZJ();GM()});var r6A=kA(()=>{Fu()});var o6A=kA(()=>{IM();IM();Du()});function EM(A){try{return Q0(A),!0}catch{return!1}}var a6A=kA(()=>{IR()});var s6A=kA(()=>{IR()});var t6A=kA(()=>{f9()});var e6A=kA(()=>{ZJ()});var AGA=kA(()=>{ZJ()});var QGA=kA(()=>{$R();f9();ZJ()});function Wu(A,Q){return EG(A,Q)>=0}var BGA=kA(()=>{ZJ()});var $GA=kA(()=>{$R();f9();ZJ()});var GGA=kA(()=>{ZJ()});var WI=kA(()=>{ZJ();m6A();GM();c6A();Du();l6A();d6A();Fu();IR();i6A();r6A();o6A();a6A();s6A();t6A();e6A();AGA();Hu();QGA();BGA();Xu();$GA();GGA()});var tG=g((AAB,DR)=>{var JGA,IGA,EGA,YGA,DGA,UGA,HGA,XGA,FGA,WGA,KGA,qGA,ZGA,ER,Ku,CGA,MGA,zGA,MF,NGA,LGA,wGA,OGA,VGA,RGA,jGA,TGA,SGA,YR,PGA,_GA,kGA;(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 DR==="object"&&typeof AAB==="object")A(B(Q,B(AAB)));else A(B(Q));function B($,G){if($!==Q)if(typeof Object.create==="function")Object.defineProperty($,"__esModule",{value:!0});else $.__esModule=!0;return function(J,I){return $[J]=G?G(J,I):I}}})(function(A){var Q=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(J,I){J.__proto__=I}||function(J,I){for(var E in I)if(Object.prototype.hasOwnProperty.call(I,E))J[E]=I[E]};JGA=function(J,I){if(typeof I!=="function"&&I!==null)throw TypeError("Class extends value "+String(I)+" is not a constructor or null");Q(J,I);function E(){this.constructor=J}J.prototype=I===null?Object.create(I):(E.prototype=I.prototype,new E)},IGA=Object.assign||function(J){for(var I,E=1,D=arguments.length;E<D;E++){I=arguments[E];for(var H in I)if(Object.prototype.hasOwnProperty.call(I,H))J[H]=I[H]}return J},EGA=function(J,I){var E={};for(var D in J)if(Object.prototype.hasOwnProperty.call(J,D)&&I.indexOf(D)<0)E[D]=J[D];if(J!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var H=0,D=Object.getOwnPropertySymbols(J);H<D.length;H++)if(I.indexOf(D[H])<0&&Object.prototype.propertyIsEnumerable.call(J,D[H]))E[D[H]]=J[D[H]]}return E},YGA=function(J,I,E,D){var H=arguments.length,X=H<3?I:D===null?D=Object.getOwnPropertyDescriptor(I,E):D,F;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")X=Reflect.decorate(J,I,E,D);else for(var K=J.length-1;K>=0;K--)if(F=J[K])X=(H<3?F(X):H>3?F(I,E,X):F(I,E))||X;return H>3&&X&&Object.defineProperty(I,E,X),X},DGA=function(J,I){return function(E,D){I(E,D,J)}},UGA=function(J,I,E,D,H,X){function F(b){if(b!==void 0&&typeof b!=="function")throw TypeError("Function expected");return b}var K=D.kind,q=K==="getter"?"get":K==="setter"?"set":"value",Z=!I&&J?D.static?J:J.prototype:null,M=I||(Z?Object.getOwnPropertyDescriptor(Z,D.name):{}),z,O=!1;for(var j=E.length-1;j>=0;j--){var V={};for(var S in D)V[S]=S==="access"?{}:D[S];for(var S in D.access)V.access[S]=D.access[S];V.addInitializer=function(b){if(O)throw TypeError("Cannot add initializers after decoration has completed");X.push(F(b||null))};var T=(0,E[j])(K==="accessor"?{get:M.get,set:M.set}:M[q],V);if(K==="accessor"){if(T===void 0)continue;if(T===null||typeof T!=="object")throw TypeError("Object expected");if(z=F(T.get))M.get=z;if(z=F(T.set))M.set=z;if(z=F(T.init))H.unshift(z)}else if(z=F(T))if(K==="field")H.unshift(z);else M[q]=z}if(Z)Object.defineProperty(Z,D.name,M);O=!0},HGA=function(J,I,E){var D=arguments.length>2;for(var H=0;H<I.length;H++)E=D?I[H].call(J,E):I[H].call(J);return D?E:void 0},XGA=function(J){return typeof J==="symbol"?J:"".concat(J)},FGA=function(J,I,E){if(typeof I==="symbol")I=I.description?"[".concat(I.description,"]"):"";return Object.defineProperty(J,"name",{configurable:!0,value:E?"".concat(E," ",I):I})},WGA=function(J,I){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(J,I)},KGA=function(J,I,E,D){function H(X){return X instanceof E?X:new E(function(F){F(X)})}return new(E||(E=Promise))(function(X,F){function K(M){try{Z(D.next(M))}catch(z){F(z)}}function q(M){try{Z(D.throw(M))}catch(z){F(z)}}function Z(M){M.done?X(M.value):H(M.value).then(K,q)}Z((D=D.apply(J,I||[])).next())})},qGA=function(J,I){var E={label:0,sent:function(){if(X[0]&1)throw X[1];return X[1]},trys:[],ops:[]},D,H,X,F=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return F.next=K(0),F.throw=K(1),F.return=K(2),typeof Symbol==="function"&&(F[Symbol.iterator]=function(){return this}),F;function K(Z){return function(M){return q([Z,M])}}function q(Z){if(D)throw TypeError("Generator is already executing.");while(F&&(F=0,Z[0]&&(E=0)),E)try{if(D=1,H&&(X=Z[0]&2?H.return:Z[0]?H.throw||((X=H.return)&&X.call(H),0):H.next)&&!(X=X.call(H,Z[1])).done)return X;if(H=0,X)Z=[Z[0]&2,X.value];switch(Z[0]){case 0:case 1:X=Z;break;case 4:return E.label++,{value:Z[1],done:!1};case 5:E.label++,H=Z[1],Z=[0];continue;case 7:Z=E.ops.pop(),E.trys.pop();continue;default:if((X=E.trys,!(X=X.length>0&&X[X.length-1]))&&(Z[0]===6||Z[0]===2)){E=0;continue}if(Z[0]===3&&(!X||Z[1]>X[0]&&Z[1]<X[3])){E.label=Z[1];break}if(Z[0]===6&&E.label<X[1]){E.label=X[1],X=Z;break}if(X&&E.label<X[2]){E.label=X[2],E.ops.push(Z);break}if(X[2])E.ops.pop();E.trys.pop();continue}Z=I.call(J,E)}catch(M){Z=[6,M],H=0}finally{D=X=0}if(Z[0]&5)throw Z[1];return{value:Z[0]?Z[1]:void 0,done:!0}}},ZGA=function(J,I){for(var E in J)if(E!=="default"&&!Object.prototype.hasOwnProperty.call(I,E))YR(I,J,E)},YR=Object.create?function(J,I,E,D){if(D===void 0)D=E;var H=Object.getOwnPropertyDescriptor(I,E);if(!H||("get"in H?!I.__esModule:H.writable||H.configurable))H={enumerable:!0,get:function(){return I[E]}};Object.defineProperty(J,D,H)}:function(J,I,E,D){if(D===void 0)D=E;J[D]=I[E]},ER=function(J){var I=typeof Symbol==="function"&&Symbol.iterator,E=I&&J[I],D=0;if(E)return E.call(J);if(J&&typeof J.length==="number")return{next:function(){if(J&&D>=J.length)J=void 0;return{value:J&&J[D++],done:!J}}};throw TypeError(I?"Object is not iterable.":"Symbol.iterator is not defined.")},Ku=function(J,I){var E=typeof Symbol==="function"&&J[Symbol.iterator];if(!E)return J;var D=E.call(J),H,X=[],F;try{while((I===void 0||I-- >0)&&!(H=D.next()).done)X.push(H.value)}catch(K){F={error:K}}finally{try{if(H&&!H.done&&(E=D.return))E.call(D)}finally{if(F)throw F.error}}return X},CGA=function(){for(var J=[],I=0;I<arguments.length;I++)J=J.concat(Ku(arguments[I]));return J},MGA=function(){for(var J=0,I=0,E=arguments.length;I<E;I++)J+=arguments[I].length;for(var D=Array(J),H=0,I=0;I<E;I++)for(var X=arguments[I],F=0,K=X.length;F<K;F++,H++)D[H]=X[F];return D},zGA=function(J,I,E){if(E||arguments.length===2){for(var D=0,H=I.length,X;D<H;D++)if(X||!(D in I)){if(!X)X=Array.prototype.slice.call(I,0,D);X[D]=I[D]}}return J.concat(X||Array.prototype.slice.call(I))},MF=function(J){return this instanceof MF?(this.v=J,this):new MF(J)},NGA=function(J,I,E){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var D=E.apply(J,I||[]),H,X=[];return H=Object.create((typeof AsyncIterator==="function"?AsyncIterator:Object).prototype),K("next"),K("throw"),K("return",F),H[Symbol.asyncIterator]=function(){return this},H;function F(j){return function(V){return Promise.resolve(V).then(j,z)}}function K(j,V){if(D[j]){if(H[j]=function(S){return new Promise(function(T,b){X.push([j,S,T,b])>1||q(j,S)})},V)H[j]=V(H[j])}}function q(j,V){try{Z(D[j](V))}catch(S){O(X[0][3],S)}}function Z(j){j.value instanceof MF?Promise.resolve(j.value.v).then(M,z):O(X[0][2],j)}function M(j){q("next",j)}function z(j){q("throw",j)}function O(j,V){if(j(V),X.shift(),X.length)q(X[0][0],X[0][1])}},LGA=function(J){var I,E;return I={},D("next"),D("throw",function(H){throw H}),D("return"),I[Symbol.iterator]=function(){return this},I;function D(H,X){I[H]=J[H]?function(F){return(E=!E)?{value:MF(J[H](F)),done:!1}:X?X(F):F}:X}},wGA=function(J){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var I=J[Symbol.asyncIterator],E;return I?I.call(J):(J=typeof ER==="function"?ER(J):J[Symbol.iterator](),E={},D("next"),D("throw"),D("return"),E[Symbol.asyncIterator]=function(){return this},E);function D(X){E[X]=J[X]&&function(F){return new Promise(function(K,q){F=J[X](F),H(K,q,F.done,F.value)})}}function H(X,F,K,q){Promise.resolve(q).then(function(Z){X({value:Z,done:K})},F)}},OGA=function(J,I){if(Object.defineProperty)Object.defineProperty(J,"raw",{value:I});else J.raw=I;return J};var B=Object.create?function(J,I){Object.defineProperty(J,"default",{enumerable:!0,value:I})}:function(J,I){J.default=I},$=function(J){return $=Object.getOwnPropertyNames||function(I){var E=[];for(var D in I)if(Object.prototype.hasOwnProperty.call(I,D))E[E.length]=D;return E},$(J)};VGA=function(J){if(J&&J.__esModule)return J;var I={};if(J!=null){for(var E=$(J),D=0;D<E.length;D++)if(E[D]!=="default")YR(I,J,E[D])}return B(I,J),I},RGA=function(J){return J&&J.__esModule?J:{default:J}},jGA=function(J,I,E,D){if(E==="a"&&!D)throw TypeError("Private accessor was defined without a getter");if(typeof I==="function"?J!==I||!D:!I.has(J))throw TypeError("Cannot read private member from an object whose class did not declare it");return E==="m"?D:E==="a"?D.call(J):D?D.value:I.get(J)},TGA=function(J,I,E,D,H){if(D==="m")throw TypeError("Private method is not writable");if(D==="a"&&!H)throw TypeError("Private accessor was defined without a setter");if(typeof I==="function"?J!==I||!H:!I.has(J))throw TypeError("Cannot write private member to an object whose class did not declare it");return D==="a"?H.call(J,E):H?H.value=E:I.set(J,E),E},SGA=function(J,I){if(I===null||typeof I!=="object"&&typeof I!=="function")throw TypeError("Cannot use 'in' operator on non-object");return typeof J==="function"?I===J:J.has(I)},PGA=function(J,I,E){if(I!==null&&I!==void 0){if(typeof I!=="object"&&typeof I!=="function")throw TypeError("Object expected.");var D,H;if(E){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");D=I[Symbol.asyncDispose]}if(D===void 0){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");if(D=I[Symbol.dispose],E)H=D}if(typeof D!=="function")throw TypeError("Object not disposable.");if(H)D=function(){try{H.call(this)}catch(X){return Promise.reject(X)}};J.stack.push({value:I,dispose:D,async:E})}else if(E)J.stack.push({async:!0});return I};var G=typeof SuppressedError==="function"?SuppressedError:function(J,I,E){var D=Error(E);return D.name="SuppressedError",D.error=J,D.suppressed=I,D};_GA=function(J){function I(X){J.error=J.hasError?new G(X,J.error,"An error was suppressed during disposal."):X,J.hasError=!0}var E,D=0;function H(){while(E=J.stack.pop())try{if(!E.async&&D===1)return D=0,J.stack.push(E),Promise.resolve().then(H);if(E.dispose){var X=E.dispose.call(E.value);if(E.async)return D|=2,Promise.resolve(X).then(H,function(F){return I(F),H()})}else D|=1}catch(F){I(F)}if(D===1)return J.hasError?Promise.reject(J.error):Promise.resolve();if(J.hasError)throw J.error}return H()},kGA=function(J,I){if(typeof J==="string"&&/^\.\.?\//.test(J))return J.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(E,D,H,X,F){return D?I?".jsx":".js":H&&(!X||!F)?E:H+X+"."+F.toLowerCase()+"js"});return J},A("__extends",JGA),A("__assign",IGA),A("__rest",EGA),A("__decorate",YGA),A("__param",DGA),A("__esDecorate",UGA),A("__runInitializers",HGA),A("__propKey",XGA),A("__setFunctionName",FGA),A("__metadata",WGA),A("__awaiter",KGA),A("__generator",qGA),A("__exportStar",ZGA),A("__createBinding",YR),A("__values",ER),A("__read",Ku),A("__spread",CGA),A("__spreadArrays",MGA),A("__spreadArray",zGA),A("__await",MF),A("__asyncGenerator",NGA),A("__asyncDelegator",LGA),A("__asyncValues",wGA),A("__makeTemplateObject",OGA),A("__importStar",VGA),A("__importDefault",RGA),A("__classPrivateFieldGet",jGA),A("__classPrivateFieldSet",TGA),A("__classPrivateFieldIn",SGA),A("__addDisposableResource",PGA),A("__disposeResources",_GA),A("__rewriteRelativeImportExtension",kGA)})});var bGA=g((vGA)=>{Object.defineProperty(vGA,"__esModule",{value:!0});vGA.resolveFetch=void 0;var ErA=(A)=>{if(A)return(...Q)=>A(...Q);return(...Q)=>fetch(...Q)};vGA.resolveFetch=ErA});var qu=g((uGA)=>{Object.defineProperty(uGA,"__esModule",{value:!0});uGA.FunctionRegion=uGA.FunctionsHttpError=uGA.FunctionsRelayError=uGA.FunctionsFetchError=uGA.FunctionsError=void 0;class YM 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}}}uGA.FunctionsError=YM;class yGA extends YM{constructor(A){super("Failed to send a request to the Edge Function","FunctionsFetchError",A)}}uGA.FunctionsFetchError=yGA;class fGA extends YM{constructor(A){super("Relay Error invoking the Edge Function","FunctionsRelayError",A)}}uGA.FunctionsRelayError=fGA;class hGA extends YM{constructor(A){super("Edge Function returned a non-2xx status code","FunctionsHttpError",A)}}uGA.FunctionsHttpError=hGA;var gGA;(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"})(gGA||(uGA.FunctionRegion=gGA={}))});var pGA=g((lGA)=>{Object.defineProperty(lGA,"__esModule",{value:!0});lGA.FunctionsClient=void 0;var XrA=tG(),FrA=bGA(),zF=qu();class cGA{constructor(A,{headers:Q={},customFetch:B,region:$=zF.FunctionRegion.Any}={}){this.url=A,this.headers=Q,this.region=$,this.fetch=(0,FrA.resolveFetch)(B)}setAuth(A){this.headers.Authorization=`Bearer ${A}`}invoke(A){return XrA.__awaiter(this,arguments,void 0,function*(Q,B={}){var $;let G,J;try{let{headers:I,method:E,body:D,signal:H,timeout:X}=B,F={},{region:K}=B;if(!K)K=this.region;let q=new URL(`${this.url}/${Q}`);if(K&&K!=="any")F["x-region"]=K,q.searchParams.set("forceFunctionRegion",K);let Z;if(D&&(I&&!Object.prototype.hasOwnProperty.call(I,"Content-Type")||!I))if(typeof Blob<"u"&&D instanceof Blob||D instanceof ArrayBuffer)F["Content-Type"]="application/octet-stream",Z=D;else if(typeof D==="string")F["Content-Type"]="text/plain",Z=D;else if(typeof FormData<"u"&&D instanceof FormData)Z=D;else F["Content-Type"]="application/json",Z=JSON.stringify(D);else if(D&&typeof D!=="string"&&!(typeof Blob<"u"&&D instanceof Blob)&&!(D instanceof ArrayBuffer)&&!(typeof FormData<"u"&&D instanceof FormData))Z=JSON.stringify(D);else Z=D;let M=H;if(X)if(J=new AbortController,G=setTimeout(()=>J.abort(),X),H)M=J.signal,H.addEventListener("abort",()=>J.abort());else M=J.signal;let z=yield this.fetch(q.toString(),{method:E||"POST",headers:Object.assign(Object.assign(Object.assign({},F),this.headers),I),body:Z,signal:M}).catch((S)=>{throw new zF.FunctionsFetchError(S)}),O=z.headers.get("x-relay-error");if(O&&O==="true")throw new zF.FunctionsRelayError(z);if(!z.ok)throw new zF.FunctionsHttpError(z);let j=(($=z.headers.get("Content-Type"))!==null&&$!==void 0?$:"text/plain").split(";")[0].trim(),V;if(j==="application/json")V=yield z.json();else if(j==="application/octet-stream"||j==="application/pdf")V=yield z.blob();else if(j==="text/event-stream")V=z;else if(j==="multipart/form-data")V=yield z.formData();else V=yield z.text();return{data:V,error:null,response:z}}catch(I){return{data:null,error:I,response:I instanceof zF.FunctionsHttpError||I instanceof zF.FunctionsRelayError?I.context:void 0}}finally{if(G)clearTimeout(G)}})}}lGA.FunctionsClient=cGA});var nGA=g((T7)=>{Object.defineProperty(T7,"__esModule",{value:!0});T7.FunctionRegion=T7.FunctionsRelayError=T7.FunctionsHttpError=T7.FunctionsFetchError=T7.FunctionsError=T7.FunctionsClient=void 0;var WrA=pGA();Object.defineProperty(T7,"FunctionsClient",{enumerable:!0,get:function(){return WrA.FunctionsClient}});var DM=qu();Object.defineProperty(T7,"FunctionsError",{enumerable:!0,get:function(){return DM.FunctionsError}});Object.defineProperty(T7,"FunctionsFetchError",{enumerable:!0,get:function(){return DM.FunctionsFetchError}});Object.defineProperty(T7,"FunctionsHttpError",{enumerable:!0,get:function(){return DM.FunctionsHttpError}});Object.defineProperty(T7,"FunctionsRelayError",{enumerable:!0,get:function(){return DM.FunctionsRelayError}});Object.defineProperty(T7,"FunctionRegion",{enumerable:!0,get:function(){return DM.FunctionRegion}})});function rGA(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",G),B()},A);function G(){clearTimeout($),B()}Q===null||Q===void 0||Q.addEventListener("abort",G)})}function ZrA(A,Q,B,$){if(!$||B>=3)return!1;if(!sGA.includes(A))return!1;if(!qrA.includes(Q))return!1;return!0}function UM(A){return UM=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},UM(A)}function NrA(A,Q){if(UM(A)!="object"||!A)return A;var B=A[Symbol.toPrimitive];if(B!==void 0){var $=B.call(A,Q||"default");if(UM($)!="object")return $;throw TypeError("@@toPrimitive must return a primitive value.")}return(Q==="string"?String:Number)(A)}function LrA(A){var Q=NrA(A,"string");return UM(Q)=="symbol"?Q:Q+""}function wrA(A,Q,B){return(Q=LrA(Q))in A?Object.defineProperty(A,Q,{value:B,enumerable:!0,configurable:!0,writable:!0}):A[Q]=B,A}function aGA(A,Q){var B=Object.keys(A);if(Object.getOwnPropertySymbols){var $=Object.getOwnPropertySymbols(A);Q&&($=$.filter(function(G){return Object.getOwnPropertyDescriptor(A,G).enumerable})),B.push.apply(B,$)}return B}function UR(A){for(var Q=1;Q<arguments.length;Q++){var B=arguments[Q]!=null?arguments[Q]:{};Q%2?aGA(Object(B),!0).forEach(function($){wrA(A,$,B[$])}):Object.getOwnPropertyDescriptors?Object.defineProperties(A,Object.getOwnPropertyDescriptors(B)):aGA(Object(B)).forEach(function($){Object.defineProperty(A,$,Object.getOwnPropertyDescriptor(B,$))})}return A}var iGA=(A)=>Math.min(1000*2**A,30000),qrA,sGA,Zu,CrA=class{constructor(A){var Q,B,$,G,J;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=(G=A.urlLengthLimit)!==null&&G!==void 0?G:8000,this.retryEnabled=(J=A.retry)!==null&&J!==void 0?J:!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 I=this.headers.get("Accept");if(I==="application/vnd.pgrst.object+json")this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped");else if(!I||I==="application/json")this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}let $=this.fetch,J=(async()=>{let I=0;while(!0){let H={};if(B.headers.forEach((F,K)=>{H[K]=F}),I>0)H["X-Retry-Count"]=String(I);let X;try{X=await $(B.url.toString(),{method:B.method,headers:H,body:JSON.stringify(B.body,(F,K)=>typeof K==="bigint"?K.toString():K),signal:B.signal})}catch(F){if((F===null||F===void 0?void 0:F.name)==="AbortError"||(F===null||F===void 0?void 0:F.code)==="ABORT_ERR")throw F;if(!sGA.includes(B.method))throw F;if(B.retryEnabled&&I<3){let K=iGA(I);I++,await rGA(K,B.signal);continue}throw F}if(ZrA(B.method,X.status,I,B.retryEnabled)){var E,D;let F=(E=(D=X.headers)===null||D===void 0?void 0:D.get("Retry-After"))!==null&&E!==void 0?E:null,K=F!==null?Math.max(0,parseInt(F,10)||0)*1000:iGA(I);await X.text(),I++,await rGA(K,B.signal);continue}return await B.processResponse(X)}})();if(!this.shouldThrowOnError)J=J.catch((I)=>{var E;let D="",H="",X="",F=I===null||I===void 0?void 0:I.cause;if(F){var K,q,Z,M;let j=(K=F===null||F===void 0?void 0:F.message)!==null&&K!==void 0?K:"",V=(q=F===null||F===void 0?void 0:F.code)!==null&&q!==void 0?q:"";if(D=`${(Z=I===null||I===void 0?void 0:I.name)!==null&&Z!==void 0?Z:"FetchError"}: ${I===null||I===void 0?void 0:I.message}`,D+=`
96
96
 
97
97
  Caused by: ${(M=F===null||F===void 0?void 0:F.name)!==null&&M!==void 0?M:"Error"}: ${j}`,V)D+=` (${V})`;if(F===null||F===void 0?void 0:F.stack)D+=`
package/dist/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capgo/cli",
3
3
  "type": "module",
4
- "version": "8.9.0",
4
+ "version": "8.9.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
@@ -124,7 +124,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
124
124
 
125
125
  `)}),$}});var ex=E((me0,sx)=>{var E4=l("constants"),uw0=process.cwd,yF=null,xw0=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){if(!yF)yF=uw0.call(process);return yF};try{process.cwd()}catch(D){}if(typeof process.chdir==="function"){if(bF=process.chdir,process.chdir=function(D){yF=null,bF.call(process,D)},Object.setPrototypeOf)Object.setPrototypeOf(process.chdir,bF)}var bF;sx.exports=_w0;function _w0(D){if(E4.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./))$(D);if(!D.lutimes)X(D);if(D.chown=F(D.chown),D.fchown=F(D.fchown),D.lchown=F(D.lchown),D.chmod=J(D.chmod),D.fchmod=J(D.fchmod),D.lchmod=J(D.lchmod),D.chownSync=Q(D.chownSync),D.fchownSync=Q(D.fchownSync),D.lchownSync=Q(D.lchownSync),D.chmodSync=Y(D.chmodSync),D.fchmodSync=Y(D.fchmodSync),D.lchmodSync=Y(D.lchmodSync),D.stat=U(D.stat),D.fstat=U(D.fstat),D.lstat=U(D.lstat),D.statSync=Z(D.statSync),D.fstatSync=Z(D.fstatSync),D.lstatSync=Z(D.lstatSync),D.chmod&&!D.lchmod)D.lchmod=function(O,q,K){if(K)process.nextTick(K)},D.lchmodSync=function(){};if(D.chown&&!D.lchown)D.lchown=function(O,q,K,w){if(w)process.nextTick(w)},D.lchownSync=function(){};if(xw0==="win32")D.rename=typeof D.rename!=="function"?D.rename:function(O){function q(K,w,W){var H=Date.now(),B=0;O(K,w,function M(I){if(I&&(I.code==="EACCES"||I.code==="EPERM"||I.code==="EBUSY")&&Date.now()-H<60000){if(setTimeout(function(){D.stat(w,function(z,V){if(z&&z.code==="ENOENT")O(K,w,M);else W(I)})},B),B<100)B+=10;return}if(W)W(I)})}if(Object.setPrototypeOf)Object.setPrototypeOf(q,O);return q}(D.rename);D.read=typeof D.read!=="function"?D.read:function(O){function q(K,w,W,H,B,M){var I;if(M&&typeof M==="function"){var z=0;I=function(V,N,A){if(V&&V.code==="EAGAIN"&&z<10)return z++,O.call(D,K,w,W,H,B,I);M.apply(this,arguments)}}return O.call(D,K,w,W,H,B,I)}if(Object.setPrototypeOf)Object.setPrototypeOf(q,O);return q}(D.read),D.readSync=typeof D.readSync!=="function"?D.readSync:function(O){return function(q,K,w,W,H){var B=0;while(!0)try{return O.call(D,q,K,w,W,H)}catch(M){if(M.code==="EAGAIN"&&B<10){B++;continue}throw M}}}(D.readSync);function $(O){O.lchmod=function(q,K,w){O.open(q,E4.O_WRONLY|E4.O_SYMLINK,K,function(W,H){if(W){if(w)w(W);return}O.fchmod(H,K,function(B){O.close(H,function(M){if(w)w(B||M)})})})},O.lchmodSync=function(q,K){var w=O.openSync(q,E4.O_WRONLY|E4.O_SYMLINK,K),W=!0,H;try{H=O.fchmodSync(w,K),W=!1}finally{if(W)try{O.closeSync(w)}catch(B){}else O.closeSync(w)}return H}}function X(O){if(E4.hasOwnProperty("O_SYMLINK")&&O.futimes)O.lutimes=function(q,K,w,W){O.open(q,E4.O_SYMLINK,function(H,B){if(H){if(W)W(H);return}O.futimes(B,K,w,function(M){O.close(B,function(I){if(W)W(M||I)})})})},O.lutimesSync=function(q,K,w){var W=O.openSync(q,E4.O_SYMLINK),H,B=!0;try{H=O.futimesSync(W,K,w),B=!1}finally{if(B)try{O.closeSync(W)}catch(M){}else O.closeSync(W)}return H};else if(O.futimes)O.lutimes=function(q,K,w,W){if(W)process.nextTick(W)},O.lutimesSync=function(){}}function J(O){if(!O)return O;return function(q,K,w){return O.call(D,q,K,function(W){if(G(W))W=null;if(w)w.apply(this,arguments)})}}function Y(O){if(!O)return O;return function(q,K){try{return O.call(D,q,K)}catch(w){if(!G(w))throw w}}}function F(O){if(!O)return O;return function(q,K,w,W){return O.call(D,q,K,w,function(H){if(G(H))H=null;if(W)W.apply(this,arguments)})}}function Q(O){if(!O)return O;return function(q,K,w){try{return O.call(D,q,K,w)}catch(W){if(!G(W))throw W}}}function U(O){if(!O)return O;return function(q,K,w){if(typeof K==="function")w=K,K=null;function W(H,B){if(B){if(B.uid<0)B.uid+=4294967296;if(B.gid<0)B.gid+=4294967296}if(w)w.apply(this,arguments)}return K?O.call(D,q,K,W):O.call(D,q,W)}}function Z(O){if(!O)return O;return function(q,K){var w=K?O.call(D,q,K):O.call(D,q);if(w){if(w.uid<0)w.uid+=4294967296;if(w.gid<0)w.gid+=4294967296}return w}}function G(O){if(!O)return!0;if(O.code==="ENOSYS")return!0;var q=!process.getuid||process.getuid()!==0;if(q){if(O.code==="EINVAL"||O.code==="EPERM")return!0}return!1}}});var X_=E((ce0,$_)=>{var D_=l("stream").Stream;$_.exports=fw0;function fw0(D){return{ReadStream:$,WriteStream:X};function $(J,Y){if(!(this instanceof $))return new $(J,Y);D_.call(this);var F=this;this.path=J,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,Y=Y||{};var Q=Object.keys(Y);for(var U=0,Z=Q.length;U<Z;U++){var G=Q[U];this[G]=Y[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(){F._read()});return}D.open(this.path,this.flags,this.mode,function(O,q){if(O){F.emit("error",O),F.readable=!1;return}F.fd=q,F.emit("open",q),F._read()})}function X(J,Y){if(!(this instanceof X))return new X(J,Y);D_.call(this),this.path=J,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,Y=Y||{};var F=Object.keys(Y);for(var Q=0,U=F.length;Q<U;Q++){var Z=F[Q];this[Z]=Y[Z]}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=D.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush()}}});var Y_=E((de0,J_)=>{J_.exports=yw0;var kw0=Object.getPrototypeOf||function(D){return D.__proto__};function yw0(D){if(D===null||typeof D!=="object")return D;if(D instanceof Object)var $={__proto__:kw0(D)};else var $=Object.create(null);return Object.getOwnPropertyNames(D).forEach(function(X){Object.defineProperty($,X,Object.getOwnPropertyDescriptor(D,X))}),$}});var m1=E((ne0,Lw)=>{var _1=l("fs"),bw0=ex(),gw0=X_(),hw0=Y_(),gF=l("util"),ZD,mF;if(typeof Symbol==="function"&&typeof Symbol.for==="function")ZD=Symbol.for("graceful-fs.queue"),mF=Symbol.for("graceful-fs.previous");else ZD="___graceful-fs.queue",mF="___graceful-fs.previous";function mw0(){}function Q_(D,$){Object.defineProperty(D,ZD,{get:function(){return $}})}var n8=mw0;if(gF.debuglog)n8=gF.debuglog("gfs4");else if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))n8=function(){var D=gF.format.apply(gF,arguments);D="GFS4: "+D.split(/\n/).join(`
126
126
  GFS4: `),console.error(D)};if(!_1[ZD]){if(zw=global[ZD]||[],Q_(_1,zw),_1.close=function(D){function $(X,J){return D.call(_1,X,function(Y){if(!Y)F_();if(typeof J==="function")J.apply(this,arguments)})}return Object.defineProperty($,mF,{value:D}),$}(_1.close),_1.closeSync=function(D){function $(X){D.apply(_1,arguments),F_()}return Object.defineProperty($,mF,{value:D}),$}(_1.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))process.on("exit",function(){n8(_1[ZD]),l("assert").equal(_1[ZD].length,0)})}var zw;if(!global[ZD])Q_(global,_1[ZD]);Lw.exports=Vw(hw0(_1));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!_1.__patched)Lw.exports=Vw(_1),_1.__patched=!0;function Vw(D){bw0(D),D.gracefulify=Vw,D.createReadStream=N,D.createWriteStream=A;var $=D.readFile;D.readFile=X;function X(j,x,P){if(typeof x==="function")P=x,x=null;return m(j,x,P);function m(b,p,k,R){return $(b,p,function(S){if(S&&(S.code==="EMFILE"||S.code==="ENFILE"))u5([m,[b,p,k],S,R||Date.now(),Date.now()]);else if(typeof k==="function")k.apply(this,arguments)})}}var J=D.writeFile;D.writeFile=Y;function Y(j,x,P,m){if(typeof P==="function")m=P,P=null;return b(j,x,P,m);function b(p,k,R,S,v){return J(p,k,R,function(f){if(f&&(f.code==="EMFILE"||f.code==="ENFILE"))u5([b,[p,k,R,S],f,v||Date.now(),Date.now()]);else if(typeof S==="function")S.apply(this,arguments)})}}var F=D.appendFile;if(F)D.appendFile=Q;function Q(j,x,P,m){if(typeof P==="function")m=P,P=null;return b(j,x,P,m);function b(p,k,R,S,v){return F(p,k,R,function(f){if(f&&(f.code==="EMFILE"||f.code==="ENFILE"))u5([b,[p,k,R,S],f,v||Date.now(),Date.now()]);else if(typeof S==="function")S.apply(this,arguments)})}}var U=D.copyFile;if(U)D.copyFile=Z;function Z(j,x,P,m){if(typeof P==="function")m=P,P=0;return b(j,x,P,m);function b(p,k,R,S,v){return U(p,k,R,function(f){if(f&&(f.code==="EMFILE"||f.code==="ENFILE"))u5([b,[p,k,R,S],f,v||Date.now(),Date.now()]);else if(typeof S==="function")S.apply(this,arguments)})}}var G=D.readdir;D.readdir=q;var O=/^v[0-5]\./;function q(j,x,P){if(typeof x==="function")P=x,x=null;var m=O.test(process.version)?function(k,R,S,v){return G(k,b(k,R,S,v))}:function(k,R,S,v){return G(k,R,b(k,R,S,v))};return m(j,x,P);function b(p,k,R,S){return function(v,f){if(v&&(v.code==="EMFILE"||v.code==="ENFILE"))u5([m,[p,k,R],v,S||Date.now(),Date.now()]);else{if(f&&f.sort)f.sort();if(typeof R==="function")R.call(this,v,f)}}}}if(process.version.substr(0,4)==="v0.8"){var K=gw0(D);M=K.ReadStream,z=K.WriteStream}var w=D.ReadStream;if(w)M.prototype=Object.create(w.prototype),M.prototype.open=I;var W=D.WriteStream;if(W)z.prototype=Object.create(W.prototype),z.prototype.open=V;Object.defineProperty(D,"ReadStream",{get:function(){return M},set:function(j){M=j},enumerable:!0,configurable:!0}),Object.defineProperty(D,"WriteStream",{get:function(){return z},set:function(j){z=j},enumerable:!0,configurable:!0});var H=M;Object.defineProperty(D,"FileReadStream",{get:function(){return H},set:function(j){H=j},enumerable:!0,configurable:!0});var B=z;Object.defineProperty(D,"FileWriteStream",{get:function(){return B},set:function(j){B=j},enumerable:!0,configurable:!0});function M(j,x){if(this instanceof M)return w.apply(this,arguments),this;else return M.apply(Object.create(M.prototype),arguments)}function I(){var j=this;_(j.path,j.flags,j.mode,function(x,P){if(x){if(j.autoClose)j.destroy();j.emit("error",x)}else j.fd=P,j.emit("open",P),j.read()})}function z(j,x){if(this instanceof z)return W.apply(this,arguments),this;else return z.apply(Object.create(z.prototype),arguments)}function V(){var j=this;_(j.path,j.flags,j.mode,function(x,P){if(x)j.destroy(),j.emit("error",x);else j.fd=P,j.emit("open",P)})}function N(j,x){return new D.ReadStream(j,x)}function A(j,x){return new D.WriteStream(j,x)}var u=D.open;D.open=_;function _(j,x,P,m){if(typeof P==="function")m=P,P=null;return b(j,x,P,m);function b(p,k,R,S,v){return u(p,k,R,function(f,h){if(f&&(f.code==="EMFILE"||f.code==="ENFILE"))u5([b,[p,k,R,S],f,v||Date.now(),Date.now()]);else if(typeof S==="function")S.apply(this,arguments)})}}return D}function u5(D){n8("ENQUEUE",D[0].name,D[1]),_1[ZD].push(D),Nw()}var hF;function F_(){var D=Date.now();for(var $=0;$<_1[ZD].length;++$)if(_1[ZD][$].length>2)_1[ZD][$][3]=D,_1[ZD][$][4]=D;Nw()}function Nw(){if(clearTimeout(hF),hF=void 0,_1[ZD].length===0)return;var D=_1[ZD].shift(),$=D[0],X=D[1],J=D[2],Y=D[3],F=D[4];if(Y===void 0)n8("RETRY",$.name,X),$.apply(null,X);else if(Date.now()-Y>=60000){n8("TIMEOUT",$.name,X);var Q=X.pop();if(typeof Q==="function")Q.call(null,J)}else{var U=Date.now()-F,Z=Math.max(F-Y,1),G=Math.min(Z*1.2,100);if(U>=G)n8("RETRY",$.name,X),$.apply(null,X.concat([Y]));else _1[ZD].push(D)}if(hF===void 0)hF=setTimeout(Nw,0)}});var Z_=E((le0,U_)=>{function E$(D,$){if(typeof $==="boolean")$={forever:$};if(this._originalTimeouts=JSON.parse(JSON.stringify(D)),this._timeouts=D,this._options=$||{},this._maxRetryTime=$&&$.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)}U_.exports=E$;E$.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts};E$.prototype.stop=function(){if(this._timeout)clearTimeout(this._timeout);this._timeouts=[],this._cachedTimeouts=null};E$.prototype.retry=function(D){if(this._timeout)clearTimeout(this._timeout);if(!D)return!1;var $=new Date().getTime();if(D&&$-this._operationStart>=this._maxRetryTime)return this._errors.unshift(Error("RetryOperation timeout occurred")),!1;this._errors.push(D);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,Y=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)Y.unref();return!0};E$.prototype.attempt=function(D,$){if(this._fn=D,$){if($.timeout)this._operationTimeout=$.timeout;if($.cb)this._operationTimeoutCb=$.cb}var X=this;if(this._operationTimeoutCb)this._timeout=setTimeout(function(){X._operationTimeoutCb()},X._operationTimeout);this._operationStart=new Date().getTime(),this._fn(this._attempts)};E$.prototype.try=function(D){console.log("Using RetryOperation.try() is deprecated"),this.attempt(D)};E$.prototype.start=function(D){console.log("Using RetryOperation.start() is deprecated"),this.attempt(D)};E$.prototype.start=E$.prototype.try;E$.prototype.errors=function(){return this._errors};E$.prototype.attempts=function(){return this._attempts};E$.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 Y=this._errors[J],F=Y.message,Q=(D[F]||0)+1;if(D[F]=Q,Q>=X)$=Y,X=Q}return $}});var O_=E((dw0)=>{var cw0=Z_();dw0.operation=function(D){var $=dw0.timeouts(D);return new cw0($,{forever:D&&D.forever,unref:D&&D.unref,maxRetryTime:D&&D.maxRetryTime})};dw0.timeouts=function(D){if(D instanceof Array)return[].concat(D);var $={retries:10,factor:2,minTimeout:1000,maxTimeout:1/0,randomize:!1};for(var X in D)$[X]=D[X];if($.minTimeout>$.maxTimeout)throw Error("minTimeout is greater than maxTimeout");var J=[];for(var Y=0;Y<$.retries;Y++)J.push(this.createTimeout(Y,$));if(D&&D.forever&&!J.length)J.push(this.createTimeout(Y,$));return J.sort(function(F,Q){return F-Q}),J};dw0.createTimeout=function(D,$){var X=$.randomize?Math.random()+1:1,J=Math.round(X*$.minTimeout*Math.pow($.factor,D));return J=Math.min(J,$.maxTimeout),J};dw0.wrap=function(D,$,X){if($ instanceof Array)X=$,$=null;if(!X){X=[];for(var J in D)if(typeof D[J]==="function")X.push(J)}for(var Y=0;Y<X.length;Y++){var F=X[Y],Q=D[F];D[F]=function(Z){var G=dw0.operation($),O=Array.prototype.slice.call(arguments,1),q=O.pop();O.push(function(K){if(G.retry(K))return;if(K)arguments[0]=G.mainError();q.apply(this,arguments)}),G.attempt(function(){Z.apply(D,O)})}.bind(D,Q),D[F].options=$}}});var q_=E((pe0,cF)=>{cF.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];if(process.platform!=="win32")cF.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")cF.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var lF=E((re0,_5)=>{var C1=global.process,l8=function(D){return D&&typeof D==="object"&&typeof D.removeListener==="function"&&typeof D.emit==="function"&&typeof D.reallyExit==="function"&&typeof D.listeners==="function"&&typeof D.kill==="function"&&typeof D.pid==="number"&&typeof D.on==="function"};if(!l8(C1))_5.exports=function(){return function(){}};else{if(Bw=l("assert"),i8=q_(),Mw=/^win/i.test(C1.platform),x5=l("events"),typeof x5!=="function")x5=x5.EventEmitter;if(C1.__signal_exit_emitter__)e1=C1.__signal_exit_emitter__;else e1=C1.__signal_exit_emitter__=new x5,e1.count=0,e1.emitted={};if(!e1.infinite)e1.setMaxListeners(1/0),e1.infinite=!0;_5.exports=function(D,$){if(!l8(global.process))return function(){};if(Bw.equal(typeof D,"function","a callback must be provided for exit handler"),p8===!1)dF();var X="exit";if($&&$.alwaysLast)X="afterexit";var J=function(){if(e1.removeListener(X,D),e1.listeners("exit").length===0&&e1.listeners("afterexit").length===0)v2()};return e1.on(X,D),J},v2=function(){if(!p8||!l8(global.process))return;p8=!1,i8.forEach(function($){try{C1.removeListener($,u2[$])}catch(X){}}),C1.emit=x2,C1.reallyExit=nF,e1.count-=1},_5.exports.unload=v2,A4=function($,X,J){if(e1.emitted[$])return;e1.emitted[$]=!0,e1.emit($,X,J)},u2={},i8.forEach(function(D){u2[D]=function(){if(!l8(global.process))return;var X=C1.listeners(D);if(X.length===e1.count){if(v2(),A4("exit",null,D),A4("afterexit",null,D),Mw&&D==="SIGHUP")D="SIGINT";C1.kill(C1.pid,D)}}}),_5.exports.signals=function(){return i8},p8=!1,dF=function(){if(p8||!l8(global.process))return;p8=!0,e1.count+=1,i8=i8.filter(function($){try{return C1.on($,u2[$]),!0}catch(X){return!1}}),C1.emit=jw,C1.reallyExit=Iw},_5.exports.load=dF,nF=C1.reallyExit,Iw=function($){if(!l8(global.process))return;C1.exitCode=$||0,A4("exit",C1.exitCode,null),A4("afterexit",C1.exitCode,null),nF.call(C1,C1.exitCode)},x2=C1.emit,jw=function($,X){if($==="exit"&&l8(global.process)){if(X!==void 0)C1.exitCode=X;var J=x2.apply(this,arguments);return A4("exit",C1.exitCode,null),A4("afterexit",C1.exitCode,null),J}else return x2.apply(this,arguments)}}var Bw,i8,Mw,x5,e1,v2,A4,u2,p8,dF,nF,Iw,x2,jw});var w_=E((tw0,Ew)=>{var K_=Symbol();function pw0(D,$,X){let J=$[K_];if(J)return $.stat(D,(F,Q)=>{if(F)return X(F);X(null,Q.mtime,J)});let Y=new Date(Math.ceil(Date.now()/1000)*1000+5);$.utimes(D,Y,Y,(F)=>{if(F)return X(F);$.stat(D,(Q,U)=>{if(Q)return X(Q);let Z=U.mtime.getTime()%1000===0?"s":"ms";Object.defineProperty($,K_,{value:Z}),X(null,U.mtime,Z)})})}function rw0(D){let $=Date.now();if(D==="s")$=Math.ceil($/1000)*1000;return new Date($)}tw0.probe=pw0;tw0.getMtime=rw0});var N_=E((YW0,f2)=>{var sw0=l("path"),Tw=m1(),ew0=O_(),DW0=lF(),W_=w_(),c6={};function _2(D,$){return $.lockfilePath||`${D}.lock`}function Cw(D,$,X){if(!$.realpath)return X(null,sw0.resolve(D));$.fs.realpath(D,X)}function Rw(D,$,X){let J=_2(D,$);$.fs.mkdir(J,(Y)=>{if(!Y)return W_.probe(J,$.fs,(F,Q,U)=>{if(F)return $.fs.rmdir(J,()=>{}),X(F);X(null,Q,U)});if(Y.code!=="EEXIST")return X(Y);if($.stale<=0)return X(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:D}));$.fs.stat(J,(F,Q)=>{if(F){if(F.code==="ENOENT")return Rw(D,{...$,stale:0},X);return X(F)}if(!H_(Q,$))return X(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:D}));z_(D,$,(U)=>{if(U)return X(U);Rw(D,{...$,stale:0},X)})})})}function H_(D,$){return D.mtime.getTime()<Date.now()-$.stale}function z_(D,$,X){$.fs.rmdir(_2(D,$),(J)=>{if(J&&J.code!=="ENOENT")return X(J);X()})}function iF(D,$){let X=c6[D];if(X.updateTimeout)return;if(X.updateDelay=X.updateDelay||$.update,X.updateTimeout=setTimeout(()=>{X.updateTimeout=null,$.fs.stat(X.lockfilePath,(J,Y)=>{let F=X.lastUpdate+$.stale<Date.now();if(J){if(J.code==="ENOENT"||F)return Aw(D,X,Object.assign(J,{code:"ECOMPROMISED"}));return X.updateDelay=1000,iF(D,$)}if(X.mtime.getTime()!==Y.mtime.getTime())return Aw(D,X,Object.assign(Error("Unable to update lock within the stale threshold"),{code:"ECOMPROMISED"}));let U=W_.getMtime(X.mtimePrecision);$.fs.utimes(X.lockfilePath,U,U,(Z)=>{let G=X.lastUpdate+$.stale<Date.now();if(X.released)return;if(Z){if(Z.code==="ENOENT"||G)return Aw(D,X,Object.assign(Z,{code:"ECOMPROMISED"}));return X.updateDelay=1000,iF(D,$)}X.mtime=U,X.lastUpdate=Date.now(),X.updateDelay=null,iF(D,$)})})},X.updateDelay),X.updateTimeout.unref)X.updateTimeout.unref()}function Aw(D,$,X){if($.released=!0,$.updateTimeout)clearTimeout($.updateTimeout);if(c6[D]===$)delete c6[D];$.options.onCompromised(X)}function $W0(D,$,X){$={stale:1e4,update:null,realpath:!0,retries:0,fs:Tw,onCompromised:(J)=>{throw J},...$},$.retries=$.retries||0,$.retries=typeof $.retries==="number"?{retries:$.retries}:$.retries,$.stale=Math.max($.stale||0,2000),$.update=$.update==null?$.stale/2:$.update||0,$.update=Math.max(Math.min($.update,$.stale/2),1000),Cw(D,$,(J,Y)=>{if(J)return X(J);let F=ew0.operation($.retries);F.attempt(()=>{Rw(Y,$,(Q,U,Z)=>{if(F.retry(Q))return;if(Q)return X(F.mainError());let G=c6[Y]={lockfilePath:_2(Y,$),mtime:U,mtimePrecision:Z,options:$,lastUpdate:Date.now()};iF(Y,$),X(null,(O)=>{if(G.released)return O&&O(Object.assign(Error("Lock is already released"),{code:"ERELEASED"}));V_(Y,{...$,realpath:!1},O)})})})})}function V_(D,$,X){$={fs:Tw,realpath:!0,...$},Cw(D,$,(J,Y)=>{if(J)return X(J);let F=c6[Y];if(!F)return X(Object.assign(Error("Lock is not acquired/owned by you"),{code:"ENOTACQUIRED"}));F.updateTimeout&&clearTimeout(F.updateTimeout),F.released=!0,delete c6[Y],z_(Y,$,X)})}function XW0(D,$,X){$={stale:1e4,realpath:!0,fs:Tw,...$},$.stale=Math.max($.stale||0,2000),Cw(D,$,(J,Y)=>{if(J)return X(J);$.fs.stat(_2(Y,$),(F,Q)=>{if(F)return F.code==="ENOENT"?X(null,!1):X(F);return X(null,!H_(Q,$))})})}function JW0(){return c6}DW0(()=>{for(let D in c6){let $=c6[D].options;try{$.fs.rmdirSync(_2(D,$))}catch(X){}}});YW0.lock=$W0;YW0.unlock=V_;YW0.check=XW0;YW0.getLocks=JW0});var B_=E((te0,L_)=>{var GW0=m1();function OW0(D){let $=["mkdir","realpath","stat","rmdir","utimes"],X={...D};return $.forEach((J)=>{X[J]=(...Y)=>{let F=Y.pop(),Q;try{Q=D[`${J}Sync`](...Y)}catch(U){return F(U)}F(null,Q)}}),X}function qW0(D){return(...$)=>new Promise((X,J)=>{$.push((Y,F)=>{if(Y)J(Y);else X(F)}),D(...$)})}function KW0(D){return(...$)=>{let X,J;if($.push((Y,F)=>{X=Y,J=F}),D(...$),X)throw X;return J}}function wW0(D){if(D={...D},D.fs=OW0(D.fs||GW0),typeof D.retries==="number"&&D.retries>0||D.retries&&typeof D.retries.retries==="number"&&D.retries.retries>0)throw Object.assign(Error("Cannot use retries with the sync api"),{code:"ESYNC"});return D}L_.exports={toPromise:qW0,toSync:KW0,toSyncOptions:wW0}});var I_=E((oe0,R4)=>{var f5=N_(),{toPromise:pF,toSync:rF,toSyncOptions:Pw}=B_();async function M_(D,$){let X=await pF(f5.lock)(D,$);return pF(X)}function WW0(D,$){let X=rF(f5.lock)(D,Pw($));return rF(X)}function HW0(D,$){return pF(f5.unlock)(D,$)}function zW0(D,$){return rF(f5.unlock)(D,Pw($))}function VW0(D,$){return pF(f5.check)(D,$)}function NW0(D,$){return rF(f5.check)(D,Pw($))}R4.exports=M_;R4.exports.lock=M_;R4.exports.unlock=HW0;R4.exports.lockSync=WW0;R4.exports.unlockSync=zW0;R4.exports.check=VW0;R4.exports.checkSync=NW0});var P_=E((T_)=>{Object.defineProperty(T_,"__esModule",{value:!0});T_.canStoreURLs=T_.FileUrlStorage=void 0;var j_=l("fs"),LW0=MW0(ax()),E_=BW0(I_());function R_(D){if(typeof WeakMap!="function")return null;var $=new WeakMap,X=new WeakMap;return(R_=function(J){return J?X:$})(D)}function BW0(D,$){if(!$&&D&&D.__esModule)return D;if(D===null||typeof D!="object"&&typeof D!="function")return{default:D};var X=R_($);if(X&&X.has(D))return X.get(D);var J={__proto__:null},Y=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var F in D)if(F!=="default"&&{}.hasOwnProperty.call(D,F)){var Q=Y?Object.getOwnPropertyDescriptor(D,F):null;Q&&(Q.get||Q.set)?Object.defineProperty(J,F,Q):J[F]=D[F]}return J.default=D,X&&X.set(D,J),J}function MW0(D){return D&&D.__esModule?D:{default:D}}function k2(D){return k2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function($){return typeof $}:function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},k2(D)}function IW0(D,$){if(!(D instanceof $))throw TypeError("Cannot call a class as a function")}function A_(D,$){for(var X=0;X<$.length;X++){var J=$[X];if(J.enumerable=J.enumerable||!1,J.configurable=!0,"value"in J)J.writable=!0;Object.defineProperty(D,EW0(J.key),J)}}function jW0(D,$,X){if($)A_(D.prototype,$);if(X)A_(D,X);return Object.defineProperty(D,"prototype",{writable:!1}),D}function EW0(D){var $=AW0(D,"string");return k2($)=="symbol"?$:$+""}function AW0(D,$){if(k2(D)!="object"||!D)return D;var X=D[Symbol.toPrimitive];if(X!==void 0){var J=X.call(D,$||"default");if(k2(J)!="object")return J;throw TypeError("@@toPrimitive must return a primitive value.")}return($==="string"?String:Number)(D)}var ae0=T_.canStoreURLs=!0,se0=T_.FileUrlStorage=function(){function D($){IW0(this,D),this.path=$}return jW0(D,[{key:"findAllUploads",value:function(){var X=this;return new Promise(function(J,Y){X._getItems("tus::",function(F,Q){if(F)Y(F);else J(Q)})})}},{key:"findUploadsByFingerprint",value:function(X){var J=this;return new Promise(function(Y,F){J._getItems("tus::".concat(X),function(Q,U){if(Q)F(Q);else Y(U)})})}},{key:"removeUpload",value:function(X){var J=this;return new Promise(function(Y,F){J._removeItem(X,function(Q){if(Q)F(Q);else Y()})})}},{key:"addUpload",value:function(X,J){var Y=this,F=Math.round(Math.random()*1000000000000),Q="tus::".concat(X,"::").concat(F);return new Promise(function(U,Z){Y._setItem(Q,J,function(G){if(G)Z(G);else U(Q)})})}},{key:"_setItem",value:function(X,J,Y){var F=this;E_.lock(this.path,this._lockfileOptions()).then(function(Q){Y=F._releaseAndCb(Q,Y),F._getData(function(U,Z){if(U){Y(U);return}Z[X]=J,F._writeData(Z,function(G){return Y(G)})})}).catch(Y)}},{key:"_getItems",value:function(X,J){this._getData(function(Y,F){if(Y){J(Y);return}var Q=Object.keys(F).filter(function(U){return U.startsWith(X)}).map(function(U){var Z=F[U];return Z.urlStorageKey=U,Z});J(null,Q)})}},{key:"_removeItem",value:function(X,J){var Y=this;E_.lock(this.path,this._lockfileOptions()).then(function(F){J=Y._releaseAndCb(F,J),Y._getData(function(Q,U){if(Q){J(Q);return}delete U[X],Y._writeData(U,function(Z){return J(Z)})})}).catch(J)}},{key:"_lockfileOptions",value:function(){return{realpath:!1,retries:{retries:5,minTimeout:20}}}},{key:"_releaseAndCb",value:function(X,J){return function(Y){if(Y){X().then(function(){return J(Y)}).catch(function(F){return J((0,LW0.default)([Y,F]))});return}X().then(J).catch(J)}}},{key:"_writeData",value:function(X,J){var Y={encoding:"utf8",mode:432,flag:"w"};(0,j_.writeFile)(this.path,JSON.stringify(X),Y,function(F){return J(F)})}},{key:"_getData",value:function(X){(0,j_.readFile)(this.path,"utf8",function(J,Y){if(J){if(J.code==="ENOENT")X(null,{});else X(J);return}try{Y=!Y.trim().length?{}:JSON.parse(Y)}catch(F){X(F);return}X(null,Y)})}}])}()});var oF=E((T4)=>{Object.defineProperty(T4,"__esModule",{value:!0});Object.defineProperty(T4,"DefaultHttpStack",{enumerable:!0,get:function(){return x_.default}});Object.defineProperty(T4,"DetailedError",{enumerable:!0,get:function(){return TW0.default}});Object.defineProperty(T4,"FileUrlStorage",{enumerable:!0,get:function(){return __.FileUrlStorage}});Object.defineProperty(T4,"StreamSource",{enumerable:!0,get:function(){return uW0.default}});T4.Upload=void 0;Object.defineProperty(T4,"canStoreURLs",{enumerable:!0,get:function(){return __.canStoreURLs}});T4.defaultOptions=void 0;Object.defineProperty(T4,"enableDebugLog",{enumerable:!0,get:function(){return CW0.enableDebugLog}});T4.isSupported=void 0;var TW0=r8(PK()),CW0=SK(),PW0=r8(Iv()),Sw=r8($u()),SW0=r8(Mu()),vW0=r8(Ru()),x_=r8(cu()),uW0=r8(mK()),__=P_();function r8(D){return D&&D.__esModule?D:{default:D}}function y5(D){return y5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function($){return typeof $}:function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},y5(D)}function xW0(D,$){if(!(D instanceof $))throw TypeError("Cannot call a class as a function")}function S_(D,$){for(var X=0;X<$.length;X++){var J=$[X];if(J.enumerable=J.enumerable||!1,J.configurable=!0,"value"in J)J.writable=!0;Object.defineProperty(D,k_(J.key),J)}}function _W0(D,$,X){if($)S_(D.prototype,$);if(X)S_(D,X);return Object.defineProperty(D,"prototype",{writable:!1}),D}function fW0(D,$,X){return $=tF($),kW0(D,f_()?Reflect.construct($,X||[],tF(D).constructor):$.apply(D,X))}function kW0(D,$){if($&&(y5($)==="object"||typeof $==="function"))return $;else if($!==void 0)throw TypeError("Derived constructors may only return object or undefined");return yW0(D)}function yW0(D){if(D===void 0)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return D}function f_(){try{var D=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch($){}return(f_=function(){return!!D})()}function tF(D){return tF=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(X){return X.__proto__||Object.getPrototypeOf(X)},tF(D)}function bW0(D,$){if(typeof $!=="function"&&$!==null)throw TypeError("Super expression must either be null or a function");if(D.prototype=Object.create($&&$.prototype,{constructor:{value:D,writable:!0,configurable:!0}}),Object.defineProperty(D,"prototype",{writable:!1}),$)vw(D,$)}function vw(D,$){return vw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(J,Y){return J.__proto__=Y,J},vw(D,$)}function v_(D,$){var X=Object.keys(D);if(Object.getOwnPropertySymbols){var J=Object.getOwnPropertySymbols(D);$&&(J=J.filter(function(Y){return Object.getOwnPropertyDescriptor(D,Y).enumerable})),X.push.apply(X,J)}return X}function k5(D){for(var $=1;$<arguments.length;$++){var X=arguments[$]!=null?arguments[$]:{};$%2?v_(Object(X),!0).forEach(function(J){gW0(D,J,X[J])}):Object.getOwnPropertyDescriptors?Object.defineProperties(D,Object.getOwnPropertyDescriptors(X)):v_(Object(X)).forEach(function(J){Object.defineProperty(D,J,Object.getOwnPropertyDescriptor(X,J))})}return D}function gW0(D,$,X){if($=k_($),$ in D)Object.defineProperty(D,$,{value:X,enumerable:!0,configurable:!0,writable:!0});else D[$]=X;return D}function k_(D){var $=hW0(D,"string");return y5($)=="symbol"?$:$+""}function hW0(D,$){if(y5(D)!="object"||!D)return D;var X=D[Symbol.toPrimitive];if(X!==void 0){var J=X.call(D,$||"default");if(y5(J)!="object")return J;throw TypeError("@@toPrimitive must return a primitive value.")}return($==="string"?String:Number)(D)}var u_=T4.defaultOptions=k5(k5({},Sw.default.defaultOptions),{},{httpStack:new x_.default,fileReader:new SW0.default,urlStorage:new PW0.default,fingerprint:vW0.default}),D01=T4.Upload=function(D){function $(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return xW0(this,$),J=k5(k5({},u_),J),fW0(this,$,[X,J])}return bW0($,D),_W0($,null,[{key:"terminate",value:function(J){var Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Y=k5(k5({},u_),Y),Sw.default.terminate(J,Y)}}])}(Sw.default),$01=T4.isSupported=!0});function h_(D,$){let J=["normal","bold","dim","italic","underline","strikethrough"].indexOf(D),Y="\x1B[";return"\x1B["+J+"m"+$+"\x1B[0m"}var q$;var m_=r(()=>{q$=class q${title=null;headers=[];rows=[];static narrowTheme={top:["╔","═","╤","╗"],row:["║"," ","│","║"],div:["╟","─","┼","╢"],bot:["╚","═","╧","╝"]};static wideTheme={top:["╔═","═","═╤═","═╗"],row:["║ "," "," │ "," ║"],div:["╟─","─","─┼─","─╢"],bot:["╚═","═","═╧═","═╝"]};static roundTheme={top:["╭─","─","─┬─","─╮"],row:["│ "," "," │ "," │"],div:["├─","─","─┼─","─┤"],bot:["╰─","─","─┴─","─╯"]};theme=q$.wideTheme;columnWidth(){let D=[this.headers,...this.rows].filter((X)=>X.length>0),$=D[0].map((X)=>this.cast(X).length);for(let X of D.slice(1))for(let J=0;J<$.length;J++){let Y=this.cast(X[J]).length;if(Y>$[J])$[J]=Y}return $}cast(D){if(typeof D==="object")return"obj";if(D!==void 0&&typeof D.toString==="function")return D.toString();else return""}renderTitle(){return"[ "+this.title+" ]"}renderLine(D){let $=this.columnWidth();return D[0]+$.map((X)=>D[1].repeat(X)).join(D[2])+D[3]}renderCell(D,$,X=!1){let J=this.cast(D),Y=X?h_("bold",J):J,F=$-J.length,Q=this.theme.row[1];switch(typeof D){case"number":return Q.repeat(F)+Y;case"string":return Y+Q.repeat(F);case"boolean":case"object":return Q.repeat(Math.ceil(F/2))+h_("italic",J)+Q.repeat(Math.floor(F/2));default:return Q.repeat(F)}}renderRow(D,$=!1){let X=this.theme.row,J=this.columnWidth();return X[0]+D.map((Y,F)=>this.renderCell(Y,J[F],$)).join(X[2])+X[3]}toString(){let D=this.theme,$=this.headers.length>0,X=this.rows.length>0;return[this.title?this.renderTitle():"",$||X?this.renderLine(D.top):"",$?this.renderRow(this.headers,!0):"",$&&X?this.renderLine(D.div):"",...this.rows.map((J)=>this.renderRow(J)),$||X?this.renderLine(D.bot):""].filter((J)=>J.length>0).join(`
127
- `)}}});var b5=r(()=>{m_()});var GD;var d6=r(()=>{GD={name:"@capgo/cli",type:"module",version:"8.9.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: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:prompt-preferences":"bun test/test-prompt-preferences.mjs","test:esm-sdk":"node test/test-sdk-esm.mjs","test:mcp":"node test/test-mcp.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: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:mcp-analytics && bun run test:mcp-instructions && 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:prompt-preferences && bun run test:esm-sdk && bun run test:mcp && 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: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: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-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","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: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-bundle-files":"bun test/test-support-bundle-files.mjs"},dependencies:{"@inkjs/ui":"^2.0.0",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","string-width":"^8.2.1"},optionalDependencies:{"@capgo/cli-helper-darwin-arm64":"^1.1.1","@capgo/cli-helper-darwin-x64":"^1.1.1"},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"}}});async function aF(D){try{let X=`https://registry.npmjs.org/${encodeURIComponent(D.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 cW0(){let D=await aF("@capgo/cli")??"",$=D?.split(".")[0]??"";return{currentVersion:GD.version,latestVersion:D,isOutdated:!!D&&D!==GD.version,majorVersion:$}}async function V1(){let{isOutdated:D,currentVersion:$,latestVersion:X,majorVersion:J}=await cW0();if(D)L.warning(`\uD83D\uDEA8 You are using @capgo/cli@${$} it's not the latest version.
127
+ `)}}});var b5=r(()=>{m_()});var GD;var d6=r(()=>{GD={name:"@capgo/cli",type:"module",version:"8.9.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: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:prompt-preferences":"bun test/test-prompt-preferences.mjs","test:esm-sdk":"node test/test-sdk-esm.mjs","test:mcp":"node test/test-mcp.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: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:mcp-analytics && bun run test:mcp-instructions && 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:prompt-preferences && bun run test:esm-sdk && bun run test:mcp && 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: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: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-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","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: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-bundle-files":"bun test/test-support-bundle-files.mjs"},dependencies:{"@inkjs/ui":"^2.0.0",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","string-width":"^8.2.1"},optionalDependencies:{"@capgo/cli-helper-darwin-arm64":"^1.1.1","@capgo/cli-helper-darwin-x64":"^1.1.1"},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"}}});async function aF(D){try{let X=`https://registry.npmjs.org/${encodeURIComponent(D.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 cW0(){let D=await aF("@capgo/cli")??"",$=D?.split(".")[0]??"";return{currentVersion:GD.version,latestVersion:D,isOutdated:!!D&&D!==GD.version,majorVersion:$}}async function V1(){let{isOutdated:D,currentVersion:$,latestVersion:X,majorVersion:J}=await cW0();if(D)L.warning(`\uD83D\uDEA8 You are using @capgo/cli@${$} 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 xD=r(()=>{g0();d6()});async function c_(D,$,X,J,Y,F="✅"){await I0(X,{channel:D,event:J,icon:F,org_id:$,tracking_version:2,...Y?{tags:{"app-id":Y}}:{},notify:!1})}var d_=r(()=>{g0();b5();xD();_0()});var l_=E((V01,n_)=>{var g5=1000,h5=g5*60,m5=h5*60,t8=m5*24,dW0=t8*7,nW0=t8*365.25;n_.exports=function(D,$){$=$||{};var X=typeof D;if(X==="string"&&D.length>0)return lW0(D);else if(X==="number"&&isFinite(D))return $.long?pW0(D):iW0(D);throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(D))};function lW0(D){if(D=String(D),D.length>100)return;var $=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(D);if(!$)return;var X=parseFloat($[1]),J=($[2]||"ms").toLowerCase();switch(J){case"years":case"year":case"yrs":case"yr":case"y":return X*nW0;case"weeks":case"week":case"w":return X*dW0;case"days":case"day":case"d":return X*t8;case"hours":case"hour":case"hrs":case"hr":case"h":return X*m5;case"minutes":case"minute":case"mins":case"min":case"m":return X*h5;case"seconds":case"second":case"secs":case"sec":case"s":return X*g5;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return X;default:return}}function iW0(D){var $=Math.abs(D);if($>=t8)return Math.round(D/t8)+"d";if($>=m5)return Math.round(D/m5)+"h";if($>=h5)return Math.round(D/h5)+"m";if($>=g5)return Math.round(D/g5)+"s";return D+"ms"}function pW0(D){var $=Math.abs(D);if($>=t8)return sF(D,$,t8,"day");if($>=m5)return sF(D,$,m5,"hour");if($>=h5)return sF(D,$,h5,"minute");if($>=g5)return sF(D,$,g5,"second");return D+" ms"}function sF(D,$,X,J){var Y=$>=X*1.5;return Math.round(D/X)+" "+J+(Y?"s":"")}});var uw=E((N01,i_)=>{function rW0(D){X.debug=X,X.default=X,X.coerce=Z,X.disable=Q,X.enable=Y,X.enabled=U,X.humanize=l_(),X.destroy=G,Object.keys(D).forEach((O)=>{X[O]=D[O]}),X.names=[],X.skips=[],X.formatters={};function $(O){let q=0;for(let K=0;K<O.length;K++)q=(q<<5)-q+O.charCodeAt(K),q|=0;return X.colors[Math.abs(q)%X.colors.length]}X.selectColor=$;function X(O){let q,K=null,w,W;function H(...B){if(!H.enabled)return;let M=H,I=Number(new Date),z=I-(q||I);if(M.diff=z,M.prev=q,M.curr=I,q=I,B[0]=X.coerce(B[0]),typeof B[0]!=="string")B.unshift("%O");let V=0;B[0]=B[0].replace(/%([a-zA-Z%])/g,(A,u)=>{if(A==="%%")return"%";V++;let _=X.formatters[u];if(typeof _==="function"){let j=B[V];A=_.call(M,j),B.splice(V,1),V--}return A}),X.formatArgs.call(M,B),(M.log||X.log).apply(M,B)}if(H.namespace=O,H.useColors=X.useColors(),H.color=X.selectColor(O),H.extend=J,H.destroy=X.destroy,Object.defineProperty(H,"enabled",{enumerable:!0,configurable:!1,get:()=>{if(K!==null)return K;if(w!==X.namespaces)w=X.namespaces,W=X.enabled(O);return W},set:(B)=>{K=B}}),typeof X.init==="function")X.init(H);return H}function J(O,q){let K=X(this.namespace+(typeof q>"u"?":":q)+O);return K.log=this.log,K}function Y(O){X.save(O),X.namespaces=O,X.names=[],X.skips=[];let q=(typeof O==="string"?O:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let K of q)if(K[0]==="-")X.skips.push(K.slice(1));else X.names.push(K)}function F(O,q){let K=0,w=0,W=-1,H=0;while(K<O.length)if(w<q.length&&(q[w]===O[K]||q[w]==="*"))if(q[w]==="*")W=w,H=K,w++;else K++,w++;else if(W!==-1)w=W+1,H++,K=H;else return!1;while(w<q.length&&q[w]==="*")w++;return w===q.length}function Q(){let O=[...X.names,...X.skips.map((q)=>"-"+q)].join(",");return X.enable(""),O}function U(O){for(let q of X.skips)if(F(O,q))return!1;for(let q of X.names)if(F(O,q))return!0;return!1}function Z(O){if(O instanceof Error)return O.stack||O.message;return O}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}i_.exports=rW0});var r_=E((p_,eF)=>{p_.formatArgs=oW0;p_.save=aW0;p_.load=sW0;p_.useColors=tW0;p_.storage=eW0();p_.destroy=(()=>{let D=!1;return()=>{if(!D)D=!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`.")}})();p_.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 tW0(){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 D;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&&(D=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(D[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function oW0(D){if(D[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+D[0]+(this.useColors?"%c ":" ")+"+"+eF.exports.humanize(this.diff),!this.useColors)return;let $="color: "+this.color;D.splice(1,0,$,"color: inherit");let X=0,J=0;D[0].replace(/%[a-zA-Z%]/g,(Y)=>{if(Y==="%%")return;if(X++,Y==="%c")J=X}),D.splice(J,0,$)}p_.log=console.debug||console.log||(()=>{});function aW0(D){try{if(D)p_.storage.setItem("debug",D);else p_.storage.removeItem("debug")}catch($){}}function sW0(){let D;try{D=p_.storage.getItem("debug")||p_.storage.getItem("DEBUG")}catch($){}if(!D&&typeof process<"u"&&"env"in process)D=process.env.DEBUG;return D}function eW0(){try{return localStorage}catch(D){}}eF.exports=uw()(p_);var{formatters:DH0}=eF.exports;DH0.j=function(D){try{return JSON.stringify(D)}catch($){return"[UnexpectedJSONParseError]: "+$.message}}});var o_=E((B01,t_)=>{t_.exports=(D,$=process.argv)=>{let X=D.startsWith("-")?"":D.length===1?"-":"--",J=$.indexOf(X+D),Y=$.indexOf("--");return J!==-1&&(Y===-1||J<Y)}});var e_=E((M01,s_)=>{var ZH0=l("os"),a_=l("tty"),A$=o_(),{env:XD}=process,C4;if(A$("no-color")||A$("no-colors")||A$("color=false")||A$("color=never"))C4=0;else if(A$("color")||A$("colors")||A$("color=true")||A$("color=always"))C4=1;if("FORCE_COLOR"in XD)if(XD.FORCE_COLOR==="true")C4=1;else if(XD.FORCE_COLOR==="false")C4=0;else C4=XD.FORCE_COLOR.length===0?1:Math.min(parseInt(XD.FORCE_COLOR,10),3);function xw(D){if(D===0)return!1;return{level:D,hasBasic:!0,has256:D>=2,has16m:D>=3}}function _w(D,$){if(C4===0)return 0;if(A$("color=16m")||A$("color=full")||A$("color=truecolor"))return 3;if(A$("color=256"))return 2;if(D&&!$&&C4===void 0)return 0;let X=C4||0;if(XD.TERM==="dumb")return X;if(process.platform==="win32"){let J=ZH0.release().split(".");if(Number(J[0])>=10&&Number(J[2])>=10586)return Number(J[2])>=14931?3:2;return 1}if("CI"in XD){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((J)=>(J in XD))||XD.CI_NAME==="codeship")return 1;return X}if("TEAMCITY_VERSION"in XD)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(XD.TEAMCITY_VERSION)?1:0;if(XD.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in XD){let J=parseInt((XD.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(XD.TERM_PROGRAM){case"iTerm.app":return J>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(XD.TERM))return 2;if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(XD.TERM))return 1;if("COLORTERM"in XD)return 1;return X}function GH0(D){let $=_w(D,D&&D.isTTY);return xw($)}s_.exports={supportsColor:GH0,stdout:xw(_w(!0,a_.isatty(1))),stderr:xw(_w(!0,a_.isatty(2)))}});var Jf=E(($f,$Q)=>{var OH0=l("tty"),DQ=l("util");$f.init=VH0;$f.log=WH0;$f.formatArgs=KH0;$f.save=HH0;$f.load=zH0;$f.useColors=qH0;$f.destroy=DQ.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");$f.colors=[6,2,3,4,5,1];try{let D=e_();if(D&&(D.stderr||D).level>=2)$f.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(D){}$f.inspectOpts=Object.keys(process.env).filter((D)=>{return/^debug_/i.test(D)}).reduce((D,$)=>{let X=$.substring(6).toLowerCase().replace(/_([a-z])/g,(Y,F)=>{return F.toUpperCase()}),J=process.env[$];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 D[X]=J,D},{});function qH0(){return"colors"in $f.inspectOpts?Boolean($f.inspectOpts.colors):OH0.isatty(process.stderr.fd)}function KH0(D){let{namespace:$,useColors:X}=this;if(X){let J=this.color,Y="\x1B[3"+(J<8?J:"8;5;"+J),F=` ${Y};1m${$} \x1B[0m`;D[0]=F+D[0].split(`
129
129
  `).join(`
130
130
  `+F),D.push(Y+"m+"+$Q.exports.humanize(this.diff)+"\x1B[0m")}else D[0]=wH0()+$+" "+D[0]}function wH0(){if($f.inspectOpts.hideDate)return"";return new Date().toISOString()+" "}function WH0(...D){return process.stderr.write(DQ.formatWithOptions($f.inspectOpts,...D)+`
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capgo/cli",
3
3
  "type": "module",
4
- "version": "8.9.0",
4
+ "version": "8.9.1",
5
5
  "description": "A CLI to upload to capgo servers",
6
6
  "author": "Martin martin@capgo.app",
7
7
  "license": "Apache 2.0",