@capgo/cli 8.106.0 → 8.106.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -72,7 +72,7 @@ ${Z}
|
|
|
72
72
|
`}}}}).prompt();var p0=b(()=>{xHA();xHA();EHA();LHA();hg=nA(wHA(),1);fHA=l80(),p80=U6("◆","*"),poA=U6("■","x"),ioA=U6("▲","x"),yHA=U6("◇","o"),noA=U6("┌","T"),m$=U6("│","|"),DF=U6("└","—"),i80=U6("┐","T"),n80=U6("┘","—"),gHA=U6("●",">"),xt=U6("○"," "),XxB=U6("◻","[•]"),ZxB=U6("◼","[+]"),GxB=U6("◻","[ ]"),r80=U6("▪","•"),o80=U6("─","-"),a80=U6("╮","+"),KxB=U6("├","+"),s80=U6("╯","+"),t80=U6("╰","+"),e80=U6("╭","+"),A60=U6("●","•"),Q60=U6("◆","*"),B60=U6("▲","!"),$60=U6("■","x");Z60=[e80,a80,t80,s80],G60=[noA,i80,DF,n80];WxB=[`${f0("dim","↑/↓")} to navigate`,`${f0("dim","Space:")} select`,`${f0("dim","Enter:")} confirm`],x={message:(A=[],{symbol:Q=f0("gray",m$),secondarySymbol:B=f0("gray",m$),output:$=process.stdout,spacing:J=1,withGuide:Y}={})=>{let X=[],Z=Y??v5.withGuide,G=Z?B:"",K=Z?`${Q} `:"",W=Z?`${B} `:"";for(let F=0;F<J;F++)X.push(G);let H=Array.isArray(A)?A:A.split(`
|
|
73
73
|
`);if(H.length>0){let[F,...D]=H;F.length>0?X.push(`${K}${F}`):X.push(Z?Q:"");for(let U of D)U.length>0?X.push(`${W}${U}`):X.push(Z?B:"")}$.write(`${X.join(`
|
|
74
74
|
`)}
|
|
75
|
-
`)},info:(A,Q)=>{x.message(A,{...Q,symbol:f0("blue",A60)})},success:(A,Q)=>{x.message(A,{...Q,symbol:f0("green",Q60)})},step:(A,Q)=>{x.message(A,{...Q,symbol:f0("green",yHA)})},warn:(A,Q)=>{x.message(A,{...Q,symbol:f0("yellow",B60)})},warning:(A,Q)=>{x.warn(A,Q)},error:(A,Q)=>{x.message(A,{...Q,symbol:f0("red",$60)})}},HxB={light:U6("─","-"),heavy:U6("━","="),block:U6("█","#")},H60=[`${f0("dim","↑/↓")} to navigate`,`${f0("dim","Enter:")} confirm`],FxB=`${f0("gray",m$)} `});var ooA=$A((UxB,F60)=>{F60.exports=[{name:"Agola CI",constant:"AGOLA",env:"AGOLA_GIT_REF",pr:"AGOLA_PULL_REQUEST_ID"},{name:"Alpic",constant:"ALPIC",env:"ALPIC_HOST"},{name:"Appcircle",constant:"APPCIRCLE",env:"AC_APPCIRCLE",pr:{env:"AC_GIT_PR",ne:"false"}},{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN",pr:{env:"CODEBUILD_WEBHOOK_EVENT",any:["PULL_REQUEST_CREATED","PULL_REQUEST_UPDATED","PULL_REQUEST_REOPENED"]}},{name:"Azure Pipelines",constant:"AZURE_PIPELINES",env:"TF_BUILD",pr:{BUILD_REASON:"PullRequest"}},{name:"Bamboo",constant:"BAMBOO",env:"bamboo_planKey"},{name:"Bitbucket Pipelines",constant:"BITBUCKET",env:"BITBUCKET_COMMIT",pr:"BITBUCKET_PR_ID"},{name:"Bitrise",constant:"BITRISE",env:"BITRISE_IO",pr:"BITRISE_PULL_REQUEST"},{name:"Buddy",constant:"BUDDY",env:"BUDDY_WORKSPACE_ID",pr:"BUDDY_EXECUTION_PULL_REQUEST_ID"},{name:"Buildkite",constant:"BUILDKITE",env:"BUILDKITE",pr:{env:"BUILDKITE_PULL_REQUEST",ne:"false"}},{name:"CircleCI",constant:"CIRCLE",env:"CIRCLECI",pr:"CIRCLE_PULL_REQUEST"},{name:"Cirrus CI",constant:"CIRRUS",env:"CIRRUS_CI",pr:"CIRRUS_PR"},{name:"Cloudflare Pages",constant:"CLOUDFLARE_PAGES",env:"CF_PAGES"},{name:"Cloudflare Workers",constant:"CLOUDFLARE_WORKERS",env:"WORKERS_CI"},{name:"Codefresh",constant:"CODEFRESH",env:"CF_BUILD_ID",pr:{any:["CF_PULL_REQUEST_NUMBER","CF_PULL_REQUEST_ID"]}},{name:"Codemagic",constant:"CODEMAGIC",env:"CM_BUILD_ID",pr:"CM_PULL_REQUEST"},{name:"Codeship",constant:"CODESHIP",env:{CI_NAME:"codeship"}},{name:"Drone",constant:"DRONE",env:"DRONE",pr:{DRONE_BUILD_EVENT:"pull_request"}},{name:"dsari",constant:"DSARI",env:"DSARI"},{name:"Earthly",constant:"EARTHLY",env:"EARTHLY_CI"},{name:"Expo Application Services",constant:"EAS",env:"EAS_BUILD"},{name:"Gerrit",constant:"GERRIT",env:"GERRIT_PROJECT"},{name:"Gitea Actions",constant:"GITEA_ACTIONS",env:"GITEA_ACTIONS"},{name:"GitHub Actions",constant:"GITHUB_ACTIONS",env:"GITHUB_ACTIONS",pr:{GITHUB_EVENT_NAME:"pull_request"}},{name:"GitLab CI",constant:"GITLAB",env:"GITLAB_CI",pr:"CI_MERGE_REQUEST_ID"},{name:"GoCD",constant:"GOCD",env:"GO_PIPELINE_LABEL"},{name:"Google Cloud Build",constant:"GOOGLE_CLOUD_BUILD",env:"BUILDER_OUTPUT"},{name:"Harness CI",constant:"HARNESS",env:"HARNESS_BUILD_ID"},{name:"Heroku",constant:"HEROKU",env:{env:"NODE",includes:"/app/.heroku/node/bin/node"}},{name:"Hudson",constant:"HUDSON",env:"HUDSON_URL"},{name:"Jenkins",constant:"JENKINS",env:["JENKINS_URL","BUILD_ID"],pr:{any:["ghprbPullId","CHANGE_ID"]}},{name:"LayerCI",constant:"LAYERCI",env:"LAYERCI",pr:"LAYERCI_PULL_REQUEST"},{name:"Magnum CI",constant:"MAGNUM",env:"MAGNUM"},{name:"Netlify CI",constant:"NETLIFY",env:"NETLIFY",pr:{env:"PULL_REQUEST",ne:"false"}},{name:"Nevercode",constant:"NEVERCODE",env:"NEVERCODE",pr:{env:"NEVERCODE_PULL_REQUEST",ne:"false"}},{name:"Prow",constant:"PROW",env:"PROW_JOB_ID"},{name:"ReleaseHub",constant:"RELEASEHUB",env:"RELEASE_BUILD_ID"},{name:"Render",constant:"RENDER",env:"RENDER",pr:{IS_PULL_REQUEST:"true"}},{name:"Sail CI",constant:"SAIL",env:"SAILCI",pr:"SAIL_PULL_REQUEST_NUMBER"},{name:"Screwdriver",constant:"SCREWDRIVER",env:"SCREWDRIVER",pr:{env:"SD_PULL_REQUEST",ne:"false"}},{name:"Semaphore",constant:"SEMAPHORE",env:"SEMAPHORE",pr:"PULL_REQUEST_NUMBER"},{name:"Sourcehut",constant:"SOURCEHUT",env:{CI_NAME:"sourcehut"}},{name:"Strider CD",constant:"STRIDER",env:"STRIDER"},{name:"TaskCluster",constant:"TASKCLUSTER",env:["TASK_ID","RUN_ID"]},{name:"TeamCity",constant:"TEAMCITY",env:"TEAMCITY_VERSION"},{name:"Travis CI",constant:"TRAVIS",env:"TRAVIS",pr:{env:"TRAVIS_PULL_REQUEST",ne:"false"}},{name:"Vela",constant:"VELA",env:"VELA",pr:{VELA_PULL_REQUEST:"1"}},{name:"Vercel",constant:"VERCEL",env:{any:["NOW_BUILDER","VERCEL"]},pr:"VERCEL_GIT_PULL_REQUEST_ID"},{name:"Visual Studio App Center",constant:"APPCENTER",env:"APPCENTER_BUILD_ID"},{name:"Woodpecker",constant:"WOODPECKER",env:{CI:"woodpecker"},pr:{CI_BUILD_EVENT:"pull_request"}},{name:"Xcode Cloud",constant:"XCODE_CLOUD",env:"CI_XCODE_PROJECT",pr:"CI_PULL_REQUEST_NUMBER"},{name:"Xcode Server",constant:"XCODE_SERVER",env:"XCS"}]});var KC=$A((uHA)=>{var aoA=ooA(),J5=process.env;Object.defineProperty(uHA,"_vendors",{value:aoA.map(function(A){return A.constant})});uHA.name=null;uHA.isPR=null;uHA.id=null;if(J5.CI!=="false")aoA.forEach(function(A){let B=(Array.isArray(A.env)?A.env:[A.env]).every(function($){return soA($)});if(uHA[A.constant]=B,!B)return;uHA.name=A.name,uHA.isPR=z60(A),uHA.id=A.constant});uHA.isCI=!!(J5.CI!=="false"&&(J5.BUILD_ID||J5.BUILD_NUMBER||J5.CI||J5.CI_APP_ID||J5.CI_BUILD_ID||J5.CI_BUILD_NUMBER||J5.CI_NAME||J5.CONTINUOUS_INTEGRATION||J5.RUN_ID||uHA.name||!1));function soA(A){if(typeof A==="string")return!!J5[A];if("env"in A)return J5[A.env]&&J5[A.env].includes(A.includes);if("any"in A)return A.any.some(function(Q){return!!J5[Q]});return Object.keys(A).every(function(Q){return J5[Q]===A[Q]})}function z60(A){switch(typeof A.pr){case"string":return!!J5[A.pr];case"object":if("env"in A.pr)if("any"in A.pr)return A.pr.any.some(function(Q){return J5[A.pr.env]===Q});else return A.pr.env in J5&&J5[A.pr.env]!==A.pr.ne;else if("any"in A.pr)return A.pr.any.some(function(Q){return!!J5[Q]});else return soA(A.pr);default:return null}}});var Y8;var ZX=b(()=>{Y8={name:"@capgo/cli",type:"module",version:"8.106.0",description:"A CLI to upload to capgo servers",author:"Martin martin@capgo.app",license:"Apache 2.0",homepage:"https://github.com/Cap-go/capgo/tree/main/cli#readme",repository:{type:"git",url:"https://github.com/Cap-go/capgo.app",directory:"cli"},bugs:{url:"https://github.com/Cap-go/capgo/issues"},keywords:["appflow alternative","ionic","capacitor","auto update","live update","capgo","cli","upload","capgo-cli","sdk","tanstack-intent"],exports:{".":{import:"./dist/index.js",require:"./dist/index.js"},"./sdk":{types:"./dist/src/sdk.d.ts",import:"./dist/src/sdk.js"}},main:"dist/index.js",types:"dist/src/index.d.ts",bin:{capgo:"dist/index.js"},files:["!skills/_artifacts","dist","skills"],engines:{npm:">=8.0.0",node:">=20.0.0"},scripts:{build:"tsc && bun build.mjs",dev:"NODE_ENV=development ncc build","no-debug":"node dist/index.js","dev-build":"SUPA_DB=development ncc build",pack:"pkg",typecheck:"tsc --noEmit",lint:"bun run lint:ox","lint:ox":"oxlint --config ../.oxlintrc.json src","lint:fix":"oxlint --config ../.oxlintrc.json --fix src","check-posix-paths":"node test/check-posix-paths.js","generate-docs":"node dist/index.js generate-docs README.md","test:notify-app-ready-background":"bun test ./test/test-notify-app-ready-background.mjs ./test/test-background-check-shutdown.mjs","test:bundle":"bun test/test-bundle.mjs","test:bundle-validation":"bun test test/bundle/","test:prescan":"bun test test/prescan/","test:functional":"bun test/test-functional.mjs","test:semver":"bun test/test-semver-validation.mjs","test:version-edge-cases":"bun test/test-version-validation.mjs","test:regex":"bun test/test-regex-validation.mjs","test:upload":"bun test/test-upload-validation.mjs","test:fail-on-incompatible":"bun test/test-fail-on-incompatible.mjs","test:native-dependencies":"bun test/test-native-dependencies.mjs && bun test/test-get-remote-dependencies.mjs","test:package-json-guard":"bun test/test-package-json-guard.mjs","test:credentials":"bun test/test-credentials.mjs","test:credentials-export":"bun test/test-credentials-export.mjs","test:key-create-mode":"bun test/test-key-create-mode.mjs","test:asc-key-protocol":"bun test/test-asc-key-protocol.mjs","test:credentials-validation":"bun test/test-credentials-validation.mjs","test:android-service-account-validation":"bun test/test-android-service-account-validation.mjs","test:build-zip-filter":"bun test/test-build-zip-filter.mjs","test:offline-packers":"bun test/test-offline-packers.mjs","test:checksum":"bun test/test-checksum-algorithm.mjs","test:build-needed":"bun test/test-build-needed.mjs","test:cli-help":"bun test/test-cli-help.mjs","test:build-cache-payload":"bun test/test-build-cache-payload.mjs","test:build-cancellation":"bun test/test-build-cancellation.mjs","test:ci-prompts":"bun test/test-ci-prompts.mjs","test:capgo-app-id-prompt":"bun test/test-capgo-app-id-prompt.mjs","test:bundle-soft-delete":"bun test/test-bundle-soft-delete.mjs","test:ci-secrets":"bun test/test-ci-secrets.mjs","test:android-onboarding-progress":"bun test/test-android-onboarding-progress.mjs && bun test/test-android-select-guard.mjs","test:android-keystore-action":"bun test/test-android-keystore-action.mjs","test:android-google-play-action":"bun test/test-android-google-play-action.mjs","test:onboarding-telemetry":"bun test/test-onboarding-telemetry.mjs","test:v2-event-migration":"bun test/test-v2-event-migration.mjs","test:analytics":"bun test/test-analytics.mjs","test:cli-headers":"bun test/test-cli-headers.mjs","test:min-cli-version":"bun test/test-min-cli-version.mjs","test:authenticated-command-invocation":"bun test/test-authenticated-command-invocation.mjs","test:analytics-error-category":"bun test/test-analytics-error-category.mjs","test:analytics-org-resolver":"bun test/test-analytics-org-resolver.mjs","test:api-perf":"bun test/test-api-perf.mjs","test:preview-qr":"bun test/test-preview-qr.mjs","test:bundle-pages":"bun test test/test-bundle-pages.test.ts","test:bundle-single-requests":"bun test test/test-bundle-single-requests.test.ts","test:mcp-analytics":"bun test/test-mcp-analytics.mjs && bun test/test-mcp-telemetry-project.mjs","test:mcp-instructions":"bun test/test-mcp-instructions.mjs","test:mcp-error-guidance":"bun test/test-mcp-error-guidance.mjs","test:mcp-stdout-guard":"bun test/test-mcp-stdout-guard.mjs","test:mcp-project-dir":"bun test/test-mcp-project-dir.mjs && bun test/test-cwd.mjs && bun test/test-project-context.mjs","test:mcp-host-fields":"bun test/test-mcp-host-fields.mjs","test:mcp-platform-select":"bun test/test-mcp-platform-select.mjs","test:mcp-explain-scopes":"bun test/test-mcp-explain-scopes.mjs","test:mcp-oauth-reopen":"bun test/test-mcp-oauth-reopen.mjs","test:mcp-broker-oauth":"bun test/test-mcp-broker-oauth.mjs","test:mcp-broker-session":"bun test/test-mcp-broker-session.mjs","test:mcp-credentials-manage":"bun test/test-mcp-credentials-manage.mjs","test:mcp-resume-prompt":"bun test/test-mcp-resume-prompt.mjs","test:mcp-build-job":"bun test/test-mcp-build-job.mjs","test:mcp-build-tools":"bun test/test-mcp-build-tools.mjs","test:app-created-source":"bun test/test-app-created-source.mjs","test:app-add-exists":"bun test/test-app-add-exists.mjs","test:app-add-getting-started":"bun test/test-app-add-getting-started.mjs","test:app-list":"bun test/test-app-list.mjs","test:app-todo":"bun test/test-app-todo.mjs && bun test/test-builder-only-checklist.mjs && bun test/test-builder-only-setup.mjs && bun test/test-app-todo-lists.mjs && bun test/test-app-todo-tabs.mjs && bun test/test-app-todo-command.mjs && node test/test-app-todo-interactive.mjs","test:doctor-analytics":"bun test/test-doctor-analytics.mjs","test:posthog-exception":"bun test/test-posthog-exception.mjs","test:cli-recovery":"bun test/test-cli-recovery.mjs","test:create-capgo-client":"bun test/test-create-capgo-client.mjs","test:no-supabase-sdk":"bun test/test-no-supabase-sdk.mjs","test:no-redirect-error":"bun test/test-no-redirect-error.mjs","test:onboarding-recovery":"bun test/test-onboarding-recovery.mjs","test:onboarding-progress":"bun test/test-onboarding-progress.mjs","test:onboarding-run-targets":"bun test/test-onboarding-run-targets.mjs && bun test ./test/test-ios-simulator-compatibility.mjs","test:run-device-command":"bun test/test-run-device-command.mjs","test:init-app-conflict":"bun test/test-init-app-conflict.mjs","test:channel-add-exists":"bun test/test-channel-add-exists.mjs","test:wait-log":"bun test/test-wait-log.mjs","test:init-guardrails":"bun test/test-init-guardrails.mjs","test:init-command-execution":"bun test/test-init-command-execution.mjs","test:init-upload-recovery":"bun test/test-init-upload-monorepo-recovery.mjs","test:init-replay":"bun test/test-init-replay.mjs","test:init-ota-checklist":"bun test/test-init-ota-checklist.mjs","test:init-telemetry":"bun test/test-init-telemetry.mjs","test:capacitor-config-target":"bun test/test-capacitor-config-target.mjs","test:builder-app-id-config":"bun test/test-builder-app-id-config.mjs","test:capacitor-config-typescript7":"bun test/test-capacitor-config-typescript7.mjs","test:capacitor-config-native-import":"bun test/test-capacitor-config-native-import.mjs","test:cli-user-error-config":"bun test/test-cli-user-error-config.mjs","test:cordova-upload-mode":"bun test/test-cordova-upload-mode.mjs","test:init-monorepo-targeting":"bun run test:capacitor-config-target && bun run test:builder-app-id-config && bun run test:capacitor-config-typescript7 && bun run test:capacitor-config-native-import && bun run test:cli-user-error-config && bun test/test-init-monorepo-targeting.mjs","test:prompt-preferences":"bun test/test-prompt-preferences.mjs","test:esm-sdk":"node test/test-sdk-esm.mjs","test:auth-session":"bun test/test-auth-session.mjs && bun test/test-auth-session-bad-key.mjs","test:mcp":"node test/test-mcp.mjs && node test/test-mcp-skills.mjs","test:mcp-no-key-handshake":"node test/test-mcp-no-key-handshake.mjs","test:version-detection":"node test/test-get-installed-version.mjs","test:version-detection:setup":"./test/fixtures/setup-test-projects.sh","test:platform-paths":"bun test/test-platform-paths.mjs","test:project-type-detection":"bun test/test-project-type-detection.mjs","test:payload-split":"bun test/test-payload-split.mjs && bun test/test-build-env.mjs","test:macos-signing":"bun test/test-macos-signing.mjs","test:helper-dce":"bash scripts/check-helper-dce.sh","test:apple-api-import-helpers":"bun test/test-apple-api-import-helpers.mjs","test:apple-api-verify-key":"bun test/test-apple-api-verify-key.mjs","test:bundle-id-detector":"bun test/test-bundle-id-detector.mjs","test:apple-api-app-list":"bun test/test-apple-api-app-list.mjs","test:apple-api-cert-create":"bun test/test-apple-api-cert-create.mjs","test:app-verification":"bun test/test-app-verification.mjs","test:pbxproj-parser":"bun test/test-pbxproj-parser.mjs","test:self-update":"bun test/test-self-update.mjs","test:update-prompt":"bun test/test-update-prompt.mjs","test:android-tail-engine":"bun test/test-android-tail-engine.mjs","test:android-tail-render":"bun test/test-android-tail-render.mjs","test:android-tail-routing":"bun test/test-android-tail-routing.mjs","test:dev-gate-stripped":"bun test/test-dev-gate-stripped.mjs","test:ios-confirm-app-id":"bun test/test-ios-confirm-app-id.mjs","test:ios-create-new":"bun test/test-ios-create-new.mjs","test:ios-certificate-action":"bun test/test-ios-certificate-action.mjs","test:ios-profile-action":"bun test/test-ios-profile-action.mjs","test:ios-credential-action":"bun test/test-ios-credential-action.mjs","test:ios-e2e":"bun test/test-ios-e2e.mjs","test:ios-import-discovery":"bun test/test-ios-import-discovery.mjs","test:ios-import-export":"bun test/test-ios-import-export.mjs","test:ios-import-pickers":"bun test/test-ios-import-pickers.mjs","test:ios-import-recovery":"bun test/test-ios-import-recovery.mjs","test:ios-recovery":"bun test/test-ios-recovery.mjs","test:ios-resume":"bun test/test-ios-resume.mjs","test:ios-tail-handoff":"bun test/test-ios-tail-handoff.mjs","test:ios-tui-render":"bun test/test-ios-tui-render.mjs","test:p8-error":"bun test/test-p8-error.mjs","test:ios-tui-routing":"bun test/test-ios-tui-routing.mjs","test:ios-updater-sync-validation":"bun test/test-ios-updater-sync-validation.mjs","test:ios-verify-app":"bun test/test-ios-verify-app.mjs","test:ios-marketing-version":"bun test/test-ios-marketing-version.mjs","test:android-version":"bun test/test-android-version.mjs","test:platform-flow-contract":"bun test/test-platform-flow-contract.mjs","test:tail-engine-shared":"bun test/test-tail-engine-shared.mjs",test:"bun run build && bun scripts/run-test-suite.ts","test:run":"bun scripts/run-test-suite.ts","test:serial":"bun run build && bun scripts/run-test-suite.ts --serial","test:monitoring":"bun test test/test-monitoring.test.ts","test:suite":"bun run test:monitoring && bun run test:helper-dce && bun run test:version-detection:setup && bun run test:bundle && bun run test:notify-app-ready-background && bun run test:bundle-validation && bun run test:functional && bun run test:semver && bun run test:auto-bump-version && bun run test:auto-bump-ai-diff && bun run test:version-edge-cases && bun run test:regex && bun run test:upload && bun run test:cordova-upload-mode && bun run test:fail-on-incompatible && bun run test:native-dependencies && bun run test:package-json-guard && bun run test:credentials && bun run test:credentials-export && bun run test:key-create-mode && bun run test:ios-provisioning-map && bun run test:ios-provisioning-command && bun run test:credentials-validation && bun run test:android-service-account-validation && bun run test:build-zip-filter && bun run test:offline-packers && bun run test:checksum && bun run test:build-needed && bun run test:cli-help && bun run test:build-cache-payload && bun run test:build-cancellation && bun run test:ci-prompts && bun run test:capgo-app-id-prompt && bun run test:ci-secrets && bun run test:android-onboarding-progress && bun run test:android-keystore-action && bun run test:android-google-play-action && bun run test:onboarding-telemetry && bun run test:v2-event-migration && bun run test:analytics && bun run test:cli-headers && bun run test:min-cli-version && bun run test:authenticated-command-invocation && bun run test:analytics-error-category && bun run test:analytics-org-resolver && bun run test:api-perf && bun run test:preview-qr && bun run test:bundle-pages && bun run test:bundle-single-requests && bun run test:app-set-options && bun run test:mcp-analytics && bun run test:mcp-instructions && bun run test:mcp-error-guidance && bun run test:mcp-live-update-onboarding && bun run test:mcp-stdout-guard && bun run test:mcp-project-dir && bun run test:mcp-host-fields && bun run test:mcp-platform-select && bun run test:mcp-explain-scopes && bun run test:mcp-oauth-reopen && bun run test:mcp-broker-oauth && bun run test:mcp-broker-session && bun run test:mcp-credentials-manage && bun run test:mcp-resume-prompt && bun run test:mcp-build-job && bun run test:mcp-build-tools && bun run test:app-created-source && bun run test:app-add-exists && bun run test:app-add-getting-started && bun run test:app-list && bun run test:app-todo && bun run test:doctor-analytics && bun run test:posthog-exception && bun run test:cli-recovery && bun run test:create-capgo-client && bun run test:bundle-soft-delete && bun run test:no-supabase-sdk && bun run test:no-redirect-error && bun run test:build-platform-selection && bun run test:builder-project-discovery && bun run test:builder-app-selection && bun run test:builder-login-gate && bun run test:onboarding-recovery && bun run test:onboarding-progress && bun run test:onboarding-run-targets && bun run test:run-device-command && bun run test:init-monorepo-targeting && bun run test:init-app-conflict && bun run test:channel-list && bun run test:channel-add-exists && bun run test:wait-log && bun run test:init-guardrails && bun run test:init-command-execution && bun run test:init-upload-recovery && bun run test:init-replay && bun run test:init-telemetry && bun run test:init-ota-checklist && bun run test:prompt-preferences && bun run test:esm-sdk && bun run test:mcp && bun run test:mcp-no-key-handshake && bun run test:auth-session && bun run test:version-detection && bun run test:platform-paths && bun run test:project-type-detection && bun run test:payload-split && bun run test:macos-signing && bun run test:asc-key-protocol && bun run test:apple-api-import-helpers && bun run test:apple-api-verify-key && bun run test:bundle-id-detector && bun run test:apple-api-app-list && bun run test:app-verification && bun run test:pbxproj-parser && bun run test:ai-log-capture && bun run test:ai-analyze-flow && bun run test:cicd-failure-help && bun run test:ai-sse-parser && bun run test:ai-render-markdown && bun run test:ai-stream-markdown && bun run test:ai-onboarding-mode && bun run test:ai-fit && bun run test:platform-layout && bun run test:frame-fit && bun run test:onboarding-min-size && bun run test:min-size-gate && bun run test:shell-size-gate && bun run test:build-log-sanitize && bun run test:build-output-viewport && bun run test:diff-viewer-viewport && bun run test:build-complete-exit && bun run test:support && bun run test:self-update && bun run test:update-prompt && bun run test:apple-api-cert-create && bun run test:android-tail-engine && bun run test:android-tail-render && bun run test:android-tail-routing && bun run test:dev-gate-stripped && bun run test:ios-confirm-app-id && bun run test:ios-create-new && bun run test:ios-certificate-action && bun run test:ios-profile-action && bun run test:ios-credential-action && bun run test:ios-e2e && bun run test:ios-import-discovery && bun run test:ios-import-export && bun run test:ios-import-pickers && bun run test:ios-import-recovery && bun run test:ios-recovery && bun run test:ios-resume && bun run test:ios-tail-handoff && bun run test:ios-tui-render && bun run test:p8-error && bun run test:ios-tui-routing && bun run test:ios-updater-sync-validation && bun run test:ios-verify-app && bun run test:ios-marketing-version && bun run test:android-version && bun run test:platform-flow-contract && bun run test:tail-engine-shared && bun run test:prescan && bun run test:android-reporting-api && bun run test:android-gcp && bun run test:android-app-verification && bun run test:android-rename && bun run test:appflow-auth && bun run test:appflow-api-map && bun run test:appflow-validate && bun run test:appflow-flow && bun run test:appflow-gapfill && bun run test:appflow-engine && bun run test:appflow-tail && bun run test:appflow-fetch && bun run test:appflow-sa-decode && bun run test:app-permission-helper && bun run test:2fa-compliance-network && bun run test:retryable-capgo-api-error && bun run test:organization-set-api-host && bun run test:plan-validation && bun run test:setup-notices && bun run test:settings-parity && bun run test:init-browser-login && bun run test:android-onboarding-units && bun run test:build-credentials-units && bun run test:onboarding-generators && bun run test:mcp-onboarding","test:build-platform-selection":"bun test/test-build-platform-selection.mjs","test:builder-project-discovery":"bun test/test-builder-project-discovery.mjs","test:builder-app-selection":"bun test/test-builder-app-selection.mjs","test:builder-login-gate":"bun test/test-builder-login-gate.mjs","test:ai-log-capture":"bun test/test-ai-log-capture.mjs","test:ai-analyze-flow":"bun test/test-ai-analyze-flow.mjs","test:cicd-failure-help":"bun test/test-cicd-failure-help.mjs","test:ai-sse-parser":"bun test/test-ai-sse-parser.mjs","test:ai-render-markdown":"bun test/test-ai-render-markdown.mjs","test:ai-onboarding-mode":"bun test/test-ai-onboarding-mode.mjs","test:ai-fit":"bun test/test-ai-fit.mjs","test:platform-layout":"bun test/test-platform-layout.mjs","test:frame-fit":"bun test/run-frame-fit.mjs","test:onboarding-min-size":"bun test/test-onboarding-min-size.mjs","test:min-size-gate":"bun test/test-min-size-gate.mjs","test:shell-size-gate":"bun test/test-shell-size-gate.mjs","test:build-log-sanitize":"bun test/test-build-log-sanitize.mjs","test:build-output-viewport":"bun test/test-build-output-viewport.mjs","test:diff-viewer-viewport":"bun test/test-diff-viewer-viewport.mjs","test:build-complete-exit":"bun test/test-build-complete-exit.mjs","test:ai-stream-markdown":"bun test/test-ai-stream-markdown.mjs","test:support":"bun test/test-support.mjs","test:mcp-live-update-onboarding":"bun test/test-mcp-live-update-onboarding.mjs","test:app-set-options":"bun test/test-app-set-options.mjs","test:settings-parity":"bun test/test-settings-parity.mjs","test:android-reporting-api":"bun test/test-android-reporting-api.mjs","test:android-gcp":"bun test/test-android-gcp.mjs","test:android-app-verification":"bun test/test-android-app-verification.mjs","test:android-rename":"bun test/test-android-rename.mjs","test:appflow-auth":"bun test/test-appflow-auth.mjs","test:appflow-api-map":"bun test/test-appflow-api-map.mjs","test:appflow-validate":"bun test/test-appflow-validate.mjs","test:appflow-flow":"bun test/test-appflow-flow.mjs","test:appflow-gapfill":"bun test/test-appflow-gapfill.mjs","test:appflow-engine":"bun test/test-appflow-engine.mjs","test:appflow-tail":"bun test/test-appflow-tail.mjs","test:appflow-fetch":"bun test/test-appflow-fetch.mjs","test:appflow-sa-decode":"bun test/test-appflow-sa-decode.mjs","test:app-permission-helper":"bun test/test-app-permission-helper.mjs","test:2fa-compliance-network":"bun test/test-2fa-compliance-network.mjs","test:retryable-capgo-api-error":"bun test/test-retryable-capgo-api-error.mjs","test:organization-set-api-host":"bun test/test-organization-set-api-host.mjs","test:plan-validation":"bun test/test-plan-validation.mjs && bun test ./test/test-direct-offer-plan.mjs","test:auto-bump-version":"bun test/test-auto-bump-version.mjs","test:auto-bump-ai-diff":"bun test/test-auto-bump-ai-diff.mjs","test:ios-provisioning-map":"bun test/test-ios-provisioning-map.mjs","test:ios-provisioning-command":"bun test/test-ios-provisioning-command.mjs","test:channel-list":"bun test/test-channel-list.mjs","test:init-browser-login":"bun test test/init/","test:android-onboarding-units":"bun test/test-android-gradle.mjs && bun test/test-android-keystore.mjs && bun test/test-android-oauth.mjs && bun test/test-android-play.mjs && bun test/test-android-tui-sequencing.mjs","test:build-credentials-units":"bun test/test-credentials-migration.mjs && bun test/test-provisioning-map-validation.mjs && bun test/test-mobileprovision-parser.mjs","test:onboarding-generators":"bun test/test-diff-utils.mjs && bun test/test-workflow-generator.mjs","test:mcp-onboarding":"bun test ./test/build/onboarding/mcp/scoped-credential-path.test.ts && bun test/test-mcp-onboarding.mjs","test:setup-notices":"bun test ./test/test-setup-notices.mjs ./test/test-setup-progress-request.mjs ./test/test-setup-notice-background.mjs ./test/test-init-completion-notice.mjs && bun test ./test/test-builder-setup-notice.mjs"},dependencies:{"@inkjs/ui":"^2.0.0","@manypkg/tools":"^2.1.2","@rrweb/types":"^2.1.1","@standard-schema/spec":"^1.1.0","@xmldom/xmldom":"^0.9.10","@xterm/addon-serialize":"^0.14.0","@xterm/headless":"^6.0.0","agent-cli-detector":"^0.1.6","happy-dom":"^21.0.4",ink:"^7.1.1","ink-spinner":"^5.0.0",jsonwebtoken:"^9.0.3","node-forge":"^1.4.0",qrcode:"^1.5.4",react:"^19.2.8","rrweb-snapshot":"^2.1.1","string-width":"^8.2.2",typescript:"6.0.3",zod:"^4.5.4"},optionalDependencies:{"@capgo/cli-helper-darwin-arm64":"^1.1.1","@capgo/cli-helper-darwin-x64":"^1.1.1","node-pty":"^1.1.0"},devDependencies:{"@antfu/eslint-config":"^9.2.0","@bradenmacdonald/s3-lite-client":"npm:@jsr/bradenmacdonald__s3-lite-client@0.9.6","@capacitor/cli":"^8.4.2","@capgo/find-package-manager":"^0.0.18","@clack/prompts":"^1.7.0","@modelcontextprotocol/client":"^2.0.0-beta.5","@modelcontextprotocol/server":"^2.0.0-beta.5","@sauber/table":"npm:@jsr/sauber__table","@sinonjs/fake-timers":"15.4.0","@std/semver":"npm:@jsr/std__semver@1.0.8","@tanstack/intent":"^0.3.6","@types/adm-zip":"^0.5.8","@types/cross-spawn":"^6.0.6","@types/jsonwebtoken":"^9.0.10","@types/node":"^26.1.1","@types/node-forge":"^1.3.14","@types/prettyjson":"^0.0.33","@types/qrcode":"^1.5.6","@types/react":"^19.2.17","@types/tmp":"^0.2.6","@types/ws":"^8.18.1","@typescript/native":"npm:typescript@7.1.0-beta","@vercel/ncc":"^0.44.1","@vue/compiler-dom":"3.5.40","@xterm/headless":"^6.0.0","adm-zip":"^0.6.0","ci-info":"^4.4.0",commander:"^15.0.0","cross-spawn":"^7.0.6",eslint:"^10.7.0","git-format-staged":"4.0.2",husky:"^9.1.7","is-wsl":"^3.1.1",micromatch:"^4.0.8",open:"^11.0.0",oxlint:"^1.75.0",partysocket:"^1.3.0",prettyjson:"^1.2.5",tmp:"^0.2.7","tus-js-client":"^4.3.1",ws:"^8.21.1"}}});import{AsyncLocalStorage as N60}from"node:async_hooks";function C60(){return V60.getStore()}function ug(){JaA=!0}function YaA(){return JaA}function ZaA(A){XaA=A}function $aA(A){try{XaA?.(A)}catch{}}function KaA(A,Q){let B;try{B=new URL(A).pathname}catch{B=A.split("?")[0]}let $=[];for(let J of B.split("/").filter(Boolean)){if($.length>=4||!/^(?:[a-z_-]+|2fa)$/.test(J))break;$.push(J)}return`${Q} ${$.join("/")||B}`}function E60(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 WaA(A){return async(B,$)=>{let J=($?.method??"GET").toUpperCase(),Y=typeof B==="string"?B:B instanceof URL?B.href:B.url,X=C60(),Z=E60($),G=Date.now();try{let K=await globalThis.fetch(B,$);return $aA({url:Y,route:A,method:J,status:K.status,ok:K.ok,durationMs:Date.now()-G,source:X,apikey:Z}),K}catch(K){throw $aA({url:Y,route:A,method:J,status:0,ok:!1,durationMs:Date.now()-G,source:X,apikey:Z,error:K}),K}}}var V60,JaA=!1,XaA,GaA=5000;var mg=b(()=>{V60=new N60});var PA;var J1=b(()=>{PA=class PA extends Error{context;constructor(A,Q,B){super(A,B!==void 0?{cause:B}:void 0);this.name="CliUserError",this.context=Q}}});import{platform as R60}from"node:os";import{version as w60}from"node:process";function zaA(A){FaA=A}function _60(A){for(let Q=0;Q<A.length;Q++)if(A.charCodeAt(Q)>255)return!1;return!0}function HaA(A){if(A.toLowerCase()==="x-capgo-log-token")return"Build log token is missing. Re-run the build command or pass a valid log token.";return"Capgo API key is missing. Run `npx -y @capgo/cli@latest login` or pass `--apikey`."}function T60(A){if(A.toLowerCase()==="x-capgo-log-token")return"Build log token contains invalid characters (only ASCII is allowed). Re-run the build command to get a fresh token.";if(A.toLowerCase()==="authorization")return"Authorization header contains invalid characters (only ASCII is allowed). Check your Capgo API key configuration.";return"Capgo API key contains invalid characters (only ASCII is allowed). Copy the key from the Capgo dashboard."}function iHA(A,Q){if(Q===void 0||Q===null){if(pHA.has(A.toLowerCase()))throw new PA(HaA(A));throw new PA(`HTTP header "${A}" is missing or invalid.`)}if(typeof Q!=="string"){if(pHA.has(A.toLowerCase()))throw new PA(HaA(A));throw new PA(`HTTP header "${A}" is missing or invalid.`)}if(!_60(Q)){if(pHA.has(A.toLowerCase()))throw new PA(T60(A));throw new PA(`HTTP header "${A}" contains invalid characters (only ASCII is allowed).`)}return Q}function P60(A=lt.isCI,Q=lt.name){if(!A)return;return(Q??"").replace(/[^\x20-\x7E]/g,"").trim().slice(0,64)||"ci"}function c1(A){let Q={capgo_api:j60,"x-cli-version":Y8.version,"x-cli-command":FaA,"x-cli-node":w60,"x-cli-os":R60()},B=P60();if(B)Q["x-cli-ci"]=B;if(A)for(let[$,J]of Object.entries(A))Q[$]=iHA($,J);return Q}var lt,j60="2025-10-01",FaA="",pHA;var JY=b(()=>{ZX();J1();lt=nA(KC(),1),pHA=new Set(["authorization","capgkey","x-capgo-log-token"])});function qaA(A){let Q=A;if(typeof Q.status==="number")return Q.status;let B=Q.context&&typeof Q.context==="object"?Q.context.status:void 0;return typeof B==="number"?B:void 0}function S60(A){if(!A||typeof A!=="object")return;let Q=qaA(A);if(Q!==void 0)return Q;let B=A.cause;if(B&&typeof B==="object")return qaA(B);return}function k60(A){let Q=[],B=new Set,$=A;if(typeof A==="string")return A;while($){if(typeof $==="string"){Q.push($);break}if(typeof $!=="object")break;if(B.has($))break;if(B.add($),$ instanceof Error){Q.push($.message),$=$.cause;continue}let J=$;if(typeof J.message==="string")Q.push(J.message);$=J.cause}return Q.join(" ")}function b60(A){return k60(A)}function HC(A){if(A&&typeof A==="object"&&"code"in A){let $=A.code;if(typeof $==="string"&&$.startsWith("commander."))return"commander"}let Q=S60(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===429)return"rate_limited";if(Q>=500)return"server_error"}let B=b60(A).toLowerCase();if(/econnrefused|econnreset|enotfound|eai_again|fetch failed|failed to fetch|connect timeout|und_err/.test(B))return"network_error";if(/timed out|timeout|etimedout|aborted/.test(B))return"timeout";if(/invalid|must be|required|not allowed|malformed|validation/.test(B))return"validation_error";return"unknown"}function UaA(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"}function GX(A){let Q=A.length;while(Q>0&&A[Q-1]==="/")Q-=1;return A.slice(0,Q)}import{randomUUID as IaA}from"node:crypto";import{existsSync as f60,mkdirSync as g60,readFileSync as y60,writeFileSync as h60}from"node:fs";import{homedir as oHA,platform as u60,release as m60}from"node:os";import{join as MaA}from"node:path";import{arch as c60,cwd as OaA,env as FC,version as l60}from"node:process";function P2(A){return A==="1"||A?.toLowerCase()==="true"||A?.toLowerCase()==="yes"}function r60(){if(P2(FC.CAPGO_DISABLE_TELEMETRY)||P2(FC.CAPGO_DISABLE_POSTHOG))return;return FC.CAPGO_CLI_POSTHOG_API_KEY?.trim()||FC.POSTHOG_API_KEY?.trim()||p60}function o60(A){let Q=GX(A);if(Q.endsWith("/i/v0/e"))return`${Q}/`;let B=Q.replace(/\/capture$/,"/");return new URL("i/v0/e/",B.endsWith("/")?B:`${B}/`).toString()}function a60(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 s60(A){let Q=A,B=OaA(),$=oHA();if(B)Q=Q.replaceAll(B,"<cwd>");if($)Q=Q.replaceAll($,"~");return Q}function t60(A){let Q=A,B=OaA(),$=oHA();if(B)Q=Q.replaceAll(B,"<cwd>");if($)Q=Q.replaceAll($,"~");return Q.replace(/<cwd>\/[^\s"',)]+/g,"<cwd>/<path>").replace(/~\/[^\s"',)]+/g,"~/<path>").replace(/[\w.%+-]+@[\w.-]+\.[A-Z]{2,}/gi,"<email>").replace(/(https?:\/\/)([^/\s:@]+):([^/\s@]+)@/gi,"$1<redacted>@").replace(/\b[a-z][\w-]*(?:\.[\w-]+){1,}\b/gi,"<app_id>").replace(/\b[a-z]:\\[^\s"',)]+/gi,"<path>").replace(/(^|[\s"'(])\/[^\s"',)]+/g,"$1<path>").replace(/(--(?:token|api[-_]?key|key|password|secret|private[-_]?key|jwt|session|auth)(?:=|\s+))("[^"]+"|'[^']+'|\S+)/gi,"$1<redacted>").replace(/\b((?:token|api[-_]?key|password|secret|authorization)\s*[:=]\s*)[^\s,;]+/gi,"$1<redacted>")}function e60(A,Q){let B=A?.split(`
|
|
75
|
+
`)},info:(A,Q)=>{x.message(A,{...Q,symbol:f0("blue",A60)})},success:(A,Q)=>{x.message(A,{...Q,symbol:f0("green",Q60)})},step:(A,Q)=>{x.message(A,{...Q,symbol:f0("green",yHA)})},warn:(A,Q)=>{x.message(A,{...Q,symbol:f0("yellow",B60)})},warning:(A,Q)=>{x.warn(A,Q)},error:(A,Q)=>{x.message(A,{...Q,symbol:f0("red",$60)})}},HxB={light:U6("─","-"),heavy:U6("━","="),block:U6("█","#")},H60=[`${f0("dim","↑/↓")} to navigate`,`${f0("dim","Enter:")} confirm`],FxB=`${f0("gray",m$)} `});var ooA=$A((UxB,F60)=>{F60.exports=[{name:"Agola CI",constant:"AGOLA",env:"AGOLA_GIT_REF",pr:"AGOLA_PULL_REQUEST_ID"},{name:"Alpic",constant:"ALPIC",env:"ALPIC_HOST"},{name:"Appcircle",constant:"APPCIRCLE",env:"AC_APPCIRCLE",pr:{env:"AC_GIT_PR",ne:"false"}},{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN",pr:{env:"CODEBUILD_WEBHOOK_EVENT",any:["PULL_REQUEST_CREATED","PULL_REQUEST_UPDATED","PULL_REQUEST_REOPENED"]}},{name:"Azure Pipelines",constant:"AZURE_PIPELINES",env:"TF_BUILD",pr:{BUILD_REASON:"PullRequest"}},{name:"Bamboo",constant:"BAMBOO",env:"bamboo_planKey"},{name:"Bitbucket Pipelines",constant:"BITBUCKET",env:"BITBUCKET_COMMIT",pr:"BITBUCKET_PR_ID"},{name:"Bitrise",constant:"BITRISE",env:"BITRISE_IO",pr:"BITRISE_PULL_REQUEST"},{name:"Buddy",constant:"BUDDY",env:"BUDDY_WORKSPACE_ID",pr:"BUDDY_EXECUTION_PULL_REQUEST_ID"},{name:"Buildkite",constant:"BUILDKITE",env:"BUILDKITE",pr:{env:"BUILDKITE_PULL_REQUEST",ne:"false"}},{name:"CircleCI",constant:"CIRCLE",env:"CIRCLECI",pr:"CIRCLE_PULL_REQUEST"},{name:"Cirrus CI",constant:"CIRRUS",env:"CIRRUS_CI",pr:"CIRRUS_PR"},{name:"Cloudflare Pages",constant:"CLOUDFLARE_PAGES",env:"CF_PAGES"},{name:"Cloudflare Workers",constant:"CLOUDFLARE_WORKERS",env:"WORKERS_CI"},{name:"Codefresh",constant:"CODEFRESH",env:"CF_BUILD_ID",pr:{any:["CF_PULL_REQUEST_NUMBER","CF_PULL_REQUEST_ID"]}},{name:"Codemagic",constant:"CODEMAGIC",env:"CM_BUILD_ID",pr:"CM_PULL_REQUEST"},{name:"Codeship",constant:"CODESHIP",env:{CI_NAME:"codeship"}},{name:"Drone",constant:"DRONE",env:"DRONE",pr:{DRONE_BUILD_EVENT:"pull_request"}},{name:"dsari",constant:"DSARI",env:"DSARI"},{name:"Earthly",constant:"EARTHLY",env:"EARTHLY_CI"},{name:"Expo Application Services",constant:"EAS",env:"EAS_BUILD"},{name:"Gerrit",constant:"GERRIT",env:"GERRIT_PROJECT"},{name:"Gitea Actions",constant:"GITEA_ACTIONS",env:"GITEA_ACTIONS"},{name:"GitHub Actions",constant:"GITHUB_ACTIONS",env:"GITHUB_ACTIONS",pr:{GITHUB_EVENT_NAME:"pull_request"}},{name:"GitLab CI",constant:"GITLAB",env:"GITLAB_CI",pr:"CI_MERGE_REQUEST_ID"},{name:"GoCD",constant:"GOCD",env:"GO_PIPELINE_LABEL"},{name:"Google Cloud Build",constant:"GOOGLE_CLOUD_BUILD",env:"BUILDER_OUTPUT"},{name:"Harness CI",constant:"HARNESS",env:"HARNESS_BUILD_ID"},{name:"Heroku",constant:"HEROKU",env:{env:"NODE",includes:"/app/.heroku/node/bin/node"}},{name:"Hudson",constant:"HUDSON",env:"HUDSON_URL"},{name:"Jenkins",constant:"JENKINS",env:["JENKINS_URL","BUILD_ID"],pr:{any:["ghprbPullId","CHANGE_ID"]}},{name:"LayerCI",constant:"LAYERCI",env:"LAYERCI",pr:"LAYERCI_PULL_REQUEST"},{name:"Magnum CI",constant:"MAGNUM",env:"MAGNUM"},{name:"Netlify CI",constant:"NETLIFY",env:"NETLIFY",pr:{env:"PULL_REQUEST",ne:"false"}},{name:"Nevercode",constant:"NEVERCODE",env:"NEVERCODE",pr:{env:"NEVERCODE_PULL_REQUEST",ne:"false"}},{name:"Prow",constant:"PROW",env:"PROW_JOB_ID"},{name:"ReleaseHub",constant:"RELEASEHUB",env:"RELEASE_BUILD_ID"},{name:"Render",constant:"RENDER",env:"RENDER",pr:{IS_PULL_REQUEST:"true"}},{name:"Sail CI",constant:"SAIL",env:"SAILCI",pr:"SAIL_PULL_REQUEST_NUMBER"},{name:"Screwdriver",constant:"SCREWDRIVER",env:"SCREWDRIVER",pr:{env:"SD_PULL_REQUEST",ne:"false"}},{name:"Semaphore",constant:"SEMAPHORE",env:"SEMAPHORE",pr:"PULL_REQUEST_NUMBER"},{name:"Sourcehut",constant:"SOURCEHUT",env:{CI_NAME:"sourcehut"}},{name:"Strider CD",constant:"STRIDER",env:"STRIDER"},{name:"TaskCluster",constant:"TASKCLUSTER",env:["TASK_ID","RUN_ID"]},{name:"TeamCity",constant:"TEAMCITY",env:"TEAMCITY_VERSION"},{name:"Travis CI",constant:"TRAVIS",env:"TRAVIS",pr:{env:"TRAVIS_PULL_REQUEST",ne:"false"}},{name:"Vela",constant:"VELA",env:"VELA",pr:{VELA_PULL_REQUEST:"1"}},{name:"Vercel",constant:"VERCEL",env:{any:["NOW_BUILDER","VERCEL"]},pr:"VERCEL_GIT_PULL_REQUEST_ID"},{name:"Visual Studio App Center",constant:"APPCENTER",env:"APPCENTER_BUILD_ID"},{name:"Woodpecker",constant:"WOODPECKER",env:{CI:"woodpecker"},pr:{CI_BUILD_EVENT:"pull_request"}},{name:"Xcode Cloud",constant:"XCODE_CLOUD",env:"CI_XCODE_PROJECT",pr:"CI_PULL_REQUEST_NUMBER"},{name:"Xcode Server",constant:"XCODE_SERVER",env:"XCS"}]});var KC=$A((uHA)=>{var aoA=ooA(),J5=process.env;Object.defineProperty(uHA,"_vendors",{value:aoA.map(function(A){return A.constant})});uHA.name=null;uHA.isPR=null;uHA.id=null;if(J5.CI!=="false")aoA.forEach(function(A){let B=(Array.isArray(A.env)?A.env:[A.env]).every(function($){return soA($)});if(uHA[A.constant]=B,!B)return;uHA.name=A.name,uHA.isPR=z60(A),uHA.id=A.constant});uHA.isCI=!!(J5.CI!=="false"&&(J5.BUILD_ID||J5.BUILD_NUMBER||J5.CI||J5.CI_APP_ID||J5.CI_BUILD_ID||J5.CI_BUILD_NUMBER||J5.CI_NAME||J5.CONTINUOUS_INTEGRATION||J5.RUN_ID||uHA.name||!1));function soA(A){if(typeof A==="string")return!!J5[A];if("env"in A)return J5[A.env]&&J5[A.env].includes(A.includes);if("any"in A)return A.any.some(function(Q){return!!J5[Q]});return Object.keys(A).every(function(Q){return J5[Q]===A[Q]})}function z60(A){switch(typeof A.pr){case"string":return!!J5[A.pr];case"object":if("env"in A.pr)if("any"in A.pr)return A.pr.any.some(function(Q){return J5[A.pr.env]===Q});else return A.pr.env in J5&&J5[A.pr.env]!==A.pr.ne;else if("any"in A.pr)return A.pr.any.some(function(Q){return!!J5[Q]});else return soA(A.pr);default:return null}}});var Y8;var ZX=b(()=>{Y8={name:"@capgo/cli",type:"module",version:"8.106.1",description:"A CLI to upload to capgo servers",author:"Martin martin@capgo.app",license:"Apache 2.0",homepage:"https://github.com/Cap-go/capgo/tree/main/cli#readme",repository:{type:"git",url:"https://github.com/Cap-go/capgo.app",directory:"cli"},bugs:{url:"https://github.com/Cap-go/capgo/issues"},keywords:["appflow alternative","ionic","capacitor","auto update","live update","capgo","cli","upload","capgo-cli","sdk","tanstack-intent"],exports:{".":{import:"./dist/index.js",require:"./dist/index.js"},"./sdk":{types:"./dist/src/sdk.d.ts",import:"./dist/src/sdk.js"}},main:"dist/index.js",types:"dist/src/index.d.ts",bin:{capgo:"dist/index.js"},files:["!skills/_artifacts","dist","skills"],engines:{npm:">=8.0.0",node:">=20.0.0"},scripts:{build:"tsc && bun build.mjs",dev:"NODE_ENV=development ncc build","no-debug":"node dist/index.js","dev-build":"SUPA_DB=development ncc build",pack:"pkg",typecheck:"tsc --noEmit",lint:"bun run lint:ox","lint:ox":"oxlint --config ../.oxlintrc.json src","lint:fix":"oxlint --config ../.oxlintrc.json --fix src","check-posix-paths":"node test/check-posix-paths.js","generate-docs":"node dist/index.js generate-docs README.md","test:notify-app-ready-background":"bun test ./test/test-notify-app-ready-background.mjs ./test/test-background-check-shutdown.mjs","test:bundle":"bun test/test-bundle.mjs","test:bundle-validation":"bun test test/bundle/","test:prescan":"bun test test/prescan/","test:functional":"bun test/test-functional.mjs","test:semver":"bun test/test-semver-validation.mjs","test:version-edge-cases":"bun test/test-version-validation.mjs","test:regex":"bun test/test-regex-validation.mjs","test:upload":"bun test/test-upload-validation.mjs","test:fail-on-incompatible":"bun test/test-fail-on-incompatible.mjs","test:native-dependencies":"bun test/test-native-dependencies.mjs && bun test/test-get-remote-dependencies.mjs","test:package-json-guard":"bun test/test-package-json-guard.mjs","test:credentials":"bun test/test-credentials.mjs","test:credentials-export":"bun test/test-credentials-export.mjs","test:key-create-mode":"bun test/test-key-create-mode.mjs","test:asc-key-protocol":"bun test/test-asc-key-protocol.mjs","test:credentials-validation":"bun test/test-credentials-validation.mjs","test:android-service-account-validation":"bun test/test-android-service-account-validation.mjs","test:build-zip-filter":"bun test/test-build-zip-filter.mjs","test:offline-packers":"bun test/test-offline-packers.mjs","test:checksum":"bun test/test-checksum-algorithm.mjs","test:build-needed":"bun test/test-build-needed.mjs","test:cli-help":"bun test/test-cli-help.mjs","test:build-cache-payload":"bun test/test-build-cache-payload.mjs","test:build-cancellation":"bun test/test-build-cancellation.mjs","test:ci-prompts":"bun test/test-ci-prompts.mjs","test:capgo-app-id-prompt":"bun test/test-capgo-app-id-prompt.mjs","test:bundle-soft-delete":"bun test/test-bundle-soft-delete.mjs","test:ci-secrets":"bun test/test-ci-secrets.mjs","test:android-onboarding-progress":"bun test/test-android-onboarding-progress.mjs && bun test/test-android-select-guard.mjs","test:android-keystore-action":"bun test/test-android-keystore-action.mjs","test:android-google-play-action":"bun test/test-android-google-play-action.mjs","test:onboarding-telemetry":"bun test/test-onboarding-telemetry.mjs","test:v2-event-migration":"bun test/test-v2-event-migration.mjs","test:analytics":"bun test/test-analytics.mjs","test:cli-headers":"bun test/test-cli-headers.mjs","test:min-cli-version":"bun test/test-min-cli-version.mjs","test:authenticated-command-invocation":"bun test/test-authenticated-command-invocation.mjs","test:analytics-error-category":"bun test/test-analytics-error-category.mjs","test:analytics-org-resolver":"bun test/test-analytics-org-resolver.mjs","test:api-perf":"bun test/test-api-perf.mjs","test:preview-qr":"bun test/test-preview-qr.mjs","test:bundle-pages":"bun test test/test-bundle-pages.test.ts","test:bundle-single-requests":"bun test test/test-bundle-single-requests.test.ts","test:mcp-analytics":"bun test/test-mcp-analytics.mjs && bun test/test-mcp-telemetry-project.mjs","test:mcp-instructions":"bun test/test-mcp-instructions.mjs","test:mcp-error-guidance":"bun test/test-mcp-error-guidance.mjs","test:mcp-stdout-guard":"bun test/test-mcp-stdout-guard.mjs","test:mcp-project-dir":"bun test/test-mcp-project-dir.mjs && bun test/test-cwd.mjs && bun test/test-project-context.mjs","test:mcp-host-fields":"bun test/test-mcp-host-fields.mjs","test:mcp-platform-select":"bun test/test-mcp-platform-select.mjs","test:mcp-explain-scopes":"bun test/test-mcp-explain-scopes.mjs","test:mcp-oauth-reopen":"bun test/test-mcp-oauth-reopen.mjs","test:mcp-broker-oauth":"bun test/test-mcp-broker-oauth.mjs","test:mcp-broker-session":"bun test/test-mcp-broker-session.mjs","test:mcp-credentials-manage":"bun test/test-mcp-credentials-manage.mjs","test:mcp-resume-prompt":"bun test/test-mcp-resume-prompt.mjs","test:mcp-build-job":"bun test/test-mcp-build-job.mjs","test:mcp-build-tools":"bun test/test-mcp-build-tools.mjs","test:app-created-source":"bun test/test-app-created-source.mjs","test:app-add-exists":"bun test/test-app-add-exists.mjs","test:app-add-getting-started":"bun test/test-app-add-getting-started.mjs","test:app-list":"bun test/test-app-list.mjs","test:app-todo":"bun test/test-app-todo.mjs && bun test/test-builder-only-checklist.mjs && bun test/test-builder-only-setup.mjs && bun test/test-app-todo-lists.mjs && bun test/test-app-todo-tabs.mjs && bun test/test-app-todo-command.mjs && node test/test-app-todo-interactive.mjs","test:doctor-analytics":"bun test/test-doctor-analytics.mjs","test:posthog-exception":"bun test/test-posthog-exception.mjs","test:cli-recovery":"bun test/test-cli-recovery.mjs","test:create-capgo-client":"bun test/test-create-capgo-client.mjs","test:no-supabase-sdk":"bun test/test-no-supabase-sdk.mjs","test:no-redirect-error":"bun test/test-no-redirect-error.mjs","test:onboarding-recovery":"bun test/test-onboarding-recovery.mjs","test:onboarding-progress":"bun test/test-onboarding-progress.mjs","test:onboarding-run-targets":"bun test/test-onboarding-run-targets.mjs && bun test ./test/test-ios-simulator-compatibility.mjs","test:run-device-command":"bun test/test-run-device-command.mjs","test:init-app-conflict":"bun test/test-init-app-conflict.mjs","test:channel-add-exists":"bun test/test-channel-add-exists.mjs","test:wait-log":"bun test/test-wait-log.mjs","test:init-guardrails":"bun test/test-init-guardrails.mjs","test:init-command-execution":"bun test/test-init-command-execution.mjs","test:init-upload-recovery":"bun test/test-init-upload-monorepo-recovery.mjs","test:init-replay":"bun test/test-init-replay.mjs","test:init-ota-checklist":"bun test/test-init-ota-checklist.mjs","test:init-telemetry":"bun test/test-init-telemetry.mjs","test:capacitor-config-target":"bun test/test-capacitor-config-target.mjs","test:builder-app-id-config":"bun test/test-builder-app-id-config.mjs","test:capacitor-config-typescript7":"bun test/test-capacitor-config-typescript7.mjs","test:capacitor-config-native-import":"bun test/test-capacitor-config-native-import.mjs","test:cli-user-error-config":"bun test/test-cli-user-error-config.mjs","test:cordova-upload-mode":"bun test/test-cordova-upload-mode.mjs","test:init-monorepo-targeting":"bun run test:capacitor-config-target && bun run test:builder-app-id-config && bun run test:capacitor-config-typescript7 && bun run test:capacitor-config-native-import && bun run test:cli-user-error-config && bun test/test-init-monorepo-targeting.mjs","test:prompt-preferences":"bun test/test-prompt-preferences.mjs","test:esm-sdk":"node test/test-sdk-esm.mjs","test:auth-session":"bun test/test-auth-session.mjs && bun test/test-auth-session-bad-key.mjs","test:mcp":"node test/test-mcp.mjs && node test/test-mcp-skills.mjs","test:mcp-no-key-handshake":"node test/test-mcp-no-key-handshake.mjs","test:version-detection":"node test/test-get-installed-version.mjs","test:version-detection:setup":"./test/fixtures/setup-test-projects.sh","test:platform-paths":"bun test/test-platform-paths.mjs","test:project-type-detection":"bun test/test-project-type-detection.mjs","test:payload-split":"bun test/test-payload-split.mjs && bun test/test-build-env.mjs","test:macos-signing":"bun test/test-macos-signing.mjs","test:helper-dce":"bash scripts/check-helper-dce.sh","test:apple-api-import-helpers":"bun test/test-apple-api-import-helpers.mjs","test:apple-api-verify-key":"bun test/test-apple-api-verify-key.mjs","test:bundle-id-detector":"bun test/test-bundle-id-detector.mjs","test:apple-api-app-list":"bun test/test-apple-api-app-list.mjs","test:apple-api-cert-create":"bun test/test-apple-api-cert-create.mjs","test:app-verification":"bun test/test-app-verification.mjs","test:pbxproj-parser":"bun test/test-pbxproj-parser.mjs","test:self-update":"bun test/test-self-update.mjs","test:update-prompt":"bun test/test-update-prompt.mjs","test:android-tail-engine":"bun test/test-android-tail-engine.mjs","test:android-tail-render":"bun test/test-android-tail-render.mjs","test:android-tail-routing":"bun test/test-android-tail-routing.mjs","test:dev-gate-stripped":"bun test/test-dev-gate-stripped.mjs","test:ios-confirm-app-id":"bun test/test-ios-confirm-app-id.mjs","test:ios-create-new":"bun test/test-ios-create-new.mjs","test:ios-certificate-action":"bun test/test-ios-certificate-action.mjs","test:ios-profile-action":"bun test/test-ios-profile-action.mjs","test:ios-credential-action":"bun test/test-ios-credential-action.mjs","test:ios-e2e":"bun test/test-ios-e2e.mjs","test:ios-import-discovery":"bun test/test-ios-import-discovery.mjs","test:ios-import-export":"bun test/test-ios-import-export.mjs","test:ios-import-pickers":"bun test/test-ios-import-pickers.mjs","test:ios-import-recovery":"bun test/test-ios-import-recovery.mjs","test:ios-recovery":"bun test/test-ios-recovery.mjs","test:ios-resume":"bun test/test-ios-resume.mjs","test:ios-tail-handoff":"bun test/test-ios-tail-handoff.mjs","test:ios-tui-render":"bun test/test-ios-tui-render.mjs","test:p8-error":"bun test/test-p8-error.mjs","test:ios-tui-routing":"bun test/test-ios-tui-routing.mjs","test:ios-updater-sync-validation":"bun test/test-ios-updater-sync-validation.mjs","test:ios-verify-app":"bun test/test-ios-verify-app.mjs","test:ios-marketing-version":"bun test/test-ios-marketing-version.mjs","test:android-version":"bun test/test-android-version.mjs","test:platform-flow-contract":"bun test/test-platform-flow-contract.mjs","test:tail-engine-shared":"bun test/test-tail-engine-shared.mjs",test:"bun run build && bun scripts/run-test-suite.ts","test:run":"bun scripts/run-test-suite.ts","test:serial":"bun run build && bun scripts/run-test-suite.ts --serial","test:monitoring":"bun test test/test-monitoring.test.ts","test:suite":"bun run test:monitoring && bun run test:helper-dce && bun run test:version-detection:setup && bun run test:bundle && bun run test:notify-app-ready-background && bun run test:bundle-validation && bun run test:functional && bun run test:semver && bun run test:auto-bump-version && bun run test:auto-bump-ai-diff && bun run test:version-edge-cases && bun run test:regex && bun run test:upload && bun run test:cordova-upload-mode && bun run test:fail-on-incompatible && bun run test:native-dependencies && bun run test:package-json-guard && bun run test:credentials && bun run test:credentials-export && bun run test:key-create-mode && bun run test:ios-provisioning-map && bun run test:ios-provisioning-command && bun run test:credentials-validation && bun run test:android-service-account-validation && bun run test:build-zip-filter && bun run test:offline-packers && bun run test:checksum && bun run test:build-needed && bun run test:cli-help && bun run test:build-cache-payload && bun run test:build-cancellation && bun run test:ci-prompts && bun run test:capgo-app-id-prompt && bun run test:ci-secrets && bun run test:android-onboarding-progress && bun run test:android-keystore-action && bun run test:android-google-play-action && bun run test:onboarding-telemetry && bun run test:v2-event-migration && bun run test:analytics && bun run test:cli-headers && bun run test:min-cli-version && bun run test:authenticated-command-invocation && bun run test:analytics-error-category && bun run test:analytics-org-resolver && bun run test:api-perf && bun run test:preview-qr && bun run test:bundle-pages && bun run test:bundle-single-requests && bun run test:app-set-options && bun run test:mcp-analytics && bun run test:mcp-instructions && bun run test:mcp-error-guidance && bun run test:mcp-live-update-onboarding && bun run test:mcp-stdout-guard && bun run test:mcp-project-dir && bun run test:mcp-host-fields && bun run test:mcp-platform-select && bun run test:mcp-explain-scopes && bun run test:mcp-oauth-reopen && bun run test:mcp-broker-oauth && bun run test:mcp-broker-session && bun run test:mcp-credentials-manage && bun run test:mcp-resume-prompt && bun run test:mcp-build-job && bun run test:mcp-build-tools && bun run test:app-created-source && bun run test:app-add-exists && bun run test:app-add-getting-started && bun run test:app-list && bun run test:app-todo && bun run test:doctor-analytics && bun run test:posthog-exception && bun run test:cli-recovery && bun run test:create-capgo-client && bun run test:bundle-soft-delete && bun run test:no-supabase-sdk && bun run test:no-redirect-error && bun run test:build-platform-selection && bun run test:builder-project-discovery && bun run test:builder-app-selection && bun run test:builder-login-gate && bun run test:onboarding-recovery && bun run test:onboarding-progress && bun run test:onboarding-run-targets && bun run test:run-device-command && bun run test:init-monorepo-targeting && bun run test:init-app-conflict && bun run test:channel-list && bun run test:channel-add-exists && bun run test:wait-log && bun run test:init-guardrails && bun run test:init-command-execution && bun run test:init-upload-recovery && bun run test:init-replay && bun run test:init-telemetry && bun run test:init-ota-checklist && bun run test:prompt-preferences && bun run test:esm-sdk && bun run test:mcp && bun run test:mcp-no-key-handshake && bun run test:auth-session && bun run test:version-detection && bun run test:platform-paths && bun run test:project-type-detection && bun run test:payload-split && bun run test:macos-signing && bun run test:asc-key-protocol && bun run test:apple-api-import-helpers && bun run test:apple-api-verify-key && bun run test:bundle-id-detector && bun run test:apple-api-app-list && bun run test:app-verification && bun run test:pbxproj-parser && bun run test:ai-log-capture && bun run test:ai-analyze-flow && bun run test:cicd-failure-help && bun run test:ai-sse-parser && bun run test:ai-render-markdown && bun run test:ai-stream-markdown && bun run test:ai-onboarding-mode && bun run test:ai-fit && bun run test:platform-layout && bun run test:frame-fit && bun run test:onboarding-min-size && bun run test:min-size-gate && bun run test:shell-size-gate && bun run test:build-log-sanitize && bun run test:build-output-viewport && bun run test:diff-viewer-viewport && bun run test:build-complete-exit && bun run test:support && bun run test:self-update && bun run test:update-prompt && bun run test:apple-api-cert-create && bun run test:android-tail-engine && bun run test:android-tail-render && bun run test:android-tail-routing && bun run test:dev-gate-stripped && bun run test:ios-confirm-app-id && bun run test:ios-create-new && bun run test:ios-certificate-action && bun run test:ios-profile-action && bun run test:ios-credential-action && bun run test:ios-e2e && bun run test:ios-import-discovery && bun run test:ios-import-export && bun run test:ios-import-pickers && bun run test:ios-import-recovery && bun run test:ios-recovery && bun run test:ios-resume && bun run test:ios-tail-handoff && bun run test:ios-tui-render && bun run test:p8-error && bun run test:ios-tui-routing && bun run test:ios-updater-sync-validation && bun run test:ios-verify-app && bun run test:ios-marketing-version && bun run test:android-version && bun run test:platform-flow-contract && bun run test:tail-engine-shared && bun run test:prescan && bun run test:android-reporting-api && bun run test:android-gcp && bun run test:android-app-verification && bun run test:android-rename && bun run test:appflow-auth && bun run test:appflow-api-map && bun run test:appflow-validate && bun run test:appflow-flow && bun run test:appflow-gapfill && bun run test:appflow-engine && bun run test:appflow-tail && bun run test:appflow-fetch && bun run test:appflow-sa-decode && bun run test:app-permission-helper && bun run test:2fa-compliance-network && bun run test:retryable-capgo-api-error && bun run test:organization-set-api-host && bun run test:plan-validation && bun run test:setup-notices && bun run test:settings-parity && bun run test:init-browser-login && bun run test:android-onboarding-units && bun run test:build-credentials-units && bun run test:onboarding-generators && bun run test:mcp-onboarding","test:build-platform-selection":"bun test/test-build-platform-selection.mjs","test:builder-project-discovery":"bun test/test-builder-project-discovery.mjs","test:builder-app-selection":"bun test/test-builder-app-selection.mjs","test:builder-login-gate":"bun test/test-builder-login-gate.mjs","test:ai-log-capture":"bun test/test-ai-log-capture.mjs","test:ai-analyze-flow":"bun test/test-ai-analyze-flow.mjs","test:cicd-failure-help":"bun test/test-cicd-failure-help.mjs","test:ai-sse-parser":"bun test/test-ai-sse-parser.mjs","test:ai-render-markdown":"bun test/test-ai-render-markdown.mjs","test:ai-onboarding-mode":"bun test/test-ai-onboarding-mode.mjs","test:ai-fit":"bun test/test-ai-fit.mjs","test:platform-layout":"bun test/test-platform-layout.mjs","test:frame-fit":"bun test/run-frame-fit.mjs","test:onboarding-min-size":"bun test/test-onboarding-min-size.mjs","test:min-size-gate":"bun test/test-min-size-gate.mjs","test:shell-size-gate":"bun test/test-shell-size-gate.mjs","test:build-log-sanitize":"bun test/test-build-log-sanitize.mjs","test:build-output-viewport":"bun test/test-build-output-viewport.mjs","test:diff-viewer-viewport":"bun test/test-diff-viewer-viewport.mjs","test:build-complete-exit":"bun test/test-build-complete-exit.mjs","test:ai-stream-markdown":"bun test/test-ai-stream-markdown.mjs","test:support":"bun test/test-support.mjs","test:mcp-live-update-onboarding":"bun test/test-mcp-live-update-onboarding.mjs","test:app-set-options":"bun test/test-app-set-options.mjs","test:settings-parity":"bun test/test-settings-parity.mjs","test:android-reporting-api":"bun test/test-android-reporting-api.mjs","test:android-gcp":"bun test/test-android-gcp.mjs","test:android-app-verification":"bun test/test-android-app-verification.mjs","test:android-rename":"bun test/test-android-rename.mjs","test:appflow-auth":"bun test/test-appflow-auth.mjs","test:appflow-api-map":"bun test/test-appflow-api-map.mjs","test:appflow-validate":"bun test/test-appflow-validate.mjs","test:appflow-flow":"bun test/test-appflow-flow.mjs","test:appflow-gapfill":"bun test/test-appflow-gapfill.mjs","test:appflow-engine":"bun test/test-appflow-engine.mjs","test:appflow-tail":"bun test/test-appflow-tail.mjs","test:appflow-fetch":"bun test/test-appflow-fetch.mjs","test:appflow-sa-decode":"bun test/test-appflow-sa-decode.mjs","test:app-permission-helper":"bun test/test-app-permission-helper.mjs","test:2fa-compliance-network":"bun test/test-2fa-compliance-network.mjs","test:retryable-capgo-api-error":"bun test/test-retryable-capgo-api-error.mjs","test:organization-set-api-host":"bun test/test-organization-set-api-host.mjs","test:plan-validation":"bun test/test-plan-validation.mjs && bun test ./test/test-direct-offer-plan.mjs","test:auto-bump-version":"bun test/test-auto-bump-version.mjs","test:auto-bump-ai-diff":"bun test/test-auto-bump-ai-diff.mjs","test:ios-provisioning-map":"bun test/test-ios-provisioning-map.mjs","test:ios-provisioning-command":"bun test/test-ios-provisioning-command.mjs","test:channel-list":"bun test/test-channel-list.mjs","test:init-browser-login":"bun test test/init/","test:android-onboarding-units":"bun test/test-android-gradle.mjs && bun test/test-android-keystore.mjs && bun test/test-android-oauth.mjs && bun test/test-android-play.mjs && bun test/test-android-tui-sequencing.mjs","test:build-credentials-units":"bun test/test-credentials-migration.mjs && bun test/test-provisioning-map-validation.mjs && bun test/test-mobileprovision-parser.mjs","test:onboarding-generators":"bun test/test-diff-utils.mjs && bun test/test-workflow-generator.mjs","test:mcp-onboarding":"bun test ./test/build/onboarding/mcp/scoped-credential-path.test.ts && bun test/test-mcp-onboarding.mjs","test:setup-notices":"bun test ./test/test-setup-notices.mjs ./test/test-setup-progress-request.mjs ./test/test-setup-notice-background.mjs ./test/test-init-completion-notice.mjs && bun test ./test/test-builder-setup-notice.mjs"},dependencies:{"@inkjs/ui":"^2.0.0","@manypkg/tools":"^2.1.2","@rrweb/types":"^2.1.1","@standard-schema/spec":"^1.1.0","@xmldom/xmldom":"^0.9.10","@xterm/addon-serialize":"^0.14.0","@xterm/headless":"^6.0.0","agent-cli-detector":"^0.1.6","happy-dom":"^21.0.4",ink:"^7.1.1","ink-spinner":"^5.0.0",jsonwebtoken:"^9.0.3","node-forge":"^1.4.0",qrcode:"^1.5.4",react:"^19.2.8","rrweb-snapshot":"^2.1.1","string-width":"^8.2.2",typescript:"6.0.3",zod:"^4.5.4"},optionalDependencies:{"@capgo/cli-helper-darwin-arm64":"^1.1.1","@capgo/cli-helper-darwin-x64":"^1.1.1","node-pty":"^1.1.0"},devDependencies:{"@antfu/eslint-config":"^9.2.0","@bradenmacdonald/s3-lite-client":"npm:@jsr/bradenmacdonald__s3-lite-client@0.9.6","@capacitor/cli":"^8.4.2","@capgo/find-package-manager":"^0.0.18","@clack/prompts":"^1.7.0","@modelcontextprotocol/client":"^2.0.0-beta.5","@modelcontextprotocol/server":"^2.0.0-beta.5","@sauber/table":"npm:@jsr/sauber__table","@sinonjs/fake-timers":"15.4.0","@std/semver":"npm:@jsr/std__semver@1.0.8","@tanstack/intent":"^0.3.6","@types/adm-zip":"^0.5.8","@types/cross-spawn":"^6.0.6","@types/jsonwebtoken":"^9.0.10","@types/node":"^26.1.1","@types/node-forge":"^1.3.14","@types/prettyjson":"^0.0.33","@types/qrcode":"^1.5.6","@types/react":"^19.2.17","@types/tmp":"^0.2.6","@types/ws":"^8.18.1","@typescript/native":"npm:typescript@7.1.0-beta","@vercel/ncc":"^0.44.1","@vue/compiler-dom":"3.5.40","@xterm/headless":"^6.0.0","adm-zip":"^0.6.0","ci-info":"^4.4.0",commander:"^15.0.0","cross-spawn":"^7.0.6",eslint:"^10.7.0","git-format-staged":"4.0.2",husky:"^9.1.7","is-wsl":"^3.1.1",micromatch:"^4.0.8",open:"^11.0.0",oxlint:"^1.75.0",partysocket:"^1.3.0",prettyjson:"^1.2.5",tmp:"^0.2.7","tus-js-client":"^4.3.1",ws:"^8.21.1"}}});import{AsyncLocalStorage as N60}from"node:async_hooks";function C60(){return V60.getStore()}function ug(){JaA=!0}function YaA(){return JaA}function ZaA(A){XaA=A}function $aA(A){try{XaA?.(A)}catch{}}function KaA(A,Q){let B;try{B=new URL(A).pathname}catch{B=A.split("?")[0]}let $=[];for(let J of B.split("/").filter(Boolean)){if($.length>=4||!/^(?:[a-z_-]+|2fa)$/.test(J))break;$.push(J)}return`${Q} ${$.join("/")||B}`}function E60(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 WaA(A){return async(B,$)=>{let J=($?.method??"GET").toUpperCase(),Y=typeof B==="string"?B:B instanceof URL?B.href:B.url,X=C60(),Z=E60($),G=Date.now();try{let K=await globalThis.fetch(B,$);return $aA({url:Y,route:A,method:J,status:K.status,ok:K.ok,durationMs:Date.now()-G,source:X,apikey:Z}),K}catch(K){throw $aA({url:Y,route:A,method:J,status:0,ok:!1,durationMs:Date.now()-G,source:X,apikey:Z,error:K}),K}}}var V60,JaA=!1,XaA,GaA=5000;var mg=b(()=>{V60=new N60});var PA;var J1=b(()=>{PA=class PA extends Error{context;constructor(A,Q,B){super(A,B!==void 0?{cause:B}:void 0);this.name="CliUserError",this.context=Q}}});import{platform as R60}from"node:os";import{version as w60}from"node:process";function zaA(A){FaA=A}function _60(A){for(let Q=0;Q<A.length;Q++)if(A.charCodeAt(Q)>255)return!1;return!0}function HaA(A){if(A.toLowerCase()==="x-capgo-log-token")return"Build log token is missing. Re-run the build command or pass a valid log token.";return"Capgo API key is missing. Run `npx -y @capgo/cli@latest login` or pass `--apikey`."}function T60(A){if(A.toLowerCase()==="x-capgo-log-token")return"Build log token contains invalid characters (only ASCII is allowed). Re-run the build command to get a fresh token.";if(A.toLowerCase()==="authorization")return"Authorization header contains invalid characters (only ASCII is allowed). Check your Capgo API key configuration.";return"Capgo API key contains invalid characters (only ASCII is allowed). Copy the key from the Capgo dashboard."}function iHA(A,Q){if(Q===void 0||Q===null){if(pHA.has(A.toLowerCase()))throw new PA(HaA(A));throw new PA(`HTTP header "${A}" is missing or invalid.`)}if(typeof Q!=="string"){if(pHA.has(A.toLowerCase()))throw new PA(HaA(A));throw new PA(`HTTP header "${A}" is missing or invalid.`)}if(!_60(Q)){if(pHA.has(A.toLowerCase()))throw new PA(T60(A));throw new PA(`HTTP header "${A}" contains invalid characters (only ASCII is allowed).`)}return Q}function P60(A=lt.isCI,Q=lt.name){if(!A)return;return(Q??"").replace(/[^\x20-\x7E]/g,"").trim().slice(0,64)||"ci"}function c1(A){let Q={capgo_api:j60,"x-cli-version":Y8.version,"x-cli-command":FaA,"x-cli-node":w60,"x-cli-os":R60()},B=P60();if(B)Q["x-cli-ci"]=B;if(A)for(let[$,J]of Object.entries(A))Q[$]=iHA($,J);return Q}var lt,j60="2025-10-01",FaA="",pHA;var JY=b(()=>{ZX();J1();lt=nA(KC(),1),pHA=new Set(["authorization","capgkey","x-capgo-log-token"])});function qaA(A){let Q=A;if(typeof Q.status==="number")return Q.status;let B=Q.context&&typeof Q.context==="object"?Q.context.status:void 0;return typeof B==="number"?B:void 0}function S60(A){if(!A||typeof A!=="object")return;let Q=qaA(A);if(Q!==void 0)return Q;let B=A.cause;if(B&&typeof B==="object")return qaA(B);return}function k60(A){let Q=[],B=new Set,$=A;if(typeof A==="string")return A;while($){if(typeof $==="string"){Q.push($);break}if(typeof $!=="object")break;if(B.has($))break;if(B.add($),$ instanceof Error){Q.push($.message),$=$.cause;continue}let J=$;if(typeof J.message==="string")Q.push(J.message);$=J.cause}return Q.join(" ")}function b60(A){return k60(A)}function HC(A){if(A&&typeof A==="object"&&"code"in A){let $=A.code;if(typeof $==="string"&&$.startsWith("commander."))return"commander"}let Q=S60(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===429)return"rate_limited";if(Q>=500)return"server_error"}let B=b60(A).toLowerCase();if(/econnrefused|econnreset|enotfound|eai_again|fetch failed|failed to fetch|connect timeout|und_err/.test(B))return"network_error";if(/timed out|timeout|etimedout|aborted/.test(B))return"timeout";if(/invalid|must be|required|not allowed|malformed|validation/.test(B))return"validation_error";return"unknown"}function UaA(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"}function GX(A){let Q=A.length;while(Q>0&&A[Q-1]==="/")Q-=1;return A.slice(0,Q)}import{randomUUID as IaA}from"node:crypto";import{existsSync as f60,mkdirSync as g60,readFileSync as y60,writeFileSync as h60}from"node:fs";import{homedir as oHA,platform as u60,release as m60}from"node:os";import{join as MaA}from"node:path";import{arch as c60,cwd as OaA,env as FC,version as l60}from"node:process";function P2(A){return A==="1"||A?.toLowerCase()==="true"||A?.toLowerCase()==="yes"}function r60(){if(P2(FC.CAPGO_DISABLE_TELEMETRY)||P2(FC.CAPGO_DISABLE_POSTHOG))return;return FC.CAPGO_CLI_POSTHOG_API_KEY?.trim()||FC.POSTHOG_API_KEY?.trim()||p60}function o60(A){let Q=GX(A);if(Q.endsWith("/i/v0/e"))return`${Q}/`;let B=Q.replace(/\/capture$/,"/");return new URL("i/v0/e/",B.endsWith("/")?B:`${B}/`).toString()}function a60(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 s60(A){let Q=A,B=OaA(),$=oHA();if(B)Q=Q.replaceAll(B,"<cwd>");if($)Q=Q.replaceAll($,"~");return Q}function t60(A){let Q=A,B=OaA(),$=oHA();if(B)Q=Q.replaceAll(B,"<cwd>");if($)Q=Q.replaceAll($,"~");return Q.replace(/<cwd>\/[^\s"',)]+/g,"<cwd>/<path>").replace(/~\/[^\s"',)]+/g,"~/<path>").replace(/[\w.%+-]+@[\w.-]+\.[A-Z]{2,}/gi,"<email>").replace(/(https?:\/\/)([^/\s:@]+):([^/\s@]+)@/gi,"$1<redacted>@").replace(/\b[a-z][\w-]*(?:\.[\w-]+){1,}\b/gi,"<app_id>").replace(/\b[a-z]:\\[^\s"',)]+/gi,"<path>").replace(/(^|[\s"'(])\/[^\s"',)]+/g,"$1<path>").replace(/(--(?:token|api[-_]?key|key|password|secret|private[-_]?key|jwt|session|auth)(?:=|\s+))("[^"]+"|'[^']+'|\S+)/gi,"$1<redacted>").replace(/\b((?:token|api[-_]?key|password|secret|authorization)\s*[:=]\s*)[^\s,;]+/gi,"$1<redacted>")}function e60(A,Q){let B=A?.split(`
|
|
76
76
|
`).slice(1).map(($)=>{let J=$.trim(),Y=J.startsWith("at ")?J.slice(3):J,X=Q,Z=Y,G=Y.lastIndexOf(" (");if(G!==-1&&Y.endsWith(")"))X=Y.slice(0,G).trim()||Q,Z=Y.slice(G+2,-1);else{let H=Y.lastIndexOf(" "),F=H===-1?"":Y.slice(H+1);if(/:\d+:\d+$/.test(F))X=Y.slice(0,H).trim()||Q,Z=F}let K=Z.lastIndexOf(":"),W=K===-1?-1:Z.lastIndexOf(":",K-1);if(K===-1||W===-1)return{function:Q,platform:"custom",lang:"javascript"};return{function:X,filename:s60(Z.slice(0,W)),lineno:Number.parseInt(Z.slice(W+1,K),10),colno:Number.parseInt(Z.slice(K+1),10),platform:"custom",lang:"javascript"}}).filter(Boolean);return B&&B.length>0?B:[{function:Q,platform:"custom",lang:"javascript"}]}function A90(A){if(!A||typeof A!=="object"||!("code"in A))return;let{code:Q}=A;return typeof Q==="string"?Q:void 0}function B90(A){if(!A||typeof A!=="object")return;let Q=A;if(typeof Q.status==="number")return Q.status;if(typeof Q.statusCode==="number")return Q.statusCode;let B=Q.context&&typeof Q.context==="object"?Q.context.status:void 0;return typeof B==="number"?B:void 0}function $90(A){let Q=(A instanceof Error?A.message:typeof A==="string"?A:"").toLowerCase();if(Q90.some((B)=>Q.includes(B)))return!0;return B90(A)===401}function cg(A){if(A instanceof PA){if(n60.has(A.message))return!0;return!1}if($90(A))return!1;return!A90(A)?.startsWith("commander.")}function pt(A){let Q=[],B=A;while(B?.parent){let $=B.name();if($)Q.push($);B=B.parent}return Q.reverse().join(" ")||"unknown"}function J90(A=MaA(oHA(),".capgo-credentials")){if(rHA)return rHA;let Q=MaA(A,"install-id"),B;try{let $=f60(Q)?y60(Q,"utf8").trim():"";if($)B=$;else B=IaA(),g60(A,{recursive:!0}),h60(Q,B,{encoding:"utf8",mode:384})}catch{B=IaA()}return rHA=B,B}async function lg(A){let Q=r60();if(!Q)return!1;let B=FC.CAPGO_CLI_POSTHOG_API_HOST?.trim()||FC.POSTHOG_API_HOST?.trim()||d60,$;try{$=o60(B)}catch{return!1}let J=a60(A.error),Y=t60(J.message),X=J90(),Z=e60(J.stack,A.functionName),G=[A.functionName,A.kind,J.name||"Error",String(A.status??1)].join(":"),K={token:Q,event:"$exception",properties:{distinct_id:X,$exception_list:[{type:J.name||"Error",value:Y,mechanism:{handled:!0,synthetic:!1},stacktrace:{type:"raw",frames:Z}}],$exception_fingerprint:G,architecture:c60,cli_version:Y8.version,error_kind:A.kind,function_name:A.functionName,is_ci:Boolean(FC.CI),node_version:l60,os_platform:u60(),os_release:m60(),runtime:"cli",status:A.status},timestamp:new Date().toISOString()};try{let W=new AbortController,H=setTimeout(()=>W.abort(),i60);try{return(await fetch($,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(K),signal:W.signal})).ok}finally{clearTimeout(H)}}catch{return!1}}var d60="https://eu.i.posthog.com/i/v0/e/",p60="phc_NXDyDajQaTQVwb25DEhIVZfxVUn4R0Y348Z7vWYHZUi",i60=1500,aHA="iOS sync validation failed. Delete your iOS folder, then rerun the add and sync commands above and retry.",n60,Q90,rHA;var g_=b(()=>{ZX();J1();n60=new Set([aHA]);Q90=["invalid_apikey","invalid apikey","no_key_provided","no key provided","invalid api key or insufficient permissions","does not exist, run first"]});import{existsSync as OG}from"fs";var S2=(A=".",Q="unknown")=>{let B=`${A}/bun.lockb`,$=`${A}/bun.lock`,J=`${A}/pnpm-lock.yaml`,Y=`${A}/shrinkwrap.yaml`,X=`${A}/yarn.lock`,Z=`${A}/package-lock.json`,G=`${A}/npm-shrinkwrap.json`;if(OG(B)||OG($))return"bun";if(OG(J)||OG(Y))return"pnpm";if(OG(X))return"yarn";if(OG(Z)||OG(G))return"npm";return Q},TM=(A=S2(),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"}},it=(A=".",Q="npx")=>{let B=`${A}/bun.lockb`,$=`${A}/bun.lock`,J=`${A}/pnpm-lock.yaml`,Y=`${A}/shrinkwrap.yaml`,X=`${A}/yarn.lock`,Z=`${A}/package-lock.json`,G=`${A}/npm-shrinkwrap.json`;if(OG(B)||OG($))return"bunx";if(OG(J)||OG(Y))return"pnpm exec";if(OG(X))return"yarn dlx";if(OG(Z)||OG(G))return"npx";return Q};var dg=()=>{};function nt(A,Q){if(isNaN(A)||isNaN(Q))throw Error("Cannot compare against non-numbers");return A===Q?0:A<Q?-1:1}function VaA(A=[],Q=[]){if(A.length&&!Q.length)return-1;if(!A.length&&Q.length)return 1;return 0}function rt(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 tHA(A){return typeof A==="number"&&!Number.isNaN(A)&&(!Number.isFinite(A)||0<=A&&A<=Number.MAX_SAFE_INTEGER)}function LG(A){return A.split(".").filter(Boolean).map((Q)=>{if(G90.test(Q)){let B=Number(Q);if(tHA(B))return B}return Q})}function IF(A){return A.split(".").filter(Boolean)}function at(A,Q){let B=Number(A);if(!tHA(B))throw TypeError(Q);return B}function qU(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 y_="0|[1-9]\\d*",Y90="\\d*[a-zA-Z-][a-zA-Z0-9-]*",X90,LaA,CaA,NaA="[0-9A-Za-z-]+",EaA,RaA,waA,jaA="(?:<|>)?=?",Z90="x|X|\\*",sHA,ot,_aA,TaA,eHA=256,G90;var jK=b(()=>{X90=`(?<major>${y_})\\.(?<minor>${y_})\\.(?<patch>${y_})`,LaA=`(?:${y_}|${Y90})`,CaA=`(?:-(?<prerelease>${LaA}(?:\\.${LaA})*))`,EaA=`(?:\\+(?<buildmetadata>${NaA}(?:\\.${NaA})*))`,RaA=`v?${X90}${CaA}?${EaA}?`,waA=new RegExp(`^${RaA}$`),sHA=`${y_}|${Z90}`,ot=`[v=\\s]*(?<major>${sHA})(?:\\.(?<minor>${sHA})(?:\\.(?<patch>${sHA})${CaA}?${EaA}?)?)?`,_aA=new RegExp(`^(?<operator>~>?|\\^|${jaA})\\s*${ot}$`),TaA=new RegExp(`^(?<operator>${jaA})\\s*(${RaA})$|^$`);G90=new RegExp(`^${y_}$`)});function XZ(A,Q){if(A===Q)return 0;return nt(A.major,Q.major)||nt(A.minor,Q.minor)||nt(A.patch,Q.patch)||VaA(A.prerelease,Q.prerelease)||rt(A.prerelease,Q.prerelease)}var hW=b(()=>{jK()});function PaA(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(rt(A.prerelease,Q.prerelease)!==0)return"prerelease"}var SaA=b(()=>{jK()});function AFA(A){return A.toFixed(0)}function ZZ(A){let Q=AFA(A.major),B=AFA(A.minor),$=AFA(A.patch),J=A.prerelease?.join(".")??"",Y=A.build?.join(".")??"";return[[`${Q}.${B}.${$}`,J].filter((G)=>G).join("-"),Y].filter((G)=>G).join("+")}function K90(A,Q){if(qU(Q))return!0;let B=XZ(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 st(A,Q){for(let B of Q)if(!K90(A,B))return!1;if(!A.prerelease?.length)return!0;for(let B of Q){if(qU(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 tt=b(()=>{jK();hW()});function pg(A,Q){return Q.some((B)=>st(A,B))}var ig=b(()=>{tt()});function W90(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 ng(A=[],Q){let B=W90(A);if(!Q)return B;let $=LG(Q);if($.every((J)=>typeof J==="string")){if($.every((J,Y)=>J===B[Y])&&typeof B[$.length]==="number")return B;$=[...$,0]}return $}function PM(A,Q,B={}){let $=B.build!==void 0?IF(B.build):A.build??[];switch(Q){case"premajor":return{major:A.major+1,minor:0,patch:0,prerelease:ng(A.prerelease,B.prerelease),build:$};case"preminor":return{major:A.major,minor:A.minor+1,patch:0,prerelease:ng(A.prerelease,B.prerelease),build:$};case"prepatch":return{major:A.major,minor:A.minor,patch:A.patch+1,prerelease:ng(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:ng(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:ng(A.prerelease,B.prerelease),build:$};default:throw TypeError(`Cannot increment version: invalid argument ${Q}`)}}var kaA=b(()=>{jK()});var et,h_;var rg=b(()=>{et={major:Number.NaN,minor:Number.NaN,patch:Number.NaN,prerelease:[],build:[]},h_={operator:void 0,...et}});var QFA=b(()=>{rg();jK()});function BFA(A,Q){return XZ(A,Q)>0}var $FA=b(()=>{hW()});var baA=b(()=>{ig();$FA()});function NG(A,Q){return XZ(A,Q)<0}var JFA=b(()=>{hW()});var vaA=b(()=>{ig();JFA()});function H90(A){let B=A.match(TaA)?.groups;if(!B)return null;let{operator:$}=B;return{operator:$||void 0,...et}}function c6(A){return!A||A.toLowerCase()==="x"||A==="*"}function F90(A){if(c6(A.major))return;if(c6(A.minor))return{operator:">=",major:+A.major,minor:0,patch:0,prerelease:[],build:[]};if(c6(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?LG(A.prerelease):[],build:[]}}function z90(A){if(c6(A.major))return;if(c6(A.minor))return{operator:"<",major:+A.major+1,minor:0,patch:0,prerelease:[],build:[]};if(c6(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:LG(A.prerelease),build:[]};return{operator:"<=",major:+A.major,minor:+A.minor,patch:+A.patch,prerelease:[],build:[]}}function q90(A){let Q=A.match(new RegExp(`^${ot}`)),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,Z=A.slice($+Y).match(new RegExp(`^${ot}\\s*$`))?.groups,G=F90(B),K=z90(Z);return[G,K].filter(Boolean)}function U90(A){let Q=c6(A.major),B=c6(A.minor),$=c6(A.patch),J=+A.major,Y=+A.minor,X=+A.patch;if(Q)return[h_];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 Z=LG(A.prerelease??"");if(J===0){if(Y===0)return[{operator:">=",major:J,minor:Y,patch:X,prerelease:Z},{operator:"<",major:J,minor:Y,patch:X+1}];return[{operator:">=",major:J,minor:Y,patch:X,prerelease:Z},{operator:"<",major:J,minor:Y+1,patch:0}]}return[{operator:">=",major:J,minor:Y,patch:X,prerelease:Z},{operator:"<",major:J+1,minor:0,patch:0}]}function D90(A){let Q=c6(A.major),B=c6(A.minor),$=c6(A.patch),J=+A.major,Y=+A.minor,X=+A.patch;if(Q)return[h_];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 Z=LG(A.prerelease??"");return[{operator:">=",major:J,minor:Y,patch:X,prerelease:Z},{operator:"<",major:J,minor:Y+1,patch:0}]}function I90(A){let Q=c6(A.major),B=c6(A.minor),$=c6(A.patch),J=+A.major,Y=+A.minor,X=+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 Z=LG(A.prerelease??""),G=IF(A.build??"");return[{operator:"<",major:J,minor:Y,patch:X,prerelease:Z,build:G}]}function M90(A){let Q=c6(A.minor),B=c6(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 X=LG(A.prerelease??""),Z=IF(A.build??"");return[{operator:"<=",major:$,minor:J,patch:Y,prerelease:X,build:Z}]}function O90(A){let Q=c6(A.major),B=c6(A.minor),$=c6(A.patch),J=+A.major,Y=+A.minor,X=+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 Z=LG(A.prerelease??""),G=IF(A.build??"");return[{operator:">",major:J,minor:Y,patch:X,prerelease:Z,build:G}]}function L90(A){let Q=c6(A.major),B=c6(A.minor),$=c6(A.patch),J=+A.major,Y=+A.minor,X=+A.patch;if(Q)return[h_];if(B)return[{operator:">=",major:J,minor:0,patch:0}];if($)return[{operator:">=",major:J,minor:Y,patch:0}];let Z=LG(A.prerelease??""),G=IF(A.build??"");return[{operator:">=",major:J,minor:Y,patch:X,prerelease:Z,build:G}]}function N90(A){let Q=c6(A.major),B=c6(A.minor),$=c6(A.patch),J=+A.major,Y=+A.minor,X=+A.patch;if(Q)return[h_];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 Z=LG(A.prerelease??""),G=IF(A.build??"");return[{operator:A.operator==="="?"=":void 0,major:J,minor:Y,patch:X,prerelease:Z,build:G}]}function V90(A){let Q=A.match(_aA)?.groups;if(!Q)return H90(A);switch(Q.operator){case"^":return U90(Q);case"~":case"~>":return D90(Q);case"<":return I90(Q);case"<=":return M90(Q);case">":return O90(Q);case">=":return L90(Q);default:return N90(Q)}}function C90(A){return A.split(/\s+/).flatMap(V90)}function Ae(A){let Q=A.replaceAll(/(?<=[<>=~^])(\s+)/g,"").split(/\s*\|\|\s*/).map((B)=>q90(B)||C90(B));if(Q.some((B)=>B.includes(null)))throw TypeError(`Cannot parse version range: range "${A}" is invalid`);return Q}var YFA=b(()=>{jK();rg()});function Y1(A){if(typeof A!=="string")throw TypeError(`Cannot parse version as version must be a string: received ${typeof A}`);if(A.length>eHA)throw TypeError(`Cannot parse version as version length is too long: length is ${A.length}, max length is ${eHA}`);A=A.trim();let Q=A.match(waA)?.groups;if(!Q)throw TypeError(`Cannot parse version: ${A}`);let B=at(Q.major,`Cannot parse version ${A}: invalid major version`),$=at(Q.minor,`Cannot parse version ${A}: invalid minor version`),J=at(Q.patch,`Cannot parse version ${A}: invalid patch version`),Y=Q.prerelease?LG(Q.prerelease):[],X=Q.buildmetadata?IF(Q.buildmetadata):[];return{major:B,minor:$,patch:J,prerelease:Y,build:X}}var Qe=b(()=>{jK();jK()});function xaA(A,Q){let B=A.operator,$=Q.operator;if(B===void 0){if(qU(A))return!0;return pg(A,[[Q]])}if($===void 0){if(qU(Q))return!0;return pg(Q,[[A]])}let J=XZ(A,Q);return(B===">="||B===">")&&($===">="||$===">")||(B==="<="||B==="<")&&($==="<="||$==="<")||J===0&&((B===">="||B==="<=")&&($===">="||$==="<="))||J===-1&&(B===">="||B===">")&&($==="<="||$==="<")||J===1&&(B==="<="||B==="<")&&($===">="||$===">")}function E90(A){return A.every((Q)=>{return Q.some((B)=>R90(B))})}function R90(A){for(let Q=0;Q<A.length-1;Q++){let B=A[Q];for(let $ of A.slice(Q+1))if(!xaA(B,$))return!1}return!0}function faA(A,Q){return E90([A,Q])&&A.some((B)=>{return Q.some(($)=>{return B.every((J)=>{return $.every((Y)=>xaA(J,Y))})})})}var gaA=b(()=>{jK();hW();ig()});var yaA=b(()=>{YFA()});var haA=b(()=>{rg();rg();QFA()});function MF(A){try{return Y1(A),!0}catch{return!1}}var uaA=b(()=>{Qe()});var maA=b(()=>{Qe()});var caA=b(()=>{jK()});var laA=b(()=>{hW()});var daA=b(()=>{hW()});var paA=b(()=>{tt();jK();hW()});function Be(A,Q){return XZ(A,Q)>=0}var iaA=b(()=>{hW()});var naA=b(()=>{tt();jK();hW()});var raA=b(()=>{hW()});var VG=b(()=>{hW();SaA();ig();kaA();QFA();baA();vaA();YFA();Qe();gaA();yaA();haA();uaA();maA();caA();laA();daA();$FA();paA();iaA();JFA();naA();raA()});var XFA=$A((AyB,oaA)=>{oaA.exports={LOCHDR:30,LOCSIG:67324752,LOCVER:4,LOCFLG:6,LOCHOW:8,LOCTIM:10,LOCCRC:14,LOCSIZ:18,LOCLEN:22,LOCNAM:26,LOCEXT:28,EXTSIG:134695760,EXTHDR:16,EXTCRC:4,EXTSIZ:8,EXTLEN:12,CENHDR:46,CENSIG:33639248,CENVEM:4,CENVER:6,CENFLG:8,CENHOW:10,CENTIM:12,CENCRC:16,CENSIZ:20,CENLEN:24,CENNAM:28,CENEXT:30,CENCOM:32,CENDSK:34,CENATT:36,CENATX:38,CENOFF:42,ENDHDR:22,ENDSIG:101010256,ENDSUB:8,ENDTOT:10,ENDSIZ:12,ENDOFF:16,ENDCOM:20,END64HDR:20,END64SIG:117853008,END64START:4,END64OFF:8,END64NUMDISKS:16,ZIP64SIG:101075792,ZIP64HDR:56,ZIP64LEAD:12,ZIP64SIZE:4,ZIP64VEM:12,ZIP64VER:14,ZIP64DSK:16,ZIP64DSKDIR:20,ZIP64SUB:24,ZIP64TOT:32,ZIP64SIZB:40,ZIP64OFF:48,ZIP64EXTRA:56,STORED:0,SHRUNK:1,REDUCED1:2,REDUCED2:3,REDUCED3:4,REDUCED4:5,IMPLODED:6,DEFLATED:8,ENHANCED_DEFLATED:9,PKWARE:10,BZIP2:12,LZMA:14,IBM_TERSE:18,IBM_LZ77:19,AES_ENCRYPT:99,FLG_ENC:1,FLG_COMP1:2,FLG_COMP2:4,FLG_DESC:8,FLG_ENH:16,FLG_PATCH:32,FLG_STR:64,FLG_EFS:2048,FLG_MSK:4096,FILE:2,BUFFER:1,NONE:0,EF_ID:0,EF_SIZE:2,ID_ZIP64:1,ID_AVINFO:7,ID_PFS:8,ID_OS2:9,ID_NTFS:10,ID_OPENVMS:12,ID_UNIX:13,ID_FORK:14,ID_PATCH:15,ID_X509_PKCS7:20,ID_X509_CERTID_F:21,ID_X509_CERTID_C:22,ID_STRONGENC:23,ID_RECORD_MGT:24,ID_X509_PKCS7_RL:25,ID_IBM1:101,ID_IBM2:102,ID_POSZIP:18064,EF_ZIP64_OR_32:4294967295,EF_ZIP64_OR_16:65535,EF_ZIP64_SUNCOMP:0,EF_ZIP64_SCOMP:8,EF_ZIP64_RHO:16,EF_ZIP64_DSN:24}});var $e=$A((saA)=>{var aaA={INVALID_LOC:"Invalid LOC header (bad signature)",INVALID_CEN:"Invalid CEN header (bad signature)",INVALID_END:"Invalid END header (bad signature)",DESCRIPTOR_NOT_EXIST:"No descriptor present",DESCRIPTOR_UNKNOWN:"Unknown descriptor format",DESCRIPTOR_FAULTY:"Descriptor data is malformed",NO_DATA:"Nothing to decompress",BAD_CRC:"CRC32 checksum failed {0}",FILE_IN_THE_WAY:"There is a file in the way: {0}",UNKNOWN_METHOD:"Invalid/unsupported compression method",AVAIL_DATA:"inflate::Available inflate data did not terminate",INVALID_DISTANCE:"inflate::Invalid literal/length or distance code in fixed or dynamic block",TO_MANY_CODES:"inflate::Dynamic block code description: too many length or distance codes",INVALID_REPEAT_LEN:"inflate::Dynamic block code description: repeat more than specified lengths",INVALID_REPEAT_FIRST:"inflate::Dynamic block code description: repeat lengths with no first length",INCOMPLETE_CODES:"inflate::Dynamic block code description: code lengths codes incomplete",INVALID_DYN_DISTANCE:"inflate::Dynamic block code description: invalid distance code lengths",INVALID_CODES_LEN:"inflate::Dynamic block code description: invalid literal/length code lengths",INVALID_STORE_BLOCK:"inflate::Stored block length did not match one's complement",INVALID_BLOCK_TYPE:"inflate::Invalid block type (type == 3)",CANT_EXTRACT_FILE:"Could not extract the file",CANT_OVERRIDE:"Target file already exists",DISK_ENTRY_TOO_LARGE:"Number of disk entries is too large",NO_ZIP:"No zip file was loaded",NO_ENTRY:"Entry doesn't exist",DIRECTORY_CONTENT_ERROR:"A directory cannot have content",FILE_NOT_FOUND:'File not found: "{0}"',NOT_IMPLEMENTED:"Not implemented",INVALID_FILENAME:"Invalid filename",INVALID_FORMAT:"Invalid or unsupported zip format. No END header found",INVALID_PASS_PARAM:"Incompatible password parameter",WRONG_PASSWORD:"Wrong Password",COMMENT_TOO_LONG:"Comment is too long",EXTRA_FIELD_PARSE_ERROR:"Extra field parsing error"};function w90(A){return function(...Q){if(Q.length)A=A.replace(/\{(\d)\}/g,(B,$)=>Q[$]||"");return Error("ADM-ZIP: "+A)}}for(let A of Object.keys(aaA))saA[A]=w90(aaA[A])});var BsA=$A((ByB,QsA)=>{var j90=UQ("fs"),x5=UQ("path"),taA=XFA(),_90=$e(),T90=typeof process==="object"&&process.platform==="win32",eaA=(A)=>typeof A==="object"&&A!==null,AsA=new Uint32Array(256).map((A,Q)=>{for(let B=0;B<8;B++)if((Q&1)!==0)Q=3988292384^Q>>>1;else Q>>>=1;return Q>>>0});function KJ(A){if(this.sep=x5.sep,this.fs=j90,eaA(A)){if(eaA(A.fs)&&typeof A.fs.statSync==="function")this.fs=A.fs}}QsA.exports=KJ;KJ.prototype.makeDir=function(A){let Q=this;function B($){let J=$.split(Q.sep)[0];$.split(Q.sep).forEach(function(Y){if(!Y||Y.substr(-1,1)===":")return;J+=Q.sep+Y;var X;try{X=Q.fs.statSync(J)}catch(Z){if(Z.message&&Z.message.startsWith("ENOENT"))Q.fs.mkdirSync(J);else throw Z}if(X&&X.isFile())throw _90.FILE_IN_THE_WAY(`"${J}"`)})}B(A)};KJ.prototype.writeFileTo=function(A,Q,B,$){let J=this;if(J.fs.existsSync(A)){if(!B)return!1;var Y=J.fs.statSync(A);if(Y.isDirectory())return!1}var X=x5.dirname(A);if(!J.fs.existsSync(X))J.makeDir(X);var Z;try{Z=J.fs.openSync(A,"w",438)}catch(G){J.fs.chmodSync(A,438),Z=J.fs.openSync(A,"w",438)}if(Z)try{J.fs.writeSync(Z,Q,0,Q.length,0)}finally{J.fs.closeSync(Z)}return J.fs.chmodSync(A,$||438),!0};KJ.prototype.writeFileToAsync=function(A,Q,B,$,J){if(typeof $==="function")J=$,$=void 0;let Y=this;Y.fs.exists(A,function(X){if(X&&!B)return J(!1);Y.fs.stat(A,function(Z,G){if(X&&G&&G.isDirectory())return J(!1);var K=x5.dirname(A);Y.fs.exists(K,function(W){if(!W)try{Y.makeDir(K)}catch(F){return J(!1)}let H=function(F){Y.fs.write(F,Q,0,Q.length,0,function(D){Y.fs.close(F,function(){if(D)return J(!1);Y.fs.chmod(A,$||438,function(){J(!0)})})})};Y.fs.open(A,"w",438,function(F,D){if(F)Y.fs.chmod(A,438,function(){Y.fs.open(A,"w",438,function(U,I){if(U||!I)return J(!1);H(I)})});else if(D)H(D);else J(!1)})})})})};KJ.prototype.findFiles=function(A){let Q=this;function B($,J,Y,X){if(typeof J==="boolean")Y=J,J=void 0;let Z=[];return Q.fs.readdirSync($).forEach(function(G){let K=x5.join($,G),W=Q.fs.statSync(K);if(!J||J.test(K))Z.push(x5.normalize(K)+(W.isDirectory()?Q.sep:""));if(W.isDirectory()&&Y){let H=Q.fs.realpathSync(K);if(!X.has(H))X.add(H),Z=Z.concat(B(K,J,Y,X))}}),Z}return B(A,void 0,!0,new Set([Q.fs.realpathSync(A)]))};KJ.prototype.findFilesAsync=function(A,Q){let B=this,$=[],J=!1,Y=function(Z){if(J)return;J=!0,Q(Z,Z?void 0:$)},X=function(Z,G,K){B.fs.readdir(Z,function(W,H){if(W)return K(W);let F=H.length;if(!F)return K();H.forEach(function(D){let U=x5.join(Z,D);B.fs.stat(U,function(I,M){if(I)return K(I);if(!M){if(!--F)K();return}if($.push(x5.normalize(U)+(M.isDirectory()?B.sep:"")),!M.isDirectory()){if(!--F)K();return}B.fs.realpath(U,function(N,C){if(N)return K(N);if(G.has(C)){if(!--F)K();return}G.add(C),X(U,G,function(L){if(L)return K(L);if(!--F)K()})})})})})};B.fs.realpath(A,function(Z,G){if(Z)return Y(Z);X(A,new Set([G]),Y)})};KJ.prototype.getAttributes=function(){};KJ.prototype.setAttributes=function(){};KJ.crc32update=function(A,Q){return AsA[(A^Q)&255]^A>>>8};KJ.crc32=function(A){if(typeof A==="string")A=Buffer.from(A,"utf8");let Q=A.length,B=-1;for(let $=0;$<Q;)B=KJ.crc32update(B,A[$++]);return~B>>>0};KJ.methodToString=function(A){switch(A){case taA.STORED:return"STORED ("+A+")";case taA.DEFLATED:return"DEFLATED ("+A+")";default:return"UNSUPPORTED ("+A+")"}};KJ.canonical=function(A){if(!A)return"";let Q=x5.posix.normalize("/"+A.split("\\").join("/"));return x5.join(".",Q)};KJ.zipnamefix=function(A){if(!A)return"";let Q=x5.posix.normalize("/"+A.split("\\").join("/"));return x5.posix.join(".",Q)};KJ.findLast=function(A,Q){if(!Array.isArray(A))throw TypeError("arr is not array");let B=A.length>>>0;for(let $=B-1;$>=0;$--)if(Q(A[$],$,A))return A[$];return};KJ.sanitize=function(A,Q){A=x5.resolve(x5.normalize(A));var B=Q.split("/");for(var $=0,J=B.length;$<J;$++){var Y=x5.normalize(x5.join(A,B.slice($,J).join(x5.sep)));if(Y===A||Y.startsWith(A+x5.sep))return Y}return x5.normalize(x5.join(A,x5.basename(Q)))};KJ.toBuffer=function(Q,B){if(Buffer.isBuffer(Q))return Q;else if(Q instanceof Uint8Array)return Buffer.from(Q);else return typeof Q==="string"?B(Q):Buffer.alloc(0)};KJ.readBigUInt64LE=function(A,Q){let B=A.readUInt32LE(Q);return A.readUInt32LE(Q+4)*4294967296+B};KJ.writeBigUInt64LE=function(A,Q,B){let $=Q>>>0,J=Math.floor(Q/4294967296)>>>0;A.writeUInt32LE($,B),A.writeUInt32LE(J,B+4)};KJ.fromDOS2Date=function(A){return new Date((A>>25&127)+1980,Math.max((A>>21&15)-1,0),Math.max(A>>16&31,1),A>>11&31,A>>5&63,(A&31)<<1)};KJ.fromDate2DOS=function(A){let Q=0,B=0;if(A.getFullYear()>1979)Q=(A.getFullYear()-1980&127)<<9|A.getMonth()+1<<5|A.getDate(),B=A.getHours()<<11|A.getMinutes()<<5|A.getSeconds()>>1;return Q<<16|B};KJ.isWin=T90;KJ.crcTable=AsA});var JsA=$A(($yB,$sA)=>{var P90=UQ("path");$sA.exports=function(A,{fs:Q}){var B=A||"",$=Y(),J=null;function Y(){return{directory:!1,readonly:!1,hidden:!1,executable:!1,mtime:0,atime:0}}if(B&&Q.existsSync(B))J=Q.statSync(B),$.directory=J.isDirectory(),$.mtime=J.mtime,$.atime=J.atime,$.executable=(73&J.mode)!==0,$.readonly=(128&J.mode)===0,$.hidden=P90.basename(B)[0]===".";else console.warn("Invalid path: "+B);return{get directory(){return $.directory},get readOnly(){return $.readonly},get hidden(){return $.hidden},get mtime(){return $.mtime},get atime(){return $.atime},get executable(){return $.executable},decodeAttributes:function(){},encodeAttributes:function(){},toJSON:function(){return{path:B,isDirectory:$.directory,isReadOnly:$.readonly,isHidden:$.hidden,isExecutable:$.executable,mTime:$.mtime,aTime:$.atime}},toString:function(){return JSON.stringify(this.toJSON(),null,"\t")}}}});var XsA=$A((JyB,YsA)=>{YsA.exports={efs:!0,encode:(A)=>Buffer.from(A,"utf8"),decode:(A)=>A.toString("utf8")}});var m_=$A((YyB,u_)=>{u_.exports=BsA();u_.exports.Constants=XFA();u_.exports.Errors=$e();u_.exports.FileAttr=JsA();u_.exports.decoder=XsA()});var GsA=$A((XyB,ZsA)=>{var SM=m_(),DB=SM.Constants;ZsA.exports=function(){var A=20,Q=10,B=0,$=0,J=0,Y=0,X=0,Z=0,G=0,K=0,W=0,H=0,F=0,D=0,U=0;A|=SM.isWin?2560:768,B|=DB.FLG_EFS;let I={extraLen:0},M=(L)=>Math.max(0,L)>>>0,N=(L)=>Math.max(0,L)&65535,C=(L)=>Math.max(0,L)&255;return J=SM.fromDate2DOS(new Date),{get made(){return A},set made(L){A=L},get version(){return Q},set version(L){Q=L},get flags(){return B},set flags(L){B=L},get flags_efs(){return(B&DB.FLG_EFS)>0},set flags_efs(L){if(L)B|=DB.FLG_EFS;else B&=~DB.FLG_EFS},get flags_desc(){return(B&DB.FLG_DESC)>0},set flags_desc(L){if(L)B|=DB.FLG_DESC;else B&=~DB.FLG_DESC},get method(){return $},set method(L){switch(L){case DB.STORED:this.version=10;break;case DB.DEFLATED:default:this.version=20}$=L},get time(){return SM.fromDOS2Date(this.timeval)},set time(L){L=new Date(L),this.timeval=SM.fromDate2DOS(L)},get timeval(){return J},set timeval(L){J=M(L)},get timeHighByte(){return C(J>>>8)},get crc(){return Y},set crc(L){Y=M(L)},get compressedSize(){return X},set compressedSize(L){X=M(L)},get size(){return Z},set size(L){Z=M(L)},get fileNameLength(){return G},set fileNameLength(L){G=L},get extraLength(){return K},set extraLength(L){K=L},get extraLocalLength(){return I.extraLen},set extraLocalLength(L){I.extraLen=L},get commentLength(){return W},set commentLength(L){W=L},get diskNumStart(){return H},set diskNumStart(L){H=M(L)},get inAttr(){return F},set inAttr(L){F=M(L)},get attr(){return D},set attr(L){D=M(L)},get fileAttr(){return(D||0)>>16&4095},get offset(){return U},set offset(L){U=M(L)},get encrypted(){return(B&DB.FLG_ENC)===DB.FLG_ENC},get centralHeaderSize(){return DB.CENHDR+G+K+W},get realDataOffset(){return U+DB.LOCHDR+I.fnameLen+I.extraLen},get localHeader(){return I},loadLocalHeaderFromBinary:function(L){var V=L.slice(U,U+DB.LOCHDR);if(V.readUInt32LE(0)!==DB.LOCSIG)throw SM.Errors.INVALID_LOC();I.version=V.readUInt16LE(DB.LOCVER),I.flags=V.readUInt16LE(DB.LOCFLG),I.flags_desc=(I.flags&DB.FLG_DESC)>0,I.method=V.readUInt16LE(DB.LOCHOW),I.time=V.readUInt32LE(DB.LOCTIM),I.crc=V.readUInt32LE(DB.LOCCRC),I.compressedSize=V.readUInt32LE(DB.LOCSIZ),I.size=V.readUInt32LE(DB.LOCLEN),I.fnameLen=V.readUInt16LE(DB.LOCNAM),I.extraLen=V.readUInt16LE(DB.LOCEXT);let R=U+DB.LOCHDR+I.fnameLen,E=R+I.extraLen;return L.slice(R,E)},loadFromBinary:function(L){if(L.length!==DB.CENHDR||L.readUInt32LE(0)!==DB.CENSIG)throw SM.Errors.INVALID_CEN();A=L.readUInt16LE(DB.CENVEM),Q=L.readUInt16LE(DB.CENVER),B=L.readUInt16LE(DB.CENFLG),$=L.readUInt16LE(DB.CENHOW),J=L.readUInt32LE(DB.CENTIM),Y=L.readUInt32LE(DB.CENCRC),X=L.readUInt32LE(DB.CENSIZ),Z=L.readUInt32LE(DB.CENLEN),G=L.readUInt16LE(DB.CENNAM),K=L.readUInt16LE(DB.CENEXT),W=L.readUInt16LE(DB.CENCOM),H=L.readUInt16LE(DB.CENDSK),F=L.readUInt16LE(DB.CENATT),D=L.readUInt32LE(DB.CENATX),U=L.readUInt32LE(DB.CENOFF)},localHeaderToBinary:function(){var L=Buffer.alloc(DB.LOCHDR);return L.writeUInt32LE(DB.LOCSIG,0),L.writeUInt16LE(Q,DB.LOCVER),L.writeUInt16LE(B&~DB.FLG_DESC,DB.LOCFLG),L.writeUInt16LE($,DB.LOCHOW),L.writeUInt32LE(J,DB.LOCTIM),L.writeUInt32LE(Y,DB.LOCCRC),L.writeUInt32LE(X,DB.LOCSIZ),L.writeUInt32LE(Z,DB.LOCLEN),L.writeUInt16LE(G,DB.LOCNAM),L.writeUInt16LE(I.extraLen,DB.LOCEXT),L},centralHeaderToBinary:function(){var L=Buffer.alloc(DB.CENHDR+G+K+W);return L.writeUInt32LE(DB.CENSIG,0),L.writeUInt16LE(A,DB.CENVEM),L.writeUInt16LE(Q,DB.CENVER),L.writeUInt16LE(B&~DB.FLG_DESC,DB.CENFLG),L.writeUInt16LE($,DB.CENHOW),L.writeUInt32LE(J,DB.CENTIM),L.writeUInt32LE(Y,DB.CENCRC),L.writeUInt32LE(X,DB.CENSIZ),L.writeUInt32LE(Z,DB.CENLEN),L.writeUInt16LE(G,DB.CENNAM),L.writeUInt16LE(K,DB.CENEXT),L.writeUInt16LE(W,DB.CENCOM),L.writeUInt16LE(H,DB.CENDSK),L.writeUInt16LE(F,DB.CENATT),L.writeUInt32LE(D,DB.CENATX),L.writeUInt32LE(U,DB.CENOFF),L},toJSON:function(){let L=function(V){return V+" bytes"};return{made:A,version:Q,flags:B,method:SM.methodToString($),time:this.time,crc:"0x"+Y.toString(16).toUpperCase(),compressedSize:L(X),size:L(Z),fileNameLength:L(G),extraLength:L(K),commentLength:L(W),diskNumStart:H,inAttr:F,attr:D,offset:U,centralHeaderSize:L(DB.CENHDR+G+K+W)}},toString:function(){return JSON.stringify(this.toJSON(),null,"\t")}}}});var WsA=$A((ZyB,KsA)=>{var uW=m_(),Q1=uW.Constants;KsA.exports=function(){var A=0,Q=0,B=0,$=0,J=0;let Y=()=>A>Q1.EF_ZIP64_OR_16||Q>Q1.EF_ZIP64_OR_16||B>Q1.EF_ZIP64_OR_32||$>Q1.EF_ZIP64_OR_32;return{get diskEntries(){return A},set diskEntries(X){A=Q=X},get totalEntries(){return Q},set totalEntries(X){Q=A=X},get size(){return B},set size(X){B=X},get offset(){return $},set offset(X){$=X},get commentLength(){return J},set commentLength(X){J=X},get mainHeaderSize(){return(Y()?Q1.ZIP64HDR+Q1.END64HDR:0)+Q1.ENDHDR+J},loadFromBinary:function(X){if((X.length!==Q1.ENDHDR||X.readUInt32LE(0)!==Q1.ENDSIG)&&(X.length<Q1.ZIP64HDR||X.readUInt32LE(0)!==Q1.ZIP64SIG))throw uW.Errors.INVALID_END();if(X.readUInt32LE(0)===Q1.ENDSIG)A=X.readUInt16LE(Q1.ENDSUB),Q=X.readUInt16LE(Q1.ENDTOT),B=X.readUInt32LE(Q1.ENDSIZ),$=X.readUInt32LE(Q1.ENDOFF),J=X.readUInt16LE(Q1.ENDCOM);else A=uW.readBigUInt64LE(X,Q1.ZIP64SUB),Q=uW.readBigUInt64LE(X,Q1.ZIP64TOT),B=uW.readBigUInt64LE(X,Q1.ZIP64SIZB),$=uW.readBigUInt64LE(X,Q1.ZIP64OFF),J=0},toBinary:function(){if(!Y()){var X=Buffer.alloc(Q1.ENDHDR+J);return X.writeUInt32LE(Q1.ENDSIG,0),X.writeUInt32LE(0,4),X.writeUInt16LE(A,Q1.ENDSUB),X.writeUInt16LE(Q,Q1.ENDTOT),X.writeUInt32LE(B,Q1.ENDSIZ),X.writeUInt32LE($,Q1.ENDOFF),X.writeUInt16LE(J,Q1.ENDCOM),X.fill(" ",Q1.ENDHDR),X}var X=Buffer.alloc(this.mainHeaderSize);let Z=0;X.writeUInt32LE(Q1.ZIP64SIG,Z),uW.writeBigUInt64LE(X,Q1.ZIP64HDR-Q1.ZIP64LEAD,Z+Q1.ZIP64SIZE),X.writeUInt16LE(45,Z+Q1.ZIP64VEM),X.writeUInt16LE(45,Z+Q1.ZIP64VER),X.writeUInt32LE(0,Z+Q1.ZIP64DSK),X.writeUInt32LE(0,Z+Q1.ZIP64DSKDIR),uW.writeBigUInt64LE(X,A,Z+Q1.ZIP64SUB),uW.writeBigUInt64LE(X,Q,Z+Q1.ZIP64TOT),uW.writeBigUInt64LE(X,B,Z+Q1.ZIP64SIZB),uW.writeBigUInt64LE(X,$,Z+Q1.ZIP64OFF);let G=$+B;return Z+=Q1.ZIP64HDR,X.writeUInt32LE(Q1.END64SIG,Z),X.writeUInt32LE(0,Z+Q1.END64START),uW.writeBigUInt64LE(X,G,Z+Q1.END64OFF),X.writeUInt32LE(1,Z+Q1.END64NUMDISKS),Z+=Q1.END64HDR,X.writeUInt32LE(Q1.ENDSIG,Z),X.writeUInt32LE(0,Z+4),X.writeUInt16LE(Math.min(A,Q1.EF_ZIP64_OR_16),Z+Q1.ENDSUB),X.writeUInt16LE(Math.min(Q,Q1.EF_ZIP64_OR_16),Z+Q1.ENDTOT),X.writeUInt32LE(Math.min(B,Q1.EF_ZIP64_OR_32),Z+Q1.ENDSIZ),X.writeUInt32LE(Math.min($,Q1.EF_ZIP64_OR_32),Z+Q1.ENDOFF),X.writeUInt16LE(J,Z+Q1.ENDCOM),X.fill(" ",Z+Q1.ENDHDR),X},toJSON:function(){let X=function(Z,G){let K=Z.toString(16).toUpperCase();while(K.length<G)K="0"+K;return"0x"+K};return{diskEntries:A,totalEntries:Q,size:B+" bytes",offset:X($,4),commentLength:J}},toString:function(){return JSON.stringify(this.toJSON(),null,"\t")}}}});var ZFA=$A((S90)=>{S90.EntryHeader=GsA();S90.MainHeader=WsA()});var FsA=$A((KyB,HsA)=>{HsA.exports=function(A){var Q=UQ("zlib"),B={chunkSize:(parseInt(A.length/1024)+1)*1024};return{deflate:function(){return Q.deflateRawSync(A,B)},deflateAsync:function($){var J=Q.createDeflateRaw(B),Y=[],X=0;J.on("data",function(Z){Y.push(Z),X+=Z.length}),J.on("end",function(){var Z=Buffer.alloc(X),G=0;Z.fill(0);for(var K=0;K<Y.length;K++){var W=Y[K];W.copy(Z,G),G+=W.length}$&&$(Z)}),J.end(A)}}}});var qsA=$A((WyB,zsA)=>{var v90=+(process?.versions?.node??"").split(".")[0]||0;zsA.exports=function(A,Q){var B=UQ("zlib");let $=v90>=15&&Q>0?{maxOutputLength:Q}:{};return{inflate:function(){return B.inflateRawSync(A,$)},inflateAsync:function(J){var Y=B.createInflateRaw($),X=[],Z=0;Y.on("data",function(G){X.push(G),Z+=G.length}),Y.on("end",function(){var G=Buffer.alloc(Z),K=0;G.fill(0);for(var W=0;W<X.length;W++){var H=X[W];H.copy(G,K),K+=H.length}J&&J(G)}),Y.end(A)}}}});var OsA=$A((HyB,MsA)=>{var{randomFillSync:UsA}=UQ("crypto"),x90=$e(),f90=new Uint32Array(256).map((A,Q)=>{for(let B=0;B<8;B++)if((Q&1)!==0)Q=Q>>>1^3988292384;else Q>>>=1;return Q>>>0}),IsA=(A,Q)=>Math.imul(A,Q)>>>0,DsA=(A,Q)=>{return f90[(A^Q)&255]^A>>>8},og=()=>{if(typeof UsA==="function")return UsA(Buffer.alloc(12));else return og.node()};og.node=()=>{let A=Buffer.alloc(12),Q=A.length;for(let B=0;B<Q;B++)A[B]=Math.random()*256&255;return A};var Je={genSalt:og};function Ye(A){let Q=Buffer.isBuffer(A)?A:Buffer.from(A);this.keys=new Uint32Array([305419896,591751049,878082192]);for(let B=0;B<Q.length;B++)this.updateKeys(Q[B])}Ye.prototype.updateKeys=function(A){let Q=this.keys;return Q[0]=DsA(Q[0],A),Q[1]+=Q[0]&255,Q[1]=IsA(Q[1],134775813)+1,Q[2]=DsA(Q[2],Q[1]>>>24),A};Ye.prototype.next=function(){let A=(this.keys[2]|2)>>>0;return IsA(A,A^1)>>8&255};function g90(A){let Q=new Ye(A);return function(B){let $=Buffer.alloc(B.length),J=0;for(let Y of B)$[J++]=Q.updateKeys(Y^Q.next());return $}}function y90(A){let Q=new Ye(A);return function(B,$,J=0){if(!$)$=Buffer.alloc(B.length);for(let Y of B){let X=Q.next();$[J++]=Y^X,Q.updateKeys(Y)}return $}}function h90(A,Q,B){if(!A||!Buffer.isBuffer(A)||A.length<12)return Buffer.alloc(0);let $=g90(B),J=$(A.slice(0,12)),Y=(Q.flags&8)===8?Q.timeHighByte:Q.crc>>>24;if(J[11]!==Y)throw x90.WRONG_PASSWORD();return $(A.slice(12))}function u90(A){if(Buffer.isBuffer(A)&&A.length>=12)Je.genSalt=function(){return A.slice(0,12)};else if(A==="node")Je.genSalt=og.node;else Je.genSalt=og}function m90(A,Q,B,$=!1){if(A==null)A=Buffer.alloc(0);if(!Buffer.isBuffer(A))A=Buffer.from(A.toString());let J=y90(B),Y=Je.genSalt();if(Y[11]=Q.crc>>>24&255,$)Y[10]=Q.crc>>>16&255;let X=Buffer.alloc(A.length+12);return J(Y,X),J(A,X,12)}MsA.exports={decrypt:h90,encrypt:m90,_salter:u90}});var LsA=$A((c90)=>{c90.Deflater=FsA();c90.Inflater=qsA();c90.ZipCrypto=OsA()});var KFA=$A((zyB,NsA)=>{var l6=m_(),i90=ZFA(),_K=l6.Constants,GFA=LsA();NsA.exports=function(A,Q){var B=new i90.EntryHeader,$=Buffer.alloc(0),J=Buffer.alloc(0),Y=!1,X=null,Z=Buffer.alloc(0),G=Buffer.alloc(0),K=!0;let W=A,H=typeof W.decoder==="object"?W.decoder:l6.decoder;K=H.hasOwnProperty("efs")?H.efs:!1;function F(){if(!Q||!(Q instanceof Uint8Array))return Buffer.alloc(0);return G=B.loadLocalHeaderFromBinary(Q),Q.slice(B.realDataOffset,B.realDataOffset+B.compressedSize)}function D(L){let V=B.flags_desc||B.localHeader.flags_desc?B.crc:B.localHeader.crc;return l6.crc32(L)===V}function U(L,V,R){if(typeof V>"u"&&typeof L==="string")R=L,L=void 0;if(Y){if(L&&V)V(Buffer.alloc(0),l6.Errors.DIRECTORY_CONTENT_ERROR());return Buffer.alloc(0)}var E=F();if(E.length===0){if(L&&V)V(E);return E}if(B.encrypted){if(typeof R!=="string"&&!Buffer.isBuffer(R))throw l6.Errors.INVALID_PASS_PARAM();E=GFA.ZipCrypto.decrypt(E,B,R)}var j;switch(B.method){case l6.Constants.STORED:if(j=Buffer.alloc(E.length),E.copy(j),!D(j)){if(L&&V)V(j,l6.Errors.BAD_CRC());throw l6.Errors.BAD_CRC()}else{if(L&&V)V(j);return j}case l6.Constants.DEFLATED:var _=new GFA.Inflater(E,B.size);if(!L){if(j=_.inflate(),!D(j))throw l6.Errors.BAD_CRC(`"${H.decode($)}"`);return j}else _.inflateAsync(function(v){if(V)if(!D(v))V(v,l6.Errors.BAD_CRC());else V(v)});break;default:if(L&&V)V(Buffer.alloc(0),l6.Errors.UNKNOWN_METHOD());throw l6.Errors.UNKNOWN_METHOD()}}function I(L,V){if((!X||!X.length)&&Buffer.isBuffer(Q)){if(L&&V)V(F());return F()}if(X.length&&!Y){var R;switch(B.method){case l6.Constants.STORED:if(B.compressedSize=B.size,R=Buffer.alloc(X.length),X.copy(R),L&&V)V(R);return R;default:case l6.Constants.DEFLATED:var E=new GFA.Deflater(X);if(!L){var j=E.deflate();return B.compressedSize=j.length,j}else E.deflateAsync(function(_){R=Buffer.alloc(_.length),B.compressedSize=_.length,_.copy(R),V&&V(R)});E=null;break}}else if(L&&V)V(Buffer.alloc(0));else return Buffer.alloc(0)}function M(L,V){return l6.readBigUInt64LE(L,V)}function N(L){try{var V=0,R,E,j;while(V+4<L.length)if(R=L.readUInt16LE(V),V+=2,E=L.readUInt16LE(V),V+=2,j=L.slice(V,V+E),V+=E,_K.ID_ZIP64===R)C(j)}catch(_){throw l6.Errors.EXTRA_FIELD_PARSE_ERROR()}}function C(L){var V,R,E,j;if(L.length>=_K.EF_ZIP64_SCOMP){if(V=M(L,_K.EF_ZIP64_SUNCOMP),B.size===_K.EF_ZIP64_OR_32)B.size=V}if(L.length>=_K.EF_ZIP64_RHO){if(R=M(L,_K.EF_ZIP64_SCOMP),B.compressedSize===_K.EF_ZIP64_OR_32)B.compressedSize=R}if(L.length>=_K.EF_ZIP64_DSN){if(E=M(L,_K.EF_ZIP64_RHO),B.offset===_K.EF_ZIP64_OR_32)B.offset=E}if(L.length>=_K.EF_ZIP64_DSN+4){if(j=L.readUInt32LE(_K.EF_ZIP64_DSN),B.diskNumStart===_K.EF_ZIP64_OR_16)B.diskNumStart=j}}return{get entryName(){return H.decode($)},get rawEntryName(){return $},set entryName(L){$=l6.toBuffer(L,H.encode);var V=$[$.length-1];Y=V===47||V===92,B.fileNameLength=$.length},get efs(){if(typeof K==="function")return K(this.entryName);else return K},get extra(){return Z},set extra(L){Z=L,B.extraLength=L.length,N(L)},get comment(){return H.decode(J)},set comment(L){if(J=l6.toBuffer(L,H.encode),B.commentLength=J.length,J.length>65535)throw l6.Errors.COMMENT_TOO_LONG()},get name(){let L=H.decode($);return Y?L.replace(/[/\\]$/,"").split("/").pop():L.split("/").pop()},get isDirectory(){return Y},getCompressedData:function(){return I(!1,null)},getCompressedDataAsync:function(L){I(!0,L)},setData:function(L){if(X=l6.toBuffer(L,l6.decoder.encode),!Y&&X.length)B.size=X.length,B.method=l6.Constants.DEFLATED,B.crc=l6.crc32(L),B.changed=!0;else B.method=l6.Constants.STORED},getData:function(L){if(B.changed)return X;else return U(!1,null,L)},getDataAsync:function(L,V){if(B.changed)L(X);else U(!0,L,V)},set attr(L){B.attr=L},get attr(){return B.attr},set header(L){B.loadFromBinary(L)},get header(){return B},packCentralHeader:function(){B.flags_efs=this.efs,B.extraLength=Z.length;var L=B.centralHeaderToBinary(),V=l6.Constants.CENHDR;return $.copy(L,V),V+=$.length,Z.copy(L,V),V+=B.extraLength,J.copy(L,V),L},packLocalHeader:function(){let L=0;B.flags_efs=this.efs,B.extraLocalLength=G.length;let V=B.localHeaderToBinary(),R=Buffer.alloc(V.length+$.length+B.extraLocalLength);return V.copy(R,L),L+=V.length,$.copy(R,L),L+=$.length,G.copy(R,L),L+=G.length,R},toJSON:function(){let L=function(V){return"<"+(V&&V.length+" bytes buffer"||"null")+">"};return{entryName:this.entryName,name:this.name,comment:this.comment,isDirectory:this.isDirectory,header:B.toJSON(),compressedData:L(Q),data:L(X)}},toString:function(){return JSON.stringify(this.toJSON(),null,"\t")}}}});var EsA=$A((qyB,CsA)=>{var VsA=KFA(),n90=ZFA(),GZ=m_();CsA.exports=function(A,Q){var B=[],$=Object.create(null),J=Buffer.alloc(0),Y=new n90.MainHeader,X=!1,Z=null;let G=new Set,K=Q,{noSort:W,decoder:H}=K;if(A)U(K.readEntries);else X=!0;function F(){let M=new Set;for(let N of Object.keys($)){let C=N.split("/");if(C.pop(),!C.length)continue;for(let L=0;L<C.length;L++){let V=C.slice(0,L+1).join("/")+"/";M.add(V)}}for(let N of M)if(!(N in $)){let C=new VsA(K);C.entryName=N,C.attr=16,C.temporary=!0,B.push(C),$[C.entryName]=C,G.add(C)}}function D(){if(X=!0,$=Object.create(null),Y.diskEntries>(A.length-Y.offset)/GZ.Constants.CENHDR)throw GZ.Errors.DISK_ENTRY_TOO_LARGE();B=Array(Y.diskEntries);var M=Y.offset;for(var N=0;N<B.length;N++){var C=M,L=new VsA(K,A);if(L.header=A.slice(C,C+=GZ.Constants.CENHDR),L.entryName=A.slice(C,C+=L.header.fileNameLength),L.header.extraLength)L.extra=A.slice(C,C+=L.header.extraLength);if(L.header.commentLength)L.comment=A.slice(C,C+L.header.commentLength);M+=L.header.centralHeaderSize,B[N]=L,$[L.entryName]=L}G.clear(),F()}function U(M){var N=A.length-GZ.Constants.ENDHDR,C=Math.max(0,N-65535),L=C,V=A.length,R=-1,E=0;if(typeof K.trailingSpace==="boolean"?K.trailingSpace:!1)C=0;for(N;N>=L;N--){if(A[N]!==80)continue;if(A.readUInt32LE(N)===GZ.Constants.ENDSIG){R=N,E=N,V=N+GZ.Constants.ENDHDR,L=N-GZ.Constants.END64HDR;continue}if(A.readUInt32LE(N)===GZ.Constants.END64SIG){L=C;continue}if(A.readUInt32LE(N)===GZ.Constants.ZIP64SIG){R=N,V=N+GZ.readBigUInt64LE(A,N+GZ.Constants.ZIP64SIZE)+GZ.Constants.ZIP64LEAD;break}}if(R==-1)throw GZ.Errors.INVALID_FORMAT();if(Y.loadFromBinary(A.slice(R,V)),Y.commentLength)J=A.slice(E+GZ.Constants.ENDHDR);if(M)D()}function I(){if(B.length>1&&!W)B=B.map((M)=>({entry:M,key:M.entryName.toLowerCase()})).sort((M,N)=>M.key.localeCompare(N.key)).map((M)=>M.entry)}return{get entries(){if(!X)D();return B.filter((M)=>!G.has(M))},get comment(){return H.decode(J)},set comment(M){J=GZ.toBuffer(M,H.encode),Y.commentLength=J.length},getEntryCount:function(){if(!X)return Y.diskEntries;return B.length},forEach:function(M){this.entries.forEach(M)},getEntry:function(M){if(!X)D();return $[M]||null},setEntry:function(M){if(!X)D();B.push(M),$[M.entryName]=M,Y.totalEntries=B.length},deleteFile:function(M,N=!0){if(!X)D();let C=$[M];this.getEntryChildren(C,N).map((V)=>V.entryName).forEach(this.deleteEntry)},deleteEntry:function(M){if(!X)D();let N=$[M],C=B.indexOf(N);if(C>=0)B.splice(C,1),delete $[M],Y.totalEntries=B.length},getEntryChildren:function(M,N=!0){if(!X)D();if(typeof M==="object")if(M.isDirectory&&N){let C=[],L=M.entryName;for(let V of B)if(V.entryName.startsWith(L))C.push(V);return C}else return[M];return[]},getChildCount:function(M){if(M&&M.isDirectory){let N=this.getEntryChildren(M);return N.includes(M)?N.length-1:N.length}return 0},compressToBuffer:function(){if(!X)D();I();let M=[],N=[],C=0,L=0;Y.size=0,Y.offset=0;let V=0;for(let j of this.entries){let _=j.getCompressedData();j.header.offset=L;let v=j.packLocalHeader(),S=v.length+_.length;L+=S,M.push(v),M.push(_);let f=j.packCentralHeader();N.push(f),Y.size+=f.length,C+=S+f.length,V++}C+=Y.mainHeaderSize,Y.offset=L,Y.totalEntries=V,L=0;let R=Buffer.alloc(C);for(let j of M)j.copy(R,L),L+=j.length;for(let j of N)j.copy(R,L),L+=j.length;let E=Y.toBinary();if(J)J.copy(E,E.length-J.length);return E.copy(R,L),A=R,X=!1,R},toAsyncBuffer:function(M,N,C,L){try{if(!X)D();I();let V=[],R=[],E=0,j=0,_=0;Y.size=0,Y.offset=0;let v=function(S){if(S.length>0){let f=S.shift(),u=f.entryName+f.extra.toString();if(C)C(u);f.getCompressedDataAsync(function(a){if(L)L(u);f.header.offset=j;let e=f.packLocalHeader(),r=e.length+a.length;j+=r,V.push(e),V.push(a);let i=f.packCentralHeader();R.push(i),Y.size+=i.length,E+=r+i.length,_++,v(S)})}else{E+=Y.mainHeaderSize,Y.offset=j,Y.totalEntries=_,j=0;let f=Buffer.alloc(E);V.forEach(function(a){a.copy(f,j),j+=a.length}),R.forEach(function(a){a.copy(f,j),j+=a.length});let u=Y.toBinary();if(J)J.copy(u,u.length-J.length);u.copy(f,j),A=f,X=!1,M(f)}};v(Array.from(this.entries))}catch(V){N(V)}}}}});var Xe=$A((UyB,wsA)=>{var wJ=m_(),RJ=UQ("path"),r90=KFA(),o90=EsA(),zC=(...A)=>wJ.findLast(A,(Q)=>typeof Q==="boolean"),RsA=(...A)=>wJ.findLast(A,(Q)=>typeof Q==="string"),a90=(...A)=>wJ.findLast(A,(Q)=>typeof Q==="function"),s90={noSort:!1,readEntries:!1,method:wJ.Constants.NONE,fs:null};wsA.exports=function(A,Q){let B=null,$=Object.assign(Object.create(null),s90);if(A&&typeof A==="object"){if(!(A instanceof Uint8Array)){if(Object.assign($,A),A=$.input?$.input:void 0,$.input)delete $.input}if(Buffer.isBuffer(A))B=A,$.method=wJ.Constants.BUFFER,A=void 0}Object.assign($,Q);let J=new wJ($),Y=(U)=>{U.filter((I)=>I.attr).sort((I,M)=>M.path.length-I.path.length).forEach((I)=>J.fs.chmodSync(I.path,I.attr))};if(typeof $.decoder!=="object"||typeof $.decoder.encode!=="function"||typeof $.decoder.decode!=="function")$.decoder=wJ.decoder;if(A&&typeof A==="string")if(J.fs.existsSync(A))$.method=wJ.Constants.FILE,$.filename=A,B=J.fs.readFileSync(A);else throw wJ.Errors.INVALID_FILENAME();let X=new o90(B,$),{canonical:Z,sanitize:G,zipnamefix:K}=wJ;function W(U){if(U&&X){var I;if(typeof U==="string")I=X.getEntry(RJ.posix.normalize(U));if(typeof U==="object"&&typeof U.entryName<"u"&&typeof U.header<"u")I=X.getEntry(U.entryName);if(I)return I}return null}function H(U){let{join:I,normalize:M,sep:N}=RJ.posix;return I(RJ.isAbsolute(U)?"/":".",M(N+U.split("\\").join(N)+N))}function F(U){if(U instanceof RegExp)return function(I){return function(M){return I.test(M)}}(U);else if(typeof U!=="function")return()=>!0;return U}let D=(U,I)=>{let M=I.slice(-1);return M=M===J.sep?J.sep:"",RJ.relative(U,I)+M};return{readFile:function(U,I){var M=W(U);return M&&M.getData(I)||null},childCount:function(U){let I=W(U);if(I)return X.getChildCount(I)},readFileAsync:function(U,I){var M=W(U);if(M)M.getDataAsync(I);else I(null,"getEntry failed for:"+U)},readAsText:function(U,I){var M=W(U);if(M){var N=M.getData();if(N&&N.length)return N.toString(I||"utf8")}return""},readAsTextAsync:function(U,I,M){var N=W(U);if(N)N.getDataAsync(function(C,L){if(L){I(C,L);return}if(C&&C.length)I(C.toString(M||"utf8"));else I("")});else I("")},deleteFile:function(U,I=!0){var M=W(U);if(M)X.deleteFile(M.entryName,I)},deleteEntry:function(U){var I=W(U);if(I)X.deleteEntry(I.entryName)},addZipComment:function(U){X.comment=U},getZipComment:function(){return X.comment||""},addZipEntryComment:function(U,I){var M=W(U);if(M)M.comment=I},getZipEntryComment:function(U){var I=W(U);if(I)return I.comment||"";return""},updateFile:function(U,I){var M=W(U);if(M)M.setData(I)},addLocalFile:function(U,I,M,N){if(J.fs.existsSync(U)){I=I?H(I):"";let C=RJ.win32.basename(RJ.win32.normalize(U));I+=M?M:C;let L=J.fs.statSync(U),V=L.isFile()?J.fs.readFileSync(U):Buffer.alloc(0);if(L.isDirectory())I+=J.sep;this.addFile(I,V,N,L)}else throw wJ.Errors.FILE_NOT_FOUND(U)},addLocalFileAsync:function(U,I){U=typeof U==="object"?U:{localPath:U};let M=RJ.resolve(U.localPath),{comment:N}=U,{zipPath:C,zipName:L}=U,V=this;J.fs.stat(M,function(R,E){if(R)return I(R,!1);C=C?H(C):"";let j=RJ.win32.basename(RJ.win32.normalize(M));if(C+=L?L:j,E.isFile())J.fs.readFile(M,function(_,v){if(_)return I(_,!1);return V.addFile(C,v,N,E),setImmediate(I,void 0,!0)});else if(E.isDirectory())return C+=J.sep,V.addFile(C,Buffer.alloc(0),N,E),setImmediate(I,void 0,!0)})},addLocalFolder:function(U,I,M){if(M=F(M),I=I?H(I):"",U=RJ.normalize(U),J.fs.existsSync(U)){let N=J.findFiles(U),C=this;if(N.length)for(let L of N){let V=RJ.join(I,D(U,L));if(M(V))C.addLocalFile(L,RJ.dirname(V))}}else throw wJ.Errors.FILE_NOT_FOUND(U)},addLocalFolderAsync:function(U,I,M,N){N=F(N),M=M?H(M):"",U=RJ.normalize(U);var C=this;J.fs.open(U,"r",function(L){if(L&&L.code==="ENOENT")I(void 0,wJ.Errors.FILE_NOT_FOUND(U));else if(L)I(void 0,L);else{var V=J.findFiles(U),R=-1,E=function(){if(R+=1,R<V.length){var j=V[R],_=D(U,j).split("\\").join("/");if(_=_.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^\x20-\x7E]/g,""),N(_))J.fs.stat(j,function(v,S){if(v)I(void 0,v);if(S.isFile())J.fs.readFile(j,function(f,u){if(f)I(void 0,f);else C.addFile(M+_,u,"",S),E()});else C.addFile(M+_+"/",Buffer.alloc(0),"",S),E()});else process.nextTick(()=>{E()})}else I(!0,void 0)};E()}})},addLocalFolderAsync2:function(U,I){let M=this;U=typeof U==="object"?U:{localPath:U};let N=RJ.resolve(H(U.localPath)),{zipPath:C,filter:L,namefix:V}=U;if(L instanceof RegExp)L=function(j){return function(_){return j.test(_)}}(L);else if(typeof L!=="function")L=function(){return!0};if(C=C?H(C):"",V==="latin1")V=(j)=>j.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^\x20-\x7E]/g,"");if(typeof V!=="function")V=(j)=>j;let R=(j)=>RJ.join(C,V(D(N,j))),E=(j)=>RJ.win32.basename(RJ.win32.normalize(V(j)));J.fs.open(N,"r",function(j){if(j&&j.code==="ENOENT")I(void 0,wJ.Errors.FILE_NOT_FOUND(N));else if(j)I(void 0,j);else J.findFilesAsync(N,function(_,v){if(_)return I(_);if(v=v.filter((S)=>L(R(S))),!v.length)I(void 0,!1);setImmediate(v.reverse().reduce(function(S,f){return function(u,a){if(u||a===!1)return setImmediate(S,u,!1);M.addLocalFileAsync({localPath:f,zipPath:RJ.dirname(R(f)),zipName:E(f)},S)}},I))})})},addLocalFolderPromise:function(U,I){return new Promise((M,N)=>{this.addLocalFolderAsync2(Object.assign({localPath:U},I),(C,L)=>{if(C)N(C);if(L)M(this)})})},addFile:function(U,I,M,N){U=K(U);let C=W(U),L=C!=null;if(!L)C=new r90($),C.entryName=U;C.comment=M||"";let V=typeof N==="object"&&N instanceof J.fs.Stats;if(V)C.header.time=N.mtime;var R=C.isDirectory?16:0;let E=C.isDirectory?16384:32768;if(V)E|=4095&N.mode;else if(typeof N==="number")E|=4095&N;else E|=C.isDirectory?493:420;if(R=(R|E<<16)>>>0,C.attr=R,C.setData(I),!L)X.setEntry(C);return C},getEntries:function(U){return X.password=U,X?X.entries:[]},getEntry:function(U){return W(U)},getEntryCount:function(){return X.getEntryCount()},forEach:function(U){return X.forEach(U)},extractEntryTo:function(U,I,M,N,C,L){N=zC(!1,N),C=zC(!1,C),M=zC(!0,M),L=RsA(C,L);var V=W(U);if(!V)throw wJ.Errors.NO_ENTRY();var R=Z(V.entryName),E=G(I,L&&!V.isDirectory?Z(L):M?R:RJ.basename(R));if(V.isDirectory){var j=X.getEntryChildren(V);return j.forEach(function(S){if(S.isDirectory)return;var f=S.getData();if(!f)throw wJ.Errors.CANT_EXTRACT_FILE();var u=Z(M?S.entryName:S.entryName.substring(V.entryName.length)),a=G(I,u);let e=C?S.header.fileAttr:void 0;J.writeFileTo(a,f,N,e)}),!0}var _=V.getData(X.password);if(!_)throw wJ.Errors.CANT_EXTRACT_FILE();if(J.fs.existsSync(E)&&!N)throw wJ.Errors.CANT_OVERRIDE();let v=C?U.header.fileAttr:void 0;return J.writeFileTo(E,_,N,v),!0},test:function(U){if(!X)return!1;for(var I of X.entries)try{if(I.isDirectory)continue;var M=I.getData(U);if(!M)return!1}catch(N){return!1}return!0},extractAllTo:function(U,I,M,N){if(M=zC(!1,M),N=RsA(M,N),I=zC(!1,I),!X)throw wJ.Errors.NO_ZIP();let C=[];X.entries.forEach(function(L){var V=G(U,Z(L.entryName));if(L.isDirectory){if(J.makeDir(V),M)C.push({path:V,attr:L.header.fileAttr});return}var R=L.getData(N);if(!R)throw wJ.Errors.CANT_EXTRACT_FILE();let E=M?L.header.fileAttr:void 0;J.writeFileTo(V,R,I,E);try{J.fs.utimesSync(V,L.header.time,L.header.time)}catch(j){}}),Y(C)},extractAllToAsync:function(U,I,M,N){if(N=a90(I,M,N),M=zC(!1,M),I=zC(!1,I),!N)return new Promise((_,v)=>{this.extractAllToAsync(U,I,M,function(S){if(S)v(S);else _(this)})});if(!X){N(wJ.Errors.NO_ZIP());return}U=RJ.resolve(U);let C=(_)=>G(U,RJ.normalize(Z(_.entryName))),L=(_,v)=>Error(_+': "'+v+'"'),V=[],R=[];X.entries.forEach((_)=>{if(_.isDirectory)V.push(_);else R.push(_)});let E=[];for(let _ of V){let v=C(_),S=M?_.header.fileAttr:void 0;try{J.makeDir(v)}catch(f){N(L("Unable to create folder",v));continue}if(S)E.push({path:v,attr:S});try{J.fs.utimesSync(v,_.header.time,_.header.time)}catch(f){}}let j=(_)=>{if(!_)try{Y(E)}catch(v){return N(L("Unable to set folder permissions",v.path||""))}N(_)};R.reverse().reduce(function(_,v){return function(S){if(S)_(S);else{let f=RJ.normalize(Z(v.entryName)),u=G(U,f);v.getDataAsync(function(a,e){if(e)_(e);else if(!a)_(wJ.Errors.CANT_EXTRACT_FILE());else{let r=M?v.header.fileAttr:void 0;J.writeFileToAsync(u,a,I,r,function(i){if(!i)return _(L("Unable to write file",u));J.fs.utimes(u,v.header.time,v.header.time,function(){_()})})}})}}},j)()},writeZip:function(U,I){if(arguments.length===1){if(typeof U==="function")I=U,U=""}if(!U&&$.filename)U=$.filename;if(!U)return;var M=X.compressToBuffer();if(M){var N=J.writeFileTo(U,M,!0);if(typeof I==="function")I(!N?Error("failed"):null,"")}},writeZipPromise:function(U,I){let{overwrite:M,perm:N}=Object.assign({overwrite:!0},I);return new Promise((C,L)=>{if(!U&&$.filename)U=$.filename;if(!U)L("ADM-ZIP: ZIP File Name Missing");this.toBufferPromise().then((V)=>{let R=(E)=>E?C(E):L("ADM-ZIP: Wasn't able to write zip file");J.writeFileToAsync(U,V,M,N,R)},L)})},toBufferPromise:function(){return new Promise((U,I)=>{X.toAsyncBuffer(U,I)})},toBuffer:function(U,I,M,N){if(typeof U==="function")return X.toAsyncBuffer(U,I,M,N),null;return X.compressToBuffer()}}}});var PsA=$A((DyB,TsA)=>{var _sA={};TsA.exports=_sA;var jsA={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],brightRed:[91,39],brightGreen:[92,39],brightYellow:[93,39],brightBlue:[94,39],brightMagenta:[95,39],brightCyan:[96,39],brightWhite:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgGray:[100,49],bgGrey:[100,49],bgBrightRed:[101,49],bgBrightGreen:[102,49],bgBrightYellow:[103,49],bgBrightBlue:[104,49],bgBrightMagenta:[105,49],bgBrightCyan:[106,49],bgBrightWhite:[107,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(jsA).forEach(function(A){var Q=jsA[A],B=_sA[A]=[];B.open="\x1B["+Q[0]+"m",B.close="\x1B["+Q[1]+"m"})});var ksA=$A((IyB,SsA)=>{SsA.exports=function(A,Q){Q=Q||process.argv;var B=Q.indexOf("--"),$=/^-{1,2}/.test(A)?"":"--",J=Q.indexOf($+A);return J!==-1&&(B===-1?!0:J<B)}});var vsA=$A((MyB,bsA)=>{var t90=UQ("os"),k2=ksA(),KZ=process.env,c_=void 0;if(k2("no-color")||k2("no-colors")||k2("color=false"))c_=!1;else if(k2("color")||k2("colors")||k2("color=true")||k2("color=always"))c_=!0;if("FORCE_COLOR"in KZ)c_=KZ.FORCE_COLOR.length===0||parseInt(KZ.FORCE_COLOR,10)!==0;function e90(A){if(A===0)return!1;return{level:A,hasBasic:!0,has256:A>=2,has16m:A>=3}}function AJ0(A){if(c_===!1)return 0;if(k2("color=16m")||k2("color=full")||k2("color=truecolor"))return 3;if(k2("color=256"))return 2;if(A&&!A.isTTY&&c_!==!0)return 0;var Q=c_?1:0;if(process.platform==="win32"){var B=t90.release().split(".");if(Number(process.versions.node.split(".")[0])>=8&&Number(B[0])>=10&&Number(B[2])>=10586)return Number(B[2])>=14931?3:2;return 1}if("CI"in KZ){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(J){return J in KZ})||KZ.CI_NAME==="codeship")return 1;return Q}if("TEAMCITY_VERSION"in KZ)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(KZ.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in KZ){var $=parseInt((KZ.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(KZ.TERM_PROGRAM){case"iTerm.app":return $>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(KZ.TERM))return 2;if(/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(KZ.TERM))return 1;if("COLORTERM"in KZ)return 1;if(KZ.TERM==="dumb")return Q;return Q}function WFA(A){var Q=AJ0(A);return e90(Q)}bsA.exports={supportsColor:WFA,stdout:WFA(process.stdout),stderr:WFA(process.stderr)}});var fsA=$A((OyB,xsA)=>{xsA.exports=function(Q,B){var $="";Q=Q||"Run the trap, drop the bass",Q=Q.split("");var J={a:["@","Ą","Ⱥ","Ʌ","Δ","Λ","Д"],b:["ß","Ɓ","Ƀ","ɮ","β","฿"],c:["©","Ȼ","Ͼ"],d:["Ð","Ɗ","Ԁ","ԁ","Ԃ","ԃ"],e:["Ë","ĕ","Ǝ","ɘ","Σ","ξ","Ҽ","੬"],f:["Ӻ"],g:["ɢ"],h:["Ħ","ƕ","Ң","Һ","Ӈ","Ԋ"],i:["༏"],j:["Ĵ"],k:["ĸ","Ҡ","Ӄ","Ԟ"],l:["Ĺ"],m:["ʍ","Ӎ","ӎ","Ԡ","ԡ","൩"],n:["Ñ","ŋ","Ɲ","Ͷ","Π","Ҋ"],o:["Ø","õ","ø","Ǿ","ʘ","Ѻ","ם","","๏"],p:["Ƿ","Ҏ"],q:["্"],r:["®","Ʀ","Ȑ","Ɍ","ʀ","Я"],s:["§","Ϟ","ϟ","Ϩ"],t:["Ł","Ŧ","ͳ"],u:["Ʊ","Ս"],v:["ט"],w:["Ш","Ѡ","Ѽ","൰"],x:["Ҳ","Ӿ","Ӽ","ӽ"],y:["¥","Ұ","Ӌ"],z:["Ƶ","ɀ"]};return Q.forEach(function(Y){Y=Y.toLowerCase();var X=J[Y]||[" "],Z=Math.floor(Math.random()*X.length);if(typeof J[Y]<"u")$+=J[Y][Z];else $+=Y}),$}});var ysA=$A((LyB,gsA)=>{gsA.exports=function(Q,B){Q=Q||" he is here ";var $={up:["̍","̎","̄","̅","̿","̑","̆","̐","͒","͗","͑","̇","̈","̊","͂","̓","̈","͊","͋","͌","̃","̂","̌","͐","̀","́","̋","̏","̒","̓","̔","̽","̉","ͣ","ͤ","ͥ","ͦ","ͧ","ͨ","ͩ","ͪ","ͫ","ͬ","ͭ","ͮ","ͯ","̾","͛","͆","̚"],down:["̖","̗","̘","̙","̜","̝","̞","̟","̠","̤","̥","̦","̩","̪","̫","̬","̭","̮","̯","̰","̱","̲","̳","̹","̺","̻","̼","ͅ","͇","͈","͉","͍","͎","͓","͔","͕","͖","͙","͚","̣"],mid:["̕","̛","̀","́","͘","̡","̢","̧","̨","̴","̵","̶","͜","͝","͞","͟","͠","͢","̸","̷","͡"," ҉"]},J=[].concat($.up,$.down,$.mid);function Y(G){var K=Math.floor(Math.random()*G);return K}function X(G){var K=!1;return J.filter(function(W){K=W===G}),K}function Z(G,K){var W="",H,F;K=K||{},K.up=typeof K.up<"u"?K.up:!0,K.mid=typeof K.mid<"u"?K.mid:!0,K.down=typeof K.down<"u"?K.down:!0,K.size=typeof K.size<"u"?K.size:"maxi",G=G.split("");for(F in G){if(X(F))continue;switch(W=W+G[F],H={up:0,down:0,mid:0},K.size){case"mini":H.up=Y(8),H.mid=Y(2),H.down=Y(8);break;case"maxi":H.up=Y(16)+3,H.mid=Y(4)+1,H.down=Y(64)+3;break;default:H.up=Y(8)+1,H.mid=Y(6)/2,H.down=Y(8)+1;break}var D=["up","mid","down"];for(var U in D){var I=D[U];for(var M=0;M<=H[I];M++)if(K[I])W=W+$[I][Y($[I].length)]}}return W}return Z(Q,B)}});var usA=$A((NyB,hsA)=>{hsA.exports=function(A){return function(Q,B,$){if(Q===" ")return Q;switch(B%3){case 0:return A.red(Q);case 1:return A.white(Q);case 2:return A.blue(Q)}}}});var csA=$A((VyB,msA)=>{msA.exports=function(A){return function(Q,B,$){return B%2===0?Q:A.inverse(Q)}}});var dsA=$A((CyB,lsA)=>{lsA.exports=function(A){var Q=["red","yellow","green","blue","magenta"];return function(B,$,J){if(B===" ")return B;else return A[Q[$++%Q.length]](B)}}});var isA=$A((EyB,psA)=>{psA.exports=function(A){var Q=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta","brightYellow","brightRed","brightGreen","brightBlue","brightWhite","brightCyan","brightMagenta"];return function(B,$,J){return B===" "?B:A[Q[Math.round(Math.random()*(Q.length-2))]](B)}}});var ssA=$A((wyB,asA)=>{var E$={};asA.exports=E$;E$.themes={};var QJ0=UQ("util"),qC=E$.styles=PsA(),nsA=Object.defineProperties,BJ0=new RegExp(/[\r\n]+/g);E$.supportsColor=vsA().supportsColor;if(typeof E$.enabled>"u")E$.enabled=E$.supportsColor()!==!1;E$.enable=function(){E$.enabled=!0};E$.disable=function(){E$.enabled=!1};E$.stripColors=E$.strip=function(A){return(""+A).replace(/\x1B\[\d+m/g,"")};var RyB=E$.stylize=function(Q,B){if(!E$.enabled)return Q+"";var $=qC[B];if(!$&&B in E$)return E$[B](Q);return $.open+Q+$.close},$J0=/[|\\{}()[\]^$+*?.]/g,JJ0=function(A){if(typeof A!=="string")throw TypeError("Expected a string");return A.replace($J0,"\\$&")};function rsA(A){var Q=function B(){return XJ0.apply(B,arguments)};return Q._styles=A,Q.__proto__=YJ0,Q}var osA=function(){var A={};return qC.grey=qC.gray,Object.keys(qC).forEach(function(Q){qC[Q].closeRe=new RegExp(JJ0(qC[Q].close),"g"),A[Q]={get:function(){return rsA(this._styles.concat(Q))}}}),A}(),YJ0=nsA(function(){},osA);function XJ0(){var A=Array.prototype.slice.call(arguments),Q=A.map(function(X){if(X!=null&&X.constructor===String)return X;else return QJ0.inspect(X)}).join(" ");if(!E$.enabled||!Q)return Q;var B=Q.indexOf(`
|
|
77
77
|
`)!=-1,$=this._styles,J=$.length;while(J--){var Y=qC[$[J]];if(Q=Y.open+Q.replace(Y.closeRe,Y.open)+Y.close,B)Q=Q.replace(BJ0,function(X){return Y.close+X+Y.open})}return Q}E$.setTheme=function(A){if(typeof A==="string"){console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));");return}for(var Q in A)(function(B){E$[B]=function($){if(typeof A[B]==="object"){var J=$;for(var Y in A[B])J=E$[A[B][Y]](J);return J}return E$[A[B]]($)}})(Q)};function ZJ0(){var A={};return Object.keys(osA).forEach(function(Q){A[Q]={get:function(){return rsA([Q])}}}),A}var GJ0=function(Q,B){var $=B.split("");return $=$.map(Q),$.join("")};E$.trap=fsA();E$.zalgo=ysA();E$.maps={};E$.maps.america=usA()(E$);E$.maps.zebra=csA()(E$);E$.maps.rainbow=dsA()(E$);E$.maps.random=isA()(E$);for(HFA in E$.maps)(function(A){E$[A]=function(Q){return GJ0(E$.maps[A],Q)}})(HFA);var HFA;nsA(E$,ZJ0())});var esA=$A((jyB,tsA)=>{var KJ0=ssA();tsA.exports=KJ0});var AtA=$A((WJ0)=>{WJ0.indent=function(Q){return Array(Q+1).join(" ")};WJ0.getMaxIndexLength=function(A){var Q=0;return Object.getOwnPropertyNames(A).forEach(function(B){if(A[B]===void 0)return;Q=Math.max(Q,B.length)}),Q}});var QtA=$A((TyB,zJ0)=>{zJ0.exports={author:"Rafael de Oleza <rafeca@gmail.com> (https://github.com/rafeca)",name:"prettyjson",description:"Package for formatting JSON data in a coloured YAML-style, perfect for CLI output",version:"1.2.5",homepage:"http://rafeca.com/prettyjson",keywords:["json","cli","formatting","colors"],repository:{type:"git",url:"https://github.com/rafeca/prettyjson.git"},bugs:{url:"https://github.com/rafeca/prettyjson/issues"},main:"./lib/prettyjson",files:["bin/prettyjson","lib/*.js"],license:"MIT",scripts:{test:"npm run jshint && mocha --reporter spec",testwin:"node ./node_modules/mocha/bin/mocha --reporter spec",jshint:"jshint lib/*.js test/*.js",coverage:"istanbul cover _mocha --report lcovonly -- -R spec",coveralls:"npm run coverage && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage",changelog:"git log $(git describe --tags --abbrev=0)..HEAD --pretty='* %s' --first-parent"},bin:{prettyjson:"./bin/prettyjson"},dependencies:{colors:"1.4.0",minimist:"^1.2.0"},devDependencies:{coveralls:"^2.11.15",istanbul:"^0.4.5",jshint:"^2.9.4",mocha:"^3.1.2","mocha-lcov-reporter":"^1.2.0",should:"^11.1.1"}}});var $tA=$A((IJ0)=>{var OF=esA(),kM=AtA(),qJ0=/[^\w\s\n\r\v\t\.,]/i;IJ0.version=QtA().version;var FFA=function(A,Q){return A!==void 0||Q.renderUndefined},Ze=function(A,Q,B){if(typeof A==="boolean"||typeof A==="number"||typeof A==="function"||A===null||A===void 0||A instanceof Date)return!0;if(typeof A==="string"&&A.indexOf(`
|
|
78
78
|
`)===-1)return!0;if(B.inlineArrays&&!Q){if(Array.isArray(A)&&Ze(A[0],!0,B))return!0}return!1},UJ0=function(A,Q){if(Q.noColor)return A;if(typeof A==="string")return Q.stringColor?OF[Q.stringColor](A):A;var B=A+"";if(A===!0)return OF.green(B);if(A===!1)return OF.red(B);if(A===null||A===void 0)return OF.grey(B);if(typeof A==="number")if(A>=0)return OF[Q.positiveNumberColor](B);else return OF[Q.negativeNumberColor](B);if(typeof A==="function")return"function() {}";if(Array.isArray(A))return A.join(", ");return B},zFA=function(A,Q){if(A.multilineStringColor===null||A.noColor)return Q;else return OF[A.multilineStringColor](Q)},DJ0=function(A,Q,B){var $=A.split(`
|
|
@@ -1450,7 +1450,7 @@ Docs: ${nyA}`);let X=await g1({message:"Have you added notifyAppReady() and rebu
|
|
|
1450
1450
|
Request ID: ${J}`:"";super(`Abandoning manifest upload. The following error occurred: ${$}${Y}`);this.name="ManifestUploadAbandonError",this.backendMessage=$,this.requestId=J,this.scope=A}}function qhA(A){if(A===void 0)return;let Q;try{Q=JSON.parse(A)}catch{return}if(!Q||typeof Q!=="object"||Array.isArray(Q))return;let B=Q,$=B.moreInfo&&typeof B.moreInfo==="object"&&!Array.isArray(B.moreInfo)?B.moreInfo:void 0,J=typeof $?.requestId==="string"?$.requestId:typeof B.requestId==="string"?B.requestId:void 0;if(typeof B.abandon_explicit_error==="string")return new wI("all",B.abandon_explicit_error,J);if(typeof B.abandon_manifest_only_explicit_error==="string")return new wI("manifest",B.abandon_manifest_only_explicit_error,J);return}function KcQ(A){return qhA(A?.originalResponse?.getBody?.())}function WcQ(A,Q){return A.scope==="manifest"&&Q?"manifest":"all"}class UhA{abandonError;abandonPromise;activeUploads=new Map;register(A,Q){if(this.abandonError)return Q(this.abandonError),!1;return this.activeUploads.set(A,Q),!0}unregister(A){this.activeUploads.delete(A)}throwIfAbandoned(){if(this.abandonError)throw this.abandonError}async abandon(A){if(!this.abandonError)this.abandonError=A;if(!this.abandonPromise){let Q=[...this.activeUploads.entries()];this.activeUploads.clear(),this.abandonPromise=(async()=>{await Promise.allSettled(Q.map(async([B])=>{await B.abort()}));for(let[,B]of Q)B(this.abandonError)})()}await this.abandonPromise}}var jI={info:(A)=>d6().info(A),warn:(A)=>d6().warn(A),error:(A)=>d6().error(A)},FOB=new Set([429,502,503,504]),zOB=30000;function qOB(A){return FOB.has(A)}function FcQ(A){return Math.min(A,zOB)}function UOB(A,Q,B){let $=Q[B];if($===void 0)return;if(A.status!==429)return $;let J=A.headers.get("Retry-After")?.trim();if(!J)return $;if(/^\d+$/.test(J)){let X=Number(J),Z=X*1000;if(Number.isSafeInteger(X)&&Number.isFinite(Z))return FcQ(Z)}let Y=Date.parse(J);if(Number.isFinite(Y)){let X=Y-Date.now();if(X>=0)return FcQ(X)}return $}function DOB(A){return new PA(`Cannot check whether manifest file exists (HTTP ${A})`,{status:A})}async function IOB(A,Q){let B=new URL(`${A}${encodeURIComponent(Q)}`),$=TP.slice(0,3);for(let J=0;;J++){B.searchParams.set("nocache",`${Date.now()}`);try{let Y=await fetch(B.toString(),{method:"GET",redirect:"manual",headers:c1({"cache-control":"no-cache"})});if(Y.status===404)return{exists:!1};if(!Y.ok){let X=qOB(Y.status)?UOB(Y,$,J):void 0;if(X!==void 0){if(await Y.body?.cancel(),X>0)await new Promise((Z)=>setTimeout(Z,X));continue}throw DOB(Y.status)}return{exists:!0,receipt:Y.headers.get("X-Capgo-Manifest-Size-Receipt")??void 0}}catch(Y){let X=$[J];if(!OU(Y)||X===void 0)throw Y;if(X>0)await new Promise((Z)=>setTimeout(Z,X))}}}var MOB=8192;async function OOB(A){let Q=r1(),B=await LZ("@capgo/capacitor-updater",Q,A.packageJson),$;try{$=B?Y1(B):void 0}catch{$=void 0}if(!B||!$)return{version:null,supportsBrotliV2:!1};let J=!tW($,void 0,void 0,Ku);return{version:`${$.major}.${$.minor}.${$.patch}`,supportsBrotliV2:J}}function LOB(A,Q){if(!Q)return!1;let B=Q.split(",").map(($)=>$.trim()).filter(($)=>!!$);if(B.length===0)return!1;return zcQ.isMatch(A,B)}async function NOB(A,Q,B){let J=ZOB(A).size,Y=await IhA(DhA(A));if(J===0)return{buffer:Y,useBrotli:!1};if(LOB(Q,B.noBrotliPatterns))return{buffer:Y,useBrotli:!1};if(J<MOB)return{buffer:Y,useBrotli:!1};try{let X=await IhA(DhA(A).pipe(HOB({})));if(X.length>=J-10)return{buffer:Y,useBrotli:!1};return{buffer:X,useBrotli:!0}}catch(X){return jI.warn(`Brotli compression failed for ${A}: ${X}, using original file`),{buffer:Y,useBrotli:!1}}}async function MhA(A,Q,B,$=!1){let J=d6().spinner();J.start(Q!=="v2"?"Generating the update manifest":`Generating the update manifest with ${$?"V3":"V2"} encryption`);let Y=await DBA(A);if(Q==="v2")for(let X of Y)X.hash=$?Lx(X.hash,B):Ox(X.hash,B);return J.stop("Manifest generated successfully"),Y}async function UcQ(A,Q,B,$,J,Y,X=!1){let Z=await MhA(A,J,Y,X);return await yB(Q,{channel:"partial-update",event:"Generate manifest",org_id:B,tracking_version:2,tags:{"app-id":$}}),Z}function DcQ(A){if(GOB()!=="win32")return A;return HcQ.normalize(A).split(HcQ.sep).join(WOB.sep)}class vx extends PA{constructor(A){super(A);this.name="PartialUploadValidationError"}}async function VOB(A,Q){let{version:B,supportsBrotliV2:$}=await OOB(Q);if(!$)throw new vx(`Your project is using an older version of @capgo/capacitor-updater (${B||"unknown"}). To use Delta updates, please upgrade to version ${qBA} (v5), ${UBA} (v6) or ${Ku} (v7) or higher.`);if(Q.disableBrotli)jI.info("Brotli compression disabled by user request");else if(Q.noBrotliPatterns)jI.info(`Files matching patterns (${Q.noBrotliPatterns}) will be excluded from brotli compression`);let J=A.filter((Y)=>Y.file.includes(" "));if(J.length>0)throw new vx(`Files with spaces in their names (${J.map((Y)=>Y.file).join(", ")}). Please rename the files.`);if(A.length>Xu)throw new vx(GBA(A.length))}async function IcQ(A,Q,B,$){let J=KOB(Q,A.file),Y=DcQ(A.file),X=$.disableBrotli?{buffer:await IhA(DhA(J)),useBrotli:!1}:await NOB(J,Y,$),Z=B?Mx(X.buffer,B.sessionKey,B.ivSessionKey):X.buffer,G=X.useBrotli?`${Y}.br`:Y;return{buffer:Z,fileName:G,compression:X.useBrotli?"brotli":"none",uploadedBytesSha256:XOB("sha256").update(Z).digest("hex"),uploadedBytesSize:Z.byteLength}}async function YZA(A,Q,B,$,J){if(await VOB(A,$),A.length===0)throw new PA("Cannot request a manifest upload for an empty manifest");let Y=[];for(let[X,Z]of A.entries()){let G=await IcQ(Z,Q,B,$),K={id:X,file_name:G.fileName,compression:G.compression,file_hash:Z.hash,uploaded_bytes_sha256:G.uploadedBytesSha256,uploaded_bytes_size:G.uploadedBytesSize};if(Y.push(K),J)await J(K,G.buffer)}return Y}function COB(A,Q){if(A.request.file_name!==Q.fileName||A.request.compression!==Q.compression||A.request.uploaded_bytes_sha256!==Q.uploadedBytesSha256||A.request.uploaded_bytes_size!==Q.uploadedBytesSize)throw new PA(`Manifest file changed while preparing the upload: ${A.request.file_name}`)}function EOB(A){return c1({[A.uploadAuthorization.headerName]:A.uploadAuthorization.value})}async function McQ(A,Q,B,$,J,Y,X,Z){let G=d6().spinner();G.start("Preparing delta update with TUS protocol");let K=performance.now(),W=!!X.userRequestedDelta;if(Z.entries.length!==Q.length)throw new PA("Manifest upload authorization does not match the local manifest");let H=0,F=Q.length,D=Z.entries.filter((I)=>I.request.compression==="brotli").length,U=new UhA;try{G.message(`Uploading ${F} files using TUS protocol`);let I=async(V,R)=>{U.throwIfAbandoned();let E=DcQ(V.file),j=await IcQ(V,B,Y,X),_=j.buffer;U.throwIfAbandoned();let v=Z.entries[R];if(v.request.file_hash!==V.hash)throw new PA(`Manifest upload authorization does not match the local manifest entry ${R}`);COB(v,j);let S=j.fileName,f=v.s3Path;if(v.action==="reuse")return H++,{file_name:S,s3_path:f,file_hash:V.hash,file_size_receipt:v.fileSizeReceipt};let u={exists:!1};if(v.action==="upload_if_doesnt_exist")try{u=await IOB(v.uploadTarget.existence_check_url_prefix,f)}catch(a){let e=a instanceof Error?a.message:String(a);throw Error(`Cannot check whether delta file exists: ${E}: ${e}`,{cause:a})}if(U.throwIfAbandoned(),u.exists)return H++,Promise.resolve({file_name:S,s3_path:f,file_hash:V.hash,file_size_receipt:u.receipt});return new Promise((a,e)=>{G.message(`Prepare upload delta file: ${E}`);let r=CE(S),i=EOB(v),d=new qcQ.Upload(_,{endpoint:v.uploadTarget.upload_url,chunkSize:X.tusChunkSize,retryDelays:[...TP],removeFingerprintOnSuccess:!0,metadata:{filename:f,filetype:r},headers:i,onAfterResponse(y,p){let h=qhA(p.getBody());if(h)return U.abandon(h)},onError:(y)=>{let p=KcQ(y);if(p){U.abandon(p);return}U.unregister(d);let h=X.verbose?Zu(y):y.toString();if(CVA(y)){jI.error(`Failed to upload ${E}: ${h}`),e(Error(Wu($)));return}let c;try{let l=h.match(/response text: (\{.*?\})/);if(l&&l[1])c=JSON.parse(l[1]).moreInfo?.requestId}catch{}let QA=c?` [requestId: ${c}]`:"";jI.error(`Failed to upload ${E}: ${h}${QA}`),e(y)},onProgress(){let y=(H/F*100).toFixed(2);G.message(`Uploading delta update: ${y}%`)},onSuccess({lastResponse:y}){U.unregister(d),H++,a({file_name:S,s3_path:f,file_hash:V.hash,file_size_receipt:y.getHeader("X-Capgo-Manifest-Size-Receipt")??void 0})}});if(U.register(d,e))d.start()})},M=X.deltaUploadConcurrency??50,N=[];for(let V=0;V<Q.length;V+=M){U.throwIfAbandoned();let R=Q.slice(V,V+M),E=Math.floor(V/M)+1,j=Math.ceil(Q.length/M);if(j>1)G.message(`Processing batch ${E}/${j} (${R.length} files)`);let _=await Promise.all(R.map((v,S)=>I(v,V+S)));N.push(..._)}if(N.some((V)=>!V.file_size_receipt))throw new PA("Manifest upload did not return a size receipt for every file");let L=((performance.now()-K)/1000).toFixed(2);if(G.stop(`Delta update uploaded successfully \uD83D\uDCAA in (${L} seconds)`),D>0)jI.info(`${D} of ${F} files were compressed with brotli and use .br extension`);return await yB(A,{channel:"app",event:`App Partial TUS done${D>0?" with .br extension":""}`,org_id:J,tracking_version:2,tags:{"app-id":$}}),await yB(A,{channel:"performance",event:"Partial upload performance",org_id:J,tracking_version:2,tags:{"app-id":$,time:L}}),N}catch(I){let N=((performance.now()-K)/1000).toFixed(2);if(G.error(`Failed to upload delta update (after ${N} seconds)`),I instanceof wI)throw I;let C=X.verbose?Zu(I):String(I);if(W)throw jI.error(`Error uploading delta update: ${C}`),jI.error("Delta upload was explicitly requested but failed. Upload aborted."),I;else return jI.info(`Error uploading delta update: ${C}, This is not a critical error, the bundle has been uploaded without the delta files`),null}}xC();function OhA(A){if(!A)return[];let Q=A.split(",").map((B)=>B.trim()).filter(Boolean);return Array.from(new Set(Q))}function xx(A){return A.join(", ")}function OcQ(A,Q,B){let $=[],J=[];for(let Y of A){if(B.get(Y)===Q){$.push(Y);continue}J.push(Y)}return{channelsAlreadyCurrent:$,channelsToAssign:J}}VG();import{existsSync as LhA,readFileSync as ROB}from"node:fs";iy();J1();$0();xC();var Mq={info:(A)=>d6().info(A),warn:(A)=>d6().warn(A),error:(A)=>d6().error(A)};function NhA(A){throw Mq.error(A),new PA(A)}var wOB="5.30.0",jOB="6.30.0",_OB="7.30.0",LcQ=["@capgo/cordova-updater","cordova-plugin-capgo"];function TOB(A){return LcQ.includes(A)}async function POB(A,Q){if(!cH(A.mode)){let B=await LZ("@capgo/capacitor-updater",Q,A.packageJson);return B?{packageName:"@capgo/capacitor-updater",version:B}:null}for(let B of LcQ){let $=await LZ(B,Q,A.packageJson);if($)return{packageName:B,version:$}}return null}async function XZA(A,Q,B,$={}){let J,Y,X="",Z=null,G="none",K="",W="",H,F=Q.keyV2,D=Q.key===!1,U=d6().spinner();U.start(`Zipping bundle from ${A}`),Z=await IBA(A),U.message("Calculating checksum");let I=r1(),M=await POB(Q,I),N=M?.version,C=M?.packageName,L=!1,V;try{V=N?Y1(N):void 0}catch{V=void 0}if(!M)if(cH(Q.mode))Mq.warn("Cannot find a Capgo updater plugin in node_modules. Using SHA256 checksum for this Cordova upload."),L=!0;else NhA("Cannot find @capgo/capacitor-updater in node_modules, please install it first with your package manager");else if(C&&TOB(C))L=!0;else if(V)L=!tW(V,qBA,UBA,Ku);else if(N==="link:@capgo/capacitor-updater"||N==="file:.."||N==="file:../")Mq.warn(`Using local ${C??"@capgo/capacitor-updater"}. Assuming latest version for checksum calculation.`),L=!0;let R=Q.forceCrc32Checksum===!0,E=!R&&((F||Q.keyDataV2||LhA(Z5))&&!D||L),j=E?"sha256":"crc32";if(X=await oM(Z,j),U.stop(`Checksum ${E?"SHA256":"CRC32"}${R?" (forced)":""}: ${X}`),D)Mq.info("Encryption ignored");else if((F||LhA(Z5)||Q.keyDataV2)&&!Q.oldEncryption){let _=typeof F==="string"?F:Z5,v=Q.keyDataV2||"";if(!v&&!LhA(_))NhA(`Cannot find private key ${_}`);if(await $.onEncryptV2?.(),!v)v=ROB(_).toString();let S=V&&!tW(V,"5.30.0","6.30.0","7.30.0");Mq.info(`Encrypting your bundle with ${S?"V3":"V2"}`);let{sessionKey:f,ivSessionKey:u}=_XA(v),a=Mx(Z,f,u);if(X=S?Lx(X,v):Ox(X,v),J=u,H=S?"v3":"v2",Y=f,G="v2",K=v,B){if(W=jhQ(B),Q.verbose)Mq.info(`[Verbose] Encryption key_id: ${W}`)}if(Q.displayIvSession)Mq.info(`Your Iv Session key is ${J},
|
|
1451
1451
|
keep it safe, you will need it to decrypt your bundle.
|
|
1452
1452
|
It will be also visible in your dashboard
|
|
1453
|
-
`);Z=a}return{zipped:Z,ivSessionKey:J,sessionKey:Y,checksum:X,checksumAlgorithm:j,checksumEncryption:H,encryptionMethod:G,finalKeyData:K,keyId:W,updaterVersion:N,updaterPackageName:C}}function ZZA(A,Q){let B=A?new Map(A.filter((J)=>!!J.native&&J.native!==void 0).map((J)=>[J.name,J])):new Map;return B.size>0||!Q?Array.from(B,([J,Y])=>({name:J,version:Y.version,requested_version:Y.requested_version,...Y.ios_checksum&&{ios_checksum:Y.ios_checksum},...Y.android_checksum&&{android_checksum:Y.android_checksum}})):void 0}async function GZA(A,Q){if(A.encryptDelta=A.encryptDelta||A.encryptPartial,A.encryptDelta&&Q!=="v2")NhA("You cannot encrypt the delta update if you are not using the v2 encryption method");let B=!1;if(A.delta&&Q==="v2"&&!A.encryptDelta){let $=r1(),J=await LZ("@capgo/capacitor-updater",$,A.packageJson),Y;try{Y=J?Y1(J):void 0}catch{Y=void 0}if(J&&Y&&Be(Y,Y1("6.14.4"))){if(Mq.info(`Auto-enabling delta update encryption for updater version ${
|
|
1453
|
+
`);Z=a}return{zipped:Z,ivSessionKey:J,sessionKey:Y,checksum:X,checksumAlgorithm:j,checksumEncryption:H,encryptionMethod:G,finalKeyData:K,keyId:W,updaterVersion:N,updaterPackageName:C}}function ZZA(A,Q){let B=A?new Map(A.filter((J)=>!!J.native&&J.native!==void 0).map((J)=>[J.name,J])):new Map;return B.size>0||!Q?Array.from(B,([J,Y])=>({name:J,version:Y.version,requested_version:Y.requested_version,...Y.ios_checksum&&{ios_checksum:Y.ios_checksum},...Y.android_checksum&&{android_checksum:Y.android_checksum}})):void 0}async function GZA(A,Q){if(A.encryptDelta=A.encryptDelta||A.encryptPartial,A.encryptDelta&&Q!=="v2")NhA("You cannot encrypt the delta update if you are not using the v2 encryption method");let B=!1;if(A.delta&&Q==="v2"&&!A.encryptDelta){let $=r1(),J=await LZ("@capgo/capacitor-updater",$,A.packageJson),Y;try{Y=J?Y1(J):void 0}catch{Y=void 0}if(J&&Y&&Be(Y,Y1("6.14.4"))){if(Mq.info(`Auto-enabling delta update encryption for updater version ${J} (>= 6.14.4)`),A.verbose)Mq.info("[Verbose] Delta encryption auto-enabled for updater >= 6.14.4");A.encryptDelta=!0}}if(A.delta&&(A.encryptDelta||Q==="v2")){let $=r1(),J=await LZ("@capgo/capacitor-updater",$,A.packageJson),Y;try{Y=J?Y1(J):void 0}catch{Y=void 0}if(J&&Y){if(B=!tW(Y,wOB,jOB,_OB),A.verbose&&B)Mq.info(`[Verbose] Using hex checksum format for updater version ${J}`)}}return{supportsHexChecksum:B}}J1();$0();function SOB(A){let Q=A.appId?.trim()||"<appId>",B=A.path?.trim()||"www",$=A.channel?.trim()||"<channel>";return`npx @capgo/cli@latest bundle upload ${Q} --mode cordova --path ${B} --channel ${$}`}function kOB(A){return[KBA,"If this is a Cordova project (config.xml / plugin.xml and a www folder), retry with:",SOB(A)].join(`
|
|
1454
1454
|
`)}function bOB(A,Q){if(A instanceof PA&&A.message===KBA)throw new PA(kOB({appId:Q.appId,path:Q.path,channel:Q.channel}));throw A}async function NcQ(A,Q={}){if(cH(A.mode))return NuQ({path:A.path,appId:Q.appId});try{return await h0()}catch(B){bOB(B,{appId:Q.appId,path:A.path,channel:A.channel})}}var ChA="Upload cancelled by user",fA={info:(A)=>d6().info(A),warn:(A)=>d6().warn(A),error:(A)=>d6().error(A),success:(A)=>d6().success(A)};function PB(A){throw fA.error(A),new PA(A)}async function KZA(A,Q){let B=await HBA(A);PB(B||await Q())}function EhA(){throw fA.warn(ChA),new PA(ChA)}class whA extends PA{}async function VhA(A,Q,B,$){try{return await e0A(A,Q,{apikey:A,...$})}catch(J){PB(`Cannot ${B} bundle ${vA(J)}`)}}function xOB(A){let Q=A.map((B)=>{let $=xF(B);return[B.name,B.localVersion||"-",B.remoteVersion||"-",$.compatible?"✅":"❌",$.message]});fA.info(OZ({headers:["Package","Local","Remote","Status","Details"],rows:Q}))}async function fOB(A,Q){let B=SG("",Q.packageJson),$=Q.bundle||A?.plugins?.CapacitorUpdater?.version||B||`0.0.1-beta.local-${vOB().split("-")[0]}`;if(!LE.test($))PB(`Your bundle name ${$}, is not valid it should follow semver convention : https://semver.org/`);return $}function gOB(A){let Q=A.apikey||q0();if(!Q)PB("Missing API key, you need to provide an API key to upload your bundle");return Q}async function yOB(A,Q,B,$){let J=await yXA({explicitAppId:A,config:B,apikey:Q.apikey||q0(!0),packageJsonPaths:Ex(Q.packageJson),interactive:$,apiHost:Q.apiHost}),Y=Q.path||B?.webDir||(cH(Q.mode)?uXA:void 0);if(!J)PB(cH(Q.mode)?"Missing appId. Pass it on the command line or set id in config.xml / plugin.xml":"Missing argument, you need to provide a appid or be in a capacitor project");if(!Y)PB(cH(Q.mode)?`Missing upload path. Pass --path or use the default Cordova web dir (${uXA})`:"Missing argument, you need to provide a path (--path), or be in a capacitor project");if(!RcQ(Y))PB(`Path ${Y} does not exist, build your app first, or provide a valid path`);return{appid:J,path:Y}}async function hOB(A,Q,B){if(A.codeCheck===!1||A.ignoreNotifyAppReady)return;if(!Q2(Q,"notifyAppReady")){if(await rXA({webDir:Q,interactive:B})==="skipped")return}if(!Q2(Q,"notifyAppReady"))throw fA.error(`notifyAppReady() is missing in the build folder of your app. see: https://capgo.app/docs/plugins/updater/notifyappready
|
|
1455
1455
|
If you are sure your app has this code, you can use the --no-code-check or --ignore-notify-app-ready option`),Error(`notifyAppReady() is missing in the build folder of your app. see: https://capgo.app/docs/plugins/updater/notifyappready
|
|
1456
1456
|
If you are sure your app has this code, you can use the --no-code-check or --ignore-notify-app-ready option`.trim());if(!Tx(Q))PB(`index.html is missing in the root folder of ${Q}`)}async function uOB(A,Q,B,$,J,Y,X){let{ignoreMetadataCheck:Z,autoMinUpdateVersion:G,minUpdateVersion:K}=B,W={apiHost:B.apiHost},H;try{H=await JVA({apikey:A,...W},J,$)}catch(L){PB(`Cannot load channel ${$} for compatibility checks ${vA(L)}`)}let F=H?.version??void 0,D=!!H&&H.disable_auto_update==="version_number",U,I;if(H?.version&&H.version.native_packages!=null&&!Z){let L=d6().spinner();L.start(`Checking bundle compatibility with channel ${$}`);let{finalCompatibility:V,localDependencies:R}=await vP(A,J,$,B.packageJson,B.nodeModules,W,H.version.native_packages);if(I=V,U=R,I.filter((j)=>!qX(j)).length>0){if(L.error(`Bundle NOT compatible with ${$} channel`),fA.warn(""),xOB(I),fA.warn(""),fA.warn("An app store update may be required for these changes to take effect."),G)K=Y,fA.info(`Auto set min-update-version to ${K}`)}else if(G)try{let j=H.version?.min_update_version;if(!j||!LE.test(j))PB("Invalid remote min update version, skipping auto setting compatibility");K=j,L.stop(`Auto set min-update-version to ${K}`)}catch{PB(`Cannot auto set compatibility, invalid data ${H}`)}else L.stop(`Bundle compatible with ${$} channel`)}else if(!Z){if(fA.warn(`Channel ${$} is new or it's your first upload with compatibility check, it will be ignored this time`),U=await Hu(B.packageJson,B.nodeModules),G)K=Y,fA.info(`Auto set min-update-version to ${K}`)}let M=I?void 0:Z?"ignore_metadata_check":"no_remote_metadata",N=MhQ(I);if(j0({channel:"bundle",event:"Bundle Upload Compatibility Checked",apikey:B.apikey,appId:J,orgId:X,tags:{result:N.result,incompatible_count:N.incompatibleCount,channel:$,channel_name:$,...N.reasons.length>0?{reasons:N.reasons.join(",")}:{},...M?{skip_reason:M}:{}}}),D&&!K&&!Z)PB("You need to provide a min-update-version to upload a bundle to this channel");if(K){if(!LE.test(K))PB(`Your minimal version update ${K}, is not valid it should follow semver convention : https://semver.org/`)}return{nativePackages:ZZA(U,B.ignoreMetadataCheck),minUpdateVersion:K,incompatibleCount:N.incompatibleCount,compatibility:{result:N.result,versionOldId:F?.id!=null?String(F.id):void 0,versionOldName:F?.name}}}async function mOB(A,Q,B,$=!1,J=!1,Y){if(await t0A(A,Q,B,{...Y,includeDeleted:!0}).catch((Z)=>PB(vA(Z)))){if($)return fA.warn(`Version ${B} already exists - exiting gracefully due to --version-exists-ok option`),d6().outro("Bundle version already exists - exiting gracefully \uD83C\uDF89"),!0;if(J){fA.error(`❌ Version ${B} already exists`);let Z=duQ(B);fA.info("\uD83D\uDCA1 Here are some suggestions:"),Z.forEach((W,H)=>{fA.info(` ${H+1}. ${W}`)});let G=await k8({message:"What would you like to do?",options:[{value:"suggest1",label:`Use ${Z[0]}`},{value:"suggest2",label:`Use ${Z[1]}`},{value:"suggest3",label:`Use ${Z[2]}`},{value:"suggest4",label:`Use ${Z[3]}`},{value:"custom",label:"Enter a custom version"},{value:"cancel",label:"Cancel upload"}]});if(HB(G)||typeof G!=="string"||G==="cancel")EhA();let K;if(G==="custom"){let W=await luQ(B,"upload");if(!W)EhA();K=W}else{let W=Number.parseInt(G.replace("suggest",""))-1;K=Z[W]}return fA.info(`\uD83D\uDD04 Retrying with new version: ${K}`),K}PB(`Version ${B} already exists`)}return!1}function cOB(A){let Q;for(let{minUpdateVersion:B}of A){if(!B)continue;if(!Q||Be(Y1(B),Y1(Q)))Q=B}return Q}async function lOB(A,Q,B,$,J){let Y=new Map;for(let G of B){let K=d6().spinner();K.start(`Checking bundle checksum compatibility with channel ${G}`);let W=await lYQ(A,Q,G,J);if(Y.set(G,W),!W){K.stop(`No checksum found for channel ${G}, the bundle will be uploaded`);continue}if(W===$){K.stop(`Channel ${G} already has this bundle checksum`);continue}K.stop(`Checksum compatible with ${G} channel`)}let{channelsAlreadyCurrent:X,channelsToAssign:Z}=OcQ(B,$,Y);if(Z.length===0){let G=xx(B);throw fA.error(`Cannot upload the same bundle content.
|