@capgo/cli 8.30.0 → 8.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -67,7 +67,7 @@ ${X}
67
67
  `}}}}).prompt();var mB=cA(()=>{GBA();GBA();s0A();n0A();HP=AQ(e0A(),1);KBA=NXQ(),EXQ=G$("◆","*"),TOA=G$("■","x"),kOA=G$("▲","x"),HBA=G$("◇","o"),RXQ=G$("┌","T"),M4=G$("│","|"),$F=G$("└","—"),AU0=G$("┐","T"),QU0=G$("┘","—"),WBA=G$("●",">"),ah=G$("○"," "),BU0=G$("◻","[•]"),$U0=G$("◼","[+]"),JU0=G$("◻","[ ]"),jXQ=G$("▪","•"),YU0=G$("─","-"),ZU0=G$("╮","+"),XU0=G$("├","+"),GU0=G$("╯","+"),KU0=G$("╰","+"),WU0=G$("╭","+"),wXQ=G$("●","•"),PXQ=G$("◆","*"),_XQ=G$("▲","!"),TXQ=G$("■","x");HU0=[`${M0("dim","↑/↓")} to navigate`,`${M0("dim","Space:")} select`,`${M0("dim","Enter:")} confirm`],T={message:(A=[],{symbol:Q=M0("gray",M4),secondarySymbol:B=M0("gray",M4),output:$=process.stdout,spacing:J=1,withGuide:Y}={})=>{let Z=[],X=Y??qJ.withGuide,G=X?B:"",K=X?`${Q} `:"",W=X?`${B} `:"";for(let U=0;U<J;U++)Z.push(G);let F=Array.isArray(A)?A:A.split(`
68
68
  `);if(F.length>0){let[U,...I]=F;U.length>0?Z.push(`${K}${U}`):Z.push(X?Q:"");for(let z of I)z.length>0?Z.push(`${W}${z}`):Z.push(X?B:"")}$.write(`${Z.join(`
69
69
  `)}
70
- `)},info:(A,Q)=>{T.message(A,{...Q,symbol:M0("blue",wXQ)})},success:(A,Q)=>{T.message(A,{...Q,symbol:M0("green",PXQ)})},step:(A,Q)=>{T.message(A,{...Q,symbol:M0("green",HBA)})},warn:(A,Q)=>{T.message(A,{...Q,symbol:M0("yellow",_XQ)})},warning:(A,Q)=>{T.warn(A,Q)},error:(A,Q)=>{T.message(A,{...Q,symbol:M0("red",TXQ)})}},FU0={light:G$("─","-"),heavy:G$("━","="),block:G$("█","#")},fXQ=[`${M0("dim","↑/↓")} to navigate`,`${M0("dim","Enter:")} confirm`],DU0=`${M0("gray",M4)} `});var O$;var lX=cA(()=>{O$={name:"@capgo/cli",type:"module",version:"8.30.0",description:"A CLI to upload to capgo servers",author:"Martin martin@capgo.app",license:"Apache 2.0",homepage:"https://github.com/Cap-go/capgo/tree/main/cli#readme",repository:{type:"git",url:"git+https://github.com/Cap-go/capgo.git",directory:"cli"},bugs:{url:"https://github.com/Cap-go/capgo/issues"},keywords:["appflow alternative","ionic","capacitor","auto update","live update","capgo","cli","upload","capgo-cli","sdk","tanstack-intent"],exports:{".":{import:"./dist/index.js",require:"./dist/index.js"},"./sdk":{types:"./dist/src/sdk.d.ts",import:"./dist/src/sdk.js"}},main:"dist/index.js",types:"dist/src/index.d.ts",bin:{capgo:"dist/index.js"},files:["!skills/_artifacts","dist","skills"],engines:{npm:">=8.0.0",node:">=20.0.0"},scripts:{build:"tsc && bun build.mjs",dev:"NODE_ENV=development ncc build","no-debug":"node dist/index.js","dev-build":"SUPA_DB=development ncc build",pack:"pkg",types:"bunx --bun supabase gen types typescript --project-id=xvwzpoazmxkqosrdewyv > src/types/supabase.types.ts",typecheck:"tsgo --project tsconfig.tsgo.json --noEmit",lint:"bun run lint:ox","lint:ox":"oxlint --config ../.oxlintrc.json src","lint:fix":"oxlint --config ../.oxlintrc.json --fix src","check-posix-paths":"node test/check-posix-paths.js","generate-docs":"node dist/index.js generate-docs README.md","test:bundle":"bun test/test-bundle.mjs","test:prescan":"bun test test/prescan/","test:functional":"bun test/test-functional.mjs","test:semver":"bun test/test-semver-validation.mjs","test:version-edge-cases":"bun test/test-version-validation.mjs","test:regex":"bun test/test-regex-validation.mjs","test:upload":"bun test/test-upload-validation.mjs","test:fail-on-incompatible":"bun test/test-fail-on-incompatible.mjs","test:native-dependencies":"bun test/test-native-dependencies.mjs","test:credentials":"bun test/test-credentials.mjs","test:asc-key-protocol":"bun test/test-asc-key-protocol.mjs","test:credentials-validation":"bun test/test-credentials-validation.mjs","test:android-service-account-validation":"bun test/test-android-service-account-validation.mjs","test:build-zip-filter":"bun test/test-build-zip-filter.mjs","test:checksum":"bun test/test-checksum-algorithm.mjs","test:build-needed":"bun test/test-build-needed.mjs","test:ci-prompts":"bun test/test-ci-prompts.mjs","test:ci-secrets":"bun test/test-ci-secrets.mjs","test:android-onboarding-progress":"bun test/test-android-onboarding-progress.mjs","test:onboarding-telemetry":"bun test/test-onboarding-telemetry.mjs","test:v2-event-migration":"bun test/test-v2-event-migration.mjs","test:analytics":"bun test/test-analytics.mjs","test:analytics-error-category":"bun test/test-analytics-error-category.mjs","test:analytics-org-resolver":"bun test/test-analytics-org-resolver.mjs","test:supabase-perf":"bun test/test-supabase-perf.mjs","test:preview-qr":"bun test/test-preview-qr.mjs","test:mcp-analytics":"bun test/test-mcp-analytics.mjs","test:mcp-instructions":"bun test/test-mcp-instructions.mjs","test:mcp-stdout-guard":"bun test/test-mcp-stdout-guard.mjs","test:mcp-platform-select":"bun test/test-mcp-platform-select.mjs","test:mcp-explain-scopes":"bun test/test-mcp-explain-scopes.mjs","test:mcp-oauth-reopen":"bun test/test-mcp-oauth-reopen.mjs","test:mcp-broker-oauth":"bun test/test-mcp-broker-oauth.mjs","test:mcp-broker-session":"bun test/test-mcp-broker-session.mjs","test:mcp-credentials-manage":"bun test/test-mcp-credentials-manage.mjs","test:mcp-resume-prompt":"bun test/test-mcp-resume-prompt.mjs","test:mcp-build-job":"bun test/test-mcp-build-job.mjs","test:mcp-build-tools":"bun test/test-mcp-build-tools.mjs","test:app-created-source":"bun test/test-app-created-source.mjs","test:doctor-analytics":"bun test/test-doctor-analytics.mjs","test:posthog-exception":"bun test/test-posthog-exception.mjs","test:onboarding-recovery":"bun test/test-onboarding-recovery.mjs","test:onboarding-progress":"bun test/test-onboarding-progress.mjs","test:onboarding-run-targets":"bun test/test-onboarding-run-targets.mjs","test:run-device-command":"bun test/test-run-device-command.mjs","test:init-app-conflict":"bun test/test-init-app-conflict.mjs","test:init-guardrails":"bun test/test-init-guardrails.mjs","test:init-replay":"bun test/test-init-replay.mjs","test:capacitor-config-target":"bun test/test-capacitor-config-target.mjs","test:init-monorepo-targeting":"bun run test:capacitor-config-target && bun test/test-init-monorepo-targeting.mjs","test:prompt-preferences":"bun test/test-prompt-preferences.mjs","test:esm-sdk":"node test/test-sdk-esm.mjs","test:auth-session":"bun test/test-auth-session.mjs","test:mcp":"node test/test-mcp.mjs","test:mcp-no-key-handshake":"node test/test-mcp-no-key-handshake.mjs","test:version-detection":"node test/test-get-installed-version.mjs","test:version-detection:setup":"./test/fixtures/setup-test-projects.sh","test:platform-paths":"bun test/test-platform-paths.mjs","test:project-type-detection":"bun test/test-project-type-detection.mjs","test:payload-split":"bun test/test-payload-split.mjs","test:macos-signing":"bun test/test-macos-signing.mjs","test:helper-dce":"bash scripts/check-helper-dce.sh","test:apple-api-import-helpers":"bun test/test-apple-api-import-helpers.mjs","test:apple-api-verify-key":"bun test/test-apple-api-verify-key.mjs","test:bundle-id-detector":"bun test/test-bundle-id-detector.mjs","test:apple-api-app-list":"bun test/test-apple-api-app-list.mjs","test:apple-api-cert-create":"bun test/test-apple-api-cert-create.mjs","test:app-verification":"bun test/test-app-verification.mjs","test:pbxproj-parser":"bun test/test-pbxproj-parser.mjs","test:manifest-path-encoding":"bun test/test-manifest-path-encoding.mjs","test:self-update":"bun test/test-self-update.mjs","test:update-prompt":"bun test/test-update-prompt.mjs","test:android-tail-engine":"bun test/test-android-tail-engine.mjs","test:android-tail-render":"bun test/test-android-tail-render.mjs","test:android-tail-routing":"bun test/test-android-tail-routing.mjs","test:dev-gate-stripped":"bun test/test-dev-gate-stripped.mjs","test:frame-fit-ios-shared":"bun test/test-frame-fit-ios-shared.mjs","test:ios-confirm-app-id":"bun test/test-ios-confirm-app-id.mjs","test:ios-create-new":"bun test/test-ios-create-new.mjs","test:ios-e2e":"bun test/test-ios-e2e.mjs","test:ios-flow-contract":"bun test/test-ios-flow-contract.mjs","test:ios-import-discovery":"bun test/test-ios-import-discovery.mjs","test:ios-import-export":"bun test/test-ios-import-export.mjs","test:ios-import-pickers":"bun test/test-ios-import-pickers.mjs","test:ios-import-recovery":"bun test/test-ios-import-recovery.mjs","test:ios-recovery":"bun test/test-ios-recovery.mjs","test:ios-resume":"bun test/test-ios-resume.mjs","test:ios-tail-handoff":"bun test/test-ios-tail-handoff.mjs","test:ios-tui-render":"bun test/test-ios-tui-render.mjs","test:p8-error":"bun test/test-p8-error.mjs","test:ios-tui-routing":"bun test/test-ios-tui-routing.mjs","test:ios-updater-sync-validation":"bun test/test-ios-updater-sync-validation.mjs","test:ios-verify-app":"bun test/test-ios-verify-app.mjs","test:ios-marketing-version":"bun test/test-ios-marketing-version.mjs","test:platform-flow-contract":"bun test/test-platform-flow-contract.mjs","test:tail-engine-shared":"bun test/test-tail-engine-shared.mjs",test:"bun run build && bun run test:helper-dce && bun run test:version-detection:setup && bun run test:bundle && bun run test:functional && bun run test:semver && bun run test:version-edge-cases && bun run test:regex && bun run test:upload && bun run test:fail-on-incompatible && bun run test:native-dependencies && bun run test:credentials && bun run test:credentials-validation && bun run test:android-service-account-validation && bun run test:build-zip-filter && bun run test:checksum && bun run test:build-needed && bun run test:ci-prompts && bun run test:ci-secrets && bun run test:android-onboarding-progress && bun run test:onboarding-telemetry && bun run test:v2-event-migration && bun run test:analytics && bun run test:analytics-error-category && bun run test:analytics-org-resolver && bun run test:supabase-perf && bun run test:preview-qr && bun run test:app-set-options && bun run test:mcp-analytics && bun run test:mcp-instructions && bun run test:mcp-live-update-onboarding && bun run test:mcp-stdout-guard && bun run test:mcp-platform-select && bun run test:mcp-explain-scopes && bun run test:mcp-oauth-reopen && bun run test:mcp-broker-oauth && bun run test:mcp-broker-session && bun run test:mcp-credentials-manage && bun run test:mcp-resume-prompt && bun run test:mcp-build-job && bun run test:mcp-build-tools && bun run test:app-created-source && bun run test:doctor-analytics && bun run test:posthog-exception && bun run test:build-platform-selection && bun run test:onboarding-recovery && bun run test:onboarding-progress && bun run test:onboarding-run-targets && bun run test:run-device-command && bun run test:init-monorepo-targeting && bun run test:init-app-conflict && bun run test:init-guardrails && bun run test:init-replay && bun run test:prompt-preferences && bun run test:esm-sdk && bun run test:mcp && bun run test:mcp-no-key-handshake && bun run test:auth-session && bun run test:version-detection && bun run test:platform-paths && bun run test:project-type-detection && bun run test:payload-split && bun run test:manifest-path-encoding && bun run test:macos-signing && bun run test:asc-key-protocol && bun run test:apple-api-import-helpers && bun run test:apple-api-verify-key && bun run test:bundle-id-detector && bun run test:apple-api-app-list && bun run test:app-verification && bun run test:pbxproj-parser && bun run test:ai-log-capture && bun run test:ai-analyze-flow && bun run test:cicd-failure-help && bun run test:ai-sse-parser && bun run test:ai-render-markdown && bun run test:ai-stream-markdown && bun run test:ai-onboarding-mode && bun run test:ai-fit && bun run test:platform-layout && bun run test:frame-fit && bun run test:onboarding-min-size && bun run test:min-size-gate && bun run test:shell-size-gate && bun run test:build-log-sanitize && bun run test:build-output-viewport && bun run test:diff-viewer-viewport && bun run test:build-complete-exit && bun run test:ai-analyze-stream && bun run test:support-mailto && bun run test:support-redact && bun run test:support-internal-log && bun run test:support-help-menu && bun run test:support-contact && bun run test:support-upload-prompt && bun run test:support-bundle-files && bun run test:self-update && bun run test:update-prompt && bun run test:apple-api-cert-create && bun run test:android-tail-engine && bun run test:android-tail-render && bun run test:android-tail-routing && bun run test:dev-gate-stripped && bun run test:frame-fit-ios-shared && bun run test:ios-confirm-app-id && bun run test:ios-create-new && bun run test:ios-e2e && bun run test:ios-flow-contract && bun run test:ios-import-discovery && bun run test:ios-import-export && bun run test:ios-import-pickers && bun run test:ios-import-recovery && bun run test:ios-recovery && bun run test:ios-resume && bun run test:ios-tail-handoff && bun run test:ios-tui-render && bun run test:p8-error && bun run test:ios-tui-routing && bun run test:ios-updater-sync-validation && bun run test:ios-verify-app && bun run test:ios-marketing-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-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:organization-set-api-host","test:build-platform-selection":"bun test/test-build-platform-selection.mjs","test:ai-log-capture":"bun test/test-ai-log-capture.mjs","test:ai-analyze-flow":"bun test/test-ai-analyze-flow.mjs","test:cicd-failure-help":"bun test/test-cicd-failure-help.mjs","test:ai-analyze-stream":"bun test/test-ai-analyze-stream.mjs","test:ai-sse-parser":"bun test/test-ai-sse-parser.mjs","test:ai-render-markdown":"bun test/test-ai-render-markdown.mjs","test:ai-onboarding-mode":"bun test/test-ai-onboarding-mode.mjs","test:ai-fit":"bun test/test-ai-fit.mjs","test:platform-layout":"bun test/test-platform-layout.mjs","test:frame-fit":"bun test/run-frame-fit.mjs","test:onboarding-min-size":"bun test/test-onboarding-min-size.mjs","test:min-size-gate":"bun test/test-min-size-gate.mjs","test:shell-size-gate":"bun test/test-shell-size-gate.mjs","test:build-log-sanitize":"bun test/test-build-log-sanitize.mjs","test:build-output-viewport":"bun test/test-build-output-viewport.mjs","test:diff-viewer-viewport":"bun test/test-diff-viewer-viewport.mjs","test:build-complete-exit":"bun test/test-build-complete-exit.mjs","test:ai-stream-markdown":"bun test/test-ai-stream-markdown.mjs","test:support-mailto":"bun test/test-support-mailto.mjs","test:support-redact":"bun test/test-support-redact.mjs","test:support-internal-log":"bun test/test-support-internal-log.mjs","test:support-help-menu":"bun test/test-support-help-menu.mjs","test:support-contact":"bun test/test-support-contact.mjs","test:support-upload-prompt":"bun test/test-support-upload-prompt.mjs","test:support-bundle-files":"bun test/test-support-bundle-files.mjs","test:mcp-live-update-onboarding":"bun test/test-mcp-live-update-onboarding.mjs","test:app-set-options":"bun test/test-app-set-options.mjs","test:android-reporting-api":"bun test/test-android-reporting-api.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:organization-set-api-host":"bun test/test-organization-set-api-host.mjs"},dependencies:{"@inkjs/ui":"^2.0.0","@rrweb/types":"^2.1.1","@xterm/addon-serialize":"^0.14.0","@xterm/headless":"^6.0.0","happy-dom":"^20.11.0",ink:"^7.1.1","ink-spinner":"^5.0.0",jsonwebtoken:"^9.0.3","node-forge":"^1.4.0",qrcode:"^1.5.4",react:"^19.2.8","rrweb-snapshot":"^2.1.1","string-width":"^8.2.2",zod:"^4.4.3","@standard-schema/spec":"^1.1.0"},optionalDependencies:{"@capgo/cli-helper-darwin-arm64":"^1.1.1","@capgo/cli-helper-darwin-x64":"^1.1.1","node-pty":"^1.1.0"},devDependencies:{"@antfu/eslint-config":"^9.2.0","@bradenmacdonald/s3-lite-client":"npm:@jsr/bradenmacdonald__s3-lite-client@0.9.6","@capacitor/cli":"^8.4.2","@capgo/find-package-manager":"^0.0.18","@clack/prompts":"^1.7.0","@modelcontextprotocol/client":"^2.0.0-beta.5","@modelcontextprotocol/server":"^2.0.0-beta.5","@sauber/table":"npm:@jsr/sauber__table","@std/semver":"npm:@jsr/std__semver@1.0.8","@supabase/supabase-js":"^2.110.8","@tanstack/intent":"^0.3.6","@types/adm-zip":"^0.5.8","@types/jsonwebtoken":"^9.0.10","@types/node":"^26.1.1","@types/node-forge":"^1.3.14","@types/prettyjson":"^0.0.33","@types/qrcode":"^1.5.6","@types/react":"^19.2.17","@types/tmp":"^0.2.6","@types/ws":"^8.18.1","@typescript/native-preview":"7.0.0-dev.20260707.2","@vercel/ncc":"^0.44.1","@xterm/headless":"^6.0.0","adm-zip":"^0.6.0","ci-info":"^4.4.0",commander:"^15.0.0",eslint:"^10.7.0","git-format-staged":"4.0.1",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",typescript:"6.0.3",ws:"^8.21.1"}}});function cXQ(A){if(A&&typeof A==="object"&&"status"in A){let Q=A.status;if(typeof Q==="number")return Q}return}function dXQ(A){if(A instanceof Error)return A.message;if(typeof A==="string")return A;return""}function FP(A){if(A&&typeof A==="object"&&"code"in A){let $=A.code;if(typeof $==="string"&&$.startsWith("commander."))return"commander"}let Q=cXQ(A);if(Q!==void 0){if(Q===401)return"unauthorized";if(Q===403)return"forbidden";if(Q===404)return"not_found";if(Q===413)return"payload_too_large";if(Q>=500)return"server_error"}let B=dXQ(A).toLowerCase();if(/econnrefused|enotfound|fetch failed|network|socket|dns/.test(B))return"network_error";if(/timed out|timeout|etimedout|aborted/.test(B))return"timeout";if(/invalid|must be|required|not allowed|malformed|validation/.test(B))return"validation_error";return"unknown"}function yOA(A){if(A===401)return"unauthorized";if(A===403)return"forbidden";if(A===404)return"not_found";if(A===408||A===504)return"timeout";if(A===413)return"payload_too_large";if(A===429)return"rate_limited";if(A===400||A===422)return"validation_error";if(A>=500)return"server_error";return"unknown"}import{AsyncLocalStorage as pXQ}from"node:async_hooks";function TL(A,Q){return uOA.run(A,()=>Promise.resolve(Q()))}function iXQ(){return uOA.getStore()}function DP(){mOA=!0}function cOA(){return mOA}function lOA(A){dOA=A}function hOA(A){try{dOA?.(A)}catch{}}function iOA(A,Q){let B;try{B=new URL(A).pathname}catch{B=A.split("?")[0]}let $="/functions/v1/",J=B.indexOf($);if(J>=0){let K=B.slice(J+$.length).replace(/^\/+|\/+$/g,"");return K?`${Q} functions:${K}`:`${Q} functions`}let Y="/rest/v1/",Z=B.indexOf(Y),X=Z>=0?B.slice(Z+Y.length):B.replace(/^\//,"");if(X.startsWith("rpc/"))return`rpc:${X.slice(4).split("/")[0]}`;let G=X.split("/")[0]||B;return`${Q} ${G}`}function nXQ(A){let Q=A?.headers;if(!Q)return;let B=Q.get;if(typeof B==="function")return B.call(Q,"capgkey")??void 0;if(Array.isArray(Q))return Q.find(([$])=>$.toLowerCase()==="capgkey")?.[1];return Q.capgkey}function nOA(){return async(Q,B)=>{let $=(B?.method??"GET").toUpperCase(),J=typeof Q==="string"?Q:Q instanceof URL?Q.href:Q.url,Y=iXQ(),Z=nXQ(B),X=Date.now();try{let G=await globalThis.fetch(Q,B);return hOA({url:J,method:$,status:G.status,ok:G.ok,durationMs:Date.now()-X,source:Y,apikey:Z}),G}catch(G){throw hOA({url:J,method:$,status:0,ok:!1,durationMs:Date.now()-X,source:Y,apikey:Z,error:G}),G}}}var uOA,mOA=!1,dOA,pOA=5000;var UP=cA(()=>{uOA=new pXQ});import{homedir as aOA,platform as aXQ,release as oXQ}from"node:os";import{arch as rXQ,cwd as oOA,env as Iq,version as sXQ}from"node:process";function DK(A){return A==="1"||A?.toLowerCase()==="true"||A?.toLowerCase()==="yes"}function QGQ(){if(DK(Iq.CAPGO_DISABLE_TELEMETRY)||DK(Iq.CAPGO_DISABLE_POSTHOG))return;return Iq.CAPGO_CLI_POSTHOG_API_KEY?.trim()||Iq.POSTHOG_API_KEY?.trim()||eXQ}function BGQ(A){let Q=A.replace(/\/+$/,"");if(Q.endsWith("/i/v0/e"))return`${Q}/`;let B=Q.replace(/\/capture$/,"/");return new URL("i/v0/e/",B.endsWith("/")?B:`${B}/`).toString()}function $GQ(A){if(A instanceof Error)return{cause:A.cause,message:A.message,name:A.name||"Error",stack:A.stack};if(typeof A==="string")return{message:A,name:"Error",stack:void 0};try{return{message:JSON.stringify(A)??String(A),name:"Error",stack:void 0}}catch{return{message:String(A),name:"Error",stack:void 0}}}function JGQ(A){let Q=A,B=oOA(),$=aOA();if(B)Q=Q.replaceAll(B,"<cwd>");if($)Q=Q.replaceAll($,"~");return Q}function YGQ(A){let Q=A,B=oOA(),$=aOA();if(B)Q=Q.replaceAll(B,"<cwd>");if($)Q=Q.replaceAll($,"~");return Q.replace(/<cwd>\/[^\s"',)]+/g,"<cwd>/<path>").replace(/~\/[^\s"',)]+/g,"~/<path>").replace(/[\w.%+-]+@[\w.-]+\.[A-Z]{2,}/gi,"<email>").replace(/(https?:\/\/)([^/\s:@]+):([^/\s@]+)@/gi,"$1<redacted>@").replace(/\b[a-z][\w-]*(?:\.[\w-]+){2,}\b/gi,"<app_id>").replace(/\b[a-z]:\\[^\s"',)]+/gi,"<path>").replace(/(^|[\s"'(])\/[^\s"',)]+/g,"$1<path>").replace(/(--(?:token|api[-_]?key|key|password|secret|private[-_]?key|jwt|session|auth)(?:=|\s+))("[^"]+"|'[^']+'|\S+)/gi,"$1<redacted>").replace(/\b((?:token|api[-_]?key|password|secret|authorization)\s*[:=]\s*)[^\s,;]+/gi,"$1<redacted>")}function ZGQ(A,Q){let B=A?.split(`
70
+ `)},info:(A,Q)=>{T.message(A,{...Q,symbol:M0("blue",wXQ)})},success:(A,Q)=>{T.message(A,{...Q,symbol:M0("green",PXQ)})},step:(A,Q)=>{T.message(A,{...Q,symbol:M0("green",HBA)})},warn:(A,Q)=>{T.message(A,{...Q,symbol:M0("yellow",_XQ)})},warning:(A,Q)=>{T.warn(A,Q)},error:(A,Q)=>{T.message(A,{...Q,symbol:M0("red",TXQ)})}},FU0={light:G$("─","-"),heavy:G$("━","="),block:G$("█","#")},fXQ=[`${M0("dim","↑/↓")} to navigate`,`${M0("dim","Enter:")} confirm`],DU0=`${M0("gray",M4)} `});var O$;var lX=cA(()=>{O$={name:"@capgo/cli",type:"module",version:"8.31.0",description:"A CLI to upload to capgo servers",author:"Martin martin@capgo.app",license:"Apache 2.0",homepage:"https://github.com/Cap-go/capgo/tree/main/cli#readme",repository:{type:"git",url:"git+https://github.com/Cap-go/capgo.git",directory:"cli"},bugs:{url:"https://github.com/Cap-go/capgo/issues"},keywords:["appflow alternative","ionic","capacitor","auto update","live update","capgo","cli","upload","capgo-cli","sdk","tanstack-intent"],exports:{".":{import:"./dist/index.js",require:"./dist/index.js"},"./sdk":{types:"./dist/src/sdk.d.ts",import:"./dist/src/sdk.js"}},main:"dist/index.js",types:"dist/src/index.d.ts",bin:{capgo:"dist/index.js"},files:["!skills/_artifacts","dist","skills"],engines:{npm:">=8.0.0",node:">=20.0.0"},scripts:{build:"tsc && bun build.mjs",dev:"NODE_ENV=development ncc build","no-debug":"node dist/index.js","dev-build":"SUPA_DB=development ncc build",pack:"pkg",types:"bunx --bun supabase gen types typescript --project-id=xvwzpoazmxkqosrdewyv > src/types/supabase.types.ts",typecheck:"tsgo --project tsconfig.tsgo.json --noEmit",lint:"bun run lint:ox","lint:ox":"oxlint --config ../.oxlintrc.json src","lint:fix":"oxlint --config ../.oxlintrc.json --fix src","check-posix-paths":"node test/check-posix-paths.js","generate-docs":"node dist/index.js generate-docs README.md","test:bundle":"bun test/test-bundle.mjs","test:prescan":"bun test test/prescan/","test:functional":"bun test/test-functional.mjs","test:semver":"bun test/test-semver-validation.mjs","test:version-edge-cases":"bun test/test-version-validation.mjs","test:regex":"bun test/test-regex-validation.mjs","test:upload":"bun test/test-upload-validation.mjs","test:fail-on-incompatible":"bun test/test-fail-on-incompatible.mjs","test:native-dependencies":"bun test/test-native-dependencies.mjs","test:credentials":"bun test/test-credentials.mjs","test:asc-key-protocol":"bun test/test-asc-key-protocol.mjs","test:credentials-validation":"bun test/test-credentials-validation.mjs","test:android-service-account-validation":"bun test/test-android-service-account-validation.mjs","test:build-zip-filter":"bun test/test-build-zip-filter.mjs","test:checksum":"bun test/test-checksum-algorithm.mjs","test:build-needed":"bun test/test-build-needed.mjs","test:ci-prompts":"bun test/test-ci-prompts.mjs","test:ci-secrets":"bun test/test-ci-secrets.mjs","test:android-onboarding-progress":"bun test/test-android-onboarding-progress.mjs","test:onboarding-telemetry":"bun test/test-onboarding-telemetry.mjs","test:v2-event-migration":"bun test/test-v2-event-migration.mjs","test:analytics":"bun test/test-analytics.mjs","test:analytics-error-category":"bun test/test-analytics-error-category.mjs","test:analytics-org-resolver":"bun test/test-analytics-org-resolver.mjs","test:supabase-perf":"bun test/test-supabase-perf.mjs","test:preview-qr":"bun test/test-preview-qr.mjs","test:mcp-analytics":"bun test/test-mcp-analytics.mjs","test:mcp-instructions":"bun test/test-mcp-instructions.mjs","test:mcp-stdout-guard":"bun test/test-mcp-stdout-guard.mjs","test:mcp-platform-select":"bun test/test-mcp-platform-select.mjs","test:mcp-explain-scopes":"bun test/test-mcp-explain-scopes.mjs","test:mcp-oauth-reopen":"bun test/test-mcp-oauth-reopen.mjs","test:mcp-broker-oauth":"bun test/test-mcp-broker-oauth.mjs","test:mcp-broker-session":"bun test/test-mcp-broker-session.mjs","test:mcp-credentials-manage":"bun test/test-mcp-credentials-manage.mjs","test:mcp-resume-prompt":"bun test/test-mcp-resume-prompt.mjs","test:mcp-build-job":"bun test/test-mcp-build-job.mjs","test:mcp-build-tools":"bun test/test-mcp-build-tools.mjs","test:app-created-source":"bun test/test-app-created-source.mjs","test:doctor-analytics":"bun test/test-doctor-analytics.mjs","test:posthog-exception":"bun test/test-posthog-exception.mjs","test:onboarding-recovery":"bun test/test-onboarding-recovery.mjs","test:onboarding-progress":"bun test/test-onboarding-progress.mjs","test:onboarding-run-targets":"bun test/test-onboarding-run-targets.mjs","test:run-device-command":"bun test/test-run-device-command.mjs","test:init-app-conflict":"bun test/test-init-app-conflict.mjs","test:init-guardrails":"bun test/test-init-guardrails.mjs","test:init-replay":"bun test/test-init-replay.mjs","test:capacitor-config-target":"bun test/test-capacitor-config-target.mjs","test:init-monorepo-targeting":"bun run test:capacitor-config-target && bun test/test-init-monorepo-targeting.mjs","test:prompt-preferences":"bun test/test-prompt-preferences.mjs","test:esm-sdk":"node test/test-sdk-esm.mjs","test:auth-session":"bun test/test-auth-session.mjs","test:mcp":"node test/test-mcp.mjs","test:mcp-no-key-handshake":"node test/test-mcp-no-key-handshake.mjs","test:version-detection":"node test/test-get-installed-version.mjs","test:version-detection:setup":"./test/fixtures/setup-test-projects.sh","test:platform-paths":"bun test/test-platform-paths.mjs","test:project-type-detection":"bun test/test-project-type-detection.mjs","test:payload-split":"bun test/test-payload-split.mjs","test:macos-signing":"bun test/test-macos-signing.mjs","test:helper-dce":"bash scripts/check-helper-dce.sh","test:apple-api-import-helpers":"bun test/test-apple-api-import-helpers.mjs","test:apple-api-verify-key":"bun test/test-apple-api-verify-key.mjs","test:bundle-id-detector":"bun test/test-bundle-id-detector.mjs","test:apple-api-app-list":"bun test/test-apple-api-app-list.mjs","test:apple-api-cert-create":"bun test/test-apple-api-cert-create.mjs","test:app-verification":"bun test/test-app-verification.mjs","test:pbxproj-parser":"bun test/test-pbxproj-parser.mjs","test:manifest-path-encoding":"bun test/test-manifest-path-encoding.mjs","test:self-update":"bun test/test-self-update.mjs","test:update-prompt":"bun test/test-update-prompt.mjs","test:android-tail-engine":"bun test/test-android-tail-engine.mjs","test:android-tail-render":"bun test/test-android-tail-render.mjs","test:android-tail-routing":"bun test/test-android-tail-routing.mjs","test:dev-gate-stripped":"bun test/test-dev-gate-stripped.mjs","test:frame-fit-ios-shared":"bun test/test-frame-fit-ios-shared.mjs","test:ios-confirm-app-id":"bun test/test-ios-confirm-app-id.mjs","test:ios-create-new":"bun test/test-ios-create-new.mjs","test:ios-e2e":"bun test/test-ios-e2e.mjs","test:ios-flow-contract":"bun test/test-ios-flow-contract.mjs","test:ios-import-discovery":"bun test/test-ios-import-discovery.mjs","test:ios-import-export":"bun test/test-ios-import-export.mjs","test:ios-import-pickers":"bun test/test-ios-import-pickers.mjs","test:ios-import-recovery":"bun test/test-ios-import-recovery.mjs","test:ios-recovery":"bun test/test-ios-recovery.mjs","test:ios-resume":"bun test/test-ios-resume.mjs","test:ios-tail-handoff":"bun test/test-ios-tail-handoff.mjs","test:ios-tui-render":"bun test/test-ios-tui-render.mjs","test:p8-error":"bun test/test-p8-error.mjs","test:ios-tui-routing":"bun test/test-ios-tui-routing.mjs","test:ios-updater-sync-validation":"bun test/test-ios-updater-sync-validation.mjs","test:ios-verify-app":"bun test/test-ios-verify-app.mjs","test:ios-marketing-version":"bun test/test-ios-marketing-version.mjs","test:platform-flow-contract":"bun test/test-platform-flow-contract.mjs","test:tail-engine-shared":"bun test/test-tail-engine-shared.mjs",test:"bun run build && bun run test:helper-dce && bun run test:version-detection:setup && bun run test:bundle && bun run test:functional && bun run test:semver && bun run test:version-edge-cases && bun run test:regex && bun run test:upload && bun run test:fail-on-incompatible && bun run test:native-dependencies && bun run test:credentials && bun run test:credentials-validation && bun run test:android-service-account-validation && bun run test:build-zip-filter && bun run test:checksum && bun run test:build-needed && bun run test:ci-prompts && bun run test:ci-secrets && bun run test:android-onboarding-progress && bun run test:onboarding-telemetry && bun run test:v2-event-migration && bun run test:analytics && bun run test:analytics-error-category && bun run test:analytics-org-resolver && bun run test:supabase-perf && bun run test:preview-qr && bun run test:app-set-options && bun run test:mcp-analytics && bun run test:mcp-instructions && bun run test:mcp-live-update-onboarding && bun run test:mcp-stdout-guard && bun run test:mcp-platform-select && bun run test:mcp-explain-scopes && bun run test:mcp-oauth-reopen && bun run test:mcp-broker-oauth && bun run test:mcp-broker-session && bun run test:mcp-credentials-manage && bun run test:mcp-resume-prompt && bun run test:mcp-build-job && bun run test:mcp-build-tools && bun run test:app-created-source && bun run test:doctor-analytics && bun run test:posthog-exception && bun run test:build-platform-selection && bun run test:onboarding-recovery && bun run test:onboarding-progress && bun run test:onboarding-run-targets && bun run test:run-device-command && bun run test:init-monorepo-targeting && bun run test:init-app-conflict && bun run test:init-guardrails && bun run test:init-replay && bun run test:prompt-preferences && bun run test:esm-sdk && bun run test:mcp && bun run test:mcp-no-key-handshake && bun run test:auth-session && bun run test:version-detection && bun run test:platform-paths && bun run test:project-type-detection && bun run test:payload-split && bun run test:manifest-path-encoding && bun run test:macos-signing && bun run test:asc-key-protocol && bun run test:apple-api-import-helpers && bun run test:apple-api-verify-key && bun run test:bundle-id-detector && bun run test:apple-api-app-list && bun run test:app-verification && bun run test:pbxproj-parser && bun run test:ai-log-capture && bun run test:ai-analyze-flow && bun run test:cicd-failure-help && bun run test:ai-sse-parser && bun run test:ai-render-markdown && bun run test:ai-stream-markdown && bun run test:ai-onboarding-mode && bun run test:ai-fit && bun run test:platform-layout && bun run test:frame-fit && bun run test:onboarding-min-size && bun run test:min-size-gate && bun run test:shell-size-gate && bun run test:build-log-sanitize && bun run test:build-output-viewport && bun run test:diff-viewer-viewport && bun run test:build-complete-exit && bun run test:ai-analyze-stream && bun run test:support-mailto && bun run test:support-redact && bun run test:support-internal-log && bun run test:support-help-menu && bun run test:support-contact && bun run test:support-upload-prompt && bun run test:support-bundle-files && bun run test:self-update && bun run test:update-prompt && bun run test:apple-api-cert-create && bun run test:android-tail-engine && bun run test:android-tail-render && bun run test:android-tail-routing && bun run test:dev-gate-stripped && bun run test:frame-fit-ios-shared && bun run test:ios-confirm-app-id && bun run test:ios-create-new && bun run test:ios-e2e && bun run test:ios-flow-contract && bun run test:ios-import-discovery && bun run test:ios-import-export && bun run test:ios-import-pickers && bun run test:ios-import-recovery && bun run test:ios-recovery && bun run test:ios-resume && bun run test:ios-tail-handoff && bun run test:ios-tui-render && bun run test:p8-error && bun run test:ios-tui-routing && bun run test:ios-updater-sync-validation && bun run test:ios-verify-app && bun run test:ios-marketing-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-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:organization-set-api-host","test:build-platform-selection":"bun test/test-build-platform-selection.mjs","test:ai-log-capture":"bun test/test-ai-log-capture.mjs","test:ai-analyze-flow":"bun test/test-ai-analyze-flow.mjs","test:cicd-failure-help":"bun test/test-cicd-failure-help.mjs","test:ai-analyze-stream":"bun test/test-ai-analyze-stream.mjs","test:ai-sse-parser":"bun test/test-ai-sse-parser.mjs","test:ai-render-markdown":"bun test/test-ai-render-markdown.mjs","test:ai-onboarding-mode":"bun test/test-ai-onboarding-mode.mjs","test:ai-fit":"bun test/test-ai-fit.mjs","test:platform-layout":"bun test/test-platform-layout.mjs","test:frame-fit":"bun test/run-frame-fit.mjs","test:onboarding-min-size":"bun test/test-onboarding-min-size.mjs","test:min-size-gate":"bun test/test-min-size-gate.mjs","test:shell-size-gate":"bun test/test-shell-size-gate.mjs","test:build-log-sanitize":"bun test/test-build-log-sanitize.mjs","test:build-output-viewport":"bun test/test-build-output-viewport.mjs","test:diff-viewer-viewport":"bun test/test-diff-viewer-viewport.mjs","test:build-complete-exit":"bun test/test-build-complete-exit.mjs","test:ai-stream-markdown":"bun test/test-ai-stream-markdown.mjs","test:support-mailto":"bun test/test-support-mailto.mjs","test:support-redact":"bun test/test-support-redact.mjs","test:support-internal-log":"bun test/test-support-internal-log.mjs","test:support-help-menu":"bun test/test-support-help-menu.mjs","test:support-contact":"bun test/test-support-contact.mjs","test:support-upload-prompt":"bun test/test-support-upload-prompt.mjs","test:support-bundle-files":"bun test/test-support-bundle-files.mjs","test:mcp-live-update-onboarding":"bun test/test-mcp-live-update-onboarding.mjs","test:app-set-options":"bun test/test-app-set-options.mjs","test:android-reporting-api":"bun test/test-android-reporting-api.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:organization-set-api-host":"bun test/test-organization-set-api-host.mjs"},dependencies:{"@inkjs/ui":"^2.0.0","@rrweb/types":"^2.1.1","@xterm/addon-serialize":"^0.14.0","@xterm/headless":"^6.0.0","happy-dom":"^20.11.0",ink:"^7.1.1","ink-spinner":"^5.0.0",jsonwebtoken:"^9.0.3","node-forge":"^1.4.0",qrcode:"^1.5.4",react:"^19.2.8","rrweb-snapshot":"^2.1.1","string-width":"^8.2.2",zod:"^4.4.3","@standard-schema/spec":"^1.1.0"},optionalDependencies:{"@capgo/cli-helper-darwin-arm64":"^1.1.1","@capgo/cli-helper-darwin-x64":"^1.1.1","node-pty":"^1.1.0"},devDependencies:{"@antfu/eslint-config":"^9.2.0","@bradenmacdonald/s3-lite-client":"npm:@jsr/bradenmacdonald__s3-lite-client@0.9.6","@capacitor/cli":"^8.4.2","@capgo/find-package-manager":"^0.0.18","@clack/prompts":"^1.7.0","@modelcontextprotocol/client":"^2.0.0-beta.5","@modelcontextprotocol/server":"^2.0.0-beta.5","@sauber/table":"npm:@jsr/sauber__table","@std/semver":"npm:@jsr/std__semver@1.0.8","@supabase/supabase-js":"^2.110.8","@tanstack/intent":"^0.3.6","@types/adm-zip":"^0.5.8","@types/jsonwebtoken":"^9.0.10","@types/node":"^26.1.1","@types/node-forge":"^1.3.14","@types/prettyjson":"^0.0.33","@types/qrcode":"^1.5.6","@types/react":"^19.2.17","@types/tmp":"^0.2.6","@types/ws":"^8.18.1","@typescript/native-preview":"7.0.0-dev.20260707.2","@vercel/ncc":"^0.44.1","@xterm/headless":"^6.0.0","adm-zip":"^0.6.0","ci-info":"^4.4.0",commander:"^15.0.0",eslint:"^10.7.0","git-format-staged":"4.0.1",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",typescript:"6.0.3",ws:"^8.21.1"}}});function cXQ(A){if(A&&typeof A==="object"&&"status"in A){let Q=A.status;if(typeof Q==="number")return Q}return}function dXQ(A){if(A instanceof Error)return A.message;if(typeof A==="string")return A;return""}function FP(A){if(A&&typeof A==="object"&&"code"in A){let $=A.code;if(typeof $==="string"&&$.startsWith("commander."))return"commander"}let Q=cXQ(A);if(Q!==void 0){if(Q===401)return"unauthorized";if(Q===403)return"forbidden";if(Q===404)return"not_found";if(Q===413)return"payload_too_large";if(Q>=500)return"server_error"}let B=dXQ(A).toLowerCase();if(/econnrefused|enotfound|fetch failed|network|socket|dns/.test(B))return"network_error";if(/timed out|timeout|etimedout|aborted/.test(B))return"timeout";if(/invalid|must be|required|not allowed|malformed|validation/.test(B))return"validation_error";return"unknown"}function yOA(A){if(A===401)return"unauthorized";if(A===403)return"forbidden";if(A===404)return"not_found";if(A===408||A===504)return"timeout";if(A===413)return"payload_too_large";if(A===429)return"rate_limited";if(A===400||A===422)return"validation_error";if(A>=500)return"server_error";return"unknown"}import{AsyncLocalStorage as pXQ}from"node:async_hooks";function TL(A,Q){return uOA.run(A,()=>Promise.resolve(Q()))}function iXQ(){return uOA.getStore()}function DP(){mOA=!0}function cOA(){return mOA}function lOA(A){dOA=A}function hOA(A){try{dOA?.(A)}catch{}}function iOA(A,Q){let B;try{B=new URL(A).pathname}catch{B=A.split("?")[0]}let $="/functions/v1/",J=B.indexOf($);if(J>=0){let K=B.slice(J+$.length).replace(/^\/+|\/+$/g,"");return K?`${Q} functions:${K}`:`${Q} functions`}let Y="/rest/v1/",Z=B.indexOf(Y),X=Z>=0?B.slice(Z+Y.length):B.replace(/^\//,"");if(X.startsWith("rpc/"))return`rpc:${X.slice(4).split("/")[0]}`;let G=X.split("/")[0]||B;return`${Q} ${G}`}function nXQ(A){let Q=A?.headers;if(!Q)return;let B=Q.get;if(typeof B==="function")return B.call(Q,"capgkey")??void 0;if(Array.isArray(Q))return Q.find(([$])=>$.toLowerCase()==="capgkey")?.[1];return Q.capgkey}function nOA(){return async(Q,B)=>{let $=(B?.method??"GET").toUpperCase(),J=typeof Q==="string"?Q:Q instanceof URL?Q.href:Q.url,Y=iXQ(),Z=nXQ(B),X=Date.now();try{let G=await globalThis.fetch(Q,B);return hOA({url:J,method:$,status:G.status,ok:G.ok,durationMs:Date.now()-X,source:Y,apikey:Z}),G}catch(G){throw hOA({url:J,method:$,status:0,ok:!1,durationMs:Date.now()-X,source:Y,apikey:Z,error:G}),G}}}var uOA,mOA=!1,dOA,pOA=5000;var UP=cA(()=>{uOA=new pXQ});import{homedir as aOA,platform as aXQ,release as oXQ}from"node:os";import{arch as rXQ,cwd as oOA,env as Iq,version as sXQ}from"node:process";function DK(A){return A==="1"||A?.toLowerCase()==="true"||A?.toLowerCase()==="yes"}function QGQ(){if(DK(Iq.CAPGO_DISABLE_TELEMETRY)||DK(Iq.CAPGO_DISABLE_POSTHOG))return;return Iq.CAPGO_CLI_POSTHOG_API_KEY?.trim()||Iq.POSTHOG_API_KEY?.trim()||eXQ}function BGQ(A){let Q=A.replace(/\/+$/,"");if(Q.endsWith("/i/v0/e"))return`${Q}/`;let B=Q.replace(/\/capture$/,"/");return new URL("i/v0/e/",B.endsWith("/")?B:`${B}/`).toString()}function $GQ(A){if(A instanceof Error)return{cause:A.cause,message:A.message,name:A.name||"Error",stack:A.stack};if(typeof A==="string")return{message:A,name:"Error",stack:void 0};try{return{message:JSON.stringify(A)??String(A),name:"Error",stack:void 0}}catch{return{message:String(A),name:"Error",stack:void 0}}}function JGQ(A){let Q=A,B=oOA(),$=aOA();if(B)Q=Q.replaceAll(B,"<cwd>");if($)Q=Q.replaceAll($,"~");return Q}function YGQ(A){let Q=A,B=oOA(),$=aOA();if(B)Q=Q.replaceAll(B,"<cwd>");if($)Q=Q.replaceAll($,"~");return Q.replace(/<cwd>\/[^\s"',)]+/g,"<cwd>/<path>").replace(/~\/[^\s"',)]+/g,"~/<path>").replace(/[\w.%+-]+@[\w.-]+\.[A-Z]{2,}/gi,"<email>").replace(/(https?:\/\/)([^/\s:@]+):([^/\s@]+)@/gi,"$1<redacted>@").replace(/\b[a-z][\w-]*(?:\.[\w-]+){2,}\b/gi,"<app_id>").replace(/\b[a-z]:\\[^\s"',)]+/gi,"<path>").replace(/(^|[\s"'(])\/[^\s"',)]+/g,"$1<path>").replace(/(--(?:token|api[-_]?key|key|password|secret|private[-_]?key|jwt|session|auth)(?:=|\s+))("[^"]+"|'[^']+'|\S+)/gi,"$1<redacted>").replace(/\b((?:token|api[-_]?key|password|secret|authorization)\s*[:=]\s*)[^\s,;]+/gi,"$1<redacted>")}function ZGQ(A,Q){let B=A?.split(`
71
71
  `).slice(1).map(($)=>{let J=$.trim(),Y=J.startsWith("at ")?J.slice(3):J,Z=Q,X=Y,G=Y.lastIndexOf(" (");if(G!==-1&&Y.endsWith(")"))Z=Y.slice(0,G).trim()||Q,X=Y.slice(G+2,-1);else{let F=Y.lastIndexOf(" "),U=F===-1?"":Y.slice(F+1);if(/:\d+:\d+$/.test(U))Z=Y.slice(0,F).trim()||Q,X=U}let K=X.lastIndexOf(":"),W=K===-1?-1:X.lastIndexOf(":",K-1);if(K===-1||W===-1)return{function:Q,platform:"custom",lang:"javascript"};return{function:Z,filename:JGQ(X.slice(0,W)),lineno:Number.parseInt(X.slice(W+1,K),10),colno:Number.parseInt(X.slice(K+1),10),platform:"custom",lang:"javascript"}}).filter(Boolean);return B&&B.length>0?B:[{function:Q,platform:"custom",lang:"javascript"}]}function XGQ(A){if(!A||typeof A!=="object"||!("code"in A))return;let{code:Q}=A;return typeof Q==="string"?Q:void 0}function rOA(A){return!XGQ(A)?.startsWith("commander.")}function Bu(A){let Q=[],B=A;while(B?.parent){let $=B.name();if($)Q.push($);B=B.parent}return Q.reverse().join(" ")||"unknown"}async function zBA(A){let Q=QGQ();if(!Q)return!1;let B=Iq.CAPGO_CLI_POSTHOG_API_HOST?.trim()||Iq.POSTHOG_API_HOST?.trim()||tXQ,$;try{$=BGQ(B)}catch{return!1}let J=$GQ(A.error),Y=YGQ(J.message),Z=`cli:${O$.version}:${A.functionName}`,X=ZGQ(J.stack,A.functionName),G=X[0],K=[Z,A.kind,J.name||"Error",G?.function||A.functionName,G&&"filename"in G?G.filename:"unknown",String(A.status??1)].join(":"),W={token:Q,event:"$exception",properties:{distinct_id:Z,$exception_list:[{type:J.name||"Error",value:Y,mechanism:{handled:!0,synthetic:!1},stacktrace:{type:"raw",frames:X}}],$exception_fingerprint:K,architecture:rXQ,cli_version:O$.version,error_kind:A.kind,function_name:A.functionName,is_ci:Boolean(Iq.CI),node_version:sXQ,os_platform:aXQ(),os_release:oXQ(),runtime:"cli",status:A.status},timestamp:new Date().toISOString()};try{let F=new AbortController,U=setTimeout(()=>F.abort(),AGQ);try{return(await fetch($,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(W),signal:F.signal})).ok}finally{clearTimeout(U)}}catch{return!1}}var tXQ="https://eu.i.posthog.com/i/v0/e/",eXQ="phc_NXDyDajQaTQVwb25DEhIVZfxVUn4R0Y348Z7vWYHZUi",AGQ=1500;var zP=cA(()=>{lX()});import{existsSync as s7}from"fs";var lU=(A=".",Q="unknown")=>{let B=`${A}/bun.lockb`,$=`${A}/bun.lock`,J=`${A}/pnpm-lock.yaml`,Y=`${A}/shrinkwrap.yaml`,Z=`${A}/yarn.lock`,X=`${A}/package-lock.json`,G=`${A}/npm-shrinkwrap.json`;if(s7(B)||s7($))return"bun";if(s7(J)||s7(Y))return"pnpm";if(s7(Z))return"yarn";if(s7(X)||s7(G))return"npm";return Q},$u=(A=lU(),Q=!1)=>{switch(A){case"bun":return Q?"bun install":"install";case"pnpm":return Q?"pnpm install":"install";case"yarn":return Q?"yarn install":"install";case"npm":return Q?"npm install":"install";case"unknown":return Q?"unknown unknown":"unknown";default:return Q?"npm install":"install"}},sOA=(A=".",Q="npx")=>{let B=`${A}/bun.lockb`,$=`${A}/bun.lock`,J=`${A}/pnpm-lock.yaml`,Y=`${A}/shrinkwrap.yaml`,Z=`${A}/yarn.lock`,X=`${A}/package-lock.json`,G=`${A}/npm-shrinkwrap.json`;if(s7(B)||s7($))return"bunx";if(s7(J)||s7(Y))return"pnpm exec";if(s7(Z))return"yarn dlx";if(s7(X)||s7(G))return"npx";return Q};var IBA=()=>{};function Ju(A,Q){if(isNaN(A)||isNaN(Q))throw Error("Cannot compare against non-numbers");return A===Q?0:A<Q?-1:1}function AMA(A=[],Q=[]){if(A.length&&!Q.length)return-1;if(!A.length&&Q.length)return 1;return 0}function Yu(A=[],Q=[]){let B=Math.max(A.length,Q.length);for(let $=0;$<B;$++){let J=A[$],Y=Q[$];if(J===void 0&&Y===void 0)return 0;if(Y===void 0)return 1;if(J===void 0)return-1;if(typeof J==="string"&&typeof Y==="number")return 1;if(typeof J==="number"&&typeof Y==="string")return-1;if(J<Y)return-1;if(J>Y)return 1}return 0}function CBA(A){return typeof A==="number"&&!Number.isNaN(A)&&(!Number.isFinite(A)||0<=A&&A<=Number.MAX_SAFE_INTEGER)}function t7(A){return A.split(".").filter(Boolean).map((Q)=>{if(HGQ.test(Q)){let B=Number(Q);if(CBA(B))return B}return Q})}function hW(A){return A.split(".").filter(Boolean)}function Xu(A,Q){let B=Number(A);if(!CBA(B))throw TypeError(Q);return B}function YF(A){return Number.isNaN(A.major)&&Number.isNaN(A.minor)&&Number.isNaN(A.patch)&&(A.prerelease===void 0||A.prerelease.length===0)&&(A.build===void 0||A.build.length===0)}var kL="0|[1-9]\\d*",GGQ="\\d*[a-zA-Z-][a-zA-Z0-9-]*",KGQ,tOA,QMA,eOA="[0-9A-Za-z-]+",BMA,$MA,JMA,YMA="(?:<|>)?=?",WGQ="x|X|\\*",qBA,Zu,ZMA,XMA,OBA=256,HGQ;var nZ=cA(()=>{KGQ=`(?<major>${kL})\\.(?<minor>${kL})\\.(?<patch>${kL})`,tOA=`(?:${kL}|${GGQ})`,QMA=`(?:-(?<prerelease>${tOA}(?:\\.${tOA})*))`,BMA=`(?:\\+(?<buildmetadata>${eOA}(?:\\.${eOA})*))`,$MA=`v?${KGQ}${QMA}?${BMA}?`,JMA=new RegExp(`^${$MA}$`),qBA=`${kL}|${WGQ}`,Zu=`[v=\\s]*(?<major>${qBA})(?:\\.(?<minor>${qBA})(?:\\.(?<patch>${qBA})${QMA}?${BMA}?)?)?`,ZMA=new RegExp(`^(?<operator>~>?|\\^|${YMA})\\s*${Zu}$`),XMA=new RegExp(`^(?<operator>${YMA})\\s*(${$MA})$|^$`);HGQ=new RegExp(`^${kL}$`)});function lY(A,Q){if(A===Q)return 0;return Ju(A.major,Q.major)||Ju(A.minor,Q.minor)||Ju(A.patch,Q.patch)||AMA(A.prerelease,Q.prerelease)||Yu(A.prerelease,Q.prerelease)}var pX=cA(()=>{nZ()});function GMA(A,Q){let B=A.prerelease?.length||Q.prerelease?.length;if(A.major!==Q.major)return B?"premajor":"major";if(A.minor!==Q.minor)return B?"preminor":"minor";if(A.patch!==Q.patch)return B?"prepatch":"patch";if(Yu(A.prerelease,Q.prerelease)!==0)return"prerelease"}var KMA=cA(()=>{nZ()});function MBA(A){return A.toFixed(0)}function L5(A){let Q=MBA(A.major),B=MBA(A.minor),$=MBA(A.patch),J=A.prerelease?.join(".")??"",Y=A.build?.join(".")??"";return[[`${Q}.${B}.${$}`,J].filter((G)=>G).join("-"),Y].filter((G)=>G).join("+")}function FGQ(A,Q){if(YF(Q))return!0;let B=lY(A,Q);switch(Q.operator){case"=":case void 0:return B===0;case"!=":return B!==0;case">":return B>0;case"<":return B<0;case">=":return B>=0;case"<=":return B<=0}}function Gu(A,Q){for(let B of Q)if(!FGQ(A,B))return!1;if(!A.prerelease?.length)return!0;for(let B of Q){if(YF(B))continue;if(!B.prerelease?.length)continue;let{major:$,minor:J,patch:Y}=B;if(A.major===$&&A.minor===J&&A.patch===Y)return!0}return!1}var Ku=cA(()=>{nZ();pX()});function IP(A,Q){return Q.some((B)=>Gu(A,B))}var qP=cA(()=>{Ku()});function DGQ(A=[]){let Q=[...A],B=Q.length;while(B>=0){let $=Q[B];if(typeof $==="number"){Q[B]=$+1;break}B-=1}if(B===-1)Q.push(0);return Q}function CP(A=[],Q){let B=DGQ(A);if(!Q)return B;let $=t7(Q);if($.every((J)=>typeof J==="string")){if($.every((J,Y)=>J===B[Y])&&typeof B[$.length]==="number")return B;$=[...$,0]}return $}function pU(A,Q,B={}){let $=B.build!==void 0?hW(B.build):A.build??[];switch(Q){case"premajor":return{major:A.major+1,minor:0,patch:0,prerelease:CP(A.prerelease,B.prerelease),build:$};case"preminor":return{major:A.major,minor:A.minor+1,patch:0,prerelease:CP(A.prerelease,B.prerelease),build:$};case"prepatch":return{major:A.major,minor:A.minor,patch:A.patch+1,prerelease:CP(A.prerelease,B.prerelease),build:$};case"prerelease":{let Y=(A.prerelease??[]).length===0?A.patch+1:A.patch;return{major:A.major,minor:A.minor,patch:Y,prerelease:CP(A.prerelease,B.prerelease),build:$}}case"major":return{major:(A.prerelease??[]).length===0||A.minor!==0||A.patch!==0?A.major+1:A.major,minor:0,patch:0,prerelease:[],build:$};case"minor":{let Y=(A.prerelease??[]).length===0||A.patch!==0?A.minor+1:A.minor;return{major:A.major,minor:Y,patch:0,prerelease:[],build:$}}case"patch":{let Y=(A.prerelease??[]).length===0?A.patch+1:A.patch;return{major:A.major,minor:A.minor,patch:Y,prerelease:[],build:$}}case"pre":return{major:A.major,minor:A.minor,patch:A.patch,prerelease:CP(A.prerelease,B.prerelease),build:$};default:throw TypeError(`Cannot increment version: invalid argument ${Q}`)}}var WMA=cA(()=>{nZ()});var Wu,SL;var OP=cA(()=>{Wu={major:Number.NaN,minor:Number.NaN,patch:Number.NaN,prerelease:[],build:[]},SL={operator:void 0,...Wu}});var LBA=cA(()=>{OP();nZ()});function NBA(A,Q){return lY(A,Q)>0}var VBA=cA(()=>{pX()});var HMA=cA(()=>{qP();VBA()});function aZ(A,Q){return lY(A,Q)<0}var EBA=cA(()=>{pX()});var FMA=cA(()=>{qP();EBA()});function UGQ(A){let B=A.match(XMA)?.groups;if(!B)return null;let{operator:$}=B;return{operator:$||void 0,...Wu}}function x$(A){return!A||A.toLowerCase()==="x"||A==="*"}function zGQ(A){if(x$(A.major))return;if(x$(A.minor))return{operator:">=",major:+A.major,minor:0,patch:0,prerelease:[],build:[]};if(x$(A.patch))return{operator:">=",major:+A.major,minor:+A.minor,patch:0,prerelease:[],build:[]};return{operator:">=",major:+A.major,minor:+A.minor,patch:+A.patch,prerelease:A.prerelease?t7(A.prerelease):[],build:[]}}function IGQ(A){if(x$(A.major))return;if(x$(A.minor))return{operator:"<",major:+A.major+1,minor:0,patch:0,prerelease:[],build:[]};if(x$(A.patch))return{operator:"<",major:+A.major,minor:+A.minor+1,patch:0,prerelease:[],build:[]};if(A.prerelease)return{operator:"<=",major:+A.major,minor:+A.minor,patch:+A.patch,prerelease:t7(A.prerelease),build:[]};return{operator:"<=",major:+A.major,minor:+A.minor,patch:+A.patch,prerelease:[],build:[]}}function qGQ(A){let Q=A.match(new RegExp(`^${Zu}`)),B=Q?.groups;if(!B)return null;let $=Q[0].length,J=A.slice($).match(/^\s+-\s+/);if(!J)return null;let Y=J[0].length,X=A.slice($+Y).match(new RegExp(`^${Zu}\\s*$`))?.groups,G=zGQ(B),K=IGQ(X);return[G,K].filter(Boolean)}function CGQ(A){let Q=x$(A.major),B=x$(A.minor),$=x$(A.patch),J=+A.major,Y=+A.minor,Z=+A.patch;if(Q)return[SL];if(B)return[{operator:">=",major:J,minor:0,patch:0},{operator:"<",major:J+1,minor:0,patch:0}];if($){if(J===0)return[{operator:">=",major:J,minor:Y,patch:0},{operator:"<",major:J,minor:Y+1,patch:0}];return[{operator:">=",major:J,minor:Y,patch:0},{operator:"<",major:J+1,minor:0,patch:0}]}let X=t7(A.prerelease??"");if(J===0){if(Y===0)return[{operator:">=",major:J,minor:Y,patch:Z,prerelease:X},{operator:"<",major:J,minor:Y,patch:Z+1}];return[{operator:">=",major:J,minor:Y,patch:Z,prerelease:X},{operator:"<",major:J,minor:Y+1,patch:0}]}return[{operator:">=",major:J,minor:Y,patch:Z,prerelease:X},{operator:"<",major:J+1,minor:0,patch:0}]}function OGQ(A){let Q=x$(A.major),B=x$(A.minor),$=x$(A.patch),J=+A.major,Y=+A.minor,Z=+A.patch;if(Q)return[SL];if(B)return[{operator:">=",major:J,minor:0,patch:0},{operator:"<",major:J+1,minor:0,patch:0}];if($)return[{operator:">=",major:J,minor:Y,patch:0},{operator:"<",major:J,minor:Y+1,patch:0}];let X=t7(A.prerelease??"");return[{operator:">=",major:J,minor:Y,patch:Z,prerelease:X},{operator:"<",major:J,minor:Y+1,patch:0}]}function MGQ(A){let Q=x$(A.major),B=x$(A.minor),$=x$(A.patch),J=+A.major,Y=+A.minor,Z=+A.patch;if(Q)return[{operator:"<",major:0,minor:0,patch:0}];if(B){if($)return[{operator:"<",major:J,minor:0,patch:0}];return[{operator:"<",major:J,minor:0,patch:0}]}if($)return[{operator:"<",major:J,minor:Y,patch:0}];let X=t7(A.prerelease??""),G=hW(A.build??"");return[{operator:"<",major:J,minor:Y,patch:Z,prerelease:X,build:G}]}function LGQ(A){let Q=x$(A.minor),B=x$(A.patch),$=+A.major,J=+A.minor,Y=+A.patch;if(Q)return[{operator:"<",major:$+1,minor:0,patch:0}];if(B)return[{operator:"<",major:$,minor:J+1,patch:0}];let Z=t7(A.prerelease??""),X=hW(A.build??"");return[{operator:"<=",major:$,minor:J,patch:Y,prerelease:Z,build:X}]}function NGQ(A){let Q=x$(A.major),B=x$(A.minor),$=x$(A.patch),J=+A.major,Y=+A.minor,Z=+A.patch;if(Q)return[{operator:"<",major:0,minor:0,patch:0}];if(B)return[{operator:">=",major:J+1,minor:0,patch:0}];if($)return[{operator:">=",major:J,minor:Y+1,patch:0}];let X=t7(A.prerelease??""),G=hW(A.build??"");return[{operator:">",major:J,minor:Y,patch:Z,prerelease:X,build:G}]}function VGQ(A){let Q=x$(A.major),B=x$(A.minor),$=x$(A.patch),J=+A.major,Y=+A.minor,Z=+A.patch;if(Q)return[SL];if(B)return[{operator:">=",major:J,minor:0,patch:0}];if($)return[{operator:">=",major:J,minor:Y,patch:0}];let X=t7(A.prerelease??""),G=hW(A.build??"");return[{operator:">=",major:J,minor:Y,patch:Z,prerelease:X,build:G}]}function EGQ(A){let Q=x$(A.major),B=x$(A.minor),$=x$(A.patch),J=+A.major,Y=+A.minor,Z=+A.patch;if(Q)return[SL];if(B)return[{operator:">=",major:J,minor:0,patch:0},{operator:"<",major:J+1,minor:0,patch:0}];if($)return[{operator:">=",major:J,minor:Y,patch:0},{operator:"<",major:J,minor:Y+1,patch:0}];let X=t7(A.prerelease??""),G=hW(A.build??"");return[{operator:A.operator==="="?"=":void 0,major:J,minor:Y,patch:Z,prerelease:X,build:G}]}function RGQ(A){let Q=A.match(ZMA)?.groups;if(!Q)return UGQ(A);switch(Q.operator){case"^":return CGQ(Q);case"~":case"~>":return OGQ(Q);case"<":return MGQ(Q);case"<=":return LGQ(Q);case">":return NGQ(Q);case">=":return VGQ(Q);default:return EGQ(Q)}}function jGQ(A){return A.split(/\s+/).flatMap(RGQ)}function Hu(A){let Q=A.replaceAll(/(?<=[<>=~^])(\s+)/g,"").split(/\s*\|\|\s*/).map((B)=>qGQ(B)||jGQ(B));if(Q.some((B)=>B.includes(null)))throw TypeError(`Cannot parse version range: range "${A}" is invalid`);return Q}var RBA=cA(()=>{nZ();OP()});function O1(A){if(typeof A!=="string")throw TypeError(`Cannot parse version as version must be a string: received ${typeof A}`);if(A.length>OBA)throw TypeError(`Cannot parse version as version length is too long: length is ${A.length}, max length is ${OBA}`);A=A.trim();let Q=A.match(JMA)?.groups;if(!Q)throw TypeError(`Cannot parse version: ${A}`);let B=Xu(Q.major,`Cannot parse version ${A}: invalid major version`),$=Xu(Q.minor,`Cannot parse version ${A}: invalid minor version`),J=Xu(Q.patch,`Cannot parse version ${A}: invalid patch version`),Y=Q.prerelease?t7(Q.prerelease):[],Z=Q.buildmetadata?hW(Q.buildmetadata):[];return{major:B,minor:$,patch:J,prerelease:Y,build:Z}}var Fu=cA(()=>{nZ();nZ()});function DMA(A,Q){let B=A.operator,$=Q.operator;if(B===void 0){if(YF(A))return!0;return IP(A,[[Q]])}if($===void 0){if(YF(Q))return!0;return IP(Q,[[A]])}let J=lY(A,Q);return(B===">="||B===">")&&($===">="||$===">")||(B==="<="||B==="<")&&($==="<="||$==="<")||J===0&&((B===">="||B==="<=")&&($===">="||$==="<="))||J===-1&&(B===">="||B===">")&&($==="<="||$==="<")||J===1&&(B==="<="||B==="<")&&($===">="||$===">")}function wGQ(A){return A.every((Q)=>{return Q.some((B)=>PGQ(B))})}function PGQ(A){for(let Q=0;Q<A.length-1;Q++){let B=A[Q];for(let $ of A.slice(Q+1))if(!DMA(B,$))return!1}return!0}function UMA(A,Q){return wGQ([A,Q])&&A.some((B)=>{return Q.some(($)=>{return B.every((J)=>{return $.every((Y)=>DMA(J,Y))})})})}var zMA=cA(()=>{nZ();pX();qP()});var IMA=cA(()=>{RBA()});var qMA=cA(()=>{OP();OP();LBA()});function MP(A){try{return O1(A),!0}catch{return!1}}var CMA=cA(()=>{Fu()});var OMA=cA(()=>{Fu()});var MMA=cA(()=>{nZ()});var LMA=cA(()=>{pX()});var NMA=cA(()=>{pX()});var VMA=cA(()=>{Ku();nZ();pX()});function jBA(A,Q){return lY(A,Q)>=0}var EMA=cA(()=>{pX()});var RMA=cA(()=>{Ku();nZ();pX()});var jMA=cA(()=>{pX()});var UK=cA(()=>{pX();KMA();qP();WMA();LBA();HMA();FMA();RBA();Fu();zMA();IMA();qMA();CMA();OMA();MMA();LMA();NMA();VBA();VMA();EMA();EBA();RMA();jMA()});var e7=FA((mz0,zu)=>{var wMA,PMA,_MA,TMA,kMA,SMA,xMA,bMA,fMA,vMA,yMA,gMA,hMA,Du,wBA,uMA,mMA,cMA,xL,dMA,lMA,pMA,iMA,nMA,aMA,oMA,rMA,sMA,Uu,tMA,eMA,ALA;(function(A){var Q=typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:{};if(typeof define==="function"&&define.amd)define("tslib",["exports"],function($){A(B(Q,B($)))});else if(typeof zu==="object"&&typeof mz0==="object")A(B(Q,B(mz0)));else A(B(Q));function B($,J){if($!==Q)if(typeof Object.create==="function")Object.defineProperty($,"__esModule",{value:!0});else $.__esModule=!0;return function(Y,Z){return $[Y]=J?J(Y,Z):Z}}})(function(A){var Q=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Y,Z){Y.__proto__=Z}||function(Y,Z){for(var X in Z)if(Object.prototype.hasOwnProperty.call(Z,X))Y[X]=Z[X]};wMA=function(Y,Z){if(typeof Z!=="function"&&Z!==null)throw TypeError("Class extends value "+String(Z)+" is not a constructor or null");Q(Y,Z);function X(){this.constructor=Y}Y.prototype=Z===null?Object.create(Z):(X.prototype=Z.prototype,new X)},PMA=Object.assign||function(Y){for(var Z,X=1,G=arguments.length;X<G;X++){Z=arguments[X];for(var K in Z)if(Object.prototype.hasOwnProperty.call(Z,K))Y[K]=Z[K]}return Y},_MA=function(Y,Z){var X={};for(var G in Y)if(Object.prototype.hasOwnProperty.call(Y,G)&&Z.indexOf(G)<0)X[G]=Y[G];if(Y!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var K=0,G=Object.getOwnPropertySymbols(Y);K<G.length;K++)if(Z.indexOf(G[K])<0&&Object.prototype.propertyIsEnumerable.call(Y,G[K]))X[G[K]]=Y[G[K]]}return X},TMA=function(Y,Z,X,G){var K=arguments.length,W=K<3?Z:G===null?G=Object.getOwnPropertyDescriptor(Z,X):G,F;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")W=Reflect.decorate(Y,Z,X,G);else for(var U=Y.length-1;U>=0;U--)if(F=Y[U])W=(K<3?F(W):K>3?F(Z,X,W):F(Z,X))||W;return K>3&&W&&Object.defineProperty(Z,X,W),W},kMA=function(Y,Z){return function(X,G){Z(X,G,Y)}},SMA=function(Y,Z,X,G,K,W){function F(j){if(j!==void 0&&typeof j!=="function")throw TypeError("Function expected");return j}var U=G.kind,I=U==="getter"?"get":U==="setter"?"set":"value",z=!Z&&Y?G.static?Y:Y.prototype:null,q=Z||(z?Object.getOwnPropertyDescriptor(z,G.name):{}),C,N=!1;for(var V=X.length-1;V>=0;V--){var M={};for(var L in G)M[L]=L==="access"?{}:G[L];for(var L in G.access)M.access[L]=G.access[L];M.addInitializer=function(j){if(N)throw TypeError("Cannot add initializers after decoration has completed");W.push(F(j||null))};var R=(0,X[V])(U==="accessor"?{get:q.get,set:q.set}:q[I],M);if(U==="accessor"){if(R===void 0)continue;if(R===null||typeof R!=="object")throw TypeError("Object expected");if(C=F(R.get))q.get=C;if(C=F(R.set))q.set=C;if(C=F(R.init))K.unshift(C)}else if(C=F(R))if(U==="field")K.unshift(C);else q[I]=C}if(z)Object.defineProperty(z,G.name,q);N=!0},xMA=function(Y,Z,X){var G=arguments.length>2;for(var K=0;K<Z.length;K++)X=G?Z[K].call(Y,X):Z[K].call(Y);return G?X:void 0},bMA=function(Y){return typeof Y==="symbol"?Y:"".concat(Y)},fMA=function(Y,Z,X){if(typeof Z==="symbol")Z=Z.description?"[".concat(Z.description,"]"):"";return Object.defineProperty(Y,"name",{configurable:!0,value:X?"".concat(X," ",Z):Z})},vMA=function(Y,Z){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(Y,Z)},yMA=function(Y,Z,X,G){function K(W){return W instanceof X?W:new X(function(F){F(W)})}return new(X||(X=Promise))(function(W,F){function U(q){try{z(G.next(q))}catch(C){F(C)}}function I(q){try{z(G.throw(q))}catch(C){F(C)}}function z(q){q.done?W(q.value):K(q.value).then(U,I)}z((G=G.apply(Y,Z||[])).next())})},gMA=function(Y,Z){var X={label:0,sent:function(){if(W[0]&1)throw W[1];return W[1]},trys:[],ops:[]},G,K,W,F=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return F.next=U(0),F.throw=U(1),F.return=U(2),typeof Symbol==="function"&&(F[Symbol.iterator]=function(){return this}),F;function U(z){return function(q){return I([z,q])}}function I(z){if(G)throw TypeError("Generator is already executing.");while(F&&(F=0,z[0]&&(X=0)),X)try{if(G=1,K&&(W=z[0]&2?K.return:z[0]?K.throw||((W=K.return)&&W.call(K),0):K.next)&&!(W=W.call(K,z[1])).done)return W;if(K=0,W)z=[z[0]&2,W.value];switch(z[0]){case 0:case 1:W=z;break;case 4:return X.label++,{value:z[1],done:!1};case 5:X.label++,K=z[1],z=[0];continue;case 7:z=X.ops.pop(),X.trys.pop();continue;default:if((W=X.trys,!(W=W.length>0&&W[W.length-1]))&&(z[0]===6||z[0]===2)){X=0;continue}if(z[0]===3&&(!W||z[1]>W[0]&&z[1]<W[3])){X.label=z[1];break}if(z[0]===6&&X.label<W[1]){X.label=W[1],W=z;break}if(W&&X.label<W[2]){X.label=W[2],X.ops.push(z);break}if(W[2])X.ops.pop();X.trys.pop();continue}z=Z.call(Y,X)}catch(q){z=[6,q],K=0}finally{G=W=0}if(z[0]&5)throw z[1];return{value:z[0]?z[1]:void 0,done:!0}}},hMA=function(Y,Z){for(var X in Y)if(X!=="default"&&!Object.prototype.hasOwnProperty.call(Z,X))Uu(Z,Y,X)},Uu=Object.create?function(Y,Z,X,G){if(G===void 0)G=X;var K=Object.getOwnPropertyDescriptor(Z,X);if(!K||("get"in K?!Z.__esModule:K.writable||K.configurable))K={enumerable:!0,get:function(){return Z[X]}};Object.defineProperty(Y,G,K)}:function(Y,Z,X,G){if(G===void 0)G=X;Y[G]=Z[X]},Du=function(Y){var Z=typeof Symbol==="function"&&Symbol.iterator,X=Z&&Y[Z],G=0;if(X)return X.call(Y);if(Y&&typeof Y.length==="number")return{next:function(){if(Y&&G>=Y.length)Y=void 0;return{value:Y&&Y[G++],done:!Y}}};throw TypeError(Z?"Object is not iterable.":"Symbol.iterator is not defined.")},wBA=function(Y,Z){var X=typeof Symbol==="function"&&Y[Symbol.iterator];if(!X)return Y;var G=X.call(Y),K,W=[],F;try{while((Z===void 0||Z-- >0)&&!(K=G.next()).done)W.push(K.value)}catch(U){F={error:U}}finally{try{if(K&&!K.done&&(X=G.return))X.call(G)}finally{if(F)throw F.error}}return W},uMA=function(){for(var Y=[],Z=0;Z<arguments.length;Z++)Y=Y.concat(wBA(arguments[Z]));return Y},mMA=function(){for(var Y=0,Z=0,X=arguments.length;Z<X;Z++)Y+=arguments[Z].length;for(var G=Array(Y),K=0,Z=0;Z<X;Z++)for(var W=arguments[Z],F=0,U=W.length;F<U;F++,K++)G[K]=W[F];return G},cMA=function(Y,Z,X){if(X||arguments.length===2){for(var G=0,K=Z.length,W;G<K;G++)if(W||!(G in Z)){if(!W)W=Array.prototype.slice.call(Z,0,G);W[G]=Z[G]}}return Y.concat(W||Array.prototype.slice.call(Z))},xL=function(Y){return this instanceof xL?(this.v=Y,this):new xL(Y)},dMA=function(Y,Z,X){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var G=X.apply(Y,Z||[]),K,W=[];return K=Object.create((typeof AsyncIterator==="function"?AsyncIterator:Object).prototype),U("next"),U("throw"),U("return",F),K[Symbol.asyncIterator]=function(){return this},K;function F(V){return function(M){return Promise.resolve(M).then(V,C)}}function U(V,M){if(G[V]){if(K[V]=function(L){return new Promise(function(R,j){W.push([V,L,R,j])>1||I(V,L)})},M)K[V]=M(K[V])}}function I(V,M){try{z(G[V](M))}catch(L){N(W[0][3],L)}}function z(V){V.value instanceof xL?Promise.resolve(V.value.v).then(q,C):N(W[0][2],V)}function q(V){I("next",V)}function C(V){I("throw",V)}function N(V,M){if(V(M),W.shift(),W.length)I(W[0][0],W[0][1])}},lMA=function(Y){var Z,X;return Z={},G("next"),G("throw",function(K){throw K}),G("return"),Z[Symbol.iterator]=function(){return this},Z;function G(K,W){Z[K]=Y[K]?function(F){return(X=!X)?{value:xL(Y[K](F)),done:!1}:W?W(F):F}:W}},pMA=function(Y){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var Z=Y[Symbol.asyncIterator],X;return Z?Z.call(Y):(Y=typeof Du==="function"?Du(Y):Y[Symbol.iterator](),X={},G("next"),G("throw"),G("return"),X[Symbol.asyncIterator]=function(){return this},X);function G(W){X[W]=Y[W]&&function(F){return new Promise(function(U,I){F=Y[W](F),K(U,I,F.done,F.value)})}}function K(W,F,U,I){Promise.resolve(I).then(function(z){W({value:z,done:U})},F)}},iMA=function(Y,Z){if(Object.defineProperty)Object.defineProperty(Y,"raw",{value:Z});else Y.raw=Z;return Y};var B=Object.create?function(Y,Z){Object.defineProperty(Y,"default",{enumerable:!0,value:Z})}:function(Y,Z){Y.default=Z},$=function(Y){return $=Object.getOwnPropertyNames||function(Z){var X=[];for(var G in Z)if(Object.prototype.hasOwnProperty.call(Z,G))X[X.length]=G;return X},$(Y)};nMA=function(Y){if(Y&&Y.__esModule)return Y;var Z={};if(Y!=null){for(var X=$(Y),G=0;G<X.length;G++)if(X[G]!=="default")Uu(Z,Y,X[G])}return B(Z,Y),Z},aMA=function(Y){return Y&&Y.__esModule?Y:{default:Y}},oMA=function(Y,Z,X,G){if(X==="a"&&!G)throw TypeError("Private accessor was defined without a getter");if(typeof Z==="function"?Y!==Z||!G:!Z.has(Y))throw TypeError("Cannot read private member from an object whose class did not declare it");return X==="m"?G:X==="a"?G.call(Y):G?G.value:Z.get(Y)},rMA=function(Y,Z,X,G,K){if(G==="m")throw TypeError("Private method is not writable");if(G==="a"&&!K)throw TypeError("Private accessor was defined without a setter");if(typeof Z==="function"?Y!==Z||!K:!Z.has(Y))throw TypeError("Cannot write private member to an object whose class did not declare it");return G==="a"?K.call(Y,X):K?K.value=X:Z.set(Y,X),X},sMA=function(Y,Z){if(Z===null||typeof Z!=="object"&&typeof Z!=="function")throw TypeError("Cannot use 'in' operator on non-object");return typeof Y==="function"?Z===Y:Y.has(Z)},tMA=function(Y,Z,X){if(Z!==null&&Z!==void 0){if(typeof Z!=="object"&&typeof Z!=="function")throw TypeError("Object expected.");var G,K;if(X){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");G=Z[Symbol.asyncDispose]}if(G===void 0){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");if(G=Z[Symbol.dispose],X)K=G}if(typeof G!=="function")throw TypeError("Object not disposable.");if(K)G=function(){try{K.call(this)}catch(W){return Promise.reject(W)}};Y.stack.push({value:Z,dispose:G,async:X})}else if(X)Y.stack.push({async:!0});return Z};var J=typeof SuppressedError==="function"?SuppressedError:function(Y,Z,X){var G=Error(X);return G.name="SuppressedError",G.error=Y,G.suppressed=Z,G};eMA=function(Y){function Z(W){Y.error=Y.hasError?new J(W,Y.error,"An error was suppressed during disposal."):W,Y.hasError=!0}var X,G=0;function K(){while(X=Y.stack.pop())try{if(!X.async&&G===1)return G=0,Y.stack.push(X),Promise.resolve().then(K);if(X.dispose){var W=X.dispose.call(X.value);if(X.async)return G|=2,Promise.resolve(W).then(K,function(F){return Z(F),K()})}else G|=1}catch(F){Z(F)}if(G===1)return Y.hasError?Promise.reject(Y.error):Promise.resolve();if(Y.hasError)throw Y.error}return K()},ALA=function(Y,Z){if(typeof Y==="string"&&/^\.\.?\//.test(Y))return Y.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(X,G,K,W,F){return G?Z?".jsx":".js":K&&(!W||!F)?X:K+W+"."+F.toLowerCase()+"js"});return Y},A("__extends",wMA),A("__assign",PMA),A("__rest",_MA),A("__decorate",TMA),A("__param",kMA),A("__esDecorate",SMA),A("__runInitializers",xMA),A("__propKey",bMA),A("__setFunctionName",fMA),A("__metadata",vMA),A("__awaiter",yMA),A("__generator",gMA),A("__exportStar",hMA),A("__createBinding",Uu),A("__values",Du),A("__read",wBA),A("__spread",uMA),A("__spreadArrays",mMA),A("__spreadArray",cMA),A("__await",xL),A("__asyncGenerator",dMA),A("__asyncDelegator",lMA),A("__asyncValues",pMA),A("__makeTemplateObject",iMA),A("__importStar",nMA),A("__importDefault",aMA),A("__classPrivateFieldGet",oMA),A("__classPrivateFieldSet",rMA),A("__classPrivateFieldIn",sMA),A("__addDisposableResource",tMA),A("__disposeResources",eMA),A("__rewriteRelativeImportExtension",ALA)})});var $LA=FA((QLA)=>{Object.defineProperty(QLA,"__esModule",{value:!0});QLA.resolveFetch=void 0;var _GQ=(A)=>{if(A)return(...Q)=>A(...Q);return(...Q)=>fetch(...Q)};QLA.resolveFetch=_GQ});var PBA=FA((GLA)=>{Object.defineProperty(GLA,"__esModule",{value:!0});GLA.FunctionRegion=GLA.FunctionsHttpError=GLA.FunctionsRelayError=GLA.FunctionsFetchError=GLA.FunctionsError=void 0;class LP extends Error{constructor(A,Q="FunctionsError",B){super(A);this.name=Q,this.context=B}toJSON(){return{name:this.name,message:this.message,context:this.context}}}GLA.FunctionsError=LP;class YLA extends LP{constructor(A){super("Failed to send a request to the Edge Function","FunctionsFetchError",A)}}GLA.FunctionsFetchError=YLA;class ZLA extends LP{constructor(A){super("Relay Error invoking the Edge Function","FunctionsRelayError",A)}}GLA.FunctionsRelayError=ZLA;class XLA extends LP{constructor(A){super("Edge Function returned a non-2xx status code","FunctionsHttpError",A)}}GLA.FunctionsHttpError=XLA;var JLA;(function(A){A.Any="any",A.ApNortheast1="ap-northeast-1",A.ApNortheast2="ap-northeast-2",A.ApSouth1="ap-south-1",A.ApSoutheast1="ap-southeast-1",A.ApSoutheast2="ap-southeast-2",A.CaCentral1="ca-central-1",A.EuCentral1="eu-central-1",A.EuWest1="eu-west-1",A.EuWest2="eu-west-2",A.EuWest3="eu-west-3",A.SaEast1="sa-east-1",A.UsEast1="us-east-1",A.UsWest1="us-west-1",A.UsWest2="us-west-2"})(JLA||(GLA.FunctionRegion=JLA={}))});var DLA=FA((HLA)=>{Object.defineProperty(HLA,"__esModule",{value:!0});HLA.FunctionsClient=void 0;var bGQ=e7(),fGQ=$LA(),bL=PBA();class WLA{constructor(A,{headers:Q={},customFetch:B,region:$=bL.FunctionRegion.Any}={}){this.url=A,this.headers=Q,this.region=$,this.fetch=(0,fGQ.resolveFetch)(B)}setAuth(A){this.headers.Authorization=`Bearer ${A}`}invoke(A){return bGQ.__awaiter(this,arguments,void 0,function*(Q,B={}){var $,J;let Y,Z,X;try{let{headers:G,method:K,body:W,signal:F,timeout:U}=B,I={},{region:z}=B;if(!z)z=this.region;let q=new URL(`${this.url}/${Q}`);if(z&&z!=="any")I["x-region"]=z,q.searchParams.set("forceFunctionRegion",z);let C,N=!!G&&Object.keys(G).some((w)=>w.toLowerCase()==="content-type");if(W&&!N)if(typeof Blob<"u"&&W instanceof Blob||W instanceof ArrayBuffer)I["Content-Type"]="application/octet-stream",C=W;else if(typeof W==="string")I["Content-Type"]="text/plain",C=W;else if(typeof FormData<"u"&&W instanceof FormData)C=W;else I["Content-Type"]="application/json",C=JSON.stringify(W);else if(W&&typeof W!=="string"&&!(typeof Blob<"u"&&W instanceof Blob)&&!(W instanceof ArrayBuffer)&&!(typeof FormData<"u"&&W instanceof FormData))C=JSON.stringify(W);else C=W;let V=F;if(U)if(Z=new AbortController,Y=setTimeout(()=>Z.abort(),U),F)V=Z.signal,X=()=>Z.abort(),F.addEventListener("abort",X);else V=Z.signal;let M=yield this.fetch(q.toString(),{method:K||"POST",headers:Object.assign(Object.assign(Object.assign({},I),this.headers),G),body:C,signal:V}).catch((w)=>{throw new bL.FunctionsFetchError(w)}),L=M.headers.get("x-relay-error");if(L&&L==="true")throw new bL.FunctionsRelayError(M);if(!M.ok)throw new bL.FunctionsHttpError(M);let R=(($=M.headers.get("Content-Type"))!==null&&$!==void 0?$:"text/plain").split(";")[0].trim().toLowerCase(),j;if(R==="application/json")j=yield M.json();else if(R==="application/octet-stream"||R==="application/pdf")j=yield M.blob();else if(R==="text/event-stream")j=M;else if(R==="multipart/form-data")j=yield M.formData();else j=yield M.text();return{data:j,error:null,response:M}}catch(G){return{data:null,error:G,response:G instanceof bL.FunctionsHttpError||G instanceof bL.FunctionsRelayError?G.context:void 0}}finally{if(Y)clearTimeout(Y);if(X)(J=B.signal)===null||J===void 0||J.removeEventListener("abort",X)}})}}HLA.FunctionsClient=WLA});var ULA=FA((iU)=>{Object.defineProperty(iU,"__esModule",{value:!0});iU.FunctionRegion=iU.FunctionsRelayError=iU.FunctionsHttpError=iU.FunctionsFetchError=iU.FunctionsError=iU.FunctionsClient=void 0;var vGQ=DLA();Object.defineProperty(iU,"FunctionsClient",{enumerable:!0,get:function(){return vGQ.FunctionsClient}});var NP=PBA();Object.defineProperty(iU,"FunctionsError",{enumerable:!0,get:function(){return NP.FunctionsError}});Object.defineProperty(iU,"FunctionsFetchError",{enumerable:!0,get:function(){return NP.FunctionsFetchError}});Object.defineProperty(iU,"FunctionsHttpError",{enumerable:!0,get:function(){return NP.FunctionsHttpError}});Object.defineProperty(iU,"FunctionsRelayError",{enumerable:!0,get:function(){return NP.FunctionsRelayError}});Object.defineProperty(iU,"FunctionRegion",{enumerable:!0,get:function(){return NP.FunctionRegion}})});function ILA(A,Q){return new Promise((B)=>{if(Q===null||Q===void 0?void 0:Q.aborted){B();return}let $=setTimeout(()=>{Q===null||Q===void 0||Q.removeEventListener("abort",J),B()},A);function J(){clearTimeout($),B()}Q===null||Q===void 0||Q.addEventListener("abort",J)})}function hGQ(A,Q,B,$){if(!$||B>=3)return!1;if(!OLA.includes(A))return!1;if(!gGQ.includes(Q))return!1;return!0}function VP(A){return VP=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Q){return typeof Q}:function(Q){return Q&&typeof Symbol=="function"&&Q.constructor===Symbol&&Q!==Symbol.prototype?"symbol":typeof Q},VP(A)}function dGQ(A,Q){if(VP(A)!="object"||!A)return A;var B=A[Symbol.toPrimitive];if(B!==void 0){var $=B.call(A,Q||"default");if(VP($)!="object")return $;throw TypeError("@@toPrimitive must return a primitive value.")}return(Q==="string"?String:Number)(A)}function lGQ(A){var Q=dGQ(A,"string");return VP(Q)=="symbol"?Q:Q+""}function pGQ(A,Q,B){return(Q=lGQ(Q))in A?Object.defineProperty(A,Q,{value:B,enumerable:!0,configurable:!0,writable:!0}):A[Q]=B,A}function CLA(A,Q){var B=Object.keys(A);if(Object.getOwnPropertySymbols){var $=Object.getOwnPropertySymbols(A);Q&&($=$.filter(function(J){return Object.getOwnPropertyDescriptor(A,J).enumerable})),B.push.apply(B,$)}return B}function Iu(A){for(var Q=1;Q<arguments.length;Q++){var B=arguments[Q]!=null?arguments[Q]:{};Q%2?CLA(Object(B),!0).forEach(function($){pGQ(A,$,B[$])}):Object.getOwnPropertyDescriptors?Object.defineProperties(A,Object.getOwnPropertyDescriptors(B)):CLA(Object(B)).forEach(function($){Object.defineProperty(A,$,Object.getOwnPropertyDescriptor(B,$))})}return A}var zLA=(A)=>Math.min(1000*2**A,30000),gGQ,OLA,_BA,uGQ=class{constructor(A){var Q,B,$,J,Y;if(this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=A.method,this.url=A.url,this.headers=new Headers(A.headers),this.schema=A.schema,this.body=A.body,this.shouldThrowOnError=(Q=A.shouldThrowOnError)!==null&&Q!==void 0?Q:!1,this.signal=A.signal,this.isMaybeSingle=(B=A.isMaybeSingle)!==null&&B!==void 0?B:!1,this.shouldStripNulls=($=A.shouldStripNulls)!==null&&$!==void 0?$:!1,this.urlLengthLimit=(J=A.urlLengthLimit)!==null&&J!==void 0?J:8000,this.retryEnabled=(Y=A.retry)!==null&&Y!==void 0?Y:!0,A.fetch)this.fetch=A.fetch;else this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get("Accept")==="text/csv")throw Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(A,Q){return this.headers=new Headers(this.headers),this.headers.set(A,Q),this}retry(A){return this.retryEnabled=A,this}then(A,Q){var B=this;if(this.schema===void 0);else if(["GET","HEAD"].includes(this.method))this.headers.set("Accept-Profile",this.schema);else this.headers.set("Content-Profile",this.schema);if(this.method!=="GET"&&this.method!=="HEAD")this.headers.set("Content-Type","application/json");if(this.shouldStripNulls){let Z=this.headers.get("Accept");if(Z==="application/vnd.pgrst.object+json")this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped");else if(!Z||Z==="application/json")this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}let $=this.fetch,Y=(async()=>{let Z=0;while(!0){let K={};if(B.headers.forEach((F,U)=>{K[U]=F}),Z>0)K["X-Retry-Count"]=String(Z);let W;try{W=await $(B.url.toString(),{method:B.method,headers:K,body:JSON.stringify(B.body,(F,U)=>typeof U==="bigint"?U.toString():U),signal:B.signal})}catch(F){if((F===null||F===void 0?void 0:F.name)==="AbortError"||(F===null||F===void 0?void 0:F.code)==="ABORT_ERR")throw F;if(!OLA.includes(B.method))throw F;if(B.retryEnabled&&Z<3){let U=zLA(Z);Z++,await ILA(U,B.signal);continue}throw F}if(hGQ(B.method,W.status,Z,B.retryEnabled)){var X,G;let F=(X=(G=W.headers)===null||G===void 0?void 0:G.get("Retry-After"))!==null&&X!==void 0?X:null,U=F!==null?Math.max(0,parseInt(F,10)||0)*1000:zLA(Z);await W.text(),Z++,await ILA(U,B.signal);continue}return await B.processResponse(W)}})();if(!this.shouldThrowOnError)Y=Y.catch((Z)=>{var X;let G="",K="",W="",F=Z===null||Z===void 0?void 0:Z.cause;if(F){var U,I,z,q;let V=(U=F===null||F===void 0?void 0:F.message)!==null&&U!==void 0?U:"",M=(I=F===null||F===void 0?void 0:F.code)!==null&&I!==void 0?I:"";if(G=`${(z=Z===null||Z===void 0?void 0:Z.name)!==null&&z!==void 0?z:"FetchError"}: ${Z===null||Z===void 0?void 0:Z.message}`,G+=`
72
72
 
73
73
  Caused by: ${(q=F===null||F===void 0?void 0:F.name)!==null&&q!==void 0?q:"Error"}: ${V}`,M)G+=` (${M})`;if(F===null||F===void 0?void 0:F.stack)G+=`
package/dist/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capgo/cli",
3
3
  "type": "module",
4
- "version": "8.30.0",
4
+ "version": "8.31.0",
5
5
  "description": "A CLI to upload to capgo servers",
6
6
  "author": "Martin martin@capgo.app",
7
7
  "license": "Apache 2.0",
package/dist/src/sdk.js CHANGED
@@ -109,7 +109,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
109
109
  `)}),D.__defineSetter__("stack",function(J){return[J].concat(D.stack).join(`
110
110
 
111
111
  `)}),D}});var Jd=A(($L$,Dd)=>{var S9=a("constants"),sP0=process.cwd,b3=null,eP0=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){if(!b3)b3=sP0.call(process);return b3};try{process.cwd()}catch($){}if(typeof process.chdir==="function"){if(g3=process.chdir,process.chdir=function($){b3=null,g3.call(process,$)},Object.setPrototypeOf)Object.setPrototypeOf(process.chdir,g3)}var g3;Dd.exports=$S0;function $S0($){if(S9.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./))D($);if(!$.lutimes)J($);if($.chown=Y($.chown),$.fchown=Y($.fchown),$.lchown=Y($.lchown),$.chmod=X($.chmod),$.fchmod=X($.fchmod),$.lchmod=X($.lchmod),$.chownSync=Z($.chownSync),$.fchownSync=Z($.fchownSync),$.lchownSync=Z($.lchownSync),$.chmodSync=Q($.chmodSync),$.fchmodSync=Q($.fchmodSync),$.lchmodSync=Q($.lchmodSync),$.stat=F($.stat),$.fstat=F($.fstat),$.lstat=F($.lstat),$.statSync=U($.statSync),$.fstatSync=U($.fstatSync),$.lstatSync=U($.lstatSync),$.chmod&&!$.lchmod)$.lchmod=function(q,W,H){if(H)process.nextTick(H)},$.lchmodSync=function(){};if($.chown&&!$.lchown)$.lchown=function(q,W,H,z){if(z)process.nextTick(z)},$.lchownSync=function(){};if(eP0==="win32")$.rename=typeof $.rename!=="function"?$.rename:function(q){function W(H,z,O){var V=Date.now(),K=0;q(H,z,function M(E){if(E&&(E.code==="EACCES"||E.code==="EPERM"||E.code==="EBUSY")&&Date.now()-V<60000){if(setTimeout(function(){$.stat(z,function(N,w){if(N&&N.code==="ENOENT")q(H,z,M);else O(E)})},K),K<100)K+=10;return}if(O)O(E)})}if(Object.setPrototypeOf)Object.setPrototypeOf(W,q);return W}($.rename);$.read=typeof $.read!=="function"?$.read:function(q){function W(H,z,O,V,K,M){var E;if(M&&typeof M==="function"){var N=0;E=function(w,L,R){if(w&&w.code==="EAGAIN"&&N<10)return N++,q.call($,H,z,O,V,K,E);M.apply(this,arguments)}}return q.call($,H,z,O,V,K,E)}if(Object.setPrototypeOf)Object.setPrototypeOf(W,q);return W}($.read),$.readSync=typeof $.readSync!=="function"?$.readSync:function(q){return function(W,H,z,O,V){var K=0;while(!0)try{return q.call($,W,H,z,O,V)}catch(M){if(M.code==="EAGAIN"&&K<10){K++;continue}throw M}}}($.readSync);function D(q){q.lchmod=function(W,H,z){q.open(W,S9.O_WRONLY|S9.O_SYMLINK,H,function(O,V){if(O){if(z)z(O);return}q.fchmod(V,H,function(K){q.close(V,function(M){if(z)z(K||M)})})})},q.lchmodSync=function(W,H){var z=q.openSync(W,S9.O_WRONLY|S9.O_SYMLINK,H),O=!0,V;try{V=q.fchmodSync(z,H),O=!1}finally{if(O)try{q.closeSync(z)}catch(K){}else q.closeSync(z)}return V}}function J(q){if(S9.hasOwnProperty("O_SYMLINK")&&q.futimes)q.lutimes=function(W,H,z,O){q.open(W,S9.O_SYMLINK,function(V,K){if(V){if(O)O(V);return}q.futimes(K,H,z,function(M){q.close(K,function(E){if(O)O(M||E)})})})},q.lutimesSync=function(W,H,z){var O=q.openSync(W,S9.O_SYMLINK),V,K=!0;try{V=q.futimesSync(O,H,z),K=!1}finally{if(K)try{q.closeSync(O)}catch(M){}else q.closeSync(O)}return V};else if(q.futimes)q.lutimes=function(W,H,z,O){if(O)process.nextTick(O)},q.lutimesSync=function(){}}function X(q){if(!q)return q;return function(W,H,z){return q.call($,W,H,function(O){if(G(O))O=null;if(z)z.apply(this,arguments)})}}function Q(q){if(!q)return q;return function(W,H){try{return q.call($,W,H)}catch(z){if(!G(z))throw z}}}function Y(q){if(!q)return q;return function(W,H,z,O){return q.call($,W,H,z,function(V){if(G(V))V=null;if(O)O.apply(this,arguments)})}}function Z(q){if(!q)return q;return function(W,H,z){try{return q.call($,W,H,z)}catch(O){if(!G(O))throw O}}}function F(q){if(!q)return q;return function(W,H,z){if(typeof H==="function")z=H,H=null;function O(V,K){if(K){if(K.uid<0)K.uid+=4294967296;if(K.gid<0)K.gid+=4294967296}if(z)z.apply(this,arguments)}return H?q.call($,W,H,O):q.call($,W,O)}}function U(q){if(!q)return q;return function(W,H){var z=H?q.call($,W,H):q.call($,W);if(z){if(z.uid<0)z.uid+=4294967296;if(z.gid<0)z.gid+=4294967296}return z}}function G(q){if(!q)return!0;if(q.code==="ENOSYS")return!0;var W=!process.getuid||process.getuid()!==0;if(W){if(q.code==="EINVAL"||q.code==="EPERM")return!0}return!1}}});var Yd=A((DL$,Qd)=>{var Xd=a("stream").Stream;Qd.exports=DS0;function DS0($){return{ReadStream:D,WriteStream:J};function D(X,Q){if(!(this instanceof D))return new D(X,Q);Xd.call(this);var Y=this;this.path=X,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,Q=Q||{};var Z=Object.keys(Q);for(var F=0,U=Z.length;F<U;F++){var G=Z[F];this[G]=Q[G]}if(this.encoding)this.setEncoding(this.encoding);if(this.start!==void 0){if(typeof this.start!=="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!=="number")throw TypeError("end must be a Number");if(this.start>this.end)throw Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){Y._read()});return}$.open(this.path,this.flags,this.mode,function(q,W){if(q){Y.emit("error",q),Y.readable=!1;return}Y.fd=W,Y.emit("open",W),Y._read()})}function J(X,Q){if(!(this instanceof J))return new J(X,Q);Xd.call(this),this.path=X,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,Q=Q||{};var Y=Object.keys(Q);for(var Z=0,F=Y.length;Z<F;Z++){var U=Y[Z];this[U]=Q[U]}if(this.start!==void 0){if(typeof this.start!=="number")throw TypeError("start must be a Number");if(this.start<0)throw Error("start must be >= zero");this.pos=this.start}if(this.busy=!1,this._queue=[],this.fd===null)this._open=$.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush()}}});var Fd=A((JL$,Zd)=>{Zd.exports=XS0;var JS0=Object.getPrototypeOf||function($){return $.__proto__};function XS0($){if($===null||typeof $!=="object")return $;if($ instanceof Object)var D={__proto__:JS0($)};else var D=Object.create(null);return Object.getOwnPropertyNames($).forEach(function(J){Object.defineProperty(D,J,Object.getOwnPropertyDescriptor($,J))}),D}});var _1=A((XL$,tM)=>{var j1=a("fs"),QS0=Jd(),YS0=Yd(),ZS0=Fd(),m3=a("util"),GD,c3;if(typeof Symbol==="function"&&typeof Symbol.for==="function")GD=Symbol.for("graceful-fs.queue"),c3=Symbol.for("graceful-fs.previous");else GD="___graceful-fs.queue",c3="___graceful-fs.previous";function FS0(){}function Gd($,D){Object.defineProperty($,GD,{get:function(){return D}})}var FJ=FS0;if(m3.debuglog)FJ=m3.debuglog("gfs4");else if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))FJ=function(){var $=m3.format.apply(m3,arguments);$="GFS4: "+$.split(/\n/).join(`
112
- GFS4: `),console.error($)};if(!j1[GD]){if(pM=global[GD]||[],Gd(j1,pM),j1.close=function($){function D(J,X){return $.call(j1,J,function(Q){if(!Q)Ud();if(typeof X==="function")X.apply(this,arguments)})}return Object.defineProperty(D,c3,{value:$}),D}(j1.close),j1.closeSync=function($){function D(J){$.apply(j1,arguments),Ud()}return Object.defineProperty(D,c3,{value:$}),D}(j1.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))process.on("exit",function(){FJ(j1[GD]),a("assert").equal(j1[GD].length,0)})}var pM;if(!global[GD])Gd(global,j1[GD]);tM.exports=rM(ZS0(j1));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!j1.__patched)tM.exports=rM(j1),j1.__patched=!0;function rM($){QS0($),$.gracefulify=rM,$.createReadStream=L,$.createWriteStream=R;var D=$.readFile;$.readFile=J;function J(I,_,x){if(typeof _==="function")x=_,_=null;return c(I,_,x);function c(d,D0,h,j){return D(d,D0,function(C){if(C&&(C.code==="EMFILE"||C.code==="ENFILE"))OX([c,[d,D0,h],C,j||Date.now(),Date.now()]);else if(typeof h==="function")h.apply(this,arguments)})}}var X=$.writeFile;$.writeFile=Q;function Q(I,_,x,c){if(typeof x==="function")c=x,x=null;return d(I,_,x,c);function d(D0,h,j,C,u){return X(D0,h,j,function(g){if(g&&(g.code==="EMFILE"||g.code==="ENFILE"))OX([d,[D0,h,j,C],g,u||Date.now(),Date.now()]);else if(typeof C==="function")C.apply(this,arguments)})}}var Y=$.appendFile;if(Y)$.appendFile=Z;function Z(I,_,x,c){if(typeof x==="function")c=x,x=null;return d(I,_,x,c);function d(D0,h,j,C,u){return Y(D0,h,j,function(g){if(g&&(g.code==="EMFILE"||g.code==="ENFILE"))OX([d,[D0,h,j,C],g,u||Date.now(),Date.now()]);else if(typeof C==="function")C.apply(this,arguments)})}}var F=$.copyFile;if(F)$.copyFile=U;function U(I,_,x,c){if(typeof x==="function")c=x,x=0;return d(I,_,x,c);function d(D0,h,j,C,u){return F(D0,h,j,function(g){if(g&&(g.code==="EMFILE"||g.code==="ENFILE"))OX([d,[D0,h,j,C],g,u||Date.now(),Date.now()]);else if(typeof C==="function")C.apply(this,arguments)})}}var G=$.readdir;$.readdir=W;var q=/^v[0-5]\./;function W(I,_,x){if(typeof _==="function")x=_,_=null;var c=q.test(process.version)?function(h,j,C,u){return G(h,d(h,j,C,u))}:function(h,j,C,u){return G(h,j,d(h,j,C,u))};return c(I,_,x);function d(D0,h,j,C){return function(u,g){if(u&&(u.code==="EMFILE"||u.code==="ENFILE"))OX([c,[D0,h,j],u,C||Date.now(),Date.now()]);else{if(g&&g.sort)g.sort();if(typeof j==="function")j.call(this,u,g)}}}}if(process.version.substr(0,4)==="v0.8"){var H=YS0($);M=H.ReadStream,N=H.WriteStream}var z=$.ReadStream;if(z)M.prototype=Object.create(z.prototype),M.prototype.open=E;var O=$.WriteStream;if(O)N.prototype=Object.create(O.prototype),N.prototype.open=w;Object.defineProperty($,"ReadStream",{get:function(){return M},set:function(I){M=I},enumerable:!0,configurable:!0}),Object.defineProperty($,"WriteStream",{get:function(){return N},set:function(I){N=I},enumerable:!0,configurable:!0});var V=M;Object.defineProperty($,"FileReadStream",{get:function(){return V},set:function(I){V=I},enumerable:!0,configurable:!0});var K=N;Object.defineProperty($,"FileWriteStream",{get:function(){return K},set:function(I){K=I},enumerable:!0,configurable:!0});function M(I,_){if(this instanceof M)return z.apply(this,arguments),this;else return M.apply(Object.create(M.prototype),arguments)}function E(){var I=this;v(I.path,I.flags,I.mode,function(_,x){if(_){if(I.autoClose)I.destroy();I.emit("error",_)}else I.fd=x,I.emit("open",x),I.read()})}function N(I,_){if(this instanceof N)return O.apply(this,arguments),this;else return N.apply(Object.create(N.prototype),arguments)}function w(){var I=this;v(I.path,I.flags,I.mode,function(_,x){if(_)I.destroy(),I.emit("error",_);else I.fd=x,I.emit("open",x)})}function L(I,_){return new $.ReadStream(I,_)}function R(I,_){return new $.WriteStream(I,_)}var S=$.open;$.open=v;function v(I,_,x,c){if(typeof x==="function")c=x,x=null;return d(I,_,x,c);function d(D0,h,j,C,u){return S(D0,h,j,function(g,p){if(g&&(g.code==="EMFILE"||g.code==="ENFILE"))OX([d,[D0,h,j,C],g,u||Date.now(),Date.now()]);else if(typeof C==="function")C.apply(this,arguments)})}}return $}function OX($){FJ("ENQUEUE",$[0].name,$[1]),j1[GD].push($),oM()}var d3;function Ud(){var $=Date.now();for(var D=0;D<j1[GD].length;++D)if(j1[GD][D].length>2)j1[GD][D][3]=$,j1[GD][D][4]=$;oM()}function oM(){if(clearTimeout(d3),d3=void 0,j1[GD].length===0)return;var $=j1[GD].shift(),D=$[0],J=$[1],X=$[2],Q=$[3],Y=$[4];if(Q===void 0)FJ("RETRY",D.name,J),D.apply(null,J);else if(Date.now()-Q>=60000){FJ("TIMEOUT",D.name,J);var Z=J.pop();if(typeof Z==="function")Z.call(null,X)}else{var F=Date.now()-Y,U=Math.max(Y-Q,1),G=Math.min(U*1.2,100);if(F>=G)FJ("RETRY",D.name,J),D.apply(null,J.concat([Q]));else j1[GD].push($)}if(d3===void 0)d3=setTimeout(oM,0)}});var Wd=A((QL$,qd)=>{function c6($,D){if(typeof D==="boolean")D={forever:D};if(this._originalTimeouts=JSON.parse(JSON.stringify($)),this._timeouts=$,this._options=D||{},this._maxRetryTime=D&&D.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._options.forever)this._cachedTimeouts=this._timeouts.slice(0)}qd.exports=c6;c6.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts};c6.prototype.stop=function(){if(this._timeout)clearTimeout(this._timeout);this._timeouts=[],this._cachedTimeouts=null};c6.prototype.retry=function($){if(this._timeout)clearTimeout(this._timeout);if(!$)return!1;var D=new Date().getTime();if($&&D-this._operationStart>=this._maxRetryTime)return this._errors.unshift(Error("RetryOperation timeout occurred")),!1;this._errors.push($);var J=this._timeouts.shift();if(J===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),J=this._timeouts.shift();else return!1;var X=this,Q=setTimeout(function(){if(X._attempts++,X._operationTimeoutCb){if(X._timeout=setTimeout(function(){X._operationTimeoutCb(X._attempts)},X._operationTimeout),X._options.unref)X._timeout.unref()}X._fn(X._attempts)},J);if(this._options.unref)Q.unref();return!0};c6.prototype.attempt=function($,D){if(this._fn=$,D){if(D.timeout)this._operationTimeout=D.timeout;if(D.cb)this._operationTimeoutCb=D.cb}var J=this;if(this._operationTimeoutCb)this._timeout=setTimeout(function(){J._operationTimeoutCb()},J._operationTimeout);this._operationStart=new Date().getTime(),this._fn(this._attempts)};c6.prototype.try=function($){console.log("Using RetryOperation.try() is deprecated"),this.attempt($)};c6.prototype.start=function($){console.log("Using RetryOperation.start() is deprecated"),this.attempt($)};c6.prototype.start=c6.prototype.try;c6.prototype.errors=function(){return this._errors};c6.prototype.attempts=function(){return this._attempts};c6.prototype.mainError=function(){if(this._errors.length===0)return null;var $={},D=null,J=0;for(var X=0;X<this._errors.length;X++){var Q=this._errors[X],Y=Q.message,Z=($[Y]||0)+1;if($[Y]=Z,Z>=J)D=Q,J=Z}return D}});var zd=A((GS0)=>{var US0=Wd();GS0.operation=function($){var D=GS0.timeouts($);return new US0(D,{forever:$&&$.forever,unref:$&&$.unref,maxRetryTime:$&&$.maxRetryTime})};GS0.timeouts=function($){if($ instanceof Array)return[].concat($);var D={retries:10,factor:2,minTimeout:1000,maxTimeout:1/0,randomize:!1};for(var J in $)D[J]=$[J];if(D.minTimeout>D.maxTimeout)throw Error("minTimeout is greater than maxTimeout");var X=[];for(var Q=0;Q<D.retries;Q++)X.push(this.createTimeout(Q,D));if($&&$.forever&&!X.length)X.push(this.createTimeout(Q,D));return X.sort(function(Y,Z){return Y-Z}),X};GS0.createTimeout=function($,D){var J=D.randomize?Math.random()+1:1,X=Math.round(J*D.minTimeout*Math.pow(D.factor,$));return X=Math.min(X,D.maxTimeout),X};GS0.wrap=function($,D,J){if(D instanceof Array)J=D,D=null;if(!J){J=[];for(var X in $)if(typeof $[X]==="function")J.push(X)}for(var Q=0;Q<J.length;Q++){var Y=J[Q],Z=$[Y];$[Y]=function(U){var G=GS0.operation(D),q=Array.prototype.slice.call(arguments,1),W=q.pop();q.push(function(H){if(G.retry(H))return;if(H)arguments[0]=G.mainError();W.apply(this,arguments)}),G.attempt(function(){U.apply($,q)})}.bind($,Z),$[Y].options=D}}});var Od=A((ZL$,l3)=>{l3.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];if(process.platform!=="win32")l3.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")l3.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var p3=A((FL$,KX)=>{var B1=global.process,UJ=function($){return $&&typeof $==="object"&&typeof $.removeListener==="function"&&typeof $.emit==="function"&&typeof $.reallyExit==="function"&&typeof $.listeners==="function"&&typeof $.kill==="function"&&typeof $.pid==="number"&&typeof $.on==="function"};if(!UJ(B1))KX.exports=function(){return function(){}};else{if(aM=a("assert"),GJ=Od(),sM=/^win/i.test(B1.platform),VX=a("events"),typeof VX!=="function")VX=VX.EventEmitter;if(B1.__signal_exit_emitter__)r1=B1.__signal_exit_emitter__;else r1=B1.__signal_exit_emitter__=new VX,r1.count=0,r1.emitted={};if(!r1.infinite)r1.setMaxListeners(1/0),r1.infinite=!0;KX.exports=function($,D){if(!UJ(global.process))return function(){};if(aM.equal(typeof $,"function","a callback must be provided for exit handler"),qJ===!1)n3();var J="exit";if(D&&D.alwaysLast)J="afterexit";var X=function(){if(r1.removeListener(J,$),r1.listeners("exit").length===0&&r1.listeners("afterexit").length===0)nZ()};return r1.on(J,$),X},nZ=function(){if(!qJ||!UJ(global.process))return;qJ=!1,GJ.forEach(function(D){try{B1.removeListener(D,iZ[D])}catch(J){}}),B1.emit=pZ,B1.reallyExit=i3,r1.count-=1},KX.exports.unload=nZ,x9=function(D,J,X){if(r1.emitted[D])return;r1.emitted[D]=!0,r1.emit(D,J,X)},iZ={},GJ.forEach(function($){iZ[$]=function(){if(!UJ(global.process))return;var J=B1.listeners($);if(J.length===r1.count){if(nZ(),x9("exit",null,$),x9("afterexit",null,$),sM&&$==="SIGHUP")$="SIGINT";B1.kill(B1.pid,$)}}}),KX.exports.signals=function(){return GJ},qJ=!1,n3=function(){if(qJ||!UJ(global.process))return;qJ=!0,r1.count+=1,GJ=GJ.filter(function(D){try{return B1.on(D,iZ[D]),!0}catch(J){return!1}}),B1.emit=$L,B1.reallyExit=eM},KX.exports.load=n3,i3=B1.reallyExit,eM=function(D){if(!UJ(global.process))return;B1.exitCode=D||0,x9("exit",B1.exitCode,null),x9("afterexit",B1.exitCode,null),i3.call(B1,B1.exitCode)},pZ=B1.emit,$L=function(D,J){if(D==="exit"&&UJ(global.process)){if(J!==void 0)B1.exitCode=J;var X=pZ.apply(this,arguments);return x9("exit",B1.exitCode,null),x9("afterexit",B1.exitCode,null),X}else return pZ.apply(this,arguments)}}var aM,GJ,sM,VX,r1,nZ,x9,iZ,qJ,n3,i3,eM,pZ,$L});var Kd=A((VS0,DL)=>{var Vd=Symbol();function zS0($,D,J){let X=D[Vd];if(X)return D.stat($,(Y,Z)=>{if(Y)return J(Y);J(null,Z.mtime,X)});let Q=new Date(Math.ceil(Date.now()/1000)*1000+5);D.utimes($,Q,Q,(Y)=>{if(Y)return J(Y);D.stat($,(Z,F)=>{if(Z)return J(Z);let U=F.mtime.getTime()%1000===0?"s":"ms";Object.defineProperty(D,Vd,{value:U}),J(null,F.mtime,U)})})}function OS0($){let D=Date.now();if($==="s")D=Math.ceil(D/1000)*1000;return new Date(D)}VS0.probe=zS0;VS0.getMtime=OS0});var Bd=A((AS0,oZ)=>{var wS0=a("path"),QL=_1(),MS0=zd(),LS0=p3(),Nd=Kd(),d8={};function rZ($,D){return D.lockfilePath||`${$}.lock`}function YL($,D,J){if(!D.realpath)return J(null,wS0.resolve($));D.fs.realpath($,J)}function XL($,D,J){let X=rZ($,D);D.fs.mkdir(X,(Q)=>{if(!Q)return Nd.probe(X,D.fs,(Y,Z,F)=>{if(Y)return D.fs.rmdir(X,()=>{}),J(Y);J(null,Z,F)});if(Q.code!=="EEXIST")return J(Q);if(D.stale<=0)return J(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:$}));D.fs.stat(X,(Y,Z)=>{if(Y){if(Y.code==="ENOENT")return XL($,{...D,stale:0},J);return J(Y)}if(!wd(Z,D))return J(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:$}));Md($,D,(F)=>{if(F)return J(F);XL($,{...D,stale:0},J)})})})}function wd($,D){return $.mtime.getTime()<Date.now()-D.stale}function Md($,D,J){D.fs.rmdir(rZ($,D),(X)=>{if(X&&X.code!=="ENOENT")return J(X);J()})}function r3($,D){let J=d8[$];if(J.updateTimeout)return;if(J.updateDelay=J.updateDelay||D.update,J.updateTimeout=setTimeout(()=>{J.updateTimeout=null,D.fs.stat(J.lockfilePath,(X,Q)=>{let Y=J.lastUpdate+D.stale<Date.now();if(X){if(X.code==="ENOENT"||Y)return JL($,J,Object.assign(X,{code:"ECOMPROMISED"}));return J.updateDelay=1000,r3($,D)}if(J.mtime.getTime()!==Q.mtime.getTime())return JL($,J,Object.assign(Error("Unable to update lock within the stale threshold"),{code:"ECOMPROMISED"}));let F=Nd.getMtime(J.mtimePrecision);D.fs.utimes(J.lockfilePath,F,F,(U)=>{let G=J.lastUpdate+D.stale<Date.now();if(J.released)return;if(U){if(U.code==="ENOENT"||G)return JL($,J,Object.assign(U,{code:"ECOMPROMISED"}));return J.updateDelay=1000,r3($,D)}J.mtime=F,J.lastUpdate=Date.now(),J.updateDelay=null,r3($,D)})})},J.updateDelay),J.updateTimeout.unref)J.updateTimeout.unref()}function JL($,D,J){if(D.released=!0,D.updateTimeout)clearTimeout(D.updateTimeout);if(d8[$]===D)delete d8[$];D.options.onCompromised(J)}function BS0($,D,J){D={stale:1e4,update:null,realpath:!0,retries:0,fs:QL,onCompromised:(X)=>{throw X},...D},D.retries=D.retries||0,D.retries=typeof D.retries==="number"?{retries:D.retries}:D.retries,D.stale=Math.max(D.stale||0,2000),D.update=D.update==null?D.stale/2:D.update||0,D.update=Math.max(Math.min(D.update,D.stale/2),1000),YL($,D,(X,Q)=>{if(X)return J(X);let Y=MS0.operation(D.retries);Y.attempt(()=>{XL(Q,D,(Z,F,U)=>{if(Y.retry(Z))return;if(Z)return J(Y.mainError());let G=d8[Q]={lockfilePath:rZ(Q,D),mtime:F,mtimePrecision:U,options:D,lastUpdate:Date.now()};r3(Q,D),J(null,(q)=>{if(G.released)return q&&q(Object.assign(Error("Lock is already released"),{code:"ERELEASED"}));Ld(Q,{...D,realpath:!1},q)})})})})}function Ld($,D,J){D={fs:QL,realpath:!0,...D},YL($,D,(X,Q)=>{if(X)return J(X);let Y=d8[Q];if(!Y)return J(Object.assign(Error("Lock is not acquired/owned by you"),{code:"ENOTACQUIRED"}));Y.updateTimeout&&clearTimeout(Y.updateTimeout),Y.released=!0,delete d8[Q],Md(Q,D,J)})}function ES0($,D,J){D={stale:1e4,realpath:!0,fs:QL,...D},D.stale=Math.max(D.stale||0,2000),YL($,D,(X,Q)=>{if(X)return J(X);D.fs.stat(rZ(Q,D),(Y,Z)=>{if(Y)return Y.code==="ENOENT"?J(null,!1):J(Y);return J(null,!wd(Z,D))})})}function RS0(){return d8}LS0(()=>{for(let $ in d8){let D=d8[$].options;try{D.fs.rmdirSync(rZ($,D))}catch(J){}}});AS0.lock=BS0;AS0.unlock=Ld;AS0.check=ES0;AS0.getLocks=RS0});var Rd=A((UL$,Ed)=>{var PS0=_1();function SS0($){let D=["mkdir","realpath","stat","rmdir","utimes"],J={...$};return D.forEach((X)=>{J[X]=(...Q)=>{let Y=Q.pop(),Z;try{Z=$[`${X}Sync`](...Q)}catch(F){return Y(F)}Y(null,Z)}}),J}function xS0($){return(...D)=>new Promise((J,X)=>{D.push((Q,Y)=>{if(Q)X(Q);else J(Y)}),$(...D)})}function vS0($){return(...D)=>{let J,X;if(D.push((Q,Y)=>{J=Q,X=Y}),$(...D),J)throw J;return X}}function _S0($){if($={...$},$.fs=SS0($.fs||PS0),typeof $.retries==="number"&&$.retries>0||$.retries&&typeof $.retries.retries==="number"&&$.retries.retries>0)throw Object.assign(Error("Cannot use retries with the sync api"),{code:"ESYNC"});return $}Ed.exports={toPromise:xS0,toSync:vS0,toSyncOptions:_S0}});var Id=A((GL$,v9)=>{var NX=Bd(),{toPromise:o3,toSync:t3,toSyncOptions:ZL}=Rd();async function Ad($,D){let J=await o3(NX.lock)($,D);return o3(J)}function kS0($,D){let J=t3(NX.lock)($,ZL(D));return t3(J)}function uS0($,D){return o3(NX.unlock)($,D)}function yS0($,D){return t3(NX.unlock)($,ZL(D))}function fS0($,D){return o3(NX.check)($,D)}function hS0($,D){return t3(NX.check)($,ZL(D))}v9.exports=Ad;v9.exports.lock=Ad;v9.exports.unlock=uS0;v9.exports.lockSync=kS0;v9.exports.unlockSync=yS0;v9.exports.check=fS0;v9.exports.checkSync=hS0});var vd=A((Sd)=>{Object.defineProperty(Sd,"__esModule",{value:!0});Sd.canStoreURLs=Sd.FileUrlStorage=void 0;var jd=a("fs"),bS0=mS0($d()),Cd=gS0(Id());function Pd($){if(typeof WeakMap!="function")return null;var D=new WeakMap,J=new WeakMap;return(Pd=function(X){return X?J:D})($)}function gS0($,D){if(!D&&$&&$.__esModule)return $;if($===null||typeof $!="object"&&typeof $!="function")return{default:$};var J=Pd(D);if(J&&J.has($))return J.get($);var X={__proto__:null},Q=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Y in $)if(Y!=="default"&&{}.hasOwnProperty.call($,Y)){var Z=Q?Object.getOwnPropertyDescriptor($,Y):null;Z&&(Z.get||Z.set)?Object.defineProperty(X,Y,Z):X[Y]=$[Y]}return X.default=$,J&&J.set($,X),X}function mS0($){return $&&$.__esModule?$:{default:$}}function tZ($){return tZ=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(D){return typeof D}:function(D){return D&&typeof Symbol=="function"&&D.constructor===Symbol&&D!==Symbol.prototype?"symbol":typeof D},tZ($)}function dS0($,D){if(!($ instanceof D))throw TypeError("Cannot call a class as a function")}function Td($,D){for(var J=0;J<D.length;J++){var X=D[J];if(X.enumerable=X.enumerable||!1,X.configurable=!0,"value"in X)X.writable=!0;Object.defineProperty($,lS0(X.key),X)}}function cS0($,D,J){if(D)Td($.prototype,D);if(J)Td($,J);return Object.defineProperty($,"prototype",{writable:!1}),$}function lS0($){var D=nS0($,"string");return tZ(D)=="symbol"?D:D+""}function nS0($,D){if(tZ($)!="object"||!$)return $;var J=$[Symbol.toPrimitive];if(J!==void 0){var X=J.call($,D||"default");if(tZ(X)!="object")return X;throw TypeError("@@toPrimitive must return a primitive value.")}return(D==="string"?String:Number)($)}var qL$=Sd.canStoreURLs=!0,WL$=Sd.FileUrlStorage=function(){function $(D){dS0(this,$),this.path=D}return cS0($,[{key:"findAllUploads",value:function(){var J=this;return new Promise(function(X,Q){J._getItems("tus::",function(Y,Z){if(Y)Q(Y);else X(Z)})})}},{key:"findUploadsByFingerprint",value:function(J){var X=this;return new Promise(function(Q,Y){X._getItems("tus::".concat(J),function(Z,F){if(Z)Y(Z);else Q(F)})})}},{key:"removeUpload",value:function(J){var X=this;return new Promise(function(Q,Y){X._removeItem(J,function(Z){if(Z)Y(Z);else Q()})})}},{key:"addUpload",value:function(J,X){var Q=this,Y=Math.round(Math.random()*1000000000000),Z="tus::".concat(J,"::").concat(Y);return new Promise(function(F,U){Q._setItem(Z,X,function(G){if(G)U(G);else F(Z)})})}},{key:"_setItem",value:function(J,X,Q){var Y=this;Cd.lock(this.path,this._lockfileOptions()).then(function(Z){Q=Y._releaseAndCb(Z,Q),Y._getData(function(F,U){if(F){Q(F);return}U[J]=X,Y._writeData(U,function(G){return Q(G)})})}).catch(Q)}},{key:"_getItems",value:function(J,X){this._getData(function(Q,Y){if(Q){X(Q);return}var Z=Object.keys(Y).filter(function(F){return F.startsWith(J)}).map(function(F){var U=Y[F];return U.urlStorageKey=F,U});X(null,Z)})}},{key:"_removeItem",value:function(J,X){var Q=this;Cd.lock(this.path,this._lockfileOptions()).then(function(Y){X=Q._releaseAndCb(Y,X),Q._getData(function(Z,F){if(Z){X(Z);return}delete F[J],Q._writeData(F,function(U){return X(U)})})}).catch(X)}},{key:"_lockfileOptions",value:function(){return{realpath:!1,retries:{retries:5,minTimeout:20}}}},{key:"_releaseAndCb",value:function(J,X){return function(Q){if(Q){J().then(function(){return X(Q)}).catch(function(Y){return X((0,bS0.default)([Q,Y]))});return}J().then(X).catch(X)}}},{key:"_writeData",value:function(J,X){var Q={encoding:"utf8",mode:432,flag:"w"};(0,jd.writeFile)(this.path,JSON.stringify(J),Q,function(Y){return X(Y)})}},{key:"_getData",value:function(J){(0,jd.readFile)(this.path,"utf8",function(X,Q){if(X){if(X.code==="ENOENT")J(null,{});else J(X);return}try{Q=!Q.trim().length?{}:JSON.parse(Q)}catch(Y){J(Y);return}J(null,Q)})}}])}()});var s3=A((_9)=>{Object.defineProperty(_9,"__esModule",{value:!0});Object.defineProperty(_9,"DefaultHttpStack",{enumerable:!0,get:function(){return yd.default}});Object.defineProperty(_9,"DetailedError",{enumerable:!0,get:function(){return pS0.default}});Object.defineProperty(_9,"FileUrlStorage",{enumerable:!0,get:function(){return fd.FileUrlStorage}});Object.defineProperty(_9,"StreamSource",{enumerable:!0,get:function(){return sS0.default}});_9.Upload=void 0;Object.defineProperty(_9,"canStoreURLs",{enumerable:!0,get:function(){return fd.canStoreURLs}});_9.defaultOptions=void 0;Object.defineProperty(_9,"enableDebugLog",{enumerable:!0,get:function(){return rS0.enableDebugLog}});_9.isSupported=void 0;var pS0=WJ(ZM()),rS0=FM(),oS0=WJ(Ib()),FL=WJ(Qg()),tS0=WJ(Ag()),aS0=WJ(Pg()),yd=WJ(ng()),sS0=WJ(wM()),fd=vd();function WJ($){return $&&$.__esModule?$:{default:$}}function MX($){return MX=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(D){return typeof D}:function(D){return D&&typeof Symbol=="function"&&D.constructor===Symbol&&D!==Symbol.prototype?"symbol":typeof D},MX($)}function eS0($,D){if(!($ instanceof D))throw TypeError("Cannot call a class as a function")}function _d($,D){for(var J=0;J<D.length;J++){var X=D[J];if(X.enumerable=X.enumerable||!1,X.configurable=!0,"value"in X)X.writable=!0;Object.defineProperty($,bd(X.key),X)}}function $x0($,D,J){if(D)_d($.prototype,D);if(J)_d($,J);return Object.defineProperty($,"prototype",{writable:!1}),$}function Dx0($,D,J){return D=a3(D),Jx0($,hd()?Reflect.construct(D,J||[],a3($).constructor):D.apply($,J))}function Jx0($,D){if(D&&(MX(D)==="object"||typeof D==="function"))return D;else if(D!==void 0)throw TypeError("Derived constructors may only return object or undefined");return Xx0($)}function Xx0($){if($===void 0)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return $}function hd(){try{var $=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(D){}return(hd=function(){return!!$})()}function a3($){return a3=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(J){return J.__proto__||Object.getPrototypeOf(J)},a3($)}function Qx0($,D){if(typeof D!=="function"&&D!==null)throw TypeError("Super expression must either be null or a function");if($.prototype=Object.create(D&&D.prototype,{constructor:{value:$,writable:!0,configurable:!0}}),Object.defineProperty($,"prototype",{writable:!1}),D)UL($,D)}function UL($,D){return UL=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(X,Q){return X.__proto__=Q,X},UL($,D)}function kd($,D){var J=Object.keys($);if(Object.getOwnPropertySymbols){var X=Object.getOwnPropertySymbols($);D&&(X=X.filter(function(Q){return Object.getOwnPropertyDescriptor($,Q).enumerable})),J.push.apply(J,X)}return J}function wX($){for(var D=1;D<arguments.length;D++){var J=arguments[D]!=null?arguments[D]:{};D%2?kd(Object(J),!0).forEach(function(X){Yx0($,X,J[X])}):Object.getOwnPropertyDescriptors?Object.defineProperties($,Object.getOwnPropertyDescriptors(J)):kd(Object(J)).forEach(function(X){Object.defineProperty($,X,Object.getOwnPropertyDescriptor(J,X))})}return $}function Yx0($,D,J){if(D=bd(D),D in $)Object.defineProperty($,D,{value:J,enumerable:!0,configurable:!0,writable:!0});else $[D]=J;return $}function bd($){var D=Zx0($,"string");return MX(D)=="symbol"?D:D+""}function Zx0($,D){if(MX($)!="object"||!$)return $;var J=$[Symbol.toPrimitive];if(J!==void 0){var X=J.call($,D||"default");if(MX(X)!="object")return X;throw TypeError("@@toPrimitive must return a primitive value.")}return(D==="string"?String:Number)($)}var ud=_9.defaultOptions=wX(wX({},FL.default.defaultOptions),{},{httpStack:new yd.default,fileReader:new tS0.default,urlStorage:new oS0.default,fingerprint:aS0.default}),zL$=_9.Upload=function($){function D(){var J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return eS0(this,D),X=wX(wX({},ud),X),Dx0(this,D,[J,X])}return Qx0(D,$),$x0(D,null,[{key:"terminate",value:function(X){var Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Q=wX(wX({},ud),Q),FL.default.terminate(X,Q)}}])}(FL.default),OL$=_9.isSupported=!0});var qD;var c8=s(()=>{qD={name:"@capgo/cli",type:"module",version:"8.30.0",description:"A CLI to upload to capgo servers",author:"Martin martin@capgo.app",license:"Apache 2.0",homepage:"https://github.com/Cap-go/capgo/tree/main/cli#readme",repository:{type:"git",url:"git+https://github.com/Cap-go/capgo.git",directory:"cli"},bugs:{url:"https://github.com/Cap-go/capgo/issues"},keywords:["appflow alternative","ionic","capacitor","auto update","live update","capgo","cli","upload","capgo-cli","sdk","tanstack-intent"],exports:{".":{import:"./dist/index.js",require:"./dist/index.js"},"./sdk":{types:"./dist/src/sdk.d.ts",import:"./dist/src/sdk.js"}},main:"dist/index.js",types:"dist/src/index.d.ts",bin:{capgo:"dist/index.js"},files:["!skills/_artifacts","dist","skills"],engines:{npm:">=8.0.0",node:">=20.0.0"},scripts:{build:"tsc && bun build.mjs",dev:"NODE_ENV=development ncc build","no-debug":"node dist/index.js","dev-build":"SUPA_DB=development ncc build",pack:"pkg",types:"bunx --bun supabase gen types typescript --project-id=xvwzpoazmxkqosrdewyv > src/types/supabase.types.ts",typecheck:"tsgo --project tsconfig.tsgo.json --noEmit",lint:"bun run lint:ox","lint:ox":"oxlint --config ../.oxlintrc.json src","lint:fix":"oxlint --config ../.oxlintrc.json --fix src","check-posix-paths":"node test/check-posix-paths.js","generate-docs":"node dist/index.js generate-docs README.md","test:bundle":"bun test/test-bundle.mjs","test:prescan":"bun test test/prescan/","test:functional":"bun test/test-functional.mjs","test:semver":"bun test/test-semver-validation.mjs","test:version-edge-cases":"bun test/test-version-validation.mjs","test:regex":"bun test/test-regex-validation.mjs","test:upload":"bun test/test-upload-validation.mjs","test:fail-on-incompatible":"bun test/test-fail-on-incompatible.mjs","test:native-dependencies":"bun test/test-native-dependencies.mjs","test:credentials":"bun test/test-credentials.mjs","test:asc-key-protocol":"bun test/test-asc-key-protocol.mjs","test:credentials-validation":"bun test/test-credentials-validation.mjs","test:android-service-account-validation":"bun test/test-android-service-account-validation.mjs","test:build-zip-filter":"bun test/test-build-zip-filter.mjs","test:checksum":"bun test/test-checksum-algorithm.mjs","test:build-needed":"bun test/test-build-needed.mjs","test:ci-prompts":"bun test/test-ci-prompts.mjs","test:ci-secrets":"bun test/test-ci-secrets.mjs","test:android-onboarding-progress":"bun test/test-android-onboarding-progress.mjs","test:onboarding-telemetry":"bun test/test-onboarding-telemetry.mjs","test:v2-event-migration":"bun test/test-v2-event-migration.mjs","test:analytics":"bun test/test-analytics.mjs","test:analytics-error-category":"bun test/test-analytics-error-category.mjs","test:analytics-org-resolver":"bun test/test-analytics-org-resolver.mjs","test:supabase-perf":"bun test/test-supabase-perf.mjs","test:preview-qr":"bun test/test-preview-qr.mjs","test:mcp-analytics":"bun test/test-mcp-analytics.mjs","test:mcp-instructions":"bun test/test-mcp-instructions.mjs","test:mcp-stdout-guard":"bun test/test-mcp-stdout-guard.mjs","test:mcp-platform-select":"bun test/test-mcp-platform-select.mjs","test:mcp-explain-scopes":"bun test/test-mcp-explain-scopes.mjs","test:mcp-oauth-reopen":"bun test/test-mcp-oauth-reopen.mjs","test:mcp-broker-oauth":"bun test/test-mcp-broker-oauth.mjs","test:mcp-broker-session":"bun test/test-mcp-broker-session.mjs","test:mcp-credentials-manage":"bun test/test-mcp-credentials-manage.mjs","test:mcp-resume-prompt":"bun test/test-mcp-resume-prompt.mjs","test:mcp-build-job":"bun test/test-mcp-build-job.mjs","test:mcp-build-tools":"bun test/test-mcp-build-tools.mjs","test:app-created-source":"bun test/test-app-created-source.mjs","test:doctor-analytics":"bun test/test-doctor-analytics.mjs","test:posthog-exception":"bun test/test-posthog-exception.mjs","test:onboarding-recovery":"bun test/test-onboarding-recovery.mjs","test:onboarding-progress":"bun test/test-onboarding-progress.mjs","test:onboarding-run-targets":"bun test/test-onboarding-run-targets.mjs","test:run-device-command":"bun test/test-run-device-command.mjs","test:init-app-conflict":"bun test/test-init-app-conflict.mjs","test:init-guardrails":"bun test/test-init-guardrails.mjs","test:init-replay":"bun test/test-init-replay.mjs","test:capacitor-config-target":"bun test/test-capacitor-config-target.mjs","test:init-monorepo-targeting":"bun run test:capacitor-config-target && bun test/test-init-monorepo-targeting.mjs","test:prompt-preferences":"bun test/test-prompt-preferences.mjs","test:esm-sdk":"node test/test-sdk-esm.mjs","test:auth-session":"bun test/test-auth-session.mjs","test:mcp":"node test/test-mcp.mjs","test:mcp-no-key-handshake":"node test/test-mcp-no-key-handshake.mjs","test:version-detection":"node test/test-get-installed-version.mjs","test:version-detection:setup":"./test/fixtures/setup-test-projects.sh","test:platform-paths":"bun test/test-platform-paths.mjs","test:project-type-detection":"bun test/test-project-type-detection.mjs","test:payload-split":"bun test/test-payload-split.mjs","test:macos-signing":"bun test/test-macos-signing.mjs","test:helper-dce":"bash scripts/check-helper-dce.sh","test:apple-api-import-helpers":"bun test/test-apple-api-import-helpers.mjs","test:apple-api-verify-key":"bun test/test-apple-api-verify-key.mjs","test:bundle-id-detector":"bun test/test-bundle-id-detector.mjs","test:apple-api-app-list":"bun test/test-apple-api-app-list.mjs","test:apple-api-cert-create":"bun test/test-apple-api-cert-create.mjs","test:app-verification":"bun test/test-app-verification.mjs","test:pbxproj-parser":"bun test/test-pbxproj-parser.mjs","test:manifest-path-encoding":"bun test/test-manifest-path-encoding.mjs","test:self-update":"bun test/test-self-update.mjs","test:update-prompt":"bun test/test-update-prompt.mjs","test:android-tail-engine":"bun test/test-android-tail-engine.mjs","test:android-tail-render":"bun test/test-android-tail-render.mjs","test:android-tail-routing":"bun test/test-android-tail-routing.mjs","test:dev-gate-stripped":"bun test/test-dev-gate-stripped.mjs","test:frame-fit-ios-shared":"bun test/test-frame-fit-ios-shared.mjs","test:ios-confirm-app-id":"bun test/test-ios-confirm-app-id.mjs","test:ios-create-new":"bun test/test-ios-create-new.mjs","test:ios-e2e":"bun test/test-ios-e2e.mjs","test:ios-flow-contract":"bun test/test-ios-flow-contract.mjs","test:ios-import-discovery":"bun test/test-ios-import-discovery.mjs","test:ios-import-export":"bun test/test-ios-import-export.mjs","test:ios-import-pickers":"bun test/test-ios-import-pickers.mjs","test:ios-import-recovery":"bun test/test-ios-import-recovery.mjs","test:ios-recovery":"bun test/test-ios-recovery.mjs","test:ios-resume":"bun test/test-ios-resume.mjs","test:ios-tail-handoff":"bun test/test-ios-tail-handoff.mjs","test:ios-tui-render":"bun test/test-ios-tui-render.mjs","test:p8-error":"bun test/test-p8-error.mjs","test:ios-tui-routing":"bun test/test-ios-tui-routing.mjs","test:ios-updater-sync-validation":"bun test/test-ios-updater-sync-validation.mjs","test:ios-verify-app":"bun test/test-ios-verify-app.mjs","test:ios-marketing-version":"bun test/test-ios-marketing-version.mjs","test:platform-flow-contract":"bun test/test-platform-flow-contract.mjs","test:tail-engine-shared":"bun test/test-tail-engine-shared.mjs",test:"bun run build && bun run test:helper-dce && bun run test:version-detection:setup && bun run test:bundle && bun run test:functional && bun run test:semver && bun run test:version-edge-cases && bun run test:regex && bun run test:upload && bun run test:fail-on-incompatible && bun run test:native-dependencies && bun run test:credentials && bun run test:credentials-validation && bun run test:android-service-account-validation && bun run test:build-zip-filter && bun run test:checksum && bun run test:build-needed && bun run test:ci-prompts && bun run test:ci-secrets && bun run test:android-onboarding-progress && bun run test:onboarding-telemetry && bun run test:v2-event-migration && bun run test:analytics && bun run test:analytics-error-category && bun run test:analytics-org-resolver && bun run test:supabase-perf && bun run test:preview-qr && bun run test:app-set-options && bun run test:mcp-analytics && bun run test:mcp-instructions && bun run test:mcp-live-update-onboarding && bun run test:mcp-stdout-guard && bun run test:mcp-platform-select && bun run test:mcp-explain-scopes && bun run test:mcp-oauth-reopen && bun run test:mcp-broker-oauth && bun run test:mcp-broker-session && bun run test:mcp-credentials-manage && bun run test:mcp-resume-prompt && bun run test:mcp-build-job && bun run test:mcp-build-tools && bun run test:app-created-source && bun run test:doctor-analytics && bun run test:posthog-exception && bun run test:build-platform-selection && bun run test:onboarding-recovery && bun run test:onboarding-progress && bun run test:onboarding-run-targets && bun run test:run-device-command && bun run test:init-monorepo-targeting && bun run test:init-app-conflict && bun run test:init-guardrails && bun run test:init-replay && bun run test:prompt-preferences && bun run test:esm-sdk && bun run test:mcp && bun run test:mcp-no-key-handshake && bun run test:auth-session && bun run test:version-detection && bun run test:platform-paths && bun run test:project-type-detection && bun run test:payload-split && bun run test:manifest-path-encoding && bun run test:macos-signing && bun run test:asc-key-protocol && bun run test:apple-api-import-helpers && bun run test:apple-api-verify-key && bun run test:bundle-id-detector && bun run test:apple-api-app-list && bun run test:app-verification && bun run test:pbxproj-parser && bun run test:ai-log-capture && bun run test:ai-analyze-flow && bun run test:cicd-failure-help && bun run test:ai-sse-parser && bun run test:ai-render-markdown && bun run test:ai-stream-markdown && bun run test:ai-onboarding-mode && bun run test:ai-fit && bun run test:platform-layout && bun run test:frame-fit && bun run test:onboarding-min-size && bun run test:min-size-gate && bun run test:shell-size-gate && bun run test:build-log-sanitize && bun run test:build-output-viewport && bun run test:diff-viewer-viewport && bun run test:build-complete-exit && bun run test:ai-analyze-stream && bun run test:support-mailto && bun run test:support-redact && bun run test:support-internal-log && bun run test:support-help-menu && bun run test:support-contact && bun run test:support-upload-prompt && bun run test:support-bundle-files && bun run test:self-update && bun run test:update-prompt && bun run test:apple-api-cert-create && bun run test:android-tail-engine && bun run test:android-tail-render && bun run test:android-tail-routing && bun run test:dev-gate-stripped && bun run test:frame-fit-ios-shared && bun run test:ios-confirm-app-id && bun run test:ios-create-new && bun run test:ios-e2e && bun run test:ios-flow-contract && bun run test:ios-import-discovery && bun run test:ios-import-export && bun run test:ios-import-pickers && bun run test:ios-import-recovery && bun run test:ios-recovery && bun run test:ios-resume && bun run test:ios-tail-handoff && bun run test:ios-tui-render && bun run test:p8-error && bun run test:ios-tui-routing && bun run test:ios-updater-sync-validation && bun run test:ios-verify-app && bun run test:ios-marketing-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-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:organization-set-api-host","test:build-platform-selection":"bun test/test-build-platform-selection.mjs","test:ai-log-capture":"bun test/test-ai-log-capture.mjs","test:ai-analyze-flow":"bun test/test-ai-analyze-flow.mjs","test:cicd-failure-help":"bun test/test-cicd-failure-help.mjs","test:ai-analyze-stream":"bun test/test-ai-analyze-stream.mjs","test:ai-sse-parser":"bun test/test-ai-sse-parser.mjs","test:ai-render-markdown":"bun test/test-ai-render-markdown.mjs","test:ai-onboarding-mode":"bun test/test-ai-onboarding-mode.mjs","test:ai-fit":"bun test/test-ai-fit.mjs","test:platform-layout":"bun test/test-platform-layout.mjs","test:frame-fit":"bun test/run-frame-fit.mjs","test:onboarding-min-size":"bun test/test-onboarding-min-size.mjs","test:min-size-gate":"bun test/test-min-size-gate.mjs","test:shell-size-gate":"bun test/test-shell-size-gate.mjs","test:build-log-sanitize":"bun test/test-build-log-sanitize.mjs","test:build-output-viewport":"bun test/test-build-output-viewport.mjs","test:diff-viewer-viewport":"bun test/test-diff-viewer-viewport.mjs","test:build-complete-exit":"bun test/test-build-complete-exit.mjs","test:ai-stream-markdown":"bun test/test-ai-stream-markdown.mjs","test:support-mailto":"bun test/test-support-mailto.mjs","test:support-redact":"bun test/test-support-redact.mjs","test:support-internal-log":"bun test/test-support-internal-log.mjs","test:support-help-menu":"bun test/test-support-help-menu.mjs","test:support-contact":"bun test/test-support-contact.mjs","test:support-upload-prompt":"bun test/test-support-upload-prompt.mjs","test:support-bundle-files":"bun test/test-support-bundle-files.mjs","test:mcp-live-update-onboarding":"bun test/test-mcp-live-update-onboarding.mjs","test:app-set-options":"bun test/test-app-set-options.mjs","test:android-reporting-api":"bun test/test-android-reporting-api.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:organization-set-api-host":"bun test/test-organization-set-api-host.mjs"},dependencies:{"@inkjs/ui":"^2.0.0","@rrweb/types":"^2.1.1","@xterm/addon-serialize":"^0.14.0","@xterm/headless":"^6.0.0","happy-dom":"^20.11.0",ink:"^7.1.1","ink-spinner":"^5.0.0",jsonwebtoken:"^9.0.3","node-forge":"^1.4.0",qrcode:"^1.5.4",react:"^19.2.8","rrweb-snapshot":"^2.1.1","string-width":"^8.2.2",zod:"^4.4.3","@standard-schema/spec":"^1.1.0"},optionalDependencies:{"@capgo/cli-helper-darwin-arm64":"^1.1.1","@capgo/cli-helper-darwin-x64":"^1.1.1","node-pty":"^1.1.0"},devDependencies:{"@antfu/eslint-config":"^9.2.0","@bradenmacdonald/s3-lite-client":"npm:@jsr/bradenmacdonald__s3-lite-client@0.9.6","@capacitor/cli":"^8.4.2","@capgo/find-package-manager":"^0.0.18","@clack/prompts":"^1.7.0","@modelcontextprotocol/client":"^2.0.0-beta.5","@modelcontextprotocol/server":"^2.0.0-beta.5","@sauber/table":"npm:@jsr/sauber__table","@std/semver":"npm:@jsr/std__semver@1.0.8","@supabase/supabase-js":"^2.110.8","@tanstack/intent":"^0.3.6","@types/adm-zip":"^0.5.8","@types/jsonwebtoken":"^9.0.10","@types/node":"^26.1.1","@types/node-forge":"^1.3.14","@types/prettyjson":"^0.0.33","@types/qrcode":"^1.5.6","@types/react":"^19.2.17","@types/tmp":"^0.2.6","@types/ws":"^8.18.1","@typescript/native-preview":"7.0.0-dev.20260707.2","@vercel/ncc":"^0.44.1","@xterm/headless":"^6.0.0","adm-zip":"^0.6.0","ci-info":"^4.4.0",commander:"^15.0.0",eslint:"^10.7.0","git-format-staged":"4.0.1",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",typescript:"6.0.3",ws:"^8.21.1"}}});import{platform as Ux0,release as Gx0}from"node:os";import{arch as qx0,version as Wx0}from"node:process";function GL(){return cd}function qL(){let $={cli_version:qD.version,node_version:Wx0,os_platform:Ux0(),os_arch:qx0,os_release:Gx0(),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone||"undefined",is_ci:aZ.isCI,is_tty:Boolean(process.stdout.isTTY),invocation_source:cd};if(aZ.name)$.ci_provider=aZ.name;return $}var aZ,cd="cli";var WL=s(()=>{c8();aZ=A$(ew(),1)});import{AsyncLocalStorage as Hx0}from"node:async_hooks";function LX($,D){return nd.run($,()=>Promise.resolve(D()))}function zx0(){return nd.getStore()}function id(){return Ox0}function rd($){pd=$}function ld($){try{pd?.($)}catch{}}function td($,D){let J;try{J=new URL($).pathname}catch{J=$.split("?")[0]}let X="/functions/v1/",Q=J.indexOf(X);if(Q>=0){let G=J.slice(Q+X.length).replace(/^\/+|\/+$/g,"");return G?`${D} functions:${G}`:`${D} functions`}let Y="/rest/v1/",Z=J.indexOf(Y),F=Z>=0?J.slice(Z+Y.length):J.replace(/^\//,"");if(F.startsWith("rpc/"))return`rpc:${F.slice(4).split("/")[0]}`;let U=F.split("/")[0]||J;return`${D} ${U}`}function Vx0($){let D=$?.headers;if(!D)return;let J=D.get;if(typeof J==="function")return J.call(D,"capgkey")??void 0;if(Array.isArray(D))return D.find(([X])=>X.toLowerCase()==="capgkey")?.[1];return D.capgkey}function ad(){return async(D,J)=>{let X=(J?.method??"GET").toUpperCase(),Q=typeof D==="string"?D:D instanceof URL?D.href:D.url,Y=zx0(),Z=Vx0(J),F=Date.now();try{let U=await globalThis.fetch(D,J);return ld({url:Q,method:X,status:U.status,ok:U.ok,durationMs:Date.now()-F,source:Y,apikey:Z}),U}catch(U){throw ld({url:Q,method:X,status:0,ok:!1,durationMs:Date.now()-F,source:Y,apikey:Z,error:U}),U}}}var nd,Ox0=!1,pd,od=5000;var e3=s(()=>{nd=new Hx0});function sd($,D){let X=["normal","bold","dim","italic","underline","strikethrough"].indexOf($),Q="\x1B[";return"\x1B["+X+"m"+D+"\x1B[0m"}var j6;var ed=s(()=>{j6=class j6{title=null;headers=[];rows=[];static narrowTheme={top:["╔","═","╤","╗"],row:["║"," ","│","║"],div:["╟","─","┼","╢"],bot:["╚","═","╧","╝"]};static wideTheme={top:["╔═","═","═╤═","═╗"],row:["║ "," "," │ "," ║"],div:["╟─","─","─┼─","─╢"],bot:["╚═","═","═╧═","═╝"]};static roundTheme={top:["╭─","─","─┬─","─╮"],row:["│ "," "," │ "," │"],div:["├─","─","─┼─","─┤"],bot:["╰─","─","─┴─","─╯"]};theme=j6.wideTheme;columnWidth(){let $=[this.headers,...this.rows].filter((J)=>J.length>0),D=$[0].map((J)=>this.cast(J).length);for(let J of $.slice(1))for(let X=0;X<D.length;X++){let Q=this.cast(J[X]).length;if(Q>D[X])D[X]=Q}return D}cast($){if(typeof $==="object")return"obj";if($!==void 0&&typeof $.toString==="function")return $.toString();else return""}renderTitle(){return"[ "+this.title+" ]"}renderLine($){let D=this.columnWidth();return $[0]+D.map((J)=>$[1].repeat(J)).join($[2])+$[3]}renderCell($,D,J=!1){let X=this.cast($),Q=J?sd("bold",X):X,Y=D-X.length,Z=this.theme.row[1];switch(typeof $){case"number":return Z.repeat(Y)+Q;case"string":return Q+Z.repeat(Y);case"boolean":case"object":return Z.repeat(Math.ceil(Y/2))+sd("italic",X)+Z.repeat(Math.floor(Y/2));default:return Z.repeat(Y)}}renderRow($,D=!1){let J=this.theme.row,X=this.columnWidth();return J[0]+$.map((Q,Y)=>this.renderCell(Q,X[Y],D)).join(J[2])+J[3]}toString(){let $=this.theme,D=this.headers.length>0,J=this.rows.length>0;return[this.title?this.renderTitle():"",D||J?this.renderLine($.top):"",D?this.renderRow(this.headers,!0):"",D&&J?this.renderLine($.div):"",...this.rows.map((X)=>this.renderRow(X)),D||J?this.renderLine($.bot):""].filter((X)=>X.length>0).join(`
112
+ GFS4: `),console.error($)};if(!j1[GD]){if(pM=global[GD]||[],Gd(j1,pM),j1.close=function($){function D(J,X){return $.call(j1,J,function(Q){if(!Q)Ud();if(typeof X==="function")X.apply(this,arguments)})}return Object.defineProperty(D,c3,{value:$}),D}(j1.close),j1.closeSync=function($){function D(J){$.apply(j1,arguments),Ud()}return Object.defineProperty(D,c3,{value:$}),D}(j1.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))process.on("exit",function(){FJ(j1[GD]),a("assert").equal(j1[GD].length,0)})}var pM;if(!global[GD])Gd(global,j1[GD]);tM.exports=rM(ZS0(j1));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!j1.__patched)tM.exports=rM(j1),j1.__patched=!0;function rM($){QS0($),$.gracefulify=rM,$.createReadStream=L,$.createWriteStream=R;var D=$.readFile;$.readFile=J;function J(I,_,x){if(typeof _==="function")x=_,_=null;return c(I,_,x);function c(d,D0,h,j){return D(d,D0,function(C){if(C&&(C.code==="EMFILE"||C.code==="ENFILE"))OX([c,[d,D0,h],C,j||Date.now(),Date.now()]);else if(typeof h==="function")h.apply(this,arguments)})}}var X=$.writeFile;$.writeFile=Q;function Q(I,_,x,c){if(typeof x==="function")c=x,x=null;return d(I,_,x,c);function d(D0,h,j,C,u){return X(D0,h,j,function(g){if(g&&(g.code==="EMFILE"||g.code==="ENFILE"))OX([d,[D0,h,j,C],g,u||Date.now(),Date.now()]);else if(typeof C==="function")C.apply(this,arguments)})}}var Y=$.appendFile;if(Y)$.appendFile=Z;function Z(I,_,x,c){if(typeof x==="function")c=x,x=null;return d(I,_,x,c);function d(D0,h,j,C,u){return Y(D0,h,j,function(g){if(g&&(g.code==="EMFILE"||g.code==="ENFILE"))OX([d,[D0,h,j,C],g,u||Date.now(),Date.now()]);else if(typeof C==="function")C.apply(this,arguments)})}}var F=$.copyFile;if(F)$.copyFile=U;function U(I,_,x,c){if(typeof x==="function")c=x,x=0;return d(I,_,x,c);function d(D0,h,j,C,u){return F(D0,h,j,function(g){if(g&&(g.code==="EMFILE"||g.code==="ENFILE"))OX([d,[D0,h,j,C],g,u||Date.now(),Date.now()]);else if(typeof C==="function")C.apply(this,arguments)})}}var G=$.readdir;$.readdir=W;var q=/^v[0-5]\./;function W(I,_,x){if(typeof _==="function")x=_,_=null;var c=q.test(process.version)?function(h,j,C,u){return G(h,d(h,j,C,u))}:function(h,j,C,u){return G(h,j,d(h,j,C,u))};return c(I,_,x);function d(D0,h,j,C){return function(u,g){if(u&&(u.code==="EMFILE"||u.code==="ENFILE"))OX([c,[D0,h,j],u,C||Date.now(),Date.now()]);else{if(g&&g.sort)g.sort();if(typeof j==="function")j.call(this,u,g)}}}}if(process.version.substr(0,4)==="v0.8"){var H=YS0($);M=H.ReadStream,N=H.WriteStream}var z=$.ReadStream;if(z)M.prototype=Object.create(z.prototype),M.prototype.open=E;var O=$.WriteStream;if(O)N.prototype=Object.create(O.prototype),N.prototype.open=w;Object.defineProperty($,"ReadStream",{get:function(){return M},set:function(I){M=I},enumerable:!0,configurable:!0}),Object.defineProperty($,"WriteStream",{get:function(){return N},set:function(I){N=I},enumerable:!0,configurable:!0});var V=M;Object.defineProperty($,"FileReadStream",{get:function(){return V},set:function(I){V=I},enumerable:!0,configurable:!0});var K=N;Object.defineProperty($,"FileWriteStream",{get:function(){return K},set:function(I){K=I},enumerable:!0,configurable:!0});function M(I,_){if(this instanceof M)return z.apply(this,arguments),this;else return M.apply(Object.create(M.prototype),arguments)}function E(){var I=this;v(I.path,I.flags,I.mode,function(_,x){if(_){if(I.autoClose)I.destroy();I.emit("error",_)}else I.fd=x,I.emit("open",x),I.read()})}function N(I,_){if(this instanceof N)return O.apply(this,arguments),this;else return N.apply(Object.create(N.prototype),arguments)}function w(){var I=this;v(I.path,I.flags,I.mode,function(_,x){if(_)I.destroy(),I.emit("error",_);else I.fd=x,I.emit("open",x)})}function L(I,_){return new $.ReadStream(I,_)}function R(I,_){return new $.WriteStream(I,_)}var S=$.open;$.open=v;function v(I,_,x,c){if(typeof x==="function")c=x,x=null;return d(I,_,x,c);function d(D0,h,j,C,u){return S(D0,h,j,function(g,p){if(g&&(g.code==="EMFILE"||g.code==="ENFILE"))OX([d,[D0,h,j,C],g,u||Date.now(),Date.now()]);else if(typeof C==="function")C.apply(this,arguments)})}}return $}function OX($){FJ("ENQUEUE",$[0].name,$[1]),j1[GD].push($),oM()}var d3;function Ud(){var $=Date.now();for(var D=0;D<j1[GD].length;++D)if(j1[GD][D].length>2)j1[GD][D][3]=$,j1[GD][D][4]=$;oM()}function oM(){if(clearTimeout(d3),d3=void 0,j1[GD].length===0)return;var $=j1[GD].shift(),D=$[0],J=$[1],X=$[2],Q=$[3],Y=$[4];if(Q===void 0)FJ("RETRY",D.name,J),D.apply(null,J);else if(Date.now()-Q>=60000){FJ("TIMEOUT",D.name,J);var Z=J.pop();if(typeof Z==="function")Z.call(null,X)}else{var F=Date.now()-Y,U=Math.max(Y-Q,1),G=Math.min(U*1.2,100);if(F>=G)FJ("RETRY",D.name,J),D.apply(null,J.concat([Q]));else j1[GD].push($)}if(d3===void 0)d3=setTimeout(oM,0)}});var Wd=A((QL$,qd)=>{function c6($,D){if(typeof D==="boolean")D={forever:D};if(this._originalTimeouts=JSON.parse(JSON.stringify($)),this._timeouts=$,this._options=D||{},this._maxRetryTime=D&&D.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._options.forever)this._cachedTimeouts=this._timeouts.slice(0)}qd.exports=c6;c6.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts};c6.prototype.stop=function(){if(this._timeout)clearTimeout(this._timeout);this._timeouts=[],this._cachedTimeouts=null};c6.prototype.retry=function($){if(this._timeout)clearTimeout(this._timeout);if(!$)return!1;var D=new Date().getTime();if($&&D-this._operationStart>=this._maxRetryTime)return this._errors.unshift(Error("RetryOperation timeout occurred")),!1;this._errors.push($);var J=this._timeouts.shift();if(J===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),J=this._timeouts.shift();else return!1;var X=this,Q=setTimeout(function(){if(X._attempts++,X._operationTimeoutCb){if(X._timeout=setTimeout(function(){X._operationTimeoutCb(X._attempts)},X._operationTimeout),X._options.unref)X._timeout.unref()}X._fn(X._attempts)},J);if(this._options.unref)Q.unref();return!0};c6.prototype.attempt=function($,D){if(this._fn=$,D){if(D.timeout)this._operationTimeout=D.timeout;if(D.cb)this._operationTimeoutCb=D.cb}var J=this;if(this._operationTimeoutCb)this._timeout=setTimeout(function(){J._operationTimeoutCb()},J._operationTimeout);this._operationStart=new Date().getTime(),this._fn(this._attempts)};c6.prototype.try=function($){console.log("Using RetryOperation.try() is deprecated"),this.attempt($)};c6.prototype.start=function($){console.log("Using RetryOperation.start() is deprecated"),this.attempt($)};c6.prototype.start=c6.prototype.try;c6.prototype.errors=function(){return this._errors};c6.prototype.attempts=function(){return this._attempts};c6.prototype.mainError=function(){if(this._errors.length===0)return null;var $={},D=null,J=0;for(var X=0;X<this._errors.length;X++){var Q=this._errors[X],Y=Q.message,Z=($[Y]||0)+1;if($[Y]=Z,Z>=J)D=Q,J=Z}return D}});var zd=A((GS0)=>{var US0=Wd();GS0.operation=function($){var D=GS0.timeouts($);return new US0(D,{forever:$&&$.forever,unref:$&&$.unref,maxRetryTime:$&&$.maxRetryTime})};GS0.timeouts=function($){if($ instanceof Array)return[].concat($);var D={retries:10,factor:2,minTimeout:1000,maxTimeout:1/0,randomize:!1};for(var J in $)D[J]=$[J];if(D.minTimeout>D.maxTimeout)throw Error("minTimeout is greater than maxTimeout");var X=[];for(var Q=0;Q<D.retries;Q++)X.push(this.createTimeout(Q,D));if($&&$.forever&&!X.length)X.push(this.createTimeout(Q,D));return X.sort(function(Y,Z){return Y-Z}),X};GS0.createTimeout=function($,D){var J=D.randomize?Math.random()+1:1,X=Math.round(J*D.minTimeout*Math.pow(D.factor,$));return X=Math.min(X,D.maxTimeout),X};GS0.wrap=function($,D,J){if(D instanceof Array)J=D,D=null;if(!J){J=[];for(var X in $)if(typeof $[X]==="function")J.push(X)}for(var Q=0;Q<J.length;Q++){var Y=J[Q],Z=$[Y];$[Y]=function(U){var G=GS0.operation(D),q=Array.prototype.slice.call(arguments,1),W=q.pop();q.push(function(H){if(G.retry(H))return;if(H)arguments[0]=G.mainError();W.apply(this,arguments)}),G.attempt(function(){U.apply($,q)})}.bind($,Z),$[Y].options=D}}});var Od=A((ZL$,l3)=>{l3.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];if(process.platform!=="win32")l3.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")l3.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var p3=A((FL$,KX)=>{var B1=global.process,UJ=function($){return $&&typeof $==="object"&&typeof $.removeListener==="function"&&typeof $.emit==="function"&&typeof $.reallyExit==="function"&&typeof $.listeners==="function"&&typeof $.kill==="function"&&typeof $.pid==="number"&&typeof $.on==="function"};if(!UJ(B1))KX.exports=function(){return function(){}};else{if(aM=a("assert"),GJ=Od(),sM=/^win/i.test(B1.platform),VX=a("events"),typeof VX!=="function")VX=VX.EventEmitter;if(B1.__signal_exit_emitter__)r1=B1.__signal_exit_emitter__;else r1=B1.__signal_exit_emitter__=new VX,r1.count=0,r1.emitted={};if(!r1.infinite)r1.setMaxListeners(1/0),r1.infinite=!0;KX.exports=function($,D){if(!UJ(global.process))return function(){};if(aM.equal(typeof $,"function","a callback must be provided for exit handler"),qJ===!1)n3();var J="exit";if(D&&D.alwaysLast)J="afterexit";var X=function(){if(r1.removeListener(J,$),r1.listeners("exit").length===0&&r1.listeners("afterexit").length===0)nZ()};return r1.on(J,$),X},nZ=function(){if(!qJ||!UJ(global.process))return;qJ=!1,GJ.forEach(function(D){try{B1.removeListener(D,iZ[D])}catch(J){}}),B1.emit=pZ,B1.reallyExit=i3,r1.count-=1},KX.exports.unload=nZ,x9=function(D,J,X){if(r1.emitted[D])return;r1.emitted[D]=!0,r1.emit(D,J,X)},iZ={},GJ.forEach(function($){iZ[$]=function(){if(!UJ(global.process))return;var J=B1.listeners($);if(J.length===r1.count){if(nZ(),x9("exit",null,$),x9("afterexit",null,$),sM&&$==="SIGHUP")$="SIGINT";B1.kill(B1.pid,$)}}}),KX.exports.signals=function(){return GJ},qJ=!1,n3=function(){if(qJ||!UJ(global.process))return;qJ=!0,r1.count+=1,GJ=GJ.filter(function(D){try{return B1.on(D,iZ[D]),!0}catch(J){return!1}}),B1.emit=$L,B1.reallyExit=eM},KX.exports.load=n3,i3=B1.reallyExit,eM=function(D){if(!UJ(global.process))return;B1.exitCode=D||0,x9("exit",B1.exitCode,null),x9("afterexit",B1.exitCode,null),i3.call(B1,B1.exitCode)},pZ=B1.emit,$L=function(D,J){if(D==="exit"&&UJ(global.process)){if(J!==void 0)B1.exitCode=J;var X=pZ.apply(this,arguments);return x9("exit",B1.exitCode,null),x9("afterexit",B1.exitCode,null),X}else return pZ.apply(this,arguments)}}var aM,GJ,sM,VX,r1,nZ,x9,iZ,qJ,n3,i3,eM,pZ,$L});var Kd=A((VS0,DL)=>{var Vd=Symbol();function zS0($,D,J){let X=D[Vd];if(X)return D.stat($,(Y,Z)=>{if(Y)return J(Y);J(null,Z.mtime,X)});let Q=new Date(Math.ceil(Date.now()/1000)*1000+5);D.utimes($,Q,Q,(Y)=>{if(Y)return J(Y);D.stat($,(Z,F)=>{if(Z)return J(Z);let U=F.mtime.getTime()%1000===0?"s":"ms";Object.defineProperty(D,Vd,{value:U}),J(null,F.mtime,U)})})}function OS0($){let D=Date.now();if($==="s")D=Math.ceil(D/1000)*1000;return new Date(D)}VS0.probe=zS0;VS0.getMtime=OS0});var Bd=A((AS0,oZ)=>{var wS0=a("path"),QL=_1(),MS0=zd(),LS0=p3(),Nd=Kd(),d8={};function rZ($,D){return D.lockfilePath||`${$}.lock`}function YL($,D,J){if(!D.realpath)return J(null,wS0.resolve($));D.fs.realpath($,J)}function XL($,D,J){let X=rZ($,D);D.fs.mkdir(X,(Q)=>{if(!Q)return Nd.probe(X,D.fs,(Y,Z,F)=>{if(Y)return D.fs.rmdir(X,()=>{}),J(Y);J(null,Z,F)});if(Q.code!=="EEXIST")return J(Q);if(D.stale<=0)return J(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:$}));D.fs.stat(X,(Y,Z)=>{if(Y){if(Y.code==="ENOENT")return XL($,{...D,stale:0},J);return J(Y)}if(!wd(Z,D))return J(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:$}));Md($,D,(F)=>{if(F)return J(F);XL($,{...D,stale:0},J)})})})}function wd($,D){return $.mtime.getTime()<Date.now()-D.stale}function Md($,D,J){D.fs.rmdir(rZ($,D),(X)=>{if(X&&X.code!=="ENOENT")return J(X);J()})}function r3($,D){let J=d8[$];if(J.updateTimeout)return;if(J.updateDelay=J.updateDelay||D.update,J.updateTimeout=setTimeout(()=>{J.updateTimeout=null,D.fs.stat(J.lockfilePath,(X,Q)=>{let Y=J.lastUpdate+D.stale<Date.now();if(X){if(X.code==="ENOENT"||Y)return JL($,J,Object.assign(X,{code:"ECOMPROMISED"}));return J.updateDelay=1000,r3($,D)}if(J.mtime.getTime()!==Q.mtime.getTime())return JL($,J,Object.assign(Error("Unable to update lock within the stale threshold"),{code:"ECOMPROMISED"}));let F=Nd.getMtime(J.mtimePrecision);D.fs.utimes(J.lockfilePath,F,F,(U)=>{let G=J.lastUpdate+D.stale<Date.now();if(J.released)return;if(U){if(U.code==="ENOENT"||G)return JL($,J,Object.assign(U,{code:"ECOMPROMISED"}));return J.updateDelay=1000,r3($,D)}J.mtime=F,J.lastUpdate=Date.now(),J.updateDelay=null,r3($,D)})})},J.updateDelay),J.updateTimeout.unref)J.updateTimeout.unref()}function JL($,D,J){if(D.released=!0,D.updateTimeout)clearTimeout(D.updateTimeout);if(d8[$]===D)delete d8[$];D.options.onCompromised(J)}function BS0($,D,J){D={stale:1e4,update:null,realpath:!0,retries:0,fs:QL,onCompromised:(X)=>{throw X},...D},D.retries=D.retries||0,D.retries=typeof D.retries==="number"?{retries:D.retries}:D.retries,D.stale=Math.max(D.stale||0,2000),D.update=D.update==null?D.stale/2:D.update||0,D.update=Math.max(Math.min(D.update,D.stale/2),1000),YL($,D,(X,Q)=>{if(X)return J(X);let Y=MS0.operation(D.retries);Y.attempt(()=>{XL(Q,D,(Z,F,U)=>{if(Y.retry(Z))return;if(Z)return J(Y.mainError());let G=d8[Q]={lockfilePath:rZ(Q,D),mtime:F,mtimePrecision:U,options:D,lastUpdate:Date.now()};r3(Q,D),J(null,(q)=>{if(G.released)return q&&q(Object.assign(Error("Lock is already released"),{code:"ERELEASED"}));Ld(Q,{...D,realpath:!1},q)})})})})}function Ld($,D,J){D={fs:QL,realpath:!0,...D},YL($,D,(X,Q)=>{if(X)return J(X);let Y=d8[Q];if(!Y)return J(Object.assign(Error("Lock is not acquired/owned by you"),{code:"ENOTACQUIRED"}));Y.updateTimeout&&clearTimeout(Y.updateTimeout),Y.released=!0,delete d8[Q],Md(Q,D,J)})}function ES0($,D,J){D={stale:1e4,realpath:!0,fs:QL,...D},D.stale=Math.max(D.stale||0,2000),YL($,D,(X,Q)=>{if(X)return J(X);D.fs.stat(rZ(Q,D),(Y,Z)=>{if(Y)return Y.code==="ENOENT"?J(null,!1):J(Y);return J(null,!wd(Z,D))})})}function RS0(){return d8}LS0(()=>{for(let $ in d8){let D=d8[$].options;try{D.fs.rmdirSync(rZ($,D))}catch(J){}}});AS0.lock=BS0;AS0.unlock=Ld;AS0.check=ES0;AS0.getLocks=RS0});var Rd=A((UL$,Ed)=>{var PS0=_1();function SS0($){let D=["mkdir","realpath","stat","rmdir","utimes"],J={...$};return D.forEach((X)=>{J[X]=(...Q)=>{let Y=Q.pop(),Z;try{Z=$[`${X}Sync`](...Q)}catch(F){return Y(F)}Y(null,Z)}}),J}function xS0($){return(...D)=>new Promise((J,X)=>{D.push((Q,Y)=>{if(Q)X(Q);else J(Y)}),$(...D)})}function vS0($){return(...D)=>{let J,X;if(D.push((Q,Y)=>{J=Q,X=Y}),$(...D),J)throw J;return X}}function _S0($){if($={...$},$.fs=SS0($.fs||PS0),typeof $.retries==="number"&&$.retries>0||$.retries&&typeof $.retries.retries==="number"&&$.retries.retries>0)throw Object.assign(Error("Cannot use retries with the sync api"),{code:"ESYNC"});return $}Ed.exports={toPromise:xS0,toSync:vS0,toSyncOptions:_S0}});var Id=A((GL$,v9)=>{var NX=Bd(),{toPromise:o3,toSync:t3,toSyncOptions:ZL}=Rd();async function Ad($,D){let J=await o3(NX.lock)($,D);return o3(J)}function kS0($,D){let J=t3(NX.lock)($,ZL(D));return t3(J)}function uS0($,D){return o3(NX.unlock)($,D)}function yS0($,D){return t3(NX.unlock)($,ZL(D))}function fS0($,D){return o3(NX.check)($,D)}function hS0($,D){return t3(NX.check)($,ZL(D))}v9.exports=Ad;v9.exports.lock=Ad;v9.exports.unlock=uS0;v9.exports.lockSync=kS0;v9.exports.unlockSync=yS0;v9.exports.check=fS0;v9.exports.checkSync=hS0});var vd=A((Sd)=>{Object.defineProperty(Sd,"__esModule",{value:!0});Sd.canStoreURLs=Sd.FileUrlStorage=void 0;var jd=a("fs"),bS0=mS0($d()),Cd=gS0(Id());function Pd($){if(typeof WeakMap!="function")return null;var D=new WeakMap,J=new WeakMap;return(Pd=function(X){return X?J:D})($)}function gS0($,D){if(!D&&$&&$.__esModule)return $;if($===null||typeof $!="object"&&typeof $!="function")return{default:$};var J=Pd(D);if(J&&J.has($))return J.get($);var X={__proto__:null},Q=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Y in $)if(Y!=="default"&&{}.hasOwnProperty.call($,Y)){var Z=Q?Object.getOwnPropertyDescriptor($,Y):null;Z&&(Z.get||Z.set)?Object.defineProperty(X,Y,Z):X[Y]=$[Y]}return X.default=$,J&&J.set($,X),X}function mS0($){return $&&$.__esModule?$:{default:$}}function tZ($){return tZ=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(D){return typeof D}:function(D){return D&&typeof Symbol=="function"&&D.constructor===Symbol&&D!==Symbol.prototype?"symbol":typeof D},tZ($)}function dS0($,D){if(!($ instanceof D))throw TypeError("Cannot call a class as a function")}function Td($,D){for(var J=0;J<D.length;J++){var X=D[J];if(X.enumerable=X.enumerable||!1,X.configurable=!0,"value"in X)X.writable=!0;Object.defineProperty($,lS0(X.key),X)}}function cS0($,D,J){if(D)Td($.prototype,D);if(J)Td($,J);return Object.defineProperty($,"prototype",{writable:!1}),$}function lS0($){var D=nS0($,"string");return tZ(D)=="symbol"?D:D+""}function nS0($,D){if(tZ($)!="object"||!$)return $;var J=$[Symbol.toPrimitive];if(J!==void 0){var X=J.call($,D||"default");if(tZ(X)!="object")return X;throw TypeError("@@toPrimitive must return a primitive value.")}return(D==="string"?String:Number)($)}var qL$=Sd.canStoreURLs=!0,WL$=Sd.FileUrlStorage=function(){function $(D){dS0(this,$),this.path=D}return cS0($,[{key:"findAllUploads",value:function(){var J=this;return new Promise(function(X,Q){J._getItems("tus::",function(Y,Z){if(Y)Q(Y);else X(Z)})})}},{key:"findUploadsByFingerprint",value:function(J){var X=this;return new Promise(function(Q,Y){X._getItems("tus::".concat(J),function(Z,F){if(Z)Y(Z);else Q(F)})})}},{key:"removeUpload",value:function(J){var X=this;return new Promise(function(Q,Y){X._removeItem(J,function(Z){if(Z)Y(Z);else Q()})})}},{key:"addUpload",value:function(J,X){var Q=this,Y=Math.round(Math.random()*1000000000000),Z="tus::".concat(J,"::").concat(Y);return new Promise(function(F,U){Q._setItem(Z,X,function(G){if(G)U(G);else F(Z)})})}},{key:"_setItem",value:function(J,X,Q){var Y=this;Cd.lock(this.path,this._lockfileOptions()).then(function(Z){Q=Y._releaseAndCb(Z,Q),Y._getData(function(F,U){if(F){Q(F);return}U[J]=X,Y._writeData(U,function(G){return Q(G)})})}).catch(Q)}},{key:"_getItems",value:function(J,X){this._getData(function(Q,Y){if(Q){X(Q);return}var Z=Object.keys(Y).filter(function(F){return F.startsWith(J)}).map(function(F){var U=Y[F];return U.urlStorageKey=F,U});X(null,Z)})}},{key:"_removeItem",value:function(J,X){var Q=this;Cd.lock(this.path,this._lockfileOptions()).then(function(Y){X=Q._releaseAndCb(Y,X),Q._getData(function(Z,F){if(Z){X(Z);return}delete F[J],Q._writeData(F,function(U){return X(U)})})}).catch(X)}},{key:"_lockfileOptions",value:function(){return{realpath:!1,retries:{retries:5,minTimeout:20}}}},{key:"_releaseAndCb",value:function(J,X){return function(Q){if(Q){J().then(function(){return X(Q)}).catch(function(Y){return X((0,bS0.default)([Q,Y]))});return}J().then(X).catch(X)}}},{key:"_writeData",value:function(J,X){var Q={encoding:"utf8",mode:432,flag:"w"};(0,jd.writeFile)(this.path,JSON.stringify(J),Q,function(Y){return X(Y)})}},{key:"_getData",value:function(J){(0,jd.readFile)(this.path,"utf8",function(X,Q){if(X){if(X.code==="ENOENT")J(null,{});else J(X);return}try{Q=!Q.trim().length?{}:JSON.parse(Q)}catch(Y){J(Y);return}J(null,Q)})}}])}()});var s3=A((_9)=>{Object.defineProperty(_9,"__esModule",{value:!0});Object.defineProperty(_9,"DefaultHttpStack",{enumerable:!0,get:function(){return yd.default}});Object.defineProperty(_9,"DetailedError",{enumerable:!0,get:function(){return pS0.default}});Object.defineProperty(_9,"FileUrlStorage",{enumerable:!0,get:function(){return fd.FileUrlStorage}});Object.defineProperty(_9,"StreamSource",{enumerable:!0,get:function(){return sS0.default}});_9.Upload=void 0;Object.defineProperty(_9,"canStoreURLs",{enumerable:!0,get:function(){return fd.canStoreURLs}});_9.defaultOptions=void 0;Object.defineProperty(_9,"enableDebugLog",{enumerable:!0,get:function(){return rS0.enableDebugLog}});_9.isSupported=void 0;var pS0=WJ(ZM()),rS0=FM(),oS0=WJ(Ib()),FL=WJ(Qg()),tS0=WJ(Ag()),aS0=WJ(Pg()),yd=WJ(ng()),sS0=WJ(wM()),fd=vd();function WJ($){return $&&$.__esModule?$:{default:$}}function MX($){return MX=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(D){return typeof D}:function(D){return D&&typeof Symbol=="function"&&D.constructor===Symbol&&D!==Symbol.prototype?"symbol":typeof D},MX($)}function eS0($,D){if(!($ instanceof D))throw TypeError("Cannot call a class as a function")}function _d($,D){for(var J=0;J<D.length;J++){var X=D[J];if(X.enumerable=X.enumerable||!1,X.configurable=!0,"value"in X)X.writable=!0;Object.defineProperty($,bd(X.key),X)}}function $x0($,D,J){if(D)_d($.prototype,D);if(J)_d($,J);return Object.defineProperty($,"prototype",{writable:!1}),$}function Dx0($,D,J){return D=a3(D),Jx0($,hd()?Reflect.construct(D,J||[],a3($).constructor):D.apply($,J))}function Jx0($,D){if(D&&(MX(D)==="object"||typeof D==="function"))return D;else if(D!==void 0)throw TypeError("Derived constructors may only return object or undefined");return Xx0($)}function Xx0($){if($===void 0)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return $}function hd(){try{var $=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(D){}return(hd=function(){return!!$})()}function a3($){return a3=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(J){return J.__proto__||Object.getPrototypeOf(J)},a3($)}function Qx0($,D){if(typeof D!=="function"&&D!==null)throw TypeError("Super expression must either be null or a function");if($.prototype=Object.create(D&&D.prototype,{constructor:{value:$,writable:!0,configurable:!0}}),Object.defineProperty($,"prototype",{writable:!1}),D)UL($,D)}function UL($,D){return UL=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(X,Q){return X.__proto__=Q,X},UL($,D)}function kd($,D){var J=Object.keys($);if(Object.getOwnPropertySymbols){var X=Object.getOwnPropertySymbols($);D&&(X=X.filter(function(Q){return Object.getOwnPropertyDescriptor($,Q).enumerable})),J.push.apply(J,X)}return J}function wX($){for(var D=1;D<arguments.length;D++){var J=arguments[D]!=null?arguments[D]:{};D%2?kd(Object(J),!0).forEach(function(X){Yx0($,X,J[X])}):Object.getOwnPropertyDescriptors?Object.defineProperties($,Object.getOwnPropertyDescriptors(J)):kd(Object(J)).forEach(function(X){Object.defineProperty($,X,Object.getOwnPropertyDescriptor(J,X))})}return $}function Yx0($,D,J){if(D=bd(D),D in $)Object.defineProperty($,D,{value:J,enumerable:!0,configurable:!0,writable:!0});else $[D]=J;return $}function bd($){var D=Zx0($,"string");return MX(D)=="symbol"?D:D+""}function Zx0($,D){if(MX($)!="object"||!$)return $;var J=$[Symbol.toPrimitive];if(J!==void 0){var X=J.call($,D||"default");if(MX(X)!="object")return X;throw TypeError("@@toPrimitive must return a primitive value.")}return(D==="string"?String:Number)($)}var ud=_9.defaultOptions=wX(wX({},FL.default.defaultOptions),{},{httpStack:new yd.default,fileReader:new tS0.default,urlStorage:new oS0.default,fingerprint:aS0.default}),zL$=_9.Upload=function($){function D(){var J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return eS0(this,D),X=wX(wX({},ud),X),Dx0(this,D,[J,X])}return Qx0(D,$),$x0(D,null,[{key:"terminate",value:function(X){var Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Q=wX(wX({},ud),Q),FL.default.terminate(X,Q)}}])}(FL.default),OL$=_9.isSupported=!0});var qD;var c8=s(()=>{qD={name:"@capgo/cli",type:"module",version:"8.31.0",description:"A CLI to upload to capgo servers",author:"Martin martin@capgo.app",license:"Apache 2.0",homepage:"https://github.com/Cap-go/capgo/tree/main/cli#readme",repository:{type:"git",url:"git+https://github.com/Cap-go/capgo.git",directory:"cli"},bugs:{url:"https://github.com/Cap-go/capgo/issues"},keywords:["appflow alternative","ionic","capacitor","auto update","live update","capgo","cli","upload","capgo-cli","sdk","tanstack-intent"],exports:{".":{import:"./dist/index.js",require:"./dist/index.js"},"./sdk":{types:"./dist/src/sdk.d.ts",import:"./dist/src/sdk.js"}},main:"dist/index.js",types:"dist/src/index.d.ts",bin:{capgo:"dist/index.js"},files:["!skills/_artifacts","dist","skills"],engines:{npm:">=8.0.0",node:">=20.0.0"},scripts:{build:"tsc && bun build.mjs",dev:"NODE_ENV=development ncc build","no-debug":"node dist/index.js","dev-build":"SUPA_DB=development ncc build",pack:"pkg",types:"bunx --bun supabase gen types typescript --project-id=xvwzpoazmxkqosrdewyv > src/types/supabase.types.ts",typecheck:"tsgo --project tsconfig.tsgo.json --noEmit",lint:"bun run lint:ox","lint:ox":"oxlint --config ../.oxlintrc.json src","lint:fix":"oxlint --config ../.oxlintrc.json --fix src","check-posix-paths":"node test/check-posix-paths.js","generate-docs":"node dist/index.js generate-docs README.md","test:bundle":"bun test/test-bundle.mjs","test:prescan":"bun test test/prescan/","test:functional":"bun test/test-functional.mjs","test:semver":"bun test/test-semver-validation.mjs","test:version-edge-cases":"bun test/test-version-validation.mjs","test:regex":"bun test/test-regex-validation.mjs","test:upload":"bun test/test-upload-validation.mjs","test:fail-on-incompatible":"bun test/test-fail-on-incompatible.mjs","test:native-dependencies":"bun test/test-native-dependencies.mjs","test:credentials":"bun test/test-credentials.mjs","test:asc-key-protocol":"bun test/test-asc-key-protocol.mjs","test:credentials-validation":"bun test/test-credentials-validation.mjs","test:android-service-account-validation":"bun test/test-android-service-account-validation.mjs","test:build-zip-filter":"bun test/test-build-zip-filter.mjs","test:checksum":"bun test/test-checksum-algorithm.mjs","test:build-needed":"bun test/test-build-needed.mjs","test:ci-prompts":"bun test/test-ci-prompts.mjs","test:ci-secrets":"bun test/test-ci-secrets.mjs","test:android-onboarding-progress":"bun test/test-android-onboarding-progress.mjs","test:onboarding-telemetry":"bun test/test-onboarding-telemetry.mjs","test:v2-event-migration":"bun test/test-v2-event-migration.mjs","test:analytics":"bun test/test-analytics.mjs","test:analytics-error-category":"bun test/test-analytics-error-category.mjs","test:analytics-org-resolver":"bun test/test-analytics-org-resolver.mjs","test:supabase-perf":"bun test/test-supabase-perf.mjs","test:preview-qr":"bun test/test-preview-qr.mjs","test:mcp-analytics":"bun test/test-mcp-analytics.mjs","test:mcp-instructions":"bun test/test-mcp-instructions.mjs","test:mcp-stdout-guard":"bun test/test-mcp-stdout-guard.mjs","test:mcp-platform-select":"bun test/test-mcp-platform-select.mjs","test:mcp-explain-scopes":"bun test/test-mcp-explain-scopes.mjs","test:mcp-oauth-reopen":"bun test/test-mcp-oauth-reopen.mjs","test:mcp-broker-oauth":"bun test/test-mcp-broker-oauth.mjs","test:mcp-broker-session":"bun test/test-mcp-broker-session.mjs","test:mcp-credentials-manage":"bun test/test-mcp-credentials-manage.mjs","test:mcp-resume-prompt":"bun test/test-mcp-resume-prompt.mjs","test:mcp-build-job":"bun test/test-mcp-build-job.mjs","test:mcp-build-tools":"bun test/test-mcp-build-tools.mjs","test:app-created-source":"bun test/test-app-created-source.mjs","test:doctor-analytics":"bun test/test-doctor-analytics.mjs","test:posthog-exception":"bun test/test-posthog-exception.mjs","test:onboarding-recovery":"bun test/test-onboarding-recovery.mjs","test:onboarding-progress":"bun test/test-onboarding-progress.mjs","test:onboarding-run-targets":"bun test/test-onboarding-run-targets.mjs","test:run-device-command":"bun test/test-run-device-command.mjs","test:init-app-conflict":"bun test/test-init-app-conflict.mjs","test:init-guardrails":"bun test/test-init-guardrails.mjs","test:init-replay":"bun test/test-init-replay.mjs","test:capacitor-config-target":"bun test/test-capacitor-config-target.mjs","test:init-monorepo-targeting":"bun run test:capacitor-config-target && bun test/test-init-monorepo-targeting.mjs","test:prompt-preferences":"bun test/test-prompt-preferences.mjs","test:esm-sdk":"node test/test-sdk-esm.mjs","test:auth-session":"bun test/test-auth-session.mjs","test:mcp":"node test/test-mcp.mjs","test:mcp-no-key-handshake":"node test/test-mcp-no-key-handshake.mjs","test:version-detection":"node test/test-get-installed-version.mjs","test:version-detection:setup":"./test/fixtures/setup-test-projects.sh","test:platform-paths":"bun test/test-platform-paths.mjs","test:project-type-detection":"bun test/test-project-type-detection.mjs","test:payload-split":"bun test/test-payload-split.mjs","test:macos-signing":"bun test/test-macos-signing.mjs","test:helper-dce":"bash scripts/check-helper-dce.sh","test:apple-api-import-helpers":"bun test/test-apple-api-import-helpers.mjs","test:apple-api-verify-key":"bun test/test-apple-api-verify-key.mjs","test:bundle-id-detector":"bun test/test-bundle-id-detector.mjs","test:apple-api-app-list":"bun test/test-apple-api-app-list.mjs","test:apple-api-cert-create":"bun test/test-apple-api-cert-create.mjs","test:app-verification":"bun test/test-app-verification.mjs","test:pbxproj-parser":"bun test/test-pbxproj-parser.mjs","test:manifest-path-encoding":"bun test/test-manifest-path-encoding.mjs","test:self-update":"bun test/test-self-update.mjs","test:update-prompt":"bun test/test-update-prompt.mjs","test:android-tail-engine":"bun test/test-android-tail-engine.mjs","test:android-tail-render":"bun test/test-android-tail-render.mjs","test:android-tail-routing":"bun test/test-android-tail-routing.mjs","test:dev-gate-stripped":"bun test/test-dev-gate-stripped.mjs","test:frame-fit-ios-shared":"bun test/test-frame-fit-ios-shared.mjs","test:ios-confirm-app-id":"bun test/test-ios-confirm-app-id.mjs","test:ios-create-new":"bun test/test-ios-create-new.mjs","test:ios-e2e":"bun test/test-ios-e2e.mjs","test:ios-flow-contract":"bun test/test-ios-flow-contract.mjs","test:ios-import-discovery":"bun test/test-ios-import-discovery.mjs","test:ios-import-export":"bun test/test-ios-import-export.mjs","test:ios-import-pickers":"bun test/test-ios-import-pickers.mjs","test:ios-import-recovery":"bun test/test-ios-import-recovery.mjs","test:ios-recovery":"bun test/test-ios-recovery.mjs","test:ios-resume":"bun test/test-ios-resume.mjs","test:ios-tail-handoff":"bun test/test-ios-tail-handoff.mjs","test:ios-tui-render":"bun test/test-ios-tui-render.mjs","test:p8-error":"bun test/test-p8-error.mjs","test:ios-tui-routing":"bun test/test-ios-tui-routing.mjs","test:ios-updater-sync-validation":"bun test/test-ios-updater-sync-validation.mjs","test:ios-verify-app":"bun test/test-ios-verify-app.mjs","test:ios-marketing-version":"bun test/test-ios-marketing-version.mjs","test:platform-flow-contract":"bun test/test-platform-flow-contract.mjs","test:tail-engine-shared":"bun test/test-tail-engine-shared.mjs",test:"bun run build && bun run test:helper-dce && bun run test:version-detection:setup && bun run test:bundle && bun run test:functional && bun run test:semver && bun run test:version-edge-cases && bun run test:regex && bun run test:upload && bun run test:fail-on-incompatible && bun run test:native-dependencies && bun run test:credentials && bun run test:credentials-validation && bun run test:android-service-account-validation && bun run test:build-zip-filter && bun run test:checksum && bun run test:build-needed && bun run test:ci-prompts && bun run test:ci-secrets && bun run test:android-onboarding-progress && bun run test:onboarding-telemetry && bun run test:v2-event-migration && bun run test:analytics && bun run test:analytics-error-category && bun run test:analytics-org-resolver && bun run test:supabase-perf && bun run test:preview-qr && bun run test:app-set-options && bun run test:mcp-analytics && bun run test:mcp-instructions && bun run test:mcp-live-update-onboarding && bun run test:mcp-stdout-guard && bun run test:mcp-platform-select && bun run test:mcp-explain-scopes && bun run test:mcp-oauth-reopen && bun run test:mcp-broker-oauth && bun run test:mcp-broker-session && bun run test:mcp-credentials-manage && bun run test:mcp-resume-prompt && bun run test:mcp-build-job && bun run test:mcp-build-tools && bun run test:app-created-source && bun run test:doctor-analytics && bun run test:posthog-exception && bun run test:build-platform-selection && bun run test:onboarding-recovery && bun run test:onboarding-progress && bun run test:onboarding-run-targets && bun run test:run-device-command && bun run test:init-monorepo-targeting && bun run test:init-app-conflict && bun run test:init-guardrails && bun run test:init-replay && bun run test:prompt-preferences && bun run test:esm-sdk && bun run test:mcp && bun run test:mcp-no-key-handshake && bun run test:auth-session && bun run test:version-detection && bun run test:platform-paths && bun run test:project-type-detection && bun run test:payload-split && bun run test:manifest-path-encoding && bun run test:macos-signing && bun run test:asc-key-protocol && bun run test:apple-api-import-helpers && bun run test:apple-api-verify-key && bun run test:bundle-id-detector && bun run test:apple-api-app-list && bun run test:app-verification && bun run test:pbxproj-parser && bun run test:ai-log-capture && bun run test:ai-analyze-flow && bun run test:cicd-failure-help && bun run test:ai-sse-parser && bun run test:ai-render-markdown && bun run test:ai-stream-markdown && bun run test:ai-onboarding-mode && bun run test:ai-fit && bun run test:platform-layout && bun run test:frame-fit && bun run test:onboarding-min-size && bun run test:min-size-gate && bun run test:shell-size-gate && bun run test:build-log-sanitize && bun run test:build-output-viewport && bun run test:diff-viewer-viewport && bun run test:build-complete-exit && bun run test:ai-analyze-stream && bun run test:support-mailto && bun run test:support-redact && bun run test:support-internal-log && bun run test:support-help-menu && bun run test:support-contact && bun run test:support-upload-prompt && bun run test:support-bundle-files && bun run test:self-update && bun run test:update-prompt && bun run test:apple-api-cert-create && bun run test:android-tail-engine && bun run test:android-tail-render && bun run test:android-tail-routing && bun run test:dev-gate-stripped && bun run test:frame-fit-ios-shared && bun run test:ios-confirm-app-id && bun run test:ios-create-new && bun run test:ios-e2e && bun run test:ios-flow-contract && bun run test:ios-import-discovery && bun run test:ios-import-export && bun run test:ios-import-pickers && bun run test:ios-import-recovery && bun run test:ios-recovery && bun run test:ios-resume && bun run test:ios-tail-handoff && bun run test:ios-tui-render && bun run test:p8-error && bun run test:ios-tui-routing && bun run test:ios-updater-sync-validation && bun run test:ios-verify-app && bun run test:ios-marketing-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-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:organization-set-api-host","test:build-platform-selection":"bun test/test-build-platform-selection.mjs","test:ai-log-capture":"bun test/test-ai-log-capture.mjs","test:ai-analyze-flow":"bun test/test-ai-analyze-flow.mjs","test:cicd-failure-help":"bun test/test-cicd-failure-help.mjs","test:ai-analyze-stream":"bun test/test-ai-analyze-stream.mjs","test:ai-sse-parser":"bun test/test-ai-sse-parser.mjs","test:ai-render-markdown":"bun test/test-ai-render-markdown.mjs","test:ai-onboarding-mode":"bun test/test-ai-onboarding-mode.mjs","test:ai-fit":"bun test/test-ai-fit.mjs","test:platform-layout":"bun test/test-platform-layout.mjs","test:frame-fit":"bun test/run-frame-fit.mjs","test:onboarding-min-size":"bun test/test-onboarding-min-size.mjs","test:min-size-gate":"bun test/test-min-size-gate.mjs","test:shell-size-gate":"bun test/test-shell-size-gate.mjs","test:build-log-sanitize":"bun test/test-build-log-sanitize.mjs","test:build-output-viewport":"bun test/test-build-output-viewport.mjs","test:diff-viewer-viewport":"bun test/test-diff-viewer-viewport.mjs","test:build-complete-exit":"bun test/test-build-complete-exit.mjs","test:ai-stream-markdown":"bun test/test-ai-stream-markdown.mjs","test:support-mailto":"bun test/test-support-mailto.mjs","test:support-redact":"bun test/test-support-redact.mjs","test:support-internal-log":"bun test/test-support-internal-log.mjs","test:support-help-menu":"bun test/test-support-help-menu.mjs","test:support-contact":"bun test/test-support-contact.mjs","test:support-upload-prompt":"bun test/test-support-upload-prompt.mjs","test:support-bundle-files":"bun test/test-support-bundle-files.mjs","test:mcp-live-update-onboarding":"bun test/test-mcp-live-update-onboarding.mjs","test:app-set-options":"bun test/test-app-set-options.mjs","test:android-reporting-api":"bun test/test-android-reporting-api.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:organization-set-api-host":"bun test/test-organization-set-api-host.mjs"},dependencies:{"@inkjs/ui":"^2.0.0","@rrweb/types":"^2.1.1","@xterm/addon-serialize":"^0.14.0","@xterm/headless":"^6.0.0","happy-dom":"^20.11.0",ink:"^7.1.1","ink-spinner":"^5.0.0",jsonwebtoken:"^9.0.3","node-forge":"^1.4.0",qrcode:"^1.5.4",react:"^19.2.8","rrweb-snapshot":"^2.1.1","string-width":"^8.2.2",zod:"^4.4.3","@standard-schema/spec":"^1.1.0"},optionalDependencies:{"@capgo/cli-helper-darwin-arm64":"^1.1.1","@capgo/cli-helper-darwin-x64":"^1.1.1","node-pty":"^1.1.0"},devDependencies:{"@antfu/eslint-config":"^9.2.0","@bradenmacdonald/s3-lite-client":"npm:@jsr/bradenmacdonald__s3-lite-client@0.9.6","@capacitor/cli":"^8.4.2","@capgo/find-package-manager":"^0.0.18","@clack/prompts":"^1.7.0","@modelcontextprotocol/client":"^2.0.0-beta.5","@modelcontextprotocol/server":"^2.0.0-beta.5","@sauber/table":"npm:@jsr/sauber__table","@std/semver":"npm:@jsr/std__semver@1.0.8","@supabase/supabase-js":"^2.110.8","@tanstack/intent":"^0.3.6","@types/adm-zip":"^0.5.8","@types/jsonwebtoken":"^9.0.10","@types/node":"^26.1.1","@types/node-forge":"^1.3.14","@types/prettyjson":"^0.0.33","@types/qrcode":"^1.5.6","@types/react":"^19.2.17","@types/tmp":"^0.2.6","@types/ws":"^8.18.1","@typescript/native-preview":"7.0.0-dev.20260707.2","@vercel/ncc":"^0.44.1","@xterm/headless":"^6.0.0","adm-zip":"^0.6.0","ci-info":"^4.4.0",commander:"^15.0.0",eslint:"^10.7.0","git-format-staged":"4.0.1",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",typescript:"6.0.3",ws:"^8.21.1"}}});import{platform as Ux0,release as Gx0}from"node:os";import{arch as qx0,version as Wx0}from"node:process";function GL(){return cd}function qL(){let $={cli_version:qD.version,node_version:Wx0,os_platform:Ux0(),os_arch:qx0,os_release:Gx0(),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone||"undefined",is_ci:aZ.isCI,is_tty:Boolean(process.stdout.isTTY),invocation_source:cd};if(aZ.name)$.ci_provider=aZ.name;return $}var aZ,cd="cli";var WL=s(()=>{c8();aZ=A$(ew(),1)});import{AsyncLocalStorage as Hx0}from"node:async_hooks";function LX($,D){return nd.run($,()=>Promise.resolve(D()))}function zx0(){return nd.getStore()}function id(){return Ox0}function rd($){pd=$}function ld($){try{pd?.($)}catch{}}function td($,D){let J;try{J=new URL($).pathname}catch{J=$.split("?")[0]}let X="/functions/v1/",Q=J.indexOf(X);if(Q>=0){let G=J.slice(Q+X.length).replace(/^\/+|\/+$/g,"");return G?`${D} functions:${G}`:`${D} functions`}let Y="/rest/v1/",Z=J.indexOf(Y),F=Z>=0?J.slice(Z+Y.length):J.replace(/^\//,"");if(F.startsWith("rpc/"))return`rpc:${F.slice(4).split("/")[0]}`;let U=F.split("/")[0]||J;return`${D} ${U}`}function Vx0($){let D=$?.headers;if(!D)return;let J=D.get;if(typeof J==="function")return J.call(D,"capgkey")??void 0;if(Array.isArray(D))return D.find(([X])=>X.toLowerCase()==="capgkey")?.[1];return D.capgkey}function ad(){return async(D,J)=>{let X=(J?.method??"GET").toUpperCase(),Q=typeof D==="string"?D:D instanceof URL?D.href:D.url,Y=zx0(),Z=Vx0(J),F=Date.now();try{let U=await globalThis.fetch(D,J);return ld({url:Q,method:X,status:U.status,ok:U.ok,durationMs:Date.now()-F,source:Y,apikey:Z}),U}catch(U){throw ld({url:Q,method:X,status:0,ok:!1,durationMs:Date.now()-F,source:Y,apikey:Z,error:U}),U}}}var nd,Ox0=!1,pd,od=5000;var e3=s(()=>{nd=new Hx0});function sd($,D){let X=["normal","bold","dim","italic","underline","strikethrough"].indexOf($),Q="\x1B[";return"\x1B["+X+"m"+D+"\x1B[0m"}var j6;var ed=s(()=>{j6=class j6{title=null;headers=[];rows=[];static narrowTheme={top:["╔","═","╤","╗"],row:["║"," ","│","║"],div:["╟","─","┼","╢"],bot:["╚","═","╧","╝"]};static wideTheme={top:["╔═","═","═╤═","═╗"],row:["║ "," "," │ "," ║"],div:["╟─","─","─┼─","─╢"],bot:["╚═","═","═╧═","═╝"]};static roundTheme={top:["╭─","─","─┬─","─╮"],row:["│ "," "," │ "," │"],div:["├─","─","─┼─","─┤"],bot:["╰─","─","─┴─","─╯"]};theme=j6.wideTheme;columnWidth(){let $=[this.headers,...this.rows].filter((J)=>J.length>0),D=$[0].map((J)=>this.cast(J).length);for(let J of $.slice(1))for(let X=0;X<D.length;X++){let Q=this.cast(J[X]).length;if(Q>D[X])D[X]=Q}return D}cast($){if(typeof $==="object")return"obj";if($!==void 0&&typeof $.toString==="function")return $.toString();else return""}renderTitle(){return"[ "+this.title+" ]"}renderLine($){let D=this.columnWidth();return $[0]+D.map((J)=>$[1].repeat(J)).join($[2])+$[3]}renderCell($,D,J=!1){let X=this.cast($),Q=J?sd("bold",X):X,Y=D-X.length,Z=this.theme.row[1];switch(typeof $){case"number":return Z.repeat(Y)+Q;case"string":return Q+Z.repeat(Y);case"boolean":case"object":return Z.repeat(Math.ceil(Y/2))+sd("italic",X)+Z.repeat(Math.floor(Y/2));default:return Z.repeat(Y)}}renderRow($,D=!1){let J=this.theme.row,X=this.columnWidth();return J[0]+$.map((Q,Y)=>this.renderCell(Q,X[Y],D)).join(J[2])+J[3]}toString(){let $=this.theme,D=this.headers.length>0,J=this.rows.length>0;return[this.title?this.renderTitle():"",D||J?this.renderLine($.top):"",D?this.renderRow(this.headers,!0):"",D&&J?this.renderLine($.div):"",...this.rows.map((X)=>this.renderRow(X)),D||J?this.renderLine($.bot):""].filter((X)=>X.length>0).join(`
113
113
  `)}}});var BX=s(()=>{ed()});async function $W($){try{let J=`https://registry.npmjs.org/${encodeURIComponent($.toLowerCase())}`,X=await fetch(J,{headers:{accept:"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"}});if(!X.ok)return null;return(await X.json())["dist-tags"]?.latest||null}catch{return null}}async function Kx0(){let $=await $W("@capgo/cli")??"",D=$?.split(".")[0]??"";return{currentVersion:qD.version,latestVersion:$,isOutdated:!!$&&$!==qD.version,majorVersion:D}}async function Z1(){let{isOutdated:$,currentVersion:D,latestVersion:J,majorVersion:X}=await Kx0();if($)B.warning(`\uD83D\uDEA8 You are using @capgo/cli@${D} it's not the latest version.
114
114
  Please use @capgo/cli@${J}" or @capgo/cli@${X} to keep up to date with the latest features and bug fixes.`)}var yD=s(()=>{Y$();c8()});async function $c($,D,J,X,Q,Y="✅",Z){await i0(J,{channel:$,event:X,icon:Y,org_id:D,tracking_version:2,...Q||Z?{tags:{...Q?{"app-id":Q}:{},...Z}}:{},notify:!1})}var Dc=s(()=>{Y$();BX();yD();e0()});var HL=A((yL$,Jc)=>{var EX=1000,RX=EX*60,AX=RX*60,HJ=AX*24,Nx0=HJ*7,wx0=HJ*365.25;Jc.exports=function($,D){D=D||{};var J=typeof $;if(J==="string"&&$.length>0)return Mx0($);else if(J==="number"&&isFinite($))return D.long?Bx0($):Lx0($);throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify($))};function Mx0($){if($=String($),$.length>100)return;var D=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec($);if(!D)return;var J=parseFloat(D[1]),X=(D[2]||"ms").toLowerCase();switch(X){case"years":case"year":case"yrs":case"yr":case"y":return J*wx0;case"weeks":case"week":case"w":return J*Nx0;case"days":case"day":case"d":return J*HJ;case"hours":case"hour":case"hrs":case"hr":case"h":return J*AX;case"minutes":case"minute":case"mins":case"min":case"m":return J*RX;case"seconds":case"second":case"secs":case"sec":case"s":return J*EX;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return J;default:return}}function Lx0($){var D=Math.abs($);if(D>=HJ)return Math.round($/HJ)+"d";if(D>=AX)return Math.round($/AX)+"h";if(D>=RX)return Math.round($/RX)+"m";if(D>=EX)return Math.round($/EX)+"s";return $+"ms"}function Bx0($){var D=Math.abs($);if(D>=HJ)return DW($,D,HJ,"day");if(D>=AX)return DW($,D,AX,"hour");if(D>=RX)return DW($,D,RX,"minute");if(D>=EX)return DW($,D,EX,"second");return $+" ms"}function DW($,D,J,X){var Q=D>=J*1.5;return Math.round($/J)+" "+X+(Q?"s":"")}});var zL=A((fL$,Xc)=>{function Ex0($){J.debug=J,J.default=J,J.coerce=U,J.disable=Z,J.enable=Q,J.enabled=F,J.humanize=HL(),J.destroy=G,Object.keys($).forEach((q)=>{J[q]=$[q]}),J.names=[],J.skips=[],J.formatters={};function D(q){let W=0;for(let H=0;H<q.length;H++)W=(W<<5)-W+q.charCodeAt(H),W|=0;return J.colors[Math.abs(W)%J.colors.length]}J.selectColor=D;function J(q){let W,H=null,z,O;function V(...K){if(!V.enabled)return;let M=V,E=Number(new Date),N=E-(W||E);if(M.diff=N,M.prev=W,M.curr=E,W=E,K[0]=J.coerce(K[0]),typeof K[0]!=="string")K.unshift("%O");let w=0;K[0]=K[0].replace(/%([a-zA-Z%])/g,(R,S)=>{if(R==="%%")return"%";w++;let v=J.formatters[S];if(typeof v==="function"){let I=K[w];R=v.call(M,I),K.splice(w,1),w--}return R}),J.formatArgs.call(M,K),(M.log||J.log).apply(M,K)}if(V.namespace=q,V.useColors=J.useColors(),V.color=J.selectColor(q),V.extend=X,V.destroy=J.destroy,Object.defineProperty(V,"enabled",{enumerable:!0,configurable:!1,get:()=>{if(H!==null)return H;if(z!==J.namespaces)z=J.namespaces,O=J.enabled(q);return O},set:(K)=>{H=K}}),typeof J.init==="function")J.init(V);return V}function X(q,W){let H=J(this.namespace+(typeof W>"u"?":":W)+q);return H.log=this.log,H}function Q(q){J.save(q),J.namespaces=q,J.names=[],J.skips=[];let W=(typeof q==="string"?q:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let H of W)if(H[0]==="-")J.skips.push(H.slice(1));else J.names.push(H)}function Y(q,W){let H=0,z=0,O=-1,V=0;while(H<q.length)if(z<W.length&&(W[z]===q[H]||W[z]==="*"))if(W[z]==="*")O=z,V=H,z++;else H++,z++;else if(O!==-1)z=O+1,V++,H=V;else return!1;while(z<W.length&&W[z]==="*")z++;return z===W.length}function Z(){let q=[...J.names,...J.skips.map((W)=>"-"+W)].join(",");return J.enable(""),q}function F(q){for(let W of J.skips)if(Y(q,W))return!1;for(let W of J.names)if(Y(q,W))return!0;return!1}function U(q){if(q instanceof Error)return q.stack||q.message;return q}function G(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return J.enable(J.load()),J}Xc.exports=Ex0});var Yc=A((Qc,JW)=>{Qc.formatArgs=Ax0;Qc.save=Ix0;Qc.load=jx0;Qc.useColors=Rx0;Qc.storage=Cx0();Qc.destroy=(()=>{let $=!1;return()=>{if(!$)$=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}})();Qc.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Rx0(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let $;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&($=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt($[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function Ax0($){if($[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+$[0]+(this.useColors?"%c ":" ")+"+"+JW.exports.humanize(this.diff),!this.useColors)return;let D="color: "+this.color;$.splice(1,0,D,"color: inherit");let J=0,X=0;$[0].replace(/%[a-zA-Z%]/g,(Q)=>{if(Q==="%%")return;if(J++,Q==="%c")X=J}),$.splice(X,0,D)}Qc.log=console.debug||console.log||(()=>{});function Ix0($){try{if($)Qc.storage.setItem("debug",$);else Qc.storage.removeItem("debug")}catch(D){}}function jx0(){let $;try{$=Qc.storage.getItem("debug")||Qc.storage.getItem("DEBUG")}catch(D){}if(!$&&typeof process<"u"&&"env"in process)$=process.env.DEBUG;return $}function Cx0(){try{return localStorage}catch($){}}JW.exports=zL()(Qc);var{formatters:Tx0}=JW.exports;Tx0.j=function($){try{return JSON.stringify($)}catch(D){return"[UnexpectedJSONParseError]: "+D.message}}});var Fc=A((bL$,Zc)=>{Zc.exports=($,D=process.argv)=>{let J=$.startsWith("-")?"":$.length===1?"-":"--",X=D.indexOf(J+$),Q=D.indexOf("--");return X!==-1&&(Q===-1||X<Q)}});var qc=A((gL$,Gc)=>{var yx0=a("os"),Uc=a("tty"),l6=Fc(),{env:e1}=process,k9;if(l6("no-color")||l6("no-colors")||l6("color=false")||l6("color=never"))k9=0;else if(l6("color")||l6("colors")||l6("color=true")||l6("color=always"))k9=1;if("FORCE_COLOR"in e1)if(e1.FORCE_COLOR==="true")k9=1;else if(e1.FORCE_COLOR==="false")k9=0;else k9=e1.FORCE_COLOR.length===0?1:Math.min(parseInt(e1.FORCE_COLOR,10),3);function OL($){if($===0)return!1;return{level:$,hasBasic:!0,has256:$>=2,has16m:$>=3}}function VL($,D){if(k9===0)return 0;if(l6("color=16m")||l6("color=full")||l6("color=truecolor"))return 3;if(l6("color=256"))return 2;if($&&!D&&k9===void 0)return 0;let J=k9||0;if(e1.TERM==="dumb")return J;if(process.platform==="win32"){let X=yx0.release().split(".");if(Number(X[0])>=10&&Number(X[2])>=10586)return Number(X[2])>=14931?3:2;return 1}if("CI"in e1){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((X)=>(X in e1))||e1.CI_NAME==="codeship")return 1;return J}if("TEAMCITY_VERSION"in e1)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(e1.TEAMCITY_VERSION)?1:0;if(e1.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in e1){let X=parseInt((e1.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(e1.TERM_PROGRAM){case"iTerm.app":return X>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(e1.TERM))return 2;if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(e1.TERM))return 1;if("COLORTERM"in e1)return 1;return J}function fx0($){let D=VL($,$&&$.isTTY);return OL(D)}Gc.exports={supportsColor:fx0,stdout:OL(VL(!0,Uc.isatty(1))),stderr:OL(VL(!0,Uc.isatty(2)))}});var Oc=A((Hc,QW)=>{var hx0=a("tty"),XW=a("util");Hc.init=nx0;Hc.log=dx0;Hc.formatArgs=gx0;Hc.save=cx0;Hc.load=lx0;Hc.useColors=bx0;Hc.destroy=XW.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Hc.colors=[6,2,3,4,5,1];try{let $=qc();if($&&($.stderr||$).level>=2)Hc.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221]}catch($){}Hc.inspectOpts=Object.keys(process.env).filter(($)=>{return/^debug_/i.test($)}).reduce(($,D)=>{let J=D.substring(6).toLowerCase().replace(/_([a-z])/g,(Q,Y)=>{return Y.toUpperCase()}),X=process.env[D];if(/^(yes|on|true|enabled)$/i.test(X))X=!0;else if(/^(no|off|false|disabled)$/i.test(X))X=!1;else if(X==="null")X=null;else X=Number(X);return $[J]=X,$},{});function bx0(){return"colors"in Hc.inspectOpts?Boolean(Hc.inspectOpts.colors):hx0.isatty(process.stderr.fd)}function gx0($){let{namespace:D,useColors:J}=this;if(J){let X=this.color,Q="\x1B[3"+(X<8?X:"8;5;"+X),Y=` ${Q};1m${D} \x1B[0m`;$[0]=Y+$[0].split(`
115
115
  `).join(`
@@ -1514,6 +1514,7 @@ export type Database = {
1514
1514
  Row: {
1515
1515
  apps: number;
1516
1516
  apps_created: number;
1517
+ versions_created: number;
1517
1518
  apps_with_cli_onboarding_builds_24h: number;
1518
1519
  apps_with_manual_builds_24h: number;
1519
1520
  apps_active: number | null;
@@ -1606,6 +1607,7 @@ export type Database = {
1606
1607
  Insert: {
1607
1608
  apps: number;
1608
1609
  apps_created?: number;
1610
+ versions_created?: number;
1609
1611
  apps_with_cli_onboarding_builds_24h?: number;
1610
1612
  apps_with_manual_builds_24h?: number;
1611
1613
  apps_active?: number | null;
@@ -1698,6 +1700,7 @@ export type Database = {
1698
1700
  Update: {
1699
1701
  apps?: number;
1700
1702
  apps_created?: number;
1703
+ versions_created?: number;
1701
1704
  apps_with_cli_onboarding_builds_24h?: number;
1702
1705
  apps_with_manual_builds_24h?: number;
1703
1706
  apps_active?: number | null;
@@ -4770,6 +4773,12 @@ export type Database = {
4770
4773
  };
4771
4774
  Returns: number;
4772
4775
  };
4776
+ process_global_stats_creates_queue: {
4777
+ Args: {
4778
+ batch_size?: number;
4779
+ };
4780
+ Returns: number;
4781
+ };
4773
4782
  process_cron_stats_jobs: {
4774
4783
  Args: never;
4775
4784
  Returns: undefined;
@@ -1588,6 +1588,7 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
1588
1588
  Row: {
1589
1589
  apps: number;
1590
1590
  apps_created: number;
1591
+ versions_created: number;
1591
1592
  apps_with_cli_onboarding_builds_24h: number;
1592
1593
  apps_with_manual_builds_24h: number;
1593
1594
  apps_active: number | null;
@@ -1680,6 +1681,7 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
1680
1681
  Insert: {
1681
1682
  apps: number;
1682
1683
  apps_created?: number;
1684
+ versions_created?: number;
1683
1685
  apps_with_cli_onboarding_builds_24h?: number;
1684
1686
  apps_with_manual_builds_24h?: number;
1685
1687
  apps_active?: number | null;
@@ -1772,6 +1774,7 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
1772
1774
  Update: {
1773
1775
  apps?: number;
1774
1776
  apps_created?: number;
1777
+ versions_created?: number;
1775
1778
  apps_with_cli_onboarding_builds_24h?: number;
1776
1779
  apps_with_manual_builds_24h?: number;
1777
1780
  apps_active?: number | null;
@@ -4774,6 +4777,12 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
4774
4777
  };
4775
4778
  Returns: number;
4776
4779
  };
4780
+ process_global_stats_creates_queue: {
4781
+ Args: {
4782
+ batch_size?: number;
4783
+ };
4784
+ Returns: number;
4785
+ };
4777
4786
  process_cron_stats_jobs: {
4778
4787
  Args: never;
4779
4788
  Returns: undefined;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capgo/cli",
3
3
  "type": "module",
4
- "version": "8.30.0",
4
+ "version": "8.31.0",
5
5
  "description": "A CLI to upload to capgo servers",
6
6
  "author": "Martin martin@capgo.app",
7
7
  "license": "Apache 2.0",