@capgo/cli 8.50.1 → 8.50.3

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
@@ -67,7 +67,7 @@ ${X}
67
67
  `}}}}).prompt();var IB=mA(()=>{jJA();jJA();qJA();HJA();Zk=AQ(IJA(),1);wJA=_NQ(),kNQ=P6("◆","*"),$_A=P6("■","x"),J_A=P6("▲","x"),TJA=P6("◇","o"),bNQ=P6("┌","T"),g4=P6("│","|"),S2=P6("└","—"),Pt0=P6("┐","T"),Tt0=P6("┘","—"),PJA=P6("●",">"),Kp=P6("○"," "),_t0=P6("◻","[•]"),St0=P6("◼","[+]"),kt0=P6("◻","[ ]"),xNQ=P6("▪","•"),bt0=P6("─","-"),xt0=P6("╮","+"),ft0=P6("├","+"),vt0=P6("╯","+"),yt0=P6("╰","+"),gt0=P6("╭","+"),fNQ=P6("●","•"),vNQ=P6("◆","*"),yNQ=P6("▲","!"),gNQ=P6("■","x");ht0=[`${E0("dim","↑/↓")} to navigate`,`${E0("dim","Space:")} select`,`${E0("dim","Enter:")} confirm`],v={message:(A=[],{symbol:Q=E0("gray",g4),secondarySymbol:B=E0("gray",g4),output:$=process.stdout,spacing:J=1,withGuide:Y}={})=>{let Z=[],X=Y??nJ.withGuide,G=X?B:"",K=X?`${Q} `:"",W=X?`${B} `:"";for(let U=0;U<J;U++)Z.push(G);let H=Array.isArray(A)?A:A.split(`
68
68
  `);if(H.length>0){let[U,...q]=H;U.length>0?Z.push(`${K}${U}`):Z.push(X?Q:"");for(let D of q)D.length>0?Z.push(`${W}${D}`):Z.push(X?B:"")}$.write(`${Z.join(`
69
69
  `)}
70
- `)},info:(A,Q)=>{v.message(A,{...Q,symbol:E0("blue",fNQ)})},success:(A,Q)=>{v.message(A,{...Q,symbol:E0("green",vNQ)})},step:(A,Q)=>{v.message(A,{...Q,symbol:E0("green",TJA)})},warn:(A,Q)=>{v.message(A,{...Q,symbol:E0("yellow",yNQ)})},warning:(A,Q)=>{v.warn(A,Q)},error:(A,Q)=>{v.message(A,{...Q,symbol:E0("red",gNQ)})}},ut0={light:P6("─","-"),heavy:P6("━","="),block:P6("█","#")},dNQ=[`${E0("dim","↑/↓")} to navigate`,`${E0("dim","Enter:")} confirm`],mt0=`${E0("gray",g4)} `});var $6;var xZ=mA(()=>{$6={name:"@capgo/cli",type:"module",version:"8.50.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:"https://github.com/Cap-go/capgo.app",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:bundle-validation":"bun test test/bundle/","test:prescan":"bun test test/prescan/","test:functional":"bun test/test-functional.mjs","test:semver":"bun test/test-semver-validation.mjs","test:version-edge-cases":"bun test/test-version-validation.mjs","test:regex":"bun test/test-regex-validation.mjs","test:upload":"bun test/test-upload-validation.mjs","test:fail-on-incompatible":"bun test/test-fail-on-incompatible.mjs","test:native-dependencies":"bun test/test-native-dependencies.mjs && bun test/test-get-remote-dependencies.mjs","test:package-json-guard":"bun test/test-package-json-guard.mjs","test:credentials":"bun test/test-credentials.mjs","test:credentials-export":"bun test/test-credentials-export.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:build-cache-payload":"bun test/test-build-cache-payload.mjs","test:build-cancellation":"bun test/test-build-cancellation.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:cli-headers":"bun test/test-cli-headers.mjs","test:min-cli-version":"bun test/test-min-cli-version.mjs","test:authenticated-command-invocation":"bun test/test-authenticated-command-invocation.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:app-add-exists":"bun test/test-app-add-exists.mjs","test:app-list-output-text":"bun test/test-app-list-output-text.mjs","test:doctor-analytics":"bun test/test-doctor-analytics.mjs","test:posthog-exception":"bun test/test-posthog-exception.mjs","test:cli-recovery":"bun test/test-cli-recovery.mjs","test:create-supabase-client":"bun test/test-create-supabase-client.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:channel-add-exists":"bun test/test-channel-add-exists.mjs","test:wait-log":"bun test/test-wait-log.mjs","test:init-guardrails":"bun test/test-init-guardrails.mjs","test:init-replay":"bun test/test-init-replay.mjs","test:init-telemetry":"bun test/test-init-telemetry.mjs","test:capacitor-config-target":"bun test/test-capacitor-config-target.mjs","test:cli-user-error-config":"bun test/test-cli-user-error-config.mjs","test:init-monorepo-targeting":"bun run test:capacitor-config-target && bun run test:cli-user-error-config && bun test/test-init-monorepo-targeting.mjs","test:prompt-preferences":"bun test/test-prompt-preferences.mjs","test:esm-sdk":"node test/test-sdk-esm.mjs","test:auth-session":"bun test/test-auth-session.mjs","test:mcp":"node test/test-mcp.mjs","test:mcp-no-key-handshake":"node test/test-mcp-no-key-handshake.mjs","test:version-detection":"node test/test-get-installed-version.mjs","test:version-detection:setup":"./test/fixtures/setup-test-projects.sh","test:platform-paths":"bun test/test-platform-paths.mjs","test:project-type-detection":"bun test/test-project-type-detection.mjs","test:payload-split":"bun test/test-payload-split.mjs","test:macos-signing":"bun test/test-macos-signing.mjs","test:helper-dce":"bash scripts/check-helper-dce.sh","test:apple-api-import-helpers":"bun test/test-apple-api-import-helpers.mjs","test:apple-api-verify-key":"bun test/test-apple-api-verify-key.mjs","test:bundle-id-detector":"bun test/test-bundle-id-detector.mjs","test:apple-api-app-list":"bun test/test-apple-api-app-list.mjs","test:apple-api-cert-create":"bun test/test-apple-api-cert-create.mjs","test:app-verification":"bun test/test-app-verification.mjs","test:pbxproj-parser":"bun test/test-pbxproj-parser.mjs","test:manifest-path-encoding":"bun test/test-manifest-path-encoding.mjs","test:self-update":"bun test/test-self-update.mjs","test:update-prompt":"bun test/test-update-prompt.mjs","test:android-tail-engine":"bun test/test-android-tail-engine.mjs","test:android-tail-render":"bun test/test-android-tail-render.mjs","test:android-tail-routing":"bun test/test-android-tail-routing.mjs","test:dev-gate-stripped":"bun test/test-dev-gate-stripped.mjs","test:frame-fit-ios-shared":"bun test/test-frame-fit-ios-shared.mjs","test:ios-confirm-app-id":"bun test/test-ios-confirm-app-id.mjs","test:ios-create-new":"bun test/test-ios-create-new.mjs","test:ios-e2e":"bun test/test-ios-e2e.mjs","test:ios-flow-contract":"bun test/test-ios-flow-contract.mjs","test:ios-import-discovery":"bun test/test-ios-import-discovery.mjs","test:ios-import-export":"bun test/test-ios-import-export.mjs","test:ios-import-pickers":"bun test/test-ios-import-pickers.mjs","test:ios-import-recovery":"bun test/test-ios-import-recovery.mjs","test:ios-recovery":"bun test/test-ios-recovery.mjs","test:ios-resume":"bun test/test-ios-resume.mjs","test:ios-tail-handoff":"bun test/test-ios-tail-handoff.mjs","test:ios-tui-render":"bun test/test-ios-tui-render.mjs","test:p8-error":"bun test/test-p8-error.mjs","test:ios-tui-routing":"bun test/test-ios-tui-routing.mjs","test:ios-updater-sync-validation":"bun test/test-ios-updater-sync-validation.mjs","test:ios-verify-app":"bun test/test-ios-verify-app.mjs","test:ios-marketing-version":"bun test/test-ios-marketing-version.mjs","test:android-version":"bun test/test-android-version.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:bundle-validation && bun run test:functional && bun run test:semver && bun run test:auto-bump-version && bun run test:auto-bump-ai-diff && bun run test:version-edge-cases && bun run test:regex && bun run test:upload && bun run test:fail-on-incompatible && bun run test:native-dependencies && bun run test:package-json-guard && bun run test:credentials && bun run test:credentials-export && bun run test:ios-provisioning-map && bun run test:ios-provisioning-command && 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:build-cache-payload && bun run test:build-cancellation && 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:cli-headers && bun run test:min-cli-version && bun run test:authenticated-command-invocation && bun run test:analytics-error-category && bun run test:analytics-org-resolver && bun run test:supabase-perf && bun run test:preview-qr && bun run test:app-set-options && bun run test:mcp-analytics && bun run test:mcp-instructions && bun run test:mcp-live-update-onboarding && bun run test:mcp-stdout-guard && bun run test:mcp-platform-select && bun run test:mcp-explain-scopes && bun run test:mcp-oauth-reopen && bun run test:mcp-broker-oauth && bun run test:mcp-broker-session && bun run test:mcp-credentials-manage && bun run test:mcp-resume-prompt && bun run test:mcp-build-job && bun run test:mcp-build-tools && bun run test:app-created-source && bun run test:app-add-exists && bun run test:app-list-output-text && bun run test:doctor-analytics && bun run test:posthog-exception && bun run test:cli-recovery && bun run test:create-supabase-client && bun run test:build-platform-selection && bun run test:builder-project-discovery && 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-monorepo-targeting && bun run test:init-app-conflict && bun run test:channel-add-exists && bun run test:wait-log && bun run test:init-guardrails && bun run test:init-replay && bun run test:init-telemetry && bun run test:prompt-preferences && bun run test:esm-sdk && bun run test:mcp && bun run test:mcp-no-key-handshake && bun run test:auth-session && bun run test:version-detection && bun run test:platform-paths && bun run test:project-type-detection && bun run test:payload-split && bun run test:manifest-path-encoding && bun run test:macos-signing && bun run test:asc-key-protocol && bun run test:apple-api-import-helpers && bun run test:apple-api-verify-key && bun run test:bundle-id-detector && bun run test:apple-api-app-list && bun run test:app-verification && bun run test:pbxproj-parser && bun run test:ai-log-capture && bun run test:ai-analyze-flow && bun run test:cicd-failure-help && bun run test:ai-sse-parser && bun run test:ai-render-markdown && bun run test:ai-stream-markdown && bun run test:ai-onboarding-mode && bun run test:ai-fit && bun run test:platform-layout && bun run test:frame-fit && bun run test:onboarding-min-size && bun run test:min-size-gate && bun run test:shell-size-gate && bun run test:build-log-sanitize && bun run test:build-output-viewport && bun run test:diff-viewer-viewport && bun run test:build-complete-exit && bun run test:ai-analyze-stream && bun run test:support-mailto && bun run test:support-redact && bun run test:support-internal-log && bun run test:support-help-menu && bun run test:support-contact && bun run test:support-upload-prompt && bun run test:support-bundle-files && bun run test:self-update && bun run test:update-prompt && bun run test:apple-api-cert-create && bun run test:android-tail-engine && bun run test:android-tail-render && bun run test:android-tail-routing && bun run test:dev-gate-stripped && bun run test:frame-fit-ios-shared && bun run test:ios-confirm-app-id && bun run test:ios-create-new && bun run test:ios-e2e && bun run test:ios-flow-contract && bun run test:ios-import-discovery && bun run test:ios-import-export && bun run test:ios-import-pickers && bun run test:ios-import-recovery && bun run test:ios-recovery && bun run test:ios-resume && bun run test:ios-tail-handoff && bun run test:ios-tui-render && bun run test:p8-error && bun run test:ios-tui-routing && bun run test:ios-updater-sync-validation && bun run test:ios-verify-app && bun run test:ios-marketing-version && bun run test:android-version && bun run test:platform-flow-contract && bun run test:tail-engine-shared && bun run test:prescan && bun run test:android-reporting-api && bun run test:android-gcp && bun run test:android-app-verification && bun run test:android-rename && bun run test:appflow-auth && bun run test:appflow-api-map && bun run test:appflow-validate && bun run test:appflow-flow && bun run test:appflow-gapfill && bun run test:appflow-engine && bun run test:appflow-tail && bun run test:appflow-fetch && bun run test:appflow-sa-decode && bun run test:app-permission-helper && bun run test:2fa-compliance-network && bun run test:organization-set-api-host && bun run test:trial-warning && bun run test:plan-validation","test:build-platform-selection":"bun test/test-build-platform-selection.mjs","test:builder-project-discovery":"bun test/test-builder-project-discovery.mjs","test:ai-log-capture":"bun test/test-ai-log-capture.mjs","test:ai-analyze-flow":"bun test/test-ai-analyze-flow.mjs","test:cicd-failure-help":"bun test/test-cicd-failure-help.mjs","test:ai-analyze-stream":"bun test/test-ai-analyze-stream.mjs","test:ai-sse-parser":"bun test/test-ai-sse-parser.mjs","test:ai-render-markdown":"bun test/test-ai-render-markdown.mjs","test:ai-onboarding-mode":"bun test/test-ai-onboarding-mode.mjs","test:ai-fit":"bun test/test-ai-fit.mjs","test:platform-layout":"bun test/test-platform-layout.mjs","test:frame-fit":"bun test/run-frame-fit.mjs","test:onboarding-min-size":"bun test/test-onboarding-min-size.mjs","test:min-size-gate":"bun test/test-min-size-gate.mjs","test:shell-size-gate":"bun test/test-shell-size-gate.mjs","test:build-log-sanitize":"bun test/test-build-log-sanitize.mjs","test:build-output-viewport":"bun test/test-build-output-viewport.mjs","test:diff-viewer-viewport":"bun test/test-diff-viewer-viewport.mjs","test:build-complete-exit":"bun test/test-build-complete-exit.mjs","test:ai-stream-markdown":"bun test/test-ai-stream-markdown.mjs","test:support-mailto":"bun test/test-support-mailto.mjs","test:support-redact":"bun test/test-support-redact.mjs","test:support-internal-log":"bun test/test-support-internal-log.mjs","test:support-help-menu":"bun test/test-support-help-menu.mjs","test:support-contact":"bun test/test-support-contact.mjs","test:support-upload-prompt":"bun test/test-support-upload-prompt.mjs","test:support-bundle-files":"bun test/test-support-bundle-files.mjs","test:mcp-live-update-onboarding":"bun test/test-mcp-live-update-onboarding.mjs","test:app-set-options":"bun test/test-app-set-options.mjs && bun test/test-app-list-options.mjs","test:android-reporting-api":"bun test/test-android-reporting-api.mjs","test:android-gcp":"bun test/test-android-gcp.mjs","test:android-app-verification":"bun test/test-android-app-verification.mjs","test:android-rename":"bun test/test-android-rename.mjs","test:appflow-auth":"bun test/test-appflow-auth.mjs","test:appflow-api-map":"bun test/test-appflow-api-map.mjs","test:appflow-validate":"bun test/test-appflow-validate.mjs","test:appflow-flow":"bun test/test-appflow-flow.mjs","test:appflow-gapfill":"bun test/test-appflow-gapfill.mjs","test:appflow-engine":"bun test/test-appflow-engine.mjs","test:appflow-tail":"bun test/test-appflow-tail.mjs","test:appflow-fetch":"bun test/test-appflow-fetch.mjs","test:appflow-sa-decode":"bun test/test-appflow-sa-decode.mjs","test:app-permission-helper":"bun test/test-app-permission-helper.mjs","test:2fa-compliance-network":"bun test/test-2fa-compliance-network.mjs","test:organization-set-api-host":"bun test/test-organization-set-api-host.mjs","test:trial-warning":"bun test/test-trial-warning.mjs","test:plan-validation":"bun test/test-plan-validation.mjs","test:auto-bump-version":"bun test/test-auto-bump-version.mjs","test:auto-bump-ai-diff":"bun test/test-auto-bump-ai-diff.mjs","test:ios-provisioning-map":"bun test/test-ios-provisioning-map.mjs","test:ios-provisioning-command":"bun test/test-ios-provisioning-command.mjs"},dependencies:{"@inkjs/ui":"^2.0.0","@manypkg/tools":"^2.1.2","@rrweb/types":"^2.1.1","@standard-schema/spec":"^1.1.0","@xmldom/xmldom":"^0.9.10","@xterm/addon-serialize":"^0.14.0","@xterm/headless":"^6.0.0","agent-cli-detector":"^0.1.6","happy-dom":"^20.11.0",ink:"^7.1.1","ink-spinner":"^5.0.0",jsonwebtoken:"^9.0.3","node-forge":"^1.4.0",qrcode:"^1.5.4",react:"^19.2.8","rrweb-snapshot":"^2.1.1","string-width":"^8.2.2",typescript:"6.0.3",zod:"^4.4.3"},optionalDependencies:{"@capgo/cli-helper-darwin-arm64":"^1.1.1","@capgo/cli-helper-darwin-x64":"^1.1.1","node-pty":"^1.1.0"},devDependencies:{"@antfu/eslint-config":"^9.2.0","@bradenmacdonald/s3-lite-client":"npm:@jsr/bradenmacdonald__s3-lite-client@0.9.6","@capacitor/cli":"^8.4.2","@capgo/find-package-manager":"^0.0.18","@clack/prompts":"^1.7.0","@modelcontextprotocol/client":"^2.0.0-beta.5","@modelcontextprotocol/server":"^2.0.0-beta.5","@sauber/table":"npm:@jsr/sauber__table","@std/semver":"npm:@jsr/std__semver@1.0.8","@supabase/supabase-js":"^2.110.8","@tanstack/intent":"^0.3.6","@types/adm-zip":"^0.5.8","@types/jsonwebtoken":"^9.0.10","@types/node":"^26.1.1","@types/node-forge":"^1.3.14","@types/prettyjson":"^0.0.33","@types/qrcode":"^1.5.6","@types/react":"^19.2.17","@types/tmp":"^0.2.6","@types/ws":"^8.18.1","@typescript/native-preview":"7.0.0-dev.20260707.2","@vercel/ncc":"^0.44.1","@xterm/headless":"^6.0.0","adm-zip":"^0.6.0","ci-info":"^4.4.0",commander:"^15.0.0",eslint:"^10.7.0","git-format-staged":"4.0.2",husky:"^9.1.7","is-wsl":"^3.1.1",micromatch:"^4.0.8",open:"^11.0.0",oxlint:"^1.75.0",partysocket:"^1.3.0",prettyjson:"^1.2.5",tmp:"^0.2.7","tus-js-client":"^4.3.1",ws:"^8.21.1"}}});function oNQ(A){if(A&&typeof A==="object"&&"status"in A){let Q=A.status;if(typeof Q==="number")return Q}return}function sNQ(A){let Q=[],B=new Set,$=A;if(typeof A==="string")return A;while($){if(typeof $==="string"){Q.push($);break}if(typeof $!=="object")break;if(B.has($))break;if(B.add($),$ instanceof Error){Q.push($.message),$=$.cause;continue}let J=$;if(typeof J.message==="string")Q.push(J.message);$=J.cause}return Q.join(" ")}function tNQ(A){return sNQ(A)}function gM(A){if(A&&typeof A==="object"&&"code"in A){let $=A.code;if(typeof $==="string"&&$.startsWith("commander."))return"commander"}let Q=oNQ(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=tNQ(A).toLowerCase();if(/econnrefused|econnreset|enotfound|eai_again|fetch failed|failed to fetch|connect timeout|und_err/.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 K_A(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 ARQ}from"node:async_hooks";function Op(A,Q){return F_A.run(A,()=>Promise.resolve(Q()))}function QRQ(){return F_A.getStore()}function Xk(){U_A=!0}function z_A(){return U_A}function D_A(A){q_A=A}function H_A(A){try{q_A?.(A)}catch{}}function O_A(A,Q){let B;try{B=new URL(A).pathname}catch{B=A.split("?")[0]}let $="/functions/v1/",J=B.indexOf($);if(J>=0){let K=B.slice(J+$.length),W=0,H=K.length;while(W<H&&K[W]==="/")W+=1;while(H>W&&K[H-1]==="/")H-=1;let U=K.slice(W,H);return U?`${Q} functions:${U}`:`${Q} functions`}let Y="/rest/v1/",Z=B.indexOf(Y),X=Z>=0?B.slice(Z+Y.length):B.replace(/^\//,"");if(X.startsWith("rpc/"))return`rpc:${X.slice(4).split("/")[0]}`;let G=X.split("/")[0]||B;return`${Q} ${G}`}function BRQ(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 M_A(){return async(Q,B)=>{let $=(B?.method??"GET").toUpperCase(),J=typeof Q==="string"?Q:Q instanceof URL?Q.href:Q.url,Y=QRQ(),Z=BRQ(B),X=Date.now();try{let G=await globalThis.fetch(Q,B);return H_A({url:J,method:$,status:G.status,ok:G.ok,durationMs:Date.now()-X,source:Y,apikey:Z}),G}catch(G){throw H_A({url:J,method:$,status:0,ok:!1,durationMs:Date.now()-X,source:Y,apikey:Z,error:G}),G}}}var F_A,U_A=!1,q_A,I_A=5000;var Gk=mA(()=>{F_A=new ARQ});var TQ;var _8=mA(()=>{TQ=class TQ extends Error{context;constructor(A,Q){super(A);this.name="CliUserError",this.context=Q}}});import{platform as $RQ}from"node:os";import{version as JRQ}from"node:process";function V_A(A){L_A=A}function ZRQ(A){for(let Q=0;Q<A.length;Q++)if(A.charCodeAt(Q)>255)return!1;return!0}function C_A(A){if(A.toLowerCase()==="x-capgo-log-token")return"Build log token is missing. Re-run the build command or pass a valid log token.";return"Capgo API key is missing. Run `npx -y @capgo/cli@latest login` or pass `--apikey`."}function XRQ(A){if(A.toLowerCase()==="x-capgo-log-token")return"Build log token contains invalid characters (only ASCII is allowed). Re-run the build command to get a fresh token.";if(A.toLowerCase()==="authorization")return"Authorization header contains invalid characters (only ASCII is allowed). Check your Capgo API key or Supabase anon key configuration.";return"Capgo API key contains invalid characters (only ASCII is allowed). Copy the key from the Capgo dashboard."}function xJA(A,Q){if(Q===void 0||Q===null){if(bJA.has(A.toLowerCase()))throw new TQ(C_A(A));throw new TQ(`HTTP header "${A}" is missing or invalid.`)}if(typeof Q!=="string"){if(bJA.has(A.toLowerCase()))throw new TQ(C_A(A));throw new TQ(`HTTP header "${A}" is missing or invalid.`)}if(!ZRQ(Q)){if(bJA.has(A.toLowerCase()))throw new TQ(XRQ(A));throw new TQ(`HTTP header "${A}" contains invalid characters (only ASCII is allowed).`)}return Q}function D8(A){let Q={capgo_api:YRQ,"x-cli-version":$6.version,"x-cli-command":L_A,"x-cli-node":JRQ,"x-cli-os":$RQ()};if(A)for(let[B,$]of Object.entries(A))Q[B]=xJA(B,$);return Q}var YRQ="2025-10-01",L_A="",bJA;var p7=mA(()=>{xZ();_8();bJA=new Set(["authorization","capgkey","x-capgo-log-token"])});function fZ(A){let Q=A.length;while(Q>0&&A[Q-1]==="/")Q-=1;return A.slice(0,Q)}import{randomUUID as N_A}from"node:crypto";import{existsSync as GRQ,mkdirSync as KRQ,readFileSync as WRQ,writeFileSync as HRQ}from"node:fs";import{homedir as vJA,platform as FRQ,release as URQ}from"node:os";import{join as R_A}from"node:path";import{arch as zRQ,cwd as E_A,env as hM,version as qRQ}from"node:process";function NW(A){return A==="1"||A?.toLowerCase()==="true"||A?.toLowerCase()==="yes"}function CRQ(){if(NW(hM.CAPGO_DISABLE_TELEMETRY)||NW(hM.CAPGO_DISABLE_POSTHOG))return;return hM.CAPGO_CLI_POSTHOG_API_KEY?.trim()||hM.POSTHOG_API_KEY?.trim()||IRQ}function LRQ(A){let Q=fZ(A);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 VRQ(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 NRQ(A){let Q=A,B=E_A(),$=vJA();if(B)Q=Q.replaceAll(B,"<cwd>");if($)Q=Q.replaceAll($,"~");return Q}function RRQ(A){let Q=A,B=E_A(),$=vJA();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-]+){1,}\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 ERQ(A,Q){let B=A?.split(`
70
+ `)},info:(A,Q)=>{v.message(A,{...Q,symbol:E0("blue",fNQ)})},success:(A,Q)=>{v.message(A,{...Q,symbol:E0("green",vNQ)})},step:(A,Q)=>{v.message(A,{...Q,symbol:E0("green",TJA)})},warn:(A,Q)=>{v.message(A,{...Q,symbol:E0("yellow",yNQ)})},warning:(A,Q)=>{v.warn(A,Q)},error:(A,Q)=>{v.message(A,{...Q,symbol:E0("red",gNQ)})}},ut0={light:P6("─","-"),heavy:P6("━","="),block:P6("█","#")},dNQ=[`${E0("dim","↑/↓")} to navigate`,`${E0("dim","Enter:")} confirm`],mt0=`${E0("gray",g4)} `});var $6;var xZ=mA(()=>{$6={name:"@capgo/cli",type:"module",version:"8.50.3",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:"https://github.com/Cap-go/capgo.app",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:bundle-validation":"bun test test/bundle/","test:prescan":"bun test test/prescan/","test:functional":"bun test/test-functional.mjs","test:semver":"bun test/test-semver-validation.mjs","test:version-edge-cases":"bun test/test-version-validation.mjs","test:regex":"bun test/test-regex-validation.mjs","test:upload":"bun test/test-upload-validation.mjs","test:fail-on-incompatible":"bun test/test-fail-on-incompatible.mjs","test:native-dependencies":"bun test/test-native-dependencies.mjs && bun test/test-get-remote-dependencies.mjs","test:package-json-guard":"bun test/test-package-json-guard.mjs","test:credentials":"bun test/test-credentials.mjs","test:credentials-export":"bun test/test-credentials-export.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:cli-help":"bun test/test-cli-help.mjs","test:build-cache-payload":"bun test/test-build-cache-payload.mjs","test:build-cancellation":"bun test/test-build-cancellation.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:cli-headers":"bun test/test-cli-headers.mjs","test:min-cli-version":"bun test/test-min-cli-version.mjs","test:authenticated-command-invocation":"bun test/test-authenticated-command-invocation.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:app-add-exists":"bun test/test-app-add-exists.mjs","test:app-list-output-text":"bun test/test-app-list-output-text.mjs","test:doctor-analytics":"bun test/test-doctor-analytics.mjs","test:posthog-exception":"bun test/test-posthog-exception.mjs","test:cli-recovery":"bun test/test-cli-recovery.mjs","test:create-supabase-client":"bun test/test-create-supabase-client.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:channel-add-exists":"bun test/test-channel-add-exists.mjs","test:wait-log":"bun test/test-wait-log.mjs","test:init-guardrails":"bun test/test-init-guardrails.mjs","test:init-replay":"bun test/test-init-replay.mjs","test:init-telemetry":"bun test/test-init-telemetry.mjs","test:capacitor-config-target":"bun test/test-capacitor-config-target.mjs","test:cli-user-error-config":"bun test/test-cli-user-error-config.mjs","test:init-monorepo-targeting":"bun run test:capacitor-config-target && bun run test:cli-user-error-config && bun test/test-init-monorepo-targeting.mjs","test:prompt-preferences":"bun test/test-prompt-preferences.mjs","test:esm-sdk":"node test/test-sdk-esm.mjs","test:auth-session":"bun test/test-auth-session.mjs","test:mcp":"node test/test-mcp.mjs","test:mcp-no-key-handshake":"node test/test-mcp-no-key-handshake.mjs","test:version-detection":"node test/test-get-installed-version.mjs","test:version-detection:setup":"./test/fixtures/setup-test-projects.sh","test:platform-paths":"bun test/test-platform-paths.mjs","test:project-type-detection":"bun test/test-project-type-detection.mjs","test:payload-split":"bun test/test-payload-split.mjs","test:macos-signing":"bun test/test-macos-signing.mjs","test:helper-dce":"bash scripts/check-helper-dce.sh","test:apple-api-import-helpers":"bun test/test-apple-api-import-helpers.mjs","test:apple-api-verify-key":"bun test/test-apple-api-verify-key.mjs","test:bundle-id-detector":"bun test/test-bundle-id-detector.mjs","test:apple-api-app-list":"bun test/test-apple-api-app-list.mjs","test:apple-api-cert-create":"bun test/test-apple-api-cert-create.mjs","test:app-verification":"bun test/test-app-verification.mjs","test:pbxproj-parser":"bun test/test-pbxproj-parser.mjs","test:manifest-path-encoding":"bun test/test-manifest-path-encoding.mjs","test:self-update":"bun test/test-self-update.mjs","test:update-prompt":"bun test/test-update-prompt.mjs","test:android-tail-engine":"bun test/test-android-tail-engine.mjs","test:android-tail-render":"bun test/test-android-tail-render.mjs","test:android-tail-routing":"bun test/test-android-tail-routing.mjs","test:dev-gate-stripped":"bun test/test-dev-gate-stripped.mjs","test:frame-fit-ios-shared":"bun test/test-frame-fit-ios-shared.mjs","test:ios-confirm-app-id":"bun test/test-ios-confirm-app-id.mjs","test:ios-create-new":"bun test/test-ios-create-new.mjs","test:ios-e2e":"bun test/test-ios-e2e.mjs","test:ios-flow-contract":"bun test/test-ios-flow-contract.mjs","test:ios-import-discovery":"bun test/test-ios-import-discovery.mjs","test:ios-import-export":"bun test/test-ios-import-export.mjs","test:ios-import-pickers":"bun test/test-ios-import-pickers.mjs","test:ios-import-recovery":"bun test/test-ios-import-recovery.mjs","test:ios-recovery":"bun test/test-ios-recovery.mjs","test:ios-resume":"bun test/test-ios-resume.mjs","test:ios-tail-handoff":"bun test/test-ios-tail-handoff.mjs","test:ios-tui-render":"bun test/test-ios-tui-render.mjs","test:p8-error":"bun test/test-p8-error.mjs","test:ios-tui-routing":"bun test/test-ios-tui-routing.mjs","test:ios-updater-sync-validation":"bun test/test-ios-updater-sync-validation.mjs","test:ios-verify-app":"bun test/test-ios-verify-app.mjs","test:ios-marketing-version":"bun test/test-ios-marketing-version.mjs","test:android-version":"bun test/test-android-version.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:bundle-validation && bun run test:functional && bun run test:semver && bun run test:auto-bump-version && bun run test:auto-bump-ai-diff && bun run test:version-edge-cases && bun run test:regex && bun run test:upload && bun run test:fail-on-incompatible && bun run test:native-dependencies && bun run test:package-json-guard && bun run test:credentials && bun run test:credentials-export && bun run test:ios-provisioning-map && bun run test:ios-provisioning-command && 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:cli-help && bun run test:build-cache-payload && bun run test:build-cancellation && 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:cli-headers && bun run test:min-cli-version && bun run test:authenticated-command-invocation && bun run test:analytics-error-category && bun run test:analytics-org-resolver && bun run test:supabase-perf && bun run test:preview-qr && bun run test:app-set-options && bun run test:mcp-analytics && bun run test:mcp-instructions && bun run test:mcp-live-update-onboarding && bun run test:mcp-stdout-guard && bun run test:mcp-platform-select && bun run test:mcp-explain-scopes && bun run test:mcp-oauth-reopen && bun run test:mcp-broker-oauth && bun run test:mcp-broker-session && bun run test:mcp-credentials-manage && bun run test:mcp-resume-prompt && bun run test:mcp-build-job && bun run test:mcp-build-tools && bun run test:app-created-source && bun run test:app-add-exists && bun run test:app-list-output-text && bun run test:doctor-analytics && bun run test:posthog-exception && bun run test:cli-recovery && bun run test:create-supabase-client && bun run test:build-platform-selection && bun run test:builder-project-discovery && 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-monorepo-targeting && bun run test:init-app-conflict && bun run test:channel-add-exists && bun run test:wait-log && bun run test:init-guardrails && bun run test:init-replay && bun run test:init-telemetry && bun run test:prompt-preferences && bun run test:esm-sdk && bun run test:mcp && bun run test:mcp-no-key-handshake && bun run test:auth-session && bun run test:version-detection && bun run test:platform-paths && bun run test:project-type-detection && bun run test:payload-split && bun run test:manifest-path-encoding && bun run test:macos-signing && bun run test:asc-key-protocol && bun run test:apple-api-import-helpers && bun run test:apple-api-verify-key && bun run test:bundle-id-detector && bun run test:apple-api-app-list && bun run test:app-verification && bun run test:pbxproj-parser && bun run test:ai-log-capture && bun run test:ai-analyze-flow && bun run test:cicd-failure-help && bun run test:ai-sse-parser && bun run test:ai-render-markdown && bun run test:ai-stream-markdown && bun run test:ai-onboarding-mode && bun run test:ai-fit && bun run test:platform-layout && bun run test:frame-fit && bun run test:onboarding-min-size && bun run test:min-size-gate && bun run test:shell-size-gate && bun run test:build-log-sanitize && bun run test:build-output-viewport && bun run test:diff-viewer-viewport && bun run test:build-complete-exit && bun run test:ai-analyze-stream && bun run test:support-mailto && bun run test:support-redact && bun run test:support-internal-log && bun run test:support-help-menu && bun run test:support-contact && bun run test:support-upload-prompt && bun run test:support-bundle-files && bun run test:self-update && bun run test:update-prompt && bun run test:apple-api-cert-create && bun run test:android-tail-engine && bun run test:android-tail-render && bun run test:android-tail-routing && bun run test:dev-gate-stripped && bun run test:frame-fit-ios-shared && bun run test:ios-confirm-app-id && bun run test:ios-create-new && bun run test:ios-e2e && bun run test:ios-flow-contract && bun run test:ios-import-discovery && bun run test:ios-import-export && bun run test:ios-import-pickers && bun run test:ios-import-recovery && bun run test:ios-recovery && bun run test:ios-resume && bun run test:ios-tail-handoff && bun run test:ios-tui-render && bun run test:p8-error && bun run test:ios-tui-routing && bun run test:ios-updater-sync-validation && bun run test:ios-verify-app && bun run test:ios-marketing-version && bun run test:android-version && bun run test:platform-flow-contract && bun run test:tail-engine-shared && bun run test:prescan && bun run test:android-reporting-api && bun run test:android-gcp && bun run test:android-app-verification && bun run test:android-rename && bun run test:appflow-auth && bun run test:appflow-api-map && bun run test:appflow-validate && bun run test:appflow-flow && bun run test:appflow-gapfill && bun run test:appflow-engine && bun run test:appflow-tail && bun run test:appflow-fetch && bun run test:appflow-sa-decode && bun run test:app-permission-helper && bun run test:2fa-compliance-network && bun run test:organization-set-api-host && bun run test:trial-warning && bun run test:plan-validation","test:build-platform-selection":"bun test/test-build-platform-selection.mjs","test:builder-project-discovery":"bun test/test-builder-project-discovery.mjs","test:ai-log-capture":"bun test/test-ai-log-capture.mjs","test:ai-analyze-flow":"bun test/test-ai-analyze-flow.mjs","test:cicd-failure-help":"bun test/test-cicd-failure-help.mjs","test:ai-analyze-stream":"bun test/test-ai-analyze-stream.mjs","test:ai-sse-parser":"bun test/test-ai-sse-parser.mjs","test:ai-render-markdown":"bun test/test-ai-render-markdown.mjs","test:ai-onboarding-mode":"bun test/test-ai-onboarding-mode.mjs","test:ai-fit":"bun test/test-ai-fit.mjs","test:platform-layout":"bun test/test-platform-layout.mjs","test:frame-fit":"bun test/run-frame-fit.mjs","test:onboarding-min-size":"bun test/test-onboarding-min-size.mjs","test:min-size-gate":"bun test/test-min-size-gate.mjs","test:shell-size-gate":"bun test/test-shell-size-gate.mjs","test:build-log-sanitize":"bun test/test-build-log-sanitize.mjs","test:build-output-viewport":"bun test/test-build-output-viewport.mjs","test:diff-viewer-viewport":"bun test/test-diff-viewer-viewport.mjs","test:build-complete-exit":"bun test/test-build-complete-exit.mjs","test:ai-stream-markdown":"bun test/test-ai-stream-markdown.mjs","test:support-mailto":"bun test/test-support-mailto.mjs","test:support-redact":"bun test/test-support-redact.mjs","test:support-internal-log":"bun test/test-support-internal-log.mjs","test:support-help-menu":"bun test/test-support-help-menu.mjs","test:support-contact":"bun test/test-support-contact.mjs","test:support-upload-prompt":"bun test/test-support-upload-prompt.mjs","test:support-bundle-files":"bun test/test-support-bundle-files.mjs","test:mcp-live-update-onboarding":"bun test/test-mcp-live-update-onboarding.mjs","test:app-set-options":"bun test/test-app-set-options.mjs && bun test/test-app-list-options.mjs","test:android-reporting-api":"bun test/test-android-reporting-api.mjs","test:android-gcp":"bun test/test-android-gcp.mjs","test:android-app-verification":"bun test/test-android-app-verification.mjs","test:android-rename":"bun test/test-android-rename.mjs","test:appflow-auth":"bun test/test-appflow-auth.mjs","test:appflow-api-map":"bun test/test-appflow-api-map.mjs","test:appflow-validate":"bun test/test-appflow-validate.mjs","test:appflow-flow":"bun test/test-appflow-flow.mjs","test:appflow-gapfill":"bun test/test-appflow-gapfill.mjs","test:appflow-engine":"bun test/test-appflow-engine.mjs","test:appflow-tail":"bun test/test-appflow-tail.mjs","test:appflow-fetch":"bun test/test-appflow-fetch.mjs","test:appflow-sa-decode":"bun test/test-appflow-sa-decode.mjs","test:app-permission-helper":"bun test/test-app-permission-helper.mjs","test:2fa-compliance-network":"bun test/test-2fa-compliance-network.mjs","test:organization-set-api-host":"bun test/test-organization-set-api-host.mjs","test:trial-warning":"bun test/test-trial-warning.mjs","test:plan-validation":"bun test/test-plan-validation.mjs","test:auto-bump-version":"bun test/test-auto-bump-version.mjs","test:auto-bump-ai-diff":"bun test/test-auto-bump-ai-diff.mjs","test:ios-provisioning-map":"bun test/test-ios-provisioning-map.mjs","test:ios-provisioning-command":"bun test/test-ios-provisioning-command.mjs"},dependencies:{"@inkjs/ui":"^2.0.0","@manypkg/tools":"^2.1.2","@rrweb/types":"^2.1.1","@standard-schema/spec":"^1.1.0","@xmldom/xmldom":"^0.9.10","@xterm/addon-serialize":"^0.14.0","@xterm/headless":"^6.0.0","agent-cli-detector":"^0.1.6","happy-dom":"^20.11.0",ink:"^7.1.1","ink-spinner":"^5.0.0",jsonwebtoken:"^9.0.3","node-forge":"^1.4.0",qrcode:"^1.5.4",react:"^19.2.8","rrweb-snapshot":"^2.1.1","string-width":"^8.2.2",typescript:"6.0.3",zod:"^4.4.3"},optionalDependencies:{"@capgo/cli-helper-darwin-arm64":"^1.1.1","@capgo/cli-helper-darwin-x64":"^1.1.1","node-pty":"^1.1.0"},devDependencies:{"@antfu/eslint-config":"^9.2.0","@bradenmacdonald/s3-lite-client":"npm:@jsr/bradenmacdonald__s3-lite-client@0.9.6","@capacitor/cli":"^8.4.2","@capgo/find-package-manager":"^0.0.18","@clack/prompts":"^1.7.0","@modelcontextprotocol/client":"^2.0.0-beta.5","@modelcontextprotocol/server":"^2.0.0-beta.5","@sauber/table":"npm:@jsr/sauber__table","@std/semver":"npm:@jsr/std__semver@1.0.8","@supabase/supabase-js":"^2.110.8","@tanstack/intent":"^0.3.6","@types/adm-zip":"^0.5.8","@types/jsonwebtoken":"^9.0.10","@types/node":"^26.1.1","@types/node-forge":"^1.3.14","@types/prettyjson":"^0.0.33","@types/qrcode":"^1.5.6","@types/react":"^19.2.17","@types/tmp":"^0.2.6","@types/ws":"^8.18.1","@typescript/native-preview":"7.0.0-dev.20260707.2","@vercel/ncc":"^0.44.1","@xterm/headless":"^6.0.0","adm-zip":"^0.6.0","ci-info":"^4.4.0",commander:"^15.0.0",eslint:"^10.7.0","git-format-staged":"4.0.2",husky:"^9.1.7","is-wsl":"^3.1.1",micromatch:"^4.0.8",open:"^11.0.0",oxlint:"^1.75.0",partysocket:"^1.3.0",prettyjson:"^1.2.5",tmp:"^0.2.7","tus-js-client":"^4.3.1",ws:"^8.21.1"}}});function oNQ(A){if(A&&typeof A==="object"&&"status"in A){let Q=A.status;if(typeof Q==="number")return Q}return}function sNQ(A){let Q=[],B=new Set,$=A;if(typeof A==="string")return A;while($){if(typeof $==="string"){Q.push($);break}if(typeof $!=="object")break;if(B.has($))break;if(B.add($),$ instanceof Error){Q.push($.message),$=$.cause;continue}let J=$;if(typeof J.message==="string")Q.push(J.message);$=J.cause}return Q.join(" ")}function tNQ(A){return sNQ(A)}function gM(A){if(A&&typeof A==="object"&&"code"in A){let $=A.code;if(typeof $==="string"&&$.startsWith("commander."))return"commander"}let Q=oNQ(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=tNQ(A).toLowerCase();if(/econnrefused|econnreset|enotfound|eai_again|fetch failed|failed to fetch|connect timeout|und_err/.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 K_A(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 ARQ}from"node:async_hooks";function Op(A,Q){return F_A.run(A,()=>Promise.resolve(Q()))}function QRQ(){return F_A.getStore()}function Xk(){U_A=!0}function z_A(){return U_A}function D_A(A){q_A=A}function H_A(A){try{q_A?.(A)}catch{}}function O_A(A,Q){let B;try{B=new URL(A).pathname}catch{B=A.split("?")[0]}let $="/functions/v1/",J=B.indexOf($);if(J>=0){let K=B.slice(J+$.length),W=0,H=K.length;while(W<H&&K[W]==="/")W+=1;while(H>W&&K[H-1]==="/")H-=1;let U=K.slice(W,H);return U?`${Q} functions:${U}`:`${Q} functions`}let Y="/rest/v1/",Z=B.indexOf(Y),X=Z>=0?B.slice(Z+Y.length):B.replace(/^\//,"");if(X.startsWith("rpc/"))return`rpc:${X.slice(4).split("/")[0]}`;let G=X.split("/")[0]||B;return`${Q} ${G}`}function BRQ(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 M_A(){return async(Q,B)=>{let $=(B?.method??"GET").toUpperCase(),J=typeof Q==="string"?Q:Q instanceof URL?Q.href:Q.url,Y=QRQ(),Z=BRQ(B),X=Date.now();try{let G=await globalThis.fetch(Q,B);return H_A({url:J,method:$,status:G.status,ok:G.ok,durationMs:Date.now()-X,source:Y,apikey:Z}),G}catch(G){throw H_A({url:J,method:$,status:0,ok:!1,durationMs:Date.now()-X,source:Y,apikey:Z,error:G}),G}}}var F_A,U_A=!1,q_A,I_A=5000;var Gk=mA(()=>{F_A=new ARQ});var TQ;var _8=mA(()=>{TQ=class TQ extends Error{context;constructor(A,Q){super(A);this.name="CliUserError",this.context=Q}}});import{platform as $RQ}from"node:os";import{version as JRQ}from"node:process";function V_A(A){L_A=A}function ZRQ(A){for(let Q=0;Q<A.length;Q++)if(A.charCodeAt(Q)>255)return!1;return!0}function C_A(A){if(A.toLowerCase()==="x-capgo-log-token")return"Build log token is missing. Re-run the build command or pass a valid log token.";return"Capgo API key is missing. Run `npx -y @capgo/cli@latest login` or pass `--apikey`."}function XRQ(A){if(A.toLowerCase()==="x-capgo-log-token")return"Build log token contains invalid characters (only ASCII is allowed). Re-run the build command to get a fresh token.";if(A.toLowerCase()==="authorization")return"Authorization header contains invalid characters (only ASCII is allowed). Check your Capgo API key or Supabase anon key configuration.";return"Capgo API key contains invalid characters (only ASCII is allowed). Copy the key from the Capgo dashboard."}function xJA(A,Q){if(Q===void 0||Q===null){if(bJA.has(A.toLowerCase()))throw new TQ(C_A(A));throw new TQ(`HTTP header "${A}" is missing or invalid.`)}if(typeof Q!=="string"){if(bJA.has(A.toLowerCase()))throw new TQ(C_A(A));throw new TQ(`HTTP header "${A}" is missing or invalid.`)}if(!ZRQ(Q)){if(bJA.has(A.toLowerCase()))throw new TQ(XRQ(A));throw new TQ(`HTTP header "${A}" contains invalid characters (only ASCII is allowed).`)}return Q}function D8(A){let Q={capgo_api:YRQ,"x-cli-version":$6.version,"x-cli-command":L_A,"x-cli-node":JRQ,"x-cli-os":$RQ()};if(A)for(let[B,$]of Object.entries(A))Q[B]=xJA(B,$);return Q}var YRQ="2025-10-01",L_A="",bJA;var p7=mA(()=>{xZ();_8();bJA=new Set(["authorization","capgkey","x-capgo-log-token"])});function fZ(A){let Q=A.length;while(Q>0&&A[Q-1]==="/")Q-=1;return A.slice(0,Q)}import{randomUUID as N_A}from"node:crypto";import{existsSync as GRQ,mkdirSync as KRQ,readFileSync as WRQ,writeFileSync as HRQ}from"node:fs";import{homedir as vJA,platform as FRQ,release as URQ}from"node:os";import{join as R_A}from"node:path";import{arch as zRQ,cwd as E_A,env as hM,version as qRQ}from"node:process";function NW(A){return A==="1"||A?.toLowerCase()==="true"||A?.toLowerCase()==="yes"}function CRQ(){if(NW(hM.CAPGO_DISABLE_TELEMETRY)||NW(hM.CAPGO_DISABLE_POSTHOG))return;return hM.CAPGO_CLI_POSTHOG_API_KEY?.trim()||hM.POSTHOG_API_KEY?.trim()||IRQ}function LRQ(A){let Q=fZ(A);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 VRQ(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 NRQ(A){let Q=A,B=E_A(),$=vJA();if(B)Q=Q.replaceAll(B,"<cwd>");if($)Q=Q.replaceAll($,"~");return Q}function RRQ(A){let Q=A,B=E_A(),$=vJA();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-]+){1,}\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 ERQ(A,Q){let B=A?.split(`
71
71
  `).slice(1).map(($)=>{let J=$.trim(),Y=J.startsWith("at ")?J.slice(3):J,Z=Q,X=Y,G=Y.lastIndexOf(" (");if(G!==-1&&Y.endsWith(")"))Z=Y.slice(0,G).trim()||Q,X=Y.slice(G+2,-1);else{let H=Y.lastIndexOf(" "),U=H===-1?"":Y.slice(H+1);if(/:\d+:\d+$/.test(U))Z=Y.slice(0,H).trim()||Q,X=U}let K=X.lastIndexOf(":"),W=K===-1?-1:X.lastIndexOf(":",K-1);if(K===-1||W===-1)return{function:Q,platform:"custom",lang:"javascript"};return{function:Z,filename:NRQ(X.slice(0,W)),lineno:Number.parseInt(X.slice(W+1,K),10),colno:Number.parseInt(X.slice(K+1),10),platform:"custom",lang:"javascript"}}).filter(Boolean);return B&&B.length>0?B:[{function:Q,platform:"custom",lang:"javascript"}]}function jRQ(A){if(!A||typeof A!=="object"||!("code"in A))return;let{code:Q}=A;return typeof Q==="string"?Q:void 0}function PRQ(A){if(!A||typeof A!=="object")return;let Q=A;if(typeof Q.status==="number")return Q.status;if(typeof Q.statusCode==="number")return Q.statusCode;let B=Q.context&&typeof Q.context==="object"?Q.context.status:void 0;return typeof B==="number"?B:void 0}function TRQ(A){let Q=(A instanceof Error?A.message:typeof A==="string"?A:"").toLowerCase();if(wRQ.some((B)=>Q.includes(B)))return!0;return PRQ(A)===401}function Kk(A){if(A instanceof TQ){if(MRQ.has(A.message))return!0;return!1}if(TRQ(A))return!1;return!jRQ(A)?.startsWith("commander.")}function Mp(A){let Q=[],B=A;while(B?.parent){let $=B.name();if($)Q.push($);B=B.parent}return Q.reverse().join(" ")||"unknown"}function _RQ(A=R_A(vJA(),".capgo-credentials")){if(fJA)return fJA;let Q=R_A(A,"install-id"),B;try{let $=GRQ(Q)?WRQ(Q,"utf8").trim():"";if($)B=$;else B=N_A(),KRQ(A,{recursive:!0}),HRQ(Q,B,{encoding:"utf8",mode:384})}catch{B=N_A()}return fJA=B,B}async function Wk(A){let Q=CRQ();if(!Q)return!1;let B=hM.CAPGO_CLI_POSTHOG_API_HOST?.trim()||hM.POSTHOG_API_HOST?.trim()||DRQ,$;try{$=LRQ(B)}catch{return!1}let J=VRQ(A.error),Y=RRQ(J.message),Z=_RQ(),X=ERQ(J.stack,A.functionName),G=[A.functionName,A.kind,J.name||"Error",String(A.status??1)].join(":"),K={token:Q,event:"$exception",properties:{distinct_id:Z,$exception_list:[{type:J.name||"Error",value:Y,mechanism:{handled:!0,synthetic:!1},stacktrace:{type:"raw",frames:X}}],$exception_fingerprint:G,architecture:zRQ,cli_version:$6.version,error_kind:A.kind,function_name:A.functionName,is_ci:Boolean(hM.CI),node_version:qRQ,os_platform:FRQ(),os_release:URQ(),runtime:"cli",status:A.status},timestamp:new Date().toISOString()};try{let W=new AbortController,H=setTimeout(()=>W.abort(),ORQ);try{return(await fetch($,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(K),signal:W.signal})).ok}finally{clearTimeout(H)}}catch{return!1}}var DRQ="https://eu.i.posthog.com/i/v0/e/",IRQ="phc_NXDyDajQaTQVwb25DEhIVZfxVUn4R0Y348Z7vWYHZUi",ORQ=1500,yJA="iOS sync validation failed. Delete your iOS folder, then rerun the add and sync commands above and retry.",MRQ,wRQ,fJA;var IR=mA(()=>{xZ();_8();MRQ=new Set([yJA]);wRQ=["invalid_apikey","invalid apikey","no_key_provided","no key provided","invalid api key or insufficient permissions","does not exist, run first"]});import{existsSync as vZ}from"fs";var AH=(A=".",Q="unknown")=>{let B=`${A}/bun.lockb`,$=`${A}/bun.lock`,J=`${A}/pnpm-lock.yaml`,Y=`${A}/shrinkwrap.yaml`,Z=`${A}/yarn.lock`,X=`${A}/package-lock.json`,G=`${A}/npm-shrinkwrap.json`;if(vZ(B)||vZ($))return"bun";if(vZ(J)||vZ(Y))return"pnpm";if(vZ(Z))return"yarn";if(vZ(X)||vZ(G))return"npm";return Q},fq=(A=AH(),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"}},Cp=(A=".",Q="npx")=>{let B=`${A}/bun.lockb`,$=`${A}/bun.lock`,J=`${A}/pnpm-lock.yaml`,Y=`${A}/shrinkwrap.yaml`,Z=`${A}/yarn.lock`,X=`${A}/package-lock.json`,G=`${A}/npm-shrinkwrap.json`;if(vZ(B)||vZ($))return"bunx";if(vZ(J)||vZ(Y))return"pnpm exec";if(vZ(Z))return"yarn dlx";if(vZ(X)||vZ(G))return"npx";return Q};var Hk=()=>{};function Lp(A,Q){if(isNaN(A)||isNaN(Q))throw Error("Cannot compare against non-numbers");return A===Q?0:A<Q?-1:1}function P_A(A=[],Q=[]){if(A.length&&!Q.length)return-1;if(!A.length&&Q.length)return 1;return 0}function Vp(A=[],Q=[]){let B=Math.max(A.length,Q.length);for(let $=0;$<B;$++){let J=A[$],Y=Q[$];if(J===void 0&&Y===void 0)return 0;if(Y===void 0)return 1;if(J===void 0)return-1;if(typeof J==="string"&&typeof Y==="number")return 1;if(typeof J==="number"&&typeof Y==="string")return-1;if(J<Y)return-1;if(J>Y)return 1}return 0}function hJA(A){return typeof A==="number"&&!Number.isNaN(A)&&(!Number.isFinite(A)||0<=A&&A<=Number.MAX_SAFE_INTEGER)}function yZ(A){return A.split(".").filter(Boolean).map((Q)=>{if(xRQ.test(Q)){let B=Number(Q);if(hJA(B))return B}return Q})}function QH(A){return A.split(".").filter(Boolean)}function Rp(A,Q){let B=Number(A);if(!hJA(B))throw TypeError(Q);return B}function b2(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 OR="0|[1-9]\\d*",SRQ="\\d*[a-zA-Z-][a-zA-Z0-9-]*",kRQ,j_A,T_A,w_A="[0-9A-Za-z-]+",__A,S_A,k_A,b_A="(?:<|>)?=?",bRQ="x|X|\\*",gJA,Np,x_A,f_A,uJA=256,xRQ;var yX=mA(()=>{kRQ=`(?<major>${OR})\\.(?<minor>${OR})\\.(?<patch>${OR})`,j_A=`(?:${OR}|${SRQ})`,T_A=`(?:-(?<prerelease>${j_A}(?:\\.${j_A})*))`,__A=`(?:\\+(?<buildmetadata>${w_A}(?:\\.${w_A})*))`,S_A=`v?${kRQ}${T_A}?${__A}?`,k_A=new RegExp(`^${S_A}$`),gJA=`${OR}|${bRQ}`,Np=`[v=\\s]*(?<major>${gJA})(?:\\.(?<minor>${gJA})(?:\\.(?<patch>${gJA})${T_A}?${__A}?)?)?`,x_A=new RegExp(`^(?<operator>~>?|\\^|${b_A})\\s*${Np}$`),f_A=new RegExp(`^(?<operator>${b_A})\\s*(${S_A})$|^$`);xRQ=new RegExp(`^${OR}$`)});function TY(A,Q){if(A===Q)return 0;return Lp(A.major,Q.major)||Lp(A.minor,Q.minor)||Lp(A.patch,Q.patch)||P_A(A.prerelease,Q.prerelease)||Vp(A.prerelease,Q.prerelease)}var uG=mA(()=>{yX()});function v_A(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(Vp(A.prerelease,Q.prerelease)!==0)return"prerelease"}var y_A=mA(()=>{yX()});function mJA(A){return A.toFixed(0)}function X7(A){let Q=mJA(A.major),B=mJA(A.minor),$=mJA(A.patch),J=A.prerelease?.join(".")??"",Y=A.build?.join(".")??"";return[[`${Q}.${B}.${$}`,J].filter((G)=>G).join("-"),Y].filter((G)=>G).join("+")}function fRQ(A,Q){if(b2(Q))return!0;let B=TY(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 Ep(A,Q){for(let B of Q)if(!fRQ(A,B))return!1;if(!A.prerelease?.length)return!0;for(let B of Q){if(b2(B))continue;if(!B.prerelease?.length)continue;let{major:$,minor:J,patch:Y}=B;if(A.major===$&&A.minor===J&&A.patch===Y)return!0}return!1}var jp=mA(()=>{yX();uG()});function Fk(A,Q){return Q.some((B)=>Ep(A,B))}var Uk=mA(()=>{jp()});function vRQ(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 zk(A=[],Q){let B=vRQ(A);if(!Q)return B;let $=yZ(Q);if($.every((J)=>typeof J==="string")){if($.every((J,Y)=>J===B[Y])&&typeof B[$.length]==="number")return B;$=[...$,0]}return $}function vq(A,Q,B={}){let $=B.build!==void 0?QH(B.build):A.build??[];switch(Q){case"premajor":return{major:A.major+1,minor:0,patch:0,prerelease:zk(A.prerelease,B.prerelease),build:$};case"preminor":return{major:A.major,minor:A.minor+1,patch:0,prerelease:zk(A.prerelease,B.prerelease),build:$};case"prepatch":return{major:A.major,minor:A.minor,patch:A.patch+1,prerelease:zk(A.prerelease,B.prerelease),build:$};case"prerelease":{let Y=(A.prerelease??[]).length===0?A.patch+1:A.patch;return{major:A.major,minor:A.minor,patch:Y,prerelease:zk(A.prerelease,B.prerelease),build:$}}case"major":return{major:(A.prerelease??[]).length===0||A.minor!==0||A.patch!==0?A.major+1:A.major,minor:0,patch:0,prerelease:[],build:$};case"minor":{let Y=(A.prerelease??[]).length===0||A.patch!==0?A.minor+1:A.minor;return{major:A.major,minor:Y,patch:0,prerelease:[],build:$}}case"patch":{let Y=(A.prerelease??[]).length===0?A.patch+1:A.patch;return{major:A.major,minor:A.minor,patch:Y,prerelease:[],build:$}}case"pre":return{major:A.major,minor:A.minor,patch:A.patch,prerelease:zk(A.prerelease,B.prerelease),build:$};default:throw TypeError(`Cannot increment version: invalid argument ${Q}`)}}var g_A=mA(()=>{yX()});var wp,MR;var qk=mA(()=>{wp={major:Number.NaN,minor:Number.NaN,patch:Number.NaN,prerelease:[],build:[]},MR={operator:void 0,...wp}});var cJA=mA(()=>{qk();yX()});function dJA(A,Q){return TY(A,Q)>0}var lJA=mA(()=>{uG()});var h_A=mA(()=>{Uk();lJA()});function i7(A,Q){return TY(A,Q)<0}var pJA=mA(()=>{uG()});var u_A=mA(()=>{Uk();pJA()});function yRQ(A){let B=A.match(f_A)?.groups;if(!B)return null;let{operator:$}=B;return{operator:$||void 0,...wp}}function a6(A){return!A||A.toLowerCase()==="x"||A==="*"}function gRQ(A){if(a6(A.major))return;if(a6(A.minor))return{operator:">=",major:+A.major,minor:0,patch:0,prerelease:[],build:[]};if(a6(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?yZ(A.prerelease):[],build:[]}}function hRQ(A){if(a6(A.major))return;if(a6(A.minor))return{operator:"<",major:+A.major+1,minor:0,patch:0,prerelease:[],build:[]};if(a6(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:yZ(A.prerelease),build:[]};return{operator:"<=",major:+A.major,minor:+A.minor,patch:+A.patch,prerelease:[],build:[]}}function uRQ(A){let Q=A.match(new RegExp(`^${Np}`)),B=Q?.groups;if(!B)return null;let $=Q[0].length,J=A.slice($).match(/^\s+-\s+/);if(!J)return null;let Y=J[0].length,X=A.slice($+Y).match(new RegExp(`^${Np}\\s*$`))?.groups,G=gRQ(B),K=hRQ(X);return[G,K].filter(Boolean)}function mRQ(A){let Q=a6(A.major),B=a6(A.minor),$=a6(A.patch),J=+A.major,Y=+A.minor,Z=+A.patch;if(Q)return[MR];if(B)return[{operator:">=",major:J,minor:0,patch:0},{operator:"<",major:J+1,minor:0,patch:0}];if($){if(J===0)return[{operator:">=",major:J,minor:Y,patch:0},{operator:"<",major:J,minor:Y+1,patch:0}];return[{operator:">=",major:J,minor:Y,patch:0},{operator:"<",major:J+1,minor:0,patch:0}]}let X=yZ(A.prerelease??"");if(J===0){if(Y===0)return[{operator:">=",major:J,minor:Y,patch:Z,prerelease:X},{operator:"<",major:J,minor:Y,patch:Z+1}];return[{operator:">=",major:J,minor:Y,patch:Z,prerelease:X},{operator:"<",major:J,minor:Y+1,patch:0}]}return[{operator:">=",major:J,minor:Y,patch:Z,prerelease:X},{operator:"<",major:J+1,minor:0,patch:0}]}function cRQ(A){let Q=a6(A.major),B=a6(A.minor),$=a6(A.patch),J=+A.major,Y=+A.minor,Z=+A.patch;if(Q)return[MR];if(B)return[{operator:">=",major:J,minor:0,patch:0},{operator:"<",major:J+1,minor:0,patch:0}];if($)return[{operator:">=",major:J,minor:Y,patch:0},{operator:"<",major:J,minor:Y+1,patch:0}];let X=yZ(A.prerelease??"");return[{operator:">=",major:J,minor:Y,patch:Z,prerelease:X},{operator:"<",major:J,minor:Y+1,patch:0}]}function dRQ(A){let Q=a6(A.major),B=a6(A.minor),$=a6(A.patch),J=+A.major,Y=+A.minor,Z=+A.patch;if(Q)return[{operator:"<",major:0,minor:0,patch:0}];if(B){if($)return[{operator:"<",major:J,minor:0,patch:0}];return[{operator:"<",major:J,minor:0,patch:0}]}if($)return[{operator:"<",major:J,minor:Y,patch:0}];let X=yZ(A.prerelease??""),G=QH(A.build??"");return[{operator:"<",major:J,minor:Y,patch:Z,prerelease:X,build:G}]}function lRQ(A){let Q=a6(A.minor),B=a6(A.patch),$=+A.major,J=+A.minor,Y=+A.patch;if(Q)return[{operator:"<",major:$+1,minor:0,patch:0}];if(B)return[{operator:"<",major:$,minor:J+1,patch:0}];let Z=yZ(A.prerelease??""),X=QH(A.build??"");return[{operator:"<=",major:$,minor:J,patch:Y,prerelease:Z,build:X}]}function pRQ(A){let Q=a6(A.major),B=a6(A.minor),$=a6(A.patch),J=+A.major,Y=+A.minor,Z=+A.patch;if(Q)return[{operator:"<",major:0,minor:0,patch:0}];if(B)return[{operator:">=",major:J+1,minor:0,patch:0}];if($)return[{operator:">=",major:J,minor:Y+1,patch:0}];let X=yZ(A.prerelease??""),G=QH(A.build??"");return[{operator:">",major:J,minor:Y,patch:Z,prerelease:X,build:G}]}function iRQ(A){let Q=a6(A.major),B=a6(A.minor),$=a6(A.patch),J=+A.major,Y=+A.minor,Z=+A.patch;if(Q)return[MR];if(B)return[{operator:">=",major:J,minor:0,patch:0}];if($)return[{operator:">=",major:J,minor:Y,patch:0}];let X=yZ(A.prerelease??""),G=QH(A.build??"");return[{operator:">=",major:J,minor:Y,patch:Z,prerelease:X,build:G}]}function nRQ(A){let Q=a6(A.major),B=a6(A.minor),$=a6(A.patch),J=+A.major,Y=+A.minor,Z=+A.patch;if(Q)return[MR];if(B)return[{operator:">=",major:J,minor:0,patch:0},{operator:"<",major:J+1,minor:0,patch:0}];if($)return[{operator:">=",major:J,minor:Y,patch:0},{operator:"<",major:J,minor:Y+1,patch:0}];let X=yZ(A.prerelease??""),G=QH(A.build??"");return[{operator:A.operator==="="?"=":void 0,major:J,minor:Y,patch:Z,prerelease:X,build:G}]}function aRQ(A){let Q=A.match(x_A)?.groups;if(!Q)return yRQ(A);switch(Q.operator){case"^":return mRQ(Q);case"~":case"~>":return cRQ(Q);case"<":return dRQ(Q);case"<=":return lRQ(Q);case">":return pRQ(Q);case">=":return iRQ(Q);default:return nRQ(Q)}}function rRQ(A){return A.split(/\s+/).flatMap(aRQ)}function Pp(A){let Q=A.replaceAll(/(?<=[<>=~^])(\s+)/g,"").split(/\s*\|\|\s*/).map((B)=>uRQ(B)||rRQ(B));if(Q.some((B)=>B.includes(null)))throw TypeError(`Cannot parse version range: range "${A}" is invalid`);return Q}var iJA=mA(()=>{yX();qk()});function B1(A){if(typeof A!=="string")throw TypeError(`Cannot parse version as version must be a string: received ${typeof A}`);if(A.length>uJA)throw TypeError(`Cannot parse version as version length is too long: length is ${A.length}, max length is ${uJA}`);A=A.trim();let Q=A.match(k_A)?.groups;if(!Q)throw TypeError(`Cannot parse version: ${A}`);let B=Rp(Q.major,`Cannot parse version ${A}: invalid major version`),$=Rp(Q.minor,`Cannot parse version ${A}: invalid minor version`),J=Rp(Q.patch,`Cannot parse version ${A}: invalid patch version`),Y=Q.prerelease?yZ(Q.prerelease):[],Z=Q.buildmetadata?QH(Q.buildmetadata):[];return{major:B,minor:$,patch:J,prerelease:Y,build:Z}}var Tp=mA(()=>{yX();yX()});function m_A(A,Q){let B=A.operator,$=Q.operator;if(B===void 0){if(b2(A))return!0;return Fk(A,[[Q]])}if($===void 0){if(b2(Q))return!0;return Fk(Q,[[A]])}let J=TY(A,Q);return(B===">="||B===">")&&($===">="||$===">")||(B==="<="||B==="<")&&($==="<="||$==="<")||J===0&&((B===">="||B==="<=")&&($===">="||$==="<="))||J===-1&&(B===">="||B===">")&&($==="<="||$==="<")||J===1&&(B==="<="||B==="<")&&($===">="||$===">")}function oRQ(A){return A.every((Q)=>{return Q.some((B)=>sRQ(B))})}function sRQ(A){for(let Q=0;Q<A.length-1;Q++){let B=A[Q];for(let $ of A.slice(Q+1))if(!m_A(B,$))return!1}return!0}function c_A(A,Q){return oRQ([A,Q])&&A.some((B)=>{return Q.some(($)=>{return B.every((J)=>{return $.every((Y)=>m_A(J,Y))})})})}var d_A=mA(()=>{yX();uG();Uk()});var l_A=mA(()=>{iJA()});var p_A=mA(()=>{qk();qk();cJA()});function yq(A){try{return B1(A),!0}catch{return!1}}var i_A=mA(()=>{Tp()});var n_A=mA(()=>{Tp()});var a_A=mA(()=>{yX()});var r_A=mA(()=>{uG()});var o_A=mA(()=>{uG()});var s_A=mA(()=>{jp();yX();uG()});function nJA(A,Q){return TY(A,Q)>=0}var t_A=mA(()=>{uG()});var e_A=mA(()=>{jp();yX();uG()});var ASA=mA(()=>{uG()});var mG=mA(()=>{uG();y_A();Uk();g_A();cJA();h_A();u_A();iJA();Tp();d_A();l_A();p_A();i_A();n_A();a_A();r_A();o_A();lJA();s_A();t_A();pJA();e_A();ASA()});var gZ=$A((wQB,kp)=>{var QSA,BSA,$SA,JSA,YSA,ZSA,XSA,GSA,KSA,WSA,HSA,FSA,USA,_p,aJA,zSA,qSA,DSA,CR,ISA,OSA,MSA,CSA,LSA,VSA,NSA,RSA,ESA,Sp,jSA,wSA,PSA;(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 kp==="object"&&typeof wQB==="object")A(B(Q,B(wQB)));else A(B(Q));function B($,J){if($!==Q)if(typeof Object.create==="function")Object.defineProperty($,"__esModule",{value:!0});else $.__esModule=!0;return function(Y,Z){return $[Y]=J?J(Y,Z):Z}}})(function(A){var Q=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Y,Z){Y.__proto__=Z}||function(Y,Z){for(var X in Z)if(Object.prototype.hasOwnProperty.call(Z,X))Y[X]=Z[X]};QSA=function(Y,Z){if(typeof Z!=="function"&&Z!==null)throw TypeError("Class extends value "+String(Z)+" is not a constructor or null");Q(Y,Z);function X(){this.constructor=Y}Y.prototype=Z===null?Object.create(Z):(X.prototype=Z.prototype,new X)},BSA=Object.assign||function(Y){for(var Z,X=1,G=arguments.length;X<G;X++){Z=arguments[X];for(var K in Z)if(Object.prototype.hasOwnProperty.call(Z,K))Y[K]=Z[K]}return Y},$SA=function(Y,Z){var X={};for(var G in Y)if(Object.prototype.hasOwnProperty.call(Y,G)&&Z.indexOf(G)<0)X[G]=Y[G];if(Y!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var K=0,G=Object.getOwnPropertySymbols(Y);K<G.length;K++)if(Z.indexOf(G[K])<0&&Object.prototype.propertyIsEnumerable.call(Y,G[K]))X[G[K]]=Y[G[K]]}return X},JSA=function(Y,Z,X,G){var K=arguments.length,W=K<3?Z:G===null?G=Object.getOwnPropertyDescriptor(Z,X):G,H;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")W=Reflect.decorate(Y,Z,X,G);else for(var U=Y.length-1;U>=0;U--)if(H=Y[U])W=(K<3?H(W):K>3?H(Z,X,W):H(Z,X))||W;return K>3&&W&&Object.defineProperty(Z,X,W),W},YSA=function(Y,Z){return function(X,G){Z(X,G,Y)}},ZSA=function(Y,Z,X,G,K,W){function H(E){if(E!==void 0&&typeof E!=="function")throw TypeError("Function expected");return E}var U=G.kind,q=U==="getter"?"get":U==="setter"?"set":"value",D=!Z&&Y?G.static?Y:Y.prototype:null,I=Z||(D?Object.getOwnPropertyDescriptor(D,G.name):{}),O,V=!1;for(var N=X.length-1;N>=0;N--){var C={};for(var L in G)C[L]=L==="access"?{}:G[L];for(var L in G.access)C.access[L]=G.access[L];C.addInitializer=function(E){if(V)throw TypeError("Cannot add initializers after decoration has completed");W.push(H(E||null))};var R=(0,X[N])(U==="accessor"?{get:I.get,set:I.set}:I[q],C);if(U==="accessor"){if(R===void 0)continue;if(R===null||typeof R!=="object")throw TypeError("Object expected");if(O=H(R.get))I.get=O;if(O=H(R.set))I.set=O;if(O=H(R.init))K.unshift(O)}else if(O=H(R))if(U==="field")K.unshift(O);else I[q]=O}if(D)Object.defineProperty(D,G.name,I);V=!0},XSA=function(Y,Z,X){var G=arguments.length>2;for(var K=0;K<Z.length;K++)X=G?Z[K].call(Y,X):Z[K].call(Y);return G?X:void 0},GSA=function(Y){return typeof Y==="symbol"?Y:"".concat(Y)},KSA=function(Y,Z,X){if(typeof Z==="symbol")Z=Z.description?"[".concat(Z.description,"]"):"";return Object.defineProperty(Y,"name",{configurable:!0,value:X?"".concat(X," ",Z):Z})},WSA=function(Y,Z){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(Y,Z)},HSA=function(Y,Z,X,G){function K(W){return W instanceof X?W:new X(function(H){H(W)})}return new(X||(X=Promise))(function(W,H){function U(I){try{D(G.next(I))}catch(O){H(O)}}function q(I){try{D(G.throw(I))}catch(O){H(O)}}function D(I){I.done?W(I.value):K(I.value).then(U,q)}D((G=G.apply(Y,Z||[])).next())})},FSA=function(Y,Z){var X={label:0,sent:function(){if(W[0]&1)throw W[1];return W[1]},trys:[],ops:[]},G,K,W,H=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return H.next=U(0),H.throw=U(1),H.return=U(2),typeof Symbol==="function"&&(H[Symbol.iterator]=function(){return this}),H;function U(D){return function(I){return q([D,I])}}function q(D){if(G)throw TypeError("Generator is already executing.");while(H&&(H=0,D[0]&&(X=0)),X)try{if(G=1,K&&(W=D[0]&2?K.return:D[0]?K.throw||((W=K.return)&&W.call(K),0):K.next)&&!(W=W.call(K,D[1])).done)return W;if(K=0,W)D=[D[0]&2,W.value];switch(D[0]){case 0:case 1:W=D;break;case 4:return X.label++,{value:D[1],done:!1};case 5:X.label++,K=D[1],D=[0];continue;case 7:D=X.ops.pop(),X.trys.pop();continue;default:if((W=X.trys,!(W=W.length>0&&W[W.length-1]))&&(D[0]===6||D[0]===2)){X=0;continue}if(D[0]===3&&(!W||D[1]>W[0]&&D[1]<W[3])){X.label=D[1];break}if(D[0]===6&&X.label<W[1]){X.label=W[1],W=D;break}if(W&&X.label<W[2]){X.label=W[2],X.ops.push(D);break}if(W[2])X.ops.pop();X.trys.pop();continue}D=Z.call(Y,X)}catch(I){D=[6,I],K=0}finally{G=W=0}if(D[0]&5)throw D[1];return{value:D[0]?D[1]:void 0,done:!0}}},USA=function(Y,Z){for(var X in Y)if(X!=="default"&&!Object.prototype.hasOwnProperty.call(Z,X))Sp(Z,Y,X)},Sp=Object.create?function(Y,Z,X,G){if(G===void 0)G=X;var K=Object.getOwnPropertyDescriptor(Z,X);if(!K||("get"in K?!Z.__esModule:K.writable||K.configurable))K={enumerable:!0,get:function(){return Z[X]}};Object.defineProperty(Y,G,K)}:function(Y,Z,X,G){if(G===void 0)G=X;Y[G]=Z[X]},_p=function(Y){var Z=typeof Symbol==="function"&&Symbol.iterator,X=Z&&Y[Z],G=0;if(X)return X.call(Y);if(Y&&typeof Y.length==="number")return{next:function(){if(Y&&G>=Y.length)Y=void 0;return{value:Y&&Y[G++],done:!Y}}};throw TypeError(Z?"Object is not iterable.":"Symbol.iterator is not defined.")},aJA=function(Y,Z){var X=typeof Symbol==="function"&&Y[Symbol.iterator];if(!X)return Y;var G=X.call(Y),K,W=[],H;try{while((Z===void 0||Z-- >0)&&!(K=G.next()).done)W.push(K.value)}catch(U){H={error:U}}finally{try{if(K&&!K.done&&(X=G.return))X.call(G)}finally{if(H)throw H.error}}return W},zSA=function(){for(var Y=[],Z=0;Z<arguments.length;Z++)Y=Y.concat(aJA(arguments[Z]));return Y},qSA=function(){for(var Y=0,Z=0,X=arguments.length;Z<X;Z++)Y+=arguments[Z].length;for(var G=Array(Y),K=0,Z=0;Z<X;Z++)for(var W=arguments[Z],H=0,U=W.length;H<U;H++,K++)G[K]=W[H];return G},DSA=function(Y,Z,X){if(X||arguments.length===2){for(var G=0,K=Z.length,W;G<K;G++)if(W||!(G in Z)){if(!W)W=Array.prototype.slice.call(Z,0,G);W[G]=Z[G]}}return Y.concat(W||Array.prototype.slice.call(Z))},CR=function(Y){return this instanceof CR?(this.v=Y,this):new CR(Y)},ISA=function(Y,Z,X){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var G=X.apply(Y,Z||[]),K,W=[];return K=Object.create((typeof AsyncIterator==="function"?AsyncIterator:Object).prototype),U("next"),U("throw"),U("return",H),K[Symbol.asyncIterator]=function(){return this},K;function H(N){return function(C){return Promise.resolve(C).then(N,O)}}function U(N,C){if(G[N]){if(K[N]=function(L){return new Promise(function(R,E){W.push([N,L,R,E])>1||q(N,L)})},C)K[N]=C(K[N])}}function q(N,C){try{D(G[N](C))}catch(L){V(W[0][3],L)}}function D(N){N.value instanceof CR?Promise.resolve(N.value.v).then(I,O):V(W[0][2],N)}function I(N){q("next",N)}function O(N){q("throw",N)}function V(N,C){if(N(C),W.shift(),W.length)q(W[0][0],W[0][1])}},OSA=function(Y){var Z,X;return Z={},G("next"),G("throw",function(K){throw K}),G("return"),Z[Symbol.iterator]=function(){return this},Z;function G(K,W){Z[K]=Y[K]?function(H){return(X=!X)?{value:CR(Y[K](H)),done:!1}:W?W(H):H}:W}},MSA=function(Y){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var Z=Y[Symbol.asyncIterator],X;return Z?Z.call(Y):(Y=typeof _p==="function"?_p(Y):Y[Symbol.iterator](),X={},G("next"),G("throw"),G("return"),X[Symbol.asyncIterator]=function(){return this},X);function G(W){X[W]=Y[W]&&function(H){return new Promise(function(U,q){H=Y[W](H),K(U,q,H.done,H.value)})}}function K(W,H,U,q){Promise.resolve(q).then(function(D){W({value:D,done:U})},H)}},CSA=function(Y,Z){if(Object.defineProperty)Object.defineProperty(Y,"raw",{value:Z});else Y.raw=Z;return Y};var B=Object.create?function(Y,Z){Object.defineProperty(Y,"default",{enumerable:!0,value:Z})}:function(Y,Z){Y.default=Z},$=function(Y){return $=Object.getOwnPropertyNames||function(Z){var X=[];for(var G in Z)if(Object.prototype.hasOwnProperty.call(Z,G))X[X.length]=G;return X},$(Y)};LSA=function(Y){if(Y&&Y.__esModule)return Y;var Z={};if(Y!=null){for(var X=$(Y),G=0;G<X.length;G++)if(X[G]!=="default")Sp(Z,Y,X[G])}return B(Z,Y),Z},VSA=function(Y){return Y&&Y.__esModule?Y:{default:Y}},NSA=function(Y,Z,X,G){if(X==="a"&&!G)throw TypeError("Private accessor was defined without a getter");if(typeof Z==="function"?Y!==Z||!G:!Z.has(Y))throw TypeError("Cannot read private member from an object whose class did not declare it");return X==="m"?G:X==="a"?G.call(Y):G?G.value:Z.get(Y)},RSA=function(Y,Z,X,G,K){if(G==="m")throw TypeError("Private method is not writable");if(G==="a"&&!K)throw TypeError("Private accessor was defined without a setter");if(typeof Z==="function"?Y!==Z||!K:!Z.has(Y))throw TypeError("Cannot write private member to an object whose class did not declare it");return G==="a"?K.call(Y,X):K?K.value=X:Z.set(Y,X),X},ESA=function(Y,Z){if(Z===null||typeof Z!=="object"&&typeof Z!=="function")throw TypeError("Cannot use 'in' operator on non-object");return typeof Y==="function"?Z===Y:Y.has(Z)},jSA=function(Y,Z,X){if(Z!==null&&Z!==void 0){if(typeof Z!=="object"&&typeof Z!=="function")throw TypeError("Object expected.");var G,K;if(X){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");G=Z[Symbol.asyncDispose]}if(G===void 0){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");if(G=Z[Symbol.dispose],X)K=G}if(typeof G!=="function")throw TypeError("Object not disposable.");if(K)G=function(){try{K.call(this)}catch(W){return Promise.reject(W)}};Y.stack.push({value:Z,dispose:G,async:X})}else if(X)Y.stack.push({async:!0});return Z};var J=typeof SuppressedError==="function"?SuppressedError:function(Y,Z,X){var G=Error(X);return G.name="SuppressedError",G.error=Y,G.suppressed=Z,G};wSA=function(Y){function Z(W){Y.error=Y.hasError?new J(W,Y.error,"An error was suppressed during disposal."):W,Y.hasError=!0}var X,G=0;function K(){while(X=Y.stack.pop())try{if(!X.async&&G===1)return G=0,Y.stack.push(X),Promise.resolve().then(K);if(X.dispose){var W=X.dispose.call(X.value);if(X.async)return G|=2,Promise.resolve(W).then(K,function(H){return Z(H),K()})}else G|=1}catch(H){Z(H)}if(G===1)return Y.hasError?Promise.reject(Y.error):Promise.resolve();if(Y.hasError)throw Y.error}return K()},PSA=function(Y,Z){if(typeof Y==="string"&&/^\.\.?\//.test(Y))return Y.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(X,G,K,W,H){return G?Z?".jsx":".js":K&&(!W||!H)?X:K+W+"."+H.toLowerCase()+"js"});return Y},A("__extends",QSA),A("__assign",BSA),A("__rest",$SA),A("__decorate",JSA),A("__param",YSA),A("__esDecorate",ZSA),A("__runInitializers",XSA),A("__propKey",GSA),A("__setFunctionName",KSA),A("__metadata",WSA),A("__awaiter",HSA),A("__generator",FSA),A("__exportStar",USA),A("__createBinding",Sp),A("__values",_p),A("__read",aJA),A("__spread",zSA),A("__spreadArrays",qSA),A("__spreadArray",DSA),A("__await",CR),A("__asyncGenerator",ISA),A("__asyncDelegator",OSA),A("__asyncValues",MSA),A("__makeTemplateObject",CSA),A("__importStar",LSA),A("__importDefault",VSA),A("__classPrivateFieldGet",NSA),A("__classPrivateFieldSet",RSA),A("__classPrivateFieldIn",ESA),A("__addDisposableResource",jSA),A("__disposeResources",wSA),A("__rewriteRelativeImportExtension",PSA)})});var SSA=$A((TSA)=>{Object.defineProperty(TSA,"__esModule",{value:!0});TSA.resolveFetch=void 0;var tRQ=(A)=>{if(A)return(...Q)=>A(...Q);return(...Q)=>fetch(...Q)};TSA.resolveFetch=tRQ});var rJA=$A((vSA)=>{Object.defineProperty(vSA,"__esModule",{value:!0});vSA.FunctionRegion=vSA.FunctionsHttpError=vSA.FunctionsRelayError=vSA.FunctionsFetchError=vSA.FunctionsError=void 0;class Dk 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}}}vSA.FunctionsError=Dk;class bSA extends Dk{constructor(A){super("Failed to send a request to the Edge Function","FunctionsFetchError",A)}}vSA.FunctionsFetchError=bSA;class xSA extends Dk{constructor(A){super("Relay Error invoking the Edge Function","FunctionsRelayError",A)}}vSA.FunctionsRelayError=xSA;class fSA extends Dk{constructor(A){super("Edge Function returned a non-2xx status code","FunctionsHttpError",A)}}vSA.FunctionsHttpError=fSA;var kSA;(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"})(kSA||(vSA.FunctionRegion=kSA={}))});var mSA=$A((hSA)=>{Object.defineProperty(hSA,"__esModule",{value:!0});hSA.FunctionsClient=void 0;var $EQ=gZ(),JEQ=SSA(),LR=rJA();class gSA{constructor(A,{headers:Q={},customFetch:B,region:$=LR.FunctionRegion.Any}={}){this.url=A,this.headers=Q,this.region=$,this.fetch=(0,JEQ.resolveFetch)(B)}setAuth(A){this.headers.Authorization=`Bearer ${A}`}invoke(A){return $EQ.__awaiter(this,arguments,void 0,function*(Q,B={}){var $,J;let Y,Z,X;try{let{headers:G,method:K,body:W,signal:H,timeout:U}=B,q={},{region:D}=B;if(!D)D=this.region;let I=new URL(`${this.url}/${Q}`);if(D&&D!=="any")q["x-region"]=D,I.searchParams.set("forceFunctionRegion",D);let O,V=!!G&&Object.keys(G).some((w)=>w.toLowerCase()==="content-type");if(W&&!V)if(typeof Blob<"u"&&W instanceof Blob||W instanceof ArrayBuffer)q["Content-Type"]="application/octet-stream",O=W;else if(typeof W==="string")q["Content-Type"]="text/plain",O=W;else if(typeof FormData<"u"&&W instanceof FormData)O=W;else q["Content-Type"]="application/json",O=JSON.stringify(W);else if(W&&typeof W!=="string"&&!(typeof Blob<"u"&&W instanceof Blob)&&!(W instanceof ArrayBuffer)&&!(typeof FormData<"u"&&W instanceof FormData))O=JSON.stringify(W);else O=W;let N=H;if(U)if(Z=new AbortController,Y=setTimeout(()=>Z.abort(),U),H)N=Z.signal,X=()=>Z.abort(),H.addEventListener("abort",X);else N=Z.signal;let C=yield this.fetch(I.toString(),{method:K||"POST",headers:Object.assign(Object.assign(Object.assign({},q),this.headers),G),body:O,signal:N}).catch((w)=>{throw new LR.FunctionsFetchError(w)}),L=C.headers.get("x-relay-error");if(L&&L==="true")throw new LR.FunctionsRelayError(C);if(!C.ok)throw new LR.FunctionsHttpError(C);let R=(($=C.headers.get("Content-Type"))!==null&&$!==void 0?$:"text/plain").split(";")[0].trim().toLowerCase(),E;if(R==="application/json")E=yield C.json();else if(R==="application/octet-stream"||R==="application/pdf")E=yield C.blob();else if(R==="text/event-stream")E=C;else if(R==="multipart/form-data")E=yield C.formData();else E=yield C.text();return{data:E,error:null,response:C}}catch(G){return{data:null,error:G,response:G instanceof LR.FunctionsHttpError||G instanceof LR.FunctionsRelayError?G.context:void 0}}finally{if(Y)clearTimeout(Y);if(X)(J=B.signal)===null||J===void 0||J.removeEventListener("abort",X)}})}}hSA.FunctionsClient=gSA});var cSA=$A((gq)=>{Object.defineProperty(gq,"__esModule",{value:!0});gq.FunctionRegion=gq.FunctionsRelayError=gq.FunctionsHttpError=gq.FunctionsFetchError=gq.FunctionsError=gq.FunctionsClient=void 0;var YEQ=mSA();Object.defineProperty(gq,"FunctionsClient",{enumerable:!0,get:function(){return YEQ.FunctionsClient}});var Ik=rJA();Object.defineProperty(gq,"FunctionsError",{enumerable:!0,get:function(){return Ik.FunctionsError}});Object.defineProperty(gq,"FunctionsFetchError",{enumerable:!0,get:function(){return Ik.FunctionsFetchError}});Object.defineProperty(gq,"FunctionsHttpError",{enumerable:!0,get:function(){return Ik.FunctionsHttpError}});Object.defineProperty(gq,"FunctionsRelayError",{enumerable:!0,get:function(){return Ik.FunctionsRelayError}});Object.defineProperty(gq,"FunctionRegion",{enumerable:!0,get:function(){return Ik.FunctionRegion}})});function lSA(A,Q){return new Promise((B)=>{if(Q===null||Q===void 0?void 0:Q.aborted){B();return}let $=setTimeout(()=>{Q===null||Q===void 0||Q.removeEventListener("abort",J),B()},A);function J(){clearTimeout($),B()}Q===null||Q===void 0||Q.addEventListener("abort",J)})}function GEQ(A,Q,B,$){if(!$||B>=3)return!1;if(!nSA.includes(A))return!1;if(!XEQ.includes(Q))return!1;return!0}function Ok(A){return Ok=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},Ok(A)}function FEQ(A,Q){if(Ok(A)!="object"||!A)return A;var B=A[Symbol.toPrimitive];if(B!==void 0){var $=B.call(A,Q||"default");if(Ok($)!="object")return $;throw TypeError("@@toPrimitive must return a primitive value.")}return(Q==="string"?String:Number)(A)}function UEQ(A){var Q=FEQ(A,"string");return Ok(Q)=="symbol"?Q:Q+""}function zEQ(A,Q,B){return(Q=UEQ(Q))in A?Object.defineProperty(A,Q,{value:B,enumerable:!0,configurable:!0,writable:!0}):A[Q]=B,A}function iSA(A,Q){var B=Object.keys(A);if(Object.getOwnPropertySymbols){var $=Object.getOwnPropertySymbols(A);Q&&($=$.filter(function(J){return Object.getOwnPropertyDescriptor(A,J).enumerable})),B.push.apply(B,$)}return B}function bp(A){for(var Q=1;Q<arguments.length;Q++){var B=arguments[Q]!=null?arguments[Q]:{};Q%2?iSA(Object(B),!0).forEach(function($){zEQ(A,$,B[$])}):Object.getOwnPropertyDescriptors?Object.defineProperties(A,Object.getOwnPropertyDescriptors(B)):iSA(Object(B)).forEach(function($){Object.defineProperty(A,$,Object.getOwnPropertyDescriptor(B,$))})}return A}var dSA=(A)=>Math.min(1000*2**A,30000),XEQ,nSA,oJA,KEQ=class{constructor(A){var Q,B,$,J,Y;if(this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=A.method,this.url=A.url,this.headers=new Headers(A.headers),this.schema=A.schema,this.body=A.body,this.shouldThrowOnError=(Q=A.shouldThrowOnError)!==null&&Q!==void 0?Q:!1,this.signal=A.signal,this.isMaybeSingle=(B=A.isMaybeSingle)!==null&&B!==void 0?B:!1,this.shouldStripNulls=($=A.shouldStripNulls)!==null&&$!==void 0?$:!1,this.urlLengthLimit=(J=A.urlLengthLimit)!==null&&J!==void 0?J:8000,this.retryEnabled=(Y=A.retry)!==null&&Y!==void 0?Y:!0,A.fetch)this.fetch=A.fetch;else this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get("Accept")==="text/csv")throw Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(A,Q){return this.headers=new Headers(this.headers),this.headers.set(A,Q),this}retry(A){return this.retryEnabled=A,this}then(A,Q){var B=this;if(this.schema===void 0);else if(["GET","HEAD"].includes(this.method))this.headers.set("Accept-Profile",this.schema);else this.headers.set("Content-Profile",this.schema);if(this.method!=="GET"&&this.method!=="HEAD")this.headers.set("Content-Type","application/json");if(this.shouldStripNulls){let Z=this.headers.get("Accept");if(Z==="application/vnd.pgrst.object+json")this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped");else if(!Z||Z==="application/json")this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}let $=this.fetch,Y=(async()=>{let Z=0;while(!0){let K={};if(B.headers.forEach((H,U)=>{K[U]=H}),Z>0)K["X-Retry-Count"]=String(Z);let W;try{W=await $(B.url.toString(),{method:B.method,headers:K,body:JSON.stringify(B.body,(H,U)=>typeof U==="bigint"?U.toString():U),signal:B.signal})}catch(H){if((H===null||H===void 0?void 0:H.name)==="AbortError"||(H===null||H===void 0?void 0:H.code)==="ABORT_ERR")throw H;if(!nSA.includes(B.method))throw H;if(B.retryEnabled&&Z<3){let U=dSA(Z);Z++,await lSA(U,B.signal);continue}throw H}if(GEQ(B.method,W.status,Z,B.retryEnabled)){var X,G;let H=(X=(G=W.headers)===null||G===void 0?void 0:G.get("Retry-After"))!==null&&X!==void 0?X:null,U=H!==null?Math.max(0,parseInt(H,10)||0)*1000:dSA(Z);await W.text(),Z++,await lSA(U,B.signal);continue}return await B.processResponse(W)}})();if(!this.shouldThrowOnError)Y=Y.catch((Z)=>{var X;let G="",K="",W="",H=Z===null||Z===void 0?void 0:Z.cause;if(H){var U,q,D,I;let N=(U=H===null||H===void 0?void 0:H.message)!==null&&U!==void 0?U:"",C=(q=H===null||H===void 0?void 0:H.code)!==null&&q!==void 0?q:"";if(G=`${(D=Z===null||Z===void 0?void 0:Z.name)!==null&&D!==void 0?D:"FetchError"}: ${Z===null||Z===void 0?void 0:Z.message}`,G+=`
72
72
 
73
73
  Caused by: ${(I=H===null||H===void 0?void 0:H.name)!==null&&I!==void 0?I:"Error"}: ${N}`,C)G+=` (${C})`;if(H===null||H===void 0?void 0:H.stack)G+=`
@@ -1964,66 +1964,76 @@ Example: npx @capgo/cli@latest organization set ORG_ID --enforce-hashed-api-keys
1964
1964
 
1965
1965
  Only organization owners can delete organizations.
1966
1966
 
1967
- Example: npx @capgo/cli@latest organization delete ORG_ID`).action(m6A).option("-a, --apikey <apikey>",yQ.apikey).option("--supa-host <supaHost>",yQ.supaHost).option("--supa-anon <supaAnon>",yQ.supaAnon);function Bt0(){console.warn('⚠️ Warning: "organisation" is deprecated. Please use "organization" instead.')}var H$A=q6.command("organisation").description('[DEPRECATED] Use "organization" instead. This command will be removed in a future version.').hook("preAction",Bt0);H$A.command("list").alias("l").description('[DEPRECATED] Use "organization list" instead.').action(c6A).option("-a, --apikey <apikey>",yQ.apikey).option("--supa-host <supaHost>",yQ.supaHost).option("--supa-anon <supaAnon>",yQ.supaAnon);H$A.command("add").alias("a").description('[DEPRECATED] Use "organization add" instead.').action(u6A).option("-n, --name <name>","Organization name").option("-e, --email <email>","Management email for the organization").option("-a, --apikey <apikey>",yQ.apikey).option("--supa-host <supaHost>",yQ.supaHost).option("--supa-anon <supaAnon>",yQ.supaAnon);H$A.command("set [orgId]").alias("s").description('[DEPRECATED] Use "organization set" instead.').action(l6A).option("-n, --name <name>","Organization name").option("-e, --email <email>","Management email for the organization").option("--enforce-2fa","Enable 2FA enforcement for all organization members").option("--no-enforce-2fa","Disable 2FA enforcement for organization").option("--password-policy","Enable password policy enforcement for organization").option("--no-password-policy","Disable password policy enforcement").option("--min-length <minLength>","Minimum password length (6-128, default: 10)",(A)=>{let Q=Number.parseInt(A,10);if(Number.isNaN(Q)||Q<6||Q>128)throw Error("min-length must be between 6 and 128");return Q}).option("--require-uppercase","Require uppercase letter in password").option("--no-require-uppercase","Do not require uppercase letter").option("--require-number","Require number in password").option("--no-require-number","Do not require number").option("--require-special","Require special character in password").option("--no-require-special","Do not require special character").option("--require-apikey-expiration","Require all API keys to have an expiration date").option("--no-require-apikey-expiration","Do not require API key expiration").option("--max-apikey-expiration-days <days>","Maximum days before API key expiration (1-365, null for no limit)",(A)=>{if(A==="null"||A==="")return null;let Q=Number.parseInt(A,10);if(Number.isNaN(Q)||Q<1||Q>365)throw Error("max-apikey-expiration-days must be between 1 and 365, or null");return Q}).option("--enforce-hashed-api-keys","Enforce hashed/secure API keys (key value stored as hash, shown only once)").option("--no-enforce-hashed-api-keys","Allow plain-text API keys").option("-a, --apikey <apikey>",yQ.apikey).option("--supa-host <supaHost>",yQ.supaHost).option("--supa-anon <supaAnon>",yQ.supaAnon);H$A.command("delete [orgId]").alias("d").description('[DEPRECATED] Use "organization delete" instead.').action(m6A).option("-a, --apikey <apikey>",yQ.apikey).option("--supa-host <supaHost>",yQ.supaHost).option("--supa-anon <supaAnon>",yQ.supaAnon);var RN=q6.command("build").description(`\uD83C\uDFD7️ Manage native iOS/Android builds through Capgo Cloud.
1967
+ Example: npx @capgo/cli@latest organization delete ORG_ID`).action(m6A).option("-a, --apikey <apikey>",yQ.apikey).option("--supa-host <supaHost>",yQ.supaHost).option("--supa-anon <supaAnon>",yQ.supaAnon);function Bt0(){console.warn('⚠️ Warning: "organisation" is deprecated. Please use "organization" instead.')}var H$A=q6.command("organisation").description('[DEPRECATED] Use "organization" instead. This command will be removed in a future version.').hook("preAction",Bt0);H$A.command("list").alias("l").description('[DEPRECATED] Use "organization list" instead.').action(c6A).option("-a, --apikey <apikey>",yQ.apikey).option("--supa-host <supaHost>",yQ.supaHost).option("--supa-anon <supaAnon>",yQ.supaAnon);H$A.command("add").alias("a").description('[DEPRECATED] Use "organization add" instead.').action(u6A).option("-n, --name <name>","Organization name").option("-e, --email <email>","Management email for the organization").option("-a, --apikey <apikey>",yQ.apikey).option("--supa-host <supaHost>",yQ.supaHost).option("--supa-anon <supaAnon>",yQ.supaAnon);H$A.command("set [orgId]").alias("s").description('[DEPRECATED] Use "organization set" instead.').action(l6A).option("-n, --name <name>","Organization name").option("-e, --email <email>","Management email for the organization").option("--enforce-2fa","Enable 2FA enforcement for all organization members").option("--no-enforce-2fa","Disable 2FA enforcement for organization").option("--password-policy","Enable password policy enforcement for organization").option("--no-password-policy","Disable password policy enforcement").option("--min-length <minLength>","Minimum password length (6-128, default: 10)",(A)=>{let Q=Number.parseInt(A,10);if(Number.isNaN(Q)||Q<6||Q>128)throw Error("min-length must be between 6 and 128");return Q}).option("--require-uppercase","Require uppercase letter in password").option("--no-require-uppercase","Do not require uppercase letter").option("--require-number","Require number in password").option("--no-require-number","Do not require number").option("--require-special","Require special character in password").option("--no-require-special","Do not require special character").option("--require-apikey-expiration","Require all API keys to have an expiration date").option("--no-require-apikey-expiration","Do not require API key expiration").option("--max-apikey-expiration-days <days>","Maximum days before API key expiration (1-365, null for no limit)",(A)=>{if(A==="null"||A==="")return null;let Q=Number.parseInt(A,10);if(Number.isNaN(Q)||Q<1||Q>365)throw Error("max-apikey-expiration-days must be between 1 and 365, or null");return Q}).option("--enforce-hashed-api-keys","Enforce hashed/secure API keys (key value stored as hash, shown only once)").option("--no-enforce-hashed-api-keys","Allow plain-text API keys").option("-a, --apikey <apikey>",yQ.apikey).option("--supa-host <supaHost>",yQ.supaHost).option("--supa-anon <supaAnon>",yQ.supaAnon);H$A.command("delete [orgId]").alias("d").description('[DEPRECATED] Use "organization delete" instead.').action(m6A).option("-a, --apikey <apikey>",yQ.apikey).option("--supa-host <supaHost>",yQ.supaHost).option("--supa-anon <supaAnon>",yQ.supaAnon);var RN=q6.command("build").description(`Build native iOS and Android apps with Capgo Cloud.
1968
1968
 
1969
- ⚠️ Native cloud build requests are currently in LIMITED BETA. Access is restricted.
1969
+ Native cloud builds are currently in limited beta.
1970
1970
 
1971
- \uD83D\uDD12 SECURITY GUARANTEE:
1972
- Build credentials are NEVER stored on Capgo servers.
1973
- They are used only during the build and auto-deleted after.
1974
- Build outputs may optionally be uploaded for time-limited download links.
1971
+ Quick start:
1972
+ npx @capgo/cli@latest build init
1973
+ npx @capgo/cli@latest build request <app-id> --platform <ios|android>
1975
1974
 
1976
- \uD83D\uDCCB BEFORE BUILDING:
1977
- Save your credentials first:
1978
- npx @capgo/cli build credentials save --appId <your-app-id> --platform ios
1979
- npx @capgo/cli build credentials save --appId <your-app-id> --platform android
1975
+ Run npx @capgo/cli@latest build <command> --help for command-specific options.`);RN.command("needed [appId]").summary("Check whether a native build is required").description(`Print "yes" and exit with code 1 if a native build is required. Otherwise print "no" and exit with code 0. Command failures exit with code 2.
1980
1976
 
1981
- \uD83D\uDCE4 CAPTURE THE OUTPUT URL FROM CI:
1982
- Pass --output-record to persist the download URL + QR code, then read it
1983
- back with \`build last-output\`:
1984
- npx @capgo/cli build request <appId> --platform android --output-upload --output-record /tmp/build.json
1985
- URL=$(npx @capgo/cli build last-output --path /tmp/build.json --field outputUrl)`);RN.command("needed [appId]").description(`\uD83E\uDDED Print "yes" and exit with code 1 if a native build is required; otherwise print "no" and exit with code 0. Command failures exit with code 2.
1977
+ Example:
1978
+ npx @capgo/cli@latest build needed com.example.app --channel production --verbose`).action(qFQ).option("-a, --apikey <apikey>",yQ.apikey).option("-c, --channel <channel>","Channel to compare against. Defaults to CapacitorUpdater.defaultChannel or the public default channel").option("--package-json <packageJson>",yQ.packageJson).option("--node-modules <nodeModules>",yQ.nodeModules).option("--verbose",yQ.verbose).option("--supa-host <supaHost>",yQ.supaHost).option("--supa-anon <supaAnon>",yQ.supaAnon);RN.command("init").alias("onboarding").summary("Configure build credentials interactively").description("Set up build credentials interactively (iOS: certificates + profiles automated; Android: keystore + Google OAuth provisions GCP service account and Play Console invite)").option("-a, --apikey <apikey>","API key to link to your account").option("-p, --platform <platform>","Platform to onboard (ios or android). If omitted, auto-detects when only one native folder exists; prompts otherwise.").option("--supa-host <supaHost>",yQ.supaHost).option("--supa-anon <supaAnon>",yQ.supaAnon).option("--no-analytics","Disable build onboarding analytics and terminal replay for this run").action((A)=>B_({...A,enableSelfUpdate:!0,enableProjectDiscovery:!0}));RN.command("request [appId]").summary("Request a native build from Capgo Cloud").description(`Request a native build from Capgo Cloud.
1979
+
1980
+ The project is zipped and uploaded for a remote native build. The finished artifact can be sent to the app store, uploaded to Capgo for a time-limited download, or both.
1981
+
1982
+ Credentials are uploaded only for the build. Their temporary server copies are deleted after it finishes.
1986
1983
 
1987
- Example: npx @capgo/cli@latest build needed com.example.app --channel production --verbose`).action(qFQ).option("-a, --apikey <apikey>",yQ.apikey).option("-c, --channel <channel>","Channel to compare against. Defaults to CapacitorUpdater.defaultChannel or the public default channel").option("--package-json <packageJson>",yQ.packageJson).option("--node-modules <nodeModules>",yQ.nodeModules).option("--verbose",yQ.verbose).option("--supa-host <supaHost>",yQ.supaHost).option("--supa-anon <supaAnon>",yQ.supaAnon);RN.command("init").alias("onboarding").description("Set up build credentials interactively (iOS: certificates + profiles automated; Android: keystore + Google OAuth provisions GCP service account and Play Console invite)").option("-a, --apikey <apikey>","API key to link to your account").option("-p, --platform <platform>","Platform to onboard (ios or android). If omitted, auto-detects when only one native folder exists; prompts otherwise.").option("--supa-host <supaHost>",yQ.supaHost).option("--supa-anon <supaAnon>",yQ.supaAnon).option("--no-analytics","Disable build onboarding analytics and terminal replay for this run").action((A)=>B_({...A,enableSelfUpdate:!0,enableProjectDiscovery:!0}));RN.command("request [appId]").description(`Request a native build from Capgo Cloud.
1984
+ Before your first build:
1985
+ npx @capgo/cli@latest build init
1986
+
1987
+ Examples:
1988
+ iOS build:
1989
+ npx @capgo/cli@latest build request com.example.app \\
1990
+ --platform ios --path .
1988
1991
 
1989
- This command zips your project and uploads it to Capgo for a remote native build.
1990
- By default the finished artifact can go to the app store (when store credentials are saved)
1991
- and/or to Capgo storage as a time-limited download link (--output-upload).
1992
+ Android artifact without Play upload:
1993
+ npx @capgo/cli@latest build request com.example.app \\
1994
+ --platform android --no-playstore-upload --output-upload
1992
1995
 
1993
- \uD83D\uDD12 SECURITY: Credentials are never stored on Capgo servers. They are auto-deleted
1994
- after build completion. Build outputs may optionally be uploaded for time-limited download links.
1996
+ iOS artifact without TestFlight upload:
1997
+ npx @capgo/cli@latest build request com.example.app \\
1998
+ --platform ios --ios-distribution ad_hoc --output-upload
1995
1999
 
1996
- \uD83D\uDCCB PREREQUISITE: Save credentials first with:
1997
- \`npx @capgo/cli@latest build credentials save --appId <app-id> --platform <ios|android>\`
2000
+ Disable the Xcode compilation cache:
2001
+ npx @capgo/cli@latest build request com.example.app \\
2002
+ --platform ios --no-cache
1998
2003
 
1999
- Example: npx @capgo/cli@latest build request com.example.app --platform ios --path .
2000
- Android AAB only (no Play upload): npx @capgo/cli@latest build request com.example.app --platform android --no-playstore-upload --output-upload
2001
- iOS IPA only (no TestFlight upload): npx @capgo/cli@latest build request com.example.app --platform ios --ios-distribution ad_hoc --output-upload
2002
- Disable Xcode compilation cache: npx @capgo/cli@latest build request com.example.app --platform ios --no-cache
2003
- Separate RC and PROD caches: npx @capgo/cli@latest build request com.example.app --platform ios --cache-key prod`).action(x0A).option("--path <path>","Path to the project directory to build (default: current directory)").option("--node-modules <nodeModules>",yQ.nodeModules).option("--platform <platform>","Target platform: ios or android (required)").option("--build-mode <buildMode>","Build mode: debug or release (default: release)").option("--build-certificate-base64 <cert>","iOS: Base64-encoded .p12 certificate").option("--p12-password <password>","iOS: Certificate password (optional if cert has no password)").option("--apple-id <email>","iOS: Apple ID email for app-specific password uploads (alternative to App Store Connect API key)").option("--apple-app-specific-password <password>","iOS: App-specific password (xxxx-xxxx-xxxx-xxxx) for TestFlight uploads").option("--apple-app-id <id>","iOS: Numeric App Store Connect app id (required together with --apple-id and --apple-app-specific-password)").option("--apple-key-id <id>","iOS: App Store Connect API Key ID").option("--apple-issuer-id <id>","iOS: App Store Connect Issuer ID").option("--apple-key-content <content>","iOS: Base64-encoded App Store Connect API key (.p8)").option("--app-store-connect-team-id <id>","iOS: App Store Connect Team ID").option("--ios-scheme <scheme>","iOS: Xcode scheme to build (default: App)").option("--ios-target <target>","iOS: Xcode target for reading build settings (default: same as scheme)").addOption(new Z7("--ios-distribution <mode>","iOS: Distribution mode. app_store (default) uploads to TestFlight/App Store; ad_hoc skips store upload and builds an Ad Hoc IPA for device install. Use ad_hoc with --output-upload when the App Store app does not exist yet or you only need an IPA download.").choices(["app_store","ad_hoc"]).default("app_store")).option("--ios-provisioning-profile <mapping>","iOS: Provisioning profile path or bundleId=path mapping (repeatable)",eO,[]).option("--android-keystore-file <keystore>","Android: Base64-encoded keystore file").option("--keystore-key-alias <alias>","Android: Keystore key alias").option("--keystore-key-password <password>","Android: Keystore key password").option("--keystore-store-password <password>","Android: Keystore store password").option("--play-config-json <json>","Android: Base64-encoded Google Play service account JSON").option("--android-flavor <flavor>","Android: Product flavor to build (e.g. production). Required if your project has multiple flavors.").addOption(new Z7("--android-track <track>","Android: Google Play track for this upload (internal, alpha, beta, production). Default without --submit-to-store-review: internal. With --submit-to-store-review and no track set: production. Precedence: CLI > env > saved credentials").choices(["internal","alpha","beta","production"])).addOption(new Z7("--android-release-status <status>","Android: Google Play release status (draft, completed, inProgress, halted). Default without --submit-to-store-review: draft. With --submit-to-store-review and no status set: completed. Precedence: CLI > env > saved credentials").choices(["draft","completed","inProgress","halted"])).option("--in-app-update-priority <priority>","Android: Google Play in-app update priority for this release (integer 0–5; higher = more urgent). See https://developer.android.com/guide/playcore/in-app-updates. Precedence: CLI > env > saved credentials").option("--no-playstore-upload","Android: do not upload the AAB/APK to Google Play for this build (ignores saved Play credentials). Use when the Play app does not exist yet, or you only want a Capgo download link. Requires --output-upload.").option("--submit-to-store-review","After upload, submit the store release for review instead of leaving it as a draft/inactive build. On Android this defaults to the production track with release_status completed (override with --android-track / PLAY_STORE_TRACK and --android-release-status / PLAY_STORE_RELEASE_STATUS). On iOS this submits the processed TestFlight build to App Store review.").option("--store-release-name <name>","Store release name/version label. Android sends this as the Google Play version_name; iOS uses it as the App Store version when creating or reusing the editable version.").option("--store-release-notes <notes>","Default store release notes. Android uses this as the Play changelog; iOS uses it as the fallback App Store What's New text.").option("--store-release-notes-locale <locale=notes>",'Localized store release notes (repeatable), for example --store-release-notes-locale en-US="Bug fixes" --store-release-notes-locale fr-FR="Corrections".',eO,[]).option("--ios-testflight-groups <groups>","iOS: optional comma-separated TestFlight external group names or IDs for external beta distribution.").option("--ios-automatic-release","iOS: automatically release the App Store version after Apple approval. Default is manual release.").option("--no-ios-automatic-release","iOS: keep the App Store version waiting for manual release after Apple approval.").option("--output-upload","Upload the finished IPA/APK/AAB to Capgo storage and print a time-limited download link (and QR). Use with --no-playstore-upload (Android) or --ios-distribution ad_hoc (iOS) when you only need the artifact and are not publishing to the store yet. Precedence: CLI > env > saved credentials").option("--no-output-upload","Do not upload the finished IPA/APK/AAB to Capgo storage (no download link). Store upload still happens when Play/TestFlight credentials are configured. Precedence: CLI > env > saved credentials").option("--output-retention <duration>","Override output link TTL for this build only (1h to 7d). Examples: 1h, 6h, 2d. Precedence: CLI > env > saved credentials").option("--output-record <path>","After a successful build, write a JSON record (jobId, status, outputUrl, qrCodeAscii, qrCodePngPath, finishedAt) to <path>. A PNG QR code is also written next to it as <path>.qr.png. Read fields back with `build last-output`.").option("--skip-build-number-bump","Skip automatic build number/version code incrementing. Uses whatever version is already in the project files.").option("--no-skip-build-number-bump","Override saved credentials to re-enable automatic build number incrementing for this build only.").option("--skip-marketing-version-bump","Skip automatic marketing version (CFBundleShortVersionString / versionName) bump when the app is already released.").option("--no-skip-marketing-version-bump","Override saved credentials to re-enable automatic marketing version bump for this build only.").option("--sync-ios-version","iOS: sync the app version from package.json before uploading the project. Updates MARKETING_VERSION or CFBundleShortVersionString based on the Xcode Info.plist configuration.").option("--sync-android-version","Android: sync versionName in android/app/build.gradle from package.json before uploading the project. Fails unless versionName is a standalone quoted string literal.").option("--ai-analytics","On build failure, send logs to Capgo AI for diagnosis. In interactive terminals this skips the upfront confirmation; in CI this auto-uploads and prints the analysis to stderr.").option("--no-prescan","Skip the automatic pre-build scan").option("--no-cache","Disable Xcode compilation cache for this build (default: cache enabled)").option("--cache-key <key>","Custom compilation cache key for this build (e.g. rc, prod, feature-branch). Use to share or isolate cache between environments. Precedence over the default appId-only key; ignored when --no-cache is set.").option("--prescan-ignore-fatal","Run the pre-build scan but never block the build (report only)").option("--prescan-skip <checkId>","Skip specific prescan check(s) by id (repeatable or comma-separated). Other checks still run.",eO,[]).option("--prescan-warn <checkId>","Downgrade specific prescan check(s) to warning by id (repeatable or comma-separated). Check still runs.",eO,[]).option("--fail-on-warnings","Treat prescan warnings as fatal").option("--send-logs-to-support","On a CI/CD build failure, automatically upload the build logs to Capgo support (no email required). Capgo support is notified and will follow up by email. Additive to --ai-analytics.").addOption(new Z7("--send-logs","Deprecated alias for --send-logs-to-support").hideHelp()).option("-a, --apikey <apikey>",yQ.apikey).option("--supa-host <supaHost>",yQ.supaHost).option("--supa-anon <supaAnon>",yQ.supaAnon).option("--verbose",yQ.verbose);RN.command("sync-ios-version").description(`Sync the local iOS app version from package.json.
2004
+ Use a separate compilation cache:
2005
+ npx @capgo/cli@latest build request com.example.app \\
2006
+ --platform ios --cache-key prod`).action(x0A).optionsGroup("General options:").helpOption("-h, --help","Display help for command").option("--path <path>","Path to the project directory to build (default: current directory)").option("--node-modules <nodeModules>",yQ.nodeModules).option("--platform <platform>","Target platform: ios or android (required)").option("--build-mode <buildMode>","Build mode: debug or release (default: release)").optionsGroup("iOS options:").option("--build-certificate-base64 <cert>","iOS: Base64-encoded .p12 certificate").option("--p12-password <password>","iOS: Certificate password (optional if cert has no password)").option("--apple-id <email>","iOS: Apple ID email for app-specific password uploads (alternative to App Store Connect API key)").option("--apple-app-specific-password <password>","iOS: App-specific password (xxxx-xxxx-xxxx-xxxx) for TestFlight uploads").option("--apple-app-id <id>","iOS: Numeric App Store Connect app id (required together with --apple-id and --apple-app-specific-password)").option("--apple-key-id <id>","iOS: App Store Connect API Key ID").option("--apple-issuer-id <id>","iOS: App Store Connect Issuer ID").option("--apple-key-content <content>","iOS: Base64-encoded App Store Connect API key (.p8)").option("--app-store-connect-team-id <id>","iOS: App Store Connect Team ID").option("--ios-scheme <scheme>","iOS: Xcode scheme to build (default: App)").option("--ios-target <target>","iOS: Xcode target for reading build settings (default: same as scheme)").addOption(new Z7("--ios-distribution <mode>","iOS: Distribution mode. app_store (default) uploads to TestFlight/App Store; ad_hoc skips store upload and builds an Ad Hoc IPA for device install. Use ad_hoc with --output-upload when the App Store app does not exist yet or you only need an IPA download.").choices(["app_store","ad_hoc"]).default("app_store")).option("--ios-provisioning-profile <mapping>","iOS: Provisioning profile path or bundleId=path mapping (repeatable)",eO,[]).option("--no-cache","Disable Xcode compilation cache for this build (default: cache enabled)").option("--cache-key <key>","Custom compilation cache key for this build (e.g. rc, prod, feature-branch). Use to share or isolate cache between environments. Precedence over the default appId-only key; ignored when --no-cache is set.").optionsGroup("Android options:").option("--android-keystore-file <keystore>","Android: Base64-encoded keystore file").option("--keystore-key-alias <alias>","Android: Keystore key alias").option("--keystore-key-password <password>","Android: Keystore key password").option("--keystore-store-password <password>","Android: Keystore store password").option("--play-config-json <json>","Android: Base64-encoded Google Play service account JSON").option("--android-flavor <flavor>","Android: Product flavor to build (e.g. production). Required if your project has multiple flavors.").addOption(new Z7("--android-track <track>","Android: Google Play track for this upload (internal, alpha, beta, production). Default without --submit-to-store-review: internal. With --submit-to-store-review and no track set: production. Precedence: CLI > env > saved credentials").choices(["internal","alpha","beta","production"])).addOption(new Z7("--android-release-status <status>","Android: Google Play release status (draft, completed, inProgress, halted). Default without --submit-to-store-review: draft. With --submit-to-store-review and no status set: completed. Precedence: CLI > env > saved credentials").choices(["draft","completed","inProgress","halted"])).option("--in-app-update-priority <priority>","Android: Google Play in-app update priority for this release (integer 0–5; higher = more urgent). See https://developer.android.com/guide/playcore/in-app-updates. Precedence: CLI > env > saved credentials").option("--no-playstore-upload","Android: do not upload the AAB/APK to Google Play for this build (ignores saved Play credentials). Use when the Play app does not exist yet, or you only want a Capgo download link. Requires --output-upload.").optionsGroup("Store options:").option("--submit-to-store-review","After upload, submit the store release for review instead of leaving it as a draft/inactive build. On Android this defaults to the production track with release_status completed (override with --android-track / PLAY_STORE_TRACK and --android-release-status / PLAY_STORE_RELEASE_STATUS). On iOS this submits the processed TestFlight build to App Store review.").option("--store-release-name <name>","Store release name/version label. Android sends this as the Google Play version_name; iOS uses it as the App Store version when creating or reusing the editable version.").option("--store-release-notes <notes>","Default store release notes. Android uses this as the Play changelog; iOS uses it as the fallback App Store What's New text.").option("--store-release-notes-locale <locale=notes>",'Localized store release notes (repeatable), for example --store-release-notes-locale en-US="Bug fixes" --store-release-notes-locale fr-FR="Corrections".',eO,[]).option("--ios-testflight-groups <groups>","iOS: optional comma-separated TestFlight external group names or IDs for external beta distribution.").option("--ios-automatic-release","iOS: automatically release the App Store version after Apple approval. Default is manual release.").option("--no-ios-automatic-release","iOS: keep the App Store version waiting for manual release after Apple approval.").optionsGroup("Output and version options:").option("--output-upload","Upload the finished IPA/APK/AAB to Capgo storage and print a time-limited download link (and QR). Use with --no-playstore-upload (Android) or --ios-distribution ad_hoc (iOS) when you only need the artifact and are not publishing to the store yet. Precedence: CLI > env > saved credentials").option("--no-output-upload","Do not upload the finished IPA/APK/AAB to Capgo storage (no download link). Store upload still happens when Play/TestFlight credentials are configured. Precedence: CLI > env > saved credentials").option("--output-retention <duration>","Override output link TTL for this build only (1h to 7d). Examples: 1h, 6h, 2d. Precedence: CLI > env > saved credentials").option("--output-record <path>","After a successful build, write a JSON record (jobId, status, outputUrl, qrCodeAscii, qrCodePngPath, finishedAt) to <path>. A PNG QR code is also written next to it as <path>.qr.png. Read fields back with `build last-output`.").option("--skip-build-number-bump","Skip automatic build number/version code incrementing. Uses whatever version is already in the project files.").option("--no-skip-build-number-bump","Override saved credentials to re-enable automatic build number incrementing for this build only.").option("--skip-marketing-version-bump","Skip automatic marketing version (CFBundleShortVersionString / versionName) bump when the app is already released.").option("--no-skip-marketing-version-bump","Override saved credentials to re-enable automatic marketing version bump for this build only.").option("--sync-ios-version","iOS: sync the app version from package.json before uploading the project. Updates MARKETING_VERSION or CFBundleShortVersionString based on the Xcode Info.plist configuration.").option("--sync-android-version","Android: sync versionName in android/app/build.gradle from package.json before uploading the project. Fails unless versionName is a standalone quoted string literal.").optionsGroup("Prescan and diagnostics options:").option("--ai-analytics","On build failure, send logs to Capgo AI for diagnosis. In interactive terminals this skips the upfront confirmation; in CI this auto-uploads and prints the analysis to stderr.").option("--no-prescan","Skip the automatic pre-build scan").option("--prescan-ignore-fatal","Run the pre-build scan but never block the build (report only)").option("--prescan-skip <checkId>","Skip specific prescan check(s) by id (repeatable or comma-separated). Other checks still run.",eO,[]).option("--prescan-warn <checkId>","Downgrade specific prescan check(s) to warning by id (repeatable or comma-separated). Check still runs.",eO,[]).option("--fail-on-warnings","Treat prescan warnings as fatal").option("--send-logs-to-support","On a CI/CD build failure, automatically upload the build logs to Capgo support (no email required). Capgo support is notified and will follow up by email. Additive to --ai-analytics.").addOption(new Z7("--send-logs","Deprecated alias for --send-logs-to-support").hideHelp()).option("--verbose",yQ.verbose).optionsGroup("Capgo options:").option("-a, --apikey <apikey>",yQ.apikey).option("--supa-host <supaHost>",yQ.supaHost).option("--supa-anon <supaAnon>",yQ.supaAnon);RN.command("sync-ios-version").summary("Sync the local iOS marketing version").description(`Sync the local iOS app version from package.json.
2004
2007
 
2005
2008
  Updates MARKETING_VERSION or CFBundleShortVersionString based on the Xcode Info.plist configuration.
2006
2009
 
2007
- Example: npx @capgo/cli@latest build sync-ios-version --path .`).option("--path <path>","Path to the project directory (default: current directory)").option("--check","Check only; exit non-zero when MARKETING_VERSION or CFBundleShortVersionString is out of sync").action(VJQ);RN.command("prescan [appId]").description("Scan your project and saved credentials for problems that would fail a cloud build — before uploading anything.\n\nChecks credentials (expiry, passwords, profile pairing), project state (cap sync, node_modules layout), and platform config. Runs automatically inside `build request`; this command runs it standalone (e.g. in CI).").option("--platform <platform>","Target platform: ios or android (required)").option("--path <path>","Path to the project directory (default: current directory)").option("-a, --apikey <apikey>",yQ.apikey).option("--android-flavor <flavor>","Android: product flavor the build will use").addOption(new Z7("--ios-dist <mode>","iOS: distribution mode to validate against").choices(["app_store","ad_hoc"])).option("--json","Output a machine-readable JSON report").option("--fail-on-warnings","Exit non-zero when warnings are found (CI)").option("--ignore-fatal","Diagnostic mode: report everything but always exit 0").option("--skip <checkId>","Skip specific check(s) by id (repeatable or comma-separated). Alias of --prescan-skip on build request.",eO,[]).option("--warn <checkId>","Downgrade specific check(s) to warning by id (repeatable or comma-separated). Alias of --prescan-warn on build request.",eO,[]).option("--verbose",yQ.verbose).option("--supa-host <supaHost>",yQ.supaHost).option("--supa-anon <supaAnon>",yQ.supaAnon).action(tOA);RN.command("last-output").description(`Read the build output record written by a previous \`build request --output-record\`.
2010
+ Example:
2011
+ npx @capgo/cli@latest build sync-ios-version --path .`).option("--path <path>","Path to the project directory (default: current directory)").option("--check","Check only; exit non-zero when MARKETING_VERSION or CFBundleShortVersionString is out of sync").action(VJQ);RN.command("prescan [appId]").summary("Check for build problems before uploading").description(`Scan your project and saved credentials for problems that would fail a cloud build — before uploading anything.
2012
+
2013
+ Checks credentials, project state, and platform configuration. This scan runs
2014
+ automatically inside \`build request\`; use this command to run it separately.
2015
+
2016
+ Example:
2017
+ npx @capgo/cli@latest build prescan com.example.app --platform ios`).option("--platform <platform>","Target platform: ios or android (required)").option("--path <path>","Path to the project directory (default: current directory)").option("-a, --apikey <apikey>",yQ.apikey).option("--android-flavor <flavor>","Android: product flavor the build will use").addOption(new Z7("--ios-dist <mode>","iOS: distribution mode to validate against").choices(["app_store","ad_hoc"])).option("--json","Output a machine-readable JSON report").option("--fail-on-warnings","Exit non-zero when warnings are found (CI)").option("--ignore-fatal","Diagnostic mode: report everything but always exit 0").option("--skip <checkId>","Skip specific check(s) by id (repeatable or comma-separated). Alias of --prescan-skip on build request.",eO,[]).option("--warn <checkId>","Downgrade specific check(s) to warning by id (repeatable or comma-separated). Alias of --prescan-warn on build request.",eO,[]).option("--verbose",yQ.verbose).option("--supa-host <supaHost>",yQ.supaHost).option("--supa-anon <supaAnon>",yQ.supaAnon).action(tOA);RN.command("last-output").summary("Read a saved build output record").description(`Read the build output record written by a previous \`build request --output-record\`.
2008
2018
 
2009
2019
  Prints the full JSON by default, a single field with --field, or the ASCII QR
2010
2020
  code with --qr. Useful in CI to grab the download URL or QR for posting back
2011
2021
  to a PR or issue.
2012
2022
 
2013
2023
  Examples:
2014
- npx @capgo/cli build last-output --path /tmp/build.json
2015
- npx @capgo/cli build last-output --path /tmp/build.json --field outputUrl
2016
- npx @capgo/cli build last-output --path /tmp/build.json --qr`).action(XFQ).option("--path <path>","Path to the JSON record written by --output-record (required)").option("--field <field>","Print a single field (one of: jobId, appId, platform, buildMode, status, outputUrl, qrCodeAscii, qrCodePngPath, finishedAt, schemaVersion)").option("--qr","Print the rendered ASCII QR code (shortcut for --field qrCodeAscii)");var ez=RN.command("credentials").description(`Manage build credentials stored locally on your machine.
2024
+ npx @capgo/cli@latest build last-output --path /tmp/build.json
2025
+ npx @capgo/cli@latest build last-output --path /tmp/build.json --field outputUrl
2026
+ npx @capgo/cli@latest build last-output --path /tmp/build.json --qr`).action(XFQ).option("--path <path>","Path to the JSON record written by --output-record (required)").option("--field <field>","Print a single field (one of: jobId, appId, platform, buildMode, status, outputUrl, qrCodeAscii, qrCodePngPath, finishedAt, schemaVersion)").option("--qr","Print the rendered ASCII QR code (shortcut for --field qrCodeAscii)");var ez=RN.command("credentials").summary("Manage locally saved build credentials").description(`Manage locally saved build credentials.
2017
2027
 
2018
- \uD83D\uDD12 SECURITY:
2019
- - Credentials saved to ~/.capgo-credentials/credentials.json (global) or .capgo-credentials.json (local)
2020
- - When building, sent to Capgo but NEVER stored permanently
2021
- - Deleted from Capgo immediately after build
2022
- - Build outputs may optionally be uploaded for time-limited download links
2028
+ Credentials are stored in ~/.capgo-credentials/credentials.json globally, or
2029
+ in .capgo-credentials.json for one project. They are uploaded only for a build;
2030
+ their temporary server copies are deleted after it finishes.
2023
2031
 
2024
- \uD83D\uDCDA DOCUMENTATION:
2025
- iOS setup: https://capgo.app/docs/cli/cloud-build/ios/
2026
- Android setup: https://capgo.app/docs/cli/cloud-build/android/`);ez.command("apple-key").alias("asc-key").description(`Create an App Store Connect team API key with a guided macOS helper (macOS only).
2032
+ Setup guides:
2033
+ iOS: https://capgo.app/docs/cli/cloud-build/ios/
2034
+ Android: https://capgo.app/docs/cli/cloud-build/android/
2035
+
2036
+ Run npx @capgo/cli@latest build credentials <command> --help for command-specific options.`);ez.command("apple-key").alias("asc-key").summary("Create an App Store Connect API key on macOS").description(`Create an App Store Connect team API key with a guided macOS helper (macOS only).
2027
2037
 
2028
2038
  Opens a native window that walks you through Apple's App Store Connect UI in an
2029
2039
  embedded browser, auto-captures the Issuer ID + Key ID, intercepts the one-time
@@ -2031,88 +2041,81 @@ embedded browser, auto-captures the Issuer ID + Key ID, intercepts the one-time
2031
2041
  Progress statistics are forwarded to Capgo analytics (disable with CAPGO_DISABLE_TELEMETRY).
2032
2042
 
2033
2043
  Example:
2034
- npx @capgo/cli build credentials apple-key --appId com.example.app`).action((A)=>DFQ(A)).option("-a, --apikey <apikey>",yQ.apikey).option("--appId <appId>","Save the captured key into this app iOS build credentials").option("--local","Save into the per-project .capgo-credentials.json instead of the global file").option("--json","Print the captured Key ID / Issuer ID / .p8 path as JSON");ez.command("ios-provisioning").description(`Set up provisioning profiles for every signable iOS target.
2044
+ npx @capgo/cli@latest build credentials apple-key --appId com.example.app`).action((A)=>DFQ(A)).option("-a, --apikey <apikey>",yQ.apikey).option("--appId <appId>","Save the captured key into this app iOS build credentials").option("--local","Save into the per-project .capgo-credentials.json instead of the global file").option("--json","Print the captured Key ID / Issuer ID / .p8 path as JSON");ez.command("ios-provisioning").summary("Set up profiles for every signable iOS target").description(`Set up provisioning profiles for every signable iOS target.
2035
2045
 
2036
2046
  Reuses an eligible saved wildcard profile after confirmation, or generates
2037
2047
  missing App Store profiles with the saved App Store Connect .p8 key.
2038
2048
 
2039
2049
  Example:
2040
- npx @capgo/cli@latest build credentials ios-provisioning`).option("--local","Use credentials from the current project").option("--global","Use credentials from the global store").action((A)=>JFQ(A));ez.command("save").description(`Save build credentials locally for iOS or Android.
2041
-
2042
- Credentials are stored in:
2043
- - ~/.capgo-credentials/credentials.json (default, global)
2044
- - .capgo-credentials.json in project root (with --local flag)
2045
-
2046
- ⚠️ REQUIRED BEFORE BUILDING: You must save credentials before requesting a build.
2047
-
2048
- \uD83D\uDD12 These credentials are NEVER stored on Capgo servers permanently.
2049
- They are deleted immediately after the build completes.
2050
-
2051
- \uD83D\uDCDA Setup guides:
2052
- iOS: https://capgo.app/docs/cli/cloud-build/ios/
2053
- Android: https://capgo.app/docs/cli/cloud-build/android/
2050
+ npx @capgo/cli@latest build credentials ios-provisioning`).option("--local","Use credentials from the current project").option("--global","Use credentials from the global store").action((A)=>JFQ(A));ez.command("save").summary("Save iOS or Android build credentials").description(`Save iOS or Android build credentials on this machine.
2054
2051
 
2055
- iOS Example:
2056
- npx @capgo/cli build credentials save --platform ios \\
2057
- --certificate ./cert.p12 --p12-password "password" \\
2058
- --ios-provisioning-profile ./profile.mobileprovision \\
2059
- --apple-key ./AuthKey.p8 --apple-key-id "KEY123" \\
2060
- --apple-issuer-id "issuer-uuid" --apple-team-id "team-id"
2052
+ Credentials are stored globally by default. Use --local to store them in the
2053
+ current project's .capgo-credentials.json file instead.
2061
2054
 
2062
- Multi-target Example (app + widget extension):
2063
- npx @capgo/cli build credentials save --platform ios \\
2064
- --ios-provisioning-profile ./App.mobileprovision \\
2065
- --ios-provisioning-profile com.example.widget=./Widget.mobileprovision \\
2066
- ...
2055
+ Setup guides:
2056
+ iOS: https://capgo.app/docs/cli/cloud-build/ios/
2057
+ Android: https://capgo.app/docs/cli/cloud-build/android/
2067
2058
 
2068
- Android Example:
2069
- npx @capgo/cli build credentials save --platform android \\
2070
- --keystore ./release.keystore --keystore-alias "my-key" \\
2071
- --keystore-key-password "key-pass" \\
2072
- --play-config ./service-account.json
2073
-
2074
- Local storage (per-project):
2075
- npx @capgo/cli build credentials save --local --platform ios ...`).action(WnA).option("--appId <appId>","App ID (e.g., com.example.app) (required)").option("--platform <platform>","Platform: ios or android (required)").option("--certificate <path>","iOS: Path to .p12 certificate file").option("--ios-provisioning-profile <mapping>","iOS: Provisioning profile path or bundleId=path (repeatable)",eO,[]).option("--p12-password <password>","iOS: Certificate password (optional if cert has no password)").option("--apple-key <path>","iOS: Path to .p8 App Store Connect API key").option("--apple-key-id <id>","iOS: App Store Connect API Key ID").option("--apple-issuer-id <id>","iOS: App Store Connect Issuer ID").option("--apple-team-id <id>","iOS: App Store Connect Team ID").addOption(new Z7("--ios-distribution <mode>","iOS: Distribution mode").choices(["app_store","ad_hoc"]).default("app_store")).option("--apple-id <email>","iOS: Apple ID email for app-specific password uploads (alternative to App Store Connect API key)").option("--apple-app-specific-password <password>","iOS: App-specific password (xxxx-xxxx-xxxx-xxxx) for TestFlight uploads").option("--apple-app-id <id>","iOS: Numeric App Store Connect app id (required together with --apple-id and --apple-app-specific-password)").option("--keystore <path>","Android: Path to keystore file (.keystore or .jks)").option("--keystore-alias <alias>","Android: Keystore key alias").option("--keystore-key-password <password>","Android: Keystore key password").option("--keystore-store-password <password>","Android: Keystore store password").option("--play-config <path>","Android: Path to Play Store service account JSON").option("--android-flavor <flavor>","Android: Product flavor to build (e.g. production). Required if your project has multiple flavors.").option("--in-app-update-priority <priority>","Android: Google Play in-app update priority for future releases (integer 0–5; higher = more urgent). Omit to leave Play’s existing value untouched.").option("--local","Save to .capgo-credentials.json in project root instead of global ~/.capgo-credentials/").option("--output-upload","Upload build outputs (IPA/APK/AAB) to Capgo storage and print download links").option("--no-output-upload","Do not upload build outputs (IPA/APK/AAB) to Capgo storage").option("--output-retention <duration>","Output link TTL: 1h to 7d (default: 1h). Examples: 1h, 6h, 2d").option("--skip-build-number-bump","Skip automatic build number/version code incrementing on future builds").option("--no-skip-build-number-bump","Re-enable automatic build number incrementing (default behavior)").option("--skip-marketing-version-bump","Skip automatic marketing version bump on future builds when the app is already released").option("--no-skip-marketing-version-bump","Re-enable automatic marketing version bump (default behavior)");ez.command("list").description(`List saved build credentials (passwords masked).
2059
+ Examples:
2060
+ iOS app with a widget extension:
2061
+ npx @capgo/cli@latest build credentials save \\
2062
+ --appId com.example.app --platform ios \\
2063
+ --certificate ./cert.p12 --p12-password "password" \\
2064
+ --ios-provisioning-profile ./profile.mobileprovision \\
2065
+ --ios-provisioning-profile com.example.widget=./Widget.mobileprovision \\
2066
+ --apple-key ./AuthKey.p8 --apple-key-id "KEY123" \\
2067
+ --apple-issuer-id "issuer-uuid" --apple-team-id "team-id"
2068
+
2069
+ Android:
2070
+ npx @capgo/cli@latest build credentials save \\
2071
+ --appId com.example.app --platform android \\
2072
+ --keystore ./release.keystore --keystore-alias "my-key" \\
2073
+ --keystore-key-password "key-pass" \\
2074
+ --play-config ./service-account.json`).action(WnA).optionsGroup("General options:").helpOption("-h, --help","Display help for command").option("--appId <appId>","App ID (e.g., com.example.app) (required)").option("--platform <platform>","Platform: ios or android (required)").option("--local","Save to .capgo-credentials.json in project root instead of global ~/.capgo-credentials/").optionsGroup("iOS options:").option("--certificate <path>","iOS: Path to .p12 certificate file").option("--ios-provisioning-profile <mapping>","iOS: Provisioning profile path or bundleId=path (repeatable)",eO,[]).option("--p12-password <password>","iOS: Certificate password (optional if cert has no password)").option("--apple-key <path>","iOS: Path to .p8 App Store Connect API key").option("--apple-key-id <id>","iOS: App Store Connect API Key ID").option("--apple-issuer-id <id>","iOS: App Store Connect Issuer ID").option("--apple-team-id <id>","iOS: App Store Connect Team ID").addOption(new Z7("--ios-distribution <mode>","iOS: Distribution mode").choices(["app_store","ad_hoc"]).default("app_store")).option("--apple-id <email>","iOS: Apple ID email for app-specific password uploads (alternative to App Store Connect API key)").option("--apple-app-specific-password <password>","iOS: App-specific password (xxxx-xxxx-xxxx-xxxx) for TestFlight uploads").option("--apple-app-id <id>","iOS: Numeric App Store Connect app id (required together with --apple-id and --apple-app-specific-password)").optionsGroup("Android options:").option("--keystore <path>","Android: Path to keystore file (.keystore or .jks)").option("--keystore-alias <alias>","Android: Keystore key alias").option("--keystore-key-password <password>","Android: Keystore key password").option("--keystore-store-password <password>","Android: Keystore store password").option("--play-config <path>","Android: Path to Play Store service account JSON").option("--android-flavor <flavor>","Android: Product flavor to build (e.g. production). Required if your project has multiple flavors.").option("--in-app-update-priority <priority>","Android: Google Play in-app update priority for future releases (integer 0–5; higher = more urgent). Omit to leave Play’s existing value untouched.").optionsGroup("Build defaults:").option("--output-upload","Upload build outputs (IPA/APK/AAB) to Capgo storage and print download links").option("--no-output-upload","Do not upload build outputs (IPA/APK/AAB) to Capgo storage").option("--output-retention <duration>","Output link TTL: 1h to 7d (default: 1h). Examples: 1h, 6h, 2d").option("--skip-build-number-bump","Skip automatic build number/version code incrementing on future builds").option("--no-skip-build-number-bump","Re-enable automatic build number incrementing (default behavior)").option("--skip-marketing-version-bump","Skip automatic marketing version bump on future builds when the app is already released").option("--no-skip-marketing-version-bump","Re-enable automatic marketing version bump (default behavior)");ez.command("list").summary("List saved credentials with secrets masked").description(`List saved build credentials (passwords masked).
2076
2075
 
2077
2076
  Shows what credentials are currently saved (both global and local).
2078
2077
 
2079
2078
  Examples:
2080
- npx @capgo/cli build credentials list # List all apps
2081
- npx @capgo/cli build credentials list --appId com.example.app # List specific app`).action(HnA).option("--appId <appId>","App ID to list (optional, lists all if omitted)").option("--local","List credentials from local .capgo-credentials.json only");ez.command("clear").description(`Clear saved build credentials.
2079
+ npx @capgo/cli@latest build credentials list
2080
+ npx @capgo/cli@latest build credentials list --appId com.example.app
2081
+ npx @capgo/cli@latest build credentials list --local`).action(HnA).option("--appId <appId>","App ID to list (optional, lists all if omitted)").option("--local","List credentials from local .capgo-credentials.json only");ez.command("clear").summary("Remove saved build credentials").description(`Clear saved build credentials.
2082
2082
 
2083
2083
  Remove credentials from storage.
2084
2084
  Use --appId and --platform to target specific credentials.
2085
2085
 
2086
2086
  Examples:
2087
- npx @capgo/cli build credentials clear # Clear all apps (global)
2088
- npx @capgo/cli build credentials clear --local # Clear local credentials
2089
- npx @capgo/cli build credentials clear --appId com.example.app --platform ios`).action(FnA).option("--appId <appId>","App ID to clear (optional, clears all apps if omitted)").option("--platform <platform>","Platform to clear: ios or android (optional, clears all platforms if omitted)").option("--local","Clear from local .capgo-credentials.json instead of global");ez.command("update").description(`Update specific credentials without providing all of them again.
2087
+ npx @capgo/cli@latest build credentials clear
2088
+ npx @capgo/cli@latest build credentials clear --local
2089
+ npx @capgo/cli@latest build credentials clear --appId com.example.app --platform ios`).action(FnA).option("--appId <appId>","App ID to clear (optional, clears all apps if omitted)").option("--platform <platform>","Platform to clear: ios or android (optional, clears all platforms if omitted)").option("--local","Clear from local .capgo-credentials.json instead of global");ez.command("update").summary("Update selected saved credential fields").description(`Update specific credentials without providing all of them again.
2090
2090
 
2091
2091
  Update existing credentials by providing only the fields you want to change.
2092
2092
  Platform is auto-detected from the options you provide.
2093
2093
 
2094
2094
  Examples:
2095
- npx @capgo/cli build credentials update --ios-provisioning-profile ./new-profile.mobileprovision
2096
- npx @capgo/cli build credentials update --local --keystore ./new-keystore.jks`).action(UnA).option("--appId <appId>","App ID (auto-detected from capacitor.config if omitted)").option("--platform <platform>","Platform: ios or android (auto-detected from options)").option("--local","Update local .capgo-credentials.json instead of global").option("--certificate <path>","Path to P12 certificate file").option("--ios-provisioning-profile <mapping>","Provisioning profile path or bundleId=path (repeatable, additive by default)",eO,[]).option("--overwrite-ios-provisioning-map","Replace the entire provisioning map instead of merging (default: merge)").option("--p12-password <password>","P12 certificate password").option("--apple-key <path>","Path to App Store Connect API key (.p8 file)").option("--apple-key-id <id>","App Store Connect API Key ID").option("--apple-issuer-id <id>","App Store Connect Issuer ID").option("--apple-team-id <id>","App Store Connect Team ID").option("--apple-id <email>","iOS: Apple ID email for app-specific password uploads (alternative to App Store Connect API key)").option("--apple-app-specific-password <password>","iOS: App-specific password (xxxx-xxxx-xxxx-xxxx) for TestFlight uploads").option("--apple-app-id <id>","iOS: Numeric App Store Connect app id (required together with --apple-id and --apple-app-specific-password)").addOption(new Z7("--ios-distribution <mode>","iOS: Distribution mode").choices(["app_store","ad_hoc"]).default("app_store")).option("--keystore <path>","Path to keystore file (.keystore or .jks)").option("--keystore-alias <alias>","Keystore key alias").option("--keystore-key-password <password>","Keystore key password").option("--keystore-store-password <password>","Keystore store password").option("--play-config <path>","Path to Google Play service account JSON").option("--android-flavor <flavor>","Android: Product flavor to build (e.g. production). Required if your project has multiple flavors.").option("--in-app-update-priority <priority>","Android: Google Play in-app update priority for future releases (integer 0–5; higher = more urgent).").option("--output-upload","Upload build outputs (IPA/APK/AAB) to Capgo storage and print download links").option("--no-output-upload","Do not upload build outputs (IPA/APK/AAB) to Capgo storage").option("--output-retention <duration>","Output link TTL: 1h to 7d. Examples: 1h, 6h, 2d").option("--skip-build-number-bump","Skip automatic build number/version code incrementing on future builds").option("--no-skip-build-number-bump","Re-enable automatic build number incrementing (default behavior)").option("--skip-marketing-version-bump","Skip automatic marketing version bump on future builds when the app is already released").option("--no-skip-marketing-version-bump","Re-enable automatic marketing version bump (default behavior)");ez.command("manage").description(`Interactively manage saved build credentials.
2095
+ npx @capgo/cli@latest build credentials update --ios-provisioning-profile ./new-profile.mobileprovision
2096
+ npx @capgo/cli@latest build credentials update --local --keystore ./new-keystore.jks`).action(UnA).optionsGroup("General options:").helpOption("-h, --help","Display help for command").option("--appId <appId>","App ID (auto-detected from capacitor.config if omitted)").option("--platform <platform>","Platform: ios or android (auto-detected from options)").option("--local","Update local .capgo-credentials.json instead of global").optionsGroup("iOS options:").option("--certificate <path>","Path to P12 certificate file").option("--ios-provisioning-profile <mapping>","Provisioning profile path or bundleId=path (repeatable, additive by default)",eO,[]).option("--overwrite-ios-provisioning-map","Replace the entire provisioning map instead of merging (default: merge)").option("--p12-password <password>","P12 certificate password").option("--apple-key <path>","Path to App Store Connect API key (.p8 file)").option("--apple-key-id <id>","App Store Connect API Key ID").option("--apple-issuer-id <id>","App Store Connect Issuer ID").option("--apple-team-id <id>","App Store Connect Team ID").option("--apple-id <email>","iOS: Apple ID email for app-specific password uploads (alternative to App Store Connect API key)").option("--apple-app-specific-password <password>","iOS: App-specific password (xxxx-xxxx-xxxx-xxxx) for TestFlight uploads").option("--apple-app-id <id>","iOS: Numeric App Store Connect app id (required together with --apple-id and --apple-app-specific-password)").addOption(new Z7("--ios-distribution <mode>","iOS: Distribution mode").choices(["app_store","ad_hoc"]).default("app_store")).optionsGroup("Android options:").option("--keystore <path>","Path to keystore file (.keystore or .jks)").option("--keystore-alias <alias>","Keystore key alias").option("--keystore-key-password <password>","Keystore key password").option("--keystore-store-password <password>","Keystore store password").option("--play-config <path>","Path to Google Play service account JSON").option("--android-flavor <flavor>","Android: Product flavor to build (e.g. production). Required if your project has multiple flavors.").option("--in-app-update-priority <priority>","Android: Google Play in-app update priority for future releases (integer 0–5; higher = more urgent).").optionsGroup("Build defaults:").option("--output-upload","Upload build outputs (IPA/APK/AAB) to Capgo storage and print download links").option("--no-output-upload","Do not upload build outputs (IPA/APK/AAB) to Capgo storage").option("--output-retention <duration>","Output link TTL: 1h to 7d. Examples: 1h, 6h, 2d").option("--skip-build-number-bump","Skip automatic build number/version code incrementing on future builds").option("--no-skip-build-number-bump","Re-enable automatic build number incrementing (default behavior)").option("--skip-marketing-version-bump","Skip automatic marketing version bump on future builds when the app is already released").option("--no-skip-marketing-version-bump","Re-enable automatic marketing version bump (default behavior)");ez.command("manage").summary("Manage saved credentials interactively").description(`Interactively manage saved build credentials.
2097
2097
 
2098
2098
  Browse stored credentials, view what's configured, export a CI/CD-ready .env file,
2099
2099
  or delete a platform's credentials. Reuses the same TUI as \`capgo init\`.
2100
2100
 
2101
2101
  Examples:
2102
- npx @capgo/cli build credentials manage
2103
- npx @capgo/cli build credentials manage --appId com.example.app
2104
- npx @capgo/cli build credentials manage --appId com.example.app --platform ios
2105
- npx @capgo/cli build credentials manage --local`).action(eHQ).option("--appId <appId>","App ID to manage (optional, prompts to pick if omitted)").option("--platform <platform>","Platform to manage: ios or android (optional, prompts to pick if omitted)").option("--local","Only browse local .capgo-credentials.json");ez.command("export <variable>").description(`Export one saved Builder credential or configuration value.
2102
+ npx @capgo/cli@latest build credentials manage
2103
+ npx @capgo/cli@latest build credentials manage --appId com.example.app
2104
+ npx @capgo/cli@latest build credentials manage --appId com.example.app --platform ios
2105
+ npx @capgo/cli@latest build credentials manage --local`).action(eHQ).option("--appId <appId>","App ID to manage (optional, prompts to pick if omitted)").option("--platform <platform>","Platform to manage: ios or android (optional, prompts to pick if omitted)").option("--local","Only browse local .capgo-credentials.json");ez.command("export <variable>").summary("Export one saved credential value").description(`Export one saved Builder credential or configuration value.
2106
2106
 
2107
2107
  Raw mode prints only the exact stored value to stdout with no trailing newline.
2108
2108
  All failures are written to stderr and exit with status 1. Saved local/global
2109
- configuration is used; environment variables are never exported.`).action(LnA).option("--app-id <appId>","App ID whose saved Builder value will be exported (required)").addOption(new Z7("--appId <appId>","Compatibility alias for --app-id").hideHelp()).option("--platform <platform>","Platform: ios or android (required when saved platform values are ambiguous)").option("--local","Export only from the project-local .capgo-credentials.json").option("--global","Export only from ~/.capgo-credentials/credentials.json").option("--file <path>","Write the value to a new file; existing destinations are never overwritten").option("--raw","Write only the exact stored value to stdout without a trailing newline").option("--decode-base64","Decode Base64 before file output; valid only with --file");ez.command("migrate").description(`Migrate legacy provisioning profile to the new multi-target format.
2109
+ configuration is used; environment variables are never exported.
2110
+
2111
+ Example:
2112
+ npx @capgo/cli@latest build credentials export BUILD_CERTIFICATE_BASE64 --app-id com.example.app --platform ios --raw`).action(LnA).option("--app-id <appId>","App ID whose saved Builder value will be exported (required)").addOption(new Z7("--appId <appId>","Compatibility alias for --app-id").hideHelp()).option("--platform <platform>","Platform: ios or android (required when saved platform values are ambiguous)").option("--local","Export only from the project-local .capgo-credentials.json").option("--global","Export only from ~/.capgo-credentials/credentials.json").option("--file <path>","Write the value to a new file; existing destinations are never overwritten").option("--raw","Write only the exact stored value to stdout without a trailing newline").option("--decode-base64","Decode Base64 before file output; valid only with --file");ez.command("migrate").summary("Migrate a legacy iOS provisioning profile").description(`Migrate legacy provisioning profile to the new multi-target format.
2110
2113
 
2111
2114
  Converts BUILD_PROVISION_PROFILE_BASE64 to CAPGO_IOS_PROVISIONING_MAP.
2112
2115
  Discovers the main bundle ID from your Xcode project automatically.
2113
2116
 
2114
2117
  Example:
2115
- npx @capgo/cli build credentials migrate --platform ios`).action(znA).option("--appId <appId>","App ID (auto-detected from capacitor.config if omitted)").option("--platform <platform>","Platform (only ios is supported)").option("--local","Migrate from local .capgo-credentials.json instead of global");q6.command("notifications").description("\uD83D\uDD14 Set up Capgo native notifications in your Capacitor app.").command("setup [appId]").description(`Install the Capgo notifications plugin, add Capacitor config, create a helper file, and run Capacitor sync.
2118
+ npx @capgo/cli@latest build credentials migrate --platform ios`).action(znA).option("--appId <appId>","App ID (auto-detected from capacitor.config if omitted)").option("--platform <platform>","Platform (only ios is supported)").option("--local","Migrate from local .capgo-credentials.json instead of global");q6.command("notifications").description("\uD83D\uDD14 Set up Capgo native notifications in your Capacitor app.").command("setup [appId]").description(`Install the Capgo notifications plugin, add Capacitor config, create a helper file, and run Capacitor sync.
2116
2119
 
2117
2120
  Before sending production notifications, configure Android and iOS push credentials in the Capgo app Notifications tab.
2118
2121