@capgo/cli 8.59.0 → 8.61.0
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 +791 -791
- package/dist/notify-app-ready-worker.js +2 -2
- package/dist/onboarding-worker.js +2 -2
- package/dist/package.json +4 -2
- package/dist/src/build/onboarding/login.d.ts +15 -0
- package/dist/src/build/onboarding/telemetry.d.ts +11 -1
- package/dist/src/build/onboarding/ui/components.d.ts +2 -0
- package/dist/src/build/onboarding/ui/import-distribution-analytics.d.ts +5 -0
- package/dist/src/build/onboarding/ui/ios-credential-action.d.ts +8 -0
- package/dist/src/build/onboarding/ui/login-gate.d.ts +19 -0
- package/dist/src/build/onboarding/ui/setup-method-route.d.ts +8 -0
- package/dist/src/build/onboarding/ui/shell.d.ts +5 -0
- package/dist/src/init/browser-login.d.ts +7 -0
- package/dist/src/schemas/onboarding.d.ts +1 -1
- package/dist/src/sdk.js +2 -2
- package/dist/src/user/whoami.d.ts +1 -0
- package/dist/updater-installed-worker.js +2 -2
- package/package.json +4 -2
package/dist/src/sdk.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{createRequire as cj0}from"node:module";var module={exports:{}};var uj0=Object.create;var{getPrototypeOf:bj0,defineProperty:sF,getOwnPropertyNames:yb}=Object;var w2=Object.prototype.hasOwnProperty;function B2($){return this[$]}var H0=($,D,Q)=>{var X=yb(D);for(let J of X)if(!w2.call($,J)&&J!=="default")sF($,J,{get:B2.bind(D,J),enumerable:!0});if(Q){for(let J of X)if(!w2.call(Q,J)&&J!=="default")sF(Q,J,{get:B2.bind(D,J),enumerable:!0});return Q}},hj0,gj0,x1=($,D,Q)=>{var X=$!=null&&typeof $==="object";if(X){var J=D?hj0??=new WeakMap:gj0??=new WeakMap,Y=J.get($);if(Y)return Y}Q=$!=null?uj0(bj0($)):{};let Z=D||!$||!$.__esModule?sF(Q,"default",{value:$,enumerable:!0}):Q;for(let F of yb($))if(!w2.call(Z,F))sF(Z,F,{get:B2.bind($,F),enumerable:!0});if(X)J.set($,Z);return Z};var E=($,D)=>()=>(D||$((D={exports:{}}).exports,D),D.exports);var mj0=($)=>$;function dj0($,D){this[$]=mj0.bind(null,D)}var X6=($,D)=>{for(var Q in D)sF($,Q,{get:D[Q],enumerable:!0,configurable:!0,set:dj0.bind(D,Q)})};var t=($,D)=>()=>($&&(D=$($=0)),D);var Q0=cj0(import.meta.url);var i$;var Q8=t(()=>{i$={name:"@capgo/cli",type:"module",version:"8.59.0",description:"A CLI to upload to capgo servers",author:"Martin martin@capgo.app",license:"Apache 2.0",homepage:"https://github.com/Cap-go/capgo/tree/main/cli#readme",repository:{type:"git",url:"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:notify-app-ready-background":"bun test ./test/test-notify-app-ready-background.mjs ./test/test-background-check-shutdown.mjs","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-add-getting-started":"bun test/test-app-add-getting-started.mjs","test:app-list-output-text":"bun test/test-app-list-output-text.mjs","test:app-todo":"bun test/test-app-todo.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-upload-recovery":"bun test/test-init-upload-error-gate.mjs && bun test/test-init-upload-monorepo-recovery.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:builder-app-id-config":"bun test/test-builder-app-id-config.mjs","test:capacitor-config-typescript7":"bun test/test-capacitor-config-typescript7.mjs","test:capacitor-config-native-import":"bun test/test-capacitor-config-native-import.mjs","test:cli-user-error-config":"bun test/test-cli-user-error-config.mjs","test:cordova-upload-mode":"bun test/test-cordova-upload-mode.mjs","test:init-monorepo-targeting":"bun run test:capacitor-config-target && bun run test:builder-app-id-config && bun run test:capacitor-config-typescript7 && bun run test:capacitor-config-native-import && 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:notify-app-ready-background && 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:cordova-upload-mode && 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-add-getting-started && bun run test:app-list-output-text && bun run test:app-todo && 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-list && bun run test:channel-add-exists && bun run test:wait-log && bun run test:init-guardrails && bun run test:init-upload-recovery && 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","test:channel-list":"bun test/test-channel-list.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","@vue/compiler-dom":"3.5.40","@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"}}});var G0;var S1=t(()=>{G0=class G0 extends Error{context;constructor($,D){super($);this.name="CliUserError",this.context=D}}});import{platform as nj0}from"node:os";import{version as pj0}from"node:process";function oj0($){for(let D=0;D<$.length;D++)if($.charCodeAt(D)>255)return!1;return!0}function fb($){if($.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 tj0($){if($.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($.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 E2($,D){if(D===void 0||D===null){if(R2.has($.toLowerCase()))throw new G0(fb($));throw new G0(`HTTP header "${$}" is missing or invalid.`)}if(typeof D!=="string"){if(R2.has($.toLowerCase()))throw new G0(fb($));throw new G0(`HTTP header "${$}" is missing or invalid.`)}if(!oj0(D)){if(R2.has($.toLowerCase()))throw new G0(tj0($));throw new G0(`HTTP header "${$}" contains invalid characters (only ASCII is allowed).`)}return D}function c1($){let D={capgo_api:ij0,"x-cli-version":i$.version,"x-cli-command":rj0,"x-cli-node":pj0,"x-cli-os":nj0()};if($)for(let[Q,X]of Object.entries($))D[Q]=E2(Q,X);return D}var ij0="2025-10-01",rj0="",R2;var a6=t(()=>{Q8();S1();R2=new Set(["authorization","capgkey","x-capgo-log-token"])});var ub,bb=($)=>{return $===12288||$>=65281&&$<=65376||$>=65504&&$<=65510},hb=($)=>{return $===8987||$===9001||$>=12272&&$<=12287||$>=12289&&$<=12350||$>=12441&&$<=12543||$>=12549&&$<=12591||$>=12593&&$<=12686||$>=12688&&$<=12771||$>=12783&&$<=12830||$>=12832&&$<=12871||$>=12880&&$<=19903||$>=65040&&$<=65049||$>=65072&&$<=65106||$>=65108&&$<=65126||$>=65128&&$<=65131||$>=127488&&$<=127490||$>=127504&&$<=127547||$>=127552&&$<=127560||$>=131072&&$<=196605||$>=196608&&$<=262141};var gb=t(()=>{ub=(()=>{let $=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;return(D)=>{let Q=0;$.lastIndex=0;while($.test(D))Q+=1;return D.length-Q}})()});var aj0,sj0,mb,ej0,db,$A0,DA0,QA0,cb=($,D={},Q={})=>{let X=D.limit??1/0,J=D.ellipsis??"",Y=D?.ellipsisWidth??(J?cb(J,QA0,Q).width:0),Z=0,F=Q.controlWidth??0,G=Q.tabWidth??8,U=Q.emojiWidth??2,W=2,q=Q.regularWidth??1,K=Q.wideWidth??2,H=[[$A0,q],[aj0,0],[sj0,F],[ej0,G],[db,U],[mb,K]],V=0,O=0,z=$.length,N=0,B=!1,L=z,M=Math.max(0,X-Y),w=0,R=0,x=0,_=0;$:while(!0){if(R>w||O>=z&&O>V){let j=$.slice(w,R)||$.slice(V,O);N=0;for(let k of j.replaceAll(DA0,"")){let v=k.codePointAt(0)||0;if(bb(v))_=2;else if(hb(v))_=K;else _=q;if(x+_>M)L=Math.min(L,Math.max(w,V)+N);if(x+_>X){B=!0;break $}N+=k.length,x+=_}w=R=0}if(O>=z)break $;for(let j=0,k=H.length;j<k;j++){let[v,g]=H[j];if(v.lastIndex=O,v.test($)){if(N=v===mb?ub($.slice(O,v.lastIndex)):v===db?1:v.lastIndex-O,_=N*g,x+_>M)L=Math.min(L,O+Math.floor((M-x)/g));if(x+_>X){B=!0;break $}x+=_,w=V,R=O,O=V=v.lastIndex;continue $}}O+=1}return{width:B?M:x,index:B?L:z,truncated:B,ellipsed:B&&X>=Y}},lb;var nb=t(()=>{gb();aj0=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y,sj0=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,mb=/(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/yu,ej0=/\t{1,1000}/y,db=/[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/yu,$A0=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,DA0=/\p{M}+/gu,QA0={limit:1/0,ellipsis:""},lb=cb});var XA0,JA0=($,D={})=>{return lb($,XA0,D).width},P8;var j2=t(()=>{nb();XA0={limit:1/0,ellipsis:"",ellipsisWidth:0},P8=JA0});function j7($,D,Q){return String($).normalize().split(UA0).map((X)=>GA0(X,D,Q)).join(`
|
|
1
|
+
import{createRequire as cj0}from"node:module";var module={exports:{}};var uj0=Object.create;var{getPrototypeOf:bj0,defineProperty:sF,getOwnPropertyNames:yb}=Object;var w2=Object.prototype.hasOwnProperty;function B2($){return this[$]}var H0=($,D,Q)=>{var X=yb(D);for(let J of X)if(!w2.call($,J)&&J!=="default")sF($,J,{get:B2.bind(D,J),enumerable:!0});if(Q){for(let J of X)if(!w2.call(Q,J)&&J!=="default")sF(Q,J,{get:B2.bind(D,J),enumerable:!0});return Q}},hj0,gj0,x1=($,D,Q)=>{var X=$!=null&&typeof $==="object";if(X){var J=D?hj0??=new WeakMap:gj0??=new WeakMap,Y=J.get($);if(Y)return Y}Q=$!=null?uj0(bj0($)):{};let Z=D||!$||!$.__esModule?sF(Q,"default",{value:$,enumerable:!0}):Q;for(let F of yb($))if(!w2.call(Z,F))sF(Z,F,{get:B2.bind($,F),enumerable:!0});if(X)J.set($,Z);return Z};var E=($,D)=>()=>(D||$((D={exports:{}}).exports,D),D.exports);var mj0=($)=>$;function dj0($,D){this[$]=mj0.bind(null,D)}var X6=($,D)=>{for(var Q in D)sF($,Q,{get:D[Q],enumerable:!0,configurable:!0,set:dj0.bind(D,Q)})};var t=($,D)=>()=>($&&(D=$($=0)),D);var Q0=cj0(import.meta.url);var i$;var Q8=t(()=>{i$={name:"@capgo/cli",type:"module",version:"8.61.0",description:"A CLI to upload to capgo servers",author:"Martin martin@capgo.app",license:"Apache 2.0",homepage:"https://github.com/Cap-go/capgo/tree/main/cli#readme",repository:{type:"git",url:"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:notify-app-ready-background":"bun test ./test/test-notify-app-ready-background.mjs ./test/test-background-check-shutdown.mjs","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-add-getting-started":"bun test/test-app-add-getting-started.mjs","test:app-list-output-text":"bun test/test-app-list-output-text.mjs","test:app-todo":"bun test/test-app-todo.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-upload-recovery":"bun test/test-init-upload-error-gate.mjs && bun test/test-init-upload-monorepo-recovery.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:builder-app-id-config":"bun test/test-builder-app-id-config.mjs","test:capacitor-config-typescript7":"bun test/test-capacitor-config-typescript7.mjs","test:capacitor-config-native-import":"bun test/test-capacitor-config-native-import.mjs","test:cli-user-error-config":"bun test/test-cli-user-error-config.mjs","test:cordova-upload-mode":"bun test/test-cordova-upload-mode.mjs","test:init-monorepo-targeting":"bun run test:capacitor-config-target && bun run test:builder-app-id-config && bun run test:capacitor-config-typescript7 && bun run test:capacitor-config-native-import && 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-credential-action":"bun test/test-ios-credential-action.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:notify-app-ready-background && 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:cordova-upload-mode && 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-add-getting-started && bun run test:app-list-output-text && bun run test:app-todo && 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:builder-login-gate && 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-list && bun run test:channel-add-exists && bun run test:wait-log && bun run test:init-guardrails && bun run test:init-upload-recovery && 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-credential-action && 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:builder-login-gate":"bun test/test-builder-login-gate.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","test:channel-list":"bun test/test-channel-list.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","@vue/compiler-dom":"3.5.40","@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"}}});var G0;var S1=t(()=>{G0=class G0 extends Error{context;constructor($,D){super($);this.name="CliUserError",this.context=D}}});import{platform as nj0}from"node:os";import{version as pj0}from"node:process";function oj0($){for(let D=0;D<$.length;D++)if($.charCodeAt(D)>255)return!1;return!0}function fb($){if($.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 tj0($){if($.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($.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 E2($,D){if(D===void 0||D===null){if(R2.has($.toLowerCase()))throw new G0(fb($));throw new G0(`HTTP header "${$}" is missing or invalid.`)}if(typeof D!=="string"){if(R2.has($.toLowerCase()))throw new G0(fb($));throw new G0(`HTTP header "${$}" is missing or invalid.`)}if(!oj0(D)){if(R2.has($.toLowerCase()))throw new G0(tj0($));throw new G0(`HTTP header "${$}" contains invalid characters (only ASCII is allowed).`)}return D}function c1($){let D={capgo_api:ij0,"x-cli-version":i$.version,"x-cli-command":rj0,"x-cli-node":pj0,"x-cli-os":nj0()};if($)for(let[Q,X]of Object.entries($))D[Q]=E2(Q,X);return D}var ij0="2025-10-01",rj0="",R2;var a6=t(()=>{Q8();S1();R2=new Set(["authorization","capgkey","x-capgo-log-token"])});var ub,bb=($)=>{return $===12288||$>=65281&&$<=65376||$>=65504&&$<=65510},hb=($)=>{return $===8987||$===9001||$>=12272&&$<=12287||$>=12289&&$<=12350||$>=12441&&$<=12543||$>=12549&&$<=12591||$>=12593&&$<=12686||$>=12688&&$<=12771||$>=12783&&$<=12830||$>=12832&&$<=12871||$>=12880&&$<=19903||$>=65040&&$<=65049||$>=65072&&$<=65106||$>=65108&&$<=65126||$>=65128&&$<=65131||$>=127488&&$<=127490||$>=127504&&$<=127547||$>=127552&&$<=127560||$>=131072&&$<=196605||$>=196608&&$<=262141};var gb=t(()=>{ub=(()=>{let $=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;return(D)=>{let Q=0;$.lastIndex=0;while($.test(D))Q+=1;return D.length-Q}})()});var aj0,sj0,mb,ej0,db,$A0,DA0,QA0,cb=($,D={},Q={})=>{let X=D.limit??1/0,J=D.ellipsis??"",Y=D?.ellipsisWidth??(J?cb(J,QA0,Q).width:0),Z=0,F=Q.controlWidth??0,G=Q.tabWidth??8,U=Q.emojiWidth??2,W=2,q=Q.regularWidth??1,K=Q.wideWidth??2,H=[[$A0,q],[aj0,0],[sj0,F],[ej0,G],[db,U],[mb,K]],V=0,O=0,z=$.length,N=0,B=!1,L=z,M=Math.max(0,X-Y),w=0,R=0,x=0,_=0;$:while(!0){if(R>w||O>=z&&O>V){let j=$.slice(w,R)||$.slice(V,O);N=0;for(let k of j.replaceAll(DA0,"")){let v=k.codePointAt(0)||0;if(bb(v))_=2;else if(hb(v))_=K;else _=q;if(x+_>M)L=Math.min(L,Math.max(w,V)+N);if(x+_>X){B=!0;break $}N+=k.length,x+=_}w=R=0}if(O>=z)break $;for(let j=0,k=H.length;j<k;j++){let[v,g]=H[j];if(v.lastIndex=O,v.test($)){if(N=v===mb?ub($.slice(O,v.lastIndex)):v===db?1:v.lastIndex-O,_=N*g,x+_>M)L=Math.min(L,O+Math.floor((M-x)/g));if(x+_>X){B=!0;break $}x+=_,w=V,R=O,O=V=v.lastIndex;continue $}}O+=1}return{width:B?M:x,index:B?L:z,truncated:B,ellipsed:B&&X>=Y}},lb;var nb=t(()=>{gb();aj0=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y,sj0=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,mb=/(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/yu,ej0=/\t{1,1000}/y,db=/[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/yu,$A0=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,DA0=/\p{M}+/gu,QA0={limit:1/0,ellipsis:""},lb=cb});var XA0,JA0=($,D={})=>{return lb($,XA0,D).width},P8;var j2=t(()=>{nb();XA0={limit:1/0,ellipsis:"",ellipsisWidth:0},P8=JA0});function j7($,D,Q){return String($).normalize().split(UA0).map((X)=>GA0(X,D,Q)).join(`
|
|
2
2
|
`)}var XK="\x1B",tb="",YA0=39,I2="\x07",ab="[",ZA0="]",sb="m",T2,pb,ib=($)=>{if($>=30&&$<=37)return 39;if($>=90&&$<=97)return 39;if($>=40&&$<=47)return 49;if($>=100&&$<=107)return 49;if($===1||$===2)return 22;if($===3)return 23;if($===4)return 24;if($===7)return 27;if($===8)return 28;if($===9)return 29;if($===0)return 0;return},rb=($)=>`${XK}${ab}${$}${sb}`,ob=($)=>`${XK}${T2}${$}${I2}`,A2=($,D,Q)=>{let X=D[Symbol.iterator](),J=!1,Y=!1,Z=$.at(-1),F=Z===void 0?0:P8(Z),G=X.next(),U=X.next(),W=0;while(!G.done){let q=G.value,K=P8(q);if(F+K<=Q)$[$.length-1]+=q;else $.push(q),F=0;if(q===XK||q===tb)J=!0,Y=D.startsWith(T2,W+1);if(J){if(Y){if(q===I2)J=!1,Y=!1}else if(q===sb)J=!1}else if(F+=K,F===Q&&!U.done)$.push(""),F=0;G=U,U=X.next(),W+=q.length}if(Z=$.at(-1),!F&&Z!==void 0&&Z.length&&$.length>1)$[$.length-2]+=$.pop()},FA0=($)=>{let D=$.split(" "),Q=D.length;while(Q){if(P8(D[Q-1]))break;Q--}if(Q===D.length)return $;return D.slice(0,Q).join(" ")+D.slice(Q).join("")},GA0=($,D,Q={})=>{if(Q.trim!==!1&&$.trim()==="")return"";let X="",J,Y,Z=$.split(" "),F=[""],G=0;for(let q=0;q<Z.length;q++){let K=Z[q];if(Q.trim!==!1){let V=F.at(-1)??"",O=V.trimStart();if(V.length!==O.length)F[F.length-1]=O,G=P8(O)}if(q!==0){if(G>=D&&(Q.wordWrap===!1||Q.trim===!1))F.push(""),G=0;if(G||Q.trim===!1)F[F.length-1]+=" ",G++}let H=P8(K);if(Q.hard&&H>D){let V=D-G,O=1+Math.floor((H-V-1)/D);if(Math.floor((H-1)/D)<O)F.push("");A2(F,K,D),G=P8(F.at(-1)??"");continue}if(G+H>D&&G&&H){if(Q.wordWrap===!1&&G<D){A2(F,K,D),G=P8(F.at(-1)??"");continue}F.push(""),G=0}if(G+H>D&&Q.wordWrap===!1){A2(F,K,D),G=P8(F.at(-1)??"");continue}F[F.length-1]+=K,G+=H}if(Q.trim!==!1)F=F.map((q)=>FA0(q));let U=F.join(`
|
|
3
3
|
`),W=!1;for(let q=0;q<U.length;q++){let K=U[q];if(X+=K,!W){if(W=K>="\uD800"&&K<="\uDBFF",W)continue}else W=!1;if(K===XK||K===tb){pb.lastIndex=q+1;let V=pb.exec(U)?.groups;if(V?.code!==void 0){let O=Number.parseFloat(V.code);J=O===YA0?void 0:O}else if(V?.uri!==void 0)Y=V.uri.length===0?void 0:V.uri}if(U[q+1]===`
|
|
4
4
|
`){if(Y)X+=ob("");let H=J?ib(J):void 0;if(J&&H)X+=rb(H)}else if(K===`
|
|
@@ -394,7 +394,7 @@ tell application "System Events" to get value of property list item "CFBundleNam
|
|
|
394
394
|
`)}function uZ0($){return[`Bundle upload timed out after ${Math.round($/1000)}s.`,"The standard upload has to finish the whole transfer within this window and does not retry, so a large bundle or a slow connection can trip it.","What you can do:","1. Retry with the resumable upload, which uploads in chunks and retries automatically: npx @capgo/cli@latest bundle upload --tus","2. Or raise the limit for the standard upload: npx @capgo/cli@latest bundle upload --timeout <milliseconds>"].join(`
|
|
395
395
|
`)}function F0($){if(!$)return"Unknown error";if(QZ($).isSecurityPolicyError)return q_($);let Q=$;if(typeof $==="string")return $;if($ instanceof Error){let X=Q.message||Q.cause?.message||Q.stack||$.name,J=Q.cause?.name,Y=X.toLowerCase();if(Y.includes("fetch failed")||Y.includes("failed to fetch")||Y.includes("connect timeout")||Y.includes("network")||J?.startsWith("UND_ERR"))return`Network error: ${X}${Q.code?` (code ${Q.code})`:""}. Check your network connection and API endpoint availability.`;let Z=Q.status||Q.statusCode;return[X,Q.code?`Code: ${Q.code}`:void 0,Z?`Status: ${Z}`:void 0].filter(Boolean).join(" | ")||$.name}if(Q.message){let X=[Q.message,Q.code?`Code: ${Q.code}`:void 0,Q.status||Q.statusCode?`Status: ${Q.status||Q.statusCode}`:void 0].filter(Boolean).join(" | "),J=Q.message.toLowerCase();if(J.includes("fetch failed")||J.includes("failed to fetch")||Q.error==="Failed to fetch")return`Network error: ${X}. Check your network connection and API endpoint availability.`;if(Q.details||Q.hint||Q.error)return`${X}${X?" | ":""}${Q.error?typeof Q.error==="string"?Q.error:Q.error.message??"":""}${Q.details?`Details: ${Q.details}`:""}${Q.hint?`Hint: ${Q.hint}`:""}`.trim();return X}if(typeof Q.error==="string"&&Q.error.length>0)return Q.error;if(Q.error&&typeof Q.error==="object"&&typeof Q.error.message==="string"&&Q.error.message.length>0)return Q.error.message;return`
|
|
396
396
|
${yZ0.default.render($)}`}async function dL($,D,Q=!1){let{data:X,error:J}=await VK(()=>$.rpc("reject_access_due_to_2fa_for_org",{org_id:D}));if(J){if(!Q&&!_9(J))T0.error(`Cannot check 2FA compliance: ${J.message}`);if(_9(J)){await OK({silent:Q,telemetryFunctionName:"check2FAAccessForOrg"});return}zK(J)}if(X){if(!Q)T0.error(`\uD83D\uDD10 Access Denied: 2FA Required. Enable 2FA at ${sU("/settings/account")}`);throw Error("2FA required for this organization")}}function U4({silent:$=!1,stdinIsTTY:D=!!vZ0.isTTY,stdoutIsTTY:Q=!!kZ0.isTTY,ci:X=y_.isCI}={}){return!$&&D&&Q&&!X}function Y51($={}){let D=$.ci??y_.isCI,Q=$.stdinIsTTY??!!vZ0.isTTY,X=$.stdoutIsTTY??!!kZ0.isTTY,J=$.platform??SZ0(),Y="display"in $?$.display:FX.DISPLAY;if(D||!Q||!X)return!1;if(J==="linux"&&!Y)return!1;return!0}async function Z51($){if(!Y51())return;try{await(await Promise.resolve().then(() => (JZ(),tU))).default($)}catch(D){if(D?.code==="ENOENT")return}}function $$($){if(TQ0($))return AQ0($);else if(CQ0($))return IQ0($);return $}function F51($=$$(F4()),D=void 0){let Q=D?.split(",")[0],X=Q??I1($,G4);if(!F$(X)){let Y=Q?`Package.json at ${X} does not exist`:`No package.json found at ${X}. Run this command from your project root (the folder that contains package.json), or pass --package-json <path> to point at it (for example in a monorepo).`;throw T0.error(Y),Error(Y)}let J=YD(X);return JSON.parse(J)}function L5($=$$(F4()),D=void 0){return F51($,D).version??""}function G51($){let D=$.replace("^","").replace("~","");if(ZG(D))try{let Q=i1(D);return J8(Q)}catch{return D}return D}async function w6($,D=F4(),Q){let X=Q?Q.split(",").map((Z)=>Z.trim()).filter(Boolean):[],J=[],Y=(Z)=>{let F=O5(Z);if(!J.includes(F))J.push(F)};for(let Z of X){let F=O5(D,Z);if(F$(F))Y(ZZ(F))}Y(O5(D)),Y(F4());for(let Z of J)try{let F=`${$}/package.json`,{createRequire:G}=await import("node:module"),W=G(I1(Z,"package.json")).resolve(F),q=JSON.parse(YD(W,"utf-8"));if(q.version)return q.version}catch{}for(let Z of J){let F=Z,G=UZ.parse(F).root;while(F!==G){let U=I1(F,"node_modules",$,G4);if(F$(U))try{let q=JSON.parse(YD(U,"utf-8"));if(q.version)return q.version}catch{}let W=ZZ(F);if(W===F)break;F=W}}if($==="@capgo/capacitor-updater"){let Z=null,F=I1(D,"ios","App","Podfile");if(F$(F))try{let U=YD(F,"utf-8").match(/pod\s+['"]CapgoCapacitorUpdater['"],\s*:path\s*=>\s*['"]([^'"]+)['"]/);if(U?.[1])Z=O5(I1(D,"ios","App",U[1]))}catch{}if(!Z){let G=I1(D,"android","capacitor.settings.gradle");if(F$(G))try{let W=YD(G,"utf-8").match(/project\(':capgo-capacitor-updater'\)\.projectDir\s*=\s*new\s+File\(['"]([^'"]+)['"]/);if(W?.[1])Z=O5(I1(D,"android",W[1])).replace(/\/android$/,"")}catch{}}if(Z){let G=I1(Z,G4);if(F$(G))try{let U=JSON.parse(YD(G,"utf-8"));if(U.version)return U.version}catch{}}}try{let Z=Q?Q.split(",").map((U)=>U.trim()).filter(Boolean).join(","):Q,G=(await cL(D,Z)).get($);if(G)return G}catch{}return null}async function cL($=$$(F4()),D=void 0){let Q=D?.split(",").map((Y)=>Y.trim()).filter(Boolean);if(Q??=[I1($,G4)],Q){for(let Y of Q)if(!F$(Y)){let Z=`Package.json at ${Y} does not exist`;throw T0.error(Z),Error(Z)}}let X=new Map,{createRequire:J}=await import("node:module");for(let Y of Q){let Z=YD(Y),F=JSON.parse(Z),G=ZZ(Y),U=(W,q)=>{try{let O=J(I1(G,"package.json")).resolve(`${W}/package.json`),z=JSON.parse(YD(O,"utf-8"));if(z.version)return z.version}catch{}let K=G,H=UZ.parse(K).root;while(K!==H){let V=I1(K,"node_modules",W,G4);if(F$(V))try{let z=JSON.parse(YD(V,"utf-8"));if(z.version)return z.version}catch{}let O=ZZ(K);if(O===K)break;K=O}return G51(q)};for(let W in F.dependencies)X.set(W,U(W,F.dependencies[W]));for(let W in F.devDependencies)X.set(W,U(W,F.devDependencies[W]))}return X}async function U51($=$$(F4()),D=void 0){let Q=D?.split(",").map((J)=>J.trim()).filter(Boolean);if(Q??=[I1($,G4)],Q){for(let J of Q)if(!F$(J)){let Y=`Package.json at ${J} does not exist`;throw T0.error(Y),Error(Y)}}let X=new Map;for(let J of Q){let Y=YD(J),Z=JSON.parse(Y);for(let F in Z.dependencies??{})if(typeof Z.dependencies[F]==="string")X.set(F,Z.dependencies[F]);for(let F in Z.devDependencies??{})if(typeof Z.devDependencies[F]==="string")X.set(F,Z.devDependencies[F])}return X}function W51($){if(!$)return!1;if($.config&&Object.keys($.config).length>0)return!0;return!!$.path&&F$($.path)}async function bZ0($,D=!1){let Q=lL;try{let X=await $();if(!W51(X)){if(!D)T0.error(Q);throw new G0(Q)}return X}catch(X){if(X instanceof G0)throw X;let J=F0(X);if(!D)T0.error(`${Q}: ${J}`);throw new G0(Q,{cause:J})}}function O1($=!1){return bZ0(eA,$)}function hD($=!1){return bZ0($I,$)}async function q51($,D){let Q=await hD();if(Q?.config)Q.config.plugins??={},Q.config.plugins.extConfig??={},Q.config.plugins[$]??={},Q.config.plugins[$]={...Q.config.plugins[$],...D},await DI($,Q);return Q}async function hZ0($){return q51("CapacitorUpdater",$)}async function rD($=!1){try{let D=await O1($),Q={host:D?.config?.plugins?.CapacitorUpdater?.localHost||RZ0,hostWeb:D?.config?.plugins?.CapacitorUpdater?.localWebHost||z5,hostFilesApi:D?.config?.plugins?.CapacitorUpdater?.localApiFiles||EZ0,hostApi:D?.config?.plugins?.CapacitorUpdater?.localApi||uL};if(D?.config?.plugins?.CapacitorUpdater?.localSupa&&D?.config?.plugins?.CapacitorUpdater?.localSupaAnon){if(!$)T0.info("Using custom supabase instance from capacitor.config.json");Q.supaKey=D?.config?.plugins?.CapacitorUpdater?.localSupaAnon,Q.supaHost=D?.config?.plugins?.CapacitorUpdater?.localSupa}return Q}catch{return{host:RZ0,hostWeb:z5,hostFilesApi:EZ0,hostApi:uL}}}function AZ0($){return typeof $==="object"&&$!==null}function K51($){if(!AZ0($))return!1;let D=$.capacitor;if(AZ0(D)&&(D.ios!==void 0||D.android!==void 0))return!0;return!1}function H51($){if(F$(I1($,"plugin.xml")))return!0;let D=I1($,G4);if(!F$(D))return!1;try{return K51(JSON.parse(YD(D,"utf-8")))}catch{return!1}}async function qX($=!1,D){let Q=(J)=>{let Y={...J};return Ar(Y,void 0,$),Y};if(!D&&x_)return Q(x_);if(!D&&yL)return yL.then(Q);let X=(async()=>{let J=await rD($);try{let Y=N5(),Z=await fetch(`${J.hostApi}/private/config`,{...D?{signal:D}:{},headers:c1(Y?{capgkey:Y}:void 0)});if(!Z.ok)throw Error(`HTTP error! status: ${Z.status}`);let G={...await Z.json(),...J};if(!D)x_=G;return{...G}}catch{if(!$)T0.info(`Local config ${F0(J)}`);return{...J}}finally{if(!D)yL=null}})();if(!D)yL=X;return X.then(Q)}async function mZ0(){let $=await rD();try{let D=N5(),Q=await fetch(`${$.hostFilesApi}/files/config`,{headers:c1(D?{capgkey:D}:void 0)});if(!Q.ok)throw Error(`HTTP error! status: ${Q.status}`);return await Q.json()}catch{return{partialUpload:!1,TUSUpload:!1,partialUploadForced:!1,TUSUploadForced:!1,maxUploadLength:X51,maxChunkSize:J51,alertUploadSize:Q51}}}function FZ($){let D=new URL($);if(!["http:","https:"].includes(D.protocol))throw Error("Invalid Supabase host protocol");if(D.username||D.password)throw Error("Supabase host must not include credentials");if(D.search||D.hash)throw Error("Supabase host must not include query parameters or fragments");let Q=S8(D.pathname);return`${D.origin}${Q}`}function nL($){if(!$||typeof $!=="object")return"";let D=$;return[D.error,D.message,D.status].filter(Boolean).join(" | ")}function IZ0($,D){let Q=$.indexOf(D);if(Q<0)return $;return $.slice(Q+D.length).replace(/^:\s*/,"").split(`
|
|
397
|
-
`)[0].trim()}async function DW($){let D=await KX($);if(D?.error==="channel_zip_required"||D?.error==="channel_delta_required")return D.message||D.error;let Q=$ instanceof Error?$.message:String($??"");if(Q.includes("CHANNEL_ZIP_REQUIRED"))return IZ0(Q,"CHANNEL_ZIP_REQUIRED");if(Q.includes("CHANNEL_DELTA_REQUIRED"))return IZ0(Q,"CHANNEL_DELTA_REQUIRED");return null}function GX($){if(!$)return!1;try{let D=new URL(FZ($)).hostname.toLowerCase();return D==="sb.capgo.app"||D==="xvwzpoazmxkqosrdewyv.supabase.co"||D==="ibwjdnhknbkcqfbabwei.supabase.co"||D==="aucsybvnhavogdmzwtcw.supabase.co"}catch{return!1}}function dZ0($){if($.supaHost&&$.supaKey&&$.hostApi===uL&&!GX($.supaHost))return`${FZ($.supaHost)}/functions/v1`;return $.hostApi}function z8($){let D=$?.context;return typeof D?.status==="number"?D.status:void 0}async function KX($){let D=$?.context;if(!D||typeof D.clone!=="function")return null;try{let Q=await D.clone().text();try{return JSON.parse(Q)}catch{return Q?{message:Q}:null}}catch{return null}}async function M5($){let D=await KX($);if(D){let Q=nL(D);if(Q)return Q}return F0($)}async function q1($,D){let Q=(D.method??"POST").toUpperCase(),X,J=D.supaAnon;if(D.supaHost&&D.supaAnon&&!GX(D.supaHost))X=`${FZ(D.supaHost)}/functions/v1`;else{let F=await qX(!0);if(J=D.supaAnon??F.supaKey,F.supaHost&&F.supaKey&&F.hostApi===uL&&!GX(F.supaHost)&&!(D.supaHost&&GX(D.supaHost)))X=`${FZ(F.supaHost)}/functions/v1`;else if(D.useFilesHost)X=F.hostFilesApi;else X=F.hostApi}let Y=X.includes("/functions/v1"),Z=`${S8(X)}/${$.replace(/^\//,"")}`;try{let F=await fetch(Z,{method:Q,headers:c1({"Content-Type":"application/json",Authorization:Y&&J?`Bearer ${J}`:D.apikey,capgkey:D.apikey}),body:Q==="GET"||Q==="HEAD"?void 0:typeof D.body==="string"?D.body:JSON.stringify(D.body??{}),signal:D.signal});if(!F.ok)return{data:null,error:new _D.FunctionsHttpError(F)};return{data:(F.headers.get("content-type")??"").includes("application/json")?await F.json().catch(()=>null):await F.text().catch(()=>null),error:null}}catch(F){return{data:null,error:F instanceof Error?F:Error(String(F))}}}async function QW($,D=!0){if($?.supaHost&&$?.supaAnon){if(GX($.supaHost))return(await rD(D)).hostApi;return`${FZ($.supaHost)}/functions/v1`}let Q=await rD(D);if(Q.supaHost&&Q.supaKey)return dZ0(Q);return(await qX(D)).hostApi}async function U1($,D,Q,X=!1,J=!0,Y){let Z=await qX(X,Y);if(D&&Q){if(!X)T0.info("Using custom supabase instance from provided options");Z.supaHost=D,Z.supaKey=Q}if(!Z.supaHost||!Z.supaKey)
|
|
397
|
+
`)[0].trim()}async function DW($){let D=await KX($);if(D?.error==="channel_zip_required"||D?.error==="channel_delta_required")return D.message||D.error;let Q=$ instanceof Error?$.message:String($??"");if(Q.includes("CHANNEL_ZIP_REQUIRED"))return IZ0(Q,"CHANNEL_ZIP_REQUIRED");if(Q.includes("CHANNEL_DELTA_REQUIRED"))return IZ0(Q,"CHANNEL_DELTA_REQUIRED");return null}function GX($){if(!$)return!1;try{let D=new URL(FZ($)).hostname.toLowerCase();return D==="sb.capgo.app"||D==="xvwzpoazmxkqosrdewyv.supabase.co"||D==="ibwjdnhknbkcqfbabwei.supabase.co"||D==="aucsybvnhavogdmzwtcw.supabase.co"}catch{return!1}}function dZ0($){if($.supaHost&&$.supaKey&&$.hostApi===uL&&!GX($.supaHost))return`${FZ($.supaHost)}/functions/v1`;return $.hostApi}function z8($){let D=$?.context;return typeof D?.status==="number"?D.status:void 0}async function KX($){let D=$?.context;if(!D||typeof D.clone!=="function")return null;try{let Q=await D.clone().text();try{return JSON.parse(Q)}catch{return Q?{message:Q}:null}}catch{return null}}async function M5($){let D=await KX($);if(D){let Q=nL(D);if(Q)return Q}return F0($)}async function q1($,D){let Q=(D.method??"POST").toUpperCase(),X,J=D.supaAnon;if(D.supaHost&&D.supaAnon&&!GX(D.supaHost))X=`${FZ(D.supaHost)}/functions/v1`;else{let F=await qX(!0);if(J=D.supaAnon??F.supaKey,F.supaHost&&F.supaKey&&F.hostApi===uL&&!GX(F.supaHost)&&!(D.supaHost&&GX(D.supaHost)))X=`${FZ(F.supaHost)}/functions/v1`;else if(D.useFilesHost)X=F.hostFilesApi;else X=F.hostApi}let Y=X.includes("/functions/v1"),Z=`${S8(X)}/${$.replace(/^\//,"")}`;try{let F=await fetch(Z,{method:Q,headers:c1({"Content-Type":"application/json",Authorization:Y&&J?`Bearer ${J}`:D.apikey,capgkey:D.apikey}),body:Q==="GET"||Q==="HEAD"?void 0:typeof D.body==="string"?D.body:JSON.stringify(D.body??{}),signal:D.signal});if(!F.ok)return{data:null,error:new _D.FunctionsHttpError(F)};return{data:(F.headers.get("content-type")??"").includes("application/json")?await F.json().catch(()=>null):await F.text().catch(()=>null),error:null}}catch(F){return{data:null,error:F instanceof Error?F:Error(String(F))}}}async function QW($,D=!0){if($?.supaHost&&$?.supaAnon){if(GX($.supaHost))return(await rD(D)).hostApi;return`${FZ($.supaHost)}/functions/v1`}let Q=await rD(D);if(Q.supaHost&&Q.supaKey)return dZ0(Q);return(await qX(D)).hostApi}async function U1($,D,Q,X=!1,J=!0,Y){let Z=await qX(X,Y);if(D&&Q){if(!X)T0.info("Using custom supabase instance from provided options");Z.supaHost=D,Z.supaKey=Q}if(!Z.supaHost||!Z.supaKey){if(!X)T0.error(jZ0);throw new G0(jZ0,{missingSupaHost:!Z.supaHost,missingSupaKey:!Z.supaKey})}let F=FZ(Z.supaHost);return lB(F,Z.supaKey,{auth:{persistSession:!1},global:{headers:{capgkey:E2("capgkey",$)},...Nr()&&J?{fetch:jr()}:{}}})}async function V51($,D){let{data:Q}=await $.rpc("is_paying_org",{orgid:D}).single();return Q||!1}async function O51($,D){let{data:Q}=await $.rpc("is_trial_org",{orgid:D}).single();return Q||0}async function z51($,D,Q){let{data:X}=await $.rpc("has_usage_credits_org",Q?{orgid:D,appid:Q}:{orgid:D}).single();return X||!1}function L51($){let{trialDays:D,isPaying:Q,hasCredits:X,warning:J=!0}=$;return!!J&&D>0&&!Q&&!X}async function M51($,D){let{data:Q,error:X}=await $.rpc("is_allowed_action_org",{orgid:D}).single();if(X)throw Error(`Cannot validate plan: ${F0(X)}`);return Q===!0}async function __($,D,Q,X){let{data:J,error:Y}=X?await $.rpc("is_allowed_action_org_action",{orgid:D,actions:Q,appid:X}):await $.rpc("is_allowed_action_org_action",{orgid:D,actions:Q});if(Y){if(X&&Y.code==="PGRST202")return M51($,D);throw Error(`Cannot validate plan: ${F0(Y)}`)}return J===!0}async function N51($,D,Q,X){if(X){if(await __($,D,Q,X))return"allowed";if(await __($,D,Q))return"permission_denied";return"billing_denied"}return await __($,D,Q)?"allowed":"billing_denied"}async function w51($,D){throw T0.error(`You need to upgrade your plan to continue to use capgo.
|
|
398
398
|
Upgrade here: ${$}
|
|
399
399
|
`),await Z51($),new G0(D)}async function B51(){throw T0.error("Cannot validate plan usage for this app. The API key may lack permission to read app billing details."),new G0("Plan validation permission denied")}async function cZ0($,D,Q){let{data:X,error:J}=await $.rpc("get_organization_cli_warnings",{orgid:D,cli_version:Q});if(J){T0.error(`Cannot get cli warnings: ${F0(J)}`);return}if(X.length>0){T0.warn(`Found ${X.length} cli warnings for your organization.`);let Y=null;for(let Z of X){if(typeof Z!=="object"||typeof Z.message!=="string"||typeof Z.fatal!=="boolean"){T0.error(`Invalid cli warning: ${Z}`);continue}let F=Z;if(F.fatal)T0.error(`${F.message.replaceAll("\\n",`
|
|
400
400
|
`)}`),Y=Error(F.message);else T0.warn(`${F.message.replaceAll("\\n",`
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { SupabaseClient } from '@supabase/supabase-js';
|
|
2
2
|
import type { Options } from '../api/app';
|
|
3
3
|
import type { Database } from '../types/supabase.types';
|
|
4
|
+
export declare function resolveAccountEmail(supabase: SupabaseClient<Database>): Promise<string>;
|
|
4
5
|
export declare function resolveAccountIdentity(supabase: SupabaseClient<Database>, apikey: string): Promise<{
|
|
5
6
|
userId: string;
|
|
6
7
|
email: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{createRequire as ZS}from"node:module";var WS=Object.create;var{getPrototypeOf:GS,defineProperty:_4,getOwnPropertyNames:eK,getOwnPropertyDescriptor:zS}=Object,DW=Object.prototype.hasOwnProperty;function $W(D){return this[D]}var ES,BS,S0=(D,$,U)=>{var J=D!=null&&typeof D==="object";if(J){var F=$?ES??=new WeakMap:BS??=new WeakMap,I=F.get(D);if(I)return I}U=D!=null?WS(GS(D)):{};let Y=$||!D||!D.__esModule?_4(U,"default",{value:D,enumerable:!0}):U;for(let X of eK(D))if(!DW.call(Y,X))_4(Y,X,{get:$W.bind(D,X),enumerable:!0});if(J)F.set(D,Y);return Y},Z$=(D)=>{var $=(sK??=new WeakMap).get(D),U;if($)return $;if($=_4({},"__esModule",{value:!0}),D&&typeof D==="object"||typeof D==="function"){for(var J of eK(D))if(!DW.call($,J))_4($,J,{get:$W.bind(D,J),enumerable:!(U=zS(D,J))||U.enumerable})}return sK.set(D,$),$},sK,C=(D,$)=>()=>($||D(($={exports:{}}).exports,$),$.exports);var qS=(D)=>D;function VS(D,$){this[D]=qS.bind(null,$)}var aD=(D,$)=>{for(var U in $)_4(D,U,{get:$[U],enumerable:!0,configurable:!0,set:VS.bind($,U)})};var R=(D,$)=>()=>(D&&($=D(D=0)),$);var o=ZS(import.meta.url);var _0;var t6=R(()=>{_0={name:"@capgo/cli",type:"module",version:"8.59.0",description:"A CLI to upload to capgo servers",author:"Martin martin@capgo.app",license:"Apache 2.0",homepage:"https://github.com/Cap-go/capgo/tree/main/cli#readme",repository:{type:"git",url:"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:notify-app-ready-background":"bun test ./test/test-notify-app-ready-background.mjs ./test/test-background-check-shutdown.mjs","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-add-getting-started":"bun test/test-app-add-getting-started.mjs","test:app-list-output-text":"bun test/test-app-list-output-text.mjs","test:app-todo":"bun test/test-app-todo.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-upload-recovery":"bun test/test-init-upload-error-gate.mjs && bun test/test-init-upload-monorepo-recovery.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:builder-app-id-config":"bun test/test-builder-app-id-config.mjs","test:capacitor-config-typescript7":"bun test/test-capacitor-config-typescript7.mjs","test:capacitor-config-native-import":"bun test/test-capacitor-config-native-import.mjs","test:cli-user-error-config":"bun test/test-cli-user-error-config.mjs","test:cordova-upload-mode":"bun test/test-cordova-upload-mode.mjs","test:init-monorepo-targeting":"bun run test:capacitor-config-target && bun run test:builder-app-id-config && bun run test:capacitor-config-typescript7 && bun run test:capacitor-config-native-import && 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:notify-app-ready-background && 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:cordova-upload-mode && 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-add-getting-started && bun run test:app-list-output-text && bun run test:app-todo && 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-list && bun run test:channel-add-exists && bun run test:wait-log && bun run test:init-guardrails && bun run test:init-upload-recovery && 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","test:channel-list":"bun test/test-channel-list.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","@vue/compiler-dom":"3.5.40","@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"}}});var BD;var s$=R(()=>{BD=class BD extends Error{context;constructor(D,$){super(D);this.name="CliUserError",this.context=$}}});import{platform as OS}from"node:os";import{version as HS}from"node:process";function JW(D){FW=D}function vS(D){for(let $=0;$<D.length;$++)if(D.charCodeAt($)>255)return!1;return!0}function UW(D){if(D.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 MS(D){if(D.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(D.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 n7(D,$){if($===void 0||$===null){if(h7.has(D.toLowerCase()))throw new BD(UW(D));throw new BD(`HTTP header "${D}" is missing or invalid.`)}if(typeof $!=="string"){if(h7.has(D.toLowerCase()))throw new BD(UW(D));throw new BD(`HTTP header "${D}" is missing or invalid.`)}if(!vS($)){if(h7.has(D.toLowerCase()))throw new BD(MS(D));throw new BD(`HTTP header "${D}" contains invalid characters (only ASCII is allowed).`)}return $}function c0(D){let $={capgo_api:NS,"x-cli-version":_0.version,"x-cli-command":FW,"x-cli-node":HS,"x-cli-os":OS()};if(D)for(let[U,J]of Object.entries(D))$[U]=n7(U,J);return $}var NS="2025-10-01",FW="",h7;var n8=R(()=>{t6();s$();h7=new Set(["authorization","capgkey","x-capgo-log-token"])});import{existsSync as z0}from"fs";var g4=(D=".",$="unknown")=>{let U=`${D}/bun.lockb`,J=`${D}/bun.lock`,F=`${D}/pnpm-lock.yaml`,I=`${D}/shrinkwrap.yaml`,Y=`${D}/yarn.lock`,X=`${D}/package-lock.json`,Q=`${D}/npm-shrinkwrap.json`;if(z0(U)||z0(J))return"bun";if(z0(F)||z0(I))return"pnpm";if(z0(Y))return"yarn";if(z0(X)||z0(Q))return"npm";return $},d8=(D=g4(),$=!1)=>{switch(D){case"bun":return $?"bun install":"install";case"pnpm":return $?"pnpm install":"install";case"yarn":return $?"yarn install":"install";case"npm":return $?"npm install":"install";case"unknown":return $?"unknown unknown":"unknown";default:return $?"npm install":"install"}},IW=(D=".",$="npx")=>{let U=`${D}/bun.lockb`,J=`${D}/bun.lock`,F=`${D}/pnpm-lock.yaml`,I=`${D}/shrinkwrap.yaml`,Y=`${D}/yarn.lock`,X=`${D}/package-lock.json`,Q=`${D}/npm-shrinkwrap.json`;if(z0(U)||z0(J))return"bunx";if(z0(F)||z0(I))return"pnpm exec";if(z0(Y))return"yarn dlx";if(z0(X)||z0(Q))return"npx";return $};var YW=()=>{};var XW,QW=(D)=>{return D===12288||D>=65281&&D<=65376||D>=65504&&D<=65510},wW=(D)=>{return D===8987||D===9001||D>=12272&&D<=12287||D>=12289&&D<=12350||D>=12441&&D<=12543||D>=12549&&D<=12591||D>=12593&&D<=12686||D>=12688&&D<=12771||D>=12783&&D<=12830||D>=12832&&D<=12871||D>=12880&&D<=19903||D>=65040&&D<=65049||D>=65072&&D<=65106||D>=65108&&D<=65126||D>=65128&&D<=65131||D>=127488&&D<=127490||D>=127504&&D<=127547||D>=127552&&D<=127560||D>=131072&&D<=196605||D>=196608&&D<=262141};var uW=R(()=>{XW=(()=>{let D=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;return($)=>{let U=0;D.lastIndex=0;while(D.test($))U+=1;return $.length-U}})()});var AS,jS,KW,RS,WW,SS,CS,TS,GW=(D,$={},U={})=>{let J=$.limit??1/0,F=$.ellipsis??"",I=$?.ellipsisWidth??(F?GW(F,TS,U).width:0),Y=0,X=U.controlWidth??0,Q=U.tabWidth??8,w=U.emojiWidth??2,u=2,K=U.regularWidth??1,W=U.wideWidth??2,E=[[SS,K],[AS,0],[jS,X],[RS,Q],[WW,w],[KW,W]],G=0,q=0,B=D.length,H=0,N=!1,z=B,O=Math.max(0,J-I),A=0,j=0,P=0,_=0;D:while(!0){if(j>A||q>=B&&q>G){let x=D.slice(A,j)||D.slice(G,q);H=0;for(let n of x.replaceAll(CS,"")){let g=n.codePointAt(0)||0;if(QW(g))_=2;else if(wW(g))_=W;else _=K;if(P+_>O)z=Math.min(z,Math.max(A,G)+H);if(P+_>J){N=!0;break D}H+=n.length,P+=_}A=j=0}if(q>=B)break D;for(let x=0,n=E.length;x<n;x++){let[g,UD]=E[x];if(g.lastIndex=q,g.test(D)){if(H=g===KW?XW(D.slice(q,g.lastIndex)):g===WW?1:g.lastIndex-q,_=H*UD,P+_>O)z=Math.min(z,q+Math.floor((O-P)/UD));if(P+_>J){N=!0;break D}P+=_,A=G,j=q,q=G=g.lastIndex;continue D}}q+=1}return{width:N?O:P,index:N?z:B,truncated:N,ellipsed:N&&J>=I}},zW;var EW=R(()=>{uW();AS=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y,jS=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,KW=/(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/yu,RS=/\t{1,1000}/y,WW=/[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/yu,SS=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,CS=/\p{M}+/gu,TS={limit:1/0,ellipsis:""},zW=GW});var PS,bS=(D,$={})=>{return zW(D,PS,$).width},i0;var d7=R(()=>{EW();PS={limit:1/0,ellipsis:"",ellipsisWidth:0},i0=bS});function L$(D,$,U){return String(D).normalize().split(fS).map((J)=>gS(J,$,U)).join(`
|
|
1
|
+
import{createRequire as ZS}from"node:module";var WS=Object.create;var{getPrototypeOf:GS,defineProperty:_4,getOwnPropertyNames:eK,getOwnPropertyDescriptor:zS}=Object,DW=Object.prototype.hasOwnProperty;function $W(D){return this[D]}var ES,BS,S0=(D,$,U)=>{var J=D!=null&&typeof D==="object";if(J){var F=$?ES??=new WeakMap:BS??=new WeakMap,I=F.get(D);if(I)return I}U=D!=null?WS(GS(D)):{};let Y=$||!D||!D.__esModule?_4(U,"default",{value:D,enumerable:!0}):U;for(let X of eK(D))if(!DW.call(Y,X))_4(Y,X,{get:$W.bind(D,X),enumerable:!0});if(J)F.set(D,Y);return Y},Z$=(D)=>{var $=(sK??=new WeakMap).get(D),U;if($)return $;if($=_4({},"__esModule",{value:!0}),D&&typeof D==="object"||typeof D==="function"){for(var J of eK(D))if(!DW.call($,J))_4($,J,{get:$W.bind(D,J),enumerable:!(U=zS(D,J))||U.enumerable})}return sK.set(D,$),$},sK,C=(D,$)=>()=>($||D(($={exports:{}}).exports,$),$.exports);var qS=(D)=>D;function VS(D,$){this[D]=qS.bind(null,$)}var aD=(D,$)=>{for(var U in $)_4(D,U,{get:$[U],enumerable:!0,configurable:!0,set:VS.bind($,U)})};var R=(D,$)=>()=>(D&&($=D(D=0)),$);var o=ZS(import.meta.url);var _0;var t6=R(()=>{_0={name:"@capgo/cli",type:"module",version:"8.61.0",description:"A CLI to upload to capgo servers",author:"Martin martin@capgo.app",license:"Apache 2.0",homepage:"https://github.com/Cap-go/capgo/tree/main/cli#readme",repository:{type:"git",url:"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:notify-app-ready-background":"bun test ./test/test-notify-app-ready-background.mjs ./test/test-background-check-shutdown.mjs","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-add-getting-started":"bun test/test-app-add-getting-started.mjs","test:app-list-output-text":"bun test/test-app-list-output-text.mjs","test:app-todo":"bun test/test-app-todo.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-upload-recovery":"bun test/test-init-upload-error-gate.mjs && bun test/test-init-upload-monorepo-recovery.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:builder-app-id-config":"bun test/test-builder-app-id-config.mjs","test:capacitor-config-typescript7":"bun test/test-capacitor-config-typescript7.mjs","test:capacitor-config-native-import":"bun test/test-capacitor-config-native-import.mjs","test:cli-user-error-config":"bun test/test-cli-user-error-config.mjs","test:cordova-upload-mode":"bun test/test-cordova-upload-mode.mjs","test:init-monorepo-targeting":"bun run test:capacitor-config-target && bun run test:builder-app-id-config && bun run test:capacitor-config-typescript7 && bun run test:capacitor-config-native-import && 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-credential-action":"bun test/test-ios-credential-action.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:notify-app-ready-background && 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:cordova-upload-mode && 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-add-getting-started && bun run test:app-list-output-text && bun run test:app-todo && 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:builder-login-gate && 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-list && bun run test:channel-add-exists && bun run test:wait-log && bun run test:init-guardrails && bun run test:init-upload-recovery && 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-credential-action && 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:builder-login-gate":"bun test/test-builder-login-gate.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","test:channel-list":"bun test/test-channel-list.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","@vue/compiler-dom":"3.5.40","@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"}}});var BD;var s$=R(()=>{BD=class BD extends Error{context;constructor(D,$){super(D);this.name="CliUserError",this.context=$}}});import{platform as OS}from"node:os";import{version as HS}from"node:process";function JW(D){FW=D}function vS(D){for(let $=0;$<D.length;$++)if(D.charCodeAt($)>255)return!1;return!0}function UW(D){if(D.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 MS(D){if(D.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(D.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 n7(D,$){if($===void 0||$===null){if(h7.has(D.toLowerCase()))throw new BD(UW(D));throw new BD(`HTTP header "${D}" is missing or invalid.`)}if(typeof $!=="string"){if(h7.has(D.toLowerCase()))throw new BD(UW(D));throw new BD(`HTTP header "${D}" is missing or invalid.`)}if(!vS($)){if(h7.has(D.toLowerCase()))throw new BD(MS(D));throw new BD(`HTTP header "${D}" contains invalid characters (only ASCII is allowed).`)}return $}function c0(D){let $={capgo_api:NS,"x-cli-version":_0.version,"x-cli-command":FW,"x-cli-node":HS,"x-cli-os":OS()};if(D)for(let[U,J]of Object.entries(D))$[U]=n7(U,J);return $}var NS="2025-10-01",FW="",h7;var n8=R(()=>{t6();s$();h7=new Set(["authorization","capgkey","x-capgo-log-token"])});import{existsSync as z0}from"fs";var g4=(D=".",$="unknown")=>{let U=`${D}/bun.lockb`,J=`${D}/bun.lock`,F=`${D}/pnpm-lock.yaml`,I=`${D}/shrinkwrap.yaml`,Y=`${D}/yarn.lock`,X=`${D}/package-lock.json`,Q=`${D}/npm-shrinkwrap.json`;if(z0(U)||z0(J))return"bun";if(z0(F)||z0(I))return"pnpm";if(z0(Y))return"yarn";if(z0(X)||z0(Q))return"npm";return $},d8=(D=g4(),$=!1)=>{switch(D){case"bun":return $?"bun install":"install";case"pnpm":return $?"pnpm install":"install";case"yarn":return $?"yarn install":"install";case"npm":return $?"npm install":"install";case"unknown":return $?"unknown unknown":"unknown";default:return $?"npm install":"install"}},IW=(D=".",$="npx")=>{let U=`${D}/bun.lockb`,J=`${D}/bun.lock`,F=`${D}/pnpm-lock.yaml`,I=`${D}/shrinkwrap.yaml`,Y=`${D}/yarn.lock`,X=`${D}/package-lock.json`,Q=`${D}/npm-shrinkwrap.json`;if(z0(U)||z0(J))return"bunx";if(z0(F)||z0(I))return"pnpm exec";if(z0(Y))return"yarn dlx";if(z0(X)||z0(Q))return"npx";return $};var YW=()=>{};var XW,QW=(D)=>{return D===12288||D>=65281&&D<=65376||D>=65504&&D<=65510},wW=(D)=>{return D===8987||D===9001||D>=12272&&D<=12287||D>=12289&&D<=12350||D>=12441&&D<=12543||D>=12549&&D<=12591||D>=12593&&D<=12686||D>=12688&&D<=12771||D>=12783&&D<=12830||D>=12832&&D<=12871||D>=12880&&D<=19903||D>=65040&&D<=65049||D>=65072&&D<=65106||D>=65108&&D<=65126||D>=65128&&D<=65131||D>=127488&&D<=127490||D>=127504&&D<=127547||D>=127552&&D<=127560||D>=131072&&D<=196605||D>=196608&&D<=262141};var uW=R(()=>{XW=(()=>{let D=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;return($)=>{let U=0;D.lastIndex=0;while(D.test($))U+=1;return $.length-U}})()});var AS,jS,KW,RS,WW,SS,CS,TS,GW=(D,$={},U={})=>{let J=$.limit??1/0,F=$.ellipsis??"",I=$?.ellipsisWidth??(F?GW(F,TS,U).width:0),Y=0,X=U.controlWidth??0,Q=U.tabWidth??8,w=U.emojiWidth??2,u=2,K=U.regularWidth??1,W=U.wideWidth??2,E=[[SS,K],[AS,0],[jS,X],[RS,Q],[WW,w],[KW,W]],G=0,q=0,B=D.length,H=0,N=!1,z=B,O=Math.max(0,J-I),A=0,j=0,P=0,_=0;D:while(!0){if(j>A||q>=B&&q>G){let x=D.slice(A,j)||D.slice(G,q);H=0;for(let n of x.replaceAll(CS,"")){let g=n.codePointAt(0)||0;if(QW(g))_=2;else if(wW(g))_=W;else _=K;if(P+_>O)z=Math.min(z,Math.max(A,G)+H);if(P+_>J){N=!0;break D}H+=n.length,P+=_}A=j=0}if(q>=B)break D;for(let x=0,n=E.length;x<n;x++){let[g,UD]=E[x];if(g.lastIndex=q,g.test(D)){if(H=g===KW?XW(D.slice(q,g.lastIndex)):g===WW?1:g.lastIndex-q,_=H*UD,P+_>O)z=Math.min(z,q+Math.floor((O-P)/UD));if(P+_>J){N=!0;break D}P+=_,A=G,j=q,q=G=g.lastIndex;continue D}}q+=1}return{width:N?O:P,index:N?z:B,truncated:N,ellipsed:N&&J>=I}},zW;var EW=R(()=>{uW();AS=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y,jS=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,KW=/(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/yu,RS=/\t{1,1000}/y,WW=/[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/yu,SS=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,CS=/\p{M}+/gu,TS={limit:1/0,ellipsis:""},zW=GW});var PS,bS=(D,$={})=>{return zW(D,PS,$).width},i0;var d7=R(()=>{EW();PS={limit:1/0,ellipsis:"",ellipsisWidth:0},i0=bS});function L$(D,$,U){return String(D).normalize().split(fS).map((J)=>gS(J,$,U)).join(`
|
|
2
2
|
`)}var c8="\x1B",LW="",kS=39,i7="\x07",OW="[",xS="]",HW="m",l7,BW,qW=(D)=>{if(D>=30&&D<=37)return 39;if(D>=90&&D<=97)return 39;if(D>=40&&D<=47)return 49;if(D>=100&&D<=107)return 49;if(D===1||D===2)return 22;if(D===3)return 23;if(D===4)return 24;if(D===7)return 27;if(D===8)return 28;if(D===9)return 29;if(D===0)return 0;return},VW=(D)=>`${c8}${OW}${D}${HW}`,ZW=(D)=>`${c8}${l7}${D}${i7}`,c7=(D,$,U)=>{let J=$[Symbol.iterator](),F=!1,I=!1,Y=D.at(-1),X=Y===void 0?0:i0(Y),Q=J.next(),w=J.next(),u=0;while(!Q.done){let K=Q.value,W=i0(K);if(X+W<=U)D[D.length-1]+=K;else D.push(K),X=0;if(K===c8||K===LW)F=!0,I=$.startsWith(l7,u+1);if(F){if(I){if(K===i7)F=!1,I=!1}else if(K===HW)F=!1}else if(X+=W,X===U&&!w.done)D.push(""),X=0;Q=w,w=J.next(),u+=K.length}if(Y=D.at(-1),!X&&Y!==void 0&&Y.length&&D.length>1)D[D.length-2]+=D.pop()},_S=(D)=>{let $=D.split(" "),U=$.length;while(U){if(i0($[U-1]))break;U--}if(U===$.length)return D;return $.slice(0,U).join(" ")+$.slice(U).join("")},gS=(D,$,U={})=>{if(U.trim!==!1&&D.trim()==="")return"";let J="",F,I,Y=D.split(" "),X=[""],Q=0;for(let K=0;K<Y.length;K++){let W=Y[K];if(U.trim!==!1){let G=X.at(-1)??"",q=G.trimStart();if(G.length!==q.length)X[X.length-1]=q,Q=i0(q)}if(K!==0){if(Q>=$&&(U.wordWrap===!1||U.trim===!1))X.push(""),Q=0;if(Q||U.trim===!1)X[X.length-1]+=" ",Q++}let E=i0(W);if(U.hard&&E>$){let G=$-Q,q=1+Math.floor((E-G-1)/$);if(Math.floor((E-1)/$)<q)X.push("");c7(X,W,$),Q=i0(X.at(-1)??"");continue}if(Q+E>$&&Q&&E){if(U.wordWrap===!1&&Q<$){c7(X,W,$),Q=i0(X.at(-1)??"");continue}X.push(""),Q=0}if(Q+E>$&&U.wordWrap===!1){c7(X,W,$),Q=i0(X.at(-1)??"");continue}X[X.length-1]+=W,Q+=E}if(U.trim!==!1)X=X.map((K)=>_S(K));let w=X.join(`
|
|
3
3
|
`),u=!1;for(let K=0;K<w.length;K++){let W=w[K];if(J+=W,!u){if(u=W>="\uD800"&&W<="\uDBFF",u)continue}else u=!1;if(W===c8||W===LW){BW.lastIndex=K+1;let G=BW.exec(w)?.groups;if(G?.code!==void 0){let q=Number.parseFloat(G.code);F=q===kS?void 0:q}else if(G?.uri!==void 0)I=G.uri.length===0?void 0:G.uri}if(w[K+1]===`
|
|
4
4
|
`){if(I)J+=ZW("");let E=F?qW(F):void 0;if(F&&E)J+=VW(E)}else if(W===`
|
|
@@ -250,7 +250,7 @@ tell application "System Events" to get value of property list item "CFBundleNam
|
|
|
250
250
|
`)}function lUD(D){return[`Bundle upload timed out after ${Math.round(D/1000)}s.`,"The standard upload has to finish the whole transfer within this window and does not retry, so a large bundle or a slow connection can trip it.","What you can do:","1. Retry with the resumable upload, which uploads in chunks and retries automatically: npx @capgo/cli@latest bundle upload --tus","2. Or raise the limit for the standard upload: npx @capgo/cli@latest bundle upload --timeout <milliseconds>"].join(`
|
|
251
251
|
`)}function eD(D){if(!D)return"Unknown error";if(NK(D).isSecurityPolicyError)return YR(D);let U=D;if(typeof D==="string")return D;if(D instanceof Error){let J=U.message||U.cause?.message||U.stack||D.name,F=U.cause?.name,I=J.toLowerCase();if(I.includes("fetch failed")||I.includes("failed to fetch")||I.includes("connect timeout")||I.includes("network")||F?.startsWith("UND_ERR"))return`Network error: ${J}${U.code?` (code ${U.code})`:""}. Check your network connection and API endpoint availability.`;let Y=U.status||U.statusCode;return[J,U.code?`Code: ${U.code}`:void 0,Y?`Status: ${Y}`:void 0].filter(Boolean).join(" | ")||D.name}if(U.message){let J=[U.message,U.code?`Code: ${U.code}`:void 0,U.status||U.statusCode?`Status: ${U.status||U.statusCode}`:void 0].filter(Boolean).join(" | "),F=U.message.toLowerCase();if(F.includes("fetch failed")||F.includes("failed to fetch")||U.error==="Failed to fetch")return`Network error: ${J}. Check your network connection and API endpoint availability.`;if(U.details||U.hint||U.error)return`${J}${J?" | ":""}${U.error?typeof U.error==="string"?U.error:U.error.message??"":""}${U.details?`Details: ${U.details}`:""}${U.hint?`Hint: ${U.hint}`:""}`.trim();return J}if(typeof U.error==="string"&&U.error.length>0)return U.error;if(U.error&&typeof U.error==="object"&&typeof U.error.message==="string"&&U.error.message.length>0)return U.error.message;return`
|
|
252
252
|
${pR.default.render(D)}`}async function rUD(D,$,U=!1){let{data:J,error:F}=await $R(()=>D.rpc("reject_access_due_to_2fa_for_org",{org_id:$}));if(F){if(!U&&!T4(F))d.error(`Cannot check 2FA compliance: ${F.message}`);if(T4(F)){await UR({silent:U,telemetryFunctionName:"check2FAAccessForOrg"});return}FR(F)}if(J){if(!U)d.error(`\uD83D\uDD10 Access Denied: 2FA Required. Enable 2FA at ${rR("/settings/account")}`);throw Error("2FA required for this organization")}}function oUD({silent:D=!1,stdinIsTTY:$=!!iR.isTTY,stdoutIsTTY:U=!!lR.isTTY,ci:J=rK.isCI}={}){return!D&&$&&U&&!J}function is(D={}){let $=D.ci??rK.isCI,U=D.stdinIsTTY??!!iR.isTTY,J=D.stdoutIsTTY??!!lR.isTTY,F=D.platform??nR(),I="display"in D?D.display:r6.DISPLAY;if($||!U||!J)return!1;if(F==="linux"&&!I)return!1;return!0}async function ls(D){if(!is())return;try{await(await Promise.resolve().then(() => (kR(),bR))).default(D)}catch($){if($?.code==="ENOENT")return}}function tUD(D){return oJ(D)||tJ(D)}function V$(D){if(oJ(D))return Hv(D);else if(tJ(D))return Nv(D);return D}function oR(D=V$(lD()),$=void 0){let U=$?.split(",")[0],J=U??wD(D,O0);if(!ID(J)){let I=U?`Package.json at ${J} does not exist`:`No package.json found at ${J}. Run this command from your project root (the folder that contains package.json), or pass --package-json <path> to point at it (for example in a monorepo).`;throw d.error(I),Error(I)}let F=mD(J);return JSON.parse(F)}function aUD(D=V$(lD()),$=void 0){return oR(D,$).scripts}function sUD(D=V$(lD()),$=void 0){return oR(D,$).version??""}function ps(D){let $=D.replace("^","").replace("~","");if(i4($))try{let U=f0($);return WU(U)}catch{return $}return $}async function eUD(D,$=lD(),U){let J=U?U.split(",").map((Y)=>Y.trim()).filter(Boolean):[],F=[],I=(Y)=>{let X=SD(Y);if(!F.includes(X))F.push(X)};for(let Y of J){let X=SD($,Y);if(ID(X))I(q$(X))}I(SD($)),I(lD());for(let Y of F)try{let X=`${D}/package.json`,{createRequire:Q}=await import("node:module"),u=Q(wD(Y,"package.json")).resolve(X),K=JSON.parse(mD(u,"utf-8"));if(K.version)return K.version}catch{}for(let Y of F){let X=Y,Q=o6.parse(X).root;while(X!==Q){let w=wD(X,"node_modules",D,O0);if(ID(w))try{let K=JSON.parse(mD(w,"utf-8"));if(K.version)return K.version}catch{}let u=q$(X);if(u===X)break;X=u}}if(D==="@capgo/capacitor-updater"){let Y=null,X=wD($,"ios","App","Podfile");if(ID(X))try{let w=mD(X,"utf-8").match(/pod\s+['"]CapgoCapacitorUpdater['"],\s*:path\s*=>\s*['"]([^'"]+)['"]/);if(w?.[1])Y=SD(wD($,"ios","App",w[1]))}catch{}if(!Y){let Q=wD($,"android","capacitor.settings.gradle");if(ID(Q))try{let u=mD(Q,"utf-8").match(/project\(':capgo-capacitor-updater'\)\.projectDir\s*=\s*new\s+File\(['"]([^'"]+)['"]/);if(u?.[1])Y=SD(wD($,"android",u[1])).replace(/\/android$/,"")}catch{}}if(Y){let Q=wD(Y,O0);if(ID(Q))try{let w=JSON.parse(mD(Q,"utf-8"));if(w.version)return w.version}catch{}}}try{let Y=U?U.split(",").map((w)=>w.trim()).filter(Boolean).join(","):U,Q=(await f7($,Y)).get(D);if(Q)return Q}catch{}return null}async function f7(D=V$(lD()),$=void 0){let U=$?.split(",").map((I)=>I.trim()).filter(Boolean);if(U??=[wD(D,O0)],U){for(let I of U)if(!ID(I)){let Y=`Package.json at ${I} does not exist`;throw d.error(Y),Error(Y)}}let J=new Map,{createRequire:F}=await import("node:module");for(let I of U){let Y=mD(I),X=JSON.parse(Y),Q=q$(I),w=(u,K)=>{try{let q=F(wD(Q,"package.json")).resolve(`${u}/package.json`),B=JSON.parse(mD(q,"utf-8"));if(B.version)return B.version}catch{}let W=Q,E=o6.parse(W).root;while(W!==E){let G=wD(W,"node_modules",u,O0);if(ID(G))try{let B=JSON.parse(mD(G,"utf-8"));if(B.version)return B.version}catch{}let q=q$(W);if(q===W)break;W=q}return ps(K)};for(let u in X.dependencies)J.set(u,w(u,X.dependencies[u]));for(let u in X.devDependencies)J.set(u,w(u,X.devDependencies[u]))}return J}async function rs(D=V$(lD()),$=void 0){let U=$?.split(",").map((F)=>F.trim()).filter(Boolean);if(U??=[wD(D,O0)],U){for(let F of U)if(!ID(F)){let I=`Package.json at ${F} does not exist`;throw d.error(I),Error(I)}}let J=new Map;for(let F of U){let I=mD(F),Y=JSON.parse(I);for(let X in Y.dependencies??{})if(typeof Y.dependencies[X]==="string")J.set(X,Y.dependencies[X]);for(let X in Y.devDependencies??{})if(typeof Y.devDependencies[X]==="string")J.set(X,Y.devDependencies[X])}return J}function os(D){if(!D)return!1;if(D.config&&Object.keys(D.config).length>0)return!0;return!!D.path&&ID(D.path)}async function tR(D,$=!1){let U=ts;try{let J=await D();if(!os(J)){if(!$)d.error(U);throw new BD(U)}return J}catch(J){if(J instanceof BD)throw J;let F=eD(J);if(!$)d.error(`${U}: ${F}`);throw new BD(U,{cause:F})}}function pF(D=!1){return tR(JI,D)}function as(D=!1){return tR(II,D)}async function ss(D,$){let U=await as();if(U?.config)U.config.plugins??={},U.config.plugins.extConfig??={},U.config.plugins[D]??={},U.config.plugins[D]={...U.config.plugins[D],...$},await YI(D,U);return U}async function DFD(D){return ss("CapacitorUpdater",D)}async function H6(D=!1){try{let $=await pF(D),U={host:$?.config?.plugins?.CapacitorUpdater?.localHost||xR,hostWeb:$?.config?.plugins?.CapacitorUpdater?.localWebHost||x7,hostFilesApi:$?.config?.plugins?.CapacitorUpdater?.localApiFiles||_R,hostApi:$?.config?.plugins?.CapacitorUpdater?.localApi||k7};if($?.config?.plugins?.CapacitorUpdater?.localSupa&&$?.config?.plugins?.CapacitorUpdater?.localSupaAnon){if(!D)d.info("Using custom supabase instance from capacitor.config.json");U.supaKey=$?.config?.plugins?.CapacitorUpdater?.localSupaAnon,U.supaHost=$?.config?.plugins?.CapacitorUpdater?.localSupa}return U}catch{return{host:xR,hostWeb:x7,hostFilesApi:_R,hostApi:k7}}}function fR(D){return typeof D==="object"&&D!==null}function es(D){if(!fR(D))return!1;let $=D.capacitor;if(fR($)&&($.ios!==void 0||$.android!==void 0))return!0;return!1}function De(D){if(ID(wD(D,"plugin.xml")))return!0;let $=wD(D,O0);if(!ID($))return!1;try{return es(JSON.parse(mD($,"utf-8")))}catch{return!1}}async function y8(D=!1,$){let U=(F)=>{let I={...F};return CZ(I,void 0,D),I};if(!$&&nK)return U(nK);if(!$&&T7)return T7.then(U);let J=(async()=>{let F=await H6(D);try{let I=eR(),Y=await fetch(`${F.hostApi}/private/config`,{...$?{signal:$}:{},headers:c0(I?{capgkey:I}:void 0)});if(!Y.ok)throw Error(`HTTP error! status: ${Y.status}`);let Q={...await Y.json(),...F};if(!$)nK=Q;return{...Q}}catch{if(!D)d.info(`Local config ${eD(F)}`);return{...F}}finally{if(!$)T7=null}})();if(!$)T7=J;return J.then(U)}async function $FD(){let D=await H6();try{let $=eR(),U=await fetch(`${D.hostFilesApi}/files/config`,{headers:c0($?{capgkey:$}:void 0)});if(!U.ok)throw Error(`HTTP error! status: ${U.status}`);return await U.json()}catch{return{partialUpload:!1,TUSUpload:!1,partialUploadForced:!1,TUSUploadForced:!1,maxUploadLength:hs,maxChunkSize:ns,alertUploadSize:ys}}}function k4(D){let $=new URL(D);if(!["http:","https:"].includes($.protocol))throw Error("Invalid Supabase host protocol");if($.username||$.password)throw Error("Supabase host must not include credentials");if($.search||$.hash)throw Error("Supabase host must not include query parameters or fragments");let U=y$($.pathname);return`${$.origin}${U}`}function $e(D){if(!D||typeof D!=="object")return"";let $=D;return[$.error,$.message,$.status].filter(Boolean).join(" | ")}function mR(D,$){let U=D.indexOf($);if(U<0)return D;return D.slice(U+$.length).replace(/^:\s*/,"").split(`
|
|
253
|
-
`)[0].trim()}async function UFD(D){let $=await sR(D);if($?.error==="channel_zip_required"||$?.error==="channel_delta_required")return $.message||$.error;let U=D instanceof Error?D.message:String(D??"");if(U.includes("CHANNEL_ZIP_REQUIRED"))return mR(U,"CHANNEL_ZIP_REQUIRED");if(U.includes("CHANNEL_DELTA_REQUIRED"))return mR(U,"CHANNEL_DELTA_REQUIRED");return null}function m8(D){if(!D)return!1;try{let $=new URL(k4(D)).hostname.toLowerCase();return $==="sb.capgo.app"||$==="xvwzpoazmxkqosrdewyv.supabase.co"||$==="ibwjdnhknbkcqfbabwei.supabase.co"||$==="aucsybvnhavogdmzwtcw.supabase.co"}catch{return!1}}function Ue(D){if(D.supaHost&&D.supaKey&&D.hostApi===k7&&!m8(D.supaHost))return`${k4(D.supaHost)}/functions/v1`;return D.hostApi}function FFD(D){let $=D?.context;return typeof $?.status==="number"?$.status:void 0}async function sR(D){let $=D?.context;if(!$||typeof $.clone!=="function")return null;try{let U=await $.clone().text();try{return JSON.parse(U)}catch{return U?{message:U}:null}}catch{return null}}async function JFD(D){let $=await sR(D);if($){let U=$e($);if(U)return U}return eD(D)}async function m7(D,$){let U=($.method??"POST").toUpperCase(),J,F=$.supaAnon;if($.supaHost&&$.supaAnon&&!m8($.supaHost))J=`${k4($.supaHost)}/functions/v1`;else{let X=await y8(!0);if(F=$.supaAnon??X.supaKey,X.supaHost&&X.supaKey&&X.hostApi===k7&&!m8(X.supaHost)&&!($.supaHost&&m8($.supaHost)))J=`${k4(X.supaHost)}/functions/v1`;else if($.useFilesHost)J=X.hostFilesApi;else J=X.hostApi}let I=J.includes("/functions/v1"),Y=`${y$(J)}/${D.replace(/^\//,"")}`;try{let X=await fetch(Y,{method:U,headers:c0({"Content-Type":"application/json",Authorization:I&&F?`Bearer ${F}`:$.apikey,capgkey:$.apikey}),body:U==="GET"||U==="HEAD"?void 0:typeof $.body==="string"?$.body:JSON.stringify($.body??{}),signal:$.signal});if(!X.ok)return{data:null,error:new T0.FunctionsHttpError(X)};return{data:(X.headers.get("content-type")??"").includes("application/json")?await X.json().catch(()=>null):await X.text().catch(()=>null),error:null}}catch(X){return{data:null,error:X instanceof Error?X:Error(String(X))}}}async function IFD(D,$=!0){if(D?.supaHost&&D?.supaAnon){if(m8(D.supaHost))return(await H6($)).hostApi;return`${k4(D.supaHost)}/functions/v1`}let U=await H6($);if(U.supaHost&&U.supaKey)return Ue(U);return(await y8($)).hostApi}async function YFD(D,$,U,J=!1,F=!0,I){let Y=await y8(J,I);if($&&U){if(!J)d.info("Using custom supabase instance from provided options");Y.supaHost=$,Y.supaKey=U}if(!Y.supaHost||!Y.supaKey)
|
|
253
|
+
`)[0].trim()}async function UFD(D){let $=await sR(D);if($?.error==="channel_zip_required"||$?.error==="channel_delta_required")return $.message||$.error;let U=D instanceof Error?D.message:String(D??"");if(U.includes("CHANNEL_ZIP_REQUIRED"))return mR(U,"CHANNEL_ZIP_REQUIRED");if(U.includes("CHANNEL_DELTA_REQUIRED"))return mR(U,"CHANNEL_DELTA_REQUIRED");return null}function m8(D){if(!D)return!1;try{let $=new URL(k4(D)).hostname.toLowerCase();return $==="sb.capgo.app"||$==="xvwzpoazmxkqosrdewyv.supabase.co"||$==="ibwjdnhknbkcqfbabwei.supabase.co"||$==="aucsybvnhavogdmzwtcw.supabase.co"}catch{return!1}}function Ue(D){if(D.supaHost&&D.supaKey&&D.hostApi===k7&&!m8(D.supaHost))return`${k4(D.supaHost)}/functions/v1`;return D.hostApi}function FFD(D){let $=D?.context;return typeof $?.status==="number"?$.status:void 0}async function sR(D){let $=D?.context;if(!$||typeof $.clone!=="function")return null;try{let U=await $.clone().text();try{return JSON.parse(U)}catch{return U?{message:U}:null}}catch{return null}}async function JFD(D){let $=await sR(D);if($){let U=$e($);if(U)return U}return eD(D)}async function m7(D,$){let U=($.method??"POST").toUpperCase(),J,F=$.supaAnon;if($.supaHost&&$.supaAnon&&!m8($.supaHost))J=`${k4($.supaHost)}/functions/v1`;else{let X=await y8(!0);if(F=$.supaAnon??X.supaKey,X.supaHost&&X.supaKey&&X.hostApi===k7&&!m8(X.supaHost)&&!($.supaHost&&m8($.supaHost)))J=`${k4(X.supaHost)}/functions/v1`;else if($.useFilesHost)J=X.hostFilesApi;else J=X.hostApi}let I=J.includes("/functions/v1"),Y=`${y$(J)}/${D.replace(/^\//,"")}`;try{let X=await fetch(Y,{method:U,headers:c0({"Content-Type":"application/json",Authorization:I&&F?`Bearer ${F}`:$.apikey,capgkey:$.apikey}),body:U==="GET"||U==="HEAD"?void 0:typeof $.body==="string"?$.body:JSON.stringify($.body??{}),signal:$.signal});if(!X.ok)return{data:null,error:new T0.FunctionsHttpError(X)};return{data:(X.headers.get("content-type")??"").includes("application/json")?await X.json().catch(()=>null):await X.text().catch(()=>null),error:null}}catch(X){return{data:null,error:X instanceof Error?X:Error(String(X))}}}async function IFD(D,$=!0){if(D?.supaHost&&D?.supaAnon){if(m8(D.supaHost))return(await H6($)).hostApi;return`${k4(D.supaHost)}/functions/v1`}let U=await H6($);if(U.supaHost&&U.supaKey)return Ue(U);return(await y8($)).hostApi}async function YFD(D,$,U,J=!1,F=!0,I){let Y=await y8(J,I);if($&&U){if(!J)d.info("Using custom supabase instance from provided options");Y.supaHost=$,Y.supaKey=U}if(!Y.supaHost||!Y.supaKey){if(!J)d.error(gR);throw new BD(gR,{missingSupaHost:!Y.supaHost,missingSupaKey:!Y.supaKey})}let X=k4(Y.supaHost);return jz(X,Y.supaKey,{auth:{persistSession:!1},global:{headers:{capgkey:n7("capgkey",D)},...AZ()&&F?{fetch:RZ()}:{}}})}async function Fe(D,$){let{data:U}=await D.rpc("is_paying_org",{orgid:$}).single();return U||!1}async function Je(D,$){let{data:U}=await D.rpc("is_trial_org",{orgid:$}).single();return U||0}async function Ie(D,$,U){let{data:J}=await D.rpc("has_usage_credits_org",U?{orgid:$,appid:U}:{orgid:$}).single();return J||!1}function Ye(D){let{trialDays:$,isPaying:U,hasCredits:J,warning:F=!0}=D;return!!F&&$>0&&!U&&!J}async function Xe(D,$){let{data:U,error:J}=await D.rpc("is_allowed_action_org",{orgid:$}).single();if(J)throw Error(`Cannot validate plan: ${eD(J)}`);return U===!0}async function dK(D,$,U,J){let{data:F,error:I}=J?await D.rpc("is_allowed_action_org_action",{orgid:$,actions:U,appid:J}):await D.rpc("is_allowed_action_org_action",{orgid:$,actions:U});if(I){if(J&&I.code==="PGRST202")return Xe(D,$);throw Error(`Cannot validate plan: ${eD(I)}`)}return F===!0}async function Qe(D,$,U,J){if(J){if(await dK(D,$,U,J))return"allowed";if(await dK(D,$,U))return"permission_denied";return"billing_denied"}return await dK(D,$,U)?"allowed":"billing_denied"}async function we(D,$){throw d.error(`You need to upgrade your plan to continue to use capgo.
|
|
254
254
|
Upgrade here: ${D}
|
|
255
255
|
`),await ls(D),new BD($)}async function ue(){throw d.error("Cannot validate plan usage for this app. The API key may lack permission to read app billing details."),new BD("Plan validation permission denied")}async function XFD(D,$,U){let{data:J,error:F}=await D.rpc("get_organization_cli_warnings",{orgid:$,cli_version:U});if(F){d.error(`Cannot get cli warnings: ${eD(F)}`);return}if(J.length>0){d.warn(`Found ${J.length} cli warnings for your organization.`);let I=null;for(let Y of J){if(typeof Y!=="object"||typeof Y.message!=="string"||typeof Y.fatal!=="boolean"){d.error(`Invalid cli warning: ${Y}`);continue}let X=Y;if(X.fatal)d.error(`${X.message.replaceAll("\\n",`
|
|
256
256
|
`)}`),I=Error(X.message);else d.warn(`${X.message.replaceAll("\\n",`
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capgo/cli",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "8.
|
|
4
|
+
"version": "8.61.0",
|
|
5
5
|
"description": "A CLI to upload to capgo servers",
|
|
6
6
|
"author": "Martin martin@capgo.app",
|
|
7
7
|
"license": "Apache 2.0",
|
|
@@ -168,6 +168,7 @@
|
|
|
168
168
|
"test:frame-fit-ios-shared": "bun test/test-frame-fit-ios-shared.mjs",
|
|
169
169
|
"test:ios-confirm-app-id": "bun test/test-ios-confirm-app-id.mjs",
|
|
170
170
|
"test:ios-create-new": "bun test/test-ios-create-new.mjs",
|
|
171
|
+
"test:ios-credential-action": "bun test/test-ios-credential-action.mjs",
|
|
171
172
|
"test:ios-e2e": "bun test/test-ios-e2e.mjs",
|
|
172
173
|
"test:ios-flow-contract": "bun test/test-ios-flow-contract.mjs",
|
|
173
174
|
"test:ios-import-discovery": "bun test/test-ios-import-discovery.mjs",
|
|
@@ -186,9 +187,10 @@
|
|
|
186
187
|
"test:android-version": "bun test/test-android-version.mjs",
|
|
187
188
|
"test:platform-flow-contract": "bun test/test-platform-flow-contract.mjs",
|
|
188
189
|
"test:tail-engine-shared": "bun test/test-tail-engine-shared.mjs",
|
|
189
|
-
"test": "bun run build && bun run test:helper-dce && bun run test:version-detection:setup && bun run test:bundle && bun run test:notify-app-ready-background && 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:cordova-upload-mode && 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-add-getting-started && bun run test:app-list-output-text && bun run test:app-todo && 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-list && bun run test:channel-add-exists && bun run test:wait-log && bun run test:init-guardrails && bun run test:init-upload-recovery && 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",
|
|
190
|
+
"test": "bun run build && bun run test:helper-dce && bun run test:version-detection:setup && bun run test:bundle && bun run test:notify-app-ready-background && 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:cordova-upload-mode && 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-add-getting-started && bun run test:app-list-output-text && bun run test:app-todo && 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:builder-login-gate && 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-list && bun run test:channel-add-exists && bun run test:wait-log && bun run test:init-guardrails && bun run test:init-upload-recovery && 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-credential-action && 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",
|
|
190
191
|
"test:build-platform-selection": "bun test/test-build-platform-selection.mjs",
|
|
191
192
|
"test:builder-project-discovery": "bun test/test-builder-project-discovery.mjs",
|
|
193
|
+
"test:builder-login-gate": "bun test/test-builder-login-gate.mjs",
|
|
192
194
|
"test:ai-log-capture": "bun test/test-ai-log-capture.mjs",
|
|
193
195
|
"test:ai-analyze-flow": "bun test/test-ai-analyze-flow.mjs",
|
|
194
196
|
"test:cicd-failure-help": "bun test/test-cicd-failure-help.mjs",
|