@capgo/cli 8.105.1 → 8.106.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/src/sdk.js CHANGED
@@ -1,4 +1,4 @@
1
- import{createRequire as vA0}from"node:module";var module={exports:{}};var RA0=Object.create;var{getPrototypeOf:jA0,defineProperty:WE,getOwnPropertyNames:AA0}=Object;var TA0=Object.prototype.hasOwnProperty;function IA0($){return this[$]}var SA0,PA0,d$=($,D,J)=>{var Q=$!=null&&typeof $==="object";if(Q){var X=D?SA0??=new WeakMap:PA0??=new WeakMap,Y=X.get($);if(Y)return Y}J=$!=null?RA0(jA0($)):{};let F=D||!$||!$.__esModule?WE(J,"default",{value:$,enumerable:!0}):J;for(let Z of AA0($))if(!TA0.call(F,Z))WE(F,Z,{get:IA0.bind($,Z),enumerable:!0});if(Q)X.set($,F);return F};var A=($,D)=>()=>(D||$((D={exports:{}}).exports,D),D.exports);var CA0=($)=>$;function _A0($,D){this[$]=CA0.bind(null,D)}var a6=($,D)=>{for(var J in D)WE($,J,{get:D[J],enumerable:!0,configurable:!0,set:_A0.bind(D,J)})};var p=($,D)=>()=>($&&(D=$($=0)),D);var Q0=vA0(import.meta.url);var ah=A((ZC$,xA0)=>{xA0.exports=[{name:"Agola CI",constant:"AGOLA",env:"AGOLA_GIT_REF",pr:"AGOLA_PULL_REQUEST_ID"},{name:"Alpic",constant:"ALPIC",env:"ALPIC_HOST"},{name:"Appcircle",constant:"APPCIRCLE",env:"AC_APPCIRCLE",pr:{env:"AC_GIT_PR",ne:"false"}},{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN",pr:{env:"CODEBUILD_WEBHOOK_EVENT",any:["PULL_REQUEST_CREATED","PULL_REQUEST_UPDATED","PULL_REQUEST_REOPENED"]}},{name:"Azure Pipelines",constant:"AZURE_PIPELINES",env:"TF_BUILD",pr:{BUILD_REASON:"PullRequest"}},{name:"Bamboo",constant:"BAMBOO",env:"bamboo_planKey"},{name:"Bitbucket Pipelines",constant:"BITBUCKET",env:"BITBUCKET_COMMIT",pr:"BITBUCKET_PR_ID"},{name:"Bitrise",constant:"BITRISE",env:"BITRISE_IO",pr:"BITRISE_PULL_REQUEST"},{name:"Buddy",constant:"BUDDY",env:"BUDDY_WORKSPACE_ID",pr:"BUDDY_EXECUTION_PULL_REQUEST_ID"},{name:"Buildkite",constant:"BUILDKITE",env:"BUILDKITE",pr:{env:"BUILDKITE_PULL_REQUEST",ne:"false"}},{name:"CircleCI",constant:"CIRCLE",env:"CIRCLECI",pr:"CIRCLE_PULL_REQUEST"},{name:"Cirrus CI",constant:"CIRRUS",env:"CIRRUS_CI",pr:"CIRRUS_PR"},{name:"Cloudflare Pages",constant:"CLOUDFLARE_PAGES",env:"CF_PAGES"},{name:"Cloudflare Workers",constant:"CLOUDFLARE_WORKERS",env:"WORKERS_CI"},{name:"Codefresh",constant:"CODEFRESH",env:"CF_BUILD_ID",pr:{any:["CF_PULL_REQUEST_NUMBER","CF_PULL_REQUEST_ID"]}},{name:"Codemagic",constant:"CODEMAGIC",env:"CM_BUILD_ID",pr:"CM_PULL_REQUEST"},{name:"Codeship",constant:"CODESHIP",env:{CI_NAME:"codeship"}},{name:"Drone",constant:"DRONE",env:"DRONE",pr:{DRONE_BUILD_EVENT:"pull_request"}},{name:"dsari",constant:"DSARI",env:"DSARI"},{name:"Earthly",constant:"EARTHLY",env:"EARTHLY_CI"},{name:"Expo Application Services",constant:"EAS",env:"EAS_BUILD"},{name:"Gerrit",constant:"GERRIT",env:"GERRIT_PROJECT"},{name:"Gitea Actions",constant:"GITEA_ACTIONS",env:"GITEA_ACTIONS"},{name:"GitHub Actions",constant:"GITHUB_ACTIONS",env:"GITHUB_ACTIONS",pr:{GITHUB_EVENT_NAME:"pull_request"}},{name:"GitLab CI",constant:"GITLAB",env:"GITLAB_CI",pr:"CI_MERGE_REQUEST_ID"},{name:"GoCD",constant:"GOCD",env:"GO_PIPELINE_LABEL"},{name:"Google Cloud Build",constant:"GOOGLE_CLOUD_BUILD",env:"BUILDER_OUTPUT"},{name:"Harness CI",constant:"HARNESS",env:"HARNESS_BUILD_ID"},{name:"Heroku",constant:"HEROKU",env:{env:"NODE",includes:"/app/.heroku/node/bin/node"}},{name:"Hudson",constant:"HUDSON",env:"HUDSON_URL"},{name:"Jenkins",constant:"JENKINS",env:["JENKINS_URL","BUILD_ID"],pr:{any:["ghprbPullId","CHANGE_ID"]}},{name:"LayerCI",constant:"LAYERCI",env:"LAYERCI",pr:"LAYERCI_PULL_REQUEST"},{name:"Magnum CI",constant:"MAGNUM",env:"MAGNUM"},{name:"Netlify CI",constant:"NETLIFY",env:"NETLIFY",pr:{env:"PULL_REQUEST",ne:"false"}},{name:"Nevercode",constant:"NEVERCODE",env:"NEVERCODE",pr:{env:"NEVERCODE_PULL_REQUEST",ne:"false"}},{name:"Prow",constant:"PROW",env:"PROW_JOB_ID"},{name:"ReleaseHub",constant:"RELEASEHUB",env:"RELEASE_BUILD_ID"},{name:"Render",constant:"RENDER",env:"RENDER",pr:{IS_PULL_REQUEST:"true"}},{name:"Sail CI",constant:"SAIL",env:"SAILCI",pr:"SAIL_PULL_REQUEST_NUMBER"},{name:"Screwdriver",constant:"SCREWDRIVER",env:"SCREWDRIVER",pr:{env:"SD_PULL_REQUEST",ne:"false"}},{name:"Semaphore",constant:"SEMAPHORE",env:"SEMAPHORE",pr:"PULL_REQUEST_NUMBER"},{name:"Sourcehut",constant:"SOURCEHUT",env:{CI_NAME:"sourcehut"}},{name:"Strider CD",constant:"STRIDER",env:"STRIDER"},{name:"TaskCluster",constant:"TASKCLUSTER",env:["TASK_ID","RUN_ID"]},{name:"TeamCity",constant:"TEAMCITY",env:"TEAMCITY_VERSION"},{name:"Travis CI",constant:"TRAVIS",env:"TRAVIS",pr:{env:"TRAVIS_PULL_REQUEST",ne:"false"}},{name:"Vela",constant:"VELA",env:"VELA",pr:{VELA_PULL_REQUEST:"1"}},{name:"Vercel",constant:"VERCEL",env:{any:["NOW_BUILDER","VERCEL"]},pr:"VERCEL_GIT_PULL_REQUEST_ID"},{name:"Visual Studio App Center",constant:"APPCENTER",env:"APPCENTER_BUILD_ID"},{name:"Woodpecker",constant:"WOODPECKER",env:{CI:"woodpecker"},pr:{CI_BUILD_EVENT:"pull_request"}},{name:"Xcode Cloud",constant:"XCODE_CLOUD",env:"CI_XCODE_PROJECT",pr:"CI_PULL_REQUEST_NUMBER"},{name:"Xcode Server",constant:"XCODE_SERVER",env:"XCS"}]});var TH=A((HE)=>{var sh=ah(),Q6=process.env;Object.defineProperty(HE,"_vendors",{value:sh.map(function($){return $.constant})});HE.name=null;HE.isPR=null;HE.id=null;if(Q6.CI!=="false")sh.forEach(function($){let J=(Array.isArray($.env)?$.env:[$.env]).every(function(Q){return eh(Q)});if(HE[$.constant]=J,!J)return;HE.name=$.name,HE.isPR=kA0($),HE.id=$.constant});HE.isCI=!!(Q6.CI!=="false"&&(Q6.BUILD_ID||Q6.BUILD_NUMBER||Q6.CI||Q6.CI_APP_ID||Q6.CI_BUILD_ID||Q6.CI_BUILD_NUMBER||Q6.CI_NAME||Q6.CONTINUOUS_INTEGRATION||Q6.RUN_ID||HE.name||!1));function eh($){if(typeof $==="string")return!!Q6[$];if("env"in $)return Q6[$.env]&&Q6[$.env].includes($.includes);if("any"in $)return $.any.some(function(D){return!!Q6[D]});return Object.keys($).every(function(D){return Q6[D]===$[D]})}function kA0($){switch(typeof $.pr){case"string":return!!Q6[$.pr];case"object":if("env"in $.pr)if("any"in $.pr)return $.pr.any.some(function(D){return Q6[$.pr.env]===D});else return $.pr.env in Q6&&Q6[$.pr.env]!==$.pr.ne;else if("any"in $.pr)return $.pr.any.some(function(D){return!!Q6[D]});else return eh($.pr);default:return null}}});var M1;var YD=p(()=>{M1={name:"@capgo/cli",type:"module",version:"8.105.1",description:"A CLI to upload to capgo servers",author:"Martin martin@capgo.app",license:"Apache 2.0",homepage:"https://github.com/Cap-go/capgo/tree/main/cli#readme",repository:{type:"git",url:"https://github.com/Cap-go/capgo.app",directory:"cli"},bugs:{url:"https://github.com/Cap-go/capgo/issues"},keywords:["appflow alternative","ionic","capacitor","auto update","live update","capgo","cli","upload","capgo-cli","sdk","tanstack-intent"],exports:{".":{import:"./dist/index.js",require:"./dist/index.js"},"./sdk":{types:"./dist/src/sdk.d.ts",import:"./dist/src/sdk.js"}},main:"dist/index.js",types:"dist/src/index.d.ts",bin:{capgo:"dist/index.js"},files:["!skills/_artifacts","dist","skills"],engines:{npm:">=8.0.0",node:">=20.0.0"},scripts:{build:"tsc && bun build.mjs",dev:"NODE_ENV=development ncc build","no-debug":"node dist/index.js","dev-build":"SUPA_DB=development ncc build",pack:"pkg",typecheck:"tsc --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:key-create-mode":"bun test/test-key-create-mode.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:offline-packers":"bun test/test-offline-packers.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:capgo-app-id-prompt":"bun test/test-capgo-app-id-prompt.mjs","test:bundle-soft-delete":"bun test/test-bundle-soft-delete.mjs","test:ci-secrets":"bun test/test-ci-secrets.mjs","test:android-onboarding-progress":"bun test/test-android-onboarding-progress.mjs && bun test/test-android-select-guard.mjs","test:android-keystore-action":"bun test/test-android-keystore-action.mjs","test:android-google-play-action":"bun test/test-android-google-play-action.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:api-perf":"bun test/test-api-perf.mjs","test:preview-qr":"bun test/test-preview-qr.mjs","test:bundle-pages":"bun test test/test-bundle-pages.test.ts","test:bundle-single-requests":"bun test test/test-bundle-single-requests.test.ts","test:mcp-analytics":"bun test/test-mcp-analytics.mjs && bun test/test-mcp-telemetry-project.mjs","test:mcp-instructions":"bun test/test-mcp-instructions.mjs","test:mcp-error-guidance":"bun test/test-mcp-error-guidance.mjs","test:mcp-stdout-guard":"bun test/test-mcp-stdout-guard.mjs","test:mcp-project-dir":"bun test/test-mcp-project-dir.mjs && bun test/test-cwd.mjs && bun test/test-project-context.mjs","test:mcp-host-fields":"bun test/test-mcp-host-fields.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":"bun test/test-app-list.mjs","test:app-todo":"bun test/test-app-todo.mjs && bun test/test-builder-only-checklist.mjs && bun test/test-builder-only-setup.mjs && bun test/test-app-todo-lists.mjs && bun test/test-app-todo-tabs.mjs && bun test/test-app-todo-command.mjs && node test/test-app-todo-interactive.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-capgo-client":"bun test/test-create-capgo-client.mjs","test:no-supabase-sdk":"bun test/test-no-supabase-sdk.mjs","test:no-redirect-error":"bun test/test-no-redirect-error.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 && bun test ./test/test-ios-simulator-compatibility.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-command-execution":"bun test/test-init-command-execution.mjs","test:init-upload-recovery":"bun test/test-init-upload-monorepo-recovery.mjs","test:init-replay":"bun test/test-init-replay.mjs","test:init-ota-checklist":"bun test/test-init-ota-checklist.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 && bun test/test-auth-session-bad-key.mjs","test:mcp":"node test/test-mcp.mjs && node test/test-mcp-skills.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 && bun test/test-build-env.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: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: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-certificate-action":"bun test/test-ios-certificate-action.mjs","test:ios-profile-action":"bun test/test-ios-profile-action.mjs","test:ios-credential-action":"bun test/test-ios-credential-action.mjs","test:ios-e2e":"bun test/test-ios-e2e.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 scripts/run-test-suite.ts","test:run":"bun scripts/run-test-suite.ts","test:serial":"bun run build && bun scripts/run-test-suite.ts --serial","test:monitoring":"bun test test/test-monitoring.test.ts","test:suite":"bun run test:monitoring && 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:key-create-mode && 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:offline-packers && 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:capgo-app-id-prompt && bun run test:ci-secrets && bun run test:android-onboarding-progress && bun run test:android-keystore-action && bun run test:android-google-play-action && 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:api-perf && bun run test:preview-qr && bun run test:bundle-pages && bun run test:bundle-single-requests && bun run test:app-set-options && bun run test:mcp-analytics && bun run test:mcp-instructions && bun run test:mcp-error-guidance && bun run test:mcp-live-update-onboarding && bun run test:mcp-stdout-guard && bun run test:mcp-project-dir && bun run test:mcp-host-fields && 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 && bun run test:app-todo && bun run test:doctor-analytics && bun run test:posthog-exception && bun run test:cli-recovery && bun run test:create-capgo-client && bun run test:bundle-soft-delete && bun run test:no-supabase-sdk && bun run test:no-redirect-error && bun run test:build-platform-selection && bun run test:builder-project-discovery && bun run test:builder-app-selection && 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-command-execution && bun run test:init-upload-recovery && bun run test:init-replay && bun run test:init-telemetry && bun run test:init-ota-checklist && 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: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:support && 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:ios-confirm-app-id && bun run test:ios-create-new && bun run test:ios-certificate-action && bun run test:ios-profile-action && bun run test:ios-credential-action && bun run test:ios-e2e && 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:retryable-capgo-api-error && bun run test:organization-set-api-host && bun run test:plan-validation && bun run test:setup-notices && bun run test:settings-parity && bun run test:init-browser-login && bun run test:android-onboarding-units && bun run test:build-credentials-units && bun run test:onboarding-generators && bun run test:mcp-onboarding","test:build-platform-selection":"bun test/test-build-platform-selection.mjs","test:builder-project-discovery":"bun test/test-builder-project-discovery.mjs","test:builder-app-selection":"bun test/test-builder-app-selection.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-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":"bun test/test-support.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","test:settings-parity":"bun test/test-settings-parity.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:retryable-capgo-api-error":"bun test/test-retryable-capgo-api-error.mjs","test:organization-set-api-host":"bun test/test-organization-set-api-host.mjs","test:plan-validation":"bun test/test-plan-validation.mjs && bun test ./test/test-direct-offer-plan.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","test:init-browser-login":"bun test test/init/","test:android-onboarding-units":"bun test/test-android-gradle.mjs && bun test/test-android-keystore.mjs && bun test/test-android-oauth.mjs && bun test/test-android-play.mjs && bun test/test-android-tui-sequencing.mjs","test:build-credentials-units":"bun test/test-credentials-migration.mjs && bun test/test-provisioning-map-validation.mjs && bun test/test-mobileprovision-parser.mjs","test:onboarding-generators":"bun test/test-diff-utils.mjs && bun test/test-workflow-generator.mjs","test:mcp-onboarding":"bun test ./test/build/onboarding/mcp/scoped-credential-path.test.ts && bun test/test-mcp-onboarding.mjs","test:setup-notices":"bun test ./test/test-setup-notices.mjs ./test/test-setup-progress-request.mjs ./test/test-setup-notice-background.mjs ./test/test-init-completion-notice.mjs && bun test ./test/test-builder-setup-notice.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":"^21.0.4",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.5.4"},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","@sinonjs/fake-timers":"15.4.0","@std/semver":"npm:@jsr/std__semver@1.0.8","@tanstack/intent":"^0.3.6","@types/adm-zip":"^0.5.8","@types/cross-spawn":"^6.0.6","@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":"npm:typescript@7.1.0-beta","@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","cross-spawn":"^7.0.6",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 D0;var G$=p(()=>{D0=class D0 extends Error{context;constructor($,D,J){super($,J!==void 0?{cause:J}:void 0);this.name="CliUserError",this.context=D}}});import{platform as yA0}from"node:os";import{version as bA0}from"node:process";function mA0($){for(let D=0;D<$.length;D++)if($.charCodeAt(D)>255)return!1;return!0}function Jg($){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 dA0($){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 configuration.";return"Capgo API key contains invalid characters (only ASCII is allowed). Copy the key from the Capgo dashboard."}function zE($,D){if(D===void 0||D===null){if(OE.has($.toLowerCase()))throw new D0(Jg($));throw new D0(`HTTP header "${$}" is missing or invalid.`)}if(typeof D!=="string"){if(OE.has($.toLowerCase()))throw new D0(Jg($));throw new D0(`HTTP header "${$}" is missing or invalid.`)}if(!mA0(D)){if(OE.has($.toLowerCase()))throw new D0(dA0($));throw new D0(`HTTP header "${$}" contains invalid characters (only ASCII is allowed).`)}return D}function cA0($=IH.isCI,D=IH.name){if(!$)return;return(D??"").replace(/[^\x20-\x7E]/g,"").trim().slice(0,64)||"ci"}function p$($){let D={capgo_api:hA0,"x-cli-version":M1.version,"x-cli-command":gA0,"x-cli-node":bA0,"x-cli-os":yA0()},J=cA0();if(J)D["x-cli-ci"]=J;if($)for(let[Q,X]of Object.entries($))D[Q]=zE(Q,X);return D}var IH,hA0="2025-10-01",gA0="",OE;var FD=p(()=>{YD();G$();IH=d$(TH(),1),OE=new Set(["authorization","capgkey","x-capgo-log-token"])});var Qg,Xg=($)=>{return $===12288||$>=65281&&$<=65376||$>=65504&&$<=65510},Yg=($)=>{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 Fg=p(()=>{Qg=(()=>{let $=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;return(D)=>{let J=0;$.lastIndex=0;while($.test(D))J+=1;return D.length-J}})()});var lA0,nA0,Zg,iA0,Gg,pA0,rA0,oA0,qg=($,D={},J={})=>{let Q=D.limit??1/0,X=D.ellipsis??"",Y=D?.ellipsisWidth??(X?qg(X,oA0,J).width:0),F=0,Z=J.controlWidth??0,G=J.tabWidth??8,q=J.emojiWidth??2,U=2,W=J.regularWidth??1,H=J.wideWidth??2,K=[[pA0,W],[lA0,0],[nA0,Z],[iA0,G],[Gg,q],[Zg,H]],O=0,z=0,V=$.length,M=0,E=!1,L=V,N=Math.max(0,Q-Y),B=0,w=0,_=0,x=0;$:while(!0){if(w>B||z>=V&&z>O){let j=$.slice(B,w)||$.slice(O,z);M=0;for(let k of j.replaceAll(rA0,"")){let v=k.codePointAt(0)||0;if(Xg(v))x=2;else if(Yg(v))x=H;else x=W;if(_+x>N)L=Math.min(L,Math.max(B,O)+M);if(_+x>Q){E=!0;break $}M+=k.length,_+=x}B=w=0}if(z>=V)break $;for(let j=0,k=K.length;j<k;j++){let[v,d]=K[j];if(v.lastIndex=z,v.test($)){if(M=v===Zg?Qg($.slice(z,v.lastIndex)):v===Gg?1:v.lastIndex-z,x=M*d,_+x>N)L=Math.min(L,z+Math.floor((N-_)/d));if(_+x>Q){E=!0;break $}_+=x,B=O,w=z,z=O=v.lastIndex;continue $}}z+=1}return{width:E?N:_,index:E?L:V,truncated:E,ellipsed:E&&Q>=Y}},Ug;var Wg=p(()=>{Fg();lA0=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y,nA0=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,Zg=/(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/yu,iA0=/\t{1,1000}/y,Gg=/[\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,pA0=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,rA0=/\p{M}+/gu,oA0={limit:1/0,ellipsis:""},Ug=qg});var tA0,aA0=($,D={})=>{return Ug($,tA0,D).width},h8;var VE=p(()=>{Wg();tA0={limit:1/0,ellipsis:"",ellipsisWidth:0},h8=aA0});function P5($,D,J){return String($).normalize().split(JT0).map((Q)=>DT0(Q,D,J)).join(`
1
+ import{createRequire as vA0}from"node:module";var module={exports:{}};var RA0=Object.create;var{getPrototypeOf:jA0,defineProperty:WE,getOwnPropertyNames:AA0}=Object;var TA0=Object.prototype.hasOwnProperty;function IA0($){return this[$]}var SA0,PA0,d$=($,D,J)=>{var Q=$!=null&&typeof $==="object";if(Q){var X=D?SA0??=new WeakMap:PA0??=new WeakMap,Y=X.get($);if(Y)return Y}J=$!=null?RA0(jA0($)):{};let F=D||!$||!$.__esModule?WE(J,"default",{value:$,enumerable:!0}):J;for(let Z of AA0($))if(!TA0.call(F,Z))WE(F,Z,{get:IA0.bind($,Z),enumerable:!0});if(Q)X.set($,F);return F};var A=($,D)=>()=>(D||$((D={exports:{}}).exports,D),D.exports);var CA0=($)=>$;function _A0($,D){this[$]=CA0.bind(null,D)}var a6=($,D)=>{for(var J in D)WE($,J,{get:D[J],enumerable:!0,configurable:!0,set:_A0.bind(D,J)})};var p=($,D)=>()=>($&&(D=$($=0)),D);var Q0=vA0(import.meta.url);var ah=A((ZC$,xA0)=>{xA0.exports=[{name:"Agola CI",constant:"AGOLA",env:"AGOLA_GIT_REF",pr:"AGOLA_PULL_REQUEST_ID"},{name:"Alpic",constant:"ALPIC",env:"ALPIC_HOST"},{name:"Appcircle",constant:"APPCIRCLE",env:"AC_APPCIRCLE",pr:{env:"AC_GIT_PR",ne:"false"}},{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN",pr:{env:"CODEBUILD_WEBHOOK_EVENT",any:["PULL_REQUEST_CREATED","PULL_REQUEST_UPDATED","PULL_REQUEST_REOPENED"]}},{name:"Azure Pipelines",constant:"AZURE_PIPELINES",env:"TF_BUILD",pr:{BUILD_REASON:"PullRequest"}},{name:"Bamboo",constant:"BAMBOO",env:"bamboo_planKey"},{name:"Bitbucket Pipelines",constant:"BITBUCKET",env:"BITBUCKET_COMMIT",pr:"BITBUCKET_PR_ID"},{name:"Bitrise",constant:"BITRISE",env:"BITRISE_IO",pr:"BITRISE_PULL_REQUEST"},{name:"Buddy",constant:"BUDDY",env:"BUDDY_WORKSPACE_ID",pr:"BUDDY_EXECUTION_PULL_REQUEST_ID"},{name:"Buildkite",constant:"BUILDKITE",env:"BUILDKITE",pr:{env:"BUILDKITE_PULL_REQUEST",ne:"false"}},{name:"CircleCI",constant:"CIRCLE",env:"CIRCLECI",pr:"CIRCLE_PULL_REQUEST"},{name:"Cirrus CI",constant:"CIRRUS",env:"CIRRUS_CI",pr:"CIRRUS_PR"},{name:"Cloudflare Pages",constant:"CLOUDFLARE_PAGES",env:"CF_PAGES"},{name:"Cloudflare Workers",constant:"CLOUDFLARE_WORKERS",env:"WORKERS_CI"},{name:"Codefresh",constant:"CODEFRESH",env:"CF_BUILD_ID",pr:{any:["CF_PULL_REQUEST_NUMBER","CF_PULL_REQUEST_ID"]}},{name:"Codemagic",constant:"CODEMAGIC",env:"CM_BUILD_ID",pr:"CM_PULL_REQUEST"},{name:"Codeship",constant:"CODESHIP",env:{CI_NAME:"codeship"}},{name:"Drone",constant:"DRONE",env:"DRONE",pr:{DRONE_BUILD_EVENT:"pull_request"}},{name:"dsari",constant:"DSARI",env:"DSARI"},{name:"Earthly",constant:"EARTHLY",env:"EARTHLY_CI"},{name:"Expo Application Services",constant:"EAS",env:"EAS_BUILD"},{name:"Gerrit",constant:"GERRIT",env:"GERRIT_PROJECT"},{name:"Gitea Actions",constant:"GITEA_ACTIONS",env:"GITEA_ACTIONS"},{name:"GitHub Actions",constant:"GITHUB_ACTIONS",env:"GITHUB_ACTIONS",pr:{GITHUB_EVENT_NAME:"pull_request"}},{name:"GitLab CI",constant:"GITLAB",env:"GITLAB_CI",pr:"CI_MERGE_REQUEST_ID"},{name:"GoCD",constant:"GOCD",env:"GO_PIPELINE_LABEL"},{name:"Google Cloud Build",constant:"GOOGLE_CLOUD_BUILD",env:"BUILDER_OUTPUT"},{name:"Harness CI",constant:"HARNESS",env:"HARNESS_BUILD_ID"},{name:"Heroku",constant:"HEROKU",env:{env:"NODE",includes:"/app/.heroku/node/bin/node"}},{name:"Hudson",constant:"HUDSON",env:"HUDSON_URL"},{name:"Jenkins",constant:"JENKINS",env:["JENKINS_URL","BUILD_ID"],pr:{any:["ghprbPullId","CHANGE_ID"]}},{name:"LayerCI",constant:"LAYERCI",env:"LAYERCI",pr:"LAYERCI_PULL_REQUEST"},{name:"Magnum CI",constant:"MAGNUM",env:"MAGNUM"},{name:"Netlify CI",constant:"NETLIFY",env:"NETLIFY",pr:{env:"PULL_REQUEST",ne:"false"}},{name:"Nevercode",constant:"NEVERCODE",env:"NEVERCODE",pr:{env:"NEVERCODE_PULL_REQUEST",ne:"false"}},{name:"Prow",constant:"PROW",env:"PROW_JOB_ID"},{name:"ReleaseHub",constant:"RELEASEHUB",env:"RELEASE_BUILD_ID"},{name:"Render",constant:"RENDER",env:"RENDER",pr:{IS_PULL_REQUEST:"true"}},{name:"Sail CI",constant:"SAIL",env:"SAILCI",pr:"SAIL_PULL_REQUEST_NUMBER"},{name:"Screwdriver",constant:"SCREWDRIVER",env:"SCREWDRIVER",pr:{env:"SD_PULL_REQUEST",ne:"false"}},{name:"Semaphore",constant:"SEMAPHORE",env:"SEMAPHORE",pr:"PULL_REQUEST_NUMBER"},{name:"Sourcehut",constant:"SOURCEHUT",env:{CI_NAME:"sourcehut"}},{name:"Strider CD",constant:"STRIDER",env:"STRIDER"},{name:"TaskCluster",constant:"TASKCLUSTER",env:["TASK_ID","RUN_ID"]},{name:"TeamCity",constant:"TEAMCITY",env:"TEAMCITY_VERSION"},{name:"Travis CI",constant:"TRAVIS",env:"TRAVIS",pr:{env:"TRAVIS_PULL_REQUEST",ne:"false"}},{name:"Vela",constant:"VELA",env:"VELA",pr:{VELA_PULL_REQUEST:"1"}},{name:"Vercel",constant:"VERCEL",env:{any:["NOW_BUILDER","VERCEL"]},pr:"VERCEL_GIT_PULL_REQUEST_ID"},{name:"Visual Studio App Center",constant:"APPCENTER",env:"APPCENTER_BUILD_ID"},{name:"Woodpecker",constant:"WOODPECKER",env:{CI:"woodpecker"},pr:{CI_BUILD_EVENT:"pull_request"}},{name:"Xcode Cloud",constant:"XCODE_CLOUD",env:"CI_XCODE_PROJECT",pr:"CI_PULL_REQUEST_NUMBER"},{name:"Xcode Server",constant:"XCODE_SERVER",env:"XCS"}]});var TH=A((HE)=>{var sh=ah(),Q6=process.env;Object.defineProperty(HE,"_vendors",{value:sh.map(function($){return $.constant})});HE.name=null;HE.isPR=null;HE.id=null;if(Q6.CI!=="false")sh.forEach(function($){let J=(Array.isArray($.env)?$.env:[$.env]).every(function(Q){return eh(Q)});if(HE[$.constant]=J,!J)return;HE.name=$.name,HE.isPR=kA0($),HE.id=$.constant});HE.isCI=!!(Q6.CI!=="false"&&(Q6.BUILD_ID||Q6.BUILD_NUMBER||Q6.CI||Q6.CI_APP_ID||Q6.CI_BUILD_ID||Q6.CI_BUILD_NUMBER||Q6.CI_NAME||Q6.CONTINUOUS_INTEGRATION||Q6.RUN_ID||HE.name||!1));function eh($){if(typeof $==="string")return!!Q6[$];if("env"in $)return Q6[$.env]&&Q6[$.env].includes($.includes);if("any"in $)return $.any.some(function(D){return!!Q6[D]});return Object.keys($).every(function(D){return Q6[D]===$[D]})}function kA0($){switch(typeof $.pr){case"string":return!!Q6[$.pr];case"object":if("env"in $.pr)if("any"in $.pr)return $.pr.any.some(function(D){return Q6[$.pr.env]===D});else return $.pr.env in Q6&&Q6[$.pr.env]!==$.pr.ne;else if("any"in $.pr)return $.pr.any.some(function(D){return!!Q6[D]});else return eh($.pr);default:return null}}});var M1;var YD=p(()=>{M1={name:"@capgo/cli",type:"module",version:"8.106.1",description:"A CLI to upload to capgo servers",author:"Martin martin@capgo.app",license:"Apache 2.0",homepage:"https://github.com/Cap-go/capgo/tree/main/cli#readme",repository:{type:"git",url:"https://github.com/Cap-go/capgo.app",directory:"cli"},bugs:{url:"https://github.com/Cap-go/capgo/issues"},keywords:["appflow alternative","ionic","capacitor","auto update","live update","capgo","cli","upload","capgo-cli","sdk","tanstack-intent"],exports:{".":{import:"./dist/index.js",require:"./dist/index.js"},"./sdk":{types:"./dist/src/sdk.d.ts",import:"./dist/src/sdk.js"}},main:"dist/index.js",types:"dist/src/index.d.ts",bin:{capgo:"dist/index.js"},files:["!skills/_artifacts","dist","skills"],engines:{npm:">=8.0.0",node:">=20.0.0"},scripts:{build:"tsc && bun build.mjs",dev:"NODE_ENV=development ncc build","no-debug":"node dist/index.js","dev-build":"SUPA_DB=development ncc build",pack:"pkg",typecheck:"tsc --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:key-create-mode":"bun test/test-key-create-mode.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:offline-packers":"bun test/test-offline-packers.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:capgo-app-id-prompt":"bun test/test-capgo-app-id-prompt.mjs","test:bundle-soft-delete":"bun test/test-bundle-soft-delete.mjs","test:ci-secrets":"bun test/test-ci-secrets.mjs","test:android-onboarding-progress":"bun test/test-android-onboarding-progress.mjs && bun test/test-android-select-guard.mjs","test:android-keystore-action":"bun test/test-android-keystore-action.mjs","test:android-google-play-action":"bun test/test-android-google-play-action.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:api-perf":"bun test/test-api-perf.mjs","test:preview-qr":"bun test/test-preview-qr.mjs","test:bundle-pages":"bun test test/test-bundle-pages.test.ts","test:bundle-single-requests":"bun test test/test-bundle-single-requests.test.ts","test:mcp-analytics":"bun test/test-mcp-analytics.mjs && bun test/test-mcp-telemetry-project.mjs","test:mcp-instructions":"bun test/test-mcp-instructions.mjs","test:mcp-error-guidance":"bun test/test-mcp-error-guidance.mjs","test:mcp-stdout-guard":"bun test/test-mcp-stdout-guard.mjs","test:mcp-project-dir":"bun test/test-mcp-project-dir.mjs && bun test/test-cwd.mjs && bun test/test-project-context.mjs","test:mcp-host-fields":"bun test/test-mcp-host-fields.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":"bun test/test-app-list.mjs","test:app-todo":"bun test/test-app-todo.mjs && bun test/test-builder-only-checklist.mjs && bun test/test-builder-only-setup.mjs && bun test/test-app-todo-lists.mjs && bun test/test-app-todo-tabs.mjs && bun test/test-app-todo-command.mjs && node test/test-app-todo-interactive.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-capgo-client":"bun test/test-create-capgo-client.mjs","test:no-supabase-sdk":"bun test/test-no-supabase-sdk.mjs","test:no-redirect-error":"bun test/test-no-redirect-error.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 && bun test ./test/test-ios-simulator-compatibility.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-command-execution":"bun test/test-init-command-execution.mjs","test:init-upload-recovery":"bun test/test-init-upload-monorepo-recovery.mjs","test:init-replay":"bun test/test-init-replay.mjs","test:init-ota-checklist":"bun test/test-init-ota-checklist.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 && bun test/test-auth-session-bad-key.mjs","test:mcp":"node test/test-mcp.mjs && node test/test-mcp-skills.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 && bun test/test-build-env.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: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: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-certificate-action":"bun test/test-ios-certificate-action.mjs","test:ios-profile-action":"bun test/test-ios-profile-action.mjs","test:ios-credential-action":"bun test/test-ios-credential-action.mjs","test:ios-e2e":"bun test/test-ios-e2e.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 scripts/run-test-suite.ts","test:run":"bun scripts/run-test-suite.ts","test:serial":"bun run build && bun scripts/run-test-suite.ts --serial","test:monitoring":"bun test test/test-monitoring.test.ts","test:suite":"bun run test:monitoring && 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:key-create-mode && 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:offline-packers && 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:capgo-app-id-prompt && bun run test:ci-secrets && bun run test:android-onboarding-progress && bun run test:android-keystore-action && bun run test:android-google-play-action && 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:api-perf && bun run test:preview-qr && bun run test:bundle-pages && bun run test:bundle-single-requests && bun run test:app-set-options && bun run test:mcp-analytics && bun run test:mcp-instructions && bun run test:mcp-error-guidance && bun run test:mcp-live-update-onboarding && bun run test:mcp-stdout-guard && bun run test:mcp-project-dir && bun run test:mcp-host-fields && 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 && bun run test:app-todo && bun run test:doctor-analytics && bun run test:posthog-exception && bun run test:cli-recovery && bun run test:create-capgo-client && bun run test:bundle-soft-delete && bun run test:no-supabase-sdk && bun run test:no-redirect-error && bun run test:build-platform-selection && bun run test:builder-project-discovery && bun run test:builder-app-selection && 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-command-execution && bun run test:init-upload-recovery && bun run test:init-replay && bun run test:init-telemetry && bun run test:init-ota-checklist && 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: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:support && 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:ios-confirm-app-id && bun run test:ios-create-new && bun run test:ios-certificate-action && bun run test:ios-profile-action && bun run test:ios-credential-action && bun run test:ios-e2e && 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:retryable-capgo-api-error && bun run test:organization-set-api-host && bun run test:plan-validation && bun run test:setup-notices && bun run test:settings-parity && bun run test:init-browser-login && bun run test:android-onboarding-units && bun run test:build-credentials-units && bun run test:onboarding-generators && bun run test:mcp-onboarding","test:build-platform-selection":"bun test/test-build-platform-selection.mjs","test:builder-project-discovery":"bun test/test-builder-project-discovery.mjs","test:builder-app-selection":"bun test/test-builder-app-selection.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-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":"bun test/test-support.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","test:settings-parity":"bun test/test-settings-parity.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:retryable-capgo-api-error":"bun test/test-retryable-capgo-api-error.mjs","test:organization-set-api-host":"bun test/test-organization-set-api-host.mjs","test:plan-validation":"bun test/test-plan-validation.mjs && bun test ./test/test-direct-offer-plan.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","test:init-browser-login":"bun test test/init/","test:android-onboarding-units":"bun test/test-android-gradle.mjs && bun test/test-android-keystore.mjs && bun test/test-android-oauth.mjs && bun test/test-android-play.mjs && bun test/test-android-tui-sequencing.mjs","test:build-credentials-units":"bun test/test-credentials-migration.mjs && bun test/test-provisioning-map-validation.mjs && bun test/test-mobileprovision-parser.mjs","test:onboarding-generators":"bun test/test-diff-utils.mjs && bun test/test-workflow-generator.mjs","test:mcp-onboarding":"bun test ./test/build/onboarding/mcp/scoped-credential-path.test.ts && bun test/test-mcp-onboarding.mjs","test:setup-notices":"bun test ./test/test-setup-notices.mjs ./test/test-setup-progress-request.mjs ./test/test-setup-notice-background.mjs ./test/test-init-completion-notice.mjs && bun test ./test/test-builder-setup-notice.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":"^21.0.4",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.5.4"},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","@sinonjs/fake-timers":"15.4.0","@std/semver":"npm:@jsr/std__semver@1.0.8","@tanstack/intent":"^0.3.6","@types/adm-zip":"^0.5.8","@types/cross-spawn":"^6.0.6","@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":"npm:typescript@7.1.0-beta","@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","cross-spawn":"^7.0.6",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 D0;var G$=p(()=>{D0=class D0 extends Error{context;constructor($,D,J){super($,J!==void 0?{cause:J}:void 0);this.name="CliUserError",this.context=D}}});import{platform as yA0}from"node:os";import{version as bA0}from"node:process";function mA0($){for(let D=0;D<$.length;D++)if($.charCodeAt(D)>255)return!1;return!0}function Jg($){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 dA0($){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 configuration.";return"Capgo API key contains invalid characters (only ASCII is allowed). Copy the key from the Capgo dashboard."}function zE($,D){if(D===void 0||D===null){if(OE.has($.toLowerCase()))throw new D0(Jg($));throw new D0(`HTTP header "${$}" is missing or invalid.`)}if(typeof D!=="string"){if(OE.has($.toLowerCase()))throw new D0(Jg($));throw new D0(`HTTP header "${$}" is missing or invalid.`)}if(!mA0(D)){if(OE.has($.toLowerCase()))throw new D0(dA0($));throw new D0(`HTTP header "${$}" contains invalid characters (only ASCII is allowed).`)}return D}function cA0($=IH.isCI,D=IH.name){if(!$)return;return(D??"").replace(/[^\x20-\x7E]/g,"").trim().slice(0,64)||"ci"}function p$($){let D={capgo_api:hA0,"x-cli-version":M1.version,"x-cli-command":gA0,"x-cli-node":bA0,"x-cli-os":yA0()},J=cA0();if(J)D["x-cli-ci"]=J;if($)for(let[Q,X]of Object.entries($))D[Q]=zE(Q,X);return D}var IH,hA0="2025-10-01",gA0="",OE;var FD=p(()=>{YD();G$();IH=d$(TH(),1),OE=new Set(["authorization","capgkey","x-capgo-log-token"])});var Qg,Xg=($)=>{return $===12288||$>=65281&&$<=65376||$>=65504&&$<=65510},Yg=($)=>{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 Fg=p(()=>{Qg=(()=>{let $=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;return(D)=>{let J=0;$.lastIndex=0;while($.test(D))J+=1;return D.length-J}})()});var lA0,nA0,Zg,iA0,Gg,pA0,rA0,oA0,qg=($,D={},J={})=>{let Q=D.limit??1/0,X=D.ellipsis??"",Y=D?.ellipsisWidth??(X?qg(X,oA0,J).width:0),F=0,Z=J.controlWidth??0,G=J.tabWidth??8,q=J.emojiWidth??2,U=2,W=J.regularWidth??1,H=J.wideWidth??2,K=[[pA0,W],[lA0,0],[nA0,Z],[iA0,G],[Gg,q],[Zg,H]],O=0,z=0,V=$.length,M=0,E=!1,L=V,N=Math.max(0,Q-Y),B=0,w=0,_=0,x=0;$:while(!0){if(w>B||z>=V&&z>O){let j=$.slice(B,w)||$.slice(O,z);M=0;for(let k of j.replaceAll(rA0,"")){let v=k.codePointAt(0)||0;if(Xg(v))x=2;else if(Yg(v))x=H;else x=W;if(_+x>N)L=Math.min(L,Math.max(B,O)+M);if(_+x>Q){E=!0;break $}M+=k.length,_+=x}B=w=0}if(z>=V)break $;for(let j=0,k=K.length;j<k;j++){let[v,d]=K[j];if(v.lastIndex=z,v.test($)){if(M=v===Zg?Qg($.slice(z,v.lastIndex)):v===Gg?1:v.lastIndex-z,x=M*d,_+x>N)L=Math.min(L,z+Math.floor((N-_)/d));if(_+x>Q){E=!0;break $}_+=x,B=O,w=z,z=O=v.lastIndex;continue $}}z+=1}return{width:E?N:_,index:E?L:V,truncated:E,ellipsed:E&&Q>=Y}},Ug;var Wg=p(()=>{Fg();lA0=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y,nA0=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,Zg=/(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/yu,iA0=/\t{1,1000}/y,Gg=/[\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,pA0=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,rA0=/\p{M}+/gu,oA0={limit:1/0,ellipsis:""},Ug=qg});var tA0,aA0=($,D={})=>{return Ug($,tA0,D).width},h8;var VE=p(()=>{Wg();tA0={limit:1/0,ellipsis:"",ellipsisWidth:0},h8=aA0});function P5($,D,J){return String($).normalize().split(JT0).map((Q)=>DT0(Q,D,J)).join(`
2
2
  `)}var SH="\x1B",Vg="›",sA0=39,NE="\x07",Lg="[",eA0="]",Ng="m",ME,Hg,Kg=($)=>{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},Og=($)=>`${SH}${Lg}${$}${Ng}`,zg=($)=>`${SH}${ME}${$}${NE}`,LE=($,D,J)=>{let Q=D[Symbol.iterator](),X=!1,Y=!1,F=$.at(-1),Z=F===void 0?0:h8(F),G=Q.next(),q=Q.next(),U=0;while(!G.done){let W=G.value,H=h8(W);if(Z+H<=J)$[$.length-1]+=W;else $.push(W),Z=0;if(W===SH||W===Vg)X=!0,Y=D.startsWith(ME,U+1);if(X){if(Y){if(W===NE)X=!1,Y=!1}else if(W===Ng)X=!1}else if(Z+=H,Z===J&&!q.done)$.push(""),Z=0;G=q,q=Q.next(),U+=W.length}if(F=$.at(-1),!Z&&F!==void 0&&F.length&&$.length>1)$[$.length-2]+=$.pop()},$T0=($)=>{let D=$.split(" "),J=D.length;while(J){if(h8(D[J-1]))break;J--}if(J===D.length)return $;return D.slice(0,J).join(" ")+D.slice(J).join("")},DT0=($,D,J={})=>{if(J.trim!==!1&&$.trim()==="")return"";let Q="",X,Y,F=$.split(" "),Z=[""],G=0;for(let W=0;W<F.length;W++){let H=F[W];if(J.trim!==!1){let O=Z.at(-1)??"",z=O.trimStart();if(O.length!==z.length)Z[Z.length-1]=z,G=h8(z)}if(W!==0){if(G>=D&&(J.wordWrap===!1||J.trim===!1))Z.push(""),G=0;if(G||J.trim===!1)Z[Z.length-1]+=" ",G++}let K=h8(H);if(J.hard&&K>D){let O=D-G,z=1+Math.floor((K-O-1)/D);if(Math.floor((K-1)/D)<z)Z.push("");LE(Z,H,D),G=h8(Z.at(-1)??"");continue}if(G+K>D&&G&&K){if(J.wordWrap===!1&&G<D){LE(Z,H,D),G=h8(Z.at(-1)??"");continue}Z.push(""),G=0}if(G+K>D&&J.wordWrap===!1){LE(Z,H,D),G=h8(Z.at(-1)??"");continue}Z[Z.length-1]+=H,G+=K}if(J.trim!==!1)Z=Z.map((W)=>$T0(W));let q=Z.join(`
3
3
  `),U=!1;for(let W=0;W<q.length;W++){let H=q[W];if(Q+=H,!U){if(U=H>="\uD800"&&H<="\uDBFF",U)continue}else U=!1;if(H===SH||H===Vg){Hg.lastIndex=W+1;let O=Hg.exec(q)?.groups;if(O?.code!==void 0){let z=Number.parseFloat(O.code);X=z===sA0?void 0:z}else if(O?.uri!==void 0)Y=O.uri.length===0?void 0:O.uri}if(q[W+1]===`
4
4
  `){if(Y)Q+=zg("");let K=X?Kg(X):void 0;if(X&&K)Q+=Og(K)}else if(H===`
@@ -680,7 +680,7 @@ Docs: ${$h}`);let F=await _$({message:"Have you added notifyAppReady() and rebui
680
680
  Request ID: ${X}`:"";super(`Abandoning manifest upload. The following error occurred: ${Q}${Y}`);this.name="ManifestUploadAbandonError",this.backendMessage=Q,this.requestId=X,this.scope=$}}function Eh($){if($===void 0)return;let D;try{D=JSON.parse($)}catch{return}if(!D||typeof D!=="object"||Array.isArray(D))return;let J=D,Q=J.moreInfo&&typeof J.moreInfo==="object"&&!Array.isArray(J.moreInfo)?J.moreInfo:void 0,X=typeof Q?.requestId==="string"?Q.requestId:typeof J.requestId==="string"?J.requestId:void 0;if(typeof J.abandon_explicit_error==="string")return new q7("all",J.abandon_explicit_error,X);if(typeof J.abandon_manifest_only_explicit_error==="string")return new q7("manifest",J.abandon_manifest_only_explicit_error,X);return}function hR0($){return Eh($?.originalResponse?.getBody?.())}function gR0($,D){return $.scope==="manifest"&&D?"manifest":"all"}class wh{abandonError;abandonPromise;activeUploads=new Map;register($,D){if(this.abandonError)return D(this.abandonError),!1;return this.activeUploads.set($,D),!0}unregister($){this.activeUploads.delete($)}throwIfAbandoned(){if(this.abandonError)throw this.abandonError}async abandon($){if(!this.abandonError)this.abandonError=$;if(!this.abandonPromise){let D=[...this.activeUploads.entries()];this.activeUploads.clear(),this.abandonPromise=(async()=>{await Promise.allSettled(D.map(async([J])=>{await J.abort()}));for(let[,J]of D)J(this.abandonError)})()}await this.abandonPromise}}var S5={info:($)=>w1().info($),warn:($)=>w1().warn($),error:($)=>w1().error($)},TI$=new Set([429,502,503,504]),II$=30000;function SI$($){return TI$.has($)}function dR0($){return Math.min($,II$)}function PI$($,D,J){let Q=D[J];if(Q===void 0)return;if($.status!==429)return Q;let X=$.headers.get("Retry-After")?.trim();if(!X)return Q;if(/^\d+$/.test(X)){let F=Number(X),Z=F*1000;if(Number.isSafeInteger(F)&&Number.isFinite(Z))return dR0(Z)}let Y=Date.parse(X);if(Number.isFinite(Y)){let F=Y-Date.now();if(F>=0)return dR0(F)}return Q}function CI$($){return new D0(`Cannot check whether manifest file exists (HTTP ${$})`,{status:$})}async function _I$($,D){let J=new URL(`${$}${encodeURIComponent(D)}`),Q=_F.slice(0,3);for(let X=0;;X++){J.searchParams.set("nocache",`${Date.now()}`);try{let Y=await fetch(J.toString(),{method:"GET",redirect:"manual",headers:p$({"cache-control":"no-cache"})});if(Y.status===404)return{exists:!1};if(!Y.ok){let F=SI$(Y.status)?PI$(Y,Q,X):void 0;if(F!==void 0){if(await Y.body?.cancel(),F>0)await new Promise((Z)=>setTimeout(Z,F));continue}throw CI$(Y.status)}return{exists:!0,receipt:Y.headers.get("X-Capgo-Manifest-Size-Receipt")??void 0}}catch(Y){let F=Q[X];if(!b9(Y)||F===void 0)throw Y;if(F>0)await new Promise((Z)=>setTimeout(Z,F))}}}var vI$=8192;async function xI$($){let D=U1(),J=await R4("@capgo/capacitor-updater",D,$.packageJson),Q;try{Q=J?b$(J):void 0}catch{Q=void 0}if(!J||!Q)return{version:null,supportsBrotliV2:!1};let X=!mD(Q,void 0,void 0,NU);return{version:`${Q.major}.${Q.minor}.${Q.patch}`,supportsBrotliV2:X}}function kI$($,D){if(!D)return!1;let J=D.split(",").map((Q)=>Q.trim()).filter((Q)=>!!Q);if(J.length===0)return!1;return cR0.isMatch($,J)}async function uI$($,D,J){let X=EI$($).size,Y=await jh(Rh($));if(X===0)return{buffer:Y,useBrotli:!1};if(kI$(D,J.noBrotliPatterns))return{buffer:Y,useBrotli:!1};if(X<vI$)return{buffer:Y,useBrotli:!1};try{let F=await jh(Rh($).pipe(AI$({})));if(F.length>=X-10)return{buffer:Y,useBrotli:!1};return{buffer:F,useBrotli:!0}}catch(F){return S5.warn(`Brotli compression failed for ${$}: ${F}, using original file`),{buffer:Y,useBrotli:!1}}}async function Ah($,D,J,Q=!1){let X=w1().spinner();X.start(D!=="v2"?"Generating the update manifest":`Generating the update manifest with ${Q?"V3":"V2"} encryption`);let Y=await PL($);if(D==="v2")for(let F of Y)F.hash=Q?Q3(F.hash,J):J3(F.hash,J);return X.stop("Manifest generated successfully"),Y}async function nR0($,D,J,Q,X,Y,F=!1){let Z=await Ah($,X,Y,F);return await e0(D,{channel:"partial-update",event:"Generate manifest",org_id:J,tracking_version:2,tags:{"app-id":Q}}),Z}function iR0($){if(wI$()!=="win32")return $;return mR0.normalize($).split(mR0.sep).join(jI$.sep)}class O3 extends D0{constructor($){super($);this.name="PartialUploadValidationError"}}async function fI$($,D){let{version:J,supportsBrotliV2:Q}=await xI$(D);if(!Q)throw new O3(`Your project is using an older version of @capgo/capacitor-updater (${J||"unknown"}). To use Delta updates, please upgrade to version ${IL} (v5), ${SL} (v6) or ${NU} (v7) or higher.`);if(D.disableBrotli)S5.info("Brotli compression disabled by user request");else if(D.noBrotliPatterns)S5.info(`Files matching patterns (${D.noBrotliPatterns}) will be excluded from brotli compression`);let X=$.filter((Y)=>Y.file.includes(" "));if(X.length>0)throw new O3(`Files with spaces in their names (${X.map((Y)=>Y.file).join(", ")}). Please rename the files.`);if($.length>VU)throw new O3(NL($.length))}async function pR0($,D,J,Q){let X=RI$(D,$.file),Y=iR0($.file),F=Q.disableBrotli?{buffer:await jh(Rh(X)),useBrotli:!1}:await uI$(X,Y,Q),Z=J?D3(F.buffer,J.sessionKey,J.ivSessionKey):F.buffer,G=F.useBrotli?`${Y}.br`:Y;return{buffer:Z,fileName:G,compression:F.useBrotli?"brotli":"none",uploadedBytesSha256:BI$("sha256").update(Z).digest("hex"),uploadedBytesSize:Z.byteLength}}async function oB($,D,J,Q,X){if(await fI$($,Q),$.length===0)throw new D0("Cannot request a manifest upload for an empty manifest");let Y=[];for(let[F,Z]of $.entries()){let G=await pR0(Z,D,J,Q),q={id:F,file_name:G.fileName,compression:G.compression,file_hash:Z.hash,uploaded_bytes_sha256:G.uploadedBytesSha256,uploaded_bytes_size:G.uploadedBytesSize};if(Y.push(q),X)await X(q,G.buffer)}return Y}function yI$($,D){if($.request.file_name!==D.fileName||$.request.compression!==D.compression||$.request.uploaded_bytes_sha256!==D.uploadedBytesSha256||$.request.uploaded_bytes_size!==D.uploadedBytesSize)throw new D0(`Manifest file changed while preparing the upload: ${$.request.file_name}`)}function bI$($){return p$({[$.uploadAuthorization.headerName]:$.uploadAuthorization.value})}async function rR0($,D,J,Q,X,Y,F,Z){let G=w1().spinner();G.start("Preparing delta update with TUS protocol");let q=performance.now(),U=!!F.userRequestedDelta;if(Z.entries.length!==D.length)throw new D0("Manifest upload authorization does not match the local manifest");let W=0,H=D.length,K=Z.entries.filter((z)=>z.request.compression==="brotli").length,O=new wh;try{G.message(`Uploading ${H} files using TUS protocol`);let z=async(N,B)=>{O.throwIfAbandoned();let w=iR0(N.file),_=await pR0(N,J,Y,F),x=_.buffer;O.throwIfAbandoned();let j=Z.entries[B];if(j.request.file_hash!==N.hash)throw new D0(`Manifest upload authorization does not match the local manifest entry ${B}`);yI$(j,_);let k=_.fileName,v=j.s3Path;if(j.action==="reuse")return W++,{file_name:k,s3_path:v,file_hash:N.hash,file_size_receipt:j.fileSizeReceipt};let d={exists:!1};if(j.action==="upload_if_doesnt_exist")try{d=await _I$(j.uploadTarget.existence_check_url_prefix,v)}catch(l){let a=l instanceof Error?l.message:String(l);throw Error(`Cannot check whether delta file exists: ${w}: ${a}`,{cause:l})}if(O.throwIfAbandoned(),d.exists)return W++,Promise.resolve({file_name:k,s3_path:v,file_hash:N.hash,file_size_receipt:d.receipt});return new Promise((l,a)=>{G.message(`Prepare upload delta file: ${w}`);let g=SQ(k),I=bI$(j),S=new lR0.Upload(x,{endpoint:j.uploadTarget.upload_url,chunkSize:F.tusChunkSize,retryDelays:[..._F],removeFingerprintOnSuccess:!0,metadata:{filename:v,filetype:g},headers:I,onAfterResponse(u,h){let c=Eh(h.getBody());if(c)return O.abandon(c)},onError:(u)=>{let h=hR0(u);if(h){O.abandon(h);return}O.unregister(S);let c=F.verbose?ML(u):u.toString();if(nx(u)){S5.error(`Failed to upload ${w}: ${c}`),a(Error(MU(Q)));return}let m;try{let o=c.match(/response text: (\{.*?\})/);if(o&&o[1])m=JSON.parse(o[1]).moreInfo?.requestId}catch{}let Y0=m?` [requestId: ${m}]`:"";S5.error(`Failed to upload ${w}: ${c}${Y0}`),a(u)},onProgress(){let u=(W/H*100).toFixed(2);G.message(`Uploading delta update: ${u}%`)},onSuccess({lastResponse:u}){O.unregister(S),W++,l({file_name:k,s3_path:v,file_hash:N.hash,file_size_receipt:u.getHeader("X-Capgo-Manifest-Size-Receipt")??void 0})}});if(O.register(S,a))S.start()})},V=F.deltaUploadConcurrency??50,M=[];for(let N=0;N<D.length;N+=V){O.throwIfAbandoned();let B=D.slice(N,N+V),w=Math.floor(N/V)+1,_=Math.ceil(D.length/V);if(_>1)G.message(`Processing batch ${w}/${_} (${B.length} files)`);let x=await Promise.all(B.map((j,k)=>z(j,N+k)));M.push(...x)}if(M.some((N)=>!N.file_size_receipt))throw new D0("Manifest upload did not return a size receipt for every file");let L=((performance.now()-q)/1000).toFixed(2);if(G.stop(`Delta update uploaded successfully \uD83D\uDCAA in (${L} seconds)`),K>0)S5.info(`${K} of ${H} files were compressed with brotli and use .br extension`);return await e0($,{channel:"app",event:`App Partial TUS done${K>0?" with .br extension":""}`,org_id:X,tracking_version:2,tags:{"app-id":Q}}),await e0($,{channel:"performance",event:"Partial upload performance",org_id:X,tracking_version:2,tags:{"app-id":Q,time:L}}),M}catch(z){let M=((performance.now()-q)/1000).toFixed(2);if(G.error(`Failed to upload delta update (after ${M} seconds)`),z instanceof q7)throw z;let E=F.verbose?ML(z):String(z);if(U)throw S5.error(`Error uploading delta update: ${E}`),S5.error("Delta upload was explicitly requested but failed. Upload aborted."),z;else return S5.info(`Error uploading delta update: ${E}, This is not a critical error, the bundle has been uploaded without the delta files`),null}}u7();function Th($){if(!$)return[];let D=$.split(",").map((J)=>J.trim()).filter(Boolean);return Array.from(new Set(D))}function z3($){return $.join(", ")}function oR0($,D,J){let Q=[],X=[];for(let Y of $){if(J.get(Y)===D){Q.push(Y);continue}X.push(Y)}return{channelsAlreadyCurrent:Q,channelsToAssign:X}}TD();import{existsSync as Ih,readFileSync as hI$}from"node:fs";Jq();G$();u0();u7();var u9={info:($)=>w1().info($),warn:($)=>w1().warn($),error:($)=>w1().error($)};function Sh($){throw u9.error($),new D0($)}var gI$="5.30.0",mI$="6.30.0",dI$="7.30.0",tR0=["@capgo/cordova-updater","cordova-plugin-capgo"];function cI$($){return tR0.includes($)}async function lI$($,D){if(!b8($.mode)){let J=await R4("@capgo/capacitor-updater",D,$.packageJson);return J?{packageName:"@capgo/capacitor-updater",version:J}:null}for(let J of tR0){let Q=await R4(J,D,$.packageJson);if(Q)return{packageName:J,version:Q}}return null}async function tB($,D,J,Q={}){let X,Y,F="",Z=null,G="none",q="",U="",W,H=D.keyV2,K=D.key===!1,O=w1().spinner();O.start(`Zipping bundle from ${$}`),Z=await CL($),O.message("Calculating checksum");let z=U1(),V=await lI$(D,z),M=V?.version,E=V?.packageName,L=!1,N;try{N=M?b$(M):void 0}catch{N=void 0}if(!V)if(b8(D.mode))u9.warn("Cannot find a Capgo updater plugin in node_modules. Using SHA256 checksum for this Cordova upload."),L=!0;else Sh("Cannot find @capgo/capacitor-updater in node_modules, please install it first with your package manager");else if(E&&cI$(E))L=!0;else if(N)L=!mD(N,IL,SL,NU);else if(M==="link:@capgo/capacitor-updater"||M==="file:.."||M==="file:../")u9.warn(`Using local ${E??"@capgo/capacitor-updater"}. Assuming latest version for checksum calculation.`),L=!0;let B=D.forceCrc32Checksum===!0,w=!B&&((H||D.keyDataV2||Ih(z6))&&!K||L),_=w?"sha256":"crc32";if(F=await ZJ(Z,_),O.stop(`Checksum ${w?"SHA256":"CRC32"}${B?" (forced)":""}: ${F}`),K)u9.info("Encryption ignored");else if((H||Ih(z6)||D.keyDataV2)&&!D.oldEncryption){let x=typeof H==="string"?H:z6,j=D.keyDataV2||"";if(!j&&!Ih(x))Sh(`Cannot find private key ${x}`);if(await Q.onEncryptV2?.(),!j)j=hI$(x).toString();let k=N&&!mD(N,"5.30.0","6.30.0","7.30.0");u9.info(`Encrypting your bundle with ${k?"V3":"V2"}`);let{sessionKey:v,ivSessionKey:d}=wB(j),l=D3(Z,v,d);if(F=k?Q3(F,j):J3(F,j),X=d,W=k?"v3":"v2",Y=v,G="v2",q=j,J){if(U=YE0(J),D.verbose)u9.info(`[Verbose] Encryption key_id: ${U}`)}if(D.displayIvSession)u9.info(`Your Iv Session key is ${X},
681
681
  keep it safe, you will need it to decrypt your bundle.
682
682
  It will be also visible in your dashboard
683
- `);Z=l}return{zipped:Z,ivSessionKey:X,sessionKey:Y,checksum:F,checksumAlgorithm:_,checksumEncryption:W,encryptionMethod:G,finalKeyData:q,keyId:U,updaterVersion:M,updaterPackageName:E}}function aB($,D){let J=$?new Map($.filter((X)=>!!X.native&&X.native!==void 0).map((X)=>[X.name,X])):new Map;return J.size>0||!D?Array.from(J,([X,Y])=>({name:X,version:Y.version,requested_version:Y.requested_version,...Y.ios_checksum&&{ios_checksum:Y.ios_checksum},...Y.android_checksum&&{android_checksum:Y.android_checksum}})):void 0}async function sB($,D){if($.encryptDelta=$.encryptDelta||$.encryptPartial,$.encryptDelta&&D!=="v2")Sh("You cannot encrypt the delta update if you are not using the v2 encryption method");let J=!1;if($.delta&&D==="v2"&&!$.encryptDelta){let Q=U1(),X=await R4("@capgo/capacitor-updater",Q,$.packageJson),Y;try{Y=X?b$(X):void 0}catch{Y=void 0}if(X&&Y&&tH(Y,b$("6.14.4"))){if(u9.info(`Auto-enabling delta update encryption for updater version ${Y} (>= 6.14.4)`),$.verbose)u9.info("[Verbose] Delta encryption auto-enabled for updater >= 6.14.4");$.encryptDelta=!0}}if($.delta&&($.encryptDelta||D==="v2")){let Q=U1(),X=await R4("@capgo/capacitor-updater",Q,$.packageJson),Y;try{Y=X?b$(X):void 0}catch{Y=void 0}if(X&&Y){if(J=!mD(Y,gI$,mI$,dI$),$.verbose&&J)u9.info(`[Verbose] Using hex checksum format for updater version ${Y}`)}}return{supportsHexChecksum:J}}G$();u0();function nI$($){let D=$.appId?.trim()||"<appId>",J=$.path?.trim()||"www",Q=$.channel?.trim()||"<channel>";return`npx @capgo/cli@latest bundle upload ${D} --mode cordova --path ${J} --channel ${Q}`}function iI$($){return[EL,"If this is a Cordova project (config.xml / plugin.xml and a www folder), retry with:",nI$($)].join(`
683
+ `);Z=l}return{zipped:Z,ivSessionKey:X,sessionKey:Y,checksum:F,checksumAlgorithm:_,checksumEncryption:W,encryptionMethod:G,finalKeyData:q,keyId:U,updaterVersion:M,updaterPackageName:E}}function aB($,D){let J=$?new Map($.filter((X)=>!!X.native&&X.native!==void 0).map((X)=>[X.name,X])):new Map;return J.size>0||!D?Array.from(J,([X,Y])=>({name:X,version:Y.version,requested_version:Y.requested_version,...Y.ios_checksum&&{ios_checksum:Y.ios_checksum},...Y.android_checksum&&{android_checksum:Y.android_checksum}})):void 0}async function sB($,D){if($.encryptDelta=$.encryptDelta||$.encryptPartial,$.encryptDelta&&D!=="v2")Sh("You cannot encrypt the delta update if you are not using the v2 encryption method");let J=!1;if($.delta&&D==="v2"&&!$.encryptDelta){let Q=U1(),X=await R4("@capgo/capacitor-updater",Q,$.packageJson),Y;try{Y=X?b$(X):void 0}catch{Y=void 0}if(X&&Y&&tH(Y,b$("6.14.4"))){if(u9.info(`Auto-enabling delta update encryption for updater version ${X} (>= 6.14.4)`),$.verbose)u9.info("[Verbose] Delta encryption auto-enabled for updater >= 6.14.4");$.encryptDelta=!0}}if($.delta&&($.encryptDelta||D==="v2")){let Q=U1(),X=await R4("@capgo/capacitor-updater",Q,$.packageJson),Y;try{Y=X?b$(X):void 0}catch{Y=void 0}if(X&&Y){if(J=!mD(Y,gI$,mI$,dI$),$.verbose&&J)u9.info(`[Verbose] Using hex checksum format for updater version ${X}`)}}return{supportsHexChecksum:J}}G$();u0();function nI$($){let D=$.appId?.trim()||"<appId>",J=$.path?.trim()||"www",Q=$.channel?.trim()||"<channel>";return`npx @capgo/cli@latest bundle upload ${D} --mode cordova --path ${J} --channel ${Q}`}function iI$($){return[EL,"If this is a Cordova project (config.xml / plugin.xml and a www folder), retry with:",nI$($)].join(`
684
684
  `)}function pI$($,D){if($ instanceof D0&&$.message===EL)throw new D0(iI$({appId:D.appId,path:D.path,channel:D.channel}));throw $}async function aR0($,D={}){if(b8($.mode))return lE0({path:$.path,appId:D.appId});try{return await U$()}catch(J){pI$(J,{appId:D.appId,path:$.path,channel:$.channel})}}var sR0="Upload cancelled by user",r={info:($)=>w1().info($),warn:($)=>w1().warn($),error:($)=>w1().error($),success:($)=>w1().success($)};function c0($){throw r.error($),new D0($)}async function eB($,D){let J=await jL($);c0(J||await D())}function Ch(){throw r.warn(sR0),new D0(sR0)}class Qj0 extends D0{}async function Ph($,D,J,Q){try{return await qL($,D,{apikey:$,...Q})}catch(X){c0(`Cannot ${J} bundle ${F0(X)}`)}}function oI$($){let D=$.map((J)=>{let Q=TJ(J);return[J.name,J.localVersion||"-",J.remoteVersion||"-",Q.compatible?"✅":"❌",Q.message]});r.info(R8({headers:["Package","Local","Remote","Status","Details"],rows:D}))}async function tI$($,D){let J=AJ("",D.packageJson),Q=D.bundle||$?.plugins?.CapacitorUpdater?.version||J||`0.0.1-beta.local-${rI$().split("-")[0]}`;if(!IQ.test(Q))c0(`Your bundle name ${Q}, is not valid it should follow semver convention : https://semver.org/`);return Q}function aI$($){let D=$.apikey||j0();if(!D)c0("Missing API key, you need to provide an API key to upload your bundle");return D}async function sI$($,D,J,Q){let X=await CB({explicitAppId:$,config:J,apikey:D.apikey||j0(!0),packageJsonPaths:G3(D.packageJson),interactive:Q,apiHost:D.apiHost}),Y=D.path||J?.webDir||(b8(D.mode)?vB:void 0);if(!X)c0(b8(D.mode)?"Missing appId. Pass it on the command line or set id in config.xml / plugin.xml":"Missing argument, you need to provide a appid or be in a capacitor project");if(!Y)c0(b8(D.mode)?`Missing upload path. Pass --path or use the default Cordova web dir (${vB})`:"Missing argument, you need to provide a path (--path), or be in a capacitor project");if(!Jj0(Y))c0(`Path ${Y} does not exist, build your app first, or provide a valid path`);return{appid:X,path:Y}}async function eI$($,D,J){if($.codeCheck===!1||$.ignoreNotifyAppReady)return;if(!W8(D,"notifyAppReady")){if(await hB({webDir:D,interactive:J})==="skipped")return}if(!W8(D,"notifyAppReady"))throw r.error(`notifyAppReady() is missing in the build folder of your app. see: https://capgo.app/docs/plugins/updater/notifyappready
685
685
  If you are sure your app has this code, you can use the --no-code-check or --ignore-notify-app-ready option`),Error(`notifyAppReady() is missing in the build folder of your app. see: https://capgo.app/docs/plugins/updater/notifyappready
686
686
  If you are sure your app has this code, you can use the --no-code-check or --ignore-notify-app-ready option`.trim());if(!q3(D))c0(`index.html is missing in the root folder of ${D}`)}async function $S$($,D,J,Q,X,Y,F){let{ignoreMetadataCheck:Z,autoMinUpdateVersion:G,minUpdateVersion:q}=J,U={apiHost:J.apiHost},W;try{W=await Tx({apikey:$,...U},X,Q)}catch(L){c0(`Cannot load channel ${Q} for compatibility checks ${F0(L)}`)}let H=W?.version??void 0,K=!!W&&W.disable_auto_update==="version_number",O,z;if(W?.version&&W.version.native_packages!=null&&!Z){let L=w1().spinner();L.start(`Checking bundle compatibility with channel ${Q}`);let{finalCompatibility:N,localDependencies:B}=await kL($,X,Q,J.packageJson,J.nodeModules,U,W.version.native_packages);if(z=N,O=B,z.filter((_)=>!dD(_)).length>0){if(L.error(`Bundle NOT compatible with ${Q} channel`),r.warn(""),oI$(z),r.warn(""),r.warn("An app store update may be required for these changes to take effect."),G)q=Y,r.info(`Auto set min-update-version to ${q}`)}else if(G)try{let _=W.version?.min_update_version;if(!_||!IQ.test(_))c0("Invalid remote min update version, skipping auto setting compatibility");q=_,L.stop(`Auto set min-update-version to ${q}`)}catch{c0(`Cannot auto set compatibility, invalid data ${W}`)}else L.stop(`Bundle compatible with ${Q} channel`)}else if(!Z){if(r.warn(`Channel ${Q} is new or it's your first upload with compatibility check, it will be ignored this time`),O=await BU(J.packageJson,J.nodeModules),G)q=Y,r.info(`Auto set min-update-version to ${q}`)}let V=z?void 0:Z?"ignore_metadata_check":"no_remote_metadata",M=tB0(z);if($$({channel:"bundle",event:"Bundle Upload Compatibility Checked",apikey:J.apikey,appId:X,orgId:F,tags:{result:M.result,incompatible_count:M.incompatibleCount,channel:Q,channel_name:Q,...M.reasons.length>0?{reasons:M.reasons.join(",")}:{},...V?{skip_reason:V}:{}}}),K&&!q&&!Z)c0("You need to provide a min-update-version to upload a bundle to this channel");if(q){if(!IQ.test(q))c0(`Your minimal version update ${q}, is not valid it should follow semver convention : https://semver.org/`)}return{nativePackages:aB(O,J.ignoreMetadataCheck),minUpdateVersion:q,incompatibleCount:M.incompatibleCount,compatibility:{result:M.result,versionOldId:H?.id!=null?String(H.id):void 0,versionOldName:H?.name}}}async function DS$($,D,J,Q=!1,X=!1,Y){if(await GL($,D,J,{...Y,includeDeleted:!0}).catch((Z)=>c0(F0(Z)))){if(Q)return r.warn(`Version ${J} already exists - exiting gracefully due to --version-exists-ok option`),w1().outro("Bundle version already exists - exiting gracefully \uD83C\uDF89"),!0;if(X){r.error(`❌ Version ${J} already exists`);let Z=Bw0(J);r.info("\uD83D\uDCA1 Here are some suggestions:"),Z.forEach((U,W)=>{r.info(` ${W+1}. ${U}`)});let G=await z1({message:"What would you like to do?",options:[{value:"suggest1",label:`Use ${Z[0]}`},{value:"suggest2",label:`Use ${Z[1]}`},{value:"suggest3",label:`Use ${Z[2]}`},{value:"suggest4",label:`Use ${Z[3]}`},{value:"custom",label:"Enter a custom version"},{value:"cancel",label:"Cancel upload"}]});if(i0(G)||typeof G!=="string"||G==="cancel")Ch();let q;if(G==="custom"){let U=await Mw0(J,"upload");if(!U)Ch();q=U}else{let U=Number.parseInt(G.replace("suggest",""))-1;q=Z[U]}return r.info(`\uD83D\uDD04 Retrying with new version: ${q}`),q}c0(`Version ${J} already exists`)}return!1}function JS$($){let D;for(let{minUpdateVersion:J}of $){if(!J)continue;if(!D||tH(b$(J),b$(D)))D=J}return D}async function QS$($,D,J,Q,X){let Y=new Map;for(let G of J){let q=w1().spinner();q.start(`Checking bundle checksum compatibility with channel ${G}`);let U=await tF0($,D,G,X);if(Y.set(G,U),!U){q.stop(`No checksum found for channel ${G}, the bundle will be uploaded`);continue}if(U===Q){q.stop(`Channel ${G} already has this bundle checksum`);continue}q.stop(`Checksum compatible with ${G} channel`)}let{channelsAlreadyCurrent:F,channelsToAssign:Z}=oR0(J,Q,Y);if(Z.length===0){let G=z3(J);throw r.error(`Cannot upload the same bundle content.
@@ -1,4 +1,4 @@
1
- import{createRequire as IP}from"node:module";var tT=Object.create;var{getPrototypeOf:aT,defineProperty:A2,getOwnPropertyNames:rW,getOwnPropertyDescriptor:eT}=Object,oW=Object.prototype.hasOwnProperty;function tW(D){return this[D]}var sT,DP,y$=(D,$,F)=>{var U=D!=null&&typeof D==="object";if(U){var I=$?sT??=new WeakMap:DP??=new WeakMap,J=I.get(D);if(J)return J}F=D!=null?tT(aT(D)):{};let X=$||!D||!D.__esModule?A2(F,"default",{value:D,enumerable:!0}):F;for(let Q of rW(D))if(!oW.call(X,Q))A2(X,Q,{get:tW.bind(D,Q),enumerable:!0});if(U)I.set(D,X);return X},x0=(D)=>{var $=(pW??=new WeakMap).get(D),F;if($)return $;if($=A2({},"__esModule",{value:!0}),D&&typeof D==="object"||typeof D==="function"){for(var U of rW(D))if(!oW.call($,U))A2($,U,{get:tW.bind(D,U),enumerable:!(F=eT(D,U))||F.enumerable})}return pW.set(D,$),$},pW,P=(D,$)=>()=>($||D(($={exports:{}}).exports,$),$.exports);var $P=(D)=>D;function FP(D,$){this[D]=$P.bind(null,$)}var tD=(D,$)=>{for(var F in $)A2(D,F,{get:$[F],enumerable:!0,configurable:!0,set:FP.bind($,F)})};var S=(D,$)=>()=>(D&&($=D(D=0)),$);var F1D=(D)=>Promise.all(D),o=IP(import.meta.url);var aW=P((J1D,UP)=>{UP.exports=[{name:"Agola CI",constant:"AGOLA",env:"AGOLA_GIT_REF",pr:"AGOLA_PULL_REQUEST_ID"},{name:"Alpic",constant:"ALPIC",env:"ALPIC_HOST"},{name:"Appcircle",constant:"APPCIRCLE",env:"AC_APPCIRCLE",pr:{env:"AC_GIT_PR",ne:"false"}},{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN",pr:{env:"CODEBUILD_WEBHOOK_EVENT",any:["PULL_REQUEST_CREATED","PULL_REQUEST_UPDATED","PULL_REQUEST_REOPENED"]}},{name:"Azure Pipelines",constant:"AZURE_PIPELINES",env:"TF_BUILD",pr:{BUILD_REASON:"PullRequest"}},{name:"Bamboo",constant:"BAMBOO",env:"bamboo_planKey"},{name:"Bitbucket Pipelines",constant:"BITBUCKET",env:"BITBUCKET_COMMIT",pr:"BITBUCKET_PR_ID"},{name:"Bitrise",constant:"BITRISE",env:"BITRISE_IO",pr:"BITRISE_PULL_REQUEST"},{name:"Buddy",constant:"BUDDY",env:"BUDDY_WORKSPACE_ID",pr:"BUDDY_EXECUTION_PULL_REQUEST_ID"},{name:"Buildkite",constant:"BUILDKITE",env:"BUILDKITE",pr:{env:"BUILDKITE_PULL_REQUEST",ne:"false"}},{name:"CircleCI",constant:"CIRCLE",env:"CIRCLECI",pr:"CIRCLE_PULL_REQUEST"},{name:"Cirrus CI",constant:"CIRRUS",env:"CIRRUS_CI",pr:"CIRRUS_PR"},{name:"Cloudflare Pages",constant:"CLOUDFLARE_PAGES",env:"CF_PAGES"},{name:"Cloudflare Workers",constant:"CLOUDFLARE_WORKERS",env:"WORKERS_CI"},{name:"Codefresh",constant:"CODEFRESH",env:"CF_BUILD_ID",pr:{any:["CF_PULL_REQUEST_NUMBER","CF_PULL_REQUEST_ID"]}},{name:"Codemagic",constant:"CODEMAGIC",env:"CM_BUILD_ID",pr:"CM_PULL_REQUEST"},{name:"Codeship",constant:"CODESHIP",env:{CI_NAME:"codeship"}},{name:"Drone",constant:"DRONE",env:"DRONE",pr:{DRONE_BUILD_EVENT:"pull_request"}},{name:"dsari",constant:"DSARI",env:"DSARI"},{name:"Earthly",constant:"EARTHLY",env:"EARTHLY_CI"},{name:"Expo Application Services",constant:"EAS",env:"EAS_BUILD"},{name:"Gerrit",constant:"GERRIT",env:"GERRIT_PROJECT"},{name:"Gitea Actions",constant:"GITEA_ACTIONS",env:"GITEA_ACTIONS"},{name:"GitHub Actions",constant:"GITHUB_ACTIONS",env:"GITHUB_ACTIONS",pr:{GITHUB_EVENT_NAME:"pull_request"}},{name:"GitLab CI",constant:"GITLAB",env:"GITLAB_CI",pr:"CI_MERGE_REQUEST_ID"},{name:"GoCD",constant:"GOCD",env:"GO_PIPELINE_LABEL"},{name:"Google Cloud Build",constant:"GOOGLE_CLOUD_BUILD",env:"BUILDER_OUTPUT"},{name:"Harness CI",constant:"HARNESS",env:"HARNESS_BUILD_ID"},{name:"Heroku",constant:"HEROKU",env:{env:"NODE",includes:"/app/.heroku/node/bin/node"}},{name:"Hudson",constant:"HUDSON",env:"HUDSON_URL"},{name:"Jenkins",constant:"JENKINS",env:["JENKINS_URL","BUILD_ID"],pr:{any:["ghprbPullId","CHANGE_ID"]}},{name:"LayerCI",constant:"LAYERCI",env:"LAYERCI",pr:"LAYERCI_PULL_REQUEST"},{name:"Magnum CI",constant:"MAGNUM",env:"MAGNUM"},{name:"Netlify CI",constant:"NETLIFY",env:"NETLIFY",pr:{env:"PULL_REQUEST",ne:"false"}},{name:"Nevercode",constant:"NEVERCODE",env:"NEVERCODE",pr:{env:"NEVERCODE_PULL_REQUEST",ne:"false"}},{name:"Prow",constant:"PROW",env:"PROW_JOB_ID"},{name:"ReleaseHub",constant:"RELEASEHUB",env:"RELEASE_BUILD_ID"},{name:"Render",constant:"RENDER",env:"RENDER",pr:{IS_PULL_REQUEST:"true"}},{name:"Sail CI",constant:"SAIL",env:"SAILCI",pr:"SAIL_PULL_REQUEST_NUMBER"},{name:"Screwdriver",constant:"SCREWDRIVER",env:"SCREWDRIVER",pr:{env:"SD_PULL_REQUEST",ne:"false"}},{name:"Semaphore",constant:"SEMAPHORE",env:"SEMAPHORE",pr:"PULL_REQUEST_NUMBER"},{name:"Sourcehut",constant:"SOURCEHUT",env:{CI_NAME:"sourcehut"}},{name:"Strider CD",constant:"STRIDER",env:"STRIDER"},{name:"TaskCluster",constant:"TASKCLUSTER",env:["TASK_ID","RUN_ID"]},{name:"TeamCity",constant:"TEAMCITY",env:"TEAMCITY_VERSION"},{name:"Travis CI",constant:"TRAVIS",env:"TRAVIS",pr:{env:"TRAVIS_PULL_REQUEST",ne:"false"}},{name:"Vela",constant:"VELA",env:"VELA",pr:{VELA_PULL_REQUEST:"1"}},{name:"Vercel",constant:"VERCEL",env:{any:["NOW_BUILDER","VERCEL"]},pr:"VERCEL_GIT_PULL_REQUEST_ID"},{name:"Visual Studio App Center",constant:"APPCENTER",env:"APPCENTER_BUILD_ID"},{name:"Woodpecker",constant:"WOODPECKER",env:{CI:"woodpecker"},pr:{CI_BUILD_EVENT:"pull_request"}},{name:"Xcode Cloud",constant:"XCODE_CLOUD",env:"CI_XCODE_PROJECT",pr:"CI_PULL_REQUEST_NUMBER"},{name:"Xcode Server",constant:"XCODE_SERVER",env:"XCS"}]});var C3=P((eI)=>{var eW=aW(),iD=process.env;Object.defineProperty(eI,"_vendors",{value:eW.map(function(D){return D.constant})});eI.name=null;eI.isPR=null;eI.id=null;if(iD.CI!=="false")eW.forEach(function(D){let F=(Array.isArray(D.env)?D.env:[D.env]).every(function(U){return sW(U)});if(eI[D.constant]=F,!F)return;eI.name=D.name,eI.isPR=JP(D),eI.id=D.constant});eI.isCI=!!(iD.CI!=="false"&&(iD.BUILD_ID||iD.BUILD_NUMBER||iD.CI||iD.CI_APP_ID||iD.CI_BUILD_ID||iD.CI_BUILD_NUMBER||iD.CI_NAME||iD.CONTINUOUS_INTEGRATION||iD.RUN_ID||eI.name||!1));function sW(D){if(typeof D==="string")return!!iD[D];if("env"in D)return iD[D.env]&&iD[D.env].includes(D.includes);if("any"in D)return D.any.some(function($){return!!iD[$]});return Object.keys(D).every(function($){return iD[$]===D[$]})}function JP(D){switch(typeof D.pr){case"string":return!!iD[D.pr];case"object":if("env"in D.pr)if("any"in D.pr)return D.pr.any.some(function($){return iD[D.pr.env]===$});else return D.pr.env in iD&&iD[D.pr.env]!==D.pr.ne;else if("any"in D.pr)return D.pr.any.some(function($){return!!iD[$]});else return sW(D.pr);default:return null}}});var o$;var T1=S(()=>{o$={name:"@capgo/cli",type:"module",version:"8.105.1",description:"A CLI to upload to capgo servers",author:"Martin martin@capgo.app",license:"Apache 2.0",homepage:"https://github.com/Cap-go/capgo/tree/main/cli#readme",repository:{type:"git",url:"https://github.com/Cap-go/capgo.app",directory:"cli"},bugs:{url:"https://github.com/Cap-go/capgo/issues"},keywords:["appflow alternative","ionic","capacitor","auto update","live update","capgo","cli","upload","capgo-cli","sdk","tanstack-intent"],exports:{".":{import:"./dist/index.js",require:"./dist/index.js"},"./sdk":{types:"./dist/src/sdk.d.ts",import:"./dist/src/sdk.js"}},main:"dist/index.js",types:"dist/src/index.d.ts",bin:{capgo:"dist/index.js"},files:["!skills/_artifacts","dist","skills"],engines:{npm:">=8.0.0",node:">=20.0.0"},scripts:{build:"tsc && bun build.mjs",dev:"NODE_ENV=development ncc build","no-debug":"node dist/index.js","dev-build":"SUPA_DB=development ncc build",pack:"pkg",typecheck:"tsc --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:key-create-mode":"bun test/test-key-create-mode.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:offline-packers":"bun test/test-offline-packers.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:capgo-app-id-prompt":"bun test/test-capgo-app-id-prompt.mjs","test:bundle-soft-delete":"bun test/test-bundle-soft-delete.mjs","test:ci-secrets":"bun test/test-ci-secrets.mjs","test:android-onboarding-progress":"bun test/test-android-onboarding-progress.mjs && bun test/test-android-select-guard.mjs","test:android-keystore-action":"bun test/test-android-keystore-action.mjs","test:android-google-play-action":"bun test/test-android-google-play-action.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:api-perf":"bun test/test-api-perf.mjs","test:preview-qr":"bun test/test-preview-qr.mjs","test:bundle-pages":"bun test test/test-bundle-pages.test.ts","test:bundle-single-requests":"bun test test/test-bundle-single-requests.test.ts","test:mcp-analytics":"bun test/test-mcp-analytics.mjs && bun test/test-mcp-telemetry-project.mjs","test:mcp-instructions":"bun test/test-mcp-instructions.mjs","test:mcp-error-guidance":"bun test/test-mcp-error-guidance.mjs","test:mcp-stdout-guard":"bun test/test-mcp-stdout-guard.mjs","test:mcp-project-dir":"bun test/test-mcp-project-dir.mjs && bun test/test-cwd.mjs && bun test/test-project-context.mjs","test:mcp-host-fields":"bun test/test-mcp-host-fields.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":"bun test/test-app-list.mjs","test:app-todo":"bun test/test-app-todo.mjs && bun test/test-builder-only-checklist.mjs && bun test/test-builder-only-setup.mjs && bun test/test-app-todo-lists.mjs && bun test/test-app-todo-tabs.mjs && bun test/test-app-todo-command.mjs && node test/test-app-todo-interactive.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-capgo-client":"bun test/test-create-capgo-client.mjs","test:no-supabase-sdk":"bun test/test-no-supabase-sdk.mjs","test:no-redirect-error":"bun test/test-no-redirect-error.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 && bun test ./test/test-ios-simulator-compatibility.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-command-execution":"bun test/test-init-command-execution.mjs","test:init-upload-recovery":"bun test/test-init-upload-monorepo-recovery.mjs","test:init-replay":"bun test/test-init-replay.mjs","test:init-ota-checklist":"bun test/test-init-ota-checklist.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 && bun test/test-auth-session-bad-key.mjs","test:mcp":"node test/test-mcp.mjs && node test/test-mcp-skills.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 && bun test/test-build-env.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: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: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-certificate-action":"bun test/test-ios-certificate-action.mjs","test:ios-profile-action":"bun test/test-ios-profile-action.mjs","test:ios-credential-action":"bun test/test-ios-credential-action.mjs","test:ios-e2e":"bun test/test-ios-e2e.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 scripts/run-test-suite.ts","test:run":"bun scripts/run-test-suite.ts","test:serial":"bun run build && bun scripts/run-test-suite.ts --serial","test:monitoring":"bun test test/test-monitoring.test.ts","test:suite":"bun run test:monitoring && 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:key-create-mode && 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:offline-packers && 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:capgo-app-id-prompt && bun run test:ci-secrets && bun run test:android-onboarding-progress && bun run test:android-keystore-action && bun run test:android-google-play-action && 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:api-perf && bun run test:preview-qr && bun run test:bundle-pages && bun run test:bundle-single-requests && bun run test:app-set-options && bun run test:mcp-analytics && bun run test:mcp-instructions && bun run test:mcp-error-guidance && bun run test:mcp-live-update-onboarding && bun run test:mcp-stdout-guard && bun run test:mcp-project-dir && bun run test:mcp-host-fields && 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 && bun run test:app-todo && bun run test:doctor-analytics && bun run test:posthog-exception && bun run test:cli-recovery && bun run test:create-capgo-client && bun run test:bundle-soft-delete && bun run test:no-supabase-sdk && bun run test:no-redirect-error && bun run test:build-platform-selection && bun run test:builder-project-discovery && bun run test:builder-app-selection && 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-command-execution && bun run test:init-upload-recovery && bun run test:init-replay && bun run test:init-telemetry && bun run test:init-ota-checklist && 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: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:support && 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:ios-confirm-app-id && bun run test:ios-create-new && bun run test:ios-certificate-action && bun run test:ios-profile-action && bun run test:ios-credential-action && bun run test:ios-e2e && 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:retryable-capgo-api-error && bun run test:organization-set-api-host && bun run test:plan-validation && bun run test:setup-notices && bun run test:settings-parity && bun run test:init-browser-login && bun run test:android-onboarding-units && bun run test:build-credentials-units && bun run test:onboarding-generators && bun run test:mcp-onboarding","test:build-platform-selection":"bun test/test-build-platform-selection.mjs","test:builder-project-discovery":"bun test/test-builder-project-discovery.mjs","test:builder-app-selection":"bun test/test-builder-app-selection.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-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":"bun test/test-support.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","test:settings-parity":"bun test/test-settings-parity.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:retryable-capgo-api-error":"bun test/test-retryable-capgo-api-error.mjs","test:organization-set-api-host":"bun test/test-organization-set-api-host.mjs","test:plan-validation":"bun test/test-plan-validation.mjs && bun test ./test/test-direct-offer-plan.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","test:init-browser-login":"bun test test/init/","test:android-onboarding-units":"bun test/test-android-gradle.mjs && bun test/test-android-keystore.mjs && bun test/test-android-oauth.mjs && bun test/test-android-play.mjs && bun test/test-android-tui-sequencing.mjs","test:build-credentials-units":"bun test/test-credentials-migration.mjs && bun test/test-provisioning-map-validation.mjs && bun test/test-mobileprovision-parser.mjs","test:onboarding-generators":"bun test/test-diff-utils.mjs && bun test/test-workflow-generator.mjs","test:mcp-onboarding":"bun test ./test/build/onboarding/mcp/scoped-credential-path.test.ts && bun test/test-mcp-onboarding.mjs","test:setup-notices":"bun test ./test/test-setup-notices.mjs ./test/test-setup-progress-request.mjs ./test/test-setup-notice-background.mjs ./test/test-init-completion-notice.mjs && bun test ./test/test-builder-setup-notice.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":"^21.0.4",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.5.4"},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","@sinonjs/fake-timers":"15.4.0","@std/semver":"npm:@jsr/std__semver@1.0.8","@tanstack/intent":"^0.3.6","@types/adm-zip":"^0.5.8","@types/cross-spawn":"^6.0.6","@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":"npm:typescript@7.1.0-beta","@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","cross-spawn":"^7.0.6",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 uD;var w0=S(()=>{uD=class uD extends Error{context;constructor(D,$,F){super(D,F!==void 0?{cause:F}:void 0);this.name="CliUserError",this.context=$}}});import{platform as YP}from"node:os";import{version as BP}from"node:process";function Uu(D){Iu=D}function KP(D){for(let $=0;$<D.length;$++)if(D.charCodeAt($)>255)return!1;return!0}function Fu(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 EP(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 configuration.";return"Capgo API key contains invalid characters (only ASCII is allowed). Copy the key from the Capgo dashboard."}function $7(D,$){if($===void 0||$===null){if(D7.has(D.toLowerCase()))throw new uD(Fu(D));throw new uD(`HTTP header "${D}" is missing or invalid.`)}if(typeof $!=="string"){if(D7.has(D.toLowerCase()))throw new uD(Fu(D));throw new uD(`HTTP header "${D}" is missing or invalid.`)}if(!KP($)){if(D7.has(D.toLowerCase()))throw new uD(EP(D));throw new uD(`HTTP header "${D}" contains invalid characters (only ASCII is allowed).`)}return $}function WP(D=_3.isCI,$=_3.name){if(!D)return;return($??"").replace(/[^\x20-\x7E]/g,"").trim().slice(0,64)||"ci"}function I0(D){let $={capgo_api:qP,"x-cli-version":o$.version,"x-cli-command":Iu,"x-cli-node":BP,"x-cli-os":YP()},F=WP();if(F)$["x-cli-ci"]=F;if(D)for(let[U,I]of Object.entries(D))$[U]=$7(U,I);return $}var _3,qP="2025-10-01",Iu="",D7;var k3=S(()=>{T1();w0();_3=y$(C3(),1),D7=new Set(["authorization","capgkey","x-capgo-log-token"])});import{existsSync as M$}from"fs";var P1=(D=".",$="unknown")=>{let F=`${D}/bun.lockb`,U=`${D}/bun.lock`,I=`${D}/pnpm-lock.yaml`,J=`${D}/shrinkwrap.yaml`,X=`${D}/yarn.lock`,Q=`${D}/package-lock.json`,Y=`${D}/npm-shrinkwrap.json`;if(M$(F)||M$(U))return"bun";if(M$(I)||M$(J))return"pnpm";if(M$(X))return"yarn";if(M$(Q)||M$(Y))return"npm";return $},g3=(D=P1(),$=!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"}},Ju=(D=".",$="npx")=>{let F=`${D}/bun.lockb`,U=`${D}/bun.lock`,I=`${D}/pnpm-lock.yaml`,J=`${D}/shrinkwrap.yaml`,X=`${D}/yarn.lock`,Q=`${D}/package-lock.json`,Y=`${D}/npm-shrinkwrap.json`;if(M$(F)||M$(U))return"bunx";if(M$(I)||M$(J))return"pnpm exec";if(M$(X))return"yarn dlx";if(M$(Q)||M$(Y))return"npx";return $};var Xu=()=>{};var Qu,Yu=(D)=>{return D===12288||D>=65281&&D<=65376||D>=65504&&D<=65510},Bu=(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 qu=S(()=>{Qu=(()=>{let D=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;return($)=>{let F=0;D.lastIndex=0;while(D.test($))F+=1;return $.length-F}})()});var uP,GP,Ku,NP,Eu,LP,OP,HP,Wu=(D,$={},F={})=>{let U=$.limit??1/0,I=$.ellipsis??"",J=$?.ellipsisWidth??(I?Wu(I,HP,F).width:0),X=0,Q=F.controlWidth??0,Y=F.tabWidth??8,B=F.emojiWidth??2,q=2,K=F.regularWidth??1,E=F.wideWidth??2,u=[[LP,K],[uP,0],[GP,Q],[NP,Y],[Eu,B],[Ku,E]],W=0,G=0,L=D.length,w=0,H=!1,N=L,Z=Math.max(0,U-J),A=0,M=0,b=0,n=0;D:while(!0){if(M>A||G>=L&&G>W){let _=D.slice(A,M)||D.slice(W,G);w=0;for(let m of _.replaceAll(OP,"")){let y=m.codePointAt(0)||0;if(Yu(y))n=2;else if(Bu(y))n=E;else n=K;if(b+n>Z)N=Math.min(N,Math.max(A,W)+w);if(b+n>U){H=!0;break D}w+=m.length,b+=n}A=M=0}if(G>=L)break D;for(let _=0,m=u.length;_<m;_++){let[y,DD]=u[_];if(y.lastIndex=G,y.test(D)){if(w=y===Ku?Qu(D.slice(G,y.lastIndex)):y===Eu?1:y.lastIndex-G,n=w*DD,b+n>Z)N=Math.min(N,G+Math.floor((Z-b)/DD));if(b+n>U){H=!0;break D}b+=n,A=W,M=G,G=W=y.lastIndex;continue D}}G+=1}return{width:H?Z:b,index:H?N:L,truncated:H,ellipsed:H&&U>=J}},uu;var Gu=S(()=>{qu();uP=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y,GP=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,Ku=/(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/yu,NP=/\t{1,1000}/y,Eu=/[\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,LP=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,OP=/\p{M}+/gu,HP={limit:1/0,ellipsis:""},uu=Wu});var zP,wP=(D,$={})=>{return uu(D,zP,$).width},K$;var F7=S(()=>{Gu();zP={limit:1/0,ellipsis:"",ellipsisWidth:0},K$=wP});function v0(D,$,F){return String(D).normalize().split(VP).map((U)=>jP(U,$,F)).join(`
1
+ import{createRequire as IP}from"node:module";var tT=Object.create;var{getPrototypeOf:aT,defineProperty:A2,getOwnPropertyNames:rW,getOwnPropertyDescriptor:eT}=Object,oW=Object.prototype.hasOwnProperty;function tW(D){return this[D]}var sT,DP,y$=(D,$,F)=>{var U=D!=null&&typeof D==="object";if(U){var I=$?sT??=new WeakMap:DP??=new WeakMap,J=I.get(D);if(J)return J}F=D!=null?tT(aT(D)):{};let X=$||!D||!D.__esModule?A2(F,"default",{value:D,enumerable:!0}):F;for(let Q of rW(D))if(!oW.call(X,Q))A2(X,Q,{get:tW.bind(D,Q),enumerable:!0});if(U)I.set(D,X);return X},x0=(D)=>{var $=(pW??=new WeakMap).get(D),F;if($)return $;if($=A2({},"__esModule",{value:!0}),D&&typeof D==="object"||typeof D==="function"){for(var U of rW(D))if(!oW.call($,U))A2($,U,{get:tW.bind(D,U),enumerable:!(F=eT(D,U))||F.enumerable})}return pW.set(D,$),$},pW,P=(D,$)=>()=>($||D(($={exports:{}}).exports,$),$.exports);var $P=(D)=>D;function FP(D,$){this[D]=$P.bind(null,$)}var tD=(D,$)=>{for(var F in $)A2(D,F,{get:$[F],enumerable:!0,configurable:!0,set:FP.bind($,F)})};var S=(D,$)=>()=>(D&&($=D(D=0)),$);var F1D=(D)=>Promise.all(D),o=IP(import.meta.url);var aW=P((J1D,UP)=>{UP.exports=[{name:"Agola CI",constant:"AGOLA",env:"AGOLA_GIT_REF",pr:"AGOLA_PULL_REQUEST_ID"},{name:"Alpic",constant:"ALPIC",env:"ALPIC_HOST"},{name:"Appcircle",constant:"APPCIRCLE",env:"AC_APPCIRCLE",pr:{env:"AC_GIT_PR",ne:"false"}},{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN",pr:{env:"CODEBUILD_WEBHOOK_EVENT",any:["PULL_REQUEST_CREATED","PULL_REQUEST_UPDATED","PULL_REQUEST_REOPENED"]}},{name:"Azure Pipelines",constant:"AZURE_PIPELINES",env:"TF_BUILD",pr:{BUILD_REASON:"PullRequest"}},{name:"Bamboo",constant:"BAMBOO",env:"bamboo_planKey"},{name:"Bitbucket Pipelines",constant:"BITBUCKET",env:"BITBUCKET_COMMIT",pr:"BITBUCKET_PR_ID"},{name:"Bitrise",constant:"BITRISE",env:"BITRISE_IO",pr:"BITRISE_PULL_REQUEST"},{name:"Buddy",constant:"BUDDY",env:"BUDDY_WORKSPACE_ID",pr:"BUDDY_EXECUTION_PULL_REQUEST_ID"},{name:"Buildkite",constant:"BUILDKITE",env:"BUILDKITE",pr:{env:"BUILDKITE_PULL_REQUEST",ne:"false"}},{name:"CircleCI",constant:"CIRCLE",env:"CIRCLECI",pr:"CIRCLE_PULL_REQUEST"},{name:"Cirrus CI",constant:"CIRRUS",env:"CIRRUS_CI",pr:"CIRRUS_PR"},{name:"Cloudflare Pages",constant:"CLOUDFLARE_PAGES",env:"CF_PAGES"},{name:"Cloudflare Workers",constant:"CLOUDFLARE_WORKERS",env:"WORKERS_CI"},{name:"Codefresh",constant:"CODEFRESH",env:"CF_BUILD_ID",pr:{any:["CF_PULL_REQUEST_NUMBER","CF_PULL_REQUEST_ID"]}},{name:"Codemagic",constant:"CODEMAGIC",env:"CM_BUILD_ID",pr:"CM_PULL_REQUEST"},{name:"Codeship",constant:"CODESHIP",env:{CI_NAME:"codeship"}},{name:"Drone",constant:"DRONE",env:"DRONE",pr:{DRONE_BUILD_EVENT:"pull_request"}},{name:"dsari",constant:"DSARI",env:"DSARI"},{name:"Earthly",constant:"EARTHLY",env:"EARTHLY_CI"},{name:"Expo Application Services",constant:"EAS",env:"EAS_BUILD"},{name:"Gerrit",constant:"GERRIT",env:"GERRIT_PROJECT"},{name:"Gitea Actions",constant:"GITEA_ACTIONS",env:"GITEA_ACTIONS"},{name:"GitHub Actions",constant:"GITHUB_ACTIONS",env:"GITHUB_ACTIONS",pr:{GITHUB_EVENT_NAME:"pull_request"}},{name:"GitLab CI",constant:"GITLAB",env:"GITLAB_CI",pr:"CI_MERGE_REQUEST_ID"},{name:"GoCD",constant:"GOCD",env:"GO_PIPELINE_LABEL"},{name:"Google Cloud Build",constant:"GOOGLE_CLOUD_BUILD",env:"BUILDER_OUTPUT"},{name:"Harness CI",constant:"HARNESS",env:"HARNESS_BUILD_ID"},{name:"Heroku",constant:"HEROKU",env:{env:"NODE",includes:"/app/.heroku/node/bin/node"}},{name:"Hudson",constant:"HUDSON",env:"HUDSON_URL"},{name:"Jenkins",constant:"JENKINS",env:["JENKINS_URL","BUILD_ID"],pr:{any:["ghprbPullId","CHANGE_ID"]}},{name:"LayerCI",constant:"LAYERCI",env:"LAYERCI",pr:"LAYERCI_PULL_REQUEST"},{name:"Magnum CI",constant:"MAGNUM",env:"MAGNUM"},{name:"Netlify CI",constant:"NETLIFY",env:"NETLIFY",pr:{env:"PULL_REQUEST",ne:"false"}},{name:"Nevercode",constant:"NEVERCODE",env:"NEVERCODE",pr:{env:"NEVERCODE_PULL_REQUEST",ne:"false"}},{name:"Prow",constant:"PROW",env:"PROW_JOB_ID"},{name:"ReleaseHub",constant:"RELEASEHUB",env:"RELEASE_BUILD_ID"},{name:"Render",constant:"RENDER",env:"RENDER",pr:{IS_PULL_REQUEST:"true"}},{name:"Sail CI",constant:"SAIL",env:"SAILCI",pr:"SAIL_PULL_REQUEST_NUMBER"},{name:"Screwdriver",constant:"SCREWDRIVER",env:"SCREWDRIVER",pr:{env:"SD_PULL_REQUEST",ne:"false"}},{name:"Semaphore",constant:"SEMAPHORE",env:"SEMAPHORE",pr:"PULL_REQUEST_NUMBER"},{name:"Sourcehut",constant:"SOURCEHUT",env:{CI_NAME:"sourcehut"}},{name:"Strider CD",constant:"STRIDER",env:"STRIDER"},{name:"TaskCluster",constant:"TASKCLUSTER",env:["TASK_ID","RUN_ID"]},{name:"TeamCity",constant:"TEAMCITY",env:"TEAMCITY_VERSION"},{name:"Travis CI",constant:"TRAVIS",env:"TRAVIS",pr:{env:"TRAVIS_PULL_REQUEST",ne:"false"}},{name:"Vela",constant:"VELA",env:"VELA",pr:{VELA_PULL_REQUEST:"1"}},{name:"Vercel",constant:"VERCEL",env:{any:["NOW_BUILDER","VERCEL"]},pr:"VERCEL_GIT_PULL_REQUEST_ID"},{name:"Visual Studio App Center",constant:"APPCENTER",env:"APPCENTER_BUILD_ID"},{name:"Woodpecker",constant:"WOODPECKER",env:{CI:"woodpecker"},pr:{CI_BUILD_EVENT:"pull_request"}},{name:"Xcode Cloud",constant:"XCODE_CLOUD",env:"CI_XCODE_PROJECT",pr:"CI_PULL_REQUEST_NUMBER"},{name:"Xcode Server",constant:"XCODE_SERVER",env:"XCS"}]});var C3=P((eI)=>{var eW=aW(),iD=process.env;Object.defineProperty(eI,"_vendors",{value:eW.map(function(D){return D.constant})});eI.name=null;eI.isPR=null;eI.id=null;if(iD.CI!=="false")eW.forEach(function(D){let F=(Array.isArray(D.env)?D.env:[D.env]).every(function(U){return sW(U)});if(eI[D.constant]=F,!F)return;eI.name=D.name,eI.isPR=JP(D),eI.id=D.constant});eI.isCI=!!(iD.CI!=="false"&&(iD.BUILD_ID||iD.BUILD_NUMBER||iD.CI||iD.CI_APP_ID||iD.CI_BUILD_ID||iD.CI_BUILD_NUMBER||iD.CI_NAME||iD.CONTINUOUS_INTEGRATION||iD.RUN_ID||eI.name||!1));function sW(D){if(typeof D==="string")return!!iD[D];if("env"in D)return iD[D.env]&&iD[D.env].includes(D.includes);if("any"in D)return D.any.some(function($){return!!iD[$]});return Object.keys(D).every(function($){return iD[$]===D[$]})}function JP(D){switch(typeof D.pr){case"string":return!!iD[D.pr];case"object":if("env"in D.pr)if("any"in D.pr)return D.pr.any.some(function($){return iD[D.pr.env]===$});else return D.pr.env in iD&&iD[D.pr.env]!==D.pr.ne;else if("any"in D.pr)return D.pr.any.some(function($){return!!iD[$]});else return sW(D.pr);default:return null}}});var o$;var T1=S(()=>{o$={name:"@capgo/cli",type:"module",version:"8.106.1",description:"A CLI to upload to capgo servers",author:"Martin martin@capgo.app",license:"Apache 2.0",homepage:"https://github.com/Cap-go/capgo/tree/main/cli#readme",repository:{type:"git",url:"https://github.com/Cap-go/capgo.app",directory:"cli"},bugs:{url:"https://github.com/Cap-go/capgo/issues"},keywords:["appflow alternative","ionic","capacitor","auto update","live update","capgo","cli","upload","capgo-cli","sdk","tanstack-intent"],exports:{".":{import:"./dist/index.js",require:"./dist/index.js"},"./sdk":{types:"./dist/src/sdk.d.ts",import:"./dist/src/sdk.js"}},main:"dist/index.js",types:"dist/src/index.d.ts",bin:{capgo:"dist/index.js"},files:["!skills/_artifacts","dist","skills"],engines:{npm:">=8.0.0",node:">=20.0.0"},scripts:{build:"tsc && bun build.mjs",dev:"NODE_ENV=development ncc build","no-debug":"node dist/index.js","dev-build":"SUPA_DB=development ncc build",pack:"pkg",typecheck:"tsc --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:key-create-mode":"bun test/test-key-create-mode.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:offline-packers":"bun test/test-offline-packers.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:capgo-app-id-prompt":"bun test/test-capgo-app-id-prompt.mjs","test:bundle-soft-delete":"bun test/test-bundle-soft-delete.mjs","test:ci-secrets":"bun test/test-ci-secrets.mjs","test:android-onboarding-progress":"bun test/test-android-onboarding-progress.mjs && bun test/test-android-select-guard.mjs","test:android-keystore-action":"bun test/test-android-keystore-action.mjs","test:android-google-play-action":"bun test/test-android-google-play-action.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:api-perf":"bun test/test-api-perf.mjs","test:preview-qr":"bun test/test-preview-qr.mjs","test:bundle-pages":"bun test test/test-bundle-pages.test.ts","test:bundle-single-requests":"bun test test/test-bundle-single-requests.test.ts","test:mcp-analytics":"bun test/test-mcp-analytics.mjs && bun test/test-mcp-telemetry-project.mjs","test:mcp-instructions":"bun test/test-mcp-instructions.mjs","test:mcp-error-guidance":"bun test/test-mcp-error-guidance.mjs","test:mcp-stdout-guard":"bun test/test-mcp-stdout-guard.mjs","test:mcp-project-dir":"bun test/test-mcp-project-dir.mjs && bun test/test-cwd.mjs && bun test/test-project-context.mjs","test:mcp-host-fields":"bun test/test-mcp-host-fields.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":"bun test/test-app-list.mjs","test:app-todo":"bun test/test-app-todo.mjs && bun test/test-builder-only-checklist.mjs && bun test/test-builder-only-setup.mjs && bun test/test-app-todo-lists.mjs && bun test/test-app-todo-tabs.mjs && bun test/test-app-todo-command.mjs && node test/test-app-todo-interactive.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-capgo-client":"bun test/test-create-capgo-client.mjs","test:no-supabase-sdk":"bun test/test-no-supabase-sdk.mjs","test:no-redirect-error":"bun test/test-no-redirect-error.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 && bun test ./test/test-ios-simulator-compatibility.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-command-execution":"bun test/test-init-command-execution.mjs","test:init-upload-recovery":"bun test/test-init-upload-monorepo-recovery.mjs","test:init-replay":"bun test/test-init-replay.mjs","test:init-ota-checklist":"bun test/test-init-ota-checklist.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 && bun test/test-auth-session-bad-key.mjs","test:mcp":"node test/test-mcp.mjs && node test/test-mcp-skills.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 && bun test/test-build-env.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: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: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-certificate-action":"bun test/test-ios-certificate-action.mjs","test:ios-profile-action":"bun test/test-ios-profile-action.mjs","test:ios-credential-action":"bun test/test-ios-credential-action.mjs","test:ios-e2e":"bun test/test-ios-e2e.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 scripts/run-test-suite.ts","test:run":"bun scripts/run-test-suite.ts","test:serial":"bun run build && bun scripts/run-test-suite.ts --serial","test:monitoring":"bun test test/test-monitoring.test.ts","test:suite":"bun run test:monitoring && 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:key-create-mode && 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:offline-packers && 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:capgo-app-id-prompt && bun run test:ci-secrets && bun run test:android-onboarding-progress && bun run test:android-keystore-action && bun run test:android-google-play-action && 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:api-perf && bun run test:preview-qr && bun run test:bundle-pages && bun run test:bundle-single-requests && bun run test:app-set-options && bun run test:mcp-analytics && bun run test:mcp-instructions && bun run test:mcp-error-guidance && bun run test:mcp-live-update-onboarding && bun run test:mcp-stdout-guard && bun run test:mcp-project-dir && bun run test:mcp-host-fields && 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 && bun run test:app-todo && bun run test:doctor-analytics && bun run test:posthog-exception && bun run test:cli-recovery && bun run test:create-capgo-client && bun run test:bundle-soft-delete && bun run test:no-supabase-sdk && bun run test:no-redirect-error && bun run test:build-platform-selection && bun run test:builder-project-discovery && bun run test:builder-app-selection && 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-command-execution && bun run test:init-upload-recovery && bun run test:init-replay && bun run test:init-telemetry && bun run test:init-ota-checklist && 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: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:support && 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:ios-confirm-app-id && bun run test:ios-create-new && bun run test:ios-certificate-action && bun run test:ios-profile-action && bun run test:ios-credential-action && bun run test:ios-e2e && 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:retryable-capgo-api-error && bun run test:organization-set-api-host && bun run test:plan-validation && bun run test:setup-notices && bun run test:settings-parity && bun run test:init-browser-login && bun run test:android-onboarding-units && bun run test:build-credentials-units && bun run test:onboarding-generators && bun run test:mcp-onboarding","test:build-platform-selection":"bun test/test-build-platform-selection.mjs","test:builder-project-discovery":"bun test/test-builder-project-discovery.mjs","test:builder-app-selection":"bun test/test-builder-app-selection.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-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":"bun test/test-support.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","test:settings-parity":"bun test/test-settings-parity.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:retryable-capgo-api-error":"bun test/test-retryable-capgo-api-error.mjs","test:organization-set-api-host":"bun test/test-organization-set-api-host.mjs","test:plan-validation":"bun test/test-plan-validation.mjs && bun test ./test/test-direct-offer-plan.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","test:init-browser-login":"bun test test/init/","test:android-onboarding-units":"bun test/test-android-gradle.mjs && bun test/test-android-keystore.mjs && bun test/test-android-oauth.mjs && bun test/test-android-play.mjs && bun test/test-android-tui-sequencing.mjs","test:build-credentials-units":"bun test/test-credentials-migration.mjs && bun test/test-provisioning-map-validation.mjs && bun test/test-mobileprovision-parser.mjs","test:onboarding-generators":"bun test/test-diff-utils.mjs && bun test/test-workflow-generator.mjs","test:mcp-onboarding":"bun test ./test/build/onboarding/mcp/scoped-credential-path.test.ts && bun test/test-mcp-onboarding.mjs","test:setup-notices":"bun test ./test/test-setup-notices.mjs ./test/test-setup-progress-request.mjs ./test/test-setup-notice-background.mjs ./test/test-init-completion-notice.mjs && bun test ./test/test-builder-setup-notice.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":"^21.0.4",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.5.4"},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","@sinonjs/fake-timers":"15.4.0","@std/semver":"npm:@jsr/std__semver@1.0.8","@tanstack/intent":"^0.3.6","@types/adm-zip":"^0.5.8","@types/cross-spawn":"^6.0.6","@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":"npm:typescript@7.1.0-beta","@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","cross-spawn":"^7.0.6",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 uD;var w0=S(()=>{uD=class uD extends Error{context;constructor(D,$,F){super(D,F!==void 0?{cause:F}:void 0);this.name="CliUserError",this.context=$}}});import{platform as YP}from"node:os";import{version as BP}from"node:process";function Uu(D){Iu=D}function KP(D){for(let $=0;$<D.length;$++)if(D.charCodeAt($)>255)return!1;return!0}function Fu(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 EP(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 configuration.";return"Capgo API key contains invalid characters (only ASCII is allowed). Copy the key from the Capgo dashboard."}function $7(D,$){if($===void 0||$===null){if(D7.has(D.toLowerCase()))throw new uD(Fu(D));throw new uD(`HTTP header "${D}" is missing or invalid.`)}if(typeof $!=="string"){if(D7.has(D.toLowerCase()))throw new uD(Fu(D));throw new uD(`HTTP header "${D}" is missing or invalid.`)}if(!KP($)){if(D7.has(D.toLowerCase()))throw new uD(EP(D));throw new uD(`HTTP header "${D}" contains invalid characters (only ASCII is allowed).`)}return $}function WP(D=_3.isCI,$=_3.name){if(!D)return;return($??"").replace(/[^\x20-\x7E]/g,"").trim().slice(0,64)||"ci"}function I0(D){let $={capgo_api:qP,"x-cli-version":o$.version,"x-cli-command":Iu,"x-cli-node":BP,"x-cli-os":YP()},F=WP();if(F)$["x-cli-ci"]=F;if(D)for(let[U,I]of Object.entries(D))$[U]=$7(U,I);return $}var _3,qP="2025-10-01",Iu="",D7;var k3=S(()=>{T1();w0();_3=y$(C3(),1),D7=new Set(["authorization","capgkey","x-capgo-log-token"])});import{existsSync as M$}from"fs";var P1=(D=".",$="unknown")=>{let F=`${D}/bun.lockb`,U=`${D}/bun.lock`,I=`${D}/pnpm-lock.yaml`,J=`${D}/shrinkwrap.yaml`,X=`${D}/yarn.lock`,Q=`${D}/package-lock.json`,Y=`${D}/npm-shrinkwrap.json`;if(M$(F)||M$(U))return"bun";if(M$(I)||M$(J))return"pnpm";if(M$(X))return"yarn";if(M$(Q)||M$(Y))return"npm";return $},g3=(D=P1(),$=!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"}},Ju=(D=".",$="npx")=>{let F=`${D}/bun.lockb`,U=`${D}/bun.lock`,I=`${D}/pnpm-lock.yaml`,J=`${D}/shrinkwrap.yaml`,X=`${D}/yarn.lock`,Q=`${D}/package-lock.json`,Y=`${D}/npm-shrinkwrap.json`;if(M$(F)||M$(U))return"bunx";if(M$(I)||M$(J))return"pnpm exec";if(M$(X))return"yarn dlx";if(M$(Q)||M$(Y))return"npx";return $};var Xu=()=>{};var Qu,Yu=(D)=>{return D===12288||D>=65281&&D<=65376||D>=65504&&D<=65510},Bu=(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 qu=S(()=>{Qu=(()=>{let D=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;return($)=>{let F=0;D.lastIndex=0;while(D.test($))F+=1;return $.length-F}})()});var uP,GP,Ku,NP,Eu,LP,OP,HP,Wu=(D,$={},F={})=>{let U=$.limit??1/0,I=$.ellipsis??"",J=$?.ellipsisWidth??(I?Wu(I,HP,F).width:0),X=0,Q=F.controlWidth??0,Y=F.tabWidth??8,B=F.emojiWidth??2,q=2,K=F.regularWidth??1,E=F.wideWidth??2,u=[[LP,K],[uP,0],[GP,Q],[NP,Y],[Eu,B],[Ku,E]],W=0,G=0,L=D.length,w=0,H=!1,N=L,Z=Math.max(0,U-J),A=0,M=0,b=0,n=0;D:while(!0){if(M>A||G>=L&&G>W){let _=D.slice(A,M)||D.slice(W,G);w=0;for(let m of _.replaceAll(OP,"")){let y=m.codePointAt(0)||0;if(Yu(y))n=2;else if(Bu(y))n=E;else n=K;if(b+n>Z)N=Math.min(N,Math.max(A,W)+w);if(b+n>U){H=!0;break D}w+=m.length,b+=n}A=M=0}if(G>=L)break D;for(let _=0,m=u.length;_<m;_++){let[y,DD]=u[_];if(y.lastIndex=G,y.test(D)){if(w=y===Ku?Qu(D.slice(G,y.lastIndex)):y===Eu?1:y.lastIndex-G,n=w*DD,b+n>Z)N=Math.min(N,G+Math.floor((Z-b)/DD));if(b+n>U){H=!0;break D}b+=n,A=W,M=G,G=W=y.lastIndex;continue D}}G+=1}return{width:H?Z:b,index:H?N:L,truncated:H,ellipsed:H&&U>=J}},uu;var Gu=S(()=>{qu();uP=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y,GP=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,Ku=/(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/yu,NP=/\t{1,1000}/y,Eu=/[\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,LP=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,OP=/\p{M}+/gu,HP={limit:1/0,ellipsis:""},uu=Wu});var zP,wP=(D,$={})=>{return uu(D,zP,$).width},K$;var F7=S(()=>{Gu();zP={limit:1/0,ellipsis:"",ellipsisWidth:0},K$=wP});function v0(D,$,F){return String(D).normalize().split(VP).map((U)=>jP(U,$,F)).join(`
2
2
  `)}var x3="\x1B",zu="›",vP=39,U7="\x07",wu="[",ZP="]",vu="m",J7,Nu,Lu=(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},Ou=(D)=>`${x3}${wu}${D}${vu}`,Hu=(D)=>`${x3}${J7}${D}${U7}`,I7=(D,$,F)=>{let U=$[Symbol.iterator](),I=!1,J=!1,X=D.at(-1),Q=X===void 0?0:K$(X),Y=U.next(),B=U.next(),q=0;while(!Y.done){let K=Y.value,E=K$(K);if(Q+E<=F)D[D.length-1]+=K;else D.push(K),Q=0;if(K===x3||K===zu)I=!0,J=$.startsWith(J7,q+1);if(I){if(J){if(K===U7)I=!1,J=!1}else if(K===vu)I=!1}else if(Q+=E,Q===F&&!B.done)D.push(""),Q=0;Y=B,B=U.next(),q+=K.length}if(X=D.at(-1),!Q&&X!==void 0&&X.length&&D.length>1)D[D.length-2]+=D.pop()},MP=(D)=>{let $=D.split(" "),F=$.length;while(F){if(K$($[F-1]))break;F--}if(F===$.length)return D;return $.slice(0,F).join(" ")+$.slice(F).join("")},jP=(D,$,F={})=>{if(F.trim!==!1&&D.trim()==="")return"";let U="",I,J,X=D.split(" "),Q=[""],Y=0;for(let K=0;K<X.length;K++){let E=X[K];if(F.trim!==!1){let W=Q.at(-1)??"",G=W.trimStart();if(W.length!==G.length)Q[Q.length-1]=G,Y=K$(G)}if(K!==0){if(Y>=$&&(F.wordWrap===!1||F.trim===!1))Q.push(""),Y=0;if(Y||F.trim===!1)Q[Q.length-1]+=" ",Y++}let u=K$(E);if(F.hard&&u>$){let W=$-Y,G=1+Math.floor((u-W-1)/$);if(Math.floor((u-1)/$)<G)Q.push("");I7(Q,E,$),Y=K$(Q.at(-1)??"");continue}if(Y+u>$&&Y&&u){if(F.wordWrap===!1&&Y<$){I7(Q,E,$),Y=K$(Q.at(-1)??"");continue}Q.push(""),Y=0}if(Y+u>$&&F.wordWrap===!1){I7(Q,E,$),Y=K$(Q.at(-1)??"");continue}Q[Q.length-1]+=E,Y+=u}if(F.trim!==!1)Q=Q.map((K)=>MP(K));let B=Q.join(`
3
3
  `),q=!1;for(let K=0;K<B.length;K++){let E=B[K];if(U+=E,!q){if(q=E>="\uD800"&&E<="\uDBFF",q)continue}else q=!1;if(E===x3||E===zu){Nu.lastIndex=K+1;let W=Nu.exec(B)?.groups;if(W?.code!==void 0){let G=Number.parseFloat(W.code);I=G===vP?void 0:G}else if(W?.uri!==void 0)J=W.uri.length===0?void 0:W.uri}if(B[K+1]===`
4
4
  `){if(J)U+=Hu("");let u=I?Lu(I):void 0;if(I&&u)U+=Ou(u)}else if(E===`
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capgo/cli",
3
3
  "type": "module",
4
- "version": "8.105.1",
4
+ "version": "8.106.1",
5
5
  "description": "A CLI to upload to capgo servers",
6
6
  "author": "Martin martin@capgo.app",
7
7
  "license": "Apache 2.0",
@@ -131,3 +131,7 @@ npx @capgo/cli@latest app list --filter-by-org-id YOUR_ORG_ID --show-org --show-
131
131
  npx @capgo/cli@latest get-qr com.example.app --channel production
132
132
  npx @capgo/cli@latest star-all
133
133
  ```
134
+
135
+ ## Hosted MCP result contracts
136
+
137
+ Every hosted account tool publishes an output schema. Read successful API payloads from `structuredContent.data`; other hosted tools return the object described by their output schema. Legacy text remains available. Check `isError` before using a result. A result-size error calls for pagination or narrower filters; inspect current state before retrying a write. This describes the hosted server, not every local CLI tool.